stripe 10.15.1 → 11.0.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/CHANGELOG.md +29 -23
- data/Makefile +1 -1
- data/VERSION +1 -1
- data/lib/data/ca-certificates.crt +3340 -290
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/stripe_client.rb +8 -12
- data/lib/stripe/version.rb +1 -1
- metadata +6 -6
data/lib/stripe/api_version.rb
CHANGED
data/lib/stripe/stripe_client.rb
CHANGED
|
@@ -110,7 +110,7 @@ module Stripe
|
|
|
110
110
|
# both socket errors that may represent an intermittent problem and some
|
|
111
111
|
# special HTTP statuses.
|
|
112
112
|
def self.should_retry?(error,
|
|
113
|
-
|
|
113
|
+
num_retries:, config: Stripe.config)
|
|
114
114
|
return false if num_retries >= config.max_network_retries
|
|
115
115
|
|
|
116
116
|
case error
|
|
@@ -143,15 +143,12 @@ module Stripe
|
|
|
143
143
|
# These 429s are safe to retry.
|
|
144
144
|
return true if error.http_status == 429 && error.code == "lock_timeout"
|
|
145
145
|
|
|
146
|
-
# 500
|
|
146
|
+
# Retry on 500, 503, and other internal errors.
|
|
147
147
|
#
|
|
148
|
-
#
|
|
149
|
-
#
|
|
150
|
-
#
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
# 503 Service Unavailable
|
|
154
|
-
error.http_status == 503
|
|
148
|
+
# Note that we expect the stripe-should-retry header to be false
|
|
149
|
+
# in most cases when a 500 is returned, since our idempotency framework
|
|
150
|
+
# would typically replay it anyway.
|
|
151
|
+
true if error.http_status >= 500
|
|
155
152
|
else
|
|
156
153
|
false
|
|
157
154
|
end
|
|
@@ -490,7 +487,7 @@ module Stripe
|
|
|
490
487
|
end
|
|
491
488
|
|
|
492
489
|
http_resp =
|
|
493
|
-
execute_request_with_rescues(
|
|
490
|
+
execute_request_with_rescues(api_base, headers, usage, context) do
|
|
494
491
|
self.class
|
|
495
492
|
.default_connection_manager(config)
|
|
496
493
|
.execute_request(method, url,
|
|
@@ -560,7 +557,7 @@ module Stripe
|
|
|
560
557
|
http_status >= 400
|
|
561
558
|
end
|
|
562
559
|
|
|
563
|
-
private def execute_request_with_rescues(
|
|
560
|
+
private def execute_request_with_rescues(api_base, headers, usage, context)
|
|
564
561
|
num_retries = 0
|
|
565
562
|
|
|
566
563
|
begin
|
|
@@ -611,7 +608,6 @@ module Stripe
|
|
|
611
608
|
user_data, resp, headers)
|
|
612
609
|
|
|
613
610
|
if self.class.should_retry?(e,
|
|
614
|
-
method: method,
|
|
615
611
|
num_retries: num_retries,
|
|
616
612
|
config: config)
|
|
617
613
|
num_retries += 1
|
data/lib/stripe/version.rb
CHANGED
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:
|
|
4
|
+
version: 11.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stripe
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2024-04-10 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.
|
|
@@ -201,7 +201,7 @@ metadata:
|
|
|
201
201
|
homepage_uri: https://stripe.com/docs/api?lang=ruby
|
|
202
202
|
source_code_uri: https://github.com/stripe/stripe-ruby
|
|
203
203
|
rubygems_mfa_required: 'false'
|
|
204
|
-
post_install_message:
|
|
204
|
+
post_install_message:
|
|
205
205
|
rdoc_options: []
|
|
206
206
|
require_paths:
|
|
207
207
|
- lib
|
|
@@ -216,8 +216,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
216
216
|
- !ruby/object:Gem::Version
|
|
217
217
|
version: '0'
|
|
218
218
|
requirements: []
|
|
219
|
-
rubygems_version: 3.3.
|
|
220
|
-
signing_key:
|
|
219
|
+
rubygems_version: 3.3.26
|
|
220
|
+
signing_key:
|
|
221
221
|
specification_version: 4
|
|
222
222
|
summary: Ruby bindings for the Stripe API
|
|
223
223
|
test_files: []
|