stripe 5.38.0 → 15.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (708) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +742 -0
  3. data/CONTRIBUTING.md +25 -0
  4. data/Gemfile +12 -4
  5. data/Makefile +22 -0
  6. data/OPENAPI_VERSION +1 -0
  7. data/README.md +137 -27
  8. data/Rakefile +3 -6
  9. data/VERSION +1 -1
  10. data/examples/README.md +16 -0
  11. data/examples/example_template.rb +36 -0
  12. data/examples/meter_event_stream.rb +57 -0
  13. data/examples/thinevent_webhook_handler.rb +39 -0
  14. data/{bin → exe}/stripe-console +1 -1
  15. data/justfile +43 -0
  16. data/lib/data/ca-certificates.crt +1241 -1937
  17. data/lib/stripe/api_operations/create.rb +6 -2
  18. data/lib/stripe/api_operations/delete.rb +12 -7
  19. data/lib/stripe/api_operations/list.rb +6 -9
  20. data/lib/stripe/api_operations/nested_resource.rb +59 -31
  21. data/lib/stripe/api_operations/request.rb +30 -65
  22. data/lib/stripe/api_operations/save.rb +20 -10
  23. data/lib/stripe/api_operations/search.rb +21 -0
  24. data/lib/stripe/api_operations/singleton_save.rb +90 -0
  25. data/lib/stripe/api_requestor.rb +1136 -0
  26. data/lib/stripe/api_resource.rb +49 -34
  27. data/lib/stripe/api_resource_test_helpers.rb +53 -0
  28. data/lib/stripe/{resources/usage_record.rb → api_version.rb} +2 -2
  29. data/lib/stripe/connection_manager.rb +28 -11
  30. data/lib/stripe/errors.rb +11 -20
  31. data/lib/stripe/event_types.rb +15 -0
  32. data/lib/stripe/events/v1_billing_meter_error_report_triggered_event.rb +23 -0
  33. data/lib/stripe/events/v1_billing_meter_no_meter_found_event.rb +13 -0
  34. data/lib/stripe/events/v2_core_event_destination_ping_event.rb +21 -0
  35. data/lib/stripe/instrumentation.rb +37 -15
  36. data/lib/stripe/list_object.rb +5 -3
  37. data/lib/stripe/multipart_encoder.rb +7 -7
  38. data/lib/stripe/oauth.rb +14 -21
  39. data/lib/stripe/object_types.rb +157 -91
  40. data/lib/stripe/request_options.rb +129 -0
  41. data/lib/stripe/request_params.rb +24 -0
  42. data/lib/stripe/resources/account.rb +4854 -30
  43. data/lib/stripe/resources/account_link.rb +66 -0
  44. data/lib/stripe/resources/account_session.rb +868 -0
  45. data/lib/stripe/resources/alipay_account.rb +1 -1
  46. data/lib/stripe/resources/apple_pay_domain.rb +91 -0
  47. data/lib/stripe/resources/application.rb +20 -0
  48. data/lib/stripe/resources/application_fee.rb +96 -2
  49. data/lib/stripe/resources/application_fee_refund.rb +26 -2
  50. data/lib/stripe/resources/apps/secret.rb +196 -0
  51. data/lib/stripe/resources/balance.rb +178 -0
  52. data/lib/stripe/resources/balance_transaction.rb +124 -0
  53. data/lib/stripe/resources/bank_account.rb +137 -6
  54. data/lib/stripe/resources/billing/alert.rb +222 -0
  55. data/lib/stripe/resources/billing/alert_triggered.rb +26 -0
  56. data/lib/stripe/resources/billing/credit_balance_summary.rb +54 -0
  57. data/lib/stripe/resources/billing/credit_balance_transaction.rb +133 -0
  58. data/lib/stripe/resources/billing/credit_grant.rb +307 -0
  59. data/lib/stripe/resources/billing/meter.rb +254 -0
  60. data/lib/stripe/resources/billing/meter_event.rb +61 -0
  61. data/lib/stripe/resources/billing/meter_event_adjustment.rb +69 -0
  62. data/lib/stripe/resources/billing/meter_event_summary.rb +32 -0
  63. data/lib/stripe/resources/billing_portal/configuration.rb +587 -0
  64. data/lib/stripe/resources/billing_portal/session.rb +298 -0
  65. data/lib/stripe/resources/capability.rb +91 -2
  66. data/lib/stripe/resources/card.rb +111 -3
  67. data/lib/stripe/resources/cash_balance.rb +43 -0
  68. data/lib/stripe/resources/charge.rb +1682 -2
  69. data/lib/stripe/resources/checkout/session.rb +3666 -2
  70. data/lib/stripe/resources/climate/order.rb +234 -0
  71. data/lib/stripe/resources/climate/product.rb +74 -0
  72. data/lib/stripe/resources/climate/supplier.rb +71 -0
  73. data/lib/stripe/resources/confirmation_token.rb +1498 -0
  74. data/lib/stripe/resources/connect_collection_transfer.rb +24 -0
  75. data/lib/stripe/resources/country_spec.rb +68 -0
  76. data/lib/stripe/resources/coupon.rb +236 -0
  77. data/lib/stripe/resources/credit_note.rb +709 -9
  78. data/lib/stripe/resources/credit_note_line_item.rb +71 -0
  79. data/lib/stripe/resources/customer.rb +1015 -16
  80. data/lib/stripe/resources/customer_balance_transaction.rb +38 -1
  81. data/lib/stripe/resources/customer_cash_balance_transaction.rb +124 -0
  82. data/lib/stripe/resources/customer_session.rb +188 -0
  83. data/lib/stripe/resources/discount.rb +37 -0
  84. data/lib/stripe/resources/dispute.rb +650 -2
  85. data/lib/stripe/resources/entitlements/active_entitlement.rb +63 -0
  86. data/lib/stripe/resources/entitlements/active_entitlement_summary.rb +23 -0
  87. data/lib/stripe/resources/entitlements/feature.rb +130 -0
  88. data/lib/stripe/resources/ephemeral_key.rb +44 -0
  89. data/lib/stripe/resources/event.rb +130 -0
  90. data/lib/stripe/resources/exchange_rate.rb +58 -0
  91. data/lib/stripe/resources/file.rb +139 -15
  92. data/lib/stripe/resources/file_link.rb +129 -0
  93. data/lib/stripe/resources/financial_connections/account.rb +363 -0
  94. data/lib/stripe/resources/financial_connections/account_owner.rb +31 -0
  95. data/lib/stripe/resources/financial_connections/account_ownership.rb +23 -0
  96. data/lib/stripe/resources/financial_connections/session.rb +121 -0
  97. data/lib/stripe/resources/financial_connections/transaction.rb +118 -0
  98. data/lib/stripe/resources/forwarding/request.rb +208 -0
  99. data/lib/stripe/resources/funding_instructions.rb +332 -0
  100. data/lib/stripe/resources/identity/verification_report.rb +287 -0
  101. data/lib/stripe/resources/identity/verification_session.rb +474 -4
  102. data/lib/stripe/resources/invoice.rb +3525 -17
  103. data/lib/stripe/resources/invoice_item.rb +453 -0
  104. data/lib/stripe/resources/invoice_line_item.rb +372 -1
  105. data/lib/stripe/resources/invoice_payment.rb +112 -0
  106. data/lib/stripe/resources/invoice_rendering_template.rb +120 -0
  107. data/lib/stripe/resources/issuing/authorization.rb +1313 -4
  108. data/lib/stripe/resources/issuing/card.rb +785 -4
  109. data/lib/stripe/resources/issuing/cardholder.rb +684 -0
  110. data/lib/stripe/resources/issuing/dispute.rb +828 -2
  111. data/lib/stripe/resources/issuing/personalization_design.rb +395 -0
  112. data/lib/stripe/resources/issuing/physical_bundle.rb +80 -0
  113. data/lib/stripe/resources/issuing/token.rb +198 -0
  114. data/lib/stripe/resources/issuing/transaction.rb +991 -0
  115. data/lib/stripe/resources/line_item.rb +51 -0
  116. data/lib/stripe/resources/login_link.rb +12 -0
  117. data/lib/stripe/resources/mandate.rb +146 -0
  118. data/lib/stripe/resources/payment_intent.rb +8876 -6
  119. data/lib/stripe/resources/payment_link.rb +1692 -0
  120. data/lib/stripe/resources/payment_method.rb +1570 -4
  121. data/lib/stripe/resources/payment_method_configuration.rb +3189 -0
  122. data/lib/stripe/resources/payment_method_domain.rb +236 -0
  123. data/lib/stripe/resources/payout.rb +271 -4
  124. data/lib/stripe/resources/person.rb +295 -1
  125. data/lib/stripe/resources/plan.rb +352 -0
  126. data/lib/stripe/resources/price.rb +642 -0
  127. data/lib/stripe/resources/product.rb +534 -0
  128. data/lib/stripe/resources/product_feature.rb +25 -0
  129. data/lib/stripe/resources/promotion_code.rb +237 -0
  130. data/lib/stripe/resources/quote.rb +1015 -38
  131. data/lib/stripe/resources/radar/early_fraud_warning.rb +85 -0
  132. data/lib/stripe/resources/radar/value_list.rb +171 -0
  133. data/lib/stripe/resources/radar/value_list_item.rb +131 -0
  134. data/lib/stripe/resources/refund.rb +494 -0
  135. data/lib/stripe/resources/reporting/report_run.rb +172 -0
  136. data/lib/stripe/resources/reporting/report_type.rb +48 -1
  137. data/lib/stripe/resources/reserve_transaction.rb +22 -0
  138. data/lib/stripe/resources/reversal.rb +38 -2
  139. data/lib/stripe/resources/review.rb +122 -2
  140. data/lib/stripe/resources/setup_attempt.rb +380 -0
  141. data/lib/stripe/resources/setup_intent.rb +3432 -4
  142. data/lib/stripe/resources/shipping_rate.rb +287 -0
  143. data/lib/stripe/resources/sigma/scheduled_query_run.rb +62 -0
  144. data/lib/stripe/resources/source.rb +1250 -10
  145. data/lib/stripe/resources/source_mandate_notification.rb +66 -0
  146. data/lib/stripe/resources/source_transaction.rb +93 -0
  147. data/lib/stripe/resources/subscription.rb +1871 -3
  148. data/lib/stripe/resources/subscription_item.rb +399 -10
  149. data/lib/stripe/resources/subscription_schedule.rb +1455 -4
  150. data/lib/stripe/resources/tax/calculation.rb +430 -0
  151. data/lib/stripe/resources/tax/calculation_line_item.rb +71 -0
  152. data/lib/stripe/resources/tax/registration.rb +2667 -0
  153. data/lib/stripe/resources/tax/settings.rb +134 -0
  154. data/lib/stripe/resources/tax/transaction.rb +314 -0
  155. data/lib/stripe/resources/tax/transaction_line_item.rb +44 -0
  156. data/lib/stripe/resources/tax_code.rb +35 -0
  157. data/lib/stripe/resources/tax_deducted_at_source.rb +22 -0
  158. data/lib/stripe/resources/tax_id.rb +144 -11
  159. data/lib/stripe/resources/tax_rate.rb +217 -0
  160. data/lib/stripe/resources/terminal/configuration.rb +1328 -0
  161. data/lib/stripe/resources/terminal/connection_token.rb +34 -0
  162. data/lib/stripe/resources/terminal/location.rb +222 -0
  163. data/lib/stripe/resources/terminal/reader.rb +886 -0
  164. data/lib/stripe/resources/test_helpers/test_clock.rb +156 -0
  165. data/lib/stripe/resources/token.rb +1249 -0
  166. data/lib/stripe/resources/topup.rb +204 -2
  167. data/lib/stripe/resources/transfer.rb +173 -6
  168. data/lib/stripe/resources/treasury/credit_reversal.rb +120 -0
  169. data/lib/stripe/resources/treasury/debit_reversal.rb +131 -0
  170. data/lib/stripe/resources/treasury/financial_account.rb +833 -0
  171. data/lib/stripe/resources/treasury/financial_account_features.rb +204 -0
  172. data/lib/stripe/resources/treasury/inbound_transfer.rb +356 -0
  173. data/lib/stripe/resources/treasury/outbound_payment.rb +638 -0
  174. data/lib/stripe/resources/treasury/outbound_transfer.rb +493 -0
  175. data/lib/stripe/resources/treasury/received_credit.rb +284 -0
  176. data/lib/stripe/resources/treasury/received_debit.rb +243 -0
  177. data/lib/stripe/resources/treasury/transaction.rb +193 -0
  178. data/lib/stripe/resources/treasury/transaction_entry.rb +178 -0
  179. data/lib/stripe/resources/v2/amount.rb +9 -0
  180. data/lib/stripe/resources/v2/billing/meter_event.rb +34 -0
  181. data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +36 -0
  182. data/lib/stripe/resources/v2/billing/meter_event_session.rb +29 -0
  183. data/lib/stripe/resources/v2/event.rb +41 -0
  184. data/lib/stripe/resources/v2/event_destination.rb +73 -0
  185. data/lib/stripe/resources/webhook_endpoint.rb +167 -0
  186. data/lib/stripe/resources.rb +70 -12
  187. data/lib/stripe/search_result_object.rb +89 -0
  188. data/lib/stripe/services/account_capability_service.rb +71 -0
  189. data/lib/stripe/services/account_external_account_service.rb +317 -0
  190. data/lib/stripe/services/account_link_service.rb +63 -0
  191. data/lib/stripe/services/account_login_link_service.rb +28 -0
  192. data/lib/stripe/services/account_person_service.rb +1019 -0
  193. data/lib/stripe/services/account_service.rb +4171 -0
  194. data/lib/stripe/services/account_session_service.rb +569 -0
  195. data/lib/stripe/services/apple_pay_domain_service.rb +100 -0
  196. data/lib/stripe/services/application_fee_refund_service.rb +114 -0
  197. data/lib/stripe/services/application_fee_service.rb +92 -0
  198. data/lib/stripe/services/apps/secret_service.rb +168 -0
  199. data/lib/stripe/services/apps_service.rb +13 -0
  200. data/lib/stripe/services/balance_service.rb +21 -0
  201. data/lib/stripe/services/balance_transaction_service.rb +101 -0
  202. data/lib/stripe/services/billing/alert_service.rb +187 -0
  203. data/lib/stripe/services/billing/credit_balance_summary_service.rb +67 -0
  204. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +70 -0
  205. data/lib/stripe/services/billing/credit_grant_service.rb +240 -0
  206. data/lib/stripe/services/billing/meter_event_adjustment_service.rb +45 -0
  207. data/lib/stripe/services/billing/meter_event_service.rb +40 -0
  208. data/lib/stripe/services/billing/meter_event_summary_service.rb +58 -0
  209. data/lib/stripe/services/billing/meter_service.rb +211 -0
  210. data/lib/stripe/services/billing_portal/configuration_service.rb +496 -0
  211. data/lib/stripe/services/billing_portal/session_service.rb +192 -0
  212. data/lib/stripe/services/billing_portal_service.rb +14 -0
  213. data/lib/stripe/services/billing_service.rb +20 -0
  214. data/lib/stripe/services/charge_service.rb +471 -0
  215. data/lib/stripe/services/checkout/session_line_item_service.rb +37 -0
  216. data/lib/stripe/services/checkout/session_service.rb +2495 -0
  217. data/lib/stripe/services/checkout_service.rb +13 -0
  218. data/lib/stripe/services/climate/order_service.rb +170 -0
  219. data/lib/stripe/services/climate/product_service.rb +57 -0
  220. data/lib/stripe/services/climate/supplier_service.rb +57 -0
  221. data/lib/stripe/services/climate_service.rb +15 -0
  222. data/lib/stripe/services/confirmation_token_service.rb +26 -0
  223. data/lib/stripe/services/country_spec_service.rb +55 -0
  224. data/lib/stripe/services/coupon_service.rb +202 -0
  225. data/lib/stripe/services/credit_note_line_item_service.rb +35 -0
  226. data/lib/stripe/services/credit_note_preview_lines_service.rb +169 -0
  227. data/lib/stripe/services/credit_note_service.rb +457 -0
  228. data/lib/stripe/services/customer_balance_transaction_service.rb +113 -0
  229. data/lib/stripe/services/customer_cash_balance_service.rb +57 -0
  230. data/lib/stripe/services/customer_cash_balance_transaction_service.rb +55 -0
  231. data/lib/stripe/services/customer_funding_instructions_service.rb +61 -0
  232. data/lib/stripe/services/customer_payment_method_service.rb +68 -0
  233. data/lib/stripe/services/customer_payment_source_service.rb +255 -0
  234. data/lib/stripe/services/customer_service.rb +664 -0
  235. data/lib/stripe/services/customer_session_service.rb +113 -0
  236. data/lib/stripe/services/customer_tax_id_service.rb +94 -0
  237. data/lib/stripe/services/dispute_service.rb +422 -0
  238. data/lib/stripe/services/entitlements/active_entitlement_service.rb +66 -0
  239. data/lib/stripe/services/entitlements/feature_service.rb +128 -0
  240. data/lib/stripe/services/entitlements_service.rb +14 -0
  241. data/lib/stripe/services/ephemeral_key_service.rb +64 -0
  242. data/lib/stripe/services/event_service.rb +87 -0
  243. data/lib/stripe/services/exchange_rate_service.rb +55 -0
  244. data/lib/stripe/services/file_link_service.rb +132 -0
  245. data/lib/stripe/services/file_service.rb +124 -0
  246. data/lib/stripe/services/financial_connections/account_owner_service.rb +46 -0
  247. data/lib/stripe/services/financial_connections/account_service.rb +177 -0
  248. data/lib/stripe/services/financial_connections/session_service.rb +98 -0
  249. data/lib/stripe/services/financial_connections/transaction_service.rb +100 -0
  250. data/lib/stripe/services/financial_connections_service.rb +15 -0
  251. data/lib/stripe/services/forwarding/request_service.rb +147 -0
  252. data/lib/stripe/services/forwarding_service.rb +13 -0
  253. data/lib/stripe/services/identity/verification_report_service.rb +95 -0
  254. data/lib/stripe/services/identity/verification_session_service.rb +337 -0
  255. data/lib/stripe/services/identity_service.rb +14 -0
  256. data/lib/stripe/services/invoice_item_service.rb +394 -0
  257. data/lib/stripe/services/invoice_line_item_service.rb +252 -0
  258. data/lib/stripe/services/invoice_payment_service.rb +83 -0
  259. data/lib/stripe/services/invoice_rendering_template_service.rb +101 -0
  260. data/lib/stripe/services/invoice_service.rb +2900 -0
  261. data/lib/stripe/services/issuing/authorization_service.rb +169 -0
  262. data/lib/stripe/services/issuing/card_service.rb +507 -0
  263. data/lib/stripe/services/issuing/cardholder_service.rb +577 -0
  264. data/lib/stripe/services/issuing/dispute_service.rb +696 -0
  265. data/lib/stripe/services/issuing/personalization_design_service.rb +245 -0
  266. data/lib/stripe/services/issuing/physical_bundle_service.rb +70 -0
  267. data/lib/stripe/services/issuing/token_service.rb +114 -0
  268. data/lib/stripe/services/issuing/transaction_service.rb +118 -0
  269. data/lib/stripe/services/issuing_service.rb +20 -0
  270. data/lib/stripe/services/mandate_service.rb +26 -0
  271. data/lib/stripe/services/oauth_service.rb +63 -0
  272. data/lib/stripe/services/payment_intent_service.rb +7202 -0
  273. data/lib/stripe/services/payment_link_line_item_service.rb +35 -0
  274. data/lib/stripe/services/payment_link_service.rb +1333 -0
  275. data/lib/stripe/services/payment_method_configuration_service.rb +2306 -0
  276. data/lib/stripe/services/payment_method_domain_service.rb +142 -0
  277. data/lib/stripe/services/payment_method_service.rb +843 -0
  278. data/lib/stripe/services/payout_service.rb +225 -0
  279. data/lib/stripe/services/plan_service.rb +297 -0
  280. data/lib/stripe/services/price_service.rb +545 -0
  281. data/lib/stripe/services/product_feature_service.rb +91 -0
  282. data/lib/stripe/services/product_service.rb +494 -0
  283. data/lib/stripe/services/promotion_code_service.rb +228 -0
  284. data/lib/stripe/services/quote_computed_upfront_line_items_service.rb +35 -0
  285. data/lib/stripe/services/quote_line_item_service.rb +35 -0
  286. data/lib/stripe/services/quote_service.rb +703 -0
  287. data/lib/stripe/services/radar/early_fraud_warning_service.rb +93 -0
  288. data/lib/stripe/services/radar/value_list_item_service.rb +130 -0
  289. data/lib/stripe/services/radar/value_list_service.rb +165 -0
  290. data/lib/stripe/services/radar_service.rb +15 -0
  291. data/lib/stripe/services/refund_service.rb +200 -0
  292. data/lib/stripe/services/reporting/report_run_service.rb +147 -0
  293. data/lib/stripe/services/reporting/report_type_service.rb +48 -0
  294. data/lib/stripe/services/reporting_service.rb +14 -0
  295. data/lib/stripe/services/review_service.rb +89 -0
  296. data/lib/stripe/services/setup_attempt_service.rb +68 -0
  297. data/lib/stripe/services/setup_intent_service.rb +3107 -0
  298. data/lib/stripe/services/shipping_rate_service.rb +250 -0
  299. data/lib/stripe/services/sigma/scheduled_query_run_service.rb +57 -0
  300. data/lib/stripe/services/sigma_service.rb +13 -0
  301. data/lib/stripe/services/source_service.rb +665 -0
  302. data/lib/stripe/services/source_transaction_service.rb +35 -0
  303. data/lib/stripe/services/subscription_item_service.rb +372 -0
  304. data/lib/stripe/services/subscription_schedule_service.rb +1224 -0
  305. data/lib/stripe/services/subscription_service.rb +1590 -0
  306. data/lib/stripe/services/tax/calculation_line_item_service.rb +37 -0
  307. data/lib/stripe/services/tax/calculation_service.rb +246 -0
  308. data/lib/stripe/services/tax/registration_service.rb +1774 -0
  309. data/lib/stripe/services/tax/settings_service.rb +104 -0
  310. data/lib/stripe/services/tax/transaction_line_item_service.rb +37 -0
  311. data/lib/stripe/services/tax/transaction_service.rb +159 -0
  312. data/lib/stripe/services/tax_code_service.rb +49 -0
  313. data/lib/stripe/services/tax_id_service.rb +116 -0
  314. data/lib/stripe/services/tax_rate_service.rb +193 -0
  315. data/lib/stripe/services/tax_service.rb +16 -0
  316. data/lib/stripe/services/terminal/configuration_service.rb +1059 -0
  317. data/lib/stripe/services/terminal/connection_token_service.rb +31 -0
  318. data/lib/stripe/services/terminal/location_service.rb +207 -0
  319. data/lib/stripe/services/terminal/reader_service.rb +488 -0
  320. data/lib/stripe/services/terminal_service.rb +16 -0
  321. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +655 -0
  322. data/lib/stripe/services/test_helpers/customer_service.rb +37 -0
  323. data/lib/stripe/services/test_helpers/issuing/authorization_service.rb +832 -0
  324. data/lib/stripe/services/test_helpers/issuing/card_service.rb +110 -0
  325. data/lib/stripe/services/test_helpers/issuing/personalization_design_service.rb +84 -0
  326. data/lib/stripe/services/test_helpers/issuing/transaction_service.rb +675 -0
  327. data/lib/stripe/services/test_helpers/issuing_service.rb +19 -0
  328. data/lib/stripe/services/test_helpers/refund_service.rb +28 -0
  329. data/lib/stripe/services/test_helpers/terminal/reader_service.rb +108 -0
  330. data/lib/stripe/services/test_helpers/terminal_service.rb +15 -0
  331. data/lib/stripe/services/test_helpers/test_clock_service.rb +119 -0
  332. data/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb +81 -0
  333. data/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb +141 -0
  334. data/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb +141 -0
  335. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +81 -0
  336. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +81 -0
  337. data/lib/stripe/services/test_helpers/treasury_service.rb +19 -0
  338. data/lib/stripe/services/test_helpers_service.rb +19 -0
  339. data/lib/stripe/services/token_service.rb +1224 -0
  340. data/lib/stripe/services/topup_service.rb +191 -0
  341. data/lib/stripe/services/transfer_reversal_service.rb +122 -0
  342. data/lib/stripe/services/transfer_service.rb +166 -0
  343. data/lib/stripe/services/treasury/credit_reversal_service.rb +100 -0
  344. data/lib/stripe/services/treasury/debit_reversal_service.rb +104 -0
  345. data/lib/stripe/services/treasury/financial_account_features_service.rb +196 -0
  346. data/lib/stripe/services/treasury/financial_account_service.rb +554 -0
  347. data/lib/stripe/services/treasury/inbound_transfer_service.rb +140 -0
  348. data/lib/stripe/services/treasury/outbound_payment_service.rb +310 -0
  349. data/lib/stripe/services/treasury/outbound_transfer_service.rb +176 -0
  350. data/lib/stripe/services/treasury/received_credit_service.rb +82 -0
  351. data/lib/stripe/services/treasury/received_debit_service.rb +70 -0
  352. data/lib/stripe/services/treasury/transaction_entry_service.rb +117 -0
  353. data/lib/stripe/services/treasury/transaction_service.rb +125 -0
  354. data/lib/stripe/services/treasury_service.rb +22 -0
  355. data/lib/stripe/services/v1_services.rb +90 -0
  356. data/lib/stripe/services/v2/billing/meter_event_adjustment_service.rb +44 -0
  357. data/lib/stripe/services/v2/billing/meter_event_service.rb +46 -0
  358. data/lib/stripe/services/v2/billing/meter_event_session_service.rb +23 -0
  359. data/lib/stripe/services/v2/billing/meter_event_stream_service.rb +56 -0
  360. data/lib/stripe/services/v2/billing_service.rb +18 -0
  361. data/lib/stripe/services/v2/core/event_destination_service.rb +235 -0
  362. data/lib/stripe/services/v2/core/event_service.rb +48 -0
  363. data/lib/stripe/services/v2/core_service.rb +16 -0
  364. data/lib/stripe/services/v2_services.rb +14 -0
  365. data/lib/stripe/services/webhook_endpoint_service.rb +156 -0
  366. data/lib/stripe/services.rb +180 -0
  367. data/lib/stripe/singleton_api_resource.rb +3 -3
  368. data/lib/stripe/stripe_client.rb +56 -1021
  369. data/lib/stripe/stripe_configuration.rb +63 -42
  370. data/lib/stripe/stripe_object.rb +75 -39
  371. data/lib/stripe/stripe_response.rb +1 -3
  372. data/lib/stripe/stripe_service.rb +32 -0
  373. data/lib/stripe/thin_event.rb +37 -0
  374. data/lib/stripe/util.rb +161 -39
  375. data/lib/stripe/v2_list_object.rb +84 -0
  376. data/lib/stripe/version.rb +1 -1
  377. data/lib/stripe/webhook.rb +3 -2
  378. data/lib/stripe.rb +44 -1
  379. data/rbi/stripe/resources/account.rbi +4926 -0
  380. data/rbi/stripe/resources/account_link.rbi +74 -0
  381. data/rbi/stripe/resources/account_session.rbi +1013 -0
  382. data/rbi/stripe/resources/apple_pay_domain.rbi +88 -0
  383. data/rbi/stripe/resources/application.rbi +20 -0
  384. data/rbi/stripe/resources/application_fee.rbi +118 -0
  385. data/rbi/stripe/resources/application_fee_refund.rbi +37 -0
  386. data/rbi/stripe/resources/apps/secret.rbi +195 -0
  387. data/rbi/stripe/resources/balance.rbi +235 -0
  388. data/rbi/stripe/resources/balance_transaction.rbi +147 -0
  389. data/rbi/stripe/resources/bank_account.rbi +127 -0
  390. data/rbi/stripe/resources/billing/alert.rbi +201 -0
  391. data/rbi/stripe/resources/billing/alert_triggered.rbi +28 -0
  392. data/rbi/stripe/resources/billing/credit_balance_summary.rbi +63 -0
  393. data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +147 -0
  394. data/rbi/stripe/resources/billing/credit_grant.rbi +291 -0
  395. data/rbi/stripe/resources/billing/meter.rbi +226 -0
  396. data/rbi/stripe/resources/billing/meter_event.rbi +64 -0
  397. data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +64 -0
  398. data/rbi/stripe/resources/billing/meter_event_summary.rbi +35 -0
  399. data/rbi/stripe/resources/billing_portal/configuration.rbi +645 -0
  400. data/rbi/stripe/resources/billing_portal/session.rbi +345 -0
  401. data/rbi/stripe/resources/capability.rbi +125 -0
  402. data/rbi/stripe/resources/card.rbi +125 -0
  403. data/rbi/stripe/resources/cash_balance.rbi +32 -0
  404. data/rbi/stripe/resources/charge.rbi +2069 -0
  405. data/rbi/stripe/resources/checkout/session.rbi +4004 -0
  406. data/rbi/stripe/resources/climate/order.rbi +245 -0
  407. data/rbi/stripe/resources/climate/product.rbi +75 -0
  408. data/rbi/stripe/resources/climate/supplier.rbi +72 -0
  409. data/rbi/stripe/resources/confirmation_token.rbi +1807 -0
  410. data/rbi/stripe/resources/connect_collection_transfer.rbi +26 -0
  411. data/rbi/stripe/resources/country_spec.rbi +85 -0
  412. data/rbi/stripe/resources/coupon.rbi +250 -0
  413. data/rbi/stripe/resources/credit_note.rbi +752 -0
  414. data/rbi/stripe/resources/credit_note_line_item.rbi +101 -0
  415. data/rbi/stripe/resources/customer.rbi +1005 -0
  416. data/rbi/stripe/resources/customer_balance_transaction.rbi +56 -0
  417. data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +151 -0
  418. data/rbi/stripe/resources/customer_session.rbi +200 -0
  419. data/rbi/stripe/resources/discount.rbi +53 -0
  420. data/rbi/stripe/resources/dispute.rbi +761 -0
  421. data/rbi/stripe/resources/entitlements/active_entitlement.rbi +58 -0
  422. data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +23 -0
  423. data/rbi/stripe/resources/entitlements/feature.rbi +117 -0
  424. data/rbi/stripe/resources/ephemeral_key.rbi +44 -0
  425. data/rbi/stripe/resources/event.rbi +149 -0
  426. data/rbi/stripe/resources/exchange_rate.rbi +66 -0
  427. data/rbi/stripe/resources/file.rbi +143 -0
  428. data/rbi/stripe/resources/file_link.rbi +141 -0
  429. data/rbi/stripe/resources/financial_connections/account.rbi +339 -0
  430. data/rbi/stripe/resources/financial_connections/account_owner.rbi +35 -0
  431. data/rbi/stripe/resources/financial_connections/account_ownership.rbi +23 -0
  432. data/rbi/stripe/resources/financial_connections/session.rbi +123 -0
  433. data/rbi/stripe/resources/financial_connections/transaction.rbi +124 -0
  434. data/rbi/stripe/resources/forwarding/request.rbi +216 -0
  435. data/rbi/stripe/resources/funding_instructions.rbi +437 -0
  436. data/rbi/stripe/resources/identity/verification_report.rbi +360 -0
  437. data/rbi/stripe/resources/identity/verification_session.rbi +526 -0
  438. data/rbi/stripe/resources/invoice.rbi +3812 -0
  439. data/rbi/stripe/resources/invoice_item.rbi +473 -0
  440. data/rbi/stripe/resources/invoice_line_item.rbi +432 -0
  441. data/rbi/stripe/resources/invoice_payment.rbi +121 -0
  442. data/rbi/stripe/resources/invoice_rendering_template.rbi +104 -0
  443. data/rbi/stripe/resources/issuing/authorization.rbi +1283 -0
  444. data/rbi/stripe/resources/issuing/card.rbi +741 -0
  445. data/rbi/stripe/resources/issuing/cardholder.rbi +744 -0
  446. data/rbi/stripe/resources/issuing/dispute.rbi +913 -0
  447. data/rbi/stripe/resources/issuing/personalization_design.rbi +338 -0
  448. data/rbi/stripe/resources/issuing/physical_bundle.rbi +79 -0
  449. data/rbi/stripe/resources/issuing/token.rbi +226 -0
  450. data/rbi/stripe/resources/issuing/transaction.rbi +1061 -0
  451. data/rbi/stripe/resources/line_item.rbi +72 -0
  452. data/rbi/stripe/resources/login_link.rbi +19 -0
  453. data/rbi/stripe/resources/mandate.rbi +187 -0
  454. data/rbi/stripe/resources/payment_intent.rbi +9647 -0
  455. data/rbi/stripe/resources/payment_link.rbi +1801 -0
  456. data/rbi/stripe/resources/payment_method.rbi +1761 -0
  457. data/rbi/stripe/resources/payment_method_configuration.rbi +3550 -0
  458. data/rbi/stripe/resources/payment_method_domain.rbi +228 -0
  459. data/rbi/stripe/resources/payout.rbi +300 -0
  460. data/rbi/stripe/resources/person.rbi +401 -0
  461. data/rbi/stripe/resources/plan.rbi +371 -0
  462. data/rbi/stripe/resources/price.rbi +694 -0
  463. data/rbi/stripe/resources/product.rbi +555 -0
  464. data/rbi/stripe/resources/product_feature.rbi +26 -0
  465. data/rbi/stripe/resources/promotion_code.rbi +261 -0
  466. data/rbi/stripe/resources/quote.rbi +1126 -0
  467. data/rbi/stripe/resources/radar/early_fraud_warning.rbi +98 -0
  468. data/rbi/stripe/resources/radar/value_list.rbi +168 -0
  469. data/rbi/stripe/resources/radar/value_list_item.rbi +129 -0
  470. data/rbi/stripe/resources/refund.rbi +523 -0
  471. data/rbi/stripe/resources/reporting/report_run.rbi +191 -0
  472. data/rbi/stripe/resources/reporting/report_type.rbi +57 -0
  473. data/rbi/stripe/resources/reserve_transaction.rbi +23 -0
  474. data/rbi/stripe/resources/reversal.rbi +51 -0
  475. data/rbi/stripe/resources/review.rbi +154 -0
  476. data/rbi/stripe/resources/setup_attempt.rbi +477 -0
  477. data/rbi/stripe/resources/setup_intent.rbi +3655 -0
  478. data/rbi/stripe/resources/shipping_rate.rbi +305 -0
  479. data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +75 -0
  480. data/rbi/stripe/resources/source.rbi +1496 -0
  481. data/rbi/stripe/resources/source_mandate_notification.rbi +77 -0
  482. data/rbi/stripe/resources/source_transaction.rbi +127 -0
  483. data/rbi/stripe/resources/subscription.rbi +2027 -0
  484. data/rbi/stripe/resources/subscription_item.rbi +404 -0
  485. data/rbi/stripe/resources/subscription_schedule.rbi +1623 -0
  486. data/rbi/stripe/resources/tax/calculation.rbi +478 -0
  487. data/rbi/stripe/resources/tax/calculation_line_item.rbi +91 -0
  488. data/rbi/stripe/resources/tax/registration.rbi +2713 -0
  489. data/rbi/stripe/resources/tax/settings.rbi +141 -0
  490. data/rbi/stripe/resources/tax/transaction.rbi +351 -0
  491. data/rbi/stripe/resources/tax/transaction_line_item.rbi +54 -0
  492. data/rbi/stripe/resources/tax_code.rbi +44 -0
  493. data/rbi/stripe/resources/tax_deducted_at_source.rbi +23 -0
  494. data/rbi/stripe/resources/tax_id.rbi +165 -0
  495. data/rbi/stripe/resources/tax_rate.rbi +239 -0
  496. data/rbi/stripe/resources/terminal/configuration.rbi +1386 -0
  497. data/rbi/stripe/resources/terminal/connection_token.rbi +37 -0
  498. data/rbi/stripe/resources/terminal/location.rbi +222 -0
  499. data/rbi/stripe/resources/terminal/reader.rbi +847 -0
  500. data/rbi/stripe/resources/test_helpers/test_clock.rbi +132 -0
  501. data/rbi/stripe/resources/token.rbi +1283 -0
  502. data/rbi/stripe/resources/topup.rbi +222 -0
  503. data/rbi/stripe/resources/transfer.rbi +199 -0
  504. data/rbi/stripe/resources/treasury/credit_reversal.rbi +119 -0
  505. data/rbi/stripe/resources/treasury/debit_reversal.rbi +131 -0
  506. data/rbi/stripe/resources/treasury/financial_account.rbi +865 -0
  507. data/rbi/stripe/resources/treasury/financial_account_features.rbi +260 -0
  508. data/rbi/stripe/resources/treasury/inbound_transfer.rbi +295 -0
  509. data/rbi/stripe/resources/treasury/outbound_payment.rbi +592 -0
  510. data/rbi/stripe/resources/treasury/outbound_transfer.rbi +431 -0
  511. data/rbi/stripe/resources/treasury/received_credit.rbi +302 -0
  512. data/rbi/stripe/resources/treasury/received_debit.rbi +256 -0
  513. data/rbi/stripe/resources/treasury/transaction.rbi +215 -0
  514. data/rbi/stripe/resources/treasury/transaction_entry.rbi +192 -0
  515. data/rbi/stripe/resources/v2/amount.rbi +14 -0
  516. data/rbi/stripe/resources/v2/billing/meter_event.rbi +37 -0
  517. data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +41 -0
  518. data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +31 -0
  519. data/rbi/stripe/resources/v2/event.rbi +48 -0
  520. data/rbi/stripe/resources/v2/event_destination.rbi +91 -0
  521. data/rbi/stripe/resources/webhook_endpoint.rbi +168 -0
  522. data/rbi/stripe/services/account_capability_service.rbi +51 -0
  523. data/rbi/stripe/services/account_external_account_service.rbi +304 -0
  524. data/rbi/stripe/services/account_link_service.rbi +58 -0
  525. data/rbi/stripe/services/account_login_link_service.rbi +22 -0
  526. data/rbi/stripe/services/account_person_service.rbi +1011 -0
  527. data/rbi/stripe/services/account_service.rbi +4213 -0
  528. data/rbi/stripe/services/account_session_service.rbi +646 -0
  529. data/rbi/stripe/services/apple_pay_domain_service.rbi +76 -0
  530. data/rbi/stripe/services/application_fee_refund_service.rbi +93 -0
  531. data/rbi/stripe/services/application_fee_service.rbi +78 -0
  532. data/rbi/stripe/services/apps/secret_service.rbi +151 -0
  533. data/{lib/stripe/resources/usage_record_summary.rb → rbi/stripe/services/apps_service.rbi} +4 -3
  534. data/rbi/stripe/services/balance_service.rbi +21 -0
  535. data/rbi/stripe/services/balance_transaction_service.rbi +93 -0
  536. data/rbi/stripe/services/billing/alert_service.rbi +152 -0
  537. data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +68 -0
  538. data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +59 -0
  539. data/rbi/stripe/services/billing/credit_grant_service.rbi +211 -0
  540. data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +42 -0
  541. data/rbi/stripe/services/billing/meter_event_service.rbi +42 -0
  542. data/rbi/stripe/services/billing/meter_event_summary_service.rbi +54 -0
  543. data/rbi/stripe/services/billing/meter_service.rbi +163 -0
  544. data/rbi/stripe/services/billing_portal/configuration_service.rbi +511 -0
  545. data/rbi/stripe/services/billing_portal/session_service.rbi +204 -0
  546. data/rbi/stripe/services/billing_portal_service.rbi +10 -0
  547. data/rbi/stripe/services/billing_service.rbi +15 -0
  548. data/rbi/stripe/services/charge_service.rbi +448 -0
  549. data/rbi/stripe/services/checkout/session_line_item_service.rbi +33 -0
  550. data/rbi/stripe/services/checkout/session_service.rbi +2614 -0
  551. data/rbi/stripe/services/checkout_service.rbi +9 -0
  552. data/rbi/stripe/services/climate/order_service.rbi +142 -0
  553. data/rbi/stripe/services/climate/product_service.rbi +46 -0
  554. data/rbi/stripe/services/climate/supplier_service.rbi +46 -0
  555. data/rbi/stripe/services/climate_service.rbi +11 -0
  556. data/rbi/stripe/services/confirmation_token_service.rbi +20 -0
  557. data/rbi/stripe/services/country_spec_service.rbi +44 -0
  558. data/rbi/stripe/services/coupon_service.rbi +194 -0
  559. data/rbi/stripe/services/credit_note_line_item_service.rbi +31 -0
  560. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +167 -0
  561. data/rbi/stripe/services/credit_note_service.rbi +415 -0
  562. data/rbi/stripe/services/customer_balance_transaction_service.rbi +92 -0
  563. data/rbi/stripe/services/customer_cash_balance_service.rbi +45 -0
  564. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +44 -0
  565. data/rbi/stripe/services/customer_funding_instructions_service.rbi +59 -0
  566. data/rbi/stripe/services/customer_payment_method_service.rbi +57 -0
  567. data/rbi/stripe/services/customer_payment_source_service.rbi +232 -0
  568. data/rbi/stripe/services/customer_service.rbi +647 -0
  569. data/rbi/stripe/services/customer_session_service.rbi +116 -0
  570. data/rbi/stripe/services/customer_tax_id_service.rbi +70 -0
  571. data/rbi/stripe/services/dispute_service.rbi +424 -0
  572. data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +55 -0
  573. data/rbi/stripe/services/entitlements/feature_service.rbi +107 -0
  574. data/rbi/stripe/services/entitlements_service.rbi +10 -0
  575. data/rbi/stripe/services/ephemeral_key_service.rbi +53 -0
  576. data/rbi/stripe/services/event_service.rbi +83 -0
  577. data/rbi/stripe/services/exchange_rate_service.rbi +44 -0
  578. data/rbi/stripe/services/file_link_service.rbi +124 -0
  579. data/rbi/stripe/services/file_service.rbi +116 -0
  580. data/rbi/stripe/services/financial_connections/account_owner_service.rbi +42 -0
  581. data/rbi/stripe/services/financial_connections/account_service.rbi +133 -0
  582. data/rbi/stripe/services/financial_connections/session_service.rbi +88 -0
  583. data/rbi/stripe/services/financial_connections/transaction_service.rbi +92 -0
  584. data/rbi/stripe/services/financial_connections_service.rbi +11 -0
  585. data/rbi/stripe/services/forwarding/request_service.rbi +134 -0
  586. data/rbi/stripe/services/forwarding_service.rbi +9 -0
  587. data/rbi/stripe/services/identity/verification_report_service.rbi +87 -0
  588. data/rbi/stripe/services/identity/verification_session_service.rbi +323 -0
  589. data/rbi/stripe/services/identity_service.rbi +10 -0
  590. data/rbi/stripe/services/invoice_item_service.rbi +366 -0
  591. data/rbi/stripe/services/invoice_line_item_service.rbi +259 -0
  592. data/rbi/stripe/services/invoice_payment_service.rbi +71 -0
  593. data/rbi/stripe/services/invoice_rendering_template_service.rbi +82 -0
  594. data/rbi/stripe/services/invoice_service.rbi +2981 -0
  595. data/rbi/stripe/services/issuing/authorization_service.rbi +146 -0
  596. data/rbi/stripe/services/issuing/card_service.rbi +495 -0
  597. data/rbi/stripe/services/issuing/cardholder_service.rbi +587 -0
  598. data/rbi/stripe/services/issuing/dispute_service.rbi +707 -0
  599. data/rbi/stripe/services/issuing/personalization_design_service.rbi +243 -0
  600. data/rbi/stripe/services/issuing/physical_bundle_service.rbi +59 -0
  601. data/rbi/stripe/services/issuing/token_service.rbi +99 -0
  602. data/rbi/stripe/services/issuing/transaction_service.rbi +105 -0
  603. data/rbi/stripe/services/issuing_service.rbi +16 -0
  604. data/rbi/stripe/services/mandate_service.rbi +20 -0
  605. data/rbi/stripe/services/payment_intent_service.rbi +7659 -0
  606. data/rbi/stripe/services/payment_link_line_item_service.rbi +31 -0
  607. data/rbi/stripe/services/payment_link_service.rbi +1352 -0
  608. data/rbi/stripe/services/payment_method_configuration_service.rbi +2487 -0
  609. data/rbi/stripe/services/payment_method_domain_service.rbi +112 -0
  610. data/rbi/stripe/services/payment_method_service.rbi +776 -0
  611. data/rbi/stripe/services/payout_service.rbi +205 -0
  612. data/rbi/stripe/services/plan_service.rbi +282 -0
  613. data/rbi/stripe/services/price_service.rbi +546 -0
  614. data/rbi/stripe/services/product_feature_service.rbi +67 -0
  615. data/rbi/stripe/services/product_service.rbi +477 -0
  616. data/rbi/stripe/services/promotion_code_service.rbi +214 -0
  617. data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +31 -0
  618. data/rbi/stripe/services/quote_line_item_service.rbi +31 -0
  619. data/rbi/stripe/services/quote_service.rbi +686 -0
  620. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +85 -0
  621. data/rbi/stripe/services/radar/value_list_item_service.rbi +109 -0
  622. data/rbi/stripe/services/radar/value_list_service.rbi +141 -0
  623. data/rbi/stripe/services/radar_service.rbi +11 -0
  624. data/rbi/stripe/services/refund_service.rbi +185 -0
  625. data/rbi/stripe/services/reporting/report_run_service.rbi +135 -0
  626. data/rbi/stripe/services/reporting/report_type_service.rbi +35 -0
  627. data/rbi/stripe/services/reporting_service.rbi +10 -0
  628. data/rbi/stripe/services/review_service.rbi +84 -0
  629. data/rbi/stripe/services/setup_attempt_service.rbi +65 -0
  630. data/rbi/stripe/services/setup_intent_service.rbi +3391 -0
  631. data/rbi/stripe/services/shipping_rate_service.rbi +241 -0
  632. data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +46 -0
  633. data/rbi/stripe/services/sigma_service.rbi +9 -0
  634. data/rbi/stripe/services/source_service.rbi +663 -0
  635. data/rbi/stripe/services/source_transaction_service.rbi +31 -0
  636. data/rbi/stripe/services/subscription_item_service.rbi +350 -0
  637. data/rbi/stripe/services/subscription_schedule_service.rbi +1290 -0
  638. data/rbi/stripe/services/subscription_service.rbi +1648 -0
  639. data/rbi/stripe/services/tax/calculation_line_item_service.rbi +33 -0
  640. data/rbi/stripe/services/tax/calculation_service.rbi +234 -0
  641. data/rbi/stripe/services/tax/registration_service.rbi +1845 -0
  642. data/rbi/stripe/services/tax/settings_service.rbi +93 -0
  643. data/rbi/stripe/services/tax/transaction_line_item_service.rbi +33 -0
  644. data/rbi/stripe/services/tax/transaction_service.rbi +146 -0
  645. data/rbi/stripe/services/tax_code_service.rbi +44 -0
  646. data/rbi/stripe/services/tax_id_service.rbi +110 -0
  647. data/rbi/stripe/services/tax_rate_service.rbi +185 -0
  648. data/rbi/stripe/services/tax_service.rbi +12 -0
  649. data/rbi/stripe/services/terminal/configuration_service.rbi +1118 -0
  650. data/rbi/stripe/services/terminal/connection_token_service.rbi +25 -0
  651. data/rbi/stripe/services/terminal/location_service.rbi +182 -0
  652. data/rbi/stripe/services/terminal/reader_service.rbi +455 -0
  653. data/rbi/stripe/services/terminal_service.rbi +12 -0
  654. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +739 -0
  655. data/rbi/stripe/services/test_helpers/customer_service.rbi +33 -0
  656. data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +848 -0
  657. data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +76 -0
  658. data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +69 -0
  659. data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +711 -0
  660. data/rbi/stripe/services/test_helpers/issuing_service.rbi +14 -0
  661. data/rbi/stripe/services/test_helpers/refund_service.rbi +22 -0
  662. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +93 -0
  663. data/rbi/stripe/services/test_helpers/terminal_service.rbi +11 -0
  664. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +90 -0
  665. data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +64 -0
  666. data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +125 -0
  667. data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +125 -0
  668. data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +87 -0
  669. data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +87 -0
  670. data/rbi/stripe/services/test_helpers/treasury_service.rbi +15 -0
  671. data/rbi/stripe/services/test_helpers_service.rbi +15 -0
  672. data/rbi/stripe/services/token_service.rbi +1257 -0
  673. data/rbi/stripe/services/topup_service.rbi +176 -0
  674. data/rbi/stripe/services/transfer_reversal_service.rbi +101 -0
  675. data/rbi/stripe/services/transfer_service.rbi +152 -0
  676. data/rbi/stripe/services/treasury/credit_reversal_service.rbi +84 -0
  677. data/rbi/stripe/services/treasury/debit_reversal_service.rbi +88 -0
  678. data/rbi/stripe/services/treasury/financial_account_features_service.rbi +198 -0
  679. data/rbi/stripe/services/treasury/financial_account_service.rbi +562 -0
  680. data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +117 -0
  681. data/rbi/stripe/services/treasury/outbound_payment_service.rbi +304 -0
  682. data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +157 -0
  683. data/rbi/stripe/services/treasury/received_credit_service.rbi +72 -0
  684. data/rbi/stripe/services/treasury/received_debit_service.rbi +59 -0
  685. data/rbi/stripe/services/treasury/transaction_entry_service.rbi +111 -0
  686. data/rbi/stripe/services/treasury/transaction_service.rbi +122 -0
  687. data/rbi/stripe/services/treasury_service.rbi +18 -0
  688. data/rbi/stripe/services/v1_services.rbi +77 -0
  689. data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +39 -0
  690. data/rbi/stripe/services/v2/billing/meter_event_service.rbi +42 -0
  691. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +18 -0
  692. data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +55 -0
  693. data/rbi/stripe/services/v2/billing_service.rbi +14 -0
  694. data/rbi/stripe/services/v2/core/event_destination_service.rbi +192 -0
  695. data/rbi/stripe/services/v2/core/event_service.rbi +36 -0
  696. data/rbi/stripe/services/v2/core_service.rbi +12 -0
  697. data/rbi/stripe/services/v2_services.rbi +10 -0
  698. data/rbi/stripe/services/webhook_endpoint_service.rbi +129 -0
  699. data/stripe.gemspec +10 -7
  700. metadata +599 -18
  701. data/lib/stripe/resources/bitcoin_receiver.rb +0 -24
  702. data/lib/stripe/resources/bitcoin_transaction.rb +0 -16
  703. data/lib/stripe/resources/issuing/card_details.rb +0 -9
  704. data/lib/stripe/resources/order.rb +0 -33
  705. data/lib/stripe/resources/order_return.rb +0 -10
  706. data/lib/stripe/resources/recipient.rb +0 -14
  707. data/lib/stripe/resources/sku.rb +0 -13
  708. data/lib/stripe/resources/three_d_secure.rb +0 -14
