stripe 13.5.0 → 13.6.0.pre.beta.1

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