stripe 18.1.0.pre.alpha.1 → 18.1.0.pre.alpha.3

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 (287) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stripe/event_types.rb +8 -565
  3. data/lib/stripe/events/v2_core_health_api_error_firing_event.rb +2 -0
  4. data/lib/stripe/events/v2_core_health_api_error_resolved_event.rb +2 -0
  5. data/lib/stripe/events/v2_core_health_api_latency_firing_event.rb +2 -0
  6. data/lib/stripe/events/v2_core_health_api_latency_resolved_event.rb +2 -0
  7. data/lib/stripe/events/v2_core_health_event_generation_failure_resolved_event.rb +21 -9
  8. data/lib/stripe/events/v2_core_health_fraud_rate_increased_event.rb +15 -1
  9. data/lib/stripe/events/v2_core_health_issuing_authorization_request_errors_firing_event.rb +30 -1
  10. data/lib/stripe/events/v2_core_health_issuing_authorization_request_errors_resolved_event.rb +30 -1
  11. data/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_firing_event.rb +30 -1
  12. data/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_resolved_event.rb +30 -1
  13. data/lib/stripe/events/v2_core_health_payment_method_error_firing_event.rb +2 -0
  14. data/lib/stripe/events/v2_core_health_payment_method_error_resolved_event.rb +2 -0
  15. data/lib/stripe/events/{v1_sigma_scheduled_query_run_created_event.rb → v2_payments_off_session_payment_attempt_failed_event.rb} +7 -7
  16. data/lib/stripe/events/{v1_radar_early_fraud_warning_created_event.rb → v2_payments_off_session_payment_attempt_started_event.rb} +9 -7
  17. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +2 -0
  18. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +2 -0
  19. data/lib/stripe/events/v2_payments_off_session_payment_requires_capture_event.rb +2 -2
  20. data/lib/stripe/object_types.rb +4 -0
  21. data/lib/stripe/params/invoice_create_preview_params.rb +42 -6
  22. data/lib/stripe/params/payment_intent_create_params.rb +14 -1
  23. data/lib/stripe/params/product_catalog/trial_offer_create_params.rb +60 -0
  24. data/lib/stripe/params/quote_create_params.rb +15 -3
  25. data/lib/stripe/params/quote_update_params.rb +15 -3
  26. data/lib/stripe/params/subscription_create_params.rb +17 -1
  27. data/lib/stripe/params/subscription_item_create_params.rb +17 -1
  28. data/lib/stripe/params/subscription_item_update_params.rb +17 -1
  29. data/lib/stripe/params/subscription_schedule_amend_params.rb +15 -3
  30. data/lib/stripe/params/subscription_schedule_create_params.rb +10 -2
  31. data/lib/stripe/params/subscription_schedule_update_params.rb +10 -2
  32. data/lib/stripe/params/subscription_update_params.rb +17 -1
  33. data/lib/stripe/params/v2/billing/collection_setting_create_params.rb +2 -2
  34. data/lib/stripe/params/v2/billing/collection_setting_update_params.rb +2 -2
  35. data/lib/stripe/params/v2/billing/service_action_create_params.rb +24 -0
  36. data/lib/stripe/params/v2/core/account_create_params.rb +118 -3
  37. data/lib/stripe/params/v2/core/account_token_create_params.rb +1259 -0
  38. data/lib/stripe/params/v2/core/account_token_retrieve_params.rb +10 -0
  39. data/lib/stripe/params/v2/core/account_update_params.rb +119 -4
  40. data/lib/stripe/params/v2/core/accounts/person_create_params.rb +4 -0
  41. data/lib/stripe/params/v2/core/accounts/person_token_create_params.rb +487 -0
  42. data/lib/stripe/params/v2/core/accounts/person_token_retrieve_params.rb +12 -0
  43. data/lib/stripe/params/v2/core/accounts/person_update_params.rb +4 -0
  44. data/lib/stripe/params/v2/core/event_list_params.rb +21 -21
  45. data/lib/stripe/params/v2/money_management/currency_conversion_create_params.rb +68 -0
  46. data/lib/stripe/params/v2/money_management/currency_conversion_list_params.rb +20 -0
  47. data/lib/stripe/params/v2/money_management/currency_conversion_retrieve_params.rb +10 -0
  48. data/lib/stripe/params/v2/money_management/inbound_transfer_create_params.rb +12 -0
  49. data/lib/stripe/params/v2/money_management/outbound_payment_create_params.rb +12 -0
  50. data/lib/stripe/params/v2/money_management/outbound_payment_quote_create_params.rb +12 -0
  51. data/lib/stripe/params/v2/money_management/outbound_transfer_create_params.rb +12 -0
  52. data/lib/stripe/params/v2/payments/off_session_payment_capture_params.rb +5 -9
  53. data/lib/stripe/params/v2/payments/off_session_payment_create_params.rb +13 -89
  54. data/lib/stripe/params/v2/test_helpers/financial_address_credit_params.rb +11 -0
  55. data/lib/stripe/params.rb +8 -0
  56. data/lib/stripe/resources/delegated_checkout/requested_session.rb +9 -3
  57. data/lib/stripe/resources/payment_intent.rb +16 -0
  58. data/lib/stripe/resources/payment_method.rb +2 -2
  59. data/lib/stripe/resources/product_catalog/trial_offer.rb +101 -0
  60. data/lib/stripe/resources/quote.rb +8 -118
  61. data/lib/stripe/resources/quote_line.rb +6 -0
  62. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +7 -87
  63. data/lib/stripe/resources/subscription.rb +3 -87
  64. data/lib/stripe/resources/subscription_item.rb +24 -1
  65. data/lib/stripe/resources/subscription_schedule.rb +7 -87
  66. data/lib/stripe/resources/v2/billing/cadence.rb +2 -2
  67. data/lib/stripe/resources/v2/billing/collection_setting.rb +2 -2
  68. data/lib/stripe/resources/v2/billing/collection_setting_version.rb +2 -2
  69. data/lib/stripe/resources/v2/billing/meter_event.rb +2 -1
  70. data/lib/stripe/resources/v2/billing/service_action.rb +32 -2
  71. data/lib/stripe/resources/v2/core/account.rb +341 -10
  72. data/lib/stripe/resources/v2/core/account_person_token.rb +37 -0
  73. data/lib/stripe/resources/v2/core/account_token.rb +37 -0
  74. data/lib/stripe/resources/v2/core/event.rb +0 -2
  75. data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +15 -1
  76. data/lib/stripe/resources/v2/money_management/adjustment.rb +16 -1
  77. data/lib/stripe/resources/v2/money_management/currency_conversion.rb +94 -0
  78. data/lib/stripe/resources/v2/money_management/financial_account.rb +49 -1
  79. data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +52 -3
  80. data/lib/stripe/resources/v2/money_management/outbound_payment.rb +46 -2
  81. data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +61 -3
  82. data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +46 -2
  83. data/lib/stripe/resources/v2/money_management/received_credit.rb +32 -0
  84. data/lib/stripe/resources/v2/money_management/received_debit.rb +32 -0
  85. data/lib/stripe/resources/v2/money_management/transaction.rb +65 -1
  86. data/lib/stripe/resources/v2/money_management/transaction_entry.rb +49 -1
  87. data/lib/stripe/resources/v2/payments/off_session_payment.rb +23 -79
  88. data/lib/stripe/resources.rb +6 -186
  89. data/lib/stripe/services/payment_method_service.rb +1 -1
  90. data/lib/stripe/services/product_catalog/trial_offer_service.rb +19 -0
  91. data/lib/stripe/services/product_catalog_service.rb +13 -0
  92. data/lib/stripe/services/v1_services.rb +2 -1
  93. data/lib/stripe/services/v2/core/account_service.rb +2 -1
  94. data/lib/stripe/services/v2/core/account_token_service.rb +32 -0
  95. data/lib/stripe/services/v2/core/accounts/person_token_service.rb +34 -0
  96. data/lib/stripe/services/v2/core_service.rb +2 -1
  97. data/lib/stripe/services/v2/money_management/currency_conversion_service.rb +45 -0
  98. data/lib/stripe/services/v2/money_management_service.rb +3 -1
  99. data/lib/stripe/services.rb +5 -0
  100. data/lib/stripe/stripe_object.rb +22 -1
  101. data/lib/stripe/version.rb +1 -1
  102. data/rbi/stripe.rbi +6451 -2138
  103. metadata +21 -188
  104. data/lib/stripe/events/v1_account_updated_event.rb +0 -44
  105. data/lib/stripe/events/v1_application_fee_created_event.rb +0 -44
  106. data/lib/stripe/events/v1_application_fee_refunded_event.rb +0 -44
  107. data/lib/stripe/events/v1_billing_portal_configuration_created_event.rb +0 -44
  108. data/lib/stripe/events/v1_billing_portal_configuration_updated_event.rb +0 -44
  109. data/lib/stripe/events/v1_capability_updated_event.rb +0 -44
  110. data/lib/stripe/events/v1_charge_captured_event.rb +0 -44
  111. data/lib/stripe/events/v1_charge_dispute_closed_event.rb +0 -44
  112. data/lib/stripe/events/v1_charge_dispute_created_event.rb +0 -44
  113. data/lib/stripe/events/v1_charge_dispute_funds_reinstated_event.rb +0 -44
  114. data/lib/stripe/events/v1_charge_dispute_funds_withdrawn_event.rb +0 -44
  115. data/lib/stripe/events/v1_charge_dispute_updated_event.rb +0 -44
  116. data/lib/stripe/events/v1_charge_expired_event.rb +0 -44
  117. data/lib/stripe/events/v1_charge_failed_event.rb +0 -44
  118. data/lib/stripe/events/v1_charge_pending_event.rb +0 -44
  119. data/lib/stripe/events/v1_charge_refund_updated_event.rb +0 -44
  120. data/lib/stripe/events/v1_charge_refunded_event.rb +0 -44
  121. data/lib/stripe/events/v1_charge_succeeded_event.rb +0 -44
  122. data/lib/stripe/events/v1_charge_updated_event.rb +0 -44
  123. data/lib/stripe/events/v1_checkout_session_async_payment_failed_event.rb +0 -44
  124. data/lib/stripe/events/v1_checkout_session_async_payment_succeeded_event.rb +0 -44
  125. data/lib/stripe/events/v1_checkout_session_completed_event.rb +0 -44
  126. data/lib/stripe/events/v1_checkout_session_expired_event.rb +0 -44
  127. data/lib/stripe/events/v1_climate_order_canceled_event.rb +0 -44
  128. data/lib/stripe/events/v1_climate_order_created_event.rb +0 -44
  129. data/lib/stripe/events/v1_climate_order_delayed_event.rb +0 -44
  130. data/lib/stripe/events/v1_climate_order_delivered_event.rb +0 -44
  131. data/lib/stripe/events/v1_climate_order_product_substituted_event.rb +0 -44
  132. data/lib/stripe/events/v1_climate_product_created_event.rb +0 -44
  133. data/lib/stripe/events/v1_climate_product_pricing_updated_event.rb +0 -44
  134. data/lib/stripe/events/v1_coupon_created_event.rb +0 -44
  135. data/lib/stripe/events/v1_coupon_deleted_event.rb +0 -44
  136. data/lib/stripe/events/v1_coupon_updated_event.rb +0 -44
  137. data/lib/stripe/events/v1_credit_note_created_event.rb +0 -44
  138. data/lib/stripe/events/v1_credit_note_updated_event.rb +0 -44
  139. data/lib/stripe/events/v1_credit_note_voided_event.rb +0 -44
  140. data/lib/stripe/events/v1_customer_created_event.rb +0 -44
  141. data/lib/stripe/events/v1_customer_deleted_event.rb +0 -44
  142. data/lib/stripe/events/v1_customer_subscription_created_event.rb +0 -44
  143. data/lib/stripe/events/v1_customer_subscription_deleted_event.rb +0 -44
  144. data/lib/stripe/events/v1_customer_subscription_paused_event.rb +0 -44
  145. data/lib/stripe/events/v1_customer_subscription_pending_update_applied_event.rb +0 -44
  146. data/lib/stripe/events/v1_customer_subscription_pending_update_expired_event.rb +0 -44
  147. data/lib/stripe/events/v1_customer_subscription_resumed_event.rb +0 -44
  148. data/lib/stripe/events/v1_customer_subscription_trial_will_end_event.rb +0 -44
  149. data/lib/stripe/events/v1_customer_subscription_updated_event.rb +0 -44
  150. data/lib/stripe/events/v1_customer_tax_id_created_event.rb +0 -44
  151. data/lib/stripe/events/v1_customer_tax_id_deleted_event.rb +0 -44
  152. data/lib/stripe/events/v1_customer_tax_id_updated_event.rb +0 -44
  153. data/lib/stripe/events/v1_customer_updated_event.rb +0 -44
  154. data/lib/stripe/events/v1_file_created_event.rb +0 -44
  155. data/lib/stripe/events/v1_financial_connections_account_created_event.rb +0 -44
  156. data/lib/stripe/events/v1_financial_connections_account_deactivated_event.rb +0 -44
  157. data/lib/stripe/events/v1_financial_connections_account_disconnected_event.rb +0 -44
  158. data/lib/stripe/events/v1_financial_connections_account_reactivated_event.rb +0 -44
  159. data/lib/stripe/events/v1_financial_connections_account_refreshed_balance_event.rb +0 -44
  160. data/lib/stripe/events/v1_financial_connections_account_refreshed_ownership_event.rb +0 -44
  161. data/lib/stripe/events/v1_financial_connections_account_refreshed_transactions_event.rb +0 -44
  162. data/lib/stripe/events/v1_identity_verification_session_canceled_event.rb +0 -44
  163. data/lib/stripe/events/v1_identity_verification_session_created_event.rb +0 -44
  164. data/lib/stripe/events/v1_identity_verification_session_processing_event.rb +0 -44
  165. data/lib/stripe/events/v1_identity_verification_session_redacted_event.rb +0 -44
  166. data/lib/stripe/events/v1_identity_verification_session_requires_input_event.rb +0 -44
  167. data/lib/stripe/events/v1_identity_verification_session_verified_event.rb +0 -44
  168. data/lib/stripe/events/v1_invoice_created_event.rb +0 -44
  169. data/lib/stripe/events/v1_invoice_deleted_event.rb +0 -44
  170. data/lib/stripe/events/v1_invoice_finalization_failed_event.rb +0 -44
  171. data/lib/stripe/events/v1_invoice_finalized_event.rb +0 -44
  172. data/lib/stripe/events/v1_invoice_marked_uncollectible_event.rb +0 -44
  173. data/lib/stripe/events/v1_invoice_overdue_event.rb +0 -44
  174. data/lib/stripe/events/v1_invoice_overpaid_event.rb +0 -44
  175. data/lib/stripe/events/v1_invoice_paid_event.rb +0 -44
  176. data/lib/stripe/events/v1_invoice_payment_action_required_event.rb +0 -44
  177. data/lib/stripe/events/v1_invoice_payment_failed_event.rb +0 -44
  178. data/lib/stripe/events/v1_invoice_payment_paid_event.rb +0 -44
  179. data/lib/stripe/events/v1_invoice_payment_succeeded_event.rb +0 -44
  180. data/lib/stripe/events/v1_invoice_sent_event.rb +0 -44
  181. data/lib/stripe/events/v1_invoice_upcoming_event.rb +0 -44
  182. data/lib/stripe/events/v1_invoice_updated_event.rb +0 -44
  183. data/lib/stripe/events/v1_invoice_voided_event.rb +0 -44
  184. data/lib/stripe/events/v1_invoice_will_be_due_event.rb +0 -44
  185. data/lib/stripe/events/v1_invoiceitem_created_event.rb +0 -44
  186. data/lib/stripe/events/v1_invoiceitem_deleted_event.rb +0 -44
  187. data/lib/stripe/events/v1_issuing_authorization_created_event.rb +0 -44
  188. data/lib/stripe/events/v1_issuing_authorization_request_event.rb +0 -44
  189. data/lib/stripe/events/v1_issuing_authorization_updated_event.rb +0 -44
  190. data/lib/stripe/events/v1_issuing_card_created_event.rb +0 -44
  191. data/lib/stripe/events/v1_issuing_card_updated_event.rb +0 -44
  192. data/lib/stripe/events/v1_issuing_cardholder_created_event.rb +0 -44
  193. data/lib/stripe/events/v1_issuing_cardholder_updated_event.rb +0 -44
  194. data/lib/stripe/events/v1_issuing_dispute_closed_event.rb +0 -44
  195. data/lib/stripe/events/v1_issuing_dispute_created_event.rb +0 -44
  196. data/lib/stripe/events/v1_issuing_dispute_funds_reinstated_event.rb +0 -44
  197. data/lib/stripe/events/v1_issuing_dispute_funds_rescinded_event.rb +0 -44
  198. data/lib/stripe/events/v1_issuing_dispute_submitted_event.rb +0 -44
  199. data/lib/stripe/events/v1_issuing_dispute_updated_event.rb +0 -44
  200. data/lib/stripe/events/v1_issuing_personalization_design_activated_event.rb +0 -44
  201. data/lib/stripe/events/v1_issuing_personalization_design_deactivated_event.rb +0 -44
  202. data/lib/stripe/events/v1_issuing_personalization_design_rejected_event.rb +0 -44
  203. data/lib/stripe/events/v1_issuing_personalization_design_updated_event.rb +0 -44
  204. data/lib/stripe/events/v1_issuing_token_created_event.rb +0 -44
  205. data/lib/stripe/events/v1_issuing_token_updated_event.rb +0 -44
  206. data/lib/stripe/events/v1_issuing_transaction_created_event.rb +0 -44
  207. data/lib/stripe/events/v1_issuing_transaction_purchase_details_receipt_updated_event.rb +0 -44
  208. data/lib/stripe/events/v1_issuing_transaction_updated_event.rb +0 -44
  209. data/lib/stripe/events/v1_mandate_updated_event.rb +0 -44
  210. data/lib/stripe/events/v1_payment_intent_amount_capturable_updated_event.rb +0 -44
  211. data/lib/stripe/events/v1_payment_intent_canceled_event.rb +0 -44
  212. data/lib/stripe/events/v1_payment_intent_created_event.rb +0 -44
  213. data/lib/stripe/events/v1_payment_intent_partially_funded_event.rb +0 -44
  214. data/lib/stripe/events/v1_payment_intent_payment_failed_event.rb +0 -44
  215. data/lib/stripe/events/v1_payment_intent_processing_event.rb +0 -44
  216. data/lib/stripe/events/v1_payment_intent_requires_action_event.rb +0 -44
  217. data/lib/stripe/events/v1_payment_intent_succeeded_event.rb +0 -44
  218. data/lib/stripe/events/v1_payment_link_created_event.rb +0 -44
  219. data/lib/stripe/events/v1_payment_link_updated_event.rb +0 -44
  220. data/lib/stripe/events/v1_payment_method_attached_event.rb +0 -44
  221. data/lib/stripe/events/v1_payment_method_automatically_updated_event.rb +0 -44
  222. data/lib/stripe/events/v1_payment_method_detached_event.rb +0 -44
  223. data/lib/stripe/events/v1_payment_method_updated_event.rb +0 -44
  224. data/lib/stripe/events/v1_payout_canceled_event.rb +0 -44
  225. data/lib/stripe/events/v1_payout_created_event.rb +0 -44
  226. data/lib/stripe/events/v1_payout_failed_event.rb +0 -44
  227. data/lib/stripe/events/v1_payout_paid_event.rb +0 -44
  228. data/lib/stripe/events/v1_payout_reconciliation_completed_event.rb +0 -44
  229. data/lib/stripe/events/v1_payout_updated_event.rb +0 -44
  230. data/lib/stripe/events/v1_person_created_event.rb +0 -44
  231. data/lib/stripe/events/v1_person_deleted_event.rb +0 -44
  232. data/lib/stripe/events/v1_person_updated_event.rb +0 -44
  233. data/lib/stripe/events/v1_plan_created_event.rb +0 -44
  234. data/lib/stripe/events/v1_plan_deleted_event.rb +0 -44
  235. data/lib/stripe/events/v1_plan_updated_event.rb +0 -44
  236. data/lib/stripe/events/v1_price_created_event.rb +0 -44
  237. data/lib/stripe/events/v1_price_deleted_event.rb +0 -44
  238. data/lib/stripe/events/v1_price_updated_event.rb +0 -44
  239. data/lib/stripe/events/v1_product_created_event.rb +0 -44
  240. data/lib/stripe/events/v1_product_deleted_event.rb +0 -44
  241. data/lib/stripe/events/v1_product_updated_event.rb +0 -44
  242. data/lib/stripe/events/v1_promotion_code_created_event.rb +0 -44
  243. data/lib/stripe/events/v1_promotion_code_updated_event.rb +0 -44
  244. data/lib/stripe/events/v1_quote_accepted_event.rb +0 -44
  245. data/lib/stripe/events/v1_quote_canceled_event.rb +0 -44
  246. data/lib/stripe/events/v1_quote_created_event.rb +0 -44
  247. data/lib/stripe/events/v1_quote_finalized_event.rb +0 -44
  248. data/lib/stripe/events/v1_radar_early_fraud_warning_updated_event.rb +0 -44
  249. data/lib/stripe/events/v1_refund_created_event.rb +0 -44
  250. data/lib/stripe/events/v1_refund_failed_event.rb +0 -44
  251. data/lib/stripe/events/v1_refund_updated_event.rb +0 -44
  252. data/lib/stripe/events/v1_review_closed_event.rb +0 -44
  253. data/lib/stripe/events/v1_review_opened_event.rb +0 -44
  254. data/lib/stripe/events/v1_setup_intent_canceled_event.rb +0 -44
  255. data/lib/stripe/events/v1_setup_intent_created_event.rb +0 -44
  256. data/lib/stripe/events/v1_setup_intent_requires_action_event.rb +0 -44
  257. data/lib/stripe/events/v1_setup_intent_setup_failed_event.rb +0 -44
  258. data/lib/stripe/events/v1_setup_intent_succeeded_event.rb +0 -44
  259. data/lib/stripe/events/v1_source_canceled_event.rb +0 -44
  260. data/lib/stripe/events/v1_source_chargeable_event.rb +0 -44
  261. data/lib/stripe/events/v1_source_failed_event.rb +0 -44
  262. data/lib/stripe/events/v1_source_refund_attributes_required_event.rb +0 -44
  263. data/lib/stripe/events/v1_subscription_schedule_aborted_event.rb +0 -44
  264. data/lib/stripe/events/v1_subscription_schedule_canceled_event.rb +0 -44
  265. data/lib/stripe/events/v1_subscription_schedule_completed_event.rb +0 -44
  266. data/lib/stripe/events/v1_subscription_schedule_created_event.rb +0 -44
  267. data/lib/stripe/events/v1_subscription_schedule_expiring_event.rb +0 -44
  268. data/lib/stripe/events/v1_subscription_schedule_released_event.rb +0 -44
  269. data/lib/stripe/events/v1_subscription_schedule_updated_event.rb +0 -44
  270. data/lib/stripe/events/v1_tax_rate_created_event.rb +0 -44
  271. data/lib/stripe/events/v1_tax_rate_updated_event.rb +0 -44
  272. data/lib/stripe/events/v1_terminal_reader_action_failed_event.rb +0 -44
  273. data/lib/stripe/events/v1_terminal_reader_action_succeeded_event.rb +0 -44
  274. data/lib/stripe/events/v1_terminal_reader_action_updated_event.rb +0 -44
  275. data/lib/stripe/events/v1_test_helpers_test_clock_advancing_event.rb +0 -44
  276. data/lib/stripe/events/v1_test_helpers_test_clock_created_event.rb +0 -44
  277. data/lib/stripe/events/v1_test_helpers_test_clock_deleted_event.rb +0 -44
  278. data/lib/stripe/events/v1_test_helpers_test_clock_internal_failure_event.rb +0 -44
  279. data/lib/stripe/events/v1_test_helpers_test_clock_ready_event.rb +0 -44
  280. data/lib/stripe/events/v1_topup_canceled_event.rb +0 -44
  281. data/lib/stripe/events/v1_topup_created_event.rb +0 -44
  282. data/lib/stripe/events/v1_topup_failed_event.rb +0 -44
  283. data/lib/stripe/events/v1_topup_reversed_event.rb +0 -44
  284. data/lib/stripe/events/v1_topup_succeeded_event.rb +0 -44
  285. data/lib/stripe/events/v1_transfer_created_event.rb +0 -44
  286. data/lib/stripe/events/v1_transfer_reversed_event.rb +0 -44
  287. data/lib/stripe/events/v1_transfer_updated_event.rb +0 -44
