stripe 13.3.0 → 13.4.0.pre.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (743) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1410 -650
  3. data/OPENAPI_VERSION +1 -1
  4. data/VERSION +1 -1
  5. data/lib/stripe/api_operations/request.rb +1 -0
  6. data/lib/stripe/api_requestor.rb +1 -0
  7. data/lib/stripe/object_types.rb +32 -0
  8. data/lib/stripe/request_params.rb +24 -0
  9. data/lib/stripe/request_signing_authenticator.rb +79 -0
  10. data/lib/stripe/resources/account.rb +5793 -0
  11. data/lib/stripe/resources/account_link.rb +64 -0
  12. data/lib/stripe/resources/account_notice.rb +154 -0
  13. data/lib/stripe/resources/account_session.rb +1002 -0
  14. data/lib/stripe/resources/apple_pay_domain.rb +73 -0
  15. data/lib/stripe/resources/application.rb +23 -0
  16. data/lib/stripe/resources/application_fee.rb +120 -0
  17. data/lib/stripe/resources/application_fee_refund.rb +24 -0
  18. data/lib/stripe/resources/apps/secret.rb +166 -0
  19. data/lib/stripe/resources/balance.rb +162 -0
  20. data/lib/stripe/resources/balance_transaction.rb +141 -0
  21. data/lib/stripe/resources/bank_account.rb +113 -2
  22. data/lib/stripe/resources/billing/alert.rb +166 -0
  23. data/lib/stripe/resources/billing/alert_triggered.rb +31 -0
  24. data/lib/stripe/resources/billing/credit_balance_summary.rb +89 -0
  25. data/lib/stripe/resources/billing/credit_balance_transaction.rb +140 -0
  26. data/lib/stripe/resources/billing/credit_grant.rb +235 -0
  27. data/lib/stripe/resources/billing/meter.rb +203 -0
  28. data/lib/stripe/resources/billing/meter_error_report.rb +70 -0
  29. data/lib/stripe/resources/billing/meter_event.rb +45 -0
  30. data/lib/stripe/resources/billing/meter_event_adjustment.rb +51 -0
  31. data/lib/stripe/resources/billing/meter_event_summary.rb +21 -0
  32. data/lib/stripe/resources/billing_portal/configuration.rb +639 -0
  33. data/lib/stripe/resources/billing_portal/session.rb +313 -0
  34. data/lib/stripe/resources/capability.rb +111 -0
  35. data/lib/stripe/resources/capital/financing_offer.rb +221 -0
  36. data/lib/stripe/resources/capital/financing_summary.rb +77 -0
  37. data/lib/stripe/resources/capital/financing_transaction.rb +147 -0
  38. data/lib/stripe/resources/card.rb +111 -0
  39. data/lib/stripe/resources/cash_balance.rb +22 -0
  40. data/lib/stripe/resources/charge.rb +3687 -0
  41. data/lib/stripe/resources/checkout/session.rb +4162 -0
  42. data/lib/stripe/resources/climate/order.rb +216 -0
  43. data/lib/stripe/resources/climate/product.rb +69 -0
  44. data/lib/stripe/resources/climate/supplier.rb +67 -0
  45. data/lib/stripe/resources/confirmation_token.rb +1855 -0
  46. data/lib/stripe/resources/connect_collection_transfer.rb +29 -0
  47. data/lib/stripe/resources/country_spec.rb +76 -0
  48. data/lib/stripe/resources/coupon.rb +237 -0
  49. data/lib/stripe/resources/credit_note.rb +798 -0
  50. data/lib/stripe/resources/credit_note_line_item.rb +89 -0
  51. data/lib/stripe/resources/customer.rb +995 -0
  52. data/lib/stripe/resources/customer_balance_transaction.rb +39 -0
  53. data/lib/stripe/resources/customer_cash_balance_transaction.rb +136 -0
  54. data/lib/stripe/resources/customer_session.rb +183 -0
  55. data/lib/stripe/resources/discount.rb +41 -0
  56. data/lib/stripe/resources/dispute.rb +767 -0
  57. data/lib/stripe/resources/entitlements/active_entitlement.rb +54 -0
  58. data/lib/stripe/resources/entitlements/active_entitlement_summary.rb +26 -0
  59. data/lib/stripe/resources/entitlements/feature.rb +107 -0
  60. data/lib/stripe/resources/ephemeral_key.rb +26 -0
  61. data/lib/stripe/resources/event.rb +157 -0
  62. data/lib/stripe/resources/exchange_rate.rb +38 -0
  63. data/lib/stripe/resources/file.rb +134 -0
  64. data/lib/stripe/resources/file_link.rb +134 -0
  65. data/lib/stripe/resources/financial_connections/account.rb +307 -0
  66. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +30 -0
  67. data/lib/stripe/resources/financial_connections/account_owner.rb +24 -0
  68. data/lib/stripe/resources/financial_connections/account_ownership.rb +12 -0
  69. data/lib/stripe/resources/financial_connections/institution.rb +112 -0
  70. data/lib/stripe/resources/financial_connections/session.rb +187 -0
  71. data/lib/stripe/resources/financial_connections/transaction.rb +122 -0
  72. data/lib/stripe/resources/forwarding/request.rb +196 -0
  73. data/lib/stripe/resources/funding_instructions.rb +415 -0
  74. data/lib/stripe/resources/gift_cards/card.rb +245 -0
  75. data/lib/stripe/resources/gift_cards/transaction.rb +313 -0
  76. data/lib/stripe/resources/identity/verification_report.rb +335 -0
  77. data/lib/stripe/resources/identity/verification_session.rb +430 -0
  78. data/lib/stripe/resources/invoice.rb +9348 -0
  79. data/lib/stripe/resources/invoice_item.rb +536 -0
  80. data/lib/stripe/resources/invoice_line_item.rb +409 -0
  81. data/lib/stripe/resources/invoice_payment.rb +72 -0
  82. data/lib/stripe/resources/invoice_rendering_template.rb +79 -0
  83. data/lib/stripe/resources/issuing/authorization.rb +1316 -2
  84. data/lib/stripe/resources/issuing/card.rb +794 -0
  85. data/lib/stripe/resources/issuing/cardholder.rb +768 -0
  86. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +693 -0
  87. data/lib/stripe/resources/issuing/dispute.rb +941 -0
  88. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +98 -0
  89. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +109 -0
  90. data/lib/stripe/resources/issuing/personalization_design.rb +333 -0
  91. data/lib/stripe/resources/issuing/physical_bundle.rb +76 -0
  92. data/lib/stripe/resources/issuing/settlement.rb +65 -0
  93. data/lib/stripe/resources/issuing/token.rb +221 -0
  94. data/lib/stripe/resources/issuing/transaction.rb +1098 -0
  95. data/lib/stripe/resources/line_item.rb +98 -0
  96. data/lib/stripe/resources/login_link.rb +9 -0
  97. data/lib/stripe/resources/mandate.rb +214 -0
  98. data/lib/stripe/resources/margin.rb +143 -0
  99. data/lib/stripe/resources/order.rb +3238 -0
  100. data/lib/stripe/resources/payment_attempt_record.rb +226 -0
  101. data/lib/stripe/resources/payment_intent.rb +14630 -0
  102. data/lib/stripe/resources/payment_link.rb +1761 -0
  103. data/lib/stripe/resources/payment_method.rb +1981 -0
  104. data/lib/stripe/resources/payment_method_configuration.rb +3137 -0
  105. data/lib/stripe/resources/payment_method_domain.rb +176 -0
  106. data/lib/stripe/resources/payment_record.rb +824 -0
  107. data/lib/stripe/resources/payout.rb +267 -0
  108. data/lib/stripe/resources/person.rb +353 -0
  109. data/lib/stripe/resources/plan.rb +386 -0
  110. data/lib/stripe/resources/price.rb +782 -0
  111. data/lib/stripe/resources/product.rb +636 -0
  112. data/lib/stripe/resources/product_feature.rb +16 -0
  113. data/lib/stripe/resources/promotion_code.rb +261 -0
  114. data/lib/stripe/resources/quote.rb +3404 -0
  115. data/lib/stripe/resources/quote_line.rb +340 -0
  116. data/lib/stripe/resources/quote_preview_invoice.rb +833 -0
  117. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +463 -0
  118. data/lib/stripe/resources/radar/early_fraud_warning.rb +93 -0
  119. data/lib/stripe/resources/radar/value_list.rb +151 -0
  120. data/lib/stripe/resources/radar/value_list_item.rb +113 -0
  121. data/lib/stripe/resources/refund.rb +489 -0
  122. data/lib/stripe/resources/reporting/report_run.rb +182 -0
  123. data/lib/stripe/resources/reporting/report_type.rb +44 -0
  124. data/lib/stripe/resources/reserve_transaction.rb +26 -0
  125. data/lib/stripe/resources/reversal.rb +30 -0
  126. data/lib/stripe/resources/review.rb +135 -0
  127. data/lib/stripe/resources/setup_attempt.rb +474 -0
  128. data/lib/stripe/resources/setup_intent.rb +4371 -0
  129. data/lib/stripe/resources/shipping_rate.rb +303 -0
  130. data/lib/stripe/resources/sigma/scheduled_query_run.rb +67 -0
  131. data/lib/stripe/resources/source.rb +1571 -0
  132. data/lib/stripe/resources/source_mandate_notification.rb +79 -0
  133. data/lib/stripe/resources/source_transaction.rb +114 -0
  134. data/lib/stripe/resources/subscription.rb +2395 -0
  135. data/lib/stripe/resources/subscription_item.rb +502 -0
  136. data/lib/stripe/resources/subscription_schedule.rb +2790 -0
  137. data/lib/stripe/resources/tax/association.rb +100 -0
  138. data/lib/stripe/resources/tax/calculation.rb +474 -0
  139. data/lib/stripe/resources/tax/calculation_line_item.rb +76 -0
  140. data/lib/stripe/resources/tax/form.rb +253 -0
  141. data/lib/stripe/resources/tax/registration.rb +2174 -0
  142. data/lib/stripe/resources/tax/settings.rb +146 -0
  143. data/lib/stripe/resources/tax/transaction.rb +332 -0
  144. data/lib/stripe/resources/tax/transaction_line_item.rb +43 -0
  145. data/lib/stripe/resources/tax_code.rb +41 -0
  146. data/lib/stripe/resources/tax_deducted_at_source.rb +26 -0
  147. data/lib/stripe/resources/tax_id.rb +147 -0
  148. data/lib/stripe/resources/tax_rate.rb +245 -0
  149. data/lib/stripe/resources/terminal/configuration.rb +1175 -0
  150. data/lib/stripe/resources/terminal/connection_token.rb +21 -0
  151. data/lib/stripe/resources/terminal/location.rb +208 -0
  152. data/lib/stripe/resources/terminal/reader.rb +911 -0
  153. data/lib/stripe/resources/terminal/reader_collected_data.rb +45 -0
  154. data/lib/stripe/resources/test_helpers/test_clock.rb +101 -0
  155. data/lib/stripe/resources/token.rb +1337 -0
  156. data/lib/stripe/resources/topup.rb +210 -0
  157. data/lib/stripe/resources/transfer.rb +188 -0
  158. data/lib/stripe/resources/treasury/credit_reversal.rb +113 -0
  159. data/lib/stripe/resources/treasury/debit_reversal.rb +126 -0
  160. data/lib/stripe/resources/treasury/financial_account.rb +766 -0
  161. data/lib/stripe/resources/treasury/financial_account_features.rb +237 -0
  162. data/lib/stripe/resources/treasury/inbound_transfer.rb +285 -0
  163. data/lib/stripe/resources/treasury/outbound_payment.rb +587 -0
  164. data/lib/stripe/resources/treasury/outbound_transfer.rb +428 -0
  165. data/lib/stripe/resources/treasury/received_credit.rb +335 -0
  166. data/lib/stripe/resources/treasury/received_debit.rb +298 -0
  167. data/lib/stripe/resources/treasury/transaction.rb +215 -0
  168. data/lib/stripe/resources/treasury/transaction_entry.rb +193 -0
  169. data/lib/stripe/resources/usage_record.rb +18 -0
  170. data/lib/stripe/resources/usage_record_summary.rb +28 -0
  171. data/lib/stripe/resources/v2/amount.rb +9 -0
  172. data/lib/stripe/resources/v2/billing/meter_event.rb +24 -0
  173. data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +28 -0
  174. data/lib/stripe/resources/v2/billing/meter_event_session.rb +19 -0
  175. data/lib/stripe/resources/v2/event.rb +35 -0
  176. data/lib/stripe/resources/v2/event_destination.rb +78 -0
  177. data/lib/stripe/resources/webhook_endpoint.rb +148 -0
  178. data/lib/stripe/resources.rb +31 -0
  179. data/lib/stripe/services/account_capability_service.rb +33 -0
  180. data/lib/stripe/services/account_external_account_service.rb +293 -0
  181. data/lib/stripe/services/account_link_service.rb +53 -0
  182. data/lib/stripe/services/account_login_link_service.rb +9 -0
  183. data/lib/stripe/services/account_notice_service.rb +110 -0
  184. data/lib/stripe/services/account_person_service.rb +1014 -0
  185. data/lib/stripe/services/account_service.rb +4862 -0
  186. data/lib/stripe/services/account_session_service.rb +740 -0
  187. data/lib/stripe/services/apple_pay_domain_service.rb +56 -0
  188. data/lib/stripe/services/application_fee_refund_service.rb +60 -0
  189. data/lib/stripe/services/application_fee_service.rb +65 -0
  190. data/lib/stripe/services/apps/secret_service.rb +132 -0
  191. data/lib/stripe/services/balance_service.rb +9 -0
  192. data/lib/stripe/services/balance_transaction_service.rb +80 -0
  193. data/lib/stripe/services/billing/alert_service.rb +125 -0
  194. data/lib/stripe/services/billing/credit_balance_summary_service.rb +41 -0
  195. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +45 -0
  196. data/lib/stripe/services/billing/credit_grant_service.rb +167 -0
  197. data/lib/stripe/services/billing/meter_event_adjustment_service.rb +29 -0
  198. data/lib/stripe/services/billing/meter_event_service.rb +25 -0
  199. data/lib/stripe/services/billing/meter_event_summary_service.rb +46 -0
  200. data/lib/stripe/services/billing/meter_service.rb +142 -0
  201. data/lib/stripe/services/billing_portal/configuration_service.rb +492 -0
  202. data/lib/stripe/services/billing_portal/session_service.rb +192 -0
  203. data/lib/stripe/services/capital/financing_offer_service.rb +121 -0
  204. data/lib/stripe/services/capital/financing_summary_service.rb +28 -0
  205. data/lib/stripe/services/capital/financing_transaction_service.rb +86 -0
  206. data/lib/stripe/services/capital_service.rb +15 -0
  207. data/lib/stripe/services/charge_service.rb +2010 -0
  208. data/lib/stripe/services/checkout/session_line_item_service.rb +21 -0
  209. data/lib/stripe/services/checkout/session_service.rb +2736 -0
  210. data/lib/stripe/services/climate/order_service.rb +113 -0
  211. data/lib/stripe/services/climate/product_service.rb +30 -0
  212. data/lib/stripe/services/climate/supplier_service.rb +30 -0
  213. data/lib/stripe/services/confirmation_token_service.rb +9 -0
  214. data/lib/stripe/services/country_spec_service.rb +30 -0
  215. data/lib/stripe/services/coupon_service.rb +174 -0
  216. data/lib/stripe/services/credit_note_line_item_service.rb +21 -0
  217. data/lib/stripe/services/credit_note_preview_lines_service.rb +184 -0
  218. data/lib/stripe/services/credit_note_service.rb +434 -0
  219. data/lib/stripe/services/customer_balance_transaction_service.rb +72 -0
  220. data/lib/stripe/services/customer_cash_balance_service.rb +30 -0
  221. data/lib/stripe/services/customer_cash_balance_transaction_service.rb +30 -0
  222. data/lib/stripe/services/customer_funding_instructions_service.rb +47 -0
  223. data/lib/stripe/services/customer_payment_method_service.rb +45 -0
  224. data/lib/stripe/services/customer_payment_source_service.rb +208 -0
  225. data/lib/stripe/services/customer_service.rb +684 -0
  226. data/lib/stripe/services/customer_session_service.rb +106 -0
  227. data/lib/stripe/services/customer_tax_id_service.rb +50 -0
  228. data/lib/stripe/services/dispute_service.rb +439 -0
  229. data/lib/stripe/services/entitlements/active_entitlement_service.rb +40 -0
  230. data/lib/stripe/services/entitlements/feature_service.rb +87 -0
  231. data/lib/stripe/services/ephemeral_key_service.rb +40 -0
  232. data/lib/stripe/services/event_service.rb +75 -0
  233. data/lib/stripe/services/exchange_rate_service.rb +30 -0
  234. data/lib/stripe/services/file_link_service.rb +108 -0
  235. data/lib/stripe/services/file_service.rb +102 -0
  236. data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +40 -0
  237. data/lib/stripe/services/financial_connections/account_owner_service.rb +31 -0
  238. data/lib/stripe/services/financial_connections/account_service.rb +108 -1
  239. data/lib/stripe/services/financial_connections/institution_service.rb +60 -0
  240. data/lib/stripe/services/financial_connections/session_service.rb +108 -0
  241. data/lib/stripe/services/financial_connections/transaction_service.rb +79 -0
  242. data/lib/stripe/services/financial_connections_service.rb +2 -1
  243. data/lib/stripe/services/forwarding/request_service.rb +120 -0
  244. data/lib/stripe/services/gift_cards/card_service.rb +183 -0
  245. data/lib/stripe/services/gift_cards/transaction_service.rb +225 -0
  246. data/lib/stripe/services/gift_cards_service.rb +14 -0
  247. data/lib/stripe/services/identity/verification_report_service.rb +75 -0
  248. data/lib/stripe/services/identity/verification_session_service.rb +261 -0
  249. data/lib/stripe/services/invoice_item_service.rb +454 -0
  250. data/lib/stripe/services/invoice_line_item_service.rb +277 -0
  251. data/lib/stripe/services/invoice_payment_service.rb +58 -0
  252. data/lib/stripe/services/invoice_rendering_template_service.rb +56 -0
  253. data/lib/stripe/services/invoice_service.rb +6375 -1
  254. data/lib/stripe/services/invoice_upcoming_lines_service.rb +2142 -0
  255. data/lib/stripe/services/issuing/authorization_service.rb +118 -0
  256. data/lib/stripe/services/issuing/card_service.rb +525 -0
  257. data/lib/stripe/services/issuing/cardholder_service.rb +599 -0
  258. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +560 -0
  259. data/lib/stripe/services/issuing/dispute_service.rb +731 -0
  260. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +70 -0
  261. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +90 -0
  262. data/lib/stripe/services/issuing/personalization_design_service.rb +222 -0
  263. data/lib/stripe/services/issuing/physical_bundle_service.rb +45 -0
  264. data/lib/stripe/services/issuing/token_service.rb +83 -0
  265. data/lib/stripe/services/issuing/transaction_service.rb +93 -0
  266. data/lib/stripe/services/issuing_service.rb +5 -1
  267. data/lib/stripe/services/mandate_service.rb +9 -0
  268. data/lib/stripe/services/margin_service.rb +130 -0
  269. data/lib/stripe/services/order_line_item_service.rb +38 -0
  270. data/lib/stripe/services/order_service.rb +2518 -0
  271. data/lib/stripe/services/payment_attempt_record_service.rb +50 -0
  272. data/lib/stripe/services/payment_intent_service.rb +12203 -0
  273. data/lib/stripe/services/payment_link_line_item_service.rb +21 -0
  274. data/lib/stripe/services/payment_link_service.rb +1343 -0
  275. data/lib/stripe/services/payment_method_configuration_service.rb +2148 -0
  276. data/lib/stripe/services/payment_method_domain_service.rb +84 -0
  277. data/lib/stripe/services/payment_method_service.rb +977 -0
  278. data/lib/stripe/services/payment_record_service.rb +610 -0
  279. data/lib/stripe/services/payout_service.rb +182 -0
  280. data/lib/stripe/services/plan_service.rb +296 -0
  281. data/lib/stripe/services/price_service.rb +603 -0
  282. data/lib/stripe/services/product_feature_service.rb +46 -0
  283. data/lib/stripe/services/product_service.rb +533 -0
  284. data/lib/stripe/services/promotion_code_service.rb +203 -0
  285. data/lib/stripe/services/quote_computed_upfront_line_items_service.rb +21 -0
  286. data/lib/stripe/services/quote_line_item_service.rb +21 -0
  287. data/lib/stripe/services/quote_line_service.rb +38 -0
  288. data/lib/stripe/services/quote_preview_invoice_service.rb +38 -0
  289. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +38 -0
  290. data/lib/stripe/services/quote_service.rb +2628 -1
  291. data/lib/stripe/services/radar/early_fraud_warning_service.rb +70 -0
  292. data/lib/stripe/services/radar/value_list_item_service.rb +90 -0
  293. data/lib/stripe/services/radar/value_list_service.rb +119 -0
  294. data/lib/stripe/services/refund_service.rb +158 -0
  295. data/lib/stripe/services/reporting/report_run_service.rb +122 -0
  296. data/lib/stripe/services/reporting/report_type_service.rb +18 -0
  297. data/lib/stripe/services/review_service.rb +63 -0
  298. data/lib/stripe/services/setup_attempt_service.rb +59 -0
  299. data/lib/stripe/services/setup_intent_service.rb +3923 -0
  300. data/lib/stripe/services/shipping_rate_service.rb +227 -0
  301. data/lib/stripe/services/sigma/scheduled_query_run_service.rb +30 -0
  302. data/lib/stripe/services/source_service.rb +693 -0
  303. data/lib/stripe/services/source_transaction_service.rb +21 -0
  304. data/lib/stripe/services/subscription_item_service.rb +439 -0
  305. data/lib/stripe/services/subscription_item_usage_record_service.rb +21 -0
  306. data/lib/stripe/services/subscription_item_usage_record_summary_service.rb +21 -0
  307. data/lib/stripe/services/subscription_schedule_service.rb +2343 -0
  308. data/lib/stripe/services/subscription_service.rb +1967 -0
  309. data/lib/stripe/services/tax/association_service.rb +32 -0
  310. data/lib/stripe/services/tax/calculation_line_item_service.rb +21 -0
  311. data/lib/stripe/services/tax/calculation_service.rb +235 -0
  312. data/lib/stripe/services/tax/form_service.rb +107 -0
  313. data/lib/stripe/services/tax/registration_service.rb +1398 -0
  314. data/lib/stripe/services/tax/settings_service.rb +82 -0
  315. data/lib/stripe/services/tax/transaction_line_item_service.rb +21 -0
  316. data/lib/stripe/services/tax/transaction_service.rb +128 -0
  317. data/lib/stripe/services/tax_code_service.rb +30 -0
  318. data/lib/stripe/services/tax_id_service.rb +90 -0
  319. data/lib/stripe/services/tax_rate_service.rb +182 -0
  320. data/lib/stripe/services/tax_service.rb +3 -1
  321. data/lib/stripe/services/terminal/configuration_service.rb +901 -0
  322. data/lib/stripe/services/terminal/connection_token_service.rb +13 -0
  323. data/lib/stripe/services/terminal/location_service.rb +165 -0
  324. data/lib/stripe/services/terminal/reader_collected_data_service.rb +28 -0
  325. data/lib/stripe/services/terminal/reader_service.rb +496 -0
  326. data/lib/stripe/services/terminal_service.rb +2 -1
  327. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +762 -0
  328. data/lib/stripe/services/test_helpers/customer_service.rb +21 -0
  329. data/lib/stripe/services/test_helpers/issuing/authorization_service.rb +844 -0
  330. data/lib/stripe/services/test_helpers/issuing/card_service.rb +45 -0
  331. data/lib/stripe/services/test_helpers/issuing/personalization_design_service.rb +43 -0
  332. data/lib/stripe/services/test_helpers/issuing/transaction_service.rb +723 -0
  333. data/lib/stripe/services/test_helpers/refund_service.rb +9 -0
  334. data/lib/stripe/services/test_helpers/terminal/reader_service.rb +48 -0
  335. data/lib/stripe/services/test_helpers/test_clock_service.rb +63 -0
  336. data/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb +39 -0
  337. data/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb +93 -0
  338. data/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb +93 -0
  339. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +95 -0
  340. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +95 -0
  341. data/lib/stripe/services/token_service.rb +1301 -0
  342. data/lib/stripe/services/topup_service.rb +163 -0
  343. data/lib/stripe/services/transfer_reversal_service.rb +74 -0
  344. data/lib/stripe/services/transfer_service.rb +138 -0
  345. data/lib/stripe/services/treasury/credit_reversal_service.rb +67 -0
  346. data/lib/stripe/services/treasury/debit_reversal_service.rb +72 -0
  347. data/lib/stripe/services/treasury/financial_account_features_service.rb +179 -0
  348. data/lib/stripe/services/treasury/financial_account_service.rb +481 -0
  349. data/lib/stripe/services/treasury/inbound_transfer_service.rb +100 -0
  350. data/lib/stripe/services/treasury/outbound_payment_service.rb +296 -0
  351. data/lib/stripe/services/treasury/outbound_transfer_service.rb +147 -0
  352. data/lib/stripe/services/treasury/received_credit_service.rb +58 -0
  353. data/lib/stripe/services/treasury/received_debit_service.rb +45 -0
  354. data/lib/stripe/services/treasury/transaction_entry_service.rb +101 -0
  355. data/lib/stripe/services/treasury/transaction_service.rb +109 -0
  356. data/lib/stripe/services/v1_services.rb +8 -1
  357. data/lib/stripe/services/v2/billing/meter_event_adjustment_service.rb +25 -0
  358. data/lib/stripe/services/v2/billing/meter_event_service.rb +28 -0
  359. data/lib/stripe/services/v2/billing/meter_event_session_service.rb +3 -0
  360. data/lib/stripe/services/v2/billing/meter_event_stream_service.rb +36 -0
  361. data/lib/stripe/services/v2/core/event_destination_service.rb +164 -0
  362. data/lib/stripe/services/v2/core/event_service.rb +20 -0
  363. data/lib/stripe/services/webhook_endpoint_service.rb +110 -0
  364. data/lib/stripe/services.rb +25 -0
  365. data/lib/stripe/stripe_client.rb +2 -2
  366. data/lib/stripe/stripe_configuration.rb +3 -1
  367. data/lib/stripe/stripe_object.rb +8 -3
  368. data/lib/stripe/util.rb +8 -2
  369. data/lib/stripe/version.rb +1 -1
  370. data/lib/stripe.rb +46 -0
  371. data/rbi/stripe/resources/account.rbi +6072 -0
  372. data/rbi/stripe/resources/account_link.rbi +87 -0
  373. data/rbi/stripe/resources/account_notice.rbi +166 -0
  374. data/rbi/stripe/resources/account_session.rbi +1173 -0
  375. data/rbi/stripe/resources/apple_pay_domain.rbi +111 -0
  376. data/rbi/stripe/resources/application.rbi +23 -0
  377. data/rbi/stripe/resources/application_fee.rbi +151 -0
  378. data/rbi/stripe/resources/application_fee_refund.rbi +44 -0
  379. data/rbi/stripe/resources/apps/secret.rbi +229 -0
  380. data/rbi/stripe/resources/balance.rbi +220 -0
  381. data/rbi/stripe/resources/balance_transaction.rbi +182 -0
  382. data/rbi/stripe/resources/bank_account.rbi +156 -0
  383. data/rbi/stripe/resources/billing/alert.rbi +237 -0
  384. data/rbi/stripe/resources/billing/alert_triggered.rbi +33 -0
  385. data/rbi/stripe/resources/billing/credit_balance_summary.rbi +118 -0
  386. data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +181 -0
  387. data/rbi/stripe/resources/billing/credit_grant.rbi +312 -0
  388. data/rbi/stripe/resources/billing/meter.rbi +268 -0
  389. data/rbi/stripe/resources/billing/meter_error_report.rbi +82 -0
  390. data/rbi/stripe/resources/billing/meter_event.rbi +76 -0
  391. data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +75 -0
  392. data/rbi/stripe/resources/billing/meter_event_summary.rbi +39 -0
  393. data/rbi/stripe/resources/billing_portal/configuration.rbi +746 -0
  394. data/rbi/stripe/resources/billing_portal/session.rbi +396 -0
  395. data/rbi/stripe/resources/capability.rbi +152 -0
  396. data/rbi/stripe/resources/capital/financing_offer.rbi +228 -0
  397. data/rbi/stripe/resources/capital/financing_summary.rbi +89 -0
  398. data/rbi/stripe/resources/capital/financing_transaction.rbi +157 -0
  399. data/rbi/stripe/resources/card.rbi +159 -0
  400. data/rbi/stripe/resources/cash_balance.rbi +37 -0
  401. data/rbi/stripe/resources/charge.rbi +4216 -0
  402. data/rbi/stripe/resources/checkout/session.rbi +4627 -0
  403. data/rbi/stripe/resources/climate/order.rbi +298 -0
  404. data/rbi/stripe/resources/climate/product.rbi +98 -0
  405. data/rbi/stripe/resources/climate/supplier.rbi +95 -0
  406. data/rbi/stripe/resources/confirmation_token.rbi +2137 -0
  407. data/rbi/stripe/resources/connect_collection_transfer.rbi +31 -0
  408. data/rbi/stripe/resources/country_spec.rbi +108 -0
  409. data/rbi/stripe/resources/coupon.rbi +305 -0
  410. data/rbi/stripe/resources/credit_note.rbi +918 -0
  411. data/rbi/stripe/resources/credit_note_line_item.rbi +123 -0
  412. data/rbi/stripe/resources/customer.rbi +1188 -0
  413. data/rbi/stripe/resources/customer_balance_transaction.rbi +65 -0
  414. data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +178 -0
  415. data/rbi/stripe/resources/customer_session.rbi +227 -0
  416. data/rbi/stripe/resources/discount.rbi +65 -0
  417. data/rbi/stripe/resources/dispute.rbi +926 -0
  418. data/rbi/stripe/resources/entitlements/active_entitlement.rbi +76 -0
  419. data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +26 -0
  420. data/rbi/stripe/resources/entitlements/feature.rbi +146 -0
  421. data/rbi/stripe/resources/ephemeral_key.rbi +51 -0
  422. data/rbi/stripe/resources/event.rbi +221 -0
  423. data/rbi/stripe/resources/exchange_rate.rbi +81 -0
  424. data/rbi/stripe/resources/file.rbi +177 -0
  425. data/rbi/stripe/resources/file_link.rbi +174 -0
  426. data/rbi/stripe/resources/financial_connections/account.rbi +414 -0
  427. data/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi +30 -0
  428. data/rbi/stripe/resources/financial_connections/account_owner.rbi +42 -0
  429. data/rbi/stripe/resources/financial_connections/account_ownership.rbi +26 -0
  430. data/rbi/stripe/resources/financial_connections/institution.rbi +115 -0
  431. data/rbi/stripe/resources/financial_connections/session.rbi +221 -0
  432. data/rbi/stripe/resources/financial_connections/transaction.rbi +153 -0
  433. data/rbi/stripe/resources/forwarding/request.rbi +257 -0
  434. data/rbi/stripe/resources/funding_instructions.rbi +544 -0
  435. data/rbi/stripe/resources/gift_cards/card.rbi +242 -0
  436. data/rbi/stripe/resources/gift_cards/transaction.rbi +298 -0
  437. data/rbi/stripe/resources/identity/verification_report.rbi +427 -0
  438. data/rbi/stripe/resources/identity/verification_session.rbi +601 -0
  439. data/rbi/stripe/resources/invoice.rbi +10584 -0
  440. data/rbi/stripe/resources/invoice_item.rbi +621 -0
  441. data/rbi/stripe/resources/invoice_line_item.rbi +486 -0
  442. data/rbi/stripe/resources/invoice_payment.rbi +86 -0
  443. data/rbi/stripe/resources/invoice_rendering_template.rbi +131 -0
  444. data/rbi/stripe/resources/issuing/authorization.rbi +1511 -0
  445. data/rbi/stripe/resources/issuing/card.rbi +891 -0
  446. data/rbi/stripe/resources/issuing/cardholder.rbi +870 -0
  447. data/rbi/stripe/resources/issuing/credit_underwriting_record.rbi +731 -0
  448. data/rbi/stripe/resources/issuing/dispute.rbi +1077 -0
  449. data/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi +100 -0
  450. data/rbi/stripe/resources/issuing/fraud_liability_debit.rbi +108 -0
  451. data/rbi/stripe/resources/issuing/personalization_design.rbi +395 -0
  452. data/rbi/stripe/resources/issuing/physical_bundle.rbi +102 -0
  453. data/rbi/stripe/resources/issuing/settlement.rbi +78 -0
  454. data/rbi/stripe/resources/issuing/token.rbi +282 -0
  455. data/rbi/stripe/resources/issuing/transaction.rbi +1262 -0
  456. data/rbi/stripe/resources/line_item.rbi +131 -0
  457. data/rbi/stripe/resources/login_link.rbi +20 -0
  458. data/rbi/stripe/resources/mandate.rbi +266 -0
  459. data/rbi/stripe/resources/margin.rbi +151 -0
  460. data/rbi/stripe/resources/order.rbi +3505 -0
  461. data/rbi/stripe/resources/payment_attempt_record.rbi +260 -0
  462. data/rbi/stripe/resources/payment_intent.rbi +16064 -0
  463. data/rbi/stripe/resources/payment_link.rbi +1943 -0
  464. data/rbi/stripe/resources/payment_method.rbi +2287 -0
  465. data/rbi/stripe/resources/payment_method_configuration.rbi +3657 -0
  466. data/rbi/stripe/resources/payment_method_domain.rbi +246 -0
  467. data/rbi/stripe/resources/payment_record.rbi +856 -0
  468. data/rbi/stripe/resources/payout.rbi +357 -0
  469. data/rbi/stripe/resources/person.rbi +461 -0
  470. data/rbi/stripe/resources/plan.rbi +463 -0
  471. data/rbi/stripe/resources/price.rbi +884 -0
  472. data/rbi/stripe/resources/product.rbi +735 -0
  473. data/rbi/stripe/resources/product_feature.rbi +30 -0
  474. data/rbi/stripe/resources/promotion_code.rbi +316 -0
  475. data/rbi/stripe/resources/quote.rbi +3779 -0
  476. data/rbi/stripe/resources/quote_line.rbi +416 -0
  477. data/rbi/stripe/resources/quote_preview_invoice.rbi +1030 -0
  478. data/rbi/stripe/resources/quote_preview_subscription_schedule.rbi +575 -0
  479. data/rbi/stripe/resources/radar/early_fraud_warning.rbi +121 -0
  480. data/rbi/stripe/resources/radar/value_list.rbi +207 -0
  481. data/rbi/stripe/resources/radar/value_list_item.rbi +157 -0
  482. data/rbi/stripe/resources/refund.rbi +615 -0
  483. data/rbi/stripe/resources/reporting/report_run.rbi +232 -0
  484. data/rbi/stripe/resources/reporting/report_type.rbi +75 -0
  485. data/rbi/stripe/resources/reserve_transaction.rbi +27 -0
  486. data/rbi/stripe/resources/reversal.rbi +60 -0
  487. data/rbi/stripe/resources/review.rbi +191 -0
  488. data/rbi/stripe/resources/setup_attempt.rbi +587 -0
  489. data/rbi/stripe/resources/setup_intent.rbi +4726 -0
  490. data/rbi/stripe/resources/shipping_rate.rbi +367 -0
  491. data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +98 -0
  492. data/rbi/stripe/resources/source.rbi +1899 -0
  493. data/rbi/stripe/resources/source_mandate_notification.rbi +90 -0
  494. data/rbi/stripe/resources/source_transaction.rbi +156 -0
  495. data/rbi/stripe/resources/subscription.rbi +2739 -0
  496. data/rbi/stripe/resources/subscription_item.rbi +566 -0
  497. data/rbi/stripe/resources/subscription_schedule.rbi +3157 -0
  498. data/rbi/stripe/resources/tax/association.rbi +107 -0
  499. data/rbi/stripe/resources/tax/calculation.rbi +577 -0
  500. data/rbi/stripe/resources/tax/calculation_line_item.rbi +108 -0
  501. data/rbi/stripe/resources/tax/form.rbi +262 -0
  502. data/rbi/stripe/resources/tax/registration.rbi +2354 -0
  503. data/rbi/stripe/resources/tax/settings.rbi +174 -0
  504. data/rbi/stripe/resources/tax/transaction.rbi +428 -0
  505. data/rbi/stripe/resources/tax/transaction_line_item.rbi +66 -0
  506. data/rbi/stripe/resources/tax_code.rbi +60 -0
  507. data/rbi/stripe/resources/tax_deducted_at_source.rbi +27 -0
  508. data/rbi/stripe/resources/tax_id.rbi +206 -0
  509. data/rbi/stripe/resources/tax_rate.rbi +295 -0
  510. data/rbi/stripe/resources/terminal/configuration.rbi +1302 -0
  511. data/rbi/stripe/resources/terminal/connection_token.rbi +42 -0
  512. data/rbi/stripe/resources/terminal/location.rbi +271 -0
  513. data/rbi/stripe/resources/terminal/reader.rbi +1110 -0
  514. data/rbi/stripe/resources/terminal/reader_collected_data.rbi +48 -0
  515. data/rbi/stripe/resources/test_helpers/test_clock.rbi +159 -0
  516. data/rbi/stripe/resources/token.rbi +1405 -0
  517. data/rbi/stripe/resources/topup.rbi +269 -0
  518. data/rbi/stripe/resources/transfer.rbi +245 -0
  519. data/rbi/stripe/resources/treasury/credit_reversal.rbi +151 -0
  520. data/rbi/stripe/resources/treasury/debit_reversal.rbi +165 -0
  521. data/rbi/stripe/resources/treasury/financial_account.rbi +924 -0
  522. data/rbi/stripe/resources/treasury/financial_account_features.rbi +309 -0
  523. data/rbi/stripe/resources/treasury/inbound_transfer.rbi +361 -0
  524. data/rbi/stripe/resources/treasury/outbound_payment.rbi +702 -0
  525. data/rbi/stripe/resources/treasury/outbound_transfer.rbi +529 -0
  526. data/rbi/stripe/resources/treasury/received_credit.rbi +408 -0
  527. data/rbi/stripe/resources/treasury/received_debit.rbi +367 -0
  528. data/rbi/stripe/resources/treasury/transaction.rbi +261 -0
  529. data/rbi/stripe/resources/treasury/transaction_entry.rbi +234 -0
  530. data/rbi/stripe/resources/usage_record.rbi +37 -0
  531. data/rbi/stripe/resources/usage_record_summary.rbi +45 -0
  532. data/rbi/stripe/resources/v2/amount.rbi +14 -0
  533. data/rbi/stripe/resources/v2/billing/meter_event.rbi +43 -0
  534. data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +48 -0
  535. data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +36 -0
  536. data/rbi/stripe/resources/v2/event.rbi +55 -0
  537. data/rbi/stripe/resources/v2/event_destination.rbi +109 -0
  538. data/rbi/stripe/resources/webhook_endpoint.rbi +208 -0
  539. data/rbi/stripe/services/account_capability_service.rbi +55 -0
  540. data/rbi/stripe/services/account_external_account_service.rbi +358 -0
  541. data/rbi/stripe/services/account_link_service.rbi +67 -0
  542. data/rbi/stripe/services/account_login_link_service.rbi +23 -0
  543. data/rbi/stripe/services/account_notice_service.rbi +103 -0
  544. data/rbi/stripe/services/account_person_service.rbi +1077 -0
  545. data/rbi/stripe/services/account_service.rbi +4948 -0
  546. data/rbi/stripe/services/account_session_service.rbi +873 -0
  547. data/rbi/stripe/services/apple_pay_domain_service.rbi +86 -0
  548. data/rbi/stripe/services/application_fee_refund_service.rbi +101 -0
  549. data/rbi/stripe/services/application_fee_service.rbi +85 -0
  550. data/rbi/stripe/services/apps/secret_service.rbi +175 -0
  551. data/rbi/stripe/services/apps_service.rbi +9 -0
  552. data/rbi/stripe/services/balance_service.rbi +22 -0
  553. data/rbi/stripe/services/balance_transaction_service.rbi +103 -0
  554. data/rbi/stripe/services/billing/alert_service.rbi +172 -0
  555. data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +61 -0
  556. data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +66 -0
  557. data/rbi/stripe/services/billing/credit_grant_service.rbi +217 -0
  558. data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +45 -0
  559. data/rbi/stripe/services/billing/meter_event_service.rbi +47 -0
  560. data/rbi/stripe/services/billing/meter_event_summary_service.rbi +62 -0
  561. data/rbi/stripe/services/billing/meter_service.rbi +184 -0
  562. data/rbi/stripe/services/billing_portal/configuration_service.rbi +573 -0
  563. data/rbi/stripe/services/billing_portal/session_service.rbi +233 -0
  564. data/rbi/stripe/services/billing_portal_service.rbi +10 -0
  565. data/rbi/stripe/services/billing_service.rbi +15 -0
  566. data/rbi/stripe/services/capital/financing_offer_service.rbi +108 -0
  567. data/rbi/stripe/services/capital/financing_summary_service.rbi +23 -0
  568. data/rbi/stripe/services/capital/financing_transaction_service.rbi +77 -0
  569. data/rbi/stripe/services/capital_service.rbi +11 -0
  570. data/rbi/stripe/services/charge_service.rbi +2162 -0
  571. data/rbi/stripe/services/checkout/session_line_item_service.rbi +37 -0
  572. data/rbi/stripe/services/checkout/session_service.rbi +2975 -0
  573. data/rbi/stripe/services/checkout_service.rbi +9 -0
  574. data/rbi/stripe/services/climate/order_service.rbi +158 -0
  575. data/rbi/stripe/services/climate/product_service.rbi +51 -0
  576. data/rbi/stripe/services/climate/supplier_service.rbi +51 -0
  577. data/rbi/stripe/services/climate_service.rbi +11 -0
  578. data/rbi/stripe/services/confirmation_token_service.rbi +21 -0
  579. data/rbi/stripe/services/country_spec_service.rbi +49 -0
  580. data/rbi/stripe/services/coupon_service.rbi +220 -0
  581. data/rbi/stripe/services/credit_note_line_item_service.rbi +35 -0
  582. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +200 -0
  583. data/rbi/stripe/services/credit_note_service.rbi +496 -0
  584. data/rbi/stripe/services/customer_balance_transaction_service.rbi +105 -0
  585. data/rbi/stripe/services/customer_cash_balance_service.rbi +49 -0
  586. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +49 -0
  587. data/rbi/stripe/services/customer_funding_instructions_service.rbi +67 -0
  588. data/rbi/stripe/services/customer_payment_method_service.rbi +64 -0
  589. data/rbi/stripe/services/customer_payment_source_service.rbi +265 -0
  590. data/rbi/stripe/services/customer_service.rbi +763 -0
  591. data/rbi/stripe/services/customer_session_service.rbi +126 -0
  592. data/rbi/stripe/services/customer_tax_id_service.rbi +80 -0
  593. data/rbi/stripe/services/dispute_service.rbi +500 -0
  594. data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +61 -0
  595. data/rbi/stripe/services/entitlements/feature_service.rbi +122 -0
  596. data/rbi/stripe/services/entitlements_service.rbi +10 -0
  597. data/rbi/stripe/services/ephemeral_key_service.rbi +59 -0
  598. data/rbi/stripe/services/event_service.rbi +94 -0
  599. data/rbi/stripe/services/exchange_rate_service.rbi +49 -0
  600. data/rbi/stripe/services/file_link_service.rbi +141 -0
  601. data/rbi/stripe/services/file_service.rbi +132 -0
  602. data/rbi/stripe/services/financial_connections/account_inferred_balance_service.rbi +37 -0
  603. data/rbi/stripe/services/financial_connections/account_owner_service.rbi +47 -0
  604. data/rbi/stripe/services/financial_connections/account_service.rbi +148 -0
  605. data/rbi/stripe/services/financial_connections/institution_service.rbi +51 -0
  606. data/rbi/stripe/services/financial_connections/session_service.rbi +128 -0
  607. data/rbi/stripe/services/financial_connections/transaction_service.rbi +103 -0
  608. data/rbi/stripe/services/financial_connections_service.rbi +12 -0
  609. data/rbi/stripe/services/forwarding/request_service.rbi +152 -0
  610. data/rbi/stripe/services/forwarding_service.rbi +9 -0
  611. data/rbi/stripe/services/gift_cards/card_service.rbi +162 -0
  612. data/rbi/stripe/services/gift_cards/transaction_service.rbi +198 -0
  613. data/rbi/stripe/services/gift_cards_service.rbi +10 -0
  614. data/rbi/stripe/services/identity/verification_report_service.rbi +98 -0
  615. data/rbi/stripe/services/identity/verification_session_service.rbi +360 -0
  616. data/rbi/stripe/services/identity_service.rbi +10 -0
  617. data/rbi/stripe/services/invoice_item_service.rbi +505 -0
  618. data/rbi/stripe/services/invoice_line_item_service.rbi +320 -0
  619. data/rbi/stripe/services/invoice_payment_service.rbi +49 -0
  620. data/rbi/stripe/services/invoice_rendering_template_service.rbi +91 -0
  621. data/rbi/stripe/services/invoice_service.rbi +7138 -0
  622. data/rbi/stripe/services/invoice_upcoming_lines_service.rbi +2397 -0
  623. data/rbi/stripe/services/issuing/authorization_service.rbi +160 -0
  624. data/rbi/stripe/services/issuing/card_service.rbi +568 -0
  625. data/rbi/stripe/services/issuing/cardholder_service.rbi +668 -0
  626. data/rbi/stripe/services/issuing/credit_underwriting_record_service.rbi +580 -0
  627. data/rbi/stripe/services/issuing/dispute_service.rbi +824 -0
  628. data/rbi/stripe/services/issuing/dispute_settlement_detail_service.rbi +61 -0
  629. data/rbi/stripe/services/issuing/fraud_liability_debit_service.rbi +83 -0
  630. data/rbi/stripe/services/issuing/personalization_design_service.rbi +271 -0
  631. data/rbi/stripe/services/issuing/physical_bundle_service.rbi +66 -0
  632. data/rbi/stripe/services/issuing/token_service.rbi +109 -0
  633. data/rbi/stripe/services/issuing/transaction_service.rbi +119 -0
  634. data/rbi/stripe/services/issuing_service.rbi +19 -0
  635. data/rbi/stripe/services/mandate_service.rbi +21 -0
  636. data/rbi/stripe/services/margin_service.rbi +119 -0
  637. data/rbi/stripe/services/order_line_item_service.rbi +35 -0
  638. data/rbi/stripe/services/order_service.rbi +2669 -0
  639. data/rbi/stripe/services/payment_attempt_record_service.rbi +39 -0
  640. data/rbi/stripe/services/payment_intent_service.rbi +13193 -0
  641. data/rbi/stripe/services/payment_link_line_item_service.rbi +35 -0
  642. data/rbi/stripe/services/payment_link_service.rbi +1447 -0
  643. data/rbi/stripe/services/payment_method_configuration_service.rbi +2465 -0
  644. data/rbi/stripe/services/payment_method_domain_service.rbi +123 -0
  645. data/rbi/stripe/services/payment_method_service.rbi +1032 -0
  646. data/rbi/stripe/services/payment_record_service.rbi +613 -0
  647. data/rbi/stripe/services/payout_service.rbi +228 -0
  648. data/rbi/stripe/services/plan_service.rbi +337 -0
  649. data/rbi/stripe/services/price_service.rbi +657 -0
  650. data/rbi/stripe/services/product_feature_service.rbi +76 -0
  651. data/rbi/stripe/services/product_service.rbi +596 -0
  652. data/rbi/stripe/services/promotion_code_service.rbi +244 -0
  653. data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +35 -0
  654. data/rbi/stripe/services/quote_line_item_service.rbi +35 -0
  655. data/rbi/stripe/services/quote_line_service.rbi +35 -0
  656. data/rbi/stripe/services/quote_preview_invoice_service.rbi +35 -0
  657. data/rbi/stripe/services/quote_preview_subscription_schedule_service.rbi +35 -0
  658. data/rbi/stripe/services/quote_service.rbi +2830 -0
  659. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +95 -0
  660. data/rbi/stripe/services/radar/value_list_item_service.rbi +122 -0
  661. data/rbi/stripe/services/radar/value_list_service.rbi +160 -0
  662. data/rbi/stripe/services/radar_service.rbi +11 -0
  663. data/rbi/stripe/services/refund_service.rbi +208 -0
  664. data/rbi/stripe/services/reporting/report_run_service.rbi +152 -0
  665. data/rbi/stripe/services/reporting/report_type_service.rbi +37 -0
  666. data/rbi/stripe/services/reporting_service.rbi +10 -0
  667. data/rbi/stripe/services/review_service.rbi +93 -0
  668. data/rbi/stripe/services/setup_attempt_service.rbi +73 -0
  669. data/rbi/stripe/services/setup_intent_service.rbi +4204 -0
  670. data/rbi/stripe/services/shipping_rate_service.rbi +274 -0
  671. data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +51 -0
  672. data/rbi/stripe/services/sigma_service.rbi +9 -0
  673. data/rbi/stripe/services/source_service.rbi +766 -0
  674. data/rbi/stripe/services/source_transaction_service.rbi +35 -0
  675. data/rbi/stripe/services/subscription_item_service.rbi +496 -0
  676. data/rbi/stripe/services/subscription_item_usage_record_service.rbi +41 -0
  677. data/rbi/stripe/services/subscription_item_usage_record_summary_service.rbi +37 -0
  678. data/rbi/stripe/services/subscription_schedule_service.rbi +2613 -0
  679. data/rbi/stripe/services/subscription_service.rbi +2207 -0
  680. data/rbi/stripe/services/tax/association_service.rbi +27 -0
  681. data/rbi/stripe/services/tax/calculation_line_item_service.rbi +37 -0
  682. data/rbi/stripe/services/tax/calculation_service.rbi +267 -0
  683. data/rbi/stripe/services/tax/form_service.rbi +96 -0
  684. data/rbi/stripe/services/tax/registration_service.rbi +1495 -0
  685. data/rbi/stripe/services/tax/settings_service.rbi +106 -0
  686. data/rbi/stripe/services/tax/transaction_line_item_service.rbi +37 -0
  687. data/rbi/stripe/services/tax/transaction_service.rbi +164 -0
  688. data/rbi/stripe/services/tax_code_service.rbi +49 -0
  689. data/rbi/stripe/services/tax_id_service.rbi +128 -0
  690. data/rbi/stripe/services/tax_rate_service.rbi +215 -0
  691. data/rbi/stripe/services/tax_service.rbi +14 -0
  692. data/rbi/stripe/services/terminal/configuration_service.rbi +976 -0
  693. data/rbi/stripe/services/terminal/connection_token_service.rbi +27 -0
  694. data/rbi/stripe/services/terminal/location_service.rbi +211 -0
  695. data/rbi/stripe/services/terminal/reader_collected_data_service.rbi +23 -0
  696. data/rbi/stripe/services/terminal/reader_service.rbi +591 -0
  697. data/rbi/stripe/services/terminal_service.rbi +13 -0
  698. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +892 -0
  699. data/rbi/stripe/services/test_helpers/customer_service.rbi +37 -0
  700. data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +974 -0
  701. data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +81 -0
  702. data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +73 -0
  703. data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +825 -0
  704. data/rbi/stripe/services/test_helpers/issuing_service.rbi +14 -0
  705. data/rbi/stripe/services/test_helpers/refund_service.rbi +23 -0
  706. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +69 -0
  707. data/rbi/stripe/services/test_helpers/terminal_service.rbi +11 -0
  708. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +100 -0
  709. data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +69 -0
  710. data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +137 -0
  711. data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +137 -0
  712. data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +130 -0
  713. data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +130 -0
  714. data/rbi/stripe/services/test_helpers/treasury_service.rbi +15 -0
  715. data/rbi/stripe/services/test_helpers_service.rbi +15 -0
  716. data/rbi/stripe/services/token_service.rbi +1357 -0
  717. data/rbi/stripe/services/topup_service.rbi +200 -0
  718. data/rbi/stripe/services/transfer_reversal_service.rbi +111 -0
  719. data/rbi/stripe/services/transfer_service.rbi +174 -0
  720. data/rbi/stripe/services/treasury/credit_reversal_service.rbi +95 -0
  721. data/rbi/stripe/services/treasury/debit_reversal_service.rbi +100 -0
  722. data/rbi/stripe/services/treasury/financial_account_features_service.rbi +226 -0
  723. data/rbi/stripe/services/treasury/financial_account_service.rbi +577 -0
  724. data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +133 -0
  725. data/rbi/stripe/services/treasury/outbound_payment_service.rbi +350 -0
  726. data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +189 -0
  727. data/rbi/stripe/services/treasury/received_credit_service.rbi +79 -0
  728. data/rbi/stripe/services/treasury/received_debit_service.rbi +66 -0
  729. data/rbi/stripe/services/treasury/transaction_entry_service.rbi +125 -0
  730. data/rbi/stripe/services/treasury/transaction_service.rbi +133 -0
  731. data/rbi/stripe/services/treasury_service.rbi +18 -0
  732. data/rbi/stripe/services/v1_services.rbi +83 -0
  733. data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +43 -0
  734. data/rbi/stripe/services/v2/billing/meter_event_service.rbi +46 -0
  735. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +20 -0
  736. data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +60 -0
  737. data/rbi/stripe/services/v2/billing_service.rbi +14 -0
  738. data/rbi/stripe/services/v2/core/event_destination_service.rbi +228 -0
  739. data/rbi/stripe/services/v2/core/event_service.rbi +42 -0
  740. data/rbi/stripe/services/v2/core_service.rbi +12 -0
  741. data/rbi/stripe/services/v2_services.rbi +10 -0
  742. data/rbi/stripe/services/webhook_endpoint_service.rbi +149 -0
  743. metadata +435 -4
