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