stripe 13.4.1 → 13.5.0.pre.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (743) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1427 -645
  3. data/OPENAPI_VERSION +1 -1
  4. data/VERSION +1 -1
  5. data/lib/stripe/api_operations/request.rb +1 -0
  6. data/lib/stripe/api_requestor.rb +1 -0
  7. data/lib/stripe/object_types.rb +32 -0
  8. data/lib/stripe/request_params.rb +24 -0
  9. data/lib/stripe/request_signing_authenticator.rb +79 -0
  10. data/lib/stripe/resources/account.rb +5165 -0
  11. data/lib/stripe/resources/account_link.rb +54 -0
  12. data/lib/stripe/resources/account_notice.rb +132 -0
  13. data/lib/stripe/resources/account_session.rb +985 -0
  14. data/lib/stripe/resources/apple_pay_domain.rb +63 -0
  15. data/lib/stripe/resources/application.rb +20 -0
  16. data/lib/stripe/resources/application_fee.rb +96 -0
  17. data/lib/stripe/resources/application_fee_refund.rb +17 -0
  18. data/lib/stripe/resources/apps/secret.rb +141 -0
  19. data/lib/stripe/resources/balance.rb +131 -0
  20. data/lib/stripe/resources/balance_transaction.rb +112 -0
  21. data/lib/stripe/resources/bank_account.rb +84 -2
  22. data/lib/stripe/resources/billing/alert.rb +144 -0
  23. data/lib/stripe/resources/billing/alert_triggered.rb +26 -0
  24. data/lib/stripe/resources/billing/credit_balance_summary.rb +88 -0
  25. data/lib/stripe/resources/billing/credit_balance_transaction.rb +116 -0
  26. data/lib/stripe/resources/billing/credit_grant.rb +220 -0
  27. data/lib/stripe/resources/billing/meter.rb +178 -0
  28. data/lib/stripe/resources/billing/meter_error_report.rb +59 -0
  29. data/lib/stripe/resources/billing/meter_event.rb +35 -0
  30. data/lib/stripe/resources/billing/meter_event_adjustment.rb +43 -0
  31. data/lib/stripe/resources/billing/meter_event_summary.rb +17 -0
  32. data/lib/stripe/resources/billing_portal/configuration.rb +562 -0
  33. data/lib/stripe/resources/billing_portal/session.rb +271 -0
  34. data/lib/stripe/resources/capability.rb +84 -0
  35. data/lib/stripe/resources/capital/financing_offer.rb +188 -0
  36. data/lib/stripe/resources/capital/financing_summary.rb +64 -0
  37. data/lib/stripe/resources/capital/financing_transaction.rb +123 -0
  38. data/lib/stripe/resources/card.rb +79 -0
  39. data/lib/stripe/resources/cash_balance.rb +17 -0
  40. data/lib/stripe/resources/charge.rb +3034 -0
  41. data/lib/stripe/resources/checkout/session.rb +3690 -0
  42. data/lib/stripe/resources/climate/order.rb +176 -0
  43. data/lib/stripe/resources/climate/product.rb +56 -0
  44. data/lib/stripe/resources/climate/supplier.rb +54 -0
  45. data/lib/stripe/resources/confirmation_token.rb +1530 -0
  46. data/lib/stripe/resources/connect_collection_transfer.rb +24 -0
  47. data/lib/stripe/resources/country_spec.rb +63 -0
  48. data/lib/stripe/resources/coupon.rb +198 -0
  49. data/lib/stripe/resources/credit_note.rb +660 -0
  50. data/lib/stripe/resources/credit_note_line_item.rb +65 -0
  51. data/lib/stripe/resources/customer.rb +840 -0
  52. data/lib/stripe/resources/customer_balance_transaction.rb +27 -0
  53. data/lib/stripe/resources/customer_cash_balance_transaction.rb +109 -0
  54. data/lib/stripe/resources/customer_session.rb +159 -0
  55. data/lib/stripe/resources/discount.rb +29 -0
  56. data/lib/stripe/resources/dispute.rb +619 -0
  57. data/lib/stripe/resources/entitlements/active_entitlement.rb +46 -0
  58. data/lib/stripe/resources/entitlements/active_entitlement_summary.rb +23 -0
  59. data/lib/stripe/resources/entitlements/feature.rb +90 -0
  60. data/lib/stripe/resources/ephemeral_key.rb +21 -0
  61. data/lib/stripe/resources/event.rb +130 -0
  62. data/lib/stripe/resources/exchange_rate.rb +33 -0
  63. data/lib/stripe/resources/file.rb +111 -0
  64. data/lib/stripe/resources/file_link.rb +112 -0
  65. data/lib/stripe/resources/financial_connections/account.rb +260 -0
  66. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +27 -0
  67. data/lib/stripe/resources/financial_connections/account_owner.rb +17 -0
  68. data/lib/stripe/resources/financial_connections/account_ownership.rb +9 -0
  69. data/lib/stripe/resources/financial_connections/institution.rb +99 -0
  70. data/lib/stripe/resources/financial_connections/session.rb +159 -0
  71. data/lib/stripe/resources/financial_connections/transaction.rb +101 -0
  72. data/lib/stripe/resources/forwarding/request.rb +165 -0
  73. data/lib/stripe/resources/funding_instructions.rb +308 -0
  74. data/lib/stripe/resources/gift_cards/card.rb +217 -0
  75. data/lib/stripe/resources/gift_cards/transaction.rb +281 -0
  76. data/lib/stripe/resources/identity/verification_report.rb +266 -0
  77. data/lib/stripe/resources/identity/verification_session.rb +361 -0
  78. data/lib/stripe/resources/invoice.rb +8078 -0
  79. data/lib/stripe/resources/invoice_item.rb +445 -0
  80. data/lib/stripe/resources/invoice_line_item.rb +333 -0
  81. data/lib/stripe/resources/invoice_payment.rb +56 -0
  82. data/lib/stripe/resources/invoice_rendering_template.rb +67 -0
  83. data/lib/stripe/resources/issuing/authorization.rb +1113 -0
  84. data/lib/stripe/resources/issuing/card.rb +666 -0
  85. data/lib/stripe/resources/issuing/cardholder.rb +658 -0
  86. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +611 -0
  87. data/lib/stripe/resources/issuing/dispute.rb +790 -0
  88. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +84 -0
  89. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +95 -0
  90. data/lib/stripe/resources/issuing/personalization_design.rb +285 -0
  91. data/lib/stripe/resources/issuing/physical_bundle.rb +63 -0
  92. data/lib/stripe/resources/issuing/settlement.rb +49 -0
  93. data/lib/stripe/resources/issuing/token.rb +175 -0
  94. data/lib/stripe/resources/issuing/transaction.rb +927 -0
  95. data/lib/stripe/resources/line_item.rb +75 -0
  96. data/lib/stripe/resources/login_link.rb +7 -0
  97. data/lib/stripe/resources/mandate.rb +169 -0
  98. data/lib/stripe/resources/margin.rb +124 -0
  99. data/lib/stripe/resources/order.rb +2850 -0
  100. data/lib/stripe/resources/payment_attempt_record.rb +184 -0
  101. data/lib/stripe/resources/payment_intent.rb +12910 -0
  102. data/lib/stripe/resources/payment_link.rb +1563 -0
  103. data/lib/stripe/resources/payment_method.rb +1655 -0
  104. data/lib/stripe/resources/payment_method_configuration.rb +2903 -0
  105. data/lib/stripe/resources/payment_method_domain.rb +153 -0
  106. data/lib/stripe/resources/payment_record.rb +715 -0
  107. data/lib/stripe/resources/payout.rb +218 -0
  108. data/lib/stripe/resources/person.rb +263 -0
  109. data/lib/stripe/resources/plan.rb +317 -0
  110. data/lib/stripe/resources/price.rb +649 -0
  111. data/lib/stripe/resources/product.rb +536 -0
  112. data/lib/stripe/resources/product_feature.rb +12 -0
  113. data/lib/stripe/resources/promotion_code.rb +221 -0
  114. data/lib/stripe/resources/quote.rb +2946 -0
  115. data/lib/stripe/resources/quote_line.rb +274 -0
  116. data/lib/stripe/resources/quote_preview_invoice.rb +652 -0
  117. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +362 -0
  118. data/lib/stripe/resources/radar/early_fraud_warning.rb +77 -0
  119. data/lib/stripe/resources/radar/value_list.rb +125 -0
  120. data/lib/stripe/resources/radar/value_list_item.rb +95 -0
  121. data/lib/stripe/resources/refund.rb +397 -0
  122. data/lib/stripe/resources/reporting/report_run.rb +150 -0
  123. data/lib/stripe/resources/reporting/report_type.rb +36 -0
  124. data/lib/stripe/resources/reserve_transaction.rb +22 -0
  125. data/lib/stripe/resources/reversal.rb +21 -0
  126. data/lib/stripe/resources/review.rb +108 -0
  127. data/lib/stripe/resources/setup_attempt.rb +373 -0
  128. data/lib/stripe/resources/setup_intent.rb +3855 -0
  129. data/lib/stripe/resources/shipping_rate.rb +259 -0
  130. data/lib/stripe/resources/sigma/scheduled_query_run.rb +54 -0
  131. data/lib/stripe/resources/source.rb +1239 -0
  132. data/lib/stripe/resources/source_mandate_notification.rb +66 -0
  133. data/lib/stripe/resources/source_transaction.rb +85 -0
  134. data/lib/stripe/resources/subscription.rb +2057 -0
  135. data/lib/stripe/resources/subscription_item.rb +433 -0
  136. data/lib/stripe/resources/subscription_schedule.rb +2402 -0
  137. data/lib/stripe/resources/tax/association.rb +89 -0
  138. data/lib/stripe/resources/tax/calculation.rb +387 -0
  139. data/lib/stripe/resources/tax/calculation_line_item.rb +56 -0
  140. data/lib/stripe/resources/tax/form.rb +220 -0
  141. data/lib/stripe/resources/tax/registration.rb +2382 -0
  142. data/lib/stripe/resources/tax/settings.rb +126 -0
  143. data/lib/stripe/resources/tax/transaction.rb +267 -0
  144. data/lib/stripe/resources/tax/transaction_line_item.rb +31 -0
  145. data/lib/stripe/resources/tax_code.rb +35 -0
  146. data/lib/stripe/resources/tax_deducted_at_source.rb +22 -0
  147. data/lib/stripe/resources/tax_id.rb +121 -0
  148. data/lib/stripe/resources/tax_rate.rb +202 -2
  149. data/lib/stripe/resources/terminal/configuration.rb +1060 -0
  150. data/lib/stripe/resources/terminal/connection_token.rb +18 -0
  151. data/lib/stripe/resources/terminal/location.rb +175 -0
  152. data/lib/stripe/resources/terminal/reader.rb +774 -0
  153. data/lib/stripe/resources/terminal/reader_collected_data.rb +40 -0
  154. data/lib/stripe/resources/test_helpers/test_clock.rb +86 -0
  155. data/lib/stripe/resources/token.rb +1168 -0
  156. data/lib/stripe/resources/topup.rb +174 -0
  157. data/lib/stripe/resources/transfer.rb +153 -0
  158. data/lib/stripe/resources/treasury/credit_reversal.rb +92 -0
  159. data/lib/stripe/resources/treasury/debit_reversal.rb +103 -0
  160. data/lib/stripe/resources/treasury/financial_account.rb +752 -0
  161. data/lib/stripe/resources/treasury/financial_account_features.rb +191 -0
  162. data/lib/stripe/resources/treasury/inbound_transfer.rb +235 -0
  163. data/lib/stripe/resources/treasury/outbound_payment.rb +495 -0
  164. data/lib/stripe/resources/treasury/outbound_transfer.rb +387 -0
  165. data/lib/stripe/resources/treasury/received_credit.rb +283 -0
  166. data/lib/stripe/resources/treasury/received_debit.rb +244 -0
  167. data/lib/stripe/resources/treasury/transaction.rb +176 -0
  168. data/lib/stripe/resources/treasury/transaction_entry.rb +157 -0
  169. data/lib/stripe/resources/usage_record.rb +13 -0
  170. data/lib/stripe/resources/usage_record_summary.rb +21 -0
  171. data/lib/stripe/resources/v2/amount.rb +9 -0
  172. data/lib/stripe/resources/v2/billing/meter_event.rb +18 -0
  173. data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +21 -0
  174. data/lib/stripe/resources/v2/billing/meter_event_session.rb +14 -0
  175. data/lib/stripe/resources/v2/event.rb +27 -0
  176. data/lib/stripe/resources/v2/event_destination.rb +59 -0
  177. data/lib/stripe/resources/webhook_endpoint.rb +122 -0
  178. data/lib/stripe/resources.rb +31 -0
  179. data/lib/stripe/services/account_capability_service.rb +32 -0
  180. data/lib/stripe/services/account_external_account_service.rb +250 -0
  181. data/lib/stripe/services/account_link_service.rb +46 -0
  182. data/lib/stripe/services/account_login_link_service.rb +9 -0
  183. data/lib/stripe/services/account_notice_service.rb +101 -0
  184. data/lib/stripe/services/account_person_service.rb +875 -0
  185. data/lib/stripe/services/account_service.rb +4441 -0
  186. data/lib/stripe/services/account_session_service.rb +700 -0
  187. data/lib/stripe/services/apple_pay_domain_service.rb +51 -0
  188. data/lib/stripe/services/application_fee_refund_service.rb +54 -0
  189. data/lib/stripe/services/application_fee_service.rb +57 -0
  190. data/lib/stripe/services/apps/secret_service.rb +116 -0
  191. data/lib/stripe/services/balance_service.rb +9 -0
  192. data/lib/stripe/services/balance_transaction_service.rb +69 -0
  193. data/lib/stripe/services/billing/alert_service.rb +113 -0
  194. data/lib/stripe/services/billing/credit_balance_summary_service.rb +48 -0
  195. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +40 -0
  196. data/lib/stripe/services/billing/credit_grant_service.rb +162 -0
  197. data/lib/stripe/services/billing/meter_event_adjustment_service.rb +26 -0
  198. data/lib/stripe/services/billing/meter_event_service.rb +21 -0
  199. data/lib/stripe/services/billing/meter_event_summary_service.rb +39 -0
  200. data/lib/stripe/services/billing/meter_service.rb +130 -0
  201. data/lib/stripe/services/billing_portal/configuration_service.rb +444 -0
  202. data/lib/stripe/services/billing_portal/session_service.rb +173 -0
  203. data/lib/stripe/services/capital/financing_offer_service.rb +112 -0
  204. data/lib/stripe/services/capital/financing_summary_service.rb +28 -0
  205. data/lib/stripe/services/capital/financing_transaction_service.rb +79 -0
  206. data/lib/stripe/services/capital_service.rb +15 -0
  207. data/lib/stripe/services/charge_service.rb +1736 -0
  208. data/lib/stripe/services/checkout/session_line_item_service.rb +18 -0
  209. data/lib/stripe/services/checkout/session_service.rb +2485 -0
  210. data/lib/stripe/services/climate/order_service.rb +102 -0
  211. data/lib/stripe/services/climate/product_service.rb +27 -0
  212. data/lib/stripe/services/climate/supplier_service.rb +27 -0
  213. data/lib/stripe/services/confirmation_token_service.rb +9 -0
  214. data/lib/stripe/services/country_spec_service.rb +27 -0
  215. data/lib/stripe/services/coupon_service.rb +152 -0
  216. data/lib/stripe/services/credit_note_line_item_service.rb +18 -0
  217. data/lib/stripe/services/credit_note_preview_lines_service.rb +156 -0
  218. data/lib/stripe/services/credit_note_service.rb +373 -0
  219. data/lib/stripe/services/customer_balance_transaction_service.rb +63 -0
  220. data/lib/stripe/services/customer_cash_balance_service.rb +29 -0
  221. data/lib/stripe/services/customer_cash_balance_transaction_service.rb +27 -0
  222. data/lib/stripe/services/customer_funding_instructions_service.rb +42 -0
  223. data/lib/stripe/services/customer_payment_method_service.rb +40 -0
  224. data/lib/stripe/services/customer_payment_source_service.rb +179 -0
  225. data/lib/stripe/services/customer_service.rb +593 -0
  226. data/lib/stripe/services/customer_session_service.rb +96 -0
  227. data/lib/stripe/services/customer_tax_id_service.rb +45 -0
  228. data/lib/stripe/services/dispute_service.rb +374 -0
  229. data/lib/stripe/services/entitlements/active_entitlement_service.rb +36 -0
  230. data/lib/stripe/services/entitlements/feature_service.rb +76 -0
  231. data/lib/stripe/services/ephemeral_key_service.rb +36 -0
  232. data/lib/stripe/services/event_service.rb +65 -0
  233. data/lib/stripe/services/exchange_rate_service.rb +27 -0
  234. data/lib/stripe/services/file_link_service.rb +94 -0
  235. data/lib/stripe/services/file_service.rb +89 -0
  236. data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +37 -0
  237. data/lib/stripe/services/financial_connections/account_owner_service.rb +27 -0
  238. data/lib/stripe/services/financial_connections/account_service.rb +99 -1
  239. data/lib/stripe/services/financial_connections/institution_service.rb +57 -0
  240. data/lib/stripe/services/financial_connections/session_service.rb +97 -0
  241. data/lib/stripe/services/financial_connections/transaction_service.rb +70 -0
  242. data/lib/stripe/services/financial_connections_service.rb +2 -1
  243. data/lib/stripe/services/forwarding/request_service.rb +106 -0
  244. data/lib/stripe/services/gift_cards/card_service.rb +170 -0
  245. data/lib/stripe/services/gift_cards/transaction_service.rb +209 -0
  246. data/lib/stripe/services/gift_cards_service.rb +14 -0
  247. data/lib/stripe/services/identity/verification_report_service.rb +65 -0
  248. data/lib/stripe/services/identity/verification_session_service.rb +231 -0
  249. data/lib/stripe/services/invoice_item_service.rb +388 -0
  250. data/lib/stripe/services/invoice_line_item_service.rb +237 -0
  251. data/lib/stripe/services/invoice_payment_service.rb +55 -0
  252. data/lib/stripe/services/invoice_rendering_template_service.rb +51 -0
  253. data/lib/stripe/services/invoice_service.rb +5567 -1
  254. data/lib/stripe/services/invoice_upcoming_lines_service.rb +1864 -0
  255. data/lib/stripe/services/issuing/authorization_service.rb +104 -0
  256. data/lib/stripe/services/issuing/card_service.rb +455 -0
  257. data/lib/stripe/services/issuing/cardholder_service.rb +526 -0
  258. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +504 -0
  259. data/lib/stripe/services/issuing/dispute_service.rb +633 -0
  260. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +66 -0
  261. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +83 -0
  262. data/lib/stripe/services/issuing/personalization_design_service.rb +193 -0
  263. data/lib/stripe/services/issuing/physical_bundle_service.rb +40 -0
  264. data/lib/stripe/services/issuing/token_service.rb +73 -0
  265. data/lib/stripe/services/issuing/transaction_service.rb +81 -0
  266. data/lib/stripe/services/issuing_service.rb +5 -1
  267. data/lib/stripe/services/mandate_service.rb +9 -0
  268. data/lib/stripe/services/margin_service.rb +119 -0
  269. data/lib/stripe/services/order_line_item_service.rb +35 -0
  270. data/lib/stripe/services/order_service.rb +2254 -0
  271. data/lib/stripe/services/payment_attempt_record_service.rb +49 -0
  272. data/lib/stripe/services/payment_intent_service.rb +10936 -0
  273. data/lib/stripe/services/payment_link_line_item_service.rb +18 -0
  274. data/lib/stripe/services/payment_link_service.rb +1223 -0
  275. data/lib/stripe/services/payment_method_configuration_service.rb +2088 -0
  276. data/lib/stripe/services/payment_method_domain_service.rb +76 -0
  277. data/lib/stripe/services/payment_method_service.rb +878 -0
  278. data/lib/stripe/services/payment_record_service.rb +542 -0
  279. data/lib/stripe/services/payout_service.rb +159 -0
  280. data/lib/stripe/services/plan_service.rb +253 -0
  281. data/lib/stripe/services/price_service.rb +516 -0
  282. data/lib/stripe/services/product_feature_service.rb +42 -0
  283. data/lib/stripe/services/product_service.rb +459 -0
  284. data/lib/stripe/services/promotion_code_service.rb +178 -0
  285. data/lib/stripe/services/quote_computed_upfront_line_items_service.rb +18 -0
  286. data/lib/stripe/services/quote_line_item_service.rb +18 -0
  287. data/lib/stripe/services/quote_line_service.rb +35 -0
  288. data/lib/stripe/services/quote_preview_invoice_service.rb +35 -0
  289. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +35 -0
  290. data/lib/stripe/services/quote_service.rb +2319 -1
  291. data/lib/stripe/services/radar/early_fraud_warning_service.rb +61 -0
  292. data/lib/stripe/services/radar/value_list_item_service.rb +79 -0
  293. data/lib/stripe/services/radar/value_list_service.rb +103 -0
  294. data/lib/stripe/services/refund_service.rb +137 -0
  295. data/lib/stripe/services/reporting/report_run_service.rb +106 -0
  296. data/lib/stripe/services/reporting/report_type_service.rb +18 -0
  297. data/lib/stripe/services/review_service.rb +56 -0
  298. data/lib/stripe/services/setup_attempt_service.rb +51 -0
  299. data/lib/stripe/services/setup_intent_service.rb +3497 -0
  300. data/lib/stripe/services/shipping_rate_service.rb +200 -0
  301. data/lib/stripe/services/sigma/scheduled_query_run_service.rb +27 -0
  302. data/lib/stripe/services/source_service.rb +601 -0
  303. data/lib/stripe/services/source_transaction_service.rb +18 -0
  304. data/lib/stripe/services/subscription_item_service.rb +383 -0
  305. data/lib/stripe/services/subscription_item_usage_record_service.rb +18 -0
  306. data/lib/stripe/services/subscription_item_usage_record_summary_service.rb +18 -0
  307. data/lib/stripe/services/subscription_schedule_service.rb +2053 -0
  308. data/lib/stripe/services/subscription_service.rb +1722 -0
  309. data/lib/stripe/services/tax/association_service.rb +31 -0
  310. data/lib/stripe/services/tax/calculation_line_item_service.rb +18 -0
  311. data/lib/stripe/services/tax/calculation_service.rb +205 -0
  312. data/lib/stripe/services/tax/form_service.rb +100 -0
  313. data/lib/stripe/services/tax/registration_service.rb +1564 -0
  314. data/lib/stripe/services/tax/settings_service.rb +74 -0
  315. data/lib/stripe/services/tax/transaction_line_item_service.rb +18 -0
  316. data/lib/stripe/services/tax/transaction_service.rb +111 -0
  317. data/lib/stripe/services/tax_code_service.rb +27 -0
  318. data/lib/stripe/services/tax_id_service.rb +79 -0
  319. data/lib/stripe/services/tax_rate_service.rb +155 -0
  320. data/lib/stripe/services/tax_service.rb +3 -1
  321. data/lib/stripe/services/terminal/configuration_service.rb +831 -0
  322. data/lib/stripe/services/terminal/connection_token_service.rb +12 -0
  323. data/lib/stripe/services/terminal/location_service.rb +144 -0
  324. data/lib/stripe/services/terminal/reader_collected_data_service.rb +28 -0
  325. data/lib/stripe/services/terminal/reader_service.rb +443 -0
  326. data/lib/stripe/services/terminal_service.rb +2 -1
  327. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +680 -0
  328. data/lib/stripe/services/test_helpers/customer_service.rb +18 -0
  329. data/lib/stripe/services/test_helpers/issuing/authorization_service.rb +745 -0
  330. data/lib/stripe/services/test_helpers/issuing/card_service.rb +45 -0
  331. data/lib/stripe/services/test_helpers/issuing/personalization_design_service.rb +41 -0
  332. data/lib/stripe/services/test_helpers/issuing/transaction_service.rb +632 -0
  333. data/lib/stripe/services/test_helpers/refund_service.rb +9 -0
  334. data/lib/stripe/services/test_helpers/terminal/reader_service.rb +44 -0
  335. data/lib/stripe/services/test_helpers/test_clock_service.rb +57 -0
  336. data/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb +38 -0
  337. data/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb +87 -0
  338. data/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb +87 -0
  339. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +84 -0
  340. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +84 -0
  341. data/lib/stripe/services/token_service.rb +1140 -0
  342. data/lib/stripe/services/topup_service.rb +142 -0
  343. data/lib/stripe/services/transfer_reversal_service.rb +66 -0
  344. data/lib/stripe/services/transfer_service.rb +119 -0
  345. data/lib/stripe/services/treasury/credit_reversal_service.rb +59 -0
  346. data/lib/stripe/services/treasury/debit_reversal_service.rb +63 -0
  347. data/lib/stripe/services/treasury/financial_account_features_service.rb +169 -0
  348. data/lib/stripe/services/treasury/financial_account_service.rb +498 -0
  349. data/lib/stripe/services/treasury/inbound_transfer_service.rb +88 -0
  350. data/lib/stripe/services/treasury/outbound_payment_service.rb +258 -0
  351. data/lib/stripe/services/treasury/outbound_transfer_service.rb +148 -0
  352. data/lib/stripe/services/treasury/received_credit_service.rb +52 -0
  353. data/lib/stripe/services/treasury/received_debit_service.rb +40 -0
  354. data/lib/stripe/services/treasury/transaction_entry_service.rb +87 -0
  355. data/lib/stripe/services/treasury/transaction_service.rb +95 -0
  356. data/lib/stripe/services/v1_services.rb +8 -1
  357. data/lib/stripe/services/v2/billing/meter_event_adjustment_service.rb +23 -0
  358. data/lib/stripe/services/v2/billing/meter_event_service.rb +25 -0
  359. data/lib/stripe/services/v2/billing/meter_event_session_service.rb +3 -0
  360. data/lib/stripe/services/v2/billing/meter_event_stream_service.rb +33 -0
  361. data/lib/stripe/services/v2/core/event_destination_service.rb +146 -0
  362. data/lib/stripe/services/v2/core/event_service.rb +18 -0
  363. data/lib/stripe/services/webhook_endpoint_service.rb +96 -0
  364. data/lib/stripe/services.rb +25 -0
  365. data/lib/stripe/stripe_client.rb +1 -1
  366. data/lib/stripe/stripe_configuration.rb +3 -1
  367. data/lib/stripe/stripe_object.rb +5 -0
  368. data/lib/stripe/util.rb +7 -1
  369. data/lib/stripe/version.rb +1 -1
  370. data/lib/stripe.rb +46 -0
  371. data/rbi/stripe/resources/account.rbi +5188 -0
  372. data/rbi/stripe/resources/account_link.rbi +74 -0
  373. data/rbi/stripe/resources/account_notice.rbi +139 -0
  374. data/rbi/stripe/resources/account_session.rbi +1143 -0
  375. data/rbi/stripe/resources/apple_pay_domain.rbi +97 -0
  376. data/rbi/stripe/resources/application.rbi +20 -0
  377. data/rbi/stripe/resources/application_fee.rbi +123 -0
  378. data/rbi/stripe/resources/application_fee_refund.rbi +37 -0
  379. data/rbi/stripe/resources/apps/secret.rbi +195 -0
  380. data/rbi/stripe/resources/balance.rbi +187 -0
  381. data/rbi/stripe/resources/balance_transaction.rbi +149 -0
  382. data/rbi/stripe/resources/bank_account.rbi +127 -0
  383. data/rbi/stripe/resources/billing/alert.rbi +206 -0
  384. data/rbi/stripe/resources/billing/alert_triggered.rbi +28 -0
  385. data/rbi/stripe/resources/billing/credit_balance_summary.rbi +116 -0
  386. data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +154 -0
  387. data/rbi/stripe/resources/billing/credit_grant.rbi +291 -0
  388. data/rbi/stripe/resources/billing/meter.rbi +233 -0
  389. data/rbi/stripe/resources/billing/meter_error_report.rbi +71 -0
  390. data/rbi/stripe/resources/billing/meter_event.rbi +64 -0
  391. data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +64 -0
  392. data/rbi/stripe/resources/billing/meter_event_summary.rbi +35 -0
  393. data/rbi/stripe/resources/billing_portal/configuration.rbi +640 -0
  394. data/rbi/stripe/resources/billing_portal/session.rbi +341 -0
  395. data/rbi/stripe/resources/capability.rbi +125 -0
  396. data/rbi/stripe/resources/capital/financing_offer.rbi +190 -0
  397. data/rbi/stripe/resources/capital/financing_summary.rbi +74 -0
  398. data/rbi/stripe/resources/capital/financing_transaction.rbi +130 -0
  399. data/rbi/stripe/resources/card.rbi +128 -0
  400. data/rbi/stripe/resources/cash_balance.rbi +32 -0
  401. data/rbi/stripe/resources/charge.rbi +3494 -0
  402. data/rbi/stripe/resources/checkout/session.rbi +4036 -0
  403. data/rbi/stripe/resources/climate/order.rbi +250 -0
  404. data/rbi/stripe/resources/climate/product.rbi +82 -0
  405. data/rbi/stripe/resources/climate/supplier.rbi +79 -0
  406. data/rbi/stripe/resources/confirmation_token.rbi +1787 -0
  407. data/rbi/stripe/resources/connect_collection_transfer.rbi +26 -0
  408. data/rbi/stripe/resources/country_spec.rbi +92 -0
  409. data/rbi/stripe/resources/coupon.rbi +257 -0
  410. data/rbi/stripe/resources/credit_note.rbi +759 -0
  411. data/rbi/stripe/resources/credit_note_line_item.rbi +99 -0
  412. data/rbi/stripe/resources/customer.rbi +1001 -0
  413. data/rbi/stripe/resources/customer_balance_transaction.rbi +53 -0
  414. data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +151 -0
  415. data/rbi/stripe/resources/customer_session.rbi +196 -0
  416. data/rbi/stripe/resources/discount.rbi +53 -0
  417. data/rbi/stripe/resources/dispute.rbi +764 -0
  418. data/rbi/stripe/resources/entitlements/active_entitlement.rbi +65 -0
  419. data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +23 -0
  420. data/rbi/stripe/resources/entitlements/feature.rbi +124 -0
  421. data/rbi/stripe/resources/ephemeral_key.rbi +44 -0
  422. data/rbi/stripe/resources/event.rbi +190 -0
  423. data/rbi/stripe/resources/exchange_rate.rbi +73 -0
  424. data/rbi/stripe/resources/file.rbi +148 -0
  425. data/rbi/stripe/resources/file_link.rbi +146 -0
  426. data/rbi/stripe/resources/financial_connections/account.rbi +358 -0
  427. data/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi +27 -0
  428. data/rbi/stripe/resources/financial_connections/account_owner.rbi +35 -0
  429. data/rbi/stripe/resources/financial_connections/account_ownership.rbi +23 -0
  430. data/rbi/stripe/resources/financial_connections/institution.rbi +99 -0
  431. data/rbi/stripe/resources/financial_connections/session.rbi +186 -0
  432. data/rbi/stripe/resources/financial_connections/transaction.rbi +127 -0
  433. data/rbi/stripe/resources/forwarding/request.rbi +219 -0
  434. data/rbi/stripe/resources/funding_instructions.rbi +437 -0
  435. data/rbi/stripe/resources/gift_cards/card.rbi +206 -0
  436. data/rbi/stripe/resources/gift_cards/transaction.rbi +257 -0
  437. data/rbi/stripe/resources/identity/verification_report.rbi +354 -0
  438. data/rbi/stripe/resources/identity/verification_session.rbi +518 -0
  439. data/rbi/stripe/resources/invoice.rbi +8928 -0
  440. data/rbi/stripe/resources/invoice_item.rbi +514 -0
  441. data/rbi/stripe/resources/invoice_line_item.rbi +400 -0
  442. data/rbi/stripe/resources/invoice_payment.rbi +70 -0
  443. data/rbi/stripe/resources/invoice_rendering_template.rbi +114 -0
  444. data/rbi/stripe/resources/issuing/authorization.rbi +1266 -0
  445. data/rbi/stripe/resources/issuing/card.rbi +738 -0
  446. data/rbi/stripe/resources/issuing/cardholder.rbi +732 -0
  447. data/rbi/stripe/resources/issuing/credit_underwriting_record.rbi +622 -0
  448. data/rbi/stripe/resources/issuing/dispute.rbi +900 -0
  449. data/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi +83 -0
  450. data/rbi/stripe/resources/issuing/fraud_liability_debit.rbi +90 -0
  451. data/rbi/stripe/resources/issuing/personalization_design.rbi +333 -0
  452. data/rbi/stripe/resources/issuing/physical_bundle.rbi +86 -0
  453. data/rbi/stripe/resources/issuing/settlement.rbi +62 -0
  454. data/rbi/stripe/resources/issuing/token.rbi +231 -0
  455. data/rbi/stripe/resources/issuing/transaction.rbi +1057 -0
  456. data/rbi/stripe/resources/line_item.rbi +108 -0
  457. data/rbi/stripe/resources/login_link.rbi +18 -0
  458. data/rbi/stripe/resources/mandate.rbi +219 -0
  459. data/rbi/stripe/resources/margin.rbi +127 -0
  460. data/rbi/stripe/resources/order.rbi +3016 -0
  461. data/rbi/stripe/resources/payment_attempt_record.rbi +215 -0
  462. data/rbi/stripe/resources/payment_intent.rbi +13895 -0
  463. data/rbi/stripe/resources/payment_link.rbi +1666 -0
  464. data/rbi/stripe/resources/payment_method.rbi +1926 -0
  465. data/rbi/stripe/resources/payment_method_configuration.rbi +3237 -0
  466. data/rbi/stripe/resources/payment_method_domain.rbi +217 -0
  467. data/rbi/stripe/resources/payment_record.rbi +722 -0
  468. data/rbi/stripe/resources/payout.rbi +299 -0
  469. data/rbi/stripe/resources/person.rbi +371 -0
  470. data/rbi/stripe/resources/plan.rbi +385 -0
  471. data/rbi/stripe/resources/price.rbi +731 -0
  472. data/rbi/stripe/resources/product.rbi +615 -0
  473. data/rbi/stripe/resources/product_feature.rbi +26 -0
  474. data/rbi/stripe/resources/promotion_code.rbi +266 -0
  475. data/rbi/stripe/resources/quote.rbi +3186 -0
  476. data/rbi/stripe/resources/quote_line.rbi +350 -0
  477. data/rbi/stripe/resources/quote_preview_invoice.rbi +850 -0
  478. data/rbi/stripe/resources/quote_preview_subscription_schedule.rbi +474 -0
  479. data/rbi/stripe/resources/radar/early_fraud_warning.rbi +101 -0
  480. data/rbi/stripe/resources/radar/value_list.rbi +175 -0
  481. data/rbi/stripe/resources/radar/value_list_item.rbi +134 -0
  482. data/rbi/stripe/resources/refund.rbi +515 -0
  483. data/rbi/stripe/resources/reporting/report_run.rbi +194 -0
  484. data/rbi/stripe/resources/reporting/report_type.rbi +64 -0
  485. data/rbi/stripe/resources/reserve_transaction.rbi +23 -0
  486. data/rbi/stripe/resources/reversal.rbi +51 -0
  487. data/rbi/stripe/resources/review.rbi +159 -0
  488. data/rbi/stripe/resources/setup_attempt.rbi +484 -0
  489. data/rbi/stripe/resources/setup_intent.rbi +4062 -0
  490. data/rbi/stripe/resources/shipping_rate.rbi +310 -0
  491. data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +82 -0
  492. data/rbi/stripe/resources/source.rbi +1543 -0
  493. data/rbi/stripe/resources/source_mandate_notification.rbi +77 -0
  494. data/rbi/stripe/resources/source_transaction.rbi +127 -0
  495. data/rbi/stripe/resources/subscription.rbi +2308 -0
  496. data/rbi/stripe/resources/subscription_item.rbi +478 -0
  497. data/rbi/stripe/resources/subscription_schedule.rbi +2653 -0
  498. data/rbi/stripe/resources/tax/association.rbi +94 -0
  499. data/rbi/stripe/resources/tax/calculation.rbi +479 -0
  500. data/rbi/stripe/resources/tax/calculation_line_item.rbi +88 -0
  501. data/rbi/stripe/resources/tax/form.rbi +224 -0
  502. data/rbi/stripe/resources/tax/registration.rbi +2438 -0
  503. data/rbi/stripe/resources/tax/settings.rbi +148 -0
  504. data/rbi/stripe/resources/tax/transaction.rbi +356 -0
  505. data/rbi/stripe/resources/tax/transaction_line_item.rbi +54 -0
  506. data/rbi/stripe/resources/tax_code.rbi +51 -0
  507. data/rbi/stripe/resources/tax_deducted_at_source.rbi +23 -0
  508. data/rbi/stripe/resources/tax_id.rbi +174 -0
  509. data/rbi/stripe/resources/tax_rate.rbi +244 -0
  510. data/rbi/stripe/resources/terminal/configuration.rbi +1143 -0
  511. data/rbi/stripe/resources/terminal/connection_token.rbi +37 -0
  512. data/rbi/stripe/resources/terminal/location.rbi +231 -0
  513. data/rbi/stripe/resources/terminal/reader.rbi +940 -0
  514. data/rbi/stripe/resources/terminal/reader_collected_data.rbi +41 -0
  515. data/rbi/stripe/resources/test_helpers/test_clock.rbi +139 -0
  516. data/rbi/stripe/resources/token.rbi +1192 -0
  517. data/rbi/stripe/resources/topup.rbi +225 -0
  518. data/rbi/stripe/resources/transfer.rbi +204 -0
  519. data/rbi/stripe/resources/treasury/credit_reversal.rbi +126 -0
  520. data/rbi/stripe/resources/treasury/debit_reversal.rbi +138 -0
  521. data/rbi/stripe/resources/treasury/financial_account.rbi +870 -0
  522. data/rbi/stripe/resources/treasury/financial_account_features.rbi +263 -0
  523. data/rbi/stripe/resources/treasury/inbound_transfer.rbi +302 -0
  524. data/rbi/stripe/resources/treasury/outbound_payment.rbi +589 -0
  525. data/rbi/stripe/resources/treasury/outbound_transfer.rbi +473 -0
  526. data/rbi/stripe/resources/treasury/received_credit.rbi +348 -0
  527. data/rbi/stripe/resources/treasury/received_debit.rbi +305 -0
  528. data/rbi/stripe/resources/treasury/transaction.rbi +216 -0
  529. data/rbi/stripe/resources/treasury/transaction_entry.rbi +193 -0
  530. data/rbi/stripe/resources/usage_record.rbi +32 -0
  531. data/rbi/stripe/resources/usage_record_summary.rbi +38 -0
  532. data/rbi/stripe/resources/v2/amount.rbi +14 -0
  533. data/rbi/stripe/resources/v2/billing/meter_event.rbi +37 -0
  534. data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +41 -0
  535. data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +31 -0
  536. data/rbi/stripe/resources/v2/event.rbi +47 -0
  537. data/rbi/stripe/resources/v2/event_destination.rbi +90 -0
  538. data/rbi/stripe/resources/webhook_endpoint.rbi +177 -0
  539. data/rbi/stripe/services/account_capability_service.rbi +51 -0
  540. data/rbi/stripe/services/account_external_account_service.rbi +306 -0
  541. data/rbi/stripe/services/account_link_service.rbi +58 -0
  542. data/rbi/stripe/services/account_login_link_service.rbi +22 -0
  543. data/rbi/stripe/services/account_notice_service.rbi +90 -0
  544. data/rbi/stripe/services/account_person_service.rbi +903 -0
  545. data/rbi/stripe/services/account_service.rbi +4267 -0
  546. data/rbi/stripe/services/account_session_service.rbi +803 -0
  547. data/rbi/stripe/services/apple_pay_domain_service.rbi +78 -0
  548. data/rbi/stripe/services/application_fee_refund_service.rbi +91 -0
  549. data/rbi/stripe/services/application_fee_service.rbi +74 -0
  550. data/rbi/stripe/services/apps/secret_service.rbi +151 -0
  551. data/rbi/stripe/services/apps_service.rbi +9 -0
  552. data/rbi/stripe/services/balance_service.rbi +21 -0
  553. data/rbi/stripe/services/balance_transaction_service.rbi +89 -0
  554. data/rbi/stripe/services/billing/alert_service.rbi +152 -0
  555. data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +68 -0
  556. data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +59 -0
  557. data/rbi/stripe/services/billing/credit_grant_service.rbi +205 -0
  558. data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +40 -0
  559. data/rbi/stripe/services/billing/meter_event_service.rbi +42 -0
  560. data/rbi/stripe/services/billing/meter_event_summary_service.rbi +54 -0
  561. data/rbi/stripe/services/billing/meter_service.rbi +163 -0
  562. data/rbi/stripe/services/billing_portal/configuration_service.rbi +497 -0
  563. data/rbi/stripe/services/billing_portal/session_service.rbi +202 -0
  564. data/rbi/stripe/services/billing_portal_service.rbi +10 -0
  565. data/rbi/stripe/services/billing_service.rbi +15 -0
  566. data/rbi/stripe/services/capital/financing_offer_service.rbi +95 -0
  567. data/rbi/stripe/services/capital/financing_summary_service.rbi +22 -0
  568. data/rbi/stripe/services/capital/financing_transaction_service.rbi +68 -0
  569. data/rbi/stripe/services/capital_service.rbi +11 -0
  570. data/rbi/stripe/services/charge_service.rbi +1816 -0
  571. data/rbi/stripe/services/checkout/session_line_item_service.rbi +33 -0
  572. data/rbi/stripe/services/checkout/session_service.rbi +2604 -0
  573. data/rbi/stripe/services/checkout_service.rbi +9 -0
  574. data/rbi/stripe/services/climate/order_service.rbi +140 -0
  575. data/rbi/stripe/services/climate/product_service.rbi +46 -0
  576. data/rbi/stripe/services/climate/supplier_service.rbi +46 -0
  577. data/rbi/stripe/services/climate_service.rbi +11 -0
  578. data/rbi/stripe/services/confirmation_token_service.rbi +20 -0
  579. data/rbi/stripe/services/country_spec_service.rbi +44 -0
  580. data/rbi/stripe/services/coupon_service.rbi +190 -0
  581. data/rbi/stripe/services/credit_note_line_item_service.rbi +31 -0
  582. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +167 -0
  583. data/rbi/stripe/services/credit_note_service.rbi +420 -0
  584. data/rbi/stripe/services/customer_balance_transaction_service.rbi +92 -0
  585. data/rbi/stripe/services/customer_cash_balance_service.rbi +45 -0
  586. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +44 -0
  587. data/rbi/stripe/services/customer_funding_instructions_service.rbi +59 -0
  588. data/rbi/stripe/services/customer_payment_method_service.rbi +57 -0
  589. data/rbi/stripe/services/customer_payment_source_service.rbi +228 -0
  590. data/rbi/stripe/services/customer_service.rbi +647 -0
  591. data/rbi/stripe/services/customer_session_service.rbi +110 -0
  592. data/rbi/stripe/services/customer_tax_id_service.rbi +72 -0
  593. data/rbi/stripe/services/dispute_service.rbi +422 -0
  594. data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +55 -0
  595. data/rbi/stripe/services/entitlements/feature_service.rbi +107 -0
  596. data/rbi/stripe/services/entitlements_service.rbi +10 -0
  597. data/rbi/stripe/services/ephemeral_key_service.rbi +53 -0
  598. data/rbi/stripe/services/event_service.rbi +81 -0
  599. data/rbi/stripe/services/exchange_rate_service.rbi +44 -0
  600. data/rbi/stripe/services/file_link_service.rbi +122 -0
  601. data/rbi/stripe/services/file_service.rbi +114 -0
  602. data/rbi/stripe/services/financial_connections/account_inferred_balance_service.rbi +33 -0
  603. data/rbi/stripe/services/financial_connections/account_owner_service.rbi +42 -0
  604. data/rbi/stripe/services/financial_connections/account_service.rbi +132 -0
  605. data/rbi/stripe/services/financial_connections/institution_service.rbi +46 -0
  606. data/rbi/stripe/services/financial_connections/session_service.rbi +111 -0
  607. data/rbi/stripe/services/financial_connections/transaction_service.rbi +90 -0
  608. data/rbi/stripe/services/financial_connections_service.rbi +12 -0
  609. data/rbi/stripe/services/forwarding/request_service.rbi +132 -0
  610. data/rbi/stripe/services/forwarding_service.rbi +9 -0
  611. data/rbi/stripe/services/gift_cards/card_service.rbi +142 -0
  612. data/rbi/stripe/services/gift_cards/transaction_service.rbi +174 -0
  613. data/rbi/stripe/services/gift_cards_service.rbi +10 -0
  614. data/rbi/stripe/services/identity/verification_report_service.rbi +85 -0
  615. data/rbi/stripe/services/identity/verification_session_service.rbi +317 -0
  616. data/rbi/stripe/services/identity_service.rbi +10 -0
  617. data/rbi/stripe/services/invoice_item_service.rbi +424 -0
  618. data/rbi/stripe/services/invoice_line_item_service.rbi +270 -0
  619. data/rbi/stripe/services/invoice_payment_service.rbi +44 -0
  620. data/rbi/stripe/services/invoice_rendering_template_service.rbi +82 -0
  621. data/rbi/stripe/services/invoice_service.rbi +6040 -0
  622. data/rbi/stripe/services/invoice_upcoming_lines_service.rbi +2023 -0
  623. data/rbi/stripe/services/issuing/authorization_service.rbi +140 -0
  624. data/rbi/stripe/services/issuing/card_service.rbi +479 -0
  625. data/rbi/stripe/services/issuing/cardholder_service.rbi +568 -0
  626. data/rbi/stripe/services/issuing/credit_underwriting_record_service.rbi +498 -0
  627. data/rbi/stripe/services/issuing/dispute_service.rbi +701 -0
  628. data/rbi/stripe/services/issuing/dispute_settlement_detail_service.rbi +55 -0
  629. data/rbi/stripe/services/issuing/fraud_liability_debit_service.rbi +73 -0
  630. data/rbi/stripe/services/issuing/personalization_design_service.rbi +233 -0
  631. data/rbi/stripe/services/issuing/physical_bundle_service.rbi +59 -0
  632. data/rbi/stripe/services/issuing/token_service.rbi +95 -0
  633. data/rbi/stripe/services/issuing/transaction_service.rbi +103 -0
  634. data/rbi/stripe/services/issuing_service.rbi +19 -0
  635. data/rbi/stripe/services/mandate_service.rbi +20 -0
  636. data/rbi/stripe/services/margin_service.rbi +104 -0
  637. data/rbi/stripe/services/order_line_item_service.rbi +31 -0
  638. data/rbi/stripe/services/order_service.rbi +2306 -0
  639. data/rbi/stripe/services/payment_attempt_record_service.rbi +36 -0
  640. data/rbi/stripe/services/payment_intent_service.rbi +11477 -0
  641. data/rbi/stripe/services/payment_link_line_item_service.rbi +31 -0
  642. data/rbi/stripe/services/payment_link_service.rbi +1250 -0
  643. data/rbi/stripe/services/payment_method_configuration_service.rbi +2215 -0
  644. data/rbi/stripe/services/payment_method_domain_service.rbi +110 -0
  645. data/rbi/stripe/services/payment_method_service.rbi +897 -0
  646. data/rbi/stripe/services/payment_record_service.rbi +521 -0
  647. data/rbi/stripe/services/payout_service.rbi +197 -0
  648. data/rbi/stripe/services/plan_service.rbi +286 -0
  649. data/rbi/stripe/services/price_service.rbi +551 -0
  650. data/rbi/stripe/services/product_feature_service.rbi +69 -0
  651. data/rbi/stripe/services/product_service.rbi +503 -0
  652. data/rbi/stripe/services/promotion_code_service.rbi +210 -0
  653. data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +31 -0
  654. data/rbi/stripe/services/quote_line_item_service.rbi +31 -0
  655. data/rbi/stripe/services/quote_line_service.rbi +31 -0
  656. data/rbi/stripe/services/quote_preview_invoice_service.rbi +31 -0
  657. data/rbi/stripe/services/quote_preview_subscription_schedule_service.rbi +31 -0
  658. data/rbi/stripe/services/quote_service.rbi +2390 -0
  659. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +83 -0
  660. data/rbi/stripe/services/radar/value_list_item_service.rbi +107 -0
  661. data/rbi/stripe/services/radar/value_list_service.rbi +139 -0
  662. data/rbi/stripe/services/radar_service.rbi +11 -0
  663. data/rbi/stripe/services/refund_service.rbi +181 -0
  664. data/rbi/stripe/services/reporting/report_run_service.rbi +131 -0
  665. data/rbi/stripe/services/reporting/report_type_service.rbi +35 -0
  666. data/rbi/stripe/services/reporting_service.rbi +10 -0
  667. data/rbi/stripe/services/review_service.rbi +82 -0
  668. data/rbi/stripe/services/setup_attempt_service.rbi +63 -0
  669. data/rbi/stripe/services/setup_intent_service.rbi +3630 -0
  670. data/rbi/stripe/services/shipping_rate_service.rbi +235 -0
  671. data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +46 -0
  672. data/rbi/stripe/services/sigma_service.rbi +9 -0
  673. data/rbi/stripe/services/source_service.rbi +647 -0
  674. data/rbi/stripe/services/source_transaction_service.rbi +31 -0
  675. data/rbi/stripe/services/subscription_item_service.rbi +422 -0
  676. data/rbi/stripe/services/subscription_item_usage_record_service.rbi +37 -0
  677. data/rbi/stripe/services/subscription_item_usage_record_summary_service.rbi +33 -0
  678. data/rbi/stripe/services/subscription_schedule_service.rbi +2208 -0
  679. data/rbi/stripe/services/subscription_service.rbi +1870 -0
  680. data/rbi/stripe/services/tax/association_service.rbi +25 -0
  681. data/rbi/stripe/services/tax/calculation_line_item_service.rbi +33 -0
  682. data/rbi/stripe/services/tax/calculation_service.rbi +228 -0
  683. data/rbi/stripe/services/tax/form_service.rbi +85 -0
  684. data/rbi/stripe/services/tax/registration_service.rbi +1517 -0
  685. data/rbi/stripe/services/tax/settings_service.rbi +93 -0
  686. data/rbi/stripe/services/tax/transaction_line_item_service.rbi +33 -0
  687. data/rbi/stripe/services/tax/transaction_service.rbi +142 -0
  688. data/rbi/stripe/services/tax_code_service.rbi +44 -0
  689. data/rbi/stripe/services/tax_id_service.rbi +112 -0
  690. data/rbi/stripe/services/tax_rate_service.rbi +183 -0
  691. data/rbi/stripe/services/tax_service.rbi +14 -0
  692. data/rbi/stripe/services/terminal/configuration_service.rbi +860 -0
  693. data/rbi/stripe/services/terminal/connection_token_service.rbi +25 -0
  694. data/rbi/stripe/services/terminal/location_service.rbi +184 -0
  695. data/rbi/stripe/services/terminal/reader_collected_data_service.rbi +22 -0
  696. data/rbi/stripe/services/terminal/reader_service.rbi +513 -0
  697. data/rbi/stripe/services/terminal_service.rbi +13 -0
  698. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +787 -0
  699. data/rbi/stripe/services/test_helpers/customer_service.rbi +33 -0
  700. data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +836 -0
  701. data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +76 -0
  702. data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +67 -0
  703. data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +705 -0
  704. data/rbi/stripe/services/test_helpers/issuing_service.rbi +14 -0
  705. data/rbi/stripe/services/test_helpers/refund_service.rbi +22 -0
  706. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +62 -0
  707. data/rbi/stripe/services/test_helpers/terminal_service.rbi +11 -0
  708. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +90 -0
  709. data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +64 -0
  710. data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +123 -0
  711. data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +123 -0
  712. data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +114 -0
  713. data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +114 -0
  714. data/rbi/stripe/services/test_helpers/treasury_service.rbi +15 -0
  715. data/rbi/stripe/services/test_helpers_service.rbi +15 -0
  716. data/rbi/stripe/services/token_service.rbi +1155 -0
  717. data/rbi/stripe/services/topup_service.rbi +172 -0
  718. data/rbi/stripe/services/transfer_reversal_service.rbi +99 -0
  719. data/rbi/stripe/services/transfer_service.rbi +150 -0
  720. data/rbi/stripe/services/treasury/credit_reversal_service.rbi +84 -0
  721. data/rbi/stripe/services/treasury/debit_reversal_service.rbi +88 -0
  722. data/rbi/stripe/services/treasury/financial_account_features_service.rbi +201 -0
  723. data/rbi/stripe/services/treasury/financial_account_service.rbi +566 -0
  724. data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +117 -0
  725. data/rbi/stripe/services/treasury/outbound_payment_service.rbi +300 -0
  726. data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +182 -0
  727. data/rbi/stripe/services/treasury/received_credit_service.rbi +70 -0
  728. data/rbi/stripe/services/treasury/received_debit_service.rbi +59 -0
  729. data/rbi/stripe/services/treasury/transaction_entry_service.rbi +107 -0
  730. data/rbi/stripe/services/treasury/transaction_service.rbi +114 -0
  731. data/rbi/stripe/services/treasury_service.rbi +18 -0
  732. data/rbi/stripe/services/v1_services.rbi +83 -0
  733. data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +39 -0
  734. data/rbi/stripe/services/v2/billing/meter_event_service.rbi +42 -0
  735. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +20 -0
  736. data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +55 -0
  737. data/rbi/stripe/services/v2/billing_service.rbi +14 -0
  738. data/rbi/stripe/services/v2/core/event_destination_service.rbi +203 -0
  739. data/rbi/stripe/services/v2/core/event_service.rbi +39 -0
  740. data/rbi/stripe/services/v2/core_service.rbi +12 -0
  741. data/rbi/stripe/services/v2_services.rbi +10 -0
  742. data/rbi/stripe/services/webhook_endpoint_service.rbi +131 -0
  743. metadata +435 -4