@@ -5,6 +5,18 @@ module Stripe
5
5
  module V2
6
6
  module MoneyManagement
7
7
  class InboundTransferCreateParams < ::Stripe::RequestParams
8
+ class Amount < ::Stripe::RequestParams
9
+ # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
10
+ attr_accessor :value
11
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
12
+ attr_accessor :currency
13
+
14
+ def initialize(value: nil, currency: nil)
15
+ @value = value
16
+ @currency = currency
17
+ end
18
+ end
19
+
8
20
  class From < ::Stripe::RequestParams
9
21
  # An optional currency field used to specify which currency is debited from the Payment Method.
10
22
  # Since many Payment Methods support only one currency, this field is optional.
@@ -5,6 +5,18 @@ module Stripe
5
5
  module V2
6
6
  module MoneyManagement
7
7
  class OutboundPaymentCreateParams < ::Stripe::RequestParams
8
+ class Amount < ::Stripe::RequestParams
9
+ # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
10
+ attr_accessor :value
11
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
12
+ attr_accessor :currency
13
+
14
+ def initialize(value: nil, currency: nil)
15
+ @value = value
16
+ @currency = currency
17
+ end
18
+ end
19
+
8
20
  class DeliveryOptions < ::Stripe::RequestParams
9
21
  # Open Enum. Method for bank account.
