orb-billing 4.54.0 → 4.56.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 (38) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/core.d.ts.map +1 -1
  3. package/core.js +12 -6
  4. package/core.js.map +1 -1
  5. package/core.mjs +12 -6
  6. package/core.mjs.map +1 -1
  7. package/package.json +1 -1
  8. package/resources/customers/balance-transactions.d.ts +2 -2
  9. package/resources/customers/balance-transactions.d.ts.map +1 -1
  10. package/resources/customers/balance-transactions.js.map +1 -1
  11. package/resources/customers/balance-transactions.mjs.map +1 -1
  12. package/resources/events/backfills.d.ts +30 -0
  13. package/resources/events/backfills.d.ts.map +1 -1
  14. package/resources/events/backfills.js.map +1 -1
  15. package/resources/events/backfills.mjs.map +1 -1
  16. package/resources/invoice-line-items.d.ts +49 -45
  17. package/resources/invoice-line-items.d.ts.map +1 -1
  18. package/resources/invoices.d.ts +100 -92
  19. package/resources/invoices.d.ts.map +1 -1
  20. package/resources/invoices.js.map +1 -1
  21. package/resources/invoices.mjs.map +1 -1
  22. package/resources/plans/plans.d.ts +24 -24
  23. package/resources/plans/plans.d.ts.map +1 -1
  24. package/resources/subscriptions.d.ts +374 -268
  25. package/resources/subscriptions.d.ts.map +1 -1
  26. package/resources/subscriptions.js.map +1 -1
  27. package/resources/subscriptions.mjs.map +1 -1
  28. package/src/core.ts +14 -6
  29. package/src/resources/customers/balance-transactions.ts +4 -2
  30. package/src/resources/events/backfills.ts +35 -0
  31. package/src/resources/invoice-line-items.ts +57 -53
  32. package/src/resources/invoices.ts +118 -108
  33. package/src/resources/plans/plans.ts +31 -31
  34. package/src/resources/subscriptions.ts +472 -346
  35. package/src/version.ts +1 -1
  36. package/version.d.ts +1 -1
  37. package/version.js +1 -1
  38. package/version.mjs +1 -1
