Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct URL used for refunding application fees #351

Merged
merged 1 commit into from
Nov 16, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/stripe/application_fee.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def refund(params={}, opts={})
private

def refund_url
url + '/refund'
url + '/refunds'
end
end
end
4 changes: 3 additions & 1 deletion test/stripe/application_fee_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ class ApplicationFeeTest < Test::Unit::TestCase

should "application fees should be refundable" do
@mock.expects(:get).never
@mock.expects(:post).once.returns(make_response({:id => "fee_test_fee", :refunded => true}))
@mock.expects(:post).once.
with("#{Stripe.api_base}/v1/application_fees/test_application_fee/refunds", nil, '').
returns(make_response({:id => "fee_test_fee", :refunded => true}))
fee = Stripe::ApplicationFee.new("test_application_fee")
fee.refund
assert fee.refunded
Expand Down