stripe 13.5.0 → 13.6.0.pre.beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (744) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1459 -671
  3. data/Gemfile +4 -0
  4. data/OPENAPI_VERSION +1 -1
  5. data/VERSION +1 -1
  6. data/lib/stripe/api_operations/request.rb +1 -0
  7. data/lib/stripe/api_requestor.rb +1 -0
  8. data/lib/stripe/object_types.rb +32 -0
  9. data/lib/stripe/request_params.rb +24 -0
  10. data/lib/stripe/request_signing_authenticator.rb +79 -0
  11. data/lib/stripe/resources/account.rb +5165 -0
  12. data/lib/stripe/resources/account_link.rb +54 -0
  13. data/lib/stripe/resources/account_notice.rb +132 -0
  14. data/lib/stripe/resources/account_session.rb +985 -0
  15. data/lib/stripe/resources/apple_pay_domain.rb +63 -0
  16. data/lib/stripe/resources/application.rb +20 -0
  17. data/lib/stripe/resources/application_fee.rb +96 -0
  18. data/lib/stripe/resources/application_fee_refund.rb +17 -0
  19. data/lib/stripe/resources/apps/secret.rb +141 -0
  20. data/lib/stripe/resources/balance.rb +131 -0
  21. data/lib/stripe/resources/balance_transaction.rb +112 -0
  22. data/lib/stripe/resources/bank_account.rb +84 -2
  23. data/lib/stripe/resources/billing/alert.rb +144 -0
  24. data/lib/stripe/resources/billing/alert_triggered.rb +26 -0
  25. data/lib/stripe/resources/billing/credit_balance_summary.rb +88 -0
  26. data/lib/stripe/resources/billing/credit_balance_transaction.rb +116 -0
  27. data/lib/stripe/resources/billing/credit_grant.rb +226 -0
  28. data/lib/stripe/resources/billing/meter.rb +178 -0
  29. data/lib/stripe/resources/billing/meter_error_report.rb +59 -0
  30. data/lib/stripe/resources/billing/meter_event.rb +35 -0
  31. data/lib/stripe/resources/billing/meter_event_adjustment.rb +43 -0
  32. data/lib/stripe/resources/billing/meter_event_summary.rb +15 -0
  33. data/lib/stripe/resources/billing_portal/configuration.rb +562 -0
  34. data/lib/stripe/resources/billing_portal/session.rb +271 -0
  35. data/lib/stripe/resources/capability.rb +84 -0
  36. data/lib/stripe/resources/capital/financing_offer.rb +188 -0
  37. data/lib/stripe/resources/capital/financing_summary.rb +64 -0
  38. data/lib/stripe/resources/capital/financing_transaction.rb +123 -0
  39. data/lib/stripe/resources/card.rb +79 -0
  40. data/lib/stripe/resources/cash_balance.rb +17 -0
  41. data/lib/stripe/resources/charge.rb +3034 -0
  42. data/lib/stripe/resources/checkout/session.rb +3717 -0
  43. data/lib/stripe/resources/climate/order.rb +176 -0
  44. data/lib/stripe/resources/climate/product.rb +56 -0
  45. data/lib/stripe/resources/climate/supplier.rb +54 -0
  46. data/lib/stripe/resources/confirmation_token.rb +1530 -0
  47. data/lib/stripe/resources/connect_collection_transfer.rb +24 -0
  48. data/lib/stripe/resources/country_spec.rb +63 -0
  49. data/lib/stripe/resources/coupon.rb +198 -0
  50. data/lib/stripe/resources/credit_note.rb +660 -0
  51. data/lib/stripe/resources/credit_note_line_item.rb +65 -0
  52. data/lib/stripe/resources/customer.rb +840 -0
  53. data/lib/stripe/resources/customer_balance_transaction.rb +27 -0
  54. data/lib/stripe/resources/customer_cash_balance_transaction.rb +109 -0
  55. data/lib/stripe/resources/customer_session.rb +159 -0
  56. data/lib/stripe/resources/discount.rb +29 -0
  57. data/lib/stripe/resources/dispute.rb +619 -0
  58. data/lib/stripe/resources/entitlements/active_entitlement.rb +46 -0
  59. data/lib/stripe/resources/entitlements/active_entitlement_summary.rb +23 -0
  60. data/lib/stripe/resources/entitlements/feature.rb +90 -0
  61. data/lib/stripe/resources/ephemeral_key.rb +21 -0
  62. data/lib/stripe/resources/event.rb +130 -0
  63. data/lib/stripe/resources/exchange_rate.rb +33 -0
  64. data/lib/stripe/resources/file.rb +111 -0
  65. data/lib/stripe/resources/file_link.rb +112 -0
  66. data/lib/stripe/resources/financial_connections/account.rb +260 -0
  67. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +27 -0
  68. data/lib/stripe/resources/financial_connections/account_owner.rb +17 -0
  69. data/lib/stripe/resources/financial_connections/account_ownership.rb +9 -0
  70. data/lib/stripe/resources/financial_connections/institution.rb +99 -0
  71. data/lib/stripe/resources/financial_connections/session.rb +159 -0
  72. data/lib/stripe/resources/financial_connections/transaction.rb +101 -0
  73. data/lib/stripe/resources/forwarding/request.rb +165 -0
  74. data/lib/stripe/resources/funding_instructions.rb +308 -0
  75. data/lib/stripe/resources/gift_cards/card.rb +217 -0
  76. data/lib/stripe/resources/gift_cards/transaction.rb +281 -0
  77. data/lib/stripe/resources/identity/verification_report.rb +266 -0
  78. data/lib/stripe/resources/identity/verification_session.rb +361 -0
  79. data/lib/stripe/resources/invoice.rb +8078 -0
  80. data/lib/stripe/resources/invoice_item.rb +445 -0
  81. data/lib/stripe/resources/invoice_line_item.rb +333 -0
  82. data/lib/stripe/resources/invoice_payment.rb +56 -0
  83. data/lib/stripe/resources/invoice_rendering_template.rb +67 -0
  84. data/lib/stripe/resources/issuing/authorization.rb +1113 -0
  85. data/lib/stripe/resources/issuing/card.rb +666 -0
  86. data/lib/stripe/resources/issuing/cardholder.rb +658 -0
  87. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +611 -0
  88. data/lib/stripe/resources/issuing/dispute.rb +790 -0
  89. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +84 -0
  90. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +95 -0
  91. data/lib/stripe/resources/issuing/personalization_design.rb +285 -0
  92. data/lib/stripe/resources/issuing/physical_bundle.rb +63 -0
  93. data/lib/stripe/resources/issuing/settlement.rb +49 -0
  94. data/lib/stripe/resources/issuing/token.rb +175 -0
  95. data/lib/stripe/resources/issuing/transaction.rb +927 -0
  96. data/lib/stripe/resources/line_item.rb +75 -0
  97. data/lib/stripe/resources/login_link.rb +7 -0
  98. data/lib/stripe/resources/mandate.rb +169 -0
  99. data/lib/stripe/resources/margin.rb +124 -0
  100. data/lib/stripe/resources/order.rb +2868 -0
  101. data/lib/stripe/resources/payment_attempt_record.rb +184 -0
  102. data/lib/stripe/resources/payment_intent.rb +12983 -0
  103. data/lib/stripe/resources/payment_link.rb +1563 -0
  104. data/lib/stripe/resources/payment_method.rb +1655 -0
  105. data/lib/stripe/resources/payment_method_configuration.rb +2903 -0
  106. data/lib/stripe/resources/payment_method_domain.rb +153 -0
  107. data/lib/stripe/resources/payment_record.rb +715 -0
  108. data/lib/stripe/resources/payout.rb +218 -0
  109. data/lib/stripe/resources/person.rb +263 -0
  110. data/lib/stripe/resources/plan.rb +317 -0
  111. data/lib/stripe/resources/price.rb +649 -0
  112. data/lib/stripe/resources/product.rb +540 -0
  113. data/lib/stripe/resources/product_feature.rb +12 -0
  114. data/lib/stripe/resources/promotion_code.rb +221 -0
  115. data/lib/stripe/resources/quote.rb +2946 -0
  116. data/lib/stripe/resources/quote_line.rb +274 -0
  117. data/lib/stripe/resources/quote_preview_invoice.rb +652 -0
  118. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +362 -0
  119. data/lib/stripe/resources/radar/early_fraud_warning.rb +77 -0
  120. data/lib/stripe/resources/radar/value_list.rb +125 -0
  121. data/lib/stripe/resources/radar/value_list_item.rb +95 -0
  122. data/lib/stripe/resources/refund.rb +397 -0
  123. data/lib/stripe/resources/reporting/report_run.rb +150 -0
  124. data/lib/stripe/resources/reporting/report_type.rb +36 -0
  125. data/lib/stripe/resources/reserve_transaction.rb +22 -0
  126. data/lib/stripe/resources/reversal.rb +21 -0
  127. data/lib/stripe/resources/review.rb +108 -0
  128. data/lib/stripe/resources/setup_attempt.rb +373 -0
  129. data/lib/stripe/resources/setup_intent.rb +3855 -0
  130. data/lib/stripe/resources/shipping_rate.rb +259 -0
  131. data/lib/stripe/resources/sigma/scheduled_query_run.rb +54 -0
  132. data/lib/stripe/resources/source.rb +1239 -0
  133. data/lib/stripe/resources/source_mandate_notification.rb +66 -0
  134. data/lib/stripe/resources/source_transaction.rb +85 -0
  135. data/lib/stripe/resources/subscription.rb +2057 -0
  136. data/lib/stripe/resources/subscription_item.rb +433 -0
  137. data/lib/stripe/resources/subscription_schedule.rb +2402 -0
  138. data/lib/stripe/resources/tax/association.rb +89 -0
  139. data/lib/stripe/resources/tax/calculation.rb +387 -0
  140. data/lib/stripe/resources/tax/calculation_line_item.rb +56 -0
  141. data/lib/stripe/resources/tax/form.rb +220 -0
  142. data/lib/stripe/resources/tax/registration.rb +2382 -0
  143. data/lib/stripe/resources/tax/settings.rb +126 -0
  144. data/lib/stripe/resources/tax/transaction.rb +267 -0
  145. data/lib/stripe/resources/tax/transaction_line_item.rb +31 -0
  146. data/lib/stripe/resources/tax_code.rb +35 -0
  147. data/lib/stripe/resources/tax_deducted_at_source.rb +22 -0
  148. data/lib/stripe/resources/tax_id.rb +121 -0
  149. data/lib/stripe/resources/tax_rate.rb +200 -0
  150. data/lib/stripe/resources/terminal/configuration.rb +1060 -0
  151. data/lib/stripe/resources/terminal/connection_token.rb +18 -0
  152. data/lib/stripe/resources/terminal/location.rb +175 -0
  153. data/lib/stripe/resources/terminal/reader.rb +835 -0
  154. data/lib/stripe/resources/terminal/reader_collected_data.rb +40 -0
  155. data/lib/stripe/resources/test_helpers/test_clock.rb +86 -0
  156. data/lib/stripe/resources/token.rb +1168 -0
  157. data/lib/stripe/resources/topup.rb +174 -0
  158. data/lib/stripe/resources/transfer.rb +153 -0
  159. data/lib/stripe/resources/treasury/credit_reversal.rb +92 -0
  160. data/lib/stripe/resources/treasury/debit_reversal.rb +103 -0
  161. data/lib/stripe/resources/treasury/financial_account.rb +752 -0
  162. data/lib/stripe/resources/treasury/financial_account_features.rb +191 -0
  163. data/lib/stripe/resources/treasury/inbound_transfer.rb +235 -0
  164. data/lib/stripe/resources/treasury/outbound_payment.rb +495 -0
  165. data/lib/stripe/resources/treasury/outbound_transfer.rb +387 -0
  166. data/lib/stripe/resources/treasury/received_credit.rb +283 -0
  167. data/lib/stripe/resources/treasury/received_debit.rb +244 -0
  168. data/lib/stripe/resources/treasury/transaction.rb +176 -0
  169. data/lib/stripe/resources/treasury/transaction_entry.rb +157 -0
  170. data/lib/stripe/resources/usage_record.rb +13 -0
  171. data/lib/stripe/resources/usage_record_summary.rb +21 -0
  172. data/lib/stripe/resources/v2/amount.rb +9 -0
  173. data/lib/stripe/resources/v2/billing/meter_event.rb +18 -0
  174. data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +21 -0
  175. data/lib/stripe/resources/v2/billing/meter_event_session.rb +14 -0
  176. data/lib/stripe/resources/v2/event.rb +27 -0
  177. data/lib/stripe/resources/v2/event_destination.rb +59 -0
  178. data/lib/stripe/resources/webhook_endpoint.rb +122 -0
  179. data/lib/stripe/resources.rb +31 -0
  180. data/lib/stripe/services/account_capability_service.rb +32 -0
  181. data/lib/stripe/services/account_external_account_service.rb +250 -0
  182. data/lib/stripe/services/account_link_service.rb +46 -0
  183. data/lib/stripe/services/account_login_link_service.rb +9 -0
  184. data/lib/stripe/services/account_notice_service.rb +101 -0
  185. data/lib/stripe/services/account_person_service.rb +875 -0
  186. data/lib/stripe/services/account_service.rb +4441 -0
  187. data/lib/stripe/services/account_session_service.rb +700 -0
  188. data/lib/stripe/services/apple_pay_domain_service.rb +51 -0
  189. data/lib/stripe/services/application_fee_refund_service.rb +54 -0
  190. data/lib/stripe/services/application_fee_service.rb +57 -0
  191. data/lib/stripe/services/apps/secret_service.rb +116 -0
  192. data/lib/stripe/services/balance_service.rb +9 -0
  193. data/lib/stripe/services/balance_transaction_service.rb +69 -0
  194. data/lib/stripe/services/billing/alert_service.rb +113 -0
  195. data/lib/stripe/services/billing/credit_balance_summary_service.rb +48 -0
  196. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +40 -0
  197. data/lib/stripe/services/billing/credit_grant_service.rb +166 -0
  198. data/lib/stripe/services/billing/meter_event_adjustment_service.rb +26 -0
  199. data/lib/stripe/services/billing/meter_event_service.rb +21 -0
  200. data/lib/stripe/services/billing/meter_event_summary_service.rb +39 -0
  201. data/lib/stripe/services/billing/meter_service.rb +130 -0
  202. data/lib/stripe/services/billing_portal/configuration_service.rb +444 -0
  203. data/lib/stripe/services/billing_portal/session_service.rb +173 -0
  204. data/lib/stripe/services/capital/financing_offer_service.rb +112 -0
  205. data/lib/stripe/services/capital/financing_summary_service.rb +28 -0
  206. data/lib/stripe/services/capital/financing_transaction_service.rb +79 -0
  207. data/lib/stripe/services/capital_service.rb +15 -0
  208. data/lib/stripe/services/charge_service.rb +1736 -0
  209. data/lib/stripe/services/checkout/session_line_item_service.rb +18 -0
  210. data/lib/stripe/services/checkout/session_service.rb +2502 -0
  211. data/lib/stripe/services/climate/order_service.rb +102 -0
  212. data/lib/stripe/services/climate/product_service.rb +27 -0
  213. data/lib/stripe/services/climate/supplier_service.rb +27 -0
  214. data/lib/stripe/services/confirmation_token_service.rb +9 -0
  215. data/lib/stripe/services/country_spec_service.rb +27 -0
  216. data/lib/stripe/services/coupon_service.rb +152 -0
  217. data/lib/stripe/services/credit_note_line_item_service.rb +18 -0
  218. data/lib/stripe/services/credit_note_preview_lines_service.rb +156 -0
  219. data/lib/stripe/services/credit_note_service.rb +373 -0
  220. data/lib/stripe/services/customer_balance_transaction_service.rb +63 -0
  221. data/lib/stripe/services/customer_cash_balance_service.rb +29 -0
  222. data/lib/stripe/services/customer_cash_balance_transaction_service.rb +27 -0
  223. data/lib/stripe/services/customer_funding_instructions_service.rb +42 -0
  224. data/lib/stripe/services/customer_payment_method_service.rb +40 -0
  225. data/lib/stripe/services/customer_payment_source_service.rb +179 -0
  226. data/lib/stripe/services/customer_service.rb +593 -0
  227. data/lib/stripe/services/customer_session_service.rb +96 -0
  228. data/lib/stripe/services/customer_tax_id_service.rb +45 -0
  229. data/lib/stripe/services/dispute_service.rb +374 -0
  230. data/lib/stripe/services/entitlements/active_entitlement_service.rb +36 -0
  231. data/lib/stripe/services/entitlements/feature_service.rb +76 -0
  232. data/lib/stripe/services/ephemeral_key_service.rb +36 -0
  233. data/lib/stripe/services/event_service.rb +65 -0
  234. data/lib/stripe/services/exchange_rate_service.rb +27 -0
  235. data/lib/stripe/services/file_link_service.rb +94 -0
  236. data/lib/stripe/services/file_service.rb +89 -0
  237. data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +37 -0
  238. data/lib/stripe/services/financial_connections/account_owner_service.rb +27 -0
  239. data/lib/stripe/services/financial_connections/account_service.rb +99 -1
  240. data/lib/stripe/services/financial_connections/institution_service.rb +57 -0
  241. data/lib/stripe/services/financial_connections/session_service.rb +97 -0
  242. data/lib/stripe/services/financial_connections/transaction_service.rb +70 -0
  243. data/lib/stripe/services/financial_connections_service.rb +2 -1
  244. data/lib/stripe/services/forwarding/request_service.rb +106 -0
  245. data/lib/stripe/services/gift_cards/card_service.rb +170 -0
  246. data/lib/stripe/services/gift_cards/transaction_service.rb +209 -0
  247. data/lib/stripe/services/gift_cards_service.rb +14 -0
  248. data/lib/stripe/services/identity/verification_report_service.rb +65 -0
  249. data/lib/stripe/services/identity/verification_session_service.rb +231 -0
  250. data/lib/stripe/services/invoice_item_service.rb +388 -0
  251. data/lib/stripe/services/invoice_line_item_service.rb +237 -0
  252. data/lib/stripe/services/invoice_payment_service.rb +55 -0
  253. data/lib/stripe/services/invoice_rendering_template_service.rb +51 -0
  254. data/lib/stripe/services/invoice_service.rb +5567 -1
  255. data/lib/stripe/services/invoice_upcoming_lines_service.rb +1864 -0
  256. data/lib/stripe/services/issuing/authorization_service.rb +104 -0
  257. data/lib/stripe/services/issuing/card_service.rb +455 -0
  258. data/lib/stripe/services/issuing/cardholder_service.rb +526 -0
  259. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +504 -0
  260. data/lib/stripe/services/issuing/dispute_service.rb +633 -0
  261. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +66 -0
  262. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +83 -0
  263. data/lib/stripe/services/issuing/personalization_design_service.rb +193 -0
  264. data/lib/stripe/services/issuing/physical_bundle_service.rb +40 -0
  265. data/lib/stripe/services/issuing/token_service.rb +73 -0
  266. data/lib/stripe/services/issuing/transaction_service.rb +81 -0
  267. data/lib/stripe/services/issuing_service.rb +5 -1
  268. data/lib/stripe/services/mandate_service.rb +9 -0
  269. data/lib/stripe/services/margin_service.rb +119 -0
  270. data/lib/stripe/services/order_line_item_service.rb +35 -0
  271. data/lib/stripe/services/order_service.rb +2268 -0
  272. data/lib/stripe/services/payment_attempt_record_service.rb +49 -0
  273. data/lib/stripe/services/payment_intent_service.rb +10999 -0
  274. data/lib/stripe/services/payment_link_line_item_service.rb +18 -0
  275. data/lib/stripe/services/payment_link_service.rb +1223 -0
  276. data/lib/stripe/services/payment_method_configuration_service.rb +2088 -0
  277. data/lib/stripe/services/payment_method_domain_service.rb +76 -0
  278. data/lib/stripe/services/payment_method_service.rb +878 -0
  279. data/lib/stripe/services/payment_record_service.rb +542 -0
  280. data/lib/stripe/services/payout_service.rb +159 -0
  281. data/lib/stripe/services/plan_service.rb +253 -0
  282. data/lib/stripe/services/price_service.rb +516 -0
  283. data/lib/stripe/services/product_feature_service.rb +42 -0
  284. data/lib/stripe/services/product_service.rb +463 -0
  285. data/lib/stripe/services/promotion_code_service.rb +178 -0
  286. data/lib/stripe/services/quote_computed_upfront_line_items_service.rb +18 -0
  287. data/lib/stripe/services/quote_line_item_service.rb +18 -0
  288. data/lib/stripe/services/quote_line_service.rb +35 -0
  289. data/lib/stripe/services/quote_preview_invoice_service.rb +35 -0
  290. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +35 -0
  291. data/lib/stripe/services/quote_service.rb +2319 -1
  292. data/lib/stripe/services/radar/early_fraud_warning_service.rb +61 -0
  293. data/lib/stripe/services/radar/value_list_item_service.rb +79 -0
  294. data/lib/stripe/services/radar/value_list_service.rb +103 -0
  295. data/lib/stripe/services/refund_service.rb +137 -0
  296. data/lib/stripe/services/reporting/report_run_service.rb +106 -0
  297. data/lib/stripe/services/reporting/report_type_service.rb +18 -0
  298. data/lib/stripe/services/review_service.rb +56 -0
  299. data/lib/stripe/services/setup_attempt_service.rb +51 -0
  300. data/lib/stripe/services/setup_intent_service.rb +3497 -0
  301. data/lib/stripe/services/shipping_rate_service.rb +200 -0
  302. data/lib/stripe/services/sigma/scheduled_query_run_service.rb +27 -0
  303. data/lib/stripe/services/source_service.rb +601 -0
  304. data/lib/stripe/services/source_transaction_service.rb +18 -0
  305. data/lib/stripe/services/subscription_item_service.rb +383 -0
  306. data/lib/stripe/services/subscription_item_usage_record_service.rb +18 -0
  307. data/lib/stripe/services/subscription_item_usage_record_summary_service.rb +18 -0
  308. data/lib/stripe/services/subscription_schedule_service.rb +2053 -0
  309. data/lib/stripe/services/subscription_service.rb +1722 -0
  310. data/lib/stripe/services/tax/association_service.rb +31 -0
  311. data/lib/stripe/services/tax/calculation_line_item_service.rb +18 -0
  312. data/lib/stripe/services/tax/calculation_service.rb +205 -0
  313. data/lib/stripe/services/tax/form_service.rb +100 -0
  314. data/lib/stripe/services/tax/registration_service.rb +1564 -0
  315. data/lib/stripe/services/tax/settings_service.rb +74 -0
  316. data/lib/stripe/services/tax/transaction_line_item_service.rb +18 -0
  317. data/lib/stripe/services/tax/transaction_service.rb +111 -0
  318. data/lib/stripe/services/tax_code_service.rb +27 -0
  319. data/lib/stripe/services/tax_id_service.rb +79 -0
  320. data/lib/stripe/services/tax_rate_service.rb +155 -0
  321. data/lib/stripe/services/tax_service.rb +3 -1
  322. data/lib/stripe/services/terminal/configuration_service.rb +831 -0
  323. data/lib/stripe/services/terminal/connection_token_service.rb +12 -0
  324. data/lib/stripe/services/terminal/location_service.rb +144 -0
  325. data/lib/stripe/services/terminal/reader_collected_data_service.rb +28 -0
  326. data/lib/stripe/services/terminal/reader_service.rb +443 -0
  327. data/lib/stripe/services/terminal_service.rb +2 -1
  328. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +680 -0
  329. data/lib/stripe/services/test_helpers/customer_service.rb +18 -0
  330. data/lib/stripe/services/test_helpers/issuing/authorization_service.rb +745 -0
  331. data/lib/stripe/services/test_helpers/issuing/card_service.rb +45 -0
  332. data/lib/stripe/services/test_helpers/issuing/personalization_design_service.rb +41 -0
  333. data/lib/stripe/services/test_helpers/issuing/transaction_service.rb +632 -0
  334. data/lib/stripe/services/test_helpers/refund_service.rb +9 -0
  335. data/lib/stripe/services/test_helpers/terminal/reader_service.rb +87 -0
  336. data/lib/stripe/services/test_helpers/test_clock_service.rb +57 -0
  337. data/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb +38 -0
  338. data/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb +87 -0
  339. data/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb +87 -0
  340. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +84 -0
  341. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +84 -0
  342. data/lib/stripe/services/token_service.rb +1140 -0
  343. data/lib/stripe/services/topup_service.rb +142 -0
  344. data/lib/stripe/services/transfer_reversal_service.rb +66 -0
  345. data/lib/stripe/services/transfer_service.rb +119 -0
  346. data/lib/stripe/services/treasury/credit_reversal_service.rb +59 -0
  347. data/lib/stripe/services/treasury/debit_reversal_service.rb +63 -0
  348. data/lib/stripe/services/treasury/financial_account_features_service.rb +169 -0
  349. data/lib/stripe/services/treasury/financial_account_service.rb +498 -0
  350. data/lib/stripe/services/treasury/inbound_transfer_service.rb +88 -0
  351. data/lib/stripe/services/treasury/outbound_payment_service.rb +258 -0
  352. data/lib/stripe/services/treasury/outbound_transfer_service.rb +148 -0
  353. data/lib/stripe/services/treasury/received_credit_service.rb +52 -0
  354. data/lib/stripe/services/treasury/received_debit_service.rb +40 -0
  355. data/lib/stripe/services/treasury/transaction_entry_service.rb +87 -0
  356. data/lib/stripe/services/treasury/transaction_service.rb +95 -0
  357. data/lib/stripe/services/v1_services.rb +8 -1
  358. data/lib/stripe/services/v2/billing/meter_event_adjustment_service.rb +23 -0
  359. data/lib/stripe/services/v2/billing/meter_event_service.rb +25 -0
  360. data/lib/stripe/services/v2/billing/meter_event_session_service.rb +3 -0
  361. data/lib/stripe/services/v2/billing/meter_event_stream_service.rb +33 -0
  362. data/lib/stripe/services/v2/core/event_destination_service.rb +146 -0
  363. data/lib/stripe/services/v2/core/event_service.rb +18 -0
  364. data/lib/stripe/services/webhook_endpoint_service.rb +96 -0
  365. data/lib/stripe/services.rb +25 -0
  366. data/lib/stripe/stripe_client.rb +1 -1
  367. data/lib/stripe/stripe_configuration.rb +3 -1
  368. data/lib/stripe/stripe_object.rb +5 -0
  369. data/lib/stripe/util.rb +7 -1
  370. data/lib/stripe/version.rb +1 -1
  371. data/lib/stripe.rb +46 -0
  372. data/rbi/stripe/resources/account.rbi +5188 -0
  373. data/rbi/stripe/resources/account_link.rbi +74 -0
  374. data/rbi/stripe/resources/account_notice.rbi +139 -0
  375. data/rbi/stripe/resources/account_session.rbi +1143 -0
  376. data/rbi/stripe/resources/apple_pay_domain.rbi +97 -0
  377. data/rbi/stripe/resources/application.rbi +20 -0
  378. data/rbi/stripe/resources/application_fee.rbi +123 -0
  379. data/rbi/stripe/resources/application_fee_refund.rbi +37 -0
  380. data/rbi/stripe/resources/apps/secret.rbi +195 -0
  381. data/rbi/stripe/resources/balance.rbi +187 -0
  382. data/rbi/stripe/resources/balance_transaction.rbi +149 -0
  383. data/rbi/stripe/resources/bank_account.rbi +127 -0
  384. data/rbi/stripe/resources/billing/alert.rbi +206 -0
  385. data/rbi/stripe/resources/billing/alert_triggered.rbi +28 -0
  386. data/rbi/stripe/resources/billing/credit_balance_summary.rbi +116 -0
  387. data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +154 -0
  388. data/rbi/stripe/resources/billing/credit_grant.rbi +298 -0
  389. data/rbi/stripe/resources/billing/meter.rbi +233 -0
  390. data/rbi/stripe/resources/billing/meter_error_report.rbi +71 -0
  391. data/rbi/stripe/resources/billing/meter_event.rbi +64 -0
  392. data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +64 -0
  393. data/rbi/stripe/resources/billing/meter_event_summary.rbi +35 -0
  394. data/rbi/stripe/resources/billing_portal/configuration.rbi +640 -0
  395. data/rbi/stripe/resources/billing_portal/session.rbi +341 -0
  396. data/rbi/stripe/resources/capability.rbi +125 -0
  397. data/rbi/stripe/resources/capital/financing_offer.rbi +190 -0
  398. data/rbi/stripe/resources/capital/financing_summary.rbi +74 -0
  399. data/rbi/stripe/resources/capital/financing_transaction.rbi +130 -0
  400. data/rbi/stripe/resources/card.rbi +128 -0
  401. data/rbi/stripe/resources/cash_balance.rbi +32 -0
  402. data/rbi/stripe/resources/charge.rbi +3494 -0
  403. data/rbi/stripe/resources/checkout/session.rbi +4068 -0
  404. data/rbi/stripe/resources/climate/order.rbi +250 -0
  405. data/rbi/stripe/resources/climate/product.rbi +82 -0
  406. data/rbi/stripe/resources/climate/supplier.rbi +79 -0
  407. data/rbi/stripe/resources/confirmation_token.rbi +1787 -0
  408. data/rbi/stripe/resources/connect_collection_transfer.rbi +26 -0
  409. data/rbi/stripe/resources/country_spec.rbi +92 -0
  410. data/rbi/stripe/resources/coupon.rbi +257 -0
  411. data/rbi/stripe/resources/credit_note.rbi +759 -0
  412. data/rbi/stripe/resources/credit_note_line_item.rbi +99 -0
  413. data/rbi/stripe/resources/customer.rbi +1001 -0
  414. data/rbi/stripe/resources/customer_balance_transaction.rbi +53 -0
  415. data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +151 -0
  416. data/rbi/stripe/resources/customer_session.rbi +196 -0
  417. data/rbi/stripe/resources/discount.rbi +53 -0
  418. data/rbi/stripe/resources/dispute.rbi +764 -0
  419. data/rbi/stripe/resources/entitlements/active_entitlement.rbi +65 -0
  420. data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +23 -0
  421. data/rbi/stripe/resources/entitlements/feature.rbi +124 -0
  422. data/rbi/stripe/resources/ephemeral_key.rbi +44 -0
  423. data/rbi/stripe/resources/event.rbi +190 -0
  424. data/rbi/stripe/resources/exchange_rate.rbi +73 -0
  425. data/rbi/stripe/resources/file.rbi +148 -0
  426. data/rbi/stripe/resources/file_link.rbi +146 -0
  427. data/rbi/stripe/resources/financial_connections/account.rbi +358 -0
  428. data/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi +27 -0
  429. data/rbi/stripe/resources/financial_connections/account_owner.rbi +35 -0
  430. data/rbi/stripe/resources/financial_connections/account_ownership.rbi +23 -0
  431. data/rbi/stripe/resources/financial_connections/institution.rbi +99 -0
  432. data/rbi/stripe/resources/financial_connections/session.rbi +186 -0
  433. data/rbi/stripe/resources/financial_connections/transaction.rbi +127 -0
  434. data/rbi/stripe/resources/forwarding/request.rbi +219 -0
  435. data/rbi/stripe/resources/funding_instructions.rbi +437 -0
  436. data/rbi/stripe/resources/gift_cards/card.rbi +206 -0
  437. data/rbi/stripe/resources/gift_cards/transaction.rbi +257 -0
  438. data/rbi/stripe/resources/identity/verification_report.rbi +354 -0
  439. data/rbi/stripe/resources/identity/verification_session.rbi +518 -0
  440. data/rbi/stripe/resources/invoice.rbi +8928 -0
  441. data/rbi/stripe/resources/invoice_item.rbi +514 -0
  442. data/rbi/stripe/resources/invoice_line_item.rbi +497 -0
  443. data/rbi/stripe/resources/invoice_payment.rbi +70 -0
  444. data/rbi/stripe/resources/invoice_rendering_template.rbi +114 -0
  445. data/rbi/stripe/resources/issuing/authorization.rbi +1266 -0
  446. data/rbi/stripe/resources/issuing/card.rbi +738 -0
  447. data/rbi/stripe/resources/issuing/cardholder.rbi +732 -0
  448. data/rbi/stripe/resources/issuing/credit_underwriting_record.rbi +622 -0
  449. data/rbi/stripe/resources/issuing/dispute.rbi +900 -0
  450. data/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi +83 -0
  451. data/rbi/stripe/resources/issuing/fraud_liability_debit.rbi +90 -0
  452. data/rbi/stripe/resources/issuing/personalization_design.rbi +333 -0
  453. data/rbi/stripe/resources/issuing/physical_bundle.rbi +86 -0
  454. data/rbi/stripe/resources/issuing/settlement.rbi +62 -0
  455. data/rbi/stripe/resources/issuing/token.rbi +231 -0
  456. data/rbi/stripe/resources/issuing/transaction.rbi +1057 -0
  457. data/rbi/stripe/resources/line_item.rbi +108 -0
  458. data/rbi/stripe/resources/login_link.rbi +18 -0
  459. data/rbi/stripe/resources/mandate.rbi +219 -0
  460. data/rbi/stripe/resources/margin.rbi +127 -0
  461. data/rbi/stripe/resources/order.rbi +3036 -0
  462. data/rbi/stripe/resources/payment_attempt_record.rbi +215 -0
  463. data/rbi/stripe/resources/payment_intent.rbi +13961 -0
  464. data/rbi/stripe/resources/payment_link.rbi +1666 -0
  465. data/rbi/stripe/resources/payment_method.rbi +1926 -0
  466. data/rbi/stripe/resources/payment_method_configuration.rbi +3237 -0
  467. data/rbi/stripe/resources/payment_method_domain.rbi +217 -0
  468. data/rbi/stripe/resources/payment_record.rbi +722 -0
  469. data/rbi/stripe/resources/payout.rbi +299 -0
  470. data/rbi/stripe/resources/person.rbi +371 -0
  471. data/rbi/stripe/resources/plan.rbi +385 -0
  472. data/rbi/stripe/resources/price.rbi +731 -0
  473. data/rbi/stripe/resources/product.rbi +619 -0
  474. data/rbi/stripe/resources/product_feature.rbi +26 -0
  475. data/rbi/stripe/resources/promotion_code.rbi +266 -0
  476. data/rbi/stripe/resources/quote.rbi +3186 -0
  477. data/rbi/stripe/resources/quote_line.rbi +350 -0
  478. data/rbi/stripe/resources/quote_preview_invoice.rbi +850 -0
  479. data/rbi/stripe/resources/quote_preview_subscription_schedule.rbi +474 -0
  480. data/rbi/stripe/resources/radar/early_fraud_warning.rbi +101 -0
  481. data/rbi/stripe/resources/radar/value_list.rbi +175 -0
  482. data/rbi/stripe/resources/radar/value_list_item.rbi +134 -0
  483. data/rbi/stripe/resources/refund.rbi +515 -0
  484. data/rbi/stripe/resources/reporting/report_run.rbi +194 -0
  485. data/rbi/stripe/resources/reporting/report_type.rbi +64 -0
  486. data/rbi/stripe/resources/reserve_transaction.rbi +23 -0
  487. data/rbi/stripe/resources/reversal.rbi +51 -0
  488. data/rbi/stripe/resources/review.rbi +159 -0
  489. data/rbi/stripe/resources/setup_attempt.rbi +484 -0
  490. data/rbi/stripe/resources/setup_intent.rbi +4062 -0
  491. data/rbi/stripe/resources/shipping_rate.rbi +310 -0
  492. data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +82 -0
  493. data/rbi/stripe/resources/source.rbi +1543 -0
  494. data/rbi/stripe/resources/source_mandate_notification.rbi +77 -0
  495. data/rbi/stripe/resources/source_transaction.rbi +127 -0
  496. data/rbi/stripe/resources/subscription.rbi +2308 -0
  497. data/rbi/stripe/resources/subscription_item.rbi +478 -0
  498. data/rbi/stripe/resources/subscription_schedule.rbi +2653 -0
  499. data/rbi/stripe/resources/tax/association.rbi +94 -0
  500. data/rbi/stripe/resources/tax/calculation.rbi +479 -0
  501. data/rbi/stripe/resources/tax/calculation_line_item.rbi +88 -0
  502. data/rbi/stripe/resources/tax/form.rbi +224 -0
  503. data/rbi/stripe/resources/tax/registration.rbi +2438 -0
  504. data/rbi/stripe/resources/tax/settings.rbi +148 -0
  505. data/rbi/stripe/resources/tax/transaction.rbi +356 -0
  506. data/rbi/stripe/resources/tax/transaction_line_item.rbi +54 -0
  507. data/rbi/stripe/resources/tax_code.rbi +51 -0
  508. data/rbi/stripe/resources/tax_deducted_at_source.rbi +23 -0
  509. data/rbi/stripe/resources/tax_id.rbi +174 -0
  510. data/rbi/stripe/resources/tax_rate.rbi +244 -0
  511. data/rbi/stripe/resources/terminal/configuration.rbi +1143 -0
  512. data/rbi/stripe/resources/terminal/connection_token.rbi +37 -0
  513. data/rbi/stripe/resources/terminal/location.rbi +231 -0
  514. data/rbi/stripe/resources/terminal/reader.rbi +957 -0
  515. data/rbi/stripe/resources/terminal/reader_collected_data.rbi +41 -0
  516. data/rbi/stripe/resources/test_helpers/test_clock.rbi +139 -0
  517. data/rbi/stripe/resources/token.rbi +1192 -0
  518. data/rbi/stripe/resources/topup.rbi +225 -0
  519. data/rbi/stripe/resources/transfer.rbi +204 -0
  520. data/rbi/stripe/resources/treasury/credit_reversal.rbi +126 -0
  521. data/rbi/stripe/resources/treasury/debit_reversal.rbi +138 -0
  522. data/rbi/stripe/resources/treasury/financial_account.rbi +870 -0
  523. data/rbi/stripe/resources/treasury/financial_account_features.rbi +263 -0
  524. data/rbi/stripe/resources/treasury/inbound_transfer.rbi +302 -0
  525. data/rbi/stripe/resources/treasury/outbound_payment.rbi +589 -0
  526. data/rbi/stripe/resources/treasury/outbound_transfer.rbi +473 -0
  527. data/rbi/stripe/resources/treasury/received_credit.rbi +348 -0
  528. data/rbi/stripe/resources/treasury/received_debit.rbi +305 -0
  529. data/rbi/stripe/resources/treasury/transaction.rbi +216 -0
  530. data/rbi/stripe/resources/treasury/transaction_entry.rbi +193 -0
  531. data/rbi/stripe/resources/usage_record.rbi +32 -0
  532. data/rbi/stripe/resources/usage_record_summary.rbi +38 -0
  533. data/rbi/stripe/resources/v2/amount.rbi +14 -0
  534. data/rbi/stripe/resources/v2/billing/meter_event.rbi +37 -0
  535. data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +41 -0
  536. data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +31 -0
  537. data/rbi/stripe/resources/v2/event.rbi +47 -0
  538. data/rbi/stripe/resources/v2/event_destination.rbi +90 -0
  539. data/rbi/stripe/resources/webhook_endpoint.rbi +177 -0
  540. data/rbi/stripe/services/account_capability_service.rbi +51 -0
  541. data/rbi/stripe/services/account_external_account_service.rbi +306 -0
  542. data/rbi/stripe/services/account_link_service.rbi +58 -0
  543. data/rbi/stripe/services/account_login_link_service.rbi +22 -0
  544. data/rbi/stripe/services/account_notice_service.rbi +90 -0
  545. data/rbi/stripe/services/account_person_service.rbi +903 -0
  546. data/rbi/stripe/services/account_service.rbi +4267 -0
  547. data/rbi/stripe/services/account_session_service.rbi +803 -0
  548. data/rbi/stripe/services/apple_pay_domain_service.rbi +78 -0
  549. data/rbi/stripe/services/application_fee_refund_service.rbi +91 -0
  550. data/rbi/stripe/services/application_fee_service.rbi +74 -0
  551. data/rbi/stripe/services/apps/secret_service.rbi +151 -0
  552. data/rbi/stripe/services/apps_service.rbi +9 -0
  553. data/rbi/stripe/services/balance_service.rbi +21 -0
  554. data/rbi/stripe/services/balance_transaction_service.rbi +89 -0
  555. data/rbi/stripe/services/billing/alert_service.rbi +152 -0
  556. data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +68 -0
  557. data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +59 -0
  558. data/rbi/stripe/services/billing/credit_grant_service.rbi +209 -0
  559. data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +40 -0
  560. data/rbi/stripe/services/billing/meter_event_service.rbi +42 -0
  561. data/rbi/stripe/services/billing/meter_event_summary_service.rbi +54 -0
  562. data/rbi/stripe/services/billing/meter_service.rbi +163 -0
  563. data/rbi/stripe/services/billing_portal/configuration_service.rbi +497 -0
  564. data/rbi/stripe/services/billing_portal/session_service.rbi +202 -0
  565. data/rbi/stripe/services/billing_portal_service.rbi +10 -0
  566. data/rbi/stripe/services/billing_service.rbi +15 -0
  567. data/rbi/stripe/services/capital/financing_offer_service.rbi +95 -0
  568. data/rbi/stripe/services/capital/financing_summary_service.rbi +22 -0
  569. data/rbi/stripe/services/capital/financing_transaction_service.rbi +68 -0
  570. data/rbi/stripe/services/capital_service.rbi +11 -0
  571. data/rbi/stripe/services/charge_service.rbi +1816 -0
  572. data/rbi/stripe/services/checkout/session_line_item_service.rbi +33 -0
  573. data/rbi/stripe/services/checkout/session_service.rbi +2621 -0
  574. data/rbi/stripe/services/checkout_service.rbi +9 -0
  575. data/rbi/stripe/services/climate/order_service.rbi +140 -0
  576. data/rbi/stripe/services/climate/product_service.rbi +46 -0
  577. data/rbi/stripe/services/climate/supplier_service.rbi +46 -0
  578. data/rbi/stripe/services/climate_service.rbi +11 -0
  579. data/rbi/stripe/services/confirmation_token_service.rbi +20 -0
  580. data/rbi/stripe/services/country_spec_service.rbi +44 -0
  581. data/rbi/stripe/services/coupon_service.rbi +190 -0
  582. data/rbi/stripe/services/credit_note_line_item_service.rbi +31 -0
  583. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +167 -0
  584. data/rbi/stripe/services/credit_note_service.rbi +420 -0
  585. data/rbi/stripe/services/customer_balance_transaction_service.rbi +92 -0
  586. data/rbi/stripe/services/customer_cash_balance_service.rbi +45 -0
  587. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +44 -0
  588. data/rbi/stripe/services/customer_funding_instructions_service.rbi +59 -0
  589. data/rbi/stripe/services/customer_payment_method_service.rbi +57 -0
  590. data/rbi/stripe/services/customer_payment_source_service.rbi +228 -0
  591. data/rbi/stripe/services/customer_service.rbi +647 -0
  592. data/rbi/stripe/services/customer_session_service.rbi +110 -0
  593. data/rbi/stripe/services/customer_tax_id_service.rbi +72 -0
  594. data/rbi/stripe/services/dispute_service.rbi +422 -0
  595. data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +55 -0
  596. data/rbi/stripe/services/entitlements/feature_service.rbi +107 -0
  597. data/rbi/stripe/services/entitlements_service.rbi +10 -0
  598. data/rbi/stripe/services/ephemeral_key_service.rbi +53 -0
  599. data/rbi/stripe/services/event_service.rbi +81 -0
  600. data/rbi/stripe/services/exchange_rate_service.rbi +44 -0
  601. data/rbi/stripe/services/file_link_service.rbi +122 -0
  602. data/rbi/stripe/services/file_service.rbi +114 -0
  603. data/rbi/stripe/services/financial_connections/account_inferred_balance_service.rbi +33 -0
  604. data/rbi/stripe/services/financial_connections/account_owner_service.rbi +42 -0
  605. data/rbi/stripe/services/financial_connections/account_service.rbi +132 -0
  606. data/rbi/stripe/services/financial_connections/institution_service.rbi +46 -0
  607. data/rbi/stripe/services/financial_connections/session_service.rbi +111 -0
  608. data/rbi/stripe/services/financial_connections/transaction_service.rbi +90 -0
  609. data/rbi/stripe/services/financial_connections_service.rbi +12 -0
  610. data/rbi/stripe/services/forwarding/request_service.rbi +132 -0
  611. data/rbi/stripe/services/forwarding_service.rbi +9 -0
  612. data/rbi/stripe/services/gift_cards/card_service.rbi +142 -0
  613. data/rbi/stripe/services/gift_cards/transaction_service.rbi +174 -0
  614. data/rbi/stripe/services/gift_cards_service.rbi +10 -0
  615. data/rbi/stripe/services/identity/verification_report_service.rbi +85 -0
  616. data/rbi/stripe/services/identity/verification_session_service.rbi +317 -0
  617. data/rbi/stripe/services/identity_service.rbi +10 -0
  618. data/rbi/stripe/services/invoice_item_service.rbi +424 -0
  619. data/rbi/stripe/services/invoice_line_item_service.rbi +270 -0
  620. data/rbi/stripe/services/invoice_payment_service.rbi +44 -0
  621. data/rbi/stripe/services/invoice_rendering_template_service.rbi +82 -0
  622. data/rbi/stripe/services/invoice_service.rbi +6040 -0
  623. data/rbi/stripe/services/invoice_upcoming_lines_service.rbi +2023 -0
  624. data/rbi/stripe/services/issuing/authorization_service.rbi +140 -0
  625. data/rbi/stripe/services/issuing/card_service.rbi +479 -0
  626. data/rbi/stripe/services/issuing/cardholder_service.rbi +568 -0
  627. data/rbi/stripe/services/issuing/credit_underwriting_record_service.rbi +498 -0
  628. data/rbi/stripe/services/issuing/dispute_service.rbi +701 -0
  629. data/rbi/stripe/services/issuing/dispute_settlement_detail_service.rbi +55 -0
  630. data/rbi/stripe/services/issuing/fraud_liability_debit_service.rbi +73 -0
  631. data/rbi/stripe/services/issuing/personalization_design_service.rbi +233 -0
  632. data/rbi/stripe/services/issuing/physical_bundle_service.rbi +59 -0
  633. data/rbi/stripe/services/issuing/token_service.rbi +95 -0
  634. data/rbi/stripe/services/issuing/transaction_service.rbi +103 -0
  635. data/rbi/stripe/services/issuing_service.rbi +19 -0
  636. data/rbi/stripe/services/mandate_service.rbi +20 -0
  637. data/rbi/stripe/services/margin_service.rbi +104 -0
  638. data/rbi/stripe/services/order_line_item_service.rbi +31 -0
  639. data/rbi/stripe/services/order_service.rbi +2320 -0
  640. data/rbi/stripe/services/payment_attempt_record_service.rbi +36 -0
  641. data/rbi/stripe/services/payment_intent_service.rbi +11528 -0
  642. data/rbi/stripe/services/payment_link_line_item_service.rbi +31 -0
  643. data/rbi/stripe/services/payment_link_service.rbi +1250 -0
  644. data/rbi/stripe/services/payment_method_configuration_service.rbi +2215 -0
  645. data/rbi/stripe/services/payment_method_domain_service.rbi +110 -0
  646. data/rbi/stripe/services/payment_method_service.rbi +897 -0
  647. data/rbi/stripe/services/payment_record_service.rbi +521 -0
  648. data/rbi/stripe/services/payout_service.rbi +197 -0
  649. data/rbi/stripe/services/plan_service.rbi +286 -0
  650. data/rbi/stripe/services/price_service.rbi +551 -0
  651. data/rbi/stripe/services/product_feature_service.rbi +69 -0
  652. data/rbi/stripe/services/product_service.rbi +507 -0
  653. data/rbi/stripe/services/promotion_code_service.rbi +210 -0
  654. data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +31 -0
  655. data/rbi/stripe/services/quote_line_item_service.rbi +31 -0
  656. data/rbi/stripe/services/quote_line_service.rbi +31 -0
  657. data/rbi/stripe/services/quote_preview_invoice_service.rbi +31 -0
  658. data/rbi/stripe/services/quote_preview_subscription_schedule_service.rbi +31 -0
  659. data/rbi/stripe/services/quote_service.rbi +2390 -0
  660. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +83 -0
  661. data/rbi/stripe/services/radar/value_list_item_service.rbi +107 -0
  662. data/rbi/stripe/services/radar/value_list_service.rbi +139 -0
  663. data/rbi/stripe/services/radar_service.rbi +11 -0
  664. data/rbi/stripe/services/refund_service.rbi +181 -0
  665. data/rbi/stripe/services/reporting/report_run_service.rbi +131 -0
  666. data/rbi/stripe/services/reporting/report_type_service.rbi +35 -0
  667. data/rbi/stripe/services/reporting_service.rbi +10 -0
  668. data/rbi/stripe/services/review_service.rbi +82 -0
  669. data/rbi/stripe/services/setup_attempt_service.rbi +63 -0
  670. data/rbi/stripe/services/setup_intent_service.rbi +3630 -0
  671. data/rbi/stripe/services/shipping_rate_service.rbi +235 -0
  672. data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +46 -0
  673. data/rbi/stripe/services/sigma_service.rbi +9 -0
  674. data/rbi/stripe/services/source_service.rbi +647 -0
  675. data/rbi/stripe/services/source_transaction_service.rbi +31 -0
  676. data/rbi/stripe/services/subscription_item_service.rbi +422 -0
  677. data/rbi/stripe/services/subscription_item_usage_record_service.rbi +37 -0
  678. data/rbi/stripe/services/subscription_item_usage_record_summary_service.rbi +33 -0
  679. data/rbi/stripe/services/subscription_schedule_service.rbi +2208 -0
  680. data/rbi/stripe/services/subscription_service.rbi +1870 -0
  681. data/rbi/stripe/services/tax/association_service.rbi +25 -0
  682. data/rbi/stripe/services/tax/calculation_line_item_service.rbi +33 -0
  683. data/rbi/stripe/services/tax/calculation_service.rbi +228 -0
  684. data/rbi/stripe/services/tax/form_service.rbi +85 -0
  685. data/rbi/stripe/services/tax/registration_service.rbi +1517 -0
  686. data/rbi/stripe/services/tax/settings_service.rbi +93 -0
  687. data/rbi/stripe/services/tax/transaction_line_item_service.rbi +33 -0
  688. data/rbi/stripe/services/tax/transaction_service.rbi +142 -0
  689. data/rbi/stripe/services/tax_code_service.rbi +44 -0
  690. data/rbi/stripe/services/tax_id_service.rbi +112 -0
  691. data/rbi/stripe/services/tax_rate_service.rbi +183 -0
  692. data/rbi/stripe/services/tax_service.rbi +14 -0
  693. data/rbi/stripe/services/terminal/configuration_service.rbi +860 -0
  694. data/rbi/stripe/services/terminal/connection_token_service.rbi +25 -0
  695. data/rbi/stripe/services/terminal/location_service.rbi +184 -0
  696. data/rbi/stripe/services/terminal/reader_collected_data_service.rbi +22 -0
  697. data/rbi/stripe/services/terminal/reader_service.rbi +513 -0
  698. data/rbi/stripe/services/terminal_service.rbi +13 -0
  699. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +787 -0
  700. data/rbi/stripe/services/test_helpers/customer_service.rbi +33 -0
  701. data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +836 -0
  702. data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +76 -0
  703. data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +67 -0
  704. data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +705 -0
  705. data/rbi/stripe/services/test_helpers/issuing_service.rbi +14 -0
  706. data/rbi/stripe/services/test_helpers/refund_service.rbi +22 -0
  707. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +91 -0
  708. data/rbi/stripe/services/test_helpers/terminal_service.rbi +11 -0
  709. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +90 -0
  710. data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +64 -0
  711. data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +123 -0
  712. data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +123 -0
  713. data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +114 -0
  714. data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +114 -0
  715. data/rbi/stripe/services/test_helpers/treasury_service.rbi +15 -0
  716. data/rbi/stripe/services/test_helpers_service.rbi +15 -0
  717. data/rbi/stripe/services/token_service.rbi +1155 -0
  718. data/rbi/stripe/services/topup_service.rbi +172 -0
  719. data/rbi/stripe/services/transfer_reversal_service.rbi +99 -0
  720. data/rbi/stripe/services/transfer_service.rbi +150 -0
  721. data/rbi/stripe/services/treasury/credit_reversal_service.rbi +84 -0
  722. data/rbi/stripe/services/treasury/debit_reversal_service.rbi +88 -0
  723. data/rbi/stripe/services/treasury/financial_account_features_service.rbi +201 -0
  724. data/rbi/stripe/services/treasury/financial_account_service.rbi +566 -0
  725. data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +117 -0
  726. data/rbi/stripe/services/treasury/outbound_payment_service.rbi +300 -0
  727. data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +182 -0
  728. data/rbi/stripe/services/treasury/received_credit_service.rbi +70 -0
  729. data/rbi/stripe/services/treasury/received_debit_service.rbi +59 -0
  730. data/rbi/stripe/services/treasury/transaction_entry_service.rbi +107 -0
  731. data/rbi/stripe/services/treasury/transaction_service.rbi +114 -0
  732. data/rbi/stripe/services/treasury_service.rbi +18 -0
  733. data/rbi/stripe/services/v1_services.rbi +83 -0
  734. data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +39 -0
  735. data/rbi/stripe/services/v2/billing/meter_event_service.rbi +42 -0
  736. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +20 -0
  737. data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +55 -0
  738. data/rbi/stripe/services/v2/billing_service.rbi +14 -0
  739. data/rbi/stripe/services/v2/core/event_destination_service.rbi +203 -0
  740. data/rbi/stripe/services/v2/core/event_service.rbi +39 -0
  741. data/rbi/stripe/services/v2/core_service.rbi +12 -0
  742. data/rbi/stripe/services/v2_services.rbi +10 -0
  743. data/rbi/stripe/services/webhook_endpoint_service.rbi +131 -0
  744. metadata +435 -4
