stripe 13.3.0 → 13.4.0.pre.beta.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (743) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1416 -645
  3. data/OPENAPI_VERSION +1 -1
  4. data/VERSION +1 -1
  5. data/lib/stripe/api_operations/request.rb +1 -0
  6. data/lib/stripe/api_requestor.rb +1 -0
  7. data/lib/stripe/object_types.rb +32 -0
  8. data/lib/stripe/request_params.rb +24 -0
  9. data/lib/stripe/request_signing_authenticator.rb +79 -0
  10. data/lib/stripe/resources/account.rb +5071 -0
  11. data/lib/stripe/resources/account_link.rb +54 -0
  12. data/lib/stripe/resources/account_notice.rb +132 -0
  13. data/lib/stripe/resources/account_session.rb +877 -0
  14. data/lib/stripe/resources/apple_pay_domain.rb +63 -0
  15. data/lib/stripe/resources/application.rb +20 -0
  16. data/lib/stripe/resources/application_fee.rb +96 -0
  17. data/lib/stripe/resources/application_fee_refund.rb +17 -0
  18. data/lib/stripe/resources/apps/secret.rb +141 -0
  19. data/lib/stripe/resources/balance.rb +131 -0
  20. data/lib/stripe/resources/balance_transaction.rb +112 -0
  21. data/lib/stripe/resources/bank_account.rb +84 -2
  22. data/lib/stripe/resources/billing/alert.rb +144 -0
  23. data/lib/stripe/resources/billing/alert_triggered.rb +26 -0
  24. data/lib/stripe/resources/billing/credit_balance_summary.rb +77 -0
  25. data/lib/stripe/resources/billing/credit_balance_transaction.rb +116 -0
  26. data/lib/stripe/resources/billing/credit_grant.rb +203 -0
  27. data/lib/stripe/resources/billing/meter.rb +178 -0
  28. data/lib/stripe/resources/billing/meter_error_report.rb +59 -0
  29. data/lib/stripe/resources/billing/meter_event.rb +35 -0
  30. data/lib/stripe/resources/billing/meter_event_adjustment.rb +43 -0
  31. data/lib/stripe/resources/billing/meter_event_summary.rb +15 -0
  32. data/lib/stripe/resources/billing_portal/configuration.rb +562 -0
  33. data/lib/stripe/resources/billing_portal/session.rb +271 -0
  34. data/lib/stripe/resources/capability.rb +84 -0
  35. data/lib/stripe/resources/capital/financing_offer.rb +188 -0
  36. data/lib/stripe/resources/capital/financing_summary.rb +64 -0
  37. data/lib/stripe/resources/capital/financing_transaction.rb +123 -0
  38. data/lib/stripe/resources/card.rb +79 -0
  39. data/lib/stripe/resources/cash_balance.rb +17 -0
  40. data/lib/stripe/resources/charge.rb +3026 -0
  41. data/lib/stripe/resources/checkout/session.rb +3654 -0
  42. data/lib/stripe/resources/climate/order.rb +176 -0
  43. data/lib/stripe/resources/climate/product.rb +56 -0
  44. data/lib/stripe/resources/climate/supplier.rb +54 -0
  45. data/lib/stripe/resources/confirmation_token.rb +1520 -0
  46. data/lib/stripe/resources/connect_collection_transfer.rb +24 -0
  47. data/lib/stripe/resources/country_spec.rb +63 -0
  48. data/lib/stripe/resources/coupon.rb +198 -0
  49. data/lib/stripe/resources/credit_note.rb +660 -0
  50. data/lib/stripe/resources/credit_note_line_item.rb +65 -0
  51. data/lib/stripe/resources/customer.rb +840 -0
  52. data/lib/stripe/resources/customer_balance_transaction.rb +27 -0
  53. data/lib/stripe/resources/customer_cash_balance_transaction.rb +109 -0
  54. data/lib/stripe/resources/customer_session.rb +159 -0
  55. data/lib/stripe/resources/discount.rb +29 -0
  56. data/lib/stripe/resources/dispute.rb +619 -0
  57. data/lib/stripe/resources/entitlements/active_entitlement.rb +46 -0
  58. data/lib/stripe/resources/entitlements/active_entitlement_summary.rb +23 -0
  59. data/lib/stripe/resources/entitlements/feature.rb +90 -0
  60. data/lib/stripe/resources/ephemeral_key.rb +21 -0
  61. data/lib/stripe/resources/event.rb +130 -0
  62. data/lib/stripe/resources/exchange_rate.rb +33 -0
  63. data/lib/stripe/resources/file.rb +111 -0
  64. data/lib/stripe/resources/file_link.rb +112 -0
  65. data/lib/stripe/resources/financial_connections/account.rb +260 -0
  66. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +27 -0
  67. data/lib/stripe/resources/financial_connections/account_owner.rb +17 -0
  68. data/lib/stripe/resources/financial_connections/account_ownership.rb +9 -0
  69. data/lib/stripe/resources/financial_connections/institution.rb +99 -0
  70. data/lib/stripe/resources/financial_connections/session.rb +159 -0
  71. data/lib/stripe/resources/financial_connections/transaction.rb +101 -0
  72. data/lib/stripe/resources/forwarding/request.rb +165 -0
  73. data/lib/stripe/resources/funding_instructions.rb +308 -0
  74. data/lib/stripe/resources/gift_cards/card.rb +217 -0
  75. data/lib/stripe/resources/gift_cards/transaction.rb +281 -0
  76. data/lib/stripe/resources/identity/verification_report.rb +266 -0
  77. data/lib/stripe/resources/identity/verification_session.rb +361 -0
  78. data/lib/stripe/resources/invoice.rb +8078 -0
  79. data/lib/stripe/resources/invoice_item.rb +445 -0
  80. data/lib/stripe/resources/invoice_line_item.rb +333 -0
  81. data/lib/stripe/resources/invoice_payment.rb +56 -0
  82. data/lib/stripe/resources/invoice_rendering_template.rb +67 -0
  83. data/lib/stripe/resources/issuing/authorization.rb +1117 -2
  84. data/lib/stripe/resources/issuing/card.rb +666 -0
  85. data/lib/stripe/resources/issuing/cardholder.rb +658 -0
  86. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +611 -0
  87. data/lib/stripe/resources/issuing/dispute.rb +790 -0
  88. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +84 -0
  89. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +95 -0
  90. data/lib/stripe/resources/issuing/personalization_design.rb +285 -0
  91. data/lib/stripe/resources/issuing/physical_bundle.rb +63 -0
  92. data/lib/stripe/resources/issuing/settlement.rb +49 -0
  93. data/lib/stripe/resources/issuing/token.rb +175 -0
  94. data/lib/stripe/resources/issuing/transaction.rb +927 -0
  95. data/lib/stripe/resources/line_item.rb +75 -0
  96. data/lib/stripe/resources/login_link.rb +7 -0
  97. data/lib/stripe/resources/mandate.rb +169 -0
  98. data/lib/stripe/resources/margin.rb +124 -0
  99. data/lib/stripe/resources/order.rb +2850 -0
  100. data/lib/stripe/resources/payment_attempt_record.rb +184 -0
  101. data/lib/stripe/resources/payment_intent.rb +12864 -0
  102. data/lib/stripe/resources/payment_link.rb +1563 -0
  103. data/lib/stripe/resources/payment_method.rb +1638 -0
  104. data/lib/stripe/resources/payment_method_configuration.rb +2844 -0
  105. data/lib/stripe/resources/payment_method_domain.rb +153 -0
  106. data/lib/stripe/resources/payment_record.rb +715 -0
  107. data/lib/stripe/resources/payout.rb +218 -0
  108. data/lib/stripe/resources/person.rb +263 -0
  109. data/lib/stripe/resources/plan.rb +317 -0
  110. data/lib/stripe/resources/price.rb +649 -0
  111. data/lib/stripe/resources/product.rb +536 -0
  112. data/lib/stripe/resources/product_feature.rb +12 -0
  113. data/lib/stripe/resources/promotion_code.rb +221 -0
  114. data/lib/stripe/resources/quote.rb +2946 -0
  115. data/lib/stripe/resources/quote_line.rb +274 -0
  116. data/lib/stripe/resources/quote_preview_invoice.rb +652 -0
  117. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +362 -0
  118. data/lib/stripe/resources/radar/early_fraud_warning.rb +77 -0
  119. data/lib/stripe/resources/radar/value_list.rb +125 -0
  120. data/lib/stripe/resources/radar/value_list_item.rb +95 -0
  121. data/lib/stripe/resources/refund.rb +397 -0
  122. data/lib/stripe/resources/reporting/report_run.rb +150 -0
  123. data/lib/stripe/resources/reporting/report_type.rb +36 -0
  124. data/lib/stripe/resources/reserve_transaction.rb +22 -0
  125. data/lib/stripe/resources/reversal.rb +21 -0
  126. data/lib/stripe/resources/review.rb +108 -0
  127. data/lib/stripe/resources/setup_attempt.rb +373 -0
  128. data/lib/stripe/resources/setup_intent.rb +3834 -0
  129. data/lib/stripe/resources/shipping_rate.rb +259 -0
  130. data/lib/stripe/resources/sigma/scheduled_query_run.rb +54 -0
  131. data/lib/stripe/resources/source.rb +1239 -0
  132. data/lib/stripe/resources/source_mandate_notification.rb +66 -0
  133. data/lib/stripe/resources/source_transaction.rb +85 -0
  134. data/lib/stripe/resources/subscription.rb +2057 -0
  135. data/lib/stripe/resources/subscription_item.rb +433 -0
  136. data/lib/stripe/resources/subscription_schedule.rb +2402 -0
  137. data/lib/stripe/resources/tax/association.rb +89 -0
  138. data/lib/stripe/resources/tax/calculation.rb +387 -0
  139. data/lib/stripe/resources/tax/calculation_line_item.rb +56 -0
  140. data/lib/stripe/resources/tax/form.rb +220 -0
  141. data/lib/stripe/resources/tax/registration.rb +2382 -0
  142. data/lib/stripe/resources/tax/settings.rb +126 -0
  143. data/lib/stripe/resources/tax/transaction.rb +267 -0
  144. data/lib/stripe/resources/tax/transaction_line_item.rb +31 -0
  145. data/lib/stripe/resources/tax_code.rb +35 -0
  146. data/lib/stripe/resources/tax_deducted_at_source.rb +22 -0
  147. data/lib/stripe/resources/tax_id.rb +121 -0
  148. data/lib/stripe/resources/tax_rate.rb +200 -0
  149. data/lib/stripe/resources/terminal/configuration.rb +1011 -0
  150. data/lib/stripe/resources/terminal/connection_token.rb +18 -0
  151. data/lib/stripe/resources/terminal/location.rb +175 -0
  152. data/lib/stripe/resources/terminal/reader.rb +782 -0
  153. data/lib/stripe/resources/terminal/reader_collected_data.rb +40 -0
  154. data/lib/stripe/resources/test_helpers/test_clock.rb +86 -0
  155. data/lib/stripe/resources/token.rb +1149 -0
  156. data/lib/stripe/resources/topup.rb +174 -0
  157. data/lib/stripe/resources/transfer.rb +153 -0
  158. data/lib/stripe/resources/treasury/credit_reversal.rb +92 -0
  159. data/lib/stripe/resources/treasury/debit_reversal.rb +103 -0
  160. data/lib/stripe/resources/treasury/financial_account.rb +772 -0
  161. data/lib/stripe/resources/treasury/financial_account_features.rb +191 -0
  162. data/lib/stripe/resources/treasury/inbound_transfer.rb +235 -0
  163. data/lib/stripe/resources/treasury/outbound_payment.rb +495 -0
  164. data/lib/stripe/resources/treasury/outbound_transfer.rb +387 -0
  165. data/lib/stripe/resources/treasury/received_credit.rb +283 -0
  166. data/lib/stripe/resources/treasury/received_debit.rb +244 -0
  167. data/lib/stripe/resources/treasury/transaction.rb +176 -0
  168. data/lib/stripe/resources/treasury/transaction_entry.rb +157 -0
  169. data/lib/stripe/resources/usage_record.rb +13 -0
  170. data/lib/stripe/resources/usage_record_summary.rb +21 -0
  171. data/lib/stripe/resources/v2/amount.rb +9 -0
  172. data/lib/stripe/resources/v2/billing/meter_event.rb +18 -0
  173. data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +21 -0
  174. data/lib/stripe/resources/v2/billing/meter_event_session.rb +14 -0
  175. data/lib/stripe/resources/v2/event.rb +27 -0
  176. data/lib/stripe/resources/v2/event_destination.rb +59 -0
  177. data/lib/stripe/resources/webhook_endpoint.rb +122 -0
  178. data/lib/stripe/resources.rb +31 -0
  179. data/lib/stripe/services/account_capability_service.rb +32 -0
  180. data/lib/stripe/services/account_external_account_service.rb +250 -0
  181. data/lib/stripe/services/account_link_service.rb +46 -0
  182. data/lib/stripe/services/account_login_link_service.rb +9 -0
  183. data/lib/stripe/services/account_notice_service.rb +101 -0
  184. data/lib/stripe/services/account_person_service.rb +875 -0
  185. data/lib/stripe/services/account_service.rb +4351 -0
  186. data/lib/stripe/services/account_session_service.rb +664 -0
  187. data/lib/stripe/services/apple_pay_domain_service.rb +51 -0
  188. data/lib/stripe/services/application_fee_refund_service.rb +54 -0
  189. data/lib/stripe/services/application_fee_service.rb +57 -0
  190. data/lib/stripe/services/apps/secret_service.rb +116 -0
  191. data/lib/stripe/services/balance_service.rb +9 -0
  192. data/lib/stripe/services/balance_transaction_service.rb +69 -0
  193. data/lib/stripe/services/billing/alert_service.rb +113 -0
  194. data/lib/stripe/services/billing/credit_balance_summary_service.rb +37 -0
  195. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +40 -0
  196. data/lib/stripe/services/billing/credit_grant_service.rb +151 -0
  197. data/lib/stripe/services/billing/meter_event_adjustment_service.rb +26 -0
  198. data/lib/stripe/services/billing/meter_event_service.rb +21 -0
  199. data/lib/stripe/services/billing/meter_event_summary_service.rb +39 -0
  200. data/lib/stripe/services/billing/meter_service.rb +130 -0
  201. data/lib/stripe/services/billing_portal/configuration_service.rb +444 -0
  202. data/lib/stripe/services/billing_portal/session_service.rb +173 -0
  203. data/lib/stripe/services/capital/financing_offer_service.rb +112 -0
  204. data/lib/stripe/services/capital/financing_summary_service.rb +28 -0
  205. data/lib/stripe/services/capital/financing_transaction_service.rb +79 -0
  206. data/lib/stripe/services/capital_service.rb +15 -0
  207. data/lib/stripe/services/charge_service.rb +1736 -0
  208. data/lib/stripe/services/checkout/session_line_item_service.rb +18 -0
  209. data/lib/stripe/services/checkout/session_service.rb +2465 -0
  210. data/lib/stripe/services/climate/order_service.rb +102 -0
  211. data/lib/stripe/services/climate/product_service.rb +27 -0
  212. data/lib/stripe/services/climate/supplier_service.rb +27 -0
  213. data/lib/stripe/services/confirmation_token_service.rb +9 -0
  214. data/lib/stripe/services/country_spec_service.rb +27 -0
  215. data/lib/stripe/services/coupon_service.rb +152 -0
  216. data/lib/stripe/services/credit_note_line_item_service.rb +18 -0
  217. data/lib/stripe/services/credit_note_preview_lines_service.rb +156 -0
  218. data/lib/stripe/services/credit_note_service.rb +373 -0
  219. data/lib/stripe/services/customer_balance_transaction_service.rb +63 -0
  220. data/lib/stripe/services/customer_cash_balance_service.rb +29 -0
  221. data/lib/stripe/services/customer_cash_balance_transaction_service.rb +27 -0
  222. data/lib/stripe/services/customer_funding_instructions_service.rb +42 -0
  223. data/lib/stripe/services/customer_payment_method_service.rb +40 -0
  224. data/lib/stripe/services/customer_payment_source_service.rb +179 -0
  225. data/lib/stripe/services/customer_service.rb +593 -0
  226. data/lib/stripe/services/customer_session_service.rb +96 -0
  227. data/lib/stripe/services/customer_tax_id_service.rb +45 -0
  228. data/lib/stripe/services/dispute_service.rb +374 -0
  229. data/lib/stripe/services/entitlements/active_entitlement_service.rb +36 -0
  230. data/lib/stripe/services/entitlements/feature_service.rb +76 -0
  231. data/lib/stripe/services/ephemeral_key_service.rb +36 -0
  232. data/lib/stripe/services/event_service.rb +65 -0
  233. data/lib/stripe/services/exchange_rate_service.rb +27 -0
  234. data/lib/stripe/services/file_link_service.rb +94 -0
  235. data/lib/stripe/services/file_service.rb +89 -0
  236. data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +37 -0
  237. data/lib/stripe/services/financial_connections/account_owner_service.rb +27 -0
  238. data/lib/stripe/services/financial_connections/account_service.rb +99 -1
  239. data/lib/stripe/services/financial_connections/institution_service.rb +57 -0
  240. data/lib/stripe/services/financial_connections/session_service.rb +97 -0
  241. data/lib/stripe/services/financial_connections/transaction_service.rb +70 -0
  242. data/lib/stripe/services/financial_connections_service.rb +2 -1
  243. data/lib/stripe/services/forwarding/request_service.rb +106 -0
  244. data/lib/stripe/services/gift_cards/card_service.rb +170 -0
  245. data/lib/stripe/services/gift_cards/transaction_service.rb +209 -0
  246. data/lib/stripe/services/gift_cards_service.rb +14 -0
  247. data/lib/stripe/services/identity/verification_report_service.rb +65 -0
  248. data/lib/stripe/services/identity/verification_session_service.rb +231 -0
  249. data/lib/stripe/services/invoice_item_service.rb +388 -0
  250. data/lib/stripe/services/invoice_line_item_service.rb +237 -0
  251. data/lib/stripe/services/invoice_payment_service.rb +55 -0
  252. data/lib/stripe/services/invoice_rendering_template_service.rb +51 -0
  253. data/lib/stripe/services/invoice_service.rb +5567 -1
  254. data/lib/stripe/services/invoice_upcoming_lines_service.rb +1864 -0
  255. data/lib/stripe/services/issuing/authorization_service.rb +104 -0
  256. data/lib/stripe/services/issuing/card_service.rb +455 -0
  257. data/lib/stripe/services/issuing/cardholder_service.rb +526 -0
  258. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +504 -0
  259. data/lib/stripe/services/issuing/dispute_service.rb +633 -0
  260. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +66 -0
  261. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +83 -0
  262. data/lib/stripe/services/issuing/personalization_design_service.rb +193 -0
  263. data/lib/stripe/services/issuing/physical_bundle_service.rb +40 -0
  264. data/lib/stripe/services/issuing/token_service.rb +73 -0
  265. data/lib/stripe/services/issuing/transaction_service.rb +81 -0
  266. data/lib/stripe/services/issuing_service.rb +5 -1
  267. data/lib/stripe/services/mandate_service.rb +9 -0
  268. data/lib/stripe/services/margin_service.rb +119 -0
  269. data/lib/stripe/services/order_line_item_service.rb +35 -0
  270. data/lib/stripe/services/order_service.rb +2254 -0
  271. data/lib/stripe/services/payment_attempt_record_service.rb +49 -0
  272. data/lib/stripe/services/payment_intent_service.rb +10894 -0
  273. data/lib/stripe/services/payment_link_line_item_service.rb +18 -0
  274. data/lib/stripe/services/payment_link_service.rb +1223 -0
  275. data/lib/stripe/services/payment_method_configuration_service.rb +2046 -0
  276. data/lib/stripe/services/payment_method_domain_service.rb +76 -0
  277. data/lib/stripe/services/payment_method_service.rb +864 -0
  278. data/lib/stripe/services/payment_record_service.rb +542 -0
  279. data/lib/stripe/services/payout_service.rb +159 -0
  280. data/lib/stripe/services/plan_service.rb +253 -0
  281. data/lib/stripe/services/price_service.rb +516 -0
  282. data/lib/stripe/services/product_feature_service.rb +42 -0
  283. data/lib/stripe/services/product_service.rb +459 -0
  284. data/lib/stripe/services/promotion_code_service.rb +178 -0
  285. data/lib/stripe/services/quote_computed_upfront_line_items_service.rb +18 -0
  286. data/lib/stripe/services/quote_line_item_service.rb +18 -0
  287. data/lib/stripe/services/quote_line_service.rb +35 -0
  288. data/lib/stripe/services/quote_preview_invoice_service.rb +35 -0
  289. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +35 -0
  290. data/lib/stripe/services/quote_service.rb +2319 -1
  291. data/lib/stripe/services/radar/early_fraud_warning_service.rb +61 -0
  292. data/lib/stripe/services/radar/value_list_item_service.rb +79 -0
  293. data/lib/stripe/services/radar/value_list_service.rb +103 -0
  294. data/lib/stripe/services/refund_service.rb +137 -0
  295. data/lib/stripe/services/reporting/report_run_service.rb +106 -0
  296. data/lib/stripe/services/reporting/report_type_service.rb +18 -0
  297. data/lib/stripe/services/review_service.rb +56 -0
  298. data/lib/stripe/services/setup_attempt_service.rb +51 -0
  299. data/lib/stripe/services/setup_intent_service.rb +3476 -0
  300. data/lib/stripe/services/shipping_rate_service.rb +200 -0
  301. data/lib/stripe/services/sigma/scheduled_query_run_service.rb +27 -0
  302. data/lib/stripe/services/source_service.rb +601 -0
  303. data/lib/stripe/services/source_transaction_service.rb +18 -0
  304. data/lib/stripe/services/subscription_item_service.rb +383 -0
  305. data/lib/stripe/services/subscription_item_usage_record_service.rb +18 -0
  306. data/lib/stripe/services/subscription_item_usage_record_summary_service.rb +18 -0
  307. data/lib/stripe/services/subscription_schedule_service.rb +2053 -0
  308. data/lib/stripe/services/subscription_service.rb +1722 -0
  309. data/lib/stripe/services/tax/association_service.rb +31 -0
  310. data/lib/stripe/services/tax/calculation_line_item_service.rb +18 -0
  311. data/lib/stripe/services/tax/calculation_service.rb +205 -0
  312. data/lib/stripe/services/tax/form_service.rb +100 -0
  313. data/lib/stripe/services/tax/registration_service.rb +1564 -0
  314. data/lib/stripe/services/tax/settings_service.rb +74 -0
  315. data/lib/stripe/services/tax/transaction_line_item_service.rb +18 -0
  316. data/lib/stripe/services/tax/transaction_service.rb +111 -0
  317. data/lib/stripe/services/tax_code_service.rb +27 -0
  318. data/lib/stripe/services/tax_id_service.rb +79 -0
  319. data/lib/stripe/services/tax_rate_service.rb +155 -0
  320. data/lib/stripe/services/tax_service.rb +3 -1
  321. data/lib/stripe/services/terminal/configuration_service.rb +793 -0
  322. data/lib/stripe/services/terminal/connection_token_service.rb +12 -0
  323. data/lib/stripe/services/terminal/location_service.rb +144 -0
  324. data/lib/stripe/services/terminal/reader_collected_data_service.rb +28 -0
  325. data/lib/stripe/services/terminal/reader_service.rb +443 -0
  326. data/lib/stripe/services/terminal_service.rb +2 -1
  327. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +673 -0
  328. data/lib/stripe/services/test_helpers/customer_service.rb +18 -0
  329. data/lib/stripe/services/test_helpers/issuing/authorization_service.rb +745 -0
  330. data/lib/stripe/services/test_helpers/issuing/card_service.rb +45 -0
  331. data/lib/stripe/services/test_helpers/issuing/personalization_design_service.rb +41 -0
  332. data/lib/stripe/services/test_helpers/issuing/transaction_service.rb +632 -0
  333. data/lib/stripe/services/test_helpers/refund_service.rb +9 -0
  334. data/lib/stripe/services/test_helpers/terminal/reader_service.rb +44 -0
  335. data/lib/stripe/services/test_helpers/test_clock_service.rb +57 -0
  336. data/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb +38 -0
  337. data/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb +87 -0
  338. data/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb +87 -0
  339. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +84 -0
  340. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +84 -0
  341. data/lib/stripe/services/token_service.rb +1121 -0
  342. data/lib/stripe/services/topup_service.rb +142 -0
  343. data/lib/stripe/services/transfer_reversal_service.rb +66 -0
  344. data/lib/stripe/services/transfer_service.rb +119 -0
  345. data/lib/stripe/services/treasury/credit_reversal_service.rb +59 -0
  346. data/lib/stripe/services/treasury/debit_reversal_service.rb +63 -0
  347. data/lib/stripe/services/treasury/financial_account_features_service.rb +169 -0
  348. data/lib/stripe/services/treasury/financial_account_service.rb +509 -0
  349. data/lib/stripe/services/treasury/inbound_transfer_service.rb +88 -0
  350. data/lib/stripe/services/treasury/outbound_payment_service.rb +258 -0
  351. data/lib/stripe/services/treasury/outbound_transfer_service.rb +148 -0
  352. data/lib/stripe/services/treasury/received_credit_service.rb +52 -0
  353. data/lib/stripe/services/treasury/received_debit_service.rb +40 -0
  354. data/lib/stripe/services/treasury/transaction_entry_service.rb +87 -0
  355. data/lib/stripe/services/treasury/transaction_service.rb +95 -0
  356. data/lib/stripe/services/v1_services.rb +8 -1
  357. data/lib/stripe/services/v2/billing/meter_event_adjustment_service.rb +23 -0
  358. data/lib/stripe/services/v2/billing/meter_event_service.rb +25 -0
  359. data/lib/stripe/services/v2/billing/meter_event_session_service.rb +3 -0
  360. data/lib/stripe/services/v2/billing/meter_event_stream_service.rb +33 -0
  361. data/lib/stripe/services/v2/core/event_destination_service.rb +146 -0
  362. data/lib/stripe/services/v2/core/event_service.rb +18 -0
  363. data/lib/stripe/services/webhook_endpoint_service.rb +96 -0
  364. data/lib/stripe/services.rb +25 -0
  365. data/lib/stripe/stripe_client.rb +1 -1
  366. data/lib/stripe/stripe_configuration.rb +3 -1
  367. data/lib/stripe/stripe_object.rb +5 -0
  368. data/lib/stripe/util.rb +7 -1
  369. data/lib/stripe/version.rb +1 -1
  370. data/lib/stripe.rb +46 -0
  371. data/rbi/stripe/resources/account.rbi +5100 -0
  372. data/rbi/stripe/resources/account_link.rbi +74 -0
  373. data/rbi/stripe/resources/account_notice.rbi +139 -0
  374. data/rbi/stripe/resources/account_session.rbi +1007 -0
  375. data/rbi/stripe/resources/apple_pay_domain.rbi +97 -0
  376. data/rbi/stripe/resources/application.rbi +20 -0
  377. data/rbi/stripe/resources/application_fee.rbi +123 -0
  378. data/rbi/stripe/resources/application_fee_refund.rbi +37 -0
  379. data/rbi/stripe/resources/apps/secret.rbi +195 -0
  380. data/rbi/stripe/resources/balance.rbi +187 -0
  381. data/rbi/stripe/resources/balance_transaction.rbi +149 -0
  382. data/rbi/stripe/resources/bank_account.rbi +127 -0
  383. data/rbi/stripe/resources/billing/alert.rbi +206 -0
  384. data/rbi/stripe/resources/billing/alert_triggered.rbi +28 -0
  385. data/rbi/stripe/resources/billing/credit_balance_summary.rbi +102 -0
  386. data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +154 -0
  387. data/rbi/stripe/resources/billing/credit_grant.rbi +269 -0
  388. data/rbi/stripe/resources/billing/meter.rbi +233 -0
  389. data/rbi/stripe/resources/billing/meter_error_report.rbi +71 -0
  390. data/rbi/stripe/resources/billing/meter_event.rbi +64 -0
  391. data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +64 -0
  392. data/rbi/stripe/resources/billing/meter_event_summary.rbi +33 -0
  393. data/rbi/stripe/resources/billing_portal/configuration.rbi +640 -0
  394. data/rbi/stripe/resources/billing_portal/session.rbi +341 -0
  395. data/rbi/stripe/resources/capability.rbi +125 -0
  396. data/rbi/stripe/resources/capital/financing_offer.rbi +190 -0
  397. data/rbi/stripe/resources/capital/financing_summary.rbi +74 -0
  398. data/rbi/stripe/resources/capital/financing_transaction.rbi +130 -0
  399. data/rbi/stripe/resources/card.rbi +128 -0
  400. data/rbi/stripe/resources/cash_balance.rbi +32 -0
  401. data/rbi/stripe/resources/charge.rbi +3484 -0
  402. data/rbi/stripe/resources/checkout/session.rbi +3995 -0
  403. data/rbi/stripe/resources/climate/order.rbi +250 -0
  404. data/rbi/stripe/resources/climate/product.rbi +82 -0
  405. data/rbi/stripe/resources/climate/supplier.rbi +79 -0
  406. data/rbi/stripe/resources/confirmation_token.rbi +1776 -0
  407. data/rbi/stripe/resources/connect_collection_transfer.rbi +26 -0
  408. data/rbi/stripe/resources/country_spec.rbi +92 -0
  409. data/rbi/stripe/resources/coupon.rbi +257 -0
  410. data/rbi/stripe/resources/credit_note.rbi +759 -0
  411. data/rbi/stripe/resources/credit_note_line_item.rbi +99 -0
  412. data/rbi/stripe/resources/customer.rbi +1001 -0
  413. data/rbi/stripe/resources/customer_balance_transaction.rbi +53 -0
  414. data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +151 -0
  415. data/rbi/stripe/resources/customer_session.rbi +196 -0
  416. data/rbi/stripe/resources/discount.rbi +53 -0
  417. data/rbi/stripe/resources/dispute.rbi +764 -0
  418. data/rbi/stripe/resources/entitlements/active_entitlement.rbi +65 -0
  419. data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +23 -0
  420. data/rbi/stripe/resources/entitlements/feature.rbi +124 -0
  421. data/rbi/stripe/resources/ephemeral_key.rbi +44 -0
  422. data/rbi/stripe/resources/event.rbi +190 -0
  423. data/rbi/stripe/resources/exchange_rate.rbi +73 -0
  424. data/rbi/stripe/resources/file.rbi +148 -0
  425. data/rbi/stripe/resources/file_link.rbi +146 -0
  426. data/rbi/stripe/resources/financial_connections/account.rbi +358 -0
  427. data/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi +27 -0
  428. data/rbi/stripe/resources/financial_connections/account_owner.rbi +35 -0
  429. data/rbi/stripe/resources/financial_connections/account_ownership.rbi +23 -0
  430. data/rbi/stripe/resources/financial_connections/institution.rbi +99 -0
  431. data/rbi/stripe/resources/financial_connections/session.rbi +186 -0
  432. data/rbi/stripe/resources/financial_connections/transaction.rbi +127 -0
  433. data/rbi/stripe/resources/forwarding/request.rbi +219 -0
  434. data/rbi/stripe/resources/funding_instructions.rbi +437 -0
  435. data/rbi/stripe/resources/gift_cards/card.rbi +206 -0
  436. data/rbi/stripe/resources/gift_cards/transaction.rbi +257 -0
  437. data/rbi/stripe/resources/identity/verification_report.rbi +354 -0
  438. data/rbi/stripe/resources/identity/verification_session.rbi +518 -0
  439. data/rbi/stripe/resources/invoice.rbi +8928 -0
  440. data/rbi/stripe/resources/invoice_item.rbi +514 -0
  441. data/rbi/stripe/resources/invoice_line_item.rbi +400 -0
  442. data/rbi/stripe/resources/invoice_payment.rbi +70 -0
  443. data/rbi/stripe/resources/invoice_rendering_template.rbi +114 -0
  444. data/rbi/stripe/resources/issuing/authorization.rbi +1266 -0
  445. data/rbi/stripe/resources/issuing/card.rbi +738 -0
  446. data/rbi/stripe/resources/issuing/cardholder.rbi +732 -0
  447. data/rbi/stripe/resources/issuing/credit_underwriting_record.rbi +622 -0
  448. data/rbi/stripe/resources/issuing/dispute.rbi +900 -0
  449. data/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi +83 -0
  450. data/rbi/stripe/resources/issuing/fraud_liability_debit.rbi +90 -0
  451. data/rbi/stripe/resources/issuing/personalization_design.rbi +333 -0
  452. data/rbi/stripe/resources/issuing/physical_bundle.rbi +86 -0
  453. data/rbi/stripe/resources/issuing/settlement.rbi +62 -0
  454. data/rbi/stripe/resources/issuing/token.rbi +231 -0
  455. data/rbi/stripe/resources/issuing/transaction.rbi +1057 -0
  456. data/rbi/stripe/resources/line_item.rbi +108 -0
  457. data/rbi/stripe/resources/login_link.rbi +18 -0
  458. data/rbi/stripe/resources/mandate.rbi +219 -0
  459. data/rbi/stripe/resources/margin.rbi +127 -0
  460. data/rbi/stripe/resources/order.rbi +3016 -0
  461. data/rbi/stripe/resources/payment_attempt_record.rbi +215 -0
  462. data/rbi/stripe/resources/payment_intent.rbi +13843 -0
  463. data/rbi/stripe/resources/payment_link.rbi +1666 -0
  464. data/rbi/stripe/resources/payment_method.rbi +1908 -0
  465. data/rbi/stripe/resources/payment_method_configuration.rbi +3171 -0
  466. data/rbi/stripe/resources/payment_method_domain.rbi +217 -0
  467. data/rbi/stripe/resources/payment_record.rbi +722 -0
  468. data/rbi/stripe/resources/payout.rbi +299 -0
  469. data/rbi/stripe/resources/person.rbi +371 -0
  470. data/rbi/stripe/resources/plan.rbi +385 -0
  471. data/rbi/stripe/resources/price.rbi +731 -0
  472. data/rbi/stripe/resources/product.rbi +615 -0
  473. data/rbi/stripe/resources/product_feature.rbi +26 -0
  474. data/rbi/stripe/resources/promotion_code.rbi +266 -0
  475. data/rbi/stripe/resources/quote.rbi +3186 -0
  476. data/rbi/stripe/resources/quote_line.rbi +350 -0
  477. data/rbi/stripe/resources/quote_preview_invoice.rbi +850 -0
  478. data/rbi/stripe/resources/quote_preview_subscription_schedule.rbi +474 -0
  479. data/rbi/stripe/resources/radar/early_fraud_warning.rbi +101 -0
  480. data/rbi/stripe/resources/radar/value_list.rbi +175 -0
  481. data/rbi/stripe/resources/radar/value_list_item.rbi +134 -0
  482. data/rbi/stripe/resources/refund.rbi +515 -0
  483. data/rbi/stripe/resources/reporting/report_run.rbi +194 -0
  484. data/rbi/stripe/resources/reporting/report_type.rbi +64 -0
  485. data/rbi/stripe/resources/reserve_transaction.rbi +23 -0
  486. data/rbi/stripe/resources/reversal.rbi +51 -0
  487. data/rbi/stripe/resources/review.rbi +159 -0
  488. data/rbi/stripe/resources/setup_attempt.rbi +484 -0
  489. data/rbi/stripe/resources/setup_intent.rbi +4041 -0
  490. data/rbi/stripe/resources/shipping_rate.rbi +310 -0
  491. data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +82 -0
  492. data/rbi/stripe/resources/source.rbi +1543 -0
  493. data/rbi/stripe/resources/source_mandate_notification.rbi +77 -0
  494. data/rbi/stripe/resources/source_transaction.rbi +127 -0
  495. data/rbi/stripe/resources/subscription.rbi +2308 -0
  496. data/rbi/stripe/resources/subscription_item.rbi +478 -0
  497. data/rbi/stripe/resources/subscription_schedule.rbi +2653 -0
  498. data/rbi/stripe/resources/tax/association.rbi +94 -0
  499. data/rbi/stripe/resources/tax/calculation.rbi +479 -0
  500. data/rbi/stripe/resources/tax/calculation_line_item.rbi +88 -0
  501. data/rbi/stripe/resources/tax/form.rbi +224 -0
  502. data/rbi/stripe/resources/tax/registration.rbi +2438 -0
  503. data/rbi/stripe/resources/tax/settings.rbi +148 -0
  504. data/rbi/stripe/resources/tax/transaction.rbi +356 -0
  505. data/rbi/stripe/resources/tax/transaction_line_item.rbi +54 -0
  506. data/rbi/stripe/resources/tax_code.rbi +51 -0
  507. data/rbi/stripe/resources/tax_deducted_at_source.rbi +23 -0
  508. data/rbi/stripe/resources/tax_id.rbi +174 -0
  509. data/rbi/stripe/resources/tax_rate.rbi +244 -0
  510. data/rbi/stripe/resources/terminal/configuration.rbi +1091 -0
  511. data/rbi/stripe/resources/terminal/connection_token.rbi +37 -0
  512. data/rbi/stripe/resources/terminal/location.rbi +231 -0
  513. data/rbi/stripe/resources/terminal/reader.rbi +952 -0
  514. data/rbi/stripe/resources/terminal/reader_collected_data.rbi +41 -0
  515. data/rbi/stripe/resources/test_helpers/test_clock.rbi +139 -0
  516. data/rbi/stripe/resources/token.rbi +1175 -0
  517. data/rbi/stripe/resources/topup.rbi +225 -0
  518. data/rbi/stripe/resources/transfer.rbi +204 -0
  519. data/rbi/stripe/resources/treasury/credit_reversal.rbi +126 -0
  520. data/rbi/stripe/resources/treasury/debit_reversal.rbi +138 -0
  521. data/rbi/stripe/resources/treasury/financial_account.rbi +870 -0
  522. data/rbi/stripe/resources/treasury/financial_account_features.rbi +263 -0
  523. data/rbi/stripe/resources/treasury/inbound_transfer.rbi +302 -0
  524. data/rbi/stripe/resources/treasury/outbound_payment.rbi +589 -0
  525. data/rbi/stripe/resources/treasury/outbound_transfer.rbi +473 -0
  526. data/rbi/stripe/resources/treasury/received_credit.rbi +348 -0
  527. data/rbi/stripe/resources/treasury/received_debit.rbi +305 -0
  528. data/rbi/stripe/resources/treasury/transaction.rbi +216 -0
  529. data/rbi/stripe/resources/treasury/transaction_entry.rbi +193 -0
  530. data/rbi/stripe/resources/usage_record.rbi +32 -0
  531. data/rbi/stripe/resources/usage_record_summary.rbi +38 -0
  532. data/rbi/stripe/resources/v2/amount.rbi +14 -0
  533. data/rbi/stripe/resources/v2/billing/meter_event.rbi +37 -0
  534. data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +41 -0
  535. data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +31 -0
  536. data/rbi/stripe/resources/v2/event.rbi +47 -0
  537. data/rbi/stripe/resources/v2/event_destination.rbi +90 -0
  538. data/rbi/stripe/resources/webhook_endpoint.rbi +177 -0
  539. data/rbi/stripe/services/account_capability_service.rbi +51 -0
  540. data/rbi/stripe/services/account_external_account_service.rbi +306 -0
  541. data/rbi/stripe/services/account_link_service.rbi +58 -0
  542. data/rbi/stripe/services/account_login_link_service.rbi +22 -0
  543. data/rbi/stripe/services/account_notice_service.rbi +90 -0
  544. data/rbi/stripe/services/account_person_service.rbi +903 -0
  545. data/rbi/stripe/services/account_service.rbi +4185 -0
  546. data/rbi/stripe/services/account_session_service.rbi +757 -0
  547. data/rbi/stripe/services/apple_pay_domain_service.rbi +78 -0
  548. data/rbi/stripe/services/application_fee_refund_service.rbi +91 -0
  549. data/rbi/stripe/services/application_fee_service.rbi +74 -0
  550. data/rbi/stripe/services/apps/secret_service.rbi +151 -0
  551. data/rbi/stripe/services/apps_service.rbi +9 -0
  552. data/rbi/stripe/services/balance_service.rbi +21 -0
  553. data/rbi/stripe/services/balance_transaction_service.rbi +89 -0
  554. data/rbi/stripe/services/billing/alert_service.rbi +152 -0
  555. data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +54 -0
  556. data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +59 -0
  557. data/rbi/stripe/services/billing/credit_grant_service.rbi +191 -0
  558. data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +40 -0
  559. data/rbi/stripe/services/billing/meter_event_service.rbi +42 -0
  560. data/rbi/stripe/services/billing/meter_event_summary_service.rbi +54 -0
  561. data/rbi/stripe/services/billing/meter_service.rbi +163 -0
  562. data/rbi/stripe/services/billing_portal/configuration_service.rbi +497 -0
  563. data/rbi/stripe/services/billing_portal/session_service.rbi +202 -0
  564. data/rbi/stripe/services/billing_portal_service.rbi +10 -0
  565. data/rbi/stripe/services/billing_service.rbi +15 -0
  566. data/rbi/stripe/services/capital/financing_offer_service.rbi +95 -0
  567. data/rbi/stripe/services/capital/financing_summary_service.rbi +22 -0
  568. data/rbi/stripe/services/capital/financing_transaction_service.rbi +68 -0
  569. data/rbi/stripe/services/capital_service.rbi +11 -0
  570. data/rbi/stripe/services/charge_service.rbi +1816 -0
  571. data/rbi/stripe/services/checkout/session_line_item_service.rbi +33 -0
  572. data/rbi/stripe/services/checkout/session_service.rbi +2582 -0
  573. data/rbi/stripe/services/checkout_service.rbi +9 -0
  574. data/rbi/stripe/services/climate/order_service.rbi +140 -0
  575. data/rbi/stripe/services/climate/product_service.rbi +46 -0
  576. data/rbi/stripe/services/climate/supplier_service.rbi +46 -0
  577. data/rbi/stripe/services/climate_service.rbi +11 -0
  578. data/rbi/stripe/services/confirmation_token_service.rbi +20 -0
  579. data/rbi/stripe/services/country_spec_service.rbi +44 -0
  580. data/rbi/stripe/services/coupon_service.rbi +190 -0
  581. data/rbi/stripe/services/credit_note_line_item_service.rbi +31 -0
  582. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +167 -0
  583. data/rbi/stripe/services/credit_note_service.rbi +420 -0
  584. data/rbi/stripe/services/customer_balance_transaction_service.rbi +92 -0
  585. data/rbi/stripe/services/customer_cash_balance_service.rbi +45 -0
  586. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +44 -0
  587. data/rbi/stripe/services/customer_funding_instructions_service.rbi +59 -0
  588. data/rbi/stripe/services/customer_payment_method_service.rbi +57 -0
  589. data/rbi/stripe/services/customer_payment_source_service.rbi +228 -0
  590. data/rbi/stripe/services/customer_service.rbi +647 -0
  591. data/rbi/stripe/services/customer_session_service.rbi +110 -0
  592. data/rbi/stripe/services/customer_tax_id_service.rbi +72 -0
  593. data/rbi/stripe/services/dispute_service.rbi +422 -0
  594. data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +55 -0
  595. data/rbi/stripe/services/entitlements/feature_service.rbi +107 -0
  596. data/rbi/stripe/services/entitlements_service.rbi +10 -0
  597. data/rbi/stripe/services/ephemeral_key_service.rbi +53 -0
  598. data/rbi/stripe/services/event_service.rbi +81 -0
  599. data/rbi/stripe/services/exchange_rate_service.rbi +44 -0
  600. data/rbi/stripe/services/file_link_service.rbi +122 -0
  601. data/rbi/stripe/services/file_service.rbi +114 -0
  602. data/rbi/stripe/services/financial_connections/account_inferred_balance_service.rbi +33 -0
  603. data/rbi/stripe/services/financial_connections/account_owner_service.rbi +42 -0
  604. data/rbi/stripe/services/financial_connections/account_service.rbi +132 -0
  605. data/rbi/stripe/services/financial_connections/institution_service.rbi +46 -0
  606. data/rbi/stripe/services/financial_connections/session_service.rbi +111 -0
  607. data/rbi/stripe/services/financial_connections/transaction_service.rbi +90 -0
  608. data/rbi/stripe/services/financial_connections_service.rbi +12 -0
  609. data/rbi/stripe/services/forwarding/request_service.rbi +132 -0
  610. data/rbi/stripe/services/forwarding_service.rbi +9 -0
  611. data/rbi/stripe/services/gift_cards/card_service.rbi +142 -0
  612. data/rbi/stripe/services/gift_cards/transaction_service.rbi +174 -0
  613. data/rbi/stripe/services/gift_cards_service.rbi +10 -0
  614. data/rbi/stripe/services/identity/verification_report_service.rbi +85 -0
  615. data/rbi/stripe/services/identity/verification_session_service.rbi +317 -0
  616. data/rbi/stripe/services/identity_service.rbi +10 -0
  617. data/rbi/stripe/services/invoice_item_service.rbi +424 -0
  618. data/rbi/stripe/services/invoice_line_item_service.rbi +270 -0
  619. data/rbi/stripe/services/invoice_payment_service.rbi +44 -0
  620. data/rbi/stripe/services/invoice_rendering_template_service.rbi +82 -0
  621. data/rbi/stripe/services/invoice_service.rbi +6040 -0
  622. data/rbi/stripe/services/invoice_upcoming_lines_service.rbi +2023 -0
  623. data/rbi/stripe/services/issuing/authorization_service.rbi +140 -0
  624. data/rbi/stripe/services/issuing/card_service.rbi +479 -0
  625. data/rbi/stripe/services/issuing/cardholder_service.rbi +568 -0
  626. data/rbi/stripe/services/issuing/credit_underwriting_record_service.rbi +498 -0
  627. data/rbi/stripe/services/issuing/dispute_service.rbi +701 -0
  628. data/rbi/stripe/services/issuing/dispute_settlement_detail_service.rbi +55 -0
  629. data/rbi/stripe/services/issuing/fraud_liability_debit_service.rbi +73 -0
  630. data/rbi/stripe/services/issuing/personalization_design_service.rbi +233 -0
  631. data/rbi/stripe/services/issuing/physical_bundle_service.rbi +59 -0
  632. data/rbi/stripe/services/issuing/token_service.rbi +95 -0
  633. data/rbi/stripe/services/issuing/transaction_service.rbi +103 -0
  634. data/rbi/stripe/services/issuing_service.rbi +19 -0
  635. data/rbi/stripe/services/mandate_service.rbi +20 -0
  636. data/rbi/stripe/services/margin_service.rbi +104 -0
  637. data/rbi/stripe/services/order_line_item_service.rbi +31 -0
  638. data/rbi/stripe/services/order_service.rbi +2306 -0
  639. data/rbi/stripe/services/payment_attempt_record_service.rbi +36 -0
  640. data/rbi/stripe/services/payment_intent_service.rbi +11429 -0
  641. data/rbi/stripe/services/payment_link_line_item_service.rbi +31 -0
  642. data/rbi/stripe/services/payment_link_service.rbi +1250 -0
  643. data/rbi/stripe/services/payment_method_configuration_service.rbi +2171 -0
  644. data/rbi/stripe/services/payment_method_domain_service.rbi +110 -0
  645. data/rbi/stripe/services/payment_method_service.rbi +883 -0
  646. data/rbi/stripe/services/payment_record_service.rbi +521 -0
  647. data/rbi/stripe/services/payout_service.rbi +197 -0
  648. data/rbi/stripe/services/plan_service.rbi +286 -0
  649. data/rbi/stripe/services/price_service.rbi +551 -0
  650. data/rbi/stripe/services/product_feature_service.rbi +69 -0
  651. data/rbi/stripe/services/product_service.rbi +503 -0
  652. data/rbi/stripe/services/promotion_code_service.rbi +210 -0
  653. data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +31 -0
  654. data/rbi/stripe/services/quote_line_item_service.rbi +31 -0
  655. data/rbi/stripe/services/quote_line_service.rbi +31 -0
  656. data/rbi/stripe/services/quote_preview_invoice_service.rbi +31 -0
  657. data/rbi/stripe/services/quote_preview_subscription_schedule_service.rbi +31 -0
  658. data/rbi/stripe/services/quote_service.rbi +2390 -0
  659. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +83 -0
  660. data/rbi/stripe/services/radar/value_list_item_service.rbi +107 -0
  661. data/rbi/stripe/services/radar/value_list_service.rbi +139 -0
  662. data/rbi/stripe/services/radar_service.rbi +11 -0
  663. data/rbi/stripe/services/refund_service.rbi +181 -0
  664. data/rbi/stripe/services/reporting/report_run_service.rbi +131 -0
  665. data/rbi/stripe/services/reporting/report_type_service.rbi +35 -0
  666. data/rbi/stripe/services/reporting_service.rbi +10 -0
  667. data/rbi/stripe/services/review_service.rbi +82 -0
  668. data/rbi/stripe/services/setup_attempt_service.rbi +63 -0
  669. data/rbi/stripe/services/setup_intent_service.rbi +3609 -0
  670. data/rbi/stripe/services/shipping_rate_service.rbi +235 -0
  671. data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +46 -0
  672. data/rbi/stripe/services/sigma_service.rbi +9 -0
  673. data/rbi/stripe/services/source_service.rbi +647 -0
  674. data/rbi/stripe/services/source_transaction_service.rbi +31 -0
  675. data/rbi/stripe/services/subscription_item_service.rbi +422 -0
  676. data/rbi/stripe/services/subscription_item_usage_record_service.rbi +37 -0
  677. data/rbi/stripe/services/subscription_item_usage_record_summary_service.rbi +33 -0
  678. data/rbi/stripe/services/subscription_schedule_service.rbi +2208 -0
  679. data/rbi/stripe/services/subscription_service.rbi +1870 -0
  680. data/rbi/stripe/services/tax/association_service.rbi +25 -0
  681. data/rbi/stripe/services/tax/calculation_line_item_service.rbi +33 -0
  682. data/rbi/stripe/services/tax/calculation_service.rbi +228 -0
  683. data/rbi/stripe/services/tax/form_service.rbi +85 -0
  684. data/rbi/stripe/services/tax/registration_service.rbi +1517 -0
  685. data/rbi/stripe/services/tax/settings_service.rbi +93 -0
  686. data/rbi/stripe/services/tax/transaction_line_item_service.rbi +33 -0
  687. data/rbi/stripe/services/tax/transaction_service.rbi +142 -0
  688. data/rbi/stripe/services/tax_code_service.rbi +44 -0
  689. data/rbi/stripe/services/tax_id_service.rbi +112 -0
  690. data/rbi/stripe/services/tax_rate_service.rbi +183 -0
  691. data/rbi/stripe/services/tax_service.rbi +14 -0
  692. data/rbi/stripe/services/terminal/configuration_service.rbi +822 -0
  693. data/rbi/stripe/services/terminal/connection_token_service.rbi +25 -0
  694. data/rbi/stripe/services/terminal/location_service.rbi +184 -0
  695. data/rbi/stripe/services/terminal/reader_collected_data_service.rbi +22 -0
  696. data/rbi/stripe/services/terminal/reader_service.rbi +513 -0
  697. data/rbi/stripe/services/terminal_service.rbi +13 -0
  698. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +778 -0
  699. data/rbi/stripe/services/test_helpers/customer_service.rbi +33 -0
  700. data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +836 -0
  701. data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +76 -0
  702. data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +67 -0
  703. data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +705 -0
  704. data/rbi/stripe/services/test_helpers/issuing_service.rbi +14 -0
  705. data/rbi/stripe/services/test_helpers/refund_service.rbi +22 -0
  706. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +62 -0
  707. data/rbi/stripe/services/test_helpers/terminal_service.rbi +11 -0
  708. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +90 -0
  709. data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +64 -0
  710. data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +123 -0
  711. data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +123 -0
  712. data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +114 -0
  713. data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +114 -0
  714. data/rbi/stripe/services/test_helpers/treasury_service.rbi +15 -0
  715. data/rbi/stripe/services/test_helpers_service.rbi +15 -0
  716. data/rbi/stripe/services/token_service.rbi +1136 -0
  717. data/rbi/stripe/services/topup_service.rbi +172 -0
  718. data/rbi/stripe/services/transfer_reversal_service.rbi +99 -0
  719. data/rbi/stripe/services/transfer_service.rbi +150 -0
  720. data/rbi/stripe/services/treasury/credit_reversal_service.rbi +84 -0
  721. data/rbi/stripe/services/treasury/debit_reversal_service.rbi +88 -0
  722. data/rbi/stripe/services/treasury/financial_account_features_service.rbi +201 -0
  723. data/rbi/stripe/services/treasury/financial_account_service.rbi +566 -0
  724. data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +117 -0
  725. data/rbi/stripe/services/treasury/outbound_payment_service.rbi +300 -0
  726. data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +182 -0
  727. data/rbi/stripe/services/treasury/received_credit_service.rbi +70 -0
  728. data/rbi/stripe/services/treasury/received_debit_service.rbi +59 -0
  729. data/rbi/stripe/services/treasury/transaction_entry_service.rbi +107 -0
  730. data/rbi/stripe/services/treasury/transaction_service.rbi +114 -0
  731. data/rbi/stripe/services/treasury_service.rbi +18 -0
  732. data/rbi/stripe/services/v1_services.rbi +83 -0
  733. data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +39 -0
  734. data/rbi/stripe/services/v2/billing/meter_event_service.rbi +42 -0
  735. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +20 -0
  736. data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +55 -0
  737. data/rbi/stripe/services/v2/billing_service.rbi +14 -0
  738. data/rbi/stripe/services/v2/core/event_destination_service.rbi +203 -0
  739. data/rbi/stripe/services/v2/core/event_service.rbi +39 -0
  740. data/rbi/stripe/services/v2/core_service.rbi +12 -0
  741. data/rbi/stripe/services/v2_services.rbi +10 -0
  742. data/rbi/stripe/services/webhook_endpoint_service.rbi +131 -0
  743. metadata +435 -4
