stripe 5.26.0 → 5.27.0

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
  SHA256:
3
- metadata.gz: 904e51a8673243fee242bfac79daeeb93aa5f3333ae0a70dbafc7aac55f87d90
4
- data.tar.gz: e4d11976d87cdae6b9cbf3f62379effa07a719e244b81d4c3cc1914a5be3ccd1
3
+ metadata.gz: 6f68f6b92029b2acf9c99eb5837af2aa39ff686877d189acc79f997c7f56c414
4
+ data.tar.gz: c650ded2ab2ee0062f5f5be7a6b0a78a3d2f91173576aea916aedd57fb1c6e33
5
5
  SHA512:
6
- metadata.gz: 1c130372f29afb9cf4bae86d2608a537aae2302cf342dfc152b018ac71a787053977dcb7e0a5e044e518b7feb1fa67f2932de67cbb24cb82c9d7e946890503de
7
- data.tar.gz: a91d6654370dc3a187e159cd49f4546ebe11b0f00e96b165b06f010b639d4213681393426a6ea40b4c768db6b6bf337307be5408d4d987f5ac616ff6817a6960
6
+ metadata.gz: b6d8708699cc5911fdfb5a2b7f1fad2cb62f432d8421535d3ffe238f271becab4aa6e0f85c875ad1949a509f07f6a779a979e63f5a5ddcdbee456db9fdcd63f0
7
+ data.tar.gz: 846bf9d449649354d1f210fe461801ab009281c0583a70f3f7efe63efcf8e5de8e768e9d6332a50a4b5484acf185036b3c9bde937b2b4488689450549d2b40db
@@ -15,7 +15,7 @@ notifications:
15
15
  env:
16
16
  global:
17
17
  # If changing this number, please also change it in `test/test_helper.rb`.
18
- - STRIPE_MOCK_VERSION=0.99.0
18
+ - STRIPE_MOCK_VERSION=0.101.0
19
19
 
20
20
  cache:
21
21
  directories:
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.27.0 - 2020-10-14
4
+ * [#951](https://github.com/stripe/stripe-ruby/pull/951) Add support for the Payout Reverse API
5
+
3
6
  ## 5.26.0 - 2020-09-29
4
7
  * [#949](https://github.com/stripe/stripe-ruby/pull/949) Add support for the `SetupAttempt` resource and List API
5
8
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.26.0
1
+ 5.27.0
@@ -10,6 +10,7 @@ module Stripe
10
10
  OBJECT_NAME = "payout"
11
11
 
12
12
  custom_method :cancel, http_verb: :post
13
+ custom_method :reverse, http_verb: :post
13
14
 
14
15
  def cancel(params = {}, opts = {})
15
16
  request_stripe_object(
@@ -19,5 +20,14 @@ module Stripe
19
20
  opts: opts
20
21
  )
21
22
  end
23
+
24
+ def reverse(params = {}, opts = {})
25
+ request_stripe_object(
26
+ method: :post,
27
+ path: resource_url + "/reverse",
28
+ params: params,
29
+ opts: opts
30
+ )
31
+ end
22
32
  end
23
33
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "5.26.0"
4
+ VERSION = "5.27.0"
5
5
  end
@@ -57,7 +57,7 @@ module Stripe
57
57
  should "delete a discount" do
58
58
  customer = Stripe::Customer.retrieve("cus_123")
59
59
  customer = customer.delete_discount
60
- assert_requested :delete, "#{Stripe.api_base}/v1/customers/#{customer.id}/discount"
60
+ assert_requested :delete, "#{Stripe.api_base}/v1/customers/cus_123/discount"
61
61
  assert customer.is_a?(Stripe::Customer)
62
62
  end
63
63
  end
@@ -53,5 +53,20 @@ module Stripe
53
53
  assert payout.is_a?(Stripe::Payout)
54
54
  end
55
55
  end
56
+
57
+ context "#reverse" do
58
+ should "reverse a payout" do
59
+ payout = Stripe::Payout.retrieve("tr_123")
60
+ payout = payout.reverse
61
+ assert payout.is_a?(Stripe::Payout)
62
+ end
63
+ end
64
+
65
+ context ".reverse" do
66
+ should "reverse a payout" do
67
+ payout = Stripe::Payout.reverse("pm_123")
68
+ assert payout.is_a?(Stripe::Payout)
69
+ end
70
+ end
56
71
  end
57
72
  end
@@ -16,7 +16,7 @@ require ::File.expand_path("test_data", __dir__)
16
16
  require ::File.expand_path("stripe_mock", __dir__)
17
17
 
18
18
  # If changing this number, please also change it in `.travis.yml`.
19
- MOCK_MINIMUM_VERSION = "0.99.0"
19
+ MOCK_MINIMUM_VERSION = "0.101.0"
20
20
  MOCK_PORT = Stripe::StripeMock.start
21
21
 
22
22
  # Disable all real network connections except those that are outgoing to
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stripe
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.26.0
4
+ version: 5.27.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-30 00:00:00.000000000 Z
11
+ date: 2020-10-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Stripe is the easiest way to accept payments online. See https://stripe.com
14
14
  for details.