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,19 +2,1699 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # The `Charge` object represents a single attempt to move money into your Stripe account.
6
+ # PaymentIntent confirmation is the most common way to create Charges, but transferring
7
+ # money to a different Stripe account through Connect also creates Charges.
8
+ # Some legacy payment flows create Charges directly, which is not recommended for new integrations.
5
9
  class Charge < APIResource
6
10
  extend Stripe::APIOperations::Create
7
11
  extend Stripe::APIOperations::List
12
+ extend Stripe::APIOperations::NestedResource
13
+ extend Stripe::APIOperations::Search
8
14
  include Stripe::APIOperations::Save
9
15
 
10
16
  OBJECT_NAME = "charge"
17
+ def self.object_name
18
+ "charge"
19
+ end
20
+
21
+ nested_resource_class_methods :refund, operations: %i[retrieve list]
22
+
23
+ class BillingDetails < Stripe::StripeObject
24
+ class Address < Stripe::StripeObject
25
+ # City, district, suburb, town, or village.
26
+ attr_reader :city
27
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
28
+ attr_reader :country
29
+ # Address line 1 (e.g., street, PO Box, or company name).
30
+ attr_reader :line1
31
+ # Address line 2 (e.g., apartment, suite, unit, or building).
32
+ attr_reader :line2
33
+ # ZIP or postal code.
34
+ attr_reader :postal_code
35
+ # State, county, province, or region.
36
+ attr_reader :state
37
+ end
38
+ # Billing address.
39
+ attr_reader :address
40
+ # Email address.
41
+ attr_reader :email
42
+ # Full name.
43
+ attr_reader :name
44
+ # Billing phone number (including extension).
45
+ attr_reader :phone
46
+ # Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
47
+ attr_reader :tax_id
48
+ end
49
+
50
+ class FraudDetails < Stripe::StripeObject
51
+ # Assessments from Stripe. If set, the value is `fraudulent`.
52
+ attr_reader :stripe_report
53
+ # Assessments reported by you. If set, possible values of are `safe` and `fraudulent`.
54
+ attr_reader :user_report
55
+ end
56
+
57
+ class Level3 < Stripe::StripeObject
58
+ class LineItem < Stripe::StripeObject
59
+ # Attribute for field discount_amount
60
+ attr_reader :discount_amount
61
+ # Attribute for field product_code
62
+ attr_reader :product_code
63
+ # Attribute for field product_description
64
+ attr_reader :product_description
65
+ # Attribute for field quantity
66
+ attr_reader :quantity
67
+ # Attribute for field tax_amount
68
+ attr_reader :tax_amount
69
+ # Attribute for field unit_cost
70
+ attr_reader :unit_cost
71
+ end
72
+ # Attribute for field customer_reference
73
+ attr_reader :customer_reference
74
+ # Attribute for field line_items
75
+ attr_reader :line_items
76
+ # Attribute for field merchant_reference
77
+ attr_reader :merchant_reference
78
+ # Attribute for field shipping_address_zip
79
+ attr_reader :shipping_address_zip
80
+ # Attribute for field shipping_amount
81
+ attr_reader :shipping_amount
82
+ # Attribute for field shipping_from_zip
83
+ attr_reader :shipping_from_zip
84
+ end
85
+
86
+ class Outcome < Stripe::StripeObject
87
+ class Rule < Stripe::StripeObject
88
+ # The action taken on the payment.
89
+ attr_reader :action
90
+ # Unique identifier for the object.
91
+ attr_reader :id
92
+ # The predicate to evaluate the payment against.
93
+ attr_reader :predicate
94
+ end
95
+ # An enumerated value providing a more detailed explanation on [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines).
96
+ attr_reader :advice_code
97
+ # For charges declined by the network, a 2 digit code which indicates the advice returned by the network on how to proceed with an error.
98
+ attr_reader :network_advice_code
99
+ # For charges declined by the network, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed.
100
+ attr_reader :network_decline_code
101
+ # Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as "pending" on a cardholder's statement.
102
+ attr_reader :network_status
103
+ # An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details.
104
+ attr_reader :reason
105
+ # Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are `normal`, `elevated`, `highest`. For non-card payments, and card-based payments predating the public assignment of risk levels, this field will have the value `not_assessed`. In the event of an error in the evaluation, this field will have the value `unknown`. This field is only available with Radar.
106
+ attr_reader :risk_level
107
+ # Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams.
108
+ attr_reader :risk_score
109
+ # The ID of the Radar rule that matched the payment, if applicable.
110
+ attr_reader :rule
111
+ # A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer.
112
+ attr_reader :seller_message
113
+ # Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://stripe.com/docs/declines) and [Radar reviews](https://stripe.com/docs/radar/reviews) for details.
114
+ attr_reader :type
115
+ end
116
+
117
+ class PaymentMethodDetails < Stripe::StripeObject
118
+ class AchCreditTransfer < Stripe::StripeObject
119
+ # Account number to transfer funds to.
120
+ attr_reader :account_number
121
+ # Name of the bank associated with the routing number.
122
+ attr_reader :bank_name
123
+ # Routing transit number for the bank account to transfer funds to.
124
+ attr_reader :routing_number
125
+ # SWIFT code of the bank associated with the routing number.
126
+ attr_reader :swift_code
127
+ end
128
+
129
+ class AchDebit < Stripe::StripeObject
130
+ # Type of entity that holds the account. This can be either `individual` or `company`.
131
+ attr_reader :account_holder_type
132
+ # Name of the bank associated with the bank account.
133
+ attr_reader :bank_name
134
+ # Two-letter ISO code representing the country the bank account is located in.
135
+ attr_reader :country
136
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
137
+ attr_reader :fingerprint
138
+ # Last four digits of the bank account number.
139
+ attr_reader :last4
140
+ # Routing transit number of the bank account.
141
+ attr_reader :routing_number
142
+ end
143
+
144
+ class AcssDebit < Stripe::StripeObject
145
+ # Name of the bank associated with the bank account.
146
+ attr_reader :bank_name
147
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
148
+ attr_reader :fingerprint
149
+ # Institution number of the bank account
150
+ attr_reader :institution_number
151
+ # Last four digits of the bank account number.
152
+ attr_reader :last4
153
+ # ID of the mandate used to make this payment.
154
+ attr_reader :mandate
155
+ # Transit number of the bank account.
156
+ attr_reader :transit_number
157
+ end
158
+
159
+ class Affirm < Stripe::StripeObject
160
+ # ID of the [location](https://stripe.com/docs/api/terminal/locations) that this transaction's reader is assigned to.
161
+ attr_reader :location
162
+ # ID of the [reader](https://stripe.com/docs/api/terminal/readers) this transaction was made on.
163
+ attr_reader :reader
164
+ # The Affirm transaction ID associated with this payment.
165
+ attr_reader :transaction_id
166
+ end
167
+
168
+ class AfterpayClearpay < Stripe::StripeObject
169
+ # The Afterpay order ID associated with this payment intent.
170
+ attr_reader :order_id
171
+ # Order identifier shown to the merchant in Afterpay’s online portal.
172
+ attr_reader :reference
173
+ end
174
+
175
+ class Alipay < Stripe::StripeObject
176
+ # Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same.
177
+ attr_reader :buyer_id
178
+ # Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same.
179
+ attr_reader :fingerprint
180
+ # Transaction ID of this particular Alipay transaction.
181
+ attr_reader :transaction_id
182
+ end
183
+
184
+ class Alma < Stripe::StripeObject; end
185
+
186
+ class AmazonPay < Stripe::StripeObject
187
+ class Funding < Stripe::StripeObject
188
+ class Card < Stripe::StripeObject
189
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
190
+ attr_reader :brand
191
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
192
+ attr_reader :country
193
+ # Two-digit number representing the card's expiration month.
194
+ attr_reader :exp_month
195
+ # Four-digit number representing the card's expiration year.
196
+ attr_reader :exp_year
197
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
198
+ attr_reader :funding
199
+ # The last four digits of the card.
200
+ attr_reader :last4
201
+ end
202
+ # Attribute for field card
203
+ attr_reader :card
204
+ # funding type of the underlying payment method.
205
+ attr_reader :type
206
+ end
207
+ # Attribute for field funding
208
+ attr_reader :funding
209
+ end
210
+
211
+ class AuBecsDebit < Stripe::StripeObject
212
+ # Bank-State-Branch number of the bank account.
213
+ attr_reader :bsb_number
214
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
215
+ attr_reader :fingerprint
216
+ # Last four digits of the bank account number.
217
+ attr_reader :last4
218
+ # ID of the mandate used to make this payment.
219
+ attr_reader :mandate
220
+ end
221
+
222
+ class BacsDebit < Stripe::StripeObject
223
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
224
+ attr_reader :fingerprint
225
+ # Last four digits of the bank account number.
226
+ attr_reader :last4
227
+ # ID of the mandate used to make this payment.
228
+ attr_reader :mandate
229
+ # Sort code of the bank account. (e.g., `10-20-30`)
230
+ attr_reader :sort_code
231
+ end
232
+
233
+ class Bancontact < Stripe::StripeObject
234
+ # Bank code of bank associated with the bank account.
235
+ attr_reader :bank_code
236
+ # Name of the bank associated with the bank account.
237
+ attr_reader :bank_name
238
+ # Bank Identifier Code of the bank associated with the bank account.
239
+ attr_reader :bic
240
+ # The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.
241
+ attr_reader :generated_sepa_debit
242
+ # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.
243
+ attr_reader :generated_sepa_debit_mandate
244
+ # Last four characters of the IBAN.
245
+ attr_reader :iban_last4
246
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
247
+ # Can be one of `en`, `de`, `fr`, or `nl`
248
+ attr_reader :preferred_language
249
+ # Owner's verified full name. Values are verified or provided by Bancontact directly
250
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
251
+ attr_reader :verified_name
252
+ end
253
+
254
+ class Billie < Stripe::StripeObject; end
255
+
256
+ class Blik < Stripe::StripeObject
257
+ # A unique and immutable identifier assigned by BLIK to every buyer.
258
+ attr_reader :buyer_id
259
+ end
260
+
261
+ class Boleto < Stripe::StripeObject
262
+ # The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers)
263
+ attr_reader :tax_id
264
+ end
265
+
266
+ class Card < Stripe::StripeObject
267
+ class Checks < Stripe::StripeObject
268
+ # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
269
+ attr_reader :address_line1_check
270
+ # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
271
+ attr_reader :address_postal_code_check
272
+ # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
273
+ attr_reader :cvc_check
274
+ end
275
+
276
+ class ExtendedAuthorization < Stripe::StripeObject
277
+ # Indicates whether or not the capture window is extended beyond the standard authorization.
278
+ attr_reader :status
279
+ end
280
+
281
+ class IncrementalAuthorization < Stripe::StripeObject
282
+ # Indicates whether or not the incremental authorization feature is supported.
283
+ attr_reader :status
284
+ end
285
+
286
+ class Installments < Stripe::StripeObject
287
+ class Plan < Stripe::StripeObject
288
+ # For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card.
289
+ attr_reader :count
290
+ # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card.
291
+ # One of `month`.
292
+ attr_reader :interval
293
+ # Type of installment plan, one of `fixed_count`.
294
+ attr_reader :type
295
+ end
296
+ # Installment plan selected for the payment.
297
+ attr_reader :plan
298
+ end
299
+
300
+ class Multicapture < Stripe::StripeObject
301
+ # Indicates whether or not multiple captures are supported.
302
+ attr_reader :status
303
+ end
304
+
305
+ class NetworkToken < Stripe::StripeObject
306
+ # Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction.
307
+ attr_reader :used
308
+ end
309
+
310
+ class Overcapture < Stripe::StripeObject
311
+ # The maximum amount that can be captured.
312
+ attr_reader :maximum_amount_capturable
313
+ # Indicates whether or not the authorized amount can be over-captured.
314
+ attr_reader :status
315
+ end
316
+
317
+ class ThreeDSecure < Stripe::StripeObject
318
+ # For authenticated transactions: how the customer was authenticated by
319
+ # the issuing bank.
320
+ attr_reader :authentication_flow
321
+ # The Electronic Commerce Indicator (ECI). A protocol-level field
322
+ # indicating what degree of authentication was performed.
323
+ attr_reader :electronic_commerce_indicator
324
+ # The exemption requested via 3DS and accepted by the issuer at authentication time.
325
+ attr_reader :exemption_indicator
326
+ # Whether Stripe requested the value of `exemption_indicator` in the transaction. This will depend on
327
+ # the outcome of Stripe's internal risk assessment.
328
+ attr_reader :exemption_indicator_applied
329
+ # Indicates the outcome of 3D Secure authentication.
330
+ attr_reader :result
331
+ # Additional information about why 3D Secure succeeded or failed based
332
+ # on the `result`.
333
+ attr_reader :result_reason
334
+ # The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID
335
+ # (dsTransId) for this payment.
336
+ attr_reader :transaction_id
337
+ # The version of 3D Secure that was used.
338
+ attr_reader :version
339
+ end
340
+
341
+ class Wallet < Stripe::StripeObject
342
+ class AmexExpressCheckout < Stripe::StripeObject; end
343
+ class ApplePay < Stripe::StripeObject; end
344
+ class GooglePay < Stripe::StripeObject; end
345
+ class Link < Stripe::StripeObject; end
346
+
347
+ class Masterpass < Stripe::StripeObject
348
+ class BillingAddress < Stripe::StripeObject
349
+ # City, district, suburb, town, or village.
350
+ attr_reader :city
351
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
352
+ attr_reader :country
353
+ # Address line 1 (e.g., street, PO Box, or company name).
354
+ attr_reader :line1
355
+ # Address line 2 (e.g., apartment, suite, unit, or building).
356
+ attr_reader :line2
357
+ # ZIP or postal code.
358
+ attr_reader :postal_code
359
+ # State, county, province, or region.
360
+ attr_reader :state
361
+ end
362
+
363
+ class ShippingAddress < Stripe::StripeObject
364
+ # City, district, suburb, town, or village.
365
+ attr_reader :city
366
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
367
+ attr_reader :country
368
+ # Address line 1 (e.g., street, PO Box, or company name).
369
+ attr_reader :line1
370
+ # Address line 2 (e.g., apartment, suite, unit, or building).
371
+ attr_reader :line2
372
+ # ZIP or postal code.
373
+ attr_reader :postal_code
374
+ # State, county, province, or region.
375
+ attr_reader :state
376
+ end
377
+ # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
378
+ attr_reader :billing_address
379
+ # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
380
+ attr_reader :email
381
+ # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
382
+ attr_reader :name
383
+ # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
384
+ attr_reader :shipping_address
385
+ end
386
+
387
+ class SamsungPay < Stripe::StripeObject; end
388
+
389
+ class VisaCheckout < Stripe::StripeObject
390
+ class BillingAddress < Stripe::StripeObject
391
+ # City, district, suburb, town, or village.
392
+ attr_reader :city
393
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
394
+ attr_reader :country
395
+ # Address line 1 (e.g., street, PO Box, or company name).
396
+ attr_reader :line1
397
+ # Address line 2 (e.g., apartment, suite, unit, or building).
398
+ attr_reader :line2
399
+ # ZIP or postal code.
400
+ attr_reader :postal_code
401
+ # State, county, province, or region.
402
+ attr_reader :state
403
+ end
404
+
405
+ class ShippingAddress < Stripe::StripeObject
406
+ # City, district, suburb, town, or village.
407
+ attr_reader :city
408
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
409
+ attr_reader :country
410
+ # Address line 1 (e.g., street, PO Box, or company name).
411
+ attr_reader :line1
412
+ # Address line 2 (e.g., apartment, suite, unit, or building).
413
+ attr_reader :line2
414
+ # ZIP or postal code.
415
+ attr_reader :postal_code
416
+ # State, county, province, or region.
417
+ attr_reader :state
418
+ end
419
+ # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
420
+ attr_reader :billing_address
421
+ # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
422
+ attr_reader :email
423
+ # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
424
+ attr_reader :name
425
+ # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
426
+ attr_reader :shipping_address
427
+ end
428
+ # Attribute for field amex_express_checkout
429
+ attr_reader :amex_express_checkout
430
+ # Attribute for field apple_pay
431
+ attr_reader :apple_pay
432
+ # (For tokenized numbers only.) The last four digits of the device account number.
433
+ attr_reader :dynamic_last4
434
+ # Attribute for field google_pay
435
+ attr_reader :google_pay
436
+ # Attribute for field link
437
+ attr_reader :link
438
+ # Attribute for field masterpass
439
+ attr_reader :masterpass
440
+ # Attribute for field samsung_pay
441
+ attr_reader :samsung_pay
442
+ # The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type.
443
+ attr_reader :type
444
+ # Attribute for field visa_checkout
445
+ attr_reader :visa_checkout
446
+ end
447
+ # The authorized amount.
448
+ attr_reader :amount_authorized
449
+ # Authorization code on the charge.
450
+ attr_reader :authorization_code
451
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
452
+ attr_reader :brand
453
+ # When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured.
454
+ attr_reader :capture_before
455
+ # Check results by Card networks on Card address and CVC at time of payment.
456
+ attr_reader :checks
457
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
458
+ attr_reader :country
459
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
460
+ attr_reader :description
461
+ # Two-digit number representing the card's expiration month.
462
+ attr_reader :exp_month
463
+ # Four-digit number representing the card's expiration year.
464
+ attr_reader :exp_year
465
+ # Attribute for field extended_authorization
466
+ attr_reader :extended_authorization
467
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
468
+ #
469
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
470
+ attr_reader :fingerprint
471
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
472
+ attr_reader :funding
473
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
474
+ attr_reader :iin
475
+ # Attribute for field incremental_authorization
476
+ attr_reader :incremental_authorization
477
+ # Installment details for this payment (Mexico only).
478
+ #
479
+ # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
480
+ attr_reader :installments
481
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
482
+ attr_reader :issuer
483
+ # The last four digits of the card.
484
+ attr_reader :last4
485
+ # ID of the mandate used to make this payment or created by it.
486
+ attr_reader :mandate
487
+ # True if this payment was marked as MOTO and out of scope for SCA.
488
+ attr_reader :moto
489
+ # Attribute for field multicapture
490
+ attr_reader :multicapture
491
+ # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
492
+ attr_reader :network
493
+ # If this card has network token credentials, this contains the details of the network token credentials.
494
+ attr_reader :network_token
495
+ # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
496
+ attr_reader :network_transaction_id
497
+ # Attribute for field overcapture
498
+ attr_reader :overcapture
499
+ # Status of a card based on the card issuer.
500
+ attr_reader :regulated_status
501
+ # Populated if this transaction used 3D Secure authentication.
502
+ attr_reader :three_d_secure
503
+ # If this Card is part of a card wallet, this contains the details of the card wallet.
504
+ attr_reader :wallet
505
+ end
506
+
507
+ class CardPresent < Stripe::StripeObject
508
+ class Offline < Stripe::StripeObject
509
+ # Time at which the payment was collected while offline
510
+ attr_reader :stored_at
511
+ # The method used to process this payment method offline. Only deferred is allowed.
512
+ attr_reader :type
513
+ end
514
+
515
+ class Receipt < Stripe::StripeObject
516
+ # The type of account being debited or credited
517
+ attr_reader :account_type
518
+ # EMV tag 9F26, cryptogram generated by the integrated circuit chip.
519
+ attr_reader :application_cryptogram
520
+ # Mnenomic of the Application Identifier.
521
+ attr_reader :application_preferred_name
522
+ # Identifier for this transaction.
523
+ attr_reader :authorization_code
524
+ # EMV tag 8A. A code returned by the card issuer.
525
+ attr_reader :authorization_response_code
526
+ # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`.
527
+ attr_reader :cardholder_verification_method
528
+ # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.
529
+ attr_reader :dedicated_file_name
530
+ # The outcome of a series of EMV functions performed by the card reader.
531
+ attr_reader :terminal_verification_results
532
+ # An indication of various EMV functions performed during the transaction.
533
+ attr_reader :transaction_status_information
534
+ end
535
+
536
+ class Wallet < Stripe::StripeObject
537
+ # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.
538
+ attr_reader :type
539
+ end
540
+ # The authorized amount
541
+ attr_reader :amount_authorized
542
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
543
+ attr_reader :brand
544
+ # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
545
+ attr_reader :brand_product
546
+ # When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured.
547
+ attr_reader :capture_before
548
+ # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
549
+ attr_reader :cardholder_name
550
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
551
+ attr_reader :country
552
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
553
+ attr_reader :description
554
+ # Authorization response cryptogram.
555
+ attr_reader :emv_auth_data
556
+ # Two-digit number representing the card's expiration month.
557
+ attr_reader :exp_month
558
+ # Four-digit number representing the card's expiration year.
559
+ attr_reader :exp_year
560
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
561
+ #
562
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
563
+ attr_reader :fingerprint
564
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
565
+ attr_reader :funding
566
+ # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod.
567
+ attr_reader :generated_card
568
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
569
+ attr_reader :iin
570
+ # Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support).
571
+ attr_reader :incremental_authorization_supported
572
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
573
+ attr_reader :issuer
574
+ # The last four digits of the card.
575
+ attr_reader :last4
576
+ # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
577
+ attr_reader :network
578
+ # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
579
+ attr_reader :network_transaction_id
580
+ # Details about payments collected offline.
581
+ attr_reader :offline
582
+ # Defines whether the authorized amount can be over-captured or not
583
+ attr_reader :overcapture_supported
584
+ # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
585
+ attr_reader :preferred_locales
586
+ # How card details were read in this transaction.
587
+ attr_reader :read_method
588
+ # A collection of fields required to be displayed on receipts. Only required for EMV transactions.
589
+ attr_reader :receipt
590
+ # Attribute for field wallet
591
+ attr_reader :wallet
592
+ end
593
+
594
+ class Cashapp < Stripe::StripeObject
595
+ # A unique and immutable identifier assigned by Cash App to every buyer.
596
+ attr_reader :buyer_id
597
+ # A public identifier for buyers using Cash App.
598
+ attr_reader :cashtag
599
+ end
600
+
601
+ class CustomerBalance < Stripe::StripeObject; end
602
+
603
+ class Eps < Stripe::StripeObject
604
+ # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`.
605
+ attr_reader :bank
606
+ # Owner's verified full name. Values are verified or provided by EPS directly
607
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
608
+ # EPS rarely provides this information so the attribute is usually empty.
609
+ attr_reader :verified_name
610
+ end
611
+
612
+ class Fpx < Stripe::StripeObject
613
+ # Account holder type, if provided. Can be one of `individual` or `company`.
614
+ attr_reader :account_holder_type
615
+ # The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`.
616
+ attr_reader :bank
617
+ # Unique transaction id generated by FPX for every request from the merchant
618
+ attr_reader :transaction_id
619
+ end
620
+
621
+ class Giropay < Stripe::StripeObject
622
+ # Bank code of bank associated with the bank account.
623
+ attr_reader :bank_code
624
+ # Name of the bank associated with the bank account.
625
+ attr_reader :bank_name
626
+ # Bank Identifier Code of the bank associated with the bank account.
627
+ attr_reader :bic
628
+ # Owner's verified full name. Values are verified or provided by Giropay directly
629
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
630
+ # Giropay rarely provides this information so the attribute is usually empty.
631
+ attr_reader :verified_name
632
+ end
633
+
634
+ class Grabpay < Stripe::StripeObject
635
+ # Unique transaction id generated by GrabPay
636
+ attr_reader :transaction_id
637
+ end
638
+
639
+ class Ideal < Stripe::StripeObject
640
+ # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
641
+ attr_reader :bank
642
+ # The Bank Identifier Code of the customer's bank.
643
+ attr_reader :bic
644
+ # The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.
645
+ attr_reader :generated_sepa_debit
646
+ # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.
647
+ attr_reader :generated_sepa_debit_mandate
648
+ # Last four characters of the IBAN.
649
+ attr_reader :iban_last4
650
+ # Owner's verified full name. Values are verified or provided by iDEAL directly
651
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
652
+ attr_reader :verified_name
653
+ end
654
+
655
+ class InteracPresent < Stripe::StripeObject
656
+ class Receipt < Stripe::StripeObject
657
+ # The type of account being debited or credited
658
+ attr_reader :account_type
659
+ # EMV tag 9F26, cryptogram generated by the integrated circuit chip.
660
+ attr_reader :application_cryptogram
661
+ # Mnenomic of the Application Identifier.
662
+ attr_reader :application_preferred_name
663
+ # Identifier for this transaction.
664
+ attr_reader :authorization_code
665
+ # EMV tag 8A. A code returned by the card issuer.
666
+ attr_reader :authorization_response_code
667
+ # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`.
668
+ attr_reader :cardholder_verification_method
669
+ # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.
670
+ attr_reader :dedicated_file_name
671
+ # The outcome of a series of EMV functions performed by the card reader.
672
+ attr_reader :terminal_verification_results
673
+ # An indication of various EMV functions performed during the transaction.
674
+ attr_reader :transaction_status_information
675
+ end
676
+ # Card brand. Can be `interac`, `mastercard` or `visa`.
677
+ attr_reader :brand
678
+ # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
679
+ attr_reader :cardholder_name
680
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
681
+ attr_reader :country
682
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
683
+ attr_reader :description
684
+ # Authorization response cryptogram.
685
+ attr_reader :emv_auth_data
686
+ # Two-digit number representing the card's expiration month.
687
+ attr_reader :exp_month
688
+ # Four-digit number representing the card's expiration year.
689
+ attr_reader :exp_year
690
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
691
+ #
692
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
693
+ attr_reader :fingerprint
694
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
695
+ attr_reader :funding
696
+ # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod.
697
+ attr_reader :generated_card
698
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
699
+ attr_reader :iin
700
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
701
+ attr_reader :issuer
702
+ # The last four digits of the card.
703
+ attr_reader :last4
704
+ # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
705
+ attr_reader :network
706
+ # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
707
+ attr_reader :network_transaction_id
708
+ # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
709
+ attr_reader :preferred_locales
710
+ # How card details were read in this transaction.
711
+ attr_reader :read_method
712
+ # A collection of fields required to be displayed on receipts. Only required for EMV transactions.
713
+ attr_reader :receipt
714
+ end
715
+
716
+ class KakaoPay < Stripe::StripeObject
717
+ # A unique identifier for the buyer as determined by the local payment processor.
718
+ attr_reader :buyer_id
719
+ end
720
+
721
+ class Klarna < Stripe::StripeObject
722
+ class PayerDetails < Stripe::StripeObject
723
+ class Address < Stripe::StripeObject
724
+ # The payer address country
725
+ attr_reader :country
726
+ end
727
+ # The payer's address
728
+ attr_reader :address
729
+ end
730
+ # The payer details for this transaction.
731
+ attr_reader :payer_details
732
+ # The Klarna payment method used for this transaction.
733
+ # Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments`
734
+ attr_reader :payment_method_category
735
+ # Preferred language of the Klarna authorization page that the customer is redirected to.
736
+ # Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `cs-CZ`, `en-CZ`, `ro-RO`, `en-RO`, `el-GR`, `en-GR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH`
737
+ attr_reader :preferred_locale
738
+ end
739
+
740
+ class Konbini < Stripe::StripeObject
741
+ class Store < Stripe::StripeObject
742
+ # The name of the convenience store chain where the payment was completed.
743
+ attr_reader :chain
744
+ end
745
+ # If the payment succeeded, this contains the details of the convenience store where the payment was completed.
746
+ attr_reader :store
747
+ end
748
+
749
+ class KrCard < Stripe::StripeObject
750
+ # The local credit or debit card brand.
751
+ attr_reader :brand
752
+ # A unique identifier for the buyer as determined by the local payment processor.
753
+ attr_reader :buyer_id
754
+ # The last four digits of the card. This may not be present for American Express cards.
755
+ attr_reader :last4
756
+ end
757
+
758
+ class Link < Stripe::StripeObject
759
+ # Two-letter ISO code representing the funding source country beneath the Link payment.
760
+ # You could use this attribute to get a sense of international fees.
761
+ attr_reader :country
762
+ end
763
+
764
+ class Mobilepay < Stripe::StripeObject
765
+ class Card < Stripe::StripeObject
766
+ # Brand of the card used in the transaction
767
+ attr_reader :brand
768
+ # Two-letter ISO code representing the country of the card
769
+ attr_reader :country
770
+ # Two digit number representing the card's expiration month
771
+ attr_reader :exp_month
772
+ # Two digit number representing the card's expiration year
773
+ attr_reader :exp_year
774
+ # The last 4 digits of the card
775
+ attr_reader :last4
776
+ end
777
+ # Internal card details
778
+ attr_reader :card
779
+ end
780
+
781
+ class Multibanco < Stripe::StripeObject
782
+ # Entity number associated with this Multibanco payment.
783
+ attr_reader :entity
784
+ # Reference number associated with this Multibanco payment.
785
+ attr_reader :reference
786
+ end
787
+
788
+ class NaverPay < Stripe::StripeObject
789
+ # A unique identifier for the buyer as determined by the local payment processor.
790
+ attr_reader :buyer_id
791
+ end
792
+
793
+ class NzBankAccount < Stripe::StripeObject
794
+ # The name on the bank account. Only present if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
795
+ attr_reader :account_holder_name
796
+ # The numeric code for the bank account's bank.
797
+ attr_reader :bank_code
798
+ # The name of the bank.
799
+ attr_reader :bank_name
800
+ # The numeric code for the bank account's bank branch.
801
+ attr_reader :branch_code
802
+ # Last four digits of the bank account number.
803
+ attr_reader :last4
804
+ # The suffix of the bank account number.
805
+ attr_reader :suffix
806
+ end
807
+
808
+ class Oxxo < Stripe::StripeObject
809
+ # OXXO reference number
810
+ attr_reader :number
811
+ end
812
+
813
+ class P24 < Stripe::StripeObject
814
+ # The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `velobank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`.
815
+ attr_reader :bank
816
+ # Unique reference for this Przelewy24 payment.
817
+ attr_reader :reference
818
+ # Owner's verified full name. Values are verified or provided by Przelewy24 directly
819
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
820
+ # Przelewy24 rarely provides this information so the attribute is usually empty.
821
+ attr_reader :verified_name
822
+ end
823
+
824
+ class PayByBank < Stripe::StripeObject; end
825
+
826
+ class Payco < Stripe::StripeObject
827
+ # A unique identifier for the buyer as determined by the local payment processor.
828
+ attr_reader :buyer_id
829
+ end
830
+
831
+ class Paynow < Stripe::StripeObject
832
+ # Reference number associated with this PayNow payment
833
+ attr_reader :reference
834
+ end
835
+
836
+ class Paypal < Stripe::StripeObject
837
+ class SellerProtection < Stripe::StripeObject
838
+ # An array of conditions that are covered for the transaction, if applicable.
839
+ attr_reader :dispute_categories
840
+ # Indicates whether the transaction is eligible for PayPal's seller protection.
841
+ attr_reader :status
842
+ end
843
+ # Two-letter ISO code representing the buyer's country. Values are provided by PayPal directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
844
+ attr_reader :country
845
+ # Owner's email. Values are provided by PayPal directly
846
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
847
+ attr_reader :payer_email
848
+ # PayPal account PayerID. This identifier uniquely identifies the PayPal customer.
849
+ attr_reader :payer_id
850
+ # Owner's full name. Values provided by PayPal directly
851
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
852
+ attr_reader :payer_name
853
+ # The level of protection offered as defined by PayPal Seller Protection for Merchants, for this transaction.
854
+ attr_reader :seller_protection
855
+ # A unique ID generated by PayPal for this transaction.
856
+ attr_reader :transaction_id
857
+ end
858
+
859
+ class Pix < Stripe::StripeObject
860
+ # Unique transaction id generated by BCB
861
+ attr_reader :bank_transaction_id
862
+ end
863
+
864
+ class Promptpay < Stripe::StripeObject
865
+ # Bill reference generated by PromptPay
866
+ attr_reader :reference
867
+ end
868
+
869
+ class RevolutPay < Stripe::StripeObject
870
+ class Funding < Stripe::StripeObject
871
+ class Card < Stripe::StripeObject
872
+ # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
873
+ attr_reader :brand
874
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
875
+ attr_reader :country
876
+ # Two-digit number representing the card's expiration month.
877
+ attr_reader :exp_month
878
+ # Four-digit number representing the card's expiration year.
879
+ attr_reader :exp_year
880
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
881
+ attr_reader :funding
882
+ # The last four digits of the card.
883
+ attr_reader :last4
884
+ end
885
+ # Attribute for field card
886
+ attr_reader :card
887
+ # funding type of the underlying payment method.
888
+ attr_reader :type
889
+ end
890
+ # Attribute for field funding
891
+ attr_reader :funding
892
+ end
893
+
894
+ class SamsungPay < Stripe::StripeObject
895
+ # A unique identifier for the buyer as determined by the local payment processor.
896
+ attr_reader :buyer_id
897
+ end
898
+
899
+ class Satispay < Stripe::StripeObject; end
900
+
901
+ class SepaCreditTransfer < Stripe::StripeObject
902
+ # Name of the bank associated with the bank account.
903
+ attr_reader :bank_name
904
+ # Bank Identifier Code of the bank associated with the bank account.
905
+ attr_reader :bic
906
+ # IBAN of the bank account to transfer funds to.
907
+ attr_reader :iban
908
+ end
909
+
910
+ class SepaDebit < Stripe::StripeObject
911
+ # Bank code of bank associated with the bank account.
912
+ attr_reader :bank_code
913
+ # Branch code of bank associated with the bank account.
914
+ attr_reader :branch_code
915
+ # Two-letter ISO code representing the country the bank account is located in.
916
+ attr_reader :country
917
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
918
+ attr_reader :fingerprint
919
+ # Last four characters of the IBAN.
920
+ attr_reader :last4
921
+ # Find the ID of the mandate used for this payment under the [payment_method_details.sepa_debit.mandate](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) property on the Charge. Use this mandate ID to [retrieve the Mandate](https://stripe.com/docs/api/mandates/retrieve).
922
+ attr_reader :mandate
923
+ end
11
924
 
