stripe 15.2.0 → 15.3.0.pre.beta.1

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