stripe 15.1.0.pre.beta.2 → 15.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (597) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +696 -1554
  3. data/OPENAPI_VERSION +1 -1
  4. data/README.md +6 -0
  5. data/VERSION +1 -1
  6. data/lib/stripe/api_requestor.rb +0 -28
  7. data/lib/stripe/api_version.rb +1 -1
  8. data/lib/stripe/errors.rb +0 -54
  9. data/lib/stripe/event_types.rb +1 -75
  10. data/lib/stripe/events/v1_billing_meter_error_report_triggered_event.rb +1 -1
  11. data/lib/stripe/events/v1_billing_meter_no_meter_found_event.rb +1 -1
  12. data/lib/stripe/events/{v2_core_account_including_identity_updated_event.rb → v2_core_event_destination_ping_event.rb} +3 -3
  13. data/lib/stripe/object_types.rb +0 -53
  14. data/lib/stripe/resources/account.rb +3 -655
  15. data/lib/stripe/resources/account_session.rb +1 -299
  16. data/lib/stripe/resources/billing/credit_balance_summary.rb +0 -2
  17. data/lib/stripe/resources/billing/credit_balance_transaction.rb +0 -4
  18. data/lib/stripe/resources/billing/credit_grant.rb +0 -10
  19. data/lib/stripe/resources/billing_portal/session.rb +0 -6
  20. data/lib/stripe/resources/card.rb +0 -2
  21. data/lib/stripe/resources/cash_balance.rb +0 -2
  22. data/lib/stripe/resources/charge.rb +0 -1470
  23. data/lib/stripe/resources/checkout/session.rb +3 -327
  24. data/lib/stripe/resources/confirmation_token.rb +3 -177
  25. data/lib/stripe/resources/coupon.rb +1 -30
  26. data/lib/stripe/resources/credit_note.rb +0 -10
  27. data/lib/stripe/resources/credit_note_line_item.rb +0 -9
  28. data/lib/stripe/resources/customer.rb +2 -4
  29. data/lib/stripe/resources/customer_balance_transaction.rb +0 -2
  30. data/lib/stripe/resources/customer_cash_balance_transaction.rb +0 -2
  31. data/lib/stripe/resources/customer_session.rb +1 -6
  32. data/lib/stripe/resources/discount.rb +0 -2
  33. data/lib/stripe/resources/event.rb +0 -31
  34. data/lib/stripe/resources/financial_connections/account.rb +1 -20
  35. data/lib/stripe/resources/financial_connections/session.rb +2 -62
  36. data/lib/stripe/resources/identity/verification_session.rb +0 -10
  37. data/lib/stripe/resources/invoice.rb +17 -1123
  38. data/lib/stripe/resources/invoice_item.rb +2 -78
  39. data/lib/stripe/resources/invoice_line_item.rb +1 -55
  40. data/lib/stripe/resources/invoice_payment.rb +53 -2
  41. data/lib/stripe/resources/issuing/cardholder.rb +1 -2
  42. data/lib/stripe/resources/issuing/transaction.rb +0 -6
  43. data/lib/stripe/resources/line_item.rb +0 -37
  44. data/lib/stripe/resources/mandate.rb +0 -24
  45. data/lib/stripe/resources/payment_intent.rb +331 -5153
  46. data/lib/stripe/resources/payment_method.rb +1 -196
  47. data/lib/stripe/resources/payment_method_configuration.rb +0 -295
  48. data/lib/stripe/resources/payout.rb +0 -6
  49. data/lib/stripe/resources/price.rb +0 -30
  50. data/lib/stripe/resources/product.rb +0 -59
  51. data/lib/stripe/resources/promotion_code.rb +0 -10
  52. data/lib/stripe/resources/quote.rb +6 -2040
  53. data/lib/stripe/resources/refund.rb +0 -9
  54. data/lib/stripe/resources/setup_attempt.rb +0 -21
  55. data/lib/stripe/resources/setup_intent.rb +9 -596
  56. data/lib/stripe/resources/source.rb +0 -29
  57. data/lib/stripe/resources/subscription.rb +11 -294
  58. data/lib/stripe/resources/subscription_item.rb +3 -84
  59. data/lib/stripe/resources/subscription_schedule.rb +10 -1007
  60. data/lib/stripe/resources/tax/calculation.rb +2 -2
  61. data/lib/stripe/resources/tax/registration.rb +60 -0
  62. data/lib/stripe/resources/tax/transaction.rb +1 -1
  63. data/lib/stripe/resources/tax_id.rb +4 -14
  64. data/lib/stripe/resources/terminal/reader.rb +0 -406
  65. data/lib/stripe/resources/transfer.rb +0 -6
  66. data/lib/stripe/resources/treasury/financial_account.rb +3 -22
  67. data/lib/stripe/resources/treasury/financial_account_features.rb +0 -2
  68. data/lib/stripe/resources/treasury/outbound_payment.rb +1 -4
  69. data/lib/stripe/resources/treasury/outbound_transfer.rb +0 -37
  70. data/lib/stripe/resources/treasury/received_credit.rb +1 -38
  71. data/lib/stripe/resources/treasury/received_debit.rb +1 -40
  72. data/lib/stripe/resources/v2/billing/meter_event.rb +2 -2
  73. data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +2 -2
  74. data/lib/stripe/resources/v2/billing/meter_event_session.rb +2 -2
  75. data/lib/stripe/resources/v2/event.rb +2 -2
  76. data/lib/stripe/resources/v2/event_destination.rb +2 -2
  77. data/lib/stripe/resources.rb +1 -90
  78. data/lib/stripe/services/account_external_account_service.rb +1 -1
  79. data/lib/stripe/services/account_service.rb +3 -564
  80. data/lib/stripe/services/account_session_service.rb +1 -269
  81. data/lib/stripe/services/billing/credit_balance_summary_service.rb +1 -4
  82. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +0 -4
  83. data/lib/stripe/services/billing/credit_grant_service.rb +0 -8
  84. data/lib/stripe/services/billing_portal/session_service.rb +0 -4
  85. data/lib/stripe/services/charge_service.rb +0 -1350
  86. data/lib/stripe/services/checkout/session_service.rb +2 -243
  87. data/lib/stripe/services/coupon_service.rb +1 -17
  88. data/lib/stripe/services/credit_note_service.rb +0 -4
  89. data/lib/stripe/services/customer_payment_method_service.rb +1 -1
  90. data/lib/stripe/services/customer_service.rb +1 -1
  91. data/lib/stripe/services/customer_session_service.rb +1 -4
  92. data/lib/stripe/services/customer_tax_id_service.rb +1 -1
  93. data/lib/stripe/services/financial_connections/account_service.rb +2 -7
  94. data/lib/stripe/services/financial_connections/session_service.rb +2 -34
  95. data/lib/stripe/services/financial_connections_service.rb +1 -2
  96. data/lib/stripe/services/identity/verification_session_service.rb +0 -8
  97. data/lib/stripe/services/invoice_item_service.rb +2 -74
  98. data/lib/stripe/services/invoice_line_item_service.rb +1 -33
  99. data/lib/stripe/services/invoice_payment_service.rb +83 -0
  100. data/lib/stripe/services/invoice_service.rb +16 -1052
  101. data/lib/stripe/services/issuing/cardholder_service.rb +1 -2
  102. data/lib/stripe/services/issuing/transaction_service.rb +0 -4
  103. data/lib/stripe/services/issuing_service.rb +1 -5
  104. data/lib/stripe/services/payment_intent_service.rb +283 -4656
  105. data/lib/stripe/services/payment_method_configuration_service.rb +0 -210
  106. data/lib/stripe/services/payment_method_service.rb +1 -126
  107. data/lib/stripe/services/payout_service.rb +0 -4
  108. data/lib/stripe/services/price_service.rb +0 -19
  109. data/lib/stripe/services/product_service.rb +0 -38
  110. data/lib/stripe/services/promotion_code_service.rb +0 -8
  111. data/lib/stripe/services/quote_service.rb +7 -1726
  112. data/lib/stripe/services/setup_intent_service.rb +9 -556
  113. data/lib/stripe/services/subscription_item_service.rb +3 -75
  114. data/lib/stripe/services/subscription_schedule_service.rb +10 -911
  115. data/lib/stripe/services/subscription_service.rb +10 -254
  116. data/lib/stripe/services/tax/calculation_service.rb +1 -1
  117. data/lib/stripe/services/tax/registration_service.rb +39 -0
  118. data/lib/stripe/services/tax_id_service.rb +3 -9
  119. data/lib/stripe/services/tax_service.rb +1 -3
  120. data/lib/stripe/services/terminal/reader_service.rb +0 -180
  121. data/lib/stripe/services/terminal_service.rb +1 -2
  122. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +3 -106
  123. data/lib/stripe/services/test_helpers/terminal/reader_service.rb +0 -43
  124. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +1 -25
  125. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +1 -25
  126. data/lib/stripe/services/transfer_service.rb +0 -4
  127. data/lib/stripe/services/treasury/financial_account_features_service.rb +1 -4
  128. data/lib/stripe/services/treasury/financial_account_service.rb +2 -16
  129. data/lib/stripe/services/treasury/outbound_payment_service.rb +1 -4
  130. data/lib/stripe/services/treasury/outbound_transfer_service.rb +0 -24
  131. data/lib/stripe/services/v1_services.rb +2 -12
  132. data/lib/stripe/services/v2/core_service.rb +1 -4
  133. data/lib/stripe/services/v2_services.rb +2 -4
  134. data/lib/stripe/services.rb +1 -54
  135. data/lib/stripe/stripe_configuration.rb +1 -3
  136. data/lib/stripe/stripe_object.rb +1 -1
  137. data/lib/stripe/util.rb +1 -7
  138. data/lib/stripe/version.rb +1 -1
  139. data/lib/stripe.rb +0 -53
  140. data/rbi/stripe/resources/account.rbi +4903 -0
  141. data/rbi/stripe/resources/account_link.rbi +74 -0
  142. data/rbi/stripe/resources/account_session.rbi +894 -0
  143. data/rbi/stripe/resources/apple_pay_domain.rbi +90 -0
  144. data/rbi/stripe/resources/application.rbi +20 -0
  145. data/rbi/stripe/resources/application_fee.rbi +118 -0
  146. data/rbi/stripe/resources/application_fee_refund.rbi +37 -0
  147. data/rbi/stripe/resources/apps/secret.rbi +195 -0
  148. data/rbi/stripe/resources/balance.rbi +180 -0
  149. data/rbi/stripe/resources/balance_transaction.rbi +144 -0
  150. data/rbi/stripe/resources/bank_account.rbi +127 -0
  151. data/rbi/stripe/resources/billing/alert.rbi +201 -0
  152. data/rbi/stripe/resources/billing/alert_triggered.rbi +28 -0
  153. data/rbi/stripe/resources/billing/credit_balance_summary.rbi +63 -0
  154. data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +147 -0
  155. data/rbi/stripe/resources/billing/credit_grant.rbi +291 -0
  156. data/rbi/stripe/resources/billing/meter.rbi +226 -0
  157. data/rbi/stripe/resources/billing/meter_event.rbi +64 -0
  158. data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +64 -0
  159. data/rbi/stripe/resources/billing/meter_event_summary.rbi +35 -0
  160. data/rbi/stripe/resources/billing_portal/configuration.rbi +645 -0
  161. data/rbi/stripe/resources/billing_portal/session.rbi +345 -0
  162. data/rbi/stripe/resources/capability.rbi +125 -0
  163. data/rbi/stripe/resources/card.rbi +125 -0
  164. data/rbi/stripe/resources/cash_balance.rbi +32 -0
  165. data/rbi/stripe/resources/charge.rbi +2057 -0
  166. data/rbi/stripe/resources/checkout/session.rbi +3988 -0
  167. data/rbi/stripe/resources/climate/order.rbi +245 -0
  168. data/rbi/stripe/resources/climate/product.rbi +75 -0
  169. data/rbi/stripe/resources/climate/supplier.rbi +72 -0
  170. data/rbi/stripe/resources/confirmation_token.rbi +1873 -0
  171. data/rbi/stripe/resources/connect_collection_transfer.rbi +26 -0
  172. data/rbi/stripe/resources/country_spec.rbi +85 -0
  173. data/rbi/stripe/resources/coupon.rbi +252 -0
  174. data/rbi/stripe/resources/credit_note.rbi +747 -0
  175. data/rbi/stripe/resources/credit_note_line_item.rbi +101 -0
  176. data/rbi/stripe/resources/customer.rbi +1009 -0
  177. data/rbi/stripe/resources/customer_balance_transaction.rbi +56 -0
  178. data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +151 -0
  179. data/rbi/stripe/resources/customer_session.rbi +200 -0
  180. data/rbi/stripe/resources/discount.rbi +53 -0
  181. data/rbi/stripe/resources/dispute.rbi +761 -0
  182. data/rbi/stripe/resources/entitlements/active_entitlement.rbi +58 -0
  183. data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +23 -0
  184. data/rbi/stripe/resources/entitlements/feature.rbi +117 -0
  185. data/rbi/stripe/resources/ephemeral_key.rbi +44 -0
  186. data/rbi/stripe/resources/event.rbi +149 -0
  187. data/rbi/stripe/resources/exchange_rate.rbi +66 -0
  188. data/rbi/stripe/resources/file.rbi +143 -0
  189. data/rbi/stripe/resources/file_link.rbi +141 -0
  190. data/rbi/stripe/resources/financial_connections/account.rbi +339 -0
  191. data/rbi/stripe/resources/financial_connections/account_owner.rbi +35 -0
  192. data/rbi/stripe/resources/financial_connections/account_ownership.rbi +23 -0
  193. data/rbi/stripe/resources/financial_connections/session.rbi +123 -0
  194. data/rbi/stripe/resources/financial_connections/transaction.rbi +124 -0
  195. data/rbi/stripe/resources/forwarding/request.rbi +216 -0
  196. data/rbi/stripe/resources/funding_instructions.rbi +437 -0
  197. data/rbi/stripe/resources/identity/verification_report.rbi +351 -0
  198. data/rbi/stripe/resources/identity/verification_session.rbi +517 -0
  199. data/rbi/stripe/resources/invoice.rbi +3736 -0
  200. data/rbi/stripe/resources/invoice_item.rbi +475 -0
  201. data/rbi/stripe/resources/invoice_line_item.rbi +432 -0
  202. data/rbi/stripe/resources/invoice_payment.rbi +114 -0
  203. data/rbi/stripe/resources/invoice_rendering_template.rbi +104 -0
  204. data/rbi/stripe/resources/issuing/authorization.rbi +1283 -0
  205. data/rbi/stripe/resources/issuing/card.rbi +741 -0
  206. data/rbi/stripe/resources/issuing/cardholder.rbi +744 -0
  207. data/rbi/stripe/resources/issuing/dispute.rbi +913 -0
  208. data/rbi/stripe/resources/issuing/personalization_design.rbi +338 -0
  209. data/rbi/stripe/resources/issuing/physical_bundle.rbi +79 -0
  210. data/rbi/stripe/resources/issuing/token.rbi +226 -0
  211. data/rbi/stripe/resources/issuing/transaction.rbi +1061 -0
  212. data/rbi/stripe/resources/line_item.rbi +72 -0
  213. data/rbi/stripe/resources/login_link.rbi +19 -0
  214. data/rbi/stripe/resources/mandate.rbi +187 -0
  215. data/rbi/stripe/resources/payment_intent.rbi +9795 -0
  216. data/rbi/stripe/resources/payment_link.rbi +1801 -0
  217. data/rbi/stripe/resources/payment_method.rbi +1831 -0
  218. data/rbi/stripe/resources/payment_method_configuration.rbi +3220 -0
  219. data/rbi/stripe/resources/payment_method_domain.rbi +228 -0
  220. data/rbi/stripe/resources/payout.rbi +300 -0
  221. data/rbi/stripe/resources/person.rbi +401 -0
  222. data/rbi/stripe/resources/plan.rbi +373 -0
  223. data/rbi/stripe/resources/price.rbi +694 -0
  224. data/rbi/stripe/resources/product.rbi +557 -0
  225. data/rbi/stripe/resources/product_feature.rbi +26 -0
  226. data/rbi/stripe/resources/promotion_code.rbi +261 -0
  227. data/rbi/stripe/resources/quote.rbi +1126 -0
  228. data/rbi/stripe/resources/radar/early_fraud_warning.rbi +98 -0
  229. data/rbi/stripe/resources/radar/value_list.rbi +170 -0
  230. data/rbi/stripe/resources/radar/value_list_item.rbi +131 -0
  231. data/rbi/stripe/resources/refund.rbi +519 -0
  232. data/rbi/stripe/resources/reporting/report_run.rbi +191 -0
  233. data/rbi/stripe/resources/reporting/report_type.rbi +57 -0
  234. data/rbi/stripe/resources/reserve_transaction.rbi +23 -0
  235. data/rbi/stripe/resources/reversal.rbi +51 -0
  236. data/rbi/stripe/resources/review.rbi +154 -0
  237. data/rbi/stripe/resources/setup_attempt.rbi +477 -0
  238. data/rbi/stripe/resources/setup_intent.rbi +3869 -0
  239. data/rbi/stripe/resources/shipping_rate.rbi +305 -0
  240. data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +75 -0
  241. data/rbi/stripe/resources/source.rbi +1496 -0
  242. data/rbi/stripe/resources/source_mandate_notification.rbi +77 -0
  243. data/rbi/stripe/resources/source_transaction.rbi +127 -0
  244. data/rbi/stripe/resources/subscription.rbi +1964 -0
  245. data/rbi/stripe/resources/subscription_item.rbi +370 -0
  246. data/rbi/stripe/resources/subscription_schedule.rbi +1495 -0
  247. data/rbi/stripe/resources/tax/calculation.rbi +474 -0
  248. data/rbi/stripe/resources/tax/calculation_line_item.rbi +88 -0
  249. data/rbi/stripe/resources/tax/registration.rbi +2713 -0
  250. data/rbi/stripe/resources/tax/settings.rbi +141 -0
  251. data/rbi/stripe/resources/tax/transaction.rbi +351 -0
  252. data/rbi/stripe/resources/tax/transaction_line_item.rbi +54 -0
  253. data/rbi/stripe/resources/tax_code.rbi +44 -0
  254. data/rbi/stripe/resources/tax_deducted_at_source.rbi +23 -0
  255. data/rbi/stripe/resources/tax_id.rbi +167 -0
  256. data/rbi/stripe/resources/tax_rate.rbi +239 -0
  257. data/rbi/stripe/resources/terminal/configuration.rbi +1388 -0
  258. data/rbi/stripe/resources/terminal/connection_token.rbi +37 -0
  259. data/rbi/stripe/resources/terminal/location.rbi +224 -0
  260. data/rbi/stripe/resources/terminal/reader.rbi +587 -0
  261. data/rbi/stripe/resources/test_helpers/test_clock.rbi +134 -0
  262. data/rbi/stripe/resources/token.rbi +1283 -0
  263. data/rbi/stripe/resources/topup.rbi +222 -0
  264. data/rbi/stripe/resources/transfer.rbi +199 -0
  265. data/rbi/stripe/resources/treasury/credit_reversal.rbi +119 -0
  266. data/rbi/stripe/resources/treasury/debit_reversal.rbi +131 -0
  267. data/rbi/stripe/resources/treasury/financial_account.rbi +865 -0
  268. data/rbi/stripe/resources/treasury/financial_account_features.rbi +260 -0
  269. data/rbi/stripe/resources/treasury/inbound_transfer.rbi +295 -0
  270. data/rbi/stripe/resources/treasury/outbound_payment.rbi +592 -0
  271. data/rbi/stripe/resources/treasury/outbound_transfer.rbi +431 -0
  272. data/rbi/stripe/resources/treasury/received_credit.rbi +302 -0
  273. data/rbi/stripe/resources/treasury/received_debit.rbi +256 -0
  274. data/rbi/stripe/resources/treasury/transaction.rbi +215 -0
  275. data/rbi/stripe/resources/treasury/transaction_entry.rbi +192 -0
  276. data/rbi/stripe/resources/v2/amount.rbi +14 -0
  277. data/rbi/stripe/resources/v2/billing/meter_event.rbi +37 -0
  278. data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +41 -0
  279. data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +31 -0
  280. data/rbi/stripe/resources/v2/event.rbi +48 -0
  281. data/rbi/stripe/resources/v2/event_destination.rbi +91 -0
  282. data/rbi/stripe/resources/webhook_endpoint.rbi +170 -0
  283. data/rbi/stripe/services/account_capability_service.rbi +51 -0
  284. data/{lib/stripe/services/external_account_service.rb → rbi/stripe/services/account_external_account_service.rbi} +124 -136
  285. data/rbi/stripe/services/account_link_service.rbi +58 -0
  286. data/rbi/stripe/services/account_login_link_service.rbi +22 -0
  287. data/rbi/stripe/services/account_person_service.rbi +1013 -0
  288. data/rbi/stripe/services/account_service.rbi +4189 -0
  289. data/rbi/stripe/services/account_session_service.rbi +572 -0
  290. data/rbi/stripe/services/apple_pay_domain_service.rbi +78 -0
  291. data/rbi/stripe/services/application_fee_refund_service.rbi +93 -0
  292. data/rbi/stripe/services/application_fee_service.rbi +78 -0
  293. data/rbi/stripe/services/apps/secret_service.rbi +151 -0
  294. data/rbi/stripe/services/apps_service.rbi +9 -0
  295. data/rbi/stripe/services/balance_service.rbi +21 -0
  296. data/rbi/stripe/services/balance_transaction_service.rbi +93 -0
  297. data/rbi/stripe/services/billing/alert_service.rbi +152 -0
  298. data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +68 -0
  299. data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +59 -0
  300. data/rbi/stripe/services/billing/credit_grant_service.rbi +211 -0
  301. data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +42 -0
  302. data/rbi/stripe/services/billing/meter_event_service.rbi +42 -0
  303. data/rbi/stripe/services/billing/meter_event_summary_service.rbi +54 -0
  304. data/rbi/stripe/services/billing/meter_service.rbi +163 -0
  305. data/rbi/stripe/services/billing_portal/configuration_service.rbi +511 -0
  306. data/rbi/stripe/services/billing_portal/session_service.rbi +204 -0
  307. data/rbi/stripe/services/billing_portal_service.rbi +10 -0
  308. data/rbi/stripe/services/billing_service.rbi +15 -0
  309. data/rbi/stripe/services/charge_service.rbi +448 -0
  310. data/rbi/stripe/services/checkout/session_line_item_service.rbi +33 -0
  311. data/rbi/stripe/services/checkout/session_service.rbi +2607 -0
  312. data/rbi/stripe/services/checkout_service.rbi +9 -0
  313. data/rbi/stripe/services/climate/order_service.rbi +142 -0
  314. data/{lib/stripe/services/financial_connections/institution_service.rb → rbi/stripe/services/climate/product_service.rbi} +25 -36
  315. data/{lib/stripe/services/privacy/redaction_job_validation_error_service.rb → rbi/stripe/services/climate/supplier_service.rbi} +25 -36
  316. data/rbi/stripe/services/climate_service.rbi +11 -0
  317. data/rbi/stripe/services/confirmation_token_service.rbi +20 -0
  318. data/rbi/stripe/services/country_spec_service.rbi +44 -0
  319. data/rbi/stripe/services/coupon_service.rbi +196 -0
  320. data/{lib/stripe/services/quote_preview_invoice_service.rb → rbi/stripe/services/credit_note_line_item_service.rbi} +16 -20
  321. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +167 -0
  322. data/rbi/stripe/services/credit_note_service.rbi +416 -0
  323. data/rbi/stripe/services/customer_balance_transaction_service.rbi +92 -0
  324. data/rbi/stripe/services/customer_cash_balance_service.rbi +45 -0
  325. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +44 -0
  326. data/rbi/stripe/services/customer_funding_instructions_service.rbi +59 -0
  327. data/rbi/stripe/services/customer_payment_method_service.rbi +57 -0
  328. data/rbi/stripe/services/customer_payment_source_service.rbi +232 -0
  329. data/rbi/stripe/services/customer_service.rbi +651 -0
  330. data/rbi/stripe/services/customer_session_service.rbi +116 -0
  331. data/rbi/stripe/services/customer_tax_id_service.rbi +72 -0
  332. data/rbi/stripe/services/dispute_service.rbi +424 -0
  333. data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +55 -0
  334. data/rbi/stripe/services/entitlements/feature_service.rbi +107 -0
  335. data/rbi/stripe/services/entitlements_service.rbi +10 -0
  336. data/rbi/stripe/services/ephemeral_key_service.rbi +53 -0
  337. data/rbi/stripe/services/event_service.rbi +83 -0
  338. data/rbi/stripe/services/exchange_rate_service.rbi +44 -0
  339. data/rbi/stripe/services/file_link_service.rbi +124 -0
  340. data/rbi/stripe/services/file_service.rbi +116 -0
  341. data/rbi/stripe/services/financial_connections/account_owner_service.rbi +42 -0
  342. data/rbi/stripe/services/financial_connections/account_service.rbi +133 -0
  343. data/rbi/stripe/services/financial_connections/session_service.rbi +88 -0
  344. data/rbi/stripe/services/financial_connections/transaction_service.rbi +92 -0
  345. data/rbi/stripe/services/financial_connections_service.rbi +11 -0
  346. data/rbi/stripe/services/forwarding/request_service.rbi +134 -0
  347. data/rbi/stripe/services/forwarding_service.rbi +9 -0
  348. data/rbi/stripe/services/identity/verification_report_service.rbi +87 -0
  349. data/rbi/stripe/services/identity/verification_session_service.rbi +323 -0
  350. data/rbi/stripe/services/identity_service.rbi +10 -0
  351. data/rbi/stripe/services/invoice_item_service.rbi +368 -0
  352. data/rbi/stripe/services/invoice_line_item_service.rbi +259 -0
  353. data/rbi/stripe/services/invoice_payment_service.rbi +71 -0
  354. data/rbi/stripe/services/invoice_rendering_template_service.rbi +82 -0
  355. data/rbi/stripe/services/invoice_service.rbi +2920 -0
  356. data/rbi/stripe/services/issuing/authorization_service.rbi +146 -0
  357. data/rbi/stripe/services/issuing/card_service.rbi +495 -0
  358. data/rbi/stripe/services/issuing/cardholder_service.rbi +587 -0
  359. data/rbi/stripe/services/issuing/dispute_service.rbi +707 -0
  360. data/rbi/stripe/services/issuing/personalization_design_service.rbi +243 -0
  361. data/rbi/stripe/services/issuing/physical_bundle_service.rbi +59 -0
  362. data/rbi/stripe/services/issuing/token_service.rbi +99 -0
  363. data/rbi/stripe/services/issuing/transaction_service.rbi +105 -0
  364. data/rbi/stripe/services/issuing_service.rbi +16 -0
  365. data/rbi/stripe/services/mandate_service.rbi +20 -0
  366. data/rbi/stripe/services/payment_intent_service.rbi +7819 -0
  367. data/{lib/stripe/services/payment_intent_amount_details_line_item_service.rb → rbi/stripe/services/payment_link_line_item_service.rbi} +16 -20
  368. data/rbi/stripe/services/payment_link_service.rbi +1352 -0
  369. data/rbi/stripe/services/payment_method_configuration_service.rbi +2255 -0
  370. data/rbi/stripe/services/payment_method_domain_service.rbi +112 -0
  371. data/rbi/stripe/services/payment_method_service.rbi +846 -0
  372. data/rbi/stripe/services/payout_service.rbi +205 -0
  373. data/rbi/stripe/services/plan_service.rbi +284 -0
  374. data/rbi/stripe/services/price_service.rbi +546 -0
  375. data/rbi/stripe/services/product_feature_service.rbi +69 -0
  376. data/rbi/stripe/services/product_service.rbi +479 -0
  377. data/rbi/stripe/services/promotion_code_service.rbi +214 -0
  378. data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +31 -0
  379. data/{lib/stripe/services/order_line_item_service.rb → rbi/stripe/services/quote_line_item_service.rbi} +16 -20
  380. data/rbi/stripe/services/quote_service.rbi +686 -0
  381. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +85 -0
  382. data/rbi/stripe/services/radar/value_list_item_service.rbi +111 -0
  383. data/rbi/stripe/services/radar/value_list_service.rbi +143 -0
  384. data/rbi/stripe/services/radar_service.rbi +11 -0
  385. data/rbi/stripe/services/refund_service.rbi +185 -0
  386. data/rbi/stripe/services/reporting/report_run_service.rbi +135 -0
  387. data/rbi/stripe/services/reporting/report_type_service.rbi +35 -0
  388. data/rbi/stripe/services/reporting_service.rbi +10 -0
  389. data/rbi/stripe/services/review_service.rbi +84 -0
  390. data/rbi/stripe/services/setup_attempt_service.rbi +65 -0
  391. data/rbi/stripe/services/setup_intent_service.rbi +3605 -0
  392. data/rbi/stripe/services/shipping_rate_service.rbi +241 -0
  393. data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +46 -0
  394. data/rbi/stripe/services/sigma_service.rbi +9 -0
  395. data/rbi/stripe/services/source_service.rbi +663 -0
  396. data/{lib/stripe/services/quote_line_service.rb → rbi/stripe/services/source_transaction_service.rbi} +16 -20
  397. data/rbi/stripe/services/subscription_item_service.rbi +324 -0
  398. data/rbi/stripe/services/subscription_schedule_service.rbi +1192 -0
  399. data/rbi/stripe/services/subscription_service.rbi +1596 -0
  400. data/rbi/stripe/services/tax/calculation_line_item_service.rbi +33 -0
  401. data/rbi/stripe/services/tax/calculation_service.rbi +230 -0
  402. data/rbi/stripe/services/tax/registration_service.rbi +1845 -0
  403. data/rbi/stripe/services/tax/settings_service.rbi +93 -0
  404. data/{lib/stripe/services/financial_connections/account_inferred_balance_service.rb → rbi/stripe/services/tax/transaction_line_item_service.rbi} +17 -21
  405. data/rbi/stripe/services/tax/transaction_service.rbi +146 -0
  406. data/rbi/stripe/services/tax_code_service.rbi +44 -0
  407. data/rbi/stripe/services/tax_id_service.rbi +112 -0
  408. data/rbi/stripe/services/tax_rate_service.rbi +185 -0
  409. data/rbi/stripe/services/tax_service.rbi +12 -0
  410. data/rbi/stripe/services/terminal/configuration_service.rbi +1120 -0
  411. data/rbi/stripe/services/terminal/connection_token_service.rbi +25 -0
  412. data/rbi/stripe/services/terminal/location_service.rbi +184 -0
  413. data/rbi/stripe/services/terminal/reader_service.rbi +344 -0
  414. data/rbi/stripe/services/terminal_service.rbi +12 -0
  415. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +805 -0
  416. data/rbi/stripe/services/test_helpers/customer_service.rbi +33 -0
  417. data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +848 -0
  418. data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +76 -0
  419. data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +69 -0
  420. data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +711 -0
  421. data/rbi/stripe/services/test_helpers/issuing_service.rbi +14 -0
  422. data/rbi/stripe/services/test_helpers/refund_service.rbi +22 -0
  423. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +62 -0
  424. data/rbi/stripe/services/test_helpers/terminal_service.rbi +11 -0
  425. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +92 -0
  426. data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +64 -0
  427. data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +125 -0
  428. data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +125 -0
  429. data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +87 -0
  430. data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +87 -0
  431. data/rbi/stripe/services/test_helpers/treasury_service.rbi +15 -0
  432. data/rbi/stripe/services/test_helpers_service.rbi +15 -0
  433. data/rbi/stripe/services/token_service.rbi +1257 -0
  434. data/rbi/stripe/services/topup_service.rbi +176 -0
  435. data/rbi/stripe/services/transfer_reversal_service.rbi +101 -0
  436. data/rbi/stripe/services/transfer_service.rbi +152 -0
  437. data/rbi/stripe/services/treasury/credit_reversal_service.rbi +84 -0
  438. data/rbi/stripe/services/treasury/debit_reversal_service.rbi +88 -0
  439. data/rbi/stripe/services/treasury/financial_account_features_service.rbi +198 -0
  440. data/rbi/stripe/services/treasury/financial_account_service.rbi +562 -0
  441. data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +117 -0
  442. data/rbi/stripe/services/treasury/outbound_payment_service.rbi +304 -0
  443. data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +157 -0
  444. data/rbi/stripe/services/treasury/received_credit_service.rbi +72 -0
  445. data/rbi/stripe/services/treasury/received_debit_service.rbi +59 -0
  446. data/rbi/stripe/services/treasury/transaction_entry_service.rbi +111 -0
  447. data/rbi/stripe/services/treasury/transaction_service.rbi +122 -0
  448. data/rbi/stripe/services/treasury_service.rbi +18 -0
  449. data/rbi/stripe/services/v1_services.rbi +77 -0
  450. data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +39 -0
  451. data/rbi/stripe/services/v2/billing/meter_event_service.rbi +42 -0
  452. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +20 -0
  453. data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +55 -0
  454. data/rbi/stripe/services/v2/billing_service.rbi +14 -0
  455. data/rbi/stripe/services/v2/core/event_destination_service.rbi +200 -0
  456. data/rbi/stripe/services/v2/core/event_service.rbi +38 -0
  457. data/rbi/stripe/services/v2/core_service.rbi +12 -0
  458. data/rbi/stripe/services/v2_services.rbi +10 -0
  459. data/rbi/stripe/services/webhook_endpoint_service.rbi +131 -0
  460. data/stripe.gemspec +1 -4
  461. metadata +326 -149
  462. data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +0 -23
  463. data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +0 -21
  464. data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +0 -23
  465. data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +0 -21
  466. data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +0 -23
  467. data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +0 -21
  468. data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +0 -21
  469. data/lib/stripe/events/v2_core_account_link_completed_event.rb +0 -13
  470. data/lib/stripe/events/v2_core_account_person_created_event.rb +0 -23
  471. data/lib/stripe/events/v2_core_account_person_deleted_event.rb +0 -23
  472. data/lib/stripe/events/v2_core_account_person_updated_event.rb +0 -23
  473. data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +0 -21
  474. data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +0 -21
  475. data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +0 -21
  476. data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +0 -23
  477. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +0 -21
  478. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +0 -21
  479. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +0 -21
  480. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +0 -21
  481. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +0 -21
  482. data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +0 -21
  483. data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +0 -21
  484. data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +0 -21
  485. data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +0 -21
  486. data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +0 -21
  487. data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +0 -21
  488. data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +0 -21
  489. data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +0 -21
  490. data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +0 -21
  491. data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +0 -21
  492. data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +0 -23
  493. data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +0 -21
  494. data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +0 -21
  495. data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +0 -21
  496. data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +0 -21
  497. data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +0 -21
  498. data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +0 -21
  499. data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +0 -21
  500. data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +0 -21
  501. data/lib/stripe/resources/account_notice.rb +0 -123
  502. data/lib/stripe/resources/balance_settings.rb +0 -105
  503. data/lib/stripe/resources/billing/meter_error_report.rb +0 -59
  504. data/lib/stripe/resources/capital/financing_offer.rb +0 -179
  505. data/lib/stripe/resources/capital/financing_summary.rb +0 -55
  506. data/lib/stripe/resources/capital/financing_transaction.rb +0 -114
  507. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -27
  508. data/lib/stripe/resources/financial_connections/institution.rb +0 -90
  509. data/lib/stripe/resources/fx_quote.rb +0 -184
  510. data/lib/stripe/resources/gift_cards/card.rb +0 -208
  511. data/lib/stripe/resources/gift_cards/transaction.rb +0 -272
  512. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -602
  513. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +0 -82
  514. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +0 -86
  515. data/lib/stripe/resources/issuing/settlement.rb +0 -53
  516. data/lib/stripe/resources/margin.rb +0 -115
  517. data/lib/stripe/resources/order.rb +0 -2859
  518. data/lib/stripe/resources/payment_attempt_record.rb +0 -1078
  519. data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +0 -65
  520. data/lib/stripe/resources/payment_record.rb +0 -1607
  521. data/lib/stripe/resources/privacy/redaction_job.rb +0 -254
  522. data/lib/stripe/resources/privacy/redaction_job_root_objects.rb +0 -35
  523. data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +0 -25
  524. data/lib/stripe/resources/quote_line.rb +0 -274
  525. data/lib/stripe/resources/quote_preview_invoice.rb +0 -663
  526. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -337
  527. data/lib/stripe/resources/tax/association.rb +0 -89
  528. data/lib/stripe/resources/tax/form.rb +0 -211
  529. data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -31
  530. data/lib/stripe/resources/v2/core/account.rb +0 -1715
  531. data/lib/stripe/resources/v2/core/account_link.rb +0 -54
  532. data/lib/stripe/resources/v2/core/person.rb +0 -272
  533. data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +0 -72
  534. data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +0 -37
  535. data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +0 -18
  536. data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +0 -20
  537. data/lib/stripe/resources/v2/money_management/adjustment.rb +0 -49
  538. data/lib/stripe/resources/v2/money_management/financial_account.rb +0 -56
  539. data/lib/stripe/resources/v2/money_management/financial_address.rb +0 -66
  540. data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +0 -92
  541. data/lib/stripe/resources/v2/money_management/outbound_payment.rb +0 -127
  542. data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +0 -74
  543. data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +0 -43
  544. data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +0 -115
  545. data/lib/stripe/resources/v2/money_management/payout_method.rb +0 -73
  546. data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +0 -47
  547. data/lib/stripe/resources/v2/money_management/received_credit.rb +0 -134
  548. data/lib/stripe/resources/v2/money_management/received_debit.rb +0 -106
  549. data/lib/stripe/resources/v2/money_management/transaction.rb +0 -76
  550. data/lib/stripe/resources/v2/money_management/transaction_entry.rb +0 -66
  551. data/lib/stripe/services/account_notice_service.rb +0 -101
  552. data/lib/stripe/services/balance_settings_service.rb +0 -96
  553. data/lib/stripe/services/capital/financing_offer_service.rb +0 -112
  554. data/lib/stripe/services/capital/financing_summary_service.rb +0 -28
  555. data/lib/stripe/services/capital/financing_transaction_service.rb +0 -79
  556. data/lib/stripe/services/capital_service.rb +0 -15
  557. data/lib/stripe/services/fx_quote_service.rb +0 -123
  558. data/lib/stripe/services/gift_cards/card_service.rb +0 -170
  559. data/lib/stripe/services/gift_cards/transaction_service.rb +0 -209
  560. data/lib/stripe/services/gift_cards_service.rb +0 -14
  561. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +0 -504
  562. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +0 -66
  563. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +0 -83
  564. data/lib/stripe/services/margin_service.rb +0 -119
  565. data/lib/stripe/services/order_service.rb +0 -2268
  566. data/lib/stripe/services/payment_attempt_record_service.rb +0 -49
  567. data/lib/stripe/services/payment_record_service.rb +0 -542
  568. data/lib/stripe/services/privacy/redaction_job_service.rb +0 -231
  569. data/lib/stripe/services/privacy_service.rb +0 -13
  570. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +0 -35
  571. data/lib/stripe/services/tax/association_service.rb +0 -31
  572. data/lib/stripe/services/tax/form_service.rb +0 -100
  573. data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -28
  574. data/lib/stripe/services/v2/core/account_link_service.rb +0 -76
  575. data/lib/stripe/services/v2/core/account_service.rb +0 -4130
  576. data/lib/stripe/services/v2/core/accounts/person_service.rb +0 -1040
  577. data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +0 -135
  578. data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +0 -109
  579. data/lib/stripe/services/v2/core/vault_service.rb +0 -18
  580. data/lib/stripe/services/v2/money_management/adjustment_service.rb +0 -75
  581. data/lib/stripe/services/v2/money_management/financial_account_service.rb +0 -44
  582. data/lib/stripe/services/v2/money_management/financial_address_service.rb +0 -81
  583. data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +0 -126
  584. data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +0 -80
  585. data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +0 -202
  586. data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +0 -237
  587. data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +0 -174
  588. data/lib/stripe/services/v2/money_management/payout_method_service.rb +0 -95
  589. data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +0 -32
  590. data/lib/stripe/services/v2/money_management/received_credit_service.rb +0 -71
  591. data/lib/stripe/services/v2/money_management/received_debit_service.rb +0 -44
  592. data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +0 -70
  593. data/lib/stripe/services/v2/money_management/transaction_service.rb +0 -74
  594. data/lib/stripe/services/v2/money_management_service.rb +0 -31
  595. data/lib/stripe/services/v2/test_helper_service.rb +0 -15
  596. data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +0 -50
  597. data/rbi/stripe.rbi +0 -191592
