Sha256: f8e931125f9fe4536888ddd5d07a78b0802b4def23d1dc5ad3d8552c471bafe7

Contents?: true

Size: 562 Bytes

Versions: 3

Compression:

Stored size: 562 Bytes

Contents

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

    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

3 entries across 3 versions & 1 rubygems

Version Path
stripe-1.7.4 lib/stripe/invoice.rb
stripe-1.7.3 lib/stripe/invoice.rb
stripe-1.7.2 lib/stripe/invoice.rb