10
22
  attr_accessor :bank_account
@@ -5,6 +5,18 @@ module Stripe
5
5
  module V2
6
6
  module MoneyManagement
7
7
  class OutboundPaymentQuoteCreateParams < ::Stripe::RequestParams
8
+ class Amount < ::Stripe::RequestParams
9
+ # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
10
+ attr_accessor :value
11
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
12
+ attr_accessor :currency
13
+
14
+ def initialize(value: nil, currency: nil)
15
+ @value = value
16
+ @currency = currency
17
+ end
18
+ end
19
+
8
20
  class DeliveryOptions < ::Stripe::RequestParams
9
21
  # Open Enum. Method for bank account.
10
22
  attr_accessor :bank_account
@@ -5,6 +5,18 @@ module Stripe
5
5
  module V2
6
6
  module MoneyManagement
7
7
  class OutboundTransferCreateParams < ::Stripe::RequestParams
8
+ class Amount < ::Stripe::RequestParams
9
+ # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
10
+ attr_accessor :value
11
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
12
+ attr_accessor :currency
13
+
14
+ def initialize(value: nil, currency: nil)
15
+ @value = value
16
+ @currency = currency
17
+ end
18
+ end
19
+
8
20
  class DeliveryOptions < ::Stripe::RequestParams
9
21
  # Open Enum. Method for bank account.