@@ -7,7 +7,6 @@ module Stripe
7
7
  class Quote < APIResource
8
8
  extend Stripe::APIOperations::Create
9
9
  extend Stripe::APIOperations::List
10
- extend Stripe::APIOperations::NestedResource
11
10
  include Stripe::APIOperations::Save
12
11
 
13
12
  OBJECT_NAME = "quote"
@@ -15,9 +14,6 @@ module Stripe
15
14
  "quote"
16
15
  end
17
16
 
18
- nested_resource_class_methods :preview_invoice, operations: %i[list]
19
- nested_resource_class_methods :preview_subscription_schedule, operations: %i[list]
20
-
21
17
  class AutomaticTax < Stripe::StripeObject
22
18
  class Liability < Stripe::StripeObject
23
19
  # The connected account being referenced when `type` is `account`.
@@ -36,21 +32,6 @@ module Stripe
36
32
  end
37
33
 
38
34
  class Computed < Stripe::StripeObject
39
- class LastReestimationDetails < Stripe::StripeObject
40
- class Failed < Stripe::StripeObject
41
- # The failure `code` is more granular than the `reason` provided and may correspond to a Stripe error code. For automation errors, this field is one of: `reverse_api_failure`, `reverse_api_deadline_exceeeded`, or `reverse_api_response_validation_error`, which are Stripe error codes and map to the error `message` field.
42
- attr_reader :failure_code
43
- # Information derived from the `failure_code` or a freeform message that explains the error as a human-readable English string. For example, "margin ID is not a valid ID".
44
- attr_reader :message
45
- # The reason the reestimation failed.
46
- attr_reader :reason
47
- end
48
- # When `status` is `failed`, provides details about the quote reestimation failure.
49
- attr_reader :failed
50
- # Latest status of the reestimation.
51
- attr_reader :status
52
- end
53
-
54
35
  class Recurring < Stripe::StripeObject
