stripe 15.5.0 → 15.6.0.pre.alpha.2

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