stripe 18.5.0.pre.alpha.2 → 18.5.0.pre.alpha.4

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.
Files changed (193) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stripe/api_requestor.rb +12 -44
  3. data/lib/stripe/events/v1_billing_meter_error_report_triggered_event.rb +2 -2
  4. data/lib/stripe/events/v2_billing_cadence_billed_event.rb +2 -2
  5. data/lib/stripe/events/v2_billing_cadence_canceled_event.rb +2 -2
  6. data/lib/stripe/events/v2_billing_cadence_created_event.rb +2 -2
  7. data/lib/stripe/events/v2_billing_license_fee_created_event.rb +2 -2
  8. data/lib/stripe/events/v2_billing_license_fee_updated_event.rb +2 -2
  9. data/lib/stripe/events/v2_billing_license_fee_version_created_event.rb +2 -2
  10. data/lib/stripe/events/v2_billing_licensed_item_created_event.rb +2 -2
  11. data/lib/stripe/events/v2_billing_licensed_item_updated_event.rb +2 -2
  12. data/lib/stripe/events/v2_billing_metered_item_created_event.rb +2 -2
  13. data/lib/stripe/events/v2_billing_metered_item_updated_event.rb +2 -2
  14. data/lib/stripe/events/v2_billing_pricing_plan_component_created_event.rb +2 -2
  15. data/lib/stripe/events/v2_billing_pricing_plan_component_updated_event.rb +2 -2
  16. data/lib/stripe/events/v2_billing_pricing_plan_created_event.rb +2 -2
  17. data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_awaiting_customer_action_event.rb +2 -2
  18. data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_current_event.rb +2 -2
  19. data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_past_due_event.rb +2 -2
  20. data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_paused_event.rb +2 -2
  21. data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_unpaid_event.rb +2 -2
  22. data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_activated_event.rb +2 -2
  23. data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_canceled_event.rb +2 -2
  24. data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_paused_event.rb +2 -2
  25. data/lib/stripe/events/v2_billing_pricing_plan_updated_event.rb +2 -2
  26. data/lib/stripe/events/v2_billing_pricing_plan_version_created_event.rb +2 -2
  27. data/lib/stripe/events/v2_billing_rate_card_created_event.rb +2 -2
  28. data/lib/stripe/events/v2_billing_rate_card_custom_pricing_unit_overage_rate_created_event.rb +2 -2
  29. data/lib/stripe/events/v2_billing_rate_card_rate_created_event.rb +2 -2
  30. data/lib/stripe/events/v2_billing_rate_card_subscription_activated_event.rb +2 -2
  31. data/lib/stripe/events/v2_billing_rate_card_subscription_canceled_event.rb +2 -2
  32. data/lib/stripe/events/v2_billing_rate_card_subscription_collection_awaiting_customer_action_event.rb +2 -2
  33. data/lib/stripe/events/v2_billing_rate_card_subscription_collection_current_event.rb +2 -2
  34. data/lib/stripe/events/v2_billing_rate_card_subscription_collection_past_due_event.rb +2 -2
  35. data/lib/stripe/events/v2_billing_rate_card_subscription_collection_paused_event.rb +2 -2
  36. data/lib/stripe/events/v2_billing_rate_card_subscription_collection_unpaid_event.rb +2 -2
  37. data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_activated_event.rb +2 -2
  38. data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_canceled_event.rb +2 -2
  39. data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_paused_event.rb +2 -2
  40. data/lib/stripe/events/v2_billing_rate_card_updated_event.rb +2 -2
  41. data/lib/stripe/events/v2_billing_rate_card_version_created_event.rb +2 -2
  42. data/lib/stripe/events/v2_core_account_closed_event.rb +2 -2
  43. data/lib/stripe/events/v2_core_account_created_event.rb +2 -2
  44. data/lib/stripe/events/v2_core_account_including_configuration_card_creator_capability_status_updated_event.rb +2 -2
  45. data/lib/stripe/events/v2_core_account_including_configuration_card_creator_updated_event.rb +2 -2
  46. data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +2 -2
  47. data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +2 -2
  48. data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +2 -2
  49. data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +2 -2
  50. data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +2 -2
  51. data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +2 -2
  52. data/lib/stripe/events/v2_core_account_including_configuration_storer_capability_status_updated_event.rb +2 -2
  53. data/lib/stripe/events/v2_core_account_including_configuration_storer_updated_event.rb +2 -2
  54. data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +2 -2
  55. data/lib/stripe/events/v2_core_account_including_future_requirements_updated_event.rb +2 -2
  56. data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +2 -2
  57. data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +2 -2
  58. data/lib/stripe/events/v2_core_account_person_created_event.rb +2 -2
  59. data/lib/stripe/events/v2_core_account_person_deleted_event.rb +2 -2
  60. data/lib/stripe/events/v2_core_account_person_updated_event.rb +2 -2
  61. data/lib/stripe/events/v2_core_account_updated_event.rb +2 -2
  62. data/lib/stripe/events/v2_core_claimable_sandbox_claimed_event.rb +2 -2
  63. data/lib/stripe/events/v2_core_claimable_sandbox_created_event.rb +2 -2
  64. data/lib/stripe/events/v2_core_claimable_sandbox_expired_event.rb +2 -2
  65. data/lib/stripe/events/v2_core_claimable_sandbox_expiring_event.rb +2 -2
  66. data/lib/stripe/events/v2_core_claimable_sandbox_sandbox_details_owner_account_updated_event.rb +2 -2
  67. data/lib/stripe/events/v2_core_event_destination_ping_event.rb +2 -2
  68. data/lib/stripe/events/v2_money_management_adjustment_created_event.rb +2 -2
  69. data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +2 -2
  70. data/lib/stripe/events/v2_money_management_financial_account_updated_event.rb +2 -2
  71. data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +2 -2
  72. data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +2 -2
  73. data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +2 -2
  74. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +2 -2
  75. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +2 -2
  76. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +2 -2
  77. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +2 -2
  78. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +2 -2
  79. data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +2 -2
  80. data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +2 -2
  81. data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +2 -2
  82. data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +2 -2
  83. data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +2 -2
  84. data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +2 -2
  85. data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +2 -2
  86. data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +2 -2
  87. data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +2 -2
  88. data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +2 -2
  89. data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +2 -2
  90. data/lib/stripe/events/v2_money_management_outbound_transfer_updated_event.rb +2 -2
  91. data/lib/stripe/events/v2_money_management_payout_method_created_event.rb +2 -2
  92. data/lib/stripe/events/v2_money_management_payout_method_updated_event.rb +2 -2
  93. data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +2 -2
  94. data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +2 -2
  95. data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +2 -2
  96. data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +2 -2
  97. data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +2 -2
  98. data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +2 -2
  99. data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +2 -2
  100. data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +2 -2
  101. data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +2 -2
  102. data/lib/stripe/events/v2_money_management_recipient_verification_created_event.rb +2 -2
  103. data/lib/stripe/events/v2_money_management_recipient_verification_updated_event.rb +2 -2
  104. data/lib/stripe/events/v2_money_management_transaction_created_event.rb +2 -2
  105. data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +2 -2
  106. data/lib/stripe/events/v2_payments_off_session_payment_attempt_failed_event.rb +2 -2
  107. data/lib/stripe/events/v2_payments_off_session_payment_attempt_started_event.rb +2 -2
  108. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +2 -2
  109. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +2 -2
  110. data/lib/stripe/events/v2_payments_off_session_payment_canceled_event.rb +2 -2
  111. data/lib/stripe/events/v2_payments_off_session_payment_created_event.rb +2 -2
  112. data/lib/stripe/events/v2_payments_off_session_payment_failed_event.rb +2 -2
  113. data/lib/stripe/events/v2_payments_off_session_payment_requires_capture_event.rb +2 -2
  114. data/lib/stripe/events/v2_payments_off_session_payment_succeeded_event.rb +2 -2
  115. data/lib/stripe/events/v2_payments_settlement_allocation_intent_canceled_event.rb +2 -2
  116. data/lib/stripe/events/v2_payments_settlement_allocation_intent_created_event.rb +2 -2
  117. data/lib/stripe/events/v2_payments_settlement_allocation_intent_errored_event.rb +2 -2
  118. data/lib/stripe/events/v2_payments_settlement_allocation_intent_funds_not_received_event.rb +2 -2
  119. data/lib/stripe/events/v2_payments_settlement_allocation_intent_matched_event.rb +2 -2
  120. data/lib/stripe/events/v2_payments_settlement_allocation_intent_settled_event.rb +2 -2
  121. data/lib/stripe/events/v2_payments_settlement_allocation_intent_split_canceled_event.rb +2 -2
  122. data/lib/stripe/events/v2_payments_settlement_allocation_intent_split_created_event.rb +2 -2
  123. data/lib/stripe/events/v2_payments_settlement_allocation_intent_split_settled_event.rb +2 -2
  124. data/lib/stripe/events/v2_payments_settlement_allocation_intent_submitted_event.rb +2 -2
  125. data/lib/stripe/events/v2_reporting_report_run_created_event.rb +2 -2
  126. data/lib/stripe/events/v2_reporting_report_run_failed_event.rb +2 -2
  127. data/lib/stripe/events/v2_reporting_report_run_succeeded_event.rb +2 -2
  128. data/lib/stripe/events/v2_reporting_report_run_updated_event.rb +2 -2
  129. data/lib/stripe/object_types.rb +3 -0
  130. data/lib/stripe/params/account_session_create_params.rb +9 -2
  131. data/lib/stripe/params/checkout/session_approve_params.rb +52 -0
  132. data/lib/stripe/params/checkout/session_create_params.rb +8 -0
  133. data/lib/stripe/params/delegated_checkout/requested_session_confirm_params.rb +3 -3
  134. data/lib/stripe/params/delegated_checkout/requested_session_create_params.rb +3 -3
  135. data/lib/stripe/params/delegated_checkout/requested_session_update_params.rb +41 -2
  136. data/lib/stripe/params/orchestration/payment_attempt_retrieve_params.rb +15 -0
  137. data/lib/stripe/params/payment_attempt_record_report_authenticated_params.rb +19 -0
  138. data/lib/stripe/params/payment_attempt_record_report_canceled_params.rb +19 -0
  139. data/lib/stripe/params/payment_attempt_record_report_failed_params.rb +22 -0
  140. data/lib/stripe/params/payment_attempt_record_report_guaranteed_params.rb +19 -0
  141. data/lib/stripe/params/payment_attempt_record_report_informational_params.rb +93 -0
  142. data/lib/stripe/params/payment_attempt_record_report_refund_params.rb +79 -0
  143. data/lib/stripe/params/payment_intent_confirm_params.rb +15 -1
  144. data/lib/stripe/params/payment_intent_create_params.rb +15 -1
  145. data/lib/stripe/params/payment_intent_simulate_crypto_deposit_params.rb +31 -0
  146. data/lib/stripe/params/payment_intent_update_params.rb +15 -1
  147. data/lib/stripe/params/payment_record_report_payment_attempt_failed_params.rb +4 -1
  148. data/lib/stripe/params/payment_record_report_payment_attempt_params.rb +4 -1
  149. data/lib/stripe/params/payment_record_report_payment_params.rb +4 -1
  150. data/lib/stripe/params/radar/customer_evaluation_create_params.rb +69 -0
  151. data/lib/stripe/params/radar/customer_evaluation_update_params.rb +59 -0
  152. data/lib/stripe/params/radar/issuing_authorization_evaluation_create_params.rb +197 -0
  153. data/lib/stripe/params/shared_payment/granted_token_create_params.rb +4 -1
  154. data/lib/stripe/params/tax/registration_create_params.rb +14 -1
  155. data/lib/stripe/params/test_helpers/payment_intent_simulate_crypto_deposit_params.rb +33 -0
  156. data/lib/stripe/params/test_helpers/shared_payment/granted_token_create_params.rb +4 -1
  157. data/lib/stripe/params/v2/core/account_create_params.rb +527 -5
  158. data/lib/stripe/params/v2/core/account_update_params.rb +527 -5
  159. data/lib/stripe/params/v2/payments/off_session_payment_create_params.rb +84 -0
  160. data/lib/stripe/params.rb +13 -0
  161. data/lib/stripe/request_params.rb +5 -8
  162. data/lib/stripe/resources/account_signals.rb +1 -1
  163. data/lib/stripe/resources/checkout/session.rb +188 -0
  164. data/lib/stripe/resources/dispute.rb +2 -0
  165. data/lib/stripe/resources/invoice_item.rb +8 -14
  166. data/lib/stripe/resources/invoice_line_item.rb +6 -14
  167. data/lib/stripe/resources/issuing/authorization.rb +120 -0
  168. data/lib/stripe/resources/orchestration/payment_attempt.rb +31 -0
  169. data/lib/stripe/resources/payment_attempt_record.rb +120 -0
  170. data/lib/stripe/resources/payment_intent.rb +166 -1
  171. data/lib/stripe/resources/radar/customer_evaluation.rb +153 -0
  172. data/lib/stripe/resources/radar/issuing_authorization_evaluation.rb +245 -0
  173. data/lib/stripe/resources/tax/registration.rb +16 -0
  174. data/lib/stripe/resources/v2/core/account.rb +715 -3
  175. data/lib/stripe/resources/v2/core/event_notification.rb +2 -1
  176. data/lib/stripe/resources/v2/money_management/received_debit.rb +1 -1
  177. data/lib/stripe/resources.rb +3 -0
  178. data/lib/stripe/services/checkout/session_service.rb +11 -0
  179. data/lib/stripe/services/orchestration/payment_attempt_service.rb +19 -0
  180. data/lib/stripe/services/orchestration_service.rb +13 -0
  181. data/lib/stripe/services/payment_attempt_record_service.rb +66 -0
  182. data/lib/stripe/services/radar/customer_evaluation_service.rb +30 -0
  183. data/lib/stripe/services/radar/issuing_authorization_evaluation_service.rb +19 -0
  184. data/lib/stripe/services/radar_service.rb +4 -1
  185. data/lib/stripe/services/test_helpers/payment_intent_service.rb +19 -0
  186. data/lib/stripe/services/test_helpers_service.rb +2 -1
  187. data/lib/stripe/services/v1_services.rb +2 -1
  188. data/lib/stripe/services.rb +5 -0
  189. data/lib/stripe/version.rb +1 -1
  190. data/rbi/stripe.rbi +5725 -874
  191. metadata +23 -4
  192. data/lib/stripe/resources/alipay_account.rb +0 -34
  193. data/lib/stripe/resources/recipient_transfer.rb +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 889bcc035b68b5aab0a3a6fefc81a2161d397b8c54796f03491b296253d8999b
