mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-07 00:05:33 -04:00
30 lines
649 B
Ruby
30 lines
649 B
Ruby
module Stripe
|
|
class Invoice < APIResource
|
|
extend Stripe::APIOperations::List
|
|
include Stripe::APIOperations::Save
|
|
extend Stripe::APIOperations::Create
|
|
|
|
OBJECT_NAME = "invoice".freeze
|
|
|
|
def self.upcoming(params, opts = {})
|
|
resp, opts = request(:get, upcoming_url, params, opts)
|
|
Util.convert_to_stripe_object(resp.data, opts)
|
|
end
|
|
|
|
def pay(params = {}, opts = {})
|
|
resp, opts = request(:post, pay_url, params, 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
|