stripe 5.12.1 → 5.13.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: 0570b7f7b0bbe1a7c91a0a6cd07717d2e9331fe5d777726fb571474353fbff73
4
- data.tar.gz: f746545c8410645471bc32bfddf4292dacf482b631da8fba0c7f7d1a8579dc30
3
+ metadata.gz: 7924a6c0f1c0e2d9ca240993b1c712ba67cffe7ffd2b0d7cc6583d15458d1dd8
4
+ data.tar.gz: 2218883f89ec0cbfd2e7e70b7811df20157bc6bb0767d2a633d04673e206205b
5
5
  SHA512:
6
- metadata.gz: f251f509afb9f3eac4cebac9f78cd15be8c3fd53f08b2c746f6164e6f5f5b83145773f541c81ff438d2c7bb1a74ab4a25588fa8da3aeea2d96db50021aabef1c
7
- data.tar.gz: dd8a64b42bed565a4cb09c8cc533bacf2be8180ad9e0b1269b1d740424234be7bccb90cc8e4a00bc95a076652df8f7d92548443bb3b3b28a115b1746be5177f4
6
+ metadata.gz: df0af80373f9e1b1fbc3f2fd071dd69eb1c0de845af2e1ea445fc2ceb1d6b277acc6548407680b123074a9c6a9c9a2b585875104391b3cb5c6bb154313faac7d
7
+ data.tar.gz: '0325253693ccd991bfb19afb2c2f8acb7cfbe1ffbe51f2488bba98faf6c21d5646f11b27ee1460462363717963b66e2191ec294eed1cee9b555f82d0281fa8cc'
@@ -5,6 +5,7 @@ rvm:
5
5
  - 2.4
6
6
  - 2.5
7
7
  - 2.6
8
+ - 2.7
8
9
  - jruby-9.2.7.0
9
10
 
10
11
  notifications:
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.13.0 - 2020-01-08
4
+ * [#891](https://github.com/stripe/stripe-ruby/pull/891) Fix most Ruby 2.7 warnings
5
+
3
6
  ## 5.12.1 - 2020-01-06
4
7
  * [#890](https://github.com/stripe/stripe-ruby/pull/890) Override API key with `client_secret` in `OAuth.token`
5
8
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.12.1
1
+ 5.13.0
@@ -606,26 +606,26 @@ module Stripe
606
606
  when 400, 404
607
607
  case error_data[:type]
608
608
  when "idempotency_error"
609
- IdempotencyError.new(error_data[:message], opts)
609
+ IdempotencyError.new(error_data[:message], **opts)
610
610
  else
611
611
  InvalidRequestError.new(
612
612
  error_data[:message], error_data[:param],
613
- opts
613
+ **opts
614
614
  )
615
615
  end
616
616
  when 401
617
- AuthenticationError.new(error_data[:message], opts)
617
+ AuthenticationError.new(error_data[:message], **opts)
618
618
  when 402
619
619
  CardError.new(
620
620
  error_data[:message], error_data[:param],
621
- opts
621
+ **opts
622
622
  )
623
623
  when 403
624
- PermissionError.new(error_data[:message], opts)
624
+ PermissionError.new(error_data[:message], **opts)
625
625
  when 429
626
- RateLimitError.new(error_data[:message], opts)
626
+ RateLimitError.new(error_data[:message], **opts)
627
627
  else
628
- APIError.new(error_data[:message], opts)
628
+ APIError.new(error_data[:message], **opts)
629
629
  end
630
630
  end
631
631
 
@@ -641,28 +641,28 @@ module Stripe
641
641
  idempotency_key: context.idempotency_key,
642
642
  request_id: context.request_id)
643
643
 
644
- args = [error_code, description, {
644
+ args = {
645
645
  http_status: resp.http_status, http_body: resp.http_body,
646
646
  json_body: resp.data, http_headers: resp.http_headers,
647
- },]
647
+ }
648
648
 
649
649
  case error_code
650
650
  when "invalid_client"
651
- OAuth::InvalidClientError.new(*args)
651
+ OAuth::InvalidClientError.new(error_code, description, **args)
652
652
  when "invalid_grant"
653
- OAuth::InvalidGrantError.new(*args)
653
+ OAuth::InvalidGrantError.new(error_code, description, **args)
654
654
  when "invalid_request"
655
- OAuth::InvalidRequestError.new(*args)
655
+ OAuth::InvalidRequestError.new(error_code, description, **args)
656
656
  when "invalid_scope"
657
- OAuth::InvalidScopeError.new(*args)
657
+ OAuth::InvalidScopeError.new(error_code, description, **args)
658
658
  when "unsupported_grant_type"
659
- OAuth::UnsupportedGrantTypeError.new(*args)
659
+ OAuth::UnsupportedGrantTypeError.new(error_code, description, **args)
660
660
  when "unsupported_response_type"
661
- OAuth::UnsupportedResponseTypeError.new(*args)
661
+ OAuth::UnsupportedResponseTypeError.new(error_code, description, **args)
662
662
  else
663
663
  # We'd prefer that all errors are typed, but we create a generic
664
664
  # OAuthError in case we run into a code that we don't recognize.
665
- OAuth::OAuthError.new(*args)
665
+ OAuth::OAuthError.new(error_code, description, **args)
666
666
  end
667
667
  end
668
668
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "5.12.1"
4
+ VERSION = "5.13.0"
5
5
  end
@@ -474,7 +474,7 @@ module Stripe
474
474
  client = StripeClient.new
475
475
  opts = { api_base: Stripe.connect_base }
476
476
  assert_raises Stripe::OAuth::InvalidRequestError do
477
- client.execute_request(:post, "/oauth/token", opts)
477
+ client.execute_request(:post, "/oauth/token", **opts)
478
478
  end
479
479
  end
480
480
  end
@@ -727,7 +727,7 @@ module Stripe
727
727
 
728
728
  opts = { api_base: Stripe.connect_base }
729
729
  e = assert_raises Stripe::OAuth::InvalidRequestError do
730
- client.execute_request(:post, "/oauth/token", opts)
730
+ client.execute_request(:post, "/oauth/token", **opts)
731
731
  end
732
732
 
733
733
  assert_equal(400, e.http_status)
@@ -743,7 +743,7 @@ module Stripe
743
743
 
744
744
  opts = { api_base: Stripe.connect_base }
745
745
  e = assert_raises Stripe::OAuth::InvalidGrantError do
746
- client.execute_request(:post, "/oauth/token", opts)
746
+ client.execute_request(:post, "/oauth/token", **opts)
747
747
  end
748
748
 
749
749
  assert_equal(400, e.http_status)
@@ -760,7 +760,7 @@ module Stripe
760
760
 
761
761
  opts = { api_base: Stripe.connect_base }
762
762
  e = assert_raises Stripe::OAuth::InvalidClientError do
763
- client.execute_request(:post, "/oauth/deauthorize", opts)
763
+ client.execute_request(:post, "/oauth/deauthorize", **opts)
764
764
  end
765
765
 
766
766
  assert_equal(401, e.http_status)
@@ -777,7 +777,7 @@ module Stripe
777
777
 
778
778
  opts = { api_base: Stripe.connect_base }
779
779
  e = assert_raises Stripe::OAuth::OAuthError do
780
- client.execute_request(:post, "/oauth/deauthorize", opts)
780
+ client.execute_request(:post, "/oauth/deauthorize", **opts)
781
781
  end
782
782
 
783
783
  assert_equal(401, e.http_status)
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.12.1
4
+ version: 5.13.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-01-06 00:00:00.000000000 Z
11
+ date: 2020-01-08 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.