mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-11-27 00:03:06 -05:00
Add new Transfer API endpoints
This commit is contained in:
parent
95b3e95691
commit
776807349f
@ -42,7 +42,8 @@ module Stripe
|
|||||||
'invoice' => Invoice,
|
'invoice' => Invoice,
|
||||||
'plan' => Plan,
|
'plan' => Plan,
|
||||||
'coupon' => Coupon,
|
'coupon' => Coupon,
|
||||||
'event' => Event
|
'event' => Event,
|
||||||
|
'transfer' => Transfer
|
||||||
}
|
}
|
||||||
case resp
|
case resp
|
||||||
when Array
|
when Array
|
||||||
@ -452,6 +453,21 @@ module Stripe
|
|||||||
include Stripe::APIOperations::List
|
include Stripe::APIOperations::List
|
||||||
end
|
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
|
class StripeError < StandardError
|
||||||
attr_reader :message
|
attr_reader :message
|
||||||
attr_reader :http_status
|
attr_reader :http_status
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user