stripe 18.4.0 → 18.4.2
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/lib/stripe/api_requestor.rb +33 -2
- data/lib/stripe/events/v1_billing_meter_error_report_triggered_event.rb +2 -2
- data/lib/stripe/events/v2_core_account_closed_event.rb +2 -2
- data/lib/stripe/events/v2_core_account_created_event.rb +2 -2
- data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +2 -2
- data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +2 -2
- data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +2 -2
- data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +2 -2
- data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +2 -2
- data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +2 -2
- data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +2 -2
- data/lib/stripe/events/v2_core_account_including_future_requirements_updated_event.rb +2 -2
- data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +2 -2
- data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +2 -2
- data/lib/stripe/events/v2_core_account_person_created_event.rb +2 -2
- data/lib/stripe/events/v2_core_account_person_deleted_event.rb +2 -2
- data/lib/stripe/events/v2_core_account_person_updated_event.rb +2 -2
- data/lib/stripe/events/v2_core_account_updated_event.rb +2 -2
- data/lib/stripe/events/v2_core_event_destination_ping_event.rb +2 -2
- data/lib/stripe/resources/v2/core/event_notification.rb +2 -1
- data/lib/stripe/version.rb +1 -1
- 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: 622097cf1706f63b439c020c47e011aee914697367953dfd8d18edd826ebe1a2
|
|
4
|
+
data.tar.gz: cb611ff5ddc8a31ca29c22a73407ae1cddf65706eea0600613f62882d7c53b0d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 41d846531c371e945eeede26b605b519e876207795cdb4f8051edba2b0538e6d39c1649daaf69d59e919c94ad3d07d30a83f47bd0b4ae35fa2cfd7d5b6723679
|
|
7
|
+
data.tar.gz: 4dfb934489753748e17df973fc9d476c383f820bbedf227da929c60ffd2509da533080944c4480675ed95d1c22cbd59bd0253462d5e9bc53a9922b7d39a4eb75
|
data/lib/stripe/api_requestor.rb
CHANGED
|
@@ -110,7 +110,7 @@ module Stripe
|
|
|
110
110
|
return false if num_retries >= config.max_network_retries
|
|
111
111
|
|
|
112
112
|
case error
|
|
113
|
-
when Net::OpenTimeout, Net::ReadTimeout
|
|
113
|
+
when Net::OpenTimeout, Net::ReadTimeout, Net::HTTPFatalError
|
|
114
114
|
# Retry on timeout-related problems (either on open or read).
|
|
115
115
|
true
|
|
116
116
|
when EOFError, Errno::ECONNREFUSED, Errno::ECONNRESET, # rubocop:todo Lint/DuplicateBranch
|
|
@@ -350,6 +350,7 @@ module Stripe
|
|
|
350
350
|
Errno::ETIMEDOUT => ERROR_MESSAGE_TIMEOUT_CONNECT,
|
|
351
351
|
SocketError => ERROR_MESSAGE_CONNECTION,
|
|
352
352
|
|
|
353
|
+
Net::HTTPFatalError => ERROR_MESSAGE_CONNECTION,
|
|
353
354
|
Net::OpenTimeout => ERROR_MESSAGE_TIMEOUT_CONNECT,
|
|
354
355
|
Net::ReadTimeout => ERROR_MESSAGE_TIMEOUT_READ,
|
|
355
356
|
|
|
@@ -928,6 +929,9 @@ module Stripe
|
|
|
928
929
|
user_agent = "Stripe/#{api_mode} RubyBindings/#{Stripe::VERSION}"
|
|
929
930
|
user_agent += " " + format_app_info(Stripe.app_info) unless Stripe.app_info.nil?
|
|
930
931
|
|
|
932
|
+
ai_agent = SystemProfiler.detect_ai_agent
|
|
933
|
+
user_agent += " AIAgent/#{ai_agent}" unless ai_agent.empty?
|
|
934
|
+
|
|
931
935
|
headers = {
|
|
932
936
|
"User-Agent" => user_agent,
|
|
933
937
|
"Authorization" => "Bearer #{req_opts[:api_key]}",
|
|
@@ -1089,6 +1093,28 @@ module Stripe
|
|
|
1089
1093
|
"uname lookup failed"
|
|
1090
1094
|
end
|
|
1091
1095
|
|
|
1096
|
+
AI_AGENTS = [
|
|
1097
|
+
# aiAgents: The beginning of the section generated from our OpenAPI spec
|
|
1098
|
+
%w[ANTIGRAVITY_CLI_ALIAS antigravity],
|
|
1099
|
+
%w[CLAUDECODE claude_code],
|
|
1100
|
+
%w[CLINE_ACTIVE cline],
|
|
1101
|
+
%w[CODEX_SANDBOX codex_cli],
|
|
1102
|
+
%w[CODEX_THREAD_ID codex_cli],
|
|
1103
|
+
%w[CODEX_SANDBOX_NETWORK_DISABLED codex_cli],
|
|
1104
|
+
%w[CODEX_CI codex_cli],
|
|
1105
|
+
%w[CURSOR_AGENT cursor],
|
|
1106
|
+
%w[GEMINI_CLI gemini_cli],
|
|
1107
|
+
%w[OPENCODE open_code],
|
|
1108
|
+
# aiAgents: The end of the section generated from our OpenAPI spec
|
|
1109
|
+
].freeze
|
|
1110
|
+
|
|
1111
|
+
def self.detect_ai_agent(env = ENV)
|
|
1112
|
+
AI_AGENTS.each do |env_var, agent_name|
|
|
1113
|
+
return agent_name if env[env_var] && !env[env_var].empty?
|
|
1114
|
+
end
|
|
1115
|
+
""
|
|
1116
|
+
end
|
|
1117
|
+
|
|
1092
1118
|
def initialize
|
|
1093
1119
|
@uname = self.class.uname
|
|
1094
1120
|
end
|
|
@@ -1097,7 +1123,7 @@ module Stripe
|
|
|
1097
1123
|
lang_version = "#{RUBY_VERSION} p#{RUBY_PATCHLEVEL} " \
|
|
1098
1124
|
"(#{RUBY_RELEASE_DATE})"
|
|
1099
1125
|
|
|
1100
|
-
{
|
|
1126
|
+
ua = {
|
|
1101
1127
|
application: Stripe.app_info,
|
|
1102
1128
|
bindings_version: Stripe::VERSION,
|
|
1103
1129
|
lang: "ruby",
|
|
@@ -1108,6 +1134,11 @@ module Stripe
|
|
|
1108
1134
|
uname: @uname,
|
|
1109
1135
|
hostname: Socket.gethostname,
|
|
1110
1136
|
}.delete_if { |_k, v| v.nil? }
|
|
1137
|
+
|
|
1138
|
+
ai_agent = self.class.detect_ai_agent
|
|
1139
|
+
ua[:ai_agent] = ai_agent unless ai_agent.empty?
|
|
1140
|
+
|
|
1141
|
+
ua
|
|
1111
1142
|
end
|
|
1112
1143
|
end
|
|
1113
1144
|
|
|
@@ -95,7 +95,7 @@ module Stripe
|
|
|
95
95
|
method: :get,
|
|
96
96
|
path: related_object.url,
|
|
97
97
|
base_address: :api,
|
|
98
|
-
opts: { stripe_context: context }
|
|
98
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
|
|
99
99
|
)
|
|
100
100
|
end
|
|
101
101
|
end
|
|
@@ -113,7 +113,7 @@ module Stripe
|
|
|
113
113
|
resp = @client.raw_request(
|
|
114
114
|
:get,
|
|
115
115
|
related_object.url,
|
|
116
|
-
opts: { stripe_context: context },
|
|
116
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
|
|
117
117
|
usage: ["fetch_related_object"]
|
|
118
118
|
)
|
|
119
119
|
@client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
|
|
@@ -15,7 +15,7 @@ module Stripe
|
|
|
15
15
|
method: :get,
|
|
16
16
|
path: related_object.url,
|
|
17
17
|
base_address: :api,
|
|
18
|
-
opts: { stripe_context: context }
|
|
18
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
|
|
19
19
|
)
|
|
20
20
|
end
|
|
21
21
|
attr_reader :related_object
|
|
@@ -34,7 +34,7 @@ module Stripe
|
|
|
34
34
|
resp = @client.raw_request(
|
|
35
35
|
:get,
|
|
36
36
|
related_object.url,
|
|
37
|
-
opts: { stripe_context: context },
|
|
37
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
|
|
38
38
|
usage: ["fetch_related_object"]
|
|
39
39
|
)
|
|
40
40
|
@client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
|
|
@@ -15,7 +15,7 @@ module Stripe
|
|
|
15
15
|
method: :get,
|
|
16
16
|
path: related_object.url,
|
|
17
17
|
base_address: :api,
|
|
18
|
-
opts: { stripe_context: context }
|
|
18
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
|
|
19
19
|
)
|
|
20
20
|
end
|
|
21
21
|
attr_reader :related_object
|
|
@@ -34,7 +34,7 @@ module Stripe
|
|
|
34
34
|
resp = @client.raw_request(
|
|
35
35
|
:get,
|
|
36
36
|
related_object.url,
|
|
37
|
-
opts: { stripe_context: context },
|
|
37
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
|
|
38
38
|
usage: ["fetch_related_object"]
|
|
39
39
|
)
|
|
40
40
|
@client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
|
|
@@ -35,7 +35,7 @@ module Stripe
|
|
|
35
35
|
method: :get,
|
|
36
36
|
path: related_object.url,
|
|
37
37
|
base_address: :api,
|
|
38
|
-
opts: { stripe_context: context }
|
|
38
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
|
|
39
39
|
)
|
|
40
40
|
end
|
|
41
41
|
end
|
|
@@ -53,7 +53,7 @@ module Stripe
|
|
|
53
53
|
resp = @client.raw_request(
|
|
54
54
|
:get,
|
|
55
55
|
related_object.url,
|
|
56
|
-
opts: { stripe_context: context },
|
|
56
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
|
|
57
57
|
usage: ["fetch_related_object"]
|
|
58
58
|
)
|
|
59
59
|
@client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
|
|
@@ -15,7 +15,7 @@ module Stripe
|
|
|
15
15
|
method: :get,
|
|
16
16
|
path: related_object.url,
|
|
17
17
|
base_address: :api,
|
|
18
|
-
opts: { stripe_context: context }
|
|
18
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
|
|
19
19
|
)
|
|
20
20
|
end
|
|
21
21
|
attr_reader :related_object
|
|
@@ -34,7 +34,7 @@ module Stripe
|
|
|
34
34
|
resp = @client.raw_request(
|
|
35
35
|
:get,
|
|
36
36
|
related_object.url,
|
|
37
|
-
opts: { stripe_context: context },
|
|
37
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
|
|
38
38
|
usage: ["fetch_related_object"]
|
|
39
39
|
)
|
|
40
40
|
@client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
|
|
@@ -35,7 +35,7 @@ module Stripe
|
|
|
35
35
|
method: :get,
|
|
36
36
|
path: related_object.url,
|
|
37
37
|
base_address: :api,
|
|
38
|
-
opts: { stripe_context: context }
|
|
38
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
|
|
39
39
|
)
|
|
40
40
|
end
|
|
41
41
|
end
|
|
@@ -53,7 +53,7 @@ module Stripe
|
|
|
53
53
|
resp = @client.raw_request(
|
|
54
54
|
:get,
|
|
55
55
|
related_object.url,
|
|
56
|
-
opts: { stripe_context: context },
|
|
56
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
|
|
57
57
|
usage: ["fetch_related_object"]
|
|
58
58
|
)
|
|
59
59
|
@client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
|
|
@@ -15,7 +15,7 @@ module Stripe
|
|
|
15
15
|
method: :get,
|
|
16
16
|
path: related_object.url,
|
|
17
17
|
base_address: :api,
|
|
18
|
-
opts: { stripe_context: context }
|
|
18
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
|
|
19
19
|
)
|
|
20
20
|
end
|
|
21
21
|
attr_reader :related_object
|
|
@@ -34,7 +34,7 @@ module Stripe
|
|
|
34
34
|
resp = @client.raw_request(
|
|
35
35
|
:get,
|
|
36
36
|
related_object.url,
|
|
37
|
-
opts: { stripe_context: context },
|
|
37
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
|
|
38
38
|
usage: ["fetch_related_object"]
|
|
39
39
|
)
|
|
40
40
|
@client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
|
|
@@ -35,7 +35,7 @@ module Stripe
|
|
|
35
35
|
method: :get,
|
|
36
36
|
path: related_object.url,
|
|
37
37
|
base_address: :api,
|
|
38
|
-
opts: { stripe_context: context }
|
|
38
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
|
|
39
39
|
)
|
|
40
40
|
end
|
|
41
41
|
end
|
|
@@ -53,7 +53,7 @@ module Stripe
|
|
|
53
53
|
resp = @client.raw_request(
|
|
54
54
|
:get,
|
|
55
55
|
related_object.url,
|
|
56
|
-
opts: { stripe_context: context },
|
|
56
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
|
|
57
57
|
usage: ["fetch_related_object"]
|
|
58
58
|
)
|
|
59
59
|
@client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
|
|
@@ -15,7 +15,7 @@ module Stripe
|
|
|
15
15
|
method: :get,
|
|
16
16
|
path: related_object.url,
|
|
17
17
|
base_address: :api,
|
|
18
|
-
opts: { stripe_context: context }
|
|
18
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
|
|
19
19
|
)
|
|
20
20
|
end
|
|
21
21
|
attr_reader :related_object
|
|
@@ -34,7 +34,7 @@ module Stripe
|
|
|
34
34
|
resp = @client.raw_request(
|
|
35
35
|
:get,
|
|
36
36
|
related_object.url,
|
|
37
|
-
opts: { stripe_context: context },
|
|
37
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
|
|
38
38
|
usage: ["fetch_related_object"]
|
|
39
39
|
)
|
|
40
40
|
@client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
|
|
@@ -15,7 +15,7 @@ module Stripe
|
|
|
15
15
|
method: :get,
|
|
16
16
|
path: related_object.url,
|
|
17
17
|
base_address: :api,
|
|
18
|
-
opts: { stripe_context: context }
|
|
18
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
|
|
19
19
|
)
|
|
20
20
|
end
|
|
21
21
|
attr_reader :related_object
|
|
@@ -34,7 +34,7 @@ module Stripe
|
|
|
34
34
|
resp = @client.raw_request(
|
|
35
35
|
:get,
|
|
36
36
|
related_object.url,
|
|
37
|
-
opts: { stripe_context: context },
|
|
37
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
|
|
38
38
|
usage: ["fetch_related_object"]
|
|
39
39
|
)
|
|
40
40
|
@client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
|
|
@@ -15,7 +15,7 @@ module Stripe
|
|
|
15
15
|
method: :get,
|
|
16
16
|
path: related_object.url,
|
|
17
17
|
base_address: :api,
|
|
18
|
-
opts: { stripe_context: context }
|
|
18
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
|
|
19
19
|
)
|
|
20
20
|
end
|
|
21
21
|
attr_reader :related_object
|
|
@@ -34,7 +34,7 @@ module Stripe
|
|
|
34
34
|
resp = @client.raw_request(
|
|
35
35
|
:get,
|
|
36
36
|
related_object.url,
|
|
37
|
-
opts: { stripe_context: context },
|
|
37
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
|
|
38
38
|
usage: ["fetch_related_object"]
|
|
39
39
|
)
|
|
40
40
|
@client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
|
|
@@ -15,7 +15,7 @@ module Stripe
|
|
|
15
15
|
method: :get,
|
|
16
16
|
path: related_object.url,
|
|
17
17
|
base_address: :api,
|
|
18
|
-
opts: { stripe_context: context }
|
|
18
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
|
|
19
19
|
)
|
|
20
20
|
end
|
|
21
21
|
attr_reader :related_object
|
|
@@ -34,7 +34,7 @@ module Stripe
|
|
|
34
34
|
resp = @client.raw_request(
|
|
35
35
|
:get,
|
|
36
36
|
related_object.url,
|
|
37
|
-
opts: { stripe_context: context },
|
|
37
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
|
|
38
38
|
usage: ["fetch_related_object"]
|
|
39
39
|
)
|
|
40
40
|
@client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
|
|
@@ -15,7 +15,7 @@ module Stripe
|
|
|
15
15
|
method: :get,
|
|
16
16
|
path: related_object.url,
|
|
17
17
|
base_address: :api,
|
|
18
|
-
opts: { stripe_context: context }
|
|
18
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
|
|
19
19
|
)
|
|
20
20
|
end
|
|
21
21
|
attr_reader :related_object
|
|
@@ -34,7 +34,7 @@ module Stripe
|
|
|
34
34
|
resp = @client.raw_request(
|
|
35
35
|
:get,
|
|
36
36
|
related_object.url,
|
|
37
|
-
opts: { stripe_context: context },
|
|
37
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
|
|
38
38
|
usage: ["fetch_related_object"]
|
|
39
39
|
)
|
|
40
40
|
@client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
|
|
@@ -33,7 +33,7 @@ module Stripe
|
|
|
33
33
|
method: :get,
|
|
34
34
|
path: related_object.url,
|
|
35
35
|
base_address: :api,
|
|
36
|
-
opts: { stripe_context: context }
|
|
36
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
|
|
37
37
|
)
|
|
38
38
|
end
|
|
39
39
|
end
|
|
@@ -51,7 +51,7 @@ module Stripe
|
|
|
51
51
|
resp = @client.raw_request(
|
|
52
52
|
:get,
|
|
53
53
|
related_object.url,
|
|
54
|
-
opts: { stripe_context: context },
|
|
54
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
|
|
55
55
|
usage: ["fetch_related_object"]
|
|
56
56
|
)
|
|
57
57
|
@client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
|
|
@@ -33,7 +33,7 @@ module Stripe
|
|
|
33
33
|
method: :get,
|
|
34
34
|
path: related_object.url,
|
|
35
35
|
base_address: :api,
|
|
36
|
-
opts: { stripe_context: context }
|
|
36
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
|
|
37
37
|
)
|
|
38
38
|
end
|
|
39
39
|
end
|
|
@@ -51,7 +51,7 @@ module Stripe
|
|
|
51
51
|
resp = @client.raw_request(
|
|
52
52
|
:get,
|
|
53
53
|
related_object.url,
|
|
54
|
-
opts: { stripe_context: context },
|
|
54
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
|
|
55
55
|
usage: ["fetch_related_object"]
|
|
56
56
|
)
|
|
57
57
|
@client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
|
|
@@ -33,7 +33,7 @@ module Stripe
|
|
|
33
33
|
method: :get,
|
|
34
34
|
path: related_object.url,
|
|
35
35
|
base_address: :api,
|
|
36
|
-
opts: { stripe_context: context }
|
|
36
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
|
|
37
37
|
)
|
|
38
38
|
end
|
|
39
39
|
end
|
|
@@ -51,7 +51,7 @@ module Stripe
|
|
|
51
51
|
resp = @client.raw_request(
|
|
52
52
|
:get,
|
|
53
53
|
related_object.url,
|
|
54
|
-
opts: { stripe_context: context },
|
|
54
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
|
|
55
55
|
usage: ["fetch_related_object"]
|
|
56
56
|
)
|
|
57
57
|
@client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
|
|
@@ -15,7 +15,7 @@ module Stripe
|
|
|
15
15
|
method: :get,
|
|
16
16
|
path: related_object.url,
|
|
17
17
|
base_address: :api,
|
|
18
|
-
opts: { stripe_context: context }
|
|
18
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
|
|
19
19
|
)
|
|
20
20
|
end
|
|
21
21
|
attr_reader :related_object
|
|
@@ -34,7 +34,7 @@ module Stripe
|
|
|
34
34
|
resp = @client.raw_request(
|
|
35
35
|
:get,
|
|
36
36
|
related_object.url,
|
|
37
|
-
opts: { stripe_context: context },
|
|
37
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
|
|
38
38
|
usage: ["fetch_related_object"]
|
|
39
39
|
)
|
|
40
40
|
@client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
|
|
@@ -15,7 +15,7 @@ module Stripe
|
|
|
15
15
|
method: :get,
|
|
16
16
|
path: related_object.url,
|
|
17
17
|
base_address: :api,
|
|
18
|
-
opts: { stripe_context: context }
|
|
18
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
|
|
19
19
|
)
|
|
20
20
|
end
|
|
21
21
|
attr_reader :related_object
|
|
@@ -34,7 +34,7 @@ module Stripe
|
|
|
34
34
|
resp = @client.raw_request(
|
|
35
35
|
:get,
|
|
36
36
|
related_object.url,
|
|
37
|
-
opts: { stripe_context: context },
|
|
37
|
+
opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
|
|
38
38
|
usage: ["fetch_related_object"]
|
|
39
39
|
)
|
|
40
40
|
@client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
|
|
@@ -52,7 +52,8 @@ module Stripe
|
|
|
52
52
|
|
|
53
53
|
# Retrieves the Event that generated this EventNotification.
|
|
54
54
|
def fetch_event
|
|
55
|
-
resp = @client.raw_request(:get, "/v2/core/events/#{id}", opts: { stripe_context: context
|
|
55
|
+
resp = @client.raw_request(:get, "/v2/core/events/#{id}", opts: { stripe_context: context,
|
|
56
|
+
"Stripe-Request-Trigger" => "event=#{id}", },
|
|
56
57
|
usage: ["fetch_event"])
|
|
57
58
|
@client.deserialize(resp.http_body, api_mode: :v2)
|
|
58
59
|
end
|
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: 18.4.
|
|
4
|
+
version: 18.4.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stripe
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-03-11 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.
|