stripe 12.5.0 → 15.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (688) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +197 -9
  3. data/Gemfile +4 -0
  4. data/Makefile +2 -0
  5. data/OPENAPI_VERSION +1 -1
  6. data/README.md +48 -13
  7. data/Rakefile +0 -5
  8. data/VERSION +1 -1
  9. data/examples/README.md +16 -0
  10. data/examples/example_template.rb +36 -0
  11. data/examples/meter_event_stream.rb +57 -0
  12. data/examples/thinevent_webhook_handler.rb +39 -0
  13. data/justfile +43 -0
  14. data/lib/stripe/api_operations/nested_resource.rb +1 -21
  15. data/lib/stripe/api_operations/request.rb +20 -69
  16. data/lib/stripe/api_operations/save.rb +5 -3
  17. data/lib/stripe/api_operations/singleton_save.rb +6 -2
  18. data/lib/stripe/api_requestor.rb +1136 -0
  19. data/lib/stripe/api_resource.rb +38 -17
  20. data/lib/stripe/api_version.rb +1 -1
  21. data/lib/stripe/connection_manager.rb +1 -1
  22. data/lib/stripe/errors.rb +8 -9
  23. data/lib/stripe/event_types.rb +14 -0
  24. data/lib/stripe/events/v1_billing_meter_error_report_triggered_event.rb +23 -0
  25. data/lib/stripe/events/v1_billing_meter_no_meter_found_event.rb +13 -0
  26. data/lib/stripe/list_object.rb +2 -3
  27. data/lib/stripe/oauth.rb +8 -15
  28. data/lib/stripe/object_types.rb +26 -3
  29. data/lib/stripe/request_options.rb +129 -0
  30. data/lib/stripe/request_params.rb +24 -0
  31. data/lib/stripe/resources/account.rb +4642 -8
  32. data/lib/stripe/resources/account_link.rb +54 -0
  33. data/lib/stripe/resources/account_session.rb +739 -0
  34. data/lib/stripe/resources/apple_pay_domain.rb +58 -9
  35. data/lib/stripe/resources/application.rb +20 -0
  36. data/lib/stripe/resources/application_fee.rb +89 -2
  37. data/lib/stripe/resources/application_fee_refund.rb +17 -0
  38. data/lib/stripe/resources/apps/secret.rb +143 -2
  39. data/lib/stripe/resources/balance.rb +122 -0
  40. data/lib/stripe/resources/balance_transaction.rb +105 -2
  41. data/lib/stripe/resources/bank_account.rb +85 -3
  42. data/lib/stripe/resources/billing/alert.rb +137 -2
  43. data/lib/stripe/resources/billing/alert_triggered.rb +26 -0
  44. data/lib/stripe/resources/billing/credit_balance_summary.rb +54 -0
  45. data/lib/stripe/resources/billing/credit_balance_transaction.rb +133 -0
  46. data/lib/stripe/resources/billing/credit_grant.rb +307 -0
  47. data/lib/stripe/resources/billing/meter.rb +180 -9
  48. data/lib/stripe/resources/billing/meter_event.rb +37 -3
  49. data/lib/stripe/resources/billing/meter_event_adjustment.rb +44 -1
  50. data/lib/stripe/resources/billing/meter_event_summary.rb +17 -0
  51. data/lib/stripe/resources/billing_portal/configuration.rb +557 -4
  52. data/lib/stripe/resources/billing_portal/session.rb +271 -0
  53. data/lib/stripe/resources/capability.rb +84 -0
  54. data/lib/stripe/resources/card.rb +78 -1
  55. data/lib/stripe/resources/cash_balance.rb +17 -0
  56. data/lib/stripe/resources/charge.rb +1616 -4
  57. data/lib/stripe/resources/checkout/session.rb +3534 -10
  58. data/lib/stripe/resources/climate/order.rb +171 -4
  59. data/lib/stripe/resources/climate/product.rb +49 -2
  60. data/lib/stripe/resources/climate/supplier.rb +47 -2
  61. data/lib/stripe/resources/confirmation_token.rb +1448 -0
  62. data/lib/stripe/resources/connect_collection_transfer.rb +24 -0
  63. data/lib/stripe/resources/country_spec.rb +56 -2
  64. data/lib/stripe/resources/coupon.rb +195 -6
  65. data/lib/stripe/resources/credit_note.rb +641 -2
  66. data/lib/stripe/resources/credit_note_line_item.rb +67 -0
  67. data/lib/stripe/resources/customer.rb +832 -9
  68. data/lib/stripe/resources/customer_balance_transaction.rb +29 -0
  69. data/lib/stripe/resources/customer_cash_balance_transaction.rb +109 -0
  70. data/lib/stripe/resources/customer_session.rb +163 -0
  71. data/lib/stripe/resources/discount.rb +29 -0
  72. data/lib/stripe/resources/dispute.rb +614 -4
  73. data/lib/stripe/resources/entitlements/active_entitlement.rb +39 -2
  74. data/lib/stripe/resources/entitlements/active_entitlement_summary.rb +23 -0
  75. data/lib/stripe/resources/entitlements/feature.rb +83 -2
  76. data/lib/stripe/resources/ephemeral_key.rb +23 -2
  77. data/lib/stripe/resources/event.rb +92 -2
  78. data/lib/stripe/resources/exchange_rate.rb +26 -2
  79. data/lib/stripe/resources/file.rb +123 -15
  80. data/lib/stripe/resources/file_link.rb +107 -4
  81. data/lib/stripe/resources/financial_connections/account.rb +239 -2
  82. data/lib/stripe/resources/financial_connections/account_owner.rb +17 -0
  83. data/lib/stripe/resources/financial_connections/account_ownership.rb +9 -0
  84. data/lib/stripe/resources/financial_connections/session.rb +95 -0
  85. data/lib/stripe/resources/financial_connections/transaction.rb +94 -2
  86. data/lib/stripe/resources/forwarding/request.rb +158 -2
  87. data/lib/stripe/resources/funding_instructions.rb +308 -0
  88. data/lib/stripe/resources/identity/verification_report.rb +259 -2
  89. data/lib/stripe/resources/identity/verification_session.rb +356 -4
  90. data/lib/stripe/resources/invoice.rb +3210 -27
  91. data/lib/stripe/resources/invoice_item.rb +406 -6
  92. data/lib/stripe/resources/invoice_line_item.rb +356 -3
  93. data/lib/stripe/resources/invoice_payment.rb +105 -0
  94. data/lib/stripe/resources/invoice_rendering_template.rb +120 -0
  95. data/lib/stripe/resources/issuing/authorization.rb +1132 -6
  96. data/lib/stripe/resources/issuing/card.rb +682 -5
  97. data/lib/stripe/resources/issuing/cardholder.rb +653 -5
  98. data/lib/stripe/resources/issuing/dispute.rb +785 -4
  99. data/lib/stripe/resources/issuing/personalization_design.rb +280 -4
  100. data/lib/stripe/resources/issuing/physical_bundle.rb +56 -2
  101. data/lib/stripe/resources/issuing/token.rb +170 -4
  102. data/lib/stripe/resources/issuing/transaction.rb +916 -4
  103. data/lib/stripe/resources/line_item.rb +47 -0
  104. data/lib/stripe/resources/login_link.rb +7 -0
  105. data/lib/stripe/resources/mandate.rb +142 -0
  106. data/lib/stripe/resources/payment_intent.rb +8660 -4
  107. data/lib/stripe/resources/payment_link.rb +1636 -4
  108. data/lib/stripe/resources/payment_method.rb +1546 -4
  109. data/lib/stripe/resources/payment_method_configuration.rb +2780 -4
  110. data/lib/stripe/resources/payment_method_domain.rb +154 -10
  111. data/lib/stripe/resources/payout.rb +213 -4
  112. data/lib/stripe/resources/person.rb +264 -1
  113. data/lib/stripe/resources/plan.rb +308 -6
  114. data/lib/stripe/resources/price.rb +609 -5
  115. data/lib/stripe/resources/product.rb +474 -2
  116. data/lib/stripe/resources/product_feature.rb +12 -0
  117. data/lib/stripe/resources/promotion_code.rb +216 -4
  118. data/lib/stripe/resources/quote.rb +927 -10
  119. data/lib/stripe/resources/radar/early_fraud_warning.rb +70 -2
  120. data/lib/stripe/resources/radar/value_list.rb +122 -6
  121. data/lib/stripe/resources/radar/value_list_item.rb +90 -4
  122. data/lib/stripe/resources/refund.rb +396 -4
  123. data/lib/stripe/resources/reporting/report_run.rb +143 -2
  124. data/lib/stripe/resources/reporting/report_type.rb +29 -2
  125. data/lib/stripe/resources/reserve_transaction.rb +22 -0
  126. data/lib/stripe/resources/reversal.rb +21 -0
  127. data/lib/stripe/resources/review.rb +101 -2
  128. data/lib/stripe/resources/setup_attempt.rb +370 -2
  129. data/lib/stripe/resources/setup_intent.rb +3477 -4
  130. data/lib/stripe/resources/shipping_rate.rb +254 -4
  131. data/lib/stripe/resources/sigma/scheduled_query_run.rb +47 -2
  132. data/lib/stripe/resources/source.rb +1203 -4
  133. data/lib/stripe/resources/source_mandate_notification.rb +66 -0
  134. data/lib/stripe/resources/source_transaction.rb +85 -0
  135. data/lib/stripe/resources/subscription.rb +1697 -11
  136. data/lib/stripe/resources/subscription_item.rb +319 -11
  137. data/lib/stripe/resources/subscription_schedule.rb +1285 -4
  138. data/lib/stripe/resources/tax/calculation.rb +378 -0
  139. data/lib/stripe/resources/tax/calculation_line_item.rb +56 -0
  140. data/lib/stripe/resources/tax/registration.rb +2375 -2
  141. data/lib/stripe/resources/tax/settings.rb +117 -0
  142. data/lib/stripe/resources/tax/transaction.rb +258 -0
  143. data/lib/stripe/resources/tax/transaction_line_item.rb +31 -0
  144. data/lib/stripe/resources/tax_code.rb +28 -2
  145. data/lib/stripe/resources/tax_deducted_at_source.rb +22 -0
  146. data/lib/stripe/resources/tax_id.rb +114 -2
  147. data/lib/stripe/resources/tax_rate.rb +197 -6
  148. data/lib/stripe/resources/terminal/configuration.rb +1266 -6
  149. data/lib/stripe/resources/terminal/connection_token.rb +18 -0
  150. data/lib/stripe/resources/terminal/location.rb +172 -6
  151. data/lib/stripe/resources/terminal/reader.rb +433 -6
  152. data/lib/stripe/resources/test_helpers/test_clock.rb +81 -4
  153. data/lib/stripe/resources/token.rb +1160 -1
  154. data/lib/stripe/resources/topup.rb +169 -4
  155. data/lib/stripe/resources/transfer.rb +148 -4
  156. data/lib/stripe/resources/treasury/credit_reversal.rb +85 -2
  157. data/lib/stripe/resources/treasury/debit_reversal.rb +96 -2
  158. data/lib/stripe/resources/treasury/financial_account.rb +749 -5
  159. data/lib/stripe/resources/treasury/financial_account_features.rb +189 -0
  160. data/lib/stripe/resources/treasury/inbound_transfer.rb +231 -3
  161. data/lib/stripe/resources/treasury/outbound_payment.rb +491 -3
  162. data/lib/stripe/resources/treasury/outbound_transfer.rb +346 -3
  163. data/lib/stripe/resources/treasury/received_credit.rb +239 -2
  164. data/lib/stripe/resources/treasury/received_debit.rb +198 -2
  165. data/lib/stripe/resources/treasury/transaction.rb +169 -2
  166. data/lib/stripe/resources/treasury/transaction_entry.rb +150 -2
  167. data/lib/stripe/resources/v2/amount.rb +9 -0
  168. data/lib/stripe/resources/v2/billing/meter_event.rb +34 -0
  169. data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +36 -0
  170. data/lib/stripe/resources/v2/billing/meter_event_session.rb +29 -0
  171. data/lib/stripe/resources/v2/event.rb +41 -0
  172. data/lib/stripe/resources/v2/event_destination.rb +73 -0
  173. data/lib/stripe/resources/webhook_endpoint.rb +119 -11
  174. data/lib/stripe/resources.rb +19 -2
  175. data/lib/stripe/search_result_object.rb +1 -1
  176. data/lib/stripe/services/account_capability_service.rb +71 -0
  177. data/lib/stripe/services/account_external_account_service.rb +318 -0
  178. data/lib/stripe/services/account_link_service.rb +63 -0
  179. data/lib/stripe/services/account_login_link_service.rb +28 -0
  180. data/lib/stripe/services/account_person_service.rb +936 -0
  181. data/lib/stripe/services/account_service.rb +4100 -0
  182. data/lib/stripe/services/account_session_service.rb +501 -0
  183. data/lib/stripe/services/apple_pay_domain_service.rb +101 -0
  184. data/lib/stripe/services/application_fee_refund_service.rb +114 -0
  185. data/lib/stripe/services/application_fee_service.rb +92 -0
  186. data/lib/stripe/services/apps/secret_service.rb +168 -0
  187. data/lib/stripe/services/apps_service.rb +13 -0
  188. data/lib/stripe/services/balance_service.rb +21 -0
  189. data/lib/stripe/services/balance_transaction_service.rb +101 -0
  190. data/lib/stripe/services/billing/alert_service.rb +187 -0
  191. data/lib/stripe/services/billing/credit_balance_summary_service.rb +67 -0
  192. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +70 -0
  193. data/lib/stripe/services/billing/credit_grant_service.rb +240 -0
  194. data/lib/stripe/services/billing/meter_event_adjustment_service.rb +45 -0
  195. data/lib/stripe/services/billing/meter_event_service.rb +40 -0
  196. data/lib/stripe/services/billing/meter_event_summary_service.rb +58 -0
  197. data/lib/stripe/services/billing/meter_service.rb +211 -0
  198. data/lib/stripe/services/billing_portal/configuration_service.rb +496 -0
  199. data/lib/stripe/services/billing_portal/session_service.rb +192 -0
  200. data/lib/stripe/services/billing_portal_service.rb +14 -0
  201. data/lib/stripe/services/billing_service.rb +20 -0
  202. data/lib/stripe/services/charge_service.rb +471 -0
  203. data/lib/stripe/services/checkout/session_line_item_service.rb +37 -0
  204. data/lib/stripe/services/checkout/session_service.rb +2466 -0
  205. data/lib/stripe/services/checkout_service.rb +13 -0
  206. data/lib/stripe/services/climate/order_service.rb +170 -0
  207. data/lib/stripe/services/climate/product_service.rb +57 -0
  208. data/lib/stripe/services/climate/supplier_service.rb +57 -0
  209. data/lib/stripe/services/climate_service.rb +15 -0
  210. data/lib/stripe/services/confirmation_token_service.rb +26 -0
  211. data/lib/stripe/services/country_spec_service.rb +55 -0
  212. data/lib/stripe/services/coupon_service.rb +203 -0
  213. data/lib/stripe/services/credit_note_line_item_service.rb +35 -0
  214. data/lib/stripe/services/credit_note_preview_lines_service.rb +169 -0
  215. data/lib/stripe/services/credit_note_service.rb +458 -0
  216. data/lib/stripe/services/customer_balance_transaction_service.rb +113 -0
  217. data/lib/stripe/services/customer_cash_balance_service.rb +57 -0
  218. data/lib/stripe/services/customer_cash_balance_transaction_service.rb +55 -0
  219. data/lib/stripe/services/customer_funding_instructions_service.rb +61 -0
  220. data/lib/stripe/services/customer_payment_method_service.rb +68 -0
  221. data/lib/stripe/services/customer_payment_source_service.rb +255 -0
  222. data/lib/stripe/services/customer_service.rb +666 -0
  223. data/lib/stripe/services/customer_session_service.rb +113 -0
  224. data/lib/stripe/services/customer_tax_id_service.rb +95 -0
  225. data/lib/stripe/services/dispute_service.rb +422 -0
  226. data/lib/stripe/services/entitlements/active_entitlement_service.rb +66 -0
  227. data/lib/stripe/services/entitlements/feature_service.rb +128 -0
  228. data/lib/stripe/services/entitlements_service.rb +14 -0
  229. data/lib/stripe/services/ephemeral_key_service.rb +64 -0
  230. data/lib/stripe/services/event_service.rb +87 -0
  231. data/lib/stripe/services/exchange_rate_service.rb +55 -0
  232. data/lib/stripe/services/file_link_service.rb +132 -0
  233. data/lib/stripe/services/file_service.rb +124 -0
  234. data/lib/stripe/services/financial_connections/account_owner_service.rb +46 -0
  235. data/lib/stripe/services/financial_connections/account_service.rb +177 -0
  236. data/lib/stripe/services/financial_connections/session_service.rb +98 -0
  237. data/lib/stripe/services/financial_connections/transaction_service.rb +100 -0
  238. data/lib/stripe/services/financial_connections_service.rb +15 -0
  239. data/lib/stripe/services/forwarding/request_service.rb +147 -0
  240. data/lib/stripe/services/forwarding_service.rb +13 -0
  241. data/lib/stripe/services/identity/verification_report_service.rb +95 -0
  242. data/lib/stripe/services/identity/verification_session_service.rb +337 -0
  243. data/lib/stripe/services/identity_service.rb +14 -0
  244. data/lib/stripe/services/invoice_item_service.rb +395 -0
  245. data/lib/stripe/services/invoice_line_item_service.rb +252 -0
  246. data/lib/stripe/services/invoice_payment_service.rb +83 -0
  247. data/lib/stripe/services/invoice_rendering_template_service.rb +101 -0
  248. data/lib/stripe/services/invoice_service.rb +2831 -0
  249. data/lib/stripe/services/issuing/authorization_service.rb +169 -0
  250. data/lib/stripe/services/issuing/card_service.rb +507 -0
  251. data/lib/stripe/services/issuing/cardholder_service.rb +577 -0
  252. data/lib/stripe/services/issuing/dispute_service.rb +696 -0
  253. data/lib/stripe/services/issuing/personalization_design_service.rb +245 -0
  254. data/lib/stripe/services/issuing/physical_bundle_service.rb +70 -0
  255. data/lib/stripe/services/issuing/token_service.rb +114 -0
  256. data/lib/stripe/services/issuing/transaction_service.rb +118 -0
  257. data/lib/stripe/services/issuing_service.rb +20 -0
  258. data/lib/stripe/services/mandate_service.rb +26 -0
  259. data/lib/stripe/services/oauth_service.rb +63 -0
  260. data/lib/stripe/services/payment_intent_service.rb +7258 -0
  261. data/lib/stripe/services/payment_link_line_item_service.rb +35 -0
  262. data/lib/stripe/services/payment_link_service.rb +1333 -0
  263. data/lib/stripe/services/payment_method_configuration_service.rb +2054 -0
  264. data/lib/stripe/services/payment_method_domain_service.rb +142 -0
  265. data/lib/stripe/services/payment_method_service.rb +894 -0
  266. data/lib/stripe/services/payout_service.rb +225 -0
  267. data/lib/stripe/services/plan_service.rb +298 -0
  268. data/lib/stripe/services/price_service.rb +545 -0
  269. data/lib/stripe/services/product_feature_service.rb +92 -0
  270. data/lib/stripe/services/product_service.rb +495 -0
  271. data/lib/stripe/services/promotion_code_service.rb +228 -0
  272. data/lib/stripe/services/quote_computed_upfront_line_items_service.rb +35 -0
  273. data/lib/stripe/services/quote_line_item_service.rb +35 -0
  274. data/lib/stripe/services/quote_service.rb +703 -0
  275. data/lib/stripe/services/radar/early_fraud_warning_service.rb +93 -0
  276. data/lib/stripe/services/radar/value_list_item_service.rb +131 -0
  277. data/lib/stripe/services/radar/value_list_service.rb +166 -0
  278. data/lib/stripe/services/radar_service.rb +15 -0
  279. data/lib/stripe/services/refund_service.rb +200 -0
  280. data/lib/stripe/services/reporting/report_run_service.rb +147 -0
  281. data/lib/stripe/services/reporting/report_type_service.rb +48 -0
  282. data/lib/stripe/services/reporting_service.rb +14 -0
  283. data/lib/stripe/services/review_service.rb +89 -0
  284. data/lib/stripe/services/setup_attempt_service.rb +68 -0
  285. data/lib/stripe/services/setup_intent_service.rb +3268 -0
  286. data/lib/stripe/services/shipping_rate_service.rb +250 -0
  287. data/lib/stripe/services/sigma/scheduled_query_run_service.rb +57 -0
  288. data/lib/stripe/services/sigma_service.rb +13 -0
  289. data/lib/stripe/services/source_service.rb +665 -0
  290. data/lib/stripe/services/source_transaction_service.rb +35 -0
  291. data/lib/stripe/services/subscription_item_service.rb +346 -0
  292. data/lib/stripe/services/subscription_schedule_service.rb +1134 -0
  293. data/lib/stripe/services/subscription_service.rb +1539 -0
  294. data/lib/stripe/services/tax/calculation_line_item_service.rb +37 -0
  295. data/lib/stripe/services/tax/calculation_service.rb +242 -0
  296. data/lib/stripe/services/tax/registration_service.rb +1618 -0
  297. data/lib/stripe/services/tax/settings_service.rb +104 -0
  298. data/lib/stripe/services/tax/transaction_line_item_service.rb +37 -0
  299. data/lib/stripe/services/tax/transaction_service.rb +159 -0
  300. data/lib/stripe/services/tax_code_service.rb +49 -0
  301. data/lib/stripe/services/tax_id_service.rb +117 -0
  302. data/lib/stripe/services/tax_rate_service.rb +193 -0
  303. data/lib/stripe/services/tax_service.rb +16 -0
  304. data/lib/stripe/services/terminal/configuration_service.rb +1060 -0
  305. data/lib/stripe/services/terminal/connection_token_service.rb +31 -0
  306. data/lib/stripe/services/terminal/location_service.rb +208 -0
  307. data/lib/stripe/services/terminal/reader_service.rb +384 -0
  308. data/lib/stripe/services/terminal_service.rb +16 -0
  309. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +661 -0
  310. data/lib/stripe/services/test_helpers/customer_service.rb +37 -0
  311. data/lib/stripe/services/test_helpers/issuing/authorization_service.rb +832 -0
  312. data/lib/stripe/services/test_helpers/issuing/card_service.rb +110 -0
  313. data/lib/stripe/services/test_helpers/issuing/personalization_design_service.rb +84 -0
  314. data/lib/stripe/services/test_helpers/issuing/transaction_service.rb +675 -0
  315. data/lib/stripe/services/test_helpers/issuing_service.rb +19 -0
  316. data/lib/stripe/services/test_helpers/refund_service.rb +28 -0
  317. data/lib/stripe/services/test_helpers/terminal/reader_service.rb +65 -0
  318. data/lib/stripe/services/test_helpers/terminal_service.rb +15 -0
  319. data/lib/stripe/services/test_helpers/test_clock_service.rb +120 -0
  320. data/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb +81 -0
  321. data/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb +141 -0
  322. data/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb +141 -0
  323. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +81 -0
  324. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +81 -0
  325. data/lib/stripe/services/test_helpers/treasury_service.rb +19 -0
  326. data/lib/stripe/services/test_helpers_service.rb +19 -0
  327. data/lib/stripe/services/token_service.rb +1163 -0
  328. data/lib/stripe/services/topup_service.rb +191 -0
  329. data/lib/stripe/services/transfer_reversal_service.rb +122 -0
  330. data/lib/stripe/services/transfer_service.rb +166 -0
  331. data/lib/stripe/services/treasury/credit_reversal_service.rb +100 -0
  332. data/lib/stripe/services/treasury/debit_reversal_service.rb +104 -0
  333. data/lib/stripe/services/treasury/financial_account_features_service.rb +196 -0
  334. data/lib/stripe/services/treasury/financial_account_service.rb +554 -0
  335. data/lib/stripe/services/treasury/inbound_transfer_service.rb +140 -0
  336. data/lib/stripe/services/treasury/outbound_payment_service.rb +310 -0
  337. data/lib/stripe/services/treasury/outbound_transfer_service.rb +176 -0
  338. data/lib/stripe/services/treasury/received_credit_service.rb +82 -0
  339. data/lib/stripe/services/treasury/received_debit_service.rb +70 -0
  340. data/lib/stripe/services/treasury/transaction_entry_service.rb +117 -0
  341. data/lib/stripe/services/treasury/transaction_service.rb +125 -0
  342. data/lib/stripe/services/treasury_service.rb +22 -0
  343. data/lib/stripe/services/v1_services.rb +90 -0
  344. data/lib/stripe/services/v2/billing/meter_event_adjustment_service.rb +44 -0
  345. data/lib/stripe/services/v2/billing/meter_event_service.rb +46 -0
  346. data/lib/stripe/services/v2/billing/meter_event_session_service.rb +24 -0
  347. data/lib/stripe/services/v2/billing/meter_event_stream_service.rb +56 -0
  348. data/lib/stripe/services/v2/billing_service.rb +18 -0
  349. data/lib/stripe/services/v2/core/event_destination_service.rb +241 -0
  350. data/lib/stripe/services/v2/core/event_service.rb +49 -0
  351. data/lib/stripe/services/v2/core_service.rb +16 -0
  352. data/lib/stripe/services/v2_services.rb +14 -0
  353. data/lib/stripe/services/webhook_endpoint_service.rb +157 -0
  354. data/lib/stripe/services.rb +180 -0
  355. data/lib/stripe/singleton_api_resource.rb +1 -18
  356. data/lib/stripe/stripe_client.rb +53 -1031
  357. data/lib/stripe/stripe_configuration.rb +52 -19
  358. data/lib/stripe/stripe_object.rb +54 -20
  359. data/lib/stripe/stripe_service.rb +32 -0
  360. data/lib/stripe/thin_event.rb +37 -0
  361. data/lib/stripe/util.rb +78 -37
  362. data/lib/stripe/v2_list_object.rb +84 -0
  363. data/lib/stripe/version.rb +1 -1
  364. data/lib/stripe/webhook.rb +1 -1
  365. data/lib/stripe.rb +38 -25
  366. data/rbi/stripe/resources/account.rbi +4840 -0
  367. data/rbi/stripe/resources/account_link.rbi +74 -0
  368. data/rbi/stripe/resources/account_session.rbi +894 -0
  369. data/rbi/stripe/resources/apple_pay_domain.rbi +90 -0
  370. data/rbi/stripe/resources/application.rbi +20 -0
  371. data/rbi/stripe/resources/application_fee.rbi +118 -0
  372. data/rbi/stripe/resources/application_fee_refund.rbi +37 -0
  373. data/rbi/stripe/resources/apps/secret.rbi +195 -0
  374. data/rbi/stripe/resources/balance.rbi +180 -0
  375. data/rbi/stripe/resources/balance_transaction.rbi +144 -0
  376. data/rbi/stripe/resources/bank_account.rbi +127 -0
  377. data/rbi/stripe/resources/billing/alert.rbi +201 -0
  378. data/rbi/stripe/resources/billing/alert_triggered.rbi +28 -0
  379. data/rbi/stripe/resources/billing/credit_balance_summary.rbi +63 -0
  380. data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +147 -0
  381. data/rbi/stripe/resources/billing/credit_grant.rbi +291 -0
  382. data/rbi/stripe/resources/billing/meter.rbi +226 -0
  383. data/rbi/stripe/resources/billing/meter_event.rbi +64 -0
  384. data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +64 -0
  385. data/rbi/stripe/resources/billing/meter_event_summary.rbi +35 -0
  386. data/rbi/stripe/resources/billing_portal/configuration.rbi +645 -0
  387. data/rbi/stripe/resources/billing_portal/session.rbi +345 -0
  388. data/rbi/stripe/resources/capability.rbi +125 -0
  389. data/rbi/stripe/resources/card.rbi +125 -0
  390. data/rbi/stripe/resources/cash_balance.rbi +32 -0
  391. data/rbi/stripe/resources/charge.rbi +2054 -0
  392. data/rbi/stripe/resources/checkout/session.rbi +3951 -0
  393. data/rbi/stripe/resources/climate/order.rbi +245 -0
  394. data/rbi/stripe/resources/climate/product.rbi +75 -0
  395. data/rbi/stripe/resources/climate/supplier.rbi +72 -0
  396. data/rbi/stripe/resources/confirmation_token.rbi +1793 -0
  397. data/rbi/stripe/resources/connect_collection_transfer.rbi +26 -0
  398. data/rbi/stripe/resources/country_spec.rbi +85 -0
  399. data/rbi/stripe/resources/coupon.rbi +252 -0
  400. data/rbi/stripe/resources/credit_note.rbi +747 -0
  401. data/rbi/stripe/resources/credit_note_line_item.rbi +101 -0
  402. data/rbi/stripe/resources/customer.rbi +1009 -0
  403. data/rbi/stripe/resources/customer_balance_transaction.rbi +56 -0
  404. data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +151 -0
  405. data/rbi/stripe/resources/customer_session.rbi +200 -0
  406. data/rbi/stripe/resources/discount.rbi +53 -0
  407. data/rbi/stripe/resources/dispute.rbi +761 -0
  408. data/rbi/stripe/resources/entitlements/active_entitlement.rbi +58 -0
  409. data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +23 -0
  410. data/rbi/stripe/resources/entitlements/feature.rbi +117 -0
  411. data/rbi/stripe/resources/ephemeral_key.rbi +44 -0
  412. data/rbi/stripe/resources/event.rbi +146 -0
  413. data/rbi/stripe/resources/exchange_rate.rbi +66 -0
  414. data/rbi/stripe/resources/file.rbi +143 -0
  415. data/rbi/stripe/resources/file_link.rbi +141 -0
  416. data/rbi/stripe/resources/financial_connections/account.rbi +339 -0
  417. data/rbi/stripe/resources/financial_connections/account_owner.rbi +35 -0
  418. data/rbi/stripe/resources/financial_connections/account_ownership.rbi +23 -0
  419. data/rbi/stripe/resources/financial_connections/session.rbi +123 -0
  420. data/rbi/stripe/resources/financial_connections/transaction.rbi +124 -0
  421. data/rbi/stripe/resources/forwarding/request.rbi +216 -0
  422. data/rbi/stripe/resources/funding_instructions.rbi +437 -0
  423. data/rbi/stripe/resources/identity/verification_report.rbi +351 -0
  424. data/rbi/stripe/resources/identity/verification_session.rbi +517 -0
  425. data/rbi/stripe/resources/invoice.rbi +3733 -0
  426. data/rbi/stripe/resources/invoice_item.rbi +475 -0
  427. data/rbi/stripe/resources/invoice_line_item.rbi +432 -0
  428. data/rbi/stripe/resources/invoice_payment.rbi +114 -0
  429. data/rbi/stripe/resources/invoice_rendering_template.rbi +104 -0
  430. data/rbi/stripe/resources/issuing/authorization.rbi +1283 -0
  431. data/rbi/stripe/resources/issuing/card.rbi +741 -0
  432. data/rbi/stripe/resources/issuing/cardholder.rbi +744 -0
  433. data/rbi/stripe/resources/issuing/dispute.rbi +913 -0
  434. data/rbi/stripe/resources/issuing/personalization_design.rbi +338 -0
  435. data/rbi/stripe/resources/issuing/physical_bundle.rbi +79 -0
  436. data/rbi/stripe/resources/issuing/token.rbi +226 -0
  437. data/rbi/stripe/resources/issuing/transaction.rbi +1061 -0
  438. data/rbi/stripe/resources/line_item.rbi +72 -0
  439. data/rbi/stripe/resources/login_link.rbi +18 -0
  440. data/rbi/stripe/resources/mandate.rbi +187 -0
  441. data/rbi/stripe/resources/payment_intent.rbi +9731 -0
  442. data/rbi/stripe/resources/payment_link.rbi +1801 -0
  443. data/rbi/stripe/resources/payment_method.rbi +1822 -0
  444. data/rbi/stripe/resources/payment_method_configuration.rbi +3154 -0
  445. data/rbi/stripe/resources/payment_method_domain.rbi +212 -0
  446. data/rbi/stripe/resources/payout.rbi +300 -0
  447. data/rbi/stripe/resources/person.rbi +371 -0
  448. data/rbi/stripe/resources/plan.rbi +373 -0
  449. data/rbi/stripe/resources/price.rbi +694 -0
  450. data/rbi/stripe/resources/product.rbi +557 -0
  451. data/rbi/stripe/resources/product_feature.rbi +26 -0
  452. data/rbi/stripe/resources/promotion_code.rbi +261 -0
  453. data/rbi/stripe/resources/quote.rbi +1123 -0
  454. data/rbi/stripe/resources/radar/early_fraud_warning.rbi +98 -0
  455. data/rbi/stripe/resources/radar/value_list.rbi +170 -0
  456. data/rbi/stripe/resources/radar/value_list_item.rbi +131 -0
  457. data/rbi/stripe/resources/refund.rbi +516 -0
  458. data/rbi/stripe/resources/reporting/report_run.rbi +191 -0
  459. data/rbi/stripe/resources/reporting/report_type.rbi +57 -0
  460. data/rbi/stripe/resources/reserve_transaction.rbi +23 -0
  461. data/rbi/stripe/resources/reversal.rbi +51 -0
  462. data/rbi/stripe/resources/review.rbi +154 -0
  463. data/rbi/stripe/resources/setup_attempt.rbi +477 -0
  464. data/rbi/stripe/resources/setup_intent.rbi +3860 -0
  465. data/rbi/stripe/resources/shipping_rate.rbi +305 -0
  466. data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +75 -0
  467. data/rbi/stripe/resources/source.rbi +1496 -0
  468. data/rbi/stripe/resources/source_mandate_notification.rbi +77 -0
  469. data/rbi/stripe/resources/source_transaction.rbi +127 -0
  470. data/rbi/stripe/resources/subscription.rbi +1964 -0
  471. data/rbi/stripe/resources/subscription_item.rbi +370 -0
  472. data/rbi/stripe/resources/subscription_schedule.rbi +1495 -0
  473. data/rbi/stripe/resources/tax/calculation.rbi +474 -0
  474. data/rbi/stripe/resources/tax/calculation_line_item.rbi +88 -0
  475. data/rbi/stripe/resources/tax/registration.rbi +2485 -0
  476. data/rbi/stripe/resources/tax/settings.rbi +141 -0
  477. data/rbi/stripe/resources/tax/transaction.rbi +351 -0
  478. data/rbi/stripe/resources/tax/transaction_line_item.rbi +54 -0
  479. data/rbi/stripe/resources/tax_code.rbi +44 -0
  480. data/rbi/stripe/resources/tax_deducted_at_source.rbi +23 -0
  481. data/rbi/stripe/resources/tax_id.rbi +167 -0
  482. data/rbi/stripe/resources/tax_rate.rbi +239 -0
  483. data/rbi/stripe/resources/terminal/configuration.rbi +1388 -0
  484. data/rbi/stripe/resources/terminal/connection_token.rbi +37 -0
  485. data/rbi/stripe/resources/terminal/location.rbi +224 -0
  486. data/rbi/stripe/resources/terminal/reader.rbi +587 -0
  487. data/rbi/stripe/resources/test_helpers/test_clock.rbi +134 -0
  488. data/rbi/stripe/resources/token.rbi +1217 -0
  489. data/rbi/stripe/resources/topup.rbi +222 -0
  490. data/rbi/stripe/resources/transfer.rbi +199 -0
  491. data/rbi/stripe/resources/treasury/credit_reversal.rbi +119 -0
  492. data/rbi/stripe/resources/treasury/debit_reversal.rbi +131 -0
  493. data/rbi/stripe/resources/treasury/financial_account.rbi +865 -0
  494. data/rbi/stripe/resources/treasury/financial_account_features.rbi +260 -0
  495. data/rbi/stripe/resources/treasury/inbound_transfer.rbi +295 -0
  496. data/rbi/stripe/resources/treasury/outbound_payment.rbi +592 -0
  497. data/rbi/stripe/resources/treasury/outbound_transfer.rbi +431 -0
  498. data/rbi/stripe/resources/treasury/received_credit.rbi +302 -0
  499. data/rbi/stripe/resources/treasury/received_debit.rbi +256 -0
  500. data/rbi/stripe/resources/treasury/transaction.rbi +215 -0
  501. data/rbi/stripe/resources/treasury/transaction_entry.rbi +192 -0
  502. data/rbi/stripe/resources/v2/amount.rbi +14 -0
  503. data/rbi/stripe/resources/v2/billing/meter_event.rbi +37 -0
  504. data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +41 -0
  505. data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +31 -0
  506. data/rbi/stripe/resources/v2/event.rbi +48 -0
  507. data/rbi/stripe/resources/v2/event_destination.rbi +91 -0
  508. data/rbi/stripe/resources/webhook_endpoint.rbi +170 -0
  509. data/rbi/stripe/services/account_capability_service.rbi +51 -0
  510. data/rbi/stripe/services/account_external_account_service.rbi +306 -0
  511. data/rbi/stripe/services/account_link_service.rbi +58 -0
  512. data/rbi/stripe/services/account_login_link_service.rbi +22 -0
  513. data/rbi/stripe/services/account_person_service.rbi +923 -0
  514. data/rbi/stripe/services/account_service.rbi +4143 -0
  515. data/rbi/stripe/services/account_session_service.rbi +572 -0
  516. data/rbi/stripe/services/apple_pay_domain_service.rbi +78 -0
  517. data/rbi/stripe/services/application_fee_refund_service.rbi +93 -0
  518. data/rbi/stripe/services/application_fee_service.rbi +78 -0
  519. data/rbi/stripe/services/apps/secret_service.rbi +151 -0
  520. data/rbi/stripe/services/apps_service.rbi +9 -0
  521. data/rbi/stripe/services/balance_service.rbi +21 -0
  522. data/rbi/stripe/services/balance_transaction_service.rbi +93 -0
  523. data/rbi/stripe/services/billing/alert_service.rbi +152 -0
  524. data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +68 -0
  525. data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +59 -0
  526. data/rbi/stripe/services/billing/credit_grant_service.rbi +211 -0
  527. data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +42 -0
  528. data/rbi/stripe/services/billing/meter_event_service.rbi +42 -0
  529. data/rbi/stripe/services/billing/meter_event_summary_service.rbi +54 -0
  530. data/rbi/stripe/services/billing/meter_service.rbi +163 -0
  531. data/rbi/stripe/services/billing_portal/configuration_service.rbi +511 -0
  532. data/rbi/stripe/services/billing_portal/session_service.rbi +204 -0
  533. data/rbi/stripe/services/billing_portal_service.rbi +10 -0
  534. data/rbi/stripe/services/billing_service.rbi +15 -0
  535. data/rbi/stripe/services/charge_service.rbi +448 -0
  536. data/rbi/stripe/services/checkout/session_line_item_service.rbi +33 -0
  537. data/rbi/stripe/services/checkout/session_service.rbi +2585 -0
  538. data/rbi/stripe/services/checkout_service.rbi +9 -0
  539. data/rbi/stripe/services/climate/order_service.rbi +142 -0
  540. data/rbi/stripe/services/climate/product_service.rbi +46 -0
  541. data/rbi/stripe/services/climate/supplier_service.rbi +46 -0
  542. data/rbi/stripe/services/climate_service.rbi +11 -0
  543. data/rbi/stripe/services/confirmation_token_service.rbi +20 -0
  544. data/rbi/stripe/services/country_spec_service.rbi +44 -0
  545. data/rbi/stripe/services/coupon_service.rbi +196 -0
  546. data/rbi/stripe/services/credit_note_line_item_service.rbi +31 -0
  547. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +167 -0
  548. data/rbi/stripe/services/credit_note_service.rbi +416 -0
  549. data/rbi/stripe/services/customer_balance_transaction_service.rbi +92 -0
  550. data/rbi/stripe/services/customer_cash_balance_service.rbi +45 -0
  551. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +44 -0
  552. data/rbi/stripe/services/customer_funding_instructions_service.rbi +59 -0
  553. data/rbi/stripe/services/customer_payment_method_service.rbi +57 -0
  554. data/rbi/stripe/services/customer_payment_source_service.rbi +232 -0
  555. data/rbi/stripe/services/customer_service.rbi +651 -0
  556. data/rbi/stripe/services/customer_session_service.rbi +116 -0
  557. data/rbi/stripe/services/customer_tax_id_service.rbi +72 -0
  558. data/rbi/stripe/services/dispute_service.rbi +424 -0
  559. data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +55 -0
  560. data/rbi/stripe/services/entitlements/feature_service.rbi +107 -0
  561. data/rbi/stripe/services/entitlements_service.rbi +10 -0
  562. data/rbi/stripe/services/ephemeral_key_service.rbi +53 -0
  563. data/rbi/stripe/services/event_service.rbi +83 -0
  564. data/rbi/stripe/services/exchange_rate_service.rbi +44 -0
  565. data/rbi/stripe/services/file_link_service.rbi +124 -0
  566. data/rbi/stripe/services/file_service.rbi +116 -0
  567. data/rbi/stripe/services/financial_connections/account_owner_service.rbi +42 -0
  568. data/rbi/stripe/services/financial_connections/account_service.rbi +133 -0
  569. data/rbi/stripe/services/financial_connections/session_service.rbi +88 -0
  570. data/rbi/stripe/services/financial_connections/transaction_service.rbi +92 -0
  571. data/rbi/stripe/services/financial_connections_service.rbi +11 -0
  572. data/rbi/stripe/services/forwarding/request_service.rbi +134 -0
  573. data/rbi/stripe/services/forwarding_service.rbi +9 -0
  574. data/rbi/stripe/services/identity/verification_report_service.rbi +87 -0
  575. data/rbi/stripe/services/identity/verification_session_service.rbi +323 -0
  576. data/rbi/stripe/services/identity_service.rbi +10 -0
  577. data/rbi/stripe/services/invoice_item_service.rbi +368 -0
  578. data/rbi/stripe/services/invoice_line_item_service.rbi +259 -0
  579. data/rbi/stripe/services/invoice_payment_service.rbi +71 -0
  580. data/rbi/stripe/services/invoice_rendering_template_service.rbi +82 -0
  581. data/rbi/stripe/services/invoice_service.rbi +2920 -0
  582. data/rbi/stripe/services/issuing/authorization_service.rbi +146 -0
  583. data/rbi/stripe/services/issuing/card_service.rbi +495 -0
  584. data/rbi/stripe/services/issuing/cardholder_service.rbi +587 -0
  585. data/rbi/stripe/services/issuing/dispute_service.rbi +707 -0
  586. data/rbi/stripe/services/issuing/personalization_design_service.rbi +243 -0
  587. data/rbi/stripe/services/issuing/physical_bundle_service.rbi +59 -0
  588. data/rbi/stripe/services/issuing/token_service.rbi +99 -0
  589. data/rbi/stripe/services/issuing/transaction_service.rbi +105 -0
  590. data/rbi/stripe/services/issuing_service.rbi +16 -0
  591. data/rbi/stripe/services/mandate_service.rbi +20 -0
  592. data/rbi/stripe/services/payment_intent_service.rbi +7759 -0
  593. data/rbi/stripe/services/payment_link_line_item_service.rbi +31 -0
  594. data/rbi/stripe/services/payment_link_service.rbi +1352 -0
  595. data/rbi/stripe/services/payment_method_configuration_service.rbi +2211 -0
  596. data/rbi/stripe/services/payment_method_domain_service.rbi +112 -0
  597. data/rbi/stripe/services/payment_method_service.rbi +840 -0
  598. data/rbi/stripe/services/payout_service.rbi +205 -0
  599. data/rbi/stripe/services/plan_service.rbi +284 -0
  600. data/rbi/stripe/services/price_service.rbi +546 -0
  601. data/rbi/stripe/services/product_feature_service.rbi +69 -0
  602. data/rbi/stripe/services/product_service.rbi +479 -0
  603. data/rbi/stripe/services/promotion_code_service.rbi +214 -0
  604. data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +31 -0
  605. data/rbi/stripe/services/quote_line_item_service.rbi +31 -0
  606. data/rbi/stripe/services/quote_service.rbi +686 -0
  607. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +85 -0
  608. data/rbi/stripe/services/radar/value_list_item_service.rbi +111 -0
  609. data/rbi/stripe/services/radar/value_list_service.rbi +143 -0
  610. data/rbi/stripe/services/radar_service.rbi +11 -0
  611. data/rbi/stripe/services/refund_service.rbi +185 -0
  612. data/rbi/stripe/services/reporting/report_run_service.rbi +135 -0
  613. data/rbi/stripe/services/reporting/report_type_service.rbi +35 -0
  614. data/rbi/stripe/services/reporting_service.rbi +10 -0
  615. data/rbi/stripe/services/review_service.rbi +84 -0
  616. data/rbi/stripe/services/setup_attempt_service.rbi +65 -0
  617. data/rbi/stripe/services/setup_intent_service.rbi +3596 -0
  618. data/rbi/stripe/services/shipping_rate_service.rbi +241 -0
  619. data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +46 -0
  620. data/rbi/stripe/services/sigma_service.rbi +9 -0
  621. data/rbi/stripe/services/source_service.rbi +663 -0
  622. data/rbi/stripe/services/source_transaction_service.rbi +31 -0
  623. data/rbi/stripe/services/subscription_item_service.rbi +324 -0
  624. data/rbi/stripe/services/subscription_schedule_service.rbi +1192 -0
  625. data/rbi/stripe/services/subscription_service.rbi +1596 -0
  626. data/rbi/stripe/services/tax/calculation_line_item_service.rbi +33 -0
  627. data/rbi/stripe/services/tax/calculation_service.rbi +230 -0
  628. data/rbi/stripe/services/tax/registration_service.rbi +1689 -0
  629. data/rbi/stripe/services/tax/settings_service.rbi +93 -0
  630. data/rbi/stripe/services/tax/transaction_line_item_service.rbi +33 -0
  631. data/rbi/stripe/services/tax/transaction_service.rbi +146 -0
  632. data/rbi/stripe/services/tax_code_service.rbi +44 -0
  633. data/rbi/stripe/services/tax_id_service.rbi +112 -0
  634. data/rbi/stripe/services/tax_rate_service.rbi +185 -0
  635. data/rbi/stripe/services/tax_service.rbi +12 -0
  636. data/rbi/stripe/services/terminal/configuration_service.rbi +1120 -0
  637. data/rbi/stripe/services/terminal/connection_token_service.rbi +25 -0
  638. data/rbi/stripe/services/terminal/location_service.rbi +184 -0
  639. data/rbi/stripe/services/terminal/reader_service.rbi +344 -0
  640. data/rbi/stripe/services/terminal_service.rbi +12 -0
  641. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +746 -0
  642. data/rbi/stripe/services/test_helpers/customer_service.rbi +33 -0
  643. data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +848 -0
  644. data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +76 -0
  645. data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +69 -0
  646. data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +711 -0
  647. data/rbi/stripe/services/test_helpers/issuing_service.rbi +14 -0
  648. data/rbi/stripe/services/test_helpers/refund_service.rbi +22 -0
  649. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +62 -0
  650. data/rbi/stripe/services/test_helpers/terminal_service.rbi +11 -0
  651. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +92 -0
  652. data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +64 -0
  653. data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +125 -0
  654. data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +125 -0
  655. data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +87 -0
  656. data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +87 -0
  657. data/rbi/stripe/services/test_helpers/treasury_service.rbi +15 -0
  658. data/rbi/stripe/services/test_helpers_service.rbi +15 -0
  659. data/rbi/stripe/services/token_service.rbi +1189 -0
  660. data/rbi/stripe/services/topup_service.rbi +176 -0
  661. data/rbi/stripe/services/transfer_reversal_service.rbi +101 -0
  662. data/rbi/stripe/services/transfer_service.rbi +152 -0
  663. data/rbi/stripe/services/treasury/credit_reversal_service.rbi +84 -0
  664. data/rbi/stripe/services/treasury/debit_reversal_service.rbi +88 -0
  665. data/rbi/stripe/services/treasury/financial_account_features_service.rbi +198 -0
  666. data/rbi/stripe/services/treasury/financial_account_service.rbi +562 -0
  667. data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +117 -0
  668. data/rbi/stripe/services/treasury/outbound_payment_service.rbi +304 -0
  669. data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +157 -0
  670. data/rbi/stripe/services/treasury/received_credit_service.rbi +72 -0
  671. data/rbi/stripe/services/treasury/received_debit_service.rbi +59 -0
  672. data/rbi/stripe/services/treasury/transaction_entry_service.rbi +111 -0
  673. data/rbi/stripe/services/treasury/transaction_service.rbi +122 -0
  674. data/rbi/stripe/services/treasury_service.rbi +18 -0
  675. data/rbi/stripe/services/v1_services.rbi +77 -0
  676. data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +39 -0
  677. data/rbi/stripe/services/v2/billing/meter_event_service.rbi +42 -0
  678. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +20 -0
  679. data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +55 -0
  680. data/rbi/stripe/services/v2/billing_service.rbi +14 -0
  681. data/rbi/stripe/services/v2/core/event_destination_service.rbi +200 -0
  682. data/rbi/stripe/services/v2/core/event_service.rbi +38 -0
  683. data/rbi/stripe/services/v2/core_service.rbi +12 -0
  684. data/rbi/stripe/services/v2_services.rbi +10 -0
  685. data/rbi/stripe/services/webhook_endpoint_service.rbi +131 -0
  686. metadata +533 -4
  687. data/lib/stripe/resources/usage_record.rb +0 -17
  688. data/lib/stripe/resources/usage_record_summary.rb +0 -11