@@ -2,29 +2,1595 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # PaymentMethod objects represent your customer's payment instruments.
6
+ # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to
7
+ # Customer objects to store instrument details for future payments.
8
+ #
9
+ # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).
5
10
  class PaymentMethod < APIResource
6
11
  extend Stripe::APIOperations::Create
7
12
  extend Stripe::APIOperations::List
8
13
  include Stripe::APIOperations::Save
9
14
 
10
15
  OBJECT_NAME = "payment_method"
16
+ def self.object_name
17
+ "payment_method"
18
+ end
19
+
20
+ class AcssDebit < Stripe::StripeObject
21
+ # Name of the bank associated with the bank account.
22
+ attr_reader :bank_name
23
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
24
+ attr_reader :fingerprint
25
+ # Institution number of the bank account.
26
+ attr_reader :institution_number
27
+ # Last four digits of the bank account number.
28
+ attr_reader :last4
29
+ # Transit number of the bank account.
30
+ attr_reader :transit_number
31
+ end
32
+
33
+ class Affirm < Stripe::StripeObject; end
34
+ class AfterpayClearpay < Stripe::StripeObject; end
35
+ class Alipay < Stripe::StripeObject; end
36
+ class Alma < Stripe::StripeObject; end
37
+ class AmazonPay < Stripe::StripeObject; end
38
+
39
+ class AuBecsDebit < Stripe::StripeObject
40
+ # Six-digit number identifying bank and branch associated with this bank account.
41
+ attr_reader :bsb_number
42
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
43
+ attr_reader :fingerprint
44
+ # Last four digits of the bank account number.
45
+ attr_reader :last4
46
+ end
47
+
48
+ class BacsDebit < Stripe::StripeObject
49
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
50
+ attr_reader :fingerprint
51
+ # Last four digits of the bank account number.
52
+ attr_reader :last4
53
+ # Sort code of the bank account. (e.g., `10-20-30`)
54
+ attr_reader :sort_code
55
+ end
56
+
57
+ class Bancontact < Stripe::StripeObject; end
58
+ class Billie < Stripe::StripeObject; end
59
+
60
+ class BillingDetails < Stripe::StripeObject
61
+ class Address < Stripe::StripeObject
62
+ # City, district, suburb, town, or village.
63
+ attr_reader :city
64
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
65
+ attr_reader :country
66
+ # Address line 1 (e.g., street, PO Box, or company name).
67
+ attr_reader :line1
68
+ # Address line 2 (e.g., apartment, suite, unit, or building).
69
+ attr_reader :line2
70
+ # ZIP or postal code.
71
+ attr_reader :postal_code
72
+ # State, county, province, or region.
73
+ attr_reader :state
74
+ end
75
+ # Billing address.
76
+ attr_reader :address
77
+ # Email address.
78
+ attr_reader :email
79
+ # Full name.
80
+ attr_reader :name
81
+ # Billing phone number (including extension).
82
+ attr_reader :phone
83
+ # Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
84
+ attr_reader :tax_id
85
+ end
86
+
87
+ class Blik < Stripe::StripeObject; end
88
+
89
+ class Boleto < Stripe::StripeObject
90
+ # Uniquely identifies the customer tax id (CNPJ or CPF)
91
+ attr_reader :tax_id
92
+ end
93
+
94
+ class Card < Stripe::StripeObject
95
+ class Checks < Stripe::StripeObject
96
+ # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
97
+ attr_reader :address_line1_check
98
+ # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
99
+ attr_reader :address_postal_code_check
100
+ # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
101
+ attr_reader :cvc_check
102
+ end
103
+
104
+ class GeneratedFrom < Stripe::StripeObject
105
+ class PaymentMethodDetails < Stripe::StripeObject
106
+ class CardPresent < Stripe::StripeObject
107
+ class Offline < Stripe::StripeObject
108
+ # Time at which the payment was collected while offline
109
+ attr_reader :stored_at
110
+ # The method used to process this payment method offline. Only deferred is allowed.
111
+ attr_reader :type
112
+ end
113
+
114
+ class Receipt < Stripe::StripeObject
115
+ # The type of account being debited or credited
116
+ attr_reader :account_type
117
+ # EMV tag 9F26, cryptogram generated by the integrated circuit chip.
118
+ attr_reader :application_cryptogram
119
+ # Mnenomic of the Application Identifier.
120
+ attr_reader :application_preferred_name
121
+ # Identifier for this transaction.
122
+ attr_reader :authorization_code
123
+ # EMV tag 8A. A code returned by the card issuer.
124
+ attr_reader :authorization_response_code
125
+ # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`.
126
+ attr_reader :cardholder_verification_method
127
+ # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.
128
+ attr_reader :dedicated_file_name
129
+ # The outcome of a series of EMV functions performed by the card reader.
130
+ attr_reader :terminal_verification_results
131
+ # An indication of various EMV functions performed during the transaction.
132
+ attr_reader :transaction_status_information
133
+ end
134
+
135
+ class Wallet < Stripe::StripeObject
136
+ # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.
137
+ attr_reader :type
138
+ end
139
+ # The authorized amount
140
+ attr_reader :amount_authorized
141
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
142
+ attr_reader :brand
143
+ # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
144
+ attr_reader :brand_product
145
+ # When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured.
146
+ attr_reader :capture_before
147
+ # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
148
+ attr_reader :cardholder_name
149
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
150
+ attr_reader :country
151
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
152
+ attr_reader :description
153
+ # Authorization response cryptogram.
154
+ attr_reader :emv_auth_data
155
+ # Two-digit number representing the card's expiration month.
156
+ attr_reader :exp_month
157
+ # Four-digit number representing the card's expiration year.
158
+ attr_reader :exp_year
159
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
160
+ #
161
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
162
+ attr_reader :fingerprint
163
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
164
+ attr_reader :funding
165
+ # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod.
166
+ attr_reader :generated_card
167
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
168
+ attr_reader :iin
169
+ # Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support).
170
+ attr_reader :incremental_authorization_supported
171
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
172
+ attr_reader :issuer
173
+ # The last four digits of the card.
174
+ attr_reader :last4
175
+ # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
176
+ attr_reader :network
177
+ # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
178
+ attr_reader :network_transaction_id
179
+ # Details about payments collected offline.
180
+ attr_reader :offline
181
+ # Defines whether the authorized amount can be over-captured or not
182
+ attr_reader :overcapture_supported
183
+ # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
184
+ attr_reader :preferred_locales
185
+ # How card details were read in this transaction.
186
+ attr_reader :read_method
187
+ # A collection of fields required to be displayed on receipts. Only required for EMV transactions.
188
+ attr_reader :receipt
189
+ # Attribute for field wallet
190
+ attr_reader :wallet
191
+ end
192
+ # Attribute for field card_present
193
+ attr_reader :card_present
194
+ # The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`.
195
+ attr_reader :type
196
+ end
197
+ # The charge that created this object.
198
+ attr_reader :charge
199
+ # Transaction-specific details of the payment method used in the payment.
200
+ attr_reader :payment_method_details
201
+ # The ID of the SetupAttempt that generated this PaymentMethod, if any.
202
+ attr_reader :setup_attempt
203
+ end
204
+
205
+ class Networks < Stripe::StripeObject
206
+ # All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network).
207
+ attr_reader :available
208
+ # The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card.
209
+ attr_reader :preferred
210
+ end
211
+
212
+ class ThreeDSecureUsage < Stripe::StripeObject
213
+ # Whether 3D Secure is supported on this card.
214
+ attr_reader :supported
215
+ end
216
+
217
+ class Wallet < Stripe::StripeObject
218
+ class AmexExpressCheckout < Stripe::StripeObject; end
219
+ class ApplePay < Stripe::StripeObject; end
220
+ class GooglePay < Stripe::StripeObject; end
221
+ class Link < Stripe::StripeObject; end
222
+
223
+ class Masterpass < Stripe::StripeObject
224
+ class BillingAddress < Stripe::StripeObject
225
+ # City, district, suburb, town, or village.
226
+ attr_reader :city
227
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
228
+ attr_reader :country
229
+ # Address line 1 (e.g., street, PO Box, or company name).
230
+ attr_reader :line1
231
+ # Address line 2 (e.g., apartment, suite, unit, or building).
232
+ attr_reader :line2
233
+ # ZIP or postal code.
234
+ attr_reader :postal_code
235
+ # State, county, province, or region.
236
+ attr_reader :state
237
+ end
238
+
239
+ class ShippingAddress < Stripe::StripeObject
240
+ # City, district, suburb, town, or village.
241
+ attr_reader :city
242
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
243
+ attr_reader :country
244
+ # Address line 1 (e.g., street, PO Box, or company name).
245
+ attr_reader :line1
246
+ # Address line 2 (e.g., apartment, suite, unit, or building).
247
+ attr_reader :line2
248
+ # ZIP or postal code.
249
+ attr_reader :postal_code
250
+ # State, county, province, or region.
251
+ attr_reader :state
252
+ end
253
+ # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
254
+ attr_reader :billing_address
255
+ # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
256
+ attr_reader :email
257
+ # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
258
+ attr_reader :name
259
+ # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
260
+ attr_reader :shipping_address
261
+ end
262
+
263
+ class SamsungPay < Stripe::StripeObject; end
264
+
265
+ class VisaCheckout < Stripe::StripeObject
266
+ class BillingAddress < Stripe::StripeObject
267
+ # City, district, suburb, town, or village.
268
+ attr_reader :city
269
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
270
+ attr_reader :country
271
+ # Address line 1 (e.g., street, PO Box, or company name).
272
+ attr_reader :line1
273
+ # Address line 2 (e.g., apartment, suite, unit, or building).
274
+ attr_reader :line2
275
+ # ZIP or postal code.
276
+ attr_reader :postal_code
277
+ # State, county, province, or region.
278
+ attr_reader :state
279
+ end
280
+
281
+ class ShippingAddress < Stripe::StripeObject
282
+ # City, district, suburb, town, or village.
283
+ attr_reader :city
284
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
285
+ attr_reader :country
286
+ # Address line 1 (e.g., street, PO Box, or company name).
287
+ attr_reader :line1
288
+ # Address line 2 (e.g., apartment, suite, unit, or building).
289
+ attr_reader :line2
290
+ # ZIP or postal code.
291
+ attr_reader :postal_code
292
+ # State, county, province, or region.
293
+ attr_reader :state
294
+ end
295
+ # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
296
+ attr_reader :billing_address
297
+ # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
298
+ attr_reader :email
299
+ # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
300
+ attr_reader :name
301
+ # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
302
+ attr_reader :shipping_address
303
+ end
304
+ # Attribute for field amex_express_checkout
305
+ attr_reader :amex_express_checkout
306
+ # Attribute for field apple_pay
307
+ attr_reader :apple_pay
308
+ # (For tokenized numbers only.) The last four digits of the device account number.
309
+ attr_reader :dynamic_last4
310
+ # Attribute for field google_pay
311
+ attr_reader :google_pay
312
+ # Attribute for field link
313
+ attr_reader :link
314
+ # Attribute for field masterpass
315
+ attr_reader :masterpass
316
+ # Attribute for field samsung_pay
317
+ attr_reader :samsung_pay
318
+ # The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type.
319
+ attr_reader :type
320
+ # Attribute for field visa_checkout
321
+ attr_reader :visa_checkout
322
+ end
323
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
324
+ attr_reader :brand
325
+ # Checks on Card address and CVC if provided.
326
+ attr_reader :checks
327
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
328
+ attr_reader :country
329
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
330
+ attr_reader :description
331
+ # The brand to use when displaying the card, this accounts for customer's brand choice on dual-branded cards. Can be `american_express`, `cartes_bancaires`, `diners_club`, `discover`, `eftpos_australia`, `interac`, `jcb`, `mastercard`, `union_pay`, `visa`, or `other` and may contain more values in the future.
332
+ attr_reader :display_brand
333
+ # Two-digit number representing the card's expiration month.
334
+ attr_reader :exp_month
335
+ # Four-digit number representing the card's expiration year.
336
+ attr_reader :exp_year
337
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
338
+ #
339
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
340
+ attr_reader :fingerprint
341
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
342
+ attr_reader :funding
343
+ # Details of the original PaymentMethod that created this object.
344
+ attr_reader :generated_from
345
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
346
+ attr_reader :iin
347
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
348
+ attr_reader :issuer
349
+ # The last four digits of the card.
350
+ attr_reader :last4
351
+ # Contains information about card networks that can be used to process the payment.
352
+ attr_reader :networks
353
+ # Status of a card based on the card issuer.
354
+ attr_reader :regulated_status
355
+ # Contains details on how this Card may be used for 3D Secure authentication.
356
+ attr_reader :three_d_secure_usage
357
+ # If this Card is part of a card wallet, this contains the details of the card wallet.
358
+ attr_reader :wallet
359
+ end
360
+
361
+ class CardPresent < Stripe::StripeObject
362
+ class Networks < Stripe::StripeObject
363
+ # All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network).
364
+ attr_reader :available
365
+ # The preferred network for the card.
366
+ attr_reader :preferred
367
+ end
368
+
369
+ class Offline < Stripe::StripeObject
370
+ # Time at which the payment was collected while offline
371
+ attr_reader :stored_at
372
+ # The method used to process this payment method offline. Only deferred is allowed.
373
+ attr_reader :type
374
+ end
375
+
376
+ class Wallet < Stripe::StripeObject
377
+ # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.
378
+ attr_reader :type
379
+ end
380
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
381
+ attr_reader :brand
382
+ # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
383
+ attr_reader :brand_product
384
+ # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
385
+ attr_reader :cardholder_name
386
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
387
+ attr_reader :country
388
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
389
+ attr_reader :description
390
+ # Two-digit number representing the card's expiration month.
391
+ attr_reader :exp_month
392
+ # Four-digit number representing the card's expiration year.
393
+ attr_reader :exp_year
394
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
395
+ #
396
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
397
+ attr_reader :fingerprint
398
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
399
+ attr_reader :funding
400
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
401
+ attr_reader :iin
402
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
403
+ attr_reader :issuer
404
+ # The last four digits of the card.
405
+ attr_reader :last4
406
+ # Contains information about card networks that can be used to process the payment.
407
+ attr_reader :networks
408
+ # Details about payment methods collected offline.
409
+ attr_reader :offline
410
+ # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
411
+ attr_reader :preferred_locales
412
+ # How card details were read in this transaction.
413
+ attr_reader :read_method
414
+ # Attribute for field wallet
415
+ attr_reader :wallet
416
+ end
417
+
418
+ class Cashapp < Stripe::StripeObject
419
+ # A unique and immutable identifier assigned by Cash App to every buyer.
420
+ attr_reader :buyer_id
421
+ # A public identifier for buyers using Cash App.
422
+ attr_reader :cashtag
423
+ end
424
+
425
+ class CustomerBalance < Stripe::StripeObject; end
426
+
427
+ class Eps < Stripe::StripeObject
428
+ # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`.
429
+ attr_reader :bank
430
+ end
431
+
432
+ class Fpx < Stripe::StripeObject
433
+ # Account holder type, if provided. Can be one of `individual` or `company`.
434
+ attr_reader :account_holder_type
435
+ # The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`.
436
+ attr_reader :bank
437
+ end
438
+
439
+ class Giropay < Stripe::StripeObject; end
440
+ class Grabpay < Stripe::StripeObject; end
441
+
442
+ class Ideal < Stripe::StripeObject
443
+ # The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
444
+ attr_reader :bank
445
+ # The Bank Identifier Code of the customer's bank, if the bank was provided.
446
+ attr_reader :bic
447
+ end
448
+
449
+ class InteracPresent < Stripe::StripeObject
450
+ class Networks < Stripe::StripeObject
451
+ # All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network).
452
+ attr_reader :available
453
+ # The preferred network for the card.
454
+ attr_reader :preferred
455
+ end
456
+ # Card brand. Can be `interac`, `mastercard` or `visa`.
457
+ attr_reader :brand
458
+ # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
459
+ attr_reader :cardholder_name
460
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
461
+ attr_reader :country
462
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
463
+ attr_reader :description
464
+ # Two-digit number representing the card's expiration month.
465
+ attr_reader :exp_month
466
+ # Four-digit number representing the card's expiration year.
467
+ attr_reader :exp_year
468
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
469
+ #
470
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
471
+ attr_reader :fingerprint
472
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
473
+ attr_reader :funding
474
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
475
+ attr_reader :iin
476
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
477
+ attr_reader :issuer
478
+ # The last four digits of the card.
479
+ attr_reader :last4
480
+ # Contains information about card networks that can be used to process the payment.
481
+ attr_reader :networks
482
+ # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
483
+ attr_reader :preferred_locales
484
+ # How card details were read in this transaction.
485
+ attr_reader :read_method
486
+ end
487
+
488
+ class KakaoPay < Stripe::StripeObject; end
489
+
490
+ class Klarna < Stripe::StripeObject
491
+ class Dob < Stripe::StripeObject
492
+ # The day of birth, between 1 and 31.
493
+ attr_reader :day
494
+ # The month of birth, between 1 and 12.
495
+ attr_reader :month
496
+ # The four-digit year of birth.
497
+ attr_reader :year
498
+ end
499
+ # The customer's date of birth, if provided.
500
+ attr_reader :dob
501
+ end
502
+
503
+ class Konbini < Stripe::StripeObject; end
504
+
505
+ class KrCard < Stripe::StripeObject
506
+ # The local credit or debit card brand.
507
+ attr_reader :brand
508
+ # The last four digits of the card. This may not be present for American Express cards.
509
+ attr_reader :last4
510
+ end
511
+
512
+ class Link < Stripe::StripeObject
513
+ # Account owner's email address.
514
+ attr_reader :email
515
+ # [Deprecated] This is a legacy parameter that no longer has any function.
516
+ attr_reader :persistent_token
517
+ end
518
+
519
+ class Mobilepay < Stripe::StripeObject; end
520
+ class Multibanco < Stripe::StripeObject; end
521
+
522
+ class NaverPay < Stripe::StripeObject
523
+ # Uniquely identifies this particular Naver Pay account. You can use this attribute to check whether two Naver Pay accounts are the same.
524
+ attr_reader :buyer_id
525
+ # Whether to fund this transaction with Naver Pay points or a card.
526
+ attr_reader :funding
527
+ end
528
+
529
+ class NzBankAccount < Stripe::StripeObject
530
+ # The name on the bank account. Only present if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
531
+ attr_reader :account_holder_name
532
+ # The numeric code for the bank account's bank.
533
+ attr_reader :bank_code
534
+ # The name of the bank.
535
+ attr_reader :bank_name
536
+ # The numeric code for the bank account's bank branch.
537
+ attr_reader :branch_code
538
+ # Last four digits of the bank account number.
539
+ attr_reader :last4
540
+ # The suffix of the bank account number.
541
+ attr_reader :suffix
542
+ end
543
+
544
+ class Oxxo < Stripe::StripeObject; end
545
+
546
+ class P24 < Stripe::StripeObject
547
+ # The customer's bank, if provided.
548
+ attr_reader :bank
549
+ end
550
+
551
+ class PayByBank < Stripe::StripeObject; end
552
+ class Payco < Stripe::StripeObject; end
553
+ class Paynow < Stripe::StripeObject; end
554
+
555
+ class Paypal < Stripe::StripeObject
556
+ # Two-letter ISO code representing the buyer's country. Values are provided by PayPal directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
557
+ attr_reader :country
558
+ # Owner's email. Values are provided by PayPal directly
559
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
560
+ attr_reader :payer_email
561
+ # PayPal account PayerID. This identifier uniquely identifies the PayPal customer.
562
+ attr_reader :payer_id
563
+ end
564
+
565
+ class Pix < Stripe::StripeObject; end
566
+ class Promptpay < Stripe::StripeObject; end
567
+
568
+ class RadarOptions < Stripe::StripeObject
569
+ # 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.
570
+ attr_reader :session
571
+ end
572
+
573
+ class RevolutPay < Stripe::StripeObject; end
574
+ class SamsungPay < Stripe::StripeObject; end
575
+ class Satispay < Stripe::StripeObject; end
576
+
577
+ class SepaDebit < Stripe::StripeObject
578
+ class GeneratedFrom < Stripe::StripeObject
579
+ # The ID of the Charge that generated this PaymentMethod, if any.
580
+ attr_reader :charge
581
+ # The ID of the SetupAttempt that generated this PaymentMethod, if any.
582
+ attr_reader :setup_attempt
583
+ end
584
+ # Bank code of bank associated with the bank account.
585
+ attr_reader :bank_code
586
+ # Branch code of bank associated with the bank account.
587
+ attr_reader :branch_code
588
+ # Two-letter ISO code representing the country the bank account is located in.
589
+ attr_reader :country
590
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
591
+ attr_reader :fingerprint
592
+ # Information about the object that generated this PaymentMethod.
593
+ attr_reader :generated_from
594
+ # Last four characters of the IBAN.
595
+ attr_reader :last4
596
+ end
597
+
598
+ class Sofort < Stripe::StripeObject
599
+ # Two-letter ISO code representing the country the bank account is located in.
600
+ attr_reader :country
601
+ end
602
+
603
+ class Swish < Stripe::StripeObject; end
604
+ class Twint < Stripe::StripeObject; end
605
+
606
+ class UsBankAccount < Stripe::StripeObject
607
+ class Networks < Stripe::StripeObject
608
+ # The preferred network.
609
+ attr_reader :preferred
610
+ # All supported networks.
611
+ attr_reader :supported
612
+ end
613
+
614
+ class StatusDetails < Stripe::StripeObject
615
+ class Blocked < Stripe::StripeObject
616
+ # The ACH network code that resulted in this block.
617
+ attr_reader :network_code
618
+ # The reason why this PaymentMethod's fingerprint has been blocked
619
+ attr_reader :reason
620
+ end
621
+ # Attribute for field blocked
622
+ attr_reader :blocked
623
+ end
624
+ # Account holder type: individual or company.
625
+ attr_reader :account_holder_type
626
+ # Account type: checkings or savings. Defaults to checking if omitted.
627
+ attr_reader :account_type
628
+ # The name of the bank.
629
+ attr_reader :bank_name
630
+ # The ID of the Financial Connections Account used to create the payment method.
631
+ attr_reader :financial_connections_account
632
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
633
+ attr_reader :fingerprint
634
+ # Last four digits of the bank account number.
635
+ attr_reader :last4
636
+ # Contains information about US bank account networks that can be used.
637
+ attr_reader :networks
638
+ # Routing number of the bank account.
639
+ attr_reader :routing_number
640
+ # Contains information about the future reusability of this PaymentMethod.
641
+ attr_reader :status_details
642
+ end
643
+
644
+ class WechatPay < Stripe::StripeObject; end
645
+ class Zip < Stripe::StripeObject; end
646
+
647
+ class ListParams < Stripe::RequestParams
648
+ # The ID of the customer whose PaymentMethods will be retrieved.
649
+ attr_accessor :customer
650
+ # 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.
651
+ attr_accessor :ending_before
652
+ # Specifies which fields in the response should be expanded.
653
+ attr_accessor :expand
654
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
655
+ attr_accessor :limit
656
+ # 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.
657
+ attr_accessor :starting_after
658
+ # An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request.
659
+ attr_accessor :type
660
+
661
+ def initialize(
662
+ customer: nil,
663
+ ending_before: nil,
664
+ expand: nil,
665
+ limit: nil,
666
+ starting_after: nil,
667
+ type: nil
668
+ )
669
+ @customer = customer
670
+ @ending_before = ending_before
671
+ @expand = expand
672
+ @limit = limit
673
+ @starting_after = starting_after
674
+ @type = type
675
+ end
676
+ end
677
+
678
+ class CreateParams < Stripe::RequestParams
679
+ class AcssDebit < Stripe::RequestParams
680
+ # Customer's bank account number.
681
+ attr_accessor :account_number
682
+ # Institution number of the customer's bank.
683
+ attr_accessor :institution_number
684
+ # Transit number of the customer's bank.
685
+ attr_accessor :transit_number
686
+
687
+ def initialize(account_number: nil, institution_number: nil, transit_number: nil)
688
+ @account_number = account_number
689
+ @institution_number = institution_number
690
+ @transit_number = transit_number
691
+ end
692
+ end
693
+
694
+ class Affirm < Stripe::RequestParams; end
695
+ class AfterpayClearpay < Stripe::RequestParams; end
696
+ class Alipay < Stripe::RequestParams; end
697
+ class Alma < Stripe::RequestParams; end
698
+ class AmazonPay < Stripe::RequestParams; end
699
+
700
+ class AuBecsDebit < Stripe::RequestParams
701
+ # The account number for the bank account.
702
+ attr_accessor :account_number
703
+ # Bank-State-Branch number of the bank account.
704
+ attr_accessor :bsb_number
705
+
706
+ def initialize(account_number: nil, bsb_number: nil)
707
+ @account_number = account_number
708
+ @bsb_number = bsb_number
709
+ end
710
+ end
711
+
712
+ class BacsDebit < Stripe::RequestParams
713
+ # Account number of the bank account that the funds will be debited from.
714
+ attr_accessor :account_number
715
+ # Sort code of the bank account. (e.g., `10-20-30`)
716
+ attr_accessor :sort_code
717
+
718
+ def initialize(account_number: nil, sort_code: nil)
719
+ @account_number = account_number
720
+ @sort_code = sort_code
721
+ end
722
+ end
723
+
724
+ class Bancontact < Stripe::RequestParams; end
725
+ class Billie < Stripe::RequestParams; end
11
726
 
