orb-billing 4.71.6 → 4.72.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 (42) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/index.d.mts +3 -0
  3. package/index.d.ts +3 -0
  4. package/index.d.ts.map +1 -1
  5. package/index.js +3 -0
  6. package/index.js.map +1 -1
  7. package/index.mjs +3 -0
  8. package/index.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/index.d.ts +1 -0
  11. package/resources/index.d.ts.map +1 -1
  12. package/resources/index.js +3 -1
  13. package/resources/index.js.map +1 -1
  14. package/resources/index.mjs +1 -0
  15. package/resources/index.mjs.map +1 -1
  16. package/resources/invoices.d.ts +3 -2
  17. package/resources/invoices.d.ts.map +1 -1
  18. package/resources/invoices.js.map +1 -1
  19. package/resources/invoices.mjs.map +1 -1
  20. package/resources/plans/plans.d.ts +4 -4
  21. package/resources/prices/prices.d.ts +8 -8
  22. package/resources/subscription-changes.d.ts +1707 -0
  23. package/resources/subscription-changes.d.ts.map +1 -0
  24. package/resources/subscription-changes.js +38 -0
  25. package/resources/subscription-changes.js.map +1 -0
  26. package/resources/subscription-changes.mjs +34 -0
  27. package/resources/subscription-changes.mjs.map +1 -0
  28. package/resources/subscriptions.d.ts +422 -20
  29. package/resources/subscriptions.d.ts.map +1 -1
  30. package/resources/subscriptions.js.map +1 -1
  31. package/resources/subscriptions.mjs.map +1 -1
  32. package/src/index.ts +17 -0
  33. package/src/resources/index.ts +7 -0
  34. package/src/resources/invoices.ts +3 -2
  35. package/src/resources/plans/plans.ts +4 -4
  36. package/src/resources/prices/prices.ts +8 -8
  37. package/src/resources/subscription-changes.ts +2167 -0
  38. package/src/resources/subscriptions.ts +494 -20
  39. package/src/version.ts +1 -1
  40. package/version.d.ts +1 -1
  41. package/version.js +1 -1
  42. package/version.mjs +1 -1
@@ -1,5 +1,7 @@
1
1
  import { APIResource } from "../resource.js";
2
2
  import * as Core from "../core.js";
3
+ import * as CreditNotesAPI from "./credit-notes.js";
4
+ import * as InvoicesAPI from "./invoices.js";
3
5
  import * as Shared from "./shared.js";
4
6
  import * as CustomersAPI from "./customers/customers.js";
5
7
  import * as PlansAPI from "./plans/plans.js";
@@ -1022,6 +1024,10 @@ export interface Subscription {
1022
1024
  * has a month to pay the invoice.
1023
1025
  */
1024
1026
  net_terms: number;
1027
+ /**
1028
+ * A pending subscription change if one exists on this subscription.
1029
+ */
1030
+ pending_subscription_change: Subscription.PendingSubscriptionChange | null;
1025
1031
  /**
1026
1032
  * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
1027
1033
  * subscribed to by a customer. Plans define the billing behavior of the
@@ -1337,6 +1343,12 @@ export declare namespace Subscription {
1337
1343
  */
1338
1344
  start_date: string;
1339
1345
  }
1346
+ /**
1347
+ * A pending subscription change if one exists on this subscription.
1348
+ */
1349
+ interface PendingSubscriptionChange {
1350
+ id: string;
1351
+ }
1340
1352
  /**
1341
1353
  * The Price Interval resource represents a period of time for which a price will
1342
1354
  * bill on a subscription. A subscription’s price intervals define its billing
@@ -1566,6 +1578,10 @@ export interface SubscriptionCreateResponse {
1566
1578
  * has a month to pay the invoice.
1567
1579
  */
1568
1580
  net_terms: number;
1581
+ /**
1582
+ * A pending subscription change if one exists on this subscription.
1583
+ */
1584
+ pending_subscription_change: SubscriptionCreateResponse.PendingSubscriptionChange | null;
1569
1585
  /**
1570
1586
  * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
1571
1587
  * subscribed to by a customer. Plans define the billing behavior of the
@@ -1584,6 +1600,12 @@ export interface SubscriptionCreateResponse {
1584
1600
  start_date: string;
1585
1601
  status: 'active' | 'ended' | 'upcoming';
1586
1602
  trial_info: SubscriptionCreateResponse.TrialInfo;
1603
+ /**
1604
+ * The resources that were changed as part of this operation. Only present when
1605
+ * fetched through the subscription changes API or if the
1606
+ * `include_changed_resources` parameter was passed in the request.
1607
+ */
1608
+ changed_resources?: SubscriptionCreateResponse.ChangedResources | null;
1587
1609
  }