@@ -11,6 +11,2491 @@ module Stripe
11
11
  @line_items = Stripe::Checkout::SessionLineItemService.new(@requestor)
12
12
  end
13
13
 
14
+ class ListParams < Stripe::RequestParams
15
+ class Created < Stripe::RequestParams
16
+ # Minimum value to filter by (exclusive)
17
+ attr_accessor :gt
18
+ # Minimum value to filter by (inclusive)
19
+ attr_accessor :gte
20
+ # Maximum value to filter by (exclusive)
21
+ attr_accessor :lt
22
+ # Maximum value to filter by (inclusive)
23
+ attr_accessor :lte
24
+
25
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
26
+ @gt = gt
27
+ @gte = gte
28
+ @lt = lt
29
+ @lte = lte
30
+ end
31
+ end
32
+
33
+ class CustomerDetails < Stripe::RequestParams
34
+ # Customer's email address.
35
+ attr_accessor :email
36
+
37
+ def initialize(email: nil)
38
+ @email = email
39
+ end
40
+ end
41
+ # Only return Checkout Sessions that were created during the given date interval.
42
+ attr_accessor :created
43
+ # Only return the Checkout Sessions for the Customer specified.
44
+ attr_accessor :customer
45
+ # Only return the Checkout Sessions for the Customer details specified.
46
+ attr_accessor :customer_details
47
+ # 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.
48
+ attr_accessor :ending_before
49
+ # Specifies which fields in the response should be expanded.
50
+ attr_accessor :expand
51
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
52
+ attr_accessor :limit
53
+ # Only return the Checkout Session for the PaymentIntent specified.
54
+ attr_accessor :payment_intent
55
+ # Only return the Checkout Sessions for the Payment Link specified.
56
+ attr_accessor :payment_link
57
+ # 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.
58
+ attr_accessor :starting_after
59
+ # Only return the Checkout Sessions matching the given status.
60
+ attr_accessor :status
61
+ # Only return the Checkout Session for the subscription specified.
62
+ attr_accessor :subscription
63
+
64
+ def initialize(
65
+ created: nil,
66
+ customer: nil,
67
+ customer_details: nil,
68
+ ending_before: nil,
69
+ expand: nil,
70
+ limit: nil,
71
+ payment_intent: nil,
72
+ payment_link: nil,
73
+ starting_after: nil,
74
+ status: nil,
75
+ subscription: nil
76
+ )
77
+ @created = created
78
+ @customer = customer
79
+ @customer_details = customer_details
80
+ @ending_before = ending_before
81
+ @expand = expand
82
+ @limit = limit
83
+ @payment_intent = payment_intent
84
+ @payment_link = payment_link
85
+ @starting_after = starting_after
86
+ @status = status
87
+ @subscription = subscription
88
+ end
89
+ end
90
+
91
+ class CreateParams < Stripe::RequestParams
92
+ class AdaptivePricing < Stripe::RequestParams
93
+ # 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).
94
+ attr_accessor :enabled
95
+
96
+ def initialize(enabled: nil)
97
+ @enabled = enabled
98
+ end
99
+ end
100
+
101
+ class AfterExpiration < Stripe::RequestParams
102
+ class Recovery < Stripe::RequestParams
103
+ # Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false`
104
+ attr_accessor :allow_promotion_codes
105
+ # If `true`, a recovery URL will be generated to recover this Checkout Session if it
106
+ # expires before a successful transaction is completed. It will be attached to the
107
+ # Checkout Session object upon expiration.
108
+ attr_accessor :enabled
109
+
110
+ def initialize(allow_promotion_codes: nil, enabled: nil)
111
+ @allow_promotion_codes = allow_promotion_codes
112
+ @enabled = enabled
113
+ end
114
+ end
115
+ # Configure a Checkout Session that can be used to recover an expired session.
116
+ attr_accessor :recovery
117
+
118
+ def initialize(recovery: nil)
119
+ @recovery = recovery
120
+ end
121
+ end
122
+
123
+ class AutomaticTax < Stripe::RequestParams
124
+ class Liability < Stripe::RequestParams
125
+ # The connected account being referenced when `type` is `account`.
126
+ attr_accessor :account
127
+ # Type of the account referenced in the request.
128
+ attr_accessor :type
129
+
130
+ def initialize(account: nil, type: nil)
131
+ @account = account
132
+ @type = type
133
+ end
134
+ end
135
+ # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location.
136
+ #
137
+ # Enabling this parameter causes Checkout to collect any billing address information necessary for tax calculation.
138
+ attr_accessor :enabled
139
+ # 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.
140
+ attr_accessor :liability
141
+
142
+ def initialize(enabled: nil, liability: nil)
143
+ @enabled = enabled
144
+ @liability = liability
145
+ end
146
+ end
147
+
148
+ class ConsentCollection < Stripe::RequestParams
149
+ class PaymentMethodReuseAgreement < Stripe::RequestParams
150
+ # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's
151
+ # defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
152
+ attr_accessor :position
153
+
154
+ def initialize(position: nil)
155
+ @position = position
156
+ end
157
+ end
158
+ # 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.
159
+ attr_accessor :payment_method_reuse_agreement
160
+ # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout
161
+ # Session will determine whether to display an option to opt into promotional communication
162
+ # from the merchant depending on the customer's locale. Only available to US merchants.
163
+ attr_accessor :promotions
164
+ # If set to `required`, it requires customers to check a terms of service checkbox before being able to pay.
165
+ # There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public).
166
+ attr_accessor :terms_of_service
167
+
168
+ def initialize(
169
+ payment_method_reuse_agreement: nil,
170
+ promotions: nil,
171
+ terms_of_service: nil
172
+ )
173
+ @payment_method_reuse_agreement = payment_method_reuse_agreement
174
+ @promotions = promotions
175
+ @terms_of_service = terms_of_service
176
+ end
177
+ end
178
+
179
+ class CustomField < Stripe::RequestParams
180
+ class Dropdown < Stripe::RequestParams
181
+ class Option < Stripe::RequestParams
182
+ # The label for the option, displayed to the customer. Up to 100 characters.
183
+ attr_accessor :label
184
+ # 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.
185
+ attr_accessor :value
186
+
187
+ def initialize(label: nil, value: nil)
188
+ @label = label
189
+ @value = value
190
+ end
191
+ end
192
+ # The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array.
193
+ attr_accessor :default_value
194
+ # The options available for the customer to select. Up to 200 options allowed.
195
+ attr_accessor :options
196
+
197
+ def initialize(default_value: nil, options: nil)
198
+ @default_value = default_value
199
+ @options = options
200
+ end
201
+ end
202
+
203
+ class Label < Stripe::RequestParams
204
+ # Custom text for the label, displayed to the customer. Up to 50 characters.
205
+ attr_accessor :custom
206
+ # The type of the label.
207
+ attr_accessor :type
208
+
209
+ def initialize(custom: nil, type: nil)
210
+ @custom = custom
211
+ @type = type
212
+ end
213
+ end
214
+
215
+ class Numeric < Stripe::RequestParams
216
+ # The value that will pre-fill the field on the payment page.
217
+ attr_accessor :default_value
218
+ # The maximum character length constraint for the customer's input.
219
+ attr_accessor :maximum_length
220
+ # The minimum character length requirement for the customer's input.
221
+ attr_accessor :minimum_length
222
+
223
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil)
224
+ @default_value = default_value
225
+ @maximum_length = maximum_length
226
+ @minimum_length = minimum_length
227
+ end
228
+ end
229
+
230
+ class Text < Stripe::RequestParams
231
+ # The value that will pre-fill the field on the payment page.
232
+ attr_accessor :default_value
233
+ # The maximum character length constraint for the customer's input.
234
+ attr_accessor :maximum_length
235
+ # The minimum character length requirement for the customer's input.
236
+ attr_accessor :minimum_length
237
+
238
+ def initialize(default_value: nil, maximum_length: nil, minimum_length: nil)
239
+ @default_value = default_value
240
+ @maximum_length = maximum_length
241
+ @minimum_length = minimum_length
242
+ end
243
+ end
244
+ # Configuration for `type=dropdown` fields.
245
+ attr_accessor :dropdown
246
+ # 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.
247
+ attr_accessor :key
248
+ # The label for the field, displayed to the customer.
249
+ attr_accessor :label
250
+ # Configuration for `type=numeric` fields.
251
+ attr_accessor :numeric
252
+ # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
253
+ attr_accessor :optional
254
+ # Configuration for `type=text` fields.
255
+ attr_accessor :text
256
+ # The type of the field.
257
+ attr_accessor :type
258
+
259
+ def initialize(
260
+ dropdown: nil,
261
+ key: nil,
262
+ label: nil,
263
+ numeric: nil,
264
+ optional: nil,
265
+ text: nil,
266
+ type: nil
267
+ )
268
+ @dropdown = dropdown
269
+ @key = key
270
+ @label = label
271
+ @numeric = numeric
272
+ @optional = optional
273
+ @text = text
274
+ @type = type
275
+ end
276
+ end
277
+
278
+ class CustomText < Stripe::RequestParams
279
+ class AfterSubmit < Stripe::RequestParams
280
+ # Text may be up to 1200 characters in length.
281
+ attr_accessor :message
282
+
283
+ def initialize(message: nil)
284
+ @message = message
285
+ end
286
+ end
287
+
288
+ class ShippingAddress < Stripe::RequestParams
289
+ # Text may be up to 1200 characters in length.
290
+ attr_accessor :message
291
+
292
+ def initialize(message: nil)
293
+ @message = message
294
+ end
295
+ end
296
+
297
+ class Submit < Stripe::RequestParams
298
+ # Text may be up to 1200 characters in length.
299
+ attr_accessor :message
300
+
301
+ def initialize(message: nil)
302
+ @message = message
303
+ end
304
+ end
305
+
306
+ class TermsOfServiceAcceptance < Stripe::RequestParams
307
+ # Text may be up to 1200 characters in length.
308
+ attr_accessor :message
309
+
310
+ def initialize(message: nil)
311
+ @message = message
312
+ end
313
+ end
314
+ # Custom text that should be displayed after the payment confirmation button.
315
+ attr_accessor :after_submit
316
+ # Custom text that should be displayed alongside shipping address collection.
317
+ attr_accessor :shipping_address
318
+ # Custom text that should be displayed alongside the payment confirmation button.
319
+ attr_accessor :submit
320
+ # Custom text that should be displayed in place of the default terms of service agreement text.
321
+ attr_accessor :terms_of_service_acceptance
322
+
323
+ def initialize(
324
+ after_submit: nil,
325
+ shipping_address: nil,
326
+ submit: nil,
327
+ terms_of_service_acceptance: nil
328
+ )
329
+ @after_submit = after_submit
330
+ @shipping_address = shipping_address
331
+ @submit = submit
332
+ @terms_of_service_acceptance = terms_of_service_acceptance
333
+ end
334
+ end
335
+
336
+ class CustomerUpdate < Stripe::RequestParams
337
+ # Describes whether Checkout saves the billing address onto `customer.address`.
338
+ # To always collect a full billing address, use `billing_address_collection`. Defaults to `never`.
339
+ attr_accessor :address
340
+ # Describes whether Checkout saves the name onto `customer.name`. Defaults to `never`.
341
+ attr_accessor :name
342
+ # Describes whether Checkout saves shipping information onto `customer.shipping`.
343
+ # To collect shipping information, use `shipping_address_collection`. Defaults to `never`.
344
+ attr_accessor :shipping
345
+
346
+ def initialize(address: nil, name: nil, shipping: nil)
347
+ @address = address
348
+ @name = name
349
+ @shipping = shipping
350
+ end
351
+ end
352
+
353
+ class Discount < Stripe::RequestParams
354
+ # The ID of the coupon to apply to this Session.
355
+ attr_accessor :coupon
356
+ # The ID of a promotion code to apply to this Session.
357
+ attr_accessor :promotion_code
358
+
359
+ def initialize(coupon: nil, promotion_code: nil)
360
+ @coupon = coupon
361
+ @promotion_code = promotion_code
362
+ end
363
+ end
364
+
365
+ class InvoiceCreation < Stripe::RequestParams
366
+ class InvoiceData < Stripe::RequestParams
367
+ class CustomField < Stripe::RequestParams
368
+ # The name of the custom field. This may be up to 40 characters.
369
+ attr_accessor :name
370
+ # The value of the custom field. This may be up to 140 characters.
371
+ attr_accessor :value
372
+
373
+ def initialize(name: nil, value: nil)
374
+ @name = name
375
+ @value = value
376
+ end
377
+ end
378
+
379
+ class Issuer < Stripe::RequestParams
380
+ # The connected account being referenced when `type` is `account`.
381
+ attr_accessor :account
382
+ # Type of the account referenced in the request.
383
+ attr_accessor :type
384
+
385
+ def initialize(account: nil, type: nil)
386
+ @account = account
387
+ @type = type
388
+ end
389
+ end
390
+
391
+ class RenderingOptions < Stripe::RequestParams
392
+ # 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.
393
+ attr_accessor :amount_tax_display
394
+
395
+ def initialize(amount_tax_display: nil)
396
+ @amount_tax_display = amount_tax_display
397
+ end
398
+ end
399
+ # The account tax IDs associated with the invoice.
400
+ attr_accessor :account_tax_ids
401
+ # Default custom fields to be displayed on invoices for this customer.
402
+ attr_accessor :custom_fields
403
+ # An arbitrary string attached to the object. Often useful for displaying to users.
404
+ attr_accessor :description
405
+ # Default footer to be displayed on invoices for this customer.
406
+ attr_accessor :footer
407
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
408
+ attr_accessor :issuer
409
+ # 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`.
410
+ attr_accessor :metadata
411
+ # Default options for invoice PDF rendering for this customer.
412
+ attr_accessor :rendering_options
413
+
414
+ def initialize(
415
+ account_tax_ids: nil,
416
+ custom_fields: nil,
417
+ description: nil,
418
+ footer: nil,
419
+ issuer: nil,
420
+ metadata: nil,
421
+ rendering_options: nil
422
+ )
423
+ @account_tax_ids = account_tax_ids
424
+ @custom_fields = custom_fields
425
+ @description = description
426
+ @footer = footer
427
+ @issuer = issuer
428
+ @metadata = metadata
429
+ @rendering_options = rendering_options
430
+ end
431
+ end
432
+ # Set to `true` to enable invoice creation.
433
+ attr_accessor :enabled
434
+ # Parameters passed when creating invoices for payment-mode Checkout Sessions.
435
+ attr_accessor :invoice_data
436
+
437
+ def initialize(enabled: nil, invoice_data: nil)
438
+ @enabled = enabled
439
+ @invoice_data = invoice_data
440
+ end
441
+ end
442
+
443
+ class LineItem < Stripe::RequestParams
444
+ class AdjustableQuantity < Stripe::RequestParams
445
+ # Set to true if the quantity can be adjusted to any non-negative integer.
446
+ attr_accessor :enabled
447
+ # 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.
448
+ attr_accessor :maximum
449
+ # The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0.
450
+ attr_accessor :minimum
451
+
452
+ def initialize(enabled: nil, maximum: nil, minimum: nil)
453
+ @enabled = enabled
454
+ @maximum = maximum
455
+ @minimum = minimum
456
+ end
457
+ end
458
+
459
+ class PriceData < Stripe::RequestParams
460
+ class ProductData < Stripe::RequestParams
461
+ # 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.
462
+ attr_accessor :description
463
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
464
+ attr_accessor :images
465
+ # 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`.
466
+ attr_accessor :metadata
467
+ # The product's name, meant to be displayable to the customer.
468
+ attr_accessor :name
469
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
470
+ attr_accessor :tax_code
471
+
472
+ def initialize(description: nil, images: nil, metadata: nil, name: nil, tax_code: nil)
473
+ @description = description
474
+ @images = images
475
+ @metadata = metadata
476
+ @name = name
477
+ @tax_code = tax_code
478
+ end
479
+ end
480
+
481
+ class Recurring < Stripe::RequestParams
482
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
483
+ attr_accessor :interval
484
+ # 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).
485
+ attr_accessor :interval_count
486
+
487
+ def initialize(interval: nil, interval_count: nil)
488
+ @interval = interval
489
+ @interval_count = interval_count
490
+ end
491
+ end
492
+ # 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).
493
+ attr_accessor :currency
494
+ # The ID of the product that this price will belong to. One of `product` or `product_data` is required.
495
+ attr_accessor :product
496
+ # Data used to generate a new product object inline. One of `product` or `product_data` is required.
497
+ attr_accessor :product_data
498
+ # The recurring components of a price such as `interval` and `interval_count`.
499
+ attr_accessor :recurring
500
+ # 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.
501
+ attr_accessor :tax_behavior
502
+ # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
503
+ attr_accessor :unit_amount
504
+ # 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.
505
+ attr_accessor :unit_amount_decimal
506
+
507
+ def initialize(
508
+ currency: nil,
509
+ product: nil,
510
+ product_data: nil,
511
+ recurring: nil,
512
+ tax_behavior: nil,
513
+ unit_amount: nil,
514
+ unit_amount_decimal: nil
515
+ )
516
+ @currency = currency
517
+ @product = product
518
+ @product_data = product_data
519
+ @recurring = recurring
520
+ @tax_behavior = tax_behavior
521
+ @unit_amount = unit_amount
522
+ @unit_amount_decimal = unit_amount_decimal
523
+ end
524
+ end
525
+ # When set, provides configuration for this item’s quantity to be adjusted by the customer during Checkout.
526
+ attr_accessor :adjustable_quantity
527
+ # 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.
528
+ attr_accessor :dynamic_tax_rates
529
+ # 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`.
530
+ attr_accessor :metadata
531
+ # 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.
532
+ attr_accessor :price
533
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
534
+ attr_accessor :price_data
535
+ # The quantity of the line item being purchased. Quantity should not be defined when `recurring.usage_type=metered`.
536
+ attr_accessor :quantity
537
+ # The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item.
538
+ attr_accessor :tax_rates
539
+
540
+ def initialize(
541
+ adjustable_quantity: nil,
542
+ dynamic_tax_rates: nil,
543
+ metadata: nil,
544
+ price: nil,
545
+ price_data: nil,
546
+ quantity: nil,
547
+ tax_rates: nil
548
+ )
549
+ @adjustable_quantity = adjustable_quantity
550
+ @dynamic_tax_rates = dynamic_tax_rates
551
+ @metadata = metadata
552
+ @price = price
553
+ @price_data = price_data
554
+ @quantity = quantity
555
+ @tax_rates = tax_rates
556
+ end
557
+ end
558
+
559
+ class PaymentIntentData < Stripe::RequestParams
560
+ class Shipping < Stripe::RequestParams
561
+ class Address < Stripe::RequestParams
562
+ # City, district, suburb, town, or village.
563
+ attr_accessor :city
564
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
565
+ attr_accessor :country
566
+ # Address line 1 (e.g., street, PO Box, or company name).
567
+ attr_accessor :line1
568
+ # Address line 2 (e.g., apartment, suite, unit, or building).
569
+ attr_accessor :line2
570
+ # ZIP or postal code.
571
+ attr_accessor :postal_code
572
+ # State, county, province, or region.
573
+ attr_accessor :state
574
+
575
+ def initialize(
576
+ city: nil,
577
+ country: nil,
578
+ line1: nil,
579
+ line2: nil,
580
+ postal_code: nil,
581
+ state: nil
582
+ )
583
+ @city = city
584
+ @country = country
585
+ @line1 = line1
586
+ @line2 = line2
587
+ @postal_code = postal_code
588
+ @state = state
589
+ end
590
+ end
591
+ # Shipping address.
592
+ attr_accessor :address
593
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
594
+ attr_accessor :carrier
595
+ # Recipient name.
596
+ attr_accessor :name
597
+ # Recipient phone (including extension).
598
+ attr_accessor :phone
599
+ # 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.
600
+ attr_accessor :tracking_number
601
+
602
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil)
603
+ @address = address
604
+ @carrier = carrier
605
+ @name = name
606
+ @phone = phone
607
+ @tracking_number = tracking_number
608
+ end
609
+ end
610
+
611
+ class TransferData < Stripe::RequestParams
612
+ # The amount that will be transferred automatically when a charge succeeds.
613
+ attr_accessor :amount
614
+ # If specified, successful charges will be attributed to the destination
615
+ # account for tax reporting, and the funds from charges will be transferred
616
+ # to the destination account. The ID of the resulting transfer will be
617
+ # returned on the successful charge's `transfer` field.
618
+ attr_accessor :destination
619
+
620
+ def initialize(amount: nil, destination: nil)
621
+ @amount = amount
622
+ @destination = destination
623
+ end
624
+ end
625
+ # 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 payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
626
+ attr_accessor :application_fee_amount
627
+ # Controls when the funds will be captured from the customer's account.
628
+ attr_accessor :capture_method
629
+ # An arbitrary string attached to the object. Often useful for displaying to users.
630
+ attr_accessor :description
631
+ # 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`.
632
+ attr_accessor :metadata
633
+ # The Stripe account ID for which these funds are intended. For details,
634
+ # see the PaymentIntents [use case for connected
635
+ # accounts](/docs/payments/connected-accounts).
636
+ attr_accessor :on_behalf_of
637
+ # 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).
638
+ attr_accessor :receipt_email
639
+ # Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment
640
+ # method collected by this Checkout Session.
641
+ #
642
+ # When setting this to `on_session`, Checkout will show a notice to the
643
+ # customer that their payment details will be saved.
644
+ #
645
+ # When setting this to `off_session`, Checkout will show a notice to the
646
+ # customer that their payment details will be saved and used for future
647
+ # payments.
648
+ #
649
+ # If a Customer has been provided or Checkout creates a new Customer,
650
+ # Checkout will attach the payment method to the Customer.
651
+ #
652
+ # If Checkout does not create a Customer, the payment method is not attached
653
+ # to a Customer. To reuse the payment method, you can retrieve it from the
654
+ # Checkout Session's PaymentIntent.
655
+ #
656
+ # When processing card payments, Checkout also uses `setup_future_usage`
657
+ # to dynamically optimize your payment flow and comply with regional
658
+ # legislation and network rules, such as SCA.
659
+ attr_accessor :setup_future_usage
660
+ # Shipping information for this payment.
661
+ attr_accessor :shipping
662
+ # 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).
663
+ #
664
+ # 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.
665
+ attr_accessor :statement_descriptor
666
+ # 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.
667
+ attr_accessor :statement_descriptor_suffix
668
+ # The parameters used to automatically create a Transfer when the payment succeeds.
669
+ # For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
670
+ attr_accessor :transfer_data
671
+ # 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.
672
+ attr_accessor :transfer_group
673
+
674
+ def initialize(
675
+ application_fee_amount: nil,
676
+ capture_method: nil,
677
+ description: nil,
678
+ metadata: nil,
679
+ on_behalf_of: nil,
680
+ receipt_email: nil,
681
+ setup_future_usage: nil,
682
+ shipping: nil,
683
+ statement_descriptor: nil,
684
+ statement_descriptor_suffix: nil,
685
+ transfer_data: nil,
686
+ transfer_group: nil
687
+ )
688
+ @application_fee_amount = application_fee_amount
689
+ @capture_method = capture_method
690
+ @description = description
691
+ @metadata = metadata
692
+ @on_behalf_of = on_behalf_of
693
+ @receipt_email = receipt_email
694
+ @setup_future_usage = setup_future_usage
695
+ @shipping = shipping
696
+ @statement_descriptor = statement_descriptor
697
+ @statement_descriptor_suffix = statement_descriptor_suffix
698
+ @transfer_data = transfer_data
699
+ @transfer_group = transfer_group
700
+ end
701
+ end
702
+
703
+ class PaymentMethodData < Stripe::RequestParams
704
+ # 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.
705
+ attr_accessor :allow_redisplay
706
+
707
+ def initialize(allow_redisplay: nil)
708
+ @allow_redisplay = allow_redisplay
709
+ end
710
+ end
711
+
712
+ class PaymentMethodOptions < Stripe::RequestParams
713
+ class AcssDebit < Stripe::RequestParams
714
+ class MandateOptions < Stripe::RequestParams
715
+ # A URL for custom mandate text to render during confirmation step.
716
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
717
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
718
+ attr_accessor :custom_mandate_url
719
+ # List of Stripe products where this mandate can be selected automatically. Only usable in `setup` mode.
720
+ attr_accessor :default_for
721
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
722
+ attr_accessor :interval_description
723
+ # Payment schedule for the mandate.
724
+ attr_accessor :payment_schedule
725
+ # Transaction type of the mandate.
726
+ attr_accessor :transaction_type
727
+
728
+ def initialize(
729
+ custom_mandate_url: nil,
730
+ default_for: nil,
731
+ interval_description: nil,
732
+ payment_schedule: nil,
733
+ transaction_type: nil
734
+ )
735
+ @custom_mandate_url = custom_mandate_url
736
+ @default_for = default_for
737
+ @interval_description = interval_description
738
+ @payment_schedule = payment_schedule
739
+ @transaction_type = transaction_type
740
+ end
741
+ end
742
+ # 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.
743
+ attr_accessor :currency
744
+ # Additional fields for Mandate creation
745
+ attr_accessor :mandate_options
746
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
747
+ #
748
+ # 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.
749
+ #
750
+ # 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.
751
+ #
752
+ # 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).
753
+ attr_accessor :setup_future_usage
754
+ # Verification method for the intent
755
+ attr_accessor :verification_method
756
+
757
+ def initialize(
758
+ currency: nil,
759
+ mandate_options: nil,
760
+ setup_future_usage: nil,
761
+ verification_method: nil
762
+ )
763
+ @currency = currency
764
+ @mandate_options = mandate_options
765
+ @setup_future_usage = setup_future_usage
766
+ @verification_method = verification_method
767
+ end
768
+ end
769
+
770
+ class Affirm < Stripe::RequestParams
771
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
772
+ #
773
+ # 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.
774
+ #
775
+ # 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.
776
+ #
777
+ # 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).
778
+ attr_accessor :setup_future_usage
779
+
780
+ def initialize(setup_future_usage: nil)
781
+ @setup_future_usage = setup_future_usage
782
+ end
783
+ end
784
+
785
+ class AfterpayClearpay < Stripe::RequestParams
786
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
787
+ #
788
+ # 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.
789
+ #
790
+ # 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.
791
+ #
792
+ # 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).
793
+ attr_accessor :setup_future_usage
794
+
795
+ def initialize(setup_future_usage: nil)
796
+ @setup_future_usage = setup_future_usage
797
+ end
798
+ end
799
+
800
+ class Alipay < Stripe::RequestParams
801
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
802
+ #
803
+ # 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.
804
+ #
805
+ # 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.
806
+ #
807
+ # 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).
808
+ attr_accessor :setup_future_usage
809
+
810
+ def initialize(setup_future_usage: nil)
811
+ @setup_future_usage = setup_future_usage
812
+ end
813
+ end
814
+
815
+ class AmazonPay < Stripe::RequestParams
816
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
817
+ #
818
+ # 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.
819
+ #
820
+ # 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.
821
+ #
822
+ # 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).
823
+ attr_accessor :setup_future_usage
824
+
825
+ def initialize(setup_future_usage: nil)
826
+ @setup_future_usage = setup_future_usage
827
+ end
828
+ end
829
+
830
+ class AuBecsDebit < Stripe::RequestParams
831
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
832
+ #
833
+ # 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.
834
+ #
835
+ # 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.
836
+ #
837
+ # 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).
838
+ attr_accessor :setup_future_usage
839
+
840
+ def initialize(setup_future_usage: nil)
841
+ @setup_future_usage = setup_future_usage
842
+ end
843
+ end
844
+
845
+ class BacsDebit < Stripe::RequestParams
846
+ class MandateOptions < Stripe::RequestParams
847
+ # 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'.
848
+ attr_accessor :reference_prefix
849
+
850
+ def initialize(reference_prefix: nil)
851
+ @reference_prefix = reference_prefix
852
+ end
853
+ end
854
+ # Additional fields for Mandate creation
855
+ attr_accessor :mandate_options
856
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
857
+ #
858
+ # 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.
859
+ #
860
+ # 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.
861
+ #
862
+ # 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).
863
+ attr_accessor :setup_future_usage
864
+
865
+ def initialize(mandate_options: nil, setup_future_usage: nil)
866
+ @mandate_options = mandate_options
867
+ @setup_future_usage = setup_future_usage
868
+ end
869
+ end
870
+
871
+ class Bancontact < Stripe::RequestParams
872
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
873
+ #
874
+ # 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.
875
+ #
876
+ # 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.
877
+ #
878
+ # 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).
879
+ attr_accessor :setup_future_usage
880
+
881
+ def initialize(setup_future_usage: nil)
882
+ @setup_future_usage = setup_future_usage
883
+ end
884
+ end
885
+
886
+ class Boleto < Stripe::RequestParams
887
+ # 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.
888
+ attr_accessor :expires_after_days
889
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
890
+ #
891
+ # 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.
892
+ #
893
+ # 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.
894
+ #
895
+ # 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).
896
+ attr_accessor :setup_future_usage
897
+
898
+ def initialize(expires_after_days: nil, setup_future_usage: nil)
899
+ @expires_after_days = expires_after_days
900
+ @setup_future_usage = setup_future_usage
901
+ end
902
+ end
903
+
904
+ class Card < Stripe::RequestParams
905
+ class Installments < Stripe::RequestParams
906
+ # Setting to true enables installments for this Checkout Session.
907
+ # Setting to false will prevent any installment plan from applying to a payment.
908
+ attr_accessor :enabled
909
+
910
+ def initialize(enabled: nil)
911
+ @enabled = enabled
912
+ end
913
+ end
914
+
915
+ class Restrictions < Stripe::RequestParams
916
+ # 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.
917
+ attr_accessor :brands_blocked
918
+
919
+ def initialize(brands_blocked: nil)
920
+ @brands_blocked = brands_blocked
921
+ end
922
+ end
923
+ # Installment options for card payments
924
+ attr_accessor :installments
925
+ # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession.
926
+ attr_accessor :request_decremental_authorization
927
+ # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession.
928
+ attr_accessor :request_extended_authorization
929
+ # Request ability to [increment the authorization](/payments/incremental-authorization) for this CheckoutSession.
930
+ attr_accessor :request_incremental_authorization
931
+ # Request ability to make [multiple captures](/payments/multicapture) for this CheckoutSession.
932
+ attr_accessor :request_multicapture
933
+ # Request ability to [overcapture](/payments/overcapture) for this CheckoutSession.
934
+ attr_accessor :request_overcapture
935
+ # 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.
936
+ attr_accessor :request_three_d_secure
937
+ # Restrictions to apply to the card payment method. For example, you can block specific card brands.
938
+ attr_accessor :restrictions
939
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
940
+ #
941
+ # 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.
942
+ #
943
+ # 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.
944
+ #
945
+ # 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).
946
+ attr_accessor :setup_future_usage
947
+ # 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.
948
+ attr_accessor :statement_descriptor_suffix_kana
949
+ # 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.
950
+ attr_accessor :statement_descriptor_suffix_kanji
951
+
952
+ def initialize(
953
+ installments: nil,
954
+ request_decremental_authorization: nil,
955
+ request_extended_authorization: nil,
956
+ request_incremental_authorization: nil,
957
+ request_multicapture: nil,
958
+ request_overcapture: nil,
959
+ request_three_d_secure: nil,
960
+ restrictions: nil,
961
+ setup_future_usage: nil,
962
+ statement_descriptor_suffix_kana: nil,
963
+ statement_descriptor_suffix_kanji: nil
964
+ )
965
+ @installments = installments
966
+ @request_decremental_authorization = request_decremental_authorization
967
+ @request_extended_authorization = request_extended_authorization
968
+ @request_incremental_authorization = request_incremental_authorization
969
+ @request_multicapture = request_multicapture
970
+ @request_overcapture = request_overcapture
971
+ @request_three_d_secure = request_three_d_secure
972
+ @restrictions = restrictions
973
+ @setup_future_usage = setup_future_usage
974
+ @statement_descriptor_suffix_kana = statement_descriptor_suffix_kana
975
+ @statement_descriptor_suffix_kanji = statement_descriptor_suffix_kanji
976
+ end
977
+ end
978
+
979
+ class Cashapp < Stripe::RequestParams
980
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
981
+ #
982
+ # 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.
983
+ #
984
+ # 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.
985
+ #
986
+ # 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).
987
+ attr_accessor :setup_future_usage
988
+
989
+ def initialize(setup_future_usage: nil)
990
+ @setup_future_usage = setup_future_usage
991
+ end
992
+ end
993
+
994
+ class CustomerBalance < Stripe::RequestParams
995
+ class BankTransfer < Stripe::RequestParams
996
+ class EuBankTransfer < Stripe::RequestParams
997
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
998
+ attr_accessor :country
999
+
1000
+ def initialize(country: nil)
1001
+ @country = country
1002
+ end
1003
+ end
1004
+ # Configuration for eu_bank_transfer funding type.
1005
+ attr_accessor :eu_bank_transfer
1006
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
1007
+ #
1008
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
1009
+ attr_accessor :requested_address_types
1010
+ # The list of bank transfer types that this PaymentIntent is allowed to use for funding.
1011
+ attr_accessor :type
1012
+
1013
+ def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil)
1014
+ @eu_bank_transfer = eu_bank_transfer
1015
+ @requested_address_types = requested_address_types
1016
+ @type = type
1017
+ end
1018
+ end
1019
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
1020
+ attr_accessor :bank_transfer
1021
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
1022
+ attr_accessor :funding_type
1023
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1024
+ #
1025
+ # 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.
1026
+ #
1027
+ # 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.
1028
+ #
1029
+ # 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).
1030
+ attr_accessor :setup_future_usage
1031
+
1032
+ def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil)
1033
+ @bank_transfer = bank_transfer
1034
+ @funding_type = funding_type
1035
+ @setup_future_usage = setup_future_usage
1036
+ end
1037
+ end
1038
+
1039
+ class Eps < Stripe::RequestParams
1040
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1041
+ #
1042
+ # 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.
1043
+ #
1044
+ # 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.
1045
+ #
1046
+ # 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).
1047
+ attr_accessor :setup_future_usage
1048
+
1049
+ def initialize(setup_future_usage: nil)
1050
+ @setup_future_usage = setup_future_usage
1051
+ end
1052
+ end
1053
+
1054
+ class Fpx < Stripe::RequestParams
1055
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1056
+ #
1057
+ # 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.
1058
+ #
1059
+ # 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.
1060
+ #
1061
+ # 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).
1062
+ attr_accessor :setup_future_usage
1063
+
1064
+ def initialize(setup_future_usage: nil)
1065
+ @setup_future_usage = setup_future_usage
1066
+ end
1067
+ end
1068
+
1069
+ class Giropay < Stripe::RequestParams
1070
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1071
+ #
1072
+ # 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.
1073
+ #
1074
+ # 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.
1075
+ #
1076
+ # 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).
1077
+ attr_accessor :setup_future_usage
1078
+
1079
+ def initialize(setup_future_usage: nil)
1080
+ @setup_future_usage = setup_future_usage
1081
+ end
1082
+ end
1083
+
1084
+ class Grabpay < Stripe::RequestParams
1085
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1086
+ #
1087
+ # 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.
1088
+ #
1089
+ # 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.
1090
+ #
1091
+ # 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).
1092
+ attr_accessor :setup_future_usage
1093
+
1094
+ def initialize(setup_future_usage: nil)
1095
+ @setup_future_usage = setup_future_usage
1096
+ end
1097
+ end
1098
+
1099
+ class Ideal < Stripe::RequestParams
1100
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1101
+ #
1102
+ # 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.
1103
+ #
1104
+ # 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.
1105
+ #
1106
+ # 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).
1107
+ attr_accessor :setup_future_usage
1108
+
1109
+ def initialize(setup_future_usage: nil)
1110
+ @setup_future_usage = setup_future_usage
1111
+ end
1112
+ end
1113
+
1114
+ class KakaoPay < Stripe::RequestParams
1115
+ # Controls when the funds will be captured from the customer's account.
1116
+ attr_accessor :capture_method
1117
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1118
+ #
1119
+ # 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.
1120
+ #
1121
+ # 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.
1122
+ #
1123
+ # 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).
1124
+ attr_accessor :setup_future_usage
1125
+
1126
+ def initialize(capture_method: nil, setup_future_usage: nil)
1127
+ @capture_method = capture_method
1128
+ @setup_future_usage = setup_future_usage
1129
+ end
1130
+ end
1131
+
1132
+ class Klarna < Stripe::RequestParams
1133
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1134
+ #
1135
+ # 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.
1136
+ #
1137
+ # 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.
1138
+ #
1139
+ # 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).
1140
+ attr_accessor :setup_future_usage
1141
+
1142
+ def initialize(setup_future_usage: nil)
1143
+ @setup_future_usage = setup_future_usage
1144
+ end
1145
+ end
1146
+
1147
+ class Konbini < Stripe::RequestParams
1148
+ # 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.
1149
+ attr_accessor :expires_after_days
1150
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1151
+ #
1152
+ # 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.
1153
+ #
1154
+ # 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.
1155
+ #
1156
+ # 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).
1157
+ attr_accessor :setup_future_usage
1158
+
1159
+ def initialize(expires_after_days: nil, setup_future_usage: nil)
1160
+ @expires_after_days = expires_after_days
1161
+ @setup_future_usage = setup_future_usage
1162
+ end
1163
+ end
1164
+
1165
+ class KrCard < Stripe::RequestParams
1166
+ # Controls when the funds will be captured from the customer's account.
1167
+ attr_accessor :capture_method
1168
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1169
+ #
1170
+ # 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.
1171
+ #
1172
+ # 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.
1173
+ #
1174
+ # 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).
1175
+ attr_accessor :setup_future_usage
1176
+
1177
+ def initialize(capture_method: nil, setup_future_usage: nil)
1178
+ @capture_method = capture_method
1179
+ @setup_future_usage = setup_future_usage
1180
+ end
1181
+ end
1182
+
1183
+ class Link < Stripe::RequestParams
1184
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1185
+ #
1186
+ # 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.
1187
+ #
1188
+ # 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.
1189
+ #
1190
+ # 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).
1191
+ attr_accessor :setup_future_usage
1192
+
1193
+ def initialize(setup_future_usage: nil)
1194
+ @setup_future_usage = setup_future_usage
1195
+ end
1196
+ end
1197
+
1198
+ class Mobilepay < Stripe::RequestParams
1199
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1200
+ #
1201
+ # 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.
1202
+ #
1203
+ # 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.
1204
+ #
1205
+ # 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).
1206
+ attr_accessor :setup_future_usage
1207
+
1208
+ def initialize(setup_future_usage: nil)
1209
+ @setup_future_usage = setup_future_usage
1210
+ end
1211
+ end
1212
+
1213
+ class Multibanco < Stripe::RequestParams
1214
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1215
+ #
1216
+ # 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.
1217
+ #
1218
+ # 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.
1219
+ #
1220
+ # 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).
1221
+ attr_accessor :setup_future_usage
1222
+
1223
+ def initialize(setup_future_usage: nil)
1224
+ @setup_future_usage = setup_future_usage
1225
+ end
1226
+ end
1227
+
1228
+ class NaverPay < Stripe::RequestParams
1229
+ # Controls when the funds will be captured from the customer's account.
1230
+ attr_accessor :capture_method
1231
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1232
+ #
1233
+ # 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.
1234
+ #
1235
+ # 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.
1236
+ #
1237
+ # 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).
1238
+ attr_accessor :setup_future_usage
1239
+
1240
+ def initialize(capture_method: nil, setup_future_usage: nil)
1241
+ @capture_method = capture_method
1242
+ @setup_future_usage = setup_future_usage
1243
+ end
1244
+ end
1245
+
1246
+ class Oxxo < Stripe::RequestParams
1247
+ # 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.
1248
+ attr_accessor :expires_after_days
1249
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1250
+ #
1251
+ # 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.
1252
+ #
1253
+ # 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.
1254
+ #
1255
+ # 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).
1256
+ attr_accessor :setup_future_usage
1257
+
1258
+ def initialize(expires_after_days: nil, setup_future_usage: nil)
1259
+ @expires_after_days = expires_after_days
1260
+ @setup_future_usage = setup_future_usage
1261
+ end
1262
+ end
1263
+
1264
+ class P24 < Stripe::RequestParams
1265
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1266
+ #
1267
+ # 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.
1268
+ #
1269
+ # 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.
1270
+ #
1271
+ # 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).
1272
+ attr_accessor :setup_future_usage
1273
+ # Confirm that the payer has accepted the P24 terms and conditions.
1274
+ attr_accessor :tos_shown_and_accepted
1275
+
1276
+ def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil)
1277
+ @setup_future_usage = setup_future_usage
1278
+ @tos_shown_and_accepted = tos_shown_and_accepted
1279
+ end
1280
+ end
1281
+
1282
+ class PayByBank < Stripe::RequestParams
1283
+ end
1284
+
1285
+ class Payco < Stripe::RequestParams
1286
+ # Controls when the funds will be captured from the customer's account.
1287
+ attr_accessor :capture_method
1288
+
1289
+ def initialize(capture_method: nil)
1290
+ @capture_method = capture_method
1291
+ end
1292
+ end
1293
+
1294
+ class Paynow < Stripe::RequestParams
1295
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1296
+ #
1297
+ # 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.
1298
+ #
1299
+ # 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.
1300
+ #
1301
+ # 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).
1302
+ attr_accessor :setup_future_usage
1303
+
1304
+ def initialize(setup_future_usage: nil)
1305
+ @setup_future_usage = setup_future_usage
1306
+ end
1307
+ end
1308
+
1309
+ class Paypal < Stripe::RequestParams
1310
+ # Controls when the funds will be captured from the customer's account.
1311
+ attr_accessor :capture_method
1312
+ # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to.
1313
+ attr_accessor :preferred_locale
1314
+ # 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.
1315
+ attr_accessor :reference
1316
+ # 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.
1317
+ attr_accessor :reference_id
1318
+ # The risk correlation ID for an on-session payment using a saved PayPal payment method.
1319
+ attr_accessor :risk_correlation_id
1320
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1321
+ #
1322
+ # 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.
1323
+ #
1324
+ # 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.
1325
+ #
1326
+ # 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).
1327
+ #
1328
+ # 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`.
1329
+ attr_accessor :setup_future_usage
1330
+ # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used.
1331
+ attr_accessor :subsellers
1332
+
1333
+ def initialize(
1334
+ capture_method: nil,
1335
+ preferred_locale: nil,
1336
+ reference: nil,
1337
+ reference_id: nil,
1338
+ risk_correlation_id: nil,
1339
+ setup_future_usage: nil,
1340
+ subsellers: nil
1341
+ )
1342
+ @capture_method = capture_method
1343
+ @preferred_locale = preferred_locale
1344
+ @reference = reference
1345
+ @reference_id = reference_id
1346
+ @risk_correlation_id = risk_correlation_id
1347
+ @setup_future_usage = setup_future_usage
1348
+ @subsellers = subsellers
1349
+ end
1350
+ end
1351
+
1352
+ class Payto < Stripe::RequestParams
1353
+ class MandateOptions < Stripe::RequestParams
1354
+ # Amount that will be collected. It is required when `amount_type` is `fixed`.
1355
+ attr_accessor :amount
1356
+ # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively.
1357
+ attr_accessor :amount_type
1358
+ # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date.
1359
+ attr_accessor :end_date
1360
+ # The periodicity at which payments will be collected.
1361
+ attr_accessor :payment_schedule
1362
+ # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit.
1363
+ attr_accessor :payments_per_period
1364
+ # The purpose for which payments are made. Defaults to retail.
1365
+ attr_accessor :purpose
1366
+ # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time.
1367
+ attr_accessor :start_date
1368
+
1369
+ def initialize(
1370
+ amount: nil,
1371
+ amount_type: nil,
1372
+ end_date: nil,
1373
+ payment_schedule: nil,
1374
+ payments_per_period: nil,
1375
+ purpose: nil,
1376
+ start_date: nil
1377
+ )
1378
+ @amount = amount
1379
+ @amount_type = amount_type
1380
+ @end_date = end_date
1381
+ @payment_schedule = payment_schedule
1382
+ @payments_per_period = payments_per_period
1383
+ @purpose = purpose
1384
+ @start_date = start_date
1385
+ end
1386
+ end
1387
+ # Additional fields for Mandate creation
1388
+ attr_accessor :mandate_options
1389
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1390
+ #
1391
+ # 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.
1392
+ #
1393
+ # 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.
1394
+ #
1395
+ # 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).
1396
+ attr_accessor :setup_future_usage
1397
+
1398
+ def initialize(mandate_options: nil, setup_future_usage: nil)
1399
+ @mandate_options = mandate_options
1400
+ @setup_future_usage = setup_future_usage
1401
+ end
1402
+ end
1403
+
1404
+ class Pix < Stripe::RequestParams
1405
+ # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
1406
+ attr_accessor :expires_after_seconds
1407
+
1408
+ def initialize(expires_after_seconds: nil)
1409
+ @expires_after_seconds = expires_after_seconds
1410
+ end
1411
+ end
1412
+
1413
+ class RevolutPay < Stripe::RequestParams
1414
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1415
+ #
1416
+ # 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.
1417
+ #
1418
+ # 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.
1419
+ #
1420
+ # 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).
1421
+ attr_accessor :setup_future_usage
1422
+
1423
+ def initialize(setup_future_usage: nil)
1424
+ @setup_future_usage = setup_future_usage
1425
+ end
1426
+ end
1427
+
1428
+ class SamsungPay < Stripe::RequestParams
1429
+ # Controls when the funds will be captured from the customer's account.
1430
+ attr_accessor :capture_method
1431
+
1432
+ def initialize(capture_method: nil)
1433
+ @capture_method = capture_method
1434
+ end
1435
+ end
1436
+
1437
+ class SepaDebit < Stripe::RequestParams
1438
+ class MandateOptions < Stripe::RequestParams
1439
+ # 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'.
1440
+ attr_accessor :reference_prefix
1441
+
1442
+ def initialize(reference_prefix: nil)
1443
+ @reference_prefix = reference_prefix
1444
+ end
1445
+ end
1446
+ # Additional fields for Mandate creation
1447
+ attr_accessor :mandate_options
1448
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1449
+ #
1450
+ # 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.
1451
+ #
1452
+ # 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.
1453
+ #
1454
+ # 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).
1455
+ attr_accessor :setup_future_usage
1456
+
1457
+ def initialize(mandate_options: nil, setup_future_usage: nil)
1458
+ @mandate_options = mandate_options
1459
+ @setup_future_usage = setup_future_usage
1460
+ end
1461
+ end
1462
+
1463
+ class Sofort < Stripe::RequestParams
1464
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1465
+ #
1466
+ # 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.
1467
+ #
1468
+ # 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.
1469
+ #
1470
+ # 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).
1471
+ attr_accessor :setup_future_usage
1472
+
1473
+ def initialize(setup_future_usage: nil)
1474
+ @setup_future_usage = setup_future_usage
1475
+ end
1476
+ end
1477
+
1478
+ class Swish < Stripe::RequestParams
1479
+ # The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent.
1480
+ attr_accessor :reference
1481
+
1482
+ def initialize(reference: nil)
1483
+ @reference = reference
1484
+ end
1485
+ end
1486
+
1487
+ class UsBankAccount < Stripe::RequestParams
1488
+ class FinancialConnections < Stripe::RequestParams
1489
+ # 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`.
1490
+ attr_accessor :permissions
1491
+ # List of data features that you would like to retrieve upon account creation.
1492
+ attr_accessor :prefetch
1493
+
1494
+ def initialize(permissions: nil, prefetch: nil)
1495
+ @permissions = permissions
1496
+ @prefetch = prefetch
1497
+ end
1498
+ end
1499
+ # Additional fields for Financial Connections Session creation
1500
+ attr_accessor :financial_connections
1501
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1502
+ #
1503
+ # 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.
1504
+ #
1505
+ # 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.
1506
+ #
1507
+ # 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).
1508
+ attr_accessor :setup_future_usage
1509
+ # Verification method for the intent
1510
+ attr_accessor :verification_method
1511
+
1512
+ def initialize(
1513
+ financial_connections: nil,
1514
+ setup_future_usage: nil,
1515
+ verification_method: nil
1516
+ )
1517
+ @financial_connections = financial_connections
1518
+ @setup_future_usage = setup_future_usage
1519
+ @verification_method = verification_method
1520
+ end
1521
+ end
1522
+
1523
+ class WechatPay < Stripe::RequestParams
1524
+ # The app ID registered with WeChat Pay. Only required when client is ios or android.
1525
+ attr_accessor :app_id
1526
+ # The client type that the end customer will pay from
1527
+ attr_accessor :client
1528
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1529
+ #
1530
+ # 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.
1531
+ #
1532
+ # 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.
1533
+ #
1534
+ # 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).
1535
+ attr_accessor :setup_future_usage
1536
+
1537
+ def initialize(app_id: nil, client: nil, setup_future_usage: nil)
1538
+ @app_id = app_id
1539
+ @client = client
1540
+ @setup_future_usage = setup_future_usage
1541
+ end
1542
+ end
1543
+ # contains details about the ACSS Debit payment method options.
1544
+ attr_accessor :acss_debit
1545
+ # contains details about the Affirm payment method options.
1546
+ attr_accessor :affirm
1547
+ # contains details about the Afterpay Clearpay payment method options.
1548
+ attr_accessor :afterpay_clearpay
1549
+ # contains details about the Alipay payment method options.
1550
+ attr_accessor :alipay
1551
+ # contains details about the AmazonPay payment method options.
1552
+ attr_accessor :amazon_pay
1553
+ # contains details about the AU Becs Debit payment method options.
1554
+ attr_accessor :au_becs_debit
1555
+ # contains details about the Bacs Debit payment method options.
1556
+ attr_accessor :bacs_debit
1557
+ # contains details about the Bancontact payment method options.
1558
+ attr_accessor :bancontact
1559
+ # contains details about the Boleto payment method options.
1560
+ attr_accessor :boleto
1561
+ # contains details about the Card payment method options.
1562
+ attr_accessor :card
1563
+ # contains details about the Cashapp Pay payment method options.
1564
+ attr_accessor :cashapp
1565
+ # contains details about the Customer Balance payment method options.
1566
+ attr_accessor :customer_balance
1567
+ # contains details about the EPS payment method options.
1568
+ attr_accessor :eps
1569
+ # contains details about the FPX payment method options.
1570
+ attr_accessor :fpx
1571
+ # contains details about the Giropay payment method options.
1572
+ attr_accessor :giropay
1573
+ # contains details about the Grabpay payment method options.
1574
+ attr_accessor :grabpay
1575
+ # contains details about the Ideal payment method options.
1576
+ attr_accessor :ideal
1577
+ # contains details about the Kakao Pay payment method options.
1578
+ attr_accessor :kakao_pay
1579
+ # contains details about the Klarna payment method options.
1580
+ attr_accessor :klarna
1581
+ # contains details about the Konbini payment method options.
1582
+ attr_accessor :konbini
1583
+ # contains details about the Korean card payment method options.
1584
+ attr_accessor :kr_card
1585
+ # contains details about the Link payment method options.
1586
+ attr_accessor :link
1587
+ # contains details about the Mobilepay payment method options.
1588
+ attr_accessor :mobilepay
1589
+ # contains details about the Multibanco payment method options.
1590
+ attr_accessor :multibanco
1591
+ # contains details about the Naver Pay payment method options.
1592
+ attr_accessor :naver_pay
1593
+ # contains details about the OXXO payment method options.
1594
+ attr_accessor :oxxo
1595
+ # contains details about the P24 payment method options.
1596
+ attr_accessor :p24
1597
+ # contains details about the Pay By Bank payment method options.
1598
+ attr_accessor :pay_by_bank
1599
+ # contains details about the PAYCO payment method options.
1600
+ attr_accessor :payco
1601
+ # contains details about the PayNow payment method options.
1602
+ attr_accessor :paynow
1603
+ # contains details about the PayPal payment method options.
1604
+ attr_accessor :paypal
1605
+ # contains details about the PayTo payment method options.
1606
+ attr_accessor :payto
1607
+ # contains details about the Pix payment method options.
1608
+ attr_accessor :pix
1609
+ # contains details about the RevolutPay payment method options.
1610
+ attr_accessor :revolut_pay
1611
+ # contains details about the Samsung Pay payment method options.
1612
+ attr_accessor :samsung_pay
1613
+ # contains details about the Sepa Debit payment method options.
1614
+ attr_accessor :sepa_debit
1615
+ # contains details about the Sofort payment method options.
1616
+ attr_accessor :sofort
1617
+ # contains details about the Swish payment method options.
1618
+ attr_accessor :swish
1619
+ # contains details about the Us Bank Account payment method options.
1620
+ attr_accessor :us_bank_account
1621
+ # contains details about the WeChat Pay payment method options.
1622
+ attr_accessor :wechat_pay
1623
+
1624
+ def initialize(
1625
+ acss_debit: nil,
1626
+ affirm: nil,
1627
+ afterpay_clearpay: nil,
1628
+ alipay: nil,
1629
+ amazon_pay: nil,
1630
+ au_becs_debit: nil,
1631
+ bacs_debit: nil,
1632
+ bancontact: nil,
1633
+ boleto: nil,
1634
+ card: nil,
1635
+ cashapp: nil,
1636
+ customer_balance: nil,
1637
+ eps: nil,
1638
+ fpx: nil,
1639
+ giropay: nil,
1640
+ grabpay: nil,
1641
+ ideal: nil,
1642
+ kakao_pay: nil,
1643
+ klarna: nil,
1644
+ konbini: nil,
1645
+ kr_card: nil,
1646
+ link: nil,
1647
+ mobilepay: nil,
1648
+ multibanco: nil,
1649
+ naver_pay: nil,
1650
+ oxxo: nil,
1651
+ p24: nil,
1652
+ pay_by_bank: nil,
1653
+ payco: nil,
1654
+ paynow: nil,
1655
+ paypal: nil,
1656
+ payto: nil,
1657
+ pix: nil,
1658
+ revolut_pay: nil,
1659
+ samsung_pay: nil,
1660
+ sepa_debit: nil,
1661
+ sofort: nil,
1662
+ swish: nil,
1663
+ us_bank_account: nil,
1664
+ wechat_pay: nil
1665
+ )
1666
+ @acss_debit = acss_debit
1667
+ @affirm = affirm
1668
+ @afterpay_clearpay = afterpay_clearpay
1669
+ @alipay = alipay
1670
+ @amazon_pay = amazon_pay
1671
+ @au_becs_debit = au_becs_debit
1672
+ @bacs_debit = bacs_debit
1673
+ @bancontact = bancontact
1674
+ @boleto = boleto
1675
+ @card = card
1676
+ @cashapp = cashapp
1677
+ @customer_balance = customer_balance
1678
+ @eps = eps
1679
+ @fpx = fpx
1680
+ @giropay = giropay
1681
+ @grabpay = grabpay
1682
+ @ideal = ideal
1683
+ @kakao_pay = kakao_pay
1684
+ @klarna = klarna
1685
+ @konbini = konbini
1686
+ @kr_card = kr_card
1687
+ @link = link
1688
+ @mobilepay = mobilepay
1689
+ @multibanco = multibanco
1690
+ @naver_pay = naver_pay
1691
+ @oxxo = oxxo
1692
+ @p24 = p24
1693
+ @pay_by_bank = pay_by_bank
1694
+ @payco = payco
1695
+ @paynow = paynow
1696
+ @paypal = paypal
1697
+ @payto = payto
1698
+ @pix = pix
1699
+ @revolut_pay = revolut_pay
1700
+ @samsung_pay = samsung_pay
1701
+ @sepa_debit = sepa_debit
1702
+ @sofort = sofort
1703
+ @swish = swish
1704
+ @us_bank_account = us_bank_account
1705
+ @wechat_pay = wechat_pay
1706
+ end
1707
+ end
1708
+
1709
+ class Permissions < Stripe::RequestParams
1710
+ class Update < Stripe::RequestParams
1711
+ # Determines which entity is allowed to update the line items.
1712
+ #
1713
+ # Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items.
1714
+ #
1715
+ # When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API.
1716
+ attr_accessor :line_items
1717
+ # Determines which entity is allowed to update the shipping details.
1718
+ #
1719
+ # 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.
1720
+ #
1721
+ # 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.
1722
+ attr_accessor :shipping_details
1723
+
1724
+ def initialize(line_items: nil, shipping_details: nil)
1725
+ @line_items = line_items
1726
+ @shipping_details = shipping_details
1727
+ end
1728
+ end
1729
+ # Permissions for updating the Checkout Session.
1730
+ attr_accessor :update
1731
+
1732
+ def initialize(update: nil)
1733
+ @update = update
1734
+ end
1735
+ end
1736
+
1737
+ class PhoneNumberCollection < Stripe::RequestParams
1738
+ # Set to `true` to enable phone number collection.
1739
+ #
1740
+ # Can only be set in `payment` and `subscription` mode.
1741
+ attr_accessor :enabled
1742
+
1743
+ def initialize(enabled: nil)
1744
+ @enabled = enabled
1745
+ end
1746
+ end
1747
+
1748
+ class SavedPaymentMethodOptions < Stripe::RequestParams
1749
+ # 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.
1750
+ attr_accessor :allow_redisplay_filters
1751
+ # Enable customers to choose if they wish to save their payment method for future use. Disabled by default.
1752
+ attr_accessor :payment_method_save
1753
+
1754
+ def initialize(allow_redisplay_filters: nil, payment_method_save: nil)
1755
+ @allow_redisplay_filters = allow_redisplay_filters
1756
+ @payment_method_save = payment_method_save
1757
+ end
1758
+ end
1759
+
1760
+ class SetupIntentData < Stripe::RequestParams
1761
+ # An arbitrary string attached to the object. Often useful for displaying to users.
1762
+ attr_accessor :description
1763
+ # 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`.
1764
+ attr_accessor :metadata
1765
+ # The Stripe account for which the setup is intended.
1766
+ attr_accessor :on_behalf_of
1767
+
1768
+ def initialize(description: nil, metadata: nil, on_behalf_of: nil)
1769
+ @description = description
1770
+ @metadata = metadata
1771
+ @on_behalf_of = on_behalf_of
1772
+ end
1773
+ end
1774
+
1775
+ class ShippingAddressCollection < Stripe::RequestParams
1776
+ # An array of two-letter ISO country codes representing which countries Checkout should provide as options for
1777
+ # shipping locations.
1778
+ attr_accessor :allowed_countries
1779
+
1780
+ def initialize(allowed_countries: nil)
1781
+ @allowed_countries = allowed_countries
1782
+ end
1783
+ end
1784
+
1785
+ class ShippingOption < Stripe::RequestParams
1786
+ class ShippingRateData < Stripe::RequestParams
1787
+ class DeliveryEstimate < Stripe::RequestParams
1788
+ class Maximum < Stripe::RequestParams
1789
+ # A unit of time.
1790
+ attr_accessor :unit
1791
+ # Must be greater than 0.
1792
+ attr_accessor :value
1793
+
1794
+ def initialize(unit: nil, value: nil)
1795
+ @unit = unit
1796
+ @value = value
1797
+ end
1798
+ end
1799
+
1800
+ class Minimum < Stripe::RequestParams
1801
+ # A unit of time.
1802
+ attr_accessor :unit
1803
+ # Must be greater than 0.
1804
+ attr_accessor :value
1805
+
1806
+ def initialize(unit: nil, value: nil)
1807
+ @unit = unit
1808
+ @value = value
1809
+ end
1810
+ end
1811
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
1812
+ attr_accessor :maximum
1813
+ # The lower bound of the estimated range. If empty, represents no lower bound.
1814
+ attr_accessor :minimum
1815
+
1816
+ def initialize(maximum: nil, minimum: nil)
1817
+ @maximum = maximum
1818
+ @minimum = minimum
1819
+ end
1820
+ end
1821
+
1822
+ class FixedAmount < Stripe::RequestParams
1823
+ class CurrencyOptions < Stripe::RequestParams
1824
+ # A non-negative integer in cents representing how much to charge.
1825
+ attr_accessor :amount
1826
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
1827
+ attr_accessor :tax_behavior
1828
+
1829
+ def initialize(amount: nil, tax_behavior: nil)
1830
+ @amount = amount
1831
+ @tax_behavior = tax_behavior
1832
+ end
1833
+ end
1834
+ # A non-negative integer in cents representing how much to charge.
1835
+ attr_accessor :amount
1836
+ # 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).
1837
+ attr_accessor :currency
1838
+ # 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).
1839
+ attr_accessor :currency_options
1840
+
1841
+ def initialize(amount: nil, currency: nil, currency_options: nil)
1842
+ @amount = amount
1843
+ @currency = currency
1844
+ @currency_options = currency_options
1845
+ end
1846
+ end
1847
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
1848
+ attr_accessor :delivery_estimate
1849
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
1850
+ attr_accessor :display_name
1851
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
1852
+ attr_accessor :fixed_amount
1853
+ # 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`.
1854
+ attr_accessor :metadata
1855
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
1856
+ attr_accessor :tax_behavior
1857
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
1858
+ attr_accessor :tax_code
1859
+ # The type of calculation to use on the shipping rate.
1860
+ attr_accessor :type
1861
+
1862
+ def initialize(
1863
+ delivery_estimate: nil,
1864
+ display_name: nil,
1865
+ fixed_amount: nil,
1866
+ metadata: nil,
1867
+ tax_behavior: nil,
1868
+ tax_code: nil,
1869
+ type: nil
1870
+ )
1871
+ @delivery_estimate = delivery_estimate
1872
+ @display_name = display_name
1873
+ @fixed_amount = fixed_amount
1874
+ @metadata = metadata
1875
+ @tax_behavior = tax_behavior
1876
+ @tax_code = tax_code
1877
+ @type = type
1878
+ end
1879
+ end
1880
+ # The ID of the Shipping Rate to use for this shipping option.
1881
+ attr_accessor :shipping_rate
1882
+ # Parameters to be passed to Shipping Rate creation for this shipping option.
1883
+ attr_accessor :shipping_rate_data
1884
+
1885
+ def initialize(shipping_rate: nil, shipping_rate_data: nil)
1886
+ @shipping_rate = shipping_rate
1887
+ @shipping_rate_data = shipping_rate_data
1888
+ end
1889
+ end
1890
+
1891
+ class SubscriptionData < Stripe::RequestParams
1892
+ class InvoiceSettings < Stripe::RequestParams
1893
+ class Issuer < Stripe::RequestParams
1894
+ # The connected account being referenced when `type` is `account`.
1895
+ attr_accessor :account
1896
+ # Type of the account referenced in the request.
1897
+ attr_accessor :type
1898
+
1899
+ def initialize(account: nil, type: nil)
1900
+ @account = account
1901
+ @type = type
1902
+ end
1903
+ end
1904
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1905
+ attr_accessor :issuer
1906
+
1907
+ def initialize(issuer: nil)
1908
+ @issuer = issuer
1909
+ end
1910
+ end
1911
+
1912
+ class TransferData < Stripe::RequestParams
1913
+ # 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.
1914
+ attr_accessor :amount_percent
1915
+ # ID of an existing, connected Stripe account.
1916
+ attr_accessor :destination
1917
+
1918
+ def initialize(amount_percent: nil, destination: nil)
1919
+ @amount_percent = amount_percent
1920
+ @destination = destination
1921
+ end
1922
+ end
1923
+
1924
+ class TrialSettings < Stripe::RequestParams
1925
+ class EndBehavior < Stripe::RequestParams
1926
+ # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
1927
+ attr_accessor :missing_payment_method
1928
+
1929
+ def initialize(missing_payment_method: nil)
1930
+ @missing_payment_method = missing_payment_method
1931
+ end
1932
+ end
1933
+ # Defines how the subscription should behave when the user's free trial ends.
1934
+ attr_accessor :end_behavior
1935
+
1936
+ def initialize(end_behavior: nil)
1937
+ @end_behavior = end_behavior
1938
+ end
1939
+ end
1940
+ # 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).
1941
+ attr_accessor :application_fee_percent
1942
+ # A future timestamp to anchor the subscription's billing cycle for new subscriptions.
1943
+ attr_accessor :billing_cycle_anchor
1944
+ # The tax rates that will apply to any subscription item that does not have
1945
+ # `tax_rates` set. Invoices created will have their `default_tax_rates` populated
1946
+ # from the subscription.
1947
+ attr_accessor :default_tax_rates
1948
+ # The subscription's description, meant to be displayable to the customer.
1949
+ # Use this field to optionally store an explanation of the subscription
1950
+ # for rendering in the [customer portal](https://stripe.com/docs/customer-management).
1951
+ attr_accessor :description
1952
+ # All invoices will be billed using the specified settings.
1953
+ attr_accessor :invoice_settings
1954
+ # 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`.
1955
+ attr_accessor :metadata
1956
+ # The account on behalf of which to charge, for each of the subscription's invoices.
1957
+ attr_accessor :on_behalf_of
1958
+ # Determines how to handle prorations resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`.
1959
+ attr_accessor :proration_behavior
1960
+ # 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.
1961
+ attr_accessor :transfer_data
1962
+ # Unix timestamp representing the end of the trial period the customer
1963
+ # will get before being charged for the first time. Has to be at least
1964
+ # 48 hours in the future.
1965
+ attr_accessor :trial_end
1966
+ # Integer representing the number of trial period days before the
1967
+ # customer is charged for the first time. Has to be at least 1.
1968
+ attr_accessor :trial_period_days
1969
+ # Settings related to subscription trials.
1970
+ attr_accessor :trial_settings
1971
+
1972
+ def initialize(
1973
+ application_fee_percent: nil,
1974
+ billing_cycle_anchor: nil,
1975
+ default_tax_rates: nil,
1976
+ description: nil,
1977
+ invoice_settings: nil,
1978
+ metadata: nil,
1979
+ on_behalf_of: nil,
1980
+ proration_behavior: nil,
1981
+ transfer_data: nil,
1982
+ trial_end: nil,
1983
+ trial_period_days: nil,
1984
+ trial_settings: nil
1985
+ )
1986
+ @application_fee_percent = application_fee_percent
1987
+ @billing_cycle_anchor = billing_cycle_anchor
1988
+ @default_tax_rates = default_tax_rates
1989
+ @description = description
1990
+ @invoice_settings = invoice_settings
1991
+ @metadata = metadata
1992
+ @on_behalf_of = on_behalf_of
1993
+ @proration_behavior = proration_behavior
1994
+ @transfer_data = transfer_data
1995
+ @trial_end = trial_end
1996
+ @trial_period_days = trial_period_days
1997
+ @trial_settings = trial_settings
1998
+ end
1999
+ end
2000
+
2001
+ class TaxIdCollection < Stripe::RequestParams
2002
+ # Enable tax ID collection during checkout. Defaults to `false`.
2003
+ attr_accessor :enabled
2004
+ # Describes whether a tax ID is required during checkout. Defaults to `never`.
2005
+ attr_accessor :required
2006
+
2007
+ def initialize(enabled: nil, required: nil)
2008
+ @enabled = enabled
2009
+ @required = required
2010
+ end
2011
+ end
2012
+ # Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing).
2013
+ attr_accessor :adaptive_pricing
2014
+ # Configure actions after a Checkout Session has expired.
2015
+ attr_accessor :after_expiration
2016
+ # Enables user redeemable promotion codes.
2017
+ attr_accessor :allow_promotion_codes
2018
+ # Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions.
2019
+ attr_accessor :automatic_tax
2020
+ # Specify whether Checkout should collect the customer's billing address. Defaults to `auto`.
2021
+ attr_accessor :billing_address_collection
2022
+ # 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`.
2023
+ attr_accessor :cancel_url
2024
+ # A unique string to reference the Checkout Session. This can be a
2025
+ # customer ID, a cart ID, or similar, and can be used to reconcile the
2026
+ # session with your internal systems.
2027
+ attr_accessor :client_reference_id
2028
+ # Configure fields for the Checkout Session to gather active consent from customers.
2029
+ attr_accessor :consent_collection
2030
+ # 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.
2031
+ attr_accessor :currency
2032
+ # Collect additional information from your customer using custom fields. Up to 3 fields are supported.
2033
+ attr_accessor :custom_fields
2034
+ # Display additional text for your customers using custom text.
2035
+ attr_accessor :custom_text
2036
+ # ID of an existing Customer, if one exists. In `payment` mode, the customer’s most recently saved card
2037
+ # payment method will be used to prefill the email, name, card details, and billing address
2038
+ # 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)
2039
+ # 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.
2040
+ #
2041
+ # 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.
2042
+ # If the Customer does not have a valid `email`, Checkout will set the email entered during the session on the Customer.
2043
+ #
2044
+ # 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.
2045
+ #
2046
+ # 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.
2047
+ attr_accessor :customer
2048
+ # Configure whether a Checkout Session creates a [Customer](https://stripe.com/docs/api/customers) during Session confirmation.
2049
+ #
2050
+ # When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout
2051
+ # with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details).
2052
+ #
2053
+ # Sessions that don't create Customers instead are grouped by [guest customers](https://stripe.com/docs/payments/checkout/guest-customers)
2054
+ # in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions.
2055
+ #
2056
+ # Can only be set in `payment` and `setup` mode.
2057
+ attr_accessor :customer_creation
2058
+ # If provided, this value will be used when the Customer object is created.
2059
+ # If not provided, customers will be asked to enter their email address.
2060
+ # Use this parameter to prefill customer data if you already have an email
2061
+ # on file. To access information about the customer once a session is
2062
+ # complete, use the `customer` field.
2063
+ attr_accessor :customer_email
2064
+ # Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided.
2065
+ attr_accessor :customer_update
2066
+ # The coupon or promotion code to apply to this Session. Currently, only up to one may be specified.
2067
+ attr_accessor :discounts
2068
+ # Specifies which fields in the response should be expanded.
2069
+ attr_accessor :expand
2070
+ # 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.
2071
+ attr_accessor :expires_at
2072
+ # Generate a post-purchase Invoice for one-time payments.
2073
+ attr_accessor :invoice_creation
2074
+ # A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices).
2075
+ #
2076
+ # 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.
2077
+ #
2078
+ # 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.
2079
+ attr_accessor :line_items
2080
+ # The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.
2081
+ attr_accessor :locale
2082
+ # 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`.
2083
+ attr_accessor :metadata
2084
+ # The mode of the Checkout Session. Pass `subscription` if the Checkout Session includes at least one recurring item.
2085
+ attr_accessor :mode
2086
+ # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
2087
+ attr_accessor :payment_intent_data
2088
+ # 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.
2089
+ # This may occur if the Checkout Session includes a free trial or a discount.
2090
+ #
2091
+ # Can only be set in `subscription` mode. Defaults to `always`.
2092
+ #
2093
+ # 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).
2094
+ attr_accessor :payment_method_collection
2095
+ # The ID of the payment method configuration to use with this Checkout session.
2096
+ attr_accessor :payment_method_configuration
2097
+ # This parameter allows you to set some attributes on the payment method created during a Checkout session.
2098
+ attr_accessor :payment_method_data
2099
+ # Payment-method-specific configuration.
2100
+ attr_accessor :payment_method_options
2101
+ # A list of the types of payment methods (e.g., `card`) this Checkout Session can accept.
2102
+ #
2103
+ # You can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
2104
+ # See [Dynamic Payment Methods](https://stripe.com/docs/payments/payment-methods/integration-options#using-dynamic-payment-methods) for more details.
2105
+ #
2106
+ # Read more about the supported payment methods and their requirements in our [payment
2107
+ # method details guide](/docs/payments/checkout/payment-methods).
2108
+ #
2109
+ # If multiple payment methods are passed, Checkout will dynamically reorder them to
2110
+ # prioritize the most relevant payment methods based on the customer's location and
2111
+ # other characteristics.
2112
+ attr_accessor :payment_method_types
2113
+ # This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object.
2114
+ #
2115
+ # For specific permissions, please refer to their dedicated subsections, such as `permissions.update.shipping_details`.
2116
+ attr_accessor :permissions
2117
+ # Controls phone number collection settings for the session.
2118
+ #
2119
+ # We recommend that you review your privacy policy and check with your legal contacts
2120
+ # before using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers).
2121
+ attr_accessor :phone_number_collection
2122
+ # 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`.
2123
+ attr_accessor :redirect_on_completion
2124
+ # The URL to redirect your customer back to after they authenticate or cancel their payment on the
2125
+ # payment method's app or site. This parameter is required if `ui_mode` is `embedded` or `custom`
2126
+ # and redirect-based payment methods are enabled on the session.
2127
+ attr_accessor :return_url
2128
+ # Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode.
2129
+ attr_accessor :saved_payment_method_options
2130
+ # A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode.
2131
+ attr_accessor :setup_intent_data
2132
+ # When set, provides configuration for Checkout to collect a shipping address from a customer.
2133
+ attr_accessor :shipping_address_collection
2134
+ # The shipping rate options to apply to this Session. Up to a maximum of 5.
2135
+ attr_accessor :shipping_options
2136
+ # Describes the type of transaction being performed by Checkout in order to customize
2137
+ # relevant text on the page, such as the submit button. `submit_type` can only be
2138
+ # specified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used.
2139
+ attr_accessor :submit_type
2140
+ # A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode.
2141
+ attr_accessor :subscription_data
2142
+ # The URL to which Stripe should send customers when payment or setup
2143
+ # is complete.
2144
+ # This parameter is not allowed if ui_mode is `embedded` or `custom`. If you'd like to use
2145
+ # information from the successful Checkout Session on your page, read the
2146
+ # guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page).
2147
+ attr_accessor :success_url
2148
+ # Controls tax ID collection during checkout.
2149
+ attr_accessor :tax_id_collection
2150
+ # The UI mode of the Session. Defaults to `hosted`.
2151
+ attr_accessor :ui_mode
2152
+
2153
+ def initialize(
2154
+ adaptive_pricing: nil,
2155
+ after_expiration: nil,
2156
+ allow_promotion_codes: nil,
2157
+ automatic_tax: nil,
2158
+ billing_address_collection: nil,
2159
+ cancel_url: nil,
2160
+ client_reference_id: nil,
2161
+ consent_collection: nil,
2162
+ currency: nil,
2163
+ custom_fields: nil,
2164
+ custom_text: nil,
2165
+ customer: nil,
2166
+ customer_creation: nil,
2167
+ customer_email: nil,
2168
+ customer_update: nil,
2169
+ discounts: nil,
2170
+ expand: nil,
2171
+ expires_at: nil,
2172
+ invoice_creation: nil,
2173
+ line_items: nil,
2174
+ locale: nil,
2175
+ metadata: nil,
2176
+ mode: nil,
2177
+ payment_intent_data: nil,
2178
+ payment_method_collection: nil,
2179
+ payment_method_configuration: nil,
2180
+ payment_method_data: nil,
2181
+ payment_method_options: nil,
2182
+ payment_method_types: nil,
2183
+ permissions: nil,
2184
+ phone_number_collection: nil,
2185
+ redirect_on_completion: nil,
2186
+ return_url: nil,
2187
+ saved_payment_method_options: nil,
2188
+ setup_intent_data: nil,
2189
+ shipping_address_collection: nil,
2190
+ shipping_options: nil,
2191
+ submit_type: nil,
2192
+ subscription_data: nil,
2193
+ success_url: nil,
2194
+ tax_id_collection: nil,
2195
+ ui_mode: nil
2196
+ )
2197
+ @adaptive_pricing = adaptive_pricing
2198
+ @after_expiration = after_expiration
2199
+ @allow_promotion_codes = allow_promotion_codes
2200
+ @automatic_tax = automatic_tax
2201
+ @billing_address_collection = billing_address_collection
2202
+ @cancel_url = cancel_url
2203
+ @client_reference_id = client_reference_id
2204
+ @consent_collection = consent_collection
2205
+ @currency = currency
2206
+ @custom_fields = custom_fields
2207
+ @custom_text = custom_text
2208
+ @customer = customer
2209
+ @customer_creation = customer_creation
2210
+ @customer_email = customer_email
2211
+ @customer_update = customer_update
2212
+ @discounts = discounts
2213
+ @expand = expand
2214
+ @expires_at = expires_at
2215
+ @invoice_creation = invoice_creation
2216
+ @line_items = line_items
2217
+ @locale = locale
2218
+ @metadata = metadata
2219
+ @mode = mode
2220
+ @payment_intent_data = payment_intent_data
2221
+ @payment_method_collection = payment_method_collection
2222
+ @payment_method_configuration = payment_method_configuration
2223
+ @payment_method_data = payment_method_data
2224
+ @payment_method_options = payment_method_options
2225
+ @payment_method_types = payment_method_types
2226
+ @permissions = permissions
2227
+ @phone_number_collection = phone_number_collection
2228
+ @redirect_on_completion = redirect_on_completion
2229
+ @return_url = return_url
2230
+ @saved_payment_method_options = saved_payment_method_options
2231
+ @setup_intent_data = setup_intent_data
2232
+ @shipping_address_collection = shipping_address_collection
2233
+ @shipping_options = shipping_options
2234
+ @submit_type = submit_type
2235
+ @subscription_data = subscription_data
2236
+ @success_url = success_url
2237
+ @tax_id_collection = tax_id_collection
2238
+ @ui_mode = ui_mode
2239
+ end
2240
+ end
2241
+
2242
+ class RetrieveParams < Stripe::RequestParams
2243
+ # Specifies which fields in the response should be expanded.
2244
+ attr_accessor :expand
2245
+
2246
+ def initialize(expand: nil)
2247
+ @expand = expand
2248
+ end
2249
+ end
2250
+
2251
+ class UpdateParams < Stripe::RequestParams
2252
+ class CollectedInformation < Stripe::RequestParams
2253
+ class ShippingDetails < Stripe::RequestParams
2254
+ class Address < Stripe::RequestParams
2255
+ # City, district, suburb, town, or village.
2256
+ attr_accessor :city
2257
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
2258
+ attr_accessor :country
2259
+ # Address line 1 (e.g., street, PO Box, or company name).
2260
+ attr_accessor :line1
2261
+ # Address line 2 (e.g., apartment, suite, unit, or building).
2262
+ attr_accessor :line2
2263
+ # ZIP or postal code.
2264
+ attr_accessor :postal_code
2265
+ # State, county, province, or region.
2266
+ attr_accessor :state
2267
+
2268
+ def initialize(
2269
+ city: nil,
2270
+ country: nil,
2271
+ line1: nil,
2272
+ line2: nil,
2273
+ postal_code: nil,
2274
+ state: nil
2275
+ )
2276
+ @city = city
2277
+ @country = country
2278
+ @line1 = line1
2279
+ @line2 = line2
2280
+ @postal_code = postal_code
2281
+ @state = state
2282
+ end
2283
+ end
2284
+ # The address of the customer
2285
+ attr_accessor :address
2286
+ # The name of customer
2287
+ attr_accessor :name
2288
+
2289
+ def initialize(address: nil, name: nil)
2290
+ @address = address
2291
+ @name = name
2292
+ end
2293
+ end
2294
+ # The shipping details to apply to this Session.
2295
+ attr_accessor :shipping_details
2296
+
2297
+ def initialize(shipping_details: nil)
2298
+ @shipping_details = shipping_details
2299
+ end
2300
+ end
2301
+
2302
+ class LineItem < Stripe::RequestParams
2303
+ class AdjustableQuantity < Stripe::RequestParams
2304
+ # Set to true if the quantity can be adjusted to any positive integer. Setting to false will remove any previously specified constraints on quantity.
2305
+ attr_accessor :enabled
2306
+ # 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.
2307
+ attr_accessor :maximum
2308
+ # The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0.
2309
+ attr_accessor :minimum
2310
+
2311
+ def initialize(enabled: nil, maximum: nil, minimum: nil)
2312
+ @enabled = enabled
2313
+ @maximum = maximum
2314
+ @minimum = minimum
2315
+ end
2316
+ end
2317
+ # When set, provides configuration for this item’s quantity to be adjusted by the customer during Checkout.
2318
+ attr_accessor :adjustable_quantity
2319
+ # ID of an existing line item.
2320
+ attr_accessor :id
2321
+ # 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`.
2322
+ attr_accessor :metadata
2323
+ # The ID of the [Price](https://stripe.com/docs/api/prices).
2324
+ attr_accessor :price
2325
+ # The quantity of the line item being purchased.
2326
+ attr_accessor :quantity
2327
+ # The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item.
2328
+ attr_accessor :tax_rates
2329
+
2330
+ def initialize(
2331
+ adjustable_quantity: nil,
2332
+ id: nil,
2333
+ metadata: nil,
2334
+ price: nil,
2335
+ quantity: nil,
2336
+ tax_rates: nil
2337
+ )
2338
+ @adjustable_quantity = adjustable_quantity
2339
+ @id = id
2340
+ @metadata = metadata
2341
+ @price = price
2342
+ @quantity = quantity
2343
+ @tax_rates = tax_rates
2344
+ end
2345
+ end
2346
+
2347
+ class ShippingOption < Stripe::RequestParams
2348
+ class ShippingRateData < Stripe::RequestParams
2349
+ class DeliveryEstimate < Stripe::RequestParams
2350
+ class Maximum < Stripe::RequestParams
2351
+ # A unit of time.
2352
+ attr_accessor :unit
2353
+ # Must be greater than 0.
2354
+ attr_accessor :value
2355
+
2356
+ def initialize(unit: nil, value: nil)
2357
+ @unit = unit
2358
+ @value = value
2359
+ end
2360
+ end
2361
+
2362
+ class Minimum < Stripe::RequestParams
2363
+ # A unit of time.
2364
+ attr_accessor :unit
2365
+ # Must be greater than 0.
2366
+ attr_accessor :value
2367
+
2368
+ def initialize(unit: nil, value: nil)
2369
+ @unit = unit
2370
+ @value = value
2371
+ end
2372
+ end
2373
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
2374
+ attr_accessor :maximum
2375
+ # The lower bound of the estimated range. If empty, represents no lower bound.
2376
+ attr_accessor :minimum
2377
+
2378
+ def initialize(maximum: nil, minimum: nil)
2379
+ @maximum = maximum
2380
+ @minimum = minimum
2381
+ end
2382
+ end
2383
+
2384
+ class FixedAmount < Stripe::RequestParams
2385
+ class CurrencyOptions < Stripe::RequestParams
2386
+ # A non-negative integer in cents representing how much to charge.
2387
+ attr_accessor :amount
2388
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
2389
+ attr_accessor :tax_behavior
2390
+
2391
+ def initialize(amount: nil, tax_behavior: nil)
2392
+ @amount = amount
2393
+ @tax_behavior = tax_behavior
2394
+ end
2395
+ end
2396
+ # A non-negative integer in cents representing how much to charge.
2397
+ attr_accessor :amount
2398
+ # 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).
2399
+ attr_accessor :currency
2400
+ # 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).
2401
+ attr_accessor :currency_options
2402
+
2403
+ def initialize(amount: nil, currency: nil, currency_options: nil)
2404
+ @amount = amount
2405
+ @currency = currency
2406
+ @currency_options = currency_options
2407
+ end
2408
+ end
2409
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
2410
+ attr_accessor :delivery_estimate
2411
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
2412
+ attr_accessor :display_name
2413
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
2414
+ attr_accessor :fixed_amount
2415
+ # 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`.
2416
+ attr_accessor :metadata
2417
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
2418
+ attr_accessor :tax_behavior
2419
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
2420
+ attr_accessor :tax_code
2421
+ # The type of calculation to use on the shipping rate.
2422
+ attr_accessor :type
2423
+
2424
+ def initialize(
2425
+ delivery_estimate: nil,
2426
+ display_name: nil,
2427
+ fixed_amount: nil,
2428
+ metadata: nil,
2429
+ tax_behavior: nil,
2430
+ tax_code: nil,
2431
+ type: nil
2432
+ )
2433
+ @delivery_estimate = delivery_estimate
2434
+ @display_name = display_name
2435
+ @fixed_amount = fixed_amount
2436
+ @metadata = metadata
2437
+ @tax_behavior = tax_behavior
2438
+ @tax_code = tax_code
2439
+ @type = type
2440
+ end
2441
+ end
2442
+ # The ID of the Shipping Rate to use for this shipping option.
2443
+ attr_accessor :shipping_rate
2444
+ # Parameters to be passed to Shipping Rate creation for this shipping option.
2445
+ attr_accessor :shipping_rate_data
2446
+
2447
+ def initialize(shipping_rate: nil, shipping_rate_data: nil)
2448
+ @shipping_rate = shipping_rate
2449
+ @shipping_rate_data = shipping_rate_data
2450
+ end
2451
+ end
2452
+ # Information about the customer collected within the Checkout Session.
2453
+ attr_accessor :collected_information
2454
+ # Specifies which fields in the response should be expanded.
2455
+ attr_accessor :expand
2456
+ # A list of items the customer is purchasing.
2457
+ #
2458
+ # When updating line items, you must retransmit the entire array of line items.
2459
+ #
2460
+ # To retain an existing line item, specify its `id`.
2461
+ #
2462
+ # To update an existing line item, specify its `id` along with the new values of the fields to update.
2463
+ #
2464
+ # To add a new line item, specify a `price` and `quantity`. We don't currently support recurring prices.
2465
+ #
2466
+ # To remove an existing line item, omit the line item's ID from the retransmitted array.
2467
+ #
2468
+ # To reorder a line item, specify it at the desired position in the retransmitted array.
2469
+ attr_accessor :line_items
2470
+ # 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`.
2471
+ attr_accessor :metadata
2472
+ # The shipping rate options to apply to this Session. Up to a maximum of 5.
2473
+ attr_accessor :shipping_options
2474
+
2475
+ def initialize(
2476
+ collected_information: nil,
2477
+ expand: nil,
2478
+ line_items: nil,
2479
+ metadata: nil,
2480
+ shipping_options: nil
2481
+ )
2482
+ @collected_information = collected_information
2483
+ @expand = expand
2484
+ @line_items = line_items
2485
+ @metadata = metadata
2486
+ @shipping_options = shipping_options
2487
+ end
2488
+ end
2489
+
2490
+ class ExpireParams < Stripe::RequestParams
2491
+ # Specifies which fields in the response should be expanded.
2492
+ attr_accessor :expand
2493
+
2494
+ def initialize(expand: nil)
2495
+ @expand = expand
2496
+ end
2497
+ end
2498
+
14
2499
  # Creates a Session object.
15
2500
  def create(params = {}, opts = {})
16
2501
  request(