stripe 5.38.0 → 15.2.1

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 (708) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +742 -0
  3. data/CONTRIBUTING.md +25 -0
  4. data/Gemfile +12 -4
  5. data/Makefile +22 -0
  6. data/OPENAPI_VERSION +1 -0
  7. data/README.md +137 -27
  8. data/Rakefile +3 -6
  9. data/VERSION +1 -1
  10. data/examples/README.md +16 -0
  11. data/examples/example_template.rb +36 -0
  12. data/examples/meter_event_stream.rb +57 -0
  13. data/examples/thinevent_webhook_handler.rb +39 -0
  14. data/{bin → exe}/stripe-console +1 -1
  15. data/justfile +43 -0
  16. data/lib/data/ca-certificates.crt +1241 -1937
  17. data/lib/stripe/api_operations/create.rb +6 -2
  18. data/lib/stripe/api_operations/delete.rb +12 -7
  19. data/lib/stripe/api_operations/list.rb +6 -9
  20. data/lib/stripe/api_operations/nested_resource.rb +59 -31
  21. data/lib/stripe/api_operations/request.rb +30 -65
  22. data/lib/stripe/api_operations/save.rb +20 -10
  23. data/lib/stripe/api_operations/search.rb +21 -0
  24. data/lib/stripe/api_operations/singleton_save.rb +90 -0
  25. data/lib/stripe/api_requestor.rb +1136 -0
  26. data/lib/stripe/api_resource.rb +49 -34
  27. data/lib/stripe/api_resource_test_helpers.rb +53 -0
  28. data/lib/stripe/{resources/usage_record.rb → api_version.rb} +2 -2
  29. data/lib/stripe/connection_manager.rb +28 -11
  30. data/lib/stripe/errors.rb +11 -20
  31. data/lib/stripe/event_types.rb +15 -0
  32. data/lib/stripe/events/v1_billing_meter_error_report_triggered_event.rb +23 -0
  33. data/lib/stripe/events/v1_billing_meter_no_meter_found_event.rb +13 -0
  34. data/lib/stripe/events/v2_core_event_destination_ping_event.rb +21 -0
  35. data/lib/stripe/instrumentation.rb +37 -15
  36. data/lib/stripe/list_object.rb +5 -3
  37. data/lib/stripe/multipart_encoder.rb +7 -7
  38. data/lib/stripe/oauth.rb +14 -21
  39. data/lib/stripe/object_types.rb +157 -91
  40. data/lib/stripe/request_options.rb +129 -0
  41. data/lib/stripe/request_params.rb +24 -0
  42. data/lib/stripe/resources/account.rb +4854 -30
  43. data/lib/stripe/resources/account_link.rb +66 -0
  44. data/lib/stripe/resources/account_session.rb +868 -0
  45. data/lib/stripe/resources/alipay_account.rb +1 -1
  46. data/lib/stripe/resources/apple_pay_domain.rb +91 -0
  47. data/lib/stripe/resources/application.rb +20 -0
  48. data/lib/stripe/resources/application_fee.rb +96 -2
  49. data/lib/stripe/resources/application_fee_refund.rb +26 -2
  50. data/lib/stripe/resources/apps/secret.rb +196 -0
  51. data/lib/stripe/resources/balance.rb +178 -0
  52. data/lib/stripe/resources/balance_transaction.rb +124 -0
  53. data/lib/stripe/resources/bank_account.rb +137 -6
  54. data/lib/stripe/resources/billing/alert.rb +222 -0
  55. data/lib/stripe/resources/billing/alert_triggered.rb +26 -0
  56. data/lib/stripe/resources/billing/credit_balance_summary.rb +54 -0
  57. data/lib/stripe/resources/billing/credit_balance_transaction.rb +133 -0
  58. data/lib/stripe/resources/billing/credit_grant.rb +307 -0
  59. data/lib/stripe/resources/billing/meter.rb +254 -0
  60. data/lib/stripe/resources/billing/meter_event.rb +61 -0
  61. data/lib/stripe/resources/billing/meter_event_adjustment.rb +69 -0
  62. data/lib/stripe/resources/billing/meter_event_summary.rb +32 -0
  63. data/lib/stripe/resources/billing_portal/configuration.rb +587 -0
  64. data/lib/stripe/resources/billing_portal/session.rb +298 -0
  65. data/lib/stripe/resources/capability.rb +91 -2
  66. data/lib/stripe/resources/card.rb +111 -3
  67. data/lib/stripe/resources/cash_balance.rb +43 -0
  68. data/lib/stripe/resources/charge.rb +1682 -2
  69. data/lib/stripe/resources/checkout/session.rb +3666 -2
  70. data/lib/stripe/resources/climate/order.rb +234 -0
  71. data/lib/stripe/resources/climate/product.rb +74 -0
  72. data/lib/stripe/resources/climate/supplier.rb +71 -0
  73. data/lib/stripe/resources/confirmation_token.rb +1498 -0
  74. data/lib/stripe/resources/connect_collection_transfer.rb +24 -0
  75. data/lib/stripe/resources/country_spec.rb +68 -0
  76. data/lib/stripe/resources/coupon.rb +236 -0
  77. data/lib/stripe/resources/credit_note.rb +709 -9
  78. data/lib/stripe/resources/credit_note_line_item.rb +71 -0
  79. data/lib/stripe/resources/customer.rb +1015 -16
  80. data/lib/stripe/resources/customer_balance_transaction.rb +38 -1
  81. data/lib/stripe/resources/customer_cash_balance_transaction.rb +124 -0
  82. data/lib/stripe/resources/customer_session.rb +188 -0
  83. data/lib/stripe/resources/discount.rb +37 -0
  84. data/lib/stripe/resources/dispute.rb +650 -2
  85. data/lib/stripe/resources/entitlements/active_entitlement.rb +63 -0
  86. data/lib/stripe/resources/entitlements/active_entitlement_summary.rb +23 -0
  87. data/lib/stripe/resources/entitlements/feature.rb +130 -0
  88. data/lib/stripe/resources/ephemeral_key.rb +44 -0
  89. data/lib/stripe/resources/event.rb +130 -0
  90. data/lib/stripe/resources/exchange_rate.rb +58 -0
  91. data/lib/stripe/resources/file.rb +139 -15
  92. data/lib/stripe/resources/file_link.rb +129 -0
  93. data/lib/stripe/resources/financial_connections/account.rb +363 -0
  94. data/lib/stripe/resources/financial_connections/account_owner.rb +31 -0
  95. data/lib/stripe/resources/financial_connections/account_ownership.rb +23 -0
  96. data/lib/stripe/resources/financial_connections/session.rb +121 -0
  97. data/lib/stripe/resources/financial_connections/transaction.rb +118 -0
  98. data/lib/stripe/resources/forwarding/request.rb +208 -0
  99. data/lib/stripe/resources/funding_instructions.rb +332 -0
  100. data/lib/stripe/resources/identity/verification_report.rb +287 -0
  101. data/lib/stripe/resources/identity/verification_session.rb +474 -4
  102. data/lib/stripe/resources/invoice.rb +3525 -17
  103. data/lib/stripe/resources/invoice_item.rb +453 -0
  104. data/lib/stripe/resources/invoice_line_item.rb +372 -1
  105. data/lib/stripe/resources/invoice_payment.rb +112 -0
  106. data/lib/stripe/resources/invoice_rendering_template.rb +120 -0
  107. data/lib/stripe/resources/issuing/authorization.rb +1313 -4
  108. data/lib/stripe/resources/issuing/card.rb +785 -4
  109. data/lib/stripe/resources/issuing/cardholder.rb +684 -0
  110. data/lib/stripe/resources/issuing/dispute.rb +828 -2
  111. data/lib/stripe/resources/issuing/personalization_design.rb +395 -0
  112. data/lib/stripe/resources/issuing/physical_bundle.rb +80 -0
  113. data/lib/stripe/resources/issuing/token.rb +198 -0
  114. data/lib/stripe/resources/issuing/transaction.rb +991 -0
  115. data/lib/stripe/resources/line_item.rb +51 -0
  116. data/lib/stripe/resources/login_link.rb +12 -0
  117. data/lib/stripe/resources/mandate.rb +146 -0
  118. data/lib/stripe/resources/payment_intent.rb +8876 -6
  119. data/lib/stripe/resources/payment_link.rb +1692 -0
  120. data/lib/stripe/resources/payment_method.rb +1570 -4
  121. data/lib/stripe/resources/payment_method_configuration.rb +3189 -0
  122. data/lib/stripe/resources/payment_method_domain.rb +236 -0
  123. data/lib/stripe/resources/payout.rb +271 -4
  124. data/lib/stripe/resources/person.rb +295 -1
  125. data/lib/stripe/resources/plan.rb +352 -0
  126. data/lib/stripe/resources/price.rb +642 -0
  127. data/lib/stripe/resources/product.rb +534 -0
  128. data/lib/stripe/resources/product_feature.rb +25 -0
  129. data/lib/stripe/resources/promotion_code.rb +237 -0
  130. data/lib/stripe/resources/quote.rb +1015 -38
  131. data/lib/stripe/resources/radar/early_fraud_warning.rb +85 -0
  132. data/lib/stripe/resources/radar/value_list.rb +171 -0
  133. data/lib/stripe/resources/radar/value_list_item.rb +131 -0
  134. data/lib/stripe/resources/refund.rb +494 -0
  135. data/lib/stripe/resources/reporting/report_run.rb +172 -0
  136. data/lib/stripe/resources/reporting/report_type.rb +48 -1
  137. data/lib/stripe/resources/reserve_transaction.rb +22 -0
  138. data/lib/stripe/resources/reversal.rb +38 -2
  139. data/lib/stripe/resources/review.rb +122 -2
  140. data/lib/stripe/resources/setup_attempt.rb +380 -0
  141. data/lib/stripe/resources/setup_intent.rb +3432 -4
  142. data/lib/stripe/resources/shipping_rate.rb +287 -0
  143. data/lib/stripe/resources/sigma/scheduled_query_run.rb +62 -0
  144. data/lib/stripe/resources/source.rb +1250 -10
  145. data/lib/stripe/resources/source_mandate_notification.rb +66 -0
  146. data/lib/stripe/resources/source_transaction.rb +93 -0
  147. data/lib/stripe/resources/subscription.rb +1871 -3
  148. data/lib/stripe/resources/subscription_item.rb +399 -10
  149. data/lib/stripe/resources/subscription_schedule.rb +1455 -4
  150. data/lib/stripe/resources/tax/calculation.rb +430 -0
  151. data/lib/stripe/resources/tax/calculation_line_item.rb +71 -0
  152. data/lib/stripe/resources/tax/registration.rb +2667 -0
  153. data/lib/stripe/resources/tax/settings.rb +134 -0
  154. data/lib/stripe/resources/tax/transaction.rb +314 -0
  155. data/lib/stripe/resources/tax/transaction_line_item.rb +44 -0
  156. data/lib/stripe/resources/tax_code.rb +35 -0
  157. data/lib/stripe/resources/tax_deducted_at_source.rb +22 -0
  158. data/lib/stripe/resources/tax_id.rb +144 -11
  159. data/lib/stripe/resources/tax_rate.rb +217 -0
  160. data/lib/stripe/resources/terminal/configuration.rb +1328 -0
  161. data/lib/stripe/resources/terminal/connection_token.rb +34 -0
  162. data/lib/stripe/resources/terminal/location.rb +222 -0
  163. data/lib/stripe/resources/terminal/reader.rb +886 -0
  164. data/lib/stripe/resources/test_helpers/test_clock.rb +156 -0
  165. data/lib/stripe/resources/token.rb +1249 -0
  166. data/lib/stripe/resources/topup.rb +204 -2
  167. data/lib/stripe/resources/transfer.rb +173 -6
  168. data/lib/stripe/resources/treasury/credit_reversal.rb +120 -0
  169. data/lib/stripe/resources/treasury/debit_reversal.rb +131 -0
  170. data/lib/stripe/resources/treasury/financial_account.rb +833 -0
  171. data/lib/stripe/resources/treasury/financial_account_features.rb +204 -0
  172. data/lib/stripe/resources/treasury/inbound_transfer.rb +356 -0
  173. data/lib/stripe/resources/treasury/outbound_payment.rb +638 -0
  174. data/lib/stripe/resources/treasury/outbound_transfer.rb +493 -0
  175. data/lib/stripe/resources/treasury/received_credit.rb +284 -0
  176. data/lib/stripe/resources/treasury/received_debit.rb +243 -0
  177. data/lib/stripe/resources/treasury/transaction.rb +193 -0
  178. data/lib/stripe/resources/treasury/transaction_entry.rb +178 -0
  179. data/lib/stripe/resources/v2/amount.rb +9 -0
  180. data/lib/stripe/resources/v2/billing/meter_event.rb +34 -0
  181. data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +36 -0
  182. data/lib/stripe/resources/v2/billing/meter_event_session.rb +29 -0
  183. data/lib/stripe/resources/v2/event.rb +41 -0
  184. data/lib/stripe/resources/v2/event_destination.rb +73 -0
  185. data/lib/stripe/resources/webhook_endpoint.rb +167 -0
  186. data/lib/stripe/resources.rb +70 -12
  187. data/lib/stripe/search_result_object.rb +89 -0
  188. data/lib/stripe/services/account_capability_service.rb +71 -0
  189. data/lib/stripe/services/account_external_account_service.rb +317 -0
  190. data/lib/stripe/services/account_link_service.rb +63 -0
  191. data/lib/stripe/services/account_login_link_service.rb +28 -0
  192. data/lib/stripe/services/account_person_service.rb +1019 -0
  193. data/lib/stripe/services/account_service.rb +4171 -0
  194. data/lib/stripe/services/account_session_service.rb +569 -0
  195. data/lib/stripe/services/apple_pay_domain_service.rb +100 -0
  196. data/lib/stripe/services/application_fee_refund_service.rb +114 -0
  197. data/lib/stripe/services/application_fee_service.rb +92 -0
  198. data/lib/stripe/services/apps/secret_service.rb +168 -0
  199. data/lib/stripe/services/apps_service.rb +13 -0
  200. data/lib/stripe/services/balance_service.rb +21 -0
  201. data/lib/stripe/services/balance_transaction_service.rb +101 -0
  202. data/lib/stripe/services/billing/alert_service.rb +187 -0
  203. data/lib/stripe/services/billing/credit_balance_summary_service.rb +67 -0
  204. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +70 -0
  205. data/lib/stripe/services/billing/credit_grant_service.rb +240 -0
  206. data/lib/stripe/services/billing/meter_event_adjustment_service.rb +45 -0
  207. data/lib/stripe/services/billing/meter_event_service.rb +40 -0
  208. data/lib/stripe/services/billing/meter_event_summary_service.rb +58 -0
  209. data/lib/stripe/services/billing/meter_service.rb +211 -0
  210. data/lib/stripe/services/billing_portal/configuration_service.rb +496 -0
  211. data/lib/stripe/services/billing_portal/session_service.rb +192 -0
  212. data/lib/stripe/services/billing_portal_service.rb +14 -0
  213. data/lib/stripe/services/billing_service.rb +20 -0
  214. data/lib/stripe/services/charge_service.rb +471 -0
  215. data/lib/stripe/services/checkout/session_line_item_service.rb +37 -0
  216. data/lib/stripe/services/checkout/session_service.rb +2495 -0
  217. data/lib/stripe/services/checkout_service.rb +13 -0
  218. data/lib/stripe/services/climate/order_service.rb +170 -0
  219. data/lib/stripe/services/climate/product_service.rb +57 -0
  220. data/lib/stripe/services/climate/supplier_service.rb +57 -0
  221. data/lib/stripe/services/climate_service.rb +15 -0
  222. data/lib/stripe/services/confirmation_token_service.rb +26 -0
  223. data/lib/stripe/services/country_spec_service.rb +55 -0
  224. data/lib/stripe/services/coupon_service.rb +202 -0
  225. data/lib/stripe/services/credit_note_line_item_service.rb +35 -0
  226. data/lib/stripe/services/credit_note_preview_lines_service.rb +169 -0
  227. data/lib/stripe/services/credit_note_service.rb +457 -0
  228. data/lib/stripe/services/customer_balance_transaction_service.rb +113 -0
  229. data/lib/stripe/services/customer_cash_balance_service.rb +57 -0
  230. data/lib/stripe/services/customer_cash_balance_transaction_service.rb +55 -0
  231. data/lib/stripe/services/customer_funding_instructions_service.rb +61 -0
  232. data/lib/stripe/services/customer_payment_method_service.rb +68 -0
  233. data/lib/stripe/services/customer_payment_source_service.rb +255 -0
  234. data/lib/stripe/services/customer_service.rb +664 -0
  235. data/lib/stripe/services/customer_session_service.rb +113 -0
  236. data/lib/stripe/services/customer_tax_id_service.rb +94 -0
  237. data/lib/stripe/services/dispute_service.rb +422 -0
  238. data/lib/stripe/services/entitlements/active_entitlement_service.rb +66 -0
  239. data/lib/stripe/services/entitlements/feature_service.rb +128 -0
  240. data/lib/stripe/services/entitlements_service.rb +14 -0
  241. data/lib/stripe/services/ephemeral_key_service.rb +64 -0
  242. data/lib/stripe/services/event_service.rb +87 -0
  243. data/lib/stripe/services/exchange_rate_service.rb +55 -0
  244. data/lib/stripe/services/file_link_service.rb +132 -0
  245. data/lib/stripe/services/file_service.rb +124 -0
  246. data/lib/stripe/services/financial_connections/account_owner_service.rb +46 -0
  247. data/lib/stripe/services/financial_connections/account_service.rb +177 -0
  248. data/lib/stripe/services/financial_connections/session_service.rb +98 -0
  249. data/lib/stripe/services/financial_connections/transaction_service.rb +100 -0
  250. data/lib/stripe/services/financial_connections_service.rb +15 -0
  251. data/lib/stripe/services/forwarding/request_service.rb +147 -0
  252. data/lib/stripe/services/forwarding_service.rb +13 -0
  253. data/lib/stripe/services/identity/verification_report_service.rb +95 -0
  254. data/lib/stripe/services/identity/verification_session_service.rb +337 -0
  255. data/lib/stripe/services/identity_service.rb +14 -0
  256. data/lib/stripe/services/invoice_item_service.rb +394 -0
  257. data/lib/stripe/services/invoice_line_item_service.rb +252 -0
  258. data/lib/stripe/services/invoice_payment_service.rb +83 -0
  259. data/lib/stripe/services/invoice_rendering_template_service.rb +101 -0
  260. data/lib/stripe/services/invoice_service.rb +2900 -0
  261. data/lib/stripe/services/issuing/authorization_service.rb +169 -0
  262. data/lib/stripe/services/issuing/card_service.rb +507 -0
  263. data/lib/stripe/services/issuing/cardholder_service.rb +577 -0
  264. data/lib/stripe/services/issuing/dispute_service.rb +696 -0
  265. data/lib/stripe/services/issuing/personalization_design_service.rb +245 -0
  266. data/lib/stripe/services/issuing/physical_bundle_service.rb +70 -0
  267. data/lib/stripe/services/issuing/token_service.rb +114 -0
  268. data/lib/stripe/services/issuing/transaction_service.rb +118 -0
  269. data/lib/stripe/services/issuing_service.rb +20 -0
  270. data/lib/stripe/services/mandate_service.rb +26 -0
  271. data/lib/stripe/services/oauth_service.rb +63 -0
  272. data/lib/stripe/services/payment_intent_service.rb +7202 -0
  273. data/lib/stripe/services/payment_link_line_item_service.rb +35 -0
  274. data/lib/stripe/services/payment_link_service.rb +1333 -0
  275. data/lib/stripe/services/payment_method_configuration_service.rb +2306 -0
  276. data/lib/stripe/services/payment_method_domain_service.rb +142 -0
  277. data/lib/stripe/services/payment_method_service.rb +843 -0
  278. data/lib/stripe/services/payout_service.rb +225 -0
  279. data/lib/stripe/services/plan_service.rb +297 -0
  280. data/lib/stripe/services/price_service.rb +545 -0
  281. data/lib/stripe/services/product_feature_service.rb +91 -0
  282. data/lib/stripe/services/product_service.rb +494 -0
  283. data/lib/stripe/services/promotion_code_service.rb +228 -0
  284. data/lib/stripe/services/quote_computed_upfront_line_items_service.rb +35 -0
  285. data/lib/stripe/services/quote_line_item_service.rb +35 -0
  286. data/lib/stripe/services/quote_service.rb +703 -0
  287. data/lib/stripe/services/radar/early_fraud_warning_service.rb +93 -0
  288. data/lib/stripe/services/radar/value_list_item_service.rb +130 -0
  289. data/lib/stripe/services/radar/value_list_service.rb +165 -0
  290. data/lib/stripe/services/radar_service.rb +15 -0
  291. data/lib/stripe/services/refund_service.rb +200 -0
  292. data/lib/stripe/services/reporting/report_run_service.rb +147 -0
  293. data/lib/stripe/services/reporting/report_type_service.rb +48 -0
  294. data/lib/stripe/services/reporting_service.rb +14 -0
  295. data/lib/stripe/services/review_service.rb +89 -0
  296. data/lib/stripe/services/setup_attempt_service.rb +68 -0
  297. data/lib/stripe/services/setup_intent_service.rb +3107 -0
  298. data/lib/stripe/services/shipping_rate_service.rb +250 -0
  299. data/lib/stripe/services/sigma/scheduled_query_run_service.rb +57 -0
  300. data/lib/stripe/services/sigma_service.rb +13 -0
  301. data/lib/stripe/services/source_service.rb +665 -0
  302. data/lib/stripe/services/source_transaction_service.rb +35 -0
  303. data/lib/stripe/services/subscription_item_service.rb +372 -0
  304. data/lib/stripe/services/subscription_schedule_service.rb +1224 -0
  305. data/lib/stripe/services/subscription_service.rb +1590 -0
  306. data/lib/stripe/services/tax/calculation_line_item_service.rb +37 -0
  307. data/lib/stripe/services/tax/calculation_service.rb +246 -0
  308. data/lib/stripe/services/tax/registration_service.rb +1774 -0
  309. data/lib/stripe/services/tax/settings_service.rb +104 -0
  310. data/lib/stripe/services/tax/transaction_line_item_service.rb +37 -0
  311. data/lib/stripe/services/tax/transaction_service.rb +159 -0
  312. data/lib/stripe/services/tax_code_service.rb +49 -0
  313. data/lib/stripe/services/tax_id_service.rb +116 -0
  314. data/lib/stripe/services/tax_rate_service.rb +193 -0
  315. data/lib/stripe/services/tax_service.rb +16 -0
  316. data/lib/stripe/services/terminal/configuration_service.rb +1059 -0
  317. data/lib/stripe/services/terminal/connection_token_service.rb +31 -0
  318. data/lib/stripe/services/terminal/location_service.rb +207 -0
  319. data/lib/stripe/services/terminal/reader_service.rb +488 -0
  320. data/lib/stripe/services/terminal_service.rb +16 -0
  321. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +655 -0
  322. data/lib/stripe/services/test_helpers/customer_service.rb +37 -0
  323. data/lib/stripe/services/test_helpers/issuing/authorization_service.rb +832 -0
  324. data/lib/stripe/services/test_helpers/issuing/card_service.rb +110 -0
  325. data/lib/stripe/services/test_helpers/issuing/personalization_design_service.rb +84 -0
  326. data/lib/stripe/services/test_helpers/issuing/transaction_service.rb +675 -0
  327. data/lib/stripe/services/test_helpers/issuing_service.rb +19 -0
  328. data/lib/stripe/services/test_helpers/refund_service.rb +28 -0
  329. data/lib/stripe/services/test_helpers/terminal/reader_service.rb +108 -0
  330. data/lib/stripe/services/test_helpers/terminal_service.rb +15 -0
  331. data/lib/stripe/services/test_helpers/test_clock_service.rb +119 -0
  332. data/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb +81 -0
  333. data/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb +141 -0
  334. data/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb +141 -0
  335. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +81 -0
  336. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +81 -0
  337. data/lib/stripe/services/test_helpers/treasury_service.rb +19 -0
  338. data/lib/stripe/services/test_helpers_service.rb +19 -0
  339. data/lib/stripe/services/token_service.rb +1224 -0
  340. data/lib/stripe/services/topup_service.rb +191 -0
  341. data/lib/stripe/services/transfer_reversal_service.rb +122 -0
  342. data/lib/stripe/services/transfer_service.rb +166 -0
  343. data/lib/stripe/services/treasury/credit_reversal_service.rb +100 -0
  344. data/lib/stripe/services/treasury/debit_reversal_service.rb +104 -0
  345. data/lib/stripe/services/treasury/financial_account_features_service.rb +196 -0
  346. data/lib/stripe/services/treasury/financial_account_service.rb +554 -0
  347. data/lib/stripe/services/treasury/inbound_transfer_service.rb +140 -0
  348. data/lib/stripe/services/treasury/outbound_payment_service.rb +310 -0
  349. data/lib/stripe/services/treasury/outbound_transfer_service.rb +176 -0
  350. data/lib/stripe/services/treasury/received_credit_service.rb +82 -0
  351. data/lib/stripe/services/treasury/received_debit_service.rb +70 -0
  352. data/lib/stripe/services/treasury/transaction_entry_service.rb +117 -0
  353. data/lib/stripe/services/treasury/transaction_service.rb +125 -0
  354. data/lib/stripe/services/treasury_service.rb +22 -0
  355. data/lib/stripe/services/v1_services.rb +90 -0
  356. data/lib/stripe/services/v2/billing/meter_event_adjustment_service.rb +44 -0
  357. data/lib/stripe/services/v2/billing/meter_event_service.rb +46 -0
  358. data/lib/stripe/services/v2/billing/meter_event_session_service.rb +23 -0
  359. data/lib/stripe/services/v2/billing/meter_event_stream_service.rb +56 -0
  360. data/lib/stripe/services/v2/billing_service.rb +18 -0
  361. data/lib/stripe/services/v2/core/event_destination_service.rb +235 -0
  362. data/lib/stripe/services/v2/core/event_service.rb +48 -0
  363. data/lib/stripe/services/v2/core_service.rb +16 -0
  364. data/lib/stripe/services/v2_services.rb +14 -0
  365. data/lib/stripe/services/webhook_endpoint_service.rb +156 -0
  366. data/lib/stripe/services.rb +180 -0
  367. data/lib/stripe/singleton_api_resource.rb +3 -3
  368. data/lib/stripe/stripe_client.rb +56 -1021
  369. data/lib/stripe/stripe_configuration.rb +63 -42
  370. data/lib/stripe/stripe_object.rb +75 -39
  371. data/lib/stripe/stripe_response.rb +1 -3
  372. data/lib/stripe/stripe_service.rb +32 -0
  373. data/lib/stripe/thin_event.rb +37 -0
  374. data/lib/stripe/util.rb +161 -39
  375. data/lib/stripe/v2_list_object.rb +84 -0
  376. data/lib/stripe/version.rb +1 -1
  377. data/lib/stripe/webhook.rb +3 -2
  378. data/lib/stripe.rb +44 -1
  379. data/rbi/stripe/resources/account.rbi +4926 -0
  380. data/rbi/stripe/resources/account_link.rbi +74 -0
  381. data/rbi/stripe/resources/account_session.rbi +1013 -0
  382. data/rbi/stripe/resources/apple_pay_domain.rbi +88 -0
  383. data/rbi/stripe/resources/application.rbi +20 -0
  384. data/rbi/stripe/resources/application_fee.rbi +118 -0
  385. data/rbi/stripe/resources/application_fee_refund.rbi +37 -0
  386. data/rbi/stripe/resources/apps/secret.rbi +195 -0
  387. data/rbi/stripe/resources/balance.rbi +235 -0
  388. data/rbi/stripe/resources/balance_transaction.rbi +147 -0
  389. data/rbi/stripe/resources/bank_account.rbi +127 -0
  390. data/rbi/stripe/resources/billing/alert.rbi +201 -0
  391. data/rbi/stripe/resources/billing/alert_triggered.rbi +28 -0
  392. data/rbi/stripe/resources/billing/credit_balance_summary.rbi +63 -0
  393. data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +147 -0
  394. data/rbi/stripe/resources/billing/credit_grant.rbi +291 -0
  395. data/rbi/stripe/resources/billing/meter.rbi +226 -0
  396. data/rbi/stripe/resources/billing/meter_event.rbi +64 -0
  397. data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +64 -0
  398. data/rbi/stripe/resources/billing/meter_event_summary.rbi +35 -0
  399. data/rbi/stripe/resources/billing_portal/configuration.rbi +645 -0
  400. data/rbi/stripe/resources/billing_portal/session.rbi +345 -0
  401. data/rbi/stripe/resources/capability.rbi +125 -0
  402. data/rbi/stripe/resources/card.rbi +125 -0
  403. data/rbi/stripe/resources/cash_balance.rbi +32 -0
  404. data/rbi/stripe/resources/charge.rbi +2069 -0
  405. data/rbi/stripe/resources/checkout/session.rbi +4004 -0
  406. data/rbi/stripe/resources/climate/order.rbi +245 -0
  407. data/rbi/stripe/resources/climate/product.rbi +75 -0
  408. data/rbi/stripe/resources/climate/supplier.rbi +72 -0
  409. data/rbi/stripe/resources/confirmation_token.rbi +1807 -0
  410. data/rbi/stripe/resources/connect_collection_transfer.rbi +26 -0
  411. data/rbi/stripe/resources/country_spec.rbi +85 -0
  412. data/rbi/stripe/resources/coupon.rbi +250 -0
  413. data/rbi/stripe/resources/credit_note.rbi +752 -0
  414. data/rbi/stripe/resources/credit_note_line_item.rbi +101 -0
  415. data/rbi/stripe/resources/customer.rbi +1005 -0
  416. data/rbi/stripe/resources/customer_balance_transaction.rbi +56 -0
  417. data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +151 -0
  418. data/rbi/stripe/resources/customer_session.rbi +200 -0
  419. data/rbi/stripe/resources/discount.rbi +53 -0
  420. data/rbi/stripe/resources/dispute.rbi +761 -0
  421. data/rbi/stripe/resources/entitlements/active_entitlement.rbi +58 -0
  422. data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +23 -0
  423. data/rbi/stripe/resources/entitlements/feature.rbi +117 -0
  424. data/rbi/stripe/resources/ephemeral_key.rbi +44 -0
  425. data/rbi/stripe/resources/event.rbi +149 -0
  426. data/rbi/stripe/resources/exchange_rate.rbi +66 -0
  427. data/rbi/stripe/resources/file.rbi +143 -0
  428. data/rbi/stripe/resources/file_link.rbi +141 -0
  429. data/rbi/stripe/resources/financial_connections/account.rbi +339 -0
  430. data/rbi/stripe/resources/financial_connections/account_owner.rbi +35 -0
  431. data/rbi/stripe/resources/financial_connections/account_ownership.rbi +23 -0
  432. data/rbi/stripe/resources/financial_connections/session.rbi +123 -0
  433. data/rbi/stripe/resources/financial_connections/transaction.rbi +124 -0
  434. data/rbi/stripe/resources/forwarding/request.rbi +216 -0
  435. data/rbi/stripe/resources/funding_instructions.rbi +437 -0
  436. data/rbi/stripe/resources/identity/verification_report.rbi +360 -0
  437. data/rbi/stripe/resources/identity/verification_session.rbi +526 -0
  438. data/rbi/stripe/resources/invoice.rbi +3812 -0
  439. data/rbi/stripe/resources/invoice_item.rbi +473 -0
  440. data/rbi/stripe/resources/invoice_line_item.rbi +432 -0
  441. data/rbi/stripe/resources/invoice_payment.rbi +121 -0
  442. data/rbi/stripe/resources/invoice_rendering_template.rbi +104 -0
  443. data/rbi/stripe/resources/issuing/authorization.rbi +1283 -0
  444. data/rbi/stripe/resources/issuing/card.rbi +741 -0
  445. data/rbi/stripe/resources/issuing/cardholder.rbi +744 -0
  446. data/rbi/stripe/resources/issuing/dispute.rbi +913 -0
  447. data/rbi/stripe/resources/issuing/personalization_design.rbi +338 -0
  448. data/rbi/stripe/resources/issuing/physical_bundle.rbi +79 -0
  449. data/rbi/stripe/resources/issuing/token.rbi +226 -0
  450. data/rbi/stripe/resources/issuing/transaction.rbi +1061 -0
  451. data/rbi/stripe/resources/line_item.rbi +72 -0
  452. data/rbi/stripe/resources/login_link.rbi +19 -0
  453. data/rbi/stripe/resources/mandate.rbi +187 -0
  454. data/rbi/stripe/resources/payment_intent.rbi +9647 -0
  455. data/rbi/stripe/resources/payment_link.rbi +1801 -0
  456. data/rbi/stripe/resources/payment_method.rbi +1761 -0
  457. data/rbi/stripe/resources/payment_method_configuration.rbi +3550 -0
  458. data/rbi/stripe/resources/payment_method_domain.rbi +228 -0
  459. data/rbi/stripe/resources/payout.rbi +300 -0
  460. data/rbi/stripe/resources/person.rbi +401 -0
  461. data/rbi/stripe/resources/plan.rbi +371 -0
  462. data/rbi/stripe/resources/price.rbi +694 -0
  463. data/rbi/stripe/resources/product.rbi +555 -0
  464. data/rbi/stripe/resources/product_feature.rbi +26 -0
  465. data/rbi/stripe/resources/promotion_code.rbi +261 -0
  466. data/rbi/stripe/resources/quote.rbi +1126 -0
  467. data/rbi/stripe/resources/radar/early_fraud_warning.rbi +98 -0
  468. data/rbi/stripe/resources/radar/value_list.rbi +168 -0
  469. data/rbi/stripe/resources/radar/value_list_item.rbi +129 -0
  470. data/rbi/stripe/resources/refund.rbi +523 -0
  471. data/rbi/stripe/resources/reporting/report_run.rbi +191 -0
  472. data/rbi/stripe/resources/reporting/report_type.rbi +57 -0
  473. data/rbi/stripe/resources/reserve_transaction.rbi +23 -0
  474. data/rbi/stripe/resources/reversal.rbi +51 -0
  475. data/rbi/stripe/resources/review.rbi +154 -0
  476. data/rbi/stripe/resources/setup_attempt.rbi +477 -0
  477. data/rbi/stripe/resources/setup_intent.rbi +3655 -0
  478. data/rbi/stripe/resources/shipping_rate.rbi +305 -0
  479. data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +75 -0
  480. data/rbi/stripe/resources/source.rbi +1496 -0
  481. data/rbi/stripe/resources/source_mandate_notification.rbi +77 -0
  482. data/rbi/stripe/resources/source_transaction.rbi +127 -0
  483. data/rbi/stripe/resources/subscription.rbi +2027 -0
  484. data/rbi/stripe/resources/subscription_item.rbi +404 -0
  485. data/rbi/stripe/resources/subscription_schedule.rbi +1623 -0
  486. data/rbi/stripe/resources/tax/calculation.rbi +478 -0
  487. data/rbi/stripe/resources/tax/calculation_line_item.rbi +91 -0
  488. data/rbi/stripe/resources/tax/registration.rbi +2713 -0
  489. data/rbi/stripe/resources/tax/settings.rbi +141 -0
  490. data/rbi/stripe/resources/tax/transaction.rbi +351 -0
  491. data/rbi/stripe/resources/tax/transaction_line_item.rbi +54 -0
  492. data/rbi/stripe/resources/tax_code.rbi +44 -0
  493. data/rbi/stripe/resources/tax_deducted_at_source.rbi +23 -0
  494. data/rbi/stripe/resources/tax_id.rbi +165 -0
  495. data/rbi/stripe/resources/tax_rate.rbi +239 -0
  496. data/rbi/stripe/resources/terminal/configuration.rbi +1386 -0
  497. data/rbi/stripe/resources/terminal/connection_token.rbi +37 -0
  498. data/rbi/stripe/resources/terminal/location.rbi +222 -0
  499. data/rbi/stripe/resources/terminal/reader.rbi +847 -0
  500. data/rbi/stripe/resources/test_helpers/test_clock.rbi +132 -0
  501. data/rbi/stripe/resources/token.rbi +1283 -0
  502. data/rbi/stripe/resources/topup.rbi +222 -0
  503. data/rbi/stripe/resources/transfer.rbi +199 -0
  504. data/rbi/stripe/resources/treasury/credit_reversal.rbi +119 -0
  505. data/rbi/stripe/resources/treasury/debit_reversal.rbi +131 -0
  506. data/rbi/stripe/resources/treasury/financial_account.rbi +865 -0
  507. data/rbi/stripe/resources/treasury/financial_account_features.rbi +260 -0
  508. data/rbi/stripe/resources/treasury/inbound_transfer.rbi +295 -0
  509. data/rbi/stripe/resources/treasury/outbound_payment.rbi +592 -0
  510. data/rbi/stripe/resources/treasury/outbound_transfer.rbi +431 -0
  511. data/rbi/stripe/resources/treasury/received_credit.rbi +302 -0
  512. data/rbi/stripe/resources/treasury/received_debit.rbi +256 -0
  513. data/rbi/stripe/resources/treasury/transaction.rbi +215 -0
  514. data/rbi/stripe/resources/treasury/transaction_entry.rbi +192 -0
  515. data/rbi/stripe/resources/v2/amount.rbi +14 -0
  516. data/rbi/stripe/resources/v2/billing/meter_event.rbi +37 -0
  517. data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +41 -0
  518. data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +31 -0
  519. data/rbi/stripe/resources/v2/event.rbi +48 -0
  520. data/rbi/stripe/resources/v2/event_destination.rbi +91 -0
  521. data/rbi/stripe/resources/webhook_endpoint.rbi +168 -0
  522. data/rbi/stripe/services/account_capability_service.rbi +51 -0
  523. data/rbi/stripe/services/account_external_account_service.rbi +304 -0
  524. data/rbi/stripe/services/account_link_service.rbi +58 -0
  525. data/rbi/stripe/services/account_login_link_service.rbi +22 -0
  526. data/rbi/stripe/services/account_person_service.rbi +1011 -0
  527. data/rbi/stripe/services/account_service.rbi +4213 -0
  528. data/rbi/stripe/services/account_session_service.rbi +646 -0
  529. data/rbi/stripe/services/apple_pay_domain_service.rbi +76 -0
  530. data/rbi/stripe/services/application_fee_refund_service.rbi +93 -0
  531. data/rbi/stripe/services/application_fee_service.rbi +78 -0
  532. data/rbi/stripe/services/apps/secret_service.rbi +151 -0
  533. data/{lib/stripe/resources/usage_record_summary.rb → rbi/stripe/services/apps_service.rbi} +4 -3
  534. data/rbi/stripe/services/balance_service.rbi +21 -0
  535. data/rbi/stripe/services/balance_transaction_service.rbi +93 -0
  536. data/rbi/stripe/services/billing/alert_service.rbi +152 -0
  537. data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +68 -0
  538. data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +59 -0
  539. data/rbi/stripe/services/billing/credit_grant_service.rbi +211 -0
  540. data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +42 -0
  541. data/rbi/stripe/services/billing/meter_event_service.rbi +42 -0
  542. data/rbi/stripe/services/billing/meter_event_summary_service.rbi +54 -0
  543. data/rbi/stripe/services/billing/meter_service.rbi +163 -0
  544. data/rbi/stripe/services/billing_portal/configuration_service.rbi +511 -0
  545. data/rbi/stripe/services/billing_portal/session_service.rbi +204 -0
  546. data/rbi/stripe/services/billing_portal_service.rbi +10 -0
  547. data/rbi/stripe/services/billing_service.rbi +15 -0
  548. data/rbi/stripe/services/charge_service.rbi +448 -0
  549. data/rbi/stripe/services/checkout/session_line_item_service.rbi +33 -0
  550. data/rbi/stripe/services/checkout/session_service.rbi +2614 -0
  551. data/rbi/stripe/services/checkout_service.rbi +9 -0
  552. data/rbi/stripe/services/climate/order_service.rbi +142 -0
  553. data/rbi/stripe/services/climate/product_service.rbi +46 -0
  554. data/rbi/stripe/services/climate/supplier_service.rbi +46 -0
  555. data/rbi/stripe/services/climate_service.rbi +11 -0
  556. data/rbi/stripe/services/confirmation_token_service.rbi +20 -0
  557. data/rbi/stripe/services/country_spec_service.rbi +44 -0
  558. data/rbi/stripe/services/coupon_service.rbi +194 -0
  559. data/rbi/stripe/services/credit_note_line_item_service.rbi +31 -0
  560. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +167 -0
  561. data/rbi/stripe/services/credit_note_service.rbi +415 -0
  562. data/rbi/stripe/services/customer_balance_transaction_service.rbi +92 -0
  563. data/rbi/stripe/services/customer_cash_balance_service.rbi +45 -0
  564. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +44 -0
  565. data/rbi/stripe/services/customer_funding_instructions_service.rbi +59 -0
  566. data/rbi/stripe/services/customer_payment_method_service.rbi +57 -0
  567. data/rbi/stripe/services/customer_payment_source_service.rbi +232 -0
  568. data/rbi/stripe/services/customer_service.rbi +647 -0
  569. data/rbi/stripe/services/customer_session_service.rbi +116 -0
  570. data/rbi/stripe/services/customer_tax_id_service.rbi +70 -0
  571. data/rbi/stripe/services/dispute_service.rbi +424 -0
  572. data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +55 -0
  573. data/rbi/stripe/services/entitlements/feature_service.rbi +107 -0
  574. data/rbi/stripe/services/entitlements_service.rbi +10 -0
  575. data/rbi/stripe/services/ephemeral_key_service.rbi +53 -0
  576. data/rbi/stripe/services/event_service.rbi +83 -0
  577. data/rbi/stripe/services/exchange_rate_service.rbi +44 -0
  578. data/rbi/stripe/services/file_link_service.rbi +124 -0
  579. data/rbi/stripe/services/file_service.rbi +116 -0
  580. data/rbi/stripe/services/financial_connections/account_owner_service.rbi +42 -0
  581. data/rbi/stripe/services/financial_connections/account_service.rbi +133 -0
  582. data/rbi/stripe/services/financial_connections/session_service.rbi +88 -0
  583. data/rbi/stripe/services/financial_connections/transaction_service.rbi +92 -0
  584. data/rbi/stripe/services/financial_connections_service.rbi +11 -0
  585. data/rbi/stripe/services/forwarding/request_service.rbi +134 -0
  586. data/rbi/stripe/services/forwarding_service.rbi +9 -0
  587. data/rbi/stripe/services/identity/verification_report_service.rbi +87 -0
  588. data/rbi/stripe/services/identity/verification_session_service.rbi +323 -0
  589. data/rbi/stripe/services/identity_service.rbi +10 -0
  590. data/rbi/stripe/services/invoice_item_service.rbi +366 -0
  591. data/rbi/stripe/services/invoice_line_item_service.rbi +259 -0
  592. data/rbi/stripe/services/invoice_payment_service.rbi +71 -0
  593. data/rbi/stripe/services/invoice_rendering_template_service.rbi +82 -0
  594. data/rbi/stripe/services/invoice_service.rbi +2981 -0
  595. data/rbi/stripe/services/issuing/authorization_service.rbi +146 -0
  596. data/rbi/stripe/services/issuing/card_service.rbi +495 -0
  597. data/rbi/stripe/services/issuing/cardholder_service.rbi +587 -0
  598. data/rbi/stripe/services/issuing/dispute_service.rbi +707 -0
  599. data/rbi/stripe/services/issuing/personalization_design_service.rbi +243 -0
  600. data/rbi/stripe/services/issuing/physical_bundle_service.rbi +59 -0
  601. data/rbi/stripe/services/issuing/token_service.rbi +99 -0
  602. data/rbi/stripe/services/issuing/transaction_service.rbi +105 -0
  603. data/rbi/stripe/services/issuing_service.rbi +16 -0
  604. data/rbi/stripe/services/mandate_service.rbi +20 -0
  605. data/rbi/stripe/services/payment_intent_service.rbi +7659 -0
  606. data/rbi/stripe/services/payment_link_line_item_service.rbi +31 -0
  607. data/rbi/stripe/services/payment_link_service.rbi +1352 -0
  608. data/rbi/stripe/services/payment_method_configuration_service.rbi +2487 -0
  609. data/rbi/stripe/services/payment_method_domain_service.rbi +112 -0
  610. data/rbi/stripe/services/payment_method_service.rbi +776 -0
  611. data/rbi/stripe/services/payout_service.rbi +205 -0
  612. data/rbi/stripe/services/plan_service.rbi +282 -0
  613. data/rbi/stripe/services/price_service.rbi +546 -0
  614. data/rbi/stripe/services/product_feature_service.rbi +67 -0
  615. data/rbi/stripe/services/product_service.rbi +477 -0
  616. data/rbi/stripe/services/promotion_code_service.rbi +214 -0
  617. data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +31 -0
  618. data/rbi/stripe/services/quote_line_item_service.rbi +31 -0
  619. data/rbi/stripe/services/quote_service.rbi +686 -0
  620. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +85 -0
  621. data/rbi/stripe/services/radar/value_list_item_service.rbi +109 -0
  622. data/rbi/stripe/services/radar/value_list_service.rbi +141 -0
  623. data/rbi/stripe/services/radar_service.rbi +11 -0
  624. data/rbi/stripe/services/refund_service.rbi +185 -0
  625. data/rbi/stripe/services/reporting/report_run_service.rbi +135 -0
  626. data/rbi/stripe/services/reporting/report_type_service.rbi +35 -0
  627. data/rbi/stripe/services/reporting_service.rbi +10 -0
  628. data/rbi/stripe/services/review_service.rbi +84 -0
  629. data/rbi/stripe/services/setup_attempt_service.rbi +65 -0
  630. data/rbi/stripe/services/setup_intent_service.rbi +3391 -0
  631. data/rbi/stripe/services/shipping_rate_service.rbi +241 -0
  632. data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +46 -0
  633. data/rbi/stripe/services/sigma_service.rbi +9 -0
  634. data/rbi/stripe/services/source_service.rbi +663 -0
  635. data/rbi/stripe/services/source_transaction_service.rbi +31 -0
  636. data/rbi/stripe/services/subscription_item_service.rbi +350 -0
  637. data/rbi/stripe/services/subscription_schedule_service.rbi +1290 -0
  638. data/rbi/stripe/services/subscription_service.rbi +1648 -0
  639. data/rbi/stripe/services/tax/calculation_line_item_service.rbi +33 -0
  640. data/rbi/stripe/services/tax/calculation_service.rbi +234 -0
  641. data/rbi/stripe/services/tax/registration_service.rbi +1845 -0
  642. data/rbi/stripe/services/tax/settings_service.rbi +93 -0
  643. data/rbi/stripe/services/tax/transaction_line_item_service.rbi +33 -0
  644. data/rbi/stripe/services/tax/transaction_service.rbi +146 -0
  645. data/rbi/stripe/services/tax_code_service.rbi +44 -0
  646. data/rbi/stripe/services/tax_id_service.rbi +110 -0
  647. data/rbi/stripe/services/tax_rate_service.rbi +185 -0
  648. data/rbi/stripe/services/tax_service.rbi +12 -0
  649. data/rbi/stripe/services/terminal/configuration_service.rbi +1118 -0
  650. data/rbi/stripe/services/terminal/connection_token_service.rbi +25 -0
  651. data/rbi/stripe/services/terminal/location_service.rbi +182 -0
  652. data/rbi/stripe/services/terminal/reader_service.rbi +455 -0
  653. data/rbi/stripe/services/terminal_service.rbi +12 -0
  654. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +739 -0
  655. data/rbi/stripe/services/test_helpers/customer_service.rbi +33 -0
  656. data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +848 -0
  657. data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +76 -0
  658. data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +69 -0
  659. data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +711 -0
  660. data/rbi/stripe/services/test_helpers/issuing_service.rbi +14 -0
  661. data/rbi/stripe/services/test_helpers/refund_service.rbi +22 -0
  662. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +93 -0
  663. data/rbi/stripe/services/test_helpers/terminal_service.rbi +11 -0
  664. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +90 -0
  665. data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +64 -0
  666. data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +125 -0
  667. data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +125 -0
  668. data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +87 -0
  669. data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +87 -0
  670. data/rbi/stripe/services/test_helpers/treasury_service.rbi +15 -0
  671. data/rbi/stripe/services/test_helpers_service.rbi +15 -0
  672. data/rbi/stripe/services/token_service.rbi +1257 -0
  673. data/rbi/stripe/services/topup_service.rbi +176 -0
  674. data/rbi/stripe/services/transfer_reversal_service.rbi +101 -0
  675. data/rbi/stripe/services/transfer_service.rbi +152 -0
  676. data/rbi/stripe/services/treasury/credit_reversal_service.rbi +84 -0
  677. data/rbi/stripe/services/treasury/debit_reversal_service.rbi +88 -0
  678. data/rbi/stripe/services/treasury/financial_account_features_service.rbi +198 -0
  679. data/rbi/stripe/services/treasury/financial_account_service.rbi +562 -0
  680. data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +117 -0
  681. data/rbi/stripe/services/treasury/outbound_payment_service.rbi +304 -0
  682. data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +157 -0
  683. data/rbi/stripe/services/treasury/received_credit_service.rbi +72 -0
  684. data/rbi/stripe/services/treasury/received_debit_service.rbi +59 -0
  685. data/rbi/stripe/services/treasury/transaction_entry_service.rbi +111 -0
  686. data/rbi/stripe/services/treasury/transaction_service.rbi +122 -0
  687. data/rbi/stripe/services/treasury_service.rbi +18 -0
  688. data/rbi/stripe/services/v1_services.rbi +77 -0
  689. data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +39 -0
  690. data/rbi/stripe/services/v2/billing/meter_event_service.rbi +42 -0
  691. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +18 -0
  692. data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +55 -0
  693. data/rbi/stripe/services/v2/billing_service.rbi +14 -0
  694. data/rbi/stripe/services/v2/core/event_destination_service.rbi +192 -0
  695. data/rbi/stripe/services/v2/core/event_service.rbi +36 -0
  696. data/rbi/stripe/services/v2/core_service.rbi +12 -0
  697. data/rbi/stripe/services/v2_services.rbi +10 -0
  698. data/rbi/stripe/services/webhook_endpoint_service.rbi +129 -0
  699. data/stripe.gemspec +10 -7
  700. metadata +599 -18
  701. data/lib/stripe/resources/bitcoin_receiver.rb +0 -24
  702. data/lib/stripe/resources/bitcoin_transaction.rb +0 -16
  703. data/lib/stripe/resources/issuing/card_details.rb +0 -9
  704. data/lib/stripe/resources/order.rb +0 -33
  705. data/lib/stripe/resources/order_return.rb +0 -10
  706. data/lib/stripe/resources/recipient.rb +0 -14
  707. data/lib/stripe/resources/sku.rb +0 -13
  708. data/lib/stripe/resources/three_d_secure.rb +0 -14