55
36
  class TotalDetails < Stripe::StripeObject
56
37
  class Breakdown < Stripe::StripeObject
@@ -150,12 +131,8 @@ module Stripe
150
131
  # Attribute for field total_details
151
132
  attr_reader :total_details
152
133
  end
153
- # Details of the most recent reestimate of the quote's preview schedules and upcoming invoices, including the status of Stripe's calculation.
154
- attr_reader :last_reestimation_details
155
134
  # The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices.
156
135
  attr_reader :recurring
157
- # The time at which the quote's estimated schedules and upcoming invoices were generated.
158
- attr_reader :updated_at
159
136
  # Attribute for field upfront
160
137
  attr_reader :upfront
161
138
  end
@@ -180,68 +157,6 @@ module Stripe
180
157
  attr_reader :issuer
181
158
  end
182
159
 
183
- class StatusDetails < Stripe::StripeObject
184
- class Canceled < Stripe::StripeObject
185
- # The reason this quote was marked as canceled.
186
- attr_reader :reason
187
- # Time at which the quote was marked as canceled. Measured in seconds since the Unix epoch.
188
- attr_reader :transitioned_at
189
- end
190
-
191
- class Stale < Stripe::StripeObject
192
- class LastReason < Stripe::StripeObject
193
- class LinesInvalid < Stripe::StripeObject
194
- # The timestamp at which the lines were marked as invalid.
195
- attr_reader :invalid_at
196
- # The list of lines that became invalid at the given timestamp.
197
- attr_reader :lines
198
- end
199
-
200
- class SubscriptionChanged < Stripe::StripeObject
201
- # The subscription's state before the quote was marked as stale.
202
- attr_reader :previous_subscription
203
- end
204
-
205
- class SubscriptionScheduleChanged < Stripe::StripeObject
206
- # The subscription schedule's state before the quote was marked as stale.
207
- attr_reader :previous_subscription_schedule
208
- end
209
- # The ID of the line that is invalid if the stale reason type is `line_invalid`.
210
- attr_reader :line_invalid
211
- # The IDs of the lines that are invalid if the stale reason type is `lines_invalid`.
212
- attr_reader :lines_invalid
213
- # The user supplied mark stale reason.
214
- attr_reader :marked_stale
215
- # The ID of the subscription that was canceled.
216
- attr_reader :subscription_canceled
217
- # Attribute for field subscription_changed
218
- attr_reader :subscription_changed
219
- # The ID of the subscription that was expired.
220
- attr_reader :subscription_expired
221
- # The ID of the subscription schedule that was canceled.
222
- attr_reader :subscription_schedule_canceled
223
- # Attribute for field subscription_schedule_changed
224
- attr_reader :subscription_schedule_changed
225
- # The ID of the subscription schedule that was released.
226
- attr_reader :subscription_schedule_released
227
- # The reason the quote was marked as stale.
228
- attr_reader :type
229
- end
230
- # Time at which the quote expires. Measured in seconds since the Unix epoch.
231
- attr_reader :expires_at
232
- # The most recent reason this quote was marked as stale.
233
- attr_reader :last_reason
234
- # Time at which the stale reason was updated. Measured in seconds since the Unix epoch.
235
- attr_reader :last_updated_at
236
- # Time at which the quote was marked as stale. Measured in seconds since the Unix epoch.
237
- attr_reader :transitioned_at
238
- end
239
- # Attribute for field canceled
240
- attr_reader :canceled
241
- # Attribute for field stale
242
- attr_reader :stale
243
- end
244
-
245
160
  class StatusTransitions < Stripe::StripeObject
246
161
  # The time that the quote was accepted. Measured in seconds since Unix epoch.
247
162
  attr_reader :accepted_at
@@ -252,164 +167,16 @@ module Stripe
252
167
  end
253
168
 
254
169
  class SubscriptionData < Stripe::StripeObject
