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,9 +2,1258 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # Tokenization is the process Stripe uses to collect sensitive card or bank
6
+ # account details, or personally identifiable information (PII), directly from
7
+ # your customers in a secure manner. A token representing this information is
8
+ # returned to your server to use. Use our
9
+ # [recommended payments integrations](https://stripe.com/docs/payments) to perform this process
10
+ # on the client-side. This guarantees that no sensitive card data touches your server,
11
+ # and allows your integration to operate in a PCI-compliant way.
12
+ #
13
+ # If you can't use client-side tokenization, you can also create tokens using
14
+ # the API with either your publishable or secret API key. If
15
+ # your integration uses this method, you're responsible for any PCI compliance
16
+ # that it might require, and you must keep your secret API key safe. Unlike with
17
+ # client-side tokenization, your customer's information isn't sent directly to
18
+ # Stripe, so we can't determine how it's handled or stored.
19
+ #
20
+ # You can't store or use tokens more than once. To store card or bank account
21
+ # information for later use, create [Customer](https://stripe.com/docs/api#customers)
22
+ # objects or [External accounts](https://docs.stripe.com/api#external_accounts).
23
+ # [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection,
24
+ # performs best with integrations that use client-side tokenization.
5
25
  class Token < APIResource
6
26
  extend Stripe::APIOperations::Create
7
27
 
8
28
  OBJECT_NAME = "token"
