Sha256: de5db24405c1b802bb92150c2ae111b36a08a244db32bad6fd7e83d3417a8b91

Contents?: true

Size: 618 Bytes

Versions: 17

Compression:

Stored size: 618 Bytes

Contents

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

    def self.upcoming(params, api_key = nil)
      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

17 entries across 17 versions & 1 rubygems

Version Path
stripe-1.16.0 lib/stripe/invoice.rb
stripe-1.15.0 lib/stripe/invoice.rb
stripe-1.14.0 lib/stripe/invoice.rb
stripe-1.13.0 lib/stripe/invoice.rb
stripe-1.12.0 lib/stripe/invoice.rb
stripe-1.11.0 lib/stripe/invoice.rb
stripe-1.10.1 lib/stripe/invoice.rb
stripe-1.10.0 lib/stripe/invoice.rb
stripe-1.9.9 lib/stripe/invoice.rb
stripe-1.8.8 lib/stripe/invoice.rb
stripe-1.8.7 lib/stripe/invoice.rb
stripe-1.8.6 lib/stripe/invoice.rb
stripe-1.8.5 lib/stripe/invoice.rb
stripe-1.8.4 lib/stripe/invoice.rb
stripe-1.8.3 lib/stripe/invoice.rb
stripe-1.8.2 lib/stripe/invoice.rb
stripe-1.8.1 lib/stripe/invoice.rb