stripe 1.33.0 → 1.33.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +4 -0
- data/VERSION +1 -1
- data/lib/stripe/charge.rb +1 -5
- data/lib/stripe/version.rb +1 -1
- data/test/stripe/charge_refund_test.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9800fd15cb6c4160d39290c9ee9077b3d2e1d25b
|
4
|
+
data.tar.gz: 4de3e9d1711e6a9d4eaa53343cb12ff4d94cc8da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8b13b8bb0b338462d343771bf52a8202e1d96bd26b4cfd5a57b0956b58a2efe0c30dcc79a540b4fd366c875819be078eb540ab3565be1356d972b31022d2de0
|
7
|
+
data.tar.gz: 957e9a5d40742a1f8036eb2ea828768aee9ecc8d3411dac2217cc4ac48522ba8362c1891e9a1c0a1bc05affeef7958883fa97074b5e51163ec1d3446987f7a25
|
data/History.txt
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.33.
|
1
|
+
1.33.1
|
data/lib/stripe/charge.rb
CHANGED
@@ -5,7 +5,7 @@ module Stripe
|
|
5
5
|
include Stripe::APIOperations::Update
|
6
6
|
|
7
7
|
def refund(params={}, opts={})
|
8
|
-
self.refunds.create
|
8
|
+
self.refunds.create(params, opts)
|
9
9
|
|
10
10
|
# now that a refund has been created, we expect the state of this object
|
11
11
|
# to change as well (i.e. `refunded` will now be `true`) so refresh it
|
@@ -47,10 +47,6 @@ module Stripe
|
|
47
47
|
|
48
48
|
private
|
49
49
|
|
50
|
-
def refund_url
|
51
|
-
url + '/refund'
|
52
|
-
end
|
53
|
-
|
54
50
|
def capture_url
|
55
51
|
url + '/capture'
|
56
52
|
end
|
data/lib/stripe/version.rb
CHANGED
@@ -51,5 +51,17 @@ module Stripe
|
|
51
51
|
refund = charge.refunds.create(:amount => 20)
|
52
52
|
assert_equal 'test_new_refund', refund.id
|
53
53
|
end
|
54
|
+
|
55
|
+
should "should refund a charge with given amount" do
|
56
|
+
@mock.expects(:get).
|
57
|
+
with("#{Stripe.api_base}/v1/charges/test_charge", nil, nil).
|
58
|
+
twice.returns(make_response(make_charge(:id => 'test_charge')))
|
59
|
+
@mock.expects(:post).
|
60
|
+
with("#{Stripe.api_base}/v1/charges/test_charge/refunds", nil, 'amount=20').
|
61
|
+
once.returns(make_response(make_refund(:amount => 20)))
|
62
|
+
|
63
|
+
charge = Stripe::Charge.retrieve('test_charge')
|
64
|
+
charge.refund(:amount => 20)
|
65
|
+
end
|
54
66
|
end
|
55
67
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stripe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.33.
|
4
|
+
version: 1.33.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ross Boucher
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-01-
|
12
|
+
date: 2016-01-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest-client
|