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