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