12
- custom_method :attach, http_verb: :post
13
- custom_method :detach, http_verb: :post
727
+ class BillingDetails < Stripe::RequestParams
728
+ class Address < Stripe::RequestParams
729
+ # City, district, suburb, town, or village.
730
+ attr_accessor :city
731
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
732
+ attr_accessor :country
733
+ # Address line 1 (e.g., street, PO Box, or company name).
734
+ attr_accessor :line1
735
+ # Address line 2 (e.g., apartment, suite, unit, or building).
736
+ attr_accessor :line2
737
+ # ZIP or postal code.
738
+ attr_accessor :postal_code
739
+ # State, county, province, or region.
740
+ attr_accessor :state
14
741
 
742
+ def initialize(
743
+ city: nil,
744
+ country: nil,
745
+ line1: nil,
746
+ line2: nil,
747
+ postal_code: nil,
748
+ state: nil
749
+ )
750
+ @city = city
751
+ @country = country
752
+ @line1 = line1
753
+ @line2 = line2
754
+ @postal_code = postal_code
755
+ @state = state
756
+ end
757
+ end
758
+ # Billing address.
759
+ attr_accessor :address
760
+ # Email address.
761
+ attr_accessor :email
762
+ # Full name.
763
+ attr_accessor :name
764
+ # Billing phone number (including extension).
765
+ attr_accessor :phone
766
+ # Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
767
+ attr_accessor :tax_id
768
+
769
+ def initialize(address: nil, email: nil, name: nil, phone: nil, tax_id: nil)
770
+ @address = address
771
+ @email = email
772
+ @name = name
773
+ @phone = phone
774
+ @tax_id = tax_id
775
+ end
776
+ end
777
+
778
+ class Blik < Stripe::RequestParams; end
779
+
780
+ class Boleto < Stripe::RequestParams
781
+ # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
782
+ attr_accessor :tax_id
783
+
784
+ def initialize(tax_id: nil)
785
+ @tax_id = tax_id
786
+ end
787
+ end
788
+
789
+ class Card < Stripe::RequestParams
790
+ class Networks < Stripe::RequestParams
791
+ # The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card.
792
+ attr_accessor :preferred
793
+
794
+ def initialize(preferred: nil)
795
+ @preferred = preferred
796
+ end
797
+ end
798
+ # The card's CVC. It is highly recommended to always include this value.
799
+ attr_accessor :cvc
800
+ # Two-digit number representing the card's expiration month.
801
+ attr_accessor :exp_month
802
+ # Four-digit number representing the card's expiration year.
803
+ attr_accessor :exp_year
804
+ # Contains information about card networks used to process the payment.
805
+ attr_accessor :networks
806
+ # The card number, as a string without any separators.
807
+ attr_accessor :number
808
+ # For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: {token: "tok_visa"}.
809
+ attr_accessor :token
810
+
811
+ def initialize(
812
+ cvc: nil,
813
+ exp_month: nil,
814
+ exp_year: nil,
815
+ networks: nil,
816
+ number: nil,
817
+ token: nil
818
+ )
819
+ @cvc = cvc
820
+ @exp_month = exp_month
821
+ @exp_year = exp_year
822
+ @networks = networks
823
+ @number = number
824
+ @token = token
825
+ end
826
+ end
827
+
828
+ class Cashapp < Stripe::RequestParams; end
829
+ class CustomerBalance < Stripe::RequestParams; end
830
+
831
+ class Eps < Stripe::RequestParams
832
+ # The customer's bank.
833
+ attr_accessor :bank
834
+
835
+ def initialize(bank: nil)
836
+ @bank = bank
837
+ end
838
+ end
839
+
840
+ class Fpx < Stripe::RequestParams
841
+ # Account holder type for FPX transaction
842
+ attr_accessor :account_holder_type
843
+ # The customer's bank.
844
+ attr_accessor :bank
845
+
846
+ def initialize(account_holder_type: nil, bank: nil)
847
+ @account_holder_type = account_holder_type
848
+ @bank = bank
849
+ end
850
+ end
851
+
852
+ class Giropay < Stripe::RequestParams; end
853
+ class Grabpay < Stripe::RequestParams; end
854
+
855
+ class Ideal < Stripe::RequestParams
856
+ # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
857
+ attr_accessor :bank
858
+
859
+ def initialize(bank: nil)
860
+ @bank = bank
861
+ end
862
+ end
863
+
864
+ class InteracPresent < Stripe::RequestParams; end
865
+ class KakaoPay < Stripe::RequestParams; end
866
+
867
+ class Klarna < Stripe::RequestParams
868
+ class Dob < Stripe::RequestParams
869
+ # The day of birth, between 1 and 31.
870
+ attr_accessor :day
871
+ # The month of birth, between 1 and 12.
872
+ attr_accessor :month
873
+ # The four-digit year of birth.
874
+ attr_accessor :year
875
+
876
+ def initialize(day: nil, month: nil, year: nil)
877
+ @day = day
878
+ @month = month
879
+ @year = year
880
+ end
881
+ end
882
+ # Customer's date of birth
883
+ attr_accessor :dob
884
+
885
+ def initialize(dob: nil)
886
+ @dob = dob
887
+ end
888
+ end
889
+
890
+ class Konbini < Stripe::RequestParams; end
891
+ class KrCard < Stripe::RequestParams; end
892
+ class Link < Stripe::RequestParams; end
893
+ class Mobilepay < Stripe::RequestParams; end
894
+ class Multibanco < Stripe::RequestParams; end
895
+
896
+ class NaverPay < Stripe::RequestParams
897
+ # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
898
+ attr_accessor :funding
899
+
900
+ def initialize(funding: nil)
901
+ @funding = funding
902
+ end
903
+ end
904
+
905
+ class NzBankAccount < Stripe::RequestParams
906
+ # 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.
907
+ attr_accessor :account_holder_name
908
+ # The account number for the bank account.
909
+ attr_accessor :account_number
910
+ # The numeric code for the bank account's bank.
911
+ attr_accessor :bank_code
912
+ # The numeric code for the bank account's bank branch.
913
+ attr_accessor :branch_code
914
+ # Attribute for param field reference
915
+ attr_accessor :reference
916
+ # The suffix of the bank account number.
917
+ attr_accessor :suffix
918
+
919
+ def initialize(
920
+ account_holder_name: nil,
921
+ account_number: nil,
922
+ bank_code: nil,
923
+ branch_code: nil,
924
+ reference: nil,
925
+ suffix: nil
926
+ )
927
+ @account_holder_name = account_holder_name
928
+ @account_number = account_number
929
+ @bank_code = bank_code
930
+ @branch_code = branch_code
931
+ @reference = reference
932
+ @suffix = suffix
933
+ end
934
+ end
935
+
936
+ class Oxxo < Stripe::RequestParams; end
937
+
938
+ class P24 < Stripe::RequestParams
939
+ # The customer's bank.
940
+ attr_accessor :bank
941
+
942
+ def initialize(bank: nil)
943
+ @bank = bank
944
+ end
945
+ end
946
+
947
+ class PayByBank < Stripe::RequestParams; end
948
+ class Payco < Stripe::RequestParams; end
949
+ class Paynow < Stripe::RequestParams; end
950
+ class Paypal < Stripe::RequestParams; end
951
+ class Pix < Stripe::RequestParams; end
952
+ class Promptpay < Stripe::RequestParams; end
953
+
954
+ class RadarOptions < Stripe::RequestParams
955
+ # 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.
956
+ attr_accessor :session
957
+
958
+ def initialize(session: nil)
959
+ @session = session
960
+ end
961
+ end
962
+
963
+ class RevolutPay < Stripe::RequestParams; end
964
+ class SamsungPay < Stripe::RequestParams; end
965
+ class Satispay < Stripe::RequestParams; end
966
+
967
+ class SepaDebit < Stripe::RequestParams
968
+ # IBAN of the bank account.
969
+ attr_accessor :iban
970
+
971
+ def initialize(iban: nil)
972
+ @iban = iban
973
+ end
974
+ end
975
+
976
+ class Sofort < Stripe::RequestParams
977
+ # Two-letter ISO code representing the country the bank account is located in.
978
+ attr_accessor :country
979
+
980
+ def initialize(country: nil)
981
+ @country = country
982
+ end
983
+ end
984
+
985
+ class Swish < Stripe::RequestParams; end
986
+ class Twint < Stripe::RequestParams; end
987
+
988
+ class UsBankAccount < Stripe::RequestParams
989
+ # Account holder type: individual or company.
990
+ attr_accessor :account_holder_type
991
+ # Account number of the bank account.
992
+ attr_accessor :account_number
993
+ # Account type: checkings or savings. Defaults to checking if omitted.
994
+ attr_accessor :account_type
995
+ # The ID of a Financial Connections Account to use as a payment method.
996
+ attr_accessor :financial_connections_account
997
+ # Routing number of the bank account.
998
+ attr_accessor :routing_number
999
+
1000
+ def initialize(
1001
+ account_holder_type: nil,
1002
+ account_number: nil,
1003
+ account_type: nil,
1004
+ financial_connections_account: nil,
1005
+ routing_number: nil
1006
+ )
1007
+ @account_holder_type = account_holder_type
1008
+ @account_number = account_number
1009
+ @account_type = account_type
1010
+ @financial_connections_account = financial_connections_account
1011
+ @routing_number = routing_number
1012
+ end
1013
+ end
1014
+
1015
+ class WechatPay < Stripe::RequestParams; end
1016
+ class Zip < Stripe::RequestParams; end
1017
+ # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
1018
+ attr_accessor :acss_debit
1019
+ # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
1020
+ attr_accessor :affirm
1021
+ # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
1022
+ attr_accessor :afterpay_clearpay
1023
+ # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
1024
+ attr_accessor :alipay
1025
+ # 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`.
1026
+ attr_accessor :allow_redisplay
1027
+ # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
1028
+ attr_accessor :alma
1029
+ # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
1030
+ attr_accessor :amazon_pay
1031
+ # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
1032
+ attr_accessor :au_becs_debit
1033
+ # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
1034
+ attr_accessor :bacs_debit
1035
+ # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
1036
+ attr_accessor :bancontact
1037
+ # If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method.
1038
+ attr_accessor :billie
1039
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
1040
+ attr_accessor :billing_details
1041
+ # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
1042
+ attr_accessor :blik
1043
+ # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
1044
+ attr_accessor :boleto
1045
+ # If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly.
1046
+ attr_accessor :card
1047
+ # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
1048
+ attr_accessor :cashapp
1049
+ # The `Customer` to whom the original PaymentMethod is attached.
1050
+ attr_accessor :customer
1051
+ # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
1052
+ attr_accessor :customer_balance
1053
+ # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
1054
+ attr_accessor :eps
1055
+ # Specifies which fields in the response should be expanded.
1056
+ attr_accessor :expand
1057
+ # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
1058
+ attr_accessor :fpx
1059
+ # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
1060
+ attr_accessor :giropay
1061
+ # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
1062
+ attr_accessor :grabpay
1063
+ # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
1064
+ attr_accessor :ideal
1065
+ # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
1066
+ attr_accessor :interac_present
1067
+ # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
1068
+ attr_accessor :kakao_pay
1069
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
1070
+ attr_accessor :klarna
1071
+ # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
1072
+ attr_accessor :konbini
1073
+ # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
1074
+ attr_accessor :kr_card
1075
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
1076
+ attr_accessor :link
1077
+ # 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`.
1078
+ attr_accessor :metadata
1079
+ # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
1080
+ attr_accessor :mobilepay
1081
+ # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
1082
+ attr_accessor :multibanco
1083
+ # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
1084
+ attr_accessor :naver_pay
1085
+ # If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
1086
+ attr_accessor :nz_bank_account
1087
+ # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
1088
+ attr_accessor :oxxo
1089
+ # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
1090
+ attr_accessor :p24
1091
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
1092
+ attr_accessor :pay_by_bank
1093
+ # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
1094
+ attr_accessor :payco
1095
+ # The PaymentMethod to share.
1096
+ attr_accessor :payment_method
1097
+ # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
1098
+ attr_accessor :paynow
1099
+ # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
1100
+ attr_accessor :paypal
1101
+ # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
1102
+ attr_accessor :pix
1103
+ # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
1104
+ attr_accessor :promptpay
1105
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
1106
+ attr_accessor :radar_options
1107
+ # If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
1108
+ attr_accessor :revolut_pay
1109
+ # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
1110
+ attr_accessor :samsung_pay
1111
+ # If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method.
1112
+ attr_accessor :satispay
1113
+ # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
1114
+ attr_accessor :sepa_debit
1115
+ # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
1116
+ attr_accessor :sofort
1117
+ # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
1118
+ attr_accessor :swish
1119
+ # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
1120
+ attr_accessor :twint
1121
+ # 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.
1122
+ attr_accessor :type
1123
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
1124
+ attr_accessor :us_bank_account
1125
+ # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
1126
+ attr_accessor :wechat_pay
1127
+ # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
1128
+ attr_accessor :zip
1129
+
1130
+ def initialize(
1131
+ acss_debit: nil,
1132
+ affirm: nil,
1133
+ afterpay_clearpay: nil,
1134
+ alipay: nil,
1135
+ allow_redisplay: nil,
1136
+ alma: nil,
1137
+ amazon_pay: nil,
1138
+ au_becs_debit: nil,
1139
+ bacs_debit: nil,
1140
+ bancontact: nil,
1141
+ billie: nil,
1142
+ billing_details: nil,
1143
+ blik: nil,
1144
+ boleto: nil,
1145
+ card: nil,
1146
+ cashapp: nil,
1147
+ customer: nil,
1148
+ customer_balance: nil,
1149
+ eps: nil,
1150
+ expand: nil,
1151
+ fpx: nil,
1152
+ giropay: nil,
1153
+ grabpay: nil,
1154
+ ideal: nil,
1155
+ interac_present: nil,
1156
+ kakao_pay: nil,
1157
+ klarna: nil,
1158
+ konbini: nil,
1159
+ kr_card: nil,
1160
+ link: nil,
1161
+ metadata: nil,
1162
+ mobilepay: nil,
1163
+ multibanco: nil,
1164
+ naver_pay: nil,
1165
+ nz_bank_account: nil,
1166
+ oxxo: nil,
1167
+ p24: nil,
1168
+ pay_by_bank: nil,
1169
+ payco: nil,
1170
+ payment_method: nil,
1171
+ paynow: nil,
1172
+ paypal: nil,
1173
+ pix: nil,
1174
+ promptpay: nil,
1175
+ radar_options: nil,
1176
+ revolut_pay: nil,
1177
+ samsung_pay: nil,
1178
+ satispay: nil,
1179
+ sepa_debit: nil,
1180
+ sofort: nil,
1181
+ swish: nil,
1182
+ twint: nil,
1183
+ type: nil,
1184
+ us_bank_account: nil,
1185
+ wechat_pay: nil,
1186
+ zip: nil
1187
+ )
1188
+ @acss_debit = acss_debit
1189
+ @affirm = affirm
1190
+ @afterpay_clearpay = afterpay_clearpay
1191
+ @alipay = alipay
1192
+ @allow_redisplay = allow_redisplay
1193
+ @alma = alma
1194
+ @amazon_pay = amazon_pay
1195
+ @au_becs_debit = au_becs_debit
1196
+ @bacs_debit = bacs_debit
1197
+ @bancontact = bancontact
1198
+ @billie = billie
1199
+ @billing_details = billing_details
1200
+ @blik = blik
1201
+ @boleto = boleto
1202
+ @card = card
1203
+ @cashapp = cashapp
1204
+ @customer = customer
1205
+ @customer_balance = customer_balance
1206
+ @eps = eps
1207
+ @expand = expand
1208
+ @fpx = fpx
1209
+ @giropay = giropay
1210
+ @grabpay = grabpay
1211
+ @ideal = ideal
1212
+ @interac_present = interac_present
1213
+ @kakao_pay = kakao_pay
1214
+ @klarna = klarna
1215
+ @konbini = konbini
1216
+ @kr_card = kr_card
1217
+ @link = link
1218
+ @metadata = metadata
1219
+ @mobilepay = mobilepay
1220
+ @multibanco = multibanco
1221
+ @naver_pay = naver_pay
1222
+ @nz_bank_account = nz_bank_account
1223
+ @oxxo = oxxo
1224
+ @p24 = p24
1225
+ @pay_by_bank = pay_by_bank
1226
+ @payco = payco
1227
+ @payment_method = payment_method
1228
+ @paynow = paynow
1229
+ @paypal = paypal
1230
+ @pix = pix
1231
+ @promptpay = promptpay
1232
+ @radar_options = radar_options
1233
+ @revolut_pay = revolut_pay
1234
+ @samsung_pay = samsung_pay
1235
+ @satispay = satispay
1236
+ @sepa_debit = sepa_debit
1237
+ @sofort = sofort
1238
+ @swish = swish
1239
+ @twint = twint
1240
+ @type = type
1241
+ @us_bank_account = us_bank_account
1242
+ @wechat_pay = wechat_pay
1243
+ @zip = zip
1244
+ end
1245
+ end
1246
+
1247
+ class UpdateParams < Stripe::RequestParams
1248
+ class BillingDetails < Stripe::RequestParams
1249
+ class Address < Stripe::RequestParams
1250
+ # City, district, suburb, town, or village.
1251
+ attr_accessor :city
1252
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
1253
+ attr_accessor :country
1254
+ # Address line 1 (e.g., street, PO Box, or company name).
1255
+ attr_accessor :line1
1256
+ # Address line 2 (e.g., apartment, suite, unit, or building).
1257
+ attr_accessor :line2
1258
+ # ZIP or postal code.
1259
+ attr_accessor :postal_code
1260
+ # State, county, province, or region.
1261
+ attr_accessor :state
1262
+
1263
+ def initialize(
1264
+ city: nil,
1265
+ country: nil,
1266
+ line1: nil,
1267
+ line2: nil,
1268
+ postal_code: nil,
1269
+ state: nil
1270
+ )
1271
+ @city = city
1272
+ @country = country
1273
+ @line1 = line1
1274
+ @line2 = line2
1275
+ @postal_code = postal_code
1276
+ @state = state
1277
+ end
1278
+ end
1279
+ # Billing address.
1280
+ attr_accessor :address
1281
+ # Email address.
1282
+ attr_accessor :email
1283
+ # Full name.
1284
+ attr_accessor :name
1285
+ # Billing phone number (including extension).
1286
+ attr_accessor :phone
1287
+ # Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
1288
+ attr_accessor :tax_id
1289
+
1290
+ def initialize(address: nil, email: nil, name: nil, phone: nil, tax_id: nil)
1291
+ @address = address
1292
+ @email = email
1293
+ @name = name
1294
+ @phone = phone
1295
+ @tax_id = tax_id
1296
+ end
1297
+ end
1298
+
1299
+ class Card < Stripe::RequestParams
1300
+ class Networks < Stripe::RequestParams
1301
+ # The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card.
1302
+ attr_accessor :preferred
1303
+
1304
+ def initialize(preferred: nil)
1305
+ @preferred = preferred
1306
+ end
1307
+ end
1308
+ # Two-digit number representing the card's expiration month.
1309
+ attr_accessor :exp_month
1310
+ # Four-digit number representing the card's expiration year.
1311
+ attr_accessor :exp_year
1312
+ # Contains information about card networks used to process the payment.
1313
+ attr_accessor :networks
1314
+
1315
+ def initialize(exp_month: nil, exp_year: nil, networks: nil)
1316
+ @exp_month = exp_month
1317
+ @exp_year = exp_year
1318
+ @networks = networks
1319
+ end
1320
+ end
1321
+
1322
+ class Link < Stripe::RequestParams; end
1323
+ class PayByBank < Stripe::RequestParams; end
1324
+
1325
+ class UsBankAccount < Stripe::RequestParams
1326
+ # Bank account holder type.
1327
+ attr_accessor :account_holder_type
1328
+ # Bank account type.
1329
+ attr_accessor :account_type
1330
+
1331
+ def initialize(account_holder_type: nil, account_type: nil)
1332
+ @account_holder_type = account_holder_type
1333
+ @account_type = account_type
1334
+ end
1335
+ end
1336
+ # 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`.
1337
+ attr_accessor :allow_redisplay
1338
+ # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
1339
+ attr_accessor :billing_details
1340
+ # If this is a `card` PaymentMethod, this hash contains the user's card details.
1341
+ attr_accessor :card
1342
+ # Specifies which fields in the response should be expanded.
1343
+ attr_accessor :expand
1344
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
1345
+ attr_accessor :link
1346
+ # 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`.
1347
+ attr_accessor :metadata
1348
+ # If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
1349
+ attr_accessor :pay_by_bank
1350
+ # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
1351
+ attr_accessor :us_bank_account
1352
+
1353
+ def initialize(
1354
+ allow_redisplay: nil,
1355
+ billing_details: nil,
1356
+ card: nil,
1357
+ expand: nil,
1358
+ link: nil,
1359
+ metadata: nil,
1360
+ pay_by_bank: nil,
1361
+ us_bank_account: nil
1362
+ )
1363
+ @allow_redisplay = allow_redisplay
1364
+ @billing_details = billing_details
1365
+ @card = card
1366
+ @expand = expand
1367
+ @link = link
1368
+ @metadata = metadata
1369
+ @pay_by_bank = pay_by_bank
1370
+ @us_bank_account = us_bank_account
1371
+ end
1372
+ end
1373
+
1374
+ class AttachParams < Stripe::RequestParams
1375
+ # The ID of the customer to which to attach the PaymentMethod.
1376
+ attr_accessor :customer
1377
+ # Specifies which fields in the response should be expanded.
1378
+ attr_accessor :expand
1379
+
1380
+ def initialize(customer: nil, expand: nil)
1381
+ @customer = customer
1382
+ @expand = expand
1383
+ end
1384
+ end
1385
+
1386
+ class DetachParams < Stripe::RequestParams
1387
+ # Specifies which fields in the response should be expanded.
1388
+ attr_accessor :expand
1389
+
1390
+ def initialize(expand: nil)
1391
+ @expand = expand
1392
+ end
1393
+ end
1394
+ # Attribute for field acss_debit
1395
+ attr_reader :acss_debit
1396
+ # Attribute for field affirm
1397
+ attr_reader :affirm
1398
+ # Attribute for field afterpay_clearpay
1399
+ attr_reader :afterpay_clearpay
1400
+ # Attribute for field alipay
1401
+ attr_reader :alipay
1402
+ # 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”.
1403
+ attr_reader :allow_redisplay
1404
+ # Attribute for field alma
1405
+ attr_reader :alma
1406
+ # Attribute for field amazon_pay
1407
+ attr_reader :amazon_pay
1408
+ # Attribute for field au_becs_debit
1409
+ attr_reader :au_becs_debit
1410
+ # Attribute for field bacs_debit
1411
+ attr_reader :bacs_debit
1412
+ # Attribute for field bancontact
1413
+ attr_reader :bancontact
1414
+ # Attribute for field billie
1415
+ attr_reader :billie
1416
+ # Attribute for field billing_details
1417
+ attr_reader :billing_details
1418
+ # Attribute for field blik
1419
+ attr_reader :blik
1420
+ # Attribute for field boleto
1421
+ attr_reader :boleto
1422
+ # Attribute for field card
1423
+ attr_reader :card
1424
+ # Attribute for field card_present
1425
+ attr_reader :card_present
1426
+ # Attribute for field cashapp
1427
+ attr_reader :cashapp
1428
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
1429
+ attr_reader :created
1430
+ # The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer.
1431
+ attr_reader :customer
1432
+ # Attribute for field customer_balance
1433
+ attr_reader :customer_balance
1434
+ # Attribute for field eps
1435
+ attr_reader :eps
1436
+ # Attribute for field fpx
1437
+ attr_reader :fpx
1438
+ # Attribute for field giropay
1439
+ attr_reader :giropay
1440
+ # Attribute for field grabpay
1441
+ attr_reader :grabpay
1442
+ # Unique identifier for the object.
1443
+ attr_reader :id
1444
+ # Attribute for field ideal
1445
+ attr_reader :ideal
1446
+ # Attribute for field interac_present
1447
+ attr_reader :interac_present
1448
+ # Attribute for field kakao_pay
1449
+ attr_reader :kakao_pay
1450
+ # Attribute for field klarna
1451
+ attr_reader :klarna
1452
+ # Attribute for field konbini
1453
+ attr_reader :konbini
1454
+ # Attribute for field kr_card
1455
+ attr_reader :kr_card
1456
+ # Attribute for field link
1457
+ attr_reader :link
1458
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
1459
+ attr_reader :livemode
1460
+ # 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.
1461
+ attr_reader :metadata
1462
+ # Attribute for field mobilepay
1463
+ attr_reader :mobilepay
1464
+ # Attribute for field multibanco
1465
+ attr_reader :multibanco
1466
+ # Attribute for field naver_pay
1467
+ attr_reader :naver_pay
1468
+ # Attribute for field nz_bank_account
1469
+ attr_reader :nz_bank_account
1470
+ # String representing the object's type. Objects of the same type share the same value.
1471
+ attr_reader :object
1472
+ # Attribute for field oxxo
1473
+ attr_reader :oxxo
1474
+ # Attribute for field p24
1475
+ attr_reader :p24
1476
+ # Attribute for field pay_by_bank
1477
+ attr_reader :pay_by_bank
1478
+ # Attribute for field payco
1479
+ attr_reader :payco
1480
+ # Attribute for field paynow
1481
+ attr_reader :paynow
1482
+ # Attribute for field paypal
1483
+ attr_reader :paypal
1484
+ # Attribute for field pix
1485
+ attr_reader :pix
1486
+ # Attribute for field promptpay
1487
+ attr_reader :promptpay
1488
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
1489
+ attr_reader :radar_options
1490
+ # Attribute for field revolut_pay
1491
+ attr_reader :revolut_pay
1492
+ # Attribute for field samsung_pay
1493
+ attr_reader :samsung_pay
1494
+ # Attribute for field satispay
1495
+ attr_reader :satispay
1496
+ # Attribute for field sepa_debit
1497
+ attr_reader :sepa_debit
1498
+ # Attribute for field sofort
1499
+ attr_reader :sofort
1500
+ # Attribute for field swish
1501
+ attr_reader :swish
1502
+ # Attribute for field twint
1503
+ attr_reader :twint
1504
+ # 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.
1505
+ attr_reader :type
1506
+ # Attribute for field us_bank_account
1507
+ attr_reader :us_bank_account
1508
+ # Attribute for field wechat_pay
1509
+ attr_reader :wechat_pay
1510
+ # Attribute for field zip
1511
+ attr_reader :zip
1512
+
1513
+ # Attaches a PaymentMethod object to a Customer.
1514
+ #
1515
+ # To attach a new PaymentMethod to a customer for future payments, we recommend you use a [SetupIntent](https://docs.stripe.com/docs/api/setup_intents)
1516
+ # or a PaymentIntent with [setup_future_usage](https://docs.stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage).
1517
+ # These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach
1518
+ # endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for
1519
+ # future use, which makes later declines and payment friction more likely.
1520
+ # See [Optimizing cards for future payments](https://docs.stripe.com/docs/payments/payment-intents#future-usage) for more information about setting up
1521
+ # future payments.
1522
+ #
1523
+ # To use this PaymentMethod as the default for invoice or subscription payments,
1524
+ # set [invoice_settings.default_payment_method](https://docs.stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method),
1525
+ # on the Customer to the PaymentMethod's ID.
15
1526
  def attach(params = {}, opts = {})
