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