12
- custom_method :capture, http_verb: :post
925
+ class Sofort < Stripe::StripeObject
926
+ # Bank code of bank associated with the bank account.
927
+ attr_reader :bank_code
928
+ # Name of the bank associated with the bank account.
929
+ attr_reader :bank_name
930
+ # Bank Identifier Code of the bank associated with the bank account.
931
+ attr_reader :bic
932
+ # Two-letter ISO code representing the country the bank account is located in.
933
+ attr_reader :country
934
+ # The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.
935
+ attr_reader :generated_sepa_debit
936
+ # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.
937
+ attr_reader :generated_sepa_debit_mandate
938
+ # Last four characters of the IBAN.
939
+ attr_reader :iban_last4
940
+ # Preferred language of the SOFORT authorization page that the customer is redirected to.
941
+ # Can be one of `de`, `en`, `es`, `fr`, `it`, `nl`, or `pl`
942
+ attr_reader :preferred_language
943
+ # Owner's verified full name. Values are verified or provided by SOFORT directly
944
+ # (if supported) at the time of authorization or settlement. They cannot be set or mutated.
945
+ attr_reader :verified_name
946
+ end
13
947
 
948
+ class StripeAccount < Stripe::StripeObject; end
949
+
950
+ class Swish < Stripe::StripeObject
951
+ # Uniquely identifies the payer's Swish account. You can use this attribute to check whether two Swish transactions were paid for by the same payer
952
+ attr_reader :fingerprint
953
+ # Payer bank reference number for the payment
954
+ attr_reader :payment_reference
955
+ # The last four digits of the Swish account phone number
956
+ attr_reader :verified_phone_last4
957
+ end
958
+
959
+ class Twint < Stripe::StripeObject; end
960
+
961
+ class UsBankAccount < Stripe::StripeObject
962
+ # Account holder type: individual or company.
963
+ attr_reader :account_holder_type
964
+ # Account type: checkings or savings. Defaults to checking if omitted.
965
+ attr_reader :account_type
966
+ # Name of the bank associated with the bank account.
967
+ attr_reader :bank_name
968
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
969
+ attr_reader :fingerprint
970
+ # Last four digits of the bank account number.
971
+ attr_reader :last4
972
+ # ID of the mandate used to make this payment.
973
+ attr_reader :mandate
974
+ # Reference number to locate ACH payments with customer's bank.
975
+ attr_reader :payment_reference
976
+ # Routing number of the bank account.
977
+ attr_reader :routing_number
978
+ end
979
+
980
+ class Wechat < Stripe::StripeObject; end
981
+
982
+ class WechatPay < Stripe::StripeObject
983
+ # Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same.
984
+ attr_reader :fingerprint
985
+ # ID of the [location](https://stripe.com/docs/api/terminal/locations) that this transaction's reader is assigned to.
986
+ attr_reader :location
987
+ # ID of the [reader](https://stripe.com/docs/api/terminal/readers) this transaction was made on.
988
+ attr_reader :reader
989
+ # Transaction ID of this particular WeChat Pay transaction.
990
+ attr_reader :transaction_id
991
+ end
992
+
993
+ class Zip < Stripe::StripeObject; end
994
+ # Attribute for field ach_credit_transfer
995
+ attr_reader :ach_credit_transfer
996
+ # Attribute for field ach_debit
997
+ attr_reader :ach_debit
998
+ # Attribute for field acss_debit
999
+ attr_reader :acss_debit
1000
+ # Attribute for field affirm
1001
+ attr_reader :affirm
1002
+ # Attribute for field afterpay_clearpay
1003
+ attr_reader :afterpay_clearpay
1004
+ # Attribute for field alipay
1005
+ attr_reader :alipay
1006
+ # Attribute for field alma
1007
+ attr_reader :alma
1008
+ # Attribute for field amazon_pay
1009
+ attr_reader :amazon_pay
1010
+ # Attribute for field au_becs_debit
1011
+ attr_reader :au_becs_debit
1012
+ # Attribute for field bacs_debit
1013
+ attr_reader :bacs_debit
1014
+ # Attribute for field bancontact
1015
+ attr_reader :bancontact
1016
+ # Attribute for field billie
1017
+ attr_reader :billie
1018
+ # Attribute for field blik
1019
+ attr_reader :blik
1020
+ # Attribute for field boleto
1021
+ attr_reader :boleto
1022
+ # Attribute for field card
1023
+ attr_reader :card
1024
+ # Attribute for field card_present
1025
+ attr_reader :card_present
1026
+ # Attribute for field cashapp
1027
+ attr_reader :cashapp
1028
+ # Attribute for field customer_balance
1029
+ attr_reader :customer_balance
1030
+ # Attribute for field eps
1031
+ attr_reader :eps
1032
+ # Attribute for field fpx
1033
+ attr_reader :fpx
1034
+ # Attribute for field giropay
1035
+ attr_reader :giropay
1036
+ # Attribute for field grabpay
1037
+ attr_reader :grabpay
1038
+ # Attribute for field ideal
1039
+ attr_reader :ideal
1040
+ # Attribute for field interac_present
1041
+ attr_reader :interac_present
1042
+ # Attribute for field kakao_pay
1043
+ attr_reader :kakao_pay
1044
+ # Attribute for field klarna
1045
+ attr_reader :klarna
1046
+ # Attribute for field konbini
1047
+ attr_reader :konbini
1048
+ # Attribute for field kr_card
1049
+ attr_reader :kr_card
1050
+ # Attribute for field link
1051
+ attr_reader :link
1052
+ # Attribute for field mobilepay
1053
+ attr_reader :mobilepay
1054
+ # Attribute for field multibanco
1055
+ attr_reader :multibanco
1056
+ # Attribute for field naver_pay
1057
+ attr_reader :naver_pay
1058
+ # Attribute for field nz_bank_account
1059
+ attr_reader :nz_bank_account
1060
+ # Attribute for field oxxo
1061
+ attr_reader :oxxo
1062
+ # Attribute for field p24
1063
+ attr_reader :p24
1064
+ # Attribute for field pay_by_bank
1065
+ attr_reader :pay_by_bank
1066
+ # Attribute for field payco
1067
+ attr_reader :payco
1068
+ # Attribute for field paynow
1069
+ attr_reader :paynow
1070
+ # Attribute for field paypal
1071
+ attr_reader :paypal
1072
+ # Attribute for field pix
1073
+ attr_reader :pix
1074
+ # Attribute for field promptpay
1075
+ attr_reader :promptpay
1076
+ # Attribute for field revolut_pay
1077
+ attr_reader :revolut_pay
1078
+ # Attribute for field samsung_pay
1079
+ attr_reader :samsung_pay
1080
+ # Attribute for field satispay
1081
+ attr_reader :satispay
1082
+ # Attribute for field sepa_credit_transfer
1083
+ attr_reader :sepa_credit_transfer
1084
+ # Attribute for field sepa_debit
1085
+ attr_reader :sepa_debit
1086
+ # Attribute for field sofort
1087
+ attr_reader :sofort
1088
+ # Attribute for field stripe_account
1089
+ attr_reader :stripe_account
1090
+ # Attribute for field swish
1091
+ attr_reader :swish
1092
+ # Attribute for field twint
1093
+ attr_reader :twint
1094
+ # The type of transaction-specific details of the payment method used in the payment. See [PaymentMethod.type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type) for the full list of possible types.
1095
+ # An additional hash is included on `payment_method_details` with a name matching this value.
1096
+ # It contains information specific to the payment method.
1097
+ attr_reader :type
1098
+ # Attribute for field us_bank_account
1099
+ attr_reader :us_bank_account
1100
+ # Attribute for field wechat
1101
+ attr_reader :wechat
1102
+ # Attribute for field wechat_pay
1103
+ attr_reader :wechat_pay
1104
+ # Attribute for field zip
1105
+ attr_reader :zip
1106
+ end
1107
+
1108
+ class PresentmentDetails < Stripe::StripeObject
1109
+ # Amount intended to be collected by this payment, denominated in presentment_currency.
1110
+ attr_reader :presentment_amount
1111
+ # Currency presented to the customer during payment.
1112
+ attr_reader :presentment_currency
1113
+ end
1114
+
1115
+ class RadarOptions < Stripe::StripeObject
1116
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
1117
+ attr_reader :session
1118
+ end
1119
+
1120
+ class Shipping < Stripe::StripeObject
1121
+ class Address < Stripe::StripeObject
1122
+ # City, district, suburb, town, or village.
1123
+ attr_reader :city
1124
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
1125
+ attr_reader :country
1126
+ # Address line 1 (e.g., street, PO Box, or company name).
1127
+ attr_reader :line1
1128
+ # Address line 2 (e.g., apartment, suite, unit, or building).
1129
+ attr_reader :line2
1130
+ # ZIP or postal code.
1131
+ attr_reader :postal_code
1132
+ # State, county, province, or region.
1133
+ attr_reader :state
1134
+ end
1135
+ # Attribute for field address
1136
+ attr_reader :address
1137
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
1138
+ attr_reader :carrier
1139
+ # Recipient name.
1140
+ attr_reader :name
1141
+ # Recipient phone (including extension).
1142
+ attr_reader :phone
1143
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
1144
+ attr_reader :tracking_number
1145
+ end
1146
+
1147
+ class TransferData < Stripe::StripeObject
1148
+ # The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.
1149
+ attr_reader :amount
1150
+ # ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request.
1151
+ attr_reader :destination
1152
+ end
1153
+
1154
+ class ListParams < Stripe::RequestParams
1155
+ class Created < Stripe::RequestParams
1156
+ # Minimum value to filter by (exclusive)
1157
+ attr_accessor :gt
1158
+ # Minimum value to filter by (inclusive)
1159
+ attr_accessor :gte
1160
+ # Maximum value to filter by (exclusive)
1161
+ attr_accessor :lt
1162
+ # Maximum value to filter by (inclusive)
1163
+ attr_accessor :lte
1164
+
1165
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
1166
+ @gt = gt
1167
+ @gte = gte
1168
+ @lt = lt
1169
+ @lte = lte
1170
+ end
1171
+ end
1172
+ # Only return charges that were created during the given date interval.
1173
+ attr_accessor :created
1174
+ # Only return charges for the customer specified by this customer ID.
1175
+ attr_accessor :customer
1176
+ # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
1177
+ attr_accessor :ending_before
1178
+ # Specifies which fields in the response should be expanded.
1179
+ attr_accessor :expand
1180
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
1181
+ attr_accessor :limit
1182
+ # Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID.
1183
+ attr_accessor :payment_intent
1184
+ # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
1185
+ attr_accessor :starting_after
1186
+ # Only return charges for this transfer group, limited to 100.
1187
+ attr_accessor :transfer_group
1188
+
1189
+ def initialize(
1190
+ created: nil,
1191
+ customer: nil,
1192
+ ending_before: nil,
1193
+ expand: nil,
1194
+ limit: nil,
1195
+ payment_intent: nil,
1196
+ starting_after: nil,
1197
+ transfer_group: nil
1198
+ )
1199
+ @created = created
1200
+ @customer = customer
1201
+ @ending_before = ending_before
1202
+ @expand = expand
1203
+ @limit = limit
1204
+ @payment_intent = payment_intent
1205
+ @starting_after = starting_after
1206
+ @transfer_group = transfer_group
1207
+ end
1208
+ end
1209
+
1210
+ class CreateParams < Stripe::RequestParams
1211
+ class Destination < Stripe::RequestParams
1212
+ # ID of an existing, connected Stripe account.
1213
+ attr_accessor :account
1214
+ # The amount to transfer to the destination account without creating an `Application Fee` object. Cannot be combined with the `application_fee` parameter. Must be less than or equal to the charge amount.
1215
+ attr_accessor :amount
1216
+
1217
+ def initialize(account: nil, amount: nil)
1218
+ @account = account
1219
+ @amount = amount
1220
+ end
1221
+ end
1222
+
1223
+ class RadarOptions < Stripe::RequestParams
1224
+ # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
1225
+ attr_accessor :session
1226
+
1227
+ def initialize(session: nil)
1228
+ @session = session
1229
+ end
1230
+ end
1231
+
1232
+ class Shipping < Stripe::RequestParams
1233
+ class Address < Stripe::RequestParams
1234
+ # City, district, suburb, town, or village.
1235
+ attr_accessor :city
1236
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
1237
+ attr_accessor :country
1238
+ # Address line 1 (e.g., street, PO Box, or company name).
1239
+ attr_accessor :line1
1240
+ # Address line 2 (e.g., apartment, suite, unit, or building).
1241
+ attr_accessor :line2
1242
+ # ZIP or postal code.
1243
+ attr_accessor :postal_code
1244
+ # State, county, province, or region.
1245
+ attr_accessor :state
1246
+
1247
+ def initialize(
1248
+ city: nil,
1249
+ country: nil,
1250
+ line1: nil,
1251
+ line2: nil,
1252
+ postal_code: nil,
1253
+ state: nil
1254
+ )
1255
+ @city = city
1256
+ @country = country
1257
+ @line1 = line1
1258
+ @line2 = line2
1259
+ @postal_code = postal_code
1260
+ @state = state
1261
+ end
1262
+ end
1263
+ # Shipping address.
1264
+ attr_accessor :address
1265
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
1266
+ attr_accessor :carrier
1267
+ # Recipient name.
1268
+ attr_accessor :name
1269
+ # Recipient phone (including extension).
1270
+ attr_accessor :phone
1271
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
1272
+ attr_accessor :tracking_number
1273
+
1274
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil)
1275
+ @address = address
1276
+ @carrier = carrier
1277
+ @name = name
1278
+ @phone = phone
1279
+ @tracking_number = tracking_number
1280
+ end
1281
+ end
1282
+
1283
+ class TransferData < Stripe::RequestParams
1284
+ # The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.
1285
+ attr_accessor :amount
1286
+ # ID of an existing, connected Stripe account.
1287
+ attr_accessor :destination
1288
+
1289
+ def initialize(amount: nil, destination: nil)
1290
+ @amount = amount
1291
+ @destination = destination
1292
+ end
1293
+ end
1294
+ # Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
1295
+ attr_accessor :amount
1296
+ # Attribute for param field application_fee
1297
+ attr_accessor :application_fee
1298
+ # A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collect-fees).
1299
+ attr_accessor :application_fee_amount
1300
+ # Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation.
1301
+ attr_accessor :capture
1302
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
1303
+ attr_accessor :currency
1304
+ # The ID of an existing customer that will be charged in this request.
1305
+ attr_accessor :customer
1306
+ # An arbitrary string which you can attach to a `Charge` object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing.
1307
+ attr_accessor :description
1308
+ # Attribute for param field destination
1309
+ attr_accessor :destination
1310
+ # Specifies which fields in the response should be expanded.
1311
+ attr_accessor :expand
1312
+ # 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`.
1313
+ attr_accessor :metadata
1314
+ # The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant).
1315
+ attr_accessor :on_behalf_of
1316
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
1317
+ attr_accessor :radar_options
1318
+ # The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
1319
+ attr_accessor :receipt_email
1320
+ # Shipping information for the charge. Helps prevent fraud on charges for physical goods.
1321
+ attr_accessor :shipping
1322
+ # A payment source to be charged. This can be the ID of a [card](https://stripe.com/docs/api#cards) (i.e., credit or debit card), a [bank account](https://stripe.com/docs/api#bank_accounts), a [source](https://stripe.com/docs/api#sources), a [token](https://stripe.com/docs/api#tokens), or a [connected account](https://stripe.com/docs/connect/account-debits#charging-a-connected-account). For certain sources---namely, [cards](https://stripe.com/docs/api#cards), [bank accounts](https://stripe.com/docs/api#bank_accounts), and attached [sources](https://stripe.com/docs/api#sources)---you must also pass the ID of the associated customer.
1323
+ attr_accessor :source
1324
+ # For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors).
1325
+ #
1326
+ # For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
1327
+ attr_accessor :statement_descriptor
1328
+ # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor.
1329
+ attr_accessor :statement_descriptor_suffix
1330
+ # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
1331
+ attr_accessor :transfer_data
1332
+ # A string that identifies this transaction as part of a group. For details, see [Grouping transactions](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options).
1333
+ attr_accessor :transfer_group
1334
+
1335
+ def initialize(
1336
+ amount: nil,
1337
+ application_fee: nil,
1338
+ application_fee_amount: nil,
1339
+ capture: nil,
1340
+ currency: nil,
1341
+ customer: nil,
1342
+ description: nil,
1343
+ destination: nil,
1344
+ expand: nil,
1345
+ metadata: nil,
1346
+ on_behalf_of: nil,
1347
+ radar_options: nil,
1348
+ receipt_email: nil,
1349
+ shipping: nil,
1350
+ source: nil,
1351
+ statement_descriptor: nil,
1352
+ statement_descriptor_suffix: nil,
1353
+ transfer_data: nil,
1354
+ transfer_group: nil
1355
+ )
1356
+ @amount = amount
1357
+ @application_fee = application_fee
1358
+ @application_fee_amount = application_fee_amount
1359
+ @capture = capture
1360
+ @currency = currency
1361
+ @customer = customer
1362
+ @description = description
1363
+ @destination = destination
1364
+ @expand = expand
1365
+ @metadata = metadata
1366
+ @on_behalf_of = on_behalf_of
1367
+ @radar_options = radar_options
1368
+ @receipt_email = receipt_email
1369
+ @shipping = shipping
1370
+ @source = source
1371
+ @statement_descriptor = statement_descriptor
1372
+ @statement_descriptor_suffix = statement_descriptor_suffix
1373
+ @transfer_data = transfer_data
1374
+ @transfer_group = transfer_group
1375
+ end
1376
+ end
1377
+
1378
+ class UpdateParams < Stripe::RequestParams
1379
+ class FraudDetails < Stripe::RequestParams
1380
+ # Either `safe` or `fraudulent`.
1381
+ attr_accessor :user_report
1382
+
1383
+ def initialize(user_report: nil)
1384
+ @user_report = user_report
1385
+ end
1386
+ end
1387
+
1388
+ class Shipping < Stripe::RequestParams
1389
+ class Address < Stripe::RequestParams
1390
+ # City, district, suburb, town, or village.
1391
+ attr_accessor :city
1392
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
1393
+ attr_accessor :country
1394
+ # Address line 1 (e.g., street, PO Box, or company name).
1395
+ attr_accessor :line1
1396
+ # Address line 2 (e.g., apartment, suite, unit, or building).
1397
+ attr_accessor :line2
1398
+ # ZIP or postal code.
1399
+ attr_accessor :postal_code
1400
+ # State, county, province, or region.
1401
+ attr_accessor :state
1402
+
1403
+ def initialize(
1404
+ city: nil,
1405
+ country: nil,
1406
+ line1: nil,
1407
+ line2: nil,
1408
+ postal_code: nil,
1409
+ state: nil
1410
+ )
1411
+ @city = city
1412
+ @country = country
1413
+ @line1 = line1
1414
+ @line2 = line2
1415
+ @postal_code = postal_code
1416
+ @state = state
1417
+ end
1418
+ end
1419
+ # Shipping address.
1420
+ attr_accessor :address
1421
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
1422
+ attr_accessor :carrier
1423
+ # Recipient name.
1424
+ attr_accessor :name
1425
+ # Recipient phone (including extension).
1426
+ attr_accessor :phone
1427
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
1428
+ attr_accessor :tracking_number
1429
+
1430
+ def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil)
1431
+ @address = address
1432
+ @carrier = carrier
1433
+ @name = name
1434
+ @phone = phone
1435
+ @tracking_number = tracking_number
1436
+ end
1437
+ end
1438
+ # The ID of an existing customer that will be associated with this request. This field may only be updated if there is no existing associated customer with this charge.
1439
+ attr_accessor :customer
1440
+ # An arbitrary string which you can attach to a charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing.
1441
+ attr_accessor :description
1442
+ # Specifies which fields in the response should be expanded.
1443
+ attr_accessor :expand
1444
+ # A set of key-value pairs you can attach to a charge giving information about its riskiness. If you believe a charge is fraudulent, include a `user_report` key with a value of `fraudulent`. If you believe a charge is safe, include a `user_report` key with a value of `safe`. Stripe will use the information you send to improve our fraud detection algorithms.
1445
+ attr_accessor :fraud_details
1446
+ # 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`.
1447
+ attr_accessor :metadata
1448
+ # This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address.
1449
+ attr_accessor :receipt_email
1450
+ # Shipping information for the charge. Helps prevent fraud on charges for physical goods.
1451
+ attr_accessor :shipping
1452
+ # A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details.
1453
+ attr_accessor :transfer_group
1454
+
1455
+ def initialize(
1456
+ customer: nil,
1457
+ description: nil,
1458
+ expand: nil,
1459
+ fraud_details: nil,
1460
+ metadata: nil,
1461
+ receipt_email: nil,
1462
+ shipping: nil,
1463
+ transfer_group: nil
1464
+ )
1465
+ @customer = customer
1466
+ @description = description
1467
+ @expand = expand
1468
+ @fraud_details = fraud_details
1469
+ @metadata = metadata
1470
+ @receipt_email = receipt_email
1471
+ @shipping = shipping
1472
+ @transfer_group = transfer_group
1473
+ end
1474
+ end
1475
+
1476
+ class SearchParams < Stripe::RequestParams
1477
+ # Specifies which fields in the response should be expanded.
1478
+ attr_accessor :expand
1479
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
1480
+ attr_accessor :limit
1481
+ # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
1482
+ attr_accessor :page
1483
+ # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for charges](https://stripe.com/docs/search#query-fields-for-charges).
1484
+ attr_accessor :query
1485
+
1486
+ def initialize(expand: nil, limit: nil, page: nil, query: nil)
1487
+ @expand = expand
1488
+ @limit = limit
1489
+ @page = page
1490
+ @query = query
1491
+ end
1492
+ end
1493
+
1494
+ class CaptureParams < Stripe::RequestParams
1495
+ class TransferData < Stripe::RequestParams
1496
+ # The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.
1497
+ attr_accessor :amount
1498
+
1499
+ def initialize(amount: nil)
1500
+ @amount = amount
1501
+ end
1502
+ end
1503
+ # The amount to capture, which must be less than or equal to the original amount.
1504
+ attr_accessor :amount
1505
+ # An application fee to add on to this charge.
1506
+ attr_accessor :application_fee
1507
+ # An application fee amount to add on to this charge, which must be less than or equal to the original amount.
1508
+ attr_accessor :application_fee_amount
1509
+ # Specifies which fields in the response should be expanded.
1510
+ attr_accessor :expand
1511
+ # The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode.
1512
+ attr_accessor :receipt_email
1513
+ # For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors).
1514
+ #
1515
+ # For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
1516
+ attr_accessor :statement_descriptor
1517
+ # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor.
1518
+ attr_accessor :statement_descriptor_suffix
1519
+ # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
1520
+ attr_accessor :transfer_data
1521
+ # A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details.
1522
+ attr_accessor :transfer_group
1523
+
1524
+ def initialize(
1525
+ amount: nil,
1526
+ application_fee: nil,
1527
+ application_fee_amount: nil,
1528
+ expand: nil,
1529
+ receipt_email: nil,
1530
+ statement_descriptor: nil,
1531
+ statement_descriptor_suffix: nil,
1532
+ transfer_data: nil,
1533
+ transfer_group: nil
1534
+ )
1535
+ @amount = amount
1536
+ @application_fee = application_fee
1537
+ @application_fee_amount = application_fee_amount
1538
+ @expand = expand
1539
+ @receipt_email = receipt_email
1540
+ @statement_descriptor = statement_descriptor
1541
+ @statement_descriptor_suffix = statement_descriptor_suffix
1542
+ @transfer_data = transfer_data
1543
+ @transfer_group = transfer_group
1544
+ end
1545
+ end
1546
+ # Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
1547
+ attr_reader :amount
1548
+ # Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made).
1549
+ attr_reader :amount_captured
1550
+ # Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued).
1551
+ attr_reader :amount_refunded
1552
+ # ID of the Connect application that created the charge.
1553
+ attr_reader :application
1554
+ # The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details.
1555
+ attr_reader :application_fee
1556
+ # The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details.
1557
+ attr_reader :application_fee_amount
1558
+ # Authorization code on the charge.
1559
+ attr_reader :authorization_code
1560
+ # ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes).
1561
+ attr_reader :balance_transaction
1562
+ # Attribute for field billing_details
1563
+ attr_reader :billing_details
1564
+ # The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. This value only exists for card payments.
1565
+ attr_reader :calculated_statement_descriptor
1566
+ # If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured.
1567
+ attr_reader :captured
1568
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
1569
+ attr_reader :created
1570
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
1571
+ attr_reader :currency
1572
+ # ID of the customer this charge is for if one exists.
1573
+ attr_reader :customer
1574
+ # An arbitrary string attached to the object. Often useful for displaying to users.
1575
+ attr_reader :description
1576
+ # Whether the charge has been disputed.
1577
+ attr_reader :disputed
1578
+ # ID of the balance transaction that describes the reversal of the balance on your account due to payment failure.
1579
+ attr_reader :failure_balance_transaction
1580
+ # Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/error-codes) for a list of codes).
1581
+ attr_reader :failure_code
1582
+ # Message to user further explaining reason for charge failure if available.
1583
+ attr_reader :failure_message
1584
+ # Information on fraud assessments for the charge.
1585
+ attr_reader :fraud_details
1586
+ # Unique identifier for the object.
1587
+ attr_reader :id
1588
+ # Attribute for field level3
1589
+ attr_reader :level3
1590
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
1591
+ attr_reader :livemode
1592
+ # 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.
1593
+ attr_reader :metadata
1594
+ # String representing the object's type. Objects of the same type share the same value.
1595
+ attr_reader :object
1596
+ # The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details.
1597
+ attr_reader :on_behalf_of
1598
+ # Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details.
1599
+ attr_reader :outcome
1600
+ # `true` if the charge succeeded, or was successfully authorized for later capture.
1601
+ attr_reader :paid
1602
+ # ID of the PaymentIntent associated with this charge, if one exists.
1603
+ attr_reader :payment_intent
1604
+ # ID of the payment method used in this charge.
1605
+ attr_reader :payment_method
1606
+ # Details about the payment method at the time of the transaction.
1607
+ attr_reader :payment_method_details
1608
+ # Attribute for field presentment_details
1609
+ attr_reader :presentment_details
1610
+ # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
1611
+ attr_reader :radar_options
1612
+ # This is the email address that the receipt for this charge was sent to.
1613
+ attr_reader :receipt_email
1614
+ # This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent.
1615
+ attr_reader :receipt_number
1616
+ # This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt.
1617
+ attr_reader :receipt_url
1618
+ # Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false.
1619
+ attr_reader :refunded
1620
+ # A list of refunds that have been applied to the charge.
1621
+ attr_reader :refunds
1622
+ # ID of the review associated with this charge if one exists.
1623
+ attr_reader :review
1624
+ # Shipping information for the charge.
1625
+ attr_reader :shipping
1626
+ # This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to `payment_method` or `payment_method_details` instead.
1627
+ attr_reader :source
1628
+ # The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://docs.stripe.com/connect/destination-charges) for details.
1629
+ attr_reader :source_transfer
1630
+ # For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors).
1631
+ #
1632
+ # For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
1633
+ attr_reader :statement_descriptor
1634
+ # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor.
1635
+ attr_reader :statement_descriptor_suffix
1636
+ # The status of the payment is either `succeeded`, `pending`, or `failed`.
1637
+ attr_reader :status
1638
+ # ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter).
1639
+ attr_reader :transfer
1640
+ # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
1641
+ attr_reader :transfer_data
1642
+ # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details.
1643
+ attr_reader :transfer_group
1644
+
1645
+ # Capture the payment of an existing, uncaptured charge that was created with the capture option set to false.
1646
+ #
1647
+ # Uncaptured payments expire a set number of days after they are created ([7 by default](https://docs.stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail.
1648
+ #
1649
+ # Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://docs.stripe.com/docs/api/payment_intents/capture).
14
1650
  def capture(params = {}, opts = {})
