mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-06 00:02:18 -04:00
As discussed in #325, this deprecates the public visibility of `#refresh_from` (by renaming it). It also adds some deprecation infrastructure to produce warnings when it's used.
28 lines
582 B
Ruby
28 lines
582 B
Ruby
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
|