4
- data.tar.gz: 808eb12a8acbed40ea9f0b89155d11026a4a963a0ed8b928eb3becbaae28a222
3
+ metadata.gz: 74579c8b43ee61e3a3f44eac160fd911fbb05be52bae41d01b6a264fff38e348
4
+ data.tar.gz: dc8208a7dc5edd9550f382a96a29e8d6a600c76b9e0d94c2b6d1b101bdc2e383
5
5
  SHA512:
6
- metadata.gz: f57e3de39673830952d0864947ee06525c9ad4b34cb395e56f3019eb4be8819ecb75f96a71f038a5683a929324abbd95d0e8555d1dc1e52edabb2fc75ed34a67
7
- data.tar.gz: 69dbf016c00f9d1594e63f82e7d0d0cb26950d0b565d0f08e953082df54feb88e5bcf814613cd2cb61464f0ffbf0ec85939283a0387fa10c3db4ae0c2bf4d9d5
6
+ metadata.gz: 6f4546d6e56098b72019a2839faf49756af82f956165579efc238905f711acfb682ea299f398bdd43e5404f09c5fff765eb608d3f145e45ab42c3ede9a68bf5e
7
+ data.tar.gz: 8d2aebdd16da9a183f24e9a90320eafdc2d32e246c0eae300b71f2a111eed00e739cb998622628fc00734ca47d8d4f8997d3bac832f2600638640e304153959d
@@ -15,7 +15,6 @@ module Stripe
15
15
 