255
- class BillOnAcceptance < Stripe::StripeObject
256
- class BillFrom < Stripe::StripeObject
257
- class LineStartsAt < Stripe::StripeObject
258
- # Unique identifier for the object.
259
- attr_reader :id
260
- end
261
- # The materialized time.
262
- attr_reader :computed
263
- # The timestamp the given line starts at.
264
- attr_reader :line_starts_at
265
- # A precise Unix timestamp.
266
- attr_reader :timestamp
267
- # The type of method to specify the `bill_from` time.
268
- attr_reader :type
269
- end
270
-
271
- class BillUntil < Stripe::StripeObject
272
- class Duration < Stripe::StripeObject
273
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
274
- attr_reader :interval
275
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
276
- attr_reader :interval_count
277
- end
278
-
279
- class LineEndsAt < Stripe::StripeObject
280
- # Unique identifier for the object.
281
- attr_reader :id
282
- end
283
- # The materialized time.
284
- attr_reader :computed
285
- # Time span for the quote line starting from the `starts_at` date.
286
- attr_reader :duration
287
- # The timestamp the given line ends at.
288
- attr_reader :line_ends_at
289
- # A precise Unix timestamp.
290
- attr_reader :timestamp
291
- # The type of method to specify the `bill_until` time.
292
- attr_reader :type
293
- end
294
- # The start of the period to bill from when the Quote is accepted.
295
- attr_reader :bill_from
296
- # The end of the period to bill until when the Quote is accepted.
297
- attr_reader :bill_until
298
- end
299
-
300
- class Prebilling < Stripe::StripeObject
301
- # Attribute for field iterations
302
- attr_reader :iterations
303
- end
304
- # Describes the period to bill for upon accepting the quote.
305
- attr_reader :bill_on_acceptance
306
- # 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.
307
- attr_reader :billing_behavior
308
- # Whether the subscription will always start a new billing period when the quote is accepted.
309
- attr_reader :billing_cycle_anchor
310
170
  # 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.
311
171
  attr_reader :description
312
172
  # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch.
313
173
  attr_reader :effective_date
314
- # Behavior of the subscription schedule and underlying subscription when it ends.
315
- attr_reader :end_behavior
316
- # The id of the subscription that will be updated when the quote is accepted.
317
- attr_reader :from_subscription
318
174
  # 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.
319
175
  attr_reader :metadata
320
- # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
321
- attr_reader :prebilling
322
- # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
323
- attr_reader :proration_behavior
324
176
  # Integer representing the number of trial period days before the customer is charged for the first time.
325
177
  attr_reader :trial_period_days
326
178
  end
327
179
 
328
- class SubscriptionDataOverride < Stripe::StripeObject
329
- class AppliesTo < Stripe::StripeObject
330
- # 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.
331
- attr_reader :new_reference
332
- # The ID of the schedule the line applies to.
333
- attr_reader :subscription_schedule
334
- # Describes whether the quote line is affecting a new schedule or an existing schedule.
335
- attr_reader :type
336
- end
337
-
338
- class BillOnAcceptance < Stripe::StripeObject
339
- class BillFrom < Stripe::StripeObject
340
- class LineStartsAt < Stripe::StripeObject
341
- # Unique identifier for the object.
342
- attr_reader :id
343
- end
344
- # The materialized time.
345
- attr_reader :computed
346
- # The timestamp the given line starts at.
347
- attr_reader :line_starts_at
348
- # A precise Unix timestamp.
349
- attr_reader :timestamp
350
- # The type of method to specify the `bill_from` time.
351
- attr_reader :type
352
- end
353
-
354
- class BillUntil < Stripe::StripeObject
355
- class Duration < Stripe::StripeObject
356
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
357
- attr_reader :interval
358
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
359
- attr_reader :interval_count
360
- end
361
-
362
- class LineEndsAt < Stripe::StripeObject
363
- # Unique identifier for the object.
364
- attr_reader :id
365
- end
366
- # The materialized time.
367
- attr_reader :computed
368
- # Time span for the quote line starting from the `starts_at` date.
369
- attr_reader :duration
370
- # The timestamp the given line ends at.
371
- attr_reader :line_ends_at
372
- # A precise Unix timestamp.
373
- attr_reader :timestamp
374
- # The type of method to specify the `bill_until` time.
375
- attr_reader :type
376
- end
377
- # The start of the period to bill from when the Quote is accepted.
378
- attr_reader :bill_from
379
- # The end of the period to bill until when the Quote is accepted.
380
- attr_reader :bill_until
381
- end
382
- # Attribute for field applies_to
383
- attr_reader :applies_to
384
- # Describes the period to bill for upon accepting the quote.
385
- attr_reader :bill_on_acceptance
386
- # 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.
387
- attr_reader :billing_behavior
388
- # The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
389
- attr_reader :customer
390
- # 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.
391
- attr_reader :description
392
- # Behavior of the subscription schedule and underlying subscription when it ends.
393
- attr_reader :end_behavior
394
- # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
395
- attr_reader :proration_behavior
396
- end
397
-
398
- class SubscriptionSchedule < Stripe::StripeObject
399
- class AppliesTo < Stripe::StripeObject
400
- # 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.
401
- attr_reader :new_reference
402
- # The ID of the schedule the line applies to.
403
- attr_reader :subscription_schedule
404
- # Describes whether the quote line is affecting a new schedule or an existing schedule.
405
- attr_reader :type
406
- end
407
- # Attribute for field applies_to
408
- attr_reader :applies_to
409
- # The subscription schedule that was created or updated from this quote.
410
- attr_reader :subscription_schedule
411
- end
412
-
413
180
  class TotalDetails < Stripe::StripeObject
414
181
  class Breakdown < Stripe::StripeObject
415
182
  class Discount < Stripe::StripeObject
@@ -461,14 +228,10 @@ module Stripe
461
228
  class ListParams < Stripe::RequestParams
462
229
  # The ID of the customer whose quotes will be retrieved.
463
230
  attr_accessor :customer
464
- # The ID of the account whose quotes will be retrieved.
465
- attr_accessor :customer_account
466
231
  # 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.
467
232
  attr_accessor :ending_before
468
233
  # Specifies which fields in the response should be expanded.
469
234
  attr_accessor :expand
470
- # The subscription which the quote updates.
471
- attr_accessor :from_subscription
472
235
  # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
473
236
  attr_accessor :limit
474
237
  # 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.
@@ -480,20 +243,16 @@ module Stripe
480
243
 
481
244
  def initialize(
482
245
  customer: nil,
483
- customer_account: nil,
484
246
  ending_before: nil,
485
247
  expand: nil,
486
- from_subscription: nil,
487
248
  limit: nil,
488
249
  starting_after: nil,
489
250
  status: nil,
490
251
  test_clock: nil
491
252
  )
492
253
  @customer = customer
493
- @customer_account = customer_account
494
254
  @ending_before = ending_before
495
255
  @expand = expand
496
- @from_subscription = from_subscription
497
256
  @limit = limit
498
257
  @starting_after = starting_after
499
258
  @status = status
@@ -526,44 +285,16 @@ module Stripe
526
285
  end
527
286
 
528
287
  class Discount < Stripe::RequestParams
529
- class DiscountEnd < Stripe::RequestParams
530
- class Duration < Stripe::RequestParams
531
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
532
- attr_accessor :interval
533
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
534
- attr_accessor :interval_count
535
-
536
- def initialize(interval: nil, interval_count: nil)
537
- @interval = interval
538
- @interval_count = interval_count
539
- end
540
- end
541
- # Time span for the redeemed discount.
542
- attr_accessor :duration
543
- # A precise Unix timestamp for the discount to end. Must be in the future.
544
- attr_accessor :timestamp
545
- # The type of calculation made to determine when the discount ends.
546
- attr_accessor :type
547
-
548
- def initialize(duration: nil, timestamp: nil, type: nil)
549
- @duration = duration
550
- @timestamp = timestamp
551
- @type = type
552
- end
553
- end
554
288
  # ID of the coupon to create a new discount for.
555
289
  attr_accessor :coupon
556
290
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
557
291
  attr_accessor :discount
558
- # Details to determine how long the discount should be applied for.
559
- attr_accessor :discount_end
560
292
  # ID of the promotion code to create a new discount for.
561
293
  attr_accessor :promotion_code
562
294
 
563
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
295
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
564
296
  @coupon = coupon
565
297
  @discount = discount
566
- @discount_end = discount_end
567
298
  @promotion_code = promotion_code
568
299
  end
569
300
  end
@@ -603,522 +334,18 @@ module Stripe
603
334
  end
604
335
  end
605
336
 
606
- class Line < Stripe::RequestParams
607
- class Action < Stripe::RequestParams
608
- class AddDiscount < Stripe::RequestParams
609
- class DiscountEnd < Stripe::RequestParams
610
- # The type of calculation made to determine when the discount ends.
611
- attr_accessor :type
612
-
613
- def initialize(type: nil)
614
- @type = type
615
- end
616
- end
617
- # The coupon code to redeem.
618
- attr_accessor :coupon
619
- # An ID of an existing discount for a coupon that was already redeemed.
620
- attr_accessor :discount
621
- # Details to determine how long the discount should be applied for.
622
- attr_accessor :discount_end
623
- # 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.
624
- attr_accessor :index
625
- # The promotion code to redeem.
626
- attr_accessor :promotion_code
627
-
628
- def initialize(
629
- coupon: nil,
630
- discount: nil,
631
- discount_end: nil,
632
- index: nil,
633
- promotion_code: nil
634
- )
635
- @coupon = coupon
636
- @discount = discount
637
- @discount_end = discount_end
638
- @index = index
639
- @promotion_code = promotion_code
640
- end
641
- end
642
-
643
- class AddItem < Stripe::RequestParams
644
- class Discount < Stripe::RequestParams
645
- class DiscountEnd < Stripe::RequestParams
646
- class Duration < Stripe::RequestParams
647
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
648
- attr_accessor :interval
649
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
650
- attr_accessor :interval_count
651
-
652
- def initialize(interval: nil, interval_count: nil)
653
- @interval = interval
654
- @interval_count = interval_count
655
- end
656
- end
657
- # Time span for the redeemed discount.
658
- attr_accessor :duration
659
- # A precise Unix timestamp for the discount to end. Must be in the future.
660
- attr_accessor :timestamp
661
- # The type of calculation made to determine when the discount ends.
662
- attr_accessor :type
663
-
664
- def initialize(duration: nil, timestamp: nil, type: nil)
665
- @duration = duration
666
- @timestamp = timestamp
667
- @type = type
668
- end
669
- end
670
- # ID of the coupon to create a new discount for.
671
- attr_accessor :coupon
672
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
673
- attr_accessor :discount
674
- # Details to determine how long the discount should be applied for.
675
- attr_accessor :discount_end
676
- # ID of the promotion code to create a new discount for.
677
- attr_accessor :promotion_code
678
-
679
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
680
- @coupon = coupon
681
- @discount = discount
682
- @discount_end = discount_end
683
- @promotion_code = promotion_code
684
- end
685
- end
686
-
687
- class Trial < Stripe::RequestParams
688
- # 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.
689
- attr_accessor :converts_to
690
- # Determines the type of trial for this item.
691
- attr_accessor :type
692
-
693
- def initialize(converts_to: nil, type: nil)
694
- @converts_to = converts_to
695
- @type = type
696
- end
697
- end
698
- # The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
699
- attr_accessor :discounts
700
- # 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`.
701
- attr_accessor :metadata
702
- # The ID of the price object.
703
- attr_accessor :price
704
- # Quantity for this item.
705
- attr_accessor :quantity
706
- # 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`.
707
- attr_accessor :tax_rates
708
- # Options that configure the trial on the subscription item.
709
- attr_accessor :trial
710
-
711
- def initialize(
712
- discounts: nil,
713
- metadata: nil,
714
- price: nil,
715
- quantity: nil,
716
- tax_rates: nil,
717
- trial: nil
718
- )
719
- @discounts = discounts
720
- @metadata = metadata
721
- @price = price
722
- @quantity = quantity
723
- @tax_rates = tax_rates
724
- @trial = trial
725
- end
726
- end
727
-
728
- class RemoveDiscount < Stripe::RequestParams
729
- # The coupon code to remove from the `discounts` array.
730
- attr_accessor :coupon
731
- # The ID of a discount to remove from the `discounts` array.
732
- attr_accessor :discount
733
- # The ID of a promotion code to remove from the `discounts` array.
734
- attr_accessor :promotion_code
735
-
736
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
737
- @coupon = coupon
738
- @discount = discount
739
- @promotion_code = promotion_code
740
- end
741
- end
742
-
743
- class RemoveItem < Stripe::RequestParams
744
- # ID of a price to remove.
745
- attr_accessor :price
746
-
747
- def initialize(price: nil)
748
- @price = price
749
- end
750
- end
751
-
752
- class SetDiscount < Stripe::RequestParams
753
- # The coupon code to replace the `discounts` array with.
754
- attr_accessor :coupon
755
- # An ID of an existing discount to replace the `discounts` array with.
756
- attr_accessor :discount
757
- # An ID of an existing promotion code to replace the `discounts` array with.
758
- attr_accessor :promotion_code
759
-
760
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
761
- @coupon = coupon
762
- @discount = discount
763
- @promotion_code = promotion_code
764
- end
765
- end
766
-
767
- class SetItem < Stripe::RequestParams
768
- class Discount < Stripe::RequestParams
769
- class DiscountEnd < Stripe::RequestParams
770
- class Duration < Stripe::RequestParams
771
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
772
- attr_accessor :interval
773
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
774
- attr_accessor :interval_count
775
-
776
- def initialize(interval: nil, interval_count: nil)
777
- @interval = interval
778
- @interval_count = interval_count
779
- end
780
- end
781
- # Time span for the redeemed discount.
782
- attr_accessor :duration
783
- # A precise Unix timestamp for the discount to end. Must be in the future.
784
- attr_accessor :timestamp
785
- # The type of calculation made to determine when the discount ends.
786
- attr_accessor :type
787
-
788
- def initialize(duration: nil, timestamp: nil, type: nil)
789
- @duration = duration
790
- @timestamp = timestamp
791
- @type = type
792
- end
793
- end
794
- # ID of the coupon to create a new discount for.
795
- attr_accessor :coupon
796
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
797
- attr_accessor :discount
798
- # Details to determine how long the discount should be applied for.
799
- attr_accessor :discount_end
800
- # ID of the promotion code to create a new discount for.
801
- attr_accessor :promotion_code
802
-
803
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
804
- @coupon = coupon
805
- @discount = discount
806
- @discount_end = discount_end
807
- @promotion_code = promotion_code
808
- end
809
- end
810
-
811
- class Trial < Stripe::RequestParams
812
- # 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.
813
- attr_accessor :converts_to
814
- # Determines the type of trial for this item.
815
- attr_accessor :type
816
-
817
- def initialize(converts_to: nil, type: nil)
818
- @converts_to = converts_to
819
- @type = type
820
- end
821
- end
822
- # 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`.
823
- attr_accessor :discounts
824
- # 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`.
825
- attr_accessor :metadata
826
- # The ID of the price object.
827
- attr_accessor :price
828
- # 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`.
829
- attr_accessor :quantity
830
- # 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`.
831
- attr_accessor :tax_rates
832
- # 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`.
833
- attr_accessor :trial
834
-
835
- def initialize(
836
- discounts: nil,
837
- metadata: nil,
838
- price: nil,
839
- quantity: nil,
840
- tax_rates: nil,
841
- trial: nil
842
- )
843
- @discounts = discounts
844
- @metadata = metadata
845
- @price = price
846
- @quantity = quantity
847
- @tax_rates = tax_rates
848
- @trial = trial
849
- end
850
- end
851
- # Details for the `add_discount` type.
852
- attr_accessor :add_discount
853
- # Details for the `add_item` type.
854
- attr_accessor :add_item
855
- # Details for the `add_metadata` type: specify a hash of key-value pairs.
856
- attr_accessor :add_metadata
857
- # Details for the `remove_discount` type.
858
- attr_accessor :remove_discount
859
- # Details for the `remove_item` type.
860
- attr_accessor :remove_item
861
- # Details for the `remove_metadata` type: specify an array of metadata keys.
862
- attr_accessor :remove_metadata
863
- # Details for the `set_discounts` type.
864
- attr_accessor :set_discounts
865
- # Details for the `set_items` type.
866
- attr_accessor :set_items
867
- # Details for the `set_metadata` type: specify an array of key-value pairs.
868
- attr_accessor :set_metadata
869
- # The type of action the quote line performs.
870
- attr_accessor :type
871
-
872
- def initialize(
873
- add_discount: nil,
874
- add_item: nil,
875
- add_metadata: nil,
876
- remove_discount: nil,
877
- remove_item: nil,
878
- remove_metadata: nil,
879
- set_discounts: nil,
880
- set_items: nil,
881
- set_metadata: nil,
882
- type: nil
883
- )
884
- @add_discount = add_discount
885
- @add_item = add_item
886
- @add_metadata = add_metadata
887
- @remove_discount = remove_discount
888
- @remove_item = remove_item
889
- @remove_metadata = remove_metadata
890
- @set_discounts = set_discounts
891
- @set_items = set_items
892
- @set_metadata = set_metadata
893
- @type = type
894
- end
895
- end
896
-
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
- attr_accessor :new_reference
900
- # The ID of the schedule the line applies to.
901
- attr_accessor :subscription_schedule
902
- # Describes whether the quote line is affecting a new schedule or an existing schedule.
903
- attr_accessor :type
904
-
905
- def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
906
- @new_reference = new_reference
907
- @subscription_schedule = subscription_schedule
908
- @type = type
909
- end
910
- end
911
-
912
- class CancelSubscriptionSchedule < Stripe::RequestParams
913
- # Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
914
- attr_accessor :cancel_at
915
- # 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`.
916
- attr_accessor :invoice_now
917
- # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
918
- attr_accessor :prorate
919
-
920
- def initialize(cancel_at: nil, invoice_now: nil, prorate: nil)
921
- @cancel_at = cancel_at
922
- @invoice_now = invoice_now
923
- @prorate = prorate
924
- end
925
- end
926
-
927
- class EndsAt < Stripe::RequestParams
928
- class DiscountEnd < Stripe::RequestParams
929
- # The ID of a specific discount.
930
- attr_accessor :discount
931
-
932
- def initialize(discount: nil)
933
- @discount = discount
934
- end
935
- end
936
-
937
- class Duration < Stripe::RequestParams
938
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
939
- attr_accessor :interval
940
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
941
- attr_accessor :interval_count
942
-
943
- def initialize(interval: nil, interval_count: nil)
944
- @interval = interval
945
- @interval_count = interval_count
946
- end
947
- end
948
- # Use the `end` time of a given discount.
949
- attr_accessor :discount_end
950
- # Time span for the quote line starting from the `starts_at` date.
951
- attr_accessor :duration
952
- # A precise Unix timestamp.
953
- attr_accessor :timestamp
954
- # Select a way to pass in `ends_at`.
955
- attr_accessor :type
956
-
957
- def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
958
- @discount_end = discount_end
959
- @duration = duration
960
- @timestamp = timestamp
961
- @type = type
962
- end
963
- end
964
-
965
- class SetPauseCollection < Stripe::RequestParams
966
- class Set < Stripe::RequestParams
967
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
968
- attr_accessor :behavior
969
-
970
- def initialize(behavior: nil)
971
- @behavior = behavior
972
- end
973
- end
974
- # Details of the pause_collection behavior to apply to the amendment.
975
- attr_accessor :set
976
- # Determines the type of the pause_collection amendment.
977
- attr_accessor :type
978
-
979
- def initialize(set: nil, type: nil)
980
- @set = set
981
- @type = type
982
- end
983
- end
984
-
985
- class StartsAt < Stripe::RequestParams
986
- class DiscountEnd < Stripe::RequestParams
987
- # The ID of a specific discount.
988
- attr_accessor :discount
989
-
990
- def initialize(discount: nil)
991
- @discount = discount
992
- end
993
- end
994
-
995
- class LineEndsAt < Stripe::RequestParams
996
- # 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.
997
- attr_accessor :index
998
-
999
- def initialize(index: nil)
1000
- @index = index
1001
- end
1002
- end
1003
- # Use the `end` time of a given discount.
1004
- attr_accessor :discount_end
1005
- # The timestamp the given line ends at.
1006
- attr_accessor :line_ends_at
1007
- # A precise Unix timestamp.
1008
- attr_accessor :timestamp
1009
- # Select a way to pass in `starts_at`.
1010
- attr_accessor :type
1011
-
1012
- def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil)
1013
- @discount_end = discount_end
1014
- @line_ends_at = line_ends_at
1015
- @timestamp = timestamp
1016
- @type = type
1017
- end
1018
- end
1019
-
1020
- class TrialSettings < Stripe::RequestParams
1021
- class EndBehavior < Stripe::RequestParams
1022
- # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
1023
- attr_accessor :prorate_up_front
1024
-
1025
- def initialize(prorate_up_front: nil)
1026
- @prorate_up_front = prorate_up_front
1027
- end
1028
- end
1029
- # Defines how the subscription should behave when a trial ends.
1030
- attr_accessor :end_behavior
1031
-
1032
- def initialize(end_behavior: nil)
1033
- @end_behavior = end_behavior
1034
- end
1035
- end
1036
- # An array of operations the quote line performs.
1037
- attr_accessor :actions
1038
- # Details to identify the subscription schedule the quote line applies to.
1039
- attr_accessor :applies_to
1040
- # 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.
1041
- attr_accessor :billing_cycle_anchor
1042
- # 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.
1043
- attr_accessor :cancel_subscription_schedule
1044
- # 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.
1045
- attr_accessor :ends_at
1046
- # 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.
1047
- attr_accessor :proration_behavior
1048
- # Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
1049
- attr_accessor :set_pause_collection
1050
- # Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
1051
- attr_accessor :set_schedule_end
1052
- # Details to identify the earliest timestamp where the proposed change should take effect.
1053
- attr_accessor :starts_at
1054
- # Settings related to subscription trials.
1055
- attr_accessor :trial_settings
1056
-
1057
- def initialize(
1058
- actions: nil,
1059
- applies_to: nil,
1060
- billing_cycle_anchor: nil,
1061
- cancel_subscription_schedule: nil,
1062
- ends_at: nil,
1063
- proration_behavior: nil,
1064
- set_pause_collection: nil,
1065
- set_schedule_end: nil,
1066
- starts_at: nil,
1067
- trial_settings: nil
1068
- )
1069
- @actions = actions
1070
- @applies_to = applies_to
1071
- @billing_cycle_anchor = billing_cycle_anchor
1072
- @cancel_subscription_schedule = cancel_subscription_schedule
1073
- @ends_at = ends_at
1074
- @proration_behavior = proration_behavior
1075
- @set_pause_collection = set_pause_collection
1076
- @set_schedule_end = set_schedule_end
1077
- @starts_at = starts_at
1078
- @trial_settings = trial_settings
1079
- end
1080
- end
1081
-
1082
337
  class LineItem < Stripe::RequestParams