10
22
  attr_accessor :bank_account
@@ -10,25 +10,21 @@ module Stripe
10
10
  # automatically after the payment succeeds. If no amount is specified, by default
11
11
  # the entire payment amount is transferred to the destination account. The amount
12
12
  # must be less than or equal to the
13
- # [amount_requested](https://docs.corp.stripe.com/api/v2/off-session-payments/object?api-version=2025-05-28.preview#v2_off_session_payment_object-amount_requested),
13
+ # [amount_requested](https://docs.stripe.com/api/v2/off-session-payments/object?api-version=2025-05-28.preview#v2_off_session_payment_object-amount_requested),
14
14
  # and must be a positive integer representing how much to transfer in the smallest
15
15
  # currency unit (e.g., 100 cents to charge $1.00).
16
16
  attr_accessor :amount
17
- # The account (if any) that the payment is attributed to for tax reporting, and
18
- # where funds from the payment are transferred to after payment success.
19
- attr_accessor :destination
20
17
 
21
- def initialize(amount: nil, destination: nil)
18
+ def initialize(amount: nil)
22
19
  @amount = amount
23
- @destination = destination
24
20
  end
25
21
  end
26
22
  # The amount to capture.
27
23
  attr_accessor :amount_to_capture
28
- # Set of [key-value pairs](https://docs.corp.stripe.com/api/metadata) that you can
24
+ # Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can
29
25
  # attach to an object. This can be useful for storing additional information about