16
1527
  request_stripe_object(
17
1528
  method: :post,
18
- path: resource_url + "/attach",
1529
+ path: format("/v1/payment_methods/%<payment_method>s/attach", { payment_method: CGI.escape(self["id"]) }),
19
1530
  params: params,
20
1531
  opts: opts
21
1532
  )
22
1533
  end
23
1534
 
1535
+ # Attaches a PaymentMethod object to a Customer.
1536
+ #
1537
+ # To attach a new PaymentMethod to a customer for future payments, we recommend you use a [SetupIntent](https://docs.stripe.com/docs/api/setup_intents)
1538
+ # or a PaymentIntent with [setup_future_usage](https://docs.stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage).
1539
+ # These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach
1540
+ # endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for
1541
+ # future use, which makes later declines and payment friction more likely.
1542
+ # See [Optimizing cards for future payments](https://docs.stripe.com/docs/payments/payment-intents#future-usage) for more information about setting up
1543
+ # future payments.
1544
+ #
1545
+ # To use this PaymentMethod as the default for invoice or subscription payments,
1546
+ # set [invoice_settings.default_payment_method](https://docs.stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method),
1547
+ # on the Customer to the PaymentMethod's ID.
1548
+ def self.attach(payment_method, params = {}, opts = {})
1549
+ request_stripe_object(
1550
+ method: :post,
1551
+ path: format("/v1/payment_methods/%<payment_method>s/attach", { payment_method: CGI.escape(payment_method) }),
1552
+ params: params,
1553
+ opts: opts
1554
+ )
1555
+ end
1556
+
1557
+ # Creates a PaymentMethod object. Read the [Stripe.js reference](https://docs.stripe.com/docs/stripe-js/reference#stripe-create-payment-method) to learn how to create PaymentMethods via Stripe.js.
1558
+ #
1559
+ # Instead of creating a PaymentMethod directly, we recommend using the [PaymentIntents API to accept a payment immediately or the <a href="/docs/payments/save-and-reuse">SetupIntent](https://docs.stripe.com/docs/payments/accept-a-payment) API to collect payment method details ahead of a future payment.
1560
+ def self.create(params = {}, opts = {})
1561
+ request_stripe_object(method: :post, path: "/v1/payment_methods", params: params, opts: opts)
1562
+ end
1563
+
1564
+ # Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.
24
1565
  def detach(params = {}, opts = {})
