Sha256: 3448c59859be920cd552b417ab5ec819acb63a8c36ac979463ed1666124c109b

Contents?: true

Size: 582 Bytes

Versions: 14

Compression:

Stored size: 582 Bytes

Contents

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

    def self.upcoming(params, opts={})
      response, opts = request(:get, upcoming_url, params, opts)
      Util.convert_to_stripe_object(response, opts)
    end

    def pay(opts={})
      response, opts = request(:post, pay_url, {}, opts)
      initialize_from(response, opts)
    end

    private

    def self.upcoming_url
      url + '/upcoming'
    end

    def pay_url
      url + '/pay'
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
stripe-1.36.1 lib/stripe/invoice.rb
stripe-1.36.0 lib/stripe/invoice.rb
stripe-1.35.1 lib/stripe/invoice.rb
stripe-1.35.0 lib/stripe/invoice.rb
stripe-1.34.0 lib/stripe/invoice.rb
stripe-1.33.1 lib/stripe/invoice.rb
stripe-1.33.0 lib/stripe/invoice.rb
stripe-1.32.1 lib/stripe/invoice.rb
stripe-1.32.0 lib/stripe/invoice.rb
stripe-1.31.0 lib/stripe/invoice.rb
stripe-1.30.3 lib/stripe/invoice.rb
stripe-1.30.2 lib/stripe/invoice.rb
stripe-1.30.1 lib/stripe/invoice.rb
stripe-1.30.0 lib/stripe/invoice.rb