16
16
  # Initializes a new APIRequestor
17
17
  def initialize(config_arg = {})
18
- @system_profiler = SystemProfiler.new
19
18
  @last_request_metrics = Queue.new
20
19
 
21
20
  @config = case config_arg
@@ -110,7 +109,7 @@ module Stripe
110
109
  return false if num_retries >= config.max_network_retries
111
110
 
112
111
  case error
113
- when Net::OpenTimeout, Net::ReadTimeout
112
+ when Net::OpenTimeout, Net::ReadTimeout, Net::HTTPFatalError
114
113
  # Retry on timeout-related problems (either on open or read).
115
114
  true
116
115
  when EOFError, Errno::ECONNREFUSED, Errno::ECONNRESET, # rubocop:todo Lint/DuplicateBranch
@@ -350,6 +349,7 @@ module Stripe
350
349
  Errno::ETIMEDOUT => ERROR_MESSAGE_TIMEOUT_CONNECT,
351
350
  SocketError => ERROR_MESSAGE_CONNECTION,
352
351
 
352
+ Net::HTTPFatalError => ERROR_MESSAGE_CONNECTION,
353
353
  Net::OpenTimeout => ERROR_MESSAGE_TIMEOUT_CONNECT,
354
354
  Net::ReadTimeout => ERROR_MESSAGE_TIMEOUT_READ,