@@ -0,0 +1,3186 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ # typed: true
5
+ module Stripe
6
+ # A Quote is a way to model prices that you'd like to provide to a customer.
7
+ # Once accepted, it will automatically create an invoice, subscription or subscription schedule.
8
+ class Quote < APIResource
9
+ class AutomaticTax < Stripe::StripeObject
10
+ class Liability < Stripe::StripeObject
11
+ # The connected account being referenced when `type` is `account`.
12
+ sig { returns(T.any(String, Stripe::Account)) }
13
+ attr_reader :account
14
+ # Type of the account referenced.
15
+ sig { returns(String) }
16
+ attr_reader :type
17
+ end
18
+ # Automatically calculate taxes
19
+ sig { returns(T::Boolean) }
20
+ attr_reader :enabled
21
+ # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
22
+ sig { returns(T.nilable(Liability)) }
23
+ attr_reader :liability
24
+ # The status of the most recent automated tax calculation for this quote.
25
+ sig { returns(T.nilable(String)) }
26
+ attr_reader :status
27
+ end
28
+ class Computed < Stripe::StripeObject
29
+ class LastReestimationDetails < Stripe::StripeObject
30
+ class Failed < Stripe::StripeObject
31
+ # The failure `code` is more granular than the `reason` provided and may correspond to a Stripe error code. For automation errors, this field is one of: `reverse_api_failure`, `reverse_api_deadline_exceeeded`, or `reverse_api_response_validation_error`, which are Stripe error codes and map to the error `message` field.
32
+ sig { returns(T.nilable(String)) }
33
+ attr_reader :failure_code
34
+ # Information derived from the `failure_code` or a freeform message that explains the error as a human-readable English string. For example, "margin ID is not a valid ID".
35
+ sig { returns(T.nilable(String)) }
36
+ attr_reader :message
37
+ # The reason the reestimation failed.
38
+ sig { returns(String) }
39
+ attr_reader :reason
40
+ end
41
+ # When `status` is `failed`, provides details about the quote reestimation failure.
42
+ sig { returns(T.nilable(Failed)) }
43
+ attr_reader :failed
44
+ # Latest status of the reestimation.
45
+ sig { returns(String) }
46
+ attr_reader :status
47
+ end
48
+ class Recurring < Stripe::StripeObject
49
+ class TotalDetails < Stripe::StripeObject
50
+ class Breakdown < Stripe::StripeObject
51
+ class Discount < Stripe::StripeObject
52
+ # The amount discounted.
53
+ sig { returns(Integer) }
54
+ attr_reader :amount
55
+ # 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).
56
+ # It contains information about when the discount began, when it will end, and what it is applied to.
57
+ #
58
+ # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
59
+ sig { returns(Stripe::Discount) }
60
+ attr_reader :discount
61
+ end
62
+ class Tax < Stripe::StripeObject
63
+ # Amount of tax applied for this rate.
64
+ sig { returns(Integer) }
65
+ attr_reader :amount
66
+ # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.
67
+ #
68
+ # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates)
69
+ sig { returns(Stripe::TaxRate) }
70
+ attr_reader :rate
71
+ # 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.
72
+ sig { returns(T.nilable(String)) }
73
+ attr_reader :taxability_reason
74
+ # The amount on which tax is calculated, in cents (or local equivalent).
75
+ sig { returns(T.nilable(Integer)) }
76
+ attr_reader :taxable_amount
77
+ end
78
+ # The aggregated discounts.
79
+ sig { returns(T::Array[Discount]) }
80
+ attr_reader :discounts
81
+ # The aggregated tax amounts by rate.
82
+ sig { returns(T::Array[Tax]) }
83
+ attr_reader :taxes
84
+ end
85
+ # This is the sum of all the discounts.
86
+ sig { returns(Integer) }
87
+ attr_reader :amount_discount
88
+ # This is the sum of all the shipping amounts.
89
+ sig { returns(T.nilable(Integer)) }
90
+ attr_reader :amount_shipping
91
+ # This is the sum of all the tax amounts.
92
+ sig { returns(Integer) }
93
+ attr_reader :amount_tax
94
+ # Attribute for field breakdown
95
+ sig { returns(Breakdown) }
96
+ attr_reader :breakdown
97
+ end
98
+ # Total before any discounts or taxes are applied.
99
+ sig { returns(Integer) }
100
+ attr_reader :amount_subtotal
101
+ # Total after discounts and taxes are applied.
102
+ sig { returns(Integer) }
103
+ attr_reader :amount_total
104
+ # The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.
105
+ sig { returns(String) }
106
+ attr_reader :interval
107
+ # The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.
108
+ sig { returns(Integer) }
109
+ attr_reader :interval_count
110
+ # Attribute for field total_details
111
+ sig { returns(TotalDetails) }
112
+ attr_reader :total_details
113
+ end
114
+ class Upfront < Stripe::StripeObject
115
+ class TotalDetails < Stripe::StripeObject
116
+ class Breakdown < Stripe::StripeObject
117
+ class Discount < Stripe::StripeObject
118
+ # The amount discounted.
119
+ sig { returns(Integer) }
120
+ attr_reader :amount
121
+ # 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).
122
+ # It contains information about when the discount began, when it will end, and what it is applied to.
123
+ #
124
+ # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
125
+ sig { returns(Stripe::Discount) }
126
+ attr_reader :discount
127
+ end
128
+ class Tax < Stripe::StripeObject
129
+ # Amount of tax applied for this rate.
130
+ sig { returns(Integer) }
131
+ attr_reader :amount
132
+ # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.
133
+ #
134
+ # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates)
135
+ sig { returns(Stripe::TaxRate) }
136
+ attr_reader :rate
137
+ # 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.
138
+ sig { returns(T.nilable(String)) }
139
+ attr_reader :taxability_reason
140
+ # The amount on which tax is calculated, in cents (or local equivalent).
141
+ sig { returns(T.nilable(Integer)) }
142
+ attr_reader :taxable_amount
143
+ end
144
+ # The aggregated discounts.
145
+ sig { returns(T::Array[Discount]) }
146
+ attr_reader :discounts
147
+ # The aggregated tax amounts by rate.
148
+ sig { returns(T::Array[Tax]) }
149
+ attr_reader :taxes
150
+ end
151
+ # This is the sum of all the discounts.
152
+ sig { returns(Integer) }
153
+ attr_reader :amount_discount
154
+ # This is the sum of all the shipping amounts.
155
+ sig { returns(T.nilable(Integer)) }
156
+ attr_reader :amount_shipping
157
+ # This is the sum of all the tax amounts.
158
+ sig { returns(Integer) }
159
+ attr_reader :amount_tax
160
+ # Attribute for field breakdown
161
+ sig { returns(Breakdown) }
162
+ attr_reader :breakdown
163
+ end
164
+ # Total before any discounts or taxes are applied.
165
+ sig { returns(Integer) }
166
+ attr_reader :amount_subtotal
167
+ # Total after discounts and taxes are applied.
168
+ sig { returns(Integer) }
169
+ attr_reader :amount_total
170
+ # The line items that will appear on the next invoice after this quote is accepted. This does not include pending invoice items that exist on the customer but may still be included in the next invoice.
171
+ sig { returns(Stripe::ListObject) }
172
+ attr_reader :line_items
173
+ # Attribute for field total_details
174
+ sig { returns(TotalDetails) }
175
+ attr_reader :total_details
176
+ end
177
+ # Details of the most recent reestimate of the quote's preview schedules and upcoming invoices, including the status of Stripe's calculation.
178
+ sig { returns(T.nilable(LastReestimationDetails)) }
179
+ attr_reader :last_reestimation_details
180
+ # The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices.
181
+ sig { returns(T.nilable(Recurring)) }
182
+ attr_reader :recurring
183
+ # The time at which the quote's estimated schedules and upcoming invoices were generated.
184
+ sig { returns(T.nilable(Integer)) }
185
+ attr_reader :updated_at
186
+ # Attribute for field upfront
187
+ sig { returns(Upfront) }
188
+ attr_reader :upfront
189
+ end
190
+ class FromQuote < Stripe::StripeObject
191
+ # Whether this quote is a revision of a different quote.
192
+ sig { returns(T::Boolean) }
193
+ attr_reader :is_revision
194
+ # The quote that was cloned.
195
+ sig { returns(T.any(String, Stripe::Quote)) }
196
+ attr_reader :quote
197
+ end
198
+ class InvoiceSettings < Stripe::StripeObject
199
+ class Issuer < Stripe::StripeObject
200
+ # The connected account being referenced when `type` is `account`.
201
+ sig { returns(T.any(String, Stripe::Account)) }
202
+ attr_reader :account
203
+ # Type of the account referenced.
204
+ sig { returns(String) }
205
+ attr_reader :type
206
+ end
207
+ # Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
208
+ sig { returns(T.nilable(Integer)) }
209
+ attr_reader :days_until_due
210
+ # Attribute for field issuer
211
+ sig { returns(Issuer) }
212
+ attr_reader :issuer
213
+ end
214
+ class StatusDetails < Stripe::StripeObject
215
+ class Canceled < Stripe::StripeObject
216
+ # The reason this quote was marked as canceled.
217
+ sig { returns(T.nilable(String)) }
218
+ attr_reader :reason
219
+ # Time at which the quote was marked as canceled. Measured in seconds since the Unix epoch.
220
+ sig { returns(T.nilable(Integer)) }
221
+ attr_reader :transitioned_at
222
+ end
223
+ class Stale < Stripe::StripeObject
224
+ class LastReason < Stripe::StripeObject
225
+ class LinesInvalid < Stripe::StripeObject
226
+ # The timestamp at which the lines were marked as invalid.
227
+ sig { returns(Integer) }
228
+ attr_reader :invalid_at
229
+ # The list of lines that became invalid at the given timestamp.
230
+ sig { returns(T::Array[String]) }
231
+ attr_reader :lines
232
+ end
233
+ class SubscriptionChanged < Stripe::StripeObject
234
+ # The subscription's state before the quote was marked as stale.
235
+ sig { returns(T.nilable(Stripe::Subscription)) }
236
+ attr_reader :previous_subscription
237
+ end
238
+ class SubscriptionScheduleChanged < Stripe::StripeObject
239
+ # The subscription schedule's state before the quote was marked as stale.
240
+ sig { returns(T.nilable(Stripe::SubscriptionSchedule)) }
241
+ attr_reader :previous_subscription_schedule
242
+ end
243
+ # The ID of the line that is invalid if the stale reason type is `line_invalid`.
244
+ sig { returns(String) }
245
+ attr_reader :line_invalid
246
+ # The IDs of the lines that are invalid if the stale reason type is `lines_invalid`.
247
+ sig { returns(T::Array[LinesInvalid]) }
248
+ attr_reader :lines_invalid
249
+ # The user supplied mark stale reason.
250
+ sig { returns(T.nilable(String)) }
251
+ attr_reader :marked_stale
252
+ # The ID of the subscription that was canceled.
253
+ sig { returns(String) }
254
+ attr_reader :subscription_canceled
255
+ # Attribute for field subscription_changed
256
+ sig { returns(SubscriptionChanged) }
257
+ attr_reader :subscription_changed
258
+ # The ID of the subscription that was expired.
259
+ sig { returns(String) }
260
+ attr_reader :subscription_expired
261
+ # The ID of the subscription schedule that was canceled.
262
+ sig { returns(String) }
263
+ attr_reader :subscription_schedule_canceled
264
+ # Attribute for field subscription_schedule_changed
265
+ sig { returns(SubscriptionScheduleChanged) }
266
+ attr_reader :subscription_schedule_changed
267
+ # The ID of the subscription schedule that was released.
268
+ sig { returns(String) }
269
+ attr_reader :subscription_schedule_released
270
+ # The reason the quote was marked as stale.
271
+ sig { returns(T.nilable(String)) }
272
+ attr_reader :type
273
+ end
274
+ # Time at which the quote expires. Measured in seconds since the Unix epoch.
275
+ sig { returns(T.nilable(Integer)) }
276
+ attr_reader :expires_at
277
+ # The most recent reason this quote was marked as stale.
278
+ sig { returns(T.nilable(LastReason)) }
279
+ attr_reader :last_reason
280
+ # Time at which the stale reason was updated. Measured in seconds since the Unix epoch.
281
+ sig { returns(T.nilable(Integer)) }
282
+ attr_reader :last_updated_at
283
+ # Time at which the quote was marked as stale. Measured in seconds since the Unix epoch.
284
+ sig { returns(T.nilable(Integer)) }
285
+ attr_reader :transitioned_at
286
+ end
287
+ # Attribute for field canceled
288
+ sig { returns(Canceled) }
289
+ attr_reader :canceled
290
+ # Attribute for field stale
291
+ sig { returns(Stale) }
292
+ attr_reader :stale
293
+ end
294
+ class StatusTransitions < Stripe::StripeObject
295
+ # The time that the quote was accepted. Measured in seconds since Unix epoch.
296
+ sig { returns(T.nilable(Integer)) }
297
+ attr_reader :accepted_at
298
+ # The time that the quote was canceled. Measured in seconds since Unix epoch.
299
+ sig { returns(T.nilable(Integer)) }
300
+ attr_reader :canceled_at
301
+ # The time that the quote was finalized. Measured in seconds since Unix epoch.
302
+ sig { returns(T.nilable(Integer)) }
303
+ attr_reader :finalized_at
304
+ end
305
+ class SubscriptionData < Stripe::StripeObject
306
+ class BillOnAcceptance < Stripe::StripeObject
307
+ class BillFrom < Stripe::StripeObject
308
+ class LineStartsAt < Stripe::StripeObject
309
+ # Unique identifier for the object.
310
+ sig { returns(String) }
311
+ attr_reader :id
312
+ end
313
+ # The materialized time.
314
+ sig { returns(T.nilable(Integer)) }
315
+ attr_reader :computed
316
+ # The timestamp the given line starts at.
317
+ sig { returns(T.nilable(LineStartsAt)) }
318
+ attr_reader :line_starts_at
319
+ # A precise Unix timestamp.
320
+ sig { returns(T.nilable(Integer)) }
321
+ attr_reader :timestamp
322
+ # The type of method to specify the `bill_from` time.
323
+ sig { returns(String) }
324
+ attr_reader :type
325
+ end
326
+ class BillUntil < Stripe::StripeObject
327
+ class Duration < Stripe::StripeObject
328
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
329
+ sig { returns(String) }
330
+ attr_reader :interval
331
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
332
+ sig { returns(Integer) }
333
+ attr_reader :interval_count
334
+ end
335
+ class LineEndsAt < Stripe::StripeObject
336
+ # Unique identifier for the object.
337
+ sig { returns(String) }
338
+ attr_reader :id
339
+ end
340
+ # The materialized time.
341
+ sig { returns(T.nilable(Integer)) }
342
+ attr_reader :computed
343
+ # Time span for the quote line starting from the `starts_at` date.
344
+ sig { returns(T.nilable(Duration)) }
345
+ attr_reader :duration
346
+ # The timestamp the given line ends at.
347
+ sig { returns(T.nilable(LineEndsAt)) }
348
+ attr_reader :line_ends_at
349
+ # A precise Unix timestamp.
350
+ sig { returns(T.nilable(Integer)) }
351
+ attr_reader :timestamp
352
+ # The type of method to specify the `bill_until` time.
353
+ sig { returns(String) }
354
+ attr_reader :type
355
+ end
356
+ # The start of the period to bill from when the Quote is accepted.
357
+ sig { returns(T.nilable(BillFrom)) }
358
+ attr_reader :bill_from
359
+ # The end of the period to bill until when the Quote is accepted.
360
+ sig { returns(T.nilable(BillUntil)) }
361
+ attr_reader :bill_until
362
+ end
363
+ class Prebilling < Stripe::StripeObject
364
+ # Attribute for field iterations
365
+ sig { returns(Integer) }
366
+ attr_reader :iterations
367
+ end
368
+ # Describes the period to bill for upon accepting the quote.
369
+ sig { returns(T.nilable(BillOnAcceptance)) }
370
+ attr_reader :bill_on_acceptance
371
+ # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
372
+ sig { returns(String) }
373
+ attr_reader :billing_behavior
374
+ # Whether the subscription will always start a new billing period when the quote is accepted.
375
+ sig { returns(T.nilable(String)) }
376
+ attr_reader :billing_cycle_anchor
377
+ # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
378
+ sig { returns(T.nilable(String)) }
379
+ attr_reader :description
380
+ # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch.
381
+ sig { returns(T.nilable(Integer)) }
382
+ attr_reader :effective_date
383
+ # Behavior of the subscription schedule and underlying subscription when it ends.
384
+ sig { returns(T.nilable(String)) }
385
+ attr_reader :end_behavior
386
+ # The id of the subscription that will be updated when the quote is accepted.
387
+ sig { returns(T.nilable(T.any(String, Stripe::Subscription))) }
388
+ attr_reader :from_subscription
389
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
390
+ sig { returns(T.nilable(T::Hash[String, String])) }
391
+ attr_reader :metadata
392
+ # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
393
+ sig { returns(T.nilable(Prebilling)) }
394
+ attr_reader :prebilling
395
+ # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
396
+ sig { returns(String) }
397
+ attr_reader :proration_behavior
398
+ # Integer representing the number of trial period days before the customer is charged for the first time.
399
+ sig { returns(T.nilable(Integer)) }
400
+ attr_reader :trial_period_days
401
+ end
402
+ class SubscriptionDataOverride < Stripe::StripeObject
403
+ class AppliesTo < Stripe::StripeObject
404
+ # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
405
+ sig { returns(T.nilable(String)) }
406
+ attr_reader :new_reference
407
+ # The ID of the schedule the line applies to.
408
+ sig { returns(T.nilable(String)) }
409
+ attr_reader :subscription_schedule
410
+ # Describes whether the quote line is affecting a new schedule or an existing schedule.
411
+ sig { returns(String) }
412
+ attr_reader :type
413
+ end
414
+ class BillOnAcceptance < Stripe::StripeObject
415
+ class BillFrom < Stripe::StripeObject
416
+ class LineStartsAt < Stripe::StripeObject
417
+ # Unique identifier for the object.
418
+ sig { returns(String) }
419
+ attr_reader :id
420
+ end
421
+ # The materialized time.
422
+ sig { returns(T.nilable(Integer)) }
423
+ attr_reader :computed
424
+ # The timestamp the given line starts at.
425
+ sig { returns(T.nilable(LineStartsAt)) }
426
+ attr_reader :line_starts_at
427
+ # A precise Unix timestamp.
428
+ sig { returns(T.nilable(Integer)) }
429
+ attr_reader :timestamp
430
+ # The type of method to specify the `bill_from` time.
431
+ sig { returns(String) }
432
+ attr_reader :type
433
+ end
434
+ class BillUntil < Stripe::StripeObject
435
+ class Duration < Stripe::StripeObject
436
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
437
+ sig { returns(String) }
438
+ attr_reader :interval
439
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
440
+ sig { returns(Integer) }
441
+ attr_reader :interval_count
442
+ end
443
+ class LineEndsAt < Stripe::StripeObject
444
+ # Unique identifier for the object.
445
+ sig { returns(String) }
446
+ attr_reader :id
447
+ end
448
+ # The materialized time.
449
+ sig { returns(T.nilable(Integer)) }
450
+ attr_reader :computed
451
+ # Time span for the quote line starting from the `starts_at` date.
452
+ sig { returns(T.nilable(Duration)) }
453
+ attr_reader :duration
454
+ # The timestamp the given line ends at.
455
+ sig { returns(T.nilable(LineEndsAt)) }
456
+ attr_reader :line_ends_at
457
+ # A precise Unix timestamp.
458
+ sig { returns(T.nilable(Integer)) }
459
+ attr_reader :timestamp
460
+ # The type of method to specify the `bill_until` time.
461
+ sig { returns(String) }
462
+ attr_reader :type
463
+ end
464
+ # The start of the period to bill from when the Quote is accepted.
465
+ sig { returns(T.nilable(BillFrom)) }
466
+ attr_reader :bill_from
467
+ # The end of the period to bill until when the Quote is accepted.
468
+ sig { returns(T.nilable(BillUntil)) }
469
+ attr_reader :bill_until
470
+ end
471
+ # Attribute for field applies_to
472
+ sig { returns(AppliesTo) }
473
+ attr_reader :applies_to
474
+ # Describes the period to bill for upon accepting the quote.
475
+ sig { returns(T.nilable(BillOnAcceptance)) }
476
+ attr_reader :bill_on_acceptance
477
+ # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
478
+ sig { returns(String) }
479
+ attr_reader :billing_behavior
480
+ # The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
481
+ sig { returns(T.nilable(String)) }
482
+ attr_reader :customer
483
+ # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
484
+ sig { returns(T.nilable(String)) }
485
+ attr_reader :description
486
+ # Behavior of the subscription schedule and underlying subscription when it ends.
487
+ sig { returns(T.nilable(String)) }
488
+ attr_reader :end_behavior
489
+ # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
490
+ sig { returns(T.nilable(String)) }
491
+ attr_reader :proration_behavior
492
+ end
493
+ class SubscriptionSchedule < Stripe::StripeObject
494
+ class AppliesTo < Stripe::StripeObject
495
+ # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
496
+ sig { returns(T.nilable(String)) }
497
+ attr_reader :new_reference
498
+ # The ID of the schedule the line applies to.
499
+ sig { returns(T.nilable(String)) }
500
+ attr_reader :subscription_schedule
501
+ # Describes whether the quote line is affecting a new schedule or an existing schedule.
502
+ sig { returns(String) }
503
+ attr_reader :type
504
+ end
505
+ # Attribute for field applies_to
506
+ sig { returns(AppliesTo) }
507
+ attr_reader :applies_to
508
+ # The subscription schedule that was created or updated from this quote.
509
+ sig { returns(String) }
510
+ attr_reader :subscription_schedule
511
+ end
512
+ class TotalDetails < Stripe::StripeObject
513
+ class Breakdown < Stripe::StripeObject
514
+ class Discount < Stripe::StripeObject
515
+ # The amount discounted.
516
+ sig { returns(Integer) }
517
+ attr_reader :amount
518
+ # 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).
519
+ # It contains information about when the discount began, when it will end, and what it is applied to.
520
+ #
521
+ # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
522
+ sig { returns(Stripe::Discount) }
523
+ attr_reader :discount
524
+ end
525
+ class Tax < Stripe::StripeObject
526
+ # Amount of tax applied for this rate.
527
+ sig { returns(Integer) }
528
+ attr_reader :amount
529
+ # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.
530
+ #
531
+ # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates)
532
+ sig { returns(Stripe::TaxRate) }
533
+ attr_reader :rate
534
+ # 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.
535
+ sig { returns(T.nilable(String)) }
536
+ attr_reader :taxability_reason
537
+ # The amount on which tax is calculated, in cents (or local equivalent).
538
+ sig { returns(T.nilable(Integer)) }
539
+ attr_reader :taxable_amount
540
+ end
541
+ # The aggregated discounts.
542
+ sig { returns(T::Array[Discount]) }
543
+ attr_reader :discounts
544
+ # The aggregated tax amounts by rate.
545
+ sig { returns(T::Array[Tax]) }
546
+ attr_reader :taxes
547
+ end
548
+ # This is the sum of all the discounts.
549
+ sig { returns(Integer) }
550
+ attr_reader :amount_discount
551
+ # This is the sum of all the shipping amounts.
552
+ sig { returns(T.nilable(Integer)) }
553
+ attr_reader :amount_shipping
554
+ # This is the sum of all the tax amounts.
555
+ sig { returns(Integer) }
556
+ attr_reader :amount_tax
557
+ # Attribute for field breakdown
558
+ sig { returns(Breakdown) }
559
+ attr_reader :breakdown
560
+ end
561
+ class TransferData < Stripe::StripeObject
562
+ # The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination.
563
+ sig { returns(T.nilable(Integer)) }
564
+ attr_reader :amount
565
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount will be transferred to the destination.
566
+ sig { returns(T.nilable(Float)) }
567
+ attr_reader :amount_percent
568
+ # The account where funds from the payment will be transferred to upon payment success.
569
+ sig { returns(T.any(String, Stripe::Account)) }
570
+ attr_reader :destination
571
+ end
572
+ # Allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
573
+ sig { returns(T.nilable(T::Boolean)) }
574
+ attr_reader :allow_backdated_lines
575
+ # Total before any discounts or taxes are applied.
576
+ sig { returns(Integer) }
577
+ attr_reader :amount_subtotal
578
+ # Total after discounts and taxes are applied.
579
+ sig { returns(Integer) }
580
+ attr_reader :amount_total
581
+ # ID of the Connect Application that created the quote.
582
+ sig { returns(T.nilable(T.any(String, Stripe::Application))) }
583
+ attr_reader :application
584
+ # 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. Only applicable if there are no line items with recurring prices on the quote.
585
+ sig { returns(T.nilable(Integer)) }
586
+ attr_reader :application_fee_amount
587
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote.
588
+ sig { returns(T.nilable(Float)) }
589
+ attr_reader :application_fee_percent
590
+ # Attribute for field automatic_tax
591
+ sig { returns(AutomaticTax) }
592
+ attr_reader :automatic_tax
593
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
594
+ sig { returns(String) }
595
+ attr_reader :collection_method
596
+ # Attribute for field computed
597
+ sig { returns(Computed) }
598
+ attr_reader :computed
599
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
600
+ sig { returns(Integer) }
601
+ attr_reader :created
602
+ # 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).
603
+ sig { returns(T.nilable(String)) }
604
+ attr_reader :currency
605
+ # The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
606
+ sig { returns(T.nilable(T.any(String, Stripe::Customer))) }
607
+ attr_reader :customer
608
+ # The tax rates applied to this quote.
609
+ sig { returns(T::Array[T.any(String, Stripe::TaxRate)]) }
610
+ attr_reader :default_tax_rates
611
+ # A description that will be displayed on the quote PDF.
612
+ sig { returns(T.nilable(String)) }
613
+ attr_reader :description
614
+ # The discounts applied to this quote.
615
+ sig { returns(T::Array[T.any(String, Stripe::Discount)]) }
616
+ attr_reader :discounts
617
+ # The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
618
+ sig { returns(Integer) }
619
+ attr_reader :expires_at
620
+ # A footer that will be displayed on the quote PDF.
621
+ sig { returns(T.nilable(String)) }
622
+ attr_reader :footer
623
+ # Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details.
624
+ sig { returns(T.nilable(FromQuote)) }
625
+ attr_reader :from_quote
626
+ # A header that will be displayed on the quote PDF.
627
+ sig { returns(T.nilable(String)) }
628
+ attr_reader :header
629
+ # Unique identifier for the object.
630
+ sig { returns(String) }
631
+ attr_reader :id
632
+ # The invoice that was created from this quote.
633
+ sig { returns(T.nilable(T.any(String, Stripe::Invoice))) }
634
+ attr_reader :invoice
635
+ # Attribute for field invoice_settings
636
+ sig { returns(InvoiceSettings) }
637
+ attr_reader :invoice_settings
638
+ # A list of items the customer is being quoted for.
639
+ sig { returns(Stripe::ListObject) }
640
+ attr_reader :line_items
641
+ # A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
642
+ sig { returns(T.nilable(T::Array[String])) }
643
+ attr_reader :lines
644
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
645
+ sig { returns(T::Boolean) }
646
+ attr_reader :livemode
647
+ # 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.
648
+ sig { returns(T::Hash[String, String]) }
649
+ attr_reader :metadata
650
+ # A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize).
651
+ sig { returns(T.nilable(String)) }
652
+ attr_reader :number
653
+ # String representing the object's type. Objects of the same type share the same value.
654
+ sig { returns(String) }
655
+ attr_reader :object
656
+ # The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details.
657
+ sig { returns(T.nilable(T.any(String, Stripe::Account))) }
658
+ attr_reader :on_behalf_of
659
+ # The status of the quote.
660
+ sig { returns(String) }
661
+ attr_reader :status
662
+ # Details on when and why a quote has been marked as stale or canceled.
663
+ sig { returns(T.nilable(StatusDetails)) }
664
+ attr_reader :status_details
665
+ # Attribute for field status_transitions
666
+ sig { returns(StatusTransitions) }
667
+ attr_reader :status_transitions
668
+ # The subscription that was created or updated from this quote.
669
+ sig { returns(T.nilable(T.any(String, Stripe::Subscription))) }
670
+ attr_reader :subscription
671
+ # Attribute for field subscription_data
672
+ sig { returns(SubscriptionData) }
673
+ attr_reader :subscription_data
674
+ # List representing overrides for `subscription_data` configurations for specific subscription schedules.
675
+ sig { returns(T.nilable(T::Array[SubscriptionDataOverride])) }
676
+ attr_reader :subscription_data_overrides
677
+ # The subscription schedule that was created or updated from this quote.
678
+ sig { returns(T.nilable(T.any(String, Stripe::SubscriptionSchedule))) }
679
+ attr_reader :subscription_schedule
680
+ # The subscription schedules that were created or updated from this quote.
681
+ sig { returns(T.nilable(T::Array[SubscriptionSchedule])) }
682
+ attr_reader :subscription_schedules
683
+ # ID of the test clock this quote belongs to.
684
+ sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) }
685
+ attr_reader :test_clock
686
+ # Attribute for field total_details
687
+ sig { returns(TotalDetails) }
688
+ attr_reader :total_details
689
+ # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices.
690
+ sig { returns(T.nilable(TransferData)) }
691
+ attr_reader :transfer_data
692
+ class ListParams < Stripe::RequestParams
693
+ # The ID of the customer whose quotes will be retrieved.
694
+ sig { returns(String) }
695
+ attr_accessor :customer
696
+ # 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.
697
+ sig { returns(String) }
698
+ attr_accessor :ending_before
699
+ # Specifies which fields in the response should be expanded.
700
+ sig { returns(T::Array[String]) }
701
+ attr_accessor :expand
702
+ # The subscription which the quote updates.
703
+ sig { returns(String) }
704
+ attr_accessor :from_subscription
705
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
706
+ sig { returns(Integer) }
707
+ attr_accessor :limit
708
+ # 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.
709
+ sig { returns(String) }
710
+ attr_accessor :starting_after
711
+ # The status of the quote.
712
+ sig { returns(String) }
713
+ attr_accessor :status
714
+ # Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set.
715
+ sig { returns(String) }
716
+ attr_accessor :test_clock
717
+ sig {
718
+ params(customer: String, ending_before: String, expand: T::Array[String], from_subscription: String, limit: Integer, starting_after: String, status: String, test_clock: String).void
719
+ }
720
+ def initialize(
721
+ customer: nil,
722
+ ending_before: nil,
723
+ expand: nil,
724
+ from_subscription: nil,
725
+ limit: nil,
726
+ starting_after: nil,
727
+ status: nil,
728
+ test_clock: nil
729
+ ); end
730
+ end
731
+ class CreateParams < Stripe::RequestParams
732
+ class AutomaticTax < Stripe::RequestParams
733
+ class Liability < Stripe::RequestParams
734
+ # The connected account being referenced when `type` is `account`.
735
+ sig { returns(String) }
736
+ attr_accessor :account
737
+ # Type of the account referenced in the request.
738
+ sig { returns(String) }
739
+ attr_accessor :type
740
+ sig { params(account: String, type: String).void }
741
+ def initialize(account: nil, type: nil); end
742
+ end
743
+ # Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
744
+ sig { returns(T::Boolean) }
745
+ attr_accessor :enabled
746
+ # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
747
+ sig { returns(::Stripe::Quote::CreateParams::AutomaticTax::Liability) }
748
+ attr_accessor :liability
749
+ sig {
750
+ params(enabled: T::Boolean, liability: ::Stripe::Quote::CreateParams::AutomaticTax::Liability).void
751
+ }
752
+ def initialize(enabled: nil, liability: nil); end
753
+ end
754
+ class Discount < Stripe::RequestParams
755
+ class DiscountEnd < Stripe::RequestParams
756
+ class Duration < Stripe::RequestParams
757
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
758
+ sig { returns(String) }
759
+ attr_accessor :interval
760
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
761
+ sig { returns(Integer) }
762
+ attr_accessor :interval_count
763
+ sig { params(interval: String, interval_count: Integer).void }
764
+ def initialize(interval: nil, interval_count: nil); end
765
+ end
766
+ # Time span for the redeemed discount.
767
+ sig { returns(::Stripe::Quote::CreateParams::Discount::DiscountEnd::Duration) }
768
+ attr_accessor :duration
769
+ # A precise Unix timestamp for the discount to end. Must be in the future.
770
+ sig { returns(Integer) }
771
+ attr_accessor :timestamp
772
+ # The type of calculation made to determine when the discount ends.
773
+ sig { returns(String) }
774
+ attr_accessor :type
775
+ sig {
776
+ params(duration: ::Stripe::Quote::CreateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
777
+ }
778
+ def initialize(duration: nil, timestamp: nil, type: nil); end
779
+ end
780
+ # ID of the coupon to create a new discount for.
781
+ sig { returns(String) }
782
+ attr_accessor :coupon
783
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
784
+ sig { returns(String) }
785
+ attr_accessor :discount
786
+ # Details to determine how long the discount should be applied for.
787
+ sig { returns(::Stripe::Quote::CreateParams::Discount::DiscountEnd) }
788
+ attr_accessor :discount_end
789
+ # ID of the promotion code to create a new discount for.
790
+ sig { returns(String) }
791
+ attr_accessor :promotion_code
792
+ sig {
793
+ params(coupon: String, discount: String, discount_end: ::Stripe::Quote::CreateParams::Discount::DiscountEnd, promotion_code: String).void
794
+ }
795
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
796
+ end
797
+ class FromQuote < Stripe::RequestParams
798
+ # Whether this quote is a revision of the previous quote.
799
+ sig { returns(T::Boolean) }
800
+ attr_accessor :is_revision
801
+ # The `id` of the quote that will be cloned.
802
+ sig { returns(String) }
803
+ attr_accessor :quote
804
+ sig { params(is_revision: T::Boolean, quote: String).void }
805
+ def initialize(is_revision: nil, quote: nil); end
806
+ end
807
+ class InvoiceSettings < Stripe::RequestParams
808
+ class Issuer < Stripe::RequestParams
809
+ # The connected account being referenced when `type` is `account`.
810
+ sig { returns(String) }
811
+ attr_accessor :account
812
+ # Type of the account referenced in the request.
813
+ sig { returns(String) }
814
+ attr_accessor :type
815
+ sig { params(account: String, type: String).void }
816
+ def initialize(account: nil, type: nil); end
817
+ end
818
+ # Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
819
+ sig { returns(Integer) }
820
+ attr_accessor :days_until_due
821
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
822
+ sig { returns(::Stripe::Quote::CreateParams::InvoiceSettings::Issuer) }
823
+ attr_accessor :issuer
824
+ sig {
825
+ params(days_until_due: Integer, issuer: ::Stripe::Quote::CreateParams::InvoiceSettings::Issuer).void
826
+ }
827
+ def initialize(days_until_due: nil, issuer: nil); end
828
+ end
829
+ class Line < Stripe::RequestParams
830
+ class Action < Stripe::RequestParams
831
+ class AddDiscount < Stripe::RequestParams
832
+ class DiscountEnd < Stripe::RequestParams
833
+ # The type of calculation made to determine when the discount ends.
834
+ sig { returns(String) }
835
+ attr_accessor :type
836
+ sig { params(type: String).void }
837
+ def initialize(type: nil); end
838
+ end
839
+ # The coupon code to redeem.
840
+ sig { returns(String) }
841
+ attr_accessor :coupon
842
+ # An ID of an existing discount for a coupon that was already redeemed.
843
+ sig { returns(String) }
844
+ attr_accessor :discount
845
+ # Details to determine how long the discount should be applied for.
846
+ sig { returns(::Stripe::Quote::CreateParams::Line::Action::AddDiscount::DiscountEnd) }
847
+ attr_accessor :discount_end
848
+ # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array.
849
+ sig { returns(Integer) }
850
+ attr_accessor :index
851
+ # The promotion code to redeem.
852
+ sig { returns(String) }
853
+ attr_accessor :promotion_code
854
+ sig {
855
+ params(coupon: String, discount: String, discount_end: ::Stripe::Quote::CreateParams::Line::Action::AddDiscount::DiscountEnd, index: Integer, promotion_code: String).void
856
+ }
857
+ def initialize(
858
+ coupon: nil,
859
+ discount: nil,
860
+ discount_end: nil,
861
+ index: nil,
862
+ promotion_code: nil
863
+ ); end
864
+ end
865
+ class AddItem < Stripe::RequestParams
866
+ class Discount < Stripe::RequestParams
867
+ class DiscountEnd < Stripe::RequestParams
868
+ class Duration < Stripe::RequestParams
869
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
870
+ sig { returns(String) }
871
+ attr_accessor :interval
872
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
873
+ sig { returns(Integer) }
874
+ attr_accessor :interval_count
875
+ sig { params(interval: String, interval_count: Integer).void }
876
+ def initialize(interval: nil, interval_count: nil); end
877
+ end
878
+ # Time span for the redeemed discount.
879
+ sig {
880
+ returns(::Stripe::Quote::CreateParams::Line::Action::AddItem::Discount::DiscountEnd::Duration)
881
+ }
882
+ attr_accessor :duration
883
+ # A precise Unix timestamp for the discount to end. Must be in the future.
884
+ sig { returns(Integer) }
885
+ attr_accessor :timestamp
886
+ # The type of calculation made to determine when the discount ends.
887
+ sig { returns(String) }
888
+ attr_accessor :type
889
+ sig {
890
+ params(duration: ::Stripe::Quote::CreateParams::Line::Action::AddItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
891
+ }
892
+ def initialize(duration: nil, timestamp: nil, type: nil); end
893
+ end
894
+ # ID of the coupon to create a new discount for.
895
+ sig { returns(String) }
896
+ attr_accessor :coupon
897
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
898
+ sig { returns(String) }
899
+ attr_accessor :discount
900
+ # Details to determine how long the discount should be applied for.
901
+ sig {
902
+ returns(::Stripe::Quote::CreateParams::Line::Action::AddItem::Discount::DiscountEnd)
903
+ }
904
+ attr_accessor :discount_end
905
+ # ID of the promotion code to create a new discount for.
906
+ sig { returns(String) }
907
+ attr_accessor :promotion_code
908
+ sig {
909
+ params(coupon: String, discount: String, discount_end: ::Stripe::Quote::CreateParams::Line::Action::AddItem::Discount::DiscountEnd, promotion_code: String).void
910
+ }
911
+ def initialize(
912
+ coupon: nil,
913
+ discount: nil,
914
+ discount_end: nil,
915
+ promotion_code: nil
916
+ ); end
917
+ end
918
+ class Trial < Stripe::RequestParams
919
+ # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
920
+ sig { returns(T::Array[String]) }
921
+ attr_accessor :converts_to
922
+ # Determines the type of trial for this item.
923
+ sig { returns(String) }
924
+ attr_accessor :type
925
+ sig { params(converts_to: T::Array[String], type: String).void }
926
+ def initialize(converts_to: nil, type: nil); end
927
+ end
928
+ # The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
929
+ sig {
930
+ returns(T::Array[::Stripe::Quote::CreateParams::Line::Action::AddItem::Discount])
931
+ }
932
+ attr_accessor :discounts
933
+ # 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`.
934
+ sig { returns(T::Hash[String, String]) }
935
+ attr_accessor :metadata
936
+ # The ID of the price object.
937
+ sig { returns(String) }
938
+ attr_accessor :price
939
+ # Quantity for this item.
940
+ sig { returns(Integer) }
941
+ attr_accessor :quantity
942
+ # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.
943
+ sig { returns(T::Array[String]) }
944
+ attr_accessor :tax_rates
945
+ # Options that configure the trial on the subscription item.
946
+ sig { returns(::Stripe::Quote::CreateParams::Line::Action::AddItem::Trial) }
947
+ attr_accessor :trial
948
+ sig {
949
+ params(discounts: T::Array[::Stripe::Quote::CreateParams::Line::Action::AddItem::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::Quote::CreateParams::Line::Action::AddItem::Trial).void
950
+ }
951
+ def initialize(
952
+ discounts: nil,
953
+ metadata: nil,
954
+ price: nil,
955
+ quantity: nil,
956
+ tax_rates: nil,
957
+ trial: nil
958
+ ); end
959
+ end
960
+ class RemoveDiscount < Stripe::RequestParams
961
+ # The coupon code to remove from the `discounts` array.
962
+ sig { returns(String) }
963
+ attr_accessor :coupon
964
+ # The ID of a discount to remove from the `discounts` array.
965
+ sig { returns(String) }
966
+ attr_accessor :discount
967
+ # The ID of a promotion code to remove from the `discounts` array.
968
+ sig { returns(String) }
969
+ attr_accessor :promotion_code
970
+ sig { params(coupon: String, discount: String, promotion_code: String).void }
971
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
972
+ end
973
+ class RemoveItem < Stripe::RequestParams
974
+ # ID of a price to remove.
975
+ sig { returns(String) }
976
+ attr_accessor :price
977
+ sig { params(price: String).void }
978
+ def initialize(price: nil); end
979
+ end
980
+ class SetDiscount < Stripe::RequestParams
981
+ # The coupon code to replace the `discounts` array with.
982
+ sig { returns(String) }
983
+ attr_accessor :coupon
984
+ # An ID of an existing discount to replace the `discounts` array with.
985
+ sig { returns(String) }
986
+ attr_accessor :discount
987
+ # An ID of an existing promotion code to replace the `discounts` array with.
988
+ sig { returns(String) }
989
+ attr_accessor :promotion_code
990
+ sig { params(coupon: String, discount: String, promotion_code: String).void }
991
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
992
+ end
993
+ class SetItem < Stripe::RequestParams
994
+ class Discount < Stripe::RequestParams
995
+ class DiscountEnd < Stripe::RequestParams
996
+ class Duration < Stripe::RequestParams
997
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
998
+ sig { returns(String) }
999
+ attr_accessor :interval
1000
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1001
+ sig { returns(Integer) }
1002
+ attr_accessor :interval_count
1003
+ sig { params(interval: String, interval_count: Integer).void }
1004
+ def initialize(interval: nil, interval_count: nil); end
1005
+ end
1006
+ # Time span for the redeemed discount.
1007
+ sig {
1008
+ returns(::Stripe::Quote::CreateParams::Line::Action::SetItem::Discount::DiscountEnd::Duration)
1009
+ }
1010
+ attr_accessor :duration
1011
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1012
+ sig { returns(Integer) }
1013
+ attr_accessor :timestamp
1014
+ # The type of calculation made to determine when the discount ends.
1015
+ sig { returns(String) }
1016
+ attr_accessor :type
1017
+ sig {
1018
+ params(duration: ::Stripe::Quote::CreateParams::Line::Action::SetItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
1019
+ }
1020
+ def initialize(duration: nil, timestamp: nil, type: nil); end
1021
+ end
1022
+ # ID of the coupon to create a new discount for.
1023
+ sig { returns(String) }
1024
+ attr_accessor :coupon
1025
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1026
+ sig { returns(String) }
1027
+ attr_accessor :discount
1028
+ # Details to determine how long the discount should be applied for.
1029
+ sig {
1030
+ returns(::Stripe::Quote::CreateParams::Line::Action::SetItem::Discount::DiscountEnd)
1031
+ }
1032
+ attr_accessor :discount_end
1033
+ # ID of the promotion code to create a new discount for.
1034
+ sig { returns(String) }
1035
+ attr_accessor :promotion_code
1036
+ sig {
1037
+ params(coupon: String, discount: String, discount_end: ::Stripe::Quote::CreateParams::Line::Action::SetItem::Discount::DiscountEnd, promotion_code: String).void
1038
+ }
1039
+ def initialize(
1040
+ coupon: nil,
1041
+ discount: nil,
1042
+ discount_end: nil,
1043
+ promotion_code: nil
1044
+ ); end
1045
+ end
1046
+ class Trial < Stripe::RequestParams
1047
+ # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
1048
+ sig { returns(T::Array[String]) }
1049
+ attr_accessor :converts_to
1050
+ # Determines the type of trial for this item.
1051
+ sig { returns(String) }
1052
+ attr_accessor :type
1053
+ sig { params(converts_to: T::Array[String], type: String).void }
1054
+ def initialize(converts_to: nil, type: nil); end
1055
+ end
1056
+ # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`.
1057
+ sig {
1058
+ returns(T::Array[::Stripe::Quote::CreateParams::Line::Action::SetItem::Discount])
1059
+ }
1060
+ attr_accessor :discounts
1061
+ # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`.
1062
+ sig { returns(T::Hash[String, String]) }
1063
+ attr_accessor :metadata
1064
+ # The ID of the price object.
1065
+ sig { returns(String) }
1066
+ attr_accessor :price
1067
+ # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`.
1068
+ sig { returns(Integer) }
1069
+ attr_accessor :quantity
1070
+ # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`.
1071
+ sig { returns(T::Array[String]) }
1072
+ attr_accessor :tax_rates
1073
+ # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`.
1074
+ sig { returns(::Stripe::Quote::CreateParams::Line::Action::SetItem::Trial) }
1075
+ attr_accessor :trial
1076
+ sig {
1077
+ params(discounts: T::Array[::Stripe::Quote::CreateParams::Line::Action::SetItem::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::Quote::CreateParams::Line::Action::SetItem::Trial).void
1078
+ }
1079
+ def initialize(
1080
+ discounts: nil,
1081
+ metadata: nil,
1082
+ price: nil,
1083
+ quantity: nil,
1084
+ tax_rates: nil,
1085
+ trial: nil
1086
+ ); end
1087
+ end
1088
+ # Details for the `add_discount` type.
1089
+ sig { returns(::Stripe::Quote::CreateParams::Line::Action::AddDiscount) }
1090
+ attr_accessor :add_discount
1091
+ # Details for the `add_item` type.
1092
+ sig { returns(::Stripe::Quote::CreateParams::Line::Action::AddItem) }
1093
+ attr_accessor :add_item
1094
+ # Details for the `add_metadata` type: specify a hash of key-value pairs.
1095
+ sig { returns(T::Hash[String, String]) }
1096
+ attr_accessor :add_metadata
1097
+ # Details for the `remove_discount` type.
1098
+ sig { returns(::Stripe::Quote::CreateParams::Line::Action::RemoveDiscount) }
1099
+ attr_accessor :remove_discount
1100
+ # Details for the `remove_item` type.
1101
+ sig { returns(::Stripe::Quote::CreateParams::Line::Action::RemoveItem) }
1102
+ attr_accessor :remove_item
1103
+ # Details for the `remove_metadata` type: specify an array of metadata keys.
1104
+ sig { returns(T::Array[String]) }
1105
+ attr_accessor :remove_metadata
1106
+ # Details for the `set_discounts` type.
1107
+ sig { returns(T::Array[::Stripe::Quote::CreateParams::Line::Action::SetDiscount]) }
1108
+ attr_accessor :set_discounts
1109
+ # Details for the `set_items` type.
1110
+ sig { returns(T::Array[::Stripe::Quote::CreateParams::Line::Action::SetItem]) }
1111
+ attr_accessor :set_items
1112
+ # Details for the `set_metadata` type: specify an array of key-value pairs.
1113
+ sig { returns(T.nilable(T::Hash[String, String])) }
1114
+ attr_accessor :set_metadata
1115
+ # The type of action the quote line performs.
1116
+ sig { returns(String) }
1117
+ attr_accessor :type
1118
+ sig {
1119
+ params(add_discount: ::Stripe::Quote::CreateParams::Line::Action::AddDiscount, add_item: ::Stripe::Quote::CreateParams::Line::Action::AddItem, add_metadata: T::Hash[String, String], remove_discount: ::Stripe::Quote::CreateParams::Line::Action::RemoveDiscount, remove_item: ::Stripe::Quote::CreateParams::Line::Action::RemoveItem, remove_metadata: T::Array[String], set_discounts: T::Array[::Stripe::Quote::CreateParams::Line::Action::SetDiscount], set_items: T::Array[::Stripe::Quote::CreateParams::Line::Action::SetItem], set_metadata: T.nilable(T::Hash[String, String]), type: String).void
1120
+ }
1121
+ def initialize(
1122
+ add_discount: nil,
1123
+ add_item: nil,
1124
+ add_metadata: nil,
1125
+ remove_discount: nil,
1126
+ remove_item: nil,
1127
+ remove_metadata: nil,
1128
+ set_discounts: nil,
1129
+ set_items: nil,
1130
+ set_metadata: nil,
1131
+ type: nil
1132
+ ); end
1133
+ end
1134
+ class AppliesTo < Stripe::RequestParams
1135
+ # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
1136
+ sig { returns(String) }
1137
+ attr_accessor :new_reference
1138
+ # The ID of the schedule the line applies to.
1139
+ sig { returns(String) }
1140
+ attr_accessor :subscription_schedule
1141
+ # Describes whether the quote line is affecting a new schedule or an existing schedule.
1142
+ sig { returns(String) }
1143
+ attr_accessor :type
1144
+ sig { params(new_reference: String, subscription_schedule: String, type: String).void }
1145
+ def initialize(new_reference: nil, subscription_schedule: nil, type: nil); end
1146
+ end
1147
+ class CancelSubscriptionSchedule < Stripe::RequestParams
1148
+ # Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
1149
+ sig { returns(String) }
1150
+ attr_accessor :cancel_at
1151
+ # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`.
1152
+ sig { returns(T::Boolean) }
1153
+ attr_accessor :invoice_now
1154
+ # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
1155
+ sig { returns(T::Boolean) }
1156
+ attr_accessor :prorate
1157
+ sig { params(cancel_at: String, invoice_now: T::Boolean, prorate: T::Boolean).void }
1158
+ def initialize(cancel_at: nil, invoice_now: nil, prorate: nil); end
1159
+ end
1160
+ class EndsAt < Stripe::RequestParams
1161
+ class DiscountEnd < Stripe::RequestParams
1162
+ # The ID of a specific discount.
1163
+ sig { returns(String) }
1164
+ attr_accessor :discount
1165
+ sig { params(discount: String).void }
1166
+ def initialize(discount: nil); end
1167
+ end
1168
+ class Duration < Stripe::RequestParams
1169
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1170
+ sig { returns(String) }
1171
+ attr_accessor :interval
1172
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1173
+ sig { returns(Integer) }
1174
+ attr_accessor :interval_count
1175
+ sig { params(interval: String, interval_count: Integer).void }
1176
+ def initialize(interval: nil, interval_count: nil); end
1177
+ end
1178
+ # Use the `end` time of a given discount.
1179
+ sig { returns(::Stripe::Quote::CreateParams::Line::EndsAt::DiscountEnd) }
1180
+ attr_accessor :discount_end
1181
+ # Time span for the quote line starting from the `starts_at` date.
1182
+ sig { returns(::Stripe::Quote::CreateParams::Line::EndsAt::Duration) }
1183
+ attr_accessor :duration
1184
+ # A precise Unix timestamp.
1185
+ sig { returns(Integer) }
1186
+ attr_accessor :timestamp
1187
+ # Select a way to pass in `ends_at`.
1188
+ sig { returns(String) }
1189
+ attr_accessor :type
1190
+ sig {
1191
+ params(discount_end: ::Stripe::Quote::CreateParams::Line::EndsAt::DiscountEnd, duration: ::Stripe::Quote::CreateParams::Line::EndsAt::Duration, timestamp: Integer, type: String).void
1192
+ }
1193
+ def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil); end
1194
+ end
1195
+ class SetPauseCollection < Stripe::RequestParams
1196
+ class Set < Stripe::RequestParams
1197
+ # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
1198
+ sig { returns(String) }
1199
+ attr_accessor :behavior
1200
+ sig { params(behavior: String).void }
1201
+ def initialize(behavior: nil); end
1202
+ end
1203
+ # Details of the pause_collection behavior to apply to the amendment.
1204
+ sig { returns(::Stripe::Quote::CreateParams::Line::SetPauseCollection::Set) }
1205
+ attr_accessor :set
1206
+ # Determines the type of the pause_collection amendment.
1207
+ sig { returns(String) }
1208
+ attr_accessor :type
1209
+ sig {
1210
+ params(set: ::Stripe::Quote::CreateParams::Line::SetPauseCollection::Set, type: String).void
1211
+ }
1212
+ def initialize(set: nil, type: nil); end
1213
+ end
1214
+ class StartsAt < Stripe::RequestParams
1215
+ class DiscountEnd < Stripe::RequestParams
1216
+ # The ID of a specific discount.
1217
+ sig { returns(String) }
1218
+ attr_accessor :discount
1219
+ sig { params(discount: String).void }
1220
+ def initialize(discount: nil); end
1221
+ end
1222
+ class LineEndsAt < Stripe::RequestParams
1223
+ # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
1224
+ sig { returns(Integer) }
1225
+ attr_accessor :index
1226
+ sig { params(index: Integer).void }
1227
+ def initialize(index: nil); end
1228
+ end
1229
+ # Use the `end` time of a given discount.
1230
+ sig { returns(::Stripe::Quote::CreateParams::Line::StartsAt::DiscountEnd) }
1231
+ attr_accessor :discount_end
1232
+ # The timestamp the given line ends at.
1233
+ sig { returns(::Stripe::Quote::CreateParams::Line::StartsAt::LineEndsAt) }
1234
+ attr_accessor :line_ends_at
1235
+ # A precise Unix timestamp.
1236
+ sig { returns(Integer) }
1237
+ attr_accessor :timestamp
1238
+ # Select a way to pass in `starts_at`.
1239
+ sig { returns(String) }
1240
+ attr_accessor :type
1241
+ sig {
1242
+ params(discount_end: ::Stripe::Quote::CreateParams::Line::StartsAt::DiscountEnd, line_ends_at: ::Stripe::Quote::CreateParams::Line::StartsAt::LineEndsAt, timestamp: Integer, type: String).void
1243
+ }
1244
+ def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil); end
1245
+ end
1246
+ class TrialSettings < Stripe::RequestParams
1247
+ class EndBehavior < Stripe::RequestParams
1248
+ # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
1249
+ sig { returns(String) }
1250
+ attr_accessor :prorate_up_front
1251
+ sig { params(prorate_up_front: String).void }
1252
+ def initialize(prorate_up_front: nil); end
1253
+ end
1254
+ # Defines how the subscription should behave when a trial ends.
1255
+ sig { returns(::Stripe::Quote::CreateParams::Line::TrialSettings::EndBehavior) }
1256
+ attr_accessor :end_behavior
1257
+ sig {
1258
+ params(end_behavior: ::Stripe::Quote::CreateParams::Line::TrialSettings::EndBehavior).void
1259
+ }
1260
+ def initialize(end_behavior: nil); end
1261
+ end
1262
+ # An array of operations the quote line performs.
1263
+ sig { returns(T::Array[::Stripe::Quote::CreateParams::Line::Action]) }
1264
+ attr_accessor :actions
1265
+ # Details to identify the subscription schedule the quote line applies to.
1266
+ sig { returns(::Stripe::Quote::CreateParams::Line::AppliesTo) }
1267
+ attr_accessor :applies_to
1268
+ # For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line.
1269
+ sig { returns(String) }
1270
+ attr_accessor :billing_cycle_anchor
1271
+ # A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings.
1272
+ sig { returns(::Stripe::Quote::CreateParams::Line::CancelSubscriptionSchedule) }
1273
+ attr_accessor :cancel_subscription_schedule
1274
+ # Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line.
1275
+ sig { returns(::Stripe::Quote::CreateParams::Line::EndsAt) }
1276
+ attr_accessor :ends_at
1277
+ # Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts.
1278
+ sig { returns(String) }
1279
+ attr_accessor :proration_behavior
1280
+ # Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
1281
+ sig { returns(::Stripe::Quote::CreateParams::Line::SetPauseCollection) }
1282
+ attr_accessor :set_pause_collection
1283
+ # Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
1284
+ sig { returns(String) }
1285
+ attr_accessor :set_schedule_end
1286
+ # Details to identify the earliest timestamp where the proposed change should take effect.
1287
+ sig { returns(::Stripe::Quote::CreateParams::Line::StartsAt) }
1288
+ attr_accessor :starts_at
1289
+ # Settings related to subscription trials.
1290
+ sig { returns(::Stripe::Quote::CreateParams::Line::TrialSettings) }
1291
+ attr_accessor :trial_settings
1292
+ sig {
1293
+ params(actions: T::Array[::Stripe::Quote::CreateParams::Line::Action], applies_to: ::Stripe::Quote::CreateParams::Line::AppliesTo, billing_cycle_anchor: String, cancel_subscription_schedule: ::Stripe::Quote::CreateParams::Line::CancelSubscriptionSchedule, ends_at: ::Stripe::Quote::CreateParams::Line::EndsAt, proration_behavior: String, set_pause_collection: ::Stripe::Quote::CreateParams::Line::SetPauseCollection, set_schedule_end: String, starts_at: ::Stripe::Quote::CreateParams::Line::StartsAt, trial_settings: ::Stripe::Quote::CreateParams::Line::TrialSettings).void
1294
+ }
1295
+ def initialize(
1296
+ actions: nil,
1297
+ applies_to: nil,
1298
+ billing_cycle_anchor: nil,
1299
+ cancel_subscription_schedule: nil,
1300
+ ends_at: nil,
1301
+ proration_behavior: nil,
1302
+ set_pause_collection: nil,
1303
+ set_schedule_end: nil,
1304
+ starts_at: nil,
1305
+ trial_settings: nil
1306
+ ); end
1307
+ end
1308
+ class LineItem < Stripe::RequestParams
1309
+ class Discount < Stripe::RequestParams
1310
+ class DiscountEnd < Stripe::RequestParams
1311
+ class Duration < Stripe::RequestParams
1312
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1313
+ sig { returns(String) }
1314
+ attr_accessor :interval
1315
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1316
+ sig { returns(Integer) }
1317
+ attr_accessor :interval_count
1318
+ sig { params(interval: String, interval_count: Integer).void }
1319
+ def initialize(interval: nil, interval_count: nil); end
1320
+ end
1321
+ # Time span for the redeemed discount.
1322
+ sig {
1323
+ returns(::Stripe::Quote::CreateParams::LineItem::Discount::DiscountEnd::Duration)
1324
+ }
1325
+ attr_accessor :duration
1326
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1327
+ sig { returns(Integer) }
1328
+ attr_accessor :timestamp
1329
+ # The type of calculation made to determine when the discount ends.
1330
+ sig { returns(String) }
1331
+ attr_accessor :type
1332
+ sig {
1333
+ params(duration: ::Stripe::Quote::CreateParams::LineItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
1334
+ }
1335
+ def initialize(duration: nil, timestamp: nil, type: nil); end
1336
+ end
1337
+ # ID of the coupon to create a new discount for.
1338
+ sig { returns(String) }
1339
+ attr_accessor :coupon
1340
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1341
+ sig { returns(String) }
1342
+ attr_accessor :discount
1343
+ # Details to determine how long the discount should be applied for.
1344
+ sig { returns(::Stripe::Quote::CreateParams::LineItem::Discount::DiscountEnd) }
1345
+ attr_accessor :discount_end
1346
+ # ID of the promotion code to create a new discount for.
1347
+ sig { returns(String) }
1348
+ attr_accessor :promotion_code
1349
+ sig {
1350
+ params(coupon: String, discount: String, discount_end: ::Stripe::Quote::CreateParams::LineItem::Discount::DiscountEnd, promotion_code: String).void
1351
+ }
1352
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
1353
+ end
1354
+ class PriceData < Stripe::RequestParams
1355
+ class Recurring < Stripe::RequestParams
1356
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
1357
+ sig { returns(String) }
1358
+ attr_accessor :interval
1359
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
1360
+ sig { returns(Integer) }
1361
+ attr_accessor :interval_count
1362
+ sig { params(interval: String, interval_count: Integer).void }
1363
+ def initialize(interval: nil, interval_count: nil); end
1364
+ end
1365
+ # 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).
1366
+ sig { returns(String) }
1367
+ attr_accessor :currency
1368
+ # The ID of the product that this price will belong to.
1369
+ sig { returns(String) }
1370
+ attr_accessor :product
1371
+ # The recurring components of a price such as `interval` and `interval_count`.
1372
+ sig { returns(::Stripe::Quote::CreateParams::LineItem::PriceData::Recurring) }
1373
+ attr_accessor :recurring
1374
+ # 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.
1375
+ sig { returns(String) }
1376
+ attr_accessor :tax_behavior
1377
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
1378
+ sig { returns(Integer) }
1379
+ attr_accessor :unit_amount
1380
+ # 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.
1381
+ sig { returns(String) }
1382
+ attr_accessor :unit_amount_decimal
1383
+ sig {
1384
+ params(currency: String, product: String, recurring: ::Stripe::Quote::CreateParams::LineItem::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
1385
+ }
1386
+ def initialize(
1387
+ currency: nil,
1388
+ product: nil,
1389
+ recurring: nil,
1390
+ tax_behavior: nil,
1391
+ unit_amount: nil,
1392
+ unit_amount_decimal: nil
1393
+ ); end
1394
+ end
1395
+ # The discounts applied to this line item.
1396
+ sig { returns(T.nilable(T::Array[::Stripe::Quote::CreateParams::LineItem::Discount])) }
1397
+ attr_accessor :discounts
1398
+ # The ID of the price object. One of `price` or `price_data` is required.
1399
+ sig { returns(String) }
1400
+ attr_accessor :price
1401
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
1402
+ sig { returns(::Stripe::Quote::CreateParams::LineItem::PriceData) }
1403
+ attr_accessor :price_data
1404
+ # The quantity of the line item.
1405
+ sig { returns(Integer) }
1406
+ attr_accessor :quantity
1407
+ # The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
1408
+ sig { returns(T.nilable(T::Array[String])) }
1409
+ attr_accessor :tax_rates
1410
+ sig {
1411
+ params(discounts: T.nilable(T::Array[::Stripe::Quote::CreateParams::LineItem::Discount]), price: String, price_data: ::Stripe::Quote::CreateParams::LineItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void
1412
+ }
1413
+ def initialize(
1414
+ discounts: nil,
1415
+ price: nil,
1416
+ price_data: nil,
1417
+ quantity: nil,
1418
+ tax_rates: nil
1419
+ ); end
1420
+ end
1421
+ class SubscriptionData < Stripe::RequestParams
1422
+ class BillOnAcceptance < Stripe::RequestParams
1423
+ class BillFrom < Stripe::RequestParams
1424
+ class LineStartsAt < Stripe::RequestParams
1425
+ # The ID of a quote line.
1426
+ sig { returns(String) }
1427
+ attr_accessor :id
1428
+ # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
1429
+ sig { returns(Integer) }
1430
+ attr_accessor :index
1431
+ sig { params(id: String, index: Integer).void }
1432
+ def initialize(id: nil, index: nil); end
1433
+ end
1434
+ # Details of a Quote line to start the bill period from.
1435
+ sig {
1436
+ returns(::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillFrom::LineStartsAt)
1437
+ }
1438
+ attr_accessor :line_starts_at
1439
+ # A precise Unix timestamp.
1440
+ sig { returns(Integer) }
1441
+ attr_accessor :timestamp
1442
+ # The type of method to specify the `bill_from` time.
1443
+ sig { returns(String) }
1444
+ attr_accessor :type
1445
+ sig {
1446
+ params(line_starts_at: ::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillFrom::LineStartsAt, timestamp: Integer, type: String).void
1447
+ }
1448
+ def initialize(line_starts_at: nil, timestamp: nil, type: nil); end
1449
+ end
1450
+ class BillUntil < Stripe::RequestParams
1451
+ class Duration < Stripe::RequestParams
1452
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1453
+ sig { returns(String) }
1454
+ attr_accessor :interval
1455
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1456
+ sig { returns(Integer) }
1457
+ attr_accessor :interval_count
1458
+ sig { params(interval: String, interval_count: Integer).void }
1459
+ def initialize(interval: nil, interval_count: nil); end
1460
+ end
1461
+ class LineEndsAt < Stripe::RequestParams
1462
+ # The ID of a quote line.
1463
+ sig { returns(String) }
1464
+ attr_accessor :id
1465
+ # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
1466
+ sig { returns(Integer) }
1467
+ attr_accessor :index
1468
+ sig { params(id: String, index: Integer).void }
1469
+ def initialize(id: nil, index: nil); end
1470
+ end
1471
+ # Details of the duration over which to bill.
1472
+ sig {
1473
+ returns(::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil::Duration)
1474
+ }
1475
+ attr_accessor :duration
1476
+ # Details of a Quote line item from which to bill until.
1477
+ sig {
1478
+ returns(::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil::LineEndsAt)
1479
+ }
1480
+ attr_accessor :line_ends_at
1481
+ # A precise Unix timestamp.
1482
+ sig { returns(Integer) }
1483
+ attr_accessor :timestamp
1484
+ # The type of method to specify the `bill_until` time.
1485
+ sig { returns(String) }
1486
+ attr_accessor :type
1487
+ sig {
1488
+ params(duration: ::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil::Duration, line_ends_at: ::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil::LineEndsAt, timestamp: Integer, type: String).void
1489
+ }
1490
+ def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil); end
1491
+ end
1492
+ # The start of the period to bill from when the Quote is accepted.
1493
+ sig {
1494
+ returns(::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillFrom)
1495
+ }
1496
+ attr_accessor :bill_from
1497
+ # The end of the period to bill until when the Quote is accepted.
1498
+ sig {
1499
+ returns(::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil)
1500
+ }
1501
+ attr_accessor :bill_until
1502
+ sig {
1503
+ params(bill_from: ::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillFrom, bill_until: ::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil).void
1504
+ }
1505
+ def initialize(bill_from: nil, bill_until: nil); end
1506
+ end
1507
+ class Prebilling < Stripe::RequestParams
1508
+ # This is used to determine the number of billing cycles to prebill.
1509
+ sig { returns(Integer) }
1510
+ attr_accessor :iterations
1511
+ sig { params(iterations: Integer).void }
1512
+ def initialize(iterations: nil); end
1513
+ end
1514
+ # Describes the period to bill for upon accepting the quote.
1515
+ sig { returns(::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance) }
1516
+ attr_accessor :bill_on_acceptance
1517
+ # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
1518
+ sig { returns(String) }
1519
+ attr_accessor :billing_behavior
1520
+ # When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
1521
+ sig { returns(T.nilable(String)) }
1522
+ attr_accessor :billing_cycle_anchor
1523
+ # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
1524
+ sig { returns(String) }
1525
+ attr_accessor :description
1526
+ # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
1527
+ sig { returns(T.nilable(T.any(String, Integer))) }
1528
+ attr_accessor :effective_date
1529
+ # Behavior of the subscription schedule and underlying subscription when it ends.
1530
+ sig { returns(String) }
1531
+ attr_accessor :end_behavior
1532
+ # The id of a subscription that the quote will update. By default, the quote will contain the state of the subscription (such as line items, collection method and billing thresholds) unless overridden.
1533
+ sig { returns(String) }
1534
+ attr_accessor :from_subscription
1535
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
1536
+ sig { returns(T::Hash[String, String]) }
1537
+ attr_accessor :metadata
1538
+ # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
1539
+ sig { returns(T.nilable(::Stripe::Quote::CreateParams::SubscriptionData::Prebilling)) }
1540
+ attr_accessor :prebilling
1541
+ # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
1542
+ #
1543
+ # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
1544
+ #
1545
+ # Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
1546
+ #
1547
+ # Prorations can be disabled by passing `none`.
1548
+ sig { returns(String) }
1549
+ attr_accessor :proration_behavior
1550
+ # Integer representing the number of trial period days before the customer is charged for the first time.
1551
+ sig { returns(T.nilable(Integer)) }
1552
+ attr_accessor :trial_period_days
1553
+ sig {
1554
+ params(bill_on_acceptance: ::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance, billing_behavior: String, billing_cycle_anchor: T.nilable(String), description: String, effective_date: T.nilable(T.any(String, Integer)), end_behavior: String, from_subscription: String, metadata: T::Hash[String, String], prebilling: T.nilable(::Stripe::Quote::CreateParams::SubscriptionData::Prebilling), proration_behavior: String, trial_period_days: T.nilable(Integer)).void
1555
+ }
1556
+ def initialize(
1557
+ bill_on_acceptance: nil,
1558
+ billing_behavior: nil,
1559
+ billing_cycle_anchor: nil,
1560
+ description: nil,
1561
+ effective_date: nil,
1562
+ end_behavior: nil,
1563
+ from_subscription: nil,
1564
+ metadata: nil,
1565
+ prebilling: nil,
1566
+ proration_behavior: nil,
1567
+ trial_period_days: nil
1568
+ ); end
1569
+ end
1570
+ class SubscriptionDataOverride < Stripe::RequestParams
1571
+ class AppliesTo < Stripe::RequestParams
1572
+ # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
1573
+ sig { returns(String) }
1574
+ attr_accessor :new_reference
1575
+ # The ID of the schedule the line applies to.
1576
+ sig { returns(String) }
1577
+ attr_accessor :subscription_schedule
1578
+ # Describes whether the quote line is affecting a new schedule or an existing schedule.
1579
+ sig { returns(String) }
1580
+ attr_accessor :type
1581
+ sig { params(new_reference: String, subscription_schedule: String, type: String).void }
1582
+ def initialize(new_reference: nil, subscription_schedule: nil, type: nil); end
1583
+ end
1584
+ class BillOnAcceptance < Stripe::RequestParams
1585
+ class BillFrom < Stripe::RequestParams
1586
+ class LineStartsAt < Stripe::RequestParams
1587
+ # The ID of a quote line.
1588
+ sig { returns(String) }
1589
+ attr_accessor :id
1590
+ # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
1591
+ sig { returns(Integer) }
1592
+ attr_accessor :index
1593
+ sig { params(id: String, index: Integer).void }
1594
+ def initialize(id: nil, index: nil); end
1595
+ end
1596
+ # Details of a Quote line to start the bill period from.
1597
+ sig {
1598
+ returns(::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom::LineStartsAt)
1599
+ }
1600
+ attr_accessor :line_starts_at
1601
+ # A precise Unix timestamp.
1602
+ sig { returns(Integer) }
1603
+ attr_accessor :timestamp
1604
+ # The type of method to specify the `bill_from` time.
1605
+ sig { returns(String) }
1606
+ attr_accessor :type
1607
+ sig {
1608
+ params(line_starts_at: ::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom::LineStartsAt, timestamp: Integer, type: String).void
1609
+ }
1610
+ def initialize(line_starts_at: nil, timestamp: nil, type: nil); end
1611
+ end
1612
+ class BillUntil < Stripe::RequestParams
1613
+ class Duration < Stripe::RequestParams
1614
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1615
+ sig { returns(String) }
1616
+ attr_accessor :interval
1617
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1618
+ sig { returns(Integer) }
1619
+ attr_accessor :interval_count
1620
+ sig { params(interval: String, interval_count: Integer).void }
1621
+ def initialize(interval: nil, interval_count: nil); end
1622
+ end
1623
+ class LineEndsAt < Stripe::RequestParams
1624
+ # The ID of a quote line.
1625
+ sig { returns(String) }
1626
+ attr_accessor :id
1627
+ # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
1628
+ sig { returns(Integer) }
1629
+ attr_accessor :index
1630
+ sig { params(id: String, index: Integer).void }
1631
+ def initialize(id: nil, index: nil); end
1632
+ end
1633
+ # Details of the duration over which to bill.
1634
+ sig {
1635
+ returns(::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::Duration)
1636
+ }
1637
+ attr_accessor :duration
1638
+ # Details of a Quote line item from which to bill until.
1639
+ sig {
1640
+ returns(::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::LineEndsAt)
1641
+ }
1642
+ attr_accessor :line_ends_at
1643
+ # A precise Unix timestamp.
1644
+ sig { returns(Integer) }
1645
+ attr_accessor :timestamp
1646
+ # The type of method to specify the `bill_until` time.
1647
+ sig { returns(String) }
1648
+ attr_accessor :type
1649
+ sig {
1650
+ params(duration: ::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::Duration, line_ends_at: ::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::LineEndsAt, timestamp: Integer, type: String).void
1651
+ }
1652
+ def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil); end
1653
+ end
1654
+ # The start of the period to bill from when the Quote is accepted.
1655
+ sig {
1656
+ returns(::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom)
1657
+ }
1658
+ attr_accessor :bill_from
1659
+ # The end of the period to bill until when the Quote is accepted.
1660
+ sig {
1661
+ returns(::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil)
1662
+ }
1663
+ attr_accessor :bill_until
1664
+ sig {
1665
+ params(bill_from: ::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom, bill_until: ::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil).void
1666
+ }
1667
+ def initialize(bill_from: nil, bill_until: nil); end
1668
+ end
1669
+ # Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
1670
+ sig { returns(::Stripe::Quote::CreateParams::SubscriptionDataOverride::AppliesTo) }
1671
+ attr_accessor :applies_to
1672
+ # Describes the period to bill for upon accepting the quote.
1673
+ sig { returns(::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance) }
1674
+ attr_accessor :bill_on_acceptance
1675
+ # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
1676
+ sig { returns(String) }
1677
+ attr_accessor :billing_behavior
1678
+ # The customer the Subscription Data override applies to. This is only relevant when `applies_to.type=new_reference`.
1679
+ sig { returns(String) }
1680
+ attr_accessor :customer
1681
+ # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
1682
+ sig { returns(String) }
1683
+ attr_accessor :description
1684
+ # Behavior of the subscription schedule and underlying subscription when it ends.
1685
+ sig { returns(String) }
1686
+ attr_accessor :end_behavior
1687
+ # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
1688
+ #
1689
+ # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
1690
+ #
1691
+ # Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
1692
+ #
1693
+ # Prorations can be disabled by passing `none`.
1694
+ sig { returns(String) }
1695
+ attr_accessor :proration_behavior
1696
+ sig {
1697
+ params(applies_to: ::Stripe::Quote::CreateParams::SubscriptionDataOverride::AppliesTo, bill_on_acceptance: ::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance, billing_behavior: String, customer: String, description: String, end_behavior: String, proration_behavior: String).void
1698
+ }
1699
+ def initialize(
1700
+ applies_to: nil,
1701
+ bill_on_acceptance: nil,
1702
+ billing_behavior: nil,
1703
+ customer: nil,
1704
+ description: nil,
1705
+ end_behavior: nil,
1706
+ proration_behavior: nil
1707
+ ); end
1708
+ end
1709
+ class TransferData < Stripe::RequestParams
1710
+ # The amount that will be transferred automatically when the invoice 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.
1711
+ sig { returns(Integer) }
1712
+ attr_accessor :amount
1713
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field.
1714
+ sig { returns(Float) }
1715
+ attr_accessor :amount_percent
1716
+ # ID of an existing, connected Stripe account.
1717
+ sig { returns(String) }
1718
+ attr_accessor :destination
1719
+ sig { params(amount: Integer, amount_percent: Float, destination: String).void }
1720
+ def initialize(amount: nil, amount_percent: nil, destination: nil); end
1721
+ end
1722
+ # Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
1723
+ sig { returns(T::Boolean) }
1724
+ attr_accessor :allow_backdated_lines
1725
+ # 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. There cannot be any line items with recurring prices when using this field.
1726
+ sig { returns(T.nilable(Integer)) }
1727
+ attr_accessor :application_fee_amount
1728
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field.
1729
+ sig { returns(T.nilable(Float)) }
1730
+ attr_accessor :application_fee_percent
1731
+ # Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
1732
+ sig { returns(::Stripe::Quote::CreateParams::AutomaticTax) }
1733
+ attr_accessor :automatic_tax
1734
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
1735
+ sig { returns(String) }
1736
+ attr_accessor :collection_method
1737
+ # The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
1738
+ sig { returns(String) }
1739
+ attr_accessor :customer
1740
+ # The tax rates that will apply to any line item that does not have `tax_rates` set.
1741
+ sig { returns(T.nilable(T::Array[String])) }
1742
+ attr_accessor :default_tax_rates
1743
+ # A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
1744
+ sig { returns(T.nilable(String)) }
1745
+ attr_accessor :description
1746
+ # The discounts applied to the quote.
1747
+ sig { returns(T.nilable(T::Array[::Stripe::Quote::CreateParams::Discount])) }
1748
+ attr_accessor :discounts
1749
+ # Specifies which fields in the response should be expanded.
1750
+ sig { returns(T::Array[String]) }
1751
+ attr_accessor :expand
1752
+ # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
1753
+ sig { returns(Integer) }
1754
+ attr_accessor :expires_at
1755
+ # A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
1756
+ sig { returns(T.nilable(String)) }
1757
+ attr_accessor :footer
1758
+ # Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`.
1759
+ sig { returns(::Stripe::Quote::CreateParams::FromQuote) }
1760
+ attr_accessor :from_quote
1761
+ # A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
1762
+ sig { returns(T.nilable(String)) }
1763
+ attr_accessor :header
1764
+ # All invoices will be billed using the specified settings.
1765
+ sig { returns(::Stripe::Quote::CreateParams::InvoiceSettings) }
1766
+ attr_accessor :invoice_settings
1767
+ # A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
1768
+ sig { returns(T::Array[::Stripe::Quote::CreateParams::LineItem]) }
1769
+ attr_accessor :line_items
1770
+ # A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
1771
+ sig { returns(T::Array[::Stripe::Quote::CreateParams::Line]) }
1772
+ attr_accessor :lines
1773
+ # 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`.
1774
+ sig { returns(T::Hash[String, String]) }
1775
+ attr_accessor :metadata
1776
+ # The account on behalf of which to charge.
1777
+ sig { returns(T.nilable(String)) }
1778
+ attr_accessor :on_behalf_of
1779
+ # When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
1780
+ sig { returns(::Stripe::Quote::CreateParams::SubscriptionData) }
1781
+ attr_accessor :subscription_data
1782
+ # List representing overrides for `subscription_data` configurations for specific subscription schedules.
1783
+ sig { returns(T::Array[::Stripe::Quote::CreateParams::SubscriptionDataOverride]) }
1784
+ attr_accessor :subscription_data_overrides
1785
+ # ID of the test clock to attach to the quote.
1786
+ sig { returns(String) }
1787
+ attr_accessor :test_clock
1788
+ # The data with which to automatically create a Transfer for each of the invoices.
1789
+ sig { returns(T.nilable(::Stripe::Quote::CreateParams::TransferData)) }
1790
+ attr_accessor :transfer_data
1791
+ sig {
1792
+ params(allow_backdated_lines: T::Boolean, application_fee_amount: T.nilable(Integer), application_fee_percent: T.nilable(Float), automatic_tax: ::Stripe::Quote::CreateParams::AutomaticTax, collection_method: String, customer: String, default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), discounts: T.nilable(T::Array[::Stripe::Quote::CreateParams::Discount]), expand: T::Array[String], expires_at: Integer, footer: T.nilable(String), from_quote: ::Stripe::Quote::CreateParams::FromQuote, header: T.nilable(String), invoice_settings: ::Stripe::Quote::CreateParams::InvoiceSettings, line_items: T::Array[::Stripe::Quote::CreateParams::LineItem], lines: T::Array[::Stripe::Quote::CreateParams::Line], metadata: T::Hash[String, String], on_behalf_of: T.nilable(String), subscription_data: ::Stripe::Quote::CreateParams::SubscriptionData, subscription_data_overrides: T::Array[::Stripe::Quote::CreateParams::SubscriptionDataOverride], test_clock: String, transfer_data: T.nilable(::Stripe::Quote::CreateParams::TransferData)).void
1793
+ }
1794
+ def initialize(
1795
+ allow_backdated_lines: nil,
1796
+ application_fee_amount: nil,
1797
+ application_fee_percent: nil,
1798
+ automatic_tax: nil,
1799
+ collection_method: nil,
1800
+ customer: nil,
1801
+ default_tax_rates: nil,
1802
+ description: nil,
1803
+ discounts: nil,
1804
+ expand: nil,
1805
+ expires_at: nil,
1806
+ footer: nil,
1807
+ from_quote: nil,
1808
+ header: nil,
1809
+ invoice_settings: nil,
1810
+ line_items: nil,
1811
+ lines: nil,
1812
+ metadata: nil,
1813
+ on_behalf_of: nil,
1814
+ subscription_data: nil,
1815
+ subscription_data_overrides: nil,
1816
+ test_clock: nil,
1817
+ transfer_data: nil
1818
+ ); end
1819
+ end
1820
+ class RetrieveParams < Stripe::RequestParams
1821
+ # Specifies which fields in the response should be expanded.
1822
+ sig { returns(T::Array[String]) }
1823
+ attr_accessor :expand
1824
+ sig { params(expand: T::Array[String]).void }
1825
+ def initialize(expand: nil); end
1826
+ end
1827
+ class UpdateParams < Stripe::RequestParams
1828
+ class AutomaticTax < Stripe::RequestParams
1829
+ class Liability < Stripe::RequestParams
1830
+ # The connected account being referenced when `type` is `account`.
1831
+ sig { returns(String) }
1832
+ attr_accessor :account
1833
+ # Type of the account referenced in the request.
1834
+ sig { returns(String) }
1835
+ attr_accessor :type
1836
+ sig { params(account: String, type: String).void }
1837
+ def initialize(account: nil, type: nil); end
1838
+ end
1839
+ # Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
1840
+ sig { returns(T::Boolean) }
1841
+ attr_accessor :enabled
1842
+ # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
1843
+ sig { returns(::Stripe::Quote::UpdateParams::AutomaticTax::Liability) }
1844
+ attr_accessor :liability
1845
+ sig {
1846
+ params(enabled: T::Boolean, liability: ::Stripe::Quote::UpdateParams::AutomaticTax::Liability).void
1847
+ }
1848
+ def initialize(enabled: nil, liability: nil); end
1849
+ end
1850
+ class Discount < Stripe::RequestParams
1851
+ class DiscountEnd < Stripe::RequestParams
1852
+ class Duration < Stripe::RequestParams
1853
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1854
+ sig { returns(String) }
1855
+ attr_accessor :interval
1856
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1857
+ sig { returns(Integer) }
1858
+ attr_accessor :interval_count
1859
+ sig { params(interval: String, interval_count: Integer).void }
1860
+ def initialize(interval: nil, interval_count: nil); end
1861
+ end
1862
+ # Time span for the redeemed discount.
1863
+ sig { returns(::Stripe::Quote::UpdateParams::Discount::DiscountEnd::Duration) }
1864
+ attr_accessor :duration
1865
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1866
+ sig { returns(Integer) }
1867
+ attr_accessor :timestamp
1868
+ # The type of calculation made to determine when the discount ends.
1869
+ sig { returns(String) }
1870
+ attr_accessor :type
1871
+ sig {
1872
+ params(duration: ::Stripe::Quote::UpdateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
1873
+ }
1874
+ def initialize(duration: nil, timestamp: nil, type: nil); end
1875
+ end
1876
+ # ID of the coupon to create a new discount for.
1877
+ sig { returns(String) }
1878
+ attr_accessor :coupon
1879
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1880
+ sig { returns(String) }
1881
+ attr_accessor :discount
1882
+ # Details to determine how long the discount should be applied for.
1883
+ sig { returns(::Stripe::Quote::UpdateParams::Discount::DiscountEnd) }
1884
+ attr_accessor :discount_end
1885
+ # ID of the promotion code to create a new discount for.
1886
+ sig { returns(String) }
1887
+ attr_accessor :promotion_code
1888
+ sig {
1889
+ params(coupon: String, discount: String, discount_end: ::Stripe::Quote::UpdateParams::Discount::DiscountEnd, promotion_code: String).void
1890
+ }
1891
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
1892
+ end
1893
+ class InvoiceSettings < Stripe::RequestParams
1894
+ class Issuer < Stripe::RequestParams
1895
+ # The connected account being referenced when `type` is `account`.
1896
+ sig { returns(String) }
1897
+ attr_accessor :account
1898
+ # Type of the account referenced in the request.
1899
+ sig { returns(String) }
1900
+ attr_accessor :type
1901
+ sig { params(account: String, type: String).void }
1902
+ def initialize(account: nil, type: nil); end
1903
+ end
1904
+ # Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
1905
+ sig { returns(Integer) }
1906
+ attr_accessor :days_until_due
1907
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1908
+ sig { returns(::Stripe::Quote::UpdateParams::InvoiceSettings::Issuer) }
1909
+ attr_accessor :issuer
1910
+ sig {
1911
+ params(days_until_due: Integer, issuer: ::Stripe::Quote::UpdateParams::InvoiceSettings::Issuer).void
1912
+ }
1913
+ def initialize(days_until_due: nil, issuer: nil); end
1914
+ end
1915
+ class Line < Stripe::RequestParams
1916
+ class Action < Stripe::RequestParams
1917
+ class AddDiscount < Stripe::RequestParams
1918
+ class DiscountEnd < Stripe::RequestParams
1919
+ # The type of calculation made to determine when the discount ends.
1920
+ sig { returns(String) }
1921
+ attr_accessor :type
1922
+ sig { params(type: String).void }
1923
+ def initialize(type: nil); end
1924
+ end
1925
+ # The coupon code to redeem.
1926
+ sig { returns(String) }
1927
+ attr_accessor :coupon
1928
+ # An ID of an existing discount for a coupon that was already redeemed.
1929
+ sig { returns(String) }
1930
+ attr_accessor :discount
1931
+ # Details to determine how long the discount should be applied for.
1932
+ sig { returns(::Stripe::Quote::UpdateParams::Line::Action::AddDiscount::DiscountEnd) }
1933
+ attr_accessor :discount_end
1934
+ # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array.
1935
+ sig { returns(Integer) }
1936
+ attr_accessor :index
1937
+ # The promotion code to redeem.
1938
+ sig { returns(String) }
1939
+ attr_accessor :promotion_code
1940
+ sig {
1941
+ params(coupon: String, discount: String, discount_end: ::Stripe::Quote::UpdateParams::Line::Action::AddDiscount::DiscountEnd, index: Integer, promotion_code: String).void
1942
+ }
1943
+ def initialize(
1944
+ coupon: nil,
1945
+ discount: nil,
1946
+ discount_end: nil,
1947
+ index: nil,
1948
+ promotion_code: nil
1949
+ ); end
1950
+ end
1951
+ class AddItem < Stripe::RequestParams
1952
+ class Discount < Stripe::RequestParams
1953
+ class DiscountEnd < Stripe::RequestParams
1954
+ class Duration < Stripe::RequestParams
1955
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1956
+ sig { returns(String) }
1957
+ attr_accessor :interval
1958
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1959
+ sig { returns(Integer) }
1960
+ attr_accessor :interval_count
1961
+ sig { params(interval: String, interval_count: Integer).void }
1962
+ def initialize(interval: nil, interval_count: nil); end
1963
+ end
1964
+ # Time span for the redeemed discount.
1965
+ sig {
1966
+ returns(::Stripe::Quote::UpdateParams::Line::Action::AddItem::Discount::DiscountEnd::Duration)
1967
+ }
1968
+ attr_accessor :duration
1969
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1970
+ sig { returns(Integer) }
1971
+ attr_accessor :timestamp
1972
+ # The type of calculation made to determine when the discount ends.
1973
+ sig { returns(String) }
1974
+ attr_accessor :type
1975
+ sig {
1976
+ params(duration: ::Stripe::Quote::UpdateParams::Line::Action::AddItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
1977
+ }
1978
+ def initialize(duration: nil, timestamp: nil, type: nil); end
1979
+ end
1980
+ # ID of the coupon to create a new discount for.
1981
+ sig { returns(String) }
1982
+ attr_accessor :coupon
1983
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1984
+ sig { returns(String) }
1985
+ attr_accessor :discount
1986
+ # Details to determine how long the discount should be applied for.
1987
+ sig {
1988
+ returns(::Stripe::Quote::UpdateParams::Line::Action::AddItem::Discount::DiscountEnd)
1989
+ }
1990
+ attr_accessor :discount_end
1991
+ # ID of the promotion code to create a new discount for.
1992
+ sig { returns(String) }
1993
+ attr_accessor :promotion_code
1994
+ sig {
1995
+ params(coupon: String, discount: String, discount_end: ::Stripe::Quote::UpdateParams::Line::Action::AddItem::Discount::DiscountEnd, promotion_code: String).void
1996
+ }
1997
+ def initialize(
1998
+ coupon: nil,
1999
+ discount: nil,
2000
+ discount_end: nil,
2001
+ promotion_code: nil
2002
+ ); end
2003
+ end
2004
+ class Trial < Stripe::RequestParams
2005
+ # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
2006
+ sig { returns(T::Array[String]) }
2007
+ attr_accessor :converts_to
2008
+ # Determines the type of trial for this item.
2009
+ sig { returns(String) }
2010
+ attr_accessor :type
2011
+ sig { params(converts_to: T::Array[String], type: String).void }
2012
+ def initialize(converts_to: nil, type: nil); end
2013
+ end
2014
+ # The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
2015
+ sig {
2016
+ returns(T::Array[::Stripe::Quote::UpdateParams::Line::Action::AddItem::Discount])
2017
+ }
2018
+ attr_accessor :discounts
2019
+ # 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`.
2020
+ sig { returns(T::Hash[String, String]) }
2021
+ attr_accessor :metadata
2022
+ # The ID of the price object.
2023
+ sig { returns(String) }
2024
+ attr_accessor :price
2025
+ # Quantity for this item.
2026
+ sig { returns(Integer) }
2027
+ attr_accessor :quantity
2028
+ # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.
2029
+ sig { returns(T::Array[String]) }
2030
+ attr_accessor :tax_rates
2031
+ # Options that configure the trial on the subscription item.
2032
+ sig { returns(::Stripe::Quote::UpdateParams::Line::Action::AddItem::Trial) }
2033
+ attr_accessor :trial
2034
+ sig {
2035
+ params(discounts: T::Array[::Stripe::Quote::UpdateParams::Line::Action::AddItem::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::Quote::UpdateParams::Line::Action::AddItem::Trial).void
2036
+ }
2037
+ def initialize(
2038
+ discounts: nil,
2039
+ metadata: nil,
2040
+ price: nil,
2041
+ quantity: nil,
2042
+ tax_rates: nil,
2043
+ trial: nil
2044
+ ); end
2045
+ end
2046
+ class RemoveDiscount < Stripe::RequestParams
2047
+ # The coupon code to remove from the `discounts` array.
2048
+ sig { returns(String) }
2049
+ attr_accessor :coupon
2050
+ # The ID of a discount to remove from the `discounts` array.
2051
+ sig { returns(String) }
2052
+ attr_accessor :discount
2053
+ # The ID of a promotion code to remove from the `discounts` array.
2054
+ sig { returns(String) }
2055
+ attr_accessor :promotion_code
2056
+ sig { params(coupon: String, discount: String, promotion_code: String).void }
2057
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
2058
+ end
2059
+ class RemoveItem < Stripe::RequestParams
2060
+ # ID of a price to remove.
2061
+ sig { returns(String) }
2062
+ attr_accessor :price
2063
+ sig { params(price: String).void }
2064
+ def initialize(price: nil); end
2065
+ end
2066
+ class SetDiscount < Stripe::RequestParams
2067
+ # The coupon code to replace the `discounts` array with.
2068
+ sig { returns(String) }
2069
+ attr_accessor :coupon
2070
+ # An ID of an existing discount to replace the `discounts` array with.
2071
+ sig { returns(String) }
2072
+ attr_accessor :discount
2073
+ # An ID of an existing promotion code to replace the `discounts` array with.
2074
+ sig { returns(String) }
2075
+ attr_accessor :promotion_code
2076
+ sig { params(coupon: String, discount: String, promotion_code: String).void }
2077
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
2078
+ end
2079
+ class SetItem < Stripe::RequestParams
2080
+ class Discount < Stripe::RequestParams
2081
+ class DiscountEnd < Stripe::RequestParams
2082
+ class Duration < Stripe::RequestParams
2083
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2084
+ sig { returns(String) }
2085
+ attr_accessor :interval
2086
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2087
+ sig { returns(Integer) }
2088
+ attr_accessor :interval_count
2089
+ sig { params(interval: String, interval_count: Integer).void }
2090
+ def initialize(interval: nil, interval_count: nil); end
2091
+ end
2092
+ # Time span for the redeemed discount.
2093
+ sig {
2094
+ returns(::Stripe::Quote::UpdateParams::Line::Action::SetItem::Discount::DiscountEnd::Duration)
2095
+ }
2096
+ attr_accessor :duration
2097
+ # A precise Unix timestamp for the discount to end. Must be in the future.
2098
+ sig { returns(Integer) }
2099
+ attr_accessor :timestamp
2100
+ # The type of calculation made to determine when the discount ends.
2101
+ sig { returns(String) }
2102
+ attr_accessor :type
2103
+ sig {
2104
+ params(duration: ::Stripe::Quote::UpdateParams::Line::Action::SetItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
2105
+ }
2106
+ def initialize(duration: nil, timestamp: nil, type: nil); end
2107
+ end
2108
+ # ID of the coupon to create a new discount for.
2109
+ sig { returns(String) }
2110
+ attr_accessor :coupon
2111
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
2112
+ sig { returns(String) }
2113
+ attr_accessor :discount
2114
+ # Details to determine how long the discount should be applied for.
2115
+ sig {
2116
+ returns(::Stripe::Quote::UpdateParams::Line::Action::SetItem::Discount::DiscountEnd)
2117
+ }
2118
+ attr_accessor :discount_end
2119
+ # ID of the promotion code to create a new discount for.
2120
+ sig { returns(String) }
2121
+ attr_accessor :promotion_code
2122
+ sig {
2123
+ params(coupon: String, discount: String, discount_end: ::Stripe::Quote::UpdateParams::Line::Action::SetItem::Discount::DiscountEnd, promotion_code: String).void
2124
+ }
2125
+ def initialize(
2126
+ coupon: nil,
2127
+ discount: nil,
2128
+ discount_end: nil,
2129
+ promotion_code: nil
2130
+ ); end
2131
+ end
2132
+ class Trial < Stripe::RequestParams
2133
+ # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
2134
+ sig { returns(T::Array[String]) }
2135
+ attr_accessor :converts_to
2136
+ # Determines the type of trial for this item.
2137
+ sig { returns(String) }
2138
+ attr_accessor :type
2139
+ sig { params(converts_to: T::Array[String], type: String).void }
2140
+ def initialize(converts_to: nil, type: nil); end
2141
+ end
2142
+ # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`.
2143
+ sig {
2144
+ returns(T::Array[::Stripe::Quote::UpdateParams::Line::Action::SetItem::Discount])
2145
+ }
2146
+ attr_accessor :discounts
2147
+ # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`.
2148
+ sig { returns(T::Hash[String, String]) }
2149
+ attr_accessor :metadata
2150
+ # The ID of the price object.
2151
+ sig { returns(String) }
2152
+ attr_accessor :price
2153
+ # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`.
2154
+ sig { returns(Integer) }
2155
+ attr_accessor :quantity
2156
+ # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`.
2157
+ sig { returns(T::Array[String]) }
2158
+ attr_accessor :tax_rates
2159
+ # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`.
2160
+ sig { returns(::Stripe::Quote::UpdateParams::Line::Action::SetItem::Trial) }
2161
+ attr_accessor :trial
2162
+ sig {
2163
+ params(discounts: T::Array[::Stripe::Quote::UpdateParams::Line::Action::SetItem::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::Quote::UpdateParams::Line::Action::SetItem::Trial).void
2164
+ }
2165
+ def initialize(
2166
+ discounts: nil,
2167
+ metadata: nil,
2168
+ price: nil,
2169
+ quantity: nil,
2170
+ tax_rates: nil,
2171
+ trial: nil
2172
+ ); end
2173
+ end
2174
+ # Details for the `add_discount` type.
2175
+ sig { returns(::Stripe::Quote::UpdateParams::Line::Action::AddDiscount) }
2176
+ attr_accessor :add_discount
2177
+ # Details for the `add_item` type.
2178
+ sig { returns(::Stripe::Quote::UpdateParams::Line::Action::AddItem) }
2179
+ attr_accessor :add_item
2180
+ # Details for the `add_metadata` type: specify a hash of key-value pairs.
2181
+ sig { returns(T::Hash[String, String]) }
2182
+ attr_accessor :add_metadata
2183
+ # Details for the `remove_discount` type.
2184
+ sig { returns(::Stripe::Quote::UpdateParams::Line::Action::RemoveDiscount) }
2185
+ attr_accessor :remove_discount
2186
+ # Details for the `remove_item` type.
2187
+ sig { returns(::Stripe::Quote::UpdateParams::Line::Action::RemoveItem) }
2188
+ attr_accessor :remove_item
2189
+ # Details for the `remove_metadata` type: specify an array of metadata keys.
2190
+ sig { returns(T::Array[String]) }
2191
+ attr_accessor :remove_metadata
2192
+ # Details for the `set_discounts` type.
2193
+ sig { returns(T::Array[::Stripe::Quote::UpdateParams::Line::Action::SetDiscount]) }
2194
+ attr_accessor :set_discounts
2195
+ # Details for the `set_items` type.
2196
+ sig { returns(T::Array[::Stripe::Quote::UpdateParams::Line::Action::SetItem]) }
2197
+ attr_accessor :set_items
2198
+ # Details for the `set_metadata` type: specify an array of key-value pairs.
2199
+ sig { returns(T.nilable(T::Hash[String, String])) }
2200
+ attr_accessor :set_metadata
2201
+ # The type of action the quote line performs.
2202
+ sig { returns(String) }
2203
+ attr_accessor :type
2204
+ sig {
2205
+ params(add_discount: ::Stripe::Quote::UpdateParams::Line::Action::AddDiscount, add_item: ::Stripe::Quote::UpdateParams::Line::Action::AddItem, add_metadata: T::Hash[String, String], remove_discount: ::Stripe::Quote::UpdateParams::Line::Action::RemoveDiscount, remove_item: ::Stripe::Quote::UpdateParams::Line::Action::RemoveItem, remove_metadata: T::Array[String], set_discounts: T::Array[::Stripe::Quote::UpdateParams::Line::Action::SetDiscount], set_items: T::Array[::Stripe::Quote::UpdateParams::Line::Action::SetItem], set_metadata: T.nilable(T::Hash[String, String]), type: String).void
2206
+ }
2207
+ def initialize(
2208
+ add_discount: nil,
2209
+ add_item: nil,
2210
+ add_metadata: nil,
2211
+ remove_discount: nil,
2212
+ remove_item: nil,
2213
+ remove_metadata: nil,
2214
+ set_discounts: nil,
2215
+ set_items: nil,
2216
+ set_metadata: nil,
2217
+ type: nil
2218
+ ); end
2219
+ end
2220
+ class AppliesTo < Stripe::RequestParams
2221
+ # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
2222
+ sig { returns(String) }
2223
+ attr_accessor :new_reference
2224
+ # The ID of the schedule the line applies to.
2225
+ sig { returns(String) }
2226
+ attr_accessor :subscription_schedule
2227
+ # Describes whether the quote line is affecting a new schedule or an existing schedule.
2228
+ sig { returns(String) }
2229
+ attr_accessor :type
2230
+ sig { params(new_reference: String, subscription_schedule: String, type: String).void }
2231
+ def initialize(new_reference: nil, subscription_schedule: nil, type: nil); end
2232
+ end
2233
+ class CancelSubscriptionSchedule < Stripe::RequestParams
2234
+ # Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
2235
+ sig { returns(String) }
2236
+ attr_accessor :cancel_at
2237
+ # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`.
2238
+ sig { returns(T::Boolean) }
2239
+ attr_accessor :invoice_now
2240
+ # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
2241
+ sig { returns(T::Boolean) }
2242
+ attr_accessor :prorate
2243
+ sig { params(cancel_at: String, invoice_now: T::Boolean, prorate: T::Boolean).void }
2244
+ def initialize(cancel_at: nil, invoice_now: nil, prorate: nil); end
2245
+ end
2246
+ class EndsAt < Stripe::RequestParams
2247
+ class DiscountEnd < Stripe::RequestParams
2248
+ # The ID of a specific discount.
2249
+ sig { returns(String) }
2250
+ attr_accessor :discount
2251
+ sig { params(discount: String).void }
2252
+ def initialize(discount: nil); end
2253
+ end
2254
+ class Duration < Stripe::RequestParams
2255
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2256
+ sig { returns(String) }
2257
+ attr_accessor :interval
2258
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2259
+ sig { returns(Integer) }
2260
+ attr_accessor :interval_count
2261
+ sig { params(interval: String, interval_count: Integer).void }
2262
+ def initialize(interval: nil, interval_count: nil); end
2263
+ end
2264
+ # Use the `end` time of a given discount.
2265
+ sig { returns(::Stripe::Quote::UpdateParams::Line::EndsAt::DiscountEnd) }
2266
+ attr_accessor :discount_end
2267
+ # Time span for the quote line starting from the `starts_at` date.
2268
+ sig { returns(::Stripe::Quote::UpdateParams::Line::EndsAt::Duration) }
2269
+ attr_accessor :duration
2270
+ # A precise Unix timestamp.
2271
+ sig { returns(Integer) }
2272
+ attr_accessor :timestamp
2273
+ # Select a way to pass in `ends_at`.
2274
+ sig { returns(String) }
2275
+ attr_accessor :type
2276
+ sig {
2277
+ params(discount_end: ::Stripe::Quote::UpdateParams::Line::EndsAt::DiscountEnd, duration: ::Stripe::Quote::UpdateParams::Line::EndsAt::Duration, timestamp: Integer, type: String).void
2278
+ }
2279
+ def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil); end
2280
+ end
2281
+ class SetPauseCollection < Stripe::RequestParams
2282
+ class Set < Stripe::RequestParams
2283
+ # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
2284
+ sig { returns(String) }
2285
+ attr_accessor :behavior
2286
+ sig { params(behavior: String).void }
2287
+ def initialize(behavior: nil); end
2288
+ end
2289
+ # Details of the pause_collection behavior to apply to the amendment.
2290
+ sig { returns(::Stripe::Quote::UpdateParams::Line::SetPauseCollection::Set) }
2291
+ attr_accessor :set
2292
+ # Determines the type of the pause_collection amendment.
2293
+ sig { returns(String) }
2294
+ attr_accessor :type
2295
+ sig {
2296
+ params(set: ::Stripe::Quote::UpdateParams::Line::SetPauseCollection::Set, type: String).void
2297
+ }
2298
+ def initialize(set: nil, type: nil); end
2299
+ end
2300
+ class StartsAt < Stripe::RequestParams
2301
+ class DiscountEnd < Stripe::RequestParams
2302
+ # The ID of a specific discount.
2303
+ sig { returns(String) }
2304
+ attr_accessor :discount
2305
+ sig { params(discount: String).void }
2306
+ def initialize(discount: nil); end
2307
+ end
2308
+ class LineEndsAt < Stripe::RequestParams
2309
+ # The ID of a quote line.
2310
+ sig { returns(String) }
2311
+ attr_accessor :id
2312
+ # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
2313
+ sig { returns(Integer) }
2314
+ attr_accessor :index
2315
+ sig { params(id: String, index: Integer).void }
2316
+ def initialize(id: nil, index: nil); end
2317
+ end
2318
+ # Use the `end` time of a given discount.
2319
+ sig { returns(::Stripe::Quote::UpdateParams::Line::StartsAt::DiscountEnd) }
2320
+ attr_accessor :discount_end
2321
+ # The timestamp the given line ends at.
2322
+ sig { returns(::Stripe::Quote::UpdateParams::Line::StartsAt::LineEndsAt) }
2323
+ attr_accessor :line_ends_at
2324
+ # A precise Unix timestamp.
2325
+ sig { returns(Integer) }
2326
+ attr_accessor :timestamp
2327
+ # Select a way to pass in `starts_at`.
2328
+ sig { returns(String) }
2329
+ attr_accessor :type
2330
+ sig {
2331
+ params(discount_end: ::Stripe::Quote::UpdateParams::Line::StartsAt::DiscountEnd, line_ends_at: ::Stripe::Quote::UpdateParams::Line::StartsAt::LineEndsAt, timestamp: Integer, type: String).void
2332
+ }
2333
+ def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil); end
2334
+ end
2335
+ class TrialSettings < Stripe::RequestParams
2336
+ class EndBehavior < Stripe::RequestParams
2337
+ # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
2338
+ sig { returns(String) }
2339
+ attr_accessor :prorate_up_front
2340
+ sig { params(prorate_up_front: String).void }
2341
+ def initialize(prorate_up_front: nil); end
2342
+ end
2343
+ # Defines how the subscription should behave when a trial ends.
2344
+ sig { returns(::Stripe::Quote::UpdateParams::Line::TrialSettings::EndBehavior) }
2345
+ attr_accessor :end_behavior
2346
+ sig {
2347
+ params(end_behavior: ::Stripe::Quote::UpdateParams::Line::TrialSettings::EndBehavior).void
2348
+ }
2349
+ def initialize(end_behavior: nil); end
2350
+ end
2351
+ # An array of operations the quote line performs.
2352
+ sig { returns(T::Array[::Stripe::Quote::UpdateParams::Line::Action]) }
2353
+ attr_accessor :actions
2354
+ # Details to identify the subscription schedule the quote line applies to.
2355
+ sig { returns(::Stripe::Quote::UpdateParams::Line::AppliesTo) }
2356
+ attr_accessor :applies_to
2357
+ # For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line.
2358
+ sig { returns(String) }
2359
+ attr_accessor :billing_cycle_anchor
2360
+ # A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings.
2361
+ sig { returns(::Stripe::Quote::UpdateParams::Line::CancelSubscriptionSchedule) }
2362
+ attr_accessor :cancel_subscription_schedule
2363
+ # Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line.
2364
+ sig { returns(::Stripe::Quote::UpdateParams::Line::EndsAt) }
2365
+ attr_accessor :ends_at
2366
+ # The ID of an existing line on the quote.
2367
+ sig { returns(String) }
2368
+ attr_accessor :id
2369
+ # Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts.
2370
+ sig { returns(String) }
2371
+ attr_accessor :proration_behavior
2372
+ # Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
2373
+ sig { returns(::Stripe::Quote::UpdateParams::Line::SetPauseCollection) }
2374
+ attr_accessor :set_pause_collection
2375
+ # Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
2376
+ sig { returns(String) }
2377
+ attr_accessor :set_schedule_end
2378
+ # Details to identify the earliest timestamp where the proposed change should take effect.
2379
+ sig { returns(::Stripe::Quote::UpdateParams::Line::StartsAt) }
2380
+ attr_accessor :starts_at
2381
+ # Settings related to subscription trials.
2382
+ sig { returns(::Stripe::Quote::UpdateParams::Line::TrialSettings) }
2383
+ attr_accessor :trial_settings
2384
+ sig {
2385
+ params(actions: T::Array[::Stripe::Quote::UpdateParams::Line::Action], applies_to: ::Stripe::Quote::UpdateParams::Line::AppliesTo, billing_cycle_anchor: String, cancel_subscription_schedule: ::Stripe::Quote::UpdateParams::Line::CancelSubscriptionSchedule, ends_at: ::Stripe::Quote::UpdateParams::Line::EndsAt, id: String, proration_behavior: String, set_pause_collection: ::Stripe::Quote::UpdateParams::Line::SetPauseCollection, set_schedule_end: String, starts_at: ::Stripe::Quote::UpdateParams::Line::StartsAt, trial_settings: ::Stripe::Quote::UpdateParams::Line::TrialSettings).void
2386
+ }
2387
+ def initialize(
2388
+ actions: nil,
2389
+ applies_to: nil,
2390
+ billing_cycle_anchor: nil,
2391
+ cancel_subscription_schedule: nil,
2392
+ ends_at: nil,
2393
+ id: nil,
2394
+ proration_behavior: nil,
2395
+ set_pause_collection: nil,
2396
+ set_schedule_end: nil,
2397
+ starts_at: nil,
2398
+ trial_settings: nil
2399
+ ); end
2400
+ end
2401
+ class LineItem < Stripe::RequestParams
2402
+ class Discount < Stripe::RequestParams
2403
+ class DiscountEnd < Stripe::RequestParams
2404
+ class Duration < Stripe::RequestParams
2405
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2406
+ sig { returns(String) }
2407
+ attr_accessor :interval
2408
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2409
+ sig { returns(Integer) }
2410
+ attr_accessor :interval_count
2411
+ sig { params(interval: String, interval_count: Integer).void }
2412
+ def initialize(interval: nil, interval_count: nil); end
2413
+ end
2414
+ # Time span for the redeemed discount.
2415
+ sig {
2416
+ returns(::Stripe::Quote::UpdateParams::LineItem::Discount::DiscountEnd::Duration)
2417
+ }
2418
+ attr_accessor :duration
2419
+ # A precise Unix timestamp for the discount to end. Must be in the future.
2420
+ sig { returns(Integer) }
2421
+ attr_accessor :timestamp
2422
+ # The type of calculation made to determine when the discount ends.
2423
+ sig { returns(String) }
2424
+ attr_accessor :type
2425
+ sig {
2426
+ params(duration: ::Stripe::Quote::UpdateParams::LineItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
2427
+ }
2428
+ def initialize(duration: nil, timestamp: nil, type: nil); end
2429
+ end
2430
+ # ID of the coupon to create a new discount for.
2431
+ sig { returns(String) }
2432
+ attr_accessor :coupon
2433
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
2434
+ sig { returns(String) }
2435
+ attr_accessor :discount
2436
+ # Details to determine how long the discount should be applied for.
2437
+ sig { returns(::Stripe::Quote::UpdateParams::LineItem::Discount::DiscountEnd) }
2438
+ attr_accessor :discount_end
2439
+ # ID of the promotion code to create a new discount for.
2440
+ sig { returns(String) }
2441
+ attr_accessor :promotion_code
2442
+ sig {
2443
+ params(coupon: String, discount: String, discount_end: ::Stripe::Quote::UpdateParams::LineItem::Discount::DiscountEnd, promotion_code: String).void
2444
+ }
2445
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
2446
+ end
2447
+ class PriceData < Stripe::RequestParams
2448
+ class Recurring < Stripe::RequestParams
2449
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
2450
+ sig { returns(String) }
2451
+ attr_accessor :interval
2452
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
2453
+ sig { returns(Integer) }
2454
+ attr_accessor :interval_count
2455
+ sig { params(interval: String, interval_count: Integer).void }
2456
+ def initialize(interval: nil, interval_count: nil); end
2457
+ end
2458
+ # 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).
2459
+ sig { returns(String) }
2460
+ attr_accessor :currency
2461
+ # The ID of the product that this price will belong to.
2462
+ sig { returns(String) }
2463
+ attr_accessor :product
2464
+ # The recurring components of a price such as `interval` and `interval_count`.
2465
+ sig { returns(::Stripe::Quote::UpdateParams::LineItem::PriceData::Recurring) }
2466
+ attr_accessor :recurring
2467
+ # 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.
2468
+ sig { returns(String) }
2469
+ attr_accessor :tax_behavior
2470
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
2471
+ sig { returns(Integer) }
2472
+ attr_accessor :unit_amount
2473
+ # 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.
2474
+ sig { returns(String) }
2475
+ attr_accessor :unit_amount_decimal
2476
+ sig {
2477
+ params(currency: String, product: String, recurring: ::Stripe::Quote::UpdateParams::LineItem::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
2478
+ }
2479
+ def initialize(
2480
+ currency: nil,
2481
+ product: nil,
2482
+ recurring: nil,
2483
+ tax_behavior: nil,
2484
+ unit_amount: nil,
2485
+ unit_amount_decimal: nil
2486
+ ); end
2487
+ end
2488
+ # The discounts applied to this line item.
2489
+ sig { returns(T.nilable(T::Array[::Stripe::Quote::UpdateParams::LineItem::Discount])) }
2490
+ attr_accessor :discounts
2491
+ # The ID of an existing line item on the quote.
2492
+ sig { returns(String) }
2493
+ attr_accessor :id
2494
+ # The ID of the price object. One of `price` or `price_data` is required.
2495
+ sig { returns(String) }
2496
+ attr_accessor :price
2497
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
2498
+ sig { returns(::Stripe::Quote::UpdateParams::LineItem::PriceData) }
2499
+ attr_accessor :price_data
2500
+ # The quantity of the line item.
2501
+ sig { returns(Integer) }
2502
+ attr_accessor :quantity
2503
+ # The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
2504
+ sig { returns(T.nilable(T::Array[String])) }
2505
+ attr_accessor :tax_rates
2506
+ sig {
2507
+ params(discounts: T.nilable(T::Array[::Stripe::Quote::UpdateParams::LineItem::Discount]), id: String, price: String, price_data: ::Stripe::Quote::UpdateParams::LineItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void
2508
+ }
2509
+ def initialize(
2510
+ discounts: nil,
2511
+ id: nil,
2512
+ price: nil,
2513
+ price_data: nil,
2514
+ quantity: nil,
2515
+ tax_rates: nil
2516
+ ); end
2517
+ end
2518
+ class SubscriptionData < Stripe::RequestParams
2519
+ class BillOnAcceptance < Stripe::RequestParams
2520
+ class BillFrom < Stripe::RequestParams
2521
+ class LineStartsAt < Stripe::RequestParams
2522
+ # The ID of a quote line.
2523
+ sig { returns(String) }
2524
+ attr_accessor :id
2525
+ # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
2526
+ sig { returns(Integer) }
2527
+ attr_accessor :index
2528
+ sig { params(id: String, index: Integer).void }
2529
+ def initialize(id: nil, index: nil); end
2530
+ end
2531
+ # Details of a Quote line to start the bill period from.
2532
+ sig {
2533
+ returns(::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillFrom::LineStartsAt)
2534
+ }
2535
+ attr_accessor :line_starts_at
2536
+ # A precise Unix timestamp.
2537
+ sig { returns(Integer) }
2538
+ attr_accessor :timestamp
2539
+ # The type of method to specify the `bill_from` time.
2540
+ sig { returns(String) }
2541
+ attr_accessor :type
2542
+ sig {
2543
+ params(line_starts_at: ::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillFrom::LineStartsAt, timestamp: Integer, type: String).void
2544
+ }
2545
+ def initialize(line_starts_at: nil, timestamp: nil, type: nil); end
2546
+ end
2547
+ class BillUntil < Stripe::RequestParams
2548
+ class Duration < Stripe::RequestParams
2549
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2550
+ sig { returns(String) }
2551
+ attr_accessor :interval
2552
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2553
+ sig { returns(Integer) }
2554
+ attr_accessor :interval_count
2555
+ sig { params(interval: String, interval_count: Integer).void }
2556
+ def initialize(interval: nil, interval_count: nil); end
2557
+ end
2558
+ class LineEndsAt < Stripe::RequestParams
2559
+ # The ID of a quote line.
2560
+ sig { returns(String) }
2561
+ attr_accessor :id
2562
+ # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
2563
+ sig { returns(Integer) }
2564
+ attr_accessor :index
2565
+ sig { params(id: String, index: Integer).void }
2566
+ def initialize(id: nil, index: nil); end
2567
+ end
2568
+ # Details of the duration over which to bill.
2569
+ sig {
2570
+ returns(::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil::Duration)
2571
+ }
2572
+ attr_accessor :duration
2573
+ # Details of a Quote line item from which to bill until.
2574
+ sig {
2575
+ returns(::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil::LineEndsAt)
2576
+ }
2577
+ attr_accessor :line_ends_at
2578
+ # A precise Unix timestamp.
2579
+ sig { returns(Integer) }
2580
+ attr_accessor :timestamp
2581
+ # The type of method to specify the `bill_until` time.
2582
+ sig { returns(String) }
2583
+ attr_accessor :type
2584
+ sig {
2585
+ params(duration: ::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil::Duration, line_ends_at: ::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil::LineEndsAt, timestamp: Integer, type: String).void
2586
+ }
2587
+ def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil); end
2588
+ end
2589
+ # The start of the period to bill from when the Quote is accepted.
2590
+ sig {
2591
+ returns(::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillFrom)
2592
+ }
2593
+ attr_accessor :bill_from
2594
+ # The end of the period to bill until when the Quote is accepted.
2595
+ sig {
2596
+ returns(::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil)
2597
+ }
2598
+ attr_accessor :bill_until
2599
+ sig {
2600
+ params(bill_from: ::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillFrom, bill_until: ::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil).void
2601
+ }
2602
+ def initialize(bill_from: nil, bill_until: nil); end
2603
+ end
2604
+ class Prebilling < Stripe::RequestParams
2605
+ # This is used to determine the number of billing cycles to prebill.
2606
+ sig { returns(Integer) }
2607
+ attr_accessor :iterations
2608
+ sig { params(iterations: Integer).void }
2609
+ def initialize(iterations: nil); end
2610
+ end
2611
+ # Describes the period to bill for upon accepting the quote.
2612
+ sig {
2613
+ returns(T.nilable(::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance))
2614
+ }
2615
+ attr_accessor :bill_on_acceptance
2616
+ # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
2617
+ sig { returns(String) }
2618
+ attr_accessor :billing_behavior
2619
+ # When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
2620
+ sig { returns(T.nilable(String)) }
2621
+ attr_accessor :billing_cycle_anchor
2622
+ # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
2623
+ sig { returns(T.nilable(String)) }
2624
+ attr_accessor :description
2625
+ # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
2626
+ sig { returns(T.nilable(T.any(String, Integer))) }
2627
+ attr_accessor :effective_date
2628
+ # Behavior of the subscription schedule and underlying subscription when it ends.
2629
+ sig { returns(String) }
2630
+ attr_accessor :end_behavior
2631
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
2632
+ sig { returns(T::Hash[String, String]) }
2633
+ attr_accessor :metadata
2634
+ # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
2635
+ sig { returns(T.nilable(::Stripe::Quote::UpdateParams::SubscriptionData::Prebilling)) }
2636
+ attr_accessor :prebilling
2637
+ # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
2638
+ #
2639
+ # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
2640
+ #
2641
+ # Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
2642
+ #
2643
+ # Prorations can be disabled by passing `none`.
2644
+ sig { returns(String) }
2645
+ attr_accessor :proration_behavior
2646
+ # Integer representing the number of trial period days before the customer is charged for the first time.
2647
+ sig { returns(T.nilable(Integer)) }
2648
+ attr_accessor :trial_period_days
2649
+ sig {
2650
+ params(bill_on_acceptance: T.nilable(::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance), billing_behavior: String, billing_cycle_anchor: T.nilable(String), description: T.nilable(String), effective_date: T.nilable(T.any(String, Integer)), end_behavior: String, metadata: T::Hash[String, String], prebilling: T.nilable(::Stripe::Quote::UpdateParams::SubscriptionData::Prebilling), proration_behavior: String, trial_period_days: T.nilable(Integer)).void
2651
+ }
2652
+ def initialize(
2653
+ bill_on_acceptance: nil,
2654
+ billing_behavior: nil,
2655
+ billing_cycle_anchor: nil,
2656
+ description: nil,
2657
+ effective_date: nil,
2658
+ end_behavior: nil,
2659
+ metadata: nil,
2660
+ prebilling: nil,
2661
+ proration_behavior: nil,
2662
+ trial_period_days: nil
2663
+ ); end
2664
+ end
2665
+ class SubscriptionDataOverride < Stripe::RequestParams
2666
+ class AppliesTo < Stripe::RequestParams
2667
+ # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
2668
+ sig { returns(String) }
2669
+ attr_accessor :new_reference
2670
+ # The ID of the schedule the line applies to.
2671
+ sig { returns(String) }
2672
+ attr_accessor :subscription_schedule
2673
+ # Describes whether the quote line is affecting a new schedule or an existing schedule.
2674
+ sig { returns(String) }
2675
+ attr_accessor :type
2676
+ sig { params(new_reference: String, subscription_schedule: String, type: String).void }
2677
+ def initialize(new_reference: nil, subscription_schedule: nil, type: nil); end
2678
+ end
2679
+ class BillOnAcceptance < Stripe::RequestParams
2680
+ class BillFrom < Stripe::RequestParams
2681
+ class LineStartsAt < Stripe::RequestParams
2682
+ # The ID of a quote line.
2683
+ sig { returns(String) }
2684
+ attr_accessor :id
2685
+ # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
2686
+ sig { returns(Integer) }
2687
+ attr_accessor :index
2688
+ sig { params(id: String, index: Integer).void }
2689
+ def initialize(id: nil, index: nil); end
2690
+ end
2691
+ # Details of a Quote line to start the bill period from.
2692
+ sig {
2693
+ returns(::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom::LineStartsAt)
2694
+ }
2695
+ attr_accessor :line_starts_at
2696
+ # A precise Unix timestamp.
2697
+ sig { returns(Integer) }
2698
+ attr_accessor :timestamp
2699
+ # The type of method to specify the `bill_from` time.
2700
+ sig { returns(String) }
2701
+ attr_accessor :type
2702
+ sig {
2703
+ params(line_starts_at: ::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom::LineStartsAt, timestamp: Integer, type: String).void
2704
+ }
2705
+ def initialize(line_starts_at: nil, timestamp: nil, type: nil); end
2706
+ end
2707
+ class BillUntil < Stripe::RequestParams
2708
+ class Duration < Stripe::RequestParams
2709
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2710
+ sig { returns(String) }
2711
+ attr_accessor :interval
2712
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2713
+ sig { returns(Integer) }
2714
+ attr_accessor :interval_count
2715
+ sig { params(interval: String, interval_count: Integer).void }
2716
+ def initialize(interval: nil, interval_count: nil); end
2717
+ end
2718
+ class LineEndsAt < Stripe::RequestParams
2719
+ # The ID of a quote line.
2720
+ sig { returns(String) }
2721
+ attr_accessor :id
2722
+ # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
2723
+ sig { returns(Integer) }
2724
+ attr_accessor :index
2725
+ sig { params(id: String, index: Integer).void }
2726
+ def initialize(id: nil, index: nil); end
2727
+ end
2728
+ # Details of the duration over which to bill.
2729
+ sig {
2730
+ returns(::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::Duration)
2731
+ }
2732
+ attr_accessor :duration
2733
+ # Details of a Quote line item from which to bill until.
2734
+ sig {
2735
+ returns(::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::LineEndsAt)
2736
+ }
2737
+ attr_accessor :line_ends_at
2738
+ # A precise Unix timestamp.
2739
+ sig { returns(Integer) }
2740
+ attr_accessor :timestamp
2741
+ # The type of method to specify the `bill_until` time.
2742
+ sig { returns(String) }
2743
+ attr_accessor :type
2744
+ sig {
2745
+ params(duration: ::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::Duration, line_ends_at: ::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::LineEndsAt, timestamp: Integer, type: String).void
2746
+ }
2747
+ def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil); end
2748
+ end
2749
+ # The start of the period to bill from when the Quote is accepted.
2750
+ sig {
2751
+ returns(::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom)
2752
+ }
2753
+ attr_accessor :bill_from
2754
+ # The end of the period to bill until when the Quote is accepted.
2755
+ sig {
2756
+ returns(::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil)
2757
+ }
2758
+ attr_accessor :bill_until
2759
+ sig {
2760
+ params(bill_from: ::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom, bill_until: ::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil).void
2761
+ }
2762
+ def initialize(bill_from: nil, bill_until: nil); end
2763
+ end
2764
+ # Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
2765
+ sig { returns(::Stripe::Quote::UpdateParams::SubscriptionDataOverride::AppliesTo) }
2766
+ attr_accessor :applies_to
2767
+ # Describes the period to bill for upon accepting the quote.
2768
+ sig {
2769
+ returns(T.nilable(::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance))
2770
+ }
2771
+ attr_accessor :bill_on_acceptance
2772
+ # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
2773
+ sig { returns(String) }
2774
+ attr_accessor :billing_behavior
2775
+ # The customer the Subscription Data override applies to.
2776
+ sig { returns(String) }
2777
+ attr_accessor :customer
2778
+ # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
2779
+ sig { returns(T.nilable(String)) }
2780
+ attr_accessor :description
2781
+ # Behavior of the subscription schedule and underlying subscription when it ends.
2782
+ sig { returns(String) }
2783
+ attr_accessor :end_behavior
2784
+ # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
2785
+ #
2786
+ # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
2787
+ #
2788
+ # Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
2789
+ #
2790
+ # Prorations can be disabled by passing `none`.
2791
+ sig { returns(String) }
2792
+ attr_accessor :proration_behavior
2793
+ sig {
2794
+ params(applies_to: ::Stripe::Quote::UpdateParams::SubscriptionDataOverride::AppliesTo, bill_on_acceptance: T.nilable(::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance), billing_behavior: String, customer: String, description: T.nilable(String), end_behavior: String, proration_behavior: String).void
2795
+ }
2796
+ def initialize(
2797
+ applies_to: nil,
2798
+ bill_on_acceptance: nil,
2799
+ billing_behavior: nil,
2800
+ customer: nil,
2801
+ description: nil,
2802
+ end_behavior: nil,
2803
+ proration_behavior: nil
2804
+ ); end
2805
+ end
2806
+ class TransferData < Stripe::RequestParams
2807
+ # The amount that will be transferred automatically when the invoice 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.
2808
+ sig { returns(Integer) }
2809
+ attr_accessor :amount
2810
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field.
2811
+ sig { returns(Float) }
2812
+ attr_accessor :amount_percent
2813
+ # ID of an existing, connected Stripe account.
2814
+ sig { returns(String) }
2815
+ attr_accessor :destination
2816
+ sig { params(amount: Integer, amount_percent: Float, destination: String).void }
2817
+ def initialize(amount: nil, amount_percent: nil, destination: nil); end
2818
+ end
2819
+ # Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
2820
+ sig { returns(T::Boolean) }
2821
+ attr_accessor :allow_backdated_lines
2822
+ # 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. There cannot be any line items with recurring prices when using this field.
2823
+ sig { returns(T.nilable(Integer)) }
2824
+ attr_accessor :application_fee_amount
2825
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field.
2826
+ sig { returns(T.nilable(Float)) }
2827
+ attr_accessor :application_fee_percent
2828
+ # Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
2829
+ sig { returns(::Stripe::Quote::UpdateParams::AutomaticTax) }
2830
+ attr_accessor :automatic_tax
2831
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
2832
+ sig { returns(String) }
2833
+ attr_accessor :collection_method
2834
+ # The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
2835
+ sig { returns(String) }
2836
+ attr_accessor :customer
2837
+ # The tax rates that will apply to any line item that does not have `tax_rates` set.
2838
+ sig { returns(T.nilable(T::Array[String])) }
2839
+ attr_accessor :default_tax_rates
2840
+ # A description that will be displayed on the quote PDF.
2841
+ sig { returns(T.nilable(String)) }
2842
+ attr_accessor :description
2843
+ # The discounts applied to the quote.
2844
+ sig { returns(T.nilable(T::Array[::Stripe::Quote::UpdateParams::Discount])) }
2845
+ attr_accessor :discounts
2846
+ # Specifies which fields in the response should be expanded.
2847
+ sig { returns(T::Array[String]) }
2848
+ attr_accessor :expand
2849
+ # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
2850
+ sig { returns(Integer) }
2851
+ attr_accessor :expires_at
2852
+ # A footer that will be displayed on the quote PDF.
2853
+ sig { returns(T.nilable(String)) }
2854
+ attr_accessor :footer
2855
+ # A header that will be displayed on the quote PDF.
2856
+ sig { returns(T.nilable(String)) }
2857
+ attr_accessor :header
2858
+ # All invoices will be billed using the specified settings.
2859
+ sig { returns(::Stripe::Quote::UpdateParams::InvoiceSettings) }
2860
+ attr_accessor :invoice_settings
2861
+ # A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
2862
+ sig { returns(T::Array[::Stripe::Quote::UpdateParams::LineItem]) }
2863
+ attr_accessor :line_items
2864
+ # A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
2865
+ sig { returns(T::Array[::Stripe::Quote::UpdateParams::Line]) }
2866
+ attr_accessor :lines
2867
+ # 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`.
2868
+ sig { returns(T::Hash[String, String]) }
2869
+ attr_accessor :metadata
2870
+ # The account on behalf of which to charge.
2871
+ sig { returns(T.nilable(String)) }
2872
+ attr_accessor :on_behalf_of
2873
+ # When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
2874
+ sig { returns(::Stripe::Quote::UpdateParams::SubscriptionData) }
2875
+ attr_accessor :subscription_data
2876
+ # List representing overrides for `subscription_data` configurations for specific subscription schedules.
2877
+ sig { returns(T.nilable(T::Array[::Stripe::Quote::UpdateParams::SubscriptionDataOverride])) }
2878
+ attr_accessor :subscription_data_overrides
2879
+ # The data with which to automatically create a Transfer for each of the invoices.
2880
+ sig { returns(T.nilable(::Stripe::Quote::UpdateParams::TransferData)) }
2881
+ attr_accessor :transfer_data
2882
+ sig {
2883
+ params(allow_backdated_lines: T::Boolean, application_fee_amount: T.nilable(Integer), application_fee_percent: T.nilable(Float), automatic_tax: ::Stripe::Quote::UpdateParams::AutomaticTax, collection_method: String, customer: String, default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), discounts: T.nilable(T::Array[::Stripe::Quote::UpdateParams::Discount]), expand: T::Array[String], expires_at: Integer, footer: T.nilable(String), header: T.nilable(String), invoice_settings: ::Stripe::Quote::UpdateParams::InvoiceSettings, line_items: T::Array[::Stripe::Quote::UpdateParams::LineItem], lines: T::Array[::Stripe::Quote::UpdateParams::Line], metadata: T::Hash[String, String], on_behalf_of: T.nilable(String), subscription_data: ::Stripe::Quote::UpdateParams::SubscriptionData, subscription_data_overrides: T.nilable(T::Array[::Stripe::Quote::UpdateParams::SubscriptionDataOverride]), transfer_data: T.nilable(::Stripe::Quote::UpdateParams::TransferData)).void
2884
+ }
2885
+ def initialize(
2886
+ allow_backdated_lines: nil,
2887
+ application_fee_amount: nil,
2888
+ application_fee_percent: nil,
2889
+ automatic_tax: nil,
2890
+ collection_method: nil,
2891
+ customer: nil,
2892
+ default_tax_rates: nil,
2893
+ description: nil,
2894
+ discounts: nil,
2895
+ expand: nil,
2896
+ expires_at: nil,
2897
+ footer: nil,
2898
+ header: nil,
2899
+ invoice_settings: nil,
2900
+ line_items: nil,
2901
+ lines: nil,
2902
+ metadata: nil,
2903
+ on_behalf_of: nil,
2904
+ subscription_data: nil,
2905
+ subscription_data_overrides: nil,
2906
+ transfer_data: nil
2907
+ ); end
2908
+ end
2909
+ class ListComputedUpfrontLineItemsParams < Stripe::RequestParams
2910
+ # 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.
2911
+ sig { returns(String) }
2912
+ attr_accessor :ending_before
2913
+ # Specifies which fields in the response should be expanded.
2914
+ sig { returns(T::Array[String]) }
2915
+ attr_accessor :expand
2916
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
2917
+ sig { returns(Integer) }
2918
+ attr_accessor :limit
2919
+ # 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.
2920
+ sig { returns(String) }
2921
+ attr_accessor :starting_after
2922
+ sig {
2923
+ params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void
2924
+ }
2925
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
2926
+ end
2927
+ class ListLineItemsParams < Stripe::RequestParams
2928
+ # 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.
2929
+ sig { returns(String) }
2930
+ attr_accessor :ending_before
2931
+ # Specifies which fields in the response should be expanded.
2932
+ sig { returns(T::Array[String]) }
2933
+ attr_accessor :expand
2934
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
2935
+ sig { returns(Integer) }
2936
+ attr_accessor :limit
2937
+ # 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.
2938
+ sig { returns(String) }
2939
+ attr_accessor :starting_after
2940
+ sig {
2941
+ params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void
2942
+ }
2943
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
2944
+ end
2945
+ class ListLinesParams < Stripe::RequestParams
2946
+ # 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.
2947
+ sig { returns(String) }
2948
+ attr_accessor :ending_before
2949
+ # Specifies which fields in the response should be expanded.
2950
+ sig { returns(T::Array[String]) }
2951
+ attr_accessor :expand
2952
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
2953
+ sig { returns(Integer) }
2954
+ attr_accessor :limit
2955
+ # 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.
2956
+ sig { returns(String) }
2957
+ attr_accessor :starting_after
2958
+ sig {
2959
+ params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void
2960
+ }
2961
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
2962
+ end
2963
+ class AcceptParams < Stripe::RequestParams
2964
+ # Specifies which fields in the response should be expanded.
2965
+ sig { returns(T::Array[String]) }
2966
+ attr_accessor :expand
2967
+ sig { params(expand: T::Array[String]).void }
2968
+ def initialize(expand: nil); end
2969
+ end
2970
+ class CancelParams < Stripe::RequestParams
2971
+ # Specifies which fields in the response should be expanded.
2972
+ sig { returns(T::Array[String]) }
2973
+ attr_accessor :expand
2974
+ sig { params(expand: T::Array[String]).void }
2975
+ def initialize(expand: nil); end
2976
+ end
2977
+ class FinalizeQuoteParams < Stripe::RequestParams
2978
+ # Specifies which fields in the response should be expanded.
2979
+ sig { returns(T::Array[String]) }
2980
+ attr_accessor :expand
2981
+ # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
2982
+ sig { returns(Integer) }
2983
+ attr_accessor :expires_at
2984
+ sig { params(expand: T::Array[String], expires_at: Integer).void }
2985
+ def initialize(expand: nil, expires_at: nil); end
2986
+ end
2987
+ class MarkDraftParams < Stripe::RequestParams
2988
+ # Specifies which fields in the response should be expanded.
2989
+ sig { returns(T::Array[String]) }
2990
+ attr_accessor :expand
2991
+ sig { params(expand: T::Array[String]).void }
2992
+ def initialize(expand: nil); end
2993
+ end
2994
+ class MarkStaleParams < Stripe::RequestParams
2995
+ # Specifies which fields in the response should be expanded.
2996
+ sig { returns(T::Array[String]) }
2997
+ attr_accessor :expand
2998
+ # Reason the Quote is being marked stale.
2999
+ sig { returns(String) }
3000
+ attr_accessor :reason
3001
+ sig { params(expand: T::Array[String], reason: String).void }
3002
+ def initialize(expand: nil, reason: nil); end
3003
+ end
3004
+ class ReestimateParams < Stripe::RequestParams
3005
+ # Specifies which fields in the response should be expanded.
3006
+ sig { returns(T::Array[String]) }
3007
+ attr_accessor :expand
3008
+ sig { params(expand: T::Array[String]).void }
3009
+ def initialize(expand: nil); end
3010
+ end
3011
+ class PdfParams < Stripe::RequestParams
3012
+ # Specifies which fields in the response should be expanded.
3013
+ sig { returns(T::Array[String]) }
3014
+ attr_accessor :expand
3015
+ sig { params(expand: T::Array[String]).void }
3016
+ def initialize(expand: nil); end
3017
+ end
3018
+ class ListPreviewInvoiceLinesParams < Stripe::RequestParams
3019
+ # 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.
3020
+ sig { returns(String) }
3021
+ attr_accessor :ending_before
3022
+ # Specifies which fields in the response should be expanded.
3023
+ sig { returns(T::Array[String]) }
3024
+ attr_accessor :expand
3025
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
3026
+ sig { returns(Integer) }
3027
+ attr_accessor :limit
3028
+ # 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.
3029
+ sig { returns(String) }
3030
+ attr_accessor :starting_after
3031
+ sig {
3032
+ params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void
3033
+ }
3034
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
3035
+ end
3036
+ # Accepts the specified quote.
3037
+ sig {
3038
+ params(params: T.any(::Stripe::Quote::AcceptParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
3039
+ }
3040
+ def accept(params = {}, opts = {}); end
3041
+
3042
+ # Accepts the specified quote.
3043
+ sig {
3044
+ params(quote: String, params: T.any(::Stripe::Quote::AcceptParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
3045
+ }
3046
+ def self.accept(quote, params = {}, opts = {}); end
3047
+
3048
+ # Cancels the quote.
3049
+ sig {
3050
+ params(params: T.any(::Stripe::Quote::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
3051
+ }
3052
+ def cancel(params = {}, opts = {}); end
3053
+
3054
+ # Cancels the quote.
3055
+ sig {
3056
+ params(quote: String, params: T.any(::Stripe::Quote::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
3057
+ }
3058
+ def self.cancel(quote, params = {}, opts = {}); end
3059
+
3060
+ # A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the [quote template](https://dashboard.stripe.com/settings/billing/quote).
3061
+ sig {
3062
+ params(params: T.any(::Stripe::Quote::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
3063
+ }
3064
+ def self.create(params = {}, opts = {}); end
3065
+
3066
+ # Finalizes the quote.
3067
+ sig {
3068
+ params(params: T.any(::Stripe::Quote::FinalizeQuoteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
3069
+ }
3070
+ def finalize_quote(params = {}, opts = {}); end
3071
+
3072
+ # Finalizes the quote.
3073
+ sig {
3074
+ params(quote: String, params: T.any(::Stripe::Quote::FinalizeQuoteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
3075
+ }
3076
+ def self.finalize_quote(quote, params = {}, opts = {}); end
3077
+
3078
+ # Returns a list of your quotes.
3079
+ sig {
3080
+ params(params: T.any(::Stripe::Quote::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
3081
+ }
3082
+ def self.list(params = {}, opts = {}); end
3083
+
3084
+ # When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.
3085
+ sig {
3086
+ params(params: T.any(::Stripe::Quote::ListComputedUpfrontLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
3087
+ }
3088
+ def list_computed_upfront_line_items(params = {}, opts = {}); end
3089
+
3090
+ # When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.
3091
+ sig {
3092
+ params(quote: String, params: T.any(::Stripe::Quote::ListComputedUpfrontLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
3093
+ }
3094
+ def self.list_computed_upfront_line_items(quote, params = {}, opts = {}); end
3095
+
3096
+ # When retrieving a quote, 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.
3097
+ sig {
3098
+ params(params: T.any(::Stripe::Quote::ListLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
3099
+ }
3100
+ def list_line_items(params = {}, opts = {}); end
3101
+
3102
+ # When retrieving a quote, 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.
3103
+ sig {
3104
+ params(quote: String, params: T.any(::Stripe::Quote::ListLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
3105
+ }
3106
+ def self.list_line_items(quote, params = {}, opts = {}); end
3107
+
3108
+ # Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
3109
+ sig {
3110
+ params(params: T.any(::Stripe::Quote::ListLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
3111
+ }
3112
+ def list_lines(params = {}, opts = {}); end
3113
+
3114
+ # Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
3115
+ sig {
3116
+ params(quote: String, params: T.any(::Stripe::Quote::ListLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
3117
+ }
3118
+ def self.list_lines(quote, params = {}, opts = {}); end
3119
+
3120
+ # Preview the invoice line items that would be generated by accepting the quote.
3121
+ sig {
3122
+ params(preview_invoice: String, params: T.any(::Stripe::Quote::ListPreviewInvoiceLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
3123
+ }
3124
+ def list_preview_invoice_lines(preview_invoice, params = {}, opts = {}); end
3125
+
3126
+ # Preview the invoice line items that would be generated by accepting the quote.
3127
+ sig {
3128
+ params(quote: String, preview_invoice: String, params: T.any(::Stripe::Quote::ListPreviewInvoiceLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
3129
+ }
3130
+ def self.list_preview_invoice_lines(quote, preview_invoice, params = {}, opts = {}); end
3131
+
3132
+ # Converts a stale quote to draft.
3133
+ sig {
3134
+ params(params: T.any(::Stripe::Quote::MarkDraftParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
3135
+ }
3136
+ def mark_draft(params = {}, opts = {}); end
3137
+
3138
+ # Converts a stale quote to draft.
3139
+ sig {
3140
+ params(quote: String, params: T.any(::Stripe::Quote::MarkDraftParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
3141
+ }
3142
+ def self.mark_draft(quote, params = {}, opts = {}); end
3143
+
3144
+ # Converts a draft or open quote to stale.
3145
+ sig {
3146
+ params(params: T.any(::Stripe::Quote::MarkStaleParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
3147
+ }
3148
+ def mark_stale(params = {}, opts = {}); end
3149
+
3150
+ # Converts a draft or open quote to stale.
3151
+ sig {
3152
+ params(quote: String, params: T.any(::Stripe::Quote::MarkStaleParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
3153
+ }
3154
+ def self.mark_stale(quote, params = {}, opts = {}); end
3155
+
3156
+ # Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
3157
+ sig {
3158
+ params(params: T.any(::Stripe::Quote::PdfParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped, read_body_chunk_block: T.untyped).returns(T.untyped)
3159
+ }
3160
+ def pdf(params = {}, opts = {}, &read_body_chunk_block); end
3161
+
3162
+ # Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
3163
+ sig {
3164
+ params(quote: String, params: T.any(::Stripe::Quote::PdfParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped, read_body_chunk_block: T.untyped).returns(T.untyped)
3165
+ }
3166
+ def self.pdf(quote, params = {}, opts = {}, &read_body_chunk_block); end
3167
+
3168
+ # Recompute the upcoming invoice estimate for the quote.
3169
+ sig {
3170
+ params(params: T.any(::Stripe::Quote::ReestimateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
3171
+ }
3172
+ def reestimate(params = {}, opts = {}); end
3173
+
3174
+ # Recompute the upcoming invoice estimate for the quote.
3175
+ sig {
3176
+ params(quote: String, params: T.any(::Stripe::Quote::ReestimateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
3177
+ }
3178
+ def self.reestimate(quote, params = {}, opts = {}); end
3179
+
3180
+ # A quote models prices and services for a customer.
3181
+ sig {
3182
+ params(id: String, params: T.any(::Stripe::Quote::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
3183
+ }
3184
+ def self.update(id, params = {}, opts = {}); end
3185
+ end
3186
+ end