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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e065dd2aa5986f505bf2c5497a7c759db6da997c
4
- data.tar.gz: ba93ff1df77a7f3d89bc620dbcb0a5e574283c41
3
+ metadata.gz: 9800fd15cb6c4160d39290c9ee9077b3d2e1d25b
4
+ data.tar.gz: 4de3e9d1711e6a9d4eaa53343cb12ff4d94cc8da
5
5
  SHA512:
6
- metadata.gz: e6a4dc266b606ddff15e281c34da35d61fe16b73bb4d7ffd9d3c1300427bb7353d53b9d2f3ced2e8a3faa6de5beb6b40fdc82089dabc93a5cb93b2e917f52faa
7
- data.tar.gz: 8f63334bc9c727b3dca16085019a6525ebf33a253788f74858fb8a5821d3ff162c8a254b493a296d7de03386eda684422aaa7641ea6e8cf15f97dd5194433e19
6
+ metadata.gz: a8b13b8bb0b338462d343771bf52a8202e1d96bd26b4cfd5a57b0956b58a2efe0c30dcc79a540b4fd366c875819be078eb540ab3565be1356d972b31022d2de0
7
+ data.tar.gz: 957e9a5d40742a1f8036eb2ea828768aee9ecc8d3411dac2217cc4ac48522ba8362c1891e9a1c0a1bc05affeef7958883fa97074b5e51163ec1d3446987f7a25
@@ -1,3 +1,7 @@
1
+ === 1.33.1 2016-01-21
2
+
3
+ * Pass through arguments of `Charge#refund`
4
+
1
5
  === 1.33.0 2016-01-19
2
6
 
3
7
  * Re-implement `Charge#refund` helper to use the modern endpoint suggested by docs
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.33.0
1
+ 1.33.1
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Stripe
2
- VERSION = '1.33.0'
2
+ VERSION = '1.33.1'
3
3
  end
@@ -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.0
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-19 00:00:00.000000000 Z
12
+ date: 2016-01-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client