Sha256: a0758aa3cec7160b78c27d901b6b0e5f0debe2fde2565d2753fc200bb41651c3

Contents?: true

Size: 607 Bytes

Versions: 5

Compression:

Stored size: 607 Bytes

Contents

module Stripe
  class Invoice < APIResource
    include Stripe::APIOperations::List
    include Stripe::APIOperations::Update
    include Stripe::APIOperations::Create

    def self.upcoming(params, api_key = nil)
      response, api_key = Stripe.request(:get, upcoming_url, api_key, params)
      Util.convert_to_stripe_object(response, api_key)
    end

    def pay
      response, api_key = Stripe.request(:post, pay_url, @api_key)
      refresh_from(response, api_key)
    end

    private

    def self.upcoming_url
      url + '/upcoming'
    end

    def pay_url
      url + '/pay'
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
stripe-1.18.0 lib/stripe/invoice.rb
stripe-1.17.3 lib/stripe/invoice.rb
stripe-1.17.2 lib/stripe/invoice.rb
stripe-1.17.1 lib/stripe/invoice.rb
stripe-1.16.1 lib/stripe/invoice.rb