Sha256: af1aa42c21595aca46318ecfc2868383888620bb2a08fa8b5b0a1c0ce758aedf

Contents?: true

Size: 592 Bytes

Versions: 10

Compression:

Stored size: 592 Bytes

Contents

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

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

    def pay(opts={})
      resp, opts = request(:post, pay_url, {}, opts)
      initialize_from(resp.data, opts)
    end

    private

    def self.upcoming_url
      resource_url + '/upcoming'
    end

    def pay_url
      resource_url + '/pay'
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
stripe-2.5.0 lib/stripe/invoice.rb
stripe-2.4.0 lib/stripe/invoice.rb
stripe-2.3.0 lib/stripe/invoice.rb
stripe-2.2.1 lib/stripe/invoice.rb
stripe-2.2.0 lib/stripe/invoice.rb
stripe-2.1.0 lib/stripe/invoice.rb
stripe-2.0.3 lib/stripe/invoice.rb
stripe-2.0.2 lib/stripe/invoice.rb
stripe-2.0.1 lib/stripe/invoice.rb
stripe-2.0.0 lib/stripe/invoice.rb