@@ -3,14 +3,3678 @@
3
3
 
4
4
  module Stripe
5
5
  module Checkout
6
+ # A Checkout Session represents your customer's session as they pay for
7
+ # one-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout)
8
+ # or [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a
9
+ # new Session each time your customer attempts to pay.
10
+ #
11
+ # Once payment is successful, the Checkout Session will contain a reference
12
+ # to the [Customer](https://stripe.com/docs/api/customers), and either the successful
13
+ # [PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active
14
+ # [Subscription](https://stripe.com/docs/api/subscriptions).
15
+ #
16
+ # You can create a Checkout Session on your server and redirect to its URL
17
+ # to begin Checkout.
18
+ #
19
+ # Related guide: [Checkout quickstart](https://stripe.com/docs/checkout/quickstart)
6
20
  class Session < APIResource
7
21
  extend Stripe::APIOperations::Create
8
22
  extend Stripe::APIOperations::List
9
- extend Stripe::APIOperations::NestedResource
23
+ include Stripe::APIOperations::Save
10
24
 
11
25
  OBJECT_NAME = "checkout.session"
26
+ def self.object_name
27
+ "checkout.session"
28
+ end
12
29
 
13
- nested_resource_class_methods :line_item, operations: %i[list]
30
+ class AdaptivePricing < Stripe::StripeObject
31
+ # Whether Adaptive Pricing is enabled.
32
+ attr_reader :enabled
33
+ end
34
+
35
+ class AfterExpiration < Stripe::StripeObject
36
+ class Recovery < Stripe::StripeObject
37
+ # Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false`
38
+ attr_reader :allow_promotion_codes
39
+ # If `true`, a recovery url will be generated to recover this Checkout Session if it
40
+ # expires before a transaction is completed. It will be attached to the
41
+ # Checkout Session object upon expiration.
42
+ attr_reader :enabled
43
+ # The timestamp at which the recovery URL will expire.
44
+ attr_reader :expires_at
45
+ # URL that creates a new Checkout Session when clicked that is a copy of this expired Checkout Session
46
+ attr_reader :url
47
+ end
48
+ # When set, configuration used to recover the Checkout Session on expiry.
49
+ attr_reader :recovery
50
+ end
51
+
52
+ class AutomaticTax < Stripe::StripeObject
53
+ class Liability < Stripe::StripeObject
54
+ # The connected account being referenced when `type` is `account`.
55
+ attr_reader :account
56
+ # Type of the account referenced.
57
+ attr_reader :type
58
+ end
59
+ # Indicates whether automatic tax is enabled for the session
60
+ attr_reader :enabled
61
+ # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
62
+ attr_reader :liability
63
+ # The tax provider powering automatic tax.
64
+ attr_reader :provider
65
+ # The status of the most recent automated tax calculation for this session.
66
+ attr_reader :status
67
+ end
68
+
69
+ class CollectedInformation < Stripe::StripeObject
70
+ class ShippingDetails < Stripe::StripeObject
71
+ class Address < Stripe::StripeObject
72
+ # City, district, suburb, town, or village.
73
+ attr_reader :city
74
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
75
+ attr_reader :country
76
+ # Address line 1 (e.g., street, PO Box, or company name).
77
+ attr_reader :line1
78
+ # Address line 2 (e.g., apartment, suite, unit, or building).
79
+ attr_reader :line2
80
+ # ZIP or postal code.
81
+ attr_reader :postal_code
82
+ # State, county, province, or region.
83
+ attr_reader :state
84
+ end
85
+ # Attribute for field address
86
+ attr_reader :address
87
+ # Customer name.
88
+ attr_reader :name
89
+ end
90
+ # Shipping information for this Checkout Session.
91
+ attr_reader :shipping_details
92
+ end
93
+
94
+ class Consent < Stripe::StripeObject
95
+ # If `opt_in`, the customer consents to receiving promotional communications
96
+ # from the merchant about this Checkout Session.
97
+ attr_reader :promotions
98
+ # If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service.
99
+ attr_reader :terms_of_service
100
+ end
101
+
102
+ class ConsentCollection < Stripe::StripeObject
103
+ class PaymentMethodReuseAgreement < Stripe::StripeObject
104
+ # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used.
105
+ #
106
+ # When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
107
+ attr_reader :position
108
+ end
109
+ # If set to `hidden`, it will hide legal text related to the reuse of a payment method.
110
+ attr_reader :payment_method_reuse_agreement
111
+ # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout
112
+ # Session will determine whether to display an option to opt into promotional communication
113
+ # from the merchant depending on the customer's locale. Only available to US merchants.
114
+ attr_reader :promotions
115
+ # If set to `required`, it requires customers to accept the terms of service before being able to pay.
116
+ attr_reader :terms_of_service
117
+ end
118
+
119
+ class CurrencyConversion < Stripe::StripeObject
120
+ # Total of all items in source currency before discounts or taxes are applied.
121
+ attr_reader :amount_subtotal
122
+ # Total of all items in source currency after discounts and taxes are applied.
123
+ attr_reader :amount_total
124
+ # Exchange rate used to convert source currency amounts to customer currency amounts
125
+ attr_reader :fx_rate
126
+ # Creation currency of the CheckoutSession before localization
127
+ attr_reader :source_currency
128
+ end
129
+
130
+ class CustomField < Stripe::StripeObject
131
+ class Dropdown < Stripe::StripeObject
132
+ class Option < Stripe::StripeObject
133
+ # The label for the option, displayed to the customer. Up to 100 characters.
134
+ attr_reader :label
135
+ # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters.
136
+ attr_reader :value
137
+ end
138
+ # The value that will pre-fill on the payment page.
139
+ attr_reader :default_value
140
+ # The options available for the customer to select. Up to 200 options allowed.
141
+ attr_reader :options
142
+ # The option selected by the customer. This will be the `value` for the option.
143
+ attr_reader :value
144
+ end
145
+
146
+ class Label < Stripe::StripeObject
147
+ # Custom text for the label, displayed to the customer. Up to 50 characters.
148
+ attr_reader :custom
149
+ # The type of the label.
150
+ attr_reader :type
151
+ end
152
+
153
+ class Numeric < Stripe::StripeObject
154
+ # The value that will pre-fill the field on the payment page.
155
+ attr_reader :default_value
156
+ # The maximum character length constraint for the customer's input.
157
+ attr_reader :maximum_length
158
+ # The minimum character length requirement for the customer's input.
159
+ attr_reader :minimum_length
160
+ # The value entered by the customer, containing only digits.
161
+ attr_reader :value
162
+ end
163
+
164
+ class Text < Stripe::StripeObject
165
+ # The value that will pre-fill the field on the payment page.
166
+ attr_reader :default_value
167
+ # The maximum character length constraint for the customer's input.
168
+ attr_reader :maximum_length
169
+ # The minimum character length requirement for the customer's input.
170
+ attr_reader :minimum_length
171
+ # The value entered by the customer.
172
+ attr_reader :value
173
+ end
174
+ # Attribute for field dropdown
175
+ attr_reader :dropdown
176
+ # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters.
177
+ attr_reader :key
178
+ # Attribute for field label
179
+ attr_reader :label
180
+ # Attribute for field numeric
181
+ attr_reader :numeric
182
+ # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
183
+ attr_reader :optional
184
+ # Attribute for field text
185
+ attr_reader :text
186
+ # The type of the field.
187
+ attr_reader :type
188
+ end
189
+
190
+ class CustomText < Stripe::StripeObject
191
+ class AfterSubmit < Stripe::StripeObject
192
+ # Text may be up to 1200 characters in length.
193
+ attr_reader :message
194
+ end
195
+
196
+ class ShippingAddress < Stripe::StripeObject
197
+ # Text may be up to 1200 characters in length.
198
+ attr_reader :message
199
+ end
200
+
201
+ class Submit < Stripe::StripeObject
202
+ # Text may be up to 1200 characters in length.
203
+ attr_reader :message
204
+ end
205
+
206
+ class TermsOfServiceAcceptance < Stripe::StripeObject
207
+ # Text may be up to 1200 characters in length.
208
+ attr_reader :message
209
+ end
210
+ # Custom text that should be displayed after the payment confirmation button.
211
+ attr_reader :after_submit
212
+ # Custom text that should be displayed alongside shipping address collection.
213
+ attr_reader :shipping_address
214
+ # Custom text that should be displayed alongside the payment confirmation button.
215
+ attr_reader :submit
216
+ # Custom text that should be displayed in place of the default terms of service agreement text.
217
+ attr_reader :terms_of_service_acceptance
218
+ end
219
+
220
+ class CustomerDetails < Stripe::StripeObject
221
+ class Address < Stripe::StripeObject
222
+ # City, district, suburb, town, or village.
223
+ attr_reader :city
224
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
225
+ attr_reader :country
226
+ # Address line 1 (e.g., street, PO Box, or company name).
227
+ attr_reader :line1
228
+ # Address line 2 (e.g., apartment, suite, unit, or building).
229
+ attr_reader :line2
230
+ # ZIP or postal code.
231
+ attr_reader :postal_code
232
+ # State, county, province, or region.
233
+ attr_reader :state
234
+ end
235
+
236
+ class TaxId < Stripe::StripeObject
237
+ # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, or `unknown`
238
+ attr_reader :type
239
+ # The value of the tax ID.
240
+ attr_reader :value
241
+ end
242
+ # The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022.
243
+ attr_reader :address
244
+ # The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry.
245
+ # Otherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form.
246
+ attr_reader :email
247
+ # The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022.
248
+ attr_reader :name
249
+ # The customer's phone number after a completed Checkout Session.
250
+ attr_reader :phone
251
+ # The customer’s tax exempt status after a completed Checkout Session.
252
+ attr_reader :tax_exempt
253
+ # The customer’s tax IDs after a completed Checkout Session.
254
+ attr_reader :tax_ids
255
+ end
256
+
257
+ class Discount < Stripe::StripeObject
258
+ # Coupon attached to the Checkout Session.
259
+ attr_reader :coupon
260
+ # Promotion code attached to the Checkout Session.
261
+ attr_reader :promotion_code
262
+ end
263
+
264
+ class InvoiceCreation < Stripe::StripeObject
265
+ class InvoiceData < Stripe::StripeObject
266
+ class CustomField < Stripe::StripeObject
267
+ # The name of the custom field.
268
+ attr_reader :name
269
+ # The value of the custom field.
270
+ attr_reader :value
271
+ end
272
+
273
+ class Issuer < Stripe::StripeObject
274
+ # The connected account being referenced when `type` is `account`.
275
+ attr_reader :account
276
+ # Type of the account referenced.
277
+ attr_reader :type
278
+ end
279
+
280
+ class RenderingOptions < Stripe::StripeObject
281
+ # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
282
+ attr_reader :amount_tax_display
283
+ end
284
+ # The account tax IDs associated with the invoice.
285
+ attr_reader :account_tax_ids
286
+ # Custom fields displayed on the invoice.
287
+ attr_reader :custom_fields
288
+ # An arbitrary string attached to the object. Often useful for displaying to users.
289
+ attr_reader :description
290
+ # Footer displayed on the invoice.
291
+ attr_reader :footer
292
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
293
+ attr_reader :issuer
294
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
295
+ attr_reader :metadata
296
+ # Options for invoice PDF rendering.
297
+ attr_reader :rendering_options
298
+ end
299
+ # Indicates whether invoice creation is enabled for the Checkout Session.
300
+ attr_reader :enabled
301
+ # Attribute for field invoice_data
302
+ attr_reader :invoice_data
303
+ end
304
+
305
+ class OptionalItem < Stripe::StripeObject
306
+ class AdjustableQuantity < Stripe::StripeObject
307
+ # Set to true if the quantity can be adjusted to any non-negative integer.
308
+ attr_reader :enabled
309
+ # The maximum quantity of this item the customer can purchase. By default this value is 99. You can specify a value up to 999999.
310
+ attr_reader :maximum
311
+ # The minimum quantity of this item the customer must purchase, if they choose to purchase it. Because this item is optional, the customer will always be able to remove it from their order, even if the `minimum` configured here is greater than 0. By default this value is 0.
312
+ attr_reader :minimum
313
+ end
314
+ # Attribute for field adjustable_quantity
315
+ attr_reader :adjustable_quantity
316
+ # Attribute for field price
317
+ attr_reader :price
318
+ # Attribute for field quantity
319
+ attr_reader :quantity
320
+ end
321
+
322
+ class PaymentMethodConfigurationDetails < Stripe::StripeObject
323
+ # ID of the payment method configuration used.
324
+ attr_reader :id
325
+ # ID of the parent payment method configuration used.
326
+ attr_reader :parent
327
+ end
328
+
329
+ class PaymentMethodOptions < Stripe::StripeObject
330
+ class AcssDebit < Stripe::StripeObject
331
+ class MandateOptions < Stripe::StripeObject
332
+ # A URL for custom mandate text
333
+ attr_reader :custom_mandate_url
334
+ # List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode.
335
+ attr_reader :default_for
336
+ # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.
337
+ attr_reader :interval_description
338
+ # Payment schedule for the mandate.
339
+ attr_reader :payment_schedule
340
+ # Transaction type of the mandate.
341
+ attr_reader :transaction_type
342
+ end
343
+ # Currency supported by the bank account. Returned when the Session is in `setup` mode.
344
+ attr_reader :currency
345
+ # Attribute for field mandate_options
346
+ attr_reader :mandate_options
347
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
348
+ #
349
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
350
+ #
351
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
352
+ #
353
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
354
+ attr_reader :setup_future_usage
355
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
356
+ attr_reader :target_date
357
+ # Bank account verification method.
358
+ attr_reader :verification_method
359
+ end
360
+
361
+ class Affirm < Stripe::StripeObject
362
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
363
+ #
364
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
365
+ #
366
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
367
+ #
368
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
369
+ attr_reader :setup_future_usage
370
+ end
371
+
372
+ class AfterpayClearpay < Stripe::StripeObject
373
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
374
+ #
375
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
376
+ #
377
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
378
+ #
379
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
380
+ attr_reader :setup_future_usage
381
+ end
382
+
383
+ class Alipay < Stripe::StripeObject
384
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
385
+ #
386
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
387
+ #
388
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
389
+ #
390
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
391
+ attr_reader :setup_future_usage
392
+ end
393
+
394
+ class AmazonPay < Stripe::StripeObject
395
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
396
+ #
397
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
398
+ #
399
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
400
+ #
401
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
402
+ attr_reader :setup_future_usage
403
+ end
404
+
405
+ class AuBecsDebit < Stripe::StripeObject
406
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
407
+ #
408
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
409
+ #
410
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
411
+ #
412
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
413
+ attr_reader :setup_future_usage
414
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
415
+ attr_reader :target_date
416
+ end
417
+
418
+ class BacsDebit < Stripe::StripeObject
419
+ class MandateOptions < Stripe::StripeObject
420
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
421
+ attr_reader :reference_prefix
422
+ end
423
+ # Attribute for field mandate_options
424
+ attr_reader :mandate_options
425
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
426
+ #
427
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
428
+ #
429
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
430
+ #
431
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
432
+ attr_reader :setup_future_usage
433
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
434
+ attr_reader :target_date
435
+ end
436
+
437
+ class Bancontact < Stripe::StripeObject
438
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
439
+ #
440
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
441
+ #
442
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
443
+ #
444
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
445
+ attr_reader :setup_future_usage
446
+ end
447
+
448
+ class Boleto < Stripe::StripeObject
449
+ # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time.
450
+ attr_reader :expires_after_days
451
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
452
+ #
453
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
454
+ #
455
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
456
+ #
457
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
458
+ attr_reader :setup_future_usage
459
+ end
460
+
461
+ class Card < Stripe::StripeObject
462
+ class Installments < Stripe::StripeObject
463
+ # Indicates if installments are enabled
464
+ attr_reader :enabled
465
+ end
466
+
467
+ class Restrictions < Stripe::StripeObject
468
+ # Specify the card brands to block in the Checkout Session. If a customer enters or selects a card belonging to a blocked brand, they can't complete the Session.
469
+ attr_reader :brands_blocked
470
+ end
471
+ # Attribute for field installments
472
+ attr_reader :installments
473
+ # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession.
474
+ attr_reader :request_extended_authorization
475
+ # Request ability to [increment the authorization](/payments/incremental-authorization) for this CheckoutSession.
476
+ attr_reader :request_incremental_authorization
477
+ # Request ability to make [multiple captures](/payments/multicapture) for this CheckoutSession.
478
+ attr_reader :request_multicapture
479
+ # Request ability to [overcapture](/payments/overcapture) for this CheckoutSession.
480
+ attr_reader :request_overcapture
481
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
482
+ attr_reader :request_three_d_secure
483
+ # Attribute for field restrictions
484
+ attr_reader :restrictions
485
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
486
+ #
487
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
488
+ #
489
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
490
+ #
491
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
492
+ attr_reader :setup_future_usage
493
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
494
+ attr_reader :statement_descriptor_suffix_kana
495
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
496
+ attr_reader :statement_descriptor_suffix_kanji
497
+ end
498
+
499
+ class Cashapp < Stripe::StripeObject
500
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
501
+ #
502
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
503
+ #
504
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
505
+ #
506
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
507
+ attr_reader :setup_future_usage
508
+ end
509
+
510
+ class CustomerBalance < Stripe::StripeObject
511
+ class BankTransfer < Stripe::StripeObject
512
+ class EuBankTransfer < Stripe::StripeObject
513
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
514
+ attr_reader :country
515
+ end
516
+ # Attribute for field eu_bank_transfer
517
+ attr_reader :eu_bank_transfer
518
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
519
+ #
520
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
521
+ attr_reader :requested_address_types
522
+ # The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
523
+ attr_reader :type
524
+ end
525
+ # Attribute for field bank_transfer
526
+ attr_reader :bank_transfer
527
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
528
+ attr_reader :funding_type
529
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
530
+ #
531
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
532
+ #
533
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
534
+ #
535
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
536
+ attr_reader :setup_future_usage
537
+ end
538
+
539
+ class Eps < Stripe::StripeObject
540
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
541
+ #
542
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
543
+ #
544
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
545
+ #
546
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
547
+ attr_reader :setup_future_usage
548
+ end
549
+
550
+ class Fpx < Stripe::StripeObject
551
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
552
+ #
553
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
554
+ #
555
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
556
+ #
557
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
558
+ attr_reader :setup_future_usage
559
+ end
560
+
561
+ class Giropay < Stripe::StripeObject
562
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
563
+ #
564
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
565
+ #
566
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
567
+ #
568
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
569
+ attr_reader :setup_future_usage
570
+ end
571
+
572
+ class Grabpay < Stripe::StripeObject
573
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
574
+ #
575
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
576
+ #
577
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
578
+ #
579
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
580
+ attr_reader :setup_future_usage
581
+ end
582
+
583
+ class Ideal < Stripe::StripeObject
584
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
585
+ #
586
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
587
+ #
588
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
589
+ #
590
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
591
+ attr_reader :setup_future_usage
592
+ end
593
+
594
+ class KakaoPay < Stripe::StripeObject
595
+ # Controls when the funds will be captured from the customer's account.
596
+ attr_reader :capture_method
597
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
598
+ #
599
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
600
+ #
601
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
602
+ #
603
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
604
+ attr_reader :setup_future_usage
605
+ end
606
+
607
+ class Klarna < Stripe::StripeObject
608
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
609
+ #
610
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
611
+ #
612
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
613
+ #
614
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
615
+ attr_reader :setup_future_usage
616
+ end
617
+
618
+ class Konbini < Stripe::StripeObject
619
+ # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST.
620
+ attr_reader :expires_after_days
621
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
622
+ #
623
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
624
+ #
625
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
626
+ #
627
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
628
+ attr_reader :setup_future_usage
629
+ end
630
+
631
+ class KrCard < Stripe::StripeObject
632
+ # Controls when the funds will be captured from the customer's account.
633
+ attr_reader :capture_method
634
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
635
+ #
636
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
637
+ #
638
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
639
+ #
640
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
641
+ attr_reader :setup_future_usage
642
+ end
643
+
644
+ class Link < Stripe::StripeObject
645
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
646
+ #
647
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
648
+ #
649
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
650
+ #
651
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
652
+ attr_reader :setup_future_usage
653
+ end
654
+
655
+ class Mobilepay < Stripe::StripeObject
656
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
657
+ #
658
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
659
+ #
660
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
661
+ #
662
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
663
+ attr_reader :setup_future_usage
664
+ end
665
+
666
+ class Multibanco < Stripe::StripeObject
667
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
668
+ #
669
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
670
+ #
671
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
672
+ #
673
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
674
+ attr_reader :setup_future_usage
675
+ end
676
+
677
+ class NaverPay < Stripe::StripeObject
678
+ # Controls when the funds will be captured from the customer's account.
679
+ attr_reader :capture_method
680
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
681
+ #
682
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
683
+ #
684
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
685
+ #
686
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
687
+ attr_reader :setup_future_usage
688
+ end
689
+
690
+ class Oxxo < Stripe::StripeObject
691
+ # The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
692
+ attr_reader :expires_after_days
693
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
694
+ #
695
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
696
+ #
697
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
698
+ #
699
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
700
+ attr_reader :setup_future_usage
701
+ end
702
+
703
+ class P24 < Stripe::StripeObject
704
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
705
+ #
706
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
707
+ #
708
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
709
+ #
710
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
711
+ attr_reader :setup_future_usage
712
+ end
713
+
714
+ class Payco < Stripe::StripeObject
715
+ # Controls when the funds will be captured from the customer's account.
716
+ attr_reader :capture_method
717
+ end
718
+
719
+ class Paynow < Stripe::StripeObject
720
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
721
+ #
722
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
723
+ #
724
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
725
+ #
726
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
727
+ attr_reader :setup_future_usage
728
+ end
729
+
730
+ class Paypal < Stripe::StripeObject
731
+ # Controls when the funds will be captured from the customer's account.
732
+ attr_reader :capture_method
733
+ # Preferred locale of the PayPal checkout page that the customer is redirected to.
734
+ attr_reader :preferred_locale
735
+ # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
736
+ attr_reader :reference
737
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
738
+ #
739
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
740
+ #
741
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
742
+ #
743
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
744
+ attr_reader :setup_future_usage
745
+ end
746
+
747
+ class Pix < Stripe::StripeObject
748
+ # The number of seconds after which Pix payment will expire.
749
+ attr_reader :expires_after_seconds
750
+ end
751
+
752
+ class RevolutPay < Stripe::StripeObject
753
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
754
+ #
755
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
756
+ #
757
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
758
+ #
759
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
760
+ attr_reader :setup_future_usage
761
+ end
762
+
763
+ class SamsungPay < Stripe::StripeObject
764
+ # Controls when the funds will be captured from the customer's account.
765
+ attr_reader :capture_method
766
+ end
767
+
768
+ class SepaDebit < Stripe::StripeObject
769
+ class MandateOptions < Stripe::StripeObject
770
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
771
+ attr_reader :reference_prefix
772
+ end
773
+ # Attribute for field mandate_options
774
+ attr_reader :mandate_options
775
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
776
+ #
777
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
778
+ #
779
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
780
+ #
781
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
782
+ attr_reader :setup_future_usage
783
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
784
+ attr_reader :target_date
785
+ end
786
+
787
+ class Sofort < Stripe::StripeObject
788
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
789
+ #
790
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
791
+ #
792
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
793
+ #
794
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
795
+ attr_reader :setup_future_usage
796
+ end
797
+
798
+ class Swish < Stripe::StripeObject
799
+ # The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent.
800
+ attr_reader :reference
801
+ end
802
+
803
+ class UsBankAccount < Stripe::StripeObject
804
+ class FinancialConnections < Stripe::StripeObject
805
+ class Filters < Stripe::StripeObject
806
+ # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
807
+ attr_reader :account_subcategories
808
+ end
809
+ # Attribute for field filters
810
+ attr_reader :filters
811
+ # The list of permissions to request. The `payment_method` permission must be included.
812
+ attr_reader :permissions
813
+ # Data features requested to be retrieved upon account creation.
814
+ attr_reader :prefetch
815
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
816
+ attr_reader :return_url
817
+ end
818
+ # Attribute for field financial_connections
819
+ attr_reader :financial_connections
820
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
821
+ #
822
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
823
+ #
824
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
825
+ #
826
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
827
+ attr_reader :setup_future_usage
828
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
829
+ attr_reader :target_date
830
+ # Bank account verification method.
831
+ attr_reader :verification_method
832
+ end
833
+ # Attribute for field acss_debit
834
+ attr_reader :acss_debit
835
+ # Attribute for field affirm
836
+ attr_reader :affirm
837
+ # Attribute for field afterpay_clearpay
838
+ attr_reader :afterpay_clearpay
839
+ # Attribute for field alipay
840
+ attr_reader :alipay
841
+ # Attribute for field amazon_pay
842
+ attr_reader :amazon_pay
843
+ # Attribute for field au_becs_debit
844
+ attr_reader :au_becs_debit
845
+ # Attribute for field bacs_debit
846
+ attr_reader :bacs_debit
847
+ # Attribute for field bancontact
848
+ attr_reader :bancontact
849
+ # Attribute for field boleto
850
+ attr_reader :boleto
851
+ # Attribute for field card
852
+ attr_reader :card
853
+ # Attribute for field cashapp
854
+ attr_reader :cashapp
855
+ # Attribute for field customer_balance
856
+ attr_reader :customer_balance
857
+ # Attribute for field eps
858
+ attr_reader :eps
859
+ # Attribute for field fpx
860
+ attr_reader :fpx
861
+ # Attribute for field giropay
862
+ attr_reader :giropay
863
+ # Attribute for field grabpay
864
+ attr_reader :grabpay
865
+ # Attribute for field ideal
866
+ attr_reader :ideal
867
+ # Attribute for field kakao_pay
868
+ attr_reader :kakao_pay
869
+ # Attribute for field klarna
870
+ attr_reader :klarna
871
+ # Attribute for field konbini
872
+ attr_reader :konbini
873
+ # Attribute for field kr_card
874
+ attr_reader :kr_card
875
+ # Attribute for field link
876
+ attr_reader :link
877
+ # Attribute for field mobilepay
878
+ attr_reader :mobilepay
879
+ # Attribute for field multibanco
880
+ attr_reader :multibanco
881
+ # Attribute for field naver_pay
882
+ attr_reader :naver_pay
883
+ # Attribute for field oxxo
884
+ attr_reader :oxxo
885
+ # Attribute for field p24
886
+ attr_reader :p24
887
+ # Attribute for field payco
888
+ attr_reader :payco
889
+ # Attribute for field paynow
890
+ attr_reader :paynow
891
+ # Attribute for field paypal
892
+ attr_reader :paypal
893
+ # Attribute for field pix
894
+ attr_reader :pix
895
+ # Attribute for field revolut_pay
896
+ attr_reader :revolut_pay
897
+ # Attribute for field samsung_pay
898
+ attr_reader :samsung_pay
899
+ # Attribute for field sepa_debit
900
+ attr_reader :sepa_debit
901
+ # Attribute for field sofort
902
+ attr_reader :sofort
903
+ # Attribute for field swish
904
+ attr_reader :swish
905
+ # Attribute for field us_bank_account
906
+ attr_reader :us_bank_account
907
+ end
908
+
909
+ class Permissions < Stripe::StripeObject
910
+ # Determines which entity is allowed to update the shipping details.
911
+ #
912
+ # Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details.
913
+ #
914
+ # When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API.
915
+ attr_reader :update_shipping_details
916
+ end
917
+
918
+ class PhoneNumberCollection < Stripe::StripeObject
919
+ # Indicates whether phone number collection is enabled for the session
920
+ attr_reader :enabled
921
+ end
922
+
923
+ class PresentmentDetails < Stripe::StripeObject
924
+ # Amount intended to be collected by this payment, denominated in presentment_currency.
925
+ attr_reader :presentment_amount
926
+ # Currency presented to the customer during payment.
927
+ attr_reader :presentment_currency
928
+ end
929
+
930
+ class SavedPaymentMethodOptions < Stripe::StripeObject
931
+ # Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with ’allow_redisplay: ‘always’ are shown in Checkout.
932
+ attr_reader :allow_redisplay_filters
933
+ # Enable customers to choose if they wish to remove their saved payment methods. Disabled by default.
934
+ attr_reader :payment_method_remove
935
+ # Enable customers to choose if they wish to save their payment method for future use. Disabled by default.
936
+ attr_reader :payment_method_save
937
+ end
938
+
939
+ class ShippingAddressCollection < Stripe::StripeObject
940
+ # An array of two-letter ISO country codes representing which countries Checkout should provide as options for
941
+ # shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SY, UM, VI`.
942
+ attr_reader :allowed_countries
943
+ end
944
+
945
+ class ShippingCost < Stripe::StripeObject
946
+ class Tax < Stripe::StripeObject
947
+ # Amount of tax applied for this rate.
948
+ attr_reader :amount
949
+ # Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax.
950
+ #
951
+ # Related guide: [Tax rates](/billing/taxes/tax-rates)
952
+ attr_reader :rate
953
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
954
+ attr_reader :taxability_reason
955
+ # The amount on which tax is calculated, in cents (or local equivalent).
956
+ attr_reader :taxable_amount
957
+ end
958
+ # Total shipping cost before any discounts or taxes are applied.
959
+ attr_reader :amount_subtotal
960
+ # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.
961
+ attr_reader :amount_tax
962
+ # Total shipping cost after discounts and taxes are applied.
963
+ attr_reader :amount_total
964
+ # The ID of the ShippingRate for this order.
965
+ attr_reader :shipping_rate
966
+ # The taxes applied to the shipping rate.
967
+ attr_reader :taxes
968
+ end
969
+
970
+ class ShippingOption < Stripe::StripeObject
971
+ # A non-negative integer in cents representing how much to charge.
972
+ attr_reader :shipping_amount
973
+ # The shipping rate.
974
+ attr_reader :shipping_rate
975
+ end
976
+
977
+ class TaxIdCollection < Stripe::StripeObject
978
+ # Indicates whether tax ID collection is enabled for the session
979
+ attr_reader :enabled
980
+ # Indicates whether a tax ID is required on the payment page
981
+ attr_reader :required
982
+ end
983
+
984
+ class TotalDetails < Stripe::StripeObject
985
+ class Breakdown < Stripe::StripeObject
986
+ class Discount < Stripe::StripeObject
987
+ # The amount discounted.
988
+ attr_reader :amount
989
+ # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
990
+ # It contains information about when the discount began, when it will end, and what it is applied to.
991
+ #
992
+ # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
993
+ attr_reader :discount
994
+ end
995
+
996
+ class Tax < Stripe::StripeObject
997
+ # Amount of tax applied for this rate.
998
+ attr_reader :amount
999
+ # Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax.
1000
+ #
1001
+ # Related guide: [Tax rates](/billing/taxes/tax-rates)
1002
+ attr_reader :rate
1003
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
1004
+ attr_reader :taxability_reason
1005
+ # The amount on which tax is calculated, in cents (or local equivalent).
1006
+ attr_reader :taxable_amount
1007
+ end
1008
+ # The aggregated discounts.
1009
+ attr_reader :discounts
1010
+ # The aggregated tax amounts by rate.
1011
+ attr_reader :taxes
1012
+ end
1013
+ # This is the sum of all the discounts.
1014
+ attr_reader :amount_discount
1015
+ # This is the sum of all the shipping amounts.
1016
+ attr_reader :amount_shipping
1017
+ # This is the sum of all the tax amounts.
1018
+ attr_reader :amount_tax
1019
+ # Attribute for field breakdown
1020
+ attr_reader :breakdown
1021
+ end
1022
+
1023
+ class WalletOptions < Stripe::StripeObject
1024
+ class Link < Stripe::StripeObject
1025
+ # Describes whether Checkout should display Link. Defaults to `auto`.
1026
+ attr_reader :display
1027
+ end
1028
+ # Attribute for field link
1029
+ attr_reader :link
1030
+ end
1031
+
1032
+ class ListParams < Stripe::RequestParams
1033
+ class Created < Stripe::RequestParams
1034
+ # Minimum value to filter by (exclusive)
1035
+ attr_accessor :gt
1036
+ # Minimum value to filter by (inclusive)
1037
+ attr_accessor :gte
1038
+ # Maximum value to filter by (exclusive)
1039
+ attr_accessor :lt
1040
+ # Maximum value to filter by (inclusive)
1041
+ attr_accessor :lte
1042
+
1043
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
1044
+ @gt = gt
1045
+ @gte = gte
1046
+ @lt = lt
1047
+ @lte = lte
1048
+ end
1049
+ end
1050
+
1051
+ class CustomerDetails < Stripe::RequestParams
1052
+ # Customer's email address.
1053
+ attr_accessor :email
1054
+
1055
+ def initialize(email: nil)
1056
+ @email = email
1057
+ end
1058
+ end
1059
+ # Only return Checkout Sessions that were created during the given date interval.
1060
+ attr_accessor :created
1061
+ # Only return the Checkout Sessions for the Customer specified.
1062
+ attr_accessor :customer
1063
+ # Only return the Checkout Sessions for the Customer details specified.
1064
+ attr_accessor :customer_details
1065
+ # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
1066
+ attr_accessor :ending_before
1067
+ # Specifies which fields in the response should be expanded.
1068
+ attr_accessor :expand
1069
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
1070
+ attr_accessor :limit
1071
+ # Only return the Checkout Session for the PaymentIntent specified.
1072
+ attr_accessor :payment_intent
1073
+ # Only return the Checkout Sessions for the Payment Link specified.
1074
+ attr_accessor :payment_link
1075
+ # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
1076
+ attr_accessor :starting_after
1077
+ # Only return the Checkout Sessions matching the given status.
1078
+ attr_accessor :status
1079
+ # Only return the Checkout Session for the subscription specified.
1080
+ attr_accessor :subscription
1081
+
1082
+ def initialize(
1083
+ created: nil,
1084
+ customer: nil,
1085
+ customer_details: nil,
1086
+ ending_before: nil,
1087
+ expand: nil,
1088
+ limit: nil,
1089
+ payment_intent: nil,
1090
+ payment_link: nil,
1091
+ starting_after: nil,
1092
+ status: nil,
1093
+ subscription: nil
1094
+ )
1095
+ @created = created
1096
+ @customer = customer
1097
+ @customer_details = customer_details
1098
+ @ending_before = ending_before
1099
+ @expand = expand
1100
+ @limit = limit
1101
+ @payment_intent = payment_intent
1102
+ @payment_link = payment_link
1103
+ @starting_after = starting_after
1104
+ @status = status
1105
+ @subscription = subscription
1106
+ end
1107
+ end
1108
+
1109
+ class CreateParams < Stripe::RequestParams
1110
+ class AdaptivePricing < Stripe::RequestParams
1111
+ # Set to `true` to enable [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). Defaults to your [dashboard setting](https://dashboard.stripe.com/settings/adaptive-pricing).
1112
+ attr_accessor :enabled
1113
+
1114
+ def initialize(enabled: nil)
1115
+ @enabled = enabled
1116
+ end
1117
+ end
1118
+
1119
+ class AfterExpiration < Stripe::RequestParams
1120
+ class Recovery < Stripe::RequestParams
1121
+ # Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false`
1122
+ attr_accessor :allow_promotion_codes
1123
+ # If `true`, a recovery URL will be generated to recover this Checkout Session if it
1124
+ # expires before a successful transaction is completed. It will be attached to the
1125
+ # Checkout Session object upon expiration.
1126
+ attr_accessor :enabled
1127
+
1128
+ def initialize(allow_promotion_codes: nil, enabled: nil)
1129
+ @allow_promotion_codes = allow_promotion_codes
1130
+ @enabled = enabled
1131
+ end
1132
+ end
1133
+ # Configure a Checkout Session that can be used to recover an expired session.
1134
+ attr_accessor :recovery
1135
+
1136
+ def initialize(recovery: nil)
1137
+ @recovery = recovery
1138
+ end
1139
+ end
1140
+
1141
+ class AutomaticTax < Stripe::RequestParams
1142
+ class Liability < Stripe::RequestParams
1143
+ # The connected account being referenced when `type` is `account`.
1144
+ attr_accessor :account
1145
+ # Type of the account referenced in the request.
1146
+ attr_accessor :type
1147
+
1148
+ def initialize(account: nil, type: nil)
1149
+ @account = account
1150
+ @type = type
1151
+ end
1152
+ end
1153
+ # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location.
1154
+ #
1155
+ # Enabling this parameter causes Checkout to collect any billing address information necessary for tax calculation.
1156
+ attr_accessor :enabled
1157
+ # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
1158
+ attr_accessor :liability
1159
+
1160
+ def initialize(enabled: nil, liability: nil)
1161
+ @enabled = enabled
1162
+ @liability = liability
1163
+ end
1164
+ end
1165
+
1166
+ class ConsentCollection < Stripe::RequestParams
1167
+ class PaymentMethodReuseAgreement < Stripe::RequestParams
1168
+ # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's
1169
+ # defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
1170
+ attr_accessor :position
1171
+
1172
+ def initialize(position: nil)
1173
+ @position = position
1174
+ end
1175
+ end
1176
+ # Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method.
1177
+ attr_accessor :payment_method_reuse_agreement
1178
+ # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout
1179
+ # Session will determine whether to display an option to opt into promotional communication
1180
+ # from the merchant depending on the customer's locale. Only available to US merchants.
1181
+ attr_accessor :promotions
1182
+ # If set to `required`, it requires customers to check a terms of service checkbox before being able to pay.
1183
+ # There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public).
1184
+ attr_accessor :terms_of_service
1185
+
1186
+ def initialize(
1187
+ payment_method_reuse_agreement: nil,
1188
+ promotions: nil,
1189
+ terms_of_service: nil
1190
+ )
1191
+ @payment_method_reuse_agreement = payment_method_reuse_agreement
1192
+ @promotions = promotions
1193
+ @terms_of_service = terms_of_service
1194
+ end
1195
+ end
1196
+
1197
+ class CustomField < Stripe::RequestParams
1198
+ class Dropdown < Stripe::RequestParams
1199
+ class Option < Stripe::RequestParams
1200
+ # The label for the option, displayed to the customer. Up to 100 characters.
1201
+ attr_accessor :label
1202
+ # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters.
1203
+ attr_accessor :value
1204
+
1205
+ def initialize(label: nil, value: nil)
1206
+ @label = label
1207
+ @value = value
1208
+ end
1209
+ end
1210
+ # The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array.
1211
+ attr_accessor :default_value
1212
+ # The options available for the customer to select. Up to 200 options allowed.
1213
+ attr_accessor :options
1214
+
1215
+ def initialize(default_value: nil, options: nil)
1216
+ @default_value = default_value
1217
+ @options = options
1218
+ end
1219
+ end
1220
+
1221
+ class Label < Stripe::RequestParams
1222
+ # Custom text for the label, displayed to the customer. Up to 50 characters.
1223
+ attr_accessor :custom
1224
+ # The type of the label.
1225
+ attr_accessor :type
1226
+
1227
+ def initialize(custom: nil, type: nil)
1228
+ @custom = custom
1229
+ @type = type
1230
+ end
1231
+ end
1232
+
1233
+ class Numeric < Stripe::RequestParams
1234
+ # The value that will pre-fill the field on the payment page.
1235
+ attr_accessor :default_value
1236
+ # The maximum character length constraint for the customer's input.
1237
+ attr_accessor :maximum_length
1238
+ # The minimum character length requirement for the customer's input.
1239
+ attr_accessor :minimum_length
1240
+
1241
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil)
1242
+ @default_value = default_value
1243
+ @maximum_length = maximum_length
1244
+ @minimum_length = minimum_length
1245
+ end
1246
+ end
1247
+
1248
+ class Text < Stripe::RequestParams
1249
+ # The value that will pre-fill the field on the payment page.
1250
+ attr_accessor :default_value
1251
+ # The maximum character length constraint for the customer's input.
1252
+ attr_accessor :maximum_length
1253
+ # The minimum character length requirement for the customer's input.
1254
+ attr_accessor :minimum_length
1255
+
1256
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil)
1257
+ @default_value = default_value
1258
+ @maximum_length = maximum_length
1259
+ @minimum_length = minimum_length
1260
+ end
1261
+ end
1262
+ # Configuration for `type=dropdown` fields.
1263
+ attr_accessor :dropdown
1264
+ # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters.
1265
+ attr_accessor :key
1266
+ # The label for the field, displayed to the customer.
1267
+ attr_accessor :label
1268
+ # Configuration for `type=numeric` fields.
1269
+ attr_accessor :numeric
1270
+ # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
1271
+ attr_accessor :optional
1272
+ # Configuration for `type=text` fields.
1273
+ attr_accessor :text
1274
+ # The type of the field.
1275
+ attr_accessor :type
1276
+
1277
+ def initialize(
1278
+ dropdown: nil,
1279
+ key: nil,
1280
+ label: nil,
1281
+ numeric: nil,
1282
+ optional: nil,
1283
+ text: nil,
1284
+ type: nil
1285
+ )
1286
+ @dropdown = dropdown
1287
+ @key = key
1288
+ @label = label
1289
+ @numeric = numeric
1290
+ @optional = optional
1291
+ @text = text
1292
+ @type = type
1293
+ end
1294
+ end
1295
+
1296
+ class CustomText < Stripe::RequestParams
1297
+ class AfterSubmit < Stripe::RequestParams
1298
+ # Text may be up to 1200 characters in length.
1299
+ attr_accessor :message
1300
+
1301
+ def initialize(message: nil)
1302
+ @message = message
1303
+ end
1304
+ end
1305
+
1306
+ class ShippingAddress < Stripe::RequestParams
1307
+ # Text may be up to 1200 characters in length.
1308
+ attr_accessor :message
1309
+
1310
+ def initialize(message: nil)
1311
+ @message = message
1312
+ end
1313
+ end
1314
+
1315
+ class Submit < Stripe::RequestParams
1316
+ # Text may be up to 1200 characters in length.
1317
+ attr_accessor :message
1318
+
1319
+ def initialize(message: nil)
1320
+ @message = message
1321
+ end
1322
+ end
1323
+
1324
+ class TermsOfServiceAcceptance < Stripe::RequestParams
1325
+ # Text may be up to 1200 characters in length.
1326
+ attr_accessor :message
1327
+
1328
+ def initialize(message: nil)
1329
+ @message = message
1330
+ end
1331
+ end
1332
+ # Custom text that should be displayed after the payment confirmation button.
1333
+ attr_accessor :after_submit
1334
+ # Custom text that should be displayed alongside shipping address collection.
1335
+ attr_accessor :shipping_address
1336
+ # Custom text that should be displayed alongside the payment confirmation button.
1337
+ attr_accessor :submit
1338
+ # Custom text that should be displayed in place of the default terms of service agreement text.
1339
+ attr_accessor :terms_of_service_acceptance
1340
+
1341
+ def initialize(
1342
+ after_submit: nil,
1343
+ shipping_address: nil,
1344
+ submit: nil,
1345
+ terms_of_service_acceptance: nil
1346
+ )
1347
+ @after_submit = after_submit
1348
+ @shipping_address = shipping_address
1349
+ @submit = submit
1350
+ @terms_of_service_acceptance = terms_of_service_acceptance
1351
+ end
1352
+ end
1353
+
1354
+ class CustomerUpdate < Stripe::RequestParams
1355
+ # Describes whether Checkout saves the billing address onto `customer.address`.
1356
+ # To always collect a full billing address, use `billing_address_collection`. Defaults to `never`.
1357
+ attr_accessor :address
1358
+ # Describes whether Checkout saves the name onto `customer.name`. Defaults to `never`.
1359
+ attr_accessor :name
1360
+ # Describes whether Checkout saves shipping information onto `customer.shipping`.
1361
+ # To collect shipping information, use `shipping_address_collection`. Defaults to `never`.
1362
+ attr_accessor :shipping
1363
+
1364
+ def initialize(address: nil, name: nil, shipping: nil)
1365
+ @address = address
1366
+ @name = name
1367
+ @shipping = shipping
1368
+ end
1369
+ end
1370
+
1371
+ class Discount < Stripe::RequestParams
1372
+ # The ID of the coupon to apply to this Session.
1373
+ attr_accessor :coupon
1374
+ # The ID of a promotion code to apply to this Session.
1375
+ attr_accessor :promotion_code
1376
+
1377
+ def initialize(coupon: nil, promotion_code: nil)
1378
+ @coupon = coupon
1379
+ @promotion_code = promotion_code
1380
+ end
1381
+ end
1382
+
1383
+ class InvoiceCreation < Stripe::RequestParams
1384
+ class InvoiceData < Stripe::RequestParams
1385
+ class CustomField < Stripe::RequestParams
1386
+ # The name of the custom field. This may be up to 40 characters.
1387
+ attr_accessor :name
1388
+ # The value of the custom field. This may be up to 140 characters.
1389
+ attr_accessor :value
1390
+
1391
+ def initialize(name: nil, value: nil)
1392
+ @name = name
1393
+ @value = value
1394
+ end
1395
+ end
1396
+
1397
+ class Issuer < Stripe::RequestParams
1398
+ # The connected account being referenced when `type` is `account`.
1399
+ attr_accessor :account
1400
+ # Type of the account referenced in the request.
1401
+ attr_accessor :type
1402
+
1403
+ def initialize(account: nil, type: nil)
1404
+ @account = account
1405
+ @type = type
1406
+ end
1407
+ end
1408
+
1409
+ class RenderingOptions < Stripe::RequestParams
1410
+ # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
1411
+ attr_accessor :amount_tax_display
1412
+
1413
+ def initialize(amount_tax_display: nil)
1414
+ @amount_tax_display = amount_tax_display
1415
+ end
1416
+ end
1417
+ # The account tax IDs associated with the invoice.
1418
+ attr_accessor :account_tax_ids
1419
+ # Default custom fields to be displayed on invoices for this customer.
1420
+ attr_accessor :custom_fields
1421
+ # An arbitrary string attached to the object. Often useful for displaying to users.
1422
+ attr_accessor :description
1423
+ # Default footer to be displayed on invoices for this customer.
1424
+ attr_accessor :footer
1425
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1426
+ attr_accessor :issuer
1427
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
1428
+ attr_accessor :metadata
1429
+ # Default options for invoice PDF rendering for this customer.
1430
+ attr_accessor :rendering_options
1431
+
1432
+ def initialize(
1433
+ account_tax_ids: nil,
1434
+ custom_fields: nil,
1435
+ description: nil,
1436
+ footer: nil,
1437
+ issuer: nil,
1438
+ metadata: nil,
1439
+ rendering_options: nil
1440
+ )
1441
+ @account_tax_ids = account_tax_ids
1442
+ @custom_fields = custom_fields
1443
+ @description = description
1444
+ @footer = footer
1445
+ @issuer = issuer
1446
+ @metadata = metadata
1447
+ @rendering_options = rendering_options
1448
+ end
1449
+ end
1450
+ # Set to `true` to enable invoice creation.
1451
+ attr_accessor :enabled
1452
+ # Parameters passed when creating invoices for payment-mode Checkout Sessions.
1453
+ attr_accessor :invoice_data
1454
+
1455
+ def initialize(enabled: nil, invoice_data: nil)
1456
+ @enabled = enabled
1457
+ @invoice_data = invoice_data
1458
+ end
1459
+ end
1460
+
1461
+ class LineItem < Stripe::RequestParams
1462
+ class AdjustableQuantity < Stripe::RequestParams
1463
+ # Set to true if the quantity can be adjusted to any non-negative integer.
1464
+ attr_accessor :enabled
1465
+ # The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999999.
1466
+ attr_accessor :maximum
1467
+ # The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0.
1468
+ attr_accessor :minimum
1469
+
1470
+ def initialize(enabled: nil, maximum: nil, minimum: nil)
1471
+ @enabled = enabled
1472
+ @maximum = maximum
1473
+ @minimum = minimum
1474
+ end
1475
+ end
1476
+
1477
+ class PriceData < Stripe::RequestParams
1478
+ class ProductData < Stripe::RequestParams
1479
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
1480
+ attr_accessor :description
1481
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
1482
+ attr_accessor :images
1483
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
1484
+ attr_accessor :metadata
1485
+ # The product's name, meant to be displayable to the customer.
1486
+ attr_accessor :name
1487
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
1488
+ attr_accessor :tax_code
1489
+
1490
+ def initialize(description: nil, images: nil, metadata: nil, name: nil, tax_code: nil)
1491
+ @description = description
1492
+ @images = images
1493
+ @metadata = metadata
1494
+ @name = name
1495
+ @tax_code = tax_code
1496
+ end
1497
+ end
1498
+
1499
+ class Recurring < Stripe::RequestParams
1500
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
1501
+ attr_accessor :interval
1502
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
1503
+ attr_accessor :interval_count
1504
+
1505
+ def initialize(interval: nil, interval_count: nil)
1506
+ @interval = interval
1507
+ @interval_count = interval_count
1508
+ end
1509
+ end
1510
+ # 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).
1511
+ attr_accessor :currency
1512
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
1513
+ attr_accessor :product
1514
+ # Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
1515
+ attr_accessor :product_data
1516
+ # The recurring components of a price such as `interval` and `interval_count`.
1517
+ attr_accessor :recurring
1518
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
1519
+ attr_accessor :tax_behavior
1520
+ # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
1521
+ attr_accessor :unit_amount
1522
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
1523
+ attr_accessor :unit_amount_decimal
1524
+
1525
+ def initialize(
1526
+ currency: nil,
1527
+ product: nil,
1528
+ product_data: nil,
1529
+ recurring: nil,
1530
+ tax_behavior: nil,
1531
+ unit_amount: nil,
1532
+ unit_amount_decimal: nil
1533
+ )
1534
+ @currency = currency
1535
+ @product = product
1536
+ @product_data = product_data
1537
+ @recurring = recurring
1538
+ @tax_behavior = tax_behavior
1539
+ @unit_amount = unit_amount
1540
+ @unit_amount_decimal = unit_amount_decimal
1541
+ end
1542
+ end
1543
+ # When set, provides configuration for this item’s quantity to be adjusted by the customer during Checkout.
1544
+ attr_accessor :adjustable_quantity
1545
+ # The [tax rates](https://stripe.com/docs/api/tax_rates) that will be applied to this line item depending on the customer's billing/shipping address. We currently support the following countries: US, GB, AU, and all countries in the EU.
1546
+ attr_accessor :dynamic_tax_rates
1547
+ # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. One of `price` or `price_data` is required.
1548
+ attr_accessor :price
1549
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
1550
+ attr_accessor :price_data
1551
+ # The quantity of the line item being purchased. Quantity should not be defined when `recurring.usage_type=metered`.
1552
+ attr_accessor :quantity
1553
+ # The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item.
1554
+ attr_accessor :tax_rates
1555
+
1556
+ def initialize(
1557
+ adjustable_quantity: nil,
1558
+ dynamic_tax_rates: nil,
1559
+ price: nil,
1560
+ price_data: nil,
1561
+ quantity: nil,
1562
+ tax_rates: nil
1563
+ )
1564
+ @adjustable_quantity = adjustable_quantity
1565
+ @dynamic_tax_rates = dynamic_tax_rates
1566
+ @price = price
1567
+ @price_data = price_data
1568
+ @quantity = quantity
1569
+ @tax_rates = tax_rates
1570
+ end
1571
+ end
1572
+
1573
+ class OptionalItem < Stripe::RequestParams
1574
+ class AdjustableQuantity < Stripe::RequestParams
1575
+ # Set to true if the quantity can be adjusted to any non-negative integer.
1576
+ attr_accessor :enabled
1577
+ # The maximum quantity of this item the customer can purchase. By default this value is 99. You can specify a value up to 999999.
1578
+ attr_accessor :maximum
1579
+ # The minimum quantity of this item the customer must purchase, if they choose to purchase it. Because this item is optional, the customer will always be able to remove it from their order, even if the `minimum` configured here is greater than 0. By default this value is 0.
1580
+ attr_accessor :minimum
1581
+
1582
+ def initialize(enabled: nil, maximum: nil, minimum: nil)
1583
+ @enabled = enabled
1584
+ @maximum = maximum
1585
+ @minimum = minimum
1586
+ end
1587
+ end
1588
+ # When set, provides configuration for the customer to adjust the quantity of the line item created when a customer chooses to add this optional item to their order.
1589
+ attr_accessor :adjustable_quantity
1590
+ # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object.
1591
+ attr_accessor :price
1592
+ # The initial quantity of the line item created when a customer chooses to add this optional item to their order.
1593
+ attr_accessor :quantity
1594
+
1595
+ def initialize(adjustable_quantity: nil, price: nil, quantity: nil)
1596
+ @adjustable_quantity = adjustable_quantity
1597
+ @price = price
1598
+ @quantity = quantity
1599
+ end
1600
+ end
1601
+
1602
+ class PaymentIntentData < Stripe::RequestParams
1603
+ class Shipping < Stripe::RequestParams
1604
+ class Address < Stripe::RequestParams
1605
+ # City, district, suburb, town, or village.
1606
+ attr_accessor :city
1607
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
1608
+ attr_accessor :country
1609
+ # Address line 1 (e.g., street, PO Box, or company name).
1610
+ attr_accessor :line1
1611
+ # Address line 2 (e.g., apartment, suite, unit, or building).
1612
+ attr_accessor :line2
1613
+ # ZIP or postal code.
1614
+ attr_accessor :postal_code
1615
+ # State, county, province, or region.
1616
+ attr_accessor :state
1617
+
1618
+ def initialize(
1619
+ city: nil,
1620
+ country: nil,
1621
+ line1: nil,
1622
+ line2: nil,
1623
+ postal_code: nil,
1624
+ state: nil
1625
+ )
1626
+ @city = city
1627
+ @country = country
1628
+ @line1 = line1
1629
+ @line2 = line2
1630
+ @postal_code = postal_code
1631
+ @state = state
1632
+ end
1633
+ end
1634
+ # Shipping address.
1635
+ attr_accessor :address
1636
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
1637
+ attr_accessor :carrier
1638
+ # Recipient name.
1639
+ attr_accessor :name
1640
+ # Recipient phone (including extension).
1641
+ attr_accessor :phone
1642
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
1643
+ attr_accessor :tracking_number
1644
+
1645
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil)
1646
+ @address = address
1647
+ @carrier = carrier
1648
+ @name = name
1649
+ @phone = phone
1650
+ @tracking_number = tracking_number
1651
+ end
1652
+ end
1653
+
1654
+ class TransferData < Stripe::RequestParams
1655
+ # The amount that will be transferred automatically when a charge succeeds.
1656
+ attr_accessor :amount
1657
+ # If specified, successful charges will be attributed to the destination
1658
+ # account for tax reporting, and the funds from charges will be transferred
1659
+ # to the destination account. The ID of the resulting transfer will be
1660
+ # returned on the successful charge's `transfer` field.
1661
+ attr_accessor :destination
1662
+
1663
+ def initialize(amount: nil, destination: nil)
1664
+ @amount = amount
1665
+ @destination = destination
1666
+ end
1667
+ end
1668
+ # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
1669
+ attr_accessor :application_fee_amount
1670
+ # Controls when the funds will be captured from the customer's account.
1671
+ attr_accessor :capture_method
1672
+ # An arbitrary string attached to the object. Often useful for displaying to users.
1673
+ attr_accessor :description
1674
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
1675
+ attr_accessor :metadata
1676
+ # The Stripe account ID for which these funds are intended. For details,
1677
+ # see the PaymentIntents [use case for connected
1678
+ # accounts](/docs/payments/connected-accounts).
1679
+ attr_accessor :on_behalf_of
1680
+ # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
1681
+ attr_accessor :receipt_email
1682
+ # Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment
1683
+ # method collected by this Checkout Session.
1684
+ #
1685
+ # When setting this to `on_session`, Checkout will show a notice to the
1686
+ # customer that their payment details will be saved.
1687
+ #
1688
+ # When setting this to `off_session`, Checkout will show a notice to the
1689
+ # customer that their payment details will be saved and used for future
1690
+ # payments.
1691
+ #
1692
+ # If a Customer has been provided or Checkout creates a new Customer,
1693
+ # Checkout will attach the payment method to the Customer.
1694
+ #
1695
+ # If Checkout does not create a Customer, the payment method is not attached
1696
+ # to a Customer. To reuse the payment method, you can retrieve it from the
1697
+ # Checkout Session's PaymentIntent.
1698
+ #
1699
+ # When processing card payments, Checkout also uses `setup_future_usage`
1700
+ # to dynamically optimize your payment flow and comply with regional
1701
+ # legislation and network rules, such as SCA.
1702
+ attr_accessor :setup_future_usage
1703
+ # Shipping information for this payment.
1704
+ attr_accessor :shipping
1705
+ # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors).
1706
+ #
1707
+ # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead.
1708
+ attr_accessor :statement_descriptor
1709
+ # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement.
1710
+ attr_accessor :statement_descriptor_suffix
1711
+ # The parameters used to automatically create a Transfer when the payment succeeds.
1712
+ # For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
1713
+ attr_accessor :transfer_data
1714
+ # A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details.
1715
+ attr_accessor :transfer_group
1716
+
1717
+ def initialize(
1718
+ application_fee_amount: nil,
1719
+ capture_method: nil,
1720
+ description: nil,
1721
+ metadata: nil,
1722
+ on_behalf_of: nil,
1723
+ receipt_email: nil,
1724
+ setup_future_usage: nil,
1725
+ shipping: nil,
1726
+ statement_descriptor: nil,
1727
+ statement_descriptor_suffix: nil,
1728
+ transfer_data: nil,
1729
+ transfer_group: nil
1730
+ )
1731
+ @application_fee_amount = application_fee_amount
1732
+ @capture_method = capture_method
1733
+ @description = description
1734
+ @metadata = metadata
1735
+ @on_behalf_of = on_behalf_of
1736
+ @receipt_email = receipt_email
1737
+ @setup_future_usage = setup_future_usage
1738
+ @shipping = shipping
1739
+ @statement_descriptor = statement_descriptor
1740
+ @statement_descriptor_suffix = statement_descriptor_suffix
1741
+ @transfer_data = transfer_data
1742
+ @transfer_group = transfer_group
1743
+ end
1744
+ end
1745
+
1746
+ class PaymentMethodData < Stripe::RequestParams
1747
+ # Allow redisplay will be set on the payment method on confirmation and indicates whether this payment method can be shown again to the customer in a checkout flow. Only set this field if you wish to override the allow_redisplay value determined by Checkout.
1748
+ attr_accessor :allow_redisplay
1749
+
1750
+ def initialize(allow_redisplay: nil)
1751
+ @allow_redisplay = allow_redisplay
1752
+ end
1753
+ end
1754
+
1755
+ class PaymentMethodOptions < Stripe::RequestParams
1756
+ class AcssDebit < Stripe::RequestParams
1757
+ class MandateOptions < Stripe::RequestParams
1758
+ # A URL for custom mandate text to render during confirmation step.
1759
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
1760
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
1761
+ attr_accessor :custom_mandate_url
1762
+ # List of Stripe products where this mandate can be selected automatically. Only usable in `setup` mode.
1763
+ attr_accessor :default_for
1764
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
1765
+ attr_accessor :interval_description
1766
+ # Payment schedule for the mandate.
1767
+ attr_accessor :payment_schedule
1768
+ # Transaction type of the mandate.
1769
+ attr_accessor :transaction_type
1770
+
1771
+ def initialize(
1772
+ custom_mandate_url: nil,
1773
+ default_for: nil,
1774
+ interval_description: nil,
1775
+ payment_schedule: nil,
1776
+ transaction_type: nil
1777
+ )
1778
+ @custom_mandate_url = custom_mandate_url
1779
+ @default_for = default_for
1780
+ @interval_description = interval_description
1781
+ @payment_schedule = payment_schedule
1782
+ @transaction_type = transaction_type
1783
+ end
1784
+ end
1785
+ # 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). This is only accepted for Checkout Sessions in `setup` mode.
1786
+ attr_accessor :currency
1787
+ # Additional fields for Mandate creation
1788
+ attr_accessor :mandate_options
1789
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1790
+ #
1791
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1792
+ #
1793
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1794
+ #
1795
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
1796
+ attr_accessor :setup_future_usage
1797
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
1798
+ attr_accessor :target_date
1799
+ # Verification method for the intent
1800
+ attr_accessor :verification_method
1801
+
1802
+ def initialize(
1803
+ currency: nil,
1804
+ mandate_options: nil,
1805
+ setup_future_usage: nil,
1806
+ target_date: nil,
1807
+ verification_method: nil
1808
+ )
1809
+ @currency = currency
1810
+ @mandate_options = mandate_options
1811
+ @setup_future_usage = setup_future_usage
1812
+ @target_date = target_date
1813
+ @verification_method = verification_method
1814
+ end
1815
+ end
1816
+
1817
+ class Affirm < Stripe::RequestParams
1818
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1819
+ #
1820
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1821
+ #
1822
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1823
+ #
1824
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
1825
+ attr_accessor :setup_future_usage
1826
+
1827
+ def initialize(setup_future_usage: nil)
1828
+ @setup_future_usage = setup_future_usage
1829
+ end
1830
+ end
1831
+
1832
+ class AfterpayClearpay < Stripe::RequestParams
1833
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1834
+ #
1835
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1836
+ #
1837
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1838
+ #
1839
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
1840
+ attr_accessor :setup_future_usage
1841
+
1842
+ def initialize(setup_future_usage: nil)
1843
+ @setup_future_usage = setup_future_usage
1844
+ end
1845
+ end
1846
+
1847
+ class Alipay < Stripe::RequestParams
1848
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1849
+ #
1850
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1851
+ #
1852
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1853
+ #
1854
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
1855
+ attr_accessor :setup_future_usage
1856
+
1857
+ def initialize(setup_future_usage: nil)
1858
+ @setup_future_usage = setup_future_usage
1859
+ end
1860
+ end
1861
+
1862
+ class AmazonPay < Stripe::RequestParams
1863
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1864
+ #
1865
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1866
+ #
1867
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1868
+ #
1869
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
1870
+ attr_accessor :setup_future_usage
1871
+
1872
+ def initialize(setup_future_usage: nil)
1873
+ @setup_future_usage = setup_future_usage
1874
+ end
1875
+ end
1876
+
1877
+ class AuBecsDebit < Stripe::RequestParams
1878
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1879
+ #
1880
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1881
+ #
1882
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1883
+ #
1884
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
1885
+ attr_accessor :setup_future_usage
1886
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
1887
+ attr_accessor :target_date
1888
+
1889
+ def initialize(setup_future_usage: nil, target_date: nil)
1890
+ @setup_future_usage = setup_future_usage
1891
+ @target_date = target_date
1892
+ end
1893
+ end
1894
+
1895
+ class BacsDebit < Stripe::RequestParams
1896
+ class MandateOptions < Stripe::RequestParams
1897
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
1898
+ attr_accessor :reference_prefix
1899
+
1900
+ def initialize(reference_prefix: nil)
1901
+ @reference_prefix = reference_prefix
1902
+ end
1903
+ end
1904
+ # Additional fields for Mandate creation
1905
+ attr_accessor :mandate_options
1906
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1907
+ #
1908
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1909
+ #
1910
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1911
+ #
1912
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
1913
+ attr_accessor :setup_future_usage
1914
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
1915
+ attr_accessor :target_date
1916
+
1917
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil)
1918
+ @mandate_options = mandate_options
1919
+ @setup_future_usage = setup_future_usage
1920
+ @target_date = target_date
1921
+ end
1922
+ end
1923
+
1924
+ class Bancontact < Stripe::RequestParams
1925
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1926
+ #
1927
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1928
+ #
1929
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1930
+ #
1931
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
1932
+ attr_accessor :setup_future_usage
1933
+
1934
+ def initialize(setup_future_usage: nil)
1935
+ @setup_future_usage = setup_future_usage
1936
+ end
1937
+ end
1938
+
1939
+ class Boleto < Stripe::RequestParams
1940
+ # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time.
1941
+ attr_accessor :expires_after_days
1942
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1943
+ #
1944
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1945
+ #
1946
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1947
+ #
1948
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
1949
+ attr_accessor :setup_future_usage
1950
+
1951
+ def initialize(expires_after_days: nil, setup_future_usage: nil)
1952
+ @expires_after_days = expires_after_days
1953
+ @setup_future_usage = setup_future_usage
1954
+ end
1955
+ end
1956
+
1957
+ class Card < Stripe::RequestParams
1958
+ class Installments < Stripe::RequestParams
1959
+ # Setting to true enables installments for this Checkout Session.
1960
+ # Setting to false will prevent any installment plan from applying to a payment.
1961
+ attr_accessor :enabled
1962
+
1963
+ def initialize(enabled: nil)
1964
+ @enabled = enabled
1965
+ end
1966
+ end
1967
+
1968
+ class Restrictions < Stripe::RequestParams
1969
+ # Specify the card brands to block in the Checkout Session. If a customer enters or selects a card belonging to a blocked brand, they can't complete the Session.
1970
+ attr_accessor :brands_blocked
1971
+
1972
+ def initialize(brands_blocked: nil)
1973
+ @brands_blocked = brands_blocked
1974
+ end
1975
+ end
1976
+ # Installment options for card payments
1977
+ attr_accessor :installments
1978
+ # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession.
1979
+ attr_accessor :request_extended_authorization
1980
+ # Request ability to [increment the authorization](/payments/incremental-authorization) for this CheckoutSession.
1981
+ attr_accessor :request_incremental_authorization
1982
+ # Request ability to make [multiple captures](/payments/multicapture) for this CheckoutSession.
1983
+ attr_accessor :request_multicapture
1984
+ # Request ability to [overcapture](/payments/overcapture) for this CheckoutSession.
1985
+ attr_accessor :request_overcapture
1986
+ # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
1987
+ attr_accessor :request_three_d_secure
1988
+ # Restrictions to apply to the card payment method. For example, you can block specific card brands.
1989
+ attr_accessor :restrictions
1990
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1991
+ #
1992
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1993
+ #
1994
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1995
+ #
1996
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
1997
+ attr_accessor :setup_future_usage
1998
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
1999
+ attr_accessor :statement_descriptor_suffix_kana
2000
+ # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
2001
+ attr_accessor :statement_descriptor_suffix_kanji
2002
+
2003
+ def initialize(
2004
+ installments: nil,
2005
+ request_extended_authorization: nil,
2006
+ request_incremental_authorization: nil,
2007
+ request_multicapture: nil,
2008
+ request_overcapture: nil,
2009
+ request_three_d_secure: nil,
2010
+ restrictions: nil,
2011
+ setup_future_usage: nil,
2012
+ statement_descriptor_suffix_kana: nil,
2013
+ statement_descriptor_suffix_kanji: nil
2014
+ )
2015
+ @installments = installments
2016
+ @request_extended_authorization = request_extended_authorization
2017
+ @request_incremental_authorization = request_incremental_authorization
2018
+ @request_multicapture = request_multicapture
2019
+ @request_overcapture = request_overcapture
2020
+ @request_three_d_secure = request_three_d_secure
2021
+ @restrictions = restrictions
2022
+ @setup_future_usage = setup_future_usage
2023
+ @statement_descriptor_suffix_kana = statement_descriptor_suffix_kana
2024
+ @statement_descriptor_suffix_kanji = statement_descriptor_suffix_kanji
2025
+ end
2026
+ end
2027
+
2028
+ class Cashapp < Stripe::RequestParams
2029
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2030
+ #
2031
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2032
+ #
2033
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2034
+ #
2035
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2036
+ attr_accessor :setup_future_usage
2037
+
2038
+ def initialize(setup_future_usage: nil)
2039
+ @setup_future_usage = setup_future_usage
2040
+ end
2041
+ end
2042
+
2043
+ class CustomerBalance < Stripe::RequestParams
2044
+ class BankTransfer < Stripe::RequestParams
2045
+ class EuBankTransfer < Stripe::RequestParams
2046
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
2047
+ attr_accessor :country
2048
+
2049
+ def initialize(country: nil)
2050
+ @country = country
2051
+ end
2052
+ end
2053
+ # Configuration for eu_bank_transfer funding type.
2054
+ attr_accessor :eu_bank_transfer
2055
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
2056
+ #
2057
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
2058
+ attr_accessor :requested_address_types
2059
+ # The list of bank transfer types that this PaymentIntent is allowed to use for funding.
2060
+ attr_accessor :type
2061
+
2062
+ def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil)
2063
+ @eu_bank_transfer = eu_bank_transfer
2064
+ @requested_address_types = requested_address_types
2065
+ @type = type
2066
+ end
2067
+ end
2068
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
2069
+ attr_accessor :bank_transfer
2070
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
2071
+ attr_accessor :funding_type
2072
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2073
+ #
2074
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2075
+ #
2076
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2077
+ #
2078
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2079
+ attr_accessor :setup_future_usage
2080
+
2081
+ def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil)
2082
+ @bank_transfer = bank_transfer
2083
+ @funding_type = funding_type
2084
+ @setup_future_usage = setup_future_usage
2085
+ end
2086
+ end
2087
+
2088
+ class Eps < Stripe::RequestParams
2089
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2090
+ #
2091
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2092
+ #
2093
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2094
+ #
2095
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2096
+ attr_accessor :setup_future_usage
2097
+
2098
+ def initialize(setup_future_usage: nil)
2099
+ @setup_future_usage = setup_future_usage
2100
+ end
2101
+ end
2102
+
2103
+ class Fpx < Stripe::RequestParams
2104
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2105
+ #
2106
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2107
+ #
2108
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2109
+ #
2110
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2111
+ attr_accessor :setup_future_usage
2112
+
2113
+ def initialize(setup_future_usage: nil)
2114
+ @setup_future_usage = setup_future_usage
2115
+ end
2116
+ end
2117
+
2118
+ class Giropay < Stripe::RequestParams
2119
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2120
+ #
2121
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2122
+ #
2123
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2124
+ #
2125
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2126
+ attr_accessor :setup_future_usage
2127
+
2128
+ def initialize(setup_future_usage: nil)
2129
+ @setup_future_usage = setup_future_usage
2130
+ end
2131
+ end
2132
+
2133
+ class Grabpay < Stripe::RequestParams
2134
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2135
+ #
2136
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2137
+ #
2138
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2139
+ #
2140
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2141
+ attr_accessor :setup_future_usage
2142
+
2143
+ def initialize(setup_future_usage: nil)
2144
+ @setup_future_usage = setup_future_usage
2145
+ end
2146
+ end
2147
+
2148
+ class Ideal < Stripe::RequestParams
2149
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2150
+ #
2151
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2152
+ #
2153
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2154
+ #
2155
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2156
+ attr_accessor :setup_future_usage
2157
+
2158
+ def initialize(setup_future_usage: nil)
2159
+ @setup_future_usage = setup_future_usage
2160
+ end
2161
+ end
2162
+
2163
+ class KakaoPay < Stripe::RequestParams
2164
+ # Controls when the funds will be captured from the customer's account.
2165
+ attr_accessor :capture_method
2166
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2167
+ #
2168
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2169
+ #
2170
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2171
+ #
2172
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2173
+ attr_accessor :setup_future_usage
2174
+
2175
+ def initialize(capture_method: nil, setup_future_usage: nil)
2176
+ @capture_method = capture_method
2177
+ @setup_future_usage = setup_future_usage
2178
+ end
2179
+ end
2180
+
2181
+ class Klarna < Stripe::RequestParams
2182
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2183
+ #
2184
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2185
+ #
2186
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2187
+ #
2188
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2189
+ attr_accessor :setup_future_usage
2190
+
2191
+ def initialize(setup_future_usage: nil)
2192
+ @setup_future_usage = setup_future_usage
2193
+ end
2194
+ end
2195
+
2196
+ class Konbini < Stripe::RequestParams
2197
+ # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days.
2198
+ attr_accessor :expires_after_days
2199
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2200
+ #
2201
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2202
+ #
2203
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2204
+ #
2205
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2206
+ attr_accessor :setup_future_usage
2207
+
2208
+ def initialize(expires_after_days: nil, setup_future_usage: nil)
2209
+ @expires_after_days = expires_after_days
2210
+ @setup_future_usage = setup_future_usage
2211
+ end
2212
+ end
2213
+
2214
+ class KrCard < Stripe::RequestParams
2215
+ # Controls when the funds will be captured from the customer's account.
2216
+ attr_accessor :capture_method
2217
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2218
+ #
2219
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2220
+ #
2221
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2222
+ #
2223
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2224
+ attr_accessor :setup_future_usage
2225
+
2226
+ def initialize(capture_method: nil, setup_future_usage: nil)
2227
+ @capture_method = capture_method
2228
+ @setup_future_usage = setup_future_usage
2229
+ end
2230
+ end
2231
+
2232
+ class Link < Stripe::RequestParams
2233
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2234
+ #
2235
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2236
+ #
2237
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2238
+ #
2239
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2240
+ attr_accessor :setup_future_usage
2241
+
2242
+ def initialize(setup_future_usage: nil)
2243
+ @setup_future_usage = setup_future_usage
2244
+ end
2245
+ end
2246
+
2247
+ class Mobilepay < Stripe::RequestParams
2248
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2249
+ #
2250
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2251
+ #
2252
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2253
+ #
2254
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2255
+ attr_accessor :setup_future_usage
2256
+
2257
+ def initialize(setup_future_usage: nil)
2258
+ @setup_future_usage = setup_future_usage
2259
+ end
2260
+ end
2261
+
2262
+ class Multibanco < Stripe::RequestParams
2263
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2264
+ #
2265
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2266
+ #
2267
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2268
+ #
2269
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2270
+ attr_accessor :setup_future_usage
2271
+
2272
+ def initialize(setup_future_usage: nil)
2273
+ @setup_future_usage = setup_future_usage
2274
+ end
2275
+ end
2276
+
2277
+ class NaverPay < Stripe::RequestParams
2278
+ # Controls when the funds will be captured from the customer's account.
2279
+ attr_accessor :capture_method
2280
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2281
+ #
2282
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2283
+ #
2284
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2285
+ #
2286
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2287
+ attr_accessor :setup_future_usage
2288
+
2289
+ def initialize(capture_method: nil, setup_future_usage: nil)
2290
+ @capture_method = capture_method
2291
+ @setup_future_usage = setup_future_usage
2292
+ end
2293
+ end
2294
+
2295
+ class Oxxo < Stripe::RequestParams
2296
+ # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
2297
+ attr_accessor :expires_after_days
2298
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2299
+ #
2300
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2301
+ #
2302
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2303
+ #
2304
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2305
+ attr_accessor :setup_future_usage
2306
+
2307
+ def initialize(expires_after_days: nil, setup_future_usage: nil)
2308
+ @expires_after_days = expires_after_days
2309
+ @setup_future_usage = setup_future_usage
2310
+ end
2311
+ end
2312
+
2313
+ class P24 < Stripe::RequestParams
2314
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2315
+ #
2316
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2317
+ #
2318
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2319
+ #
2320
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2321
+ attr_accessor :setup_future_usage
2322
+ # Confirm that the payer has accepted the P24 terms and conditions.
2323
+ attr_accessor :tos_shown_and_accepted
2324
+
2325
+ def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil)
2326
+ @setup_future_usage = setup_future_usage
2327
+ @tos_shown_and_accepted = tos_shown_and_accepted
2328
+ end
2329
+ end
2330
+
2331
+ class PayByBank < Stripe::RequestParams; end
2332
+
2333
+ class Payco < Stripe::RequestParams
2334
+ # Controls when the funds will be captured from the customer's account.
2335
+ attr_accessor :capture_method
2336
+
2337
+ def initialize(capture_method: nil)
2338
+ @capture_method = capture_method
2339
+ end
2340
+ end
2341
+
2342
+ class Paynow < Stripe::RequestParams
2343
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2344
+ #
2345
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2346
+ #
2347
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2348
+ #
2349
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2350
+ attr_accessor :setup_future_usage
2351
+
2352
+ def initialize(setup_future_usage: nil)
2353
+ @setup_future_usage = setup_future_usage
2354
+ end
2355
+ end
2356
+
2357
+ class Paypal < Stripe::RequestParams
2358
+ # Controls when the funds will be captured from the customer's account.
2359
+ attr_accessor :capture_method
2360
+ # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to.
2361
+ attr_accessor :preferred_locale
2362
+ # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
2363
+ attr_accessor :reference
2364
+ # The risk correlation ID for an on-session payment using a saved PayPal payment method.
2365
+ attr_accessor :risk_correlation_id
2366
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2367
+ #
2368
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2369
+ #
2370
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2371
+ #
2372
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2373
+ #
2374
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
2375
+ attr_accessor :setup_future_usage
2376
+
2377
+ def initialize(
2378
+ capture_method: nil,
2379
+ preferred_locale: nil,
2380
+ reference: nil,
2381
+ risk_correlation_id: nil,
2382
+ setup_future_usage: nil
2383
+ )
2384
+ @capture_method = capture_method
2385
+ @preferred_locale = preferred_locale
2386
+ @reference = reference
2387
+ @risk_correlation_id = risk_correlation_id
2388
+ @setup_future_usage = setup_future_usage
2389
+ end
2390
+ end
2391
+
2392
+ class Pix < Stripe::RequestParams
2393
+ # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
2394
+ attr_accessor :expires_after_seconds
2395
+
2396
+ def initialize(expires_after_seconds: nil)
2397
+ @expires_after_seconds = expires_after_seconds
2398
+ end
2399
+ end
2400
+
2401
+ class RevolutPay < Stripe::RequestParams
2402
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2403
+ #
2404
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2405
+ #
2406
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2407
+ #
2408
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2409
+ attr_accessor :setup_future_usage
2410
+
2411
+ def initialize(setup_future_usage: nil)
2412
+ @setup_future_usage = setup_future_usage
2413
+ end
2414
+ end
2415
+
2416
+ class SamsungPay < Stripe::RequestParams
2417
+ # Controls when the funds will be captured from the customer's account.
2418
+ attr_accessor :capture_method
2419
+
2420
+ def initialize(capture_method: nil)
2421
+ @capture_method = capture_method
2422
+ end
2423
+ end
2424
+
2425
+ class SepaDebit < Stripe::RequestParams
2426
+ class MandateOptions < Stripe::RequestParams
2427
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
2428
+ attr_accessor :reference_prefix
2429
+
2430
+ def initialize(reference_prefix: nil)
2431
+ @reference_prefix = reference_prefix
2432
+ end
2433
+ end
2434
+ # Additional fields for Mandate creation
2435
+ attr_accessor :mandate_options
2436
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2437
+ #
2438
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2439
+ #
2440
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2441
+ #
2442
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2443
+ attr_accessor :setup_future_usage
2444
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
2445
+ attr_accessor :target_date
2446
+
2447
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil)
2448
+ @mandate_options = mandate_options
2449
+ @setup_future_usage = setup_future_usage
2450
+ @target_date = target_date
2451
+ end
2452
+ end
2453
+
2454
+ class Sofort < Stripe::RequestParams
2455
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2456
+ #
2457
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2458
+ #
2459
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2460
+ #
2461
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2462
+ attr_accessor :setup_future_usage
2463
+
2464
+ def initialize(setup_future_usage: nil)
2465
+ @setup_future_usage = setup_future_usage
2466
+ end
2467
+ end
2468
+
2469
+ class Swish < Stripe::RequestParams
2470
+ # The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent.
2471
+ attr_accessor :reference
2472
+
2473
+ def initialize(reference: nil)
2474
+ @reference = reference
2475
+ end
2476
+ end
2477
+
2478
+ class UsBankAccount < Stripe::RequestParams
2479
+ class FinancialConnections < Stripe::RequestParams
2480
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
2481
+ attr_accessor :permissions
2482
+ # List of data features that you would like to retrieve upon account creation.
2483
+ attr_accessor :prefetch
2484
+
2485
+ def initialize(permissions: nil, prefetch: nil)
2486
+ @permissions = permissions
2487
+ @prefetch = prefetch
2488
+ end
2489
+ end
2490
+ # Additional fields for Financial Connections Session creation
2491
+ attr_accessor :financial_connections
2492
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2493
+ #
2494
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2495
+ #
2496
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2497
+ #
2498
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2499
+ attr_accessor :setup_future_usage
2500
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
2501
+ attr_accessor :target_date
2502
+ # Verification method for the intent
2503
+ attr_accessor :verification_method
2504
+
2505
+ def initialize(
2506
+ financial_connections: nil,
2507
+ setup_future_usage: nil,
2508
+ target_date: nil,
2509
+ verification_method: nil
2510
+ )
2511
+ @financial_connections = financial_connections
2512
+ @setup_future_usage = setup_future_usage
2513
+ @target_date = target_date
2514
+ @verification_method = verification_method
2515
+ end
2516
+ end
2517
+
2518
+ class WechatPay < Stripe::RequestParams
2519
+ # The app ID registered with WeChat Pay. Only required when client is ios or android.
2520
+ attr_accessor :app_id
2521
+ # The client type that the end customer will pay from
2522
+ attr_accessor :client
2523
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2524
+ #
2525
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2526
+ #
2527
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2528
+ #
2529
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2530
+ attr_accessor :setup_future_usage
2531
+
2532
+ def initialize(app_id: nil, client: nil, setup_future_usage: nil)
2533
+ @app_id = app_id
2534
+ @client = client
2535
+ @setup_future_usage = setup_future_usage
2536
+ end
2537
+ end
2538
+ # contains details about the ACSS Debit payment method options.
2539
+ attr_accessor :acss_debit
2540
+ # contains details about the Affirm payment method options.
2541
+ attr_accessor :affirm
2542
+ # contains details about the Afterpay Clearpay payment method options.
2543
+ attr_accessor :afterpay_clearpay
2544
+ # contains details about the Alipay payment method options.
2545
+ attr_accessor :alipay
2546
+ # contains details about the AmazonPay payment method options.
2547
+ attr_accessor :amazon_pay
2548
+ # contains details about the AU Becs Debit payment method options.
2549
+ attr_accessor :au_becs_debit
2550
+ # contains details about the Bacs Debit payment method options.
2551
+ attr_accessor :bacs_debit
2552
+ # contains details about the Bancontact payment method options.
2553
+ attr_accessor :bancontact
2554
+ # contains details about the Boleto payment method options.
2555
+ attr_accessor :boleto
2556
+ # contains details about the Card payment method options.
2557
+ attr_accessor :card
2558
+ # contains details about the Cashapp Pay payment method options.
2559
+ attr_accessor :cashapp
2560
+ # contains details about the Customer Balance payment method options.
2561
+ attr_accessor :customer_balance
2562
+ # contains details about the EPS payment method options.
2563
+ attr_accessor :eps
2564
+ # contains details about the FPX payment method options.
2565
+ attr_accessor :fpx
2566
+ # contains details about the Giropay payment method options.
2567
+ attr_accessor :giropay
2568
+ # contains details about the Grabpay payment method options.
2569
+ attr_accessor :grabpay
2570
+ # contains details about the Ideal payment method options.
2571
+ attr_accessor :ideal
2572
+ # contains details about the Kakao Pay payment method options.
2573
+ attr_accessor :kakao_pay
2574
+ # contains details about the Klarna payment method options.
2575
+ attr_accessor :klarna
2576
+ # contains details about the Konbini payment method options.
2577
+ attr_accessor :konbini
2578
+ # contains details about the Korean card payment method options.
2579
+ attr_accessor :kr_card
2580
+ # contains details about the Link payment method options.
2581
+ attr_accessor :link
2582
+ # contains details about the Mobilepay payment method options.
2583
+ attr_accessor :mobilepay
2584
+ # contains details about the Multibanco payment method options.
2585
+ attr_accessor :multibanco
2586
+ # contains details about the Naver Pay payment method options.
2587
+ attr_accessor :naver_pay
2588
+ # contains details about the OXXO payment method options.
2589
+ attr_accessor :oxxo
2590
+ # contains details about the P24 payment method options.
2591
+ attr_accessor :p24
2592
+ # contains details about the Pay By Bank payment method options.
2593
+ attr_accessor :pay_by_bank
2594
+ # contains details about the PAYCO payment method options.
2595
+ attr_accessor :payco
2596
+ # contains details about the PayNow payment method options.
2597
+ attr_accessor :paynow
2598
+ # contains details about the PayPal payment method options.
2599
+ attr_accessor :paypal
2600
+ # contains details about the Pix payment method options.
2601
+ attr_accessor :pix
2602
+ # contains details about the RevolutPay payment method options.
2603
+ attr_accessor :revolut_pay
2604
+ # contains details about the Samsung Pay payment method options.
2605
+ attr_accessor :samsung_pay
2606
+ # contains details about the Sepa Debit payment method options.
2607
+ attr_accessor :sepa_debit
2608
+ # contains details about the Sofort payment method options.
2609
+ attr_accessor :sofort
2610
+ # contains details about the Swish payment method options.
2611
+ attr_accessor :swish
2612
+ # contains details about the Us Bank Account payment method options.
2613
+ attr_accessor :us_bank_account
2614
+ # contains details about the WeChat Pay payment method options.
2615
+ attr_accessor :wechat_pay
2616
+
2617
+ def initialize(
2618
+ acss_debit: nil,
2619
+ affirm: nil,
2620
+ afterpay_clearpay: nil,
2621
+ alipay: nil,
2622
+ amazon_pay: nil,
2623
+ au_becs_debit: nil,
2624
+ bacs_debit: nil,
2625
+ bancontact: nil,
2626
+ boleto: nil,
2627
+ card: nil,
2628
+ cashapp: nil,
2629
+ customer_balance: nil,
2630
+ eps: nil,
2631
+ fpx: nil,
2632
+ giropay: nil,
2633
+ grabpay: nil,
2634
+ ideal: nil,
2635
+ kakao_pay: nil,
2636
+ klarna: nil,
2637
+ konbini: nil,
2638
+ kr_card: nil,
2639
+ link: nil,
2640
+ mobilepay: nil,
2641
+ multibanco: nil,
2642
+ naver_pay: nil,
2643
+ oxxo: nil,
2644
+ p24: nil,
2645
+ pay_by_bank: nil,
2646
+ payco: nil,
2647
+ paynow: nil,
2648
+ paypal: nil,
2649
+ pix: nil,
2650
+ revolut_pay: nil,
2651
+ samsung_pay: nil,
2652
+ sepa_debit: nil,
2653
+ sofort: nil,
2654
+ swish: nil,
2655
+ us_bank_account: nil,
2656
+ wechat_pay: nil
2657
+ )
2658
+ @acss_debit = acss_debit
2659
+ @affirm = affirm
2660
+ @afterpay_clearpay = afterpay_clearpay
2661
+ @alipay = alipay
2662
+ @amazon_pay = amazon_pay
2663
+ @au_becs_debit = au_becs_debit
2664
+ @bacs_debit = bacs_debit
2665
+ @bancontact = bancontact
2666
+ @boleto = boleto
2667
+ @card = card
2668
+ @cashapp = cashapp
2669
+ @customer_balance = customer_balance
2670
+ @eps = eps
2671
+ @fpx = fpx
2672
+ @giropay = giropay
2673
+ @grabpay = grabpay
2674
+ @ideal = ideal
2675
+ @kakao_pay = kakao_pay
2676
+ @klarna = klarna
2677
+ @konbini = konbini
2678
+ @kr_card = kr_card
2679
+ @link = link
2680
+ @mobilepay = mobilepay
2681
+ @multibanco = multibanco
2682
+ @naver_pay = naver_pay
2683
+ @oxxo = oxxo
2684
+ @p24 = p24
2685
+ @pay_by_bank = pay_by_bank
2686
+ @payco = payco
2687
+ @paynow = paynow
2688
+ @paypal = paypal
2689
+ @pix = pix
2690
+ @revolut_pay = revolut_pay
2691
+ @samsung_pay = samsung_pay
2692
+ @sepa_debit = sepa_debit
2693
+ @sofort = sofort
2694
+ @swish = swish
2695
+ @us_bank_account = us_bank_account
2696
+ @wechat_pay = wechat_pay
2697
+ end
2698
+ end
2699
+
2700
+ class Permissions < Stripe::RequestParams
2701
+ # Determines which entity is allowed to update the shipping details.
2702
+ #
2703
+ # Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details.
2704
+ #
2705
+ # When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API.
2706
+ attr_accessor :update_shipping_details
2707
+
2708
+ def initialize(update_shipping_details: nil)
2709
+ @update_shipping_details = update_shipping_details
2710
+ end
2711
+ end
2712
+
2713
+ class PhoneNumberCollection < Stripe::RequestParams
2714
+ # Set to `true` to enable phone number collection.
2715
+ #
2716
+ # Can only be set in `payment` and `subscription` mode.
2717
+ attr_accessor :enabled
2718
+
2719
+ def initialize(enabled: nil)
2720
+ @enabled = enabled
2721
+ end
2722
+ end
2723
+
2724
+ class SavedPaymentMethodOptions < Stripe::RequestParams
2725
+ # Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with ’allow_redisplay: ‘always’ are shown in Checkout.
2726
+ attr_accessor :allow_redisplay_filters
2727
+ # Enable customers to choose if they wish to remove their saved payment methods. Disabled by default.
2728
+ attr_accessor :payment_method_remove
2729
+ # Enable customers to choose if they wish to save their payment method for future use. Disabled by default.
2730
+ attr_accessor :payment_method_save
2731
+
2732
+ def initialize(
2733
+ allow_redisplay_filters: nil,
2734
+ payment_method_remove: nil,
2735
+ payment_method_save: nil
2736
+ )
2737
+ @allow_redisplay_filters = allow_redisplay_filters
2738
+ @payment_method_remove = payment_method_remove
2739
+ @payment_method_save = payment_method_save
2740
+ end
2741
+ end
2742
+
2743
+ class SetupIntentData < Stripe::RequestParams
2744
+ # An arbitrary string attached to the object. Often useful for displaying to users.
2745
+ attr_accessor :description
2746
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
2747
+ attr_accessor :metadata
2748
+ # The Stripe account for which the setup is intended.
2749
+ attr_accessor :on_behalf_of
2750
+
2751
+ def initialize(description: nil, metadata: nil, on_behalf_of: nil)
2752
+ @description = description
2753
+ @metadata = metadata
2754
+ @on_behalf_of = on_behalf_of
2755
+ end
2756
+ end
2757
+
2758
+ class ShippingAddressCollection < Stripe::RequestParams
2759
+ # An array of two-letter ISO country codes representing which countries Checkout should provide as options for
2760
+ # shipping locations.
2761
+ attr_accessor :allowed_countries
2762
+
2763
+ def initialize(allowed_countries: nil)
2764
+ @allowed_countries = allowed_countries
2765
+ end
2766
+ end
2767
+
2768
+ class ShippingOption < Stripe::RequestParams
2769
+ class ShippingRateData < Stripe::RequestParams
2770
+ class DeliveryEstimate < Stripe::RequestParams
2771
+ class Maximum < Stripe::RequestParams
2772
+ # A unit of time.
2773
+ attr_accessor :unit
2774
+ # Must be greater than 0.
2775
+ attr_accessor :value
2776
+
2777
+ def initialize(unit: nil, value: nil)
2778
+ @unit = unit
2779
+ @value = value
2780
+ end
2781
+ end
2782
+
2783
+ class Minimum < Stripe::RequestParams
2784
+ # A unit of time.
2785
+ attr_accessor :unit
2786
+ # Must be greater than 0.
2787
+ attr_accessor :value
2788
+
2789
+ def initialize(unit: nil, value: nil)
2790
+ @unit = unit
2791
+ @value = value
2792
+ end
2793
+ end
2794
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
2795
+ attr_accessor :maximum
2796
+ # The lower bound of the estimated range. If empty, represents no lower bound.
2797
+ attr_accessor :minimum
2798
+
2799
+ def initialize(maximum: nil, minimum: nil)
2800
+ @maximum = maximum
2801
+ @minimum = minimum
2802
+ end
2803
+ end
2804
+
2805
+ class FixedAmount < Stripe::RequestParams
2806
+ class CurrencyOptions < Stripe::RequestParams
2807
+ # A non-negative integer in cents representing how much to charge.
2808
+ attr_accessor :amount
2809
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
2810
+ attr_accessor :tax_behavior
2811
+
2812
+ def initialize(amount: nil, tax_behavior: nil)
2813
+ @amount = amount
2814
+ @tax_behavior = tax_behavior
2815
+ end
2816
+ end
2817
+ # A non-negative integer in cents representing how much to charge.
2818
+ attr_accessor :amount
2819
+ # 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).
2820
+ attr_accessor :currency
2821
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
2822
+ attr_accessor :currency_options
2823
+
2824
+ def initialize(amount: nil, currency: nil, currency_options: nil)
2825
+ @amount = amount
2826
+ @currency = currency
2827
+ @currency_options = currency_options
2828
+ end
2829
+ end
2830
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
2831
+ attr_accessor :delivery_estimate
2832
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
2833
+ attr_accessor :display_name
2834
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
2835
+ attr_accessor :fixed_amount
2836
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
2837
+ attr_accessor :metadata
2838
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
2839
+ attr_accessor :tax_behavior
2840
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
2841
+ attr_accessor :tax_code
2842
+ # The type of calculation to use on the shipping rate.
2843
+ attr_accessor :type
2844
+
2845
+ def initialize(
2846
+ delivery_estimate: nil,
2847
+ display_name: nil,
2848
+ fixed_amount: nil,
2849
+ metadata: nil,
2850
+ tax_behavior: nil,
2851
+ tax_code: nil,
2852
+ type: nil
2853
+ )
2854
+ @delivery_estimate = delivery_estimate
2855
+ @display_name = display_name
2856
+ @fixed_amount = fixed_amount
2857
+ @metadata = metadata
2858
+ @tax_behavior = tax_behavior
2859
+ @tax_code = tax_code
2860
+ @type = type
2861
+ end
2862
+ end
2863
+ # The ID of the Shipping Rate to use for this shipping option.
2864
+ attr_accessor :shipping_rate
2865
+ # Parameters to be passed to Shipping Rate creation for this shipping option.
2866
+ attr_accessor :shipping_rate_data
2867
+
2868
+ def initialize(shipping_rate: nil, shipping_rate_data: nil)
2869
+ @shipping_rate = shipping_rate
2870
+ @shipping_rate_data = shipping_rate_data
2871
+ end
2872
+ end
2873
+
2874
+ class SubscriptionData < Stripe::RequestParams
2875
+ class InvoiceSettings < Stripe::RequestParams
2876
+ class Issuer < Stripe::RequestParams
2877
+ # The connected account being referenced when `type` is `account`.
2878
+ attr_accessor :account
2879
+ # Type of the account referenced in the request.
2880
+ attr_accessor :type
2881
+
2882
+ def initialize(account: nil, type: nil)
2883
+ @account = account
2884
+ @type = type
2885
+ end
2886
+ end
2887
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
2888
+ attr_accessor :issuer
2889
+
2890
+ def initialize(issuer: nil)
2891
+ @issuer = issuer
2892
+ end
2893
+ end
2894
+
2895
+ class TransferData < Stripe::RequestParams
2896
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
2897
+ attr_accessor :amount_percent
2898
+ # ID of an existing, connected Stripe account.
2899
+ attr_accessor :destination
2900
+
2901
+ def initialize(amount_percent: nil, destination: nil)
2902
+ @amount_percent = amount_percent
2903
+ @destination = destination
2904
+ end
2905
+ end
2906
+
2907
+ class TrialSettings < Stripe::RequestParams
2908
+ class EndBehavior < Stripe::RequestParams
2909
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
2910
+ attr_accessor :missing_payment_method
2911
+
2912
+ def initialize(missing_payment_method: nil)
2913
+ @missing_payment_method = missing_payment_method
2914
+ end
2915
+ end
2916
+ # Defines how the subscription should behave when the user's free trial ends.
2917
+ attr_accessor :end_behavior
2918
+
2919
+ def initialize(end_behavior: nil)
2920
+ @end_behavior = end_behavior
2921
+ end
2922
+ end
2923
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. To use an application fee percent, the request must be made on behalf of another account, using the `Stripe-Account` header or an OAuth key. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
2924
+ attr_accessor :application_fee_percent
2925
+ # A future timestamp to anchor the subscription's billing cycle for new subscriptions.
2926
+ attr_accessor :billing_cycle_anchor
2927
+ # The tax rates that will apply to any subscription item that does not have
2928
+ # `tax_rates` set. Invoices created will have their `default_tax_rates` populated
2929
+ # from the subscription.
2930
+ attr_accessor :default_tax_rates
2931
+ # The subscription's description, meant to be displayable to the customer.
2932
+ # Use this field to optionally store an explanation of the subscription
2933
+ # for rendering in the [customer portal](https://stripe.com/docs/customer-management).
2934
+ attr_accessor :description
2935
+ # All invoices will be billed using the specified settings.
2936
+ attr_accessor :invoice_settings
2937
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
2938
+ attr_accessor :metadata
2939
+ # The account on behalf of which to charge, for each of the subscription's invoices.
2940
+ attr_accessor :on_behalf_of
2941
+ # Determines how to handle prorations resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`.
2942
+ attr_accessor :proration_behavior
2943
+ # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.
2944
+ attr_accessor :transfer_data
2945
+ # Unix timestamp representing the end of the trial period the customer
2946
+ # will get before being charged for the first time. Has to be at least
2947
+ # 48 hours in the future.
2948
+ attr_accessor :trial_end
2949
+ # Integer representing the number of trial period days before the
2950
+ # customer is charged for the first time. Has to be at least 1.
2951
+ attr_accessor :trial_period_days
2952
+ # Settings related to subscription trials.
2953
+ attr_accessor :trial_settings
2954
+
2955
+ def initialize(
2956
+ application_fee_percent: nil,
2957
+ billing_cycle_anchor: nil,
2958
+ default_tax_rates: nil,
2959
+ description: nil,
2960
+ invoice_settings: nil,
2961
+ metadata: nil,
2962
+ on_behalf_of: nil,
2963
+ proration_behavior: nil,
2964
+ transfer_data: nil,
2965
+ trial_end: nil,
2966
+ trial_period_days: nil,
2967
+ trial_settings: nil
2968
+ )
2969
+ @application_fee_percent = application_fee_percent
2970
+ @billing_cycle_anchor = billing_cycle_anchor
2971
+ @default_tax_rates = default_tax_rates
2972
+ @description = description
2973
+ @invoice_settings = invoice_settings
2974
+ @metadata = metadata
2975
+ @on_behalf_of = on_behalf_of
2976
+ @proration_behavior = proration_behavior
2977
+ @transfer_data = transfer_data
2978
+ @trial_end = trial_end
2979
+ @trial_period_days = trial_period_days
2980
+ @trial_settings = trial_settings
2981
+ end
2982
+ end
2983
+
2984
+ class TaxIdCollection < Stripe::RequestParams
2985
+ # Enable tax ID collection during checkout. Defaults to `false`.
2986
+ attr_accessor :enabled
2987
+ # Describes whether a tax ID is required during checkout. Defaults to `never`.
2988
+ attr_accessor :required
2989
+
2990
+ def initialize(enabled: nil, required: nil)
2991
+ @enabled = enabled
2992
+ @required = required
2993
+ end
2994
+ end
2995
+
2996
+ class WalletOptions < Stripe::RequestParams
2997
+ class Link < Stripe::RequestParams
2998
+ # Specifies whether Checkout should display Link as a payment option. By default, Checkout will display all the supported wallets that the Checkout Session was created with. This is the `auto` behavior, and it is the default choice.
2999
+ attr_accessor :display
3000
+
3001
+ def initialize(display: nil)
3002
+ @display = display
3003
+ end
3004
+ end
3005
+ # contains details about the Link wallet options.
3006
+ attr_accessor :link
3007
+
3008
+ def initialize(link: nil)
3009
+ @link = link
3010
+ end
3011
+ end
3012
+ # Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing).
3013
+ attr_accessor :adaptive_pricing
3014
+ # Configure actions after a Checkout Session has expired.
3015
+ attr_accessor :after_expiration
3016
+ # Enables user redeemable promotion codes.
3017
+ attr_accessor :allow_promotion_codes
3018
+ # Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions.
3019
+ attr_accessor :automatic_tax
3020
+ # Specify whether Checkout should collect the customer's billing address. Defaults to `auto`.
3021
+ attr_accessor :billing_address_collection
3022
+ # If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. This parameter is not allowed if ui_mode is `embedded` or `custom`.
3023
+ attr_accessor :cancel_url
3024
+ # A unique string to reference the Checkout Session. This can be a
3025
+ # customer ID, a cart ID, or similar, and can be used to reconcile the
3026
+ # session with your internal systems.
3027
+ attr_accessor :client_reference_id
3028
+ # Configure fields for the Checkout Session to gather active consent from customers.
3029
+ attr_accessor :consent_collection
3030
+ # 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). Required in `setup` mode when `payment_method_types` is not set.
3031
+ attr_accessor :currency
3032
+ # Collect additional information from your customer using custom fields. Up to 3 fields are supported.
3033
+ attr_accessor :custom_fields
3034
+ # Display additional text for your customers using custom text.
3035
+ attr_accessor :custom_text
3036
+ # ID of an existing Customer, if one exists. In `payment` mode, the customer’s most recently saved card
3037
+ # payment method will be used to prefill the email, name, card details, and billing address
3038
+ # on the Checkout page. In `subscription` mode, the customer’s [default payment method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method)
3039
+ # will be used if it’s a card, otherwise the most recently saved card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer's card details.
3040
+ #
3041
+ # If the Customer already has a valid [email](https://stripe.com/docs/api/customers/object#customer_object-email) set, the email will be prefilled and not editable in Checkout.
3042
+ # If the Customer does not have a valid `email`, Checkout will set the email entered during the session on the Customer.
3043
+ #
3044
+ # If blank for Checkout Sessions in `subscription` mode or with `customer_creation` set as `always` in `payment` mode, Checkout will create a new Customer object based on information provided during the payment flow.
3045
+ #
3046
+ # You can set [`payment_intent_data.setup_future_usage`](https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage) to have Checkout automatically attach the payment method to the Customer you pass in for future reuse.
3047
+ attr_accessor :customer
3048
+ # Configure whether a Checkout Session creates a [Customer](https://stripe.com/docs/api/customers) during Session confirmation.
3049
+ #
3050
+ # When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout
3051
+ # with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details).
3052
+ #
3053
+ # Sessions that don't create Customers instead are grouped by [guest customers](https://stripe.com/docs/payments/checkout/guest-customers)
3054
+ # in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions.
3055
+ #
3056
+ # Can only be set in `payment` and `setup` mode.
3057
+ attr_accessor :customer_creation
3058
+ # If provided, this value will be used when the Customer object is created.
3059
+ # If not provided, customers will be asked to enter their email address.
3060
+ # Use this parameter to prefill customer data if you already have an email
3061
+ # on file. To access information about the customer once a session is
3062
+ # complete, use the `customer` field.
3063
+ attr_accessor :customer_email
3064
+ # Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided.
3065
+ attr_accessor :customer_update
3066
+ # The coupon or promotion code to apply to this Session. Currently, only up to one may be specified.
3067
+ attr_accessor :discounts
3068
+ # Specifies which fields in the response should be expanded.
3069
+ attr_accessor :expand
3070
+ # The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation.
3071
+ attr_accessor :expires_at
3072
+ # Generate a post-purchase Invoice for one-time payments.
3073
+ attr_accessor :invoice_creation
3074
+ # A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices).
3075
+ #
3076
+ # For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen.
3077
+ #
3078
+ # For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only.
3079
+ attr_accessor :line_items
3080
+ # The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.
3081
+ attr_accessor :locale
3082
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
3083
+ attr_accessor :metadata
3084
+ # The mode of the Checkout Session. Pass `subscription` if the Checkout Session includes at least one recurring item.
3085
+ attr_accessor :mode
3086
+ # A list of optional items the customer can add to their order at checkout. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices).
3087
+ #
3088
+ # There is a maximum of 10 optional items allowed on a Checkout Session, and the existing limits on the number of line items allowed on a Checkout Session apply to the combined number of line items and optional items.
3089
+ #
3090
+ # For `payment` mode, there is a maximum of 100 combined line items and optional items, however it is recommended to consolidate items if there are more than a few dozen.
3091
+ #
3092
+ # For `subscription` mode, there is a maximum of 20 line items and optional items with recurring Prices and 20 line items and optional items with one-time Prices.
3093
+ attr_accessor :optional_items
3094
+ # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
3095
+ attr_accessor :payment_intent_data
3096
+ # Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.
3097
+ # This may occur if the Checkout Session includes a free trial or a discount.
3098
+ #
3099
+ # Can only be set in `subscription` mode. Defaults to `always`.
3100
+ #
3101
+ # If you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials).
3102
+ attr_accessor :payment_method_collection
3103
+ # The ID of the payment method configuration to use with this Checkout session.
3104
+ attr_accessor :payment_method_configuration
3105
+ # This parameter allows you to set some attributes on the payment method created during a Checkout session.
3106
+ attr_accessor :payment_method_data
3107
+ # Payment-method-specific configuration.
3108
+ attr_accessor :payment_method_options
3109
+ # A list of the types of payment methods (e.g., `card`) this Checkout Session can accept.
3110
+ #
3111
+ # You can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
3112
+ # See [Dynamic Payment Methods](https://stripe.com/docs/payments/payment-methods/integration-options#using-dynamic-payment-methods) for more details.
3113
+ #
3114
+ # Read more about the supported payment methods and their requirements in our [payment
3115
+ # method details guide](/docs/payments/checkout/payment-methods).
3116
+ #
3117
+ # If multiple payment methods are passed, Checkout will dynamically reorder them to
3118
+ # prioritize the most relevant payment methods based on the customer's location and
3119
+ # other characteristics.
3120
+ attr_accessor :payment_method_types
3121
+ # This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. Can only be set when creating `embedded` or `custom` sessions.
3122
+ #
3123
+ # For specific permissions, please refer to their dedicated subsections, such as `permissions.update_shipping_details`.
3124
+ attr_accessor :permissions
3125
+ # Controls phone number collection settings for the session.
3126
+ #
3127
+ # We recommend that you review your privacy policy and check with your legal contacts
3128
+ # before using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers).
3129
+ attr_accessor :phone_number_collection
3130
+ # This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`.
3131
+ attr_accessor :redirect_on_completion
3132
+ # The URL to redirect your customer back to after they authenticate or cancel their payment on the
3133
+ # payment method's app or site. This parameter is required if `ui_mode` is `embedded` or `custom`
3134
+ # and redirect-based payment methods are enabled on the session.
3135
+ attr_accessor :return_url
3136
+ # Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode.
3137
+ attr_accessor :saved_payment_method_options
3138
+ # A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode.
3139
+ attr_accessor :setup_intent_data
3140
+ # When set, provides configuration for Checkout to collect a shipping address from a customer.
3141
+ attr_accessor :shipping_address_collection
3142
+ # The shipping rate options to apply to this Session. Up to a maximum of 5.
3143
+ attr_accessor :shipping_options
3144
+ # Describes the type of transaction being performed by Checkout in order
3145
+ # to customize relevant text on the page, such as the submit button.
3146
+ # `submit_type` can only be specified on Checkout Sessions in
3147
+ # `payment` or `subscription` mode. If blank or `auto`, `pay` is used.
3148
+ attr_accessor :submit_type
3149
+ # A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode.
3150
+ attr_accessor :subscription_data
3151
+ # The URL to which Stripe should send customers when payment or setup
3152
+ # is complete.
3153
+ # This parameter is not allowed if ui_mode is `embedded` or `custom`. If you'd like to use
3154
+ # information from the successful Checkout Session on your page, read the
3155
+ # guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page).
3156
+ attr_accessor :success_url
3157
+ # Controls tax ID collection during checkout.
3158
+ attr_accessor :tax_id_collection
3159
+ # The UI mode of the Session. Defaults to `hosted`.
3160
+ attr_accessor :ui_mode
3161
+ # Wallet-specific configuration.
3162
+ attr_accessor :wallet_options
3163
+
3164
+ def initialize(
3165
+ adaptive_pricing: nil,
3166
+ after_expiration: nil,
3167
+ allow_promotion_codes: nil,
3168
+ automatic_tax: nil,
3169
+ billing_address_collection: nil,
3170
+ cancel_url: nil,
3171
+ client_reference_id: nil,
3172
+ consent_collection: nil,
3173
+ currency: nil,
3174
+ custom_fields: nil,
3175
+ custom_text: nil,
3176
+ customer: nil,
3177
+ customer_creation: nil,
3178
+ customer_email: nil,
3179
+ customer_update: nil,
3180
+ discounts: nil,
3181
+ expand: nil,
3182
+ expires_at: nil,
3183
+ invoice_creation: nil,
3184
+ line_items: nil,
3185
+ locale: nil,
3186
+ metadata: nil,
3187
+ mode: nil,
3188
+ optional_items: nil,
3189
+ payment_intent_data: nil,
3190
+ payment_method_collection: nil,
3191
+ payment_method_configuration: nil,
3192
+ payment_method_data: nil,
3193
+ payment_method_options: nil,
3194
+ payment_method_types: nil,
3195
+ permissions: nil,
3196
+ phone_number_collection: nil,
3197
+ redirect_on_completion: nil,
3198
+ return_url: nil,
3199
+ saved_payment_method_options: nil,
3200
+ setup_intent_data: nil,
3201
+ shipping_address_collection: nil,
3202
+ shipping_options: nil,
3203
+ submit_type: nil,
3204
+ subscription_data: nil,
3205
+ success_url: nil,
3206
+ tax_id_collection: nil,
3207
+ ui_mode: nil,
3208
+ wallet_options: nil
3209
+ )
3210
+ @adaptive_pricing = adaptive_pricing
3211
+ @after_expiration = after_expiration
3212
+ @allow_promotion_codes = allow_promotion_codes
3213
+ @automatic_tax = automatic_tax
3214
+ @billing_address_collection = billing_address_collection
3215
+ @cancel_url = cancel_url
3216
+ @client_reference_id = client_reference_id
3217
+ @consent_collection = consent_collection
3218
+ @currency = currency
3219
+ @custom_fields = custom_fields
3220
+ @custom_text = custom_text
3221
+ @customer = customer
3222
+ @customer_creation = customer_creation
3223
+ @customer_email = customer_email
3224
+ @customer_update = customer_update
3225
+ @discounts = discounts
3226
+ @expand = expand
3227
+ @expires_at = expires_at
3228
+ @invoice_creation = invoice_creation
3229
+ @line_items = line_items
3230
+ @locale = locale
3231
+ @metadata = metadata
3232
+ @mode = mode
3233
+ @optional_items = optional_items
3234
+ @payment_intent_data = payment_intent_data
3235
+ @payment_method_collection = payment_method_collection
3236
+ @payment_method_configuration = payment_method_configuration
3237
+ @payment_method_data = payment_method_data
3238
+ @payment_method_options = payment_method_options
3239
+ @payment_method_types = payment_method_types
3240
+ @permissions = permissions
3241
+ @phone_number_collection = phone_number_collection
3242
+ @redirect_on_completion = redirect_on_completion
3243
+ @return_url = return_url
3244
+ @saved_payment_method_options = saved_payment_method_options
3245
+ @setup_intent_data = setup_intent_data
3246
+ @shipping_address_collection = shipping_address_collection
3247
+ @shipping_options = shipping_options
3248
+ @submit_type = submit_type
3249
+ @subscription_data = subscription_data
3250
+ @success_url = success_url
3251
+ @tax_id_collection = tax_id_collection
3252
+ @ui_mode = ui_mode
3253
+ @wallet_options = wallet_options
3254
+ end
3255
+ end
3256
+
3257
+ class UpdateParams < Stripe::RequestParams
3258
+ class CollectedInformation < Stripe::RequestParams
3259
+ class ShippingDetails < Stripe::RequestParams
3260
+ class Address < Stripe::RequestParams
3261
+ # City, district, suburb, town, or village.
3262
+ attr_accessor :city
3263
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
3264
+ attr_accessor :country
3265
+ # Address line 1 (e.g., street, PO Box, or company name).
3266
+ attr_accessor :line1
3267
+ # Address line 2 (e.g., apartment, suite, unit, or building).
3268
+ attr_accessor :line2
3269
+ # ZIP or postal code.
3270
+ attr_accessor :postal_code
3271
+ # State, county, province, or region.
3272
+ attr_accessor :state
3273
+
3274
+ def initialize(
3275
+ city: nil,
3276
+ country: nil,
3277
+ line1: nil,
3278
+ line2: nil,
3279
+ postal_code: nil,
3280
+ state: nil
3281
+ )
3282
+ @city = city
3283
+ @country = country
3284
+ @line1 = line1
3285
+ @line2 = line2
3286
+ @postal_code = postal_code
3287
+ @state = state
3288
+ end
3289
+ end
3290
+ # The address of the customer
3291
+ attr_accessor :address
3292
+ # The name of customer
3293
+ attr_accessor :name
3294
+
3295
+ def initialize(address: nil, name: nil)
3296
+ @address = address
3297
+ @name = name
3298
+ end
3299
+ end
3300
+ # The shipping details to apply to this Session.
3301
+ attr_accessor :shipping_details
3302
+
3303
+ def initialize(shipping_details: nil)
3304
+ @shipping_details = shipping_details
3305
+ end
3306
+ end
3307
+
3308
+ class ShippingOption < Stripe::RequestParams
3309
+ class ShippingRateData < Stripe::RequestParams
3310
+ class DeliveryEstimate < Stripe::RequestParams
3311
+ class Maximum < Stripe::RequestParams
3312
+ # A unit of time.
3313
+ attr_accessor :unit
3314
+ # Must be greater than 0.
3315
+ attr_accessor :value
3316
+
3317
+ def initialize(unit: nil, value: nil)
3318
+ @unit = unit
3319
+ @value = value
3320
+ end
3321
+ end
3322
+
3323
+ class Minimum < Stripe::RequestParams
3324
+ # A unit of time.
3325
+ attr_accessor :unit
3326
+ # Must be greater than 0.
3327
+ attr_accessor :value
3328
+
3329
+ def initialize(unit: nil, value: nil)
3330
+ @unit = unit
3331
+ @value = value
3332
+ end
3333
+ end
3334
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
3335
+ attr_accessor :maximum
3336
+ # The lower bound of the estimated range. If empty, represents no lower bound.
3337
+ attr_accessor :minimum
3338
+
3339
+ def initialize(maximum: nil, minimum: nil)
3340
+ @maximum = maximum
3341
+ @minimum = minimum
3342
+ end
3343
+ end
3344
+
3345
+ class FixedAmount < Stripe::RequestParams
3346
+ class CurrencyOptions < Stripe::RequestParams
3347
+ # A non-negative integer in cents representing how much to charge.
3348
+ attr_accessor :amount
3349
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
3350
+ attr_accessor :tax_behavior
3351
+
3352
+ def initialize(amount: nil, tax_behavior: nil)
3353
+ @amount = amount
3354
+ @tax_behavior = tax_behavior
3355
+ end
3356
+ end
3357
+ # A non-negative integer in cents representing how much to charge.
3358
+ attr_accessor :amount
3359
+ # 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).
3360
+ attr_accessor :currency
3361
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
3362
+ attr_accessor :currency_options
3363
+
3364
+ def initialize(amount: nil, currency: nil, currency_options: nil)
3365
+ @amount = amount
3366
+ @currency = currency
3367
+ @currency_options = currency_options
3368
+ end
3369
+ end
3370
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
3371
+ attr_accessor :delivery_estimate
3372
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
3373
+ attr_accessor :display_name
3374
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
3375
+ attr_accessor :fixed_amount
3376
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
3377
+ attr_accessor :metadata
3378
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
3379
+ attr_accessor :tax_behavior
3380
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
3381
+ attr_accessor :tax_code
3382
+ # The type of calculation to use on the shipping rate.
3383
+ attr_accessor :type
3384
+
3385
+ def initialize(
3386
+ delivery_estimate: nil,
3387
+ display_name: nil,
3388
+ fixed_amount: nil,
3389
+ metadata: nil,
3390
+ tax_behavior: nil,
3391
+ tax_code: nil,
3392
+ type: nil
3393
+ )
3394
+ @delivery_estimate = delivery_estimate
3395
+ @display_name = display_name
3396
+ @fixed_amount = fixed_amount
3397
+ @metadata = metadata
3398
+ @tax_behavior = tax_behavior
3399
+ @tax_code = tax_code
3400
+ @type = type
3401
+ end
3402
+ end
3403
+ # The ID of the Shipping Rate to use for this shipping option.
3404
+ attr_accessor :shipping_rate
3405
+ # Parameters to be passed to Shipping Rate creation for this shipping option.
3406
+ attr_accessor :shipping_rate_data
3407
+
3408
+ def initialize(shipping_rate: nil, shipping_rate_data: nil)
3409
+ @shipping_rate = shipping_rate
3410
+ @shipping_rate_data = shipping_rate_data
3411
+ end
3412
+ end
3413
+ # Information about the customer collected within the Checkout Session. Can only be set when updating `embedded` or `custom` sessions.
3414
+ attr_accessor :collected_information
3415
+ # Specifies which fields in the response should be expanded.
3416
+ attr_accessor :expand
3417
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
3418
+ attr_accessor :metadata
3419
+ # The shipping rate options to apply to this Session. Up to a maximum of 5.
3420
+ attr_accessor :shipping_options
3421
+
3422
+ def initialize(
3423
+ collected_information: nil,
3424
+ expand: nil,
3425
+ metadata: nil,
3426
+ shipping_options: nil
3427
+ )
3428
+ @collected_information = collected_information
3429
+ @expand = expand
3430
+ @metadata = metadata
3431
+ @shipping_options = shipping_options
3432
+ end
3433
+ end
3434
+
3435
+ class ListLineItemsParams < Stripe::RequestParams
3436
+ # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
3437
+ attr_accessor :ending_before
3438
+ # Specifies which fields in the response should be expanded.
3439
+ attr_accessor :expand
3440
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
3441
+ attr_accessor :limit
3442
+ # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
3443
+ attr_accessor :starting_after
3444
+
3445
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
3446
+ @ending_before = ending_before
3447
+ @expand = expand
3448
+ @limit = limit
3449
+ @starting_after = starting_after
3450
+ end
3451
+ end
3452
+
3453
+ class ExpireParams < Stripe::RequestParams
3454
+ # Specifies which fields in the response should be expanded.
3455
+ attr_accessor :expand
3456
+
3457
+ def initialize(expand: nil)
3458
+ @expand = expand
3459
+ end
3460
+ end
3461
+ # Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing).
3462
+ attr_reader :adaptive_pricing
3463
+ # When set, provides configuration for actions to take if this Checkout Session expires.
3464
+ attr_reader :after_expiration
3465
+ # Enables user redeemable promotion codes.
3466
+ attr_reader :allow_promotion_codes
3467
+ # Total of all items before discounts or taxes are applied.
3468
+ attr_reader :amount_subtotal
3469
+ # Total of all items after discounts and taxes are applied.
3470
+ attr_reader :amount_total
3471
+ # Attribute for field automatic_tax
3472
+ attr_reader :automatic_tax
3473
+ # Describes whether Checkout should collect the customer's billing address. Defaults to `auto`.
3474
+ attr_reader :billing_address_collection
3475
+ # If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.
3476
+ attr_reader :cancel_url
3477
+ # A unique string to reference the Checkout Session. This can be a
3478
+ # customer ID, a cart ID, or similar, and can be used to reconcile the
3479
+ # Session with your internal systems.
3480
+ attr_reader :client_reference_id
3481
+ # The client secret of your Checkout Session. Applies to Checkout Sessions with `ui_mode: embedded` or `ui_mode: custom`. For `ui_mode: embedded`, the client secret is to be used when initializing Stripe.js embedded checkout.
3482
+ # For `ui_mode: custom`, use the client secret with [initCheckout](https://stripe.com/docs/js/custom_checkout/init) on your front end.
3483
+ attr_reader :client_secret
3484
+ # Information about the customer collected within the Checkout Session.
3485
+ attr_reader :collected_information
3486
+ # Results of `consent_collection` for this session.
3487
+ attr_reader :consent
3488
+ # When set, provides configuration for the Checkout Session to gather active consent from customers.
3489
+ attr_reader :consent_collection
3490
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
3491
+ attr_reader :created
3492
+ # 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).
3493
+ attr_reader :currency
3494
+ # Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions created before 2025-03-31.
3495
+ attr_reader :currency_conversion
3496
+ # Collect additional information from your customer using custom fields. Up to 3 fields are supported.
3497
+ attr_reader :custom_fields
3498
+ # Attribute for field custom_text
3499
+ attr_reader :custom_text
3500
+ # The ID of the customer for this Session.
3501
+ # For Checkout Sessions in `subscription` mode or Checkout Sessions with `customer_creation` set as `always` in `payment` mode, Checkout
3502
+ # will create a new customer object based on information provided
3503
+ # during the payment flow unless an existing customer was provided when
3504
+ # the Session was created.
3505
+ attr_reader :customer
3506
+ # Configure whether a Checkout Session creates a Customer when the Checkout Session completes.
3507
+ attr_reader :customer_creation
3508
+ # The customer details including the customer's tax exempt status and the customer's tax IDs. Customer's address details are not present on Sessions in `setup` mode.
3509
+ attr_reader :customer_details
3510
+ # If provided, this value will be used when the Customer object is created.
3511
+ # If not provided, customers will be asked to enter their email address.
3512
+ # Use this parameter to prefill customer data if you already have an email
3513
+ # on file. To access information about the customer once the payment flow is
3514
+ # complete, use the `customer` attribute.
3515
+ attr_reader :customer_email
3516
+ # List of coupons and promotion codes attached to the Checkout Session.
3517
+ attr_reader :discounts
3518
+ # The timestamp at which the Checkout Session will expire.
3519
+ attr_reader :expires_at
3520
+ # Unique identifier for the object.
3521
+ attr_reader :id
3522
+ # ID of the invoice created by the Checkout Session, if it exists.
3523
+ attr_reader :invoice
3524
+ # Details on the state of invoice creation for the Checkout Session.
3525
+ attr_reader :invoice_creation
3526
+ # The line items purchased by the customer.
3527
+ attr_reader :line_items
3528
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
3529
+ attr_reader :livemode
3530
+ # The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.
3531
+ attr_reader :locale
3532
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
3533
+ attr_reader :metadata
3534
+ # The mode of the Checkout Session.
3535
+ attr_reader :mode
3536
+ # String representing the object's type. Objects of the same type share the same value.
3537
+ attr_reader :object
3538
+ # The optional items presented to the customer at checkout.
3539
+ attr_reader :optional_items
3540
+ # The ID of the PaymentIntent for Checkout Sessions in `payment` mode. You can't confirm or cancel the PaymentIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
3541
+ attr_reader :payment_intent
3542
+ # The ID of the Payment Link that created this Session.
3543
+ attr_reader :payment_link
3544
+ # Configure whether a Checkout Session should collect a payment method. Defaults to `always`.
3545
+ attr_reader :payment_method_collection
3546
+ # Information about the payment method configuration used for this Checkout session if using dynamic payment methods.
3547
+ attr_reader :payment_method_configuration_details
3548
+ # Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.
3549
+ attr_reader :payment_method_options
3550
+ # A list of the types of payment methods (e.g. card) this Checkout
3551
+ # Session is allowed to accept.
3552
+ attr_reader :payment_method_types
3553
+ # The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`.
3554
+ # You can use this value to decide when to fulfill your customer's order.
3555
+ attr_reader :payment_status
3556
+ # This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object.
3557
+ #
3558
+ # For specific permissions, please refer to their dedicated subsections, such as `permissions.update_shipping_details`.
3559
+ attr_reader :permissions
3560
+ # Attribute for field phone_number_collection
3561
+ attr_reader :phone_number_collection
3562
+ # Attribute for field presentment_details
3563
+ attr_reader :presentment_details
3564
+ # The ID of the original expired Checkout Session that triggered the recovery flow.
3565
+ attr_reader :recovered_from
3566
+ # This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`.
3567
+ attr_reader :redirect_on_completion
3568
+ # Applies to Checkout Sessions with `ui_mode: embedded` or `ui_mode: custom`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site.
3569
+ attr_reader :return_url
3570
+ # Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode.
3571
+ attr_reader :saved_payment_method_options
3572
+ # The ID of the SetupIntent for Checkout Sessions in `setup` mode. You can't confirm or cancel the SetupIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
3573
+ attr_reader :setup_intent
3574
+ # When set, provides configuration for Checkout to collect a shipping address from a customer.
3575
+ attr_reader :shipping_address_collection
3576
+ # The details of the customer cost of shipping, including the customer chosen ShippingRate.
3577
+ attr_reader :shipping_cost
3578
+ # The shipping rate options applied to this Session.
3579
+ attr_reader :shipping_options
3580
+ # The status of the Checkout Session, one of `open`, `complete`, or `expired`.
3581
+ attr_reader :status
3582
+ # Describes the type of transaction being performed by Checkout in order to customize
3583
+ # relevant text on the page, such as the submit button. `submit_type` can only be
3584
+ # specified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used.
3585
+ attr_reader :submit_type
3586
+ # The ID of the [Subscription](https://stripe.com/docs/api/subscriptions) for Checkout Sessions in `subscription` mode.
3587
+ attr_reader :subscription
3588
+ # The URL the customer will be directed to after the payment or
3589
+ # subscription creation is successful.
3590
+ attr_reader :success_url
3591
+ # Attribute for field tax_id_collection
3592
+ attr_reader :tax_id_collection
3593
+ # Tax and discount details for the computed total amount.
3594
+ attr_reader :total_details
3595
+ # The UI mode of the Session. Defaults to `hosted`.
3596
+ attr_reader :ui_mode
3597
+ # The URL to the Checkout Session. Applies to Checkout Sessions with `ui_mode: hosted`. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.`
3598
+ # This value is only present when the session is active.
3599
+ attr_reader :url
3600
+ # Wallet-specific configuration for this Checkout Session.
3601
+ attr_reader :wallet_options
3602
+
3603
+ # Creates a Checkout Session object.
3604
+ def self.create(params = {}, opts = {})
3605
+ request_stripe_object(
3606
+ method: :post,
3607
+ path: "/v1/checkout/sessions",
3608
+ params: params,
3609
+ opts: opts
3610
+ )
3611
+ end
3612
+
3613
+ # A Checkout Session can be expired when it is in one of these statuses: open
3614
+ #
3615
+ # After it expires, a customer can't complete a Checkout Session and customers loading the Checkout Session see a message saying the Checkout Session is expired.
3616
+ def expire(params = {}, opts = {})
3617
+ request_stripe_object(
3618
+ method: :post,
3619
+ path: format("/v1/checkout/sessions/%<session>s/expire", { session: CGI.escape(self["id"]) }),
3620
+ params: params,
3621
+ opts: opts
3622
+ )
3623
+ end
3624
+
3625
+ # A Checkout Session can be expired when it is in one of these statuses: open
3626
+ #
3627
+ # After it expires, a customer can't complete a Checkout Session and customers loading the Checkout Session see a message saying the Checkout Session is expired.
3628
+ def self.expire(session, params = {}, opts = {})
3629
+ request_stripe_object(
3630
+ method: :post,
3631
+ path: format("/v1/checkout/sessions/%<session>s/expire", { session: CGI.escape(session) }),
3632
+ params: params,
3633
+ opts: opts
3634
+ )
3635
+ end
3636
+
3637
+ # Returns a list of Checkout Sessions.
3638
+ def self.list(params = {}, opts = {})
3639
+ request_stripe_object(
3640
+ method: :get,
3641
+ path: "/v1/checkout/sessions",
3642
+ params: params,
3643
+ opts: opts
3644
+ )
3645
+ end
3646
+
3647
+ # When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
3648
+ def list_line_items(params = {}, opts = {})
3649
+ request_stripe_object(
3650
+ method: :get,
3651
+ path: format("/v1/checkout/sessions/%<session>s/line_items", { session: CGI.escape(self["id"]) }),
3652
+ params: params,
3653
+ opts: opts
3654
+ )
3655
+ end
3656
+
3657
+ # When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
3658
+ def self.list_line_items(session, params = {}, opts = {})
3659
+ request_stripe_object(
3660
+ method: :get,
3661
+ path: format("/v1/checkout/sessions/%<session>s/line_items", { session: CGI.escape(session) }),
3662
+ params: params,
3663
+ opts: opts
3664
+ )
3665
+ end
3666
+
3667
+ # Updates a Checkout Session object.
3668
+ #
3669
+ # Related guide: [Dynamically update Checkout](https://docs.stripe.com/payments/checkout/dynamic-updates)
3670
+ def self.update(session, params = {}, opts = {})
3671
+ request_stripe_object(
3672
+ method: :post,
3673
+ path: format("/v1/checkout/sessions/%<session>s", { session: CGI.escape(session) }),
3674
+ params: params,
3675
+ opts: opts
3676
+ )
3677
+ end
14
3678
  end
15
3679
  end
16
3680
  end