@@ -33,6 +33,3479 @@ module Stripe
33
33
  "setup_intent"
34
34
  end
35
35
 
36
+ class AutomaticPaymentMethods < Stripe::StripeObject
37
+ # Controls whether this SetupIntent will accept redirect-based payment methods.
38
+ #
39
+ # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup.
40
+ attr_reader :allow_redirects
41
+ # Automatically calculates compatible payment methods
42
+ attr_reader :enabled
43
+ end
44
+
45
+ class LastSetupError < Stripe::StripeObject
46
+ # For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines) if they provide one.
47
+ attr_reader :advice_code
48
+ # For card errors, the ID of the failed charge.
49
+ attr_reader :charge
50
+ # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.
51
+ attr_reader :code
52
+ # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one.
53
+ attr_reader :decline_code
54
+ # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported.
55
+ attr_reader :doc_url
56
+ # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.
57
+ attr_reader :message
58
+ # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error.
59
+ attr_reader :network_advice_code
60
+ # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed.
61
+ attr_reader :network_decline_code
62
+ # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.
63
+ attr_reader :param
64
+ # A PaymentIntent guides you through the process of collecting a payment from your customer.
65
+ # We recommend that you create exactly one PaymentIntent for each order or
66
+ # customer session in your system. You can reference the PaymentIntent later to
67
+ # see the history of payment attempts for a particular session.
68
+ #
69
+ # A PaymentIntent transitions through
70
+ # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses)
71
+ # throughout its lifetime as it interfaces with Stripe.js to perform
72
+ # authentication flows and ultimately creates at most one successful charge.
73
+ #
74
+ # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents)
75
+ attr_reader :payment_intent
76
+ # PaymentMethod objects represent your customer's payment instruments.
77
+ # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to
78
+ # Customer objects to store instrument details for future payments.
79
+ #
80
+ # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).
81
+ attr_reader :payment_method
82
+ # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors.
83
+ attr_reader :payment_method_type
84
+ # A URL to the request log entry in your dashboard.
85
+ attr_reader :request_log_url
86
+ # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments.
87
+ # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment.
88
+ # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow.
89
+ #
90
+ # Create a SetupIntent when you're ready to collect your customer's payment credentials.
91
+ # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid.
92
+ # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides
93
+ # you through the setup process.
94
+ #
95
+ # Successful SetupIntents result in payment credentials that are optimized for future payments.
96
+ # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through
97
+ # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection
98
+ # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents).
99
+ # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer),
100
+ # it automatically attaches the resulting payment method to that Customer after successful setup.
101
+ # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on
102
+ # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods.
103
+ #
104
+ # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time.
105
+ #
106
+ # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents)
107
+ attr_reader :setup_intent
108
+ # Attribute for field source
109
+ attr_reader :source
110
+ # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error`
111
+ attr_reader :type
112
+ end
113
+
114
+ class NextAction < Stripe::StripeObject
115
+ class CashappHandleRedirectOrDisplayQrCode < Stripe::StripeObject
116
+ class QrCode < Stripe::StripeObject
117
+ # The date (unix timestamp) when the QR code expires.
118
+ attr_reader :expires_at
119
+ # The image_url_png string used to render QR code
120
+ attr_reader :image_url_png
121
+ # The image_url_svg string used to render QR code
122
+ attr_reader :image_url_svg
123
+ end
124
+ # The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR code, and supports QR code refreshing on expiration.
125
+ attr_reader :hosted_instructions_url
126
+ # The url for mobile redirect based auth
127
+ attr_reader :mobile_auth_url
128
+ # Attribute for field qr_code
129
+ attr_reader :qr_code
130
+ end
131
+
132
+ class RedirectToUrl < Stripe::StripeObject
133
+ # If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.
134
+ attr_reader :return_url
135
+ # The URL you must redirect your customer to in order to authenticate.
136
+ attr_reader :url
137
+ end
138
+
139
+ class VerifyWithMicrodeposits < Stripe::StripeObject
140
+ # The timestamp when the microdeposits are expected to land.
141
+ attr_reader :arrival_date
142
+ # The URL for the hosted verification page, which allows customers to verify their bank account.
143
+ attr_reader :hosted_verification_url
144
+ # The type of the microdeposit sent to the customer. Used to distinguish between different verification methods.
145
+ attr_reader :microdeposit_type
146
+ end
147
+ # Attribute for field cashapp_handle_redirect_or_display_qr_code
148
+ attr_reader :cashapp_handle_redirect_or_display_qr_code
149
+ # Attribute for field redirect_to_url
150
+ attr_reader :redirect_to_url
151
+ # Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.
152
+ attr_reader :type
153
+ # When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js.
154
+ attr_reader :use_stripe_sdk
155
+ # Attribute for field verify_with_microdeposits
156
+ attr_reader :verify_with_microdeposits
157
+ end
158
+
159
+ class PaymentMethodConfigurationDetails < Stripe::StripeObject
160
+ # ID of the payment method configuration used.
161
+ attr_reader :id
162
+ # ID of the parent payment method configuration used.
163
+ attr_reader :parent
164
+ end
165
+
166
+ class PaymentMethodOptions < Stripe::StripeObject
167
+ class AcssDebit < Stripe::StripeObject
168
+ class MandateOptions < Stripe::StripeObject
169
+ # A URL for custom mandate text
170
+ attr_reader :custom_mandate_url
171
+ # List of Stripe products where this mandate can be selected automatically.
172
+ attr_reader :default_for
173
+ # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.
174
+ attr_reader :interval_description
175
+ # Payment schedule for the mandate.
176
+ attr_reader :payment_schedule
177
+ # Transaction type of the mandate.
178
+ attr_reader :transaction_type
179
+ end
180
+ # Currency supported by the bank account
181
+ attr_reader :currency
182
+ # Attribute for field mandate_options
183
+ attr_reader :mandate_options
184
+ # Bank account verification method.
185
+ attr_reader :verification_method
186
+ end
187
+
188
+ class AmazonPay < Stripe::StripeObject; end
189
+
190
+ class BacsDebit < Stripe::StripeObject
191
+ class MandateOptions < Stripe::StripeObject
192
+ # 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'.
193
+ attr_reader :reference_prefix
194
+ end
195
+ # Attribute for field mandate_options
196
+ attr_reader :mandate_options
197
+ end
198
+
199
+ class Card < Stripe::StripeObject
200
+ class MandateOptions < Stripe::StripeObject
201
+ # Amount to be charged for future payments.
202
+ attr_reader :amount
203
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
204
+ attr_reader :amount_type
205
+ # 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).
206
+ attr_reader :currency
207
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
208
+ attr_reader :description
209
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
210
+ attr_reader :end_date
211
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
212
+ attr_reader :interval
213
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
214
+ attr_reader :interval_count
215
+ # Unique identifier for the mandate or subscription.
216
+ attr_reader :reference
217
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
218
+ attr_reader :start_date
219
+ # Specifies the type of mandates supported. Possible values are `india`.
220
+ attr_reader :supported_types
221
+ end
222
+ # Configuration options for setting up an eMandate for cards issued in India.
223
+ attr_reader :mandate_options
224
+ # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the setup intent. Can be only set confirm-time.
225
+ attr_reader :network
226
+ # 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.
227
+ attr_reader :request_three_d_secure
228
+ end
229
+
230
+ class CardPresent < Stripe::StripeObject; end
231
+
232
+ class Link < Stripe::StripeObject
233
+ # [Deprecated] This is a legacy parameter that no longer has any function.
234
+ attr_reader :persistent_token
235
+ end
236
+
237
+ class Paypal < Stripe::StripeObject
238
+ # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer.
239
+ attr_reader :billing_agreement_id
240
+ end
241
+
242
+ class SepaDebit < Stripe::StripeObject
243
+ class MandateOptions < Stripe::StripeObject
244
+ # 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'.
245
+ attr_reader :reference_prefix
246
+ end
247
+ # Attribute for field mandate_options
248
+ attr_reader :mandate_options
249
+ end
250
+
251
+ class UsBankAccount < Stripe::StripeObject
252
+ class FinancialConnections < Stripe::StripeObject
253
+ class Filters < Stripe::StripeObject
254
+ # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
255
+ attr_reader :account_subcategories
256
+ end
257
+ # Attribute for field filters
258
+ attr_reader :filters
259
+ # The list of permissions to request. The `payment_method` permission must be included.
260
+ attr_reader :permissions
261
+ # Data features requested to be retrieved upon account creation.
262
+ attr_reader :prefetch
263
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
264
+ attr_reader :return_url
265
+ end
266
+
267
+ class MandateOptions < Stripe::StripeObject
268
+ # Mandate collection method
269
+ attr_reader :collection_method
270
+ end
271
+ # Attribute for field financial_connections
272
+ attr_reader :financial_connections
273
+ # Attribute for field mandate_options
274
+ attr_reader :mandate_options
275
+ # Bank account verification method.
276
+ attr_reader :verification_method
277
+ end
278
+ # Attribute for field acss_debit
279
+ attr_reader :acss_debit
280
+ # Attribute for field amazon_pay
281
+ attr_reader :amazon_pay
282
+ # Attribute for field bacs_debit
283
+ attr_reader :bacs_debit
284
+ # Attribute for field card
285
+ attr_reader :card
286
+ # Attribute for field card_present
287
+ attr_reader :card_present
288
+ # Attribute for field link
289
+ attr_reader :link
290
+ # Attribute for field paypal
291
+ attr_reader :paypal
292
+ # Attribute for field sepa_debit
293
+ attr_reader :sepa_debit
294
+ # Attribute for field us_bank_account
295
+ attr_reader :us_bank_account
296
+ end
297
+
298
+ class ListParams < Stripe::RequestParams
299
+ class Created < Stripe::RequestParams
300
+ # Minimum value to filter by (exclusive)
301
+ attr_accessor :gt
302
+ # Minimum value to filter by (inclusive)
303
+ attr_accessor :gte
304
+ # Maximum value to filter by (exclusive)
305
+ attr_accessor :lt
306
+ # Maximum value to filter by (inclusive)
307
+ attr_accessor :lte
308
+
309
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
310
+ @gt = gt
311
+ @gte = gte
312
+ @lt = lt
313
+ @lte = lte
314
+ end
315
+ end
316
+ # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
317
+ #
318
+ # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
319
+ attr_accessor :attach_to_self
320
+ # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
321
+ attr_accessor :created
322
+ # Only return SetupIntents for the customer specified by this customer ID.
323
+ attr_accessor :customer
324
+ # 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.
325
+ attr_accessor :ending_before
326
+ # Specifies which fields in the response should be expanded.
327
+ attr_accessor :expand
328
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
329
+ attr_accessor :limit
330
+ # Only return SetupIntents that associate with the specified payment method.
331
+ attr_accessor :payment_method
332
+ # 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.
333
+ attr_accessor :starting_after
334
+
335
+ def initialize(
336
+ attach_to_self: nil,
337
+ created: nil,
338
+ customer: nil,
339
+ ending_before: nil,
340
+ expand: nil,
341
+ limit: nil,
342
+ payment_method: nil,
343
+ starting_after: nil
344
+ )
345
+ @attach_to_self = attach_to_self
346
+ @created = created
347
+ @customer = customer
348
+ @ending_before = ending_before
349
+ @expand = expand
350
+ @limit = limit
351
+ @payment_method = payment_method
352
+ @starting_after = starting_after
353
+ end
354
+ end
355
+
356
+ class CreateParams < Stripe::RequestParams
357
+ class AutomaticPaymentMethods < Stripe::RequestParams
358
+ # Controls whether this SetupIntent will accept redirect-based payment methods.
359
+ #
360
+ # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup.
361
+ attr_accessor :allow_redirects
362
+ # Whether this feature is enabled.
363
+ attr_accessor :enabled
364
+
365
+ def initialize(allow_redirects: nil, enabled: nil)
366
+ @allow_redirects = allow_redirects
367
+ @enabled = enabled
368
+ end
369
+ end
370
+
371
+ class MandateData < Stripe::RequestParams
372
+ class CustomerAcceptance < Stripe::RequestParams
373
+ class Offline < Stripe::RequestParams
374
+ end
375
+
376
+ class Online < Stripe::RequestParams
377
+ # The IP address from which the Mandate was accepted by the customer.
378
+ attr_accessor :ip_address
379
+ # The user agent of the browser from which the Mandate was accepted by the customer.
380
+ attr_accessor :user_agent
381
+
382
+ def initialize(ip_address: nil, user_agent: nil)
383
+ @ip_address = ip_address
384
+ @user_agent = user_agent
385
+ end
386
+ end
387
+ # The time at which the customer accepted the Mandate.
388
+ attr_accessor :accepted_at
389
+ # If this is a Mandate accepted offline, this hash contains details about the offline acceptance.
390
+ attr_accessor :offline
391
+ # If this is a Mandate accepted online, this hash contains details about the online acceptance.
392
+ attr_accessor :online
393
+ # The type of customer acceptance information included with the Mandate. One of `online` or `offline`.
394
+ attr_accessor :type
395
+
396
+ def initialize(accepted_at: nil, offline: nil, online: nil, type: nil)
397
+ @accepted_at = accepted_at
398
+ @offline = offline
399
+ @online = online
400
+ @type = type
401
+ end
402
+ end
403
+ # This hash contains details about the customer acceptance of the Mandate.
404
+ attr_accessor :customer_acceptance
405
+
406
+ def initialize(customer_acceptance: nil)
407
+ @customer_acceptance = customer_acceptance
408
+ end
409
+ end
410
+
411
+ class PaymentMethodData < Stripe::RequestParams
412
+ class AcssDebit < Stripe::RequestParams
413
+ # Customer's bank account number.
414
+ attr_accessor :account_number
415
+ # Institution number of the customer's bank.
416
+ attr_accessor :institution_number
417
+ # Transit number of the customer's bank.
418
+ attr_accessor :transit_number
419
+
420
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil)
421
+ @account_number = account_number
422
+ @institution_number = institution_number
423
+ @transit_number = transit_number
424
+ end
425
+ end
426
+
427
+ class Affirm < Stripe::RequestParams
428
+ end
429
+
430
+ class AfterpayClearpay < Stripe::RequestParams
431
+ end
432
+
433
+ class Alipay < Stripe::RequestParams
434
+ end
435
+
436
+ class Alma < Stripe::RequestParams
437
+ end
438
+
439
+ class AmazonPay < Stripe::RequestParams
440
+ end
441
+
442
+ class AuBecsDebit < Stripe::RequestParams
443
+ # The account number for the bank account.
444
+ attr_accessor :account_number
445
+ # Bank-State-Branch number of the bank account.
446
+ attr_accessor :bsb_number
447
+
448
+ def initialize(account_number: nil, bsb_number: nil)
449
+ @account_number = account_number
450
+ @bsb_number = bsb_number
451
+ end
452
+ end
453
+
454
+ class BacsDebit < Stripe::RequestParams
455
+ # Account number of the bank account that the funds will be debited from.
456
+ attr_accessor :account_number
457
+ # Sort code of the bank account. (e.g., `10-20-30`)
458
+ attr_accessor :sort_code
459
+
460
+ def initialize(account_number: nil, sort_code: nil)
461
+ @account_number = account_number
462
+ @sort_code = sort_code
463
+ end
464
+ end
465
+
466
+ class Bancontact < Stripe::RequestParams
467
+ end
468
+
469
+ class Billie < Stripe::RequestParams
470
+ end
471
+
472
+ class BillingDetails < Stripe::RequestParams
473
+ class Address < Stripe::RequestParams
474
+ # City, district, suburb, town, or village.
475
+ attr_accessor :city
476
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
477
+ attr_accessor :country
478
+ # Address line 1 (e.g., street, PO Box, or company name).
479
+ attr_accessor :line1
480
+ # Address line 2 (e.g., apartment, suite, unit, or building).
481
+ attr_accessor :line2
482
+ # ZIP or postal code.
483
+ attr_accessor :postal_code
484
+ # State, county, province, or region.
485
+ attr_accessor :state
486
+
487
+ def initialize(
488
+ city: nil,
489
+ country: nil,
490
+ line1: nil,
491
+ line2: nil,
492
+ postal_code: nil,
493
+ state: nil
494
+ )
495
+ @city = city
496
+ @country = country
497
+ @line1 = line1
498
+ @line2 = line2
499
+ @postal_code = postal_code
500
+ @state = state
501
+ end
502
+ end
503
+ # Billing address.
504
+ attr_accessor :address
505
+ # Email address.
506
+ attr_accessor :email
507
+ # Full name.
508
+ attr_accessor :name
509
+ # Billing phone number (including extension).
510
+ attr_accessor :phone
511
+
512
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
513
+ @address = address
514
+ @email = email
515
+ @name = name
516
+ @phone = phone
517
+ end
518
+ end
519
+
520
+ class Blik < Stripe::RequestParams
521
+ end
522
+
523
+ class Boleto < Stripe::RequestParams
524
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
525
+ attr_accessor :tax_id
526
+
527
+ def initialize(tax_id: nil)
528
+ @tax_id = tax_id
529
+ end
530
+ end
531
+
532
+ class Cashapp < Stripe::RequestParams
533
+ end
534
+
535
+ class CustomerBalance < Stripe::RequestParams
536
+ end
537
+
538
+ class Eps < Stripe::RequestParams
539
+ # The customer's bank.
540
+ attr_accessor :bank
541
+
542
+ def initialize(bank: nil)
543
+ @bank = bank
544
+ end
545
+ end
546
+
547
+ class Fpx < Stripe::RequestParams
548
+ # Account holder type for FPX transaction
549
+ attr_accessor :account_holder_type
550
+ # The customer's bank.
551
+ attr_accessor :bank
552
+
553
+ def initialize(account_holder_type: nil, bank: nil)
554
+ @account_holder_type = account_holder_type
555
+ @bank = bank
556
+ end
557
+ end
558
+
559
+ class Giropay < Stripe::RequestParams
560
+ end
561
+
562
+ class Grabpay < Stripe::RequestParams
563
+ end
564
+
565
+ class Ideal < Stripe::RequestParams
566
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
567
+ attr_accessor :bank
568
+
569
+ def initialize(bank: nil)
570
+ @bank = bank
571
+ end
572
+ end
573
+
574
+ class InteracPresent < Stripe::RequestParams
575
+ end
576
+
577
+ class KakaoPay < Stripe::RequestParams
578
+ end
579
+
580
+ class Klarna < Stripe::RequestParams
581
+ class Dob < Stripe::RequestParams
582
+ # The day of birth, between 1 and 31.
583
+ attr_accessor :day
584
+ # The month of birth, between 1 and 12.
585
+ attr_accessor :month
586
+ # The four-digit year of birth.
587
+ attr_accessor :year
588
+
589
+ def initialize(day: nil, month: nil, year: nil)
590
+ @day = day
591
+ @month = month
592
+ @year = year
593
+ end
594
+ end
595
+ # Customer's date of birth
596
+ attr_accessor :dob
597
+
598
+ def initialize(dob: nil)
599
+ @dob = dob
600
+ end
601
+ end
602
+
603
+ class Konbini < Stripe::RequestParams
604
+ end
605
+
606
+ class KrCard < Stripe::RequestParams
607
+ end
608
+
609
+ class Link < Stripe::RequestParams
610
+ end
611
+
612
+ class Mobilepay < Stripe::RequestParams
613
+ end
614
+
615
+ class Multibanco < Stripe::RequestParams
616
+ end
617
+
618
+ class NaverPay < Stripe::RequestParams
619
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
620
+ attr_accessor :funding
621
+
622
+ def initialize(funding: nil)
623
+ @funding = funding
624
+ end
625
+ end
626
+
627
+ class NzBankAccount < Stripe::RequestParams
628
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
629
+ attr_accessor :account_holder_name
630
+ # The account number for the bank account.
631
+ attr_accessor :account_number
632
+ # The numeric code for the bank account's bank.
633
+ attr_accessor :bank_code
634
+ # The numeric code for the bank account's bank branch.
635
+ attr_accessor :branch_code
636
+ # Attribute for param field reference
637
+ attr_accessor :reference
638
+ # The suffix of the bank account number.
639
+ attr_accessor :suffix
640
+
641
+ def initialize(
642
+ account_holder_name: nil,
643
+ account_number: nil,
644
+ bank_code: nil,
645
+ branch_code: nil,
646
+ reference: nil,
647
+ suffix: nil
648
+ )
649
+ @account_holder_name = account_holder_name
650
+ @account_number = account_number
651
+ @bank_code = bank_code
652
+ @branch_code = branch_code
653
+ @reference = reference
654
+ @suffix = suffix
655
+ end
656
+ end
657
+
658
+ class Oxxo < Stripe::RequestParams
659
+ end
660
+
661
+ class P24 < Stripe::RequestParams
662
+ # The customer's bank.
663
+ attr_accessor :bank
664
+
665
+ def initialize(bank: nil)
666
+ @bank = bank
667
+ end
668
+ end
669
+
670
+ class PayByBank < Stripe::RequestParams
671
+ end
672
+
673
+ class Payco < Stripe::RequestParams
674
+ end
675
+
676
+ class Paynow < Stripe::RequestParams
677
+ end
678
+
679
+ class Paypal < Stripe::RequestParams
680
+ end
681
+
682
+ class Pix < Stripe::RequestParams
683
+ end
684
+
685
+ class Promptpay < Stripe::RequestParams
686
+ end
687
+
688
+ class RadarOptions < Stripe::RequestParams
689
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
690
+ attr_accessor :session
691
+
692
+ def initialize(session: nil)
693
+ @session = session
694
+ end
695
+ end
696
+
697
+ class RevolutPay < Stripe::RequestParams
698
+ end
699
+
700
+ class SamsungPay < Stripe::RequestParams
701
+ end
702
+
703
+ class Satispay < Stripe::RequestParams
704
+ end
705
+
706
+ class SepaDebit < Stripe::RequestParams
707
+ # IBAN of the bank account.
708
+ attr_accessor :iban
709
+
710
+ def initialize(iban: nil)
711
+ @iban = iban
712
+ end
713
+ end
714
+
715
+ class Sofort < Stripe::RequestParams
716
+ # Two-letter ISO code representing the country the bank account is located in.
717
+ attr_accessor :country
718
+
719
+ def initialize(country: nil)
720
+ @country = country
721
+ end
722
+ end
723
+
724
+ class Swish < Stripe::RequestParams
725
+ end
726
+
727
+ class Twint < Stripe::RequestParams
728
+ end
729
+
730
+ class UsBankAccount < Stripe::RequestParams
731
+ # Account holder type: individual or company.
732
+ attr_accessor :account_holder_type
733
+ # Account number of the bank account.
734
+ attr_accessor :account_number
735
+ # Account type: checkings or savings. Defaults to checking if omitted.
736
+ attr_accessor :account_type
737
+ # The ID of a Financial Connections Account to use as a payment method.
738
+ attr_accessor :financial_connections_account
739
+ # Routing number of the bank account.
740
+ attr_accessor :routing_number
741
+
742
+ def initialize(
743
+ account_holder_type: nil,
744
+ account_number: nil,
745
+ account_type: nil,
746
+ financial_connections_account: nil,
747
+ routing_number: nil
748
+ )
749
+ @account_holder_type = account_holder_type
750
+ @account_number = account_number
751
+ @account_type = account_type
752
+ @financial_connections_account = financial_connections_account
753
+ @routing_number = routing_number
754
+ end
755
+ end
756
+
757
+ class WechatPay < Stripe::RequestParams
758
+ end
759
+
760
+ class Zip < Stripe::RequestParams
761
+ end
762
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
763
+ attr_accessor :acss_debit
764
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
765
+ attr_accessor :affirm
766
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
767
+ attr_accessor :afterpay_clearpay
768
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
769
+ attr_accessor :alipay
770
+ # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`.
771
+ attr_accessor :allow_redisplay
772
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
773
+ attr_accessor :alma
774
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
775
+ attr_accessor :amazon_pay
776
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
777
+ attr_accessor :au_becs_debit
778
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
779
+ attr_accessor :bacs_debit
780
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
781
+ attr_accessor :bancontact
782
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
783
+ attr_accessor :billie
784
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
785
+ attr_accessor :billing_details
786
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
787
+ attr_accessor :blik
788
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
789
+ attr_accessor :boleto
790
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
791
+ attr_accessor :cashapp
792
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
793
+ attr_accessor :customer_balance
794
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
795
+ attr_accessor :eps
796
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
797
+ attr_accessor :fpx
798
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
799
+ attr_accessor :giropay
800
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
801
+ attr_accessor :grabpay
802
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
803
+ attr_accessor :ideal
804
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
805
+ attr_accessor :interac_present
806
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
807
+ attr_accessor :kakao_pay
808
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
809
+ attr_accessor :klarna
810
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
811
+ attr_accessor :konbini
812
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
813
+ attr_accessor :kr_card
814
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
815
+ attr_accessor :link
816
+ # 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`.
817
+ attr_accessor :metadata
818
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
819
+ attr_accessor :mobilepay
820
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
821
+ attr_accessor :multibanco
822
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
823
+ attr_accessor :naver_pay
824
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
825
+ attr_accessor :nz_bank_account
826
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
827
+ attr_accessor :oxxo
828
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
829
+ attr_accessor :p24
830
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
831
+ attr_accessor :pay_by_bank
832
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
833
+ attr_accessor :payco
834
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
835
+ attr_accessor :paynow
836
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
837
+ attr_accessor :paypal
838
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
839
+ attr_accessor :pix
840
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
841
+ attr_accessor :promptpay
842
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
843
+ attr_accessor :radar_options
844
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
845
+ attr_accessor :revolut_pay
846
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
847
+ attr_accessor :samsung_pay
848
+ # If this is a `satispay` PaymentMethod, this hash contains details about the satispay payment method.
849
+ attr_accessor :satispay
850
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
851
+ attr_accessor :sepa_debit
852
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
853
+ attr_accessor :sofort
854
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
855
+ attr_accessor :swish
856
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
857
+ attr_accessor :twint
858
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
859
+ attr_accessor :type
860
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
861
+ attr_accessor :us_bank_account
862
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
863
+ attr_accessor :wechat_pay
864
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
865
+ attr_accessor :zip
866
+
867
+ def initialize(
868
+ acss_debit: nil,
869
+ affirm: nil,
870
+ afterpay_clearpay: nil,
871
+ alipay: nil,
872
+ allow_redisplay: nil,
873
+ alma: nil,
874
+ amazon_pay: nil,
875
+ au_becs_debit: nil,
876
+ bacs_debit: nil,
877
+ bancontact: nil,
878
+ billie: nil,
879
+ billing_details: nil,
880
+ blik: nil,
881
+ boleto: nil,
882
+ cashapp: nil,
883
+ customer_balance: nil,
884
+ eps: nil,
885
+ fpx: nil,
886
+ giropay: nil,
887
+ grabpay: nil,
888
+ ideal: nil,
889
+ interac_present: nil,
890
+ kakao_pay: nil,
891
+ klarna: nil,
892
+ konbini: nil,
893
+ kr_card: nil,
894
+ link: nil,
895
+ metadata: nil,
896
+ mobilepay: nil,
897
+ multibanco: nil,
898
+ naver_pay: nil,
899
+ nz_bank_account: nil,
900
+ oxxo: nil,
901
+ p24: nil,
902
+ pay_by_bank: nil,
903
+ payco: nil,
904
+ paynow: nil,
905
+ paypal: nil,
906
+ pix: nil,
907
+ promptpay: nil,
908
+ radar_options: nil,
909
+ revolut_pay: nil,
910
+ samsung_pay: nil,
911
+ satispay: nil,
912
+ sepa_debit: nil,
913
+ sofort: nil,
914
+ swish: nil,
915
+ twint: nil,
916
+ type: nil,
917
+ us_bank_account: nil,
918
+ wechat_pay: nil,
919
+ zip: nil
920
+ )
921
+ @acss_debit = acss_debit
922
+ @affirm = affirm
923
+ @afterpay_clearpay = afterpay_clearpay
924
+ @alipay = alipay
925
+ @allow_redisplay = allow_redisplay
926
+ @alma = alma
927
+ @amazon_pay = amazon_pay
928
+ @au_becs_debit = au_becs_debit
929
+ @bacs_debit = bacs_debit
930
+ @bancontact = bancontact
931
+ @billie = billie
932
+ @billing_details = billing_details
933
+ @blik = blik
934
+ @boleto = boleto
935
+ @cashapp = cashapp
936
+ @customer_balance = customer_balance
937
+ @eps = eps
938
+ @fpx = fpx
939
+ @giropay = giropay
940
+ @grabpay = grabpay
941
+ @ideal = ideal
942
+ @interac_present = interac_present
943
+ @kakao_pay = kakao_pay
944
+ @klarna = klarna
945
+ @konbini = konbini
946
+ @kr_card = kr_card
947
+ @link = link
948
+ @metadata = metadata
949
+ @mobilepay = mobilepay
950
+ @multibanco = multibanco
951
+ @naver_pay = naver_pay
952
+ @nz_bank_account = nz_bank_account
953
+ @oxxo = oxxo
954
+ @p24 = p24
955
+ @pay_by_bank = pay_by_bank
956
+ @payco = payco
957
+ @paynow = paynow
958
+ @paypal = paypal
959
+ @pix = pix
960
+ @promptpay = promptpay
961
+ @radar_options = radar_options
962
+ @revolut_pay = revolut_pay
963
+ @samsung_pay = samsung_pay
964
+ @satispay = satispay
965
+ @sepa_debit = sepa_debit
966
+ @sofort = sofort
967
+ @swish = swish
968
+ @twint = twint
969
+ @type = type
970
+ @us_bank_account = us_bank_account
971
+ @wechat_pay = wechat_pay
972
+ @zip = zip
973
+ end
974
+ end
975
+
976
+ class PaymentMethodOptions < Stripe::RequestParams
977
+ class AcssDebit < Stripe::RequestParams
978
+ class MandateOptions < Stripe::RequestParams
979
+ # A URL for custom mandate text to render during confirmation step.
980
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
981
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
982
+ attr_accessor :custom_mandate_url
983
+ # List of Stripe products where this mandate can be selected automatically.
984
+ attr_accessor :default_for
985
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
986
+ attr_accessor :interval_description
987
+ # Payment schedule for the mandate.
988
+ attr_accessor :payment_schedule
989
+ # Transaction type of the mandate.
990
+ attr_accessor :transaction_type
991
+
992
+ def initialize(
993
+ custom_mandate_url: nil,
994
+ default_for: nil,
995
+ interval_description: nil,
996
+ payment_schedule: nil,
997
+ transaction_type: nil
998
+ )
999
+ @custom_mandate_url = custom_mandate_url
1000
+ @default_for = default_for
1001
+ @interval_description = interval_description
1002
+ @payment_schedule = payment_schedule
1003
+ @transaction_type = transaction_type
1004
+ end
1005
+ end
1006
+ # 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).
1007
+ attr_accessor :currency
1008
+ # Additional fields for Mandate creation
1009
+ attr_accessor :mandate_options
1010
+ # Bank account verification method.
1011
+ attr_accessor :verification_method
1012
+
1013
+ def initialize(currency: nil, mandate_options: nil, verification_method: nil)
1014
+ @currency = currency
1015
+ @mandate_options = mandate_options
1016
+ @verification_method = verification_method
1017
+ end
1018
+ end
1019
+
1020
+ class AmazonPay < Stripe::RequestParams
1021
+ end
1022
+
1023
+ class BacsDebit < Stripe::RequestParams
1024
+ class MandateOptions < Stripe::RequestParams
1025
+ # 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'.
1026
+ attr_accessor :reference_prefix
1027
+
1028
+ def initialize(reference_prefix: nil)
1029
+ @reference_prefix = reference_prefix
1030
+ end
1031
+ end
1032
+ # Additional fields for Mandate creation
1033
+ attr_accessor :mandate_options
1034
+
1035
+ def initialize(mandate_options: nil)
1036
+ @mandate_options = mandate_options
1037
+ end
1038
+ end
1039
+
1040
+ class Card < Stripe::RequestParams
1041
+ class MandateOptions < Stripe::RequestParams
1042
+ # Amount to be charged for future payments.
1043
+ attr_accessor :amount
1044
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
1045
+ attr_accessor :amount_type
1046
+ # Currency in which future payments will be charged. 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).
1047
+ attr_accessor :currency
1048
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
1049
+ attr_accessor :description
1050
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
1051
+ attr_accessor :end_date
1052
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
1053
+ attr_accessor :interval
1054
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
1055
+ attr_accessor :interval_count
1056
+ # Unique identifier for the mandate or subscription.
1057
+ attr_accessor :reference
1058
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
1059
+ attr_accessor :start_date
1060
+ # Specifies the type of mandates supported. Possible values are `india`.
1061
+ attr_accessor :supported_types
1062
+
1063
+ def initialize(
1064
+ amount: nil,
1065
+ amount_type: nil,
1066
+ currency: nil,
1067
+ description: nil,
1068
+ end_date: nil,
1069
+ interval: nil,
1070
+ interval_count: nil,
1071
+ reference: nil,
1072
+ start_date: nil,
1073
+ supported_types: nil
1074
+ )
1075
+ @amount = amount
1076
+ @amount_type = amount_type
1077
+ @currency = currency
1078
+ @description = description
1079
+ @end_date = end_date
1080
+ @interval = interval
1081
+ @interval_count = interval_count
1082
+ @reference = reference
1083
+ @start_date = start_date
1084
+ @supported_types = supported_types
1085
+ end
1086
+ end
1087
+
1088
+ class ThreeDSecure < Stripe::RequestParams
1089
+ class NetworkOptions < Stripe::RequestParams
1090
+ class CartesBancaires < Stripe::RequestParams
1091
+ # The cryptogram calculation algorithm used by the card Issuer's ACS
1092
+ # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
1093
+ # messageExtension: CB-AVALGO
1094
+ attr_accessor :cb_avalgo
1095
+ # The exemption indicator returned from Cartes Bancaires in the ARes.
1096
+ # message extension: CB-EXEMPTION; string (4 characters)
1097
+ # This is a 3 byte bitmap (low significant byte first and most significant
1098
+ # bit first) that has been Base64 encoded
1099
+ attr_accessor :cb_exemption
1100
+ # The risk score returned from Cartes Bancaires in the ARes.
1101
+ # message extension: CB-SCORE; numeric value 0-99
1102
+ attr_accessor :cb_score
1103
+
1104
+ def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil)
1105
+ @cb_avalgo = cb_avalgo
1106
+ @cb_exemption = cb_exemption
1107
+ @cb_score = cb_score
1108
+ end
1109
+ end
1110
+ # Cartes Bancaires-specific 3DS fields.
1111
+ attr_accessor :cartes_bancaires
1112
+
1113
+ def initialize(cartes_bancaires: nil)
1114
+ @cartes_bancaires = cartes_bancaires
1115
+ end
1116
+ end
1117
+ # The `transStatus` returned from the card Issuer’s ACS in the ARes.
1118
+ attr_accessor :ares_trans_status
1119
+ # The cryptogram, also known as the "authentication value" (AAV, CAVV or
1120
+ # AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
1121
+ # (Most 3D Secure providers will return the base64-encoded version, which
1122
+ # is what you should specify here.)
1123
+ attr_accessor :cryptogram
1124
+ # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
1125
+ # provider and indicates what degree of authentication was performed.
1126
+ attr_accessor :electronic_commerce_indicator
1127
+ # Network specific 3DS fields. Network specific arguments require an
1128
+ # explicit card brand choice. The parameter `payment_method_options.card.network``
1129
+ # must be populated accordingly
1130
+ attr_accessor :network_options
1131
+ # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
1132
+ # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
1133
+ attr_accessor :requestor_challenge_indicator
1134
+ # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
1135
+ # Transaction ID (dsTransID).
1136
+ attr_accessor :transaction_id
1137
+ # The version of 3D Secure that was performed.
1138
+ attr_accessor :version
1139
+
1140
+ def initialize(
1141
+ ares_trans_status: nil,
1142
+ cryptogram: nil,
1143
+ electronic_commerce_indicator: nil,
1144
+ network_options: nil,
1145
+ requestor_challenge_indicator: nil,
1146
+ transaction_id: nil,
1147
+ version: nil
1148
+ )
1149
+ @ares_trans_status = ares_trans_status
1150
+ @cryptogram = cryptogram
1151
+ @electronic_commerce_indicator = electronic_commerce_indicator
1152
+ @network_options = network_options
1153
+ @requestor_challenge_indicator = requestor_challenge_indicator
1154
+ @transaction_id = transaction_id
1155
+ @version = version
1156
+ end
1157
+ end
1158
+ # Configuration options for setting up an eMandate for cards issued in India.
1159
+ attr_accessor :mandate_options
1160
+ # When specified, this parameter signals that a card has been collected
1161
+ # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
1162
+ # parameter can only be provided during confirmation.
1163
+ attr_accessor :moto
1164
+ # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time.
1165
+ attr_accessor :network
1166
+ # 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.
1167
+ attr_accessor :request_three_d_secure
1168
+ # If 3D Secure authentication was performed with a third-party provider,
1169
+ # the authentication details to use for this setup.
1170
+ attr_accessor :three_d_secure
1171
+
1172
+ def initialize(
1173
+ mandate_options: nil,
1174
+ moto: nil,
1175
+ network: nil,
1176
+ request_three_d_secure: nil,
1177
+ three_d_secure: nil
1178
+ )
1179
+ @mandate_options = mandate_options
1180
+ @moto = moto
1181
+ @network = network
1182
+ @request_three_d_secure = request_three_d_secure
1183
+ @three_d_secure = three_d_secure
1184
+ end
1185
+ end
1186
+
1187
+ class CardPresent < Stripe::RequestParams
1188
+ end
1189
+
1190
+ class Link < Stripe::RequestParams
1191
+ # [Deprecated] This is a legacy parameter that no longer has any function.
1192
+ attr_accessor :persistent_token
1193
+
1194
+ def initialize(persistent_token: nil)
1195
+ @persistent_token = persistent_token
1196
+ end
1197
+ end
1198
+
1199
+ class Paypal < Stripe::RequestParams
1200
+ # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer.
1201
+ attr_accessor :billing_agreement_id
1202
+
1203
+ def initialize(billing_agreement_id: nil)
1204
+ @billing_agreement_id = billing_agreement_id
1205
+ end
1206
+ end
1207
+
1208
+ class SepaDebit < Stripe::RequestParams
1209
+ class MandateOptions < Stripe::RequestParams
1210
+ # 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'.
1211
+ attr_accessor :reference_prefix
1212
+
1213
+ def initialize(reference_prefix: nil)
1214
+ @reference_prefix = reference_prefix
1215
+ end
1216
+ end
1217
+ # Additional fields for Mandate creation
1218
+ attr_accessor :mandate_options
1219
+
1220
+ def initialize(mandate_options: nil)
1221
+ @mandate_options = mandate_options
1222
+ end
1223
+ end
1224
+
1225
+ class UsBankAccount < Stripe::RequestParams
1226
+ class FinancialConnections < Stripe::RequestParams
1227
+ class Filters < Stripe::RequestParams
1228
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
1229
+ attr_accessor :account_subcategories
1230
+
1231
+ def initialize(account_subcategories: nil)
1232
+ @account_subcategories = account_subcategories
1233
+ end
1234
+ end
1235
+ # Provide filters for the linked accounts that the customer can select for the payment method.
1236
+ attr_accessor :filters
1237
+ # 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`.
1238
+ attr_accessor :permissions
1239
+ # List of data features that you would like to retrieve upon account creation.
1240
+ attr_accessor :prefetch
1241
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
1242
+ attr_accessor :return_url
1243
+
1244
+ def initialize(filters: nil, permissions: nil, prefetch: nil, return_url: nil)
1245
+ @filters = filters
1246
+ @permissions = permissions
1247
+ @prefetch = prefetch
1248
+ @return_url = return_url
1249
+ end
1250
+ end
1251
+
1252
+ class MandateOptions < Stripe::RequestParams
1253
+ # The method used to collect offline mandate customer acceptance.
1254
+ attr_accessor :collection_method
1255
+
1256
+ def initialize(collection_method: nil)
1257
+ @collection_method = collection_method
1258
+ end
1259
+ end
1260
+
1261
+ class Networks < Stripe::RequestParams
1262
+ # Triggers validations to run across the selected networks
1263
+ attr_accessor :requested
1264
+
1265
+ def initialize(requested: nil)
1266
+ @requested = requested
1267
+ end
1268
+ end
1269
+ # Additional fields for Financial Connections Session creation
1270
+ attr_accessor :financial_connections
1271
+ # Additional fields for Mandate creation
1272
+ attr_accessor :mandate_options
1273
+ # Additional fields for network related functions
1274
+ attr_accessor :networks
1275
+ # Bank account verification method.
1276
+ attr_accessor :verification_method
1277
+
1278
+ def initialize(
1279
+ financial_connections: nil,
1280
+ mandate_options: nil,
1281
+ networks: nil,
1282
+ verification_method: nil
1283
+ )
1284
+ @financial_connections = financial_connections
1285
+ @mandate_options = mandate_options
1286
+ @networks = networks
1287
+ @verification_method = verification_method
1288
+ end
1289
+ end
1290
+ # If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options.
1291
+ attr_accessor :acss_debit
1292
+ # If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options.
1293
+ attr_accessor :amazon_pay
1294
+ # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options.
1295
+ attr_accessor :bacs_debit
1296
+ # Configuration for any card setup attempted on this SetupIntent.
1297
+ attr_accessor :card
1298
+ # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options.
1299
+ attr_accessor :card_present
1300
+ # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
1301
+ attr_accessor :link
1302
+ # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
1303
+ attr_accessor :paypal
1304
+ # If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
1305
+ attr_accessor :sepa_debit
1306
+ # If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options.
1307
+ attr_accessor :us_bank_account
1308
+
1309
+ def initialize(
1310
+ acss_debit: nil,
1311
+ amazon_pay: nil,
1312
+ bacs_debit: nil,
1313
+ card: nil,
1314
+ card_present: nil,
1315
+ link: nil,
1316
+ paypal: nil,
1317
+ sepa_debit: nil,
1318
+ us_bank_account: nil
1319
+ )
1320
+ @acss_debit = acss_debit
1321
+ @amazon_pay = amazon_pay
1322
+ @bacs_debit = bacs_debit
1323
+ @card = card
1324
+ @card_present = card_present
1325
+ @link = link
1326
+ @paypal = paypal
1327
+ @sepa_debit = sepa_debit
1328
+ @us_bank_account = us_bank_account
1329
+ end
1330
+ end
1331
+
1332
+ class SingleUse < Stripe::RequestParams
1333
+ # Amount the customer is granting permission to collect later. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
1334
+ attr_accessor :amount
1335
+ # 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).
1336
+ attr_accessor :currency
1337
+
1338
+ def initialize(amount: nil, currency: nil)
1339
+ @amount = amount
1340
+ @currency = currency
1341
+ end
1342
+ end
1343
+ # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
1344
+ #
1345
+ # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
1346
+ attr_accessor :attach_to_self
1347
+ # When you enable this parameter, this SetupIntent accepts payment methods that you enable in the Dashboard and that are compatible with its other parameters.
1348
+ attr_accessor :automatic_payment_methods
1349
+ # Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If a card is the attached payment method, you can provide a `return_url` in case further authentication is necessary.
1350
+ attr_accessor :confirm
1351
+ # ID of the ConfirmationToken used to confirm this SetupIntent.
1352
+ #
1353
+ # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence.
1354
+ attr_accessor :confirmation_token
1355
+ # ID of the Customer this SetupIntent belongs to, if one exists.
1356
+ #
1357
+ # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.
1358
+ attr_accessor :customer
1359
+ # An arbitrary string attached to the object. Often useful for displaying to users.
1360
+ attr_accessor :description
1361
+ # Specifies which fields in the response should be expanded.
1362
+ attr_accessor :expand
1363
+ # Indicates the directions of money movement for which this payment method is intended to be used.
1364
+ #
1365
+ # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
1366
+ attr_accessor :flow_directions
1367
+ # This hash contains details about the mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm).
1368
+ attr_accessor :mandate_data
1369
+ # 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`.
1370
+ attr_accessor :metadata
1371
+ # The Stripe account ID created for this SetupIntent.
1372
+ attr_accessor :on_behalf_of
1373
+ # ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.
1374
+ attr_accessor :payment_method
1375
+ # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent.
1376
+ attr_accessor :payment_method_configuration
1377
+ # When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)
1378
+ # value in the SetupIntent.
1379
+ attr_accessor :payment_method_data
1380
+ # Payment method-specific configuration for this SetupIntent.
1381
+ attr_accessor :payment_method_options
1382
+ # The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
1383
+ attr_accessor :payment_method_types
1384
+ # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. To redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm).
1385
+ attr_accessor :return_url
1386
+ # If you populate this hash, this SetupIntent generates a `single_use` mandate after successful completion.
1387
+ #
1388
+ # Single-use mandates are only valid for the following payment methods: `acss_debit`, `alipay`, `au_becs_debit`, `bacs_debit`, `bancontact`, `boleto`, `ideal`, `link`, `sepa_debit`, and `us_bank_account`.
1389
+ attr_accessor :single_use
1390
+ # Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`.
1391
+ attr_accessor :usage
1392
+ # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.
1393
+ attr_accessor :use_stripe_sdk
1394
+
1395
+ def initialize(
1396
+ attach_to_self: nil,
1397
+ automatic_payment_methods: nil,
1398
+ confirm: nil,
1399
+ confirmation_token: nil,
1400
+ customer: nil,
1401
+ description: nil,
1402
+ expand: nil,
1403
+ flow_directions: nil,
1404
+ mandate_data: nil,
1405
+ metadata: nil,
1406
+ on_behalf_of: nil,
1407
+ payment_method: nil,
1408
+ payment_method_configuration: nil,
1409
+ payment_method_data: nil,
1410
+ payment_method_options: nil,
1411
+ payment_method_types: nil,
1412
+ return_url: nil,
1413
+ single_use: nil,
1414
+ usage: nil,
1415
+ use_stripe_sdk: nil
1416
+ )
1417
+ @attach_to_self = attach_to_self
1418
+ @automatic_payment_methods = automatic_payment_methods
1419
+ @confirm = confirm
1420
+ @confirmation_token = confirmation_token
1421
+ @customer = customer
1422
+ @description = description
1423
+ @expand = expand
1424
+ @flow_directions = flow_directions
1425
+ @mandate_data = mandate_data
1426
+ @metadata = metadata
1427
+ @on_behalf_of = on_behalf_of
1428
+ @payment_method = payment_method
1429
+ @payment_method_configuration = payment_method_configuration
1430
+ @payment_method_data = payment_method_data
1431
+ @payment_method_options = payment_method_options
1432
+ @payment_method_types = payment_method_types
1433
+ @return_url = return_url
1434
+ @single_use = single_use
1435
+ @usage = usage
1436
+ @use_stripe_sdk = use_stripe_sdk
1437
+ end
1438
+ end
1439
+
1440
+ class UpdateParams < Stripe::RequestParams
1441
+ class PaymentMethodData < Stripe::RequestParams
1442
+ class AcssDebit < Stripe::RequestParams
1443
+ # Customer's bank account number.
1444
+ attr_accessor :account_number
1445
+ # Institution number of the customer's bank.
1446
+ attr_accessor :institution_number
1447
+ # Transit number of the customer's bank.
1448
+ attr_accessor :transit_number
1449
+
1450
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil)
1451
+ @account_number = account_number
1452
+ @institution_number = institution_number
1453
+ @transit_number = transit_number
1454
+ end
1455
+ end
1456
+
1457
+ class Affirm < Stripe::RequestParams
1458
+ end
1459
+
1460
+ class AfterpayClearpay < Stripe::RequestParams
1461
+ end
1462
+
1463
+ class Alipay < Stripe::RequestParams
1464
+ end
1465
+
1466
+ class Alma < Stripe::RequestParams
1467
+ end
1468
+
1469
+ class AmazonPay < Stripe::RequestParams
1470
+ end
1471
+
1472
+ class AuBecsDebit < Stripe::RequestParams
1473
+ # The account number for the bank account.
1474
+ attr_accessor :account_number
1475
+ # Bank-State-Branch number of the bank account.
1476
+ attr_accessor :bsb_number
1477
+
1478
+ def initialize(account_number: nil, bsb_number: nil)
1479
+ @account_number = account_number
1480
+ @bsb_number = bsb_number
1481
+ end
1482
+ end
1483
+
1484
+ class BacsDebit < Stripe::RequestParams
1485
+ # Account number of the bank account that the funds will be debited from.
1486
+ attr_accessor :account_number
1487
+ # Sort code of the bank account. (e.g., `10-20-30`)
1488
+ attr_accessor :sort_code
1489
+
1490
+ def initialize(account_number: nil, sort_code: nil)
1491
+ @account_number = account_number
1492
+ @sort_code = sort_code
1493
+ end
1494
+ end
1495
+
1496
+ class Bancontact < Stripe::RequestParams
1497
+ end
1498
+
1499
+ class Billie < Stripe::RequestParams
1500
+ end
1501
+
1502
+ class BillingDetails < Stripe::RequestParams
1503
+ class Address < Stripe::RequestParams
1504
+ # City, district, suburb, town, or village.
1505
+ attr_accessor :city
1506
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
1507
+ attr_accessor :country
1508
+ # Address line 1 (e.g., street, PO Box, or company name).
1509
+ attr_accessor :line1
1510
+ # Address line 2 (e.g., apartment, suite, unit, or building).
1511
+ attr_accessor :line2
1512
+ # ZIP or postal code.
1513
+ attr_accessor :postal_code
1514
+ # State, county, province, or region.
1515
+ attr_accessor :state
1516
+
1517
+ def initialize(
1518
+ city: nil,
1519
+ country: nil,
1520
+ line1: nil,
1521
+ line2: nil,
1522
+ postal_code: nil,
1523
+ state: nil
1524
+ )
1525
+ @city = city
1526
+ @country = country
1527
+ @line1 = line1
1528
+ @line2 = line2
1529
+ @postal_code = postal_code
1530
+ @state = state
1531
+ end
1532
+ end
1533
+ # Billing address.
1534
+ attr_accessor :address
1535
+ # Email address.
1536
+ attr_accessor :email
1537
+ # Full name.
1538
+ attr_accessor :name
1539
+ # Billing phone number (including extension).
1540
+ attr_accessor :phone
1541
+
1542
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
1543
+ @address = address
1544
+ @email = email
1545
+ @name = name
1546
+ @phone = phone
1547
+ end
1548
+ end
1549
+
1550
+ class Blik < Stripe::RequestParams
1551
+ end
1552
+
1553
+ class Boleto < Stripe::RequestParams
1554
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
1555
+ attr_accessor :tax_id
1556
+
1557
+ def initialize(tax_id: nil)
1558
+ @tax_id = tax_id
1559
+ end
1560
+ end
1561
+
1562
+ class Cashapp < Stripe::RequestParams
1563
+ end
1564
+
1565
+ class CustomerBalance < Stripe::RequestParams
1566
+ end
1567
+
1568
+ class Eps < Stripe::RequestParams
1569
+ # The customer's bank.
1570
+ attr_accessor :bank
1571
+
1572
+ def initialize(bank: nil)
1573
+ @bank = bank
1574
+ end
1575
+ end
1576
+
1577
+ class Fpx < Stripe::RequestParams
1578
+ # Account holder type for FPX transaction
1579
+ attr_accessor :account_holder_type
1580
+ # The customer's bank.
1581
+ attr_accessor :bank
1582
+
1583
+ def initialize(account_holder_type: nil, bank: nil)
1584
+ @account_holder_type = account_holder_type
1585
+ @bank = bank
1586
+ end
1587
+ end
1588
+
1589
+ class Giropay < Stripe::RequestParams
1590
+ end
1591
+
1592
+ class Grabpay < Stripe::RequestParams
1593
+ end
1594
+
1595
+ class Ideal < Stripe::RequestParams
1596
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
1597
+ attr_accessor :bank
1598
+
1599
+ def initialize(bank: nil)
1600
+ @bank = bank
1601
+ end
1602
+ end
1603
+
1604
+ class InteracPresent < Stripe::RequestParams
1605
+ end
1606
+
1607
+ class KakaoPay < Stripe::RequestParams
1608
+ end
1609
+
1610
+ class Klarna < Stripe::RequestParams
1611
+ class Dob < Stripe::RequestParams
1612
+ # The day of birth, between 1 and 31.
1613
+ attr_accessor :day
1614
+ # The month of birth, between 1 and 12.
1615
+ attr_accessor :month
1616
+ # The four-digit year of birth.
1617
+ attr_accessor :year
1618
+
1619
+ def initialize(day: nil, month: nil, year: nil)
1620
+ @day = day
1621
+ @month = month
1622
+ @year = year
1623
+ end
1624
+ end
1625
+ # Customer's date of birth
1626
+ attr_accessor :dob
1627
+
1628
+ def initialize(dob: nil)
1629
+ @dob = dob
1630
+ end
1631
+ end
1632
+
1633
+ class Konbini < Stripe::RequestParams
1634
+ end
1635
+
1636
+ class KrCard < Stripe::RequestParams
1637
+ end
1638
+
1639
+ class Link < Stripe::RequestParams
1640
+ end
1641
+
1642
+ class Mobilepay < Stripe::RequestParams
1643
+ end
1644
+
1645
+ class Multibanco < Stripe::RequestParams
1646
+ end
1647
+
1648
+ class NaverPay < Stripe::RequestParams
1649
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
1650
+ attr_accessor :funding
1651
+
1652
+ def initialize(funding: nil)
1653
+ @funding = funding
1654
+ end
1655
+ end
1656
+
1657
+ class NzBankAccount < Stripe::RequestParams
1658
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
1659
+ attr_accessor :account_holder_name
1660
+ # The account number for the bank account.
1661
+ attr_accessor :account_number
1662
+ # The numeric code for the bank account's bank.
1663
+ attr_accessor :bank_code
1664
+ # The numeric code for the bank account's bank branch.
1665
+ attr_accessor :branch_code
1666
+ # Attribute for param field reference
1667
+ attr_accessor :reference
1668
+ # The suffix of the bank account number.
1669
+ attr_accessor :suffix
1670
+
1671
+ def initialize(
1672
+ account_holder_name: nil,
1673
+ account_number: nil,
1674
+ bank_code: nil,
1675
+ branch_code: nil,
1676
+ reference: nil,
1677
+ suffix: nil
1678
+ )
1679
+ @account_holder_name = account_holder_name
1680
+ @account_number = account_number
1681
+ @bank_code = bank_code
1682
+ @branch_code = branch_code
1683
+ @reference = reference
1684
+ @suffix = suffix
1685
+ end
1686
+ end
1687
+
1688
+ class Oxxo < Stripe::RequestParams
1689
+ end
1690
+
1691
+ class P24 < Stripe::RequestParams
1692
+ # The customer's bank.
1693
+ attr_accessor :bank
1694
+
1695
+ def initialize(bank: nil)
1696
+ @bank = bank
1697
+ end
1698
+ end
1699
+
1700
+ class PayByBank < Stripe::RequestParams
1701
+ end
1702
+
1703
+ class Payco < Stripe::RequestParams
1704
+ end
1705
+
1706
+ class Paynow < Stripe::RequestParams
1707
+ end
1708
+
1709
+ class Paypal < Stripe::RequestParams
1710
+ end
1711
+
1712
+ class Pix < Stripe::RequestParams
1713
+ end
1714
+
1715
+ class Promptpay < Stripe::RequestParams
1716
+ end
1717
+
1718
+ class RadarOptions < Stripe::RequestParams
1719
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
1720
+ attr_accessor :session
1721
+
1722
+ def initialize(session: nil)
1723
+ @session = session
1724
+ end
1725
+ end
1726
+
1727
+ class RevolutPay < Stripe::RequestParams
1728
+ end
1729
+
1730
+ class SamsungPay < Stripe::RequestParams
1731
+ end
1732
+
1733
+ class Satispay < Stripe::RequestParams
1734
+ end
1735
+
1736
+ class SepaDebit < Stripe::RequestParams
1737
+ # IBAN of the bank account.
1738
+ attr_accessor :iban
1739
+
1740
+ def initialize(iban: nil)
1741
+ @iban = iban
1742
+ end
1743
+ end
1744
+
1745
+ class Sofort < Stripe::RequestParams
1746
+ # Two-letter ISO code representing the country the bank account is located in.
1747
+ attr_accessor :country
1748
+
1749
+ def initialize(country: nil)
1750
+ @country = country
1751
+ end
1752
+ end
1753
+
1754
+ class Swish < Stripe::RequestParams
1755
+ end
1756
+
1757
+ class Twint < Stripe::RequestParams
1758
+ end
1759
+
1760
+ class UsBankAccount < Stripe::RequestParams
1761
+ # Account holder type: individual or company.
1762
+ attr_accessor :account_holder_type
1763
+ # Account number of the bank account.
1764
+ attr_accessor :account_number
1765
+ # Account type: checkings or savings. Defaults to checking if omitted.
1766
+ attr_accessor :account_type
1767
+ # The ID of a Financial Connections Account to use as a payment method.
1768
+ attr_accessor :financial_connections_account
1769
+ # Routing number of the bank account.
1770
+ attr_accessor :routing_number
1771
+
1772
+ def initialize(
1773
+ account_holder_type: nil,
1774
+ account_number: nil,
1775
+ account_type: nil,
1776
+ financial_connections_account: nil,
1777
+ routing_number: nil
1778
+ )
1779
+ @account_holder_type = account_holder_type
1780
+ @account_number = account_number
1781
+ @account_type = account_type
1782
+ @financial_connections_account = financial_connections_account
1783
+ @routing_number = routing_number
1784
+ end
1785
+ end
1786
+
1787
+ class WechatPay < Stripe::RequestParams
1788
+ end
1789
+
1790
+ class Zip < Stripe::RequestParams
1791
+ end
1792
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
1793
+ attr_accessor :acss_debit
1794
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
1795
+ attr_accessor :affirm
1796
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
1797
+ attr_accessor :afterpay_clearpay
1798
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
1799
+ attr_accessor :alipay
1800
+ # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`.
1801
+ attr_accessor :allow_redisplay
1802
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
1803
+ attr_accessor :alma
1804
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
1805
+ attr_accessor :amazon_pay
1806
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
1807
+ attr_accessor :au_becs_debit
1808
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
1809
+ attr_accessor :bacs_debit
1810
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
1811
+ attr_accessor :bancontact
1812
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
1813
+ attr_accessor :billie
1814
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
1815
+ attr_accessor :billing_details
1816
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
1817
+ attr_accessor :blik
1818
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
1819
+ attr_accessor :boleto
1820
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
1821
+ attr_accessor :cashapp
1822
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
1823
+ attr_accessor :customer_balance
1824
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
1825
+ attr_accessor :eps
1826
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
1827
+ attr_accessor :fpx
1828
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
1829
+ attr_accessor :giropay
1830
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
1831
+ attr_accessor :grabpay
1832
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
1833
+ attr_accessor :ideal
1834
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
1835
+ attr_accessor :interac_present
1836
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
1837
+ attr_accessor :kakao_pay
1838
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
1839
+ attr_accessor :klarna
1840
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
1841
+ attr_accessor :konbini
1842
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
1843
+ attr_accessor :kr_card
1844
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
1845
+ attr_accessor :link
1846
+ # 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`.
1847
+ attr_accessor :metadata
1848
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
1849
+ attr_accessor :mobilepay
1850
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
1851
+ attr_accessor :multibanco
1852
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
1853
+ attr_accessor :naver_pay
1854
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
1855
+ attr_accessor :nz_bank_account
1856
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
1857
+ attr_accessor :oxxo
1858
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
1859
+ attr_accessor :p24
1860
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
1861
+ attr_accessor :pay_by_bank
1862
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
1863
+ attr_accessor :payco
1864
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
1865
+ attr_accessor :paynow
1866
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
1867
+ attr_accessor :paypal
1868
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
1869
+ attr_accessor :pix
1870
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
1871
+ attr_accessor :promptpay
1872
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
1873
+ attr_accessor :radar_options
1874
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
1875
+ attr_accessor :revolut_pay
1876
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
1877
+ attr_accessor :samsung_pay
1878
+ # If this is a `satispay` PaymentMethod, this hash contains details about the satispay payment method.
1879
+ attr_accessor :satispay
1880
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
1881
+ attr_accessor :sepa_debit
1882
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
1883
+ attr_accessor :sofort
1884
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
1885
+ attr_accessor :swish
1886
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
1887
+ attr_accessor :twint
1888
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
1889
+ attr_accessor :type
1890
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
1891
+ attr_accessor :us_bank_account
1892
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
1893
+ attr_accessor :wechat_pay
1894
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
1895
+ attr_accessor :zip
1896
+
1897
+ def initialize(
1898
+ acss_debit: nil,
1899
+ affirm: nil,
1900
+ afterpay_clearpay: nil,
1901
+ alipay: nil,
1902
+ allow_redisplay: nil,
1903
+ alma: nil,
1904
+ amazon_pay: nil,
1905
+ au_becs_debit: nil,
1906
+ bacs_debit: nil,
1907
+ bancontact: nil,
1908
+ billie: nil,
1909
+ billing_details: nil,
1910
+ blik: nil,
1911
+ boleto: nil,
1912
+ cashapp: nil,
1913
+ customer_balance: nil,
1914
+ eps: nil,
1915
+ fpx: nil,
1916
+ giropay: nil,
1917
+ grabpay: nil,
1918
+ ideal: nil,
1919
+ interac_present: nil,
1920
+ kakao_pay: nil,
1921
+ klarna: nil,
1922
+ konbini: nil,
1923
+ kr_card: nil,
1924
+ link: nil,
1925
+ metadata: nil,
1926
+ mobilepay: nil,
1927
+ multibanco: nil,
1928
+ naver_pay: nil,
1929
+ nz_bank_account: nil,
1930
+ oxxo: nil,
1931
+ p24: nil,
1932
+ pay_by_bank: nil,
1933
+ payco: nil,
1934
+ paynow: nil,
1935
+ paypal: nil,
1936
+ pix: nil,
1937
+ promptpay: nil,
1938
+ radar_options: nil,
1939
+ revolut_pay: nil,
1940
+ samsung_pay: nil,
1941
+ satispay: nil,
1942
+ sepa_debit: nil,
1943
+ sofort: nil,
1944
+ swish: nil,
1945
+ twint: nil,
1946
+ type: nil,
1947
+ us_bank_account: nil,
1948
+ wechat_pay: nil,
1949
+ zip: nil
1950
+ )
1951
+ @acss_debit = acss_debit
1952
+ @affirm = affirm
1953
+ @afterpay_clearpay = afterpay_clearpay
1954
+ @alipay = alipay
1955
+ @allow_redisplay = allow_redisplay
1956
+ @alma = alma
1957
+ @amazon_pay = amazon_pay
1958
+ @au_becs_debit = au_becs_debit
1959
+ @bacs_debit = bacs_debit
1960
+ @bancontact = bancontact
1961
+ @billie = billie
1962
+ @billing_details = billing_details
1963
+ @blik = blik
1964
+ @boleto = boleto
1965
+ @cashapp = cashapp
1966
+ @customer_balance = customer_balance
1967
+ @eps = eps
1968
+ @fpx = fpx
1969
+ @giropay = giropay
1970
+ @grabpay = grabpay
1971
+ @ideal = ideal
1972
+ @interac_present = interac_present
1973
+ @kakao_pay = kakao_pay
1974
+ @klarna = klarna
1975
+ @konbini = konbini
1976
+ @kr_card = kr_card
1977
+ @link = link
1978
+ @metadata = metadata
1979
+ @mobilepay = mobilepay
1980
+ @multibanco = multibanco
1981
+ @naver_pay = naver_pay
1982
+ @nz_bank_account = nz_bank_account
1983
+ @oxxo = oxxo
1984
+ @p24 = p24
1985
+ @pay_by_bank = pay_by_bank
1986
+ @payco = payco
1987
+ @paynow = paynow
1988
+ @paypal = paypal
1989
+ @pix = pix
1990
+ @promptpay = promptpay
1991
+ @radar_options = radar_options
1992
+ @revolut_pay = revolut_pay
1993
+ @samsung_pay = samsung_pay
1994
+ @satispay = satispay
1995
+ @sepa_debit = sepa_debit
1996
+ @sofort = sofort
1997
+ @swish = swish
1998
+ @twint = twint
1999
+ @type = type
2000
+ @us_bank_account = us_bank_account
2001
+ @wechat_pay = wechat_pay
2002
+ @zip = zip
2003
+ end
2004
+ end
2005
+
2006
+ class PaymentMethodOptions < Stripe::RequestParams
2007
+ class AcssDebit < Stripe::RequestParams
2008
+ class MandateOptions < Stripe::RequestParams
2009
+ # A URL for custom mandate text to render during confirmation step.
2010
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
2011
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
2012
+ attr_accessor :custom_mandate_url
2013
+ # List of Stripe products where this mandate can be selected automatically.
2014
+ attr_accessor :default_for
2015
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
2016
+ attr_accessor :interval_description
2017
+ # Payment schedule for the mandate.
2018
+ attr_accessor :payment_schedule
2019
+ # Transaction type of the mandate.
2020
+ attr_accessor :transaction_type
2021
+
2022
+ def initialize(
2023
+ custom_mandate_url: nil,
2024
+ default_for: nil,
2025
+ interval_description: nil,
2026
+ payment_schedule: nil,
2027
+ transaction_type: nil
2028
+ )
2029
+ @custom_mandate_url = custom_mandate_url
2030
+ @default_for = default_for
2031
+ @interval_description = interval_description
2032
+ @payment_schedule = payment_schedule
2033
+ @transaction_type = transaction_type
2034
+ end
2035
+ end
2036
+ # 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).
2037
+ attr_accessor :currency
2038
+ # Additional fields for Mandate creation
2039
+ attr_accessor :mandate_options
2040
+ # Bank account verification method.
2041
+ attr_accessor :verification_method
2042
+
2043
+ def initialize(currency: nil, mandate_options: nil, verification_method: nil)
2044
+ @currency = currency
2045
+ @mandate_options = mandate_options
2046
+ @verification_method = verification_method
2047
+ end
2048
+ end
2049
+
2050
+ class AmazonPay < Stripe::RequestParams
2051
+ end
2052
+
2053
+ class BacsDebit < Stripe::RequestParams
2054
+ class MandateOptions < Stripe::RequestParams
2055
+ # 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'.
2056
+ attr_accessor :reference_prefix
2057
+
2058
+ def initialize(reference_prefix: nil)
2059
+ @reference_prefix = reference_prefix
2060
+ end
2061
+ end
2062
+ # Additional fields for Mandate creation
2063
+ attr_accessor :mandate_options
2064
+
2065
+ def initialize(mandate_options: nil)
2066
+ @mandate_options = mandate_options
2067
+ end
2068
+ end
2069
+
2070
+ class Card < Stripe::RequestParams
2071
+ class MandateOptions < Stripe::RequestParams
2072
+ # Amount to be charged for future payments.
2073
+ attr_accessor :amount
2074
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
2075
+ attr_accessor :amount_type
2076
+ # Currency in which future payments will be charged. 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).
2077
+ attr_accessor :currency
2078
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
2079
+ attr_accessor :description
2080
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
2081
+ attr_accessor :end_date
2082
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
2083
+ attr_accessor :interval
2084
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
2085
+ attr_accessor :interval_count
2086
+ # Unique identifier for the mandate or subscription.
2087
+ attr_accessor :reference
2088
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
2089
+ attr_accessor :start_date
2090
+ # Specifies the type of mandates supported. Possible values are `india`.
2091
+ attr_accessor :supported_types
2092
+
2093
+ def initialize(
2094
+ amount: nil,
2095
+ amount_type: nil,
2096
+ currency: nil,
2097
+ description: nil,
2098
+ end_date: nil,
2099
+ interval: nil,
2100
+ interval_count: nil,
2101
+ reference: nil,
2102
+ start_date: nil,
2103
+ supported_types: nil
2104
+ )
2105
+ @amount = amount
2106
+ @amount_type = amount_type
2107
+ @currency = currency
2108
+ @description = description
2109
+ @end_date = end_date
2110
+ @interval = interval
2111
+ @interval_count = interval_count
2112
+ @reference = reference
2113
+ @start_date = start_date
2114
+ @supported_types = supported_types
2115
+ end
2116
+ end
2117
+
2118
+ class ThreeDSecure < Stripe::RequestParams
2119
+ class NetworkOptions < Stripe::RequestParams
2120
+ class CartesBancaires < Stripe::RequestParams
2121
+ # The cryptogram calculation algorithm used by the card Issuer's ACS
2122
+ # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
2123
+ # messageExtension: CB-AVALGO
2124
+ attr_accessor :cb_avalgo
2125
+ # The exemption indicator returned from Cartes Bancaires in the ARes.
2126
+ # message extension: CB-EXEMPTION; string (4 characters)
2127
+ # This is a 3 byte bitmap (low significant byte first and most significant
2128
+ # bit first) that has been Base64 encoded
2129
+ attr_accessor :cb_exemption
2130
+ # The risk score returned from Cartes Bancaires in the ARes.
2131
+ # message extension: CB-SCORE; numeric value 0-99
2132
+ attr_accessor :cb_score
2133
+
2134
+ def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil)
2135
+ @cb_avalgo = cb_avalgo
2136
+ @cb_exemption = cb_exemption
2137
+ @cb_score = cb_score
2138
+ end
2139
+ end
2140
+ # Cartes Bancaires-specific 3DS fields.
2141
+ attr_accessor :cartes_bancaires
2142
+
2143
+ def initialize(cartes_bancaires: nil)
2144
+ @cartes_bancaires = cartes_bancaires
2145
+ end
2146
+ end
2147
+ # The `transStatus` returned from the card Issuer’s ACS in the ARes.
2148
+ attr_accessor :ares_trans_status
2149
+ # The cryptogram, also known as the "authentication value" (AAV, CAVV or
2150
+ # AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
2151
+ # (Most 3D Secure providers will return the base64-encoded version, which
2152
+ # is what you should specify here.)
2153
+ attr_accessor :cryptogram
2154
+ # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
2155
+ # provider and indicates what degree of authentication was performed.
2156
+ attr_accessor :electronic_commerce_indicator
2157
+ # Network specific 3DS fields. Network specific arguments require an
2158
+ # explicit card brand choice. The parameter `payment_method_options.card.network``
2159
+ # must be populated accordingly
2160
+ attr_accessor :network_options
2161
+ # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
2162
+ # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
2163
+ attr_accessor :requestor_challenge_indicator
2164
+ # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
2165
+ # Transaction ID (dsTransID).
2166
+ attr_accessor :transaction_id
2167
+ # The version of 3D Secure that was performed.
2168
+ attr_accessor :version
2169
+
2170
+ def initialize(
2171
+ ares_trans_status: nil,
2172
+ cryptogram: nil,
2173
+ electronic_commerce_indicator: nil,
2174
+ network_options: nil,
2175
+ requestor_challenge_indicator: nil,
2176
+ transaction_id: nil,
2177
+ version: nil
2178
+ )
2179
+ @ares_trans_status = ares_trans_status
2180
+ @cryptogram = cryptogram
2181
+ @electronic_commerce_indicator = electronic_commerce_indicator
2182
+ @network_options = network_options
2183
+ @requestor_challenge_indicator = requestor_challenge_indicator
2184
+ @transaction_id = transaction_id
2185
+ @version = version
2186
+ end
2187
+ end
2188
+ # Configuration options for setting up an eMandate for cards issued in India.
2189
+ attr_accessor :mandate_options
2190
+ # When specified, this parameter signals that a card has been collected
2191
+ # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
2192
+ # parameter can only be provided during confirmation.
2193
+ attr_accessor :moto
2194
+ # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time.
2195
+ attr_accessor :network
2196
+ # 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.
2197
+ attr_accessor :request_three_d_secure
2198
+ # If 3D Secure authentication was performed with a third-party provider,
2199
+ # the authentication details to use for this setup.
2200
+ attr_accessor :three_d_secure
2201
+
2202
+ def initialize(
2203
+ mandate_options: nil,
2204
+ moto: nil,
2205
+ network: nil,
2206
+ request_three_d_secure: nil,
2207
+ three_d_secure: nil
2208
+ )
2209
+ @mandate_options = mandate_options
2210
+ @moto = moto
2211
+ @network = network
2212
+ @request_three_d_secure = request_three_d_secure
2213
+ @three_d_secure = three_d_secure
2214
+ end
2215
+ end
2216
+
2217
+ class CardPresent < Stripe::RequestParams
2218
+ end
2219
+
2220
+ class Link < Stripe::RequestParams
2221
+ # [Deprecated] This is a legacy parameter that no longer has any function.
2222
+ attr_accessor :persistent_token
2223
+
2224
+ def initialize(persistent_token: nil)
2225
+ @persistent_token = persistent_token
2226
+ end
2227
+ end
2228
+
2229
+ class Paypal < Stripe::RequestParams
2230
+ # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer.
2231
+ attr_accessor :billing_agreement_id
2232
+
2233
+ def initialize(billing_agreement_id: nil)
2234
+ @billing_agreement_id = billing_agreement_id
2235
+ end
2236
+ end
2237
+
2238
+ class SepaDebit < Stripe::RequestParams
2239
+ class MandateOptions < Stripe::RequestParams
2240
+ # 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'.
2241
+ attr_accessor :reference_prefix
2242
+
2243
+ def initialize(reference_prefix: nil)
2244
+ @reference_prefix = reference_prefix
2245
+ end
2246
+ end
2247
+ # Additional fields for Mandate creation
2248
+ attr_accessor :mandate_options
2249
+
2250
+ def initialize(mandate_options: nil)
2251
+ @mandate_options = mandate_options
2252
+ end
2253
+ end
2254
+
2255
+ class UsBankAccount < Stripe::RequestParams
2256
+ class FinancialConnections < Stripe::RequestParams
2257
+ class Filters < Stripe::RequestParams
2258
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
2259
+ attr_accessor :account_subcategories
2260
+
2261
+ def initialize(account_subcategories: nil)
2262
+ @account_subcategories = account_subcategories
2263
+ end
2264
+ end
2265
+ # Provide filters for the linked accounts that the customer can select for the payment method.
2266
+ attr_accessor :filters
2267
+ # 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`.
2268
+ attr_accessor :permissions
2269
+ # List of data features that you would like to retrieve upon account creation.
2270
+ attr_accessor :prefetch
2271
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
2272
+ attr_accessor :return_url
2273
+
2274
+ def initialize(filters: nil, permissions: nil, prefetch: nil, return_url: nil)
2275
+ @filters = filters
2276
+ @permissions = permissions
2277
+ @prefetch = prefetch
2278
+ @return_url = return_url
2279
+ end
2280
+ end
2281
+
2282
+ class MandateOptions < Stripe::RequestParams
2283
+ # The method used to collect offline mandate customer acceptance.
2284
+ attr_accessor :collection_method
2285
+
2286
+ def initialize(collection_method: nil)
2287
+ @collection_method = collection_method
2288
+ end
2289
+ end
2290
+
2291
+ class Networks < Stripe::RequestParams
2292
+ # Triggers validations to run across the selected networks
2293
+ attr_accessor :requested
2294
+
2295
+ def initialize(requested: nil)
2296
+ @requested = requested
2297
+ end
2298
+ end
2299
+ # Additional fields for Financial Connections Session creation
2300
+ attr_accessor :financial_connections
2301
+ # Additional fields for Mandate creation
2302
+ attr_accessor :mandate_options
2303
+ # Additional fields for network related functions
2304
+ attr_accessor :networks
2305
+ # Bank account verification method.
2306
+ attr_accessor :verification_method
2307
+
2308
+ def initialize(
2309
+ financial_connections: nil,
2310
+ mandate_options: nil,
2311
+ networks: nil,
2312
+ verification_method: nil
2313
+ )
2314
+ @financial_connections = financial_connections
2315
+ @mandate_options = mandate_options
2316
+ @networks = networks
2317
+ @verification_method = verification_method
2318
+ end
2319
+ end
2320
+ # If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options.
2321
+ attr_accessor :acss_debit
2322
+ # If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options.
2323
+ attr_accessor :amazon_pay
2324
+ # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options.
2325
+ attr_accessor :bacs_debit
2326
+ # Configuration for any card setup attempted on this SetupIntent.
2327
+ attr_accessor :card
2328
+ # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options.
2329
+ attr_accessor :card_present
2330
+ # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
2331
+ attr_accessor :link
2332
+ # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
2333
+ attr_accessor :paypal
2334
+ # If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
2335
+ attr_accessor :sepa_debit
2336
+ # If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options.
2337
+ attr_accessor :us_bank_account
2338
+
2339
+ def initialize(
2340
+ acss_debit: nil,
2341
+ amazon_pay: nil,
2342
+ bacs_debit: nil,
2343
+ card: nil,
2344
+ card_present: nil,
2345
+ link: nil,
2346
+ paypal: nil,
2347
+ sepa_debit: nil,
2348
+ us_bank_account: nil
2349
+ )
2350
+ @acss_debit = acss_debit
2351
+ @amazon_pay = amazon_pay
2352
+ @bacs_debit = bacs_debit
2353
+ @card = card
2354
+ @card_present = card_present
2355
+ @link = link
2356
+ @paypal = paypal
2357
+ @sepa_debit = sepa_debit
2358
+ @us_bank_account = us_bank_account
2359
+ end
2360
+ end
2361
+ # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
2362
+ #
2363
+ # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
2364
+ attr_accessor :attach_to_self
2365
+ # ID of the Customer this SetupIntent belongs to, if one exists.
2366
+ #
2367
+ # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.
2368
+ attr_accessor :customer
2369
+ # An arbitrary string attached to the object. Often useful for displaying to users.
2370
+ attr_accessor :description
2371
+ # Specifies which fields in the response should be expanded.
2372
+ attr_accessor :expand
2373
+ # Indicates the directions of money movement for which this payment method is intended to be used.
2374
+ #
2375
+ # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
2376
+ attr_accessor :flow_directions
2377
+ # 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`.
2378
+ attr_accessor :metadata
2379
+ # ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. To unset this field to null, pass in an empty string.
2380
+ attr_accessor :payment_method
2381
+ # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent.
2382
+ attr_accessor :payment_method_configuration
2383
+ # When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)
2384
+ # value in the SetupIntent.
2385
+ attr_accessor :payment_method_data
2386
+ # Payment method-specific configuration for this SetupIntent.
2387
+ attr_accessor :payment_method_options
2388
+ # The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
2389
+ attr_accessor :payment_method_types
2390
+
2391
+ def initialize(
2392
+ attach_to_self: nil,
2393
+ customer: nil,
2394
+ description: nil,
2395
+ expand: nil,
2396
+ flow_directions: nil,
2397
+ metadata: nil,
2398
+ payment_method: nil,
2399
+ payment_method_configuration: nil,
2400
+ payment_method_data: nil,
2401
+ payment_method_options: nil,
2402
+ payment_method_types: nil
2403
+ )
2404
+ @attach_to_self = attach_to_self
2405
+ @customer = customer
2406
+ @description = description
2407
+ @expand = expand
2408
+ @flow_directions = flow_directions
2409
+ @metadata = metadata
2410
+ @payment_method = payment_method
2411
+ @payment_method_configuration = payment_method_configuration
2412
+ @payment_method_data = payment_method_data
2413
+ @payment_method_options = payment_method_options
2414
+ @payment_method_types = payment_method_types
2415
+ end
2416
+ end
2417
+
2418
+ class CancelParams < Stripe::RequestParams
2419
+ # Reason for canceling this SetupIntent. Possible values are: `abandoned`, `requested_by_customer`, or `duplicate`
2420
+ attr_accessor :cancellation_reason
2421
+ # Specifies which fields in the response should be expanded.
2422
+ attr_accessor :expand
2423
+
2424
+ def initialize(cancellation_reason: nil, expand: nil)
2425
+ @cancellation_reason = cancellation_reason
2426
+ @expand = expand
2427
+ end
2428
+ end
2429
+
2430
+ class ConfirmParams < Stripe::RequestParams
2431
+ class MandateData < Stripe::RequestParams
2432
+ class CustomerAcceptance < Stripe::RequestParams
2433
+ class Offline < Stripe::RequestParams
2434
+ end
2435
+
2436
+ class Online < Stripe::RequestParams
2437
+ # The IP address from which the Mandate was accepted by the customer.
2438
+ attr_accessor :ip_address
2439
+ # The user agent of the browser from which the Mandate was accepted by the customer.
2440
+ attr_accessor :user_agent
2441
+
2442
+ def initialize(ip_address: nil, user_agent: nil)
2443
+ @ip_address = ip_address
2444
+ @user_agent = user_agent
2445
+ end
2446
+ end
2447
+ # The time at which the customer accepted the Mandate.
2448
+ attr_accessor :accepted_at
2449
+ # If this is a Mandate accepted offline, this hash contains details about the offline acceptance.
2450
+ attr_accessor :offline
2451
+ # If this is a Mandate accepted online, this hash contains details about the online acceptance.
2452
+ attr_accessor :online
2453
+ # The type of customer acceptance information included with the Mandate. One of `online` or `offline`.
2454
+ attr_accessor :type
2455
+
2456
+ def initialize(accepted_at: nil, offline: nil, online: nil, type: nil)
2457
+ @accepted_at = accepted_at
2458
+ @offline = offline
2459
+ @online = online
2460
+ @type = type
2461
+ end
2462
+ end
2463
+ # This hash contains details about the customer acceptance of the Mandate.
2464
+ attr_accessor :customer_acceptance
2465
+
2466
+ def initialize(customer_acceptance: nil)
2467
+ @customer_acceptance = customer_acceptance
2468
+ end
2469
+ end
2470
+
2471
+ class PaymentMethodData < Stripe::RequestParams
2472
+ class AcssDebit < Stripe::RequestParams
2473
+ # Customer's bank account number.
2474
+ attr_accessor :account_number
2475
+ # Institution number of the customer's bank.
2476
+ attr_accessor :institution_number
2477
+ # Transit number of the customer's bank.
2478
+ attr_accessor :transit_number
2479
+
2480
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil)
2481
+ @account_number = account_number
2482
+ @institution_number = institution_number
2483
+ @transit_number = transit_number
2484
+ end
2485
+ end
2486
+
2487
+ class Affirm < Stripe::RequestParams
2488
+ end
2489
+
2490
+ class AfterpayClearpay < Stripe::RequestParams
2491
+ end
2492
+
2493
+ class Alipay < Stripe::RequestParams
2494
+ end
2495
+
2496
+ class Alma < Stripe::RequestParams
2497
+ end
2498
+
2499
+ class AmazonPay < Stripe::RequestParams
2500
+ end
2501
+
2502
+ class AuBecsDebit < Stripe::RequestParams
2503
+ # The account number for the bank account.
2504
+ attr_accessor :account_number
2505
+ # Bank-State-Branch number of the bank account.
2506
+ attr_accessor :bsb_number
2507
+
2508
+ def initialize(account_number: nil, bsb_number: nil)
2509
+ @account_number = account_number
2510
+ @bsb_number = bsb_number
2511
+ end
2512
+ end
2513
+
2514
+ class BacsDebit < Stripe::RequestParams
2515
+ # Account number of the bank account that the funds will be debited from.
2516
+ attr_accessor :account_number
2517
+ # Sort code of the bank account. (e.g., `10-20-30`)
2518
+ attr_accessor :sort_code
2519
+
2520
+ def initialize(account_number: nil, sort_code: nil)
2521
+ @account_number = account_number
2522
+ @sort_code = sort_code
2523
+ end
2524
+ end
2525
+
2526
+ class Bancontact < Stripe::RequestParams
2527
+ end
2528
+
2529
+ class Billie < Stripe::RequestParams
2530
+ end
2531
+
2532
+ class BillingDetails < Stripe::RequestParams
2533
+ class Address < Stripe::RequestParams
2534
+ # City, district, suburb, town, or village.
2535
+ attr_accessor :city
2536
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
2537
+ attr_accessor :country
2538
+ # Address line 1 (e.g., street, PO Box, or company name).
2539
+ attr_accessor :line1
2540
+ # Address line 2 (e.g., apartment, suite, unit, or building).
2541
+ attr_accessor :line2
2542
+ # ZIP or postal code.
2543
+ attr_accessor :postal_code
2544
+ # State, county, province, or region.
2545
+ attr_accessor :state
2546
+
2547
+ def initialize(
2548
+ city: nil,
2549
+ country: nil,
2550
+ line1: nil,
2551
+ line2: nil,
2552
+ postal_code: nil,
2553
+ state: nil
2554
+ )
2555
+ @city = city
2556
+ @country = country
2557
+ @line1 = line1
2558
+ @line2 = line2
2559
+ @postal_code = postal_code
2560
+ @state = state
2561
+ end
2562
+ end
2563
+ # Billing address.
2564
+ attr_accessor :address
2565
+ # Email address.
2566
+ attr_accessor :email
2567
+ # Full name.
2568
+ attr_accessor :name
2569
+ # Billing phone number (including extension).
2570
+ attr_accessor :phone
2571
+
2572
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
2573
+ @address = address
2574
+ @email = email
2575
+ @name = name
2576
+ @phone = phone
2577
+ end
2578
+ end
2579
+
2580
+ class Blik < Stripe::RequestParams
2581
+ end
2582
+
2583
+ class Boleto < Stripe::RequestParams
2584
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
2585
+ attr_accessor :tax_id
2586
+
2587
+ def initialize(tax_id: nil)
2588
+ @tax_id = tax_id
2589
+ end
2590
+ end
2591
+
2592
+ class Cashapp < Stripe::RequestParams
2593
+ end
2594
+
2595
+ class CustomerBalance < Stripe::RequestParams
2596
+ end
2597
+
2598
+ class Eps < Stripe::RequestParams
2599
+ # The customer's bank.
2600
+ attr_accessor :bank
2601
+
2602
+ def initialize(bank: nil)
2603
+ @bank = bank
2604
+ end
2605
+ end
2606
+
2607
+ class Fpx < Stripe::RequestParams
2608
+ # Account holder type for FPX transaction
2609
+ attr_accessor :account_holder_type
2610
+ # The customer's bank.
2611
+ attr_accessor :bank
2612
+
2613
+ def initialize(account_holder_type: nil, bank: nil)
2614
+ @account_holder_type = account_holder_type
2615
+ @bank = bank
2616
+ end
2617
+ end
2618
+
2619
+ class Giropay < Stripe::RequestParams
2620
+ end
2621
+
2622
+ class Grabpay < Stripe::RequestParams
2623
+ end
2624
+
2625
+ class Ideal < Stripe::RequestParams
2626
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
2627
+ attr_accessor :bank
2628
+
2629
+ def initialize(bank: nil)
2630
+ @bank = bank
2631
+ end
2632
+ end
2633
+
2634
+ class InteracPresent < Stripe::RequestParams
2635
+ end
2636
+
2637
+ class KakaoPay < Stripe::RequestParams
2638
+ end
2639
+
2640
+ class Klarna < Stripe::RequestParams
2641
+ class Dob < Stripe::RequestParams
2642
+ # The day of birth, between 1 and 31.
2643
+ attr_accessor :day
2644
+ # The month of birth, between 1 and 12.
2645
+ attr_accessor :month
2646
+ # The four-digit year of birth.
2647
+ attr_accessor :year
2648
+
2649
+ def initialize(day: nil, month: nil, year: nil)
2650
+ @day = day
2651
+ @month = month
2652
+ @year = year
2653
+ end
2654
+ end
2655
+ # Customer's date of birth
2656
+ attr_accessor :dob
2657
+
2658
+ def initialize(dob: nil)
2659
+ @dob = dob
2660
+ end
2661
+ end
2662
+
2663
+ class Konbini < Stripe::RequestParams
2664
+ end
2665
+
2666
+ class KrCard < Stripe::RequestParams
2667
+ end
2668
+
2669
+ class Link < Stripe::RequestParams
2670
+ end
2671
+
2672
+ class Mobilepay < Stripe::RequestParams
2673
+ end
2674
+
2675
+ class Multibanco < Stripe::RequestParams
2676
+ end
2677
+
2678
+ class NaverPay < Stripe::RequestParams
2679
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
2680
+ attr_accessor :funding
2681
+
2682
+ def initialize(funding: nil)
2683
+ @funding = funding
2684
+ end
2685
+ end
2686
+
2687
+ class NzBankAccount < Stripe::RequestParams
2688
+ # The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
2689
+ attr_accessor :account_holder_name
2690
+ # The account number for the bank account.
2691
+ attr_accessor :account_number
2692
+ # The numeric code for the bank account's bank.
2693
+ attr_accessor :bank_code
2694
+ # The numeric code for the bank account's bank branch.
2695
+ attr_accessor :branch_code
2696
+ # Attribute for param field reference
2697
+ attr_accessor :reference
2698
+ # The suffix of the bank account number.
2699
+ attr_accessor :suffix
2700
+
2701
+ def initialize(
2702
+ account_holder_name: nil,
2703
+ account_number: nil,
2704
+ bank_code: nil,
2705
+ branch_code: nil,
2706
+ reference: nil,
2707
+ suffix: nil
2708
+ )
2709
+ @account_holder_name = account_holder_name
2710
+ @account_number = account_number
2711
+ @bank_code = bank_code
2712
+ @branch_code = branch_code
2713
+ @reference = reference
2714
+ @suffix = suffix
2715
+ end
2716
+ end
2717
+
2718
+ class Oxxo < Stripe::RequestParams
2719
+ end
2720
+
2721
+ class P24 < Stripe::RequestParams
2722
+ # The customer's bank.
2723
+ attr_accessor :bank
2724
+
2725
+ def initialize(bank: nil)
2726
+ @bank = bank
2727
+ end
2728
+ end
2729
+
2730
+ class PayByBank < Stripe::RequestParams
2731
+ end
2732
+
2733
+ class Payco < Stripe::RequestParams
2734
+ end
2735
+
2736
+ class Paynow < Stripe::RequestParams
2737
+ end
2738
+
2739
+ class Paypal < Stripe::RequestParams
2740
+ end
2741
+
2742
+ class Pix < Stripe::RequestParams
2743
+ end
2744
+
2745
+ class Promptpay < Stripe::RequestParams
2746
+ end
2747
+
2748
+ class RadarOptions < Stripe::RequestParams
2749
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
2750
+ attr_accessor :session
2751
+
2752
+ def initialize(session: nil)
2753
+ @session = session
2754
+ end
2755
+ end
2756
+
2757
+ class RevolutPay < Stripe::RequestParams
2758
+ end
2759
+
2760
+ class SamsungPay < Stripe::RequestParams
2761
+ end
2762
+
2763
+ class Satispay < Stripe::RequestParams
2764
+ end
2765
+
2766
+ class SepaDebit < Stripe::RequestParams
2767
+ # IBAN of the bank account.
2768
+ attr_accessor :iban
2769
+
2770
+ def initialize(iban: nil)
2771
+ @iban = iban
2772
+ end
2773
+ end
2774
+
2775
+ class Sofort < Stripe::RequestParams
2776
+ # Two-letter ISO code representing the country the bank account is located in.
2777
+ attr_accessor :country
2778
+
2779
+ def initialize(country: nil)
2780
+ @country = country
2781
+ end
2782
+ end
2783
+
2784
+ class Swish < Stripe::RequestParams
2785
+ end
2786
+
2787
+ class Twint < Stripe::RequestParams
2788
+ end
2789
+
2790
+ class UsBankAccount < Stripe::RequestParams
2791
+ # Account holder type: individual or company.
2792
+ attr_accessor :account_holder_type
2793
+ # Account number of the bank account.
2794
+ attr_accessor :account_number
2795
+ # Account type: checkings or savings. Defaults to checking if omitted.
2796
+ attr_accessor :account_type
2797
+ # The ID of a Financial Connections Account to use as a payment method.
2798
+ attr_accessor :financial_connections_account
2799
+ # Routing number of the bank account.
2800
+ attr_accessor :routing_number
2801
+
2802
+ def initialize(
2803
+ account_holder_type: nil,
2804
+ account_number: nil,
2805
+ account_type: nil,
2806
+ financial_connections_account: nil,
2807
+ routing_number: nil
2808
+ )
2809
+ @account_holder_type = account_holder_type
2810
+ @account_number = account_number
2811
+ @account_type = account_type
2812
+ @financial_connections_account = financial_connections_account
2813
+ @routing_number = routing_number
2814
+ end
2815
+ end
2816
+
2817
+ class WechatPay < Stripe::RequestParams
2818
+ end
2819
+
2820
+ class Zip < Stripe::RequestParams
2821
+ end
2822
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
2823
+ attr_accessor :acss_debit
2824
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
2825
+ attr_accessor :affirm
2826
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
2827
+ attr_accessor :afterpay_clearpay
2828
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
2829
+ attr_accessor :alipay
2830
+ # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`.
2831
+ attr_accessor :allow_redisplay
2832
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
2833
+ attr_accessor :alma
2834
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
2835
+ attr_accessor :amazon_pay
2836
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
2837
+ attr_accessor :au_becs_debit
2838
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
2839
+ attr_accessor :bacs_debit
2840
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
2841
+ attr_accessor :bancontact
2842
+ # If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
2843
+ attr_accessor :billie
2844
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
2845
+ attr_accessor :billing_details
2846
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
2847
+ attr_accessor :blik
2848
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
2849
+ attr_accessor :boleto
2850
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
2851
+ attr_accessor :cashapp
2852
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
2853
+ attr_accessor :customer_balance
2854
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
2855
+ attr_accessor :eps
2856
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
2857
+ attr_accessor :fpx
2858
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
2859
+ attr_accessor :giropay
2860
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
2861
+ attr_accessor :grabpay
2862
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
2863
+ attr_accessor :ideal
2864
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
2865
+ attr_accessor :interac_present
2866
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
2867
+ attr_accessor :kakao_pay
2868
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
2869
+ attr_accessor :klarna
2870
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
2871
+ attr_accessor :konbini
2872
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
2873
+ attr_accessor :kr_card
2874
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
2875
+ attr_accessor :link
2876
+ # 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`.
2877
+ attr_accessor :metadata
2878
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
2879
+ attr_accessor :mobilepay
2880
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
2881
+ attr_accessor :multibanco
2882
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
2883
+ attr_accessor :naver_pay
2884
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
2885
+ attr_accessor :nz_bank_account
2886
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
2887
+ attr_accessor :oxxo
2888
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
2889
+ attr_accessor :p24
2890
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
2891
+ attr_accessor :pay_by_bank
2892
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
2893
+ attr_accessor :payco
2894
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
2895
+ attr_accessor :paynow
2896
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
2897
+ attr_accessor :paypal
2898
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
2899
+ attr_accessor :pix
2900
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
2901
+ attr_accessor :promptpay
2902
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
2903
+ attr_accessor :radar_options
2904
+ # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
2905
+ attr_accessor :revolut_pay
2906
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
2907
+ attr_accessor :samsung_pay
2908
+ # If this is a `satispay` PaymentMethod, this hash contains details about the satispay payment method.
2909
+ attr_accessor :satispay
2910
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
2911
+ attr_accessor :sepa_debit
2912
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
2913
+ attr_accessor :sofort
2914
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
2915
+ attr_accessor :swish
2916
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
2917
+ attr_accessor :twint
2918
+ # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
2919
+ attr_accessor :type
2920
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
2921
+ attr_accessor :us_bank_account
2922
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
2923
+ attr_accessor :wechat_pay
2924
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
2925
+ attr_accessor :zip
2926
+
2927
+ def initialize(
2928
+ acss_debit: nil,
2929
+ affirm: nil,
2930
+ afterpay_clearpay: nil,
2931
+ alipay: nil,
2932
+ allow_redisplay: nil,
2933
+ alma: nil,
2934
+ amazon_pay: nil,
2935
+ au_becs_debit: nil,
2936
+ bacs_debit: nil,
2937
+ bancontact: nil,
2938
+ billie: nil,
2939
+ billing_details: nil,
2940
+ blik: nil,
2941
+ boleto: nil,
2942
+ cashapp: nil,
2943
+ customer_balance: nil,
2944
+ eps: nil,
2945
+ fpx: nil,
2946
+ giropay: nil,
2947
+ grabpay: nil,
2948
+ ideal: nil,
2949
+ interac_present: nil,
2950
+ kakao_pay: nil,
2951
+ klarna: nil,
2952
+ konbini: nil,
2953
+ kr_card: nil,
2954
+ link: nil,
2955
+ metadata: nil,
2956
+ mobilepay: nil,
2957
+ multibanco: nil,
2958
+ naver_pay: nil,
2959
+ nz_bank_account: nil,
2960
+ oxxo: nil,
2961
+ p24: nil,
2962
+ pay_by_bank: nil,
2963
+ payco: nil,
2964
+ paynow: nil,
2965
+ paypal: nil,
2966
+ pix: nil,
2967
+ promptpay: nil,
2968
+ radar_options: nil,
2969
+ revolut_pay: nil,
2970
+ samsung_pay: nil,
2971
+ satispay: nil,
2972
+ sepa_debit: nil,
2973
+ sofort: nil,
2974
+ swish: nil,
2975
+ twint: nil,
2976
+ type: nil,
2977
+ us_bank_account: nil,
2978
+ wechat_pay: nil,
2979
+ zip: nil
2980
+ )
2981
+ @acss_debit = acss_debit
2982
+ @affirm = affirm
2983
+ @afterpay_clearpay = afterpay_clearpay
2984
+ @alipay = alipay
2985
+ @allow_redisplay = allow_redisplay
2986
+ @alma = alma
2987
+ @amazon_pay = amazon_pay
2988
+ @au_becs_debit = au_becs_debit
2989
+ @bacs_debit = bacs_debit
2990
+ @bancontact = bancontact
2991
+ @billie = billie
2992
+ @billing_details = billing_details
2993
+ @blik = blik
2994
+ @boleto = boleto
2995
+ @cashapp = cashapp
2996
+ @customer_balance = customer_balance
2997
+ @eps = eps
2998
+ @fpx = fpx
2999
+ @giropay = giropay
3000
+ @grabpay = grabpay
3001
+ @ideal = ideal
3002
+ @interac_present = interac_present
3003
+ @kakao_pay = kakao_pay
3004
+ @klarna = klarna
3005
+ @konbini = konbini
3006
+ @kr_card = kr_card
3007
+ @link = link
3008
+ @metadata = metadata
3009
+ @mobilepay = mobilepay
3010
+ @multibanco = multibanco
3011
+ @naver_pay = naver_pay
3012
+ @nz_bank_account = nz_bank_account
3013
+ @oxxo = oxxo
3014
+ @p24 = p24
3015
+ @pay_by_bank = pay_by_bank
3016
+ @payco = payco
3017
+ @paynow = paynow
3018
+ @paypal = paypal
3019
+ @pix = pix
3020
+ @promptpay = promptpay
3021
+ @radar_options = radar_options
3022
+ @revolut_pay = revolut_pay
3023
+ @samsung_pay = samsung_pay
3024
+ @satispay = satispay
3025
+ @sepa_debit = sepa_debit
3026
+ @sofort = sofort
3027
+ @swish = swish
3028
+ @twint = twint
3029
+ @type = type
3030
+ @us_bank_account = us_bank_account
3031
+ @wechat_pay = wechat_pay
3032
+ @zip = zip
3033
+ end
3034
+ end
3035
+
3036
+ class PaymentMethodOptions < Stripe::RequestParams
3037
+ class AcssDebit < Stripe::RequestParams
3038
+ class MandateOptions < Stripe::RequestParams
3039
+ # A URL for custom mandate text to render during confirmation step.
3040
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
3041
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
3042
+ attr_accessor :custom_mandate_url
3043
+ # List of Stripe products where this mandate can be selected automatically.
3044
+ attr_accessor :default_for
3045
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
3046
+ attr_accessor :interval_description
3047
+ # Payment schedule for the mandate.
3048
+ attr_accessor :payment_schedule
3049
+ # Transaction type of the mandate.
3050
+ attr_accessor :transaction_type
3051
+
3052
+ def initialize(
3053
+ custom_mandate_url: nil,
3054
+ default_for: nil,
3055
+ interval_description: nil,
3056
+ payment_schedule: nil,
3057
+ transaction_type: nil
3058
+ )
3059
+ @custom_mandate_url = custom_mandate_url
3060
+ @default_for = default_for
3061
+ @interval_description = interval_description
3062
+ @payment_schedule = payment_schedule
3063
+ @transaction_type = transaction_type
3064
+ end
3065
+ end
3066
+ # 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).
3067
+ attr_accessor :currency
3068
+ # Additional fields for Mandate creation
3069
+ attr_accessor :mandate_options
3070
+ # Bank account verification method.
3071
+ attr_accessor :verification_method
3072
+
3073
+ def initialize(currency: nil, mandate_options: nil, verification_method: nil)
3074
+ @currency = currency
3075
+ @mandate_options = mandate_options
3076
+ @verification_method = verification_method
3077
+ end
3078
+ end
3079
+
3080
+ class AmazonPay < Stripe::RequestParams
3081
+ end
3082
+
3083
+ class BacsDebit < Stripe::RequestParams
3084
+ class MandateOptions < Stripe::RequestParams
3085
+ # 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'.
3086
+ attr_accessor :reference_prefix
3087
+
3088
+ def initialize(reference_prefix: nil)
3089
+ @reference_prefix = reference_prefix
3090
+ end
3091
+ end
3092
+ # Additional fields for Mandate creation
3093
+ attr_accessor :mandate_options
3094
+
3095
+ def initialize(mandate_options: nil)
3096
+ @mandate_options = mandate_options
3097
+ end
3098
+ end
3099
+
3100
+ class Card < Stripe::RequestParams
3101
+ class MandateOptions < Stripe::RequestParams
3102
+ # Amount to be charged for future payments.
3103
+ attr_accessor :amount
3104
+ # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
3105
+ attr_accessor :amount_type
3106
+ # Currency in which future payments will be charged. 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).
3107
+ attr_accessor :currency
3108
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
3109
+ attr_accessor :description
3110
+ # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
3111
+ attr_accessor :end_date
3112
+ # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
3113
+ attr_accessor :interval
3114
+ # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
3115
+ attr_accessor :interval_count
3116
+ # Unique identifier for the mandate or subscription.
3117
+ attr_accessor :reference
3118
+ # Start date of the mandate or subscription. Start date should not be lesser than yesterday.
3119
+ attr_accessor :start_date
3120
+ # Specifies the type of mandates supported. Possible values are `india`.
3121
+ attr_accessor :supported_types
3122
+
3123
+ def initialize(
3124
+ amount: nil,
3125
+ amount_type: nil,
3126
+ currency: nil,
3127
+ description: nil,
3128
+ end_date: nil,
3129
+ interval: nil,
3130
+ interval_count: nil,
3131
+ reference: nil,
3132
+ start_date: nil,
3133
+ supported_types: nil
3134
+ )
3135
+ @amount = amount
3136
+ @amount_type = amount_type
3137
+ @currency = currency
3138
+ @description = description
3139
+ @end_date = end_date
3140
+ @interval = interval
3141
+ @interval_count = interval_count
3142
+ @reference = reference
3143
+ @start_date = start_date
3144
+ @supported_types = supported_types
3145
+ end
3146
+ end
3147
+
3148
+ class ThreeDSecure < Stripe::RequestParams
3149
+ class NetworkOptions < Stripe::RequestParams
3150
+ class CartesBancaires < Stripe::RequestParams
3151
+ # The cryptogram calculation algorithm used by the card Issuer's ACS
3152
+ # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
3153
+ # messageExtension: CB-AVALGO
3154
+ attr_accessor :cb_avalgo
3155
+ # The exemption indicator returned from Cartes Bancaires in the ARes.
3156
+ # message extension: CB-EXEMPTION; string (4 characters)
3157
+ # This is a 3 byte bitmap (low significant byte first and most significant
3158
+ # bit first) that has been Base64 encoded
3159
+ attr_accessor :cb_exemption
3160
+ # The risk score returned from Cartes Bancaires in the ARes.
3161
+ # message extension: CB-SCORE; numeric value 0-99
3162
+ attr_accessor :cb_score
3163
+
3164
+ def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil)
3165
+ @cb_avalgo = cb_avalgo
3166
+ @cb_exemption = cb_exemption
3167
+ @cb_score = cb_score
3168
+ end
3169
+ end
3170
+ # Cartes Bancaires-specific 3DS fields.
3171
+ attr_accessor :cartes_bancaires
3172
+
3173
+ def initialize(cartes_bancaires: nil)
3174
+ @cartes_bancaires = cartes_bancaires
3175
+ end
3176
+ end
3177
+ # The `transStatus` returned from the card Issuer’s ACS in the ARes.
3178
+ attr_accessor :ares_trans_status
3179
+ # The cryptogram, also known as the "authentication value" (AAV, CAVV or
3180
+ # AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
3181
+ # (Most 3D Secure providers will return the base64-encoded version, which
3182
+ # is what you should specify here.)
3183
+ attr_accessor :cryptogram
3184
+ # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
3185
+ # provider and indicates what degree of authentication was performed.
3186
+ attr_accessor :electronic_commerce_indicator
3187
+ # Network specific 3DS fields. Network specific arguments require an
3188
+ # explicit card brand choice. The parameter `payment_method_options.card.network``
3189
+ # must be populated accordingly
3190
+ attr_accessor :network_options
3191
+ # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
3192
+ # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
3193
+ attr_accessor :requestor_challenge_indicator
3194
+ # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
3195
+ # Transaction ID (dsTransID).
3196
+ attr_accessor :transaction_id
3197
+ # The version of 3D Secure that was performed.
3198
+ attr_accessor :version
3199
+
3200
+ def initialize(
3201
+ ares_trans_status: nil,
3202
+ cryptogram: nil,
3203
+ electronic_commerce_indicator: nil,
3204
+ network_options: nil,
3205
+ requestor_challenge_indicator: nil,
3206
+ transaction_id: nil,
3207
+ version: nil
3208
+ )
3209
+ @ares_trans_status = ares_trans_status
3210
+ @cryptogram = cryptogram
3211
+ @electronic_commerce_indicator = electronic_commerce_indicator
3212
+ @network_options = network_options
3213
+ @requestor_challenge_indicator = requestor_challenge_indicator
3214
+ @transaction_id = transaction_id
3215
+ @version = version
3216
+ end
3217
+ end
3218
+ # Configuration options for setting up an eMandate for cards issued in India.
3219
+ attr_accessor :mandate_options
3220
+ # When specified, this parameter signals that a card has been collected
3221
+ # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
3222
+ # parameter can only be provided during confirmation.
3223
+ attr_accessor :moto
3224
+ # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time.
3225
+ attr_accessor :network
3226
+ # 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.
3227
+ attr_accessor :request_three_d_secure
3228
+ # If 3D Secure authentication was performed with a third-party provider,
3229
+ # the authentication details to use for this setup.
3230
+ attr_accessor :three_d_secure
3231
+
3232
+ def initialize(
3233
+ mandate_options: nil,
3234
+ moto: nil,
3235
+ network: nil,
3236
+ request_three_d_secure: nil,
3237
+ three_d_secure: nil
3238
+ )
3239
+ @mandate_options = mandate_options
3240
+ @moto = moto
3241
+ @network = network
3242
+ @request_three_d_secure = request_three_d_secure
3243
+ @three_d_secure = three_d_secure
3244
+ end
3245
+ end
3246
+
3247
+ class CardPresent < Stripe::RequestParams
3248
+ end
3249
+
3250
+ class Link < Stripe::RequestParams
3251
+ # [Deprecated] This is a legacy parameter that no longer has any function.
3252
+ attr_accessor :persistent_token
3253
+
3254
+ def initialize(persistent_token: nil)
3255
+ @persistent_token = persistent_token
3256
+ end
3257
+ end
3258
+
3259
+ class Paypal < Stripe::RequestParams
3260
+ # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer.
3261
+ attr_accessor :billing_agreement_id
3262
+
3263
+ def initialize(billing_agreement_id: nil)
3264
+ @billing_agreement_id = billing_agreement_id
3265
+ end
3266
+ end
3267
+
3268
+ class SepaDebit < Stripe::RequestParams
3269
+ class MandateOptions < Stripe::RequestParams
3270
+ # 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'.
3271
+ attr_accessor :reference_prefix
3272
+
3273
+ def initialize(reference_prefix: nil)
3274
+ @reference_prefix = reference_prefix
3275
+ end
3276
+ end
3277
+ # Additional fields for Mandate creation
3278
+ attr_accessor :mandate_options
3279
+
3280
+ def initialize(mandate_options: nil)
3281
+ @mandate_options = mandate_options
3282
+ end
3283
+ end
3284
+
3285
+ class UsBankAccount < Stripe::RequestParams
3286
+ class FinancialConnections < Stripe::RequestParams
3287
+ class Filters < Stripe::RequestParams
3288
+ # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
3289
+ attr_accessor :account_subcategories
3290
+
3291
+ def initialize(account_subcategories: nil)
3292
+ @account_subcategories = account_subcategories
3293
+ end
3294
+ end
3295
+ # Provide filters for the linked accounts that the customer can select for the payment method.
3296
+ attr_accessor :filters
3297
+ # 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`.
3298
+ attr_accessor :permissions
3299
+ # List of data features that you would like to retrieve upon account creation.
3300
+ attr_accessor :prefetch
3301
+ # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
3302
+ attr_accessor :return_url
3303
+
3304
+ def initialize(filters: nil, permissions: nil, prefetch: nil, return_url: nil)
3305
+ @filters = filters
3306
+ @permissions = permissions
3307
+ @prefetch = prefetch
3308
+ @return_url = return_url
3309
+ end
3310
+ end
3311
+
3312
+ class MandateOptions < Stripe::RequestParams
3313
+ # The method used to collect offline mandate customer acceptance.
3314
+ attr_accessor :collection_method
3315
+
3316
+ def initialize(collection_method: nil)
3317
+ @collection_method = collection_method
3318
+ end
3319
+ end
3320
+
3321
+ class Networks < Stripe::RequestParams
3322
+ # Triggers validations to run across the selected networks
3323
+ attr_accessor :requested
3324
+
3325
+ def initialize(requested: nil)
3326
+ @requested = requested
3327
+ end
3328
+ end
3329
+ # Additional fields for Financial Connections Session creation
3330
+ attr_accessor :financial_connections
3331
+ # Additional fields for Mandate creation
3332
+ attr_accessor :mandate_options
3333
+ # Additional fields for network related functions
3334
+ attr_accessor :networks
3335
+ # Bank account verification method.
3336
+ attr_accessor :verification_method
3337
+
3338
+ def initialize(
3339
+ financial_connections: nil,
3340
+ mandate_options: nil,
3341
+ networks: nil,
3342
+ verification_method: nil
3343
+ )
3344
+ @financial_connections = financial_connections
3345
+ @mandate_options = mandate_options
3346
+ @networks = networks
3347
+ @verification_method = verification_method
3348
+ end
3349
+ end
3350
+ # If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options.
3351
+ attr_accessor :acss_debit
3352
+ # If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options.
3353
+ attr_accessor :amazon_pay
3354
+ # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options.
3355
+ attr_accessor :bacs_debit
3356
+ # Configuration for any card setup attempted on this SetupIntent.
3357
+ attr_accessor :card
3358
+ # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options.
3359
+ attr_accessor :card_present
3360
+ # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
3361
+ attr_accessor :link
3362
+ # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
3363
+ attr_accessor :paypal
3364
+ # If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
3365
+ attr_accessor :sepa_debit
3366
+ # If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options.
3367
+ attr_accessor :us_bank_account
3368
+
3369
+ def initialize(
3370
+ acss_debit: nil,
3371
+ amazon_pay: nil,
3372
+ bacs_debit: nil,
3373
+ card: nil,
3374
+ card_present: nil,
3375
+ link: nil,
3376
+ paypal: nil,
3377
+ sepa_debit: nil,
3378
+ us_bank_account: nil
3379
+ )
3380
+ @acss_debit = acss_debit
3381
+ @amazon_pay = amazon_pay
3382
+ @bacs_debit = bacs_debit
3383
+ @card = card
3384
+ @card_present = card_present
3385
+ @link = link
3386
+ @paypal = paypal
3387
+ @sepa_debit = sepa_debit
3388
+ @us_bank_account = us_bank_account
3389
+ end
3390
+ end
3391
+ # ID of the ConfirmationToken used to confirm this SetupIntent.
3392
+ #
3393
+ # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence.
3394
+ attr_accessor :confirmation_token
3395
+ # Specifies which fields in the response should be expanded.
3396
+ attr_accessor :expand
3397
+ # Attribute for param field mandate_data
3398
+ attr_accessor :mandate_data
3399
+ # ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.
3400
+ attr_accessor :payment_method
3401
+ # When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)
3402
+ # value in the SetupIntent.
3403
+ attr_accessor :payment_method_data
3404
+ # Payment method-specific configuration for this SetupIntent.
3405
+ attr_accessor :payment_method_options
3406
+ # The URL to redirect your customer back to after they authenticate on the payment method's app or site.
3407
+ # If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme.
3408
+ # This parameter is only used for cards and other redirect-based payment methods.
3409
+ attr_accessor :return_url
3410
+ # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.
3411
+ attr_accessor :use_stripe_sdk
3412
+
3413
+ def initialize(
3414
+ confirmation_token: nil,
3415
+ expand: nil,
3416
+ mandate_data: nil,
3417
+ payment_method: nil,
3418
+ payment_method_data: nil,
3419
+ payment_method_options: nil,
3420
+ return_url: nil,
3421
+ use_stripe_sdk: nil
3422
+ )
3423
+ @confirmation_token = confirmation_token
3424
+ @expand = expand
3425
+ @mandate_data = mandate_data
3426
+ @payment_method = payment_method
3427
+ @payment_method_data = payment_method_data
3428
+ @payment_method_options = payment_method_options
3429
+ @return_url = return_url
3430
+ @use_stripe_sdk = use_stripe_sdk
3431
+ end
3432
+ end
3433
+
3434
+ class VerifyMicrodepositsParams < Stripe::RequestParams
3435
+ # Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account.
3436
+ attr_accessor :amounts
3437
+ # A six-character code starting with SM present in the microdeposit sent to the bank account.
3438
+ attr_accessor :descriptor_code
3439
+ # Specifies which fields in the response should be expanded.
3440
+ attr_accessor :expand
3441
+
3442
+ def initialize(amounts: nil, descriptor_code: nil, expand: nil)
3443
+ @amounts = amounts
3444
+ @descriptor_code = descriptor_code
3445
+ @expand = expand
3446
+ end
3447
+ end
3448
+ # ID of the Connect application that created the SetupIntent.
3449
+ attr_reader :application
3450
+ # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
3451
+ #
3452
+ # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
3453
+ attr_reader :attach_to_self
3454
+ # Settings for dynamic payment methods compatible with this Setup Intent
3455
+ attr_reader :automatic_payment_methods
3456
+ # Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`.
3457
+ attr_reader :cancellation_reason
3458
+ # The client secret of this SetupIntent. Used for client-side retrieval using a publishable key.
3459
+ #
3460
+ # The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
3461
+ attr_reader :client_secret
3462
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
3463
+ attr_reader :created
3464
+ # ID of the Customer this SetupIntent belongs to, if one exists.
3465
+ #
3466
+ # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.
3467
+ attr_reader :customer
3468
+ # An arbitrary string attached to the object. Often useful for displaying to users.
3469
+ attr_reader :description
3470
+ # Indicates the directions of money movement for which this payment method is intended to be used.
3471
+ #
3472
+ # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
3473
+ attr_reader :flow_directions
3474
+ # Unique identifier for the object.
3475
+ attr_reader :id
3476
+ # The error encountered in the previous SetupIntent confirmation.
3477
+ attr_reader :last_setup_error
3478
+ # The most recent SetupAttempt for this SetupIntent.
3479
+ attr_reader :latest_attempt
3480
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
3481
+ attr_reader :livemode
3482
+ # ID of the multi use Mandate generated by the SetupIntent.
3483
+ attr_reader :mandate
3484
+ # 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.
3485
+ attr_reader :metadata
3486
+ # If present, this property tells you what actions you need to take in order for your customer to continue payment setup.
3487
+ attr_reader :next_action
3488
+ # String representing the object's type. Objects of the same type share the same value.
3489
+ attr_reader :object
3490
+ # The account (if any) for which the setup is intended.
3491
+ attr_reader :on_behalf_of
3492
+ # ID of the payment method used with this SetupIntent. If the payment method is `card_present` and isn't a digital wallet, then the [generated_card](https://docs.stripe.com/api/setup_attempts/object#setup_attempt_object-payment_method_details-card_present-generated_card) associated with the `latest_attempt` is attached to the Customer instead.
3493
+ attr_reader :payment_method
3494
+ # Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this Setup Intent.
3495
+ attr_reader :payment_method_configuration_details
3496
+ # Payment method-specific configuration for this SetupIntent.
3497
+ attr_reader :payment_method_options
3498
+ # The list of payment method types (e.g. card) that this SetupIntent is allowed to set up.
3499
+ attr_reader :payment_method_types
3500
+ # ID of the single_use Mandate generated by the SetupIntent.
3501
+ attr_reader :single_use_mandate
3502
+ # [Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`.
3503
+ attr_reader :status
3504
+ # Indicates how the payment method is intended to be used in the future.
3505
+ #
3506
+ # Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`.
3507
+ attr_reader :usage
3508
+
36
3509
  # You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.
37
3510
  #
38
3511
  # After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can't cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
@@ -112,15 +3585,15 @@ module Stripe
112
3585
  end
113
3586
 
114
3587
  # Returns a list of SetupIntents.
115
- def self.list(filters = {}, opts = {})
116
- request_stripe_object(method: :get, path: "/v1/setup_intents", params: filters, opts: opts)
3588
+ def self.list(params = {}, opts = {})
3589
+ request_stripe_object(method: :get, path: "/v1/setup_intents", params: params, opts: opts)
117
3590
  end
118
3591
 
119
3592
  # Updates a SetupIntent object.
120
- def self.update(id, params = {}, opts = {})
3593
+ def self.update(intent, params = {}, opts = {})
121
3594
  request_stripe_object(
122
3595
  method: :post,
123
- path: format("/v1/setup_intents/%<id>s", { id: CGI.escape(id) }),
3596
+ path: format("/v1/setup_intents/%<intent>s", { intent: CGI.escape(intent) }),
124
3597
  params: params,
125
3598
  opts: opts
126
3599
  )