1083
338
  class Discount < Stripe::RequestParams
1084
- class DiscountEnd < Stripe::RequestParams
1085
- class Duration < Stripe::RequestParams
1086
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1087
- attr_accessor :interval
1088
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1089
- attr_accessor :interval_count
1090
-
1091
- def initialize(interval: nil, interval_count: nil)
1092
- @interval = interval
1093
- @interval_count = interval_count
1094
- end
1095
- end
1096
- # Time span for the redeemed discount.
1097
- attr_accessor :duration
1098
- # A precise Unix timestamp for the discount to end. Must be in the future.
1099
- attr_accessor :timestamp
1100
- # The type of calculation made to determine when the discount ends.
1101
- attr_accessor :type
1102
-
1103
- def initialize(duration: nil, timestamp: nil, type: nil)
1104
- @duration = duration
1105
- @timestamp = timestamp
1106
- @type = type
1107
- end
1108
- end
1109
339
  # ID of the coupon to create a new discount for.
1110
340
  attr_accessor :coupon
1111
341
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
1112
342
  attr_accessor :discount
1113
- # Details to determine how long the discount should be applied for.
1114
- attr_accessor :discount_end
1115
343
  # ID of the promotion code to create a new discount for.
1116
344
  attr_accessor :promotion_code
1117
345
 
1118
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
346
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
1119
347
  @coupon = coupon
1120
348
  @discount = discount
1121
- @discount_end = discount_end
1122
349
  @promotion_code = promotion_code
1123
350
  end
1124
351
  end
@@ -1185,281 +412,23 @@ module Stripe
1185
412
  end
1186
413
 
1187
414
  class SubscriptionData < Stripe::RequestParams
1188
- class BillOnAcceptance < Stripe::RequestParams
1189
- class BillFrom < Stripe::RequestParams
1190
- class LineStartsAt < Stripe::RequestParams
1191
- # The ID of a quote line.
1192
- attr_accessor :id
1193
- # 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.
1194
- attr_accessor :index
1195
-
1196
- def initialize(id: nil, index: nil)
1197
- @id = id
1198
- @index = index
1199
- end
1200
- end
1201
- # Details of a Quote line to start the bill period from.
1202
- attr_accessor :line_starts_at
1203
- # A precise Unix timestamp.
1204
- attr_accessor :timestamp
1205
- # The type of method to specify the `bill_from` time.
1206
- attr_accessor :type
1207
-
1208
- def initialize(line_starts_at: nil, timestamp: nil, type: nil)
1209
- @line_starts_at = line_starts_at
1210
- @timestamp = timestamp
1211
- @type = type
1212
- end
1213
- end
1214
-
1215
- class BillUntil < Stripe::RequestParams
1216
- class Duration < Stripe::RequestParams
1217
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1218
- attr_accessor :interval
1219
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1220
- attr_accessor :interval_count
1221
-
1222
- def initialize(interval: nil, interval_count: nil)
1223
- @interval = interval
1224
- @interval_count = interval_count
1225
- end
1226
- end
1227
-
1228
- class LineEndsAt < Stripe::RequestParams
1229
- # The ID of a quote line.
1230
- attr_accessor :id
1231
- # 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.
1232
- attr_accessor :index
1233
-
1234
- def initialize(id: nil, index: nil)
1235
- @id = id
1236
- @index = index
1237
- end
1238
- end
1239
- # Details of the duration over which to bill.
1240
- attr_accessor :duration
1241
- # Details of a Quote line item from which to bill until.
1242
- attr_accessor :line_ends_at
1243
- # A precise Unix timestamp.
1244
- attr_accessor :timestamp
1245
- # The type of method to specify the `bill_until` time.
1246
- attr_accessor :type
1247
-
1248
- def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
1249
- @duration = duration
1250
- @line_ends_at = line_ends_at
1251
- @timestamp = timestamp
1252
- @type = type
1253
- end
1254
- end
1255
- # The start of the period to bill from when the Quote is accepted.
1256
- attr_accessor :bill_from
1257
- # The end of the period to bill until when the Quote is accepted.
1258
- attr_accessor :bill_until
1259
-
1260
- def initialize(bill_from: nil, bill_until: nil)
1261
- @bill_from = bill_from
1262
- @bill_until = bill_until
1263
- end
1264
- end
1265
-
1266
- class Prebilling < Stripe::RequestParams
1267
- # This is used to determine the number of billing cycles to prebill.
1268
- attr_accessor :iterations
1269
-
1270
- def initialize(iterations: nil)
1271
- @iterations = iterations
1272
- end
1273
- end
1274
- # Describes the period to bill for upon accepting the quote.
1275
- attr_accessor :bill_on_acceptance
1276
- # 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.
1277
- attr_accessor :billing_behavior
1278
- # When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
1279
- attr_accessor :billing_cycle_anchor
1280
415
  # 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.
1281
416
  attr_accessor :description
1282
417
  # 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.
1283
418
  attr_accessor :effective_date
1284
- # Behavior of the subscription schedule and underlying subscription when it ends.
1285
- attr_accessor :end_behavior
1286
- # 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.
1287
- attr_accessor :from_subscription
1288
419
  # 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.
1289
420
  attr_accessor :metadata
1290
- # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
1291
- attr_accessor :prebilling
1292
- # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
1293
- #
1294
- # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
1295
- #
1296
- # 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`.
1297
- #
1298
- # Prorations can be disabled by passing `none`.
1299
- attr_accessor :proration_behavior
1300
421
  # Integer representing the number of trial period days before the customer is charged for the first time.
1301
422
  attr_accessor :trial_period_days
1302
423
 
1303
- def initialize(
1304
- bill_on_acceptance: nil,
1305
- billing_behavior: nil,
1306
- billing_cycle_anchor: nil,
1307
- description: nil,
1308
- effective_date: nil,
1309
- end_behavior: nil,
1310
- from_subscription: nil,
1311
- metadata: nil,
1312
- prebilling: nil,
1313
- proration_behavior: nil,
1314
- trial_period_days: nil
1315
- )
1316
- @bill_on_acceptance = bill_on_acceptance
1317
- @billing_behavior = billing_behavior
1318
- @billing_cycle_anchor = billing_cycle_anchor
424
+ def initialize(description: nil, effective_date: nil, metadata: nil, trial_period_days: nil)
1319
425
  @description = description
1320
426
  @effective_date = effective_date
1321
- @end_behavior = end_behavior
1322
- @from_subscription = from_subscription
1323
427
  @metadata = metadata
1324
- @prebilling = prebilling
1325
- @proration_behavior = proration_behavior
1326
428
  @trial_period_days = trial_period_days
1327
429
  end
1328
430
  end
1329
431
 
