From 4bef41192a25613f9080fecb3530a4fc7206ec1d Mon Sep 17 00:00:00 2001 From: Shale Craig Date: Tue, 16 Dec 2014 15:43:16 -0800 Subject: [PATCH 1/3] Add the ability to use an api_key for application_fee.refund --- lib/stripe/application_fee.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/stripe/application_fee.rb b/lib/stripe/application_fee.rb index 93137d03..3cc5e53c 100644 --- a/lib/stripe/application_fee.rb +++ b/lib/stripe/application_fee.rb @@ -6,8 +6,8 @@ module Stripe '/v1/application_fees' end - def refund(params={}) - response, api_key = Stripe.request(:post, refund_url, @api_key, params) + def refund(params={}, api_key=nil) + response, api_key = Stripe.request(:post, refund_url, api_key, params) refresh_from(response, api_key) end From fd104697f338044ad3d0829908b85ea2df8d4728 Mon Sep 17 00:00:00 2001 From: Shale Craig Date: Tue, 16 Dec 2014 15:44:57 -0800 Subject: [PATCH 2/3] Add ability to specify custom headers for application_fee.refund --- lib/stripe/application_fee.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/stripe/application_fee.rb b/lib/stripe/application_fee.rb index 3cc5e53c..5b163545 100644 --- a/lib/stripe/application_fee.rb +++ b/lib/stripe/application_fee.rb @@ -6,8 +6,8 @@ module Stripe '/v1/application_fees' end - def refund(params={}, api_key=nil) - response, api_key = Stripe.request(:post, refund_url, api_key, params) + def refund(params={}, api_key=nil, headers={}) + response, api_key = Stripe.request(:post, refund_url, api_key, params, headers) refresh_from(response, api_key) end From 7c6c8269c60dcf00d17963724a1d564b2c4ccc90 Mon Sep 17 00:00:00 2001 From: Shale Craig Date: Tue, 16 Dec 2014 15:46:08 -0800 Subject: [PATCH 3/3] Add ability to specify custom headers for list_object.create --- lib/stripe/list_object.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/stripe/list_object.rb b/lib/stripe/list_object.rb index 3099299a..1285e798 100644 --- a/lib/stripe/list_object.rb +++ b/lib/stripe/list_object.rb @@ -20,9 +20,9 @@ module Stripe Util.convert_to_stripe_object(response, api_key) end - def create(params={}, api_key=nil) + def create(params={}, api_key=nil, headers={}) api_key ||= @api_key - response, api_key = Stripe.request(:post, url, api_key, params) + response, api_key = Stripe.request(:post, url, api_key, params, headers) Util.convert_to_stripe_object(response, api_key) end