Add new Transfer API endpoints

This commit is contained in:
Evan Broder 2012-05-04 15:58:05 -07:00
parent 95b3e95691
commit 776807349f

View File

@ -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