From 776807349f0fc3fd7d438e02b0d49399f80b802e Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Fri, 4 May 2012 15:58:05 -0700 Subject: [PATCH] Add new Transfer API endpoints --- lib/stripe.rb | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/stripe.rb b/lib/stripe.rb index 1cfacf31..1831969c 100644 --- a/lib/stripe.rb +++ b/lib/stripe.rb @@ -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