Sha256: 96fc747054665751e7b93f74c011b204923f969ff0c627b38ceffb46f6845dde

Contents?: true

Size: 604 Bytes

Versions: 6

Compression:

Stored size: 604 Bytes

Contents

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

    def self.upcoming(params)
      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)
      self
    end

    private

    def self.upcoming_url
      url + '/upcoming'
    end

    def pay_url
      url + '/pay'
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
stripe-1.7.11 lib/stripe/invoice.rb
stripe-1.7.10 lib/stripe/invoice.rb
stripe-1.7.9 lib/stripe/invoice.rb
stripe-1.7.8 lib/stripe/invoice.rb
stripe-1.7.7 lib/stripe/invoice.rb
stripe-1.7.6 lib/stripe/invoice.rb