1588
1610
  export declare namespace SubscriptionCreateResponse {
1589
1611
  interface AdjustmentInterval {
@@ -1881,6 +1903,12 @@ export declare namespace SubscriptionCreateResponse {
1881
1903
  */
1882
1904
  start_date: string;
1883
1905
  }
1906
+ /**
1907
+ * A pending subscription change if one exists on this subscription.
1908
+ */
1909
+ interface PendingSubscriptionChange {
1910
+ id: string;
1911
+ }
1884
1912
  /**
1885
1913
  * The Price Interval resource represents a period of time for which a price will
1886
1914
  * bill on a subscription. A subscription’s price intervals define its billing
@@ -1957,6 +1985,29 @@ export declare namespace SubscriptionCreateResponse {
1957
1985
  interface TrialInfo {
1958
1986
  end_date: string | null;
1959
1987
  }
1988
+ /**
1989
+ * The resources that were changed as part of this operation. Only present when
1990
+ * fetched through the subscription changes API or if the
1991
+ * `include_changed_resources` parameter was passed in the request.
1992
+ */
1993
+ interface ChangedResources {
1994
+ /**
1995
+ * The credit notes that were created as part of this operation.
1996
+ */
1997
+ created_credit_notes: Array<CreditNotesAPI.CreditNote>;
1998
+ /**
1999
+ * The invoices that were created as part of this operation.
2000
+ */
2001
+ created_invoices: Array<InvoicesAPI.Invoice>;
2002
+ /**
2003
+ * The credit notes that were voided as part of this operation.
2004
+ */
2005
+ voided_credit_notes: Array<CreditNotesAPI.CreditNote>;
2006
+ /**
2007
+ * The invoices that were voided as part of this operation.
2008
+ */
2009
+ voided_invoices: Array<InvoicesAPI.Invoice>;
2010
+ }
1960
2011
  }
1961
2012
  export interface SubscriptionCancelResponse {
1962
2013
  id: string;
@@ -2055,6 +2106,10 @@ export interface SubscriptionCancelResponse {
2055
2106
  * has a month to pay the invoice.
2056
2107
  */
2057
2108
  net_terms: number;
2109
+ /**
2110
+ * A pending subscription change if one exists on this subscription.
2111
+ */
2112
+ pending_subscription_change: SubscriptionCancelResponse.PendingSubscriptionChange | null;
2058
2113
  /**
2059
2114
  * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
2060
2115
  * subscribed to by a customer. Plans define the billing behavior of the
@@ -2073,6 +2128,12 @@ export interface SubscriptionCancelResponse {
2073
2128
  start_date: string;
2074
2129
  status: 'active' | 'ended' | 'upcoming';
2075
2130
  trial_info: SubscriptionCancelResponse.TrialInfo;
2131
+ /**
2132
+ * The resources that were changed as part of this operation. Only present when
2133
+ * fetched through the subscription changes API or if the
2134
+ * `include_changed_resources` parameter was passed in the request.
2135
+ */
2136
+ changed_resources?: SubscriptionCancelResponse.ChangedResources | null;
2076
2137
  }
2077
2138
  export declare namespace SubscriptionCancelResponse {
2078
2139
  interface AdjustmentInterval {
@@ -2370,6 +2431,12 @@ export declare namespace SubscriptionCancelResponse {
2370
2431
  */
2371
2432
  start_date: string;
2372
2433
  }
2434
+ /**
2435
+ * A pending subscription change if one exists on this subscription.
2436
+ */
2437
+ interface PendingSubscriptionChange {
2438
+ id: string;
2439
+ }
2373
2440
  /**
2374
2441
  * The Price Interval resource represents a period of time for which a price will
2375
2442
  * bill on a subscription. A subscription’s price intervals define its billing
@@ -2446,6 +2513,29 @@ export declare namespace SubscriptionCancelResponse {
2446
2513
  interface TrialInfo {
2447
2514
  end_date: string | null;
2448
2515
  }
2516
+ /**
2517
+ * The resources that were changed as part of this operation. Only present when
2518
+ * fetched through the subscription changes API or if the
2519
+ * `include_changed_resources` parameter was passed in the request.
2520
+ */
2521
+ interface ChangedResources {
2522
+ /**
2523
+ * The credit notes that were created as part of this operation.
2524
+ */
2525
+ created_credit_notes: Array<CreditNotesAPI.CreditNote>;
2526
+ /**
2527
+ * The invoices that were created as part of this operation.
2528
+ */
2529
+ created_invoices: Array<InvoicesAPI.Invoice>;
2530
+ /**
2531
+ * The credit notes that were voided as part of this operation.
2532
+ */
2533
+ voided_credit_notes: Array<CreditNotesAPI.CreditNote>;
2534
+ /**
2535
+ * The invoices that were voided as part of this operation.
2536
+ */
2537
+ voided_invoices: Array<InvoicesAPI.Invoice>;
2538
+ }
2449
2539
  }
2450
2540
  export interface SubscriptionFetchCostsResponse {
2451
2541
  data: Array<SubscriptionFetchCostsResponse.Data>;
@@ -2604,6 +2694,10 @@ export interface SubscriptionPriceIntervalsResponse {
2604
2694
  * has a month to pay the invoice.
2605
2695
  */
2606
2696
  net_terms: number;
2697
+ /**
2698
+ * A pending subscription change if one exists on this subscription.
2699
+ */
2700
+ pending_subscription_change: SubscriptionPriceIntervalsResponse.PendingSubscriptionChange | null;
2607
2701
  /**
2608
2702
  * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
2609
2703
  * subscribed to by a customer. Plans define the billing behavior of the
@@ -2622,6 +2716,12 @@ export interface SubscriptionPriceIntervalsResponse {
2622
2716
  start_date: string;
2623
2717
  status: 'active' | 'ended' | 'upcoming';
2624
2718
  trial_info: SubscriptionPriceIntervalsResponse.TrialInfo;
2719
+ /**
2720
+ * The resources that were changed as part of this operation. Only present when
2721
+ * fetched through the subscription changes API or if the
2722
+ * `include_changed_resources` parameter was passed in the request.
2723
+ */
2724
+ changed_resources?: SubscriptionPriceIntervalsResponse.ChangedResources | null;
2625
2725
  }
2626
2726
  export declare namespace SubscriptionPriceIntervalsResponse {
2627
2727
  interface AdjustmentInterval {
@@ -2919,6 +3019,12 @@ export declare namespace SubscriptionPriceIntervalsResponse {
2919
3019
  */
2920
3020
  start_date: string;
2921
3021
  }
3022
+ /**
3023
+ * A pending subscription change if one exists on this subscription.
3024
+ */
3025
+ interface PendingSubscriptionChange {
3026
+ id: string;
3027
+ }
2922
3028
  /**
2923
3029
  * The Price Interval resource represents a period of time for which a price will
2924
3030
  * bill on a subscription. A subscription’s price intervals define its billing
@@ -2995,6 +3101,29 @@ export declare namespace SubscriptionPriceIntervalsResponse {
2995
3101
  interface TrialInfo {
2996
3102
  end_date: string | null;
2997
3103
  }
3104
+ /**
3105
+ * The resources that were changed as part of this operation. Only present when
3106
+ * fetched through the subscription changes API or if the
3107
+ * `include_changed_resources` parameter was passed in the request.
3108
+ */
3109
+ interface ChangedResources {
3110
+ /**
3111
+ * The credit notes that were created as part of this operation.
3112
+ */
3113
+ created_credit_notes: Array<CreditNotesAPI.CreditNote>;
3114
+ /**
3115
+ * The invoices that were created as part of this operation.
3116
+ */
3117
+ created_invoices: Array<InvoicesAPI.Invoice>;
3118
+ /**
3119
+ * The credit notes that were voided as part of this operation.
3120
+ */
3121
+ voided_credit_notes: Array<CreditNotesAPI.CreditNote>;
3122
+ /**
3123
+ * The invoices that were voided as part of this operation.
3124
+ */
3125
+ voided_invoices: Array<InvoicesAPI.Invoice>;
3126
+ }
2998
3127
  }
2999
3128
  export interface SubscriptionSchedulePlanChangeResponse {
3000
3129
  id: string;
@@ -3093,6 +3222,10 @@ export interface SubscriptionSchedulePlanChangeResponse {
3093
3222
  * has a month to pay the invoice.
3094
3223
  */
3095
3224
  net_terms: number;
3225
+ /**
3226
+ * A pending subscription change if one exists on this subscription.
3227
+ */
3228
+ pending_subscription_change: SubscriptionSchedulePlanChangeResponse.PendingSubscriptionChange | null;
3096
3229
  /**
3097
3230
  * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
3098
3231
  * subscribed to by a customer. Plans define the billing behavior of the
@@ -3111,6 +3244,12 @@ export interface SubscriptionSchedulePlanChangeResponse {
3111
3244
  start_date: string;
3112
3245
  status: 'active' | 'ended' | 'upcoming';
3113
3246
  trial_info: SubscriptionSchedulePlanChangeResponse.TrialInfo;
3247
+ /**
3248
+ * The resources that were changed as part of this operation. Only present when
3249
+ * fetched through the subscription changes API or if the
3250
+ * `include_changed_resources` parameter was passed in the request.
3251
+ */
3252
+ changed_resources?: SubscriptionSchedulePlanChangeResponse.ChangedResources | null;
3114
3253
  }
3115
3254
  export declare namespace SubscriptionSchedulePlanChangeResponse {
3116
3255
  interface AdjustmentInterval {
@@ -3408,6 +3547,12 @@ export declare namespace SubscriptionSchedulePlanChangeResponse {
3408
3547
  */
3409
3548
  start_date: string;
3410
3549
  }
3550
+ /**
3551
+ * A pending subscription change if one exists on this subscription.
3552
+ */
3553
+ interface PendingSubscriptionChange {
3554
+ id: string;
3555
+ }
3411
3556
  /**
3412
3557
  * The Price Interval resource represents a period of time for which a price will
3413
3558
  * bill on a subscription. A subscription’s price intervals define its billing
@@ -3484,6 +3629,29 @@ export declare namespace SubscriptionSchedulePlanChangeResponse {
3484
3629
  interface TrialInfo {
3485
3630
  end_date: string | null;
3486
3631
  }
3632
+ /**
3633
+ * The resources that were changed as part of this operation. Only present when
3634
+ * fetched through the subscription changes API or if the
3635
+ * `include_changed_resources` parameter was passed in the request.
3636
+ */
3637
+ interface ChangedResources {
3638
+ /**
3639
+ * The credit notes that were created as part of this operation.
3640
+ */
3641
+ created_credit_notes: Array<CreditNotesAPI.CreditNote>;
3642
+ /**
3643
+ * The invoices that were created as part of this operation.
3644
+ */
3645
+ created_invoices: Array<InvoicesAPI.Invoice>;
3646
+ /**
3647
+ * The credit notes that were voided as part of this operation.
3648
+ */
3649
+ voided_credit_notes: Array<CreditNotesAPI.CreditNote>;
3650
+ /**
3651
+ * The invoices that were voided as part of this operation.
3652
+ */
3653
+ voided_invoices: Array<InvoicesAPI.Invoice>;
3654
+ }
3487
3655
  }
3488
3656
  export interface SubscriptionTriggerPhaseResponse {
3489
3657
  id: string;
@@ -3582,6 +3750,10 @@ export interface SubscriptionTriggerPhaseResponse {
3582
3750
  * has a month to pay the invoice.
3583
3751
  */
3584
3752
  net_terms: number;
3753
+ /**
3754
+ * A pending subscription change if one exists on this subscription.
3755
+ */
3756
+ pending_subscription_change: SubscriptionTriggerPhaseResponse.PendingSubscriptionChange | null;
3585
3757
  /**
3586
3758
  * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
3587
3759
  * subscribed to by a customer. Plans define the billing behavior of the
@@ -3600,6 +3772,12 @@ export interface SubscriptionTriggerPhaseResponse {
3600
3772
  start_date: string;
3601
3773
  status: 'active' | 'ended' | 'upcoming';
3602
3774
  trial_info: SubscriptionTriggerPhaseResponse.TrialInfo;
3775
+ /**
3776
+ * The resources that were changed as part of this operation. Only present when
3777
+ * fetched through the subscription changes API or if the
3778
+ * `include_changed_resources` parameter was passed in the request.
3779
+ */
3780
+ changed_resources?: SubscriptionTriggerPhaseResponse.ChangedResources | null;
3603
3781
  }
3604
3782
  export declare namespace SubscriptionTriggerPhaseResponse {
3605
3783
  interface AdjustmentInterval {
@@ -3897,6 +4075,12 @@ export declare namespace SubscriptionTriggerPhaseResponse {
3897
4075
  */
3898
4076
  start_date: string;
3899
4077
  }
4078
+ /**
4079
+ * A pending subscription change if one exists on this subscription.
4080
+ */
4081
+ interface PendingSubscriptionChange {
4082
+ id: string;
4083
+ }
3900
4084
  /**
3901
4085
  * The Price Interval resource represents a period of time for which a price will
3902
4086
  * bill on a subscription. A subscription’s price intervals define its billing
@@ -3973,6 +4157,29 @@ export declare namespace SubscriptionTriggerPhaseResponse {
3973
4157
  interface TrialInfo {
3974
4158
  end_date: string | null;
3975
4159
  }
4160
+ /**
4161
+ * The resources that were changed as part of this operation. Only present when
4162
+ * fetched through the subscription changes API or if the
4163
+ * `include_changed_resources` parameter was passed in the request.
4164
+ */
4165
+ interface ChangedResources {
4166
+ /**
4167
+ * The credit notes that were created as part of this operation.
4168
+ */
4169
+ created_credit_notes: Array<CreditNotesAPI.CreditNote>;
4170
+ /**
4171
+ * The invoices that were created as part of this operation.
4172
+ */
4173
+ created_invoices: Array<InvoicesAPI.Invoice>;
4174
+ /**
4175
+ * The credit notes that were voided as part of this operation.
4176
+ */
4177
+ voided_credit_notes: Array<CreditNotesAPI.CreditNote>;
4178
+ /**
4179
+ * The invoices that were voided as part of this operation.
4180
+ */
4181
+ voided_invoices: Array<InvoicesAPI.Invoice>;
4182
+ }
3976
4183
  }
3977
4184
  export interface SubscriptionUnscheduleCancellationResponse {
3978
4185
  id: string;
@@ -4071,6 +4278,10 @@ export interface SubscriptionUnscheduleCancellationResponse {
4071
4278
  * has a month to pay the invoice.
4072
4279
  */
4073
4280
  net_terms: number;
4281
+ /**
4282
+ * A pending subscription change if one exists on this subscription.
4283
+ */
4284
+ pending_subscription_change: SubscriptionUnscheduleCancellationResponse.PendingSubscriptionChange | null;
4074
4285
  /**
4075
4286
  * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
4076
4287
  * subscribed to by a customer. Plans define the billing behavior of the
@@ -4089,6 +4300,12 @@ export interface SubscriptionUnscheduleCancellationResponse {
4089
4300
  start_date: string;
4090
4301
  status: 'active' | 'ended' | 'upcoming';
4091
4302
  trial_info: SubscriptionUnscheduleCancellationResponse.TrialInfo;
4303
+ /**
4304
+ * The resources that were changed as part of this operation. Only present when
4305
+ * fetched through the subscription changes API or if the
4306
+ * `include_changed_resources` parameter was passed in the request.
4307
+ */
4308
+ changed_resources?: SubscriptionUnscheduleCancellationResponse.ChangedResources | null;
4092
4309
  }
4093
4310
  export declare namespace SubscriptionUnscheduleCancellationResponse {
4094
4311
  interface AdjustmentInterval {
@@ -4386,6 +4603,12 @@ export declare namespace SubscriptionUnscheduleCancellationResponse {
4386
4603
  */
4387
4604
  start_date: string;
4388
4605
  }
4606
+ /**
4607
+ * A pending subscription change if one exists on this subscription.
4608
+ */
4609
+ interface PendingSubscriptionChange {
4610
+ id: string;
4611
+ }
4389
4612
  /**
4390
4613
  * The Price Interval resource represents a period of time for which a price will
4391
4614
  * bill on a subscription. A subscription’s price intervals define its billing
@@ -4462,6 +4685,29 @@ export declare namespace SubscriptionUnscheduleCancellationResponse {
4462
4685
  interface TrialInfo {
4463
4686
  end_date: string | null;
4464
4687
  }
4688
+ /**
4689
+ * The resources that were changed as part of this operation. Only present when
4690
+ * fetched through the subscription changes API or if the
4691
+ * `include_changed_resources` parameter was passed in the request.
4692
+ */
4693
+ interface ChangedResources {
4694
+ /**
4695
+ * The credit notes that were created as part of this operation.
4696
+ */
4697
+ created_credit_notes: Array<CreditNotesAPI.CreditNote>;
4698
+ /**
4699
+ * The invoices that were created as part of this operation.
4700
+ */
4701
+ created_invoices: Array<InvoicesAPI.Invoice>;
4702
+ /**
4703
+ * The credit notes that were voided as part of this operation.
4704
+ */
4705
+ voided_credit_notes: Array<CreditNotesAPI.CreditNote>;
4706
+ /**
4707
+ * The invoices that were voided as part of this operation.
4708
+ */
4709
+ voided_invoices: Array<InvoicesAPI.Invoice>;
4710
+ }
4465
4711
  }
4466
4712
  export interface SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse {
4467
4713
  id: string;
@@ -4560,6 +4806,10 @@ export interface SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse {
4560
4806
  * has a month to pay the invoice.
4561
4807
  */
4562
4808
  net_terms: number;
4809
+ /**
4810
+ * A pending subscription change if one exists on this subscription.
4811
+ */
4812
+ pending_subscription_change: SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse.PendingSubscriptionChange | null;
4563
4813
  /**
4564
4814
  * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
4565
4815
  * subscribed to by a customer. Plans define the billing behavior of the
@@ -4578,6 +4828,12 @@ export interface SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse {
4578
4828
  start_date: string;
4579
4829
  status: 'active' | 'ended' | 'upcoming';
4580
4830
  trial_info: SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse.TrialInfo;
4831
+ /**
4832
+ * The resources that were changed as part of this operation. Only present when
4833
+ * fetched through the subscription changes API or if the
4834
+ * `include_changed_resources` parameter was passed in the request.
4835
+ */
4836
+ changed_resources?: SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse.ChangedResources | null;
4581
4837
  }
4582
4838
  export declare namespace SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse {
4583
4839
  interface AdjustmentInterval {
@@ -4875,6 +5131,12 @@ export declare namespace SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse {
4875
5131
  */
4876
5132
  start_date: string;
4877
5133
  }
5134
+ /**
5135
+ * A pending subscription change if one exists on this subscription.
5136
+ */
5137
+ interface PendingSubscriptionChange {
5138
+ id: string;
5139
+ }
4878
5140
  /**
4879
5141
  * The Price Interval resource represents a period of time for which a price will
4880
5142
  * bill on a subscription. A subscription’s price intervals define its billing
@@ -4951,6 +5213,29 @@ export declare namespace SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse {
4951
5213
  interface TrialInfo {
4952
5214
  end_date: string | null;
4953
5215
  }
5216
+ /**
5217
+ * The resources that were changed as part of this operation. Only present when
5218
+ * fetched through the subscription changes API or if the
5219
+ * `include_changed_resources` parameter was passed in the request.
5220
+ */
5221
+ interface ChangedResources {
5222
+ /**
5223
+ * The credit notes that were created as part of this operation.
5224
+ */
5225
+ created_credit_notes: Array<CreditNotesAPI.CreditNote>;
5226
+ /**
5227
+ * The invoices that were created as part of this operation.
5228
+ */
5229
+ created_invoices: Array<InvoicesAPI.Invoice>;
5230
+ /**
5231
+ * The credit notes that were voided as part of this operation.
5232
+ */
5233
+ voided_credit_notes: Array<CreditNotesAPI.CreditNote>;
5234
+ /**
5235
+ * The invoices that were voided as part of this operation.
5236
+ */
5237
+ voided_invoices: Array<InvoicesAPI.Invoice>;
5238
+ }
4954
5239
  }
4955
5240
  export interface SubscriptionUnschedulePendingPlanChangesResponse {
4956
5241
  id: string;
@@ -5049,6 +5334,10 @@ export interface SubscriptionUnschedulePendingPlanChangesResponse {
5049
5334
  * has a month to pay the invoice.
5050
5335
  */
5051
5336
  net_terms: number;
5337
+ /**
5338
+ * A pending subscription change if one exists on this subscription.
5339
+ */
5340
+ pending_subscription_change: SubscriptionUnschedulePendingPlanChangesResponse.PendingSubscriptionChange | null;
5052
5341
  /**
5053
5342
  * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
5054
5343
  * subscribed to by a customer. Plans define the billing behavior of the
@@ -5067,6 +5356,12 @@ export interface SubscriptionUnschedulePendingPlanChangesResponse {
5067
5356
  start_date: string;
5068
5357
  status: 'active' | 'ended' | 'upcoming';
5069
5358
  trial_info: SubscriptionUnschedulePendingPlanChangesResponse.TrialInfo;
5359
+ /**
5360
+ * The resources that were changed as part of this operation. Only present when
5361
+ * fetched through the subscription changes API or if the
5362
+ * `include_changed_resources` parameter was passed in the request.
5363
+ */
5364
+ changed_resources?: SubscriptionUnschedulePendingPlanChangesResponse.ChangedResources | null;
5070
5365
  }
5071
5366
  export declare namespace SubscriptionUnschedulePendingPlanChangesResponse {
5072
5367
  interface AdjustmentInterval {
@@ -5364,6 +5659,12 @@ export declare namespace SubscriptionUnschedulePendingPlanChangesResponse {
5364
5659
  */
5365
5660
  start_date: string;
5366
5661
  }
5662
+ /**
5663
+ * A pending subscription change if one exists on this subscription.
5664
+ */
5665
+ interface PendingSubscriptionChange {
5666
+ id: string;
5667
+ }
5367
5668
  /**
5368
5669
  * The Price Interval resource represents a period of time for which a price will
5369
5670
  * bill on a subscription. A subscription’s price intervals define its billing
@@ -5440,6 +5741,29 @@ export declare namespace SubscriptionUnschedulePendingPlanChangesResponse {
5440
5741
  interface TrialInfo {
5441
5742
  end_date: string | null;
5442
5743
  }
5744
+ /**
5745
+ * The resources that were changed as part of this operation. Only present when
5746
+ * fetched through the subscription changes API or if the
5747
+ * `include_changed_resources` parameter was passed in the request.
5748
+ */
5749
+ interface ChangedResources {
5750
+ /**
5751
+ * The credit notes that were created as part of this operation.
5752
+ */
5753
+ created_credit_notes: Array<CreditNotesAPI.CreditNote>;
5754
+ /**
5755
+ * The invoices that were created as part of this operation.
5756
+ */
5757
+ created_invoices: Array<InvoicesAPI.Invoice>;
5758
+ /**
5759
+ * The credit notes that were voided as part of this operation.
5760
+ */
5761
+ voided_credit_notes: Array<CreditNotesAPI.CreditNote>;
5762
+ /**
5763
+ * The invoices that were voided as part of this operation.
5764
+ */
5765
+ voided_invoices: Array<InvoicesAPI.Invoice>;
5766
+ }
5443
5767
  }
5444
5768
  export interface SubscriptionUpdateFixedFeeQuantityResponse {
5445
5769
  id: string;
@@ -5538,6 +5862,10 @@ export interface SubscriptionUpdateFixedFeeQuantityResponse {
5538
5862
  * has a month to pay the invoice.
5539
5863
  */
5540
5864
  net_terms: number;
5865
+ /**
5866
+ * A pending subscription change if one exists on this subscription.
5867
+ */
5868
+ pending_subscription_change: SubscriptionUpdateFixedFeeQuantityResponse.PendingSubscriptionChange | null;
5541
5869
  /**
5542
5870
  * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
5543
5871
  * subscribed to by a customer. Plans define the billing behavior of the
@@ -5556,6 +5884,12 @@ export interface SubscriptionUpdateFixedFeeQuantityResponse {
5556
5884
  start_date: string;
5557
5885
  status: 'active' | 'ended' | 'upcoming';
5558
5886
  trial_info: SubscriptionUpdateFixedFeeQuantityResponse.TrialInfo;
5887
+ /**
5888
+ * The resources that were changed as part of this operation. Only present when
5889
+ * fetched through the subscription changes API or if the
5890
+ * `include_changed_resources` parameter was passed in the request.
5891
+ */
5892
+ changed_resources?: SubscriptionUpdateFixedFeeQuantityResponse.ChangedResources | null;
5559
5893
  }
5560
5894
  export declare namespace SubscriptionUpdateFixedFeeQuantityResponse {
5561
5895
  interface AdjustmentInterval {
@@ -5853,6 +6187,12 @@ export declare namespace SubscriptionUpdateFixedFeeQuantityResponse {
5853
6187
  */
5854
6188
  start_date: string;
5855
6189
  }
6190
+ /**
6191
+ * A pending subscription change if one exists on this subscription.
6192
+ */
6193
+ interface PendingSubscriptionChange {
6194
+ id: string;
6195
+ }
5856
6196
  /**
5857
6197
  * The Price Interval resource represents a period of time for which a price will
5858
6198
  * bill on a subscription. A subscription’s price intervals define its billing
@@ -5929,6 +6269,29 @@ export declare namespace SubscriptionUpdateFixedFeeQuantityResponse {
5929
6269
  interface TrialInfo {
5930
6270
  end_date: string | null;
5931
6271
  }
6272
+ /**
6273
+ * The resources that were changed as part of this operation. Only present when
6274
+ * fetched through the subscription changes API or if the
6275
+ * `include_changed_resources` parameter was passed in the request.
6276
+ */
6277
+ interface ChangedResources {
6278
+ /**
6279
+ * The credit notes that were created as part of this operation.
6280
+ */
6281
+ created_credit_notes: Array<CreditNotesAPI.CreditNote>;
6282
+ /**
6283
+ * The invoices that were created as part of this operation.
6284
+ */
6285
+ created_invoices: Array<InvoicesAPI.Invoice>;
6286
+ /**
6287
+ * The credit notes that were voided as part of this operation.
6288
+ */
6289
+ voided_credit_notes: Array<CreditNotesAPI.CreditNote>;
6290
+ /**
6291
+ * The invoices that were voided as part of this operation.
6292
+ */
6293
+ voided_invoices: Array<InvoicesAPI.Invoice>;
6294
+ }
5932
6295
  }
5933
6296
  export interface SubscriptionUpdateTrialResponse {
5934
6297
  id: string;
@@ -6027,6 +6390,10 @@ export interface SubscriptionUpdateTrialResponse {
6027
6390
  * has a month to pay the invoice.
6028
6391
  */
6029
6392
  net_terms: number;
6393
+ /**
6394
+ * A pending subscription change if one exists on this subscription.
6395
+ */
6396
+ pending_subscription_change: SubscriptionUpdateTrialResponse.PendingSubscriptionChange | null;
6030
6397
  /**
6031
6398
  * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
6032
6399
  * subscribed to by a customer. Plans define the billing behavior of the
@@ -6045,6 +6412,12 @@ export interface SubscriptionUpdateTrialResponse {
6045
6412
  start_date: string;
6046
6413
  status: 'active' | 'ended' | 'upcoming';
6047
6414
  trial_info: SubscriptionUpdateTrialResponse.TrialInfo;
6415
+ /**
6416
+ * The resources that were changed as part of this operation. Only present when
6417
+ * fetched through the subscription changes API or if the
6418
+ * `include_changed_resources` parameter was passed in the request.
6419
+ */
6420
+ changed_resources?: SubscriptionUpdateTrialResponse.ChangedResources | null;
6048
6421
  }
6049
6422
  export declare namespace SubscriptionUpdateTrialResponse {
6050
6423
  interface AdjustmentInterval {
@@ -6342,6 +6715,12 @@ export declare namespace SubscriptionUpdateTrialResponse {
6342
6715
  */
6343
6716
  start_date: string;
6344
6717
  }
6718
+ /**
6719
+ * A pending subscription change if one exists on this subscription.
6720
+ */
6721
+ interface PendingSubscriptionChange {
6722
+ id: string;
6723
+ }
6345
6724
  /**
6346
6725
  * The Price Interval resource represents a period of time for which a price will
6347
6726
  * bill on a subscription. A subscription’s price intervals define its billing
@@ -6418,6 +6797,29 @@ export declare namespace SubscriptionUpdateTrialResponse {
6418
6797
  interface TrialInfo {
6419
6798
  end_date: string | null;
6420
6799
  }
6800
+ /**
6801
+ * The resources that were changed as part of this operation. Only present when
6802
+ * fetched through the subscription changes API or if the
6803
+ * `include_changed_resources` parameter was passed in the request.
6804
+ */
6805
+ interface ChangedResources {
6806
+ /**
6807
+ * The credit notes that were created as part of this operation.
6808
+ */
6809
+ created_credit_notes: Array<CreditNotesAPI.CreditNote>;
6810
+ /**
6811
+ * The invoices that were created as part of this operation.
6812
+ */
6813
+ created_invoices: Array<InvoicesAPI.Invoice>;
6814
+ /**
6815
+ * The credit notes that were voided as part of this operation.
6816
+ */
6817
+ voided_credit_notes: Array<CreditNotesAPI.CreditNote>;
6818
+ /**
6819
+ * The invoices that were voided as part of this operation.
6820
+ */
6821
+ voided_invoices: Array<InvoicesAPI.Invoice>;
6822
+ }
6421
6823
  }
6422
6824
  export interface SubscriptionCreateParams {
6423
6825
  /**
@@ -7147,7 +7549,7 @@ export declare namespace SubscriptionCreateParams {
7147
7549
  namespace TieredConfig {
7148
7550
  interface Tier {
7149
7551
  /**
7150
- * Inclusive tier starting value
7552
+ * Exclusive tier starting value
7151
7553
  */
7152
7554
  first_unit: number;
7153
7555
  /**
@@ -7155,7 +7557,7 @@ export declare namespace SubscriptionCreateParams {
7155
7557
  */
7156
7558
  unit_amount: string;
7157
7559
  /**
7158
- * Exclusive tier ending value. If null, this is treated as the last tier
7560
+ * Inclusive tier ending value. If null, this is treated as the last tier
7159
7561
  */
7160
7562
  last_unit?: number | null;
7161
7563
  }
@@ -7273,11 +7675,11 @@ export declare namespace SubscriptionCreateParams {
7273
7675
  */
7274
7676
  bps: number;
7275
7677
  /**
7276
- * Inclusive tier starting value
7678
+ * Exclusive tier starting value
7277
7679
  */
7278
7680
  minimum_amount: string;
7279
7681
  /**
7280
- * Exclusive tier ending value
7682
+ * Inclusive tier ending value
7281
7683
  */
7282
7684
  maximum_amount?: string | null;
7283
7685
  /**
@@ -9967,7 +10369,7 @@ export declare namespace SubscriptionCreateParams {
9967
10369
  namespace TieredConfig {
9968
10370
  interface Tier {
9969
10371
  /**
9970
- * Inclusive tier starting value
10372
+ * Exclusive tier starting value
9971
10373
  */
9972
10374
  first_unit: number;
9973
10375
  /**
@@ -9975,7 +10377,7 @@ export declare namespace SubscriptionCreateParams {
9975
10377
  */
9976
10378
  unit_amount: string;
9977
10379
  /**
9978
- * Exclusive tier ending value. If null, this is treated as the last tier
10380
+ * Inclusive tier ending value. If null, this is treated as the last tier
9979
10381
  */
9980
10382
  last_unit?: number | null;
9981
10383
  }
@@ -10093,11 +10495,11 @@ export declare namespace SubscriptionCreateParams {
10093
10495
  */
10094
10496
  bps: number;
10095
10497
  /**
10096
- * Inclusive tier starting value
10498
+ * Exclusive tier starting value
10097
10499
  */
10098
10500
  minimum_amount: string;
10099
10501
  /**
10100
- * Exclusive tier ending value
10502
+ * Inclusive tier ending value
10101
10503
  */
10102
10504
  maximum_amount?: string | null;
10103
10505
  /**
@@ -12954,7 +13356,7 @@ export declare namespace SubscriptionPriceIntervalsParams {
12954
13356
  namespace TieredConfig {
12955
13357
  interface Tier {
12956
13358
  /**
12957
- * Inclusive tier starting value
13359
+ * Exclusive tier starting value
12958
13360
  */
12959
13361
  first_unit: number;
12960
13362
  /**
@@ -12962,7 +13364,7 @@ export declare namespace SubscriptionPriceIntervalsParams {
12962
13364
  */
12963
13365
  unit_amount: string;
12964
13366
  /**
12965
- * Exclusive tier ending value. If null, this is treated as the last tier
13367
+ * Inclusive tier ending value. If null, this is treated as the last tier
12966
13368
  */
12967
13369
  last_unit?: number | null;
12968
13370
  }
@@ -13074,11 +13476,11 @@ export declare namespace SubscriptionPriceIntervalsParams {
13074
13476
  */
13075
13477
  bps: number;
13076
13478
  /**
13077
- * Inclusive tier starting value
13479
+ * Exclusive tier starting value
13078
13480
  */
13079
13481
  minimum_amount: string;
13080
13482
  /**
13081
- * Exclusive tier ending value
13483
+ * Inclusive tier ending value
13082
13484
  */
13083
13485
  maximum_amount?: string | null;
13084
13486
  /**
@@ -16110,7 +16512,7 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
16110
16512
  namespace TieredConfig {
16111
16513
  interface Tier {
16112
16514
  /**
16113
- * Inclusive tier starting value
16515
+ * Exclusive tier starting value
16114
16516
  */
16115
16517
  first_unit: number;
16116
16518
  /**
@@ -16118,7 +16520,7 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
16118
16520
  */
16119
16521
  unit_amount: string;
16120
16522
  /**
16121
- * Exclusive tier ending value. If null, this is treated as the last tier
16523
+ * Inclusive tier ending value. If null, this is treated as the last tier
16122
16524
  */
16123
16525
  last_unit?: number | null;
16124
16526
  }
@@ -16236,11 +16638,11 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
16236
16638
  */
16237
16639
  bps: number;
16238
16640
  /**
16239
- * Inclusive tier starting value
16641
+ * Exclusive tier starting value
16240
16642
  */
16241
16643
  minimum_amount: string;
16242
16644
  /**
16243
- * Exclusive tier ending value
16645
+ * Inclusive tier ending value
16244
16646
  */
16245
16647
  maximum_amount?: string | null;
16246
16648
  /**
@@ -18930,7 +19332,7 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
18930
19332
  namespace TieredConfig {
18931
19333
  interface Tier {
18932
19334
  /**
18933
- * Inclusive tier starting value
19335
+ * Exclusive tier starting value
18934
19336
  */
18935
19337
  first_unit: number;
18936
19338
  /**
@@ -18938,7 +19340,7 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
18938
19340
  */
18939
19341
  unit_amount: string;
18940
19342
  /**
18941
- * Exclusive tier ending value. If null, this is treated as the last tier
19343
+ * Inclusive tier ending value. If null, this is treated as the last tier
18942
19344
  */
18943
19345
  last_unit?: number | null;
18944
19346
  }
@@ -19056,11 +19458,11 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
19056
19458
  */
19057
19459
  bps: number;
19058
19460
  /**
19059
- * Inclusive tier starting value
19461
+ * Exclusive tier starting value
19060
19462
  */
19061
19463
  minimum_amount: string;
19062
19464
  /**
19063
- * Exclusive tier ending value
19465
+ * Inclusive tier ending value
19064
19466
  */
19065
19467
  maximum_amount?: string | null;
19066
19468
  /**