stripe 5.12.1 → 5.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGELOG.md +3 -0
- data/VERSION +1 -1
- data/lib/stripe/stripe_client.rb +16 -16
- data/lib/stripe/version.rb +1 -1
- data/test/stripe/stripe_client_test.rb +5 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7924a6c0f1c0e2d9ca240993b1c712ba67cffe7ffd2b0d7cc6583d15458d1dd8
|
4
|
+
data.tar.gz: 2218883f89ec0cbfd2e7e70b7811df20157bc6bb0767d2a633d04673e206205b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df0af80373f9e1b1fbc3f2fd071dd69eb1c0de845af2e1ea445fc2ceb1d6b277acc6548407680b123074a9c6a9c9a2b585875104391b3cb5c6bb154313faac7d
|
7
|
+
data.tar.gz: '0325253693ccd991bfb19afb2c2f8acb7cfbe1ffbe51f2488bba98faf6c21d5646f11b27ee1460462363717963b66e2191ec294eed1cee9b555f82d0281fa8cc'
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -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.
|
1
|
+
5.13.0
|
data/lib/stripe/stripe_client.rb
CHANGED
@@ -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 =
|
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(
|
651
|
+
OAuth::InvalidClientError.new(error_code, description, **args)
|
652
652
|
when "invalid_grant"
|
653
|
-
OAuth::InvalidGrantError.new(
|
653
|
+
OAuth::InvalidGrantError.new(error_code, description, **args)
|
654
654
|
when "invalid_request"
|
655
|
-
OAuth::InvalidRequestError.new(
|
655
|
+
OAuth::InvalidRequestError.new(error_code, description, **args)
|
656
656
|
when "invalid_scope"
|
657
|
-
OAuth::InvalidScopeError.new(
|
657
|
+
OAuth::InvalidScopeError.new(error_code, description, **args)
|
658
658
|
when "unsupported_grant_type"
|
659
|
-
OAuth::UnsupportedGrantTypeError.new(
|
659
|
+
OAuth::UnsupportedGrantTypeError.new(error_code, description, **args)
|
660
660
|
when "unsupported_response_type"
|
661
|
-
OAuth::UnsupportedResponseTypeError.new(
|
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(
|
665
|
+
OAuth::OAuthError.new(error_code, description, **args)
|
666
666
|
end
|
667
667
|
end
|
668
668
|
|
data/lib/stripe/version.rb
CHANGED
@@ -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.
|
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-
|
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.
|