15
1651
  request_stripe_object(
16
1652
  method: :post,
17
- path: resource_url + "/capture",
1653
+ path: format("/v1/charges/%<charge>s/capture", { charge: CGI.escape(self["id"]) }),
1654
+ params: params,
1655
+ opts: opts
1656
+ )
1657
+ end
1658
+
1659
+ # Capture the payment of an existing, uncaptured charge that was created with the capture option set to false.
1660
+ #
1661
+ # Uncaptured payments expire a set number of days after they are created ([7 by default](https://docs.stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail.
1662
+ #
1663
+ # Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://docs.stripe.com/docs/api/payment_intents/capture).
1664
+ def self.capture(charge, params = {}, opts = {})
1665
+ request_stripe_object(
1666
+ method: :post,
1667
+ path: format("/v1/charges/%<charge>s/capture", { charge: CGI.escape(charge) }),
1668
+ params: params,
1669
+ opts: opts
1670
+ )
1671
+ end
1672
+
1673
+ # This method is no longer recommended—use the [Payment Intents API](https://docs.stripe.com/docs/api/payment_intents)
1674
+ # to initiate a new payment instead. Confirmation of the PaymentIntent creates the Charge
1675
+ # object used to request payment.
1676
+ def self.create(params = {}, opts = {})
1677
+ request_stripe_object(method: :post, path: "/v1/charges", params: params, opts: opts)
1678
+ end
1679
+
1680
+ # Returns a list of charges you've previously created. The charges are returned in sorted order, with the most recent charges appearing first.
1681
+ def self.list(params = {}, opts = {})
1682
+ request_stripe_object(method: :get, path: "/v1/charges", params: params, opts: opts)
1683
+ end
1684
+
1685
+ def self.search(params = {}, opts = {})
1686
+ request_stripe_object(method: :get, path: "/v1/charges/search", params: params, opts: opts)
1687
+ end
1688
+
1689
+ def self.search_auto_paging_each(params = {}, opts = {}, &blk)
1690
+ search(params, opts).auto_paging_each(&blk)
1691
+ end
1692
+
1693
+ # Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
1694
+ def self.update(charge, params = {}, opts = {})
1695
+ request_stripe_object(
1696
+ method: :post,
1697
+ path: format("/v1/charges/%<charge>s", { charge: CGI.escape(charge) }),
18
1698
  params: params,
19
1699
  opts: opts
20
1700
  )