stripe 17.2.0-beta.2 → 17.2.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 (178) hide show
  1. package/CHANGELOG.md +112 -900
  2. package/README.md +4 -4
  3. package/VERSION +1 -1
  4. package/cjs/resources/FinancialConnections/Accounts.js +0 -5
  5. package/cjs/resources/Invoices.js +0 -17
  6. package/cjs/resources/PaymentIntents.js +0 -4
  7. package/cjs/resources/Quotes.js +0 -32
  8. package/cjs/resources/SubscriptionSchedules.js +0 -4
  9. package/cjs/resources/Terminal/Readers.js +0 -12
  10. package/cjs/resources/TestHelpers/Issuing/Cards.js +0 -4
  11. package/cjs/resources/V2/Core/Events.js +50 -7
  12. package/cjs/resources.js +10 -42
  13. package/cjs/stripe.core.js +1 -1
  14. package/esm/resources/FinancialConnections/Accounts.js +0 -5
  15. package/esm/resources/Invoices.js +0 -17
  16. package/esm/resources/PaymentIntents.js +0 -4
  17. package/esm/resources/Quotes.js +0 -32
  18. package/esm/resources/SubscriptionSchedules.js +0 -4
  19. package/esm/resources/Terminal/Readers.js +0 -12
  20. package/esm/resources/TestHelpers/Issuing/Cards.js +0 -4
  21. package/esm/resources/V2/Core/Events.js +50 -7
  22. package/esm/resources.js +0 -29
  23. package/esm/stripe.core.js +1 -1
  24. package/package.json +1 -1
  25. package/types/AccountLinksResource.d.ts +1 -5
  26. package/types/AccountSessions.d.ts +5 -75
  27. package/types/AccountSessionsResource.d.ts +5 -354
  28. package/types/Accounts.d.ts +3 -127
  29. package/types/AccountsResource.d.ts +2 -296
  30. package/types/Billing/CreditGrants.d.ts +2 -2
  31. package/types/Billing/CreditGrantsResource.d.ts +2 -2
  32. package/types/Billing/Meters.d.ts +0 -2
  33. package/types/Charges.d.ts +0 -152
  34. package/types/ChargesResource.d.ts +0 -1294
  35. package/types/Checkout/Sessions.d.ts +5 -309
  36. package/types/Checkout/SessionsResource.d.ts +5 -356
  37. package/types/ConfirmationTokens.d.ts +0 -137
  38. package/types/Coupons.d.ts +1 -1
  39. package/types/CouponsResource.d.ts +1 -1
  40. package/types/CreditNotes.d.ts +0 -21
  41. package/types/CreditNotesResource.d.ts +0 -51
  42. package/types/CustomersResource.d.ts +2 -22
  43. package/types/Disputes.d.ts +0 -152
  44. package/types/DisputesResource.d.ts +0 -120
  45. package/types/EventTypes.d.ts +2 -564
  46. package/types/Events.d.ts +0 -91
  47. package/types/FinancialConnections/Accounts.d.ts +1 -29
  48. package/types/FinancialConnections/AccountsResource.d.ts +3 -35
  49. package/types/FinancialConnections/Sessions.d.ts +1 -49
  50. package/types/FinancialConnections/SessionsResource.d.ts +1 -38
  51. package/types/Forwarding/Requests.d.ts +0 -5
  52. package/types/InvoiceItems.d.ts +0 -5
  53. package/types/InvoiceItemsResource.d.ts +0 -98
  54. package/types/InvoiceLineItems.d.ts +1 -31
  55. package/types/Invoices.d.ts +3 -134
  56. package/types/InvoicesResource.d.ts +1836 -5515
  57. package/types/Issuing/Authorizations.d.ts +1 -1
  58. package/types/Issuing/AuthorizationsResource.d.ts +1 -1
  59. package/types/Issuing/CardholdersResource.d.ts +1 -2
  60. package/types/Issuing/Transactions.d.ts +0 -2
  61. package/types/Issuing/TransactionsResource.d.ts +0 -5
  62. package/types/LineItems.d.ts +0 -7
  63. package/types/Mandates.d.ts +0 -85
  64. package/types/PaymentIntents.d.ts +1 -643
  65. package/types/PaymentIntentsResource.d.ts +3463 -7739
  66. package/types/PaymentLinks.d.ts +0 -3
  67. package/types/PaymentLinksResource.d.ts +0 -6
  68. package/types/PaymentMethodConfigurations.d.ts +0 -36
  69. package/types/PaymentMethodConfigurationsResource.d.ts +2 -52
  70. package/types/PaymentMethods.d.ts +0 -137
  71. package/types/PaymentMethodsResource.d.ts +0 -158
  72. package/types/Persons.d.ts +1 -1
  73. package/types/Prices.d.ts +0 -22
  74. package/types/PricesResource.d.ts +0 -22
  75. package/types/Products.d.ts +0 -39
  76. package/types/ProductsResource.d.ts +0 -36
  77. package/types/Quotes.d.ts +1 -591
  78. package/types/QuotesResource.d.ts +199 -2531
  79. package/types/SetupAttempts.d.ts +0 -19
  80. package/types/SetupIntents.d.ts +1 -112
  81. package/types/SetupIntentsResource.d.ts +3 -669
  82. package/types/Sources.d.ts +0 -23
  83. package/types/SubscriptionItems.d.ts +0 -21
  84. package/types/SubscriptionItemsResource.d.ts +0 -109
  85. package/types/SubscriptionSchedules.d.ts +0 -200
  86. package/types/SubscriptionSchedulesResource.d.ts +13 -1231
  87. package/types/Subscriptions.d.ts +1 -82
  88. package/types/SubscriptionsResource.d.ts +3 -348
  89. package/types/Tax/CalculationLineItems.d.ts +0 -1
  90. package/types/Tax/Calculations.d.ts +1 -33
  91. package/types/Tax/CalculationsResource.d.ts +1 -7
  92. package/types/Tax/Registrations.d.ts +0 -82
  93. package/types/Tax/RegistrationsResource.d.ts +0 -109
  94. package/types/Tax/Transactions.d.ts +1 -8
  95. package/types/TaxIds.d.ts +1 -7
  96. package/types/TaxIdsResource.d.ts +1 -7
  97. package/types/TaxRates.d.ts +0 -25
  98. package/types/TaxRatesResource.d.ts +0 -2
  99. package/types/Terminal/Readers.d.ts +0 -278
  100. package/types/Terminal/ReadersResource.d.ts +0 -215
  101. package/types/TestHelpers/ConfirmationTokensResource.d.ts +0 -112
  102. package/types/TestHelpers/Issuing/CardsResource.d.ts +0 -22
  103. package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +0 -26
  104. package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +0 -26
  105. package/types/TokensResource.d.ts +1 -1
  106. package/types/Treasury/FinancialAccounts.d.ts +1 -6
  107. package/types/Treasury/FinancialAccountsResource.d.ts +0 -10
  108. package/types/Treasury/OutboundTransfers.d.ts +0 -26
  109. package/types/Treasury/OutboundTransfersResource.d.ts +0 -26
  110. package/types/Treasury/ReceivedCredits.d.ts +0 -26
  111. package/types/Treasury/ReceivedDebits.d.ts +0 -31
  112. package/types/UsageRecordSummaries.d.ts +1 -1
  113. package/types/V2/EventTypes.d.ts +3 -1
  114. package/types/WebhookEndpointsResource.d.ts +0 -66
  115. package/types/index.d.ts +0 -53
  116. package/cjs/resources/AccountNotices.js +0 -21
  117. package/cjs/resources/Capital/FinancingOffers.js +0 -21
  118. package/cjs/resources/Capital/FinancingSummary.js +0 -12
  119. package/cjs/resources/Capital/FinancingTransactions.js +0 -17
  120. package/cjs/resources/FinancialConnections/Institutions.js +0 -17
  121. package/cjs/resources/GiftCards/Cards.js +0 -23
  122. package/cjs/resources/GiftCards/Transactions.js +0 -33
  123. package/cjs/resources/Issuing/CreditUnderwritingRecords.js +0 -33
  124. package/cjs/resources/Issuing/DisputeSettlementDetails.js +0 -17
  125. package/cjs/resources/Margins.js +0 -22
  126. package/cjs/resources/Orders.js +0 -24
  127. package/cjs/resources/Tax/Associations.js +0 -9
  128. package/cjs/resources/Tax/Forms.js +0 -20
  129. package/cjs/resources/Terminal/ReaderCollectedData.js +0 -12
  130. package/esm/resources/AccountNotices.js +0 -18
  131. package/esm/resources/Capital/FinancingOffers.js +0 -18
  132. package/esm/resources/Capital/FinancingSummary.js +0 -9
  133. package/esm/resources/Capital/FinancingTransactions.js +0 -14
  134. package/esm/resources/FinancialConnections/Institutions.js +0 -14
  135. package/esm/resources/GiftCards/Cards.js +0 -20
  136. package/esm/resources/GiftCards/Transactions.js +0 -30
  137. package/esm/resources/Issuing/CreditUnderwritingRecords.js +0 -30
  138. package/esm/resources/Issuing/DisputeSettlementDetails.js +0 -14
  139. package/esm/resources/Margins.js +0 -19
  140. package/esm/resources/Orders.js +0 -21
  141. package/esm/resources/Tax/Associations.js +0 -6
  142. package/esm/resources/Tax/Forms.js +0 -17
  143. package/esm/resources/Terminal/ReaderCollectedData.js +0 -9
  144. package/types/AccountNotices.d.ts +0 -113
  145. package/types/AccountNoticesResource.d.ts +0 -98
  146. package/types/Billing/MeterErrorReports.d.ts +0 -106
  147. package/types/Capital/FinancingOffers.d.ts +0 -188
  148. package/types/Capital/FinancingOffersResource.d.ts +0 -97
  149. package/types/Capital/FinancingSummary.d.ts +0 -106
  150. package/types/Capital/FinancingSummaryResource.d.ts +0 -27
  151. package/types/Capital/FinancingTransactions.d.ts +0 -135
  152. package/types/Capital/FinancingTransactionsResource.d.ts +0 -68
  153. package/types/FinancialConnections/AccountInferredBalances.d.ts +0 -38
  154. package/types/FinancialConnections/Institutions.d.ts +0 -93
  155. package/types/FinancialConnections/InstitutionsResource.d.ts +0 -47
  156. package/types/GiftCards/Cards.d.ts +0 -118
  157. package/types/GiftCards/CardsResource.d.ts +0 -159
  158. package/types/GiftCards/Transactions.d.ts +0 -129
  159. package/types/GiftCards/TransactionsResource.d.ts +0 -201
  160. package/types/InvoicePayments.d.ts +0 -138
  161. package/types/Issuing/CreditUnderwritingRecords.d.ts +0 -451
  162. package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +0 -1032
  163. package/types/Issuing/DisputeSettlementDetails.d.ts +0 -73
  164. package/types/Issuing/DisputeSettlementDetailsResource.d.ts +0 -52
  165. package/types/Issuing/Settlements.d.ts +0 -103
  166. package/types/Margins.d.ts +0 -56
  167. package/types/MarginsResource.d.ts +0 -114
  168. package/types/Orders.d.ts +0 -1154
  169. package/types/OrdersResource.d.ts +0 -2911
  170. package/types/QuoteLines.d.ts +0 -634
  171. package/types/QuotePreviewInvoices.d.ts +0 -1596
  172. package/types/QuotePreviewSubscriptionSchedules.d.ts +0 -814
  173. package/types/Tax/Associations.d.ts +0 -126
  174. package/types/Tax/AssociationsResource.d.ts +0 -29
  175. package/types/Tax/Forms.d.ts +0 -133
  176. package/types/Tax/FormsResource.d.ts +0 -90
  177. package/types/Terminal/ReaderCollectedData.d.ts +0 -51
  178. package/types/Terminal/ReaderCollectedDataResource.d.ts +0 -29
