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,2390 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ # typed: true
5
+ module Stripe
6
+ class QuoteService < StripeService
7
+ attr_reader :preview_invoices
8
+ attr_reader :preview_subscription_schedules
9
+ attr_reader :lines
10
+ attr_reader :line_items
11
+ attr_reader :computed_upfront_line_items
12
+ class ListParams < Stripe::RequestParams
13
+ # The ID of the customer whose quotes will be retrieved.
14
+ sig { returns(String) }
15
+ attr_accessor :customer
16
+ # 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.
17
+ sig { returns(String) }
18
+ attr_accessor :ending_before
19
+ # Specifies which fields in the response should be expanded.
20
+ sig { returns(T::Array[String]) }
21
+ attr_accessor :expand
22
+ # The subscription which the quote updates.
23
+ sig { returns(String) }
24
+ attr_accessor :from_subscription
25
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
26
+ sig { returns(Integer) }
27
+ attr_accessor :limit
28
+ # 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.
29
+ sig { returns(String) }
30
+ attr_accessor :starting_after
31
+ # The status of the quote.
32
+ sig { returns(String) }
33
+ attr_accessor :status
34
+ # 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.
35
+ sig { returns(String) }
36
+ attr_accessor :test_clock
37
+ sig {
38
+ params(customer: String, ending_before: String, expand: T::Array[String], from_subscription: String, limit: Integer, starting_after: String, status: String, test_clock: String).void
39
+ }
40
+ def initialize(
41
+ customer: nil,
42
+ ending_before: nil,
43
+ expand: nil,
44
+ from_subscription: nil,
45
+ limit: nil,
46
+ starting_after: nil,
47
+ status: nil,
48
+ test_clock: nil
49
+ ); end
50
+ end
51
+ class CreateParams < Stripe::RequestParams
52
+ class AutomaticTax < Stripe::RequestParams
53
+ class Liability < Stripe::RequestParams
54
+ # The connected account being referenced when `type` is `account`.
55
+ sig { returns(String) }
56
+ attr_accessor :account
57
+ # Type of the account referenced in the request.
58
+ sig { returns(String) }
59
+ attr_accessor :type
60
+ sig { params(account: String, type: String).void }
61
+ def initialize(account: nil, type: nil); end
62
+ end
63
+ # Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
64
+ sig { returns(T::Boolean) }
65
+ attr_accessor :enabled
66
+ # 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.
67
+ sig { returns(::Stripe::QuoteService::CreateParams::AutomaticTax::Liability) }
68
+ attr_accessor :liability
69
+ sig {
70
+ params(enabled: T::Boolean, liability: ::Stripe::QuoteService::CreateParams::AutomaticTax::Liability).void
71
+ }
72
+ def initialize(enabled: nil, liability: nil); end
73
+ end
74
+ class Discount < Stripe::RequestParams
75
+ class DiscountEnd < Stripe::RequestParams
76
+ class Duration < Stripe::RequestParams
77
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
78
+ sig { returns(String) }
79
+ attr_accessor :interval
80
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
81
+ sig { returns(Integer) }
82
+ attr_accessor :interval_count
83
+ sig { params(interval: String, interval_count: Integer).void }
84
+ def initialize(interval: nil, interval_count: nil); end
85
+ end
86
+ # Time span for the redeemed discount.
87
+ sig { returns(::Stripe::QuoteService::CreateParams::Discount::DiscountEnd::Duration) }
88
+ attr_accessor :duration
89
+ # A precise Unix timestamp for the discount to end. Must be in the future.
90
+ sig { returns(Integer) }
91
+ attr_accessor :timestamp
92
+ # The type of calculation made to determine when the discount ends.
93
+ sig { returns(String) }
94
+ attr_accessor :type
95
+ sig {
96
+ params(duration: ::Stripe::QuoteService::CreateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
97
+ }
98
+ def initialize(duration: nil, timestamp: nil, type: nil); end
99
+ end
100
+ # ID of the coupon to create a new discount for.
101
+ sig { returns(String) }
102
+ attr_accessor :coupon
103
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
104
+ sig { returns(String) }
105
+ attr_accessor :discount
106
+ # Details to determine how long the discount should be applied for.
107
+ sig { returns(::Stripe::QuoteService::CreateParams::Discount::DiscountEnd) }
108
+ attr_accessor :discount_end
109
+ # ID of the promotion code to create a new discount for.
110
+ sig { returns(String) }
111
+ attr_accessor :promotion_code
112
+ sig {
113
+ params(coupon: String, discount: String, discount_end: ::Stripe::QuoteService::CreateParams::Discount::DiscountEnd, promotion_code: String).void
114
+ }
115
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
116
+ end
117
+ class FromQuote < Stripe::RequestParams
118
+ # Whether this quote is a revision of the previous quote.
119
+ sig { returns(T::Boolean) }
120
+ attr_accessor :is_revision
121
+ # The `id` of the quote that will be cloned.
122
+ sig { returns(String) }
123
+ attr_accessor :quote
124
+ sig { params(is_revision: T::Boolean, quote: String).void }
125
+ def initialize(is_revision: nil, quote: nil); end
126
+ end
127
+ class InvoiceSettings < Stripe::RequestParams
128
+ class Issuer < Stripe::RequestParams
129
+ # The connected account being referenced when `type` is `account`.
130
+ sig { returns(String) }
131
+ attr_accessor :account
132
+ # Type of the account referenced in the request.
133
+ sig { returns(String) }
134
+ attr_accessor :type
135
+ sig { params(account: String, type: String).void }
136
+ def initialize(account: nil, type: nil); end
137
+ end
138
+ # 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`.
139
+ sig { returns(Integer) }
140
+ attr_accessor :days_until_due
141
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
142
+ sig { returns(::Stripe::QuoteService::CreateParams::InvoiceSettings::Issuer) }
143
+ attr_accessor :issuer
144
+ sig {
145
+ params(days_until_due: Integer, issuer: ::Stripe::QuoteService::CreateParams::InvoiceSettings::Issuer).void
146
+ }
147
+ def initialize(days_until_due: nil, issuer: nil); end
148
+ end
149
+ class Line < Stripe::RequestParams
150
+ class Action < Stripe::RequestParams
151
+ class AddDiscount < Stripe::RequestParams
152
+ class DiscountEnd < Stripe::RequestParams
153
+ # The type of calculation made to determine when the discount ends.
154
+ sig { returns(String) }
155
+ attr_accessor :type
156
+ sig { params(type: String).void }
157
+ def initialize(type: nil); end
158
+ end
159
+ # The coupon code to redeem.
160
+ sig { returns(String) }
161
+ attr_accessor :coupon
162
+ # An ID of an existing discount for a coupon that was already redeemed.
163
+ sig { returns(String) }
164
+ attr_accessor :discount
165
+ # Details to determine how long the discount should be applied for.
166
+ sig {
167
+ returns(::Stripe::QuoteService::CreateParams::Line::Action::AddDiscount::DiscountEnd)
168
+ }
169
+ attr_accessor :discount_end
170
+ # 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.
171
+ sig { returns(Integer) }
172
+ attr_accessor :index
173
+ # The promotion code to redeem.
174
+ sig { returns(String) }
175
+ attr_accessor :promotion_code
176
+ sig {
177
+ params(coupon: String, discount: String, discount_end: ::Stripe::QuoteService::CreateParams::Line::Action::AddDiscount::DiscountEnd, index: Integer, promotion_code: String).void
178
+ }
179
+ def initialize(
180
+ coupon: nil,
181
+ discount: nil,
182
+ discount_end: nil,
183
+ index: nil,
184
+ promotion_code: nil
185
+ ); end
186
+ end
187
+ class AddItem < Stripe::RequestParams
188
+ class Discount < Stripe::RequestParams
189
+ class DiscountEnd < Stripe::RequestParams
190
+ class Duration < Stripe::RequestParams
191
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
192
+ sig { returns(String) }
193
+ attr_accessor :interval
194
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
195
+ sig { returns(Integer) }
196
+ attr_accessor :interval_count
197
+ sig { params(interval: String, interval_count: Integer).void }
198
+ def initialize(interval: nil, interval_count: nil); end
199
+ end
200
+ # Time span for the redeemed discount.
201
+ sig {
202
+ returns(::Stripe::QuoteService::CreateParams::Line::Action::AddItem::Discount::DiscountEnd::Duration)
203
+ }
204
+ attr_accessor :duration
205
+ # A precise Unix timestamp for the discount to end. Must be in the future.
206
+ sig { returns(Integer) }
207
+ attr_accessor :timestamp
208
+ # The type of calculation made to determine when the discount ends.
209
+ sig { returns(String) }
210
+ attr_accessor :type
211
+ sig {
212
+ params(duration: ::Stripe::QuoteService::CreateParams::Line::Action::AddItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
213
+ }
214
+ def initialize(duration: nil, timestamp: nil, type: nil); end
215
+ end
216
+ # ID of the coupon to create a new discount for.
217
+ sig { returns(String) }
218
+ attr_accessor :coupon
219
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
220
+ sig { returns(String) }
221
+ attr_accessor :discount
222
+ # Details to determine how long the discount should be applied for.
223
+ sig {
224
+ returns(::Stripe::QuoteService::CreateParams::Line::Action::AddItem::Discount::DiscountEnd)
225
+ }
226
+ attr_accessor :discount_end
227
+ # ID of the promotion code to create a new discount for.
228
+ sig { returns(String) }
229
+ attr_accessor :promotion_code
230
+ sig {
231
+ params(coupon: String, discount: String, discount_end: ::Stripe::QuoteService::CreateParams::Line::Action::AddItem::Discount::DiscountEnd, promotion_code: String).void
232
+ }
233
+ def initialize(
234
+ coupon: nil,
235
+ discount: nil,
236
+ discount_end: nil,
237
+ promotion_code: nil
238
+ ); end
239
+ end
240
+ class Trial < Stripe::RequestParams
241
+ # 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.
242
+ sig { returns(T::Array[String]) }
243
+ attr_accessor :converts_to
244
+ # Determines the type of trial for this item.
245
+ sig { returns(String) }
246
+ attr_accessor :type
247
+ sig { params(converts_to: T::Array[String], type: String).void }
248
+ def initialize(converts_to: nil, type: nil); end
249
+ end
250
+ # The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
251
+ sig {
252
+ returns(T::Array[::Stripe::QuoteService::CreateParams::Line::Action::AddItem::Discount])
253
+ }
254
+ attr_accessor :discounts
255
+ # 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`.
256
+ sig { returns(T::Hash[String, String]) }
257
+ attr_accessor :metadata
258
+ # The ID of the price object.
259
+ sig { returns(String) }
260
+ attr_accessor :price
261
+ # Quantity for this item.
262
+ sig { returns(Integer) }
263
+ attr_accessor :quantity
264
+ # 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`.
265
+ sig { returns(T::Array[String]) }
266
+ attr_accessor :tax_rates
267
+ # Options that configure the trial on the subscription item.
268
+ sig { returns(::Stripe::QuoteService::CreateParams::Line::Action::AddItem::Trial) }
269
+ attr_accessor :trial
270
+ sig {
271
+ params(discounts: T::Array[::Stripe::QuoteService::CreateParams::Line::Action::AddItem::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::QuoteService::CreateParams::Line::Action::AddItem::Trial).void
272
+ }
273
+ def initialize(
274
+ discounts: nil,
275
+ metadata: nil,
276
+ price: nil,
277
+ quantity: nil,
278
+ tax_rates: nil,
279
+ trial: nil
280
+ ); end
281
+ end
282
+ class RemoveDiscount < Stripe::RequestParams
283
+ # The coupon code to remove from the `discounts` array.
284
+ sig { returns(String) }
285
+ attr_accessor :coupon
286
+ # The ID of a discount to remove from the `discounts` array.
287
+ sig { returns(String) }
288
+ attr_accessor :discount
289
+ # The ID of a promotion code to remove from the `discounts` array.
290
+ sig { returns(String) }
291
+ attr_accessor :promotion_code
292
+ sig { params(coupon: String, discount: String, promotion_code: String).void }
293
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
294
+ end
295
+ class RemoveItem < Stripe::RequestParams
296
+ # ID of a price to remove.
297
+ sig { returns(String) }
298
+ attr_accessor :price
299
+ sig { params(price: String).void }
300
+ def initialize(price: nil); end
301
+ end
302
+ class SetDiscount < Stripe::RequestParams
303
+ # The coupon code to replace the `discounts` array with.
304
+ sig { returns(String) }
305
+ attr_accessor :coupon
306
+ # An ID of an existing discount to replace the `discounts` array with.
307
+ sig { returns(String) }
308
+ attr_accessor :discount
309
+ # An ID of an existing promotion code to replace the `discounts` array with.
310
+ sig { returns(String) }
311
+ attr_accessor :promotion_code
312
+ sig { params(coupon: String, discount: String, promotion_code: String).void }
313
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
314
+ end
315
+ class SetItem < Stripe::RequestParams
316
+ class Discount < Stripe::RequestParams
317
+ class DiscountEnd < Stripe::RequestParams
318
+ class Duration < Stripe::RequestParams
319
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
320
+ sig { returns(String) }
321
+ attr_accessor :interval
322
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
323
+ sig { returns(Integer) }
324
+ attr_accessor :interval_count
325
+ sig { params(interval: String, interval_count: Integer).void }
326
+ def initialize(interval: nil, interval_count: nil); end
327
+ end
328
+ # Time span for the redeemed discount.
329
+ sig {
330
+ returns(::Stripe::QuoteService::CreateParams::Line::Action::SetItem::Discount::DiscountEnd::Duration)
331
+ }
332
+ attr_accessor :duration
333
+ # A precise Unix timestamp for the discount to end. Must be in the future.
334
+ sig { returns(Integer) }
335
+ attr_accessor :timestamp
336
+ # The type of calculation made to determine when the discount ends.
337
+ sig { returns(String) }
338
+ attr_accessor :type
339
+ sig {
340
+ params(duration: ::Stripe::QuoteService::CreateParams::Line::Action::SetItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
341
+ }
342
+ def initialize(duration: nil, timestamp: nil, type: nil); end
343
+ end
344
+ # ID of the coupon to create a new discount for.
345
+ sig { returns(String) }
346
+ attr_accessor :coupon
347
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
348
+ sig { returns(String) }
349
+ attr_accessor :discount
350
+ # Details to determine how long the discount should be applied for.
351
+ sig {
352
+ returns(::Stripe::QuoteService::CreateParams::Line::Action::SetItem::Discount::DiscountEnd)
353
+ }
354
+ attr_accessor :discount_end
355
+ # ID of the promotion code to create a new discount for.
356
+ sig { returns(String) }
357
+ attr_accessor :promotion_code
358
+ sig {
359
+ params(coupon: String, discount: String, discount_end: ::Stripe::QuoteService::CreateParams::Line::Action::SetItem::Discount::DiscountEnd, promotion_code: String).void
360
+ }
361
+ def initialize(
362
+ coupon: nil,
363
+ discount: nil,
364
+ discount_end: nil,
365
+ promotion_code: nil
366
+ ); end
367
+ end
368
+ class Trial < Stripe::RequestParams
369
+ # 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.
370
+ sig { returns(T::Array[String]) }
371
+ attr_accessor :converts_to
372
+ # Determines the type of trial for this item.
373
+ sig { returns(String) }
374
+ attr_accessor :type
375
+ sig { params(converts_to: T::Array[String], type: String).void }
376
+ def initialize(converts_to: nil, type: nil); end
377
+ end
378
+ # 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`.
379
+ sig {
380
+ returns(T::Array[::Stripe::QuoteService::CreateParams::Line::Action::SetItem::Discount])
381
+ }
382
+ attr_accessor :discounts
383
+ # 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`.
384
+ sig { returns(T::Hash[String, String]) }
385
+ attr_accessor :metadata
386
+ # The ID of the price object.
387
+ sig { returns(String) }
388
+ attr_accessor :price
389
+ # 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`.
390
+ sig { returns(Integer) }
391
+ attr_accessor :quantity
392
+ # 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`.
393
+ sig { returns(T::Array[String]) }
394
+ attr_accessor :tax_rates
395
+ # 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`.
396
+ sig { returns(::Stripe::QuoteService::CreateParams::Line::Action::SetItem::Trial) }
397
+ attr_accessor :trial
398
+ sig {
399
+ params(discounts: T::Array[::Stripe::QuoteService::CreateParams::Line::Action::SetItem::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::QuoteService::CreateParams::Line::Action::SetItem::Trial).void
400
+ }
401
+ def initialize(
402
+ discounts: nil,
403
+ metadata: nil,
404
+ price: nil,
405
+ quantity: nil,
406
+ tax_rates: nil,
407
+ trial: nil
408
+ ); end
409
+ end
410
+ # Details for the `add_discount` type.
411
+ sig { returns(::Stripe::QuoteService::CreateParams::Line::Action::AddDiscount) }
412
+ attr_accessor :add_discount
413
+ # Details for the `add_item` type.
414
+ sig { returns(::Stripe::QuoteService::CreateParams::Line::Action::AddItem) }
415
+ attr_accessor :add_item
416
+ # Details for the `add_metadata` type: specify a hash of key-value pairs.
417
+ sig { returns(T::Hash[String, String]) }
418
+ attr_accessor :add_metadata
419
+ # Details for the `remove_discount` type.
420
+ sig { returns(::Stripe::QuoteService::CreateParams::Line::Action::RemoveDiscount) }
421
+ attr_accessor :remove_discount
422
+ # Details for the `remove_item` type.
423
+ sig { returns(::Stripe::QuoteService::CreateParams::Line::Action::RemoveItem) }
424
+ attr_accessor :remove_item
425
+ # Details for the `remove_metadata` type: specify an array of metadata keys.
426
+ sig { returns(T::Array[String]) }
427
+ attr_accessor :remove_metadata
428
+ # Details for the `set_discounts` type.
429
+ sig { returns(T::Array[::Stripe::QuoteService::CreateParams::Line::Action::SetDiscount]) }
430
+ attr_accessor :set_discounts
431
+ # Details for the `set_items` type.
432
+ sig { returns(T::Array[::Stripe::QuoteService::CreateParams::Line::Action::SetItem]) }
433
+ attr_accessor :set_items
434
+ # Details for the `set_metadata` type: specify an array of key-value pairs.
435
+ sig { returns(T.nilable(T::Hash[String, String])) }
436
+ attr_accessor :set_metadata
437
+ # The type of action the quote line performs.
438
+ sig { returns(String) }
439
+ attr_accessor :type
440
+ sig {
441
+ params(add_discount: ::Stripe::QuoteService::CreateParams::Line::Action::AddDiscount, add_item: ::Stripe::QuoteService::CreateParams::Line::Action::AddItem, add_metadata: T::Hash[String, String], remove_discount: ::Stripe::QuoteService::CreateParams::Line::Action::RemoveDiscount, remove_item: ::Stripe::QuoteService::CreateParams::Line::Action::RemoveItem, remove_metadata: T::Array[String], set_discounts: T::Array[::Stripe::QuoteService::CreateParams::Line::Action::SetDiscount], set_items: T::Array[::Stripe::QuoteService::CreateParams::Line::Action::SetItem], set_metadata: T.nilable(T::Hash[String, String]), type: String).void
442
+ }
443
+ def initialize(
444
+ add_discount: nil,
445
+ add_item: nil,
446
+ add_metadata: nil,
447
+ remove_discount: nil,
448
+ remove_item: nil,
449
+ remove_metadata: nil,
450
+ set_discounts: nil,
451
+ set_items: nil,
452
+ set_metadata: nil,
453
+ type: nil
454
+ ); end
455
+ end
456
+ class AppliesTo < Stripe::RequestParams
457
+ # 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.
458
+ sig { returns(String) }
459
+ attr_accessor :new_reference
460
+ # The ID of the schedule the line applies to.
461
+ sig { returns(String) }
462
+ attr_accessor :subscription_schedule
463
+ # Describes whether the quote line is affecting a new schedule or an existing schedule.
464
+ sig { returns(String) }
465
+ attr_accessor :type
466
+ sig { params(new_reference: String, subscription_schedule: String, type: String).void }
467
+ def initialize(new_reference: nil, subscription_schedule: nil, type: nil); end
468
+ end
469
+ class CancelSubscriptionSchedule < Stripe::RequestParams
470
+ # Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
471
+ sig { returns(String) }
472
+ attr_accessor :cancel_at
473
+ # 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`.
474
+ sig { returns(T::Boolean) }
475
+ attr_accessor :invoice_now
476
+ # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
477
+ sig { returns(T::Boolean) }
478
+ attr_accessor :prorate
479
+ sig { params(cancel_at: String, invoice_now: T::Boolean, prorate: T::Boolean).void }
480
+ def initialize(cancel_at: nil, invoice_now: nil, prorate: nil); end
481
+ end
482
+ class EndsAt < Stripe::RequestParams
483
+ class DiscountEnd < Stripe::RequestParams
484
+ # The ID of a specific discount.
485
+ sig { returns(String) }
486
+ attr_accessor :discount
487
+ sig { params(discount: String).void }
488
+ def initialize(discount: nil); end
489
+ end
490
+ class Duration < Stripe::RequestParams
491
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
492
+ sig { returns(String) }
493
+ attr_accessor :interval
494
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
495
+ sig { returns(Integer) }
496
+ attr_accessor :interval_count
497
+ sig { params(interval: String, interval_count: Integer).void }
498
+ def initialize(interval: nil, interval_count: nil); end
499
+ end
500
+ # Use the `end` time of a given discount.
501
+ sig { returns(::Stripe::QuoteService::CreateParams::Line::EndsAt::DiscountEnd) }
502
+ attr_accessor :discount_end
503
+ # Time span for the quote line starting from the `starts_at` date.
504
+ sig { returns(::Stripe::QuoteService::CreateParams::Line::EndsAt::Duration) }
505
+ attr_accessor :duration
506
+ # A precise Unix timestamp.
507
+ sig { returns(Integer) }
508
+ attr_accessor :timestamp
509
+ # Select a way to pass in `ends_at`.
510
+ sig { returns(String) }
511
+ attr_accessor :type
512
+ sig {
513
+ params(discount_end: ::Stripe::QuoteService::CreateParams::Line::EndsAt::DiscountEnd, duration: ::Stripe::QuoteService::CreateParams::Line::EndsAt::Duration, timestamp: Integer, type: String).void
514
+ }
515
+ def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil); end
516
+ end
517
+ class SetPauseCollection < Stripe::RequestParams
518
+ class Set < Stripe::RequestParams
519
+ # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
520
+ sig { returns(String) }
521
+ attr_accessor :behavior
522
+ sig { params(behavior: String).void }
523
+ def initialize(behavior: nil); end
524
+ end
525
+ # Details of the pause_collection behavior to apply to the amendment.
526
+ sig { returns(::Stripe::QuoteService::CreateParams::Line::SetPauseCollection::Set) }
527
+ attr_accessor :set
528
+ # Determines the type of the pause_collection amendment.
529
+ sig { returns(String) }
530
+ attr_accessor :type
531
+ sig {
532
+ params(set: ::Stripe::QuoteService::CreateParams::Line::SetPauseCollection::Set, type: String).void
533
+ }
534
+ def initialize(set: nil, type: nil); end
535
+ end
536
+ class StartsAt < Stripe::RequestParams
537
+ class DiscountEnd < Stripe::RequestParams
538
+ # The ID of a specific discount.
539
+ sig { returns(String) }
540
+ attr_accessor :discount
541
+ sig { params(discount: String).void }
542
+ def initialize(discount: nil); end
543
+ end
544
+ class LineEndsAt < Stripe::RequestParams
545
+ # 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.
546
+ sig { returns(Integer) }
547
+ attr_accessor :index
548
+ sig { params(index: Integer).void }
549
+ def initialize(index: nil); end
550
+ end
551
+ # Use the `end` time of a given discount.
552
+ sig { returns(::Stripe::QuoteService::CreateParams::Line::StartsAt::DiscountEnd) }
553
+ attr_accessor :discount_end
554
+ # The timestamp the given line ends at.
555
+ sig { returns(::Stripe::QuoteService::CreateParams::Line::StartsAt::LineEndsAt) }
556
+ attr_accessor :line_ends_at
557
+ # A precise Unix timestamp.
558
+ sig { returns(Integer) }
559
+ attr_accessor :timestamp
560
+ # Select a way to pass in `starts_at`.
561
+ sig { returns(String) }
562
+ attr_accessor :type
563
+ sig {
564
+ params(discount_end: ::Stripe::QuoteService::CreateParams::Line::StartsAt::DiscountEnd, line_ends_at: ::Stripe::QuoteService::CreateParams::Line::StartsAt::LineEndsAt, timestamp: Integer, type: String).void
565
+ }
566
+ def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil); end
567
+ end
568
+ class TrialSettings < Stripe::RequestParams
569
+ class EndBehavior < Stripe::RequestParams
570
+ # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
571
+ sig { returns(String) }
572
+ attr_accessor :prorate_up_front
573
+ sig { params(prorate_up_front: String).void }
574
+ def initialize(prorate_up_front: nil); end
575
+ end
576
+ # Defines how the subscription should behave when a trial ends.
577
+ sig { returns(::Stripe::QuoteService::CreateParams::Line::TrialSettings::EndBehavior) }
578
+ attr_accessor :end_behavior
579
+ sig {
580
+ params(end_behavior: ::Stripe::QuoteService::CreateParams::Line::TrialSettings::EndBehavior).void
581
+ }
582
+ def initialize(end_behavior: nil); end
583
+ end
584
+ # An array of operations the quote line performs.
585
+ sig { returns(T::Array[::Stripe::QuoteService::CreateParams::Line::Action]) }
586
+ attr_accessor :actions
587
+ # Details to identify the subscription schedule the quote line applies to.
588
+ sig { returns(::Stripe::QuoteService::CreateParams::Line::AppliesTo) }
589
+ attr_accessor :applies_to
590
+ # 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.
591
+ sig { returns(String) }
592
+ attr_accessor :billing_cycle_anchor
593
+ # 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.
594
+ sig { returns(::Stripe::QuoteService::CreateParams::Line::CancelSubscriptionSchedule) }
595
+ attr_accessor :cancel_subscription_schedule
596
+ # 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.
597
+ sig { returns(::Stripe::QuoteService::CreateParams::Line::EndsAt) }
598
+ attr_accessor :ends_at
599
+ # 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.
600
+ sig { returns(String) }
601
+ attr_accessor :proration_behavior
602
+ # Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
603
+ sig { returns(::Stripe::QuoteService::CreateParams::Line::SetPauseCollection) }
604
+ attr_accessor :set_pause_collection
605
+ # Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
606
+ sig { returns(String) }
607
+ attr_accessor :set_schedule_end
608
+ # Details to identify the earliest timestamp where the proposed change should take effect.
609
+ sig { returns(::Stripe::QuoteService::CreateParams::Line::StartsAt) }
610
+ attr_accessor :starts_at
611
+ # Settings related to subscription trials.
612
+ sig { returns(::Stripe::QuoteService::CreateParams::Line::TrialSettings) }
613
+ attr_accessor :trial_settings
614
+ sig {
615
+ params(actions: T::Array[::Stripe::QuoteService::CreateParams::Line::Action], applies_to: ::Stripe::QuoteService::CreateParams::Line::AppliesTo, billing_cycle_anchor: String, cancel_subscription_schedule: ::Stripe::QuoteService::CreateParams::Line::CancelSubscriptionSchedule, ends_at: ::Stripe::QuoteService::CreateParams::Line::EndsAt, proration_behavior: String, set_pause_collection: ::Stripe::QuoteService::CreateParams::Line::SetPauseCollection, set_schedule_end: String, starts_at: ::Stripe::QuoteService::CreateParams::Line::StartsAt, trial_settings: ::Stripe::QuoteService::CreateParams::Line::TrialSettings).void
616
+ }
617
+ def initialize(
618
+ actions: nil,
619
+ applies_to: nil,
620
+ billing_cycle_anchor: nil,
621
+ cancel_subscription_schedule: nil,
622
+ ends_at: nil,
623
+ proration_behavior: nil,
624
+ set_pause_collection: nil,
625
+ set_schedule_end: nil,
626
+ starts_at: nil,
627
+ trial_settings: nil
628
+ ); end
629
+ end
630
+ class LineItem < Stripe::RequestParams
631
+ class Discount < Stripe::RequestParams
632
+ class DiscountEnd < Stripe::RequestParams
633
+ class Duration < Stripe::RequestParams
634
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
635
+ sig { returns(String) }
636
+ attr_accessor :interval
637
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
638
+ sig { returns(Integer) }
639
+ attr_accessor :interval_count
640
+ sig { params(interval: String, interval_count: Integer).void }
641
+ def initialize(interval: nil, interval_count: nil); end
642
+ end
643
+ # Time span for the redeemed discount.
644
+ sig {
645
+ returns(::Stripe::QuoteService::CreateParams::LineItem::Discount::DiscountEnd::Duration)
646
+ }
647
+ attr_accessor :duration
648
+ # A precise Unix timestamp for the discount to end. Must be in the future.
649
+ sig { returns(Integer) }
650
+ attr_accessor :timestamp
651
+ # The type of calculation made to determine when the discount ends.
652
+ sig { returns(String) }
653
+ attr_accessor :type
654
+ sig {
655
+ params(duration: ::Stripe::QuoteService::CreateParams::LineItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
656
+ }
657
+ def initialize(duration: nil, timestamp: nil, type: nil); end
658
+ end
659
+ # ID of the coupon to create a new discount for.
660
+ sig { returns(String) }
661
+ attr_accessor :coupon
662
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
663
+ sig { returns(String) }
664
+ attr_accessor :discount
665
+ # Details to determine how long the discount should be applied for.
666
+ sig { returns(::Stripe::QuoteService::CreateParams::LineItem::Discount::DiscountEnd) }
667
+ attr_accessor :discount_end
668
+ # ID of the promotion code to create a new discount for.
669
+ sig { returns(String) }
670
+ attr_accessor :promotion_code
671
+ sig {
672
+ params(coupon: String, discount: String, discount_end: ::Stripe::QuoteService::CreateParams::LineItem::Discount::DiscountEnd, promotion_code: String).void
673
+ }
674
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
675
+ end
676
+ class PriceData < Stripe::RequestParams
677
+ class Recurring < Stripe::RequestParams
678
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
679
+ sig { returns(String) }
680
+ attr_accessor :interval
681
+ # 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).
682
+ sig { returns(Integer) }
683
+ attr_accessor :interval_count
684
+ sig { params(interval: String, interval_count: Integer).void }
685
+ def initialize(interval: nil, interval_count: nil); end
686
+ end
687
+ # 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).
688
+ sig { returns(String) }
689
+ attr_accessor :currency
690
+ # The ID of the product that this price will belong to.
691
+ sig { returns(String) }
692
+ attr_accessor :product
693
+ # The recurring components of a price such as `interval` and `interval_count`.
694
+ sig { returns(::Stripe::QuoteService::CreateParams::LineItem::PriceData::Recurring) }
695
+ attr_accessor :recurring
696
+ # 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.
697
+ sig { returns(String) }
698
+ attr_accessor :tax_behavior
699
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
700
+ sig { returns(Integer) }
701
+ attr_accessor :unit_amount
702
+ # 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.
703
+ sig { returns(String) }
704
+ attr_accessor :unit_amount_decimal
705
+ sig {
706
+ params(currency: String, product: String, recurring: ::Stripe::QuoteService::CreateParams::LineItem::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
707
+ }
708
+ def initialize(
709
+ currency: nil,
710
+ product: nil,
711
+ recurring: nil,
712
+ tax_behavior: nil,
713
+ unit_amount: nil,
714
+ unit_amount_decimal: nil
715
+ ); end
716
+ end
717
+ # The discounts applied to this line item.
718
+ sig {
719
+ returns(T.nilable(T::Array[::Stripe::QuoteService::CreateParams::LineItem::Discount]))
720
+ }
721
+ attr_accessor :discounts
722
+ # The ID of the price object. One of `price` or `price_data` is required.
723
+ sig { returns(String) }
724
+ attr_accessor :price
725
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
726
+ sig { returns(::Stripe::QuoteService::CreateParams::LineItem::PriceData) }
727
+ attr_accessor :price_data
728
+ # The quantity of the line item.
729
+ sig { returns(Integer) }
730
+ attr_accessor :quantity
731
+ # 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.
732
+ sig { returns(T.nilable(T::Array[String])) }
733
+ attr_accessor :tax_rates
734
+ sig {
735
+ params(discounts: T.nilable(T::Array[::Stripe::QuoteService::CreateParams::LineItem::Discount]), price: String, price_data: ::Stripe::QuoteService::CreateParams::LineItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void
736
+ }
737
+ def initialize(
738
+ discounts: nil,
739
+ price: nil,
740
+ price_data: nil,
741
+ quantity: nil,
742
+ tax_rates: nil
743
+ ); end
744
+ end
745
+ class SubscriptionData < Stripe::RequestParams
746
+ class BillOnAcceptance < Stripe::RequestParams
747
+ class BillFrom < Stripe::RequestParams
748
+ class LineStartsAt < Stripe::RequestParams
749
+ # The ID of a quote line.
750
+ sig { returns(String) }
751
+ attr_accessor :id
752
+ # 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.
753
+ sig { returns(Integer) }
754
+ attr_accessor :index
755
+ sig { params(id: String, index: Integer).void }
756
+ def initialize(id: nil, index: nil); end
757
+ end
758
+ # Details of a Quote line to start the bill period from.
759
+ sig {
760
+ returns(::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillFrom::LineStartsAt)
761
+ }
762
+ attr_accessor :line_starts_at
763
+ # A precise Unix timestamp.
764
+ sig { returns(Integer) }
765
+ attr_accessor :timestamp
766
+ # The type of method to specify the `bill_from` time.
767
+ sig { returns(String) }
768
+ attr_accessor :type
769
+ sig {
770
+ params(line_starts_at: ::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillFrom::LineStartsAt, timestamp: Integer, type: String).void
771
+ }
772
+ def initialize(line_starts_at: nil, timestamp: nil, type: nil); end
773
+ end
774
+ class BillUntil < Stripe::RequestParams
775
+ class Duration < Stripe::RequestParams
776
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
777
+ sig { returns(String) }
778
+ attr_accessor :interval
779
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
780
+ sig { returns(Integer) }
781
+ attr_accessor :interval_count
782
+ sig { params(interval: String, interval_count: Integer).void }
783
+ def initialize(interval: nil, interval_count: nil); end
784
+ end
785
+ class LineEndsAt < Stripe::RequestParams
786
+ # The ID of a quote line.
787
+ sig { returns(String) }
788
+ attr_accessor :id
789
+ # 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.
790
+ sig { returns(Integer) }
791
+ attr_accessor :index
792
+ sig { params(id: String, index: Integer).void }
793
+ def initialize(id: nil, index: nil); end
794
+ end
795
+ # Details of the duration over which to bill.
796
+ sig {
797
+ returns(::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil::Duration)
798
+ }
799
+ attr_accessor :duration
800
+ # Details of a Quote line item from which to bill until.
801
+ sig {
802
+ returns(::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil::LineEndsAt)
803
+ }
804
+ attr_accessor :line_ends_at
805
+ # A precise Unix timestamp.
806
+ sig { returns(Integer) }
807
+ attr_accessor :timestamp
808
+ # The type of method to specify the `bill_until` time.
809
+ sig { returns(String) }
810
+ attr_accessor :type
811
+ sig {
812
+ params(duration: ::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil::Duration, line_ends_at: ::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil::LineEndsAt, timestamp: Integer, type: String).void
813
+ }
814
+ def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil); end
815
+ end
816
+ # The start of the period to bill from when the Quote is accepted.
817
+ sig {
818
+ returns(::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillFrom)
819
+ }
820
+ attr_accessor :bill_from
821
+ # The end of the period to bill until when the Quote is accepted.
822
+ sig {
823
+ returns(::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil)
824
+ }
825
+ attr_accessor :bill_until
826
+ sig {
827
+ params(bill_from: ::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillFrom, bill_until: ::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil).void
828
+ }
829
+ def initialize(bill_from: nil, bill_until: nil); end
830
+ end
831
+ class Prebilling < Stripe::RequestParams
832
+ # This is used to determine the number of billing cycles to prebill.
833
+ sig { returns(Integer) }
834
+ attr_accessor :iterations
835
+ sig { params(iterations: Integer).void }
836
+ def initialize(iterations: nil); end
837
+ end
838
+ # Describes the period to bill for upon accepting the quote.
839
+ sig { returns(::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance) }
840
+ attr_accessor :bill_on_acceptance
841
+ # 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.
842
+ sig { returns(String) }
843
+ attr_accessor :billing_behavior
844
+ # When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
845
+ sig { returns(T.nilable(String)) }
846
+ attr_accessor :billing_cycle_anchor
847
+ # 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.
848
+ sig { returns(String) }
849
+ attr_accessor :description
850
+ # 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.
851
+ sig { returns(T.nilable(T.any(String, Integer))) }
852
+ attr_accessor :effective_date
853
+ # Behavior of the subscription schedule and underlying subscription when it ends.
854
+ sig { returns(String) }
855
+ attr_accessor :end_behavior
856
+ # 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.
857
+ sig { returns(String) }
858
+ attr_accessor :from_subscription
859
+ # 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.
860
+ sig { returns(T::Hash[String, String]) }
861
+ attr_accessor :metadata
862
+ # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
863
+ sig {
864
+ returns(T.nilable(::Stripe::QuoteService::CreateParams::SubscriptionData::Prebilling))
865
+ }
866
+ attr_accessor :prebilling
867
+ # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
868
+ #
869
+ # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
870
+ #
871
+ # 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`.
872
+ #
873
+ # Prorations can be disabled by passing `none`.
874
+ sig { returns(String) }
875
+ attr_accessor :proration_behavior
876
+ # Integer representing the number of trial period days before the customer is charged for the first time.
877
+ sig { returns(T.nilable(Integer)) }
878
+ attr_accessor :trial_period_days
879
+ sig {
880
+ params(bill_on_acceptance: ::Stripe::QuoteService::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::QuoteService::CreateParams::SubscriptionData::Prebilling), proration_behavior: String, trial_period_days: T.nilable(Integer)).void
881
+ }
882
+ def initialize(
883
+ bill_on_acceptance: nil,
884
+ billing_behavior: nil,
885
+ billing_cycle_anchor: nil,
886
+ description: nil,
887
+ effective_date: nil,
888
+ end_behavior: nil,
889
+ from_subscription: nil,
890
+ metadata: nil,
891
+ prebilling: nil,
892
+ proration_behavior: nil,
893
+ trial_period_days: nil
894
+ ); end
895
+ end
896
+ class SubscriptionDataOverride < Stripe::RequestParams
897
+ class AppliesTo < Stripe::RequestParams
898
+ # 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.
899
+ sig { returns(String) }
900
+ attr_accessor :new_reference
901
+ # The ID of the schedule the line applies to.
902
+ sig { returns(String) }
903
+ attr_accessor :subscription_schedule
904
+ # Describes whether the quote line is affecting a new schedule or an existing schedule.
905
+ sig { returns(String) }
906
+ attr_accessor :type
907
+ sig { params(new_reference: String, subscription_schedule: String, type: String).void }
908
+ def initialize(new_reference: nil, subscription_schedule: nil, type: nil); end
909
+ end
910
+ class BillOnAcceptance < Stripe::RequestParams
911
+ class BillFrom < Stripe::RequestParams
912
+ class LineStartsAt < Stripe::RequestParams
913
+ # The ID of a quote line.
914
+ sig { returns(String) }
915
+ attr_accessor :id
916
+ # 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.
917
+ sig { returns(Integer) }
918
+ attr_accessor :index
919
+ sig { params(id: String, index: Integer).void }
920
+ def initialize(id: nil, index: nil); end
921
+ end
922
+ # Details of a Quote line to start the bill period from.
923
+ sig {
924
+ returns(::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom::LineStartsAt)
925
+ }
926
+ attr_accessor :line_starts_at
927
+ # A precise Unix timestamp.
928
+ sig { returns(Integer) }
929
+ attr_accessor :timestamp
930
+ # The type of method to specify the `bill_from` time.
931
+ sig { returns(String) }
932
+ attr_accessor :type
933
+ sig {
934
+ params(line_starts_at: ::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom::LineStartsAt, timestamp: Integer, type: String).void
935
+ }
936
+ def initialize(line_starts_at: nil, timestamp: nil, type: nil); end
937
+ end
938
+ class BillUntil < Stripe::RequestParams
939
+ class Duration < Stripe::RequestParams
940
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
941
+ sig { returns(String) }
942
+ attr_accessor :interval
943
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
944
+ sig { returns(Integer) }
945
+ attr_accessor :interval_count
946
+ sig { params(interval: String, interval_count: Integer).void }
947
+ def initialize(interval: nil, interval_count: nil); end
948
+ end
949
+ class LineEndsAt < Stripe::RequestParams
950
+ # The ID of a quote line.
951
+ sig { returns(String) }
952
+ attr_accessor :id
953
+ # 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.
954
+ sig { returns(Integer) }
955
+ attr_accessor :index
956
+ sig { params(id: String, index: Integer).void }
957
+ def initialize(id: nil, index: nil); end
958
+ end
959
+ # Details of the duration over which to bill.
960
+ sig {
961
+ returns(::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::Duration)
962
+ }
963
+ attr_accessor :duration
964
+ # Details of a Quote line item from which to bill until.
965
+ sig {
966
+ returns(::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::LineEndsAt)
967
+ }
968
+ attr_accessor :line_ends_at
969
+ # A precise Unix timestamp.
970
+ sig { returns(Integer) }
971
+ attr_accessor :timestamp
972
+ # The type of method to specify the `bill_until` time.
973
+ sig { returns(String) }
974
+ attr_accessor :type
975
+ sig {
976
+ params(duration: ::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::Duration, line_ends_at: ::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::LineEndsAt, timestamp: Integer, type: String).void
977
+ }
978
+ def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil); end
979
+ end
980
+ # The start of the period to bill from when the Quote is accepted.
981
+ sig {
982
+ returns(::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom)
983
+ }
984
+ attr_accessor :bill_from
985
+ # The end of the period to bill until when the Quote is accepted.
986
+ sig {
987
+ returns(::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil)
988
+ }
989
+ attr_accessor :bill_until
990
+ sig {
991
+ params(bill_from: ::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom, bill_until: ::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil).void
992
+ }
993
+ def initialize(bill_from: nil, bill_until: nil); end
994
+ end
995
+ # Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
996
+ sig { returns(::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::AppliesTo) }
997
+ attr_accessor :applies_to
998
+ # Describes the period to bill for upon accepting the quote.
999
+ sig {
1000
+ returns(::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance)
1001
+ }
1002
+ attr_accessor :bill_on_acceptance
1003
+ # 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.
1004
+ sig { returns(String) }
1005
+ attr_accessor :billing_behavior
1006
+ # The customer the Subscription Data override applies to. This is only relevant when `applies_to.type=new_reference`.
1007
+ sig { returns(String) }
1008
+ attr_accessor :customer
1009
+ # 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.
1010
+ sig { returns(String) }
1011
+ attr_accessor :description
1012
+ # Behavior of the subscription schedule and underlying subscription when it ends.
1013
+ sig { returns(String) }
1014
+ attr_accessor :end_behavior
1015
+ # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
1016
+ #
1017
+ # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
1018
+ #
1019
+ # 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`.
1020
+ #
1021
+ # Prorations can be disabled by passing `none`.
1022
+ sig { returns(String) }
1023
+ attr_accessor :proration_behavior
1024
+ sig {
1025
+ params(applies_to: ::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::AppliesTo, bill_on_acceptance: ::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance, billing_behavior: String, customer: String, description: String, end_behavior: String, proration_behavior: String).void
1026
+ }
1027
+ def initialize(
1028
+ applies_to: nil,
1029
+ bill_on_acceptance: nil,
1030
+ billing_behavior: nil,
1031
+ customer: nil,
1032
+ description: nil,
1033
+ end_behavior: nil,
1034
+ proration_behavior: nil
1035
+ ); end
1036
+ end
1037
+ class TransferData < Stripe::RequestParams
1038
+ # 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.
1039
+ sig { returns(Integer) }
1040
+ attr_accessor :amount
1041
+ # 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.
1042
+ sig { returns(Float) }
1043
+ attr_accessor :amount_percent
1044
+ # ID of an existing, connected Stripe account.
1045
+ sig { returns(String) }
1046
+ attr_accessor :destination
1047
+ sig { params(amount: Integer, amount_percent: Float, destination: String).void }
1048
+ def initialize(amount: nil, amount_percent: nil, destination: nil); end
1049
+ end
1050
+ # Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
1051
+ sig { returns(T::Boolean) }
1052
+ attr_accessor :allow_backdated_lines
1053
+ # 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.
1054
+ sig { returns(T.nilable(Integer)) }
1055
+ attr_accessor :application_fee_amount
1056
+ # 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.
1057
+ sig { returns(T.nilable(Float)) }
1058
+ attr_accessor :application_fee_percent
1059
+ # Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
1060
+ sig { returns(::Stripe::QuoteService::CreateParams::AutomaticTax) }
1061
+ attr_accessor :automatic_tax
1062
+ # 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`.
1063
+ sig { returns(String) }
1064
+ attr_accessor :collection_method
1065
+ # The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
1066
+ sig { returns(String) }
1067
+ attr_accessor :customer
1068
+ # The tax rates that will apply to any line item that does not have `tax_rates` set.
1069
+ sig { returns(T.nilable(T::Array[String])) }
1070
+ attr_accessor :default_tax_rates
1071
+ # 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.
1072
+ sig { returns(T.nilable(String)) }
1073
+ attr_accessor :description
1074
+ # The discounts applied to the quote.
1075
+ sig { returns(T.nilable(T::Array[::Stripe::QuoteService::CreateParams::Discount])) }
1076
+ attr_accessor :discounts
1077
+ # Specifies which fields in the response should be expanded.
1078
+ sig { returns(T::Array[String]) }
1079
+ attr_accessor :expand
1080
+ # 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.
1081
+ sig { returns(Integer) }
1082
+ attr_accessor :expires_at
1083
+ # 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.
1084
+ sig { returns(T.nilable(String)) }
1085
+ attr_accessor :footer
1086
+ # 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`.
1087
+ sig { returns(::Stripe::QuoteService::CreateParams::FromQuote) }
1088
+ attr_accessor :from_quote
1089
+ # 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.
1090
+ sig { returns(T.nilable(String)) }
1091
+ attr_accessor :header
1092
+ # All invoices will be billed using the specified settings.
1093
+ sig { returns(::Stripe::QuoteService::CreateParams::InvoiceSettings) }
1094
+ attr_accessor :invoice_settings
1095
+ # 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.
1096
+ sig { returns(T::Array[::Stripe::QuoteService::CreateParams::LineItem]) }
1097
+ attr_accessor :line_items
1098
+ # 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.
1099
+ sig { returns(T::Array[::Stripe::QuoteService::CreateParams::Line]) }
1100
+ attr_accessor :lines
1101
+ # 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`.
1102
+ sig { returns(T::Hash[String, String]) }
1103
+ attr_accessor :metadata
1104
+ # The account on behalf of which to charge.
1105
+ sig { returns(T.nilable(String)) }
1106
+ attr_accessor :on_behalf_of
1107
+ # 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.
1108
+ sig { returns(::Stripe::QuoteService::CreateParams::SubscriptionData) }
1109
+ attr_accessor :subscription_data
1110
+ # List representing overrides for `subscription_data` configurations for specific subscription schedules.
1111
+ sig { returns(T::Array[::Stripe::QuoteService::CreateParams::SubscriptionDataOverride]) }
1112
+ attr_accessor :subscription_data_overrides
1113
+ # ID of the test clock to attach to the quote.
1114
+ sig { returns(String) }
1115
+ attr_accessor :test_clock
1116
+ # The data with which to automatically create a Transfer for each of the invoices.
1117
+ sig { returns(T.nilable(::Stripe::QuoteService::CreateParams::TransferData)) }
1118
+ attr_accessor :transfer_data
1119
+ sig {
1120
+ params(allow_backdated_lines: T::Boolean, application_fee_amount: T.nilable(Integer), application_fee_percent: T.nilable(Float), automatic_tax: ::Stripe::QuoteService::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::QuoteService::CreateParams::Discount]), expand: T::Array[String], expires_at: Integer, footer: T.nilable(String), from_quote: ::Stripe::QuoteService::CreateParams::FromQuote, header: T.nilable(String), invoice_settings: ::Stripe::QuoteService::CreateParams::InvoiceSettings, line_items: T::Array[::Stripe::QuoteService::CreateParams::LineItem], lines: T::Array[::Stripe::QuoteService::CreateParams::Line], metadata: T::Hash[String, String], on_behalf_of: T.nilable(String), subscription_data: ::Stripe::QuoteService::CreateParams::SubscriptionData, subscription_data_overrides: T::Array[::Stripe::QuoteService::CreateParams::SubscriptionDataOverride], test_clock: String, transfer_data: T.nilable(::Stripe::QuoteService::CreateParams::TransferData)).void
1121
+ }
1122
+ def initialize(
1123
+ allow_backdated_lines: nil,
1124
+ application_fee_amount: nil,
1125
+ application_fee_percent: nil,
1126
+ automatic_tax: nil,
1127
+ collection_method: nil,
1128
+ customer: nil,
1129
+ default_tax_rates: nil,
1130
+ description: nil,
1131
+ discounts: nil,
1132
+ expand: nil,
1133
+ expires_at: nil,
1134
+ footer: nil,
1135
+ from_quote: nil,
1136
+ header: nil,
1137
+ invoice_settings: nil,
1138
+ line_items: nil,
1139
+ lines: nil,
1140
+ metadata: nil,
1141
+ on_behalf_of: nil,
1142
+ subscription_data: nil,
1143
+ subscription_data_overrides: nil,
1144
+ test_clock: nil,
1145
+ transfer_data: nil
1146
+ ); end
1147
+ end
1148
+ class RetrieveParams < Stripe::RequestParams
1149
+ # Specifies which fields in the response should be expanded.
1150
+ sig { returns(T::Array[String]) }
1151
+ attr_accessor :expand
1152
+ sig { params(expand: T::Array[String]).void }
1153
+ def initialize(expand: nil); end
1154
+ end
1155
+ class UpdateParams < Stripe::RequestParams
1156
+ class AutomaticTax < Stripe::RequestParams
1157
+ class Liability < Stripe::RequestParams
1158
+ # The connected account being referenced when `type` is `account`.
1159
+ sig { returns(String) }
1160
+ attr_accessor :account
1161
+ # Type of the account referenced in the request.
1162
+ sig { returns(String) }
1163
+ attr_accessor :type
1164
+ sig { params(account: String, type: String).void }
1165
+ def initialize(account: nil, type: nil); end
1166
+ end
1167
+ # Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
1168
+ sig { returns(T::Boolean) }
1169
+ attr_accessor :enabled
1170
+ # 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.
1171
+ sig { returns(::Stripe::QuoteService::UpdateParams::AutomaticTax::Liability) }
1172
+ attr_accessor :liability
1173
+ sig {
1174
+ params(enabled: T::Boolean, liability: ::Stripe::QuoteService::UpdateParams::AutomaticTax::Liability).void
1175
+ }
1176
+ def initialize(enabled: nil, liability: nil); end
1177
+ end
1178
+ class Discount < Stripe::RequestParams
1179
+ class DiscountEnd < Stripe::RequestParams
1180
+ class Duration < Stripe::RequestParams
1181
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1182
+ sig { returns(String) }
1183
+ attr_accessor :interval
1184
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1185
+ sig { returns(Integer) }
1186
+ attr_accessor :interval_count
1187
+ sig { params(interval: String, interval_count: Integer).void }
1188
+ def initialize(interval: nil, interval_count: nil); end
1189
+ end
1190
+ # Time span for the redeemed discount.
1191
+ sig { returns(::Stripe::QuoteService::UpdateParams::Discount::DiscountEnd::Duration) }
1192
+ attr_accessor :duration
1193
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1194
+ sig { returns(Integer) }
1195
+ attr_accessor :timestamp
1196
+ # The type of calculation made to determine when the discount ends.
1197
+ sig { returns(String) }
1198
+ attr_accessor :type
1199
+ sig {
1200
+ params(duration: ::Stripe::QuoteService::UpdateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
1201
+ }
1202
+ def initialize(duration: nil, timestamp: nil, type: nil); end
1203
+ end
1204
+ # ID of the coupon to create a new discount for.
1205
+ sig { returns(String) }
1206
+ attr_accessor :coupon
1207
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1208
+ sig { returns(String) }
1209
+ attr_accessor :discount
1210
+ # Details to determine how long the discount should be applied for.
1211
+ sig { returns(::Stripe::QuoteService::UpdateParams::Discount::DiscountEnd) }
1212
+ attr_accessor :discount_end
1213
+ # ID of the promotion code to create a new discount for.
1214
+ sig { returns(String) }
1215
+ attr_accessor :promotion_code
1216
+ sig {
1217
+ params(coupon: String, discount: String, discount_end: ::Stripe::QuoteService::UpdateParams::Discount::DiscountEnd, promotion_code: String).void
1218
+ }
1219
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
1220
+ end
1221
+ class InvoiceSettings < Stripe::RequestParams
1222
+ class Issuer < Stripe::RequestParams
1223
+ # The connected account being referenced when `type` is `account`.
1224
+ sig { returns(String) }
1225
+ attr_accessor :account
1226
+ # Type of the account referenced in the request.
1227
+ sig { returns(String) }
1228
+ attr_accessor :type
1229
+ sig { params(account: String, type: String).void }
1230
+ def initialize(account: nil, type: nil); end
1231
+ end
1232
+ # 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`.
1233
+ sig { returns(Integer) }
1234
+ attr_accessor :days_until_due
1235
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1236
+ sig { returns(::Stripe::QuoteService::UpdateParams::InvoiceSettings::Issuer) }
1237
+ attr_accessor :issuer
1238
+ sig {
1239
+ params(days_until_due: Integer, issuer: ::Stripe::QuoteService::UpdateParams::InvoiceSettings::Issuer).void
1240
+ }
1241
+ def initialize(days_until_due: nil, issuer: nil); end
1242
+ end
1243
+ class Line < Stripe::RequestParams
1244
+ class Action < Stripe::RequestParams
1245
+ class AddDiscount < Stripe::RequestParams
1246
+ class DiscountEnd < Stripe::RequestParams
1247
+ # The type of calculation made to determine when the discount ends.
1248
+ sig { returns(String) }
1249
+ attr_accessor :type
1250
+ sig { params(type: String).void }
1251
+ def initialize(type: nil); end
1252
+ end
1253
+ # The coupon code to redeem.
1254
+ sig { returns(String) }
1255
+ attr_accessor :coupon
1256
+ # An ID of an existing discount for a coupon that was already redeemed.
1257
+ sig { returns(String) }
1258
+ attr_accessor :discount
1259
+ # Details to determine how long the discount should be applied for.
1260
+ sig {
1261
+ returns(::Stripe::QuoteService::UpdateParams::Line::Action::AddDiscount::DiscountEnd)
1262
+ }
1263
+ attr_accessor :discount_end
1264
+ # 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.
1265
+ sig { returns(Integer) }
1266
+ attr_accessor :index
1267
+ # The promotion code to redeem.
1268
+ sig { returns(String) }
1269
+ attr_accessor :promotion_code
1270
+ sig {
1271
+ params(coupon: String, discount: String, discount_end: ::Stripe::QuoteService::UpdateParams::Line::Action::AddDiscount::DiscountEnd, index: Integer, promotion_code: String).void
1272
+ }
1273
+ def initialize(
1274
+ coupon: nil,
1275
+ discount: nil,
1276
+ discount_end: nil,
1277
+ index: nil,
1278
+ promotion_code: nil
1279
+ ); end
1280
+ end
1281
+ class AddItem < Stripe::RequestParams
1282
+ class Discount < Stripe::RequestParams
1283
+ class DiscountEnd < Stripe::RequestParams
1284
+ class Duration < Stripe::RequestParams
1285
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1286
+ sig { returns(String) }
1287
+ attr_accessor :interval
1288
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1289
+ sig { returns(Integer) }
1290
+ attr_accessor :interval_count
1291
+ sig { params(interval: String, interval_count: Integer).void }
1292
+ def initialize(interval: nil, interval_count: nil); end
1293
+ end
1294
+ # Time span for the redeemed discount.
1295
+ sig {
1296
+ returns(::Stripe::QuoteService::UpdateParams::Line::Action::AddItem::Discount::DiscountEnd::Duration)
1297
+ }
1298
+ attr_accessor :duration
1299
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1300
+ sig { returns(Integer) }
1301
+ attr_accessor :timestamp
1302
+ # The type of calculation made to determine when the discount ends.
1303
+ sig { returns(String) }
1304
+ attr_accessor :type
1305
+ sig {
1306
+ params(duration: ::Stripe::QuoteService::UpdateParams::Line::Action::AddItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
1307
+ }
1308
+ def initialize(duration: nil, timestamp: nil, type: nil); end
1309
+ end
1310
+ # ID of the coupon to create a new discount for.
1311
+ sig { returns(String) }
1312
+ attr_accessor :coupon
1313
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1314
+ sig { returns(String) }
1315
+ attr_accessor :discount
1316
+ # Details to determine how long the discount should be applied for.
1317
+ sig {
1318
+ returns(::Stripe::QuoteService::UpdateParams::Line::Action::AddItem::Discount::DiscountEnd)
1319
+ }
1320
+ attr_accessor :discount_end
1321
+ # ID of the promotion code to create a new discount for.
1322
+ sig { returns(String) }
1323
+ attr_accessor :promotion_code
1324
+ sig {
1325
+ params(coupon: String, discount: String, discount_end: ::Stripe::QuoteService::UpdateParams::Line::Action::AddItem::Discount::DiscountEnd, promotion_code: String).void
1326
+ }
1327
+ def initialize(
1328
+ coupon: nil,
1329
+ discount: nil,
1330
+ discount_end: nil,
1331
+ promotion_code: nil
1332
+ ); end
1333
+ end
1334
+ class Trial < Stripe::RequestParams
1335
+ # 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.
1336
+ sig { returns(T::Array[String]) }
1337
+ attr_accessor :converts_to
1338
+ # Determines the type of trial for this item.
1339
+ sig { returns(String) }
1340
+ attr_accessor :type
1341
+ sig { params(converts_to: T::Array[String], type: String).void }
1342
+ def initialize(converts_to: nil, type: nil); end
1343
+ end
1344
+ # The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
1345
+ sig {
1346
+ returns(T::Array[::Stripe::QuoteService::UpdateParams::Line::Action::AddItem::Discount])
1347
+ }
1348
+ attr_accessor :discounts
1349
+ # 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`.
1350
+ sig { returns(T::Hash[String, String]) }
1351
+ attr_accessor :metadata
1352
+ # The ID of the price object.
1353
+ sig { returns(String) }
1354
+ attr_accessor :price
1355
+ # Quantity for this item.
1356
+ sig { returns(Integer) }
1357
+ attr_accessor :quantity
1358
+ # 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`.
1359
+ sig { returns(T::Array[String]) }
1360
+ attr_accessor :tax_rates
1361
+ # Options that configure the trial on the subscription item.
1362
+ sig { returns(::Stripe::QuoteService::UpdateParams::Line::Action::AddItem::Trial) }
1363
+ attr_accessor :trial
1364
+ sig {
1365
+ params(discounts: T::Array[::Stripe::QuoteService::UpdateParams::Line::Action::AddItem::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::QuoteService::UpdateParams::Line::Action::AddItem::Trial).void
1366
+ }
1367
+ def initialize(
1368
+ discounts: nil,
1369
+ metadata: nil,
1370
+ price: nil,
1371
+ quantity: nil,
1372
+ tax_rates: nil,
1373
+ trial: nil
1374
+ ); end
1375
+ end
1376
+ class RemoveDiscount < Stripe::RequestParams
1377
+ # The coupon code to remove from the `discounts` array.
1378
+ sig { returns(String) }
1379
+ attr_accessor :coupon
1380
+ # The ID of a discount to remove from the `discounts` array.
1381
+ sig { returns(String) }
1382
+ attr_accessor :discount
1383
+ # The ID of a promotion code to remove from the `discounts` array.
1384
+ sig { returns(String) }
1385
+ attr_accessor :promotion_code
1386
+ sig { params(coupon: String, discount: String, promotion_code: String).void }
1387
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
1388
+ end
1389
+ class RemoveItem < Stripe::RequestParams
1390
+ # ID of a price to remove.
1391
+ sig { returns(String) }
1392
+ attr_accessor :price
1393
+ sig { params(price: String).void }
1394
+ def initialize(price: nil); end
1395
+ end
1396
+ class SetDiscount < Stripe::RequestParams
1397
+ # The coupon code to replace the `discounts` array with.
1398
+ sig { returns(String) }
1399
+ attr_accessor :coupon
1400
+ # An ID of an existing discount to replace the `discounts` array with.
1401
+ sig { returns(String) }
1402
+ attr_accessor :discount
1403
+ # An ID of an existing promotion code to replace the `discounts` array with.
1404
+ sig { returns(String) }
1405
+ attr_accessor :promotion_code
1406
+ sig { params(coupon: String, discount: String, promotion_code: String).void }
1407
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
1408
+ end
1409
+ class SetItem < Stripe::RequestParams
1410
+ class Discount < Stripe::RequestParams
1411
+ class DiscountEnd < Stripe::RequestParams
1412
+ class Duration < Stripe::RequestParams
1413
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1414
+ sig { returns(String) }
1415
+ attr_accessor :interval
1416
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1417
+ sig { returns(Integer) }
1418
+ attr_accessor :interval_count
1419
+ sig { params(interval: String, interval_count: Integer).void }
1420
+ def initialize(interval: nil, interval_count: nil); end
1421
+ end
1422
+ # Time span for the redeemed discount.
1423
+ sig {
1424
+ returns(::Stripe::QuoteService::UpdateParams::Line::Action::SetItem::Discount::DiscountEnd::Duration)
1425
+ }
1426
+ attr_accessor :duration
1427
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1428
+ sig { returns(Integer) }
1429
+ attr_accessor :timestamp
1430
+ # The type of calculation made to determine when the discount ends.
1431
+ sig { returns(String) }
1432
+ attr_accessor :type
1433
+ sig {
1434
+ params(duration: ::Stripe::QuoteService::UpdateParams::Line::Action::SetItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
1435
+ }
1436
+ def initialize(duration: nil, timestamp: nil, type: nil); end
1437
+ end
1438
+ # ID of the coupon to create a new discount for.
1439
+ sig { returns(String) }
1440
+ attr_accessor :coupon
1441
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1442
+ sig { returns(String) }
1443
+ attr_accessor :discount
1444
+ # Details to determine how long the discount should be applied for.
1445
+ sig {
1446
+ returns(::Stripe::QuoteService::UpdateParams::Line::Action::SetItem::Discount::DiscountEnd)
1447
+ }
1448
+ attr_accessor :discount_end
1449
+ # ID of the promotion code to create a new discount for.
1450
+ sig { returns(String) }
1451
+ attr_accessor :promotion_code
1452
+ sig {
1453
+ params(coupon: String, discount: String, discount_end: ::Stripe::QuoteService::UpdateParams::Line::Action::SetItem::Discount::DiscountEnd, promotion_code: String).void
1454
+ }
1455
+ def initialize(
1456
+ coupon: nil,
1457
+ discount: nil,
1458
+ discount_end: nil,
1459
+ promotion_code: nil
1460
+ ); end
1461
+ end
1462
+ class Trial < Stripe::RequestParams
1463
+ # 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.
1464
+ sig { returns(T::Array[String]) }
1465
+ attr_accessor :converts_to
1466
+ # Determines the type of trial for this item.
1467
+ sig { returns(String) }
1468
+ attr_accessor :type
1469
+ sig { params(converts_to: T::Array[String], type: String).void }
1470
+ def initialize(converts_to: nil, type: nil); end
1471
+ end
1472
+ # 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`.
1473
+ sig {
1474
+ returns(T::Array[::Stripe::QuoteService::UpdateParams::Line::Action::SetItem::Discount])
1475
+ }
1476
+ attr_accessor :discounts
1477
+ # 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`.
1478
+ sig { returns(T::Hash[String, String]) }
1479
+ attr_accessor :metadata
1480
+ # The ID of the price object.
1481
+ sig { returns(String) }
1482
+ attr_accessor :price
1483
+ # 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`.
1484
+ sig { returns(Integer) }
1485
+ attr_accessor :quantity
1486
+ # 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`.
1487
+ sig { returns(T::Array[String]) }
1488
+ attr_accessor :tax_rates
1489
+ # 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`.
1490
+ sig { returns(::Stripe::QuoteService::UpdateParams::Line::Action::SetItem::Trial) }
1491
+ attr_accessor :trial
1492
+ sig {
1493
+ params(discounts: T::Array[::Stripe::QuoteService::UpdateParams::Line::Action::SetItem::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::QuoteService::UpdateParams::Line::Action::SetItem::Trial).void
1494
+ }
1495
+ def initialize(
1496
+ discounts: nil,
1497
+ metadata: nil,
1498
+ price: nil,
1499
+ quantity: nil,
1500
+ tax_rates: nil,
1501
+ trial: nil
1502
+ ); end
1503
+ end
1504
+ # Details for the `add_discount` type.
1505
+ sig { returns(::Stripe::QuoteService::UpdateParams::Line::Action::AddDiscount) }
1506
+ attr_accessor :add_discount
1507
+ # Details for the `add_item` type.
1508
+ sig { returns(::Stripe::QuoteService::UpdateParams::Line::Action::AddItem) }
1509
+ attr_accessor :add_item
1510
+ # Details for the `add_metadata` type: specify a hash of key-value pairs.
1511
+ sig { returns(T::Hash[String, String]) }
1512
+ attr_accessor :add_metadata
1513
+ # Details for the `remove_discount` type.
1514
+ sig { returns(::Stripe::QuoteService::UpdateParams::Line::Action::RemoveDiscount) }
1515
+ attr_accessor :remove_discount
1516
+ # Details for the `remove_item` type.
1517
+ sig { returns(::Stripe::QuoteService::UpdateParams::Line::Action::RemoveItem) }
1518
+ attr_accessor :remove_item
1519
+ # Details for the `remove_metadata` type: specify an array of metadata keys.
1520
+ sig { returns(T::Array[String]) }
1521
+ attr_accessor :remove_metadata
1522
+ # Details for the `set_discounts` type.
1523
+ sig { returns(T::Array[::Stripe::QuoteService::UpdateParams::Line::Action::SetDiscount]) }
1524
+ attr_accessor :set_discounts
1525
+ # Details for the `set_items` type.
1526
+ sig { returns(T::Array[::Stripe::QuoteService::UpdateParams::Line::Action::SetItem]) }
1527
+ attr_accessor :set_items
1528
+ # Details for the `set_metadata` type: specify an array of key-value pairs.
1529
+ sig { returns(T.nilable(T::Hash[String, String])) }
1530
+ attr_accessor :set_metadata
1531
+ # The type of action the quote line performs.
1532
+ sig { returns(String) }
1533
+ attr_accessor :type
1534
+ sig {
1535
+ params(add_discount: ::Stripe::QuoteService::UpdateParams::Line::Action::AddDiscount, add_item: ::Stripe::QuoteService::UpdateParams::Line::Action::AddItem, add_metadata: T::Hash[String, String], remove_discount: ::Stripe::QuoteService::UpdateParams::Line::Action::RemoveDiscount, remove_item: ::Stripe::QuoteService::UpdateParams::Line::Action::RemoveItem, remove_metadata: T::Array[String], set_discounts: T::Array[::Stripe::QuoteService::UpdateParams::Line::Action::SetDiscount], set_items: T::Array[::Stripe::QuoteService::UpdateParams::Line::Action::SetItem], set_metadata: T.nilable(T::Hash[String, String]), type: String).void
1536
+ }
1537
+ def initialize(
1538
+ add_discount: nil,
1539
+ add_item: nil,
1540
+ add_metadata: nil,
1541
+ remove_discount: nil,
1542
+ remove_item: nil,
1543
+ remove_metadata: nil,
1544
+ set_discounts: nil,
1545
+ set_items: nil,
1546
+ set_metadata: nil,
1547
+ type: nil
1548
+ ); end
1549
+ end
1550
+ class AppliesTo < Stripe::RequestParams
1551
+ # 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.
1552
+ sig { returns(String) }
1553
+ attr_accessor :new_reference
1554
+ # The ID of the schedule the line applies to.
1555
+ sig { returns(String) }
1556
+ attr_accessor :subscription_schedule
1557
+ # Describes whether the quote line is affecting a new schedule or an existing schedule.
1558
+ sig { returns(String) }
1559
+ attr_accessor :type
1560
+ sig { params(new_reference: String, subscription_schedule: String, type: String).void }
1561
+ def initialize(new_reference: nil, subscription_schedule: nil, type: nil); end
1562
+ end
1563
+ class CancelSubscriptionSchedule < Stripe::RequestParams
1564
+ # Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
1565
+ sig { returns(String) }
1566
+ attr_accessor :cancel_at
1567
+ # 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`.
1568
+ sig { returns(T::Boolean) }
1569
+ attr_accessor :invoice_now
1570
+ # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
1571
+ sig { returns(T::Boolean) }
1572
+ attr_accessor :prorate
1573
+ sig { params(cancel_at: String, invoice_now: T::Boolean, prorate: T::Boolean).void }
1574
+ def initialize(cancel_at: nil, invoice_now: nil, prorate: nil); end
1575
+ end
1576
+ class EndsAt < Stripe::RequestParams
1577
+ class DiscountEnd < Stripe::RequestParams
1578
+ # The ID of a specific discount.
1579
+ sig { returns(String) }
1580
+ attr_accessor :discount
1581
+ sig { params(discount: String).void }
1582
+ def initialize(discount: nil); end
1583
+ end
1584
+ class Duration < Stripe::RequestParams
1585
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1586
+ sig { returns(String) }
1587
+ attr_accessor :interval
1588
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1589
+ sig { returns(Integer) }
1590
+ attr_accessor :interval_count
1591
+ sig { params(interval: String, interval_count: Integer).void }
1592
+ def initialize(interval: nil, interval_count: nil); end
1593
+ end
1594
+ # Use the `end` time of a given discount.
1595
+ sig { returns(::Stripe::QuoteService::UpdateParams::Line::EndsAt::DiscountEnd) }
1596
+ attr_accessor :discount_end
1597
+ # Time span for the quote line starting from the `starts_at` date.
1598
+ sig { returns(::Stripe::QuoteService::UpdateParams::Line::EndsAt::Duration) }
1599
+ attr_accessor :duration
1600
+ # A precise Unix timestamp.
1601
+ sig { returns(Integer) }
1602
+ attr_accessor :timestamp
1603
+ # Select a way to pass in `ends_at`.
1604
+ sig { returns(String) }
1605
+ attr_accessor :type
1606
+ sig {
1607
+ params(discount_end: ::Stripe::QuoteService::UpdateParams::Line::EndsAt::DiscountEnd, duration: ::Stripe::QuoteService::UpdateParams::Line::EndsAt::Duration, timestamp: Integer, type: String).void
1608
+ }
1609
+ def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil); end
1610
+ end
1611
+ class SetPauseCollection < Stripe::RequestParams
1612
+ class Set < Stripe::RequestParams
1613
+ # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
1614
+ sig { returns(String) }
1615
+ attr_accessor :behavior
1616
+ sig { params(behavior: String).void }
1617
+ def initialize(behavior: nil); end
1618
+ end
1619
+ # Details of the pause_collection behavior to apply to the amendment.
1620
+ sig { returns(::Stripe::QuoteService::UpdateParams::Line::SetPauseCollection::Set) }
1621
+ attr_accessor :set
1622
+ # Determines the type of the pause_collection amendment.
1623
+ sig { returns(String) }
1624
+ attr_accessor :type
1625
+ sig {
1626
+ params(set: ::Stripe::QuoteService::UpdateParams::Line::SetPauseCollection::Set, type: String).void
1627
+ }
1628
+ def initialize(set: nil, type: nil); end
1629
+ end
1630
+ class StartsAt < Stripe::RequestParams
1631
+ class DiscountEnd < Stripe::RequestParams
1632
+ # The ID of a specific discount.
1633
+ sig { returns(String) }
1634
+ attr_accessor :discount
1635
+ sig { params(discount: String).void }
1636
+ def initialize(discount: nil); end
1637
+ end
1638
+ class LineEndsAt < Stripe::RequestParams
1639
+ # The ID of a quote line.
1640
+ sig { returns(String) }
1641
+ attr_accessor :id
1642
+ # 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.
1643
+ sig { returns(Integer) }
1644
+ attr_accessor :index
1645
+ sig { params(id: String, index: Integer).void }
1646
+ def initialize(id: nil, index: nil); end
1647
+ end
1648
+ # Use the `end` time of a given discount.
1649
+ sig { returns(::Stripe::QuoteService::UpdateParams::Line::StartsAt::DiscountEnd) }
1650
+ attr_accessor :discount_end
1651
+ # The timestamp the given line ends at.
1652
+ sig { returns(::Stripe::QuoteService::UpdateParams::Line::StartsAt::LineEndsAt) }
1653
+ attr_accessor :line_ends_at
1654
+ # A precise Unix timestamp.
1655
+ sig { returns(Integer) }
1656
+ attr_accessor :timestamp
1657
+ # Select a way to pass in `starts_at`.
1658
+ sig { returns(String) }
1659
+ attr_accessor :type
1660
+ sig {
1661
+ params(discount_end: ::Stripe::QuoteService::UpdateParams::Line::StartsAt::DiscountEnd, line_ends_at: ::Stripe::QuoteService::UpdateParams::Line::StartsAt::LineEndsAt, timestamp: Integer, type: String).void
1662
+ }
1663
+ def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil); end
1664
+ end
1665
+ class TrialSettings < Stripe::RequestParams
1666
+ class EndBehavior < Stripe::RequestParams
1667
+ # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
1668
+ sig { returns(String) }
1669
+ attr_accessor :prorate_up_front
1670
+ sig { params(prorate_up_front: String).void }
1671
+ def initialize(prorate_up_front: nil); end
1672
+ end
1673
+ # Defines how the subscription should behave when a trial ends.
1674
+ sig { returns(::Stripe::QuoteService::UpdateParams::Line::TrialSettings::EndBehavior) }
1675
+ attr_accessor :end_behavior
1676
+ sig {
1677
+ params(end_behavior: ::Stripe::QuoteService::UpdateParams::Line::TrialSettings::EndBehavior).void
1678
+ }
1679
+ def initialize(end_behavior: nil); end
1680
+ end
1681
+ # An array of operations the quote line performs.
1682
+ sig { returns(T::Array[::Stripe::QuoteService::UpdateParams::Line::Action]) }
1683
+ attr_accessor :actions
1684
+ # Details to identify the subscription schedule the quote line applies to.
1685
+ sig { returns(::Stripe::QuoteService::UpdateParams::Line::AppliesTo) }
1686
+ attr_accessor :applies_to
1687
+ # 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.
1688
+ sig { returns(String) }
1689
+ attr_accessor :billing_cycle_anchor
1690
+ # 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.
1691
+ sig { returns(::Stripe::QuoteService::UpdateParams::Line::CancelSubscriptionSchedule) }
1692
+ attr_accessor :cancel_subscription_schedule
1693
+ # 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.
1694
+ sig { returns(::Stripe::QuoteService::UpdateParams::Line::EndsAt) }
1695
+ attr_accessor :ends_at
1696
+ # The ID of an existing line on the quote.
1697
+ sig { returns(String) }
1698
+ attr_accessor :id
1699
+ # 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.
1700
+ sig { returns(String) }
1701
+ attr_accessor :proration_behavior
1702
+ # Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
1703
+ sig { returns(::Stripe::QuoteService::UpdateParams::Line::SetPauseCollection) }
1704
+ attr_accessor :set_pause_collection
1705
+ # Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
1706
+ sig { returns(String) }
1707
+ attr_accessor :set_schedule_end
1708
+ # Details to identify the earliest timestamp where the proposed change should take effect.
1709
+ sig { returns(::Stripe::QuoteService::UpdateParams::Line::StartsAt) }
1710
+ attr_accessor :starts_at
1711
+ # Settings related to subscription trials.
1712
+ sig { returns(::Stripe::QuoteService::UpdateParams::Line::TrialSettings) }
1713
+ attr_accessor :trial_settings
1714
+ sig {
1715
+ params(actions: T::Array[::Stripe::QuoteService::UpdateParams::Line::Action], applies_to: ::Stripe::QuoteService::UpdateParams::Line::AppliesTo, billing_cycle_anchor: String, cancel_subscription_schedule: ::Stripe::QuoteService::UpdateParams::Line::CancelSubscriptionSchedule, ends_at: ::Stripe::QuoteService::UpdateParams::Line::EndsAt, id: String, proration_behavior: String, set_pause_collection: ::Stripe::QuoteService::UpdateParams::Line::SetPauseCollection, set_schedule_end: String, starts_at: ::Stripe::QuoteService::UpdateParams::Line::StartsAt, trial_settings: ::Stripe::QuoteService::UpdateParams::Line::TrialSettings).void
1716
+ }
1717
+ def initialize(
1718
+ actions: nil,
1719
+ applies_to: nil,
1720
+ billing_cycle_anchor: nil,
1721
+ cancel_subscription_schedule: nil,
1722
+ ends_at: nil,
1723
+ id: nil,
1724
+ proration_behavior: nil,
1725
+ set_pause_collection: nil,
1726
+ set_schedule_end: nil,
1727
+ starts_at: nil,
1728
+ trial_settings: nil
1729
+ ); end
1730
+ end
1731
+ class LineItem < Stripe::RequestParams
1732
+ class Discount < Stripe::RequestParams
1733
+ class DiscountEnd < Stripe::RequestParams
1734
+ class Duration < Stripe::RequestParams
1735
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1736
+ sig { returns(String) }
1737
+ attr_accessor :interval
1738
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1739
+ sig { returns(Integer) }
1740
+ attr_accessor :interval_count
1741
+ sig { params(interval: String, interval_count: Integer).void }
1742
+ def initialize(interval: nil, interval_count: nil); end
1743
+ end
1744
+ # Time span for the redeemed discount.
1745
+ sig {
1746
+ returns(::Stripe::QuoteService::UpdateParams::LineItem::Discount::DiscountEnd::Duration)
1747
+ }
1748
+ attr_accessor :duration
1749
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1750
+ sig { returns(Integer) }
1751
+ attr_accessor :timestamp
1752
+ # The type of calculation made to determine when the discount ends.
1753
+ sig { returns(String) }
1754
+ attr_accessor :type
1755
+ sig {
1756
+ params(duration: ::Stripe::QuoteService::UpdateParams::LineItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
1757
+ }
1758
+ def initialize(duration: nil, timestamp: nil, type: nil); end
1759
+ end
1760
+ # ID of the coupon to create a new discount for.
1761
+ sig { returns(String) }
1762
+ attr_accessor :coupon
1763
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1764
+ sig { returns(String) }
1765
+ attr_accessor :discount
1766
+ # Details to determine how long the discount should be applied for.
1767
+ sig { returns(::Stripe::QuoteService::UpdateParams::LineItem::Discount::DiscountEnd) }
1768
+ attr_accessor :discount_end
1769
+ # ID of the promotion code to create a new discount for.
1770
+ sig { returns(String) }
1771
+ attr_accessor :promotion_code
1772
+ sig {
1773
+ params(coupon: String, discount: String, discount_end: ::Stripe::QuoteService::UpdateParams::LineItem::Discount::DiscountEnd, promotion_code: String).void
1774
+ }
1775
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
1776
+ end
1777
+ class PriceData < Stripe::RequestParams
1778
+ class Recurring < Stripe::RequestParams
1779
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
1780
+ sig { returns(String) }
1781
+ attr_accessor :interval
1782
+ # 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).
1783
+ sig { returns(Integer) }
1784
+ attr_accessor :interval_count
1785
+ sig { params(interval: String, interval_count: Integer).void }
1786
+ def initialize(interval: nil, interval_count: nil); end
1787
+ end
1788
+ # 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).
1789
+ sig { returns(String) }
1790
+ attr_accessor :currency
1791
+ # The ID of the product that this price will belong to.
1792
+ sig { returns(String) }
1793
+ attr_accessor :product
1794
+ # The recurring components of a price such as `interval` and `interval_count`.
1795
+ sig { returns(::Stripe::QuoteService::UpdateParams::LineItem::PriceData::Recurring) }
1796
+ attr_accessor :recurring
1797
+ # 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.
1798
+ sig { returns(String) }
1799
+ attr_accessor :tax_behavior
1800
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
1801
+ sig { returns(Integer) }
1802
+ attr_accessor :unit_amount
1803
+ # 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.
1804
+ sig { returns(String) }
1805
+ attr_accessor :unit_amount_decimal
1806
+ sig {
1807
+ params(currency: String, product: String, recurring: ::Stripe::QuoteService::UpdateParams::LineItem::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
1808
+ }
1809
+ def initialize(
1810
+ currency: nil,
1811
+ product: nil,
1812
+ recurring: nil,
1813
+ tax_behavior: nil,
1814
+ unit_amount: nil,
1815
+ unit_amount_decimal: nil
1816
+ ); end
1817
+ end
1818
+ # The discounts applied to this line item.
1819
+ sig {
1820
+ returns(T.nilable(T::Array[::Stripe::QuoteService::UpdateParams::LineItem::Discount]))
1821
+ }
1822
+ attr_accessor :discounts
1823
+ # The ID of an existing line item on the quote.
1824
+ sig { returns(String) }
1825
+ attr_accessor :id
1826
+ # The ID of the price object. One of `price` or `price_data` is required.
1827
+ sig { returns(String) }
1828
+ attr_accessor :price
1829
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
1830
+ sig { returns(::Stripe::QuoteService::UpdateParams::LineItem::PriceData) }
1831
+ attr_accessor :price_data
1832
+ # The quantity of the line item.
1833
+ sig { returns(Integer) }
1834
+ attr_accessor :quantity
1835
+ # 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.
1836
+ sig { returns(T.nilable(T::Array[String])) }
1837
+ attr_accessor :tax_rates
1838
+ sig {
1839
+ params(discounts: T.nilable(T::Array[::Stripe::QuoteService::UpdateParams::LineItem::Discount]), id: String, price: String, price_data: ::Stripe::QuoteService::UpdateParams::LineItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void
1840
+ }
1841
+ def initialize(
1842
+ discounts: nil,
1843
+ id: nil,
1844
+ price: nil,
1845
+ price_data: nil,
1846
+ quantity: nil,
1847
+ tax_rates: nil
1848
+ ); end
1849
+ end
1850
+ class SubscriptionData < Stripe::RequestParams
1851
+ class BillOnAcceptance < Stripe::RequestParams
1852
+ class BillFrom < Stripe::RequestParams
1853
+ class LineStartsAt < Stripe::RequestParams
1854
+ # The ID of a quote line.
1855
+ sig { returns(String) }
1856
+ attr_accessor :id
1857
+ # 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.
1858
+ sig { returns(Integer) }
1859
+ attr_accessor :index
1860
+ sig { params(id: String, index: Integer).void }
1861
+ def initialize(id: nil, index: nil); end
1862
+ end
1863
+ # Details of a Quote line to start the bill period from.
1864
+ sig {
1865
+ returns(::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillFrom::LineStartsAt)
1866
+ }
1867
+ attr_accessor :line_starts_at
1868
+ # A precise Unix timestamp.
1869
+ sig { returns(Integer) }
1870
+ attr_accessor :timestamp
1871
+ # The type of method to specify the `bill_from` time.
1872
+ sig { returns(String) }
1873
+ attr_accessor :type
1874
+ sig {
1875
+ params(line_starts_at: ::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillFrom::LineStartsAt, timestamp: Integer, type: String).void
1876
+ }
1877
+ def initialize(line_starts_at: nil, timestamp: nil, type: nil); end
1878
+ end
1879
+ class BillUntil < Stripe::RequestParams
1880
+ class Duration < Stripe::RequestParams
1881
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1882
+ sig { returns(String) }
1883
+ attr_accessor :interval
1884
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1885
+ sig { returns(Integer) }
1886
+ attr_accessor :interval_count
1887
+ sig { params(interval: String, interval_count: Integer).void }
1888
+ def initialize(interval: nil, interval_count: nil); end
1889
+ end
1890
+ class LineEndsAt < Stripe::RequestParams
1891
+ # The ID of a quote line.
1892
+ sig { returns(String) }
1893
+ attr_accessor :id
1894
+ # 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.
1895
+ sig { returns(Integer) }
1896
+ attr_accessor :index
1897
+ sig { params(id: String, index: Integer).void }
1898
+ def initialize(id: nil, index: nil); end
1899
+ end
1900
+ # Details of the duration over which to bill.
1901
+ sig {
1902
+ returns(::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil::Duration)
1903
+ }
1904
+ attr_accessor :duration
1905
+ # Details of a Quote line item from which to bill until.
1906
+ sig {
1907
+ returns(::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil::LineEndsAt)
1908
+ }
1909
+ attr_accessor :line_ends_at
1910
+ # A precise Unix timestamp.
1911
+ sig { returns(Integer) }
1912
+ attr_accessor :timestamp
1913
+ # The type of method to specify the `bill_until` time.
1914
+ sig { returns(String) }
1915
+ attr_accessor :type
1916
+ sig {
1917
+ params(duration: ::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil::Duration, line_ends_at: ::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil::LineEndsAt, timestamp: Integer, type: String).void
1918
+ }
1919
+ def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil); end
1920
+ end
1921
+ # The start of the period to bill from when the Quote is accepted.
1922
+ sig {
1923
+ returns(::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillFrom)
1924
+ }
1925
+ attr_accessor :bill_from
1926
+ # The end of the period to bill until when the Quote is accepted.
1927
+ sig {
1928
+ returns(::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil)
1929
+ }
1930
+ attr_accessor :bill_until
1931
+ sig {
1932
+ params(bill_from: ::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillFrom, bill_until: ::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil).void
1933
+ }
1934
+ def initialize(bill_from: nil, bill_until: nil); end
1935
+ end
1936
+ class Prebilling < Stripe::RequestParams
1937
+ # This is used to determine the number of billing cycles to prebill.
1938
+ sig { returns(Integer) }
1939
+ attr_accessor :iterations
1940
+ sig { params(iterations: Integer).void }
1941
+ def initialize(iterations: nil); end
1942
+ end
1943
+ # Describes the period to bill for upon accepting the quote.
1944
+ sig {
1945
+ returns(T.nilable(::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance))
1946
+ }
1947
+ attr_accessor :bill_on_acceptance
1948
+ # 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.
1949
+ sig { returns(String) }
1950
+ attr_accessor :billing_behavior
1951
+ # When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
1952
+ sig { returns(T.nilable(String)) }
1953
+ attr_accessor :billing_cycle_anchor
1954
+ # 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.
1955
+ sig { returns(T.nilable(String)) }
1956
+ attr_accessor :description
1957
+ # 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.
1958
+ sig { returns(T.nilable(T.any(String, Integer))) }
1959
+ attr_accessor :effective_date
1960
+ # Behavior of the subscription schedule and underlying subscription when it ends.
1961
+ sig { returns(String) }
1962
+ attr_accessor :end_behavior
1963
+ # 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.
1964
+ sig { returns(T::Hash[String, String]) }
1965
+ attr_accessor :metadata
1966
+ # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
1967
+ sig {
1968
+ returns(T.nilable(::Stripe::QuoteService::UpdateParams::SubscriptionData::Prebilling))
1969
+ }
1970
+ attr_accessor :prebilling
1971
+ # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
1972
+ #
1973
+ # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
1974
+ #
1975
+ # 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`.
1976
+ #
1977
+ # Prorations can be disabled by passing `none`.
1978
+ sig { returns(String) }
1979
+ attr_accessor :proration_behavior
1980
+ # Integer representing the number of trial period days before the customer is charged for the first time.
1981
+ sig { returns(T.nilable(Integer)) }
1982
+ attr_accessor :trial_period_days
1983
+ sig {
1984
+ params(bill_on_acceptance: T.nilable(::Stripe::QuoteService::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::QuoteService::UpdateParams::SubscriptionData::Prebilling), proration_behavior: String, trial_period_days: T.nilable(Integer)).void
1985
+ }
1986
+ def initialize(
1987
+ bill_on_acceptance: nil,
1988
+ billing_behavior: nil,
1989
+ billing_cycle_anchor: nil,
1990
+ description: nil,
1991
+ effective_date: nil,
1992
+ end_behavior: nil,
1993
+ metadata: nil,
1994
+ prebilling: nil,
1995
+ proration_behavior: nil,
1996
+ trial_period_days: nil
1997
+ ); end
1998
+ end
1999
+ class SubscriptionDataOverride < Stripe::RequestParams
2000
+ class AppliesTo < Stripe::RequestParams
2001
+ # 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.
2002
+ sig { returns(String) }
2003
+ attr_accessor :new_reference
2004
+ # The ID of the schedule the line applies to.
2005
+ sig { returns(String) }
2006
+ attr_accessor :subscription_schedule
2007
+ # Describes whether the quote line is affecting a new schedule or an existing schedule.
2008
+ sig { returns(String) }
2009
+ attr_accessor :type
2010
+ sig { params(new_reference: String, subscription_schedule: String, type: String).void }
2011
+ def initialize(new_reference: nil, subscription_schedule: nil, type: nil); end
2012
+ end
2013
+ class BillOnAcceptance < Stripe::RequestParams
2014
+ class BillFrom < Stripe::RequestParams
2015
+ class LineStartsAt < Stripe::RequestParams
2016
+ # The ID of a quote line.
2017
+ sig { returns(String) }
2018
+ attr_accessor :id
2019
+ # 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.
2020
+ sig { returns(Integer) }
2021
+ attr_accessor :index
2022
+ sig { params(id: String, index: Integer).void }
2023
+ def initialize(id: nil, index: nil); end
2024
+ end
2025
+ # Details of a Quote line to start the bill period from.
2026
+ sig {
2027
+ returns(::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom::LineStartsAt)
2028
+ }
2029
+ attr_accessor :line_starts_at
2030
+ # A precise Unix timestamp.
2031
+ sig { returns(Integer) }
2032
+ attr_accessor :timestamp
2033
+ # The type of method to specify the `bill_from` time.
2034
+ sig { returns(String) }
2035
+ attr_accessor :type
2036
+ sig {
2037
+ params(line_starts_at: ::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom::LineStartsAt, timestamp: Integer, type: String).void
2038
+ }
2039
+ def initialize(line_starts_at: nil, timestamp: nil, type: nil); end
2040
+ end
2041
+ class BillUntil < Stripe::RequestParams
2042
+ class Duration < Stripe::RequestParams
2043
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2044
+ sig { returns(String) }
2045
+ attr_accessor :interval
2046
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2047
+ sig { returns(Integer) }
2048
+ attr_accessor :interval_count
2049
+ sig { params(interval: String, interval_count: Integer).void }
2050
+ def initialize(interval: nil, interval_count: nil); end
2051
+ end
2052
+ class LineEndsAt < Stripe::RequestParams
2053
+ # The ID of a quote line.
2054
+ sig { returns(String) }
2055
+ attr_accessor :id
2056
+ # 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.
2057
+ sig { returns(Integer) }
2058
+ attr_accessor :index
2059
+ sig { params(id: String, index: Integer).void }
2060
+ def initialize(id: nil, index: nil); end
2061
+ end
2062
+ # Details of the duration over which to bill.
2063
+ sig {
2064
+ returns(::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::Duration)
2065
+ }
2066
+ attr_accessor :duration
2067
+ # Details of a Quote line item from which to bill until.
2068
+ sig {
2069
+ returns(::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::LineEndsAt)
2070
+ }
2071
+ attr_accessor :line_ends_at
2072
+ # A precise Unix timestamp.
2073
+ sig { returns(Integer) }
2074
+ attr_accessor :timestamp
2075
+ # The type of method to specify the `bill_until` time.
2076
+ sig { returns(String) }
2077
+ attr_accessor :type
2078
+ sig {
2079
+ params(duration: ::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::Duration, line_ends_at: ::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::LineEndsAt, timestamp: Integer, type: String).void
2080
+ }
2081
+ def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil); end
2082
+ end
2083
+ # The start of the period to bill from when the Quote is accepted.
2084
+ sig {
2085
+ returns(::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom)
2086
+ }
2087
+ attr_accessor :bill_from
2088
+ # The end of the period to bill until when the Quote is accepted.
2089
+ sig {
2090
+ returns(::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil)
2091
+ }
2092
+ attr_accessor :bill_until
2093
+ sig {
2094
+ params(bill_from: ::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom, bill_until: ::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil).void
2095
+ }
2096
+ def initialize(bill_from: nil, bill_until: nil); end
2097
+ end
2098
+ # Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
2099
+ sig { returns(::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::AppliesTo) }
2100
+ attr_accessor :applies_to
2101
+ # Describes the period to bill for upon accepting the quote.
2102
+ sig {
2103
+ returns(T.nilable(::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance))
2104
+ }
2105
+ attr_accessor :bill_on_acceptance
2106
+ # 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.
2107
+ sig { returns(String) }
2108
+ attr_accessor :billing_behavior
2109
+ # The customer the Subscription Data override applies to.
2110
+ sig { returns(String) }
2111
+ attr_accessor :customer
2112
+ # 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.
2113
+ sig { returns(T.nilable(String)) }
2114
+ attr_accessor :description
2115
+ # Behavior of the subscription schedule and underlying subscription when it ends.
2116
+ sig { returns(String) }
2117
+ attr_accessor :end_behavior
2118
+ # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
2119
+ #
2120
+ # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
2121
+ #
2122
+ # 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`.
2123
+ #
2124
+ # Prorations can be disabled by passing `none`.
2125
+ sig { returns(String) }
2126
+ attr_accessor :proration_behavior
2127
+ sig {
2128
+ params(applies_to: ::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::AppliesTo, bill_on_acceptance: T.nilable(::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance), billing_behavior: String, customer: String, description: T.nilable(String), end_behavior: String, proration_behavior: String).void
2129
+ }
2130
+ def initialize(
2131
+ applies_to: nil,
2132
+ bill_on_acceptance: nil,
2133
+ billing_behavior: nil,
2134
+ customer: nil,
2135
+ description: nil,
2136
+ end_behavior: nil,
2137
+ proration_behavior: nil
2138
+ ); end
2139
+ end
2140
+ class TransferData < Stripe::RequestParams
2141
+ # 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.
2142
+ sig { returns(Integer) }
2143
+ attr_accessor :amount
2144
+ # 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.
2145
+ sig { returns(Float) }
2146
+ attr_accessor :amount_percent
2147
+ # ID of an existing, connected Stripe account.
2148
+ sig { returns(String) }
2149
+ attr_accessor :destination
2150
+ sig { params(amount: Integer, amount_percent: Float, destination: String).void }
2151
+ def initialize(amount: nil, amount_percent: nil, destination: nil); end
2152
+ end
2153
+ # Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
2154
+ sig { returns(T::Boolean) }
2155
+ attr_accessor :allow_backdated_lines
2156
+ # 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.
2157
+ sig { returns(T.nilable(Integer)) }
2158
+ attr_accessor :application_fee_amount
2159
+ # 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.
2160
+ sig { returns(T.nilable(Float)) }
2161
+ attr_accessor :application_fee_percent
2162
+ # Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
2163
+ sig { returns(::Stripe::QuoteService::UpdateParams::AutomaticTax) }
2164
+ attr_accessor :automatic_tax
2165
+ # 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`.
2166
+ sig { returns(String) }
2167
+ attr_accessor :collection_method
2168
+ # The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
2169
+ sig { returns(String) }
2170
+ attr_accessor :customer
2171
+ # The tax rates that will apply to any line item that does not have `tax_rates` set.
2172
+ sig { returns(T.nilable(T::Array[String])) }
2173
+ attr_accessor :default_tax_rates
2174
+ # A description that will be displayed on the quote PDF.
2175
+ sig { returns(T.nilable(String)) }
2176
+ attr_accessor :description
2177
+ # The discounts applied to the quote.
2178
+ sig { returns(T.nilable(T::Array[::Stripe::QuoteService::UpdateParams::Discount])) }
2179
+ attr_accessor :discounts
2180
+ # Specifies which fields in the response should be expanded.
2181
+ sig { returns(T::Array[String]) }
2182
+ attr_accessor :expand
2183
+ # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
2184
+ sig { returns(Integer) }
2185
+ attr_accessor :expires_at
2186
+ # A footer that will be displayed on the quote PDF.
2187
+ sig { returns(T.nilable(String)) }
2188
+ attr_accessor :footer
2189
+ # A header that will be displayed on the quote PDF.
2190
+ sig { returns(T.nilable(String)) }
2191
+ attr_accessor :header
2192
+ # All invoices will be billed using the specified settings.
2193
+ sig { returns(::Stripe::QuoteService::UpdateParams::InvoiceSettings) }
2194
+ attr_accessor :invoice_settings
2195
+ # 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.
2196
+ sig { returns(T::Array[::Stripe::QuoteService::UpdateParams::LineItem]) }
2197
+ attr_accessor :line_items
2198
+ # 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.
2199
+ sig { returns(T::Array[::Stripe::QuoteService::UpdateParams::Line]) }
2200
+ attr_accessor :lines
2201
+ # 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`.
2202
+ sig { returns(T::Hash[String, String]) }
2203
+ attr_accessor :metadata
2204
+ # The account on behalf of which to charge.
2205
+ sig { returns(T.nilable(String)) }
2206
+ attr_accessor :on_behalf_of
2207
+ # 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.
2208
+ sig { returns(::Stripe::QuoteService::UpdateParams::SubscriptionData) }
2209
+ attr_accessor :subscription_data
2210
+ # List representing overrides for `subscription_data` configurations for specific subscription schedules.
2211
+ sig {
2212
+ returns(T.nilable(T::Array[::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride]))
2213
+ }
2214
+ attr_accessor :subscription_data_overrides
2215
+ # The data with which to automatically create a Transfer for each of the invoices.
2216
+ sig { returns(T.nilable(::Stripe::QuoteService::UpdateParams::TransferData)) }
2217
+ attr_accessor :transfer_data
2218
+ sig {
2219
+ params(allow_backdated_lines: T::Boolean, application_fee_amount: T.nilable(Integer), application_fee_percent: T.nilable(Float), automatic_tax: ::Stripe::QuoteService::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::QuoteService::UpdateParams::Discount]), expand: T::Array[String], expires_at: Integer, footer: T.nilable(String), header: T.nilable(String), invoice_settings: ::Stripe::QuoteService::UpdateParams::InvoiceSettings, line_items: T::Array[::Stripe::QuoteService::UpdateParams::LineItem], lines: T::Array[::Stripe::QuoteService::UpdateParams::Line], metadata: T::Hash[String, String], on_behalf_of: T.nilable(String), subscription_data: ::Stripe::QuoteService::UpdateParams::SubscriptionData, subscription_data_overrides: T.nilable(T::Array[::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride]), transfer_data: T.nilable(::Stripe::QuoteService::UpdateParams::TransferData)).void
2220
+ }
2221
+ def initialize(
2222
+ allow_backdated_lines: nil,
2223
+ application_fee_amount: nil,
2224
+ application_fee_percent: nil,
2225
+ automatic_tax: nil,
2226
+ collection_method: nil,
2227
+ customer: nil,
2228
+ default_tax_rates: nil,
2229
+ description: nil,
2230
+ discounts: nil,
2231
+ expand: nil,
2232
+ expires_at: nil,
2233
+ footer: nil,
2234
+ header: nil,
2235
+ invoice_settings: nil,
2236
+ line_items: nil,
2237
+ lines: nil,
2238
+ metadata: nil,
2239
+ on_behalf_of: nil,
2240
+ subscription_data: nil,
2241
+ subscription_data_overrides: nil,
2242
+ transfer_data: nil
2243
+ ); end
2244
+ end
2245
+ class AcceptParams < Stripe::RequestParams
2246
+ # Specifies which fields in the response should be expanded.
2247
+ sig { returns(T::Array[String]) }
2248
+ attr_accessor :expand
2249
+ sig { params(expand: T::Array[String]).void }
2250
+ def initialize(expand: nil); end
2251
+ end
2252
+ class CancelParams < Stripe::RequestParams
2253
+ # Specifies which fields in the response should be expanded.
2254
+ sig { returns(T::Array[String]) }
2255
+ attr_accessor :expand
2256
+ sig { params(expand: T::Array[String]).void }
2257
+ def initialize(expand: nil); end
2258
+ end
2259
+ class FinalizeQuoteParams < Stripe::RequestParams
2260
+ # Specifies which fields in the response should be expanded.
2261
+ sig { returns(T::Array[String]) }
2262
+ attr_accessor :expand
2263
+ # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
2264
+ sig { returns(Integer) }
2265
+ attr_accessor :expires_at
2266
+ sig { params(expand: T::Array[String], expires_at: Integer).void }
2267
+ def initialize(expand: nil, expires_at: nil); end
2268
+ end
2269
+ class MarkDraftParams < Stripe::RequestParams
2270
+ # Specifies which fields in the response should be expanded.
2271
+ sig { returns(T::Array[String]) }
2272
+ attr_accessor :expand
2273
+ sig { params(expand: T::Array[String]).void }
2274
+ def initialize(expand: nil); end
2275
+ end
2276
+ class MarkStaleParams < Stripe::RequestParams
2277
+ # Specifies which fields in the response should be expanded.
2278
+ sig { returns(T::Array[String]) }
2279
+ attr_accessor :expand
2280
+ # Reason the Quote is being marked stale.
2281
+ sig { returns(String) }
2282
+ attr_accessor :reason
2283
+ sig { params(expand: T::Array[String], reason: String).void }
2284
+ def initialize(expand: nil, reason: nil); end
2285
+ end
2286
+ class ReestimateParams < Stripe::RequestParams
2287
+ # Specifies which fields in the response should be expanded.
2288
+ sig { returns(T::Array[String]) }
2289
+ attr_accessor :expand
2290
+ sig { params(expand: T::Array[String]).void }
2291
+ def initialize(expand: nil); end
2292
+ end
2293
+ class PdfParams < Stripe::RequestParams
2294
+ # Specifies which fields in the response should be expanded.
2295
+ sig { returns(T::Array[String]) }
2296
+ attr_accessor :expand
2297
+ sig { params(expand: T::Array[String]).void }
2298
+ def initialize(expand: nil); end
2299
+ end
2300
+ class ListPreviewInvoiceLinesParams < Stripe::RequestParams
2301
+ # 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.
2302
+ sig { returns(String) }
2303
+ attr_accessor :ending_before
2304
+ # Specifies which fields in the response should be expanded.
2305
+ sig { returns(T::Array[String]) }
2306
+ attr_accessor :expand
2307
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
2308
+ sig { returns(Integer) }
2309
+ attr_accessor :limit
2310
+ # 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.
2311
+ sig { returns(String) }
2312
+ attr_accessor :starting_after
2313
+ sig {
2314
+ params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void
2315
+ }
2316
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
2317
+ end
2318
+ # Accepts the specified quote.
2319
+ sig {
2320
+ params(quote: String, params: T.any(::Stripe::QuoteService::AcceptParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
2321
+ }
2322
+ def accept(quote, params = {}, opts = {}); end
2323
+
2324
+ # Cancels the quote.
2325
+ sig {
2326
+ params(quote: String, params: T.any(::Stripe::QuoteService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
2327
+ }
2328
+ def cancel(quote, params = {}, opts = {}); end
2329
+
2330
+ # 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).
2331
+ sig {
2332
+ params(params: T.any(::Stripe::QuoteService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
2333
+ }
2334
+ def create(params = {}, opts = {}); end
2335
+
2336
+ # Finalizes the quote.
2337
+ sig {
2338
+ params(quote: String, params: T.any(::Stripe::QuoteService::FinalizeQuoteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
2339
+ }
2340
+ def finalize_quote(quote, params = {}, opts = {}); end
2341
+
2342
+ # Returns a list of your quotes.
2343
+ sig {
2344
+ params(params: T.any(::Stripe::QuoteService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
2345
+ }
2346
+ def list(params = {}, opts = {}); end
2347
+
2348
+ # Preview the invoice line items that would be generated by accepting the quote.
2349
+ sig {
2350
+ params(quote: String, preview_invoice: String, params: T.any(::Stripe::QuoteService::ListPreviewInvoiceLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
2351
+ }
2352
+ def list_preview_invoice_lines(quote, preview_invoice, params = {}, opts = {}); end
2353
+
2354
+ # Converts a stale quote to draft.
2355
+ sig {
2356
+ params(quote: String, params: T.any(::Stripe::QuoteService::MarkDraftParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
2357
+ }
2358
+ def mark_draft(quote, params = {}, opts = {}); end
2359
+
2360
+ # Converts a draft or open quote to stale.
2361
+ sig {
2362
+ params(quote: String, params: T.any(::Stripe::QuoteService::MarkStaleParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
2363
+ }
2364
+ def mark_stale(quote, params = {}, opts = {}); end
2365
+
2366
+ # Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
2367
+ sig {
2368
+ params(quote: String, params: T.any(::Stripe::QuoteService::PdfParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped, read_body_chunk_block: T.untyped).returns(T.untyped)
2369
+ }
2370
+ def pdf(quote, params = {}, opts = {}, &read_body_chunk_block); end
2371
+
2372
+ # Recompute the upcoming invoice estimate for the quote.
2373
+ sig {
2374
+ params(quote: String, params: T.any(::Stripe::QuoteService::ReestimateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
2375
+ }
2376
+ def reestimate(quote, params = {}, opts = {}); end
2377
+
2378
+ # Retrieves the quote with the given ID.
2379
+ sig {
2380
+ params(quote: String, params: T.any(::Stripe::QuoteService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
2381
+ }
2382
+ def retrieve(quote, params = {}, opts = {}); end
2383
+
2384
+ # A quote models prices and services for a customer.
2385
+ sig {
2386
+ params(quote: String, params: T.any(::Stripe::QuoteService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
2387
+ }
2388
+ def update(quote, params = {}, opts = {}); end
2389
+ end
2390
+ end