stripe 13.3.0 → 13.4.0.pre.beta.2

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