stripe 15.3.0 → 15.4.0.pre.beta.1

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