355
355
 
@@ -995,7 +995,7 @@ module Stripe
995
995
  headers["Stripe-Account"] = req_opts[:stripe_account] if req_opts[:stripe_account]
996
996
  headers["Stripe-Context"] = req_opts[:stripe_context] if req_opts[:stripe_context]
997
997
 
998
- user_agent = @system_profiler.user_agent
998
+ user_agent = SystemProfiler.user_agent
999
999
  begin
1000
1000
  headers.update(
1001
1001
  "X-Stripe-Client-User-Agent" => JSON.generate(user_agent)
@@ -1097,45 +1097,19 @@ module Stripe
1097
1097
  # in so that we can generate a rich user agent header to help debug
1098
1098
  # integrations.
1099
1099
  class SystemProfiler
1100
- def self.uname
1101
- if ::File.exist?("/proc/version")
1102
- ::File.read("/proc/version").strip
1103
- else
1104
- case RbConfig::CONFIG["host_os"]
1105
- when /linux|darwin|bsd|sunos|solaris|cygwin/i
1106
- uname_from_system
1107
- when /mswin|mingw/i
1108
- uname_from_system_ver
1109
- else
1110
- "unknown platform"
1111
- end
1112
- end
1113
- end
1114
-
1115
- def self.uname_from_system
1116
- (`uname -a 2>/dev/null` || "").strip
1117
- rescue Errno::ENOENT
1118
- "uname executable not found"
1119
- rescue Errno::ENOMEM # couldn't create subprocess
1120
- "uname lookup failed"
1121
- end
1122
-
1123
- def self.uname_from_system_ver
1124
- (`ver` || "").strip
1125
- rescue Errno::ENOENT
1126
- "ver executable not found"
1127
- rescue Errno::ENOMEM # couldn't create subprocess
1128
- "uname lookup failed"
1129
- end
1130
-
1131
1100
  AI_AGENTS = [
1101
+ # aiAgents: The beginning of the section generated from our OpenAPI spec
1132
1102
  %w[ANTIGRAVITY_CLI_ALIAS antigravity],
1133
1103
  %w[CLAUDECODE claude_code],
1134
1104
  %w[CLINE_ACTIVE cline],
1135
1105
  %w[CODEX_SANDBOX codex_cli],
1106
+ %w[CODEX_THREAD_ID codex_cli],
1107
+ %w[CODEX_SANDBOX_NETWORK_DISABLED codex_cli],
1108
+ %w[CODEX_CI codex_cli],
1136
1109
  %w[CURSOR_AGENT cursor],
1137
1110
  %w[GEMINI_CLI gemini_cli],
1138
1111
  %w[OPENCODE open_code],
1112
+ # aiAgents: The end of the section generated from our OpenAPI spec
1139
1113
  ].freeze
1140
1114
 
1141
1115
  def self.detect_ai_agent(env = ENV)
@@ -1145,11 +1119,7 @@ module Stripe
1145
1119
  ""
1146
1120
  end
1147
1121
 
1148
- def initialize
1149
- @uname = self.class.uname
1150
- end
1151
-
1152
- def user_agent
1122
+ def self.user_agent
1153
1123
  lang_version = "#{RUBY_VERSION} p#{RUBY_PATCHLEVEL} " \
1154
1124
  "(#{RUBY_RELEASE_DATE})"
1155
1125
 
@@ -1158,14 +1128,12 @@ module Stripe
1158
1128
  bindings_version: Stripe::VERSION,
1159
1129
  lang: "ruby",
1160
1130
  lang_version: lang_version,
1161
- platform: RUBY_PLATFORM,
1162
1131
  engine: defined?(RUBY_ENGINE) ? RUBY_ENGINE : "",
1163
- publisher: "stripe",
1164
- uname: @uname,
1165
- hostname: Socket.gethostname,
1166
1132
  }.delete_if { |_k, v| v.nil? }
