Sha256: e6ad0b51fabe5aa6aebe2a4617cb284c9456fa85cefca631dfd7de751eed17c2

Contents?: true

Size: 600 Bytes

Versions: 9

Compression:

Stored size: 600 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
      resource_url + '/upcoming'
    end

    def pay_url
      resource_url + '/pay'
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
stripe-1.43.1 lib/stripe/invoice.rb
stripe-1.43.0 lib/stripe/invoice.rb
stripe-1.42.0 lib/stripe/invoice.rb
stripe-1.41.0 lib/stripe/invoice.rb
stripe-1.40.0 lib/stripe/invoice.rb
stripe-1.39.0 lib/stripe/invoice.rb
stripe-1.38.0 lib/stripe/invoice.rb
stripe-1.37.0 lib/stripe/invoice.rb
stripe-1.36.2 lib/stripe/invoice.rb