stripe 5.38.0 → 15.2.1

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