25
1566
  request_stripe_object(
26
1567
  method: :post,
27
- path: resource_url + "/detach",
1568
+ path: format("/v1/payment_methods/%<payment_method>s/detach", { payment_method: CGI.escape(self["id"]) }),
1569
+ params: params,
1570
+ opts: opts
1571
+ )
1572
+ end
1573
+
1574
+ # Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.
1575
+ def self.detach(payment_method, params = {}, opts = {})
1576
+ request_stripe_object(
1577
+ method: :post,
1578
+ path: format("/v1/payment_methods/%<payment_method>s/detach", { payment_method: CGI.escape(payment_method) }),
1579
+ params: params,
1580
+ opts: opts
1581
+ )
1582
+ end
1583
+
1584
+ # Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods attached to a Customer for payments, you should use the [List a Customer's PaymentMethods](https://docs.stripe.com/docs/api/payment_methods/customer_list) API instead.
1585
+ def self.list(params = {}, opts = {})
1586
+ request_stripe_object(method: :get, path: "/v1/payment_methods", params: params, opts: opts)
1587
+ end
1588
+
1589
+ # Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.
1590
+ def self.update(payment_method, params = {}, opts = {})
1591
+ request_stripe_object(
1592
+ method: :post,
1593
+ path: format("/v1/payment_methods/%<payment_method>s", { payment_method: CGI.escape(payment_method) }),
28
1594
  params: params,
29
1595
  opts: opts
30
1596
  )