30
26
  # the object in a structured format. Learn more about
31
- # [storing information in metadata](https://docs.corp.stripe.com/payments/payment-intents#storing-information-in-metadata).
27
+ # [storing information in metadata](https://docs.stripe.com/payments/payment-intents#storing-information-in-metadata).
32
28
  attr_accessor :metadata
33
29
  # Text that appears on the customer’s statement as the statement descriptor for a
34
30
  # non-card charge. This value overrides the account’s default statement descriptor.
@@ -39,7 +35,7 @@ module Stripe
39
35
  # [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static)
40
36
  # to form the complete statement descriptor that appears on the customer’s statement.
41
37
  attr_accessor :statement_descriptor_suffix
42
- # The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for [connected accounts](https://docs.corp.stripe.com/payments/connected-accounts).
38
+ # The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for [connected accounts](https://docs.stripe.com/payments/connected-accounts).
43
39
  attr_accessor :transfer_data
44
40
 
45
41
  def initialize(
@@ -5,83 +5,15 @@ module Stripe
5
5
  module V2
6
6
  module Payments
7
7
  class OffSessionPaymentCreateParams < ::Stripe::RequestParams
8
- class AmountDetails < ::Stripe::RequestParams
9
- class LineItem < ::Stripe::RequestParams
10
- class Tax < ::Stripe::RequestParams
11
- # Total portion of the amount that is for tax.
12
- attr_accessor :total_tax_amount
13
-
14
- def initialize(total_tax_amount: nil)
15
- @total_tax_amount = total_tax_amount
16
- end
17
- end
18
- # The amount an item was discounted for. Positive integer.
19
- attr_accessor :discount_amount
20
- # Unique identifier of the product. At most 12 characters long.
21
- attr_accessor :product_code
22
- # Name of the product. At most 100 characters long.
23
- attr_accessor :product_name
24
- # Number of items of the product. Positive integer.
25
- attr_accessor :quantity
26
- # Contains information about the tax on the item.
27
- attr_accessor :tax
28
- # Cost of the product. Non-negative integer.
29
- attr_accessor :unit_cost
30
-
31
- def initialize(
32
- discount_amount: nil,
33
- product_code: nil,
34
- product_name: nil,
35
- quantity: nil,
36
- tax: nil,
37
- unit_cost: nil
38
- )
39
- @discount_amount = discount_amount
40
- @product_code = product_code
41
- @product_name = product_name
42
- @quantity = quantity
43
- @tax = tax
44
- @unit_cost = unit_cost
45
- end
46
- end
47
-
48
- class Shipping < ::Stripe::RequestParams
49
- # Portion of the amount that is for shipping.
50
- attr_accessor :amount
51
- # The postal code that represents the shipping source.
52
- attr_accessor :from_postal_code
53
- # The postal code that represents the shipping destination.
54
- attr_accessor :to_postal_code
55
-
56
- def initialize(amount: nil, from_postal_code: nil, to_postal_code: nil)
57
- @amount = amount
58
- @from_postal_code = from_postal_code
59
- @to_postal_code = to_postal_code
60
- end
61
- end
62
-
63
- class Tax < ::Stripe::RequestParams
64
- # Total portion of the amount that is for tax.
65
- attr_accessor :total_tax_amount
66
-
67
- def initialize(total_tax_amount: nil)
68
- @total_tax_amount = total_tax_amount
69
- end
70
- end
71
- # The amount the total transaction was discounted for.
72
- attr_accessor :discount_amount
73
- # A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items.
74
- attr_accessor :line_items
75
- # Contains information about the shipping portion of the amount.
76
- attr_accessor :shipping
77
- # Contains information about the tax portion of the amount.
78
- attr_accessor :tax
79
-
80
- def initialize(discount_amount: nil, line_items: nil, shipping: nil, tax: nil)
81
- @discount_amount = discount_amount
82
- @line_items = line_items
83
- @shipping = shipping
84
- @tax = tax
8
+ class Amount < ::Stripe::RequestParams
9
+ # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
10
+ attr_accessor :value
11
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
12
+ attr_accessor :currency
13
+
14
+ def initialize(value: nil, currency: nil)
15
+ @value = value
16
+ @currency = currency
85
17
  end
86
18
  end
87
19
 
@@ -142,7 +74,7 @@ module Stripe
142
74
  # automatically after the payment succeeds. If no amount is specified, by default
143
75
  # the entire payment amount is transferred to the destination account. The amount
144
76
  # must be less than or equal to the
145
- # [amount_requested](https://docs.corp.stripe.com/api/v2/off-session-payments/object?api-version=2025-05-28.preview#v2_off_session_payment_object-amount_requested),
77
+ # [amount_requested](https://docs.stripe.com/api/v2/off-session-payments/object?api-version=2025-05-28.preview#v2_off_session_payment_object-amount_requested),
146
78
  # and must be a positive integer representing how much to transfer in the smallest
147
79
  # currency unit (e.g., 100 cents to charge $1.00).
148
80
  attr_accessor :amount
@@ -157,20 +89,16 @@ module Stripe
157
89
  end
158
90
  # The “presentment amount” to be collected from the customer.
159
91
  attr_accessor :amount
160
- # Provides industry-specific information about the amount.
161
- attr_accessor :amount_details
162
92
  # The frequency of the underlying payment.
163
93
  attr_accessor :cadence
164
94
  # Details about the capture configuration for the OffSessionPayment.
165
95
  attr_accessor :capture
166
- # Whether the OffSessionPayment should be captured automatically or manually.
167
- attr_accessor :capture_method
168
96
  # ID of the Customer to which this OffSessionPayment belongs.
169
97
  attr_accessor :customer
170
- # Set of [key-value pairs](https://docs.corp.stripe.com/api/metadata) that you can
98
+ # Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can
171
99
  # attach to an object. This can be useful for storing additional information about
172
100
  # the object in a structured format. Learn more about
173
- # [storing information in metadata](https://docs.corp.stripe.com/payments/payment-intents#storing-information-in-metadata).
101
+ # [storing information in metadata](https://docs.stripe.com/payments/payment-intents#storing-information-in-metadata).
174
102
  attr_accessor :metadata
175
103
  # The account (if any) for which the funds of the OffSessionPayment are intended.
176
104
  attr_accessor :on_behalf_of
@@ -193,15 +121,13 @@ module Stripe
193
121
  attr_accessor :statement_descriptor_suffix
194
122
  # Test clock that can be used to advance the retry attempts in a sandbox.
195
123
  attr_accessor :test_clock
196
- # The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for [connected accounts](https://docs.corp.stripe.com/payments/connected-accounts).
124
+ # The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for [connected accounts](https://docs.stripe.com/payments/connected-accounts).
197
125
  attr_accessor :transfer_data
198
126
 
199
127
  def initialize(
200
128
  amount: nil,
201
- amount_details: nil,
202
129
  cadence: nil,
203
130
  capture: nil,
204
- capture_method: nil,
205
131
  customer: nil,
206
132
  metadata: nil,
207
133
  on_behalf_of: nil,
@@ -215,10 +141,8 @@ module Stripe
215
141
  transfer_data: nil
216
142
  )
217
143
  @amount = amount
218
- @amount_details = amount_details
219
144
  @cadence = cadence
220
145
  @capture = capture
221
- @capture_method = capture_method
222
146
  @customer = customer
223
147
  @metadata = metadata
224
148
  @on_behalf_of = on_behalf_of
@@ -5,6 +5,17 @@ module Stripe
5
5
  module V2
6
6
  module TestHelpers
7
7
  class FinancialAddressCreditParams < ::Stripe::RequestParams
8
+ class Amount < ::Stripe::RequestParams
9
+ # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
10
+ attr_accessor :value
11
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
12
+ attr_accessor :currency
13
+
14
+ def initialize(value: nil, currency: nil)
15
+ @value = value
16
+ @currency = currency
17
+ end
18
+ end
8
19
  # Object containing the amount value and currency to credit.
9
20
  attr_accessor :amount
10
21
  # Open Enum. The network to use in simulating the funds flow. This will be the reflected in the resulting ReceivedCredit.
data/lib/stripe/params.rb CHANGED
@@ -402,6 +402,7 @@ require "stripe/params/privacy/redaction_job_run_params"
402
402
  require "stripe/params/privacy/redaction_job_update_params"
403
403
  require "stripe/params/privacy/redaction_job_validate_params"
404
404
  require "stripe/params/privacy/redaction_job_validation_error_list_params"
405
+ require "stripe/params/product_catalog/trial_offer_create_params"
405
406
  require "stripe/params/product_create_params"
406
407
  require "stripe/params/product_delete_params"
407
408
  require "stripe/params/product_feature_create_params"
@@ -762,11 +763,15 @@ require "stripe/params/v2/core/account_create_params"
762
763
  require "stripe/params/v2/core/account_link_create_params"
763
764
  require "stripe/params/v2/core/account_list_params"
764
765
  require "stripe/params/v2/core/account_retrieve_params"
766
+ require "stripe/params/v2/core/account_token_create_params"
767
+ require "stripe/params/v2/core/account_token_retrieve_params"
765
768
  require "stripe/params/v2/core/account_update_params"
766
769
  require "stripe/params/v2/core/accounts/person_create_params"
767
770
  require "stripe/params/v2/core/accounts/person_delete_params"
768
771
  require "stripe/params/v2/core/accounts/person_list_params"
769
772
  require "stripe/params/v2/core/accounts/person_retrieve_params"
773
+ require "stripe/params/v2/core/accounts/person_token_create_params"
774
+ require "stripe/params/v2/core/accounts/person_token_retrieve_params"
770
775
  require "stripe/params/v2/core/accounts/person_update_params"
771
776
  require "stripe/params/v2/core/claimable_sandbox_create_params"
772
777
  require "stripe/params/v2/core/claimable_sandbox_retrieve_params"
@@ -795,6 +800,9 @@ require "stripe/params/v2/core/vault/us_bank_account_send_microdeposits_params"
795
800
  require "stripe/params/v2/core/vault/us_bank_account_update_params"
796
801
  require "stripe/params/v2/money_management/adjustment_list_params"
797
802
  require "stripe/params/v2/money_management/adjustment_retrieve_params"
803
+ require "stripe/params/v2/money_management/currency_conversion_create_params"
804
+ require "stripe/params/v2/money_management/currency_conversion_list_params"
805
+ require "stripe/params/v2/money_management/currency_conversion_retrieve_params"
798
806
  require "stripe/params/v2/money_management/financial_account_close_params"
799
807
  require "stripe/params/v2/money_management/financial_account_create_params"
800
808
  require "stripe/params/v2/money_management/financial_account_list_params"
@@ -151,8 +151,12 @@ module Stripe
151
151
  attr_reader :quantity
152
152
  # The SKU ID of the line item.
153
153
  attr_reader :sku_id
154
- # The unit amount of the line item.
154
+ # The per-unit amount of the item before any discounts or taxes are applied.
155
155
  attr_reader :unit_amount
156
+ # The total discount for this line item. If no discount were applied, defaults to 0.
157
+ attr_reader :amount_discount
158
+ # The total before any discounts or taxes are applied.
159
+ attr_reader :amount_subtotal
156
160
 
157
161
  def self.inner_class_types
158
162
  @inner_class_types = {}
@@ -279,12 +283,14 @@ module Stripe
279
283
  @field_remappings = {}
280
284
  end
281
285
  end
282
- # The amount discount of the total details.
283
- attr_reader :amount_discount
284
286
  # The amount fulfillment of the total details.
285
287
  attr_reader :amount_fulfillment
286
288
  # The amount tax of the total details.
287
289
  attr_reader :amount_tax
290
+ # The amount of order-level discounts applied to the cart. The total discount amount for this session can be computed by summing the cart discount and the item discounts.
291
+ attr_reader :amount_cart_discount
292
+ # The amount of item-level discounts applied to the cart. The total discount amount for this session can be computed by summing the cart discount and the item discounts.
293
+ attr_reader :amount_items_discount
288
294
  # The applicable fees of the total details.
289
295
  attr_reader :applicable_fees
290
296
 
@@ -3459,6 +3459,19 @@ module Stripe
3459
3459
  @field_remappings = {}
3460
3460
  end
3461
3461
  end
3462
+
3463
+ class PaymentsOrchestration < ::Stripe::StripeObject
3464
+ # Whether this feature is enabled.
3465
+ attr_reader :enabled
3466
+
3467
+ def self.inner_class_types
3468
+ @inner_class_types = {}
3469
+ end
3470
+
3471
+ def self.field_remappings
3472
+ @field_remappings = {}
3473
+ end
3474
+ end
3462
3475
  # Allocated Funds configuration for this PaymentIntent.
3463
3476
  attr_reader :allocated_funds
3464
3477
  # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
@@ -3573,6 +3586,8 @@ module Stripe
3573
3586
  attr_reader :transfer_data
3574
3587
  # A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers).
3575
3588
  attr_reader :transfer_group
3589
+ # When you enable this parameter, this PaymentIntent will route your payment to processors that you configure in the dashboard.
3590
+ attr_reader :payments_orchestration
3576
3591
 
3577
3592
  # Manually reconcile the remaining amount for a customer_balance PaymentIntent.
3578
3593
  def apply_customer_balance(params = {}, opts = {})
@@ -3947,6 +3962,7 @@ module Stripe
3947
3962
  processing: Processing,
3948
3963
  shipping: Shipping,
3949
3964
  transfer_data: TransferData,
3965
+ payments_orchestration: PaymentsOrchestration,
3950
3966
  }