@@ -0,0 +1,3238 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ # An Order describes a purchase being made by a customer, including the
6
+ # products & quantities being purchased, the order status, the payment information,
7
+ # and the billing/shipping details.
8
+ #
9
+ # Related guide: [Orders overview](https://stripe.com/docs/orders)
10
+ class Order < APIResource
11
+ extend Stripe::APIOperations::Create
12
+ extend Stripe::APIOperations::List
13
+ include Stripe::APIOperations::Save
14
+
15
+ OBJECT_NAME = "order"
16
+ def self.object_name
17
+ "order"
18
+ end
19
+
20
+ class AutomaticTax < Stripe::StripeObject
21
+ # Whether Stripe automatically computes tax on this Order.
22
+ attr_reader :enabled
23
+
24
+ # The status of the most recent automated tax calculation for this Order.
25
+ attr_reader :status
26
+ end
27
+
28
+ class BillingDetails < Stripe::StripeObject
29
+ class Address < Stripe::StripeObject
30
+ # City, district, suburb, town, or village.
31
+ attr_reader :city
32
+
33
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
34
+ attr_reader :country
35
+
36
+ # Address line 1 (e.g., street, PO Box, or company name).
37
+ attr_reader :line1
38
+
39
+ # Address line 2 (e.g., apartment, suite, unit, or building).
40
+ attr_reader :line2
41
+
42
+ # ZIP or postal code.
43
+ attr_reader :postal_code
44
+
45
+ # State, county, province, or region.
46
+ attr_reader :state
47
+ end
48
+ # Billing address for the order.
49
+ attr_reader :address
50
+
51
+ # Email address for the order.
52
+ attr_reader :email
53
+
54
+ # Full name for the order.
55
+ attr_reader :name
56
+
57
+ # Billing phone number for the order (including extension).
58
+ attr_reader :phone
59
+ end
60
+
61
+ class Credit < Stripe::StripeObject
62
+ class GiftCard < Stripe::StripeObject
63
+ # The token of the gift card applied to the order
64
+ attr_reader :card
65
+ end
66
+ # The amount of this credit to apply to the order.
67
+ attr_reader :amount
68
+
69
+ # Details for a gift card.
70
+ attr_reader :gift_card
71
+
72
+ # Line items on this order that are ineligible for this credit
73
+ attr_reader :ineligible_line_items
74
+
75
+ # The type of credit to apply to the order, only `gift_card` currently supported.
76
+ attr_reader :type
77
+ end
78
+
79
+ class Payment < Stripe::StripeObject
80
+ class Settings < Stripe::StripeObject
81
+ class AutomaticPaymentMethods < Stripe::StripeObject
82
+ # Whether this Order has been opted into managing payment method types via the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
83
+ attr_reader :enabled
84
+ end
85
+
86
+ class PaymentMethodOptions < Stripe::StripeObject
87
+ class AcssDebit < Stripe::StripeObject
88
+ class MandateOptions < Stripe::StripeObject
89
+ # A URL for custom mandate text
90
+ attr_reader :custom_mandate_url
91
+
92
+ # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.
93
+ attr_reader :interval_description
94
+
95
+ # Payment schedule for the mandate.
96
+ attr_reader :payment_schedule
97
+
98
+ # Transaction type of the mandate.
99
+ attr_reader :transaction_type
100
+ end
101
+ # Attribute for field mandate_options
102
+ attr_reader :mandate_options
103
+
104
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
105
+ #
106
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
107
+ #
108
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
109
+ #
110
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
111
+ attr_reader :setup_future_usage
112
+
113
+ # Bank account verification method.
114
+ attr_reader :verification_method
115
+ end
116
+
117
+ class AfterpayClearpay < Stripe::StripeObject
118
+ # Controls when the funds will be captured from the customer's account.
119
+ attr_reader :capture_method
120
+
121
+ # Order identifier shown to the user in Afterpay's online portal. We recommend using a value that helps you answer any questions a customer might have about the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes.
122
+ attr_reader :reference
123
+
124
+ # Indicates that you intend to make future payments with the payment method.
125
+ #
126
+ # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
127
+ #
128
+ # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
129
+ #
130
+ # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
131
+ attr_reader :setup_future_usage
132
+ end
133
+
134
+ class Alipay < Stripe::StripeObject
135
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
136
+ #
137
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
138
+ #
139
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
140
+ #
141
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
142
+ attr_reader :setup_future_usage
143
+ end
144
+
145
+ class Bancontact < Stripe::StripeObject
146
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
147
+ attr_reader :preferred_language
148
+
149
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
150
+ #
151
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
152
+ #
153
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
154
+ #
155
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
156
+ attr_reader :setup_future_usage
157
+ end
158
+
159
+ class Card < Stripe::StripeObject
160
+ # Controls when the funds will be captured from the customer's account.
161
+ attr_reader :capture_method
162
+
163
+ # Indicates that you intend to make future payments with the payment method.
164
+ #
165
+ # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
166
+ #
167
+ # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
168
+ #
169
+ # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
170
+ attr_reader :setup_future_usage
171
+ end
172
+
173
+ class CustomerBalance < Stripe::StripeObject
174
+ class BankTransfer < Stripe::StripeObject
175
+ class EuBankTransfer < Stripe::StripeObject
176
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
177
+ attr_reader :country
178
+ end
179
+ # Attribute for field eu_bank_transfer
180
+ attr_reader :eu_bank_transfer
181
+
182
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
183
+ #
184
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
185
+ attr_reader :requested_address_types
186
+
187
+ # The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
188
+ attr_reader :type
189
+ end
190
+ # Attribute for field bank_transfer
191
+ attr_reader :bank_transfer
192
+
193
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
194
+ attr_reader :funding_type
195
+
196
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
197
+ #
198
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
199
+ #
200
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
201
+ #
202
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
203
+ attr_reader :setup_future_usage
204
+ end
205
+
206
+ class Ideal < Stripe::StripeObject
207
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
208
+ #
209
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
210
+ #
211
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
212
+ #
213
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
214
+ attr_reader :setup_future_usage
215
+ end
216
+
217
+ class Klarna < Stripe::StripeObject
218
+ # Controls when the funds will be captured from the customer's account.
219
+ attr_reader :capture_method
220
+
221
+ # Preferred locale of the Klarna checkout page that the customer is redirected to.
222
+ attr_reader :preferred_locale
223
+
224
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
225
+ #
226
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
227
+ #
228
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
229
+ #
230
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
231
+ attr_reader :setup_future_usage
232
+ end
233
+
234
+ class Link < Stripe::StripeObject
235
+ # Controls when the funds will be captured from the customer's account.
236
+ attr_reader :capture_method
237
+
238
+ # [Deprecated] This is a legacy parameter that no longer has any function.
239
+ attr_reader :persistent_token
240
+
241
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
242
+ #
243
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
244
+ #
245
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
246
+ #
247
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
248
+ attr_reader :setup_future_usage
249
+ end
250
+
251
+ class Oxxo < Stripe::StripeObject
252
+ # The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
253
+ attr_reader :expires_after_days
254
+
255
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
256
+ #
257
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
258
+ #
259
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
260
+ #
261
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
262
+ attr_reader :setup_future_usage
263
+ end
264
+
265
+ class P24 < Stripe::StripeObject
266
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
267
+ #
268
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
269
+ #
270
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
271
+ #
272
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
273
+ attr_reader :setup_future_usage
274
+ end
275
+
276
+ class Paypal < Stripe::StripeObject
277
+ class LineItem < Stripe::StripeObject
278
+ class Tax < Stripe::StripeObject
279
+ # The tax for a single unit of the line item in minor units. Cannot be a negative number.
280
+ attr_reader :amount
281
+
282
+ # The tax behavior for the line item.
283
+ attr_reader :behavior
284
+ end
285
+ # Type of the line item.
286
+ attr_reader :category
287
+
288
+ # Description of the line item.
289
+ attr_reader :description
290
+
291
+ # Descriptive name of the line item.
292
+ attr_reader :name
293
+
294
+ # Quantity of the line item. Cannot be a negative number.
295
+ attr_reader :quantity
296
+
297
+ # Client facing stock keeping unit, article number or similar.
298
+ attr_reader :sku
299
+
300
+ # The Stripe account ID of the connected account that sells the item. This is only needed when using [Separate Charges and Transfers](https://docs.stripe.com/connect/separate-charges-and-transfers).
301
+ attr_reader :sold_by
302
+
303
+ # Attribute for field tax
304
+ attr_reader :tax
305
+
306
+ # Price for a single unit of the line item in minor units. Cannot be a negative number.
307
+ attr_reader :unit_amount
308
+ end
309
+ # Controls when the funds will be captured from the customer's account.
310
+ attr_reader :capture_method
311
+
312
+ # The line items purchased by the customer.
313
+ attr_reader :line_items
314
+
315
+ # Preferred locale of the PayPal checkout page that the customer is redirected to.
316
+ attr_reader :preferred_locale
317
+
318
+ # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
319
+ attr_reader :reference
320
+
321
+ # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
322
+ attr_reader :reference_id
323
+
324
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
325
+ #
326
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
327
+ #
328
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
329
+ #
330
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
331
+ attr_reader :setup_future_usage
332
+
333
+ # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used.
334
+ attr_reader :subsellers
335
+ end
336
+
337
+ class SepaDebit < Stripe::StripeObject
338
+ class MandateOptions < Stripe::StripeObject
339
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
340
+ attr_reader :reference_prefix
341
+ end
342
+ # Attribute for field mandate_options
343
+ attr_reader :mandate_options
344
+
345
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
346
+ #
347
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
348
+ #
349
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
350
+ #
351
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
352
+ attr_reader :setup_future_usage
353
+ end
354
+
355
+ class Sofort < Stripe::StripeObject
356
+ # Preferred language of the SOFORT authorization page that the customer is redirected to.
357
+ attr_reader :preferred_language
358
+
359
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
360
+ #
361
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
362
+ #
363
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
364
+ #
365
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
366
+ attr_reader :setup_future_usage
367
+ end
368
+
369
+ class WechatPay < Stripe::StripeObject
370
+ # The app ID registered with WeChat Pay. Only required when client is ios or android.
371
+ attr_reader :app_id
372
+
373
+ # The client type that the end customer will pay from
374
+ attr_reader :client
375
+
376
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
377
+ #
378
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
379
+ #
380
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
381
+ #
382
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
383
+ attr_reader :setup_future_usage
384
+ end
385
+ # Attribute for field acss_debit
386
+ attr_reader :acss_debit
387
+
388
+ # Attribute for field afterpay_clearpay
389
+ attr_reader :afterpay_clearpay
390
+
391
+ # Attribute for field alipay
392
+ attr_reader :alipay
393
+
394
+ # Attribute for field bancontact
395
+ attr_reader :bancontact
396
+
397
+ # Attribute for field card
398
+ attr_reader :card
399
+
400
+ # Attribute for field customer_balance
401
+ attr_reader :customer_balance
402
+
403
+ # Attribute for field ideal
404
+ attr_reader :ideal
405
+
406
+ # Attribute for field klarna
407
+ attr_reader :klarna
408
+
409
+ # Attribute for field link
410
+ attr_reader :link
411
+
412
+ # Attribute for field oxxo
413
+ attr_reader :oxxo
414
+
415
+ # Attribute for field p24
416
+ attr_reader :p24
417
+
418
+ # Attribute for field paypal
419
+ attr_reader :paypal
420
+
421
+ # Attribute for field sepa_debit
422
+ attr_reader :sepa_debit
423
+
424
+ # Attribute for field sofort
425
+ attr_reader :sofort
426
+
427
+ # Attribute for field wechat_pay
428
+ attr_reader :wechat_pay
429
+ end
430
+
431
+ class TransferData < Stripe::StripeObject
432
+ # The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
433
+ attr_reader :amount
434
+
435
+ # ID of the Connected account receiving the transfer.
436
+ attr_reader :destination
437
+ end
438
+ # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account.
439
+ attr_reader :application_fee_amount
440
+
441
+ # Indicates whether order has been opted into using [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) to manage payment method types.
442
+ attr_reader :automatic_payment_methods
443
+
444
+ # PaymentMethod-specific configuration to provide to the order's PaymentIntent.
445
+ attr_reader :payment_method_options
446
+
447
+ # The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
448
+ attr_reader :payment_method_types
449
+
450
+ # The URL to redirect the customer to after they authenticate their payment.
451
+ attr_reader :return_url
452
+
453
+ # For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters.
454
+ attr_reader :statement_descriptor
455
+
456
+ # Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.
457
+ attr_reader :statement_descriptor_suffix
458
+
459
+ # Provides configuration for completing a transfer for the order after it is paid.
460
+ attr_reader :transfer_data
461
+ end
462
+ # ID of the payment intent associated with this order. Null when the order is `open`.
463
+ attr_reader :payment_intent
464
+
465
+ # Settings describing how the order should configure generated PaymentIntents.
466
+ attr_reader :settings
467
+
468
+ # The status of the underlying payment associated with this order, if any. Null when the order is `open`.
469
+ attr_reader :status
470
+ end
471
+
472
+ class ShippingCost < Stripe::StripeObject
473
+ class Tax < Stripe::StripeObject
474
+ # Amount of tax applied for this rate.
475
+ attr_reader :amount
476
+
477
+ # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.
478
+ #
479
+ # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates)
480
+ attr_reader :rate
481
+
482
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
483
+ attr_reader :taxability_reason
484
+
485
+ # The amount on which tax is calculated, in cents (or local equivalent).
486
+ attr_reader :taxable_amount
487
+ end
488
+ # Total shipping cost before any discounts or taxes are applied.
489
+ attr_reader :amount_subtotal
490
+
491
+ # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.
492
+ attr_reader :amount_tax
493
+
494
+ # Total shipping cost after discounts and taxes are applied.
495
+ attr_reader :amount_total
496
+
497
+ # The ID of the ShippingRate for this order.
498
+ attr_reader :shipping_rate
499
+
500
+ # The taxes applied to the shipping rate.
501
+ attr_reader :taxes
502
+ end
503
+
504
+ class ShippingDetails < Stripe::StripeObject
505
+ class Address < Stripe::StripeObject
506
+ # City, district, suburb, town, or village.
507
+ attr_reader :city
508
+
509
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
510
+ attr_reader :country
511
+
512
+ # Address line 1 (e.g., street, PO Box, or company name).
513
+ attr_reader :line1
514
+
515
+ # Address line 2 (e.g., apartment, suite, unit, or building).
516
+ attr_reader :line2
517
+
518
+ # ZIP or postal code.
519
+ attr_reader :postal_code
520
+
521
+ # State, county, province, or region.
522
+ attr_reader :state
523
+ end
524
+ # Recipient shipping address. Required if the order includes products that are shippable.
525
+ attr_reader :address
526
+
527
+ # Recipient name.
528
+ attr_reader :name
529
+
530
+ # Recipient phone (including extension).
531
+ attr_reader :phone
532
+ end
533
+
534
+ class TaxDetails < Stripe::StripeObject
535
+ class TaxId < Stripe::StripeObject
536
+ # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown`
537
+ attr_reader :type
538
+
539
+ # The value of the tax ID.
540
+ attr_reader :value
541
+ end
542
+ # Describes the purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`.
543
+ attr_reader :tax_exempt
544
+
545
+ # The purchaser's tax IDs to be used in calculation of tax for this Order.
546
+ attr_reader :tax_ids
547
+ end
548
+
549
+ class TotalDetails < Stripe::StripeObject
550
+ class Breakdown < Stripe::StripeObject
551
+ class Discount < Stripe::StripeObject
552
+ # The amount discounted.
553
+ attr_reader :amount
554
+
555
+ # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
556
+ # It contains information about when the discount began, when it will end, and what it is applied to.
557
+ #
558
+ # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
559
+ attr_reader :discount
560
+ end
561
+
562
+ class Tax < Stripe::StripeObject
563
+ # Amount of tax applied for this rate.
564
+ attr_reader :amount
565
+
566
+ # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.
567
+ #
568
+ # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates)
569
+ attr_reader :rate
570
+
571
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
572
+ attr_reader :taxability_reason
573
+
574
+ # The amount on which tax is calculated, in cents (or local equivalent).
575
+ attr_reader :taxable_amount
576
+ end
577
+ # The aggregated discounts.
578
+ attr_reader :discounts
579
+
580
+ # The aggregated tax amounts by rate.
581
+ attr_reader :taxes
582
+ end
583
+ # Attribute for field amount_credit
584
+ attr_reader :amount_credit
585
+
586
+ # This is the sum of all the discounts.
587
+ attr_reader :amount_discount
588
+
589
+ # This is the sum of all the shipping amounts.
590
+ attr_reader :amount_shipping
591
+
592
+ # This is the sum of all the tax amounts.
593
+ attr_reader :amount_tax
594
+
595
+ # Attribute for field breakdown
596
+ attr_reader :breakdown
597
+ end
598
+
599
+ class ListParams < Stripe::RequestParams
600
+ # Only return orders for the given customer.
601
+ attr_accessor :customer
602
+
603
+ # 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.
604
+ attr_accessor :ending_before
605
+
606
+ # Specifies which fields in the response should be expanded.
607
+ attr_accessor :expand
608
+
609
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
610
+ attr_accessor :limit
611
+
612
+ # 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.
613
+ attr_accessor :starting_after
614
+
615
+ def initialize(
616
+ customer: nil,
617
+ ending_before: nil,
618
+ expand: nil,
619
+ limit: nil,
620
+ starting_after: nil
621
+ )
622
+ @customer = customer
623
+ @ending_before = ending_before
624
+ @expand = expand
625
+ @limit = limit
626
+ @starting_after = starting_after
627
+ end
628
+ end
629
+
630
+ class CreateParams < Stripe::RequestParams
631
+ class AutomaticTax < Stripe::RequestParams
632
+ # Enable automatic tax calculation which will automatically compute tax rates on this order.
633
+ attr_accessor :enabled
634
+
635
+ def initialize(enabled: nil)
636
+ @enabled = enabled
637
+ end
638
+ end
639
+
640
+ class BillingDetails < Stripe::RequestParams
641
+ class Address < Stripe::RequestParams
642
+ # City, district, suburb, town, or village.
643
+ attr_accessor :city
644
+
645
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
646
+ attr_accessor :country
647
+
648
+ # Address line 1 (e.g., street, PO Box, or company name).
649
+ attr_accessor :line1
650
+
651
+ # Address line 2 (e.g., apartment, suite, unit, or building).
652
+ attr_accessor :line2
653
+
654
+ # ZIP or postal code.
655
+ attr_accessor :postal_code
656
+
657
+ # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX".
658
+ attr_accessor :state
659
+
660
+ def initialize(
661
+ city: nil,
662
+ country: nil,
663
+ line1: nil,
664
+ line2: nil,
665
+ postal_code: nil,
666
+ state: nil
667
+ )
668
+ @city = city
669
+ @country = country
670
+ @line1 = line1
671
+ @line2 = line2
672
+ @postal_code = postal_code
673
+ @state = state
674
+ end
675
+ end
676
+ # The billing address provided by the customer.
677
+ attr_accessor :address
678
+
679
+ # The billing email provided by the customer.
680
+ attr_accessor :email
681
+
682
+ # The billing name provided by the customer.
683
+ attr_accessor :name
684
+
685
+ # The billing phone number provided by the customer.
686
+ attr_accessor :phone
687
+
688
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
689
+ @address = address
690
+ @email = email
691
+ @name = name
692
+ @phone = phone
693
+ end
694
+ end
695
+
696
+ class Credit < Stripe::RequestParams
697
+ # The gift card to apply to the order.
698
+ attr_accessor :gift_card
699
+
700
+ # The type of credit to apply to the order, only `gift_card` currently supported.
701
+ attr_accessor :type
702
+
703
+ def initialize(gift_card: nil, type: nil)
704
+ @gift_card = gift_card
705
+ @type = type
706
+ end
707
+ end
708
+
709
+ class Discount < Stripe::RequestParams
710
+ # ID of the coupon to create a new discount for.
711
+ attr_accessor :coupon
712
+
713
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
714
+ attr_accessor :discount
715
+
716
+ # ID of the promotion code to create a new discount for.
717
+ attr_accessor :promotion_code
718
+
719
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
720
+ @coupon = coupon
721
+ @discount = discount
722
+ @promotion_code = promotion_code
723
+ end
724
+ end
725
+
726
+ class LineItem < Stripe::RequestParams
727
+ class Discount < Stripe::RequestParams
728
+ # ID of the coupon to create a new discount for.
729
+ attr_accessor :coupon
730
+
731
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
732
+ attr_accessor :discount
733
+
734
+ def initialize(coupon: nil, discount: nil)
735
+ @coupon = coupon
736
+ @discount = discount
737
+ end
738
+ end
739
+
740
+ class PriceData < Stripe::RequestParams
741
+ # 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).
742
+ attr_accessor :currency
743
+
744
+ # ID of the product this price belongs to.
745
+ #
746
+ # Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specified.
747
+ attr_accessor :product
748
+
749
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
750
+ attr_accessor :tax_behavior
751
+
752
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
753
+ attr_accessor :unit_amount
754
+
755
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
756
+ attr_accessor :unit_amount_decimal
757
+
758
+ def initialize(
759
+ currency: nil,
760
+ product: nil,
761
+ tax_behavior: nil,
762
+ unit_amount: nil,
763
+ unit_amount_decimal: nil
764
+ )
765
+ @currency = currency
766
+ @product = product
767
+ @tax_behavior = tax_behavior
768
+ @unit_amount = unit_amount
769
+ @unit_amount_decimal = unit_amount_decimal
770
+ end
771
+ end
772
+
773
+ class ProductData < Stripe::RequestParams
774
+ class PackageDimensions < Stripe::RequestParams
775
+ # Height, in inches. Maximum precision is 2 decimal places.
776
+ attr_accessor :height
777
+
778
+ # Length, in inches. Maximum precision is 2 decimal places.
779
+ attr_accessor :length
780
+
781
+ # Weight, in ounces. Maximum precision is 2 decimal places.
782
+ attr_accessor :weight
783
+
784
+ # Width, in inches. Maximum precision is 2 decimal places.
785
+ attr_accessor :width
786
+
787
+ def initialize(height: nil, length: nil, weight: nil, width: nil)
788
+ @height = height
789
+ @length = length
790
+ @weight = weight
791
+ @width = width
792
+ end
793
+ end
794
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
795
+ attr_accessor :description
796
+
797
+ # A unique identifier for this product.
798
+ #
799
+ # `product_data` automatically creates a Product with this ID. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. If any of the fields in the existing Product are different from the values in `product_data`, `product_data` updates the existing Product with the new information. So set `product_data[id]` to the same string every time you sell the same product, but don't re-use the same string for different products.
800
+ attr_accessor :id
801
+
802
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
803
+ attr_accessor :images
804
+
805
+ # 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`.
806
+ attr_accessor :metadata
807
+
808
+ # The product's name, meant to be displayable to the customer.
809
+ attr_accessor :name
810
+
811
+ # The dimensions of this product for shipping purposes.
812
+ attr_accessor :package_dimensions
813
+
814
+ # Whether this product is shipped (i.e., physical goods).
815
+ attr_accessor :shippable
816
+
817
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
818
+ attr_accessor :tax_code
819
+
820
+ # A URL of a publicly-accessible webpage for this product.
821
+ attr_accessor :url
822
+
823
+ def initialize(
824
+ description: nil,
825
+ id: nil,
826
+ images: nil,
827
+ metadata: nil,
828
+ name: nil,
829
+ package_dimensions: nil,
830
+ shippable: nil,
831
+ tax_code: nil,
832
+ url: nil
833
+ )
834
+ @description = description
835
+ @id = id
836
+ @images = images
837
+ @metadata = metadata
838
+ @name = name
839
+ @package_dimensions = package_dimensions
840
+ @shippable = shippable
841
+ @tax_code = tax_code
842
+ @url = url
843
+ end
844
+ end
845
+ # The description for the line item. Will default to the name of the associated product.
846
+ attr_accessor :description
847
+
848
+ # The discounts applied to this line item.
849
+ attr_accessor :discounts
850
+
851
+ # The ID of a [Price](https://stripe.com/docs/api/prices) to add to the Order.
852
+ #
853
+ # The `price` parameter is an alternative to using the `product` parameter. If each of your products are sold at a single price, you can set `Product.default_price` and then pass the `product` parameter when creating a line item. If your products are sold at several possible prices, use the `price` parameter to explicitly specify which one to use.
854
+ attr_accessor :price
855
+
856
+ # Data used to generate a new Price object inline.
857
+ #
858
+ # The `price_data` parameter is an alternative to using the `product` or `price` parameters. If you create products upfront and configure a `Product.default_price`, pass the `product` parameter when creating a line item. If you prefer not to define products upfront, or if you charge variable prices, pass the `price_data` parameter to describe the price for this line item.
859
+ #
860
+ # Each time you pass `price_data` we create a Price for the product. This Price is hidden in both the Dashboard and API lists and cannot be reused.
861
+ attr_accessor :price_data
862
+
863
+ # The ID of a [Product](https://stripe.com/docs/api/products) to add to the Order.
864
+ #
865
+ # The product must have a `default_price` specified. Otherwise, specify the price by passing the `price` or `price_data` parameter.
866
+ attr_accessor :product
867
+
868
+ # Defines a Product inline and adds it to the Order.
869
+ #
870
+ # `product_data` is an alternative to the `product` parameter. If you created a Product upfront, use the `product` parameter to refer to the existing Product. But if you prefer not to create Products upfront, pass the `product_data` parameter to define a Product inline as part of configuring the Order.
871
+ #
872
+ # `product_data` automatically creates a Product, just as if you had manually created the Product. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates.
873
+ attr_accessor :product_data
874
+
875
+ # The quantity of the line item.
876
+ attr_accessor :quantity
877
+
878
+ # The tax rates applied to this line item.
879
+ attr_accessor :tax_rates
880
+
881
+ def initialize(
882
+ description: nil,
883
+ discounts: nil,
884
+ price: nil,
885
+ price_data: nil,
886
+ product: nil,
887
+ product_data: nil,
888
+ quantity: nil,
889
+ tax_rates: nil
890
+ )
891
+ @description = description
892
+ @discounts = discounts
893
+ @price = price
894
+ @price_data = price_data
895
+ @product = product
896
+ @product_data = product_data
897
+ @quantity = quantity
898
+ @tax_rates = tax_rates
899
+ end
900
+ end
901
+
902
+ class Payment < Stripe::RequestParams
903
+ class Settings < Stripe::RequestParams
904
+ class PaymentMethodOptions < Stripe::RequestParams
905
+ class AcssDebit < Stripe::RequestParams
906
+ class MandateOptions < Stripe::RequestParams
907
+ # A URL for custom mandate text to render during confirmation step.
908
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
909
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
910
+ attr_accessor :custom_mandate_url
911
+
912
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
913
+ attr_accessor :interval_description
914
+
915
+ # Payment schedule for the mandate.
916
+ attr_accessor :payment_schedule
917
+
918
+ # Transaction type of the mandate.
919
+ attr_accessor :transaction_type
920
+
921
+ def initialize(
922
+ custom_mandate_url: nil,
923
+ interval_description: nil,
924
+ payment_schedule: nil,
925
+ transaction_type: nil
926
+ )
927
+ @custom_mandate_url = custom_mandate_url
928
+ @interval_description = interval_description
929
+ @payment_schedule = payment_schedule
930
+ @transaction_type = transaction_type
931
+ end
932
+ end
933
+ # Additional fields for Mandate creation
934
+ attr_accessor :mandate_options
935
+
936
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
937
+ #
938
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
939
+ #
940
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
941
+ #
942
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
943
+ #
944
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
945
+ attr_accessor :setup_future_usage
946
+
947
+ # Bank account verification method.
948
+ attr_accessor :verification_method
949
+
950
+ def initialize(
951
+ mandate_options: nil,
952
+ setup_future_usage: nil,
953
+ verification_method: nil
954
+ )
955
+ @mandate_options = mandate_options
956
+ @setup_future_usage = setup_future_usage
957
+ @verification_method = verification_method
958
+ end
959
+ end
960
+
961
+ class AfterpayClearpay < Stripe::RequestParams
962
+ # Controls when the funds are captured from the customer's account.
963
+ #
964
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
965
+ #
966
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
967
+ attr_accessor :capture_method
968
+
969
+ # An internal identifier or reference this payment corresponds to. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes.
970
+ attr_accessor :reference
971
+
972
+ # Indicates that you intend to make future payments with the payment method.
973
+ #
974
+ # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
975
+ #
976
+ # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
977
+ #
978
+ # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
979
+ attr_accessor :setup_future_usage
980
+
981
+ def initialize(capture_method: nil, reference: nil, setup_future_usage: nil)
982
+ @capture_method = capture_method
983
+ @reference = reference
984
+ @setup_future_usage = setup_future_usage
985
+ end
986
+ end
987
+
988
+ class Alipay < Stripe::RequestParams
989
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
990
+ #
991
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
992
+ #
993
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
994
+ #
995
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
996
+ #
997
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
998
+ attr_accessor :setup_future_usage
999
+
1000
+ def initialize(setup_future_usage: nil)
1001
+ @setup_future_usage = setup_future_usage
1002
+ end
1003
+ end
1004
+
1005
+ class Bancontact < Stripe::RequestParams
1006
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
1007
+ attr_accessor :preferred_language
1008
+
1009
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1010
+ #
1011
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1012
+ #
1013
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1014
+ #
1015
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
1016
+ #
1017
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
1018
+ attr_accessor :setup_future_usage
1019
+
1020
+ def initialize(preferred_language: nil, setup_future_usage: nil)
1021
+ @preferred_language = preferred_language
1022
+ @setup_future_usage = setup_future_usage
1023
+ end
1024
+ end
1025
+
1026
+ class Card < Stripe::RequestParams
1027
+ # Controls when the funds will be captured from the customer's account.
1028
+ attr_accessor :capture_method
1029
+
1030
+ # Indicates that you intend to make future payments with the payment method.
1031
+ #
1032
+ # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
1033
+ #
1034
+ # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
1035
+ #
1036
+ # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
1037
+ attr_accessor :setup_future_usage
1038
+
1039
+ def initialize(capture_method: nil, setup_future_usage: nil)
1040
+ @capture_method = capture_method
1041
+ @setup_future_usage = setup_future_usage
1042
+ end
1043
+ end
1044
+
1045
+ class CustomerBalance < Stripe::RequestParams
1046
+ class BankTransfer < Stripe::RequestParams
1047
+ class EuBankTransfer < Stripe::RequestParams
1048
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
1049
+ attr_accessor :country
1050
+
1051
+ def initialize(country: nil)
1052
+ @country = country
1053
+ end
1054
+ end
1055
+ # Configuration for the eu_bank_transfer funding type.
1056
+ attr_accessor :eu_bank_transfer
1057
+
1058
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
1059
+ #
1060
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
1061
+ attr_accessor :requested_address_types
1062
+
1063
+ # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
1064
+ attr_accessor :type
1065
+
1066
+ def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil)
1067
+ @eu_bank_transfer = eu_bank_transfer
1068
+ @requested_address_types = requested_address_types
1069
+ @type = type
1070
+ end
1071
+ end
1072
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
1073
+ attr_accessor :bank_transfer
1074
+
1075
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
1076
+ attr_accessor :funding_type
1077
+
1078
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1079
+ #
1080
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1081
+ #
1082
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1083
+ #
1084
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
1085
+ #
1086
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
1087
+ attr_accessor :setup_future_usage
1088
+
1089
+ def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil)
1090
+ @bank_transfer = bank_transfer
1091
+ @funding_type = funding_type
1092
+ @setup_future_usage = setup_future_usage
1093
+ end
1094
+ end
1095
+
1096
+ class Ideal < Stripe::RequestParams
1097
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1098
+ #
1099
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1100
+ #
1101
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1102
+ #
1103
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
1104
+ #
1105
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
1106
+ attr_accessor :setup_future_usage
1107
+
1108
+ def initialize(setup_future_usage: nil)
1109
+ @setup_future_usage = setup_future_usage
1110
+ end
1111
+ end
1112
+
1113
+ class Klarna < Stripe::RequestParams
1114
+ # Controls when the funds are captured from the customer's account.
1115
+ #
1116
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
1117
+ #
1118
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
1119
+ attr_accessor :capture_method
1120
+
1121
+ # Preferred language of the Klarna authorization page that the customer is redirected to
1122
+ attr_accessor :preferred_locale
1123
+
1124
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1125
+ #
1126
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1127
+ #
1128
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1129
+ #
1130
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
1131
+ #
1132
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
1133
+ attr_accessor :setup_future_usage
1134
+
1135
+ def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil)
1136
+ @capture_method = capture_method
1137
+ @preferred_locale = preferred_locale
1138
+ @setup_future_usage = setup_future_usage
1139
+ end
1140
+ end
1141
+
1142
+ class Link < Stripe::RequestParams
1143
+ # Controls when the funds are captured from the customer's account.
1144
+ #
1145
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
1146
+ #
1147
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
1148
+ attr_accessor :capture_method
1149
+
1150
+ # [Deprecated] This is a legacy parameter that no longer has any function.
1151
+ attr_accessor :persistent_token
1152
+
1153
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1154
+ #
1155
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1156
+ #
1157
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1158
+ #
1159
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
1160
+ #
1161
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
1162
+ attr_accessor :setup_future_usage
1163
+
1164
+ def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil)
1165
+ @capture_method = capture_method
1166
+ @persistent_token = persistent_token
1167
+ @setup_future_usage = setup_future_usage
1168
+ end
1169
+ end
1170
+
1171
+ class Oxxo < Stripe::RequestParams
1172
+ # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
1173
+ attr_accessor :expires_after_days
1174
+
1175
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1176
+ #
1177
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1178
+ #
1179
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1180
+ #
1181
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
1182
+ #
1183
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
1184
+ attr_accessor :setup_future_usage
1185
+
1186
+ def initialize(expires_after_days: nil, setup_future_usage: nil)
1187
+ @expires_after_days = expires_after_days
1188
+ @setup_future_usage = setup_future_usage
1189
+ end
1190
+ end
1191
+
1192
+ class P24 < Stripe::RequestParams
1193
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1194
+ #
1195
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1196
+ #
1197
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1198
+ #
1199
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
1200
+ #
1201
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
1202
+ attr_accessor :setup_future_usage
1203
+
1204
+ # Confirm that the payer has accepted the P24 terms and conditions.
1205
+ attr_accessor :tos_shown_and_accepted
1206
+
1207
+ def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil)
1208
+ @setup_future_usage = setup_future_usage
1209
+ @tos_shown_and_accepted = tos_shown_and_accepted
1210
+ end
1211
+ end
1212
+
1213
+ class Paypal < Stripe::RequestParams
1214
+ class LineItem < Stripe::RequestParams
1215
+ class Tax < Stripe::RequestParams
1216
+ # The tax for a single unit of the line item in minor units. Cannot be a negative number.
1217
+ attr_accessor :amount
1218
+
1219
+ # The tax behavior for the line item.
1220
+ attr_accessor :behavior
1221
+
1222
+ def initialize(amount: nil, behavior: nil)
1223
+ @amount = amount
1224
+ @behavior = behavior
1225
+ end
1226
+ end
1227
+ # Type of the line item.
1228
+ attr_accessor :category
1229
+
1230
+ # Description of the line item.
1231
+ attr_accessor :description
1232
+
1233
+ # Descriptive name of the line item.
1234
+ attr_accessor :name
1235
+
1236
+ # Quantity of the line item. Must be a positive number.
1237
+ attr_accessor :quantity
1238
+
1239
+ # Client facing stock keeping unit, article number or similar.
1240
+ attr_accessor :sku
1241
+
1242
+ # The Stripe account ID of the connected account that sells the item.
1243
+ attr_accessor :sold_by
1244
+
1245
+ # The tax information for the line item.
1246
+ attr_accessor :tax
1247
+
1248
+ # Price for a single unit of the line item in minor units. Cannot be a negative number.
1249
+ attr_accessor :unit_amount
1250
+
1251
+ def initialize(
1252
+ category: nil,
1253
+ description: nil,
1254
+ name: nil,
1255
+ quantity: nil,
1256
+ sku: nil,
1257
+ sold_by: nil,
1258
+ tax: nil,
1259
+ unit_amount: nil
1260
+ )
1261
+ @category = category
1262
+ @description = description
1263
+ @name = name
1264
+ @quantity = quantity
1265
+ @sku = sku
1266
+ @sold_by = sold_by
1267
+ @tax = tax
1268
+ @unit_amount = unit_amount
1269
+ end
1270
+ end
1271
+ # Controls when the funds will be captured from the customer's account.
1272
+ attr_accessor :capture_method
1273
+
1274
+ # The line items purchased by the customer.
1275
+ attr_accessor :line_items
1276
+
1277
+ # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to.
1278
+ attr_accessor :preferred_locale
1279
+
1280
+ # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
1281
+ attr_accessor :reference
1282
+
1283
+ # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
1284
+ attr_accessor :reference_id
1285
+
1286
+ # The risk correlation ID for an on-session payment using a saved PayPal payment method.
1287
+ attr_accessor :risk_correlation_id
1288
+
1289
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1290
+ #
1291
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1292
+ #
1293
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1294
+ #
1295
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
1296
+ #
1297
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
1298
+ attr_accessor :setup_future_usage
1299
+
1300
+ # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used.
1301
+ attr_accessor :subsellers
1302
+
1303
+ def initialize(
1304
+ capture_method: nil,
1305
+ line_items: nil,
1306
+ preferred_locale: nil,
1307
+ reference: nil,
1308
+ reference_id: nil,
1309
+ risk_correlation_id: nil,
1310
+ setup_future_usage: nil,
1311
+ subsellers: nil
1312
+ )
1313
+ @capture_method = capture_method
1314
+ @line_items = line_items
1315
+ @preferred_locale = preferred_locale
1316
+ @reference = reference
1317
+ @reference_id = reference_id
1318
+ @risk_correlation_id = risk_correlation_id
1319
+ @setup_future_usage = setup_future_usage
1320
+ @subsellers = subsellers
1321
+ end
1322
+ end
1323
+
1324
+ class SepaDebit < Stripe::RequestParams
1325
+ class MandateOptions < Stripe::RequestParams
1326
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
1327
+ attr_accessor :reference_prefix
1328
+
1329
+ def initialize(reference_prefix: nil)
1330
+ @reference_prefix = reference_prefix
1331
+ end
1332
+ end
1333
+ # Additional fields for Mandate creation
1334
+ attr_accessor :mandate_options
1335
+
1336
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1337
+ #
1338
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1339
+ #
1340
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1341
+ #
1342
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
1343
+ #
1344
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
1345
+ attr_accessor :setup_future_usage
1346
+
1347
+ def initialize(mandate_options: nil, setup_future_usage: nil)
1348
+ @mandate_options = mandate_options
1349
+ @setup_future_usage = setup_future_usage
1350
+ end
1351
+ end
1352
+
1353
+ class Sofort < Stripe::RequestParams
1354
+ # Language shown to the payer on redirect.
1355
+ attr_accessor :preferred_language
1356
+
1357
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1358
+ #
1359
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1360
+ #
1361
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1362
+ #
1363
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
1364
+ #
1365
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
1366
+ attr_accessor :setup_future_usage
1367
+
1368
+ def initialize(preferred_language: nil, setup_future_usage: nil)
1369
+ @preferred_language = preferred_language
1370
+ @setup_future_usage = setup_future_usage
1371
+ end
1372
+ end
1373
+
1374
+ class WechatPay < Stripe::RequestParams
1375
+ # The app ID registered with WeChat Pay. Only required when client is ios or android.
1376
+ attr_accessor :app_id
1377
+
1378
+ # The client type that the end customer will pay from
1379
+ attr_accessor :client
1380
+
1381
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1382
+ #
1383
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1384
+ #
1385
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1386
+ #
1387
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
1388
+ #
1389
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
1390
+ attr_accessor :setup_future_usage
1391
+
1392
+ def initialize(app_id: nil, client: nil, setup_future_usage: nil)
1393
+ @app_id = app_id
1394
+ @client = client
1395
+ @setup_future_usage = setup_future_usage
1396
+ end
1397
+ end
1398
+ # If paying by `acss_debit`, this sub-hash contains details about the ACSS Debit payment method options to pass to the order's PaymentIntent.
1399
+ attr_accessor :acss_debit
1400
+
1401
+ # If paying by `afterpay_clearpay`, this sub-hash contains details about the AfterpayClearpay payment method options to pass to the order's PaymentIntent.
1402
+ attr_accessor :afterpay_clearpay
1403
+
1404
+ # If paying by `alipay`, this sub-hash contains details about the Alipay payment method options to pass to the order's PaymentIntent.
1405
+ attr_accessor :alipay
1406
+
1407
+ # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the order's PaymentIntent.
1408
+ attr_accessor :bancontact
1409
+
1410
+ # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the order's PaymentIntent.
1411
+ attr_accessor :card
1412
+
1413
+ # If paying by `customer_balance`, this sub-hash contains details about the Customer Balance payment method options to pass to the order's PaymentIntent.
1414
+ attr_accessor :customer_balance
1415
+
1416
+ # If paying by `ideal`, this sub-hash contains details about the iDEAL payment method options to pass to the order's PaymentIntent.
1417
+ attr_accessor :ideal
1418
+
1419
+ # If paying by `klarna`, this sub-hash contains details about the Klarna payment method options to pass to the order's PaymentIntent.
1420
+ attr_accessor :klarna
1421
+
1422
+ # If paying by `link`, this sub-hash contains details about the Link payment method options to pass to the order's PaymentIntent.
1423
+ attr_accessor :link
1424
+
1425
+ # If paying by `oxxo`, this sub-hash contains details about the OXXO payment method options to pass to the order's PaymentIntent.
1426
+ attr_accessor :oxxo
1427
+
1428
+ # If paying by `p24`, this sub-hash contains details about the P24 payment method options to pass to the order's PaymentIntent.
1429
+ attr_accessor :p24
1430
+
1431
+ # If paying by `paypal`, this sub-hash contains details about the PayPal payment method options to pass to the order's PaymentIntent.
1432
+ attr_accessor :paypal
1433
+
1434
+ # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Debit payment method options to pass to the order's PaymentIntent.
1435
+ attr_accessor :sepa_debit
1436
+
1437
+ # If paying by `sofort`, this sub-hash contains details about the Sofort payment method options to pass to the order's PaymentIntent.
1438
+ attr_accessor :sofort
1439
+
1440
+ # If paying by `wechat_pay`, this sub-hash contains details about the WeChat Pay payment method options to pass to the order's PaymentIntent.
1441
+ attr_accessor :wechat_pay
1442
+
1443
+ def initialize(
1444
+ acss_debit: nil,
1445
+ afterpay_clearpay: nil,
1446
+ alipay: nil,
1447
+ bancontact: nil,
1448
+ card: nil,
1449
+ customer_balance: nil,
1450
+ ideal: nil,
1451
+ klarna: nil,
1452
+ link: nil,
1453
+ oxxo: nil,
1454
+ p24: nil,
1455
+ paypal: nil,
1456
+ sepa_debit: nil,
1457
+ sofort: nil,
1458
+ wechat_pay: nil
1459
+ )
1460
+ @acss_debit = acss_debit
1461
+ @afterpay_clearpay = afterpay_clearpay
1462
+ @alipay = alipay
1463
+ @bancontact = bancontact
1464
+ @card = card
1465
+ @customer_balance = customer_balance
1466
+ @ideal = ideal
1467
+ @klarna = klarna
1468
+ @link = link
1469
+ @oxxo = oxxo
1470
+ @p24 = p24
1471
+ @paypal = paypal
1472
+ @sepa_debit = sepa_debit
1473
+ @sofort = sofort
1474
+ @wechat_pay = wechat_pay
1475
+ end
1476
+ end
1477
+
1478
+ class TransferData < Stripe::RequestParams
1479
+ # The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
1480
+ attr_accessor :amount
1481
+
1482
+ # ID of the Connected account receiving the transfer.
1483
+ attr_accessor :destination
1484
+
1485
+ def initialize(amount: nil, destination: nil)
1486
+ @amount = amount
1487
+ @destination = destination
1488
+ end
1489
+ end
1490
+ # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account.
1491
+ attr_accessor :application_fee_amount
1492
+
1493
+ # PaymentMethod-specific configuration to provide to the order's PaymentIntent.
1494
+ attr_accessor :payment_method_options
1495
+
1496
+ # The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
1497
+ attr_accessor :payment_method_types
1498
+
1499
+ # The URL to redirect the customer to after they authenticate their payment.
1500
+ attr_accessor :return_url
1501
+
1502
+ # For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters.
1503
+ attr_accessor :statement_descriptor
1504
+
1505
+ # Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.
1506
+ attr_accessor :statement_descriptor_suffix
1507
+
1508
+ # Provides configuration for completing a transfer for the order after it is paid.
1509
+ attr_accessor :transfer_data
1510
+
1511
+ def initialize(
1512
+ application_fee_amount: nil,
1513
+ payment_method_options: nil,
1514
+ payment_method_types: nil,
1515
+ return_url: nil,
1516
+ statement_descriptor: nil,
1517
+ statement_descriptor_suffix: nil,
1518
+ transfer_data: nil
1519
+ )
1520
+ @application_fee_amount = application_fee_amount
1521
+ @payment_method_options = payment_method_options
1522
+ @payment_method_types = payment_method_types
1523
+ @return_url = return_url
1524
+ @statement_descriptor = statement_descriptor
1525
+ @statement_descriptor_suffix = statement_descriptor_suffix
1526
+ @transfer_data = transfer_data
1527
+ end
1528
+ end
1529
+ # Settings describing how the order should configure generated PaymentIntents.
1530
+ attr_accessor :settings
1531
+
1532
+ def initialize(settings: nil)
1533
+ @settings = settings
1534
+ end
1535
+ end
1536
+
1537
+ class ShippingCost < Stripe::RequestParams
1538
+ class ShippingRateData < Stripe::RequestParams
1539
+ class DeliveryEstimate < Stripe::RequestParams
1540
+ class Maximum < Stripe::RequestParams
1541
+ # A unit of time.
1542
+ attr_accessor :unit
1543
+
1544
+ # Must be greater than 0.
1545
+ attr_accessor :value
1546
+
1547
+ def initialize(unit: nil, value: nil)
1548
+ @unit = unit
1549
+ @value = value
1550
+ end
1551
+ end
1552
+
1553
+ class Minimum < Stripe::RequestParams
1554
+ # A unit of time.
1555
+ attr_accessor :unit
1556
+
1557
+ # Must be greater than 0.
1558
+ attr_accessor :value
1559
+
1560
+ def initialize(unit: nil, value: nil)
1561
+ @unit = unit
1562
+ @value = value
1563
+ end
1564
+ end
1565
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
1566
+ attr_accessor :maximum
1567
+
1568
+ # The lower bound of the estimated range. If empty, represents no lower bound.
1569
+ attr_accessor :minimum
1570
+
1571
+ def initialize(maximum: nil, minimum: nil)
1572
+ @maximum = maximum
1573
+ @minimum = minimum
1574
+ end
1575
+ end
1576
+
1577
+ class FixedAmount < Stripe::RequestParams
1578
+ class CurrencyOptions < Stripe::RequestParams
1579
+ # A non-negative integer in cents representing how much to charge.
1580
+ attr_accessor :amount
1581
+
1582
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
1583
+ attr_accessor :tax_behavior
1584
+
1585
+ def initialize(amount: nil, tax_behavior: nil)
1586
+ @amount = amount
1587
+ @tax_behavior = tax_behavior
1588
+ end
1589
+ end
1590
+ # A non-negative integer in cents representing how much to charge.
1591
+ attr_accessor :amount
1592
+
1593
+ # 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).
1594
+ attr_accessor :currency
1595
+
1596
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
1597
+ attr_accessor :currency_options
1598
+
1599
+ def initialize(amount: nil, currency: nil, currency_options: nil)
1600
+ @amount = amount
1601
+ @currency = currency
1602
+ @currency_options = currency_options
1603
+ end
1604
+ end
1605
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
1606
+ attr_accessor :delivery_estimate
1607
+
1608
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
1609
+ attr_accessor :display_name
1610
+
1611
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
1612
+ attr_accessor :fixed_amount
1613
+
1614
+ # 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`.
1615
+ attr_accessor :metadata
1616
+
1617
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
1618
+ attr_accessor :tax_behavior
1619
+
1620
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
1621
+ attr_accessor :tax_code
1622
+
1623
+ # The type of calculation to use on the shipping rate.
1624
+ attr_accessor :type
1625
+
1626
+ def initialize(
1627
+ delivery_estimate: nil,
1628
+ display_name: nil,
1629
+ fixed_amount: nil,
1630
+ metadata: nil,
1631
+ tax_behavior: nil,
1632
+ tax_code: nil,
1633
+ type: nil
1634
+ )
1635
+ @delivery_estimate = delivery_estimate
1636
+ @display_name = display_name
1637
+ @fixed_amount = fixed_amount
1638
+ @metadata = metadata
1639
+ @tax_behavior = tax_behavior
1640
+ @tax_code = tax_code
1641
+ @type = type
1642
+ end
1643
+ end
1644
+ # The ID of the shipping rate to use for this order.
1645
+ attr_accessor :shipping_rate
1646
+
1647
+ # Parameters to create a new ad-hoc shipping rate for this order.
1648
+ attr_accessor :shipping_rate_data
1649
+
1650
+ def initialize(shipping_rate: nil, shipping_rate_data: nil)
1651
+ @shipping_rate = shipping_rate
1652
+ @shipping_rate_data = shipping_rate_data
1653
+ end
1654
+ end
1655
+
1656
+ class ShippingDetails < Stripe::RequestParams
1657
+ class Address < Stripe::RequestParams
1658
+ # City, district, suburb, town, or village.
1659
+ attr_accessor :city
1660
+
1661
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
1662
+ attr_accessor :country
1663
+
1664
+ # Address line 1 (e.g., street, PO Box, or company name).
1665
+ attr_accessor :line1
1666
+
1667
+ # Address line 2 (e.g., apartment, suite, unit, or building).
1668
+ attr_accessor :line2
1669
+
1670
+ # ZIP or postal code.
1671
+ attr_accessor :postal_code
1672
+
1673
+ # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX".
1674
+ attr_accessor :state
1675
+
1676
+ def initialize(
1677
+ city: nil,
1678
+ country: nil,
1679
+ line1: nil,
1680
+ line2: nil,
1681
+ postal_code: nil,
1682
+ state: nil
1683
+ )
1684
+ @city = city
1685
+ @country = country
1686
+ @line1 = line1
1687
+ @line2 = line2
1688
+ @postal_code = postal_code
1689
+ @state = state
1690
+ end
1691
+ end
1692
+ # The shipping address for the order.
1693
+ attr_accessor :address
1694
+
1695
+ # The name of the recipient of the order.
1696
+ attr_accessor :name
1697
+
1698
+ # The phone number (including extension) for the recipient of the order.
1699
+ attr_accessor :phone
1700
+
1701
+ def initialize(address: nil, name: nil, phone: nil)
1702
+ @address = address
1703
+ @name = name
1704
+ @phone = phone
1705
+ end
1706
+ end
1707
+
1708
+ class TaxDetails < Stripe::RequestParams
1709
+ class TaxId < Stripe::RequestParams
1710
+ # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`
1711
+ attr_accessor :type
1712
+
1713
+ # Value of the tax ID.
1714
+ attr_accessor :value
1715
+
1716
+ def initialize(type: nil, value: nil)
1717
+ @type = type
1718
+ @value = value
1719
+ end
1720
+ end
1721
+ # The purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`.
1722
+ attr_accessor :tax_exempt
1723
+
1724
+ # The purchaser's tax IDs to be used for this order.
1725
+ attr_accessor :tax_ids
1726
+
1727
+ def initialize(tax_exempt: nil, tax_ids: nil)
1728
+ @tax_exempt = tax_exempt
1729
+ @tax_ids = tax_ids
1730
+ end
1731
+ end
1732
+ # Settings for automatic tax calculation for this order.
1733
+ attr_accessor :automatic_tax
1734
+
1735
+ # Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided.
1736
+ attr_accessor :billing_details
1737
+
1738
+ # The credits to apply to the order, only `gift_card` currently supported.
1739
+ attr_accessor :credits
1740
+
1741
+ # 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).
1742
+ attr_accessor :currency
1743
+
1744
+ # The customer associated with this order.
1745
+ attr_accessor :customer
1746
+
1747
+ # An arbitrary string attached to the object. Often useful for displaying to users.
1748
+ attr_accessor :description
1749
+
1750
+ # The coupons, promotion codes, and/or discounts to apply to the order.
1751
+ attr_accessor :discounts
1752
+
1753
+ # Specifies which fields in the response should be expanded.
1754
+ attr_accessor :expand
1755
+
1756
+ # The IP address of the purchaser for this order.
1757
+ attr_accessor :ip_address
1758
+
1759
+ # A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost.
1760
+ attr_accessor :line_items
1761
+
1762
+ # 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`.
1763
+ attr_accessor :metadata
1764
+
1765
+ # Payment information associated with the order, including payment settings.
1766
+ attr_accessor :payment
1767
+
1768
+ # Settings for the customer cost of shipping for this order.
1769
+ attr_accessor :shipping_cost
1770
+
1771
+ # Shipping details for the order.
1772
+ attr_accessor :shipping_details
1773
+
1774
+ # Additional tax details about the purchaser to be used for this order.
1775
+ attr_accessor :tax_details
1776
+
1777
+ def initialize(
1778
+ automatic_tax: nil,
1779
+ billing_details: nil,
1780
+ credits: nil,
1781
+ currency: nil,
1782
+ customer: nil,
1783
+ description: nil,
1784
+ discounts: nil,
1785
+ expand: nil,
1786
+ ip_address: nil,
1787
+ line_items: nil,
1788
+ metadata: nil,
1789
+ payment: nil,
1790
+ shipping_cost: nil,
1791
+ shipping_details: nil,
1792
+ tax_details: nil
1793
+ )
1794
+ @automatic_tax = automatic_tax
1795
+ @billing_details = billing_details
1796
+ @credits = credits
1797
+ @currency = currency
1798
+ @customer = customer
1799
+ @description = description
1800
+ @discounts = discounts
1801
+ @expand = expand
1802
+ @ip_address = ip_address
1803
+ @line_items = line_items
1804
+ @metadata = metadata
1805
+ @payment = payment
1806
+ @shipping_cost = shipping_cost
1807
+ @shipping_details = shipping_details
1808
+ @tax_details = tax_details
1809
+ end
1810
+ end
1811
+
1812
+ class RetrieveParams < Stripe::RequestParams
1813
+ # Specifies which fields in the response should be expanded.
1814
+ attr_accessor :expand
1815
+
1816
+ def initialize(expand: nil)
1817
+ @expand = expand
1818
+ end
1819
+ end
1820
+
1821
+ class UpdateParams < Stripe::RequestParams
1822
+ class AutomaticTax < Stripe::RequestParams
1823
+ # Enable automatic tax calculation which will automatically compute tax rates on this order.
1824
+ attr_accessor :enabled
1825
+
1826
+ def initialize(enabled: nil)
1827
+ @enabled = enabled
1828
+ end
1829
+ end
1830
+
1831
+ class BillingDetails < Stripe::RequestParams
1832
+ class Address < Stripe::RequestParams
1833
+ # City, district, suburb, town, or village.
1834
+ attr_accessor :city
1835
+
1836
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
1837
+ attr_accessor :country
1838
+
1839
+ # Address line 1 (e.g., street, PO Box, or company name).
1840
+ attr_accessor :line1
1841
+
1842
+ # Address line 2 (e.g., apartment, suite, unit, or building).
1843
+ attr_accessor :line2
1844
+
1845
+ # ZIP or postal code.
1846
+ attr_accessor :postal_code
1847
+
1848
+ # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX".
1849
+ attr_accessor :state
1850
+
1851
+ def initialize(
1852
+ city: nil,
1853
+ country: nil,
1854
+ line1: nil,
1855
+ line2: nil,
1856
+ postal_code: nil,
1857
+ state: nil
1858
+ )
1859
+ @city = city
1860
+ @country = country
1861
+ @line1 = line1
1862
+ @line2 = line2
1863
+ @postal_code = postal_code
1864
+ @state = state
1865
+ end
1866
+ end
1867
+ # The billing address provided by the customer.
1868
+ attr_accessor :address
1869
+
1870
+ # The billing email provided by the customer.
1871
+ attr_accessor :email
1872
+
1873
+ # The billing name provided by the customer.
1874
+ attr_accessor :name
1875
+
1876
+ # The billing phone number provided by the customer.
1877
+ attr_accessor :phone
1878
+
1879
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
1880
+ @address = address
1881
+ @email = email
1882
+ @name = name
1883
+ @phone = phone
1884
+ end
1885
+ end
1886
+
1887
+ class Credit < Stripe::RequestParams
1888
+ # The gift card to apply to the order.
1889
+ attr_accessor :gift_card
1890
+
1891
+ # The type of credit to apply to the order, only `gift_card` currently supported.
1892
+ attr_accessor :type
1893
+
1894
+ def initialize(gift_card: nil, type: nil)
1895
+ @gift_card = gift_card
1896
+ @type = type
1897
+ end
1898
+ end
1899
+
1900
+ class Discount < Stripe::RequestParams
1901
+ # ID of the coupon to create a new discount for.
1902
+ attr_accessor :coupon
1903
+
1904
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1905
+ attr_accessor :discount
1906
+
1907
+ # ID of the promotion code to create a new discount for.
1908
+ attr_accessor :promotion_code
1909
+
1910
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
1911
+ @coupon = coupon
1912
+ @discount = discount
1913
+ @promotion_code = promotion_code
1914
+ end
1915
+ end
1916
+
1917
+ class LineItem < Stripe::RequestParams
1918
+ class Discount < Stripe::RequestParams
1919
+ # ID of the coupon to create a new discount for.
1920
+ attr_accessor :coupon
1921
+
1922
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1923
+ attr_accessor :discount
1924
+
1925
+ def initialize(coupon: nil, discount: nil)
1926
+ @coupon = coupon
1927
+ @discount = discount
1928
+ end
1929
+ end
1930
+
1931
+ class PriceData < Stripe::RequestParams
1932
+ # 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).
1933
+ attr_accessor :currency
1934
+
1935
+ # ID of the product this price belongs to.
1936
+ #
1937
+ # Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specified.
1938
+ attr_accessor :product
1939
+
1940
+ # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
1941
+ attr_accessor :tax_behavior
1942
+
1943
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
1944
+ attr_accessor :unit_amount
1945
+
1946
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
1947
+ attr_accessor :unit_amount_decimal
1948
+
1949
+ def initialize(
1950
+ currency: nil,
1951
+ product: nil,
1952
+ tax_behavior: nil,
1953
+ unit_amount: nil,
1954
+ unit_amount_decimal: nil
1955
+ )
1956
+ @currency = currency
1957
+ @product = product
1958
+ @tax_behavior = tax_behavior
1959
+ @unit_amount = unit_amount
1960
+ @unit_amount_decimal = unit_amount_decimal
1961
+ end
1962
+ end
1963
+
1964
+ class ProductData < Stripe::RequestParams
1965
+ class PackageDimensions < Stripe::RequestParams
1966
+ # Height, in inches. Maximum precision is 2 decimal places.
1967
+ attr_accessor :height
1968
+
1969
+ # Length, in inches. Maximum precision is 2 decimal places.
1970
+ attr_accessor :length
1971
+
1972
+ # Weight, in ounces. Maximum precision is 2 decimal places.
1973
+ attr_accessor :weight
1974
+
1975
+ # Width, in inches. Maximum precision is 2 decimal places.
1976
+ attr_accessor :width
1977
+
1978
+ def initialize(height: nil, length: nil, weight: nil, width: nil)
1979
+ @height = height
1980
+ @length = length
1981
+ @weight = weight
1982
+ @width = width
1983
+ end
1984
+ end
1985
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
1986
+ attr_accessor :description
1987
+
1988
+ # A unique identifier for this product.
1989
+ #
1990
+ # `product_data` automatically creates a Product with this ID. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. If any of the fields in the existing Product are different from the values in `product_data`, `product_data` updates the existing Product with the new information. So set `product_data[id]` to the same string every time you sell the same product, but don't re-use the same string for different products.
1991
+ attr_accessor :id
1992
+
1993
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
1994
+ attr_accessor :images
1995
+
1996
+ # 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`.
1997
+ attr_accessor :metadata
1998
+
1999
+ # The product's name, meant to be displayable to the customer.
2000
+ attr_accessor :name
2001
+
2002
+ # The dimensions of this product for shipping purposes.
2003
+ attr_accessor :package_dimensions
2004
+
2005
+ # Whether this product is shipped (i.e., physical goods).
2006
+ attr_accessor :shippable
2007
+
2008
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
2009
+ attr_accessor :tax_code
2010
+
2011
+ # A URL of a publicly-accessible webpage for this product.
2012
+ attr_accessor :url
2013
+
2014
+ def initialize(
2015
+ description: nil,
2016
+ id: nil,
2017
+ images: nil,
2018
+ metadata: nil,
2019
+ name: nil,
2020
+ package_dimensions: nil,
2021
+ shippable: nil,
2022
+ tax_code: nil,
2023
+ url: nil
2024
+ )
2025
+ @description = description
2026
+ @id = id
2027
+ @images = images
2028
+ @metadata = metadata
2029
+ @name = name
2030
+ @package_dimensions = package_dimensions
2031
+ @shippable = shippable
2032
+ @tax_code = tax_code
2033
+ @url = url
2034
+ end
2035
+ end
2036
+ # The description for the line item. Will default to the name of the associated product.
2037
+ attr_accessor :description
2038
+
2039
+ # The discounts applied to this line item.
2040
+ attr_accessor :discounts
2041
+
2042
+ # The ID of an existing line item on the order.
2043
+ attr_accessor :id
2044
+
2045
+ # The ID of a [Price](https://stripe.com/docs/api/prices) to add to the Order.
2046
+ #
2047
+ # The `price` parameter is an alternative to using the `product` parameter. If each of your products are sold at a single price, you can set `Product.default_price` and then pass the `product` parameter when creating a line item. If your products are sold at several possible prices, use the `price` parameter to explicitly specify which one to use.
2048
+ attr_accessor :price
2049
+
2050
+ # Data used to generate a new Price object inline.
2051
+ #
2052
+ # The `price_data` parameter is an alternative to using the `product` or `price` parameters. If you create products upfront and configure a `Product.default_price`, pass the `product` parameter when creating a line item. If you prefer not to define products upfront, or if you charge variable prices, pass the `price_data` parameter to describe the price for this line item.
2053
+ #
2054
+ # Each time you pass `price_data` we create a Price for the product. This Price is hidden in both the Dashboard and API lists and cannot be reused.
2055
+ attr_accessor :price_data
2056
+
2057
+ # The ID of a [Product](https://stripe.com/docs/api/products) to add to the Order.
2058
+ #
2059
+ # The product must have a `default_price` specified. Otherwise, specify the price by passing the `price` or `price_data` parameter.
2060
+ attr_accessor :product
2061
+
2062
+ # Defines a Product inline and adds it to the Order.
2063
+ #
2064
+ # `product_data` is an alternative to the `product` parameter. If you created a Product upfront, use the `product` parameter to refer to the existing Product. But if you prefer not to create Products upfront, pass the `product_data` parameter to define a Product inline as part of configuring the Order.
2065
+ #
2066
+ # `product_data` automatically creates a Product, just as if you had manually created the Product. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates.
2067
+ attr_accessor :product_data
2068
+
2069
+ # The quantity of the line item.
2070
+ attr_accessor :quantity
2071
+
2072
+ # The tax rates applied to this line item.
2073
+ attr_accessor :tax_rates
2074
+
2075
+ def initialize(
2076
+ description: nil,
2077
+ discounts: nil,
2078
+ id: nil,
2079
+ price: nil,
2080
+ price_data: nil,
2081
+ product: nil,
2082
+ product_data: nil,
2083
+ quantity: nil,
2084
+ tax_rates: nil
2085
+ )
2086
+ @description = description
2087
+ @discounts = discounts
2088
+ @id = id
2089
+ @price = price
2090
+ @price_data = price_data
2091
+ @product = product
2092
+ @product_data = product_data
2093
+ @quantity = quantity
2094
+ @tax_rates = tax_rates
2095
+ end
2096
+ end
2097
+
2098
+ class Payment < Stripe::RequestParams
2099
+ class Settings < Stripe::RequestParams
2100
+ class PaymentMethodOptions < Stripe::RequestParams
2101
+ class AcssDebit < Stripe::RequestParams
2102
+ class MandateOptions < Stripe::RequestParams
2103
+ # A URL for custom mandate text to render during confirmation step.
2104
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
2105
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
2106
+ attr_accessor :custom_mandate_url
2107
+
2108
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
2109
+ attr_accessor :interval_description
2110
+
2111
+ # Payment schedule for the mandate.
2112
+ attr_accessor :payment_schedule
2113
+
2114
+ # Transaction type of the mandate.
2115
+ attr_accessor :transaction_type
2116
+
2117
+ def initialize(
2118
+ custom_mandate_url: nil,
2119
+ interval_description: nil,
2120
+ payment_schedule: nil,
2121
+ transaction_type: nil
2122
+ )
2123
+ @custom_mandate_url = custom_mandate_url
2124
+ @interval_description = interval_description
2125
+ @payment_schedule = payment_schedule
2126
+ @transaction_type = transaction_type
2127
+ end
2128
+ end
2129
+ # Additional fields for Mandate creation
2130
+ attr_accessor :mandate_options
2131
+
2132
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2133
+ #
2134
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2135
+ #
2136
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2137
+ #
2138
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2139
+ #
2140
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
2141
+ attr_accessor :setup_future_usage
2142
+
2143
+ # Bank account verification method.
2144
+ attr_accessor :verification_method
2145
+
2146
+ def initialize(
2147
+ mandate_options: nil,
2148
+ setup_future_usage: nil,
2149
+ verification_method: nil
2150
+ )
2151
+ @mandate_options = mandate_options
2152
+ @setup_future_usage = setup_future_usage
2153
+ @verification_method = verification_method
2154
+ end
2155
+ end
2156
+
2157
+ class AfterpayClearpay < Stripe::RequestParams
2158
+ # Controls when the funds are captured from the customer's account.
2159
+ #
2160
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
2161
+ #
2162
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
2163
+ attr_accessor :capture_method
2164
+
2165
+ # An internal identifier or reference this payment corresponds to. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes.
2166
+ attr_accessor :reference
2167
+
2168
+ # Indicates that you intend to make future payments with the payment method.
2169
+ #
2170
+ # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
2171
+ #
2172
+ # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
2173
+ #
2174
+ # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
2175
+ attr_accessor :setup_future_usage
2176
+
2177
+ def initialize(capture_method: nil, reference: nil, setup_future_usage: nil)
2178
+ @capture_method = capture_method
2179
+ @reference = reference
2180
+ @setup_future_usage = setup_future_usage
2181
+ end
2182
+ end
2183
+
2184
+ class Alipay < Stripe::RequestParams
2185
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2186
+ #
2187
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2188
+ #
2189
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2190
+ #
2191
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2192
+ #
2193
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
2194
+ attr_accessor :setup_future_usage
2195
+
2196
+ def initialize(setup_future_usage: nil)
2197
+ @setup_future_usage = setup_future_usage
2198
+ end
2199
+ end
2200
+
2201
+ class Bancontact < Stripe::RequestParams
2202
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
2203
+ attr_accessor :preferred_language
2204
+
2205
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2206
+ #
2207
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2208
+ #
2209
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2210
+ #
2211
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2212
+ #
2213
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
2214
+ attr_accessor :setup_future_usage
2215
+
2216
+ def initialize(preferred_language: nil, setup_future_usage: nil)
2217
+ @preferred_language = preferred_language
2218
+ @setup_future_usage = setup_future_usage
2219
+ end
2220
+ end
2221
+
2222
+ class Card < Stripe::RequestParams
2223
+ # Controls when the funds will be captured from the customer's account.
2224
+ attr_accessor :capture_method
2225
+
2226
+ # Indicates that you intend to make future payments with the payment method.
2227
+ #
2228
+ # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
2229
+ #
2230
+ # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
2231
+ #
2232
+ # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
2233
+ attr_accessor :setup_future_usage
2234
+
2235
+ def initialize(capture_method: nil, setup_future_usage: nil)
2236
+ @capture_method = capture_method
2237
+ @setup_future_usage = setup_future_usage
2238
+ end
2239
+ end
2240
+
2241
+ class CustomerBalance < Stripe::RequestParams
2242
+ class BankTransfer < Stripe::RequestParams
2243
+ class EuBankTransfer < Stripe::RequestParams
2244
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
2245
+ attr_accessor :country
2246
+
2247
+ def initialize(country: nil)
2248
+ @country = country
2249
+ end
2250
+ end
2251
+ # Configuration for the eu_bank_transfer funding type.
2252
+ attr_accessor :eu_bank_transfer
2253
+
2254
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
2255
+ #
2256
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
2257
+ attr_accessor :requested_address_types
2258
+
2259
+ # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
2260
+ attr_accessor :type
2261
+
2262
+ def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil)
2263
+ @eu_bank_transfer = eu_bank_transfer
2264
+ @requested_address_types = requested_address_types
2265
+ @type = type
2266
+ end
2267
+ end
2268
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
2269
+ attr_accessor :bank_transfer
2270
+
2271
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
2272
+ attr_accessor :funding_type
2273
+
2274
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2275
+ #
2276
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2277
+ #
2278
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2279
+ #
2280
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2281
+ #
2282
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
2283
+ attr_accessor :setup_future_usage
2284
+
2285
+ def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil)
2286
+ @bank_transfer = bank_transfer
2287
+ @funding_type = funding_type
2288
+ @setup_future_usage = setup_future_usage
2289
+ end
2290
+ end
2291
+
2292
+ class Ideal < Stripe::RequestParams
2293
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2294
+ #
2295
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2296
+ #
2297
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2298
+ #
2299
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2300
+ #
2301
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
2302
+ attr_accessor :setup_future_usage
2303
+
2304
+ def initialize(setup_future_usage: nil)
2305
+ @setup_future_usage = setup_future_usage
2306
+ end
2307
+ end
2308
+
2309
+ class Klarna < Stripe::RequestParams
2310
+ # Controls when the funds are captured from the customer's account.
2311
+ #
2312
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
2313
+ #
2314
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
2315
+ attr_accessor :capture_method
2316
+
2317
+ # Preferred language of the Klarna authorization page that the customer is redirected to
2318
+ attr_accessor :preferred_locale
2319
+
2320
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2321
+ #
2322
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2323
+ #
2324
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2325
+ #
2326
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2327
+ #
2328
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
2329
+ attr_accessor :setup_future_usage
2330
+
2331
+ def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil)
2332
+ @capture_method = capture_method
2333
+ @preferred_locale = preferred_locale
2334
+ @setup_future_usage = setup_future_usage
2335
+ end
2336
+ end
2337
+
2338
+ class Link < Stripe::RequestParams
2339
+ # Controls when the funds are captured from the customer's account.
2340
+ #
2341
+ # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
2342
+ #
2343
+ # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
2344
+ attr_accessor :capture_method
2345
+
2346
+ # [Deprecated] This is a legacy parameter that no longer has any function.
2347
+ attr_accessor :persistent_token
2348
+
2349
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2350
+ #
2351
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2352
+ #
2353
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2354
+ #
2355
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2356
+ #
2357
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
2358
+ attr_accessor :setup_future_usage
2359
+
2360
+ def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil)
2361
+ @capture_method = capture_method
2362
+ @persistent_token = persistent_token
2363
+ @setup_future_usage = setup_future_usage
2364
+ end
2365
+ end
2366
+
2367
+ class Oxxo < Stripe::RequestParams
2368
+ # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
2369
+ attr_accessor :expires_after_days
2370
+
2371
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2372
+ #
2373
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2374
+ #
2375
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2376
+ #
2377
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2378
+ #
2379
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
2380
+ attr_accessor :setup_future_usage
2381
+
2382
+ def initialize(expires_after_days: nil, setup_future_usage: nil)
2383
+ @expires_after_days = expires_after_days
2384
+ @setup_future_usage = setup_future_usage
2385
+ end
2386
+ end
2387
+
2388
+ class P24 < Stripe::RequestParams
2389
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2390
+ #
2391
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2392
+ #
2393
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2394
+ #
2395
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2396
+ #
2397
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
2398
+ attr_accessor :setup_future_usage
2399
+
2400
+ # Confirm that the payer has accepted the P24 terms and conditions.
2401
+ attr_accessor :tos_shown_and_accepted
2402
+
2403
+ def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil)
2404
+ @setup_future_usage = setup_future_usage
2405
+ @tos_shown_and_accepted = tos_shown_and_accepted
2406
+ end
2407
+ end
2408
+
2409
+ class Paypal < Stripe::RequestParams
2410
+ class LineItem < Stripe::RequestParams
2411
+ class Tax < Stripe::RequestParams
2412
+ # The tax for a single unit of the line item in minor units. Cannot be a negative number.
2413
+ attr_accessor :amount
2414
+
2415
+ # The tax behavior for the line item.
2416
+ attr_accessor :behavior
2417
+
2418
+ def initialize(amount: nil, behavior: nil)
2419
+ @amount = amount
2420
+ @behavior = behavior
2421
+ end
2422
+ end
2423
+ # Type of the line item.
2424
+ attr_accessor :category
2425
+
2426
+ # Description of the line item.
2427
+ attr_accessor :description
2428
+
2429
+ # Descriptive name of the line item.
2430
+ attr_accessor :name
2431
+
2432
+ # Quantity of the line item. Must be a positive number.
2433
+ attr_accessor :quantity
2434
+
2435
+ # Client facing stock keeping unit, article number or similar.
2436
+ attr_accessor :sku
2437
+
2438
+ # The Stripe account ID of the connected account that sells the item.
2439
+ attr_accessor :sold_by
2440
+
2441
+ # The tax information for the line item.
2442
+ attr_accessor :tax
2443
+
2444
+ # Price for a single unit of the line item in minor units. Cannot be a negative number.
2445
+ attr_accessor :unit_amount
2446
+
2447
+ def initialize(
2448
+ category: nil,
2449
+ description: nil,
2450
+ name: nil,
2451
+ quantity: nil,
2452
+ sku: nil,
2453
+ sold_by: nil,
2454
+ tax: nil,
2455
+ unit_amount: nil
2456
+ )
2457
+ @category = category
2458
+ @description = description
2459
+ @name = name
2460
+ @quantity = quantity
2461
+ @sku = sku
2462
+ @sold_by = sold_by
2463
+ @tax = tax
2464
+ @unit_amount = unit_amount
2465
+ end
2466
+ end
2467
+ # Controls when the funds will be captured from the customer's account.
2468
+ attr_accessor :capture_method
2469
+
2470
+ # The line items purchased by the customer.
2471
+ attr_accessor :line_items
2472
+
2473
+ # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to.
2474
+ attr_accessor :preferred_locale
2475
+
2476
+ # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
2477
+ attr_accessor :reference
2478
+
2479
+ # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
2480
+ attr_accessor :reference_id
2481
+
2482
+ # The risk correlation ID for an on-session payment using a saved PayPal payment method.
2483
+ attr_accessor :risk_correlation_id
2484
+
2485
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2486
+ #
2487
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2488
+ #
2489
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2490
+ #
2491
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2492
+ #
2493
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
2494
+ attr_accessor :setup_future_usage
2495
+
2496
+ # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used.
2497
+ attr_accessor :subsellers
2498
+
2499
+ def initialize(
2500
+ capture_method: nil,
2501
+ line_items: nil,
2502
+ preferred_locale: nil,
2503
+ reference: nil,
2504
+ reference_id: nil,
2505
+ risk_correlation_id: nil,
2506
+ setup_future_usage: nil,
2507
+ subsellers: nil
2508
+ )
2509
+ @capture_method = capture_method
2510
+ @line_items = line_items
2511
+ @preferred_locale = preferred_locale
2512
+ @reference = reference
2513
+ @reference_id = reference_id
2514
+ @risk_correlation_id = risk_correlation_id
2515
+ @setup_future_usage = setup_future_usage
2516
+ @subsellers = subsellers
2517
+ end
2518
+ end
2519
+
2520
+ class SepaDebit < Stripe::RequestParams
2521
+ class MandateOptions < Stripe::RequestParams
2522
+ # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
2523
+ attr_accessor :reference_prefix
2524
+
2525
+ def initialize(reference_prefix: nil)
2526
+ @reference_prefix = reference_prefix
2527
+ end
2528
+ end
2529
+ # Additional fields for Mandate creation
2530
+ attr_accessor :mandate_options
2531
+
2532
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2533
+ #
2534
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2535
+ #
2536
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2537
+ #
2538
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2539
+ #
2540
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
2541
+ attr_accessor :setup_future_usage
2542
+
2543
+ def initialize(mandate_options: nil, setup_future_usage: nil)
2544
+ @mandate_options = mandate_options
2545
+ @setup_future_usage = setup_future_usage
2546
+ end
2547
+ end
2548
+
2549
+ class Sofort < Stripe::RequestParams
2550
+ # Language shown to the payer on redirect.
2551
+ attr_accessor :preferred_language
2552
+
2553
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2554
+ #
2555
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2556
+ #
2557
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2558
+ #
2559
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2560
+ #
2561
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
2562
+ attr_accessor :setup_future_usage
2563
+
2564
+ def initialize(preferred_language: nil, setup_future_usage: nil)
2565
+ @preferred_language = preferred_language
2566
+ @setup_future_usage = setup_future_usage
2567
+ end
2568
+ end
2569
+
2570
+ class WechatPay < Stripe::RequestParams
2571
+ # The app ID registered with WeChat Pay. Only required when client is ios or android.
2572
+ attr_accessor :app_id
2573
+
2574
+ # The client type that the end customer will pay from
2575
+ attr_accessor :client
2576
+
2577
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2578
+ #
2579
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2580
+ #
2581
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2582
+ #
2583
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2584
+ #
2585
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
2586
+ attr_accessor :setup_future_usage
2587
+
2588
+ def initialize(app_id: nil, client: nil, setup_future_usage: nil)
2589
+ @app_id = app_id
2590
+ @client = client
2591
+ @setup_future_usage = setup_future_usage
2592
+ end
2593
+ end
2594
+ # If paying by `acss_debit`, this sub-hash contains details about the ACSS Debit payment method options to pass to the order's PaymentIntent.
2595
+ attr_accessor :acss_debit
2596
+
2597
+ # If paying by `afterpay_clearpay`, this sub-hash contains details about the AfterpayClearpay payment method options to pass to the order's PaymentIntent.
2598
+ attr_accessor :afterpay_clearpay
2599
+
2600
+ # If paying by `alipay`, this sub-hash contains details about the Alipay payment method options to pass to the order's PaymentIntent.
2601
+ attr_accessor :alipay
2602
+
2603
+ # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the order's PaymentIntent.
2604
+ attr_accessor :bancontact
2605
+
2606
+ # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the order's PaymentIntent.
2607
+ attr_accessor :card
2608
+
2609
+ # If paying by `customer_balance`, this sub-hash contains details about the Customer Balance payment method options to pass to the order's PaymentIntent.
2610
+ attr_accessor :customer_balance
2611
+
2612
+ # If paying by `ideal`, this sub-hash contains details about the iDEAL payment method options to pass to the order's PaymentIntent.
2613
+ attr_accessor :ideal
2614
+
2615
+ # If paying by `klarna`, this sub-hash contains details about the Klarna payment method options to pass to the order's PaymentIntent.
2616
+ attr_accessor :klarna
2617
+
2618
+ # If paying by `link`, this sub-hash contains details about the Link payment method options to pass to the order's PaymentIntent.
2619
+ attr_accessor :link
2620
+
2621
+ # If paying by `oxxo`, this sub-hash contains details about the OXXO payment method options to pass to the order's PaymentIntent.
2622
+ attr_accessor :oxxo
2623
+
2624
+ # If paying by `p24`, this sub-hash contains details about the P24 payment method options to pass to the order's PaymentIntent.
2625
+ attr_accessor :p24
2626
+
2627
+ # If paying by `paypal`, this sub-hash contains details about the PayPal payment method options to pass to the order's PaymentIntent.
2628
+ attr_accessor :paypal
2629
+
2630
+ # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Debit payment method options to pass to the order's PaymentIntent.
2631
+ attr_accessor :sepa_debit
2632
+
2633
+ # If paying by `sofort`, this sub-hash contains details about the Sofort payment method options to pass to the order's PaymentIntent.
2634
+ attr_accessor :sofort
2635
+
2636
+ # If paying by `wechat_pay`, this sub-hash contains details about the WeChat Pay payment method options to pass to the order's PaymentIntent.
2637
+ attr_accessor :wechat_pay
2638
+
2639
+ def initialize(
2640
+ acss_debit: nil,
2641
+ afterpay_clearpay: nil,
2642
+ alipay: nil,
2643
+ bancontact: nil,
2644
+ card: nil,
2645
+ customer_balance: nil,
2646
+ ideal: nil,
2647
+ klarna: nil,
2648
+ link: nil,
2649
+ oxxo: nil,
2650
+ p24: nil,
2651
+ paypal: nil,
2652
+ sepa_debit: nil,
2653
+ sofort: nil,
2654
+ wechat_pay: nil
2655
+ )
2656
+ @acss_debit = acss_debit
2657
+ @afterpay_clearpay = afterpay_clearpay
2658
+ @alipay = alipay
2659
+ @bancontact = bancontact
2660
+ @card = card
2661
+ @customer_balance = customer_balance
2662
+ @ideal = ideal
2663
+ @klarna = klarna
2664
+ @link = link
2665
+ @oxxo = oxxo
2666
+ @p24 = p24
2667
+ @paypal = paypal
2668
+ @sepa_debit = sepa_debit
2669
+ @sofort = sofort
2670
+ @wechat_pay = wechat_pay
2671
+ end
2672
+ end
2673
+
2674
+ class TransferData < Stripe::RequestParams
2675
+ # The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
2676
+ attr_accessor :amount
2677
+
2678
+ # ID of the Connected account receiving the transfer.
2679
+ attr_accessor :destination
2680
+
2681
+ def initialize(amount: nil, destination: nil)
2682
+ @amount = amount
2683
+ @destination = destination
2684
+ end
2685
+ end
2686
+ # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account.
2687
+ attr_accessor :application_fee_amount
2688
+
2689
+ # PaymentMethod-specific configuration to provide to the order's PaymentIntent.
2690
+ attr_accessor :payment_method_options
2691
+
2692
+ # The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
2693
+ attr_accessor :payment_method_types
2694
+
2695
+ # The URL to redirect the customer to after they authenticate their payment.
2696
+ attr_accessor :return_url
2697
+
2698
+ # For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters.
2699
+ attr_accessor :statement_descriptor
2700
+
2701
+ # Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.
2702
+ attr_accessor :statement_descriptor_suffix
2703
+
2704
+ # Provides configuration for completing a transfer for the order after it is paid.
2705
+ attr_accessor :transfer_data
2706
+
2707
+ def initialize(
2708
+ application_fee_amount: nil,
2709
+ payment_method_options: nil,
2710
+ payment_method_types: nil,
2711
+ return_url: nil,
2712
+ statement_descriptor: nil,
2713
+ statement_descriptor_suffix: nil,
2714
+ transfer_data: nil
2715
+ )
2716
+ @application_fee_amount = application_fee_amount
2717
+ @payment_method_options = payment_method_options
2718
+ @payment_method_types = payment_method_types
2719
+ @return_url = return_url
2720
+ @statement_descriptor = statement_descriptor
2721
+ @statement_descriptor_suffix = statement_descriptor_suffix
2722
+ @transfer_data = transfer_data
2723
+ end
2724
+ end
2725
+ # Settings describing how the order should configure generated PaymentIntents.
2726
+ attr_accessor :settings
2727
+
2728
+ def initialize(settings: nil)
2729
+ @settings = settings
2730
+ end
2731
+ end
2732
+
2733
+ class ShippingCost < Stripe::RequestParams
2734
+ class ShippingRateData < Stripe::RequestParams
2735
+ class DeliveryEstimate < Stripe::RequestParams
2736
+ class Maximum < Stripe::RequestParams
2737
+ # A unit of time.
2738
+ attr_accessor :unit
2739
+
2740
+ # Must be greater than 0.
2741
+ attr_accessor :value
2742
+
2743
+ def initialize(unit: nil, value: nil)
2744
+ @unit = unit
2745
+ @value = value
2746
+ end
2747
+ end
2748
+
2749
+ class Minimum < Stripe::RequestParams
2750
+ # A unit of time.
2751
+ attr_accessor :unit
2752
+
2753
+ # Must be greater than 0.
2754
+ attr_accessor :value
2755
+
2756
+ def initialize(unit: nil, value: nil)
2757
+ @unit = unit
2758
+ @value = value
2759
+ end
2760
+ end
2761
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
2762
+ attr_accessor :maximum
2763
+
2764
+ # The lower bound of the estimated range. If empty, represents no lower bound.
2765
+ attr_accessor :minimum
2766
+
2767
+ def initialize(maximum: nil, minimum: nil)
2768
+ @maximum = maximum
2769
+ @minimum = minimum
2770
+ end
2771
+ end
2772
+
2773
+ class FixedAmount < Stripe::RequestParams
2774
+ class CurrencyOptions < Stripe::RequestParams
2775
+ # A non-negative integer in cents representing how much to charge.
2776
+ attr_accessor :amount
2777
+
2778
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
2779
+ attr_accessor :tax_behavior
2780
+
2781
+ def initialize(amount: nil, tax_behavior: nil)
2782
+ @amount = amount
2783
+ @tax_behavior = tax_behavior
2784
+ end
2785
+ end
2786
+ # A non-negative integer in cents representing how much to charge.
2787
+ attr_accessor :amount
2788
+
2789
+ # 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).
2790
+ attr_accessor :currency
2791
+
2792
+ # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
2793
+ attr_accessor :currency_options
2794
+
2795
+ def initialize(amount: nil, currency: nil, currency_options: nil)
2796
+ @amount = amount
2797
+ @currency = currency
2798
+ @currency_options = currency_options
2799
+ end
2800
+ end
2801
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
2802
+ attr_accessor :delivery_estimate
2803
+
2804
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
2805
+ attr_accessor :display_name
2806
+
2807
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
2808
+ attr_accessor :fixed_amount
2809
+
2810
+ # 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`.
2811
+ attr_accessor :metadata
2812
+
2813
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
2814
+ attr_accessor :tax_behavior
2815
+
2816
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
2817
+ attr_accessor :tax_code
2818
+
2819
+ # The type of calculation to use on the shipping rate.
2820
+ attr_accessor :type
2821
+
2822
+ def initialize(
2823
+ delivery_estimate: nil,
2824
+ display_name: nil,
2825
+ fixed_amount: nil,
2826
+ metadata: nil,
2827
+ tax_behavior: nil,
2828
+ tax_code: nil,
2829
+ type: nil
2830
+ )
2831
+ @delivery_estimate = delivery_estimate
2832
+ @display_name = display_name
2833
+ @fixed_amount = fixed_amount
2834
+ @metadata = metadata
2835
+ @tax_behavior = tax_behavior
2836
+ @tax_code = tax_code
2837
+ @type = type
2838
+ end
2839
+ end
2840
+ # The ID of the shipping rate to use for this order.
2841
+ attr_accessor :shipping_rate
2842
+
2843
+ # Parameters to create a new ad-hoc shipping rate for this order.
2844
+ attr_accessor :shipping_rate_data
2845
+
2846
+ def initialize(shipping_rate: nil, shipping_rate_data: nil)
2847
+ @shipping_rate = shipping_rate
2848
+ @shipping_rate_data = shipping_rate_data
2849
+ end
2850
+ end
2851
+
2852
+ class ShippingDetails < Stripe::RequestParams
2853
+ class Address < Stripe::RequestParams
2854
+ # City, district, suburb, town, or village.
2855
+ attr_accessor :city
2856
+
2857
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
2858
+ attr_accessor :country
2859
+
2860
+ # Address line 1 (e.g., street, PO Box, or company name).
2861
+ attr_accessor :line1
2862
+
2863
+ # Address line 2 (e.g., apartment, suite, unit, or building).
2864
+ attr_accessor :line2
2865
+
2866
+ # ZIP or postal code.
2867
+ attr_accessor :postal_code
2868
+
2869
+ # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX".
2870
+ attr_accessor :state
2871
+
2872
+ def initialize(
2873
+ city: nil,
2874
+ country: nil,
2875
+ line1: nil,
2876
+ line2: nil,
2877
+ postal_code: nil,
2878
+ state: nil
2879
+ )
2880
+ @city = city
2881
+ @country = country
2882
+ @line1 = line1
2883
+ @line2 = line2
2884
+ @postal_code = postal_code
2885
+ @state = state
2886
+ end
2887
+ end
2888
+ # The shipping address for the order.
2889
+ attr_accessor :address
2890
+
2891
+ # The name of the recipient of the order.
2892
+ attr_accessor :name
2893
+
2894
+ # The phone number (including extension) for the recipient of the order.
2895
+ attr_accessor :phone
2896
+
2897
+ def initialize(address: nil, name: nil, phone: nil)
2898
+ @address = address
2899
+ @name = name
2900
+ @phone = phone
2901
+ end
2902
+ end
2903
+
2904
+ class TaxDetails < Stripe::RequestParams
2905
+ class TaxId < Stripe::RequestParams
2906
+ # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`
2907
+ attr_accessor :type
2908
+
2909
+ # Value of the tax ID.
2910
+ attr_accessor :value
2911
+
2912
+ def initialize(type: nil, value: nil)
2913
+ @type = type
2914
+ @value = value
2915
+ end
2916
+ end
2917
+ # The purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`.
2918
+ attr_accessor :tax_exempt
2919
+
2920
+ # The purchaser's tax IDs to be used for this order.
2921
+ attr_accessor :tax_ids
2922
+
2923
+ def initialize(tax_exempt: nil, tax_ids: nil)
2924
+ @tax_exempt = tax_exempt
2925
+ @tax_ids = tax_ids
2926
+ end
2927
+ end
2928
+ # Settings for automatic tax calculation for this order.
2929
+ attr_accessor :automatic_tax
2930
+
2931
+ # Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided.
2932
+ attr_accessor :billing_details
2933
+
2934
+ # The credits to apply to the order, only `gift_card` currently supported. Pass the empty string `""` to unset this field.
2935
+ attr_accessor :credits
2936
+
2937
+ # 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).
2938
+ attr_accessor :currency
2939
+
2940
+ # The customer associated with this order.
2941
+ attr_accessor :customer
2942
+
2943
+ # An arbitrary string attached to the object. Often useful for displaying to users.
2944
+ attr_accessor :description
2945
+
2946
+ # The coupons, promotion codes, and/or discounts to apply to the order. Pass the empty string `""` to unset this field.
2947
+ attr_accessor :discounts
2948
+
2949
+ # Specifies which fields in the response should be expanded.
2950
+ attr_accessor :expand
2951
+
2952
+ # The IP address of the purchaser for this order.
2953
+ attr_accessor :ip_address
2954
+
2955
+ # A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost.
2956
+ attr_accessor :line_items
2957
+
2958
+ # 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`.
2959
+ attr_accessor :metadata
2960
+
2961
+ # Payment information associated with the order, including payment settings.
2962
+ attr_accessor :payment
2963
+
2964
+ # Settings for the customer cost of shipping for this order.
2965
+ attr_accessor :shipping_cost
2966
+
2967
+ # Shipping details for the order.
2968
+ attr_accessor :shipping_details
2969
+
2970
+ # Additional tax details about the purchaser to be used for this order.
2971
+ attr_accessor :tax_details
2972
+
2973
+ def initialize(
2974
+ automatic_tax: nil,
2975
+ billing_details: nil,
2976
+ credits: nil,
2977
+ currency: nil,
2978
+ customer: nil,
2979
+ description: nil,
2980
+ discounts: nil,
2981
+ expand: nil,
2982
+ ip_address: nil,
2983
+ line_items: nil,
2984
+ metadata: nil,
2985
+ payment: nil,
2986
+ shipping_cost: nil,
2987
+ shipping_details: nil,
2988
+ tax_details: nil
2989
+ )
2990
+ @automatic_tax = automatic_tax
2991
+ @billing_details = billing_details
2992
+ @credits = credits
2993
+ @currency = currency
2994
+ @customer = customer
2995
+ @description = description
2996
+ @discounts = discounts
2997
+ @expand = expand
2998
+ @ip_address = ip_address
2999
+ @line_items = line_items
3000
+ @metadata = metadata
3001
+ @payment = payment
3002
+ @shipping_cost = shipping_cost
3003
+ @shipping_details = shipping_details
3004
+ @tax_details = tax_details
3005
+ end
3006
+ end
3007
+
3008
+ class ListLineItemsParams < Stripe::RequestParams
3009
+ # 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.
3010
+ attr_accessor :ending_before
3011
+
3012
+ # Specifies which fields in the response should be expanded.
3013
+ attr_accessor :expand
3014
+
3015
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
3016
+ attr_accessor :limit
3017
+
3018
+ # 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.
3019
+ attr_accessor :starting_after
3020
+
3021
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
3022
+ @ending_before = ending_before
3023
+ @expand = expand
3024
+ @limit = limit
3025
+ @starting_after = starting_after
3026
+ end
3027
+ end
3028
+
3029
+ class CancelParams < Stripe::RequestParams
3030
+ # Specifies which fields in the response should be expanded.
3031
+ attr_accessor :expand
3032
+
3033
+ def initialize(expand: nil)
3034
+ @expand = expand
3035
+ end
3036
+ end
3037
+
3038
+ class ReopenParams < Stripe::RequestParams
3039
+ # Specifies which fields in the response should be expanded.
3040
+ attr_accessor :expand
3041
+
3042
+ def initialize(expand: nil)
3043
+ @expand = expand
3044
+ end
3045
+ end
3046
+
3047
+ class SubmitParams < Stripe::RequestParams
3048
+ # Specifies which fields in the response should be expanded.
3049
+ attr_accessor :expand
3050
+
3051
+ # `expected_total` should always be set to the order's `amount_total` field. If they don't match, submitting the order will fail. This helps detect race conditions where something else concurrently modifies the order.
3052
+ attr_accessor :expected_total
3053
+
3054
+ def initialize(expand: nil, expected_total: nil)
3055
+ @expand = expand
3056
+ @expected_total = expected_total
3057
+ end
3058
+ end
3059
+ # Attribute for field amount_remaining
3060
+ attr_reader :amount_remaining
3061
+
3062
+ # Order cost before any discounts or taxes are applied. A positive integer representing the subtotal of the order 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).
3063
+ attr_reader :amount_subtotal
3064
+
3065
+ # Total order cost after discounts and taxes are applied. A positive integer representing the cost of the order 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). To submit an order, the total must be either 0 or at least $0.50 USD or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts).
3066
+ attr_reader :amount_total
3067
+
3068
+ # ID of the Connect application that created the Order, if any.
3069
+ attr_reader :application
3070
+
3071
+ # Attribute for field automatic_tax
3072
+ attr_reader :automatic_tax
3073
+
3074
+ # Customer billing details associated with the order.
3075
+ attr_reader :billing_details
3076
+
3077
+ # The client secret of this Order. Used for client-side retrieval using a publishable key.
3078
+ #
3079
+ # The client secret can be used to complete a payment for an Order from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
3080
+ #
3081
+ # Refer to our docs for [creating and processing an order](https://stripe.com/docs/orders-beta/create-and-process) to learn about how client_secret should be handled.
3082
+ attr_reader :client_secret
3083
+
3084
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
3085
+ attr_reader :created
3086
+
3087
+ # The credits applied to the Order. At most 10 credits can be applied to an Order.
3088
+ attr_reader :credits
3089
+
3090
+ # 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).
3091
+ attr_reader :currency
3092
+
3093
+ # The customer which this orders belongs to.
3094
+ attr_reader :customer
3095
+
3096
+ # An arbitrary string attached to the object. Often useful for displaying to users.
3097
+ attr_reader :description
3098
+
3099
+ # The discounts applied to the order. Use `expand[]=discounts` to expand each discount.
3100
+ attr_reader :discounts
3101
+
3102
+ # Unique identifier for the object.
3103
+ attr_reader :id
3104
+
3105
+ # A recent IP address of the purchaser used for tax reporting and tax location inference.
3106
+ attr_reader :ip_address
3107
+
3108
+ # A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. There is a maximum of 100 line items.
3109
+ attr_reader :line_items
3110
+
3111
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
3112
+ attr_reader :livemode
3113
+
3114
+ # 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.
3115
+ attr_reader :metadata
3116
+
3117
+ # String representing the object's type. Objects of the same type share the same value.
3118
+ attr_reader :object
3119
+
3120
+ # Attribute for field payment
3121
+ attr_reader :payment
3122
+
3123
+ # The details of the customer cost of shipping, including the customer chosen ShippingRate.
3124
+ attr_reader :shipping_cost
3125
+
3126
+ # Customer shipping information associated with the order.
3127
+ attr_reader :shipping_details
3128
+
3129
+ # The overall status of the order.
3130
+ attr_reader :status
3131
+
3132
+ # Attribute for field tax_details
3133
+ attr_reader :tax_details
3134
+
3135
+ # Attribute for field total_details
3136
+ attr_reader :total_details
3137
+
3138
+ # Cancels the order as well as the payment intent if one is attached.
3139
+ def cancel(params = {}, opts = {})
3140
+ request_stripe_object(
3141
+ method: :post,
3142
+ path: format("/v1/orders/%<id>s/cancel", { id: CGI.escape(self["id"]) }),
3143
+ params: params,
3144
+ opts: opts
3145
+ )
3146
+ end
3147
+
3148
+ # Cancels the order as well as the payment intent if one is attached.
3149
+ def self.cancel(id, params = {}, opts = {})
3150
+ request_stripe_object(
3151
+ method: :post,
3152
+ path: format("/v1/orders/%<id>s/cancel", { id: CGI.escape(id) }),
3153
+ params: params,
3154
+ opts: opts
3155
+ )
3156
+ end
3157
+
3158
+ # Creates a new open order object.
3159
+ def self.create(params = {}, opts = {})
3160
+ request_stripe_object(method: :post, path: "/v1/orders", params: params, opts: opts)
3161
+ end
3162
+
3163
+ # Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first.
3164
+ def self.list(params = {}, opts = {})
3165
+ request_stripe_object(method: :get, path: "/v1/orders", params: params, opts: opts)
3166
+ end
3167
+
3168
+ # When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
3169
+ def list_line_items(params = {}, opts = {})
3170
+ request_stripe_object(
3171
+ method: :get,
3172
+ path: format("/v1/orders/%<id>s/line_items", { id: CGI.escape(self["id"]) }),
3173
+ params: params,
3174
+ opts: opts
3175
+ )
3176
+ end
3177
+
3178
+ # When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
3179
+ def self.list_line_items(id, params = {}, opts = {})
3180
+ request_stripe_object(
3181
+ method: :get,
3182
+ path: format("/v1/orders/%<id>s/line_items", { id: CGI.escape(id) }),
3183
+ params: params,
3184
+ opts: opts
3185
+ )
3186
+ end
3187
+
3188
+ # Reopens a submitted order.
3189
+ def reopen(params = {}, opts = {})
3190
+ request_stripe_object(
3191
+ method: :post,
3192
+ path: format("/v1/orders/%<id>s/reopen", { id: CGI.escape(self["id"]) }),
3193
+ params: params,
3194
+ opts: opts
3195
+ )
3196
+ end
3197
+
3198
+ # Reopens a submitted order.
3199
+ def self.reopen(id, params = {}, opts = {})
3200
+ request_stripe_object(
3201
+ method: :post,
3202
+ path: format("/v1/orders/%<id>s/reopen", { id: CGI.escape(id) }),
3203
+ params: params,
3204
+ opts: opts
3205
+ )
3206
+ end
3207
+
3208
+ # Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the [reopen](https://stripe.com/docs/api#reopen_order) method is called.
3209
+ def submit(params = {}, opts = {})
3210
+ request_stripe_object(
3211
+ method: :post,
3212
+ path: format("/v1/orders/%<id>s/submit", { id: CGI.escape(self["id"]) }),
3213
+ params: params,
3214
+ opts: opts
3215
+ )
3216
+ end
3217
+
3218
+ # Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the [reopen](https://stripe.com/docs/api#reopen_order) method is called.
3219
+ def self.submit(id, params = {}, opts = {})
3220
+ request_stripe_object(
3221
+ method: :post,
3222
+ path: format("/v1/orders/%<id>s/submit", { id: CGI.escape(id) }),
3223
+ params: params,
3224
+ opts: opts
3225
+ )
3226
+ end
3227
+
3228
+ # Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
3229
+ def self.update(id, params = {}, opts = {})
3230
+ request_stripe_object(
3231
+ method: :post,
3232
+ path: format("/v1/orders/%<id>s", { id: CGI.escape(id) }),
3233
+ params: params,
3234
+ opts: opts
3235
+ )
3236
+ end
3237
+ end
3238
+ end