package/types/Quotes.d.ts CHANGED
@@ -17,11 +17,6 @@ declare module 'stripe' {
17
17
  */
18
18
  object: 'quote';
19
19
 
20
- /**
21
- * Allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
22
- */
23
- allow_backdated_lines?: boolean | null;
24
-
25
20
  /**
26
21
  * Total before any discounts or taxes are applied.
27
22
  */
@@ -122,11 +117,6 @@ declare module 'stripe' {
122
117
  */
123
118
  line_items?: ApiList<Stripe.LineItem>;
124
119
 
125
- /**
126
- * 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.
127
- */
128
- lines?: Array<string> | null;
129
-
130
120
  /**
131
121
  * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
132
122
  */
@@ -152,11 +142,6 @@ declare module 'stripe' {
152
142
  */
153
143
  status: Quote.Status;
154
144
 
155
- /**
156
- * Details on when and why a quote has been marked as stale or canceled.
157
- */
158
- status_details?: Quote.StatusDetails | null;
159
-
160
145
  status_transitions: Quote.StatusTransitions;
161
146
 
162
147
  /**
@@ -166,23 +151,11 @@ declare module 'stripe' {
166
151
 
167
152
  subscription_data: Quote.SubscriptionData;
168
153
 
169
- /**
170
- * List representing overrides for `subscription_data` configurations for specific subscription schedules.
171
- */
172
- subscription_data_overrides?: Array<
173
- Quote.SubscriptionDataOverride
174
- > | null;
175
-
176
154
  /**
177
155
  * The subscription schedule that was created or updated from this quote.
178
156
  */
179
157
  subscription_schedule: string | Stripe.SubscriptionSchedule | null;
180
158
 
181
- /**
182
- * The subscription schedules that were created or updated from this quote.
183
- */
184
- subscription_schedules?: Array<Quote.SubscriptionSchedule> | null;
185
-
186
159
  /**
187
160
  * ID of the test clock this quote belongs to.
188
161
  */
@@ -237,62 +210,15 @@ declare module 'stripe' {
237
210
  type CollectionMethod = 'charge_automatically' | 'send_invoice';
238
211
 
239
212
  interface Computed {
240
- /**
241
- * Details of the most recent reestimate of the quote's preview schedules and upcoming invoices, including the status of Stripe's calculation.
242
- */
243
- last_reestimation_details?: Computed.LastReestimationDetails | null;
244
-
245
213
  /**
246
214
  * 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.
247
215
  */
248
216
  recurring: Computed.Recurring | null;
249
217
 
250
- /**
251
- * The time at which the quote's estimated schedules and upcoming invoices were generated.
252
- */
253
- updated_at?: number | null;
254
-
255
218
  upfront: Computed.Upfront;
256
219
  }
257
220
 
258
221
  namespace Computed {
259
- interface LastReestimationDetails {
260
- /**
261
- * When `status` is `failed`, provides details about the quote reestimation failure.
262
- */
263
- failed: LastReestimationDetails.Failed | null;
264
-
265
- /**
266
- * Latest status of the reestimation.
267
- */
268
- status: LastReestimationDetails.Status;
269
- }
270
-
271
- namespace LastReestimationDetails {
272
- interface Failed {
273
- /**
274
- * 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.
275
- */
276
- failure_code: string | null;
277
-
278
- /**
279
- * 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".
280
- */
281
- message: string | null;
282
-
283
- /**
284
- * The reason the reestimation failed.
285
- */
286
- reason: Failed.Reason;
287
- }
288
-
289
- namespace Failed {
290
- type Reason = 'automation_failure' | 'internal_error';
291
- }
292
-
293
- type Status = 'failed' | 'in_progress' | 'succeeded';
294
- }
295
-
296
222
  interface Recurring {
297
223
  /**
298
224
  * Total before any discounts or taxes are applied.
@@ -568,153 +494,7 @@ declare module 'stripe' {
568
494
  }
569
495
  }
570
496
 
571
- type Status =
572
- | 'accepted'
573
- | 'accepting'
574
- | 'canceled'
575
- | 'draft'
576
- | 'open'
577
- | 'stale';
578
-
579
- interface StatusDetails {
580
- canceled?: StatusDetails.Canceled;
581
-
582
- stale?: StatusDetails.Stale;
583
- }
584
-
585
- namespace StatusDetails {
586
- interface Canceled {
587
- /**
588
- * The reason this quote was marked as canceled.
589
- */
590
- reason: Canceled.Reason | null;
591
-
592
- /**
593
- * Time at which the quote was marked as canceled. Measured in seconds since the Unix epoch.
594
- */
595
- transitioned_at: number | null;
596
- }
597
-
598
- namespace Canceled {
599
- type Reason =
600
- | 'canceled'
601
- | 'quote_accepted'
602
- | 'quote_expired'
603
- | 'quote_superseded'
604
- | 'subscription_canceled';
605
- }
606
-
607
- interface Stale {
608
- /**
609
- * Time at which the quote expires. Measured in seconds since the Unix epoch.
610
- */
611
- expires_at: number | null;
612
-
613
- /**
614
- * The most recent reason this quote was marked as stale.
615
- */
616
- last_reason: Stale.LastReason | null;
617
-
618
- /**
619
- * Time at which the stale reason was updated. Measured in seconds since the Unix epoch.
620
- */
621
- last_updated_at: number | null;
622
-
623
- /**
624
- * Time at which the quote was marked as stale. Measured in seconds since the Unix epoch.
625
- */
626
- transitioned_at: number | null;
627
- }
628
-
629
- namespace Stale {
630
- interface LastReason {
631
- /**
632
- * The ID of the line that is invalid if the stale reason type is `line_invalid`.
633
- */
634
- line_invalid?: string;
635
-
636
- /**
637
- * The IDs of the lines that are invalid if the stale reason type is `lines_invalid`.
638
- */
639
- lines_invalid?: Array<LastReason.LinesInvalid>;
640
-
641
- /**
642
- * The user supplied mark stale reason.
643
- */
644
- marked_stale?: string | null;
645
-
646
- /**
647
- * The ID of the subscription that was canceled.
648
- */
649
- subscription_canceled?: string;
650
-
651
- subscription_changed?: LastReason.SubscriptionChanged;
652
-
653
- /**
654
- * The ID of the subscription that was expired.
655
- */
656
- subscription_expired?: string;
657
-
658
- /**
659
- * The ID of the subscription schedule that was canceled.
660
- */
661
- subscription_schedule_canceled?: string;
662
-
663
- subscription_schedule_changed?: LastReason.SubscriptionScheduleChanged;
664
-
665
- /**
666
- * The ID of the subscription schedule that was released.
667
- */
668
- subscription_schedule_released?: string;
669
-
670
- /**
671
- * The reason the quote was marked as stale.
672
- */
673
- type: LastReason.Type | null;
674
- }
675
-
676
- namespace LastReason {
677
- interface LinesInvalid {
678
- /**
679
- * The timestamp at which the lines were marked as invalid.
680
- */
681
- invalid_at: number;
682
-
683
- /**
684
- * The list of lines that became invalid at the given timestamp.
685
- */
686
- lines: Array<string>;
687
- }
688
-
689
- interface SubscriptionChanged {
690
- /**
691
- * The subscription's state before the quote was marked as stale.
692
- */
693
- previous_subscription: Stripe.Subscription | null;
694
- }
695
-
696
- interface SubscriptionScheduleChanged {
697
- /**
698
- * The subscription schedule's state before the quote was marked as stale.
699
- */
700
- previous_subscription_schedule: Stripe.SubscriptionSchedule | null;
701
- }
702
-
703
- type Type =
704
- | 'accept_failed_validations'
705
- | 'bill_on_acceptance_invalid'
706
- | 'line_invalid'
707
- | 'lines_invalid'
708
- | 'marked_stale'
709
- | 'subscription_canceled'
710
- | 'subscription_changed'
711
- | 'subscription_expired'
712
- | 'subscription_schedule_canceled'
713
- | 'subscription_schedule_changed'
714
- | 'subscription_schedule_released';
715
- }
716
- }
717
- }
497
+ type Status = 'accepted' | 'canceled' | 'draft' | 'open';
718
498
 
719
499
  interface StatusTransitions {
720
500
  /**
@@ -734,21 +514,6 @@ declare module 'stripe' {
734
514
  }
735
515
 
736
516
  interface SubscriptionData {
737
- /**
738
- * Describes the period to bill for upon accepting the quote.
739
- */
740
- bill_on_acceptance?: SubscriptionData.BillOnAcceptance | null;
741
-
742
- /**
743
- * 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.
744
- */
745
- billing_behavior?: SubscriptionData.BillingBehavior;
746
-
747
- /**
748
- * Whether the subscription will always start a new billing period when the quote is accepted.
749
- */
750
- billing_cycle_anchor?: 'reset' | null;
751
-
752
517
  /**
753
518
  * 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.
754
519
  */
@@ -759,372 +524,17 @@ declare module 'stripe' {
759
524
  */
760
525
  effective_date: number | null;
761
526
 
762
- /**
763
- * Behavior of the subscription schedule and underlying subscription when it ends.
764
- */
765
- end_behavior?: SubscriptionData.EndBehavior | null;
766
-
767
- /**
768
- * The id of the subscription that will be updated when the quote is accepted.
769
- */
770
- from_subscription?: string | Stripe.Subscription | null;
771
-
772
527
  /**
773
528
  * 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.
774
529
  */
775
530
  metadata: Stripe.Metadata | null;
776
531
 
777
- /**
778
- * If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
779
- */
780
- prebilling?: SubscriptionData.Prebilling | null;
781
-
782
- /**
783
- * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
784
- */
785
- proration_behavior?: SubscriptionData.ProrationBehavior;
786
-
787
532
  /**
788
533
  * Integer representing the number of trial period days before the customer is charged for the first time.
789
534
  */
790
535
  trial_period_days: number | null;
791
536
  }
792
537
 
793
- namespace SubscriptionData {
794
- type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
795
-
796
- interface BillOnAcceptance {
797
- /**
798
- * The start of the period to bill from when the Quote is accepted.
799
- */
800
- bill_from: BillOnAcceptance.BillFrom | null;
801
-
802
- /**
803
- * The end of the period to bill until when the Quote is accepted.
804
- */
805
- bill_until: BillOnAcceptance.BillUntil | null;
806
- }
807
-
808
- namespace BillOnAcceptance {
809
- interface BillFrom {
810
- /**
811
- * The materialized time.
812
- */
813
- computed: number | null;
814
-
815
- /**
816
- * The timestamp the given line starts at.
817
- */
818
- line_starts_at: BillFrom.LineStartsAt | null;
819
-
820
- /**
821
- * A precise Unix timestamp.
822
- */
823
- timestamp: number | null;
824
-
825
- /**
826
- * The type of method to specify the `bill_from` time.
827
- */
828
- type: BillFrom.Type;
829
- }
830
-
831
- namespace BillFrom {
832
- interface LineStartsAt {
833
- /**
834
- * Unique identifier for the object.
835
- */
836
- id: string;
837
- }
838
-
839
- type Type =
840
- | 'line_starts_at'
841
- | 'now'
842
- | 'pause_collection_start'
843
- | 'quote_acceptance_date'
844
- | 'timestamp';
845
- }
846
-
847
- interface BillUntil {
848
- /**
849
- * The materialized time.
850
- */
851
- computed: number | null;
852
-
853
- /**
854
- * Time span for the quote line starting from the `starts_at` date.
855
- */
856
- duration: BillUntil.Duration | null;
857
-
858
- /**
859
- * The timestamp the given line ends at.
860
- */
861
- line_ends_at: BillUntil.LineEndsAt | null;
862
-
863
- /**
864
- * A precise Unix timestamp.
865
- */
866
- timestamp: number | null;
867
-
868
- /**
869
- * The type of method to specify the `bill_until` time.
870
- */
871
- type: BillUntil.Type;
872
- }
873
-
874
- namespace BillUntil {
875
- interface Duration {
876
- /**
877
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
878
- */
879
- interval: Duration.Interval;
880
-
881
- /**
882
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
883
- */
884
- interval_count: number;
885
- }
886
-
887
- namespace Duration {
888
- type Interval = 'day' | 'month' | 'week' | 'year';
889
- }
890
-
891
- interface LineEndsAt {
892
- /**
893
- * Unique identifier for the object.
894
- */
895
- id: string;
896
- }
897
-
898
- type Type =
899
- | 'duration'
900
- | 'line_ends_at'
901
- | 'schedule_end'
902
- | 'timestamp'
903
- | 'upcoming_invoice';
904
- }
905
- }
906
-
907
- type EndBehavior = 'cancel' | 'release';
908
-
909
- interface Prebilling {
910
- iterations: number;
911
- }
912
-
913
- type ProrationBehavior =
914
- | 'always_invoice'
915
- | 'create_prorations'
916
- | 'none';
917
- }
918
-
919
- interface SubscriptionDataOverride {
920
- applies_to: SubscriptionDataOverride.AppliesTo;
921
-
922
- /**
923
- * Describes the period to bill for upon accepting the quote.
924
- */
925
- bill_on_acceptance?: SubscriptionDataOverride.BillOnAcceptance | null;
926
-
927
- /**
928
- * 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.
929
- */
930
- billing_behavior?: SubscriptionDataOverride.BillingBehavior;
931
-
932
- /**
933
- * The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
934
- */
935
- customer: string | null;
936
-
937
- /**
938
- * 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.
939
- */
940
- description: string | null;
941
-
942
- /**
943
- * Behavior of the subscription schedule and underlying subscription when it ends.
944
- */
945
- end_behavior?: SubscriptionDataOverride.EndBehavior | null;
946
-
947
- /**
948
- * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
949
- */
950
- proration_behavior?: SubscriptionDataOverride.ProrationBehavior | null;
951
- }
952
-
953
- namespace SubscriptionDataOverride {
954
- interface AppliesTo {
955
- /**
956
- * 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.
957
- */
958
- new_reference: string | null;
959
-
960
- /**
961
- * The ID of the schedule the line applies to.
962
- */
963
- subscription_schedule: string | null;
964
-
965
- /**
966
- * Describes whether the quote line is affecting a new schedule or an existing schedule.
967
- */
968
- type: AppliesTo.Type;
969
- }
970
-
971
- namespace AppliesTo {
972
- type Type = 'new_reference' | 'subscription_schedule';
973
- }
974
-
975
- type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
976
-
977
- interface BillOnAcceptance {
978
- /**
979
- * The start of the period to bill from when the Quote is accepted.
980
- */
981
- bill_from: BillOnAcceptance.BillFrom | null;
982
-
983
- /**
984
- * The end of the period to bill until when the Quote is accepted.
985
- */
986
- bill_until: BillOnAcceptance.BillUntil | null;
987
- }
988
-
989
- namespace BillOnAcceptance {
990
- interface BillFrom {
991
- /**
992
- * The materialized time.
993
- */
994
- computed: number | null;
995
-
996
- /**
997
- * The timestamp the given line starts at.
998
- */
999
- line_starts_at: BillFrom.LineStartsAt | null;
1000
-
1001
- /**
1002
- * A precise Unix timestamp.
1003
- */
1004
- timestamp: number | null;
1005
-
1006
- /**
1007
- * The type of method to specify the `bill_from` time.
1008
- */
1009
- type: BillFrom.Type;
1010
- }
1011
-
1012
- namespace BillFrom {
1013
- interface LineStartsAt {
1014
- /**
1015
- * Unique identifier for the object.
1016
- */
1017
- id: string;
1018
- }
1019
-
1020
- type Type =
1021
- | 'line_starts_at'
1022
- | 'now'
1023
- | 'pause_collection_start'
1024
- | 'quote_acceptance_date'
1025
- | 'timestamp';
1026
- }
1027
-
1028
- interface BillUntil {
1029
- /**
1030
- * The materialized time.
1031
- */
1032
- computed: number | null;
1033
-
1034
- /**
1035
- * Time span for the quote line starting from the `starts_at` date.
1036
- */
1037
- duration: BillUntil.Duration | null;
1038
-
1039
- /**
1040
- * The timestamp the given line ends at.
1041
- */
1042
- line_ends_at: BillUntil.LineEndsAt | null;
1043
-
1044
- /**
1045
- * A precise Unix timestamp.
1046
- */
1047
- timestamp: number | null;
1048
-
1049
- /**
1050
- * The type of method to specify the `bill_until` time.
1051
- */
1052
- type: BillUntil.Type;
1053
- }
1054
-
1055
- namespace BillUntil {
1056
- interface Duration {
1057
- /**
1058
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1059
- */
1060
- interval: Duration.Interval;
1061
-
1062
- /**
1063
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1064
- */
1065
- interval_count: number;
1066
- }
1067
-
1068
- namespace Duration {
1069
- type Interval = 'day' | 'month' | 'week' | 'year';
1070
- }
1071
-
1072
- interface LineEndsAt {
1073
- /**
1074
- * Unique identifier for the object.
1075
- */
1076
- id: string;
1077
- }
1078
-
1079
- type Type =
1080
- | 'duration'
1081
- | 'line_ends_at'
1082
- | 'schedule_end'
1083
- | 'timestamp'
1084
- | 'upcoming_invoice';
1085
- }
1086
- }
1087
-
1088
- type EndBehavior = 'cancel' | 'release';
1089
-
1090
- type ProrationBehavior =
1091
- | 'always_invoice'
1092
- | 'create_prorations'
1093
- | 'none';
1094
- }
1095
-
1096
- interface SubscriptionSchedule {
1097
- applies_to: SubscriptionSchedule.AppliesTo;
1098
-
1099
- /**
1100
- * The subscription schedule that was created or updated from this quote.
1101
- */
1102
- subscription_schedule: string;
1103
- }
1104
-
1105
- namespace SubscriptionSchedule {
1106
- interface AppliesTo {
1107
- /**
1108
- * 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.
1109
- */
1110
- new_reference: string | null;
1111
-
1112
- /**
1113
- * The ID of the schedule the line applies to.
1114
- */
1115
- subscription_schedule: string | null;
1116
-
1117
- /**
1118
- * Describes whether the quote line is affecting a new schedule or an existing schedule.
1119
- */
1120
- type: AppliesTo.Type;
1121
- }
1122
-
1123
- namespace AppliesTo {
1124
- type Type = 'new_reference' | 'subscription_schedule';
1125
- }
1126
- }
1127
-
1128
538
  interface TotalDetails {
1129
539
  /**
1130
540
  * This is the sum of all the discounts.