1167
1133
 
1168
- ai_agent = self.class.detect_ai_agent
1134
+ ua[:platform] = RUBY_PLATFORM if Stripe.enable_telemetry?
1135
+
1136
+ ai_agent = detect_ai_agent
1169
1137
  ua[:ai_agent] = ai_agent unless ai_agent.empty?
1170
1138
 
1171
1139
  ua
@@ -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))
@@ -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))
@@ -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))
@@ -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))
@@ -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))
@@ -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))
@@ -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))
@@ -39,7 +39,7 @@ module Stripe
39
39
  method: :get,
40
40
  path: related_object.url,
41
41
  base_address: :api,
42
- opts: { stripe_context: context }
42
+ opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
43
43
  )
44
44
  end
45
45
  end
@@ -57,7 +57,7 @@ module Stripe
57
57
  resp = @client.raw_request(
58
58
  :get,
59
59
  related_object.url,
60
- opts: { stripe_context: context },
60
+ opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
61
61
  usage: ["fetch_related_object"]
62
62
  )
63
63
  @client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
@@ -39,7 +39,7 @@ module Stripe
39
39
  method: :get,
40
40
  path: related_object.url,
41
41
  base_address: :api,
42
- opts: { stripe_context: context }
42
+ opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
43
43
  )
44
44
  end
45
45
  end
@@ -57,7 +57,7 @@ module Stripe
57
57
  resp = @client.raw_request(
58
58
  :get,
59
59
  related_object.url,
60
- opts: { stripe_context: context },
60
+ opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
61
61
  usage: ["fetch_related_object"]
62
62
  )
63
63
  @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))