@@ -0,0 +1,2268 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ class OrderService < StripeService
6
+ attr_reader :line_items
7
+
8
+ def initialize(requestor)
9
+ super(requestor)
10
+ @line_items = Stripe::OrderLineItemService.new(@requestor)
11
+ end
12
+
13
+ class ListParams < Stripe::RequestParams
14
+ # Only return orders for the given customer.
15
+ attr_accessor :customer
16
+ # 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.
17
+ attr_accessor :ending_before
18
+ # Specifies which fields in the response should be expanded.
19
+ attr_accessor :expand
20
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
21
+ attr_accessor :limit
22
+ # 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.
23
+ attr_accessor :starting_after
24
+
25
+ def initialize(
26
+ customer: nil,
27
+ ending_before: nil,
28
+ expand: nil,
29
+ limit: nil,
30
+ starting_after: nil
31
+ )
32
+ @customer = customer
33
+ @ending_before = ending_before
34
+ @expand = expand
35
+ @limit = limit
36
+ @starting_after = starting_after
37
+ end
38
+ end
39
+
40
+ class CreateParams < Stripe::RequestParams
41
+ class AutomaticTax < Stripe::RequestParams
42
+ # Enable automatic tax calculation which will automatically compute tax rates on this order.
43
+ attr_accessor :enabled
44
+
45
+ def initialize(enabled: nil)
46
+ @enabled = enabled
47
+ end
48
+ end
49
+
50
+ class BillingDetails < Stripe::RequestParams
51
+ class Address < Stripe::RequestParams
52
+ # City, district, suburb, town, or village.
53
+ attr_accessor :city
54
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
55
+ attr_accessor :country
56
+ # Address line 1 (e.g., street, PO Box, or company name).
57
+ attr_accessor :line1
58
+ # Address line 2 (e.g., apartment, suite, unit, or building).
59
+ attr_accessor :line2
60
+ # ZIP or postal code.
61
+ attr_accessor :postal_code
62
+ # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX".
63
+ attr_accessor :state
64
+
65
+ def initialize(
66
+ city: nil,
67
+ country: nil,
68
+ line1: nil,
69
+ line2: nil,
70
+ postal_code: nil,
71
+ state: nil
72
+ )
73
+ @city = city
74
+ @country = country
75
+ @line1 = line1
76
+ @line2 = line2
77
+ @postal_code = postal_code
78
+ @state = state
79
+ end
80
+ end
81
+ # The billing address provided by the customer.
82
+ attr_accessor :address
83
+ # The billing email provided by the customer.
84
+ attr_accessor :email
85
+ # The billing name provided by the customer.
86
+ attr_accessor :name
87
+ # The billing phone number provided by the customer.
88
+ attr_accessor :phone
89
+
90
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
91
+ @address = address
92
+ @email = email
93
+ @name = name
94
+ @phone = phone
95
+ end
96
+ end
97
+
98
+ class Credit < Stripe::RequestParams
99
+ # The gift card to apply to the order.
100
+ attr_accessor :gift_card
101
+ # The type of credit to apply to the order, only `gift_card` currently supported.
102
+ attr_accessor :type
103
+
104
+ def initialize(gift_card: nil, type: nil)
105
+ @gift_card = gift_card
106
+ @type = type
107
+ end
108
+ end
109
+
110
+ class Discount < Stripe::RequestParams
111
+ # ID of the coupon to create a new discount for.
112
+ attr_accessor :coupon
113
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
114
+ attr_accessor :discount
115
+ # ID of the promotion code to create a new discount for.
116
+ attr_accessor :promotion_code
117
+
118
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
119
+ @coupon = coupon
120
+ @discount = discount
121
+ @promotion_code = promotion_code
122
+ end
123
+ end
124
+
125
+ class LineItem < Stripe::RequestParams
126
+ class Discount < Stripe::RequestParams
127
+ # ID of the coupon to create a new discount for.
128
+ attr_accessor :coupon
129
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
130
+ attr_accessor :discount
131
+
132
+ def initialize(coupon: nil, discount: nil)
133
+ @coupon = coupon
134
+ @discount = discount
135
+ end
136
+ end
137
+
138
+ class PriceData < Stripe::RequestParams
139
+ # 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).
140
+ attr_accessor :currency
141
+ # ID of the product this price belongs to.
142
+ #
143
+ # Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specified.
144
+ attr_accessor :product
145
+ # 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.
146
+ attr_accessor :tax_behavior
147
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
148
+ attr_accessor :unit_amount
149
+ # 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.
150
+ attr_accessor :unit_amount_decimal
151
+
152
+ def initialize(
153
+ currency: nil,
154
+ product: nil,
155
+ tax_behavior: nil,
156
+ unit_amount: nil,
157
+ unit_amount_decimal: nil
158
+ )
159
+ @currency = currency
160
+ @product = product
161
+ @tax_behavior = tax_behavior
162
+ @unit_amount = unit_amount
163
+ @unit_amount_decimal = unit_amount_decimal
164
+ end
165
+ end
166
+
167
+ class ProductData < Stripe::RequestParams
168
+ class PackageDimensions < Stripe::RequestParams
169
+ # Height, in inches. Maximum precision is 2 decimal places.
170
+ attr_accessor :height
171
+ # Length, in inches. Maximum precision is 2 decimal places.
172
+ attr_accessor :length
173
+ # Weight, in ounces. Maximum precision is 2 decimal places.
174
+ attr_accessor :weight
175
+ # Width, in inches. Maximum precision is 2 decimal places.
176
+ attr_accessor :width
177
+
178
+ def initialize(height: nil, length: nil, weight: nil, width: nil)
179
+ @height = height
180
+ @length = length
181
+ @weight = weight
182
+ @width = width
183
+ end
184
+ end
185
+ # 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.
186
+ attr_accessor :description
187
+ # A unique identifier for this product.
188
+ #
189
+ # `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.
190
+ attr_accessor :id
191
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
192
+ attr_accessor :images
193
+ # 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`.
194
+ attr_accessor :metadata
195
+ # The product's name, meant to be displayable to the customer.
196
+ attr_accessor :name
197
+ # The dimensions of this product for shipping purposes.
198
+ attr_accessor :package_dimensions
199
+ # Whether this product is shipped (i.e., physical goods).
200
+ attr_accessor :shippable
201
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
202
+ attr_accessor :tax_code
203
+ # A URL of a publicly-accessible webpage for this product.
204
+ attr_accessor :url
205
+
206
+ def initialize(
207
+ description: nil,
208
+ id: nil,
209
+ images: nil,
210
+ metadata: nil,
211
+ name: nil,
212
+ package_dimensions: nil,
213
+ shippable: nil,
214
+ tax_code: nil,
215
+ url: nil
216
+ )
217
+ @description = description
218
+ @id = id
219
+ @images = images
220
+ @metadata = metadata
221
+ @name = name
222
+ @package_dimensions = package_dimensions
223
+ @shippable = shippable
224
+ @tax_code = tax_code
225
+ @url = url
226
+ end
227
+ end
228
+ # The description for the line item. Will default to the name of the associated product.
229
+ attr_accessor :description
230
+ # The discounts applied to this line item.
231
+ attr_accessor :discounts
232
+ # The ID of a [Price](https://stripe.com/docs/api/prices) to add to the Order.
233
+ #
234
+ # 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.
235
+ attr_accessor :price
236
+ # Data used to generate a new Price object inline.
237
+ #
238
+ # 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.
239
+ #
240
+ # 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.
241
+ attr_accessor :price_data
242
+ # The ID of a [Product](https://stripe.com/docs/api/products) to add to the Order.
243
+ #
244
+ # The product must have a `default_price` specified. Otherwise, specify the price by passing the `price` or `price_data` parameter.
245
+ attr_accessor :product
246
+ # Defines a Product inline and adds it to the Order.
247
+ #
248
+ # `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.
249
+ #
250
+ # `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.
251
+ attr_accessor :product_data
252
+ # The quantity of the line item.
253
+ attr_accessor :quantity
254
+ # The tax rates applied to this line item.
255
+ attr_accessor :tax_rates
256
+
257
+ def initialize(
258
+ description: nil,
259
+ discounts: nil,
260
+ price: nil,
261
+ price_data: nil,
262
+ product: nil,
263
+ product_data: nil,
264
+ quantity: nil,
265
+ tax_rates: nil
266
+ )
267
+ @description = description
268
+ @discounts = discounts
269
+ @price = price
270
+ @price_data = price_data
271
+ @product = product
272
+ @product_data = product_data
273
+ @quantity = quantity
274
+ @tax_rates = tax_rates
275
+ end
276
+ end
277
+
278
+ class Payment < Stripe::RequestParams
279
+ class Settings < Stripe::RequestParams
280
+ class PaymentMethodOptions < Stripe::RequestParams
281
+ class AcssDebit < Stripe::RequestParams
282
+ class MandateOptions < Stripe::RequestParams
283
+ # A URL for custom mandate text to render during confirmation step.
284
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
285
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
286
+ attr_accessor :custom_mandate_url
287
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
288
+ attr_accessor :interval_description
289
+ # Payment schedule for the mandate.
290
+ attr_accessor :payment_schedule
291
+ # Transaction type of the mandate.
292
+ attr_accessor :transaction_type
293
+
294
+ def initialize(
295
+ custom_mandate_url: nil,
296
+ interval_description: nil,
297
+ payment_schedule: nil,
298
+ transaction_type: nil
299
+ )
300
+ @custom_mandate_url = custom_mandate_url
301
+ @interval_description = interval_description
302
+ @payment_schedule = payment_schedule
303
+ @transaction_type = transaction_type
304
+ end
305
+ end
306
+ # Additional fields for Mandate creation
307
+ attr_accessor :mandate_options
308
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
309
+ #
310
+ # 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.
311
+ #
312
+ # 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.
313
+ #
314
+ # 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).
315
+ #
316
+ # 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`.
317
+ attr_accessor :setup_future_usage
318
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
319
+ attr_accessor :target_date
320
+ # Bank account verification method.
321
+ attr_accessor :verification_method
322
+
323
+ def initialize(
324
+ mandate_options: nil,
325
+ setup_future_usage: nil,
326
+ target_date: nil,
327
+ verification_method: nil
328
+ )
329
+ @mandate_options = mandate_options
330
+ @setup_future_usage = setup_future_usage
331
+ @target_date = target_date
332
+ @verification_method = verification_method
333
+ end
334
+ end
335
+
336
+ class AfterpayClearpay < Stripe::RequestParams
337
+ # Controls when the funds are captured from the customer's account.
338
+ #
339
+ # 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.
340
+ #
341
+ # 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.
342
+ attr_accessor :capture_method
343
+ # 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.
344
+ attr_accessor :reference
345
+ # Indicates that you intend to make future payments with the payment method.
346
+ #
347
+ # 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.
348
+ #
349
+ # 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).
350
+ #
351
+ # 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`.
352
+ attr_accessor :setup_future_usage
353
+
354
+ def initialize(capture_method: nil, reference: nil, setup_future_usage: nil)
355
+ @capture_method = capture_method
356
+ @reference = reference
357
+ @setup_future_usage = setup_future_usage
358
+ end
359
+ end
360
+
361
+ class Alipay < Stripe::RequestParams
362
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
363
+ #
364
+ # 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.
365
+ #
366
+ # 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.
367
+ #
368
+ # 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).
369
+ #
370
+ # 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`.
371
+ attr_accessor :setup_future_usage
372
+
373
+ def initialize(setup_future_usage: nil)
374
+ @setup_future_usage = setup_future_usage
375
+ end
376
+ end
377
+
378
+ class Bancontact < Stripe::RequestParams
379
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
380
+ attr_accessor :preferred_language
381
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
382
+ #
383
+ # 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.
384
+ #
385
+ # 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.
386
+ #
387
+ # 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).
388
+ #
389
+ # 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`.
390
+ attr_accessor :setup_future_usage
391
+
392
+ def initialize(preferred_language: nil, setup_future_usage: nil)
393
+ @preferred_language = preferred_language
394
+ @setup_future_usage = setup_future_usage
395
+ end
396
+ end
397
+
398
+ class Card < Stripe::RequestParams
399
+ # Controls when the funds will be captured from the customer's account.
400
+ attr_accessor :capture_method
401
+ # Indicates that you intend to make future payments with the payment method.
402
+ #
403
+ # 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.
404
+ #
405
+ # 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).
406
+ #
407
+ # 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`.
408
+ attr_accessor :setup_future_usage
409
+
410
+ def initialize(capture_method: nil, setup_future_usage: nil)
411
+ @capture_method = capture_method
412
+ @setup_future_usage = setup_future_usage
413
+ end
414
+ end
415
+
416
+ class CustomerBalance < Stripe::RequestParams
417
+ class BankTransfer < Stripe::RequestParams
418
+ class EuBankTransfer < Stripe::RequestParams
419
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
420
+ attr_accessor :country
421
+
422
+ def initialize(country: nil)
423
+ @country = country
424
+ end
425
+ end
426
+ # Configuration for the eu_bank_transfer funding type.
427
+ attr_accessor :eu_bank_transfer
428
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
429
+ #
430
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
431
+ attr_accessor :requested_address_types
432
+ # 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`.
433
+ attr_accessor :type
434
+
435
+ def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil)
436
+ @eu_bank_transfer = eu_bank_transfer
437
+ @requested_address_types = requested_address_types
438
+ @type = type
439
+ end
440
+ end
441
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
442
+ attr_accessor :bank_transfer
443
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
444
+ attr_accessor :funding_type
445
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
446
+ #
447
+ # 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.
448
+ #
449
+ # 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.
450
+ #
451
+ # 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).
452
+ #
453
+ # 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`.
454
+ attr_accessor :setup_future_usage
455
+
456
+ def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil)
457
+ @bank_transfer = bank_transfer
458
+ @funding_type = funding_type
459
+ @setup_future_usage = setup_future_usage
460
+ end
461
+ end
462
+
463
+ class Ideal < Stripe::RequestParams
464
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
465
+ #
466
+ # 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.
467
+ #
468
+ # 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.
469
+ #
470
+ # 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).
471
+ #
472
+ # 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`.
473
+ attr_accessor :setup_future_usage
474
+
475
+ def initialize(setup_future_usage: nil)
476
+ @setup_future_usage = setup_future_usage
477
+ end
478
+ end
479
+
480
+ class Klarna < Stripe::RequestParams
481
+ # Controls when the funds are captured from the customer's account.
482
+ #
483
+ # 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.
484
+ #
485
+ # 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.
486
+ attr_accessor :capture_method
487
+ # Preferred language of the Klarna authorization page that the customer is redirected to
488
+ attr_accessor :preferred_locale
489
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
490
+ #
491
+ # 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.
492
+ #
493
+ # 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.
494
+ #
495
+ # 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).
496
+ #
497
+ # 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`.
498
+ attr_accessor :setup_future_usage
499
+
500
+ def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil)
501
+ @capture_method = capture_method
502
+ @preferred_locale = preferred_locale
503
+ @setup_future_usage = setup_future_usage
504
+ end
505
+ end
506
+
507
+ class Link < Stripe::RequestParams
508
+ # Controls when the funds are captured from the customer's account.
509
+ #
510
+ # 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.
511
+ #
512
+ # 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.
513
+ attr_accessor :capture_method
514
+ # [Deprecated] This is a legacy parameter that no longer has any function.
515
+ attr_accessor :persistent_token
516
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
517
+ #
518
+ # 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.
519
+ #
520
+ # 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.
521
+ #
522
+ # 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).
523
+ #
524
+ # 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`.
525
+ attr_accessor :setup_future_usage
526
+
527
+ def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil)
528
+ @capture_method = capture_method
529
+ @persistent_token = persistent_token
530
+ @setup_future_usage = setup_future_usage
531
+ end
532
+ end
533
+
534
+ class Oxxo < Stripe::RequestParams
535
+ # 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.
536
+ attr_accessor :expires_after_days
537
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
538
+ #
539
+ # 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.
540
+ #
541
+ # 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.
542
+ #
543
+ # 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).
544
+ #
545
+ # 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`.
546
+ attr_accessor :setup_future_usage
547
+
548
+ def initialize(expires_after_days: nil, setup_future_usage: nil)
549
+ @expires_after_days = expires_after_days
550
+ @setup_future_usage = setup_future_usage
551
+ end
552
+ end
553
+
554
+ class P24 < Stripe::RequestParams
555
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
556
+ #
557
+ # 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.
558
+ #
559
+ # 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.
560
+ #
561
+ # 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).
562
+ #
563
+ # 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`.
564
+ attr_accessor :setup_future_usage
565
+ # Confirm that the payer has accepted the P24 terms and conditions.
566
+ attr_accessor :tos_shown_and_accepted
567
+
568
+ def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil)
569
+ @setup_future_usage = setup_future_usage
570
+ @tos_shown_and_accepted = tos_shown_and_accepted
571
+ end
572
+ end
573
+
574
+ class Paypal < Stripe::RequestParams
575
+ class LineItem < Stripe::RequestParams
576
+ class Tax < Stripe::RequestParams
577
+ # The tax for a single unit of the line item in minor units. Cannot be a negative number.
578
+ attr_accessor :amount
579
+ # The tax behavior for the line item.
580
+ attr_accessor :behavior
581
+
582
+ def initialize(amount: nil, behavior: nil)
583
+ @amount = amount
584
+ @behavior = behavior
585
+ end
586
+ end
587
+ # Type of the line item.
588
+ attr_accessor :category
589
+ # Description of the line item.
590
+ attr_accessor :description
591
+ # Descriptive name of the line item.
592
+ attr_accessor :name
593
+ # Quantity of the line item. Must be a positive number.
594
+ attr_accessor :quantity
595
+ # Client facing stock keeping unit, article number or similar.
596
+ attr_accessor :sku
597
+ # The Stripe account ID of the connected account that sells the item.
598
+ attr_accessor :sold_by
599
+ # The tax information for the line item.
600
+ attr_accessor :tax
601
+ # Price for a single unit of the line item in minor units. Cannot be a negative number.
602
+ attr_accessor :unit_amount
603
+
604
+ def initialize(
605
+ category: nil,
606
+ description: nil,
607
+ name: nil,
608
+ quantity: nil,
609
+ sku: nil,
610
+ sold_by: nil,
611
+ tax: nil,
612
+ unit_amount: nil
613
+ )
614
+ @category = category
615
+ @description = description
616
+ @name = name
617
+ @quantity = quantity
618
+ @sku = sku
619
+ @sold_by = sold_by
620
+ @tax = tax
621
+ @unit_amount = unit_amount
622
+ end
623
+ end
624
+ # Controls when the funds will be captured from the customer's account.
625
+ attr_accessor :capture_method
626
+ # The line items purchased by the customer.
627
+ attr_accessor :line_items
628
+ # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to.
629
+ attr_accessor :preferred_locale
630
+ # 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.
631
+ attr_accessor :reference
632
+ # 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.
633
+ attr_accessor :reference_id
634
+ # The risk correlation ID for an on-session payment using a saved PayPal payment method.
635
+ attr_accessor :risk_correlation_id
636
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
637
+ #
638
+ # 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.
639
+ #
640
+ # 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.
641
+ #
642
+ # 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).
643
+ #
644
+ # 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`.
645
+ attr_accessor :setup_future_usage
646
+ # 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.
647
+ attr_accessor :subsellers
648
+
649
+ def initialize(
650
+ capture_method: nil,
651
+ line_items: nil,
652
+ preferred_locale: nil,
653
+ reference: nil,
654
+ reference_id: nil,
655
+ risk_correlation_id: nil,
656
+ setup_future_usage: nil,
657
+ subsellers: nil
658
+ )
659
+ @capture_method = capture_method
660
+ @line_items = line_items
661
+ @preferred_locale = preferred_locale
662
+ @reference = reference
663
+ @reference_id = reference_id
664
+ @risk_correlation_id = risk_correlation_id
665
+ @setup_future_usage = setup_future_usage
666
+ @subsellers = subsellers
667
+ end
668
+ end
669
+
670
+ class SepaDebit < Stripe::RequestParams
671
+ class MandateOptions < Stripe::RequestParams
672
+ # 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'.
673
+ attr_accessor :reference_prefix
674
+
675
+ def initialize(reference_prefix: nil)
676
+ @reference_prefix = reference_prefix
677
+ end
678
+ end
679
+ # Additional fields for Mandate creation
680
+ attr_accessor :mandate_options
681
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
682
+ #
683
+ # 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.
684
+ #
685
+ # 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.
686
+ #
687
+ # 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).
688
+ #
689
+ # 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`.
690
+ attr_accessor :setup_future_usage
691
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
692
+ attr_accessor :target_date
693
+
694
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil)
695
+ @mandate_options = mandate_options
696
+ @setup_future_usage = setup_future_usage
697
+ @target_date = target_date
698
+ end
699
+ end
700
+
701
+ class Sofort < Stripe::RequestParams
702
+ # Language shown to the payer on redirect.
703
+ attr_accessor :preferred_language
704
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
705
+ #
706
+ # 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.
707
+ #
708
+ # 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.
709
+ #
710
+ # 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).
711
+ #
712
+ # 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`.
713
+ attr_accessor :setup_future_usage
714
+
715
+ def initialize(preferred_language: nil, setup_future_usage: nil)
716
+ @preferred_language = preferred_language
717
+ @setup_future_usage = setup_future_usage
718
+ end
719
+ end
720
+
721
+ class WechatPay < Stripe::RequestParams
722
+ # The app ID registered with WeChat Pay. Only required when client is ios or android.
723
+ attr_accessor :app_id
724
+ # The client type that the end customer will pay from
725
+ attr_accessor :client
726
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
727
+ #
728
+ # 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.
729
+ #
730
+ # 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.
731
+ #
732
+ # 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).
733
+ #
734
+ # 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`.
735
+ attr_accessor :setup_future_usage
736
+
737
+ def initialize(app_id: nil, client: nil, setup_future_usage: nil)
738
+ @app_id = app_id
739
+ @client = client
740
+ @setup_future_usage = setup_future_usage
741
+ end
742
+ end
743
+ # If paying by `acss_debit`, this sub-hash contains details about the ACSS Debit payment method options to pass to the order's PaymentIntent.
744
+ attr_accessor :acss_debit
745
+ # If paying by `afterpay_clearpay`, this sub-hash contains details about the AfterpayClearpay payment method options to pass to the order's PaymentIntent.
746
+ attr_accessor :afterpay_clearpay
747
+ # If paying by `alipay`, this sub-hash contains details about the Alipay payment method options to pass to the order's PaymentIntent.
748
+ attr_accessor :alipay
749
+ # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the order's PaymentIntent.
750
+ attr_accessor :bancontact
751
+ # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the order's PaymentIntent.
752
+ attr_accessor :card
753
+ # If paying by `customer_balance`, this sub-hash contains details about the Customer Balance payment method options to pass to the order's PaymentIntent.
754
+ attr_accessor :customer_balance
755
+ # If paying by `ideal`, this sub-hash contains details about the iDEAL payment method options to pass to the order's PaymentIntent.
756
+ attr_accessor :ideal
757
+ # If paying by `klarna`, this sub-hash contains details about the Klarna payment method options to pass to the order's PaymentIntent.
758
+ attr_accessor :klarna
759
+ # If paying by `link`, this sub-hash contains details about the Link payment method options to pass to the order's PaymentIntent.
760
+ attr_accessor :link
761
+ # If paying by `oxxo`, this sub-hash contains details about the OXXO payment method options to pass to the order's PaymentIntent.
762
+ attr_accessor :oxxo
763
+ # If paying by `p24`, this sub-hash contains details about the P24 payment method options to pass to the order's PaymentIntent.
764
+ attr_accessor :p24
765
+ # If paying by `paypal`, this sub-hash contains details about the PayPal payment method options to pass to the order's PaymentIntent.
766
+ attr_accessor :paypal
767
+ # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Debit payment method options to pass to the order's PaymentIntent.
768
+ attr_accessor :sepa_debit
769
+ # If paying by `sofort`, this sub-hash contains details about the Sofort payment method options to pass to the order's PaymentIntent.
770
+ attr_accessor :sofort
771
+ # If paying by `wechat_pay`, this sub-hash contains details about the WeChat Pay payment method options to pass to the order's PaymentIntent.
772
+ attr_accessor :wechat_pay
773
+
774
+ def initialize(
775
+ acss_debit: nil,
776
+ afterpay_clearpay: nil,
777
+ alipay: nil,
778
+ bancontact: nil,
779
+ card: nil,
780
+ customer_balance: nil,
781
+ ideal: nil,
782
+ klarna: nil,
783
+ link: nil,
784
+ oxxo: nil,
785
+ p24: nil,
786
+ paypal: nil,
787
+ sepa_debit: nil,
788
+ sofort: nil,
789
+ wechat_pay: nil
790
+ )
791
+ @acss_debit = acss_debit
792
+ @afterpay_clearpay = afterpay_clearpay
793
+ @alipay = alipay
794
+ @bancontact = bancontact
795
+ @card = card
796
+ @customer_balance = customer_balance
797
+ @ideal = ideal
798
+ @klarna = klarna
799
+ @link = link
800
+ @oxxo = oxxo
801
+ @p24 = p24
802
+ @paypal = paypal
803
+ @sepa_debit = sepa_debit
804
+ @sofort = sofort
805
+ @wechat_pay = wechat_pay
806
+ end
807
+ end
808
+
809
+ class TransferData < Stripe::RequestParams
810
+ # 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.
811
+ attr_accessor :amount
812
+ # ID of the Connected account receiving the transfer.
813
+ attr_accessor :destination
814
+
815
+ def initialize(amount: nil, destination: nil)
816
+ @amount = amount
817
+ @destination = destination
818
+ end
819
+ end
820
+ # 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.
821
+ attr_accessor :application_fee_amount
822
+ # PaymentMethod-specific configuration to provide to the order's PaymentIntent.
823
+ attr_accessor :payment_method_options
824
+ # 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).
825
+ attr_accessor :payment_method_types
826
+ # The URL to redirect the customer to after they authenticate their payment.
827
+ attr_accessor :return_url
828
+ # 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.
829
+ attr_accessor :statement_descriptor
830
+ # 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.
831
+ attr_accessor :statement_descriptor_suffix
832
+ # Provides configuration for completing a transfer for the order after it is paid.
833
+ attr_accessor :transfer_data
834
+
835
+ def initialize(
836
+ application_fee_amount: nil,
837
+ payment_method_options: nil,
838
+ payment_method_types: nil,
839
+ return_url: nil,
840
+ statement_descriptor: nil,
841
+ statement_descriptor_suffix: nil,
842
+ transfer_data: nil
843
+ )
844
+ @application_fee_amount = application_fee_amount
845
+ @payment_method_options = payment_method_options
846
+ @payment_method_types = payment_method_types
847
+ @return_url = return_url
848
+ @statement_descriptor = statement_descriptor
849
+ @statement_descriptor_suffix = statement_descriptor_suffix
850
+ @transfer_data = transfer_data
851
+ end
852
+ end
853
+ # Settings describing how the order should configure generated PaymentIntents.
854
+ attr_accessor :settings
855
+
856
+ def initialize(settings: nil)
857
+ @settings = settings
858
+ end
859
+ end
860
+
861
+ class ShippingCost < Stripe::RequestParams
862
+ class ShippingRateData < Stripe::RequestParams
863
+ class DeliveryEstimate < Stripe::RequestParams
864
+ class Maximum < Stripe::RequestParams
865
+ # A unit of time.
866
+ attr_accessor :unit
867
+ # Must be greater than 0.
868
+ attr_accessor :value
869
+
870
+ def initialize(unit: nil, value: nil)
871
+ @unit = unit
872
+ @value = value
873
+ end
874
+ end
875
+
876
+ class Minimum < Stripe::RequestParams
877
+ # A unit of time.
878
+ attr_accessor :unit
879
+ # Must be greater than 0.
880
+ attr_accessor :value
881
+
882
+ def initialize(unit: nil, value: nil)
883
+ @unit = unit
884
+ @value = value
885
+ end
886
+ end
887
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
888
+ attr_accessor :maximum
889
+ # The lower bound of the estimated range. If empty, represents no lower bound.
890
+ attr_accessor :minimum
891
+
892
+ def initialize(maximum: nil, minimum: nil)
893
+ @maximum = maximum
894
+ @minimum = minimum
895
+ end
896
+ end
897
+
898
+ class FixedAmount < Stripe::RequestParams
899
+ class CurrencyOptions < Stripe::RequestParams
900
+ # A non-negative integer in cents representing how much to charge.
901
+ attr_accessor :amount
902
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
903
+ attr_accessor :tax_behavior
904
+
905
+ def initialize(amount: nil, tax_behavior: nil)
906
+ @amount = amount
907
+ @tax_behavior = tax_behavior
908
+ end
909
+ end
910
+ # A non-negative integer in cents representing how much to charge.
911
+ attr_accessor :amount
912
+ # 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).
913
+ attr_accessor :currency
914
+ # 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).
915
+ attr_accessor :currency_options
916
+
917
+ def initialize(amount: nil, currency: nil, currency_options: nil)
918
+ @amount = amount
919
+ @currency = currency
920
+ @currency_options = currency_options
921
+ end
922
+ end
923
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
924
+ attr_accessor :delivery_estimate
925
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
926
+ attr_accessor :display_name
927
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
928
+ attr_accessor :fixed_amount
929
+ # 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`.
930
+ attr_accessor :metadata
931
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
932
+ attr_accessor :tax_behavior
933
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
934
+ attr_accessor :tax_code
935
+ # The type of calculation to use on the shipping rate.
936
+ attr_accessor :type
937
+
938
+ def initialize(
939
+ delivery_estimate: nil,
940
+ display_name: nil,
941
+ fixed_amount: nil,
942
+ metadata: nil,
943
+ tax_behavior: nil,
944
+ tax_code: nil,
945
+ type: nil
946
+ )
947
+ @delivery_estimate = delivery_estimate
948
+ @display_name = display_name
949
+ @fixed_amount = fixed_amount
950
+ @metadata = metadata
951
+ @tax_behavior = tax_behavior
952
+ @tax_code = tax_code
953
+ @type = type
954
+ end
955
+ end
956
+ # The ID of the shipping rate to use for this order.
957
+ attr_accessor :shipping_rate
958
+ # Parameters to create a new ad-hoc shipping rate for this order.
959
+ attr_accessor :shipping_rate_data
960
+
961
+ def initialize(shipping_rate: nil, shipping_rate_data: nil)
962
+ @shipping_rate = shipping_rate
963
+ @shipping_rate_data = shipping_rate_data
964
+ end
965
+ end
966
+
967
+ class ShippingDetails < Stripe::RequestParams
968
+ class Address < Stripe::RequestParams
969
+ # City, district, suburb, town, or village.
970
+ attr_accessor :city
971
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
972
+ attr_accessor :country
973
+ # Address line 1 (e.g., street, PO Box, or company name).
974
+ attr_accessor :line1
975
+ # Address line 2 (e.g., apartment, suite, unit, or building).
976
+ attr_accessor :line2
977
+ # ZIP or postal code.
978
+ attr_accessor :postal_code
979
+ # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX".
980
+ attr_accessor :state
981
+
982
+ def initialize(
983
+ city: nil,
984
+ country: nil,
985
+ line1: nil,
986
+ line2: nil,
987
+ postal_code: nil,
988
+ state: nil
989
+ )
990
+ @city = city
991
+ @country = country
992
+ @line1 = line1
993
+ @line2 = line2
994
+ @postal_code = postal_code
995
+ @state = state
996
+ end
997
+ end
998
+ # The shipping address for the order.
999
+ attr_accessor :address
1000
+ # The name of the recipient of the order.
1001
+ attr_accessor :name
1002
+ # The phone number (including extension) for the recipient of the order.
1003
+ attr_accessor :phone
1004
+
1005
+ def initialize(address: nil, name: nil, phone: nil)
1006
+ @address = address
1007
+ @name = name
1008
+ @phone = phone
1009
+ end
1010
+ end
1011
+
1012
+ class TaxDetails < Stripe::RequestParams
1013
+ class TaxId < Stripe::RequestParams
1014
+ # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `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`
1015
+ attr_accessor :type
1016
+ # Value of the tax ID.
1017
+ attr_accessor :value
1018
+
1019
+ def initialize(type: nil, value: nil)
1020
+ @type = type
1021
+ @value = value
1022
+ end
1023
+ end
1024
+ # The purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`.
1025
+ attr_accessor :tax_exempt
1026
+ # The purchaser's tax IDs to be used for this order.
1027
+ attr_accessor :tax_ids
1028
+
1029
+ def initialize(tax_exempt: nil, tax_ids: nil)
1030
+ @tax_exempt = tax_exempt
1031
+ @tax_ids = tax_ids
1032
+ end
1033
+ end
1034
+ # Settings for automatic tax calculation for this order.
1035
+ attr_accessor :automatic_tax
1036
+ # 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.
1037
+ attr_accessor :billing_details
1038
+ # The credits to apply to the order, only `gift_card` currently supported.
1039
+ attr_accessor :credits
1040
+ # 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).
1041
+ attr_accessor :currency
1042
+ # The customer associated with this order.
1043
+ attr_accessor :customer
1044
+ # An arbitrary string attached to the object. Often useful for displaying to users.
1045
+ attr_accessor :description
1046
+ # The coupons, promotion codes, and/or discounts to apply to the order.
1047
+ attr_accessor :discounts
1048
+ # Specifies which fields in the response should be expanded.
1049
+ attr_accessor :expand
1050
+ # The IP address of the purchaser for this order.
1051
+ attr_accessor :ip_address
1052
+ # A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost.
1053
+ attr_accessor :line_items
1054
+ # 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`.
1055
+ attr_accessor :metadata
1056
+ # Payment information associated with the order, including payment settings.
1057
+ attr_accessor :payment
1058
+ # Settings for the customer cost of shipping for this order.
1059
+ attr_accessor :shipping_cost
1060
+ # Shipping details for the order.
1061
+ attr_accessor :shipping_details
1062
+ # Additional tax details about the purchaser to be used for this order.
1063
+ attr_accessor :tax_details
1064
+
1065
+ def initialize(
1066
+ automatic_tax: nil,
1067
+ billing_details: nil,
1068
+ credits: nil,
1069
+ currency: nil,
1070
+ customer: nil,
1071
+ description: nil,
1072
+ discounts: nil,
1073
+ expand: nil,
1074
+ ip_address: nil,
1075
+ line_items: nil,
1076
+ metadata: nil,
1077
+ payment: nil,
1078
+ shipping_cost: nil,
1079
+ shipping_details: nil,
1080
+ tax_details: nil
1081
+ )
1082
+ @automatic_tax = automatic_tax
1083
+ @billing_details = billing_details
1084
+ @credits = credits
1085
+ @currency = currency
1086
+ @customer = customer
1087
+ @description = description
1088
+ @discounts = discounts
1089
+ @expand = expand
1090
+ @ip_address = ip_address
1091
+ @line_items = line_items
1092
+ @metadata = metadata
1093
+ @payment = payment
1094
+ @shipping_cost = shipping_cost
1095
+ @shipping_details = shipping_details
1096
+ @tax_details = tax_details
1097
+ end
1098
+ end
1099
+
1100
+ class RetrieveParams < Stripe::RequestParams
1101
+ # Specifies which fields in the response should be expanded.
1102
+ attr_accessor :expand
1103
+
1104
+ def initialize(expand: nil)
1105
+ @expand = expand
1106
+ end
1107
+ end
1108
+
1109
+ class UpdateParams < Stripe::RequestParams
1110
+ class AutomaticTax < Stripe::RequestParams
1111
+ # Enable automatic tax calculation which will automatically compute tax rates on this order.
1112
+ attr_accessor :enabled
1113
+
1114
+ def initialize(enabled: nil)
1115
+ @enabled = enabled
1116
+ end
1117
+ end
1118
+
1119
+ class BillingDetails < Stripe::RequestParams
1120
+ class Address < Stripe::RequestParams
1121
+ # City, district, suburb, town, or village.
1122
+ attr_accessor :city
1123
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
1124
+ attr_accessor :country
1125
+ # Address line 1 (e.g., street, PO Box, or company name).
1126
+ attr_accessor :line1
1127
+ # Address line 2 (e.g., apartment, suite, unit, or building).
1128
+ attr_accessor :line2
1129
+ # ZIP or postal code.
1130
+ attr_accessor :postal_code
1131
+ # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX".
1132
+ attr_accessor :state
1133
+
1134
+ def initialize(
1135
+ city: nil,
1136
+ country: nil,
1137
+ line1: nil,
1138
+ line2: nil,
1139
+ postal_code: nil,
1140
+ state: nil
1141
+ )
1142
+ @city = city
1143
+ @country = country
1144
+ @line1 = line1
1145
+ @line2 = line2
1146
+ @postal_code = postal_code
1147
+ @state = state
1148
+ end
1149
+ end
1150
+ # The billing address provided by the customer.
1151
+ attr_accessor :address
1152
+ # The billing email provided by the customer.
1153
+ attr_accessor :email
1154
+ # The billing name provided by the customer.
1155
+ attr_accessor :name
1156
+ # The billing phone number provided by the customer.
1157
+ attr_accessor :phone
1158
+
1159
+ def initialize(address: nil, email: nil, name: nil, phone: nil)
1160
+ @address = address
1161
+ @email = email
1162
+ @name = name
1163
+ @phone = phone
1164
+ end
1165
+ end
1166
+
1167
+ class Credit < Stripe::RequestParams
1168
+ # The gift card to apply to the order.
1169
+ attr_accessor :gift_card
1170
+ # The type of credit to apply to the order, only `gift_card` currently supported.
1171
+ attr_accessor :type
1172
+
1173
+ def initialize(gift_card: nil, type: nil)
1174
+ @gift_card = gift_card
1175
+ @type = type
1176
+ end
1177
+ end
1178
+
1179
+ class Discount < Stripe::RequestParams
1180
+ # ID of the coupon to create a new discount for.
1181
+ attr_accessor :coupon
1182
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1183
+ attr_accessor :discount
1184
+ # ID of the promotion code to create a new discount for.
1185
+ attr_accessor :promotion_code
1186
+
1187
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
1188
+ @coupon = coupon
1189
+ @discount = discount
1190
+ @promotion_code = promotion_code
1191
+ end
1192
+ end
1193
+
1194
+ class LineItem < Stripe::RequestParams
1195
+ class Discount < Stripe::RequestParams
1196
+ # ID of the coupon to create a new discount for.
1197
+ attr_accessor :coupon
1198
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1199
+ attr_accessor :discount
1200
+
1201
+ def initialize(coupon: nil, discount: nil)
1202
+ @coupon = coupon
1203
+ @discount = discount
1204
+ end
1205
+ end
1206
+
1207
+ class PriceData < Stripe::RequestParams
1208
+ # 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).
1209
+ attr_accessor :currency
1210
+ # ID of the product this price belongs to.
1211
+ #
1212
+ # Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specified.
1213
+ attr_accessor :product
1214
+ # 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.
1215
+ attr_accessor :tax_behavior
1216
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
1217
+ attr_accessor :unit_amount
1218
+ # 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.
1219
+ attr_accessor :unit_amount_decimal
1220
+
1221
+ def initialize(
1222
+ currency: nil,
1223
+ product: nil,
1224
+ tax_behavior: nil,
1225
+ unit_amount: nil,
1226
+ unit_amount_decimal: nil
1227
+ )
1228
+ @currency = currency
1229
+ @product = product
1230
+ @tax_behavior = tax_behavior
1231
+ @unit_amount = unit_amount
1232
+ @unit_amount_decimal = unit_amount_decimal
1233
+ end
1234
+ end
1235
+
1236
+ class ProductData < Stripe::RequestParams
1237
+ class PackageDimensions < Stripe::RequestParams
1238
+ # Height, in inches. Maximum precision is 2 decimal places.
1239
+ attr_accessor :height
1240
+ # Length, in inches. Maximum precision is 2 decimal places.
1241
+ attr_accessor :length
1242
+ # Weight, in ounces. Maximum precision is 2 decimal places.
1243
+ attr_accessor :weight
1244
+ # Width, in inches. Maximum precision is 2 decimal places.
1245
+ attr_accessor :width
1246
+
1247
+ def initialize(height: nil, length: nil, weight: nil, width: nil)
1248
+ @height = height
1249
+ @length = length
1250
+ @weight = weight
1251
+ @width = width
1252
+ end
1253
+ end
1254
+ # 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.
1255
+ attr_accessor :description
1256
+ # A unique identifier for this product.
1257
+ #
1258
+ # `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.
1259
+ attr_accessor :id
1260
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
1261
+ attr_accessor :images
1262
+ # 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`.
1263
+ attr_accessor :metadata
1264
+ # The product's name, meant to be displayable to the customer.
1265
+ attr_accessor :name
1266
+ # The dimensions of this product for shipping purposes.
1267
+ attr_accessor :package_dimensions
1268
+ # Whether this product is shipped (i.e., physical goods).
1269
+ attr_accessor :shippable
1270
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
1271
+ attr_accessor :tax_code
1272
+ # A URL of a publicly-accessible webpage for this product.
1273
+ attr_accessor :url
1274
+
1275
+ def initialize(
1276
+ description: nil,
1277
+ id: nil,
1278
+ images: nil,
1279
+ metadata: nil,
1280
+ name: nil,
1281
+ package_dimensions: nil,
1282
+ shippable: nil,
1283
+ tax_code: nil,
1284
+ url: nil
1285
+ )
1286
+ @description = description
1287
+ @id = id
1288
+ @images = images
1289
+ @metadata = metadata
1290
+ @name = name
1291
+ @package_dimensions = package_dimensions
1292
+ @shippable = shippable
1293
+ @tax_code = tax_code
1294
+ @url = url
1295
+ end
1296
+ end
1297
+ # The description for the line item. Will default to the name of the associated product.
1298
+ attr_accessor :description
1299
+ # The discounts applied to this line item.
1300
+ attr_accessor :discounts
1301
+ # The ID of an existing line item on the order.
1302
+ attr_accessor :id
1303
+ # The ID of a [Price](https://stripe.com/docs/api/prices) to add to the Order.
1304
+ #
1305
+ # 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.
1306
+ attr_accessor :price
1307
+ # Data used to generate a new Price object inline.
1308
+ #
1309
+ # 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.
1310
+ #
1311
+ # 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.
1312
+ attr_accessor :price_data
1313
+ # The ID of a [Product](https://stripe.com/docs/api/products) to add to the Order.
1314
+ #
1315
+ # The product must have a `default_price` specified. Otherwise, specify the price by passing the `price` or `price_data` parameter.
1316
+ attr_accessor :product
1317
+ # Defines a Product inline and adds it to the Order.
1318
+ #
1319
+ # `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.
1320
+ #
1321
+ # `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.
1322
+ attr_accessor :product_data
1323
+ # The quantity of the line item.
1324
+ attr_accessor :quantity
1325
+ # The tax rates applied to this line item.
1326
+ attr_accessor :tax_rates
1327
+
1328
+ def initialize(
1329
+ description: nil,
1330
+ discounts: nil,
1331
+ id: nil,
1332
+ price: nil,
1333
+ price_data: nil,
1334
+ product: nil,
1335
+ product_data: nil,
1336
+ quantity: nil,
1337
+ tax_rates: nil
1338
+ )
1339
+ @description = description
1340
+ @discounts = discounts
1341
+ @id = id
1342
+ @price = price
1343
+ @price_data = price_data
1344
+ @product = product
1345
+ @product_data = product_data
1346
+ @quantity = quantity
1347
+ @tax_rates = tax_rates
1348
+ end
1349
+ end
1350
+
1351
+ class Payment < Stripe::RequestParams
1352
+ class Settings < Stripe::RequestParams
1353
+ class PaymentMethodOptions < Stripe::RequestParams
1354
+ class AcssDebit < Stripe::RequestParams
1355
+ class MandateOptions < Stripe::RequestParams
1356
+ # A URL for custom mandate text to render during confirmation step.
1357
+ # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
1358
+ # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
1359
+ attr_accessor :custom_mandate_url
1360
+ # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
1361
+ attr_accessor :interval_description
1362
+ # Payment schedule for the mandate.
1363
+ attr_accessor :payment_schedule
1364
+ # Transaction type of the mandate.
1365
+ attr_accessor :transaction_type
1366
+
1367
+ def initialize(
1368
+ custom_mandate_url: nil,
1369
+ interval_description: nil,
1370
+ payment_schedule: nil,
1371
+ transaction_type: nil
1372
+ )
1373
+ @custom_mandate_url = custom_mandate_url
1374
+ @interval_description = interval_description
1375
+ @payment_schedule = payment_schedule
1376
+ @transaction_type = transaction_type
1377
+ end
1378
+ end
1379
+ # Additional fields for Mandate creation
1380
+ attr_accessor :mandate_options
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
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
1392
+ attr_accessor :target_date
1393
+ # Bank account verification method.
1394
+ attr_accessor :verification_method
1395
+
1396
+ def initialize(
1397
+ mandate_options: nil,
1398
+ setup_future_usage: nil,
1399
+ target_date: nil,
1400
+ verification_method: nil
1401
+ )
1402
+ @mandate_options = mandate_options
1403
+ @setup_future_usage = setup_future_usage
1404
+ @target_date = target_date
1405
+ @verification_method = verification_method
1406
+ end
1407
+ end
1408
+
1409
+ class AfterpayClearpay < Stripe::RequestParams
1410
+ # Controls when the funds are captured from the customer's account.
1411
+ #
1412
+ # 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.
1413
+ #
1414
+ # 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.
1415
+ attr_accessor :capture_method
1416
+ # 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.
1417
+ attr_accessor :reference
1418
+ # Indicates that you intend to make future payments with the payment method.
1419
+ #
1420
+ # 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.
1421
+ #
1422
+ # 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).
1423
+ #
1424
+ # 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`.
1425
+ attr_accessor :setup_future_usage
1426
+
1427
+ def initialize(capture_method: nil, reference: nil, setup_future_usage: nil)
1428
+ @capture_method = capture_method
1429
+ @reference = reference
1430
+ @setup_future_usage = setup_future_usage
1431
+ end
1432
+ end
1433
+
1434
+ class Alipay < Stripe::RequestParams
1435
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1436
+ #
1437
+ # 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.
1438
+ #
1439
+ # 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.
1440
+ #
1441
+ # 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).
1442
+ #
1443
+ # 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`.
1444
+ attr_accessor :setup_future_usage
1445
+
1446
+ def initialize(setup_future_usage: nil)
1447
+ @setup_future_usage = setup_future_usage
1448
+ end
1449
+ end
1450
+
1451
+ class Bancontact < Stripe::RequestParams
1452
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
1453
+ attr_accessor :preferred_language
1454
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1455
+ #
1456
+ # 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.
1457
+ #
1458
+ # 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.
1459
+ #
1460
+ # 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).
1461
+ #
1462
+ # 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`.
1463
+ attr_accessor :setup_future_usage
1464
+
1465
+ def initialize(preferred_language: nil, setup_future_usage: nil)
1466
+ @preferred_language = preferred_language
1467
+ @setup_future_usage = setup_future_usage
1468
+ end
1469
+ end
1470
+
1471
+ class Card < Stripe::RequestParams
1472
+ # Controls when the funds will be captured from the customer's account.
1473
+ attr_accessor :capture_method
1474
+ # Indicates that you intend to make future payments with the payment method.
1475
+ #
1476
+ # 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.
1477
+ #
1478
+ # 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).
1479
+ #
1480
+ # 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`.
1481
+ attr_accessor :setup_future_usage
1482
+
1483
+ def initialize(capture_method: nil, setup_future_usage: nil)
1484
+ @capture_method = capture_method
1485
+ @setup_future_usage = setup_future_usage
1486
+ end
1487
+ end
1488
+
1489
+ class CustomerBalance < Stripe::RequestParams
1490
+ class BankTransfer < Stripe::RequestParams
1491
+ class EuBankTransfer < Stripe::RequestParams
1492
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
1493
+ attr_accessor :country
1494
+
1495
+ def initialize(country: nil)
1496
+ @country = country
1497
+ end
1498
+ end
1499
+ # Configuration for the eu_bank_transfer funding type.
1500
+ attr_accessor :eu_bank_transfer
1501
+ # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
1502
+ #
1503
+ # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
1504
+ attr_accessor :requested_address_types
1505
+ # 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`.
1506
+ attr_accessor :type
1507
+
1508
+ def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil)
1509
+ @eu_bank_transfer = eu_bank_transfer
1510
+ @requested_address_types = requested_address_types
1511
+ @type = type
1512
+ end
1513
+ end
1514
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
1515
+ attr_accessor :bank_transfer
1516
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
1517
+ attr_accessor :funding_type
1518
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1519
+ #
1520
+ # 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.
1521
+ #
1522
+ # 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.
1523
+ #
1524
+ # 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).
1525
+ #
1526
+ # 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`.
1527
+ attr_accessor :setup_future_usage
1528
+
1529
+ def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil)
1530
+ @bank_transfer = bank_transfer
1531
+ @funding_type = funding_type
1532
+ @setup_future_usage = setup_future_usage
1533
+ end
1534
+ end
1535
+
1536
+ class Ideal < Stripe::RequestParams
1537
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1538
+ #
1539
+ # 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.
1540
+ #
1541
+ # 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.
1542
+ #
1543
+ # 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).
1544
+ #
1545
+ # 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`.
1546
+ attr_accessor :setup_future_usage
1547
+
1548
+ def initialize(setup_future_usage: nil)
1549
+ @setup_future_usage = setup_future_usage
1550
+ end
1551
+ end
1552
+
1553
+ class Klarna < Stripe::RequestParams
1554
+ # Controls when the funds are captured from the customer's account.
1555
+ #
1556
+ # 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.
1557
+ #
1558
+ # 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.
1559
+ attr_accessor :capture_method
1560
+ # Preferred language of the Klarna authorization page that the customer is redirected to
1561
+ attr_accessor :preferred_locale
1562
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1563
+ #
1564
+ # 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.
1565
+ #
1566
+ # 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.
1567
+ #
1568
+ # 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).
1569
+ #
1570
+ # 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`.
1571
+ attr_accessor :setup_future_usage
1572
+
1573
+ def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil)
1574
+ @capture_method = capture_method
1575
+ @preferred_locale = preferred_locale
1576
+ @setup_future_usage = setup_future_usage
1577
+ end
1578
+ end
1579
+
1580
+ class Link < Stripe::RequestParams
1581
+ # Controls when the funds are captured from the customer's account.
1582
+ #
1583
+ # 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.
1584
+ #
1585
+ # 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.
1586
+ attr_accessor :capture_method
1587
+ # [Deprecated] This is a legacy parameter that no longer has any function.
1588
+ attr_accessor :persistent_token
1589
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1590
+ #
1591
+ # 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.
1592
+ #
1593
+ # 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.
1594
+ #
1595
+ # 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).
1596
+ #
1597
+ # 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`.
1598
+ attr_accessor :setup_future_usage
1599
+
1600
+ def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil)
1601
+ @capture_method = capture_method
1602
+ @persistent_token = persistent_token
1603
+ @setup_future_usage = setup_future_usage
1604
+ end
1605
+ end
1606
+
1607
+ class Oxxo < Stripe::RequestParams
1608
+ # 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.
1609
+ attr_accessor :expires_after_days
1610
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1611
+ #
1612
+ # 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.
1613
+ #
1614
+ # 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.
1615
+ #
1616
+ # 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).
1617
+ #
1618
+ # 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`.
1619
+ attr_accessor :setup_future_usage
1620
+
1621
+ def initialize(expires_after_days: nil, setup_future_usage: nil)
1622
+ @expires_after_days = expires_after_days
1623
+ @setup_future_usage = setup_future_usage
1624
+ end
1625
+ end
1626
+
1627
+ class P24 < Stripe::RequestParams
1628
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1629
+ #
1630
+ # 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.
1631
+ #
1632
+ # 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.
1633
+ #
1634
+ # 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).
1635
+ #
1636
+ # 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`.
1637
+ attr_accessor :setup_future_usage
1638
+ # Confirm that the payer has accepted the P24 terms and conditions.
1639
+ attr_accessor :tos_shown_and_accepted
1640
+
1641
+ def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil)
1642
+ @setup_future_usage = setup_future_usage
1643
+ @tos_shown_and_accepted = tos_shown_and_accepted
1644
+ end
1645
+ end
1646
+
1647
+ class Paypal < Stripe::RequestParams
1648
+ class LineItem < Stripe::RequestParams
1649
+ class Tax < Stripe::RequestParams
1650
+ # The tax for a single unit of the line item in minor units. Cannot be a negative number.
1651
+ attr_accessor :amount
1652
+ # The tax behavior for the line item.
1653
+ attr_accessor :behavior
1654
+
1655
+ def initialize(amount: nil, behavior: nil)
1656
+ @amount = amount
1657
+ @behavior = behavior
1658
+ end
1659
+ end
1660
+ # Type of the line item.
1661
+ attr_accessor :category
1662
+ # Description of the line item.
1663
+ attr_accessor :description
1664
+ # Descriptive name of the line item.
1665
+ attr_accessor :name
1666
+ # Quantity of the line item. Must be a positive number.
1667
+ attr_accessor :quantity
1668
+ # Client facing stock keeping unit, article number or similar.
1669
+ attr_accessor :sku
1670
+ # The Stripe account ID of the connected account that sells the item.
1671
+ attr_accessor :sold_by
1672
+ # The tax information for the line item.
1673
+ attr_accessor :tax
1674
+ # Price for a single unit of the line item in minor units. Cannot be a negative number.
1675
+ attr_accessor :unit_amount
1676
+
1677
+ def initialize(
1678
+ category: nil,
1679
+ description: nil,
1680
+ name: nil,
1681
+ quantity: nil,
1682
+ sku: nil,
1683
+ sold_by: nil,
1684
+ tax: nil,
1685
+ unit_amount: nil
1686
+ )
1687
+ @category = category
1688
+ @description = description
1689
+ @name = name
1690
+ @quantity = quantity
1691
+ @sku = sku
1692
+ @sold_by = sold_by
1693
+ @tax = tax
1694
+ @unit_amount = unit_amount
1695
+ end
1696
+ end
1697
+ # Controls when the funds will be captured from the customer's account.
1698
+ attr_accessor :capture_method
1699
+ # The line items purchased by the customer.
1700
+ attr_accessor :line_items
1701
+ # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to.
1702
+ attr_accessor :preferred_locale
1703
+ # 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.
1704
+ attr_accessor :reference
1705
+ # 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.
1706
+ attr_accessor :reference_id
1707
+ # The risk correlation ID for an on-session payment using a saved PayPal payment method.
1708
+ attr_accessor :risk_correlation_id
1709
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1710
+ #
1711
+ # 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.
1712
+ #
1713
+ # 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.
1714
+ #
1715
+ # 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).
1716
+ #
1717
+ # 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`.
1718
+ attr_accessor :setup_future_usage
1719
+ # 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.
1720
+ attr_accessor :subsellers
1721
+
1722
+ def initialize(
1723
+ capture_method: nil,
1724
+ line_items: nil,
1725
+ preferred_locale: nil,
1726
+ reference: nil,
1727
+ reference_id: nil,
1728
+ risk_correlation_id: nil,
1729
+ setup_future_usage: nil,
1730
+ subsellers: nil
1731
+ )
1732
+ @capture_method = capture_method
1733
+ @line_items = line_items
1734
+ @preferred_locale = preferred_locale
1735
+ @reference = reference
1736
+ @reference_id = reference_id
1737
+ @risk_correlation_id = risk_correlation_id
1738
+ @setup_future_usage = setup_future_usage
1739
+ @subsellers = subsellers
1740
+ end
1741
+ end
1742
+
1743
+ class SepaDebit < Stripe::RequestParams
1744
+ class MandateOptions < Stripe::RequestParams
1745
+ # 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'.
1746
+ attr_accessor :reference_prefix
1747
+
1748
+ def initialize(reference_prefix: nil)
1749
+ @reference_prefix = reference_prefix
1750
+ end
1751
+ end
1752
+ # Additional fields for Mandate creation
1753
+ attr_accessor :mandate_options
1754
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1755
+ #
1756
+ # 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.
1757
+ #
1758
+ # 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.
1759
+ #
1760
+ # 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).
1761
+ #
1762
+ # 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`.
1763
+ attr_accessor :setup_future_usage
1764
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
1765
+ attr_accessor :target_date
1766
+
1767
+ def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil)
1768
+ @mandate_options = mandate_options
1769
+ @setup_future_usage = setup_future_usage
1770
+ @target_date = target_date
1771
+ end
1772
+ end
1773
+
1774
+ class Sofort < Stripe::RequestParams
1775
+ # Language shown to the payer on redirect.
1776
+ attr_accessor :preferred_language
1777
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1778
+ #
1779
+ # 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.
1780
+ #
1781
+ # 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.
1782
+ #
1783
+ # 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).
1784
+ #
1785
+ # 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`.
1786
+ attr_accessor :setup_future_usage
1787
+
1788
+ def initialize(preferred_language: nil, setup_future_usage: nil)
1789
+ @preferred_language = preferred_language
1790
+ @setup_future_usage = setup_future_usage
1791
+ end
1792
+ end
1793
+
1794
+ class WechatPay < Stripe::RequestParams
1795
+ # The app ID registered with WeChat Pay. Only required when client is ios or android.
1796
+ attr_accessor :app_id
1797
+ # The client type that the end customer will pay from
1798
+ attr_accessor :client
1799
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1800
+ #
1801
+ # 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.
1802
+ #
1803
+ # 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.
1804
+ #
1805
+ # 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).
1806
+ #
1807
+ # 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`.
1808
+ attr_accessor :setup_future_usage
1809
+
1810
+ def initialize(app_id: nil, client: nil, setup_future_usage: nil)
1811
+ @app_id = app_id
1812
+ @client = client
1813
+ @setup_future_usage = setup_future_usage
1814
+ end
1815
+ end
1816
+ # If paying by `acss_debit`, this sub-hash contains details about the ACSS Debit payment method options to pass to the order's PaymentIntent.
1817
+ attr_accessor :acss_debit
1818
+ # If paying by `afterpay_clearpay`, this sub-hash contains details about the AfterpayClearpay payment method options to pass to the order's PaymentIntent.
1819
+ attr_accessor :afterpay_clearpay
1820
+ # If paying by `alipay`, this sub-hash contains details about the Alipay payment method options to pass to the order's PaymentIntent.
1821
+ attr_accessor :alipay
1822
+ # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the order's PaymentIntent.
1823
+ attr_accessor :bancontact
1824
+ # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the order's PaymentIntent.
1825
+ attr_accessor :card
1826
+ # If paying by `customer_balance`, this sub-hash contains details about the Customer Balance payment method options to pass to the order's PaymentIntent.
1827
+ attr_accessor :customer_balance
1828
+ # If paying by `ideal`, this sub-hash contains details about the iDEAL payment method options to pass to the order's PaymentIntent.
1829
+ attr_accessor :ideal
1830
+ # If paying by `klarna`, this sub-hash contains details about the Klarna payment method options to pass to the order's PaymentIntent.
1831
+ attr_accessor :klarna
1832
+ # If paying by `link`, this sub-hash contains details about the Link payment method options to pass to the order's PaymentIntent.
1833
+ attr_accessor :link
1834
+ # If paying by `oxxo`, this sub-hash contains details about the OXXO payment method options to pass to the order's PaymentIntent.
1835
+ attr_accessor :oxxo
1836
+ # If paying by `p24`, this sub-hash contains details about the P24 payment method options to pass to the order's PaymentIntent.
1837
+ attr_accessor :p24
1838
+ # If paying by `paypal`, this sub-hash contains details about the PayPal payment method options to pass to the order's PaymentIntent.
1839
+ attr_accessor :paypal
1840
+ # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Debit payment method options to pass to the order's PaymentIntent.
1841
+ attr_accessor :sepa_debit
1842
+ # If paying by `sofort`, this sub-hash contains details about the Sofort payment method options to pass to the order's PaymentIntent.
1843
+ attr_accessor :sofort
1844
+ # If paying by `wechat_pay`, this sub-hash contains details about the WeChat Pay payment method options to pass to the order's PaymentIntent.
1845
+ attr_accessor :wechat_pay
1846
+
1847
+ def initialize(
1848
+ acss_debit: nil,
1849
+ afterpay_clearpay: nil,
1850
+ alipay: nil,
1851
+ bancontact: nil,
1852
+ card: nil,
1853
+ customer_balance: nil,
1854
+ ideal: nil,
1855
+ klarna: nil,
1856
+ link: nil,
1857
+ oxxo: nil,
1858
+ p24: nil,
1859
+ paypal: nil,
1860
+ sepa_debit: nil,
1861
+ sofort: nil,
1862
+ wechat_pay: nil
1863
+ )
1864
+ @acss_debit = acss_debit
1865
+ @afterpay_clearpay = afterpay_clearpay
1866
+ @alipay = alipay
1867
+ @bancontact = bancontact
1868
+ @card = card
1869
+ @customer_balance = customer_balance
1870
+ @ideal = ideal
1871
+ @klarna = klarna
1872
+ @link = link
1873
+ @oxxo = oxxo
1874
+ @p24 = p24
1875
+ @paypal = paypal
1876
+ @sepa_debit = sepa_debit
1877
+ @sofort = sofort
1878
+ @wechat_pay = wechat_pay
1879
+ end
1880
+ end
1881
+
1882
+ class TransferData < Stripe::RequestParams
1883
+ # 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.
1884
+ attr_accessor :amount
1885
+ # ID of the Connected account receiving the transfer.
1886
+ attr_accessor :destination
1887
+
1888
+ def initialize(amount: nil, destination: nil)
1889
+ @amount = amount
1890
+ @destination = destination
1891
+ end
1892
+ end
1893
+ # 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.
1894
+ attr_accessor :application_fee_amount
1895
+ # PaymentMethod-specific configuration to provide to the order's PaymentIntent.
1896
+ attr_accessor :payment_method_options
1897
+ # 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).
1898
+ attr_accessor :payment_method_types
1899
+ # The URL to redirect the customer to after they authenticate their payment.
1900
+ attr_accessor :return_url
1901
+ # 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.
1902
+ attr_accessor :statement_descriptor
1903
+ # 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.
1904
+ attr_accessor :statement_descriptor_suffix
1905
+ # Provides configuration for completing a transfer for the order after it is paid.
1906
+ attr_accessor :transfer_data
1907
+
1908
+ def initialize(
1909
+ application_fee_amount: nil,
1910
+ payment_method_options: nil,
1911
+ payment_method_types: nil,
1912
+ return_url: nil,
1913
+ statement_descriptor: nil,
1914
+ statement_descriptor_suffix: nil,
1915
+ transfer_data: nil
1916
+ )
1917
+ @application_fee_amount = application_fee_amount
1918
+ @payment_method_options = payment_method_options
1919
+ @payment_method_types = payment_method_types
1920
+ @return_url = return_url
1921
+ @statement_descriptor = statement_descriptor
1922
+ @statement_descriptor_suffix = statement_descriptor_suffix
1923
+ @transfer_data = transfer_data
1924
+ end
1925
+ end
1926
+ # Settings describing how the order should configure generated PaymentIntents.
1927
+ attr_accessor :settings
1928
+
1929
+ def initialize(settings: nil)
1930
+ @settings = settings
1931
+ end
1932
+ end
1933
+
1934
+ class ShippingCost < Stripe::RequestParams
1935
+ class ShippingRateData < Stripe::RequestParams
1936
+ class DeliveryEstimate < Stripe::RequestParams
1937
+ class Maximum < Stripe::RequestParams
1938
+ # A unit of time.
1939
+ attr_accessor :unit
1940
+ # Must be greater than 0.
1941
+ attr_accessor :value
1942
+
1943
+ def initialize(unit: nil, value: nil)
1944
+ @unit = unit
1945
+ @value = value
1946
+ end
1947
+ end
1948
+
1949
+ class Minimum < Stripe::RequestParams
1950
+ # A unit of time.
1951
+ attr_accessor :unit
1952
+ # Must be greater than 0.
1953
+ attr_accessor :value
1954
+
1955
+ def initialize(unit: nil, value: nil)
1956
+ @unit = unit
1957
+ @value = value
1958
+ end
1959
+ end
1960
+ # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
1961
+ attr_accessor :maximum
1962
+ # The lower bound of the estimated range. If empty, represents no lower bound.
1963
+ attr_accessor :minimum
1964
+
1965
+ def initialize(maximum: nil, minimum: nil)
1966
+ @maximum = maximum
1967
+ @minimum = minimum
1968
+ end
1969
+ end
1970
+
1971
+ class FixedAmount < Stripe::RequestParams
1972
+ class CurrencyOptions < Stripe::RequestParams
1973
+ # A non-negative integer in cents representing how much to charge.
1974
+ attr_accessor :amount
1975
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
1976
+ attr_accessor :tax_behavior
1977
+
1978
+ def initialize(amount: nil, tax_behavior: nil)
1979
+ @amount = amount
1980
+ @tax_behavior = tax_behavior
1981
+ end
1982
+ end
1983
+ # A non-negative integer in cents representing how much to charge.
1984
+ attr_accessor :amount
1985
+ # 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).
1986
+ attr_accessor :currency
1987
+ # 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).
1988
+ attr_accessor :currency_options
1989
+
1990
+ def initialize(amount: nil, currency: nil, currency_options: nil)
1991
+ @amount = amount
1992
+ @currency = currency
1993
+ @currency_options = currency_options
1994
+ end
1995
+ end
1996
+ # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
1997
+ attr_accessor :delivery_estimate
1998
+ # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
1999
+ attr_accessor :display_name
2000
+ # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
2001
+ attr_accessor :fixed_amount
2002
+ # 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`.
2003
+ attr_accessor :metadata
2004
+ # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
2005
+ attr_accessor :tax_behavior
2006
+ # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
2007
+ attr_accessor :tax_code
2008
+ # The type of calculation to use on the shipping rate.
2009
+ attr_accessor :type
2010
+
2011
+ def initialize(
2012
+ delivery_estimate: nil,
2013
+ display_name: nil,
2014
+ fixed_amount: nil,
2015
+ metadata: nil,
2016
+ tax_behavior: nil,
2017
+ tax_code: nil,
2018
+ type: nil
2019
+ )
2020
+ @delivery_estimate = delivery_estimate
2021
+ @display_name = display_name
2022
+ @fixed_amount = fixed_amount
2023
+ @metadata = metadata
2024
+ @tax_behavior = tax_behavior
2025
+ @tax_code = tax_code
2026
+ @type = type
2027
+ end
2028
+ end
2029
+ # The ID of the shipping rate to use for this order.
2030
+ attr_accessor :shipping_rate
2031
+ # Parameters to create a new ad-hoc shipping rate for this order.
2032
+ attr_accessor :shipping_rate_data
2033
+
2034
+ def initialize(shipping_rate: nil, shipping_rate_data: nil)
2035
+ @shipping_rate = shipping_rate
2036
+ @shipping_rate_data = shipping_rate_data
2037
+ end
2038
+ end
2039
+
2040
+ class ShippingDetails < Stripe::RequestParams
2041
+ class Address < Stripe::RequestParams
2042
+ # City, district, suburb, town, or village.
2043
+ attr_accessor :city
2044
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
2045
+ attr_accessor :country
2046
+ # Address line 1 (e.g., street, PO Box, or company name).
2047
+ attr_accessor :line1
2048
+ # Address line 2 (e.g., apartment, suite, unit, or building).
2049
+ attr_accessor :line2
2050
+ # ZIP or postal code.
2051
+ attr_accessor :postal_code
2052
+ # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX".
2053
+ attr_accessor :state
2054
+
2055
+ def initialize(
2056
+ city: nil,
2057
+ country: nil,
2058
+ line1: nil,
2059
+ line2: nil,
2060
+ postal_code: nil,
2061
+ state: nil
2062
+ )
2063
+ @city = city
2064
+ @country = country
2065
+ @line1 = line1
2066
+ @line2 = line2
2067
+ @postal_code = postal_code
2068
+ @state = state
2069
+ end
2070
+ end
2071
+ # The shipping address for the order.
2072
+ attr_accessor :address
2073
+ # The name of the recipient of the order.
2074
+ attr_accessor :name
2075
+ # The phone number (including extension) for the recipient of the order.
2076
+ attr_accessor :phone
2077
+
2078
+ def initialize(address: nil, name: nil, phone: nil)
2079
+ @address = address
2080
+ @name = name
2081
+ @phone = phone
2082
+ end
2083
+ end
2084
+
2085
+ class TaxDetails < Stripe::RequestParams
2086
+ class TaxId < Stripe::RequestParams
2087
+ # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `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`
2088
+ attr_accessor :type
2089
+ # Value of the tax ID.
2090
+ attr_accessor :value
2091
+
2092
+ def initialize(type: nil, value: nil)
2093
+ @type = type
2094
+ @value = value
2095
+ end
2096
+ end
2097
+ # The purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`.
2098
+ attr_accessor :tax_exempt
2099
+ # The purchaser's tax IDs to be used for this order.
2100
+ attr_accessor :tax_ids
2101
+
2102
+ def initialize(tax_exempt: nil, tax_ids: nil)
2103
+ @tax_exempt = tax_exempt
2104
+ @tax_ids = tax_ids
2105
+ end
2106
+ end
2107
+ # Settings for automatic tax calculation for this order.
2108
+ attr_accessor :automatic_tax
2109
+ # 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.
2110
+ attr_accessor :billing_details
2111
+ # The credits to apply to the order, only `gift_card` currently supported. Pass the empty string `""` to unset this field.
2112
+ attr_accessor :credits
2113
+ # 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).
2114
+ attr_accessor :currency
2115
+ # The customer associated with this order.
2116
+ attr_accessor :customer
2117
+ # An arbitrary string attached to the object. Often useful for displaying to users.
2118
+ attr_accessor :description
2119
+ # The coupons, promotion codes, and/or discounts to apply to the order. Pass the empty string `""` to unset this field.
2120
+ attr_accessor :discounts
2121
+ # Specifies which fields in the response should be expanded.
2122
+ attr_accessor :expand
2123
+ # The IP address of the purchaser for this order.
2124
+ attr_accessor :ip_address
2125
+ # A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost.
2126
+ attr_accessor :line_items
2127
+ # 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`.
2128
+ attr_accessor :metadata
2129
+ # Payment information associated with the order, including payment settings.
2130
+ attr_accessor :payment
2131
+ # Settings for the customer cost of shipping for this order.
2132
+ attr_accessor :shipping_cost
2133
+ # Shipping details for the order.
2134
+ attr_accessor :shipping_details
2135
+ # Additional tax details about the purchaser to be used for this order.
2136
+ attr_accessor :tax_details
2137
+
2138
+ def initialize(
2139
+ automatic_tax: nil,
2140
+ billing_details: nil,
2141
+ credits: nil,
2142
+ currency: nil,
2143
+ customer: nil,
2144
+ description: nil,
2145
+ discounts: nil,
2146
+ expand: nil,
2147
+ ip_address: nil,
2148
+ line_items: nil,
2149
+ metadata: nil,
2150
+ payment: nil,
2151
+ shipping_cost: nil,
2152
+ shipping_details: nil,
2153
+ tax_details: nil
2154
+ )
2155
+ @automatic_tax = automatic_tax
2156
+ @billing_details = billing_details
2157
+ @credits = credits
2158
+ @currency = currency
2159
+ @customer = customer
2160
+ @description = description
2161
+ @discounts = discounts
2162
+ @expand = expand
2163
+ @ip_address = ip_address
2164
+ @line_items = line_items
2165
+ @metadata = metadata
2166
+ @payment = payment
2167
+ @shipping_cost = shipping_cost
2168
+ @shipping_details = shipping_details
2169
+ @tax_details = tax_details
2170
+ end
2171
+ end
2172
+
2173
+ class CancelParams < Stripe::RequestParams
2174
+ # Specifies which fields in the response should be expanded.
2175
+ attr_accessor :expand
2176
+
2177
+ def initialize(expand: nil)
2178
+ @expand = expand
2179
+ end
2180
+ end
2181
+
2182
+ class ReopenParams < Stripe::RequestParams
2183
+ # Specifies which fields in the response should be expanded.
2184
+ attr_accessor :expand
2185
+
2186
+ def initialize(expand: nil)
2187
+ @expand = expand
2188
+ end
2189
+ end
2190
+
2191
+ class SubmitParams < Stripe::RequestParams
2192
+ # Specifies which fields in the response should be expanded.
2193
+ attr_accessor :expand
2194
+ # `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.
2195
+ attr_accessor :expected_total
2196
+
2197
+ def initialize(expand: nil, expected_total: nil)
2198
+ @expand = expand
2199
+ @expected_total = expected_total
2200
+ end
2201
+ end
2202
+
2203
+ # Cancels the order as well as the payment intent if one is attached.
2204
+ def cancel(id, params = {}, opts = {})
2205
+ request(
2206
+ method: :post,
2207
+ path: format("/v1/orders/%<id>s/cancel", { id: CGI.escape(id) }),
2208
+ params: params,
2209
+ opts: opts,
2210
+ base_address: :api
2211
+ )
2212
+ end
2213
+
2214
+ # Creates a new open order object.
2215
+ def create(params = {}, opts = {})
2216
+ request(method: :post, path: "/v1/orders", params: params, opts: opts, base_address: :api)
2217
+ end
2218
+
2219
+ # Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first.
2220
+ def list(params = {}, opts = {})
2221
+ request(method: :get, path: "/v1/orders", params: params, opts: opts, base_address: :api)
2222
+ end
2223
+
2224
+ # Reopens a submitted order.
2225
+ def reopen(id, params = {}, opts = {})
2226
+ request(
2227
+ method: :post,
2228
+ path: format("/v1/orders/%<id>s/reopen", { id: CGI.escape(id) }),
2229
+ params: params,
2230
+ opts: opts,
2231
+ base_address: :api
2232
+ )
2233
+ end
2234
+
2235
+ # Retrieves the details of an existing order. Supply the unique order ID from either an order creation request or the order list, and Stripe will return the corresponding order information.
2236
+ def retrieve(id, params = {}, opts = {})
2237
+ request(
2238
+ method: :get,
2239
+ path: format("/v1/orders/%<id>s", { id: CGI.escape(id) }),
2240
+ params: params,
2241
+ opts: opts,
2242
+ base_address: :api
2243
+ )
2244
+ end
2245
+
2246
+ # 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.
2247
+ def submit(id, params = {}, opts = {})
2248
+ request(
2249
+ method: :post,
2250
+ path: format("/v1/orders/%<id>s/submit", { id: CGI.escape(id) }),
2251
+ params: params,
2252
+ opts: opts,
2253
+ base_address: :api
2254
+ )
2255
+ end
2256
+
2257
+ # Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
2258
+ def update(id, params = {}, opts = {})
2259
+ request(
2260
+ method: :post,
2261
+ path: format("/v1/orders/%<id>s", { id: CGI.escape(id) }),
2262
+ params: params,
2263
+ opts: opts,
2264
+ base_address: :api
2265
+ )
2266
+ end
2267
+ end
2268
+ end