3951
3967
  end
3952
3968
 
@@ -1723,7 +1723,7 @@ module Stripe
1723
1723
  )
1724
1724
  end
1725
1725
 
1726
- # Retrieves a payment method's balance.
1726
+ # Retrieves a PaymentMethod's Balance.
1727
1727
  def check_balance(params = {}, opts = {})
1728
1728
  request_stripe_object(
1729
1729
  method: :post,
@@ -1733,7 +1733,7 @@ module Stripe
1733
1733
  )
1734
1734
  end
1735
1735
 
1736
- # Retrieves a payment method's balance.
1736
+ # Retrieves a PaymentMethod's Balance.
1737
1737
  def self.check_balance(payment_method, params = {}, opts = {})
1738
1738
  request_stripe_object(
1739
1739
  method: :post,
@@ -0,0 +1,101 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module ProductCatalog
6
+ # Resource for the TrialOffer API, used to describe a subscription item's trial period settings.
7
+ # Renders a TrialOffer object that describes the price, duration, end_behavior of a trial offer.
8
+ class TrialOffer < APIResource
9
+ extend Stripe::APIOperations::Create
10
+
11
+ OBJECT_NAME = "product_catalog.trial_offer"
12
+ def self.object_name
13
+ "product_catalog.trial_offer"
14
+ end
15
+
16
+ class Duration < ::Stripe::StripeObject
17
+ class Relative < ::Stripe::StripeObject
18
+ # The number of iterations of the price's interval for this trial offer.
19
+ attr_reader :iterations
20
+
21
+ def self.inner_class_types
22
+ @inner_class_types = {}
23
+ end
24
+
25
+ def self.field_remappings
26
+ @field_remappings = {}
27
+ end
28
+ end
29
+ # Attribute for field relative
30
+ attr_reader :relative
31
+ # The type of trial offer duration.
32
+ attr_reader :type
33
+
34
+ def self.inner_class_types
35
+ @inner_class_types = { relative: Relative }
36
+ end
37
+
38
+ def self.field_remappings
39
+ @field_remappings = {}
40
+ end
41
+ end
42
+
43
+ class EndBehavior < ::Stripe::StripeObject
44
+ class Transition < ::Stripe::StripeObject
45
+ # The new price to use at the end of the trial offer period.
46
+ attr_reader :price
47
+
48
+ def self.inner_class_types
49
+ @inner_class_types = {}
50
+ end
51
+
52
+ def self.field_remappings
53
+ @field_remappings = {}
54
+ end
55
+ end
56
+ # Attribute for field transition
57
+ attr_reader :transition
58
+ # The type of behavior when the trial offer ends.
59
+ attr_reader :type
60
+
61
+ def self.inner_class_types
62
+ @inner_class_types = { transition: Transition }
63
+ end
64
+
65
+ def self.field_remappings
66
+ @field_remappings = {}
67
+ end
68
+ end
69
+ # Attribute for field duration
70
+ attr_reader :duration
71
+ # Attribute for field end_behavior
72
+ attr_reader :end_behavior
73
+ # Unique identifier for the object.
74
+ attr_reader :id
75
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
76
+ attr_reader :livemode
77
+ # String representing the object's type. Objects of the same type share the same value.
78
+ attr_reader :object
79
+ # The price during the trial offer.
80
+ attr_reader :price
81
+
82
+ # Creates a trial offer.
83
+ def self.create(params = {}, opts = {})
84
+ request_stripe_object(
85
+ method: :post,
86
+ path: "/v1/product_catalog/trial_offers",
87
+ params: params,
88
+ opts: opts
89
+ )
90
+ end
91
+
92
+ def self.inner_class_types
93
+ @inner_class_types = { duration: Duration, end_behavior: EndBehavior }
94
+ end
95
+
96
+ def self.field_remappings
97
+ @field_remappings = {}
98
+ end
99
+ end
100
+ end
101
+ end