1330
- class SubscriptionDataOverride < Stripe::RequestParams
1331
- class AppliesTo < Stripe::RequestParams
1332
- # 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.
1333
- attr_accessor :new_reference
1334
- # The ID of the schedule the line applies to.
1335
- attr_accessor :subscription_schedule
1336
- # Describes whether the quote line is affecting a new schedule or an existing schedule.
1337
- attr_accessor :type
1338
-
1339
- def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
1340
- @new_reference = new_reference
1341
- @subscription_schedule = subscription_schedule
1342
- @type = type
1343
- end
1344
- end
1345
-
1346
- class BillOnAcceptance < Stripe::RequestParams
1347
- class BillFrom < Stripe::RequestParams
1348
- class LineStartsAt < Stripe::RequestParams
1349
- # The ID of a quote line.
1350
- attr_accessor :id
1351
- # 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.
1352
- attr_accessor :index
1353
-
1354
- def initialize(id: nil, index: nil)
1355
- @id = id
1356
- @index = index
1357
- end
1358
- end
1359
- # Details of a Quote line to start the bill period from.
1360
- attr_accessor :line_starts_at
1361
- # A precise Unix timestamp.
1362
- attr_accessor :timestamp
1363
- # The type of method to specify the `bill_from` time.
1364
- attr_accessor :type
1365
-
1366
- def initialize(line_starts_at: nil, timestamp: nil, type: nil)
1367
- @line_starts_at = line_starts_at
1368
- @timestamp = timestamp
1369
- @type = type
1370
- end
1371
- end
1372
-
1373
- class BillUntil < Stripe::RequestParams
1374
- class Duration < Stripe::RequestParams
1375
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1376
- attr_accessor :interval
1377
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1378
- attr_accessor :interval_count
1379
-
1380
- def initialize(interval: nil, interval_count: nil)
1381
- @interval = interval
1382
- @interval_count = interval_count
1383
- end
1384
- end
1385
-
1386
- class LineEndsAt < Stripe::RequestParams
1387
- # The ID of a quote line.
1388
- attr_accessor :id
1389
- # 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.
1390
- attr_accessor :index
1391
-
1392
- def initialize(id: nil, index: nil)
1393
- @id = id
1394
- @index = index
1395
- end
1396
- end
1397
- # Details of the duration over which to bill.
1398
- attr_accessor :duration
1399
- # Details of a Quote line item from which to bill until.
1400
- attr_accessor :line_ends_at
1401
- # A precise Unix timestamp.
1402
- attr_accessor :timestamp
1403
- # The type of method to specify the `bill_until` time.
1404
- attr_accessor :type
1405
-
1406
- def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
1407
- @duration = duration
1408
- @line_ends_at = line_ends_at
1409
- @timestamp = timestamp
1410
- @type = type
1411
- end
1412
- end
1413
- # The start of the period to bill from when the Quote is accepted.
1414
- attr_accessor :bill_from
1415
- # The end of the period to bill until when the Quote is accepted.
1416
- attr_accessor :bill_until
1417
-
1418
- def initialize(bill_from: nil, bill_until: nil)
1419
- @bill_from = bill_from
1420
- @bill_until = bill_until
1421
- end
1422
- end
1423
- # Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
1424
- attr_accessor :applies_to
1425
- # Describes the period to bill for upon accepting the quote.
1426
- attr_accessor :bill_on_acceptance
1427
- # 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.
1428
- attr_accessor :billing_behavior
1429
- # The customer the Subscription Data override applies to. This is only relevant when `applies_to.type=new_reference`.
1430
- attr_accessor :customer
1431
- # 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.
1432
- attr_accessor :description
1433
- # Behavior of the subscription schedule and underlying subscription when it ends.
1434
- attr_accessor :end_behavior
1435
- # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
1436
- #
1437
- # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
1438
- #
1439
- # 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`.
1440
- #
1441
- # Prorations can be disabled by passing `none`.
1442
- attr_accessor :proration_behavior
1443
-
1444
- def initialize(
1445
- applies_to: nil,
1446
- bill_on_acceptance: nil,
1447
- billing_behavior: nil,
1448
- customer: nil,
1449
- description: nil,
1450
- end_behavior: nil,
1451
- proration_behavior: nil
1452
- )
1453
- @applies_to = applies_to
1454
- @bill_on_acceptance = bill_on_acceptance
1455
- @billing_behavior = billing_behavior
1456
- @customer = customer
1457
- @description = description
1458
- @end_behavior = end_behavior
1459
- @proration_behavior = proration_behavior
1460
- end
1461
- end
1462
-
1463
432
  class TransferData < Stripe::RequestParams
1464
433
  # 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.
1465
434
  attr_accessor :amount
@@ -1474,8 +443,6 @@ module Stripe
1474
443
  @destination = destination
1475
444
  end
1476
445
  end
1477
- # Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
1478
- attr_accessor :allow_backdated_lines
1479
446
  # 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.
1480
447
  attr_accessor :application_fee_amount
1481
448
  # 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.
@@ -1486,8 +453,6 @@ module Stripe
1486
453
  attr_accessor :collection_method
1487
454
  # The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
1488
455
  attr_accessor :customer
1489
- # The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
1490
- attr_accessor :customer_account
1491
456
  # The tax rates that will apply to any line item that does not have `tax_rates` set.
1492
457
  attr_accessor :default_tax_rates
1493
458
  # 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.
@@ -1508,29 +473,23 @@ module Stripe
1508
473
  attr_accessor :invoice_settings
1509
474
  # 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.
1510
475
  attr_accessor :line_items
1511
- # 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.
1512
- attr_accessor :lines
1513
476
  # 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`.
1514
477
  attr_accessor :metadata
1515
478
  # The account on behalf of which to charge.
1516
479
  attr_accessor :on_behalf_of
1517
480
  # 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.
1518
481
  attr_accessor :subscription_data
1519
- # List representing overrides for `subscription_data` configurations for specific subscription schedules.
1520
- attr_accessor :subscription_data_overrides
1521
482
  # ID of the test clock to attach to the quote.
1522
483
  attr_accessor :test_clock
1523
484
  # The data with which to automatically create a Transfer for each of the invoices.
1524
485
  attr_accessor :transfer_data
1525
486
 
1526
487
  def initialize(
1527
- allow_backdated_lines: nil,
1528
488
  application_fee_amount: nil,
1529
489
  application_fee_percent: nil,
1530
490
  automatic_tax: nil,
1531
491
  collection_method: nil,
1532
492
  customer: nil,
1533
- customer_account: nil,
1534
493
  default_tax_rates: nil,
1535
494
  description: nil,
1536
495
  discounts: nil,
@@ -1541,21 +500,17 @@ module Stripe
1541
500
  header: nil,
1542
501
  invoice_settings: nil,
1543
502
  line_items: nil,
1544
- lines: nil,
1545
503
  metadata: nil,
1546
504
  on_behalf_of: nil,
1547
505
  subscription_data: nil,
1548
- subscription_data_overrides: nil,
1549
506
  test_clock: nil,
1550
507
  transfer_data: nil
1551
508
  )
1552
- @allow_backdated_lines = allow_backdated_lines
1553
509
  @application_fee_amount = application_fee_amount
1554
510
  @application_fee_percent = application_fee_percent
1555
511
  @automatic_tax = automatic_tax
1556
512
  @collection_method = collection_method
1557
513
  @customer = customer
1558
- @customer_account = customer_account
1559
514
  @default_tax_rates = default_tax_rates
1560
515
  @description = description
1561
516
  @discounts = discounts
@@ -1566,11 +521,9 @@ module Stripe
1566
521
  @header = header
1567
522
  @invoice_settings = invoice_settings
1568
523
  @line_items = line_items
1569
- @lines = lines
1570
524
  @metadata = metadata
1571
525
  @on_behalf_of = on_behalf_of
1572
526
  @subscription_data = subscription_data
1573
- @subscription_data_overrides = subscription_data_overrides
1574
527
  @test_clock = test_clock
1575
528
  @transfer_data = transfer_data
1576
529
  end
@@ -1601,44 +554,16 @@ module Stripe
1601
554
  end
1602
555
 
1603
556
  class Discount < Stripe::RequestParams
1604
- class DiscountEnd < Stripe::RequestParams
1605
- class Duration < Stripe::RequestParams
1606
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1607
- attr_accessor :interval
1608
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1609
- attr_accessor :interval_count
1610
-
1611
- def initialize(interval: nil, interval_count: nil)
1612
- @interval = interval
1613
- @interval_count = interval_count
1614
- end
1615
- end
1616
- # Time span for the redeemed discount.
1617
- attr_accessor :duration
1618
- # A precise Unix timestamp for the discount to end. Must be in the future.
1619
- attr_accessor :timestamp
1620
- # The type of calculation made to determine when the discount ends.
1621
- attr_accessor :type
1622
-
1623
- def initialize(duration: nil, timestamp: nil, type: nil)
1624
- @duration = duration
1625
- @timestamp = timestamp
1626
- @type = type
1627
- end
1628
- end
1629
557
  # ID of the coupon to create a new discount for.
1630
558
  attr_accessor :coupon
1631
559
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
1632
560
  attr_accessor :discount
1633
- # Details to determine how long the discount should be applied for.
1634
- attr_accessor :discount_end
1635
561
  # ID of the promotion code to create a new discount for.
1636
562
  attr_accessor :promotion_code
1637
563
 
1638
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
564
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
1639
565
  @coupon = coupon
1640
566
  @discount = discount
1641
- @discount_end = discount_end
1642
567
  @promotion_code = promotion_code
1643
568
  end
1644
569
  end
@@ -1666,529 +591,18 @@ module Stripe
1666
591
  end
1667
592
  end
1668
593
 
