stripe 15.2.0 → 15.3.0.pre.beta.1

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