29
+ def self.object_name
30
+ "token"
31
+ end
32
+
33
+ class CreateParams < Stripe::RequestParams
34
+ class Account < Stripe::RequestParams
35
+ class Company < Stripe::RequestParams
36
+ class Address < Stripe::RequestParams
37
+ # City, district, suburb, town, or village.
38
+ attr_accessor :city
39
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
40
+ attr_accessor :country
41
+ # Address line 1 (e.g., street, PO Box, or company name).
42
+ attr_accessor :line1
43
+ # Address line 2 (e.g., apartment, suite, unit, or building).
44
+ attr_accessor :line2
45
+ # ZIP or postal code.
46
+ attr_accessor :postal_code
47
+ # State, county, province, or region.
48
+ attr_accessor :state
49
+
50
+ def initialize(
51
+ city: nil,
52
+ country: nil,
53
+ line1: nil,
54
+ line2: nil,
55
+ postal_code: nil,
56
+ state: nil
57
+ )
58
+ @city = city
59
+ @country = country
60
+ @line1 = line1
61
+ @line2 = line2
62
+ @postal_code = postal_code
63
+ @state = state
64
+ end
65
+ end
66
+
67
+ class AddressKana < Stripe::RequestParams
68
+ # City or ward.
69
+ attr_accessor :city
70
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
71
+ attr_accessor :country
72
+ # Block or building number.
73
+ attr_accessor :line1
74
+ # Building details.
75
+ attr_accessor :line2
76
+ # Postal code.
77
+ attr_accessor :postal_code
78
+ # Prefecture.
79
+ attr_accessor :state
80
+ # Town or cho-me.
81
+ attr_accessor :town
82
+
83
+ def initialize(
84
+ city: nil,
85
+ country: nil,
86
+ line1: nil,
87
+ line2: nil,
88
+ postal_code: nil,
89
+ state: nil,
90
+ town: nil
91
+ )
92
+ @city = city
93
+ @country = country
94
+ @line1 = line1
95
+ @line2 = line2
96
+ @postal_code = postal_code
97
+ @state = state
98
+ @town = town
99
+ end
100
+ end
101
+
102
+ class AddressKanji < Stripe::RequestParams
103
+ # City or ward.
104
+ attr_accessor :city
105
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
106
+ attr_accessor :country
107
+ # Block or building number.
108
+ attr_accessor :line1
109
+ # Building details.
110
+ attr_accessor :line2
111
+ # Postal code.
112
+ attr_accessor :postal_code
113
+ # Prefecture.
114
+ attr_accessor :state
115
+ # Town or cho-me.
116
+ attr_accessor :town
117
+
118
+ def initialize(
119
+ city: nil,
120
+ country: nil,
121
+ line1: nil,
122
+ line2: nil,
123
+ postal_code: nil,
124
+ state: nil,
125
+ town: nil
126
+ )
127
+ @city = city
128
+ @country = country
129
+ @line1 = line1
130
+ @line2 = line2
131
+ @postal_code = postal_code
132
+ @state = state
133
+ @town = town
134
+ end
135
+ end
136
+
137
+ class DirectorshipDeclaration < Stripe::RequestParams
138
+ # The Unix timestamp marking when the directorship declaration attestation was made.
139
+ attr_accessor :date
140
+ # The IP address from which the directorship declaration attestation was made.
141
+ attr_accessor :ip
142
+ # The user agent of the browser from which the directorship declaration attestation was made.
143
+ attr_accessor :user_agent
144
+
145
+ def initialize(date: nil, ip: nil, user_agent: nil)
146
+ @date = date
147
+ @ip = ip
148
+ @user_agent = user_agent
149
+ end
150
+ end
151
+
152
+ class OwnershipDeclaration < Stripe::RequestParams
153
+ # The Unix timestamp marking when the beneficial owner attestation was made.
154
+ attr_accessor :date
155
+ # The IP address from which the beneficial owner attestation was made.
156
+ attr_accessor :ip
157
+ # The user agent of the browser from which the beneficial owner attestation was made.
158
+ attr_accessor :user_agent
159
+
160
+ def initialize(date: nil, ip: nil, user_agent: nil)
161
+ @date = date
162
+ @ip = ip
163
+ @user_agent = user_agent
164
+ end
165
+ end
166
+
167
+ class RegistrationDate < Stripe::RequestParams
168
+ # The day of registration, between 1 and 31.
169
+ attr_accessor :day
170
+ # The month of registration, between 1 and 12.
171
+ attr_accessor :month
172
+ # The four-digit year of registration.
173
+ attr_accessor :year
174
+
175
+ def initialize(day: nil, month: nil, year: nil)
176
+ @day = day
177
+ @month = month
178
+ @year = year
179
+ end
180
+ end
181
+
182
+ class Verification < Stripe::RequestParams
183
+ class Document < Stripe::RequestParams
184
+ # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
185
+ attr_accessor :back
186
+ # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
187
+ attr_accessor :front
188
+
189
+ def initialize(back: nil, front: nil)
190
+ @back = back
191
+ @front = front
192
+ end
193
+ end
194
+ # A document verifying the business.
195
+ attr_accessor :document
196
+
197
+ def initialize(document: nil)
198
+ @document = document
199
+ end
200
+ end
201
+ # The company's primary address.
202
+ attr_accessor :address
203
+ # The Kana variation of the company's primary address (Japan only).
204
+ attr_accessor :address_kana
205
+ # The Kanji variation of the company's primary address (Japan only).
206
+ attr_accessor :address_kanji
207
+ # Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided.
208
+ attr_accessor :directors_provided
209
+ # This hash is used to attest that the directors information provided to Stripe is both current and correct.
210
+ attr_accessor :directorship_declaration
211
+ # Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](/api/persons) for accounts with a `relationship.executive` requirement.
212
+ attr_accessor :executives_provided
213
+ # The export license ID number of the company, also referred as Import Export Code (India only).
214
+ attr_accessor :export_license_id
215
+ # The purpose code to use for export transactions (India only).
216
+ attr_accessor :export_purpose_code
217
+ # The company's legal name.
218
+ attr_accessor :name
219
+ # The Kana variation of the company's legal name (Japan only).
220
+ attr_accessor :name_kana
221
+ # The Kanji variation of the company's legal name (Japan only).
222
+ attr_accessor :name_kanji
223
+ # Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](/api/persons) for accounts with a `relationship.owner` requirement.
224
+ attr_accessor :owners_provided
225
+ # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
226
+ attr_accessor :ownership_declaration
227
+ # Whether the user described by the data in the token has been shown the Ownership Declaration and indicated that it is correct.
228
+ attr_accessor :ownership_declaration_shown_and_signed
229
+ # This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details.
230
+ attr_accessor :ownership_exemption_reason
231
+ # The company's phone number (used for verification).
232
+ attr_accessor :phone
233
+ # Attribute for param field registration_date
234
+ attr_accessor :registration_date
235
+ # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong).
236
+ attr_accessor :registration_number
237
+ # The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value.
238
+ attr_accessor :structure
239
+ # The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.)
240
+ attr_accessor :tax_id
241
+ # The jurisdiction in which the `tax_id` is registered (Germany-based companies only).
242
+ attr_accessor :tax_id_registrar
243
+ # The VAT number of the company.
244
+ attr_accessor :vat_id
245
+ # Information on the verification state of the company.
246
+ attr_accessor :verification
247
+
248
+ def initialize(
249
+ address: nil,
250
+ address_kana: nil,
251
+ address_kanji: nil,
252
+ directors_provided: nil,
253
+ directorship_declaration: nil,
254
+ executives_provided: nil,
255
+ export_license_id: nil,
256
+ export_purpose_code: nil,
257
+ name: nil,
258
+ name_kana: nil,
259
+ name_kanji: nil,
260
+ owners_provided: nil,
261
+ ownership_declaration: nil,
262
+ ownership_declaration_shown_and_signed: nil,
263
+ ownership_exemption_reason: nil,
264
+ phone: nil,
265
+ registration_date: nil,
266
+ registration_number: nil,
267
+ structure: nil,
268
+ tax_id: nil,
269
+ tax_id_registrar: nil,
270
+ vat_id: nil,
271
+ verification: nil
272
+ )
273
+ @address = address
274
+ @address_kana = address_kana
275
+ @address_kanji = address_kanji
276
+ @directors_provided = directors_provided
277
+ @directorship_declaration = directorship_declaration
278
+ @executives_provided = executives_provided
279
+ @export_license_id = export_license_id
280
+ @export_purpose_code = export_purpose_code
281
+ @name = name
282
+ @name_kana = name_kana
283
+ @name_kanji = name_kanji
284
+ @owners_provided = owners_provided
285
+ @ownership_declaration = ownership_declaration
286
+ @ownership_declaration_shown_and_signed = ownership_declaration_shown_and_signed
287
+ @ownership_exemption_reason = ownership_exemption_reason
288
+ @phone = phone
289
+ @registration_date = registration_date
290
+ @registration_number = registration_number
291
+ @structure = structure
292
+ @tax_id = tax_id
293
+ @tax_id_registrar = tax_id_registrar
294
+ @vat_id = vat_id
295
+ @verification = verification
296
+ end
297
+ end
298
+
299
+ class Individual < Stripe::RequestParams
300
+ class Address < Stripe::RequestParams
301
+ # City, district, suburb, town, or village.
302
+ attr_accessor :city
303
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
304
+ attr_accessor :country
305
+ # Address line 1 (e.g., street, PO Box, or company name).
306
+ attr_accessor :line1
307
+ # Address line 2 (e.g., apartment, suite, unit, or building).
308
+ attr_accessor :line2
309
+ # ZIP or postal code.
310
+ attr_accessor :postal_code
311
+ # State, county, province, or region.
312
+ attr_accessor :state
313
+
314
+ def initialize(
315
+ city: nil,
316
+ country: nil,
317
+ line1: nil,
318
+ line2: nil,
319
+ postal_code: nil,
320
+ state: nil
321
+ )
322
+ @city = city
323
+ @country = country
324
+ @line1 = line1
325
+ @line2 = line2
326
+ @postal_code = postal_code
327
+ @state = state
328
+ end
329
+ end
330
+
331
+ class AddressKana < Stripe::RequestParams
332
+ # City or ward.
333
+ attr_accessor :city
334
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
335
+ attr_accessor :country
336
+ # Block or building number.
337
+ attr_accessor :line1
338
+ # Building details.
339
+ attr_accessor :line2
340
+ # Postal code.
341
+ attr_accessor :postal_code
342
+ # Prefecture.
343
+ attr_accessor :state
344
+ # Town or cho-me.
345
+ attr_accessor :town
346
+
347
+ def initialize(
348
+ city: nil,
349
+ country: nil,
350
+ line1: nil,
351
+ line2: nil,
352
+ postal_code: nil,
353
+ state: nil,
354
+ town: nil
355
+ )
356
+ @city = city
357
+ @country = country
358
+ @line1 = line1
359
+ @line2 = line2
360
+ @postal_code = postal_code
361
+ @state = state
362
+ @town = town
363
+ end
364
+ end
365
+
366
+ class AddressKanji < Stripe::RequestParams
367
+ # City or ward.
368
+ attr_accessor :city
369
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
370
+ attr_accessor :country
371
+ # Block or building number.
372
+ attr_accessor :line1
373
+ # Building details.
374
+ attr_accessor :line2
375
+ # Postal code.
376
+ attr_accessor :postal_code
377
+ # Prefecture.
378
+ attr_accessor :state
379
+ # Town or cho-me.
380
+ attr_accessor :town
381
+
382
+ def initialize(
383
+ city: nil,
384
+ country: nil,
385
+ line1: nil,
386
+ line2: nil,
387
+ postal_code: nil,
388
+ state: nil,
389
+ town: nil
390
+ )
391
+ @city = city
392
+ @country = country
393
+ @line1 = line1
394
+ @line2 = line2
395
+ @postal_code = postal_code
396
+ @state = state
397
+ @town = town
398
+ end
399
+ end
400
+
401
+ class Dob < Stripe::RequestParams
402
+ # The day of birth, between 1 and 31.
403
+ attr_accessor :day
404
+ # The month of birth, between 1 and 12.
405
+ attr_accessor :month
406
+ # The four-digit year of birth.
407
+ attr_accessor :year
408
+
409
+ def initialize(day: nil, month: nil, year: nil)
410
+ @day = day
411
+ @month = month
412
+ @year = year
413
+ end
414
+ end
415
+
416
+ class RegisteredAddress < Stripe::RequestParams
417
+ # City, district, suburb, town, or village.
418
+ attr_accessor :city
419
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
420
+ attr_accessor :country
421
+ # Address line 1 (e.g., street, PO Box, or company name).
422
+ attr_accessor :line1
423
+ # Address line 2 (e.g., apartment, suite, unit, or building).
424
+ attr_accessor :line2
425
+ # ZIP or postal code.
426
+ attr_accessor :postal_code
427
+ # State, county, province, or region.
428
+ attr_accessor :state
429
+
430
+ def initialize(
431
+ city: nil,
432
+ country: nil,
433
+ line1: nil,
434
+ line2: nil,
435
+ postal_code: nil,
436
+ state: nil
437
+ )
438
+ @city = city
439
+ @country = country
440
+ @line1 = line1
441
+ @line2 = line2
442
+ @postal_code = postal_code
443
+ @state = state
444
+ end
445
+ end
446
+
447
+ class Relationship < Stripe::RequestParams
448
+ # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
449
+ attr_accessor :director
450
+ # Whether the person has significant responsibility to control, manage, or direct the organization.
451
+ attr_accessor :executive
452
+ # Whether the person is an owner of the account’s legal entity.
453
+ attr_accessor :owner
454
+ # The percent owned by the person of the account's legal entity.
455
+ attr_accessor :percent_ownership
456
+ # The person's title (e.g., CEO, Support Engineer).
457
+ attr_accessor :title
458
+
459
+ def initialize(
460
+ director: nil,
461
+ executive: nil,
462
+ owner: nil,
463
+ percent_ownership: nil,
464
+ title: nil
465
+ )
466
+ @director = director
467
+ @executive = executive
468
+ @owner = owner
469
+ @percent_ownership = percent_ownership
470
+ @title = title
471
+ end
472
+ end
473
+
474
+ class Verification < Stripe::RequestParams
475
+ class AdditionalDocument < Stripe::RequestParams
476
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
477
+ attr_accessor :back
478
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
479
+ attr_accessor :front
480
+
481
+ def initialize(back: nil, front: nil)
482
+ @back = back
483
+ @front = front
484
+ end
485
+ end
486
+
487
+ class Document < Stripe::RequestParams
488
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
489
+ attr_accessor :back
490
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
491
+ attr_accessor :front
492
+
493
+ def initialize(back: nil, front: nil)
494
+ @back = back
495
+ @front = front
496
+ end
497
+ end
498
+ # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
499
+ attr_accessor :additional_document
500
+ # An identifying document, either a passport or local ID card.
501
+ attr_accessor :document
502
+
503
+ def initialize(additional_document: nil, document: nil)
504
+ @additional_document = additional_document
505
+ @document = document
506
+ end
507
+ end
508
+ # The individual's primary address.
509
+ attr_accessor :address
510
+ # The Kana variation of the individual's primary address (Japan only).
511
+ attr_accessor :address_kana
512
+ # The Kanji variation of the individual's primary address (Japan only).
513
+ attr_accessor :address_kanji
514
+ # The individual's date of birth.
515
+ attr_accessor :dob
516
+ # The individual's email address.
517
+ attr_accessor :email
518
+ # The individual's first name.
519
+ attr_accessor :first_name
520
+ # The Kana variation of the individual's first name (Japan only).
521
+ attr_accessor :first_name_kana
522
+ # The Kanji variation of the individual's first name (Japan only).
523
+ attr_accessor :first_name_kanji
524
+ # A list of alternate names or aliases that the individual is known by.
525
+ attr_accessor :full_name_aliases
526
+ # The individual's gender
527
+ attr_accessor :gender
528
+ # The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
529
+ attr_accessor :id_number
530
+ # The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii).
531
+ attr_accessor :id_number_secondary
532
+ # The individual's last name.
533
+ attr_accessor :last_name
534
+ # The Kana variation of the individual's last name (Japan only).
535
+ attr_accessor :last_name_kana
536
+ # The Kanji variation of the individual's last name (Japan only).
537
+ attr_accessor :last_name_kanji
538
+ # The individual's maiden name.
539
+ attr_accessor :maiden_name
540
+ # 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`.
541
+ attr_accessor :metadata
542
+ # The individual's phone number.
543
+ attr_accessor :phone
544
+ # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
545
+ attr_accessor :political_exposure
546
+ # The individual's registered address.
547
+ attr_accessor :registered_address
548
+ # Describes the person’s relationship to the account.
549
+ attr_accessor :relationship
550
+ # The last four digits of the individual's Social Security Number (U.S. only).
551
+ attr_accessor :ssn_last_4
552
+ # The individual's verification document information.
553
+ attr_accessor :verification
554
+
555
+ def initialize(
556
+ address: nil,
557
+ address_kana: nil,
558
+ address_kanji: nil,
559
+ dob: nil,
560
+ email: nil,
561
+ first_name: nil,
562
+ first_name_kana: nil,
563
+ first_name_kanji: nil,
564
+ full_name_aliases: nil,
565
+ gender: nil,
566
+ id_number: nil,
567
+ id_number_secondary: nil,
568
+ last_name: nil,
569
+ last_name_kana: nil,
570
+ last_name_kanji: nil,
571
+ maiden_name: nil,
572
+ metadata: nil,
573
+ phone: nil,
574
+ political_exposure: nil,
575
+ registered_address: nil,
576
+ relationship: nil,
577
+ ssn_last_4: nil,
578
+ verification: nil
579
+ )
580
+ @address = address
581
+ @address_kana = address_kana
582
+ @address_kanji = address_kanji
583
+ @dob = dob
584
+ @email = email
585
+ @first_name = first_name
586
+ @first_name_kana = first_name_kana
587
+ @first_name_kanji = first_name_kanji
588
+ @full_name_aliases = full_name_aliases
589
+ @gender = gender
590
+ @id_number = id_number
591
+ @id_number_secondary = id_number_secondary
592
+ @last_name = last_name
593
+ @last_name_kana = last_name_kana
594
+ @last_name_kanji = last_name_kanji
595
+ @maiden_name = maiden_name
596
+ @metadata = metadata
597
+ @phone = phone
598
+ @political_exposure = political_exposure
599
+ @registered_address = registered_address
600
+ @relationship = relationship
601
+ @ssn_last_4 = ssn_last_4
602
+ @verification = verification
603
+ end
604
+ end
605
+ # The business type.
606
+ attr_accessor :business_type
607
+ # Information about the company or business.
608
+ attr_accessor :company
609
+ # Information about the person represented by the account.
610
+ attr_accessor :individual
611
+ # Whether the user described by the data in the token has been shown [the Stripe Connected Account Agreement](/connect/account-tokens#stripe-connected-account-agreement). When creating an account token to create a new Connect account, this value must be `true`.
612
+ attr_accessor :tos_shown_and_accepted
613
+
614
+ def initialize(
615
+ business_type: nil,
616
+ company: nil,
617
+ individual: nil,
618
+ tos_shown_and_accepted: nil
619
+ )
620
+ @business_type = business_type
621
+ @company = company
622
+ @individual = individual
623
+ @tos_shown_and_accepted = tos_shown_and_accepted
624
+ end
625
+ end
626
+
627
+ class BankAccount < Stripe::RequestParams
628
+ # The name of the person or business that owns the bank account. This field is required when attaching the bank account to a `Customer` object.
629
+ attr_accessor :account_holder_name
630
+ # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object.
631
+ attr_accessor :account_holder_type
632
+ # The account number for the bank account, in string form. Must be a checking account.
633
+ attr_accessor :account_number
634
+ # The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.
635
+ attr_accessor :account_type
636
+ # The country in which the bank account is located.
637
+ attr_accessor :country
638
+ # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](https://stripe.com/docs/payouts)
639
+ attr_accessor :currency
640
+ # The ID of a Payment Method with a `type` of `us_bank_account`. The Payment Method's bank account information will be copied and returned as a Bank Account Token. This parameter is exclusive with respect to all other parameters in the `bank_account` hash. You must include the top-level `customer` parameter if the Payment Method is attached to a `Customer` object. If the Payment Method is not attached to a `Customer` object, it will be consumed and cannot be used again. You may not use Payment Methods which were created by a Setup Intent with `attach_to_self=true`.
641
+ attr_accessor :payment_method
642
+ # The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required.
643
+ attr_accessor :routing_number
644
+
645
+ def initialize(
646
+ account_holder_name: nil,
647
+ account_holder_type: nil,
648
+ account_number: nil,
649
+ account_type: nil,
650
+ country: nil,
651
+ currency: nil,
652
+ payment_method: nil,
653
+ routing_number: nil
654
+ )
655
+ @account_holder_name = account_holder_name
656
+ @account_holder_type = account_holder_type
657
+ @account_number = account_number
658
+ @account_type = account_type
659
+ @country = country
660
+ @currency = currency
661
+ @payment_method = payment_method
662
+ @routing_number = routing_number
663
+ end
664
+ end
665
+
666
+ class Card < Stripe::RequestParams
667
+ class Networks < Stripe::RequestParams
668
+ # 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.
669
+ attr_accessor :preferred
670
+
671
+ def initialize(preferred: nil)
672
+ @preferred = preferred
673
+ end
674
+ end
675
+ # City / District / Suburb / Town / Village.
676
+ attr_accessor :address_city
677
+ # Billing address country, if provided.
678
+ attr_accessor :address_country
679
+ # Address line 1 (Street address / PO Box / Company name).
680
+ attr_accessor :address_line1
681
+ # Address line 2 (Apartment / Suite / Unit / Building).
682
+ attr_accessor :address_line2
683
+ # State / County / Province / Region.
684
+ attr_accessor :address_state
685
+ # ZIP or postal code.
686
+ attr_accessor :address_zip
687
+ # Required in order to add the card to an account; in all other cases, this parameter is not used. When added to an account, the card (which must be a debit card) can be used as a transfer destination for funds in this currency.
688
+ attr_accessor :currency
689
+ # Card security code. Highly recommended to always include this value.
690
+ attr_accessor :cvc
691
+ # Two-digit number representing the card's expiration month.
692
+ attr_accessor :exp_month
693
+ # Two- or four-digit number representing the card's expiration year.
694
+ attr_accessor :exp_year
695
+ # Cardholder's full name.
696
+ attr_accessor :name
697
+ # Contains information about card networks used to process the payment.
698
+ attr_accessor :networks
699
+ # The card number, as a string without any separators.
700
+ attr_accessor :number
701
+
702
+ def initialize(
703
+ address_city: nil,
704
+ address_country: nil,
705
+ address_line1: nil,
706
+ address_line2: nil,
707
+ address_state: nil,
708
+ address_zip: nil,
709
+ currency: nil,
710
+ cvc: nil,
711
+ exp_month: nil,
712
+ exp_year: nil,
713
+ name: nil,
714
+ networks: nil,
715
+ number: nil
716
+ )
717
+ @address_city = address_city
718
+ @address_country = address_country
719
+ @address_line1 = address_line1
720
+ @address_line2 = address_line2
721
+ @address_state = address_state
722
+ @address_zip = address_zip
723
+ @currency = currency
724
+ @cvc = cvc
725
+ @exp_month = exp_month
726
+ @exp_year = exp_year
727
+ @name = name
728
+ @networks = networks
729
+ @number = number
730
+ end
731
+ end
732
+
733
+ class CvcUpdate < Stripe::RequestParams
734
+ # The CVC value, in string form.
735
+ attr_accessor :cvc
736
+
737
+ def initialize(cvc: nil)
738
+ @cvc = cvc
739
+ end
740
+ end
741
+
742
+ class Person < Stripe::RequestParams
743
+ class AdditionalTosAcceptances < Stripe::RequestParams
744
+ class Account < Stripe::RequestParams
745
+ # The Unix timestamp marking when the account representative accepted the service agreement.
746
+ attr_accessor :date
747
+ # The IP address from which the account representative accepted the service agreement.
748
+ attr_accessor :ip
749
+ # The user agent of the browser from which the account representative accepted the service agreement.
750
+ attr_accessor :user_agent
751
+
752
+ def initialize(date: nil, ip: nil, user_agent: nil)
753
+ @date = date
754
+ @ip = ip
755
+ @user_agent = user_agent
756
+ end
757
+ end
758
+ # Details on the legal guardian's acceptance of the main Stripe service agreement.
759
+ attr_accessor :account
760
+
761
+ def initialize(account: nil)
762
+ @account = account
763
+ end
764
+ end
765
+
766
+ class Address < Stripe::RequestParams
767
+ # City, district, suburb, town, or village.
768
+ attr_accessor :city
769
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
770
+ attr_accessor :country
771
+ # Address line 1 (e.g., street, PO Box, or company name).
772
+ attr_accessor :line1
773
+ # Address line 2 (e.g., apartment, suite, unit, or building).
774
+ attr_accessor :line2
775
+ # ZIP or postal code.
776
+ attr_accessor :postal_code
777
+ # State, county, province, or region.
778
+ attr_accessor :state
779
+
780
+ def initialize(
781
+ city: nil,
782
+ country: nil,
783
+ line1: nil,
784
+ line2: nil,
785
+ postal_code: nil,
786
+ state: nil
787
+ )
788
+ @city = city
789
+ @country = country
790
+ @line1 = line1
791
+ @line2 = line2
792
+ @postal_code = postal_code
793
+ @state = state
794
+ end
795
+ end
796
+
797
+ class AddressKana < Stripe::RequestParams
798
+ # City or ward.
799
+ attr_accessor :city
800
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
801
+ attr_accessor :country
802
+ # Block or building number.
803
+ attr_accessor :line1
804
+ # Building details.
805
+ attr_accessor :line2
806
+ # Postal code.
807
+ attr_accessor :postal_code
808
+ # Prefecture.
809
+ attr_accessor :state
810
+ # Town or cho-me.
811
+ attr_accessor :town
812
+
813
+ def initialize(
814
+ city: nil,
815
+ country: nil,
816
+ line1: nil,
817
+ line2: nil,
818
+ postal_code: nil,
819
+ state: nil,
820
+ town: nil
821
+ )
822
+ @city = city
823
+ @country = country
824
+ @line1 = line1
825
+ @line2 = line2
826
+ @postal_code = postal_code
827
+ @state = state
828
+ @town = town
829
+ end
830
+ end
831
+
832
+ class AddressKanji < Stripe::RequestParams
833
+ # City or ward.
834
+ attr_accessor :city
835
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
836
+ attr_accessor :country
837
+ # Block or building number.
838
+ attr_accessor :line1
839
+ # Building details.
840
+ attr_accessor :line2
841
+ # Postal code.
842
+ attr_accessor :postal_code
843
+ # Prefecture.
844
+ attr_accessor :state
845
+ # Town or cho-me.
846
+ attr_accessor :town
847
+
848
+ def initialize(
849
+ city: nil,
850
+ country: nil,
851
+ line1: nil,
852
+ line2: nil,
853
+ postal_code: nil,
854
+ state: nil,
855
+ town: nil
856
+ )
857
+ @city = city
858
+ @country = country
859
+ @line1 = line1
860
+ @line2 = line2
861
+ @postal_code = postal_code
862
+ @state = state
863
+ @town = town
864
+ end
865
+ end
866
+
867
+ class Dob < Stripe::RequestParams
868
+ # The day of birth, between 1 and 31.
869
+ attr_accessor :day
870
+ # The month of birth, between 1 and 12.
871
+ attr_accessor :month
872
+ # The four-digit year of birth.
873
+ attr_accessor :year
874
+
875
+ def initialize(day: nil, month: nil, year: nil)
876
+ @day = day
877
+ @month = month
878
+ @year = year
879
+ end
880
+ end
881
+
882
+ class Documents < Stripe::RequestParams
883
+ class CompanyAuthorization < Stripe::RequestParams
884
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
885
+ attr_accessor :files
886
+
887
+ def initialize(files: nil)
888
+ @files = files
889
+ end
890
+ end
891
+
892
+ class Passport < Stripe::RequestParams
893
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
894
+ attr_accessor :files
895
+
896
+ def initialize(files: nil)
897
+ @files = files
898
+ end
899
+ end
900
+
901
+ class Visa < Stripe::RequestParams
902
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
903
+ attr_accessor :files
904
+
905
+ def initialize(files: nil)
906
+ @files = files
907
+ end
908
+ end
909
+ # One or more documents that demonstrate proof that this person is authorized to represent the company.
910
+ attr_accessor :company_authorization
911
+ # One or more documents showing the person's passport page with photo and personal data.
912
+ attr_accessor :passport
913
+ # One or more documents showing the person's visa required for living in the country where they are residing.
914
+ attr_accessor :visa
915
+
916
+ def initialize(company_authorization: nil, passport: nil, visa: nil)
917
+ @company_authorization = company_authorization
918
+ @passport = passport
919
+ @visa = visa
920
+ end
921
+ end
922
+
923
+ class RegisteredAddress < Stripe::RequestParams
924
+ # City, district, suburb, town, or village.
925
+ attr_accessor :city
926
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
927
+ attr_accessor :country
928
+ # Address line 1 (e.g., street, PO Box, or company name).
929
+ attr_accessor :line1
930
+ # Address line 2 (e.g., apartment, suite, unit, or building).
931
+ attr_accessor :line2
932
+ # ZIP or postal code.
933
+ attr_accessor :postal_code
934
+ # State, county, province, or region.
935
+ attr_accessor :state
936
+
937
+ def initialize(
938
+ city: nil,
939
+ country: nil,
940
+ line1: nil,
941
+ line2: nil,
942
+ postal_code: nil,
943
+ state: nil
944
+ )
945
+ @city = city
946
+ @country = country
947
+ @line1 = line1
948
+ @line2 = line2
949
+ @postal_code = postal_code
950
+ @state = state
951
+ end
952
+ end
953
+
954
+ class Relationship < Stripe::RequestParams
955
+ # Whether the person is the authorizer of the account's representative.
956
+ attr_accessor :authorizer
957
+ # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
958
+ attr_accessor :director
959
+ # Whether the person has significant responsibility to control, manage, or direct the organization.
960
+ attr_accessor :executive
961
+ # Whether the person is the legal guardian of the account's representative.
962
+ attr_accessor :legal_guardian
963
+ # Whether the person is an owner of the account’s legal entity.
964
+ attr_accessor :owner
965
+ # The percent owned by the person of the account's legal entity.
966
+ attr_accessor :percent_ownership
967
+ # Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account.
968
+ attr_accessor :representative
969
+ # The person's title (e.g., CEO, Support Engineer).
970
+ attr_accessor :title
971
+
972
+ def initialize(
973
+ authorizer: nil,
974
+ director: nil,
975
+ executive: nil,
976
+ legal_guardian: nil,
977
+ owner: nil,
978
+ percent_ownership: nil,
979
+ representative: nil,
980
+ title: nil
981
+ )
982
+ @authorizer = authorizer
983
+ @director = director
984
+ @executive = executive
985
+ @legal_guardian = legal_guardian
986
+ @owner = owner
987
+ @percent_ownership = percent_ownership
988
+ @representative = representative
989
+ @title = title
990
+ end
991
+ end
992
+
993
+ class UsCfpbData < Stripe::RequestParams
994
+ class EthnicityDetails < Stripe::RequestParams
995
+ # The persons ethnicity
996
+ attr_accessor :ethnicity
997
+ # Please specify your origin, when other is selected.
998
+ attr_accessor :ethnicity_other
999
+
1000
+ def initialize(ethnicity: nil, ethnicity_other: nil)
1001
+ @ethnicity = ethnicity
1002
+ @ethnicity_other = ethnicity_other
1003
+ end
1004
+ end
1005
+
1006
+ class RaceDetails < Stripe::RequestParams
1007
+ # The persons race.
1008
+ attr_accessor :race
1009
+ # Please specify your race, when other is selected.
1010
+ attr_accessor :race_other
1011
+
1012
+ def initialize(race: nil, race_other: nil)
1013
+ @race = race
1014
+ @race_other = race_other
1015
+ end
1016
+ end
1017
+ # The persons ethnicity details
1018
+ attr_accessor :ethnicity_details
1019
+ # The persons race details
1020
+ attr_accessor :race_details
1021
+ # The persons self-identified gender
1022
+ attr_accessor :self_identified_gender
1023
+
1024
+ def initialize(ethnicity_details: nil, race_details: nil, self_identified_gender: nil)
1025
+ @ethnicity_details = ethnicity_details
1026
+ @race_details = race_details
1027
+ @self_identified_gender = self_identified_gender
1028
+ end
1029
+ end
1030
+
1031
+ class Verification < Stripe::RequestParams
1032
+ class AdditionalDocument < Stripe::RequestParams
1033
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
1034
+ attr_accessor :back
1035
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
1036
+ attr_accessor :front
1037
+
1038
+ def initialize(back: nil, front: nil)
1039
+ @back = back
1040
+ @front = front
1041
+ end
1042
+ end
1043
+
1044
+ class Document < Stripe::RequestParams
1045
+ # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
1046
+ attr_accessor :back
1047
+ # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
1048
+ attr_accessor :front
1049
+
1050
+ def initialize(back: nil, front: nil)
1051
+ @back = back
1052
+ @front = front
1053
+ end
1054
+ end
1055
+ # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
1056
+ attr_accessor :additional_document
1057
+ # An identifying document, either a passport or local ID card.
1058
+ attr_accessor :document
1059
+
1060
+ def initialize(additional_document: nil, document: nil)
1061
+ @additional_document = additional_document
1062
+ @document = document
1063
+ end
1064
+ end
1065
+ # Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements.
1066
+ attr_accessor :additional_tos_acceptances
1067
+ # The person's address.
1068
+ attr_accessor :address
1069
+ # The Kana variation of the person's address (Japan only).
1070
+ attr_accessor :address_kana
1071
+ # The Kanji variation of the person's address (Japan only).
1072
+ attr_accessor :address_kanji
1073
+ # The person's date of birth.
1074
+ attr_accessor :dob
1075
+ # Documents that may be submitted to satisfy various informational requests.
1076
+ attr_accessor :documents
1077
+ # The person's email address.
1078
+ attr_accessor :email
1079
+ # The person's first name.
1080
+ attr_accessor :first_name
1081
+ # The Kana variation of the person's first name (Japan only).
1082
+ attr_accessor :first_name_kana
1083
+ # The Kanji variation of the person's first name (Japan only).
1084
+ attr_accessor :first_name_kanji
1085
+ # A list of alternate names or aliases that the person is known by.
1086
+ attr_accessor :full_name_aliases
1087
+ # The person's gender (International regulations require either "male" or "female").
1088
+ attr_accessor :gender
1089
+ # The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
1090
+ attr_accessor :id_number
1091
+ # The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
1092
+ attr_accessor :id_number_secondary
1093
+ # The person's last name.
1094
+ attr_accessor :last_name
1095
+ # The Kana variation of the person's last name (Japan only).
1096
+ attr_accessor :last_name_kana
1097
+ # The Kanji variation of the person's last name (Japan only).
1098
+ attr_accessor :last_name_kanji
1099
+ # The person's maiden name.
1100
+ attr_accessor :maiden_name
1101
+ # 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`.
1102
+ attr_accessor :metadata
1103
+ # The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable.
1104
+ attr_accessor :nationality
1105
+ # The person's phone number.
1106
+ attr_accessor :phone
1107
+ # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
1108
+ attr_accessor :political_exposure
1109
+ # The person's registered address.
1110
+ attr_accessor :registered_address
1111
+ # The relationship that this person has with the account's legal entity.
1112
+ attr_accessor :relationship
1113
+ # The last four digits of the person's Social Security number (U.S. only).
1114
+ attr_accessor :ssn_last_4
1115
+ # Demographic data related to the person.
1116
+ attr_accessor :us_cfpb_data
1117
+ # The person's verification status.
1118
+ attr_accessor :verification
1119
+
1120
+ def initialize(
1121
+ additional_tos_acceptances: nil,
1122
+ address: nil,
1123
+ address_kana: nil,
1124
+ address_kanji: nil,
1125
+ dob: nil,
1126
+ documents: nil,
1127
+ email: nil,
1128
+ first_name: nil,
1129
+ first_name_kana: nil,
1130
+ first_name_kanji: nil,
1131
+ full_name_aliases: nil,
1132
+ gender: nil,
1133
+ id_number: nil,
1134
+ id_number_secondary: nil,
1135
+ last_name: nil,
1136
+ last_name_kana: nil,
1137
+ last_name_kanji: nil,
1138
+ maiden_name: nil,
1139
+ metadata: nil,
1140
+ nationality: nil,
1141
+ phone: nil,
1142
+ political_exposure: nil,
1143
+ registered_address: nil,
1144
+ relationship: nil,
1145
+ ssn_last_4: nil,
1146
+ us_cfpb_data: nil,
1147
+ verification: nil
1148
+ )
1149
+ @additional_tos_acceptances = additional_tos_acceptances
1150
+ @address = address
1151
+ @address_kana = address_kana
1152
+ @address_kanji = address_kanji
1153
+ @dob = dob
1154
+ @documents = documents
1155
+ @email = email
1156
+ @first_name = first_name
1157
+ @first_name_kana = first_name_kana
1158
+ @first_name_kanji = first_name_kanji
1159
+ @full_name_aliases = full_name_aliases
1160
+ @gender = gender
1161
+ @id_number = id_number
1162
+ @id_number_secondary = id_number_secondary
1163
+ @last_name = last_name
1164
+ @last_name_kana = last_name_kana
1165
+ @last_name_kanji = last_name_kanji
1166
+ @maiden_name = maiden_name
1167
+ @metadata = metadata
1168
+ @nationality = nationality
1169
+ @phone = phone
1170
+ @political_exposure = political_exposure
1171
+ @registered_address = registered_address
1172
+ @relationship = relationship
1173
+ @ssn_last_4 = ssn_last_4
1174
+ @us_cfpb_data = us_cfpb_data
1175
+ @verification = verification
1176
+ end
1177
+ end
1178
+
1179
+ class Pii < Stripe::RequestParams
1180
+ # The `id_number` for the PII, in string form.
1181
+ attr_accessor :id_number
1182
+
1183
+ def initialize(id_number: nil)
1184
+ @id_number = id_number
1185
+ end
1186
+ end
1187
+ # Information for the account this token represents.
1188
+ attr_accessor :account
1189
+ # The bank account this token will represent.
1190
+ attr_accessor :bank_account
1191
+ # The card this token will represent. If you also pass in a customer, the card must be the ID of a card belonging to the customer. Otherwise, if you do not pass in a customer, this is a dictionary containing a user's credit card details, with the options described below.
1192
+ attr_accessor :card
1193
+ # Create a token for the customer, which is owned by the application's account. You can only use this with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). Learn more about [cloning saved payment methods](https://stripe.com/docs/connect/cloning-saved-payment-methods).
1194
+ attr_accessor :customer
1195
+ # The updated CVC value this token represents.
1196
+ attr_accessor :cvc_update
1197
+ # Specifies which fields in the response should be expanded.
1198
+ attr_accessor :expand
1199
+ # Information for the person this token represents.
1200
+ attr_accessor :person
1201
+ # The PII this token represents.
1202
+ attr_accessor :pii
1203
+
1204
+ def initialize(
1205
+ account: nil,
1206
+ bank_account: nil,
1207
+ card: nil,
1208
+ customer: nil,
1209
+ cvc_update: nil,
1210
+ expand: nil,
1211
+ person: nil,
1212
+ pii: nil
1213
+ )
1214
+ @account = account
1215
+ @bank_account = bank_account
1216
+ @card = card
1217
+ @customer = customer
1218
+ @cvc_update = cvc_update
1219
+ @expand = expand
1220
+ @person = person
1221
+ @pii = pii
1222
+ end
1223
+ end
1224
+ # These bank accounts are payment methods on `Customer` objects.
1225
+ #
1226
+ # On the other hand [External Accounts](/api#external_accounts) are transfer
1227
+ # destinations on `Account` objects for connected accounts.
1228
+ # They can be bank accounts or debit cards as well, and are documented in the links above.
1229
+ #
1230
+ # Related guide: [Bank debits and transfers](/payments/bank-debits-transfers)
1231
+ attr_reader :bank_account
1232
+ # You can store multiple cards on a customer in order to charge the customer
1233
+ # later. You can also store multiple debit cards on a recipient in order to
1234
+ # transfer to those cards later.
1235
+ #
1236
+ # Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards)
1237
+ attr_reader :card
1238
+ # IP address of the client that generates the token.
1239
+ attr_reader :client_ip
1240
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
1241
+ attr_reader :created
1242
+ # Unique identifier for the object.
1243
+ attr_reader :id
1244
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
1245
+ attr_reader :livemode
1246
+ # String representing the object's type. Objects of the same type share the same value.
1247
+ attr_reader :object
1248
+ # Type of the token: `account`, `bank_account`, `card`, or `pii`.
1249
+ attr_reader :type
1250
+ # Determines if you have already used this token (you can only use tokens once).
1251
+ attr_reader :used
1252
+
1253
+ # Creates a single-use token that represents a bank account's details.
1254
+ # You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://docs.stripe.com/api#accounts) where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts.
1255
+ def self.create(params = {}, opts = {})
1256
+ request_stripe_object(method: :post, path: "/v1/tokens", params: params, opts: opts)
1257
+ end
9
1258
  end
10
1259
  end