@@ -1042,7 +1042,7 @@ export interface Subscription {
1042
1042
  export declare namespace Subscription {
1043
1043
  interface AdjustmentInterval {
1044
1044
  id: string;
1045
- adjustment: AdjustmentInterval.AmountDiscountAdjustment | AdjustmentInterval.PercentageDiscountAdjustment | AdjustmentInterval.UsageDiscountAdjustment | AdjustmentInterval.MinimumAdjustment | AdjustmentInterval.MaximumAdjustment;
1045
+ adjustment: AdjustmentInterval.PlanPhaseUsageDiscountAdjustment | AdjustmentInterval.PlanPhaseAmountDiscountAdjustment | AdjustmentInterval.PlanPhasePercentageDiscountAdjustment | AdjustmentInterval.PlanPhaseMinimumAdjustment | AdjustmentInterval.PlanPhaseMaximumAdjustment;
1046
1046
  /**
1047
1047
  * The price interval IDs that this adjustment applies to.
1048
1048
  */
@@ -1057,14 +1057,9 @@ export declare namespace Subscription {
1057
1057
  start_date: string;
1058
1058
  }
1059
1059
  namespace AdjustmentInterval {
1060
- interface AmountDiscountAdjustment {
1060
+ interface PlanPhaseUsageDiscountAdjustment {
1061
1061
  id: string;
1062
- adjustment_type: 'amount_discount';
1063
- /**
1064
- * The amount by which to discount the prices this adjustment applies to in a given
1065
- * billing period.
1066
- */
1067
- amount_discount: string;
1062
+ adjustment_type: 'usage_discount';
1068
1063
  /**
1069
1064
  * The price IDs that this adjustment applies to.
1070
1065
  */
@@ -1082,10 +1077,20 @@ export declare namespace Subscription {
1082
1077
  * The reason for the adjustment.
1083
1078
  */
1084
1079
  reason: string | null;
1080
+ /**
1081
+ * The number of usage units by which to discount the price this adjustment applies
1082
+ * to in a given billing period.
1083
+ */
1084
+ usage_discount: number;
1085
1085
  }
1086
- interface PercentageDiscountAdjustment {
1086
+ interface PlanPhaseAmountDiscountAdjustment {
1087
1087
  id: string;
1088
- adjustment_type: 'percentage_discount';
1088
+ adjustment_type: 'amount_discount';
1089
+ /**
1090
+ * The amount by which to discount the prices this adjustment applies to in a given
1091
+ * billing period.
1092
+ */
1093
+ amount_discount: string;
1089
1094
  /**
1090
1095
  * The price IDs that this adjustment applies to.
1091
1096
  */
@@ -1095,11 +1100,6 @@ export declare namespace Subscription {
1095
1100
  * that apply to only one price.
1096
1101
  */
1097
1102
  is_invoice_level: boolean;
1098
- /**
1099
- * The percentage (as a value between 0 and 1) by which to discount the price
1100
- * intervals this adjustment applies to in a given billing period.
1101
- */
1102
- percentage_discount: number;
1103
1103
  /**
1104
1104
  * The plan phase in which this adjustment is active.
1105
1105
  */
@@ -1109,9 +1109,9 @@ export declare namespace Subscription {
1109
1109
  */
1110
1110
  reason: string | null;
1111
1111
  }
1112
- interface UsageDiscountAdjustment {
1112
+ interface PlanPhasePercentageDiscountAdjustment {
1113
1113
  id: string;
1114
- adjustment_type: 'usage_discount';
1114
+ adjustment_type: 'percentage_discount';
1115
1115
  /**
1116
1116
  * The price IDs that this adjustment applies to.
1117
1117
  */
@@ -1121,6 +1121,11 @@ export declare namespace Subscription {
1121
1121
  * that apply to only one price.
1122
1122
  */
1123
1123
  is_invoice_level: boolean;
1124
+ /**
1125
+ * The percentage (as a value between 0 and 1) by which to discount the price
1126
+ * intervals this adjustment applies to in a given billing period.
1127
+ */
1128
+ percentage_discount: number;
1124
1129
  /**
1125
1130
  * The plan phase in which this adjustment is active.
1126
1131
  */
@@ -1129,13 +1134,8 @@ export declare namespace Subscription {
1129
1134
  * The reason for the adjustment.
1130
1135
  */
1131
1136
  reason: string | null;
1132
- /**
1133
- * The number of usage units by which to discount the price this adjustment applies
1134
- * to in a given billing period.
1135
- */
1136
- usage_discount: number;
1137
1137
  }
1138
- interface MinimumAdjustment {
1138
+ interface PlanPhaseMinimumAdjustment {
1139
1139
  id: string;
1140
1140
  adjustment_type: 'minimum';
1141
1141
  /**
@@ -1165,7 +1165,7 @@ export declare namespace Subscription {
1165
1165
  */
1166
1166
  reason: string | null;
1167
1167
  }
1168
- interface MaximumAdjustment {
1168
+ interface PlanPhaseMaximumAdjustment {
1169
1169
  id: string;
1170
1170
  adjustment_type: 'maximum';
1171
1171
  /**
@@ -1576,7 +1576,7 @@ export interface SubscriptionCreateResponse {
1576
1576
  export declare namespace SubscriptionCreateResponse {
1577
1577
  interface AdjustmentInterval {
1578
1578
  id: string;
1579
- adjustment: AdjustmentInterval.AmountDiscountAdjustment | AdjustmentInterval.PercentageDiscountAdjustment | AdjustmentInterval.UsageDiscountAdjustment | AdjustmentInterval.MinimumAdjustment | AdjustmentInterval.MaximumAdjustment;
1579
+ adjustment: AdjustmentInterval.PlanPhaseUsageDiscountAdjustment | AdjustmentInterval.PlanPhaseAmountDiscountAdjustment | AdjustmentInterval.PlanPhasePercentageDiscountAdjustment | AdjustmentInterval.PlanPhaseMinimumAdjustment | AdjustmentInterval.PlanPhaseMaximumAdjustment;
1580
1580
  /**
1581
1581
  * The price interval IDs that this adjustment applies to.
1582
1582
  */
@@ -1591,14 +1591,9 @@ export declare namespace SubscriptionCreateResponse {
1591
1591
  start_date: string;
1592
1592
  }
1593
1593
  namespace AdjustmentInterval {
1594
- interface AmountDiscountAdjustment {
1594
+ interface PlanPhaseUsageDiscountAdjustment {
1595
1595
  id: string;
1596
- adjustment_type: 'amount_discount';
1597
- /**
1598
- * The amount by which to discount the prices this adjustment applies to in a given
1599
- * billing period.
1600
- */
1601
- amount_discount: string;
1596
+ adjustment_type: 'usage_discount';
1602
1597
  /**
1603
1598
  * The price IDs that this adjustment applies to.
1604
1599
  */
@@ -1616,10 +1611,20 @@ export declare namespace SubscriptionCreateResponse {
1616
1611
  * The reason for the adjustment.
1617
1612
  */
1618
1613
  reason: string | null;
1614
+ /**
1615
+ * The number of usage units by which to discount the price this adjustment applies
1616
+ * to in a given billing period.
1617
+ */
1618
+ usage_discount: number;
1619
1619
  }
1620
- interface PercentageDiscountAdjustment {
1620
+ interface PlanPhaseAmountDiscountAdjustment {
1621
1621
  id: string;
1622
- adjustment_type: 'percentage_discount';
1622
+ adjustment_type: 'amount_discount';
1623
+ /**
1624
+ * The amount by which to discount the prices this adjustment applies to in a given
1625
+ * billing period.
1626
+ */
1627
+ amount_discount: string;
1623
1628
  /**
1624
1629
  * The price IDs that this adjustment applies to.
1625
1630
  */
@@ -1629,11 +1634,6 @@ export declare namespace SubscriptionCreateResponse {
1629
1634
  * that apply to only one price.
1630
1635
  */
1631
1636
  is_invoice_level: boolean;
1632
- /**
1633
- * The percentage (as a value between 0 and 1) by which to discount the price
1634
- * intervals this adjustment applies to in a given billing period.
1635
- */
1636
- percentage_discount: number;
1637
1637
  /**
1638
1638
  * The plan phase in which this adjustment is active.
1639
1639
  */
@@ -1643,9 +1643,9 @@ export declare namespace SubscriptionCreateResponse {
1643
1643
  */
1644
1644
  reason: string | null;
1645
1645
  }
1646
- interface UsageDiscountAdjustment {
1646
+ interface PlanPhasePercentageDiscountAdjustment {
1647
1647
  id: string;
1648
- adjustment_type: 'usage_discount';
1648
+ adjustment_type: 'percentage_discount';
1649
1649
  /**
1650
1650
  * The price IDs that this adjustment applies to.
1651
1651
  */
@@ -1655,6 +1655,11 @@ export declare namespace SubscriptionCreateResponse {
1655
1655
  * that apply to only one price.
1656
1656
  */
1657
1657
  is_invoice_level: boolean;
1658
+ /**
1659
+ * The percentage (as a value between 0 and 1) by which to discount the price
1660
+ * intervals this adjustment applies to in a given billing period.
1661
+ */
1662
+ percentage_discount: number;
1658
1663
  /**
1659
1664
  * The plan phase in which this adjustment is active.
1660
1665
  */
@@ -1663,13 +1668,8 @@ export declare namespace SubscriptionCreateResponse {
1663
1668
  * The reason for the adjustment.
1664
1669
  */
1665
1670
  reason: string | null;
1666
- /**
1667
- * The number of usage units by which to discount the price this adjustment applies
1668
- * to in a given billing period.
1669
- */
1670
- usage_discount: number;
1671
1671
  }
1672
- interface MinimumAdjustment {
1672
+ interface PlanPhaseMinimumAdjustment {
1673
1673
  id: string;
1674
1674
  adjustment_type: 'minimum';
1675
1675
  /**
@@ -1699,7 +1699,7 @@ export declare namespace SubscriptionCreateResponse {
1699
1699
  */
1700
1700
  reason: string | null;
1701
1701
  }
1702
- interface MaximumAdjustment {
1702
+ interface PlanPhaseMaximumAdjustment {
1703
1703
  id: string;
1704
1704
  adjustment_type: 'maximum';
1705
1705
  /**
@@ -2055,7 +2055,7 @@ export interface SubscriptionCancelResponse {
2055
2055
  export declare namespace SubscriptionCancelResponse {
2056
2056
  interface AdjustmentInterval {
2057
2057
  id: string;
2058
- adjustment: AdjustmentInterval.AmountDiscountAdjustment | AdjustmentInterval.PercentageDiscountAdjustment | AdjustmentInterval.UsageDiscountAdjustment | AdjustmentInterval.MinimumAdjustment | AdjustmentInterval.MaximumAdjustment;
2058
+ adjustment: AdjustmentInterval.PlanPhaseUsageDiscountAdjustment | AdjustmentInterval.PlanPhaseAmountDiscountAdjustment | AdjustmentInterval.PlanPhasePercentageDiscountAdjustment | AdjustmentInterval.PlanPhaseMinimumAdjustment | AdjustmentInterval.PlanPhaseMaximumAdjustment;
2059
2059
  /**
2060
2060
  * The price interval IDs that this adjustment applies to.
2061
2061
  */
@@ -2070,14 +2070,9 @@ export declare namespace SubscriptionCancelResponse {
2070
2070
  start_date: string;
2071
2071
  }
2072
2072
  namespace AdjustmentInterval {
2073
- interface AmountDiscountAdjustment {
2073
+ interface PlanPhaseUsageDiscountAdjustment {
2074
2074
  id: string;
2075
- adjustment_type: 'amount_discount';
2076
- /**
2077
- * The amount by which to discount the prices this adjustment applies to in a given
2078
- * billing period.
2079
- */
2080
- amount_discount: string;
2075
+ adjustment_type: 'usage_discount';
2081
2076
  /**
2082
2077
  * The price IDs that this adjustment applies to.
2083
2078
  */
@@ -2095,10 +2090,20 @@ export declare namespace SubscriptionCancelResponse {
2095
2090
  * The reason for the adjustment.
2096
2091
  */
2097
2092
  reason: string | null;
2093
+ /**
2094
+ * The number of usage units by which to discount the price this adjustment applies
2095
+ * to in a given billing period.
2096
+ */
2097
+ usage_discount: number;
2098
2098
  }
2099
- interface PercentageDiscountAdjustment {
2099
+ interface PlanPhaseAmountDiscountAdjustment {
2100
2100
  id: string;
2101
- adjustment_type: 'percentage_discount';
2101
+ adjustment_type: 'amount_discount';
2102
+ /**
2103
+ * The amount by which to discount the prices this adjustment applies to in a given
2104
+ * billing period.
2105
+ */
2106
+ amount_discount: string;
2102
2107
  /**
2103
2108
  * The price IDs that this adjustment applies to.
2104
2109
  */
@@ -2108,11 +2113,6 @@ export declare namespace SubscriptionCancelResponse {
2108
2113
  * that apply to only one price.
2109
2114
  */
2110
2115
  is_invoice_level: boolean;
2111
- /**
2112
- * The percentage (as a value between 0 and 1) by which to discount the price
2113
- * intervals this adjustment applies to in a given billing period.
2114
- */
2115
- percentage_discount: number;
2116
2116
  /**
2117
2117
  * The plan phase in which this adjustment is active.
2118
2118
  */
@@ -2122,9 +2122,9 @@ export declare namespace SubscriptionCancelResponse {
2122
2122
  */
2123
2123
  reason: string | null;
2124
2124
  }
2125
- interface UsageDiscountAdjustment {
2125
+ interface PlanPhasePercentageDiscountAdjustment {
2126
2126
  id: string;
2127
- adjustment_type: 'usage_discount';
2127
+ adjustment_type: 'percentage_discount';
2128
2128
  /**
2129
2129
  * The price IDs that this adjustment applies to.
2130
2130
  */
@@ -2134,6 +2134,11 @@ export declare namespace SubscriptionCancelResponse {
2134
2134
  * that apply to only one price.
2135
2135
  */
2136
2136
  is_invoice_level: boolean;
2137
+ /**
2138
+ * The percentage (as a value between 0 and 1) by which to discount the price
2139
+ * intervals this adjustment applies to in a given billing period.
2140
+ */
2141
+ percentage_discount: number;
2137
2142
  /**
2138
2143
  * The plan phase in which this adjustment is active.
2139
2144
  */
@@ -2142,13 +2147,8 @@ export declare namespace SubscriptionCancelResponse {
2142
2147
  * The reason for the adjustment.
2143
2148
  */
2144
2149
  reason: string | null;
2145
- /**
2146
- * The number of usage units by which to discount the price this adjustment applies
2147
- * to in a given billing period.
2148
- */
2149
- usage_discount: number;
2150
2150
  }
2151
- interface MinimumAdjustment {
2151
+ interface PlanPhaseMinimumAdjustment {
2152
2152
  id: string;
2153
2153
  adjustment_type: 'minimum';
2154
2154
  /**
@@ -2178,7 +2178,7 @@ export declare namespace SubscriptionCancelResponse {
2178
2178
  */
2179
2179
  reason: string | null;
2180
2180
  }
2181
- interface MaximumAdjustment {
2181
+ interface PlanPhaseMaximumAdjustment {
2182
2182
  id: string;
2183
2183
  adjustment_type: 'maximum';
2184
2184
  /**
@@ -2599,7 +2599,7 @@ export interface SubscriptionPriceIntervalsResponse {
2599
2599
  export declare namespace SubscriptionPriceIntervalsResponse {
2600
2600
  interface AdjustmentInterval {
2601
2601
  id: string;
2602
- adjustment: AdjustmentInterval.AmountDiscountAdjustment | AdjustmentInterval.PercentageDiscountAdjustment | AdjustmentInterval.UsageDiscountAdjustment | AdjustmentInterval.MinimumAdjustment | AdjustmentInterval.MaximumAdjustment;
2602
+ adjustment: AdjustmentInterval.PlanPhaseUsageDiscountAdjustment | AdjustmentInterval.PlanPhaseAmountDiscountAdjustment | AdjustmentInterval.PlanPhasePercentageDiscountAdjustment | AdjustmentInterval.PlanPhaseMinimumAdjustment | AdjustmentInterval.PlanPhaseMaximumAdjustment;
2603
2603
  /**
2604
2604
  * The price interval IDs that this adjustment applies to.
2605
2605
  */
@@ -2614,14 +2614,9 @@ export declare namespace SubscriptionPriceIntervalsResponse {
2614
2614
  start_date: string;
2615
2615
  }
2616
2616
  namespace AdjustmentInterval {
2617
- interface AmountDiscountAdjustment {
2617
+ interface PlanPhaseUsageDiscountAdjustment {
2618
2618
  id: string;
2619
- adjustment_type: 'amount_discount';
2620
- /**
2621
- * The amount by which to discount the prices this adjustment applies to in a given
2622
- * billing period.
2623
- */
2624
- amount_discount: string;
2619
+ adjustment_type: 'usage_discount';
2625
2620
  /**
2626
2621
  * The price IDs that this adjustment applies to.
2627
2622
  */
@@ -2639,10 +2634,20 @@ export declare namespace SubscriptionPriceIntervalsResponse {
2639
2634
  * The reason for the adjustment.
2640
2635
  */
2641
2636
  reason: string | null;
2637
+ /**
2638
+ * The number of usage units by which to discount the price this adjustment applies
2639
+ * to in a given billing period.
2640
+ */
2641
+ usage_discount: number;
2642
2642
  }
2643
- interface PercentageDiscountAdjustment {
2643
+ interface PlanPhaseAmountDiscountAdjustment {
2644
2644
  id: string;
2645
- adjustment_type: 'percentage_discount';
2645
+ adjustment_type: 'amount_discount';
2646
+ /**
2647
+ * The amount by which to discount the prices this adjustment applies to in a given
2648
+ * billing period.
2649
+ */
2650
+ amount_discount: string;
2646
2651
  /**
2647
2652
  * The price IDs that this adjustment applies to.
2648
2653
  */
@@ -2652,11 +2657,6 @@ export declare namespace SubscriptionPriceIntervalsResponse {
2652
2657
  * that apply to only one price.
2653
2658
  */
2654
2659
  is_invoice_level: boolean;
2655
- /**
2656
- * The percentage (as a value between 0 and 1) by which to discount the price
2657
- * intervals this adjustment applies to in a given billing period.
2658
- */
2659
- percentage_discount: number;
2660
2660
  /**
2661
2661
  * The plan phase in which this adjustment is active.
2662
2662
  */
@@ -2666,9 +2666,9 @@ export declare namespace SubscriptionPriceIntervalsResponse {
2666
2666
  */
2667
2667
  reason: string | null;
2668
2668
  }
2669
- interface UsageDiscountAdjustment {
2669
+ interface PlanPhasePercentageDiscountAdjustment {
2670
2670
  id: string;
2671
- adjustment_type: 'usage_discount';
2671
+ adjustment_type: 'percentage_discount';
2672
2672
  /**
2673
2673
  * The price IDs that this adjustment applies to.
2674
2674
  */
@@ -2678,6 +2678,11 @@ export declare namespace SubscriptionPriceIntervalsResponse {
2678
2678
  * that apply to only one price.
2679
2679
  */
2680
2680
  is_invoice_level: boolean;
2681
+ /**
2682
+ * The percentage (as a value between 0 and 1) by which to discount the price
2683
+ * intervals this adjustment applies to in a given billing period.
2684
+ */
2685
+ percentage_discount: number;
2681
2686
  /**
2682
2687
  * The plan phase in which this adjustment is active.
2683
2688
  */
@@ -2686,13 +2691,8 @@ export declare namespace SubscriptionPriceIntervalsResponse {
2686
2691
  * The reason for the adjustment.
2687
2692
  */
2688
2693
  reason: string | null;
2689
- /**
2690
- * The number of usage units by which to discount the price this adjustment applies
2691
- * to in a given billing period.
2692
- */
2693
- usage_discount: number;
2694
2694
  }
2695
- interface MinimumAdjustment {
2695
+ interface PlanPhaseMinimumAdjustment {
2696
2696
  id: string;
2697
2697
  adjustment_type: 'minimum';
2698
2698
  /**
@@ -2722,7 +2722,7 @@ export declare namespace SubscriptionPriceIntervalsResponse {
2722
2722
  */
2723
2723
  reason: string | null;
2724
2724
  }
2725
- interface MaximumAdjustment {
2725
+ interface PlanPhaseMaximumAdjustment {
2726
2726
  id: string;
2727
2727
  adjustment_type: 'maximum';
2728
2728
  /**
@@ -3078,7 +3078,7 @@ export interface SubscriptionSchedulePlanChangeResponse {
3078
3078
  export declare namespace SubscriptionSchedulePlanChangeResponse {
3079
3079
  interface AdjustmentInterval {
3080
3080
  id: string;
3081
- adjustment: AdjustmentInterval.AmountDiscountAdjustment | AdjustmentInterval.PercentageDiscountAdjustment | AdjustmentInterval.UsageDiscountAdjustment | AdjustmentInterval.MinimumAdjustment | AdjustmentInterval.MaximumAdjustment;
3081
+ adjustment: AdjustmentInterval.PlanPhaseUsageDiscountAdjustment | AdjustmentInterval.PlanPhaseAmountDiscountAdjustment | AdjustmentInterval.PlanPhasePercentageDiscountAdjustment | AdjustmentInterval.PlanPhaseMinimumAdjustment | AdjustmentInterval.PlanPhaseMaximumAdjustment;
3082
3082
  /**
3083
3083
  * The price interval IDs that this adjustment applies to.
3084
3084
  */
@@ -3093,14 +3093,9 @@ export declare namespace SubscriptionSchedulePlanChangeResponse {
3093
3093
  start_date: string;
3094
3094
  }
3095
3095
  namespace AdjustmentInterval {
3096
- interface AmountDiscountAdjustment {
3096
+ interface PlanPhaseUsageDiscountAdjustment {
3097
3097
  id: string;
3098
- adjustment_type: 'amount_discount';
3099
- /**
3100
- * The amount by which to discount the prices this adjustment applies to in a given
3101
- * billing period.
3102
- */
3103
- amount_discount: string;
3098
+ adjustment_type: 'usage_discount';
3104
3099
  /**
3105
3100
  * The price IDs that this adjustment applies to.
3106
3101
  */
@@ -3118,10 +3113,20 @@ export declare namespace SubscriptionSchedulePlanChangeResponse {
3118
3113
  * The reason for the adjustment.
3119
3114
  */
3120
3115
  reason: string | null;
3116
+ /**
3117
+ * The number of usage units by which to discount the price this adjustment applies
3118
+ * to in a given billing period.
3119
+ */
3120
+ usage_discount: number;
3121
3121
  }
3122
- interface PercentageDiscountAdjustment {
3122
+ interface PlanPhaseAmountDiscountAdjustment {
3123
3123
  id: string;
3124
- adjustment_type: 'percentage_discount';
3124
+ adjustment_type: 'amount_discount';
3125
+ /**
3126
+ * The amount by which to discount the prices this adjustment applies to in a given
3127
+ * billing period.
3128
+ */
3129
+ amount_discount: string;
3125
3130
  /**
3126
3131
  * The price IDs that this adjustment applies to.
3127
3132
  */
@@ -3131,11 +3136,6 @@ export declare namespace SubscriptionSchedulePlanChangeResponse {
3131
3136
  * that apply to only one price.
3132
3137
  */
3133
3138
  is_invoice_level: boolean;
3134
- /**
3135
- * The percentage (as a value between 0 and 1) by which to discount the price
3136
- * intervals this adjustment applies to in a given billing period.
3137
- */
3138
- percentage_discount: number;
3139
3139
  /**
3140
3140
  * The plan phase in which this adjustment is active.
3141
3141
  */
@@ -3145,9 +3145,9 @@ export declare namespace SubscriptionSchedulePlanChangeResponse {
3145
3145
  */
3146
3146
  reason: string | null;
3147
3147
  }
3148
- interface UsageDiscountAdjustment {
3148
+ interface PlanPhasePercentageDiscountAdjustment {
3149
3149
  id: string;
3150
- adjustment_type: 'usage_discount';
3150
+ adjustment_type: 'percentage_discount';
3151
3151
  /**
3152
3152
  * The price IDs that this adjustment applies to.
3153
3153
  */
@@ -3157,6 +3157,11 @@ export declare namespace SubscriptionSchedulePlanChangeResponse {
3157
3157
  * that apply to only one price.
3158
3158
  */
3159
3159
  is_invoice_level: boolean;
3160
+ /**
3161
+ * The percentage (as a value between 0 and 1) by which to discount the price
3162
+ * intervals this adjustment applies to in a given billing period.
3163
+ */
3164
+ percentage_discount: number;
3160
3165
  /**
3161
3166
  * The plan phase in which this adjustment is active.
3162
3167
  */
@@ -3165,13 +3170,8 @@ export declare namespace SubscriptionSchedulePlanChangeResponse {
3165
3170
  * The reason for the adjustment.
3166
3171
  */
3167
3172
  reason: string | null;
3168
- /**
3169
- * The number of usage units by which to discount the price this adjustment applies
3170
- * to in a given billing period.
3171
- */
3172
- usage_discount: number;
3173
3173
  }
3174
- interface MinimumAdjustment {
3174
+ interface PlanPhaseMinimumAdjustment {
3175
3175
  id: string;
3176
3176
  adjustment_type: 'minimum';
3177
3177
  /**
@@ -3201,7 +3201,7 @@ export declare namespace SubscriptionSchedulePlanChangeResponse {
3201
3201
  */
3202
3202
  reason: string | null;
3203
3203
  }
3204
- interface MaximumAdjustment {
3204
+ interface PlanPhaseMaximumAdjustment {
3205
3205
  id: string;
3206
3206
  adjustment_type: 'maximum';
3207
3207
  /**
@@ -3557,7 +3557,7 @@ export interface SubscriptionTriggerPhaseResponse {
3557
3557
  export declare namespace SubscriptionTriggerPhaseResponse {
3558
3558
  interface AdjustmentInterval {
3559
3559
  id: string;
3560
- adjustment: AdjustmentInterval.AmountDiscountAdjustment | AdjustmentInterval.PercentageDiscountAdjustment | AdjustmentInterval.UsageDiscountAdjustment | AdjustmentInterval.MinimumAdjustment | AdjustmentInterval.MaximumAdjustment;
3560
+ adjustment: AdjustmentInterval.PlanPhaseUsageDiscountAdjustment | AdjustmentInterval.PlanPhaseAmountDiscountAdjustment | AdjustmentInterval.PlanPhasePercentageDiscountAdjustment | AdjustmentInterval.PlanPhaseMinimumAdjustment | AdjustmentInterval.PlanPhaseMaximumAdjustment;
3561
3561
  /**
3562
3562
  * The price interval IDs that this adjustment applies to.
3563
3563
  */
@@ -3572,14 +3572,9 @@ export declare namespace SubscriptionTriggerPhaseResponse {
3572
3572
  start_date: string;
3573
3573
  }
3574
3574
  namespace AdjustmentInterval {
3575
- interface AmountDiscountAdjustment {
3575
+ interface PlanPhaseUsageDiscountAdjustment {
3576
3576
  id: string;
3577
- adjustment_type: 'amount_discount';
3578
- /**
3579
- * The amount by which to discount the prices this adjustment applies to in a given
3580
- * billing period.
3581
- */
3582
- amount_discount: string;
3577
+ adjustment_type: 'usage_discount';
3583
3578
  /**
3584
3579
  * The price IDs that this adjustment applies to.
3585
3580
  */
@@ -3597,10 +3592,20 @@ export declare namespace SubscriptionTriggerPhaseResponse {
3597
3592
  * The reason for the adjustment.
3598
3593
  */
3599
3594
  reason: string | null;
3595
+ /**
3596
+ * The number of usage units by which to discount the price this adjustment applies
3597
+ * to in a given billing period.
3598
+ */
3599
+ usage_discount: number;
3600
3600
  }
3601
- interface PercentageDiscountAdjustment {
3601
+ interface PlanPhaseAmountDiscountAdjustment {
3602
3602
  id: string;
3603
- adjustment_type: 'percentage_discount';
3603
+ adjustment_type: 'amount_discount';
3604
+ /**
3605
+ * The amount by which to discount the prices this adjustment applies to in a given
3606
+ * billing period.
3607
+ */
3608
+ amount_discount: string;
3604
3609
  /**
3605
3610
  * The price IDs that this adjustment applies to.
3606
3611
  */
@@ -3610,11 +3615,6 @@ export declare namespace SubscriptionTriggerPhaseResponse {
3610
3615
  * that apply to only one price.
3611
3616
  */
3612
3617
  is_invoice_level: boolean;
3613
- /**
3614
- * The percentage (as a value between 0 and 1) by which to discount the price
3615
- * intervals this adjustment applies to in a given billing period.
3616
- */
3617
- percentage_discount: number;
3618
3618
  /**
3619
3619
  * The plan phase in which this adjustment is active.
3620
3620
  */
@@ -3624,9 +3624,9 @@ export declare namespace SubscriptionTriggerPhaseResponse {
3624
3624
  */
3625
3625
  reason: string | null;
3626
3626
  }
3627
- interface UsageDiscountAdjustment {
3627
+ interface PlanPhasePercentageDiscountAdjustment {
3628
3628
  id: string;
3629
- adjustment_type: 'usage_discount';
3629
+ adjustment_type: 'percentage_discount';
3630
3630
  /**
3631
3631
  * The price IDs that this adjustment applies to.
3632
3632
  */
@@ -3636,6 +3636,11 @@ export declare namespace SubscriptionTriggerPhaseResponse {
3636
3636
  * that apply to only one price.
3637
3637
  */
3638
3638
  is_invoice_level: boolean;
3639
+ /**
3640
+ * The percentage (as a value between 0 and 1) by which to discount the price
3641
+ * intervals this adjustment applies to in a given billing period.
3642
+ */
3643
+ percentage_discount: number;
3639
3644
  /**
3640
3645
  * The plan phase in which this adjustment is active.
3641
3646
  */
@@ -3644,13 +3649,8 @@ export declare namespace SubscriptionTriggerPhaseResponse {
3644
3649
  * The reason for the adjustment.
3645
3650
  */
3646
3651
  reason: string | null;
3647
- /**
3648
- * The number of usage units by which to discount the price this adjustment applies
3649
- * to in a given billing period.
3650
- */
3651
- usage_discount: number;
3652
3652
  }
3653
- interface MinimumAdjustment {
3653
+ interface PlanPhaseMinimumAdjustment {
3654
3654
  id: string;
3655
3655
  adjustment_type: 'minimum';
3656
3656
  /**
@@ -3680,7 +3680,7 @@ export declare namespace SubscriptionTriggerPhaseResponse {
3680
3680
  */
3681
3681
  reason: string | null;
3682
3682
  }
3683
- interface MaximumAdjustment {
3683
+ interface PlanPhaseMaximumAdjustment {
3684
3684
  id: string;
3685
3685
  adjustment_type: 'maximum';
3686
3686
  /**
@@ -4036,7 +4036,7 @@ export interface SubscriptionUnscheduleCancellationResponse {
4036
4036
  export declare namespace SubscriptionUnscheduleCancellationResponse {
4037
4037
  interface AdjustmentInterval {
4038
4038
  id: string;
4039
- adjustment: AdjustmentInterval.AmountDiscountAdjustment | AdjustmentInterval.PercentageDiscountAdjustment | AdjustmentInterval.UsageDiscountAdjustment | AdjustmentInterval.MinimumAdjustment | AdjustmentInterval.MaximumAdjustment;
4039
+ adjustment: AdjustmentInterval.PlanPhaseUsageDiscountAdjustment | AdjustmentInterval.PlanPhaseAmountDiscountAdjustment | AdjustmentInterval.PlanPhasePercentageDiscountAdjustment | AdjustmentInterval.PlanPhaseMinimumAdjustment | AdjustmentInterval.PlanPhaseMaximumAdjustment;
4040
4040
  /**
4041
4041
  * The price interval IDs that this adjustment applies to.
4042
4042
  */
@@ -4051,14 +4051,9 @@ export declare namespace SubscriptionUnscheduleCancellationResponse {
4051
4051
  start_date: string;
4052
4052
  }
4053
4053
  namespace AdjustmentInterval {
4054
- interface AmountDiscountAdjustment {
4054
+ interface PlanPhaseUsageDiscountAdjustment {
4055
4055
  id: string;
4056
- adjustment_type: 'amount_discount';
4057
- /**
4058
- * The amount by which to discount the prices this adjustment applies to in a given
4059
- * billing period.
4060
- */
4061
- amount_discount: string;
4056
+ adjustment_type: 'usage_discount';
4062
4057
  /**
4063
4058
  * The price IDs that this adjustment applies to.
4064
4059
  */
@@ -4076,10 +4071,20 @@ export declare namespace SubscriptionUnscheduleCancellationResponse {
4076
4071
  * The reason for the adjustment.
4077
4072
  */
4078
4073
  reason: string | null;
4074
+ /**
4075
+ * The number of usage units by which to discount the price this adjustment applies
4076
+ * to in a given billing period.
4077
+ */
4078
+ usage_discount: number;
4079
4079
  }
4080
- interface PercentageDiscountAdjustment {
4080
+ interface PlanPhaseAmountDiscountAdjustment {
4081
4081
  id: string;
4082
- adjustment_type: 'percentage_discount';
4082
+ adjustment_type: 'amount_discount';
4083
+ /**
4084
+ * The amount by which to discount the prices this adjustment applies to in a given
4085
+ * billing period.
4086
+ */
4087
+ amount_discount: string;
4083
4088
  /**
4084
4089
  * The price IDs that this adjustment applies to.
4085
4090
  */
@@ -4089,11 +4094,6 @@ export declare namespace SubscriptionUnscheduleCancellationResponse {
4089
4094
  * that apply to only one price.
4090
4095
  */
4091
4096
  is_invoice_level: boolean;
4092
- /**
4093
- * The percentage (as a value between 0 and 1) by which to discount the price
4094
- * intervals this adjustment applies to in a given billing period.
4095
- */
4096
- percentage_discount: number;
4097
4097
  /**
4098
4098
  * The plan phase in which this adjustment is active.
4099
4099
  */
@@ -4103,9 +4103,9 @@ export declare namespace SubscriptionUnscheduleCancellationResponse {
4103
4103
  */
4104
4104
  reason: string | null;
4105
4105
  }
4106
- interface UsageDiscountAdjustment {
4106
+ interface PlanPhasePercentageDiscountAdjustment {
4107
4107
  id: string;
4108
- adjustment_type: 'usage_discount';
4108
+ adjustment_type: 'percentage_discount';
4109
4109
  /**
4110
4110
  * The price IDs that this adjustment applies to.
4111
4111
  */
@@ -4115,6 +4115,11 @@ export declare namespace SubscriptionUnscheduleCancellationResponse {
4115
4115
  * that apply to only one price.
4116
4116
  */
4117
4117
  is_invoice_level: boolean;
4118
+ /**
4119
+ * The percentage (as a value between 0 and 1) by which to discount the price
4120
+ * intervals this adjustment applies to in a given billing period.
4121
+ */
4122
+ percentage_discount: number;
4118
4123
  /**
4119
4124
  * The plan phase in which this adjustment is active.
4120
4125
  */
@@ -4123,13 +4128,8 @@ export declare namespace SubscriptionUnscheduleCancellationResponse {
4123
4128
  * The reason for the adjustment.
4124
4129
  */
4125
4130
  reason: string | null;
4126
- /**
4127
- * The number of usage units by which to discount the price this adjustment applies
4128
- * to in a given billing period.
4129
- */
4130
- usage_discount: number;
4131
4131
  }
4132
- interface MinimumAdjustment {
4132
+ interface PlanPhaseMinimumAdjustment {
4133
4133
  id: string;
4134
4134
  adjustment_type: 'minimum';
4135
4135
  /**
@@ -4159,7 +4159,7 @@ export declare namespace SubscriptionUnscheduleCancellationResponse {
4159
4159
  */
4160
4160
  reason: string | null;
4161
4161
  }
4162
- interface MaximumAdjustment {
4162
+ interface PlanPhaseMaximumAdjustment {
4163
4163
  id: string;
4164
4164
  adjustment_type: 'maximum';
4165
4165
  /**
@@ -4515,7 +4515,7 @@ export interface SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse {
4515
4515
  export declare namespace SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse {
4516
4516
  interface AdjustmentInterval {
4517
4517
  id: string;
4518
- adjustment: AdjustmentInterval.AmountDiscountAdjustment | AdjustmentInterval.PercentageDiscountAdjustment | AdjustmentInterval.UsageDiscountAdjustment | AdjustmentInterval.MinimumAdjustment | AdjustmentInterval.MaximumAdjustment;
4518
+ adjustment: AdjustmentInterval.PlanPhaseUsageDiscountAdjustment | AdjustmentInterval.PlanPhaseAmountDiscountAdjustment | AdjustmentInterval.PlanPhasePercentageDiscountAdjustment | AdjustmentInterval.PlanPhaseMinimumAdjustment | AdjustmentInterval.PlanPhaseMaximumAdjustment;
4519
4519
  /**
4520
4520
  * The price interval IDs that this adjustment applies to.
4521
4521
  */
@@ -4530,14 +4530,9 @@ export declare namespace SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse {
4530
4530
  start_date: string;
4531
4531
  }
4532
4532
  namespace AdjustmentInterval {
4533
- interface AmountDiscountAdjustment {
4533
+ interface PlanPhaseUsageDiscountAdjustment {
4534
4534
  id: string;
4535
- adjustment_type: 'amount_discount';
4536
- /**
4537
- * The amount by which to discount the prices this adjustment applies to in a given
4538
- * billing period.
4539
- */
4540
- amount_discount: string;
4535
+ adjustment_type: 'usage_discount';
4541
4536
  /**
4542
4537
  * The price IDs that this adjustment applies to.
4543
4538
  */
@@ -4555,10 +4550,20 @@ export declare namespace SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse {
4555
4550
  * The reason for the adjustment.
4556
4551
  */
4557
4552
  reason: string | null;
4553
+ /**
4554
+ * The number of usage units by which to discount the price this adjustment applies
4555
+ * to in a given billing period.
4556
+ */
4557
+ usage_discount: number;
4558
4558
  }
4559
- interface PercentageDiscountAdjustment {
4559
+ interface PlanPhaseAmountDiscountAdjustment {
4560
4560
  id: string;
4561
- adjustment_type: 'percentage_discount';
4561
+ adjustment_type: 'amount_discount';
4562
+ /**
4563
+ * The amount by which to discount the prices this adjustment applies to in a given
4564
+ * billing period.
4565
+ */
4566
+ amount_discount: string;
4562
4567
  /**
4563
4568
  * The price IDs that this adjustment applies to.
4564
4569
  */
@@ -4568,11 +4573,6 @@ export declare namespace SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse {
4568
4573
  * that apply to only one price.
4569
4574
  */
4570
4575
  is_invoice_level: boolean;
4571
- /**
4572
- * The percentage (as a value between 0 and 1) by which to discount the price
4573
- * intervals this adjustment applies to in a given billing period.
4574
- */
4575
- percentage_discount: number;
4576
4576
  /**
4577
4577
  * The plan phase in which this adjustment is active.
4578
4578
  */
@@ -4582,9 +4582,9 @@ export declare namespace SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse {
4582
4582
  */
4583
4583
  reason: string | null;
4584
4584
  }
4585
- interface UsageDiscountAdjustment {
4585
+ interface PlanPhasePercentageDiscountAdjustment {
4586
4586
  id: string;
4587
- adjustment_type: 'usage_discount';
4587
+ adjustment_type: 'percentage_discount';
4588
4588
  /**
4589
4589
  * The price IDs that this adjustment applies to.
4590
4590
  */
@@ -4594,6 +4594,11 @@ export declare namespace SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse {
4594
4594
  * that apply to only one price.
4595
4595
  */
4596
4596
  is_invoice_level: boolean;
4597
+ /**
4598
+ * The percentage (as a value between 0 and 1) by which to discount the price
4599
+ * intervals this adjustment applies to in a given billing period.
4600
+ */
4601
+ percentage_discount: number;
4597
4602
  /**
4598
4603
  * The plan phase in which this adjustment is active.
4599
4604
  */
@@ -4602,13 +4607,8 @@ export declare namespace SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse {
4602
4607
  * The reason for the adjustment.
4603
4608
  */
4604
4609
  reason: string | null;
4605
- /**
4606
- * The number of usage units by which to discount the price this adjustment applies
4607
- * to in a given billing period.
4608
- */
4609
- usage_discount: number;
4610
4610
  }
4611
- interface MinimumAdjustment {
4611
+ interface PlanPhaseMinimumAdjustment {
4612
4612
  id: string;
4613
4613
  adjustment_type: 'minimum';
4614
4614
  /**
@@ -4638,7 +4638,7 @@ export declare namespace SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse {
4638
4638
  */
4639
4639
  reason: string | null;
4640
4640
  }
4641
- interface MaximumAdjustment {
4641
+ interface PlanPhaseMaximumAdjustment {
4642
4642
  id: string;
4643
4643
  adjustment_type: 'maximum';
4644
4644
  /**
@@ -4994,7 +4994,7 @@ export interface SubscriptionUnschedulePendingPlanChangesResponse {
4994
4994
  export declare namespace SubscriptionUnschedulePendingPlanChangesResponse {
4995
4995
  interface AdjustmentInterval {
4996
4996
  id: string;
4997
- adjustment: AdjustmentInterval.AmountDiscountAdjustment | AdjustmentInterval.PercentageDiscountAdjustment | AdjustmentInterval.UsageDiscountAdjustment | AdjustmentInterval.MinimumAdjustment | AdjustmentInterval.MaximumAdjustment;
4997
+ adjustment: AdjustmentInterval.PlanPhaseUsageDiscountAdjustment | AdjustmentInterval.PlanPhaseAmountDiscountAdjustment | AdjustmentInterval.PlanPhasePercentageDiscountAdjustment | AdjustmentInterval.PlanPhaseMinimumAdjustment | AdjustmentInterval.PlanPhaseMaximumAdjustment;
4998
4998
  /**
4999
4999
  * The price interval IDs that this adjustment applies to.
5000
5000
  */
@@ -5009,14 +5009,9 @@ export declare namespace SubscriptionUnschedulePendingPlanChangesResponse {
5009
5009
  start_date: string;
5010
5010
  }
5011
5011
  namespace AdjustmentInterval {
5012
- interface AmountDiscountAdjustment {
5012
+ interface PlanPhaseUsageDiscountAdjustment {
5013
5013
  id: string;
5014
- adjustment_type: 'amount_discount';
5015
- /**
5016
- * The amount by which to discount the prices this adjustment applies to in a given
5017
- * billing period.
5018
- */
5019
- amount_discount: string;
5014
+ adjustment_type: 'usage_discount';
5020
5015
  /**
5021
5016
  * The price IDs that this adjustment applies to.
5022
5017
  */
@@ -5034,10 +5029,20 @@ export declare namespace SubscriptionUnschedulePendingPlanChangesResponse {
5034
5029
  * The reason for the adjustment.
5035
5030
  */
5036
5031
  reason: string | null;
5032
+ /**
5033
+ * The number of usage units by which to discount the price this adjustment applies
5034
+ * to in a given billing period.
5035
+ */
5036
+ usage_discount: number;
5037
5037
  }
5038
- interface PercentageDiscountAdjustment {
5038
+ interface PlanPhaseAmountDiscountAdjustment {
5039
5039
  id: string;
5040
- adjustment_type: 'percentage_discount';
5040
+ adjustment_type: 'amount_discount';
5041
+ /**
5042
+ * The amount by which to discount the prices this adjustment applies to in a given
5043
+ * billing period.
5044
+ */
5045
+ amount_discount: string;
5041
5046
  /**
5042
5047
  * The price IDs that this adjustment applies to.
5043
5048
  */
@@ -5047,11 +5052,6 @@ export declare namespace SubscriptionUnschedulePendingPlanChangesResponse {
5047
5052
  * that apply to only one price.
5048
5053
  */
5049
5054
  is_invoice_level: boolean;
5050
- /**
5051
- * The percentage (as a value between 0 and 1) by which to discount the price
5052
- * intervals this adjustment applies to in a given billing period.
5053
- */
5054
- percentage_discount: number;
5055
5055
  /**
5056
5056
  * The plan phase in which this adjustment is active.
5057
5057
  */
@@ -5061,9 +5061,9 @@ export declare namespace SubscriptionUnschedulePendingPlanChangesResponse {
5061
5061
  */
5062
5062
  reason: string | null;
5063
5063
  }
5064
- interface UsageDiscountAdjustment {
5064
+ interface PlanPhasePercentageDiscountAdjustment {
5065
5065
  id: string;
5066
- adjustment_type: 'usage_discount';
5066
+ adjustment_type: 'percentage_discount';
5067
5067
  /**
5068
5068
  * The price IDs that this adjustment applies to.
5069
5069
  */
@@ -5073,6 +5073,11 @@ export declare namespace SubscriptionUnschedulePendingPlanChangesResponse {
5073
5073
  * that apply to only one price.
5074
5074
  */
5075
5075
  is_invoice_level: boolean;
5076
+ /**
5077
+ * The percentage (as a value between 0 and 1) by which to discount the price
5078
+ * intervals this adjustment applies to in a given billing period.
5079
+ */
5080
+ percentage_discount: number;
5076
5081
  /**
5077
5082
  * The plan phase in which this adjustment is active.
5078
5083
  */
@@ -5081,13 +5086,8 @@ export declare namespace SubscriptionUnschedulePendingPlanChangesResponse {
5081
5086
  * The reason for the adjustment.
5082
5087
  */
5083
5088
  reason: string | null;
5084
- /**
5085
- * The number of usage units by which to discount the price this adjustment applies
5086
- * to in a given billing period.
5087
- */
5088
- usage_discount: number;
5089
5089
  }
5090
- interface MinimumAdjustment {
5090
+ interface PlanPhaseMinimumAdjustment {
5091
5091
  id: string;
5092
5092
  adjustment_type: 'minimum';
5093
5093
  /**
@@ -5117,7 +5117,7 @@ export declare namespace SubscriptionUnschedulePendingPlanChangesResponse {
5117
5117
  */
5118
5118
  reason: string | null;
5119
5119
  }
5120
- interface MaximumAdjustment {
5120
+ interface PlanPhaseMaximumAdjustment {
5121
5121
  id: string;
5122
5122
  adjustment_type: 'maximum';
5123
5123
  /**
@@ -5473,7 +5473,7 @@ export interface SubscriptionUpdateFixedFeeQuantityResponse {
5473
5473
  export declare namespace SubscriptionUpdateFixedFeeQuantityResponse {
5474
5474
  interface AdjustmentInterval {
5475
5475
  id: string;
5476
- adjustment: AdjustmentInterval.AmountDiscountAdjustment | AdjustmentInterval.PercentageDiscountAdjustment | AdjustmentInterval.UsageDiscountAdjustment | AdjustmentInterval.MinimumAdjustment | AdjustmentInterval.MaximumAdjustment;
5476
+ adjustment: AdjustmentInterval.PlanPhaseUsageDiscountAdjustment | AdjustmentInterval.PlanPhaseAmountDiscountAdjustment | AdjustmentInterval.PlanPhasePercentageDiscountAdjustment | AdjustmentInterval.PlanPhaseMinimumAdjustment | AdjustmentInterval.PlanPhaseMaximumAdjustment;
5477
5477
  /**
5478
5478
  * The price interval IDs that this adjustment applies to.
5479
5479
  */
@@ -5488,14 +5488,9 @@ export declare namespace SubscriptionUpdateFixedFeeQuantityResponse {
5488
5488
  start_date: string;
5489
5489
  }
5490
5490
  namespace AdjustmentInterval {
5491
- interface AmountDiscountAdjustment {
5491
+ interface PlanPhaseUsageDiscountAdjustment {
5492
5492
  id: string;
5493
- adjustment_type: 'amount_discount';
5494
- /**
5495
- * The amount by which to discount the prices this adjustment applies to in a given
5496
- * billing period.
5497
- */
5498
- amount_discount: string;
5493
+ adjustment_type: 'usage_discount';
5499
5494
  /**
5500
5495
  * The price IDs that this adjustment applies to.
5501
5496
  */
@@ -5513,10 +5508,20 @@ export declare namespace SubscriptionUpdateFixedFeeQuantityResponse {
5513
5508
  * The reason for the adjustment.
5514
5509
  */
5515
5510
  reason: string | null;
5511
+ /**
5512
+ * The number of usage units by which to discount the price this adjustment applies
5513
+ * to in a given billing period.
5514
+ */
5515
+ usage_discount: number;
5516
5516
  }
5517
- interface PercentageDiscountAdjustment {
5517
+ interface PlanPhaseAmountDiscountAdjustment {
5518
5518
  id: string;
5519
- adjustment_type: 'percentage_discount';
5519
+ adjustment_type: 'amount_discount';
5520
+ /**
5521
+ * The amount by which to discount the prices this adjustment applies to in a given
5522
+ * billing period.
5523
+ */
5524
+ amount_discount: string;
5520
5525
  /**
5521
5526
  * The price IDs that this adjustment applies to.
5522
5527
  */
@@ -5526,11 +5531,6 @@ export declare namespace SubscriptionUpdateFixedFeeQuantityResponse {
5526
5531
  * that apply to only one price.
5527
5532
  */
5528
5533
  is_invoice_level: boolean;
5529
- /**
5530
- * The percentage (as a value between 0 and 1) by which to discount the price
5531
- * intervals this adjustment applies to in a given billing period.
5532
- */
5533
- percentage_discount: number;
5534
5534
  /**
5535
5535
  * The plan phase in which this adjustment is active.
5536
5536
  */
@@ -5540,9 +5540,9 @@ export declare namespace SubscriptionUpdateFixedFeeQuantityResponse {
5540
5540
  */
5541
5541
  reason: string | null;
5542
5542
  }
5543
- interface UsageDiscountAdjustment {
5543
+ interface PlanPhasePercentageDiscountAdjustment {
5544
5544
  id: string;
5545
- adjustment_type: 'usage_discount';
5545
+ adjustment_type: 'percentage_discount';
5546
5546
  /**
5547
5547
  * The price IDs that this adjustment applies to.
5548
5548
  */
@@ -5552,6 +5552,11 @@ export declare namespace SubscriptionUpdateFixedFeeQuantityResponse {
5552
5552
  * that apply to only one price.
5553
5553
  */
5554
5554
  is_invoice_level: boolean;
5555
+ /**
5556
+ * The percentage (as a value between 0 and 1) by which to discount the price
5557
+ * intervals this adjustment applies to in a given billing period.
5558
+ */
5559
+ percentage_discount: number;
5555
5560
  /**
5556
5561
  * The plan phase in which this adjustment is active.
5557
5562
  */
@@ -5560,13 +5565,8 @@ export declare namespace SubscriptionUpdateFixedFeeQuantityResponse {
5560
5565
  * The reason for the adjustment.
5561
5566
  */
5562
5567
  reason: string | null;
5563
- /**
5564
- * The number of usage units by which to discount the price this adjustment applies
5565
- * to in a given billing period.
5566
- */
5567
- usage_discount: number;
5568
5568
  }
5569
- interface MinimumAdjustment {
5569
+ interface PlanPhaseMinimumAdjustment {
5570
5570
  id: string;
5571
5571
  adjustment_type: 'minimum';
5572
5572
  /**
@@ -5596,7 +5596,7 @@ export declare namespace SubscriptionUpdateFixedFeeQuantityResponse {
5596
5596
  */
5597
5597
  reason: string | null;
5598
5598
  }
5599
- interface MaximumAdjustment {
5599
+ interface PlanPhaseMaximumAdjustment {
5600
5600
  id: string;
5601
5601
  adjustment_type: 'maximum';
5602
5602
  /**
@@ -5952,7 +5952,7 @@ export interface SubscriptionUpdateTrialResponse {
5952
5952
  export declare namespace SubscriptionUpdateTrialResponse {
5953
5953
  interface AdjustmentInterval {
5954
5954
  id: string;
5955
- adjustment: AdjustmentInterval.AmountDiscountAdjustment | AdjustmentInterval.PercentageDiscountAdjustment | AdjustmentInterval.UsageDiscountAdjustment | AdjustmentInterval.MinimumAdjustment | AdjustmentInterval.MaximumAdjustment;
5955
+ adjustment: AdjustmentInterval.PlanPhaseUsageDiscountAdjustment | AdjustmentInterval.PlanPhaseAmountDiscountAdjustment | AdjustmentInterval.PlanPhasePercentageDiscountAdjustment | AdjustmentInterval.PlanPhaseMinimumAdjustment | AdjustmentInterval.PlanPhaseMaximumAdjustment;
5956
5956
  /**
5957
5957
  * The price interval IDs that this adjustment applies to.
5958
5958
  */
@@ -5967,14 +5967,9 @@ export declare namespace SubscriptionUpdateTrialResponse {
5967
5967
  start_date: string;
5968
5968
  }
5969
5969
  namespace AdjustmentInterval {
5970
- interface AmountDiscountAdjustment {
5970
+ interface PlanPhaseUsageDiscountAdjustment {
5971
5971
  id: string;
5972
- adjustment_type: 'amount_discount';
5973
- /**
5974
- * The amount by which to discount the prices this adjustment applies to in a given
5975
- * billing period.
5976
- */
5977
- amount_discount: string;
5972
+ adjustment_type: 'usage_discount';
5978
5973
  /**
5979
5974
  * The price IDs that this adjustment applies to.
5980
5975
  */
@@ -5992,10 +5987,20 @@ export declare namespace SubscriptionUpdateTrialResponse {
5992
5987
  * The reason for the adjustment.
5993
5988
  */
5994
5989
  reason: string | null;
5990
+ /**
5991
+ * The number of usage units by which to discount the price this adjustment applies
5992
+ * to in a given billing period.
5993
+ */
5994
+ usage_discount: number;
5995
5995
  }
5996
- interface PercentageDiscountAdjustment {
5996
+ interface PlanPhaseAmountDiscountAdjustment {
5997
5997
  id: string;
5998
- adjustment_type: 'percentage_discount';
5998
+ adjustment_type: 'amount_discount';
5999
+ /**
6000
+ * The amount by which to discount the prices this adjustment applies to in a given
6001
+ * billing period.
6002
+ */
6003
+ amount_discount: string;
5999
6004
  /**
6000
6005
  * The price IDs that this adjustment applies to.
6001
6006
  */
@@ -6005,11 +6010,6 @@ export declare namespace SubscriptionUpdateTrialResponse {
6005
6010
  * that apply to only one price.
6006
6011
  */
6007
6012
  is_invoice_level: boolean;
6008
- /**
6009
- * The percentage (as a value between 0 and 1) by which to discount the price
6010
- * intervals this adjustment applies to in a given billing period.
6011
- */
6012
- percentage_discount: number;
6013
6013
  /**
6014
6014
  * The plan phase in which this adjustment is active.
6015
6015
  */
@@ -6019,9 +6019,9 @@ export declare namespace SubscriptionUpdateTrialResponse {
6019
6019
  */
6020
6020
  reason: string | null;
6021
6021
  }
6022
- interface UsageDiscountAdjustment {
6022
+ interface PlanPhasePercentageDiscountAdjustment {
6023
6023
  id: string;
6024
- adjustment_type: 'usage_discount';
6024
+ adjustment_type: 'percentage_discount';
6025
6025
  /**
6026
6026
  * The price IDs that this adjustment applies to.
6027
6027
  */
@@ -6031,6 +6031,11 @@ export declare namespace SubscriptionUpdateTrialResponse {
6031
6031
  * that apply to only one price.
6032
6032
  */
6033
6033
  is_invoice_level: boolean;
6034
+ /**
6035
+ * The percentage (as a value between 0 and 1) by which to discount the price
6036
+ * intervals this adjustment applies to in a given billing period.
6037
+ */
6038
+ percentage_discount: number;
6034
6039
  /**
6035
6040
  * The plan phase in which this adjustment is active.
6036
6041
  */
@@ -6039,13 +6044,8 @@ export declare namespace SubscriptionUpdateTrialResponse {
6039
6044
  * The reason for the adjustment.
6040
6045
  */
6041
6046
  reason: string | null;
6042
- /**
6043
- * The number of usage units by which to discount the price this adjustment applies
6044
- * to in a given billing period.
6045
- */
6046
- usage_discount: number;
6047
6047
  }
6048
- interface MinimumAdjustment {
6048
+ interface PlanPhaseMinimumAdjustment {
6049
6049
  id: string;
6050
6050
  adjustment_type: 'minimum';
6051
6051
  /**
@@ -6075,7 +6075,7 @@ export declare namespace SubscriptionUpdateTrialResponse {
6075
6075
  */
6076
6076
  reason: string | null;
6077
6077
  }
6078
- interface MaximumAdjustment {
6078
+ interface PlanPhaseMaximumAdjustment {
6079
6079
  id: string;
6080
6080
  adjustment_type: 'maximum';
6081
6081
  /**
@@ -6436,8 +6436,7 @@ export declare namespace SubscriptionCreateParams {
6436
6436
  adjustment: AddAdjustment.NewPercentageDiscount | AddAdjustment.NewUsageDiscount | AddAdjustment.NewAmountDiscount | AddAdjustment.NewMinimum | AddAdjustment.NewMaximum;
6437
6437
  /**
6438
6438
  * The end date of the adjustment interval. This is the date that the adjustment
6439
- * will stop affecting prices on the subscription. If null, the adjustment will
6440
- * start when the phase or subscription starts.
6439
+ * will stop affecting prices on the subscription.
6441
6440
  */
6442
6441
  end_date?: string | null;
6443
6442
  /**
@@ -6523,6 +6522,10 @@ export declare namespace SubscriptionCreateParams {
6523
6522
  }
6524
6523
  }
6525
6524
  interface AddPrice {
6525
+ /**
6526
+ * The definition of a new allocation price to create and add to the subscription.
6527
+ */
6528
+ allocation_price?: AddPrice.AllocationPrice | null;
6526
6529
  /**
6527
6530
  * @deprecated [DEPRECATED] Use add_adjustments instead. The subscription's
6528
6531
  * discounts for this price.
@@ -6568,6 +6571,29 @@ export declare namespace SubscriptionCreateParams {
6568
6571
  start_date?: string | null;
6569
6572
  }
6570
6573
  namespace AddPrice {
6574
+ /**
6575
+ * The definition of a new allocation price to create and add to the subscription.
6576
+ */
6577
+ interface AllocationPrice {
6578
+ /**
6579
+ * An amount of the currency to allocate to the customer at the specified cadence.
6580
+ */
6581
+ amount: string;
6582
+ /**
6583
+ * The cadence at which to allocate the amount to the customer.
6584
+ */
6585
+ cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
6586
+ /**
6587
+ * An ISO 4217 currency string or a custom pricing unit identifier in which to bill
6588
+ * this price.
6589
+ */
6590
+ currency: string;
6591
+ /**
6592
+ * Whether the allocated amount should expire at the end of the cadence or roll
6593
+ * over to the next period.
6594
+ */
6595
+ expires_at_end_of_cadence: boolean;
6596
+ }
6571
6597
  interface Discount {
6572
6598
  discount_type: 'percentage' | 'usage' | 'amount';
6573
6599
  /**
@@ -8635,6 +8661,10 @@ export declare namespace SubscriptionCreateParams {
8635
8661
  * The id of the price on the plan to replace in the subscription.
8636
8662
  */
8637
8663
  replaces_price_id: string;
8664
+ /**
8665
+ * The definition of a new allocation price to create and add to the subscription.
8666
+ */
8667
+ allocation_price?: ReplacePrice.AllocationPrice | null;
8638
8668
  /**
8639
8669
  * @deprecated [DEPRECATED] Use add_adjustments instead. The subscription's
8640
8670
  * discounts for the replacement price.
@@ -8668,6 +8698,29 @@ export declare namespace SubscriptionCreateParams {
8668
8698
  price_id?: string | null;
8669
8699
  }
8670
8700
  namespace ReplacePrice {
8701
+ /**
8702
+ * The definition of a new allocation price to create and add to the subscription.
8703
+ */
8704
+ interface AllocationPrice {
8705
+ /**
8706
+ * An amount of the currency to allocate to the customer at the specified cadence.
8707
+ */
8708
+ amount: string;
8709
+ /**
8710
+ * The cadence at which to allocate the amount to the customer.
8711
+ */
8712
+ cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
8713
+ /**
8714
+ * An ISO 4217 currency string or a custom pricing unit identifier in which to bill
8715
+ * this price.
8716
+ */
8717
+ currency: string;
8718
+ /**
8719
+ * Whether the allocated amount should expire at the end of the cadence or roll
8720
+ * over to the next period.
8721
+ */
8722
+ expires_at_end_of_cadence: boolean;
8723
+ }
8671
8724
  interface Discount {
8672
8725
  discount_type: 'percentage' | 'usage' | 'amount';
8673
8726
  /**
@@ -13810,8 +13863,7 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
13810
13863
  adjustment: AddAdjustment.NewPercentageDiscount | AddAdjustment.NewUsageDiscount | AddAdjustment.NewAmountDiscount | AddAdjustment.NewMinimum | AddAdjustment.NewMaximum;
13811
13864
  /**
13812
13865
  * The end date of the adjustment interval. This is the date that the adjustment
13813
- * will stop affecting prices on the subscription. If null, the adjustment will
13814
- * start when the phase or subscription starts.
13866
+ * will stop affecting prices on the subscription.
13815
13867
  */
13816
13868
  end_date?: string | null;
13817
13869
  /**
@@ -13897,6 +13949,10 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
13897
13949
  }
13898
13950
  }
13899
13951
  interface AddPrice {
13952
+ /**
13953
+ * The definition of a new allocation price to create and add to the subscription.
13954
+ */
13955
+ allocation_price?: AddPrice.AllocationPrice | null;
13900
13956
  /**
13901
13957
  * @deprecated [DEPRECATED] Use add_adjustments instead. The subscription's
13902
13958
  * discounts for this price.
@@ -13942,6 +13998,29 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
13942
13998
  start_date?: string | null;
13943
13999
  }
13944
14000
  namespace AddPrice {
14001
+ /**
14002
+ * The definition of a new allocation price to create and add to the subscription.
14003
+ */
14004
+ interface AllocationPrice {
14005
+ /**
14006
+ * An amount of the currency to allocate to the customer at the specified cadence.
14007
+ */
14008
+ amount: string;
14009
+ /**
14010
+ * The cadence at which to allocate the amount to the customer.
14011
+ */
14012
+ cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
14013
+ /**
14014
+ * An ISO 4217 currency string or a custom pricing unit identifier in which to bill
14015
+ * this price.
14016
+ */
14017
+ currency: string;
14018
+ /**
14019
+ * Whether the allocated amount should expire at the end of the cadence or roll
14020
+ * over to the next period.
14021
+ */
14022
+ expires_at_end_of_cadence: boolean;
14023
+ }
13945
14024
  interface Discount {
13946
14025
  discount_type: 'percentage' | 'usage' | 'amount';
13947
14026
  /**
@@ -16009,6 +16088,10 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
16009
16088
  * The id of the price on the plan to replace in the subscription.
16010
16089
  */
16011
16090
  replaces_price_id: string;
16091
+ /**
16092
+ * The definition of a new allocation price to create and add to the subscription.
16093
+ */
16094
+ allocation_price?: ReplacePrice.AllocationPrice | null;
16012
16095
  /**
16013
16096
  * @deprecated [DEPRECATED] Use add_adjustments instead. The subscription's
16014
16097
  * discounts for the replacement price.
@@ -16042,6 +16125,29 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
16042
16125
  price_id?: string | null;
16043
16126
  }
16044
16127
  namespace ReplacePrice {
16128
+ /**
16129
+ * The definition of a new allocation price to create and add to the subscription.
16130
+ */
16131
+ interface AllocationPrice {
16132
+ /**
16133
+ * An amount of the currency to allocate to the customer at the specified cadence.
16134
+ */
16135
+ amount: string;
16136
+ /**
16137
+ * The cadence at which to allocate the amount to the customer.
16138
+ */
16139
+ cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
16140
+ /**
16141
+ * An ISO 4217 currency string or a custom pricing unit identifier in which to bill
16142
+ * this price.
16143
+ */
16144
+ currency: string;
16145
+ /**
16146
+ * Whether the allocated amount should expire at the end of the cadence or roll
16147
+ * over to the next period.
16148
+ */
16149
+ expires_at_end_of_cadence: boolean;
16150
+ }
16045
16151
  interface Discount {
16046
16152
  discount_type: 'percentage' | 'usage' | 'amount';
16047
16153
  /**