1669
- class Line < Stripe::RequestParams
1670
- class Action < Stripe::RequestParams
1671
- class AddDiscount < Stripe::RequestParams
1672
- class DiscountEnd < Stripe::RequestParams
1673
- # The type of calculation made to determine when the discount ends.
1674
- attr_accessor :type
1675
-
1676
- def initialize(type: nil)
1677
- @type = type
1678
- end
1679
- end
1680
- # The coupon code to redeem.
1681
- attr_accessor :coupon
1682
- # An ID of an existing discount for a coupon that was already redeemed.
1683
- attr_accessor :discount
1684
- # Details to determine how long the discount should be applied for.
1685
- attr_accessor :discount_end
1686
- # 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.
1687
- attr_accessor :index
1688
- # The promotion code to redeem.
1689
- attr_accessor :promotion_code
1690
-
1691
- def initialize(
1692
- coupon: nil,
1693
- discount: nil,
1694
- discount_end: nil,
1695
- index: nil,
1696
- promotion_code: nil
1697
- )
1698
- @coupon = coupon
1699
- @discount = discount
1700
- @discount_end = discount_end
1701
- @index = index
1702
- @promotion_code = promotion_code
1703
- end
1704
- end
1705
-
1706
- class AddItem < Stripe::RequestParams
1707
- class Discount < Stripe::RequestParams
1708
- class DiscountEnd < Stripe::RequestParams
1709
- class Duration < Stripe::RequestParams
1710
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1711
- attr_accessor :interval
1712
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1713
- attr_accessor :interval_count
1714
-
1715
- def initialize(interval: nil, interval_count: nil)
1716
- @interval = interval
1717
- @interval_count = interval_count
1718
- end
1719
- end
1720
- # Time span for the redeemed discount.
1721
- attr_accessor :duration
1722
- # A precise Unix timestamp for the discount to end. Must be in the future.
1723
- attr_accessor :timestamp
1724
- # The type of calculation made to determine when the discount ends.
1725
- attr_accessor :type
1726
-
1727
- def initialize(duration: nil, timestamp: nil, type: nil)
1728
- @duration = duration
1729
- @timestamp = timestamp
1730
- @type = type
1731
- end
1732
- end
1733
- # ID of the coupon to create a new discount for.
1734
- attr_accessor :coupon
1735
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1736
- attr_accessor :discount
1737
- # Details to determine how long the discount should be applied for.
1738
- attr_accessor :discount_end
1739
- # ID of the promotion code to create a new discount for.
1740
- attr_accessor :promotion_code
1741
-
1742
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1743
- @coupon = coupon
1744
- @discount = discount
1745
- @discount_end = discount_end
1746
- @promotion_code = promotion_code
1747
- end
1748
- end
1749
-
1750
- class Trial < Stripe::RequestParams
1751
- # 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.
1752
- attr_accessor :converts_to
1753
- # Determines the type of trial for this item.
1754
- attr_accessor :type
1755
-
1756
- def initialize(converts_to: nil, type: nil)
1757
- @converts_to = converts_to
1758
- @type = type
1759
- end
1760
- end
1761
- # The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
1762
- attr_accessor :discounts
1763
- # 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`.
1764
- attr_accessor :metadata
1765
- # The ID of the price object.
1766
- attr_accessor :price
1767
- # Quantity for this item.
1768
- attr_accessor :quantity
1769
- # 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`.
1770
- attr_accessor :tax_rates
1771
- # Options that configure the trial on the subscription item.
1772
- attr_accessor :trial
1773
-
1774
- def initialize(
1775
- discounts: nil,
1776
- metadata: nil,
1777
- price: nil,
1778
- quantity: nil,
1779
- tax_rates: nil,
1780
- trial: nil
1781
- )
1782
- @discounts = discounts
1783
- @metadata = metadata
1784
- @price = price
1785
- @quantity = quantity
1786
- @tax_rates = tax_rates
1787
- @trial = trial
1788
- end
1789
- end
1790
-
1791
- class RemoveDiscount < Stripe::RequestParams
1792
- # The coupon code to remove from the `discounts` array.
1793
- attr_accessor :coupon
1794
- # The ID of a discount to remove from the `discounts` array.
1795
- attr_accessor :discount
1796
- # The ID of a promotion code to remove from the `discounts` array.
1797
- attr_accessor :promotion_code
1798
-
1799
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
1800
- @coupon = coupon
1801
- @discount = discount
1802
- @promotion_code = promotion_code
1803
- end
1804
- end
1805
-
1806
- class RemoveItem < Stripe::RequestParams
1807
- # ID of a price to remove.
1808
- attr_accessor :price
1809
-
1810
- def initialize(price: nil)
1811
- @price = price
1812
- end
1813
- end
1814
-
1815
- class SetDiscount < Stripe::RequestParams
1816
- # The coupon code to replace the `discounts` array with.
1817
- attr_accessor :coupon
1818
- # An ID of an existing discount to replace the `discounts` array with.
1819
- attr_accessor :discount
1820
- # An ID of an existing promotion code to replace the `discounts` array with.
1821
- attr_accessor :promotion_code
1822
-
1823
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
1824
- @coupon = coupon
1825
- @discount = discount
1826
- @promotion_code = promotion_code
1827
- end
1828
- end
1829
-
1830
- class SetItem < Stripe::RequestParams
1831
- class Discount < Stripe::RequestParams
1832
- class DiscountEnd < Stripe::RequestParams
1833
- class Duration < Stripe::RequestParams
1834
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1835
- attr_accessor :interval
1836
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1837
- attr_accessor :interval_count
1838
-
1839
- def initialize(interval: nil, interval_count: nil)
1840
- @interval = interval
1841
- @interval_count = interval_count
1842
- end
1843
- end
1844
- # Time span for the redeemed discount.
1845
- attr_accessor :duration
1846
- # A precise Unix timestamp for the discount to end. Must be in the future.
1847
- attr_accessor :timestamp
1848
- # The type of calculation made to determine when the discount ends.
1849
- attr_accessor :type
1850
-
1851
- def initialize(duration: nil, timestamp: nil, type: nil)
1852
- @duration = duration
1853
- @timestamp = timestamp
1854
- @type = type
1855
- end
1856
- end
1857
- # ID of the coupon to create a new discount for.
1858
- attr_accessor :coupon
1859
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1860
- attr_accessor :discount
1861
- # Details to determine how long the discount should be applied for.
1862
- attr_accessor :discount_end
1863
- # ID of the promotion code to create a new discount for.
1864
- attr_accessor :promotion_code
1865
-
1866
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1867
- @coupon = coupon
1868
- @discount = discount
1869
- @discount_end = discount_end
1870
- @promotion_code = promotion_code
1871
- end
1872
- end
1873
-
1874
- class Trial < Stripe::RequestParams
1875
- # 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.
1876
- attr_accessor :converts_to
1877
- # Determines the type of trial for this item.
1878
- attr_accessor :type
1879
-
1880
- def initialize(converts_to: nil, type: nil)
1881
- @converts_to = converts_to
1882
- @type = type
1883
- end
1884
- end
1885
- # 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`.
1886
- attr_accessor :discounts
1887
- # 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`.
1888
- attr_accessor :metadata
1889
- # The ID of the price object.
1890
- attr_accessor :price
1891
- # 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`.
1892
- attr_accessor :quantity
1893
- # 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`.
1894
- attr_accessor :tax_rates
1895
- # 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`.
1896
- attr_accessor :trial
1897
-
1898
- def initialize(
1899
- discounts: nil,
1900
- metadata: nil,
1901
- price: nil,
1902
- quantity: nil,
1903
- tax_rates: nil,
1904
- trial: nil
1905
- )
1906
- @discounts = discounts
1907
- @metadata = metadata
1908
- @price = price
1909
- @quantity = quantity
1910
- @tax_rates = tax_rates
1911
- @trial = trial
1912
- end
1913
- end
1914
- # Details for the `add_discount` type.
1915
- attr_accessor :add_discount
1916
- # Details for the `add_item` type.
1917
- attr_accessor :add_item
1918
- # Details for the `add_metadata` type: specify a hash of key-value pairs.
1919
- attr_accessor :add_metadata
1920
- # Details for the `remove_discount` type.
1921
- attr_accessor :remove_discount
1922
- # Details for the `remove_item` type.
1923
- attr_accessor :remove_item
1924
- # Details for the `remove_metadata` type: specify an array of metadata keys.
1925
- attr_accessor :remove_metadata
1926
- # Details for the `set_discounts` type.
1927
- attr_accessor :set_discounts
1928
- # Details for the `set_items` type.
1929
- attr_accessor :set_items
1930
- # Details for the `set_metadata` type: specify an array of key-value pairs.
1931
- attr_accessor :set_metadata
1932
- # The type of action the quote line performs.
1933
- attr_accessor :type
1934
-
1935
- def initialize(
1936
- add_discount: nil,
1937
- add_item: nil,
1938
- add_metadata: nil,
1939
- remove_discount: nil,
1940
- remove_item: nil,
1941
- remove_metadata: nil,
1942
- set_discounts: nil,
1943
- set_items: nil,
1944
- set_metadata: nil,
1945
- type: nil
1946
- )
1947
- @add_discount = add_discount
1948
- @add_item = add_item
1949
- @add_metadata = add_metadata
1950
- @remove_discount = remove_discount
1951
- @remove_item = remove_item
1952
- @remove_metadata = remove_metadata
1953
- @set_discounts = set_discounts
1954
- @set_items = set_items
1955
- @set_metadata = set_metadata
1956
- @type = type
1957
- end
1958
- end
1959
-
1960
- class AppliesTo < Stripe::RequestParams
1961
- # 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.
1962
- attr_accessor :new_reference
1963
- # The ID of the schedule the line applies to.
1964
- attr_accessor :subscription_schedule
1965
- # Describes whether the quote line is affecting a new schedule or an existing schedule.
1966
- attr_accessor :type
1967
-
1968
- def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
1969
- @new_reference = new_reference
1970
- @subscription_schedule = subscription_schedule
1971
- @type = type
1972
- end
1973
- end
1974
-
1975
- class CancelSubscriptionSchedule < Stripe::RequestParams
1976
- # Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
1977
- attr_accessor :cancel_at
1978
- # 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`.
1979
- attr_accessor :invoice_now
1980
- # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
1981
- attr_accessor :prorate
1982
-
1983
- def initialize(cancel_at: nil, invoice_now: nil, prorate: nil)
1984
- @cancel_at = cancel_at
1985
- @invoice_now = invoice_now
1986
- @prorate = prorate
1987
- end
1988
- end
1989
-
1990
- class EndsAt < Stripe::RequestParams
1991
- class DiscountEnd < Stripe::RequestParams
1992
- # The ID of a specific discount.
1993
- attr_accessor :discount
1994
-
1995
- def initialize(discount: nil)
1996
- @discount = discount
1997
- end
1998
- end
1999
-
2000
- class Duration < Stripe::RequestParams
2001
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2002
- attr_accessor :interval
2003
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2004
- attr_accessor :interval_count
2005
-
2006
- def initialize(interval: nil, interval_count: nil)
2007
- @interval = interval
2008
- @interval_count = interval_count
2009
- end
2010
- end
2011
- # Use the `end` time of a given discount.
2012
- attr_accessor :discount_end
2013
- # Time span for the quote line starting from the `starts_at` date.
2014
- attr_accessor :duration
2015
- # A precise Unix timestamp.
2016
- attr_accessor :timestamp
2017
- # Select a way to pass in `ends_at`.
2018
- attr_accessor :type
2019
-
2020
- def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
2021
- @discount_end = discount_end
2022
- @duration = duration
2023
- @timestamp = timestamp
2024
- @type = type
2025
- end
2026
- end
2027
-
2028
- class SetPauseCollection < Stripe::RequestParams
2029
- class Set < Stripe::RequestParams
2030
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
2031
- attr_accessor :behavior
2032
-
2033
- def initialize(behavior: nil)
2034
- @behavior = behavior
2035
- end
2036
- end
2037
- # Details of the pause_collection behavior to apply to the amendment.
2038
- attr_accessor :set
2039
- # Determines the type of the pause_collection amendment.
2040
- attr_accessor :type
2041
-
2042
- def initialize(set: nil, type: nil)
2043
- @set = set
2044
- @type = type
2045
- end
2046
- end
2047
-
2048
- class StartsAt < Stripe::RequestParams
2049
- class DiscountEnd < Stripe::RequestParams
2050
- # The ID of a specific discount.
2051
- attr_accessor :discount
2052
-
2053
- def initialize(discount: nil)
2054
- @discount = discount
2055
- end
2056
- end
2057
-
2058
- class LineEndsAt < Stripe::RequestParams
2059
- # The ID of a quote line.
2060
- attr_accessor :id
2061
- # 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.
2062
- attr_accessor :index
2063
-
2064
- def initialize(id: nil, index: nil)
2065
- @id = id
2066
- @index = index
2067
- end
2068
- end
2069
- # Use the `end` time of a given discount.
2070
- attr_accessor :discount_end
2071
- # The timestamp the given line ends at.
2072
- attr_accessor :line_ends_at
2073
- # A precise Unix timestamp.
2074
- attr_accessor :timestamp
2075
- # Select a way to pass in `starts_at`.
2076
- attr_accessor :type
2077
-
2078
- def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil)
2079
- @discount_end = discount_end
2080
- @line_ends_at = line_ends_at
2081
- @timestamp = timestamp
2082
- @type = type
2083
- end
2084
- end
2085
-
2086
- class TrialSettings < Stripe::RequestParams
2087
- class EndBehavior < Stripe::RequestParams
2088
- # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
2089
- attr_accessor :prorate_up_front
2090
-
2091
- def initialize(prorate_up_front: nil)
2092
- @prorate_up_front = prorate_up_front
2093
- end
2094
- end
2095
- # Defines how the subscription should behave when a trial ends.
2096
- attr_accessor :end_behavior
2097
-
2098
- def initialize(end_behavior: nil)
2099
- @end_behavior = end_behavior
2100
- end
2101
- end
2102
- # An array of operations the quote line performs.
2103
- attr_accessor :actions
2104
- # Details to identify the subscription schedule the quote line applies to.
2105
- attr_accessor :applies_to
2106
- # 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.
2107
- attr_accessor :billing_cycle_anchor
2108
- # 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.
2109
- attr_accessor :cancel_subscription_schedule
2110
- # 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.
2111
- attr_accessor :ends_at
2112
- # The ID of an existing line on the quote.
2113
- attr_accessor :id
2114
- # 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.
2115
- attr_accessor :proration_behavior
2116
- # Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
2117
- attr_accessor :set_pause_collection
2118
- # Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
2119
- attr_accessor :set_schedule_end
2120
- # Details to identify the earliest timestamp where the proposed change should take effect.
2121
- attr_accessor :starts_at
2122
- # Settings related to subscription trials.
2123
- attr_accessor :trial_settings
2124
-
2125
- def initialize(
2126
- actions: nil,
2127
- applies_to: nil,
2128
- billing_cycle_anchor: nil,
2129
- cancel_subscription_schedule: nil,
2130
- ends_at: nil,
2131
- id: nil,
2132
- proration_behavior: nil,
2133
- set_pause_collection: nil,
2134
- set_schedule_end: nil,
2135
- starts_at: nil,
2136
- trial_settings: nil
2137
- )
2138
- @actions = actions
2139
- @applies_to = applies_to
2140
- @billing_cycle_anchor = billing_cycle_anchor
2141
- @cancel_subscription_schedule = cancel_subscription_schedule
2142
- @ends_at = ends_at
2143
- @id = id
2144
- @proration_behavior = proration_behavior
2145
- @set_pause_collection = set_pause_collection
2146
- @set_schedule_end = set_schedule_end
2147
- @starts_at = starts_at
2148
- @trial_settings = trial_settings
2149
- end
2150
- end
2151
-
2152
594
  class LineItem < Stripe::RequestParams
2153
595
  class Discount < Stripe::RequestParams
2154
- class DiscountEnd < Stripe::RequestParams
2155
- class Duration < Stripe::RequestParams
2156
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2157
- attr_accessor :interval
2158
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2159
- attr_accessor :interval_count
2160
-
2161
- def initialize(interval: nil, interval_count: nil)
2162
- @interval = interval
2163
- @interval_count = interval_count
2164
- end
2165
- end
2166
- # Time span for the redeemed discount.
2167
- attr_accessor :duration
2168
- # A precise Unix timestamp for the discount to end. Must be in the future.
2169
- attr_accessor :timestamp
2170
- # The type of calculation made to determine when the discount ends.
2171
- attr_accessor :type
2172
-
2173
- def initialize(duration: nil, timestamp: nil, type: nil)
2174
- @duration = duration
2175
- @timestamp = timestamp
2176
- @type = type
2177
- end
2178
- end
2179
596
  # ID of the coupon to create a new discount for.
2180
597
  attr_accessor :coupon
2181
598
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
2182
599
  attr_accessor :discount
2183
- # Details to determine how long the discount should be applied for.
2184
- attr_accessor :discount_end
2185
600
  # ID of the promotion code to create a new discount for.
2186
601
  attr_accessor :promotion_code
2187
602
 
2188
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
603
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
2189
604
  @coupon = coupon
2190
605
  @discount = discount
2191
- @discount_end = discount_end
2192
606
  @promotion_code = promotion_code
2193
607
  end
2194
608
  end
@@ -2265,277 +679,23 @@ module Stripe
2265
679
  end
2266
680
 
2267
681
  class SubscriptionData < Stripe::RequestParams
2268
- class BillOnAcceptance < Stripe::RequestParams
2269
- class BillFrom < Stripe::RequestParams
2270
- class LineStartsAt < Stripe::RequestParams
2271
- # The ID of a quote line.
2272
- attr_accessor :id
2273
- # 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.
2274
- attr_accessor :index
2275
-
2276
- def initialize(id: nil, index: nil)
2277
- @id = id
2278
- @index = index
2279
- end
2280
- end
2281
- # Details of a Quote line to start the bill period from.
2282
- attr_accessor :line_starts_at
2283
- # A precise Unix timestamp.
2284
- attr_accessor :timestamp
2285
- # The type of method to specify the `bill_from` time.
2286
- attr_accessor :type
2287
-
2288
- def initialize(line_starts_at: nil, timestamp: nil, type: nil)
2289
- @line_starts_at = line_starts_at
2290
- @timestamp = timestamp
2291
- @type = type
2292
- end
2293
- end
2294
-
2295
- class BillUntil < Stripe::RequestParams
2296
- class Duration < Stripe::RequestParams
2297
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2298
- attr_accessor :interval
2299
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2300
- attr_accessor :interval_count
2301
-
2302
- def initialize(interval: nil, interval_count: nil)
2303
- @interval = interval
2304
- @interval_count = interval_count
2305
- end
2306
- end
2307
-
2308
- class LineEndsAt < Stripe::RequestParams
2309
- # The ID of a quote line.
2310
- attr_accessor :id
2311
- # 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.
2312
- attr_accessor :index
2313
-
2314
- def initialize(id: nil, index: nil)
2315
- @id = id
2316
- @index = index
2317
- end
2318
- end
2319
- # Details of the duration over which to bill.
2320
- attr_accessor :duration
2321
- # Details of a Quote line item from which to bill until.
2322
- attr_accessor :line_ends_at
2323
- # A precise Unix timestamp.
2324
- attr_accessor :timestamp
2325
- # The type of method to specify the `bill_until` time.
2326
- attr_accessor :type
2327
-
2328
- def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
2329
- @duration = duration
2330
- @line_ends_at = line_ends_at
2331
- @timestamp = timestamp
2332
- @type = type
2333
- end
2334
- end
2335
- # The start of the period to bill from when the Quote is accepted.
2336
- attr_accessor :bill_from
2337
- # The end of the period to bill until when the Quote is accepted.
2338
- attr_accessor :bill_until
2339
-
2340
- def initialize(bill_from: nil, bill_until: nil)
2341
- @bill_from = bill_from
2342
- @bill_until = bill_until
2343
- end
2344
- end
2345
-
2346
- class Prebilling < Stripe::RequestParams
2347
- # This is used to determine the number of billing cycles to prebill.
2348
- attr_accessor :iterations
2349
-
2350
- def initialize(iterations: nil)
2351
- @iterations = iterations
2352
- end
2353
- end
2354
- # Describes the period to bill for upon accepting the quote.
2355
- attr_accessor :bill_on_acceptance
2356
- # 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.
2357
- attr_accessor :billing_behavior
2358
- # When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
2359
- attr_accessor :billing_cycle_anchor
2360
682
  # 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.
2361
683
  attr_accessor :description
2362
684
  # 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.
2363
685
  attr_accessor :effective_date
2364
- # Behavior of the subscription schedule and underlying subscription when it ends.
2365
- attr_accessor :end_behavior
2366
686
  # 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.
2367
687
  attr_accessor :metadata
2368
- # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
2369
- attr_accessor :prebilling
2370
- # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
2371
- #
2372
- # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
2373
- #
2374
- # 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`.
2375
- #
2376
- # Prorations can be disabled by passing `none`.
2377
- attr_accessor :proration_behavior
2378
688
  # Integer representing the number of trial period days before the customer is charged for the first time.
2379
689
  attr_accessor :trial_period_days
2380
690
 
2381
- def initialize(
2382
- bill_on_acceptance: nil,
2383
- billing_behavior: nil,
2384
- billing_cycle_anchor: nil,
2385
- description: nil,
2386
- effective_date: nil,
2387
- end_behavior: nil,
2388
- metadata: nil,
2389
- prebilling: nil,
2390
- proration_behavior: nil,
2391
- trial_period_days: nil
2392
- )
2393
- @bill_on_acceptance = bill_on_acceptance
2394
- @billing_behavior = billing_behavior
2395
- @billing_cycle_anchor = billing_cycle_anchor
691
+ def initialize(description: nil, effective_date: nil, metadata: nil, trial_period_days: nil)
2396
692
  @description = description
2397
693
  @effective_date = effective_date
2398
- @end_behavior = end_behavior
2399
694
  @metadata = metadata
2400
- @prebilling = prebilling
2401
- @proration_behavior = proration_behavior
2402
695
  @trial_period_days = trial_period_days
2403
696
  end
2404
697
  end
2405
698
 
