mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-06-18 00:01:05 -04:00
Add new Transfer API endpoints
This commit is contained in:
parent
95b3e95691
commit
776807349f
@ -42,7 +42,8 @@ module Stripe
|
||||
'invoice' => Invoice,
|
||||
'plan' => Plan,
|
||||
'coupon' => Coupon,
|
||||
'event' => Event
|
||||
'event' => Event,
|
||||
'transfer' => Transfer
|
||||
}
|
||||
case resp
|
||||
when Array
|
||||
@ -452,6 +453,21 @@ module Stripe
|
||||
include Stripe::APIOperations::List
|
||||
end
|
||||
|
||||
class Transfer < APIResource
|
||||
include Stripe::APIOperations::List
|
||||
|
||||
def transactions(params={})
|
||||
response, api_key = Stripe.request(:get, transactions_url, @api_key, params)
|
||||
Util.convert_to_stripe_object(response, api_key)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def transactions_url
|
||||
url + '/transactions'
|
||||
end
|
||||
end
|
||||
|
||||
class StripeError < StandardError
|
||||
attr_reader :message
|
||||
attr_reader :http_status
|
||||
|
Loading…
x
Reference in New Issue
Block a user