2406
- class SubscriptionDataOverride < Stripe::RequestParams
2407
- class AppliesTo < Stripe::RequestParams
2408
- # 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.
2409
- attr_accessor :new_reference
2410
- # The ID of the schedule the line applies to.
2411
- attr_accessor :subscription_schedule
2412
- # Describes whether the quote line is affecting a new schedule or an existing schedule.
2413
- attr_accessor :type
2414
-
2415
- def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
2416
- @new_reference = new_reference
2417
- @subscription_schedule = subscription_schedule
2418
- @type = type
2419
- end
2420
- end
2421
-
2422
- class BillOnAcceptance < Stripe::RequestParams
2423
- class BillFrom < Stripe::RequestParams
2424
- class LineStartsAt < Stripe::RequestParams
2425
- # The ID of a quote line.
2426
- attr_accessor :id
2427
- # 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.
2428
- attr_accessor :index
2429
-
2430
- def initialize(id: nil, index: nil)
2431
- @id = id
2432
- @index = index
2433
- end
2434
- end
2435
- # Details of a Quote line to start the bill period from.
2436
- attr_accessor :line_starts_at
2437
- # A precise Unix timestamp.
2438
- attr_accessor :timestamp
2439
- # The type of method to specify the `bill_from` time.
2440
- attr_accessor :type
2441
-
2442
- def initialize(line_starts_at: nil, timestamp: nil, type: nil)
2443
- @line_starts_at = line_starts_at
2444
- @timestamp = timestamp
2445
- @type = type
2446
- end
2447
- end
2448
-
2449
- class BillUntil < Stripe::RequestParams
2450
- class Duration < Stripe::RequestParams
2451
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2452
- attr_accessor :interval
2453
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2454
- attr_accessor :interval_count
2455
-
2456
- def initialize(interval: nil, interval_count: nil)
2457
- @interval = interval
2458
- @interval_count = interval_count
2459
- end
2460
- end
2461
-
2462
- class LineEndsAt < Stripe::RequestParams
2463
- # The ID of a quote line.
2464
- attr_accessor :id
2465
- # 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.
2466
- attr_accessor :index
2467
-
2468
- def initialize(id: nil, index: nil)
2469
- @id = id
2470
- @index = index
2471
- end
2472
- end
2473
- # Details of the duration over which to bill.
2474
- attr_accessor :duration
2475
- # Details of a Quote line item from which to bill until.
2476
- attr_accessor :line_ends_at
2477
- # A precise Unix timestamp.
2478
- attr_accessor :timestamp
2479
- # The type of method to specify the `bill_until` time.
2480
- attr_accessor :type
2481
-
2482
- def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
2483
- @duration = duration
2484
- @line_ends_at = line_ends_at
2485
- @timestamp = timestamp
2486
- @type = type
2487
- end
2488
- end
2489
- # The start of the period to bill from when the Quote is accepted.
2490
- attr_accessor :bill_from
2491
- # The end of the period to bill until when the Quote is accepted.
2492
- attr_accessor :bill_until
2493
-
2494
- def initialize(bill_from: nil, bill_until: nil)
2495
- @bill_from = bill_from
2496
- @bill_until = bill_until
2497
- end
2498
- end
2499
- # Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
2500
- attr_accessor :applies_to
2501
- # Describes the period to bill for upon accepting the quote.
2502
- attr_accessor :bill_on_acceptance
2503
- # 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.
2504
- attr_accessor :billing_behavior
2505
- # The customer the Subscription Data override applies to.
2506
- attr_accessor :customer
2507
- # 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.
2508
- attr_accessor :description
2509
- # Behavior of the subscription schedule and underlying subscription when it ends.
2510
- attr_accessor :end_behavior
2511
- # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
2512
- #
2513
- # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
2514
- #
2515
- # 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`.
2516
- #
2517
- # Prorations can be disabled by passing `none`.
2518
- attr_accessor :proration_behavior
2519
-
2520
- def initialize(
2521
- applies_to: nil,
2522
- bill_on_acceptance: nil,
2523
- billing_behavior: nil,
2524
- customer: nil,
2525
- description: nil,
2526
- end_behavior: nil,
2527
- proration_behavior: nil
2528
- )
2529
- @applies_to = applies_to
2530
- @bill_on_acceptance = bill_on_acceptance
2531
- @billing_behavior = billing_behavior
2532
- @customer = customer
2533
- @description = description
2534
- @end_behavior = end_behavior
2535
- @proration_behavior = proration_behavior
2536
- end
2537
- end
2538
-
2539
699
  class TransferData < Stripe::RequestParams
2540
700
  # 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.
2541
701
  attr_accessor :amount
@@ -2550,8 +710,6 @@ module Stripe
2550
710
  @destination = destination
2551
711
  end
2552
712
  end
2553
- # Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
2554
- attr_accessor :allow_backdated_lines
2555
713
  # 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.
2556
714
  attr_accessor :application_fee_amount
2557
715
  # 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.
@@ -2562,8 +720,6 @@ module Stripe
2562
720
  attr_accessor :collection_method
2563
721
  # The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
2564
722
  attr_accessor :customer
2565
- # The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
2566
- attr_accessor :customer_account
2567
723
  # The tax rates that will apply to any line item that does not have `tax_rates` set.
2568
724
  attr_accessor :default_tax_rates
2569
725
  # A description that will be displayed on the quote PDF.
@@ -2582,27 +738,21 @@ module Stripe
2582
738
  attr_accessor :invoice_settings
2583
739
  # 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.
2584
740
  attr_accessor :line_items
2585
- # 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.
2586
- attr_accessor :lines
2587
741
  # 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`.
2588
742
  attr_accessor :metadata
2589
743
  # The account on behalf of which to charge.
2590
744
  attr_accessor :on_behalf_of
2591
745
  # 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.
2592
746
  attr_accessor :subscription_data
2593
- # List representing overrides for `subscription_data` configurations for specific subscription schedules.
2594
- attr_accessor :subscription_data_overrides
2595
747
  # The data with which to automatically create a Transfer for each of the invoices.
2596
748
  attr_accessor :transfer_data
2597
749
 
2598
750
  def initialize(
2599
- allow_backdated_lines: nil,
2600
751
  application_fee_amount: nil,
2601
752
  application_fee_percent: nil,
2602
753
  automatic_tax: nil,
2603
754
  collection_method: nil,
2604
755
  customer: nil,
2605
- customer_account: nil,
2606
756
  default_tax_rates: nil,
2607
757
  description: nil,
2608
758
  discounts: nil,
@@ -2612,20 +762,16 @@ module Stripe
2612
762
  header: nil,
2613
763
  invoice_settings: nil,
2614
764
  line_items: nil,
2615
- lines: nil,
2616
765
  metadata: nil,
2617
766
  on_behalf_of: nil,
2618
767
  subscription_data: nil,
2619
- subscription_data_overrides: nil,
2620
768
  transfer_data: nil
2621
769
  )
2622
- @allow_backdated_lines = allow_backdated_lines
2623
770
  @application_fee_amount = application_fee_amount
2624
771
  @application_fee_percent = application_fee_percent
2625
772
  @automatic_tax = automatic_tax
2626
773
  @collection_method = collection_method
2627
774
  @customer = customer
2628
- @customer_account = customer_account
2629
775
  @default_tax_rates = default_tax_rates
2630
776
  @description = description
2631
777
  @discounts = discounts
@@ -2635,11 +781,9 @@ module Stripe
2635
781
  @header = header
2636
782
  @invoice_settings = invoice_settings
2637
783
  @line_items = line_items
2638
- @lines = lines
2639
784
  @metadata = metadata
2640
785
  @on_behalf_of = on_behalf_of
2641
786
  @subscription_data = subscription_data
2642
- @subscription_data_overrides = subscription_data_overrides
2643
787
  @transfer_data = transfer_data
2644
788
  end
2645
789
  end
@@ -2680,24 +824,6 @@ module Stripe
2680
824
  end
2681
825
  end
2682
826
 
2683
- class ListLinesParams < Stripe::RequestParams
2684
- # 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.
2685
- attr_accessor :ending_before
2686
- # Specifies which fields in the response should be expanded.
2687
- attr_accessor :expand
2688
- # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
2689
- attr_accessor :limit
2690
- # 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.
2691
- attr_accessor :starting_after
2692
-
2693
- def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
2694
- @ending_before = ending_before
2695
- @expand = expand
2696
- @limit = limit
2697
- @starting_after = starting_after
2698
- end
2699
- end
2700
-
2701
827
  class AcceptParams < Stripe::RequestParams
2702
828
  # Specifies which fields in the response should be expanded.
2703
829
  attr_accessor :expand
@@ -2728,36 +854,6 @@ module Stripe
2728
854
  end
2729
855
  end
2730
856
 
2731
- class MarkDraftParams < Stripe::RequestParams
2732
- # Specifies which fields in the response should be expanded.
2733
- attr_accessor :expand
2734
-
2735
- def initialize(expand: nil)
2736
- @expand = expand
2737
- end
2738
- end
2739
-
2740
- class MarkStaleParams < Stripe::RequestParams
2741
- # Specifies which fields in the response should be expanded.
2742
- attr_accessor :expand
2743
- # Reason the Quote is being marked stale.
2744
- attr_accessor :reason
2745
-
2746
- def initialize(expand: nil, reason: nil)
2747
- @expand = expand
2748
- @reason = reason
2749
- end
2750
- end
2751
-
2752
- class ReestimateParams < Stripe::RequestParams
2753
- # Specifies which fields in the response should be expanded.
2754
- attr_accessor :expand
2755
-
2756
- def initialize(expand: nil)
2757
- @expand = expand
2758
- end
2759
- end
2760
-
2761
857
  class PdfParams < Stripe::RequestParams
2762
858
  # Specifies which fields in the response should be expanded.
2763
859
  attr_accessor :expand
@@ -2766,26 +862,6 @@ module Stripe
2766
862
  @expand = expand
2767
863
  end
2768
864
  end
2769
-
2770
- class ListPreviewInvoiceLinesParams < Stripe::RequestParams
2771
- # 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.
2772
- attr_accessor :ending_before
2773
- # Specifies which fields in the response should be expanded.
2774
- attr_accessor :expand
2775
- # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
2776
- attr_accessor :limit
2777
- # 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.
2778
- attr_accessor :starting_after
2779
-
2780
- def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
2781
- @ending_before = ending_before
2782
- @expand = expand
2783
- @limit = limit
2784
- @starting_after = starting_after
2785
- end
2786
- end
2787
- # Allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
2788
- attr_reader :allow_backdated_lines
2789
865
  # Total before any discounts or taxes are applied.
2790
866
  attr_reader :amount_subtotal
2791
867
  # Total after discounts and taxes are applied.
@@ -2808,8 +884,6 @@ module Stripe
2808
884
  attr_reader :currency
2809
885
  # The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
2810
886
  attr_reader :customer
2811
- # The account which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
2812
- attr_reader :customer_account
2813
887
  # The tax rates applied to this quote.
2814
888
  attr_reader :default_tax_rates
2815
889
  # A description that will be displayed on the quote PDF.
@@ -2832,8 +906,6 @@ module Stripe
2832
906
  attr_reader :invoice_settings
2833
907
  # A list of items the customer is being quoted for.
2834
908
  attr_reader :line_items
2835
- # 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.
2836
- attr_reader :lines
2837
909
  # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
2838
910
  attr_reader :livemode
2839
911
  # 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.
@@ -2846,20 +918,14 @@ module Stripe
2846
918
  attr_reader :on_behalf_of
2847
919
  # The status of the quote.
2848
920
  attr_reader :status
2849
- # Details on when and why a quote has been marked as stale or canceled.
2850
- attr_reader :status_details
2851
921
  # Attribute for field status_transitions
2852
922
  attr_reader :status_transitions
2853
923
  # The subscription that was created or updated from this quote.
2854
924
  attr_reader :subscription
2855
925
  # Attribute for field subscription_data
2856
926
  attr_reader :subscription_data
2857
- # List representing overrides for `subscription_data` configurations for specific subscription schedules.
2858
- attr_reader :subscription_data_overrides
2859
927
  # The subscription schedule that was created or updated from this quote.
2860
928
  attr_reader :subscription_schedule
2861
- # The subscription schedules that were created or updated from this quote.
2862
- attr_reader :subscription_schedules
2863
929
  # ID of the test clock this quote belongs to.
2864
930
  attr_reader :test_clock
2865
931
  # Attribute for field total_details
@@ -2977,86 +1043,6 @@ module Stripe
2977
1043
  )
2978
1044
  end
2979
1045
 
2980
- # Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
2981
- def list_lines(params = {}, opts = {})
2982
- request_stripe_object(
2983
- method: :get,
2984
- path: format("/v1/quotes/%<quote>s/lines", { quote: CGI.escape(self["id"]) }),
2985
- params: params,
2986
- opts: opts
2987
- )
2988
- end
2989
-
2990
- # Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
2991
- def self.list_lines(quote, params = {}, opts = {})
2992
- request_stripe_object(
2993
- method: :get,
2994
- path: format("/v1/quotes/%<quote>s/lines", { quote: CGI.escape(quote) }),
2995
- params: params,
2996
- opts: opts
2997
- )
2998
- end
2999
-
3000
- # Preview the invoice line items that would be generated by accepting the quote.
3001
- def list_preview_invoice_lines(preview_invoice, params = {}, opts = {})
3002
- request_stripe_object(
3003
- method: :get,
3004
- path: format("/v1/quotes/%<quote>s/preview_invoices/%<preview_invoice>s/lines", { quote: CGI.escape(self["id"]), preview_invoice: CGI.escape(preview_invoice) }),
3005
- params: params,
3006
- opts: opts
3007
- )
3008
- end
3009
-
3010
- # Preview the invoice line items that would be generated by accepting the quote.
3011
- def self.list_preview_invoice_lines(quote, preview_invoice, params = {}, opts = {})
3012
- request_stripe_object(
3013
- method: :get,
3014
- path: format("/v1/quotes/%<quote>s/preview_invoices/%<preview_invoice>s/lines", { quote: CGI.escape(quote), preview_invoice: CGI.escape(preview_invoice) }),
3015
- params: params,
3016
- opts: opts
3017
- )
3018
- end
3019
-
3020
- # Converts a stale quote to draft.
3021
- def mark_draft(params = {}, opts = {})
3022
- request_stripe_object(
3023
- method: :post,
3024
- path: format("/v1/quotes/%<quote>s/mark_draft", { quote: CGI.escape(self["id"]) }),
3025
- params: params,
3026
- opts: opts
3027
- )
3028
- end
3029
-
3030
- # Converts a stale quote to draft.
3031
- def self.mark_draft(quote, params = {}, opts = {})
3032
- request_stripe_object(
3033
- method: :post,
3034
- path: format("/v1/quotes/%<quote>s/mark_draft", { quote: CGI.escape(quote) }),
3035
- params: params,
3036
- opts: opts
3037
- )
3038
- end
3039
-
3040
- # Converts a draft or open quote to stale.
3041
- def mark_stale(params = {}, opts = {})
3042
- request_stripe_object(
3043
- method: :post,
3044
- path: format("/v1/quotes/%<quote>s/mark_stale", { quote: CGI.escape(self["id"]) }),
3045
- params: params,
3046
- opts: opts
3047
- )
3048
- end
3049
-
3050
- # Converts a draft or open quote to stale.
3051
- def self.mark_stale(quote, params = {}, opts = {})
3052
- request_stripe_object(
3053
- method: :post,
3054
- path: format("/v1/quotes/%<quote>s/mark_stale", { quote: CGI.escape(quote) }),
3055
- params: params,
3056
- opts: opts
3057
- )
3058
- end
3059
-
3060
1046
  # Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
3061
1047
  def pdf(params = {}, opts = {}, &read_body_chunk_block)
3062
1048
  opts = { api_base: APIRequestor.active_requestor.config.uploads_base }.merge(opts)
@@ -3083,26 +1069,6 @@ module Stripe
3083
1069
  )
3084
1070
  end
3085
1071
 
3086
- # Recompute the upcoming invoice estimate for the quote.
3087
- def reestimate(params = {}, opts = {})
3088
- request_stripe_object(
3089
- method: :post,
3090
- path: format("/v1/quotes/%<quote>s/reestimate", { quote: CGI.escape(self["id"]) }),
3091
- params: params,
3092
- opts: opts
3093
- )
3094
- end
3095
-
3096
- # Recompute the upcoming invoice estimate for the quote.
3097
- def self.reestimate(quote, params = {}, opts = {})
3098
- request_stripe_object(
3099
- method: :post,
3100
- path: format("/v1/quotes/%<quote>s/reestimate", { quote: CGI.escape(quote) }),
3101
- params: params,
3102
- opts: opts
3103
- )
3104
- end
3105
-
3106
1072
  # A quote models prices and services for a customer.
3107
1073
  def self.update(quote, params = {}, opts = {})
3108
1074
  request_stripe_object(