orb-billing 4.54.0 → 4.55.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.
- package/CHANGELOG.md +9 -0
- package/core.d.ts.map +1 -1
- package/core.js +12 -6
- package/core.js.map +1 -1
- package/core.mjs +12 -6
- package/core.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/events/backfills.d.ts +30 -0
- package/resources/events/backfills.d.ts.map +1 -1
- package/resources/events/backfills.js.map +1 -1
- package/resources/events/backfills.mjs.map +1 -1
- package/resources/invoice-line-items.d.ts +49 -45
- package/resources/invoice-line-items.d.ts.map +1 -1
- package/resources/invoices.d.ts +98 -90
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs.map +1 -1
- package/resources/plans/plans.d.ts +24 -24
- package/resources/plans/plans.d.ts.map +1 -1
- package/resources/subscriptions.d.ts +266 -268
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs.map +1 -1
- package/src/core.ts +14 -6
- package/src/resources/events/backfills.ts +35 -0
- package/src/resources/invoice-line-items.ts +57 -53
- package/src/resources/invoices.ts +114 -106
- package/src/resources/plans/plans.ts +31 -31
- package/src/resources/subscriptions.ts +343 -345
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -847,29 +847,30 @@ export namespace Invoice {
|
|
|
847
847
|
id: string;
|
|
848
848
|
|
|
849
849
|
/**
|
|
850
|
-
* The line amount after any adjustments
|
|
850
|
+
* The line amount after any adjustments and before overage conversion, credits and
|
|
851
851
|
* partial invoicing.
|
|
852
852
|
*/
|
|
853
853
|
adjusted_subtotal: string;
|
|
854
854
|
|
|
855
855
|
/**
|
|
856
|
-
* All adjustments applied to the line item.
|
|
856
|
+
* All adjustments (ie. maximums, minimums, discounts) applied to the line item.
|
|
857
857
|
*/
|
|
858
858
|
adjustments: Array<
|
|
859
|
-
| LineItem.
|
|
860
|
-
| LineItem.
|
|
861
|
-
| LineItem.
|
|
862
|
-
| LineItem.
|
|
863
|
-
| LineItem.
|
|
859
|
+
| LineItem.MonetaryUsageDiscountAdjustment
|
|
860
|
+
| LineItem.MonetaryAmountDiscountAdjustment
|
|
861
|
+
| LineItem.MonetaryPercentageDiscountAdjustment
|
|
862
|
+
| LineItem.MonetaryMinimumAdjustment
|
|
863
|
+
| LineItem.MonetaryMaximumAdjustment
|
|
864
864
|
>;
|
|
865
865
|
|
|
866
866
|
/**
|
|
867
|
-
* The final amount after
|
|
867
|
+
* The final amount for a line item after all adjustments and pre paid credits have
|
|
868
|
+
* been applied.
|
|
868
869
|
*/
|
|
869
870
|
amount: string;
|
|
870
871
|
|
|
871
872
|
/**
|
|
872
|
-
* The number of credits
|
|
873
|
+
* The number of prepaid credits applied.
|
|
873
874
|
*/
|
|
874
875
|
credits_applied: string;
|
|
875
876
|
|
|
@@ -931,6 +932,9 @@ export namespace Invoice {
|
|
|
931
932
|
*/
|
|
932
933
|
price: PricesAPI.Price | null;
|
|
933
934
|
|
|
935
|
+
/**
|
|
936
|
+
* Either the fixed fee quantity or the usage during the service period.
|
|
937
|
+
*/
|
|
934
938
|
quantity: number;
|
|
935
939
|
|
|
936
940
|
/**
|
|
@@ -945,7 +949,7 @@ export namespace Invoice {
|
|
|
945
949
|
sub_line_items: Array<LineItem.MatrixSubLineItem | LineItem.TierSubLineItem | LineItem.OtherSubLineItem>;
|
|
946
950
|
|
|
947
951
|
/**
|
|
948
|
-
* The line amount before any
|
|
952
|
+
* The line amount before before any adjustments.
|
|
949
953
|
*/
|
|
950
954
|
subtotal: string;
|
|
951
955
|
|
|
@@ -957,16 +961,15 @@ export namespace Invoice {
|
|
|
957
961
|
}
|
|
958
962
|
|
|
959
963
|
export namespace LineItem {
|
|
960
|
-
export interface
|
|
964
|
+
export interface MonetaryUsageDiscountAdjustment {
|
|
961
965
|
id: string;
|
|
962
966
|
|
|
963
|
-
adjustment_type: '
|
|
967
|
+
adjustment_type: 'usage_discount';
|
|
964
968
|
|
|
965
969
|
/**
|
|
966
|
-
* The
|
|
967
|
-
* billing period.
|
|
970
|
+
* The value applied by an adjustment.
|
|
968
971
|
*/
|
|
969
|
-
|
|
972
|
+
amount: string;
|
|
970
973
|
|
|
971
974
|
/**
|
|
972
975
|
* The price IDs that this adjustment applies to.
|
|
@@ -980,42 +983,43 @@ export namespace Invoice {
|
|
|
980
983
|
is_invoice_level: boolean;
|
|
981
984
|
|
|
982
985
|
/**
|
|
983
|
-
* The
|
|
986
|
+
* The reason for the adjustment.
|
|
984
987
|
*/
|
|
985
|
-
|
|
988
|
+
reason: string | null;
|
|
986
989
|
|
|
987
990
|
/**
|
|
988
|
-
* The
|
|
991
|
+
* The number of usage units by which to discount the price this adjustment applies
|
|
992
|
+
* to in a given billing period.
|
|
989
993
|
*/
|
|
990
|
-
|
|
994
|
+
usage_discount: number;
|
|
991
995
|
}
|
|
992
996
|
|
|
993
|
-
export interface
|
|
997
|
+
export interface MonetaryAmountDiscountAdjustment {
|
|
994
998
|
id: string;
|
|
995
999
|
|
|
996
|
-
adjustment_type: '
|
|
1000
|
+
adjustment_type: 'amount_discount';
|
|
997
1001
|
|
|
998
1002
|
/**
|
|
999
|
-
* The
|
|
1003
|
+
* The value applied by an adjustment.
|
|
1000
1004
|
*/
|
|
1001
|
-
|
|
1005
|
+
amount: string;
|
|
1002
1006
|
|
|
1003
1007
|
/**
|
|
1004
|
-
*
|
|
1005
|
-
*
|
|
1008
|
+
* The amount by which to discount the prices this adjustment applies to in a given
|
|
1009
|
+
* billing period.
|
|
1006
1010
|
*/
|
|
1007
|
-
|
|
1011
|
+
amount_discount: string;
|
|
1008
1012
|
|
|
1009
1013
|
/**
|
|
1010
|
-
* The
|
|
1011
|
-
* intervals this adjustment applies to in a given billing period.
|
|
1014
|
+
* The price IDs that this adjustment applies to.
|
|
1012
1015
|
*/
|
|
1013
|
-
|
|
1016
|
+
applies_to_price_ids: Array<string>;
|
|
1014
1017
|
|
|
1015
1018
|
/**
|
|
1016
|
-
*
|
|
1019
|
+
* True for adjustments that apply to an entire invocice, false for adjustments
|
|
1020
|
+
* that apply to only one price.
|
|
1017
1021
|
*/
|
|
1018
|
-
|
|
1022
|
+
is_invoice_level: boolean;
|
|
1019
1023
|
|
|
1020
1024
|
/**
|
|
1021
1025
|
* The reason for the adjustment.
|
|
@@ -1023,10 +1027,15 @@ export namespace Invoice {
|
|
|
1023
1027
|
reason: string | null;
|
|
1024
1028
|
}
|
|
1025
1029
|
|
|
1026
|
-
export interface
|
|
1030
|
+
export interface MonetaryPercentageDiscountAdjustment {
|
|
1027
1031
|
id: string;
|
|
1028
1032
|
|
|
1029
|
-
adjustment_type: '
|
|
1033
|
+
adjustment_type: 'percentage_discount';
|
|
1034
|
+
|
|
1035
|
+
/**
|
|
1036
|
+
* The value applied by an adjustment.
|
|
1037
|
+
*/
|
|
1038
|
+
amount: string;
|
|
1030
1039
|
|
|
1031
1040
|
/**
|
|
1032
1041
|
* The price IDs that this adjustment applies to.
|
|
@@ -1040,27 +1049,27 @@ export namespace Invoice {
|
|
|
1040
1049
|
is_invoice_level: boolean;
|
|
1041
1050
|
|
|
1042
1051
|
/**
|
|
1043
|
-
* The
|
|
1052
|
+
* The percentage (as a value between 0 and 1) by which to discount the price
|
|
1053
|
+
* intervals this adjustment applies to in a given billing period.
|
|
1044
1054
|
*/
|
|
1045
|
-
|
|
1055
|
+
percentage_discount: number;
|
|
1046
1056
|
|
|
1047
1057
|
/**
|
|
1048
1058
|
* The reason for the adjustment.
|
|
1049
1059
|
*/
|
|
1050
1060
|
reason: string | null;
|
|
1051
|
-
|
|
1052
|
-
/**
|
|
1053
|
-
* The number of usage units by which to discount the price this adjustment applies
|
|
1054
|
-
* to in a given billing period.
|
|
1055
|
-
*/
|
|
1056
|
-
usage_discount: number;
|
|
1057
1061
|
}
|
|
1058
1062
|
|
|
1059
|
-
export interface
|
|
1063
|
+
export interface MonetaryMinimumAdjustment {
|
|
1060
1064
|
id: string;
|
|
1061
1065
|
|
|
1062
1066
|
adjustment_type: 'minimum';
|
|
1063
1067
|
|
|
1068
|
+
/**
|
|
1069
|
+
* The value applied by an adjustment.
|
|
1070
|
+
*/
|
|
1071
|
+
amount: string;
|
|
1072
|
+
|
|
1064
1073
|
/**
|
|
1065
1074
|
* The price IDs that this adjustment applies to.
|
|
1066
1075
|
*/
|
|
@@ -1083,22 +1092,22 @@ export namespace Invoice {
|
|
|
1083
1092
|
*/
|
|
1084
1093
|
minimum_amount: string;
|
|
1085
1094
|
|
|
1086
|
-
/**
|
|
1087
|
-
* The plan phase in which this adjustment is active.
|
|
1088
|
-
*/
|
|
1089
|
-
plan_phase_order: number | null;
|
|
1090
|
-
|
|
1091
1095
|
/**
|
|
1092
1096
|
* The reason for the adjustment.
|
|
1093
1097
|
*/
|
|
1094
1098
|
reason: string | null;
|
|
1095
1099
|
}
|
|
1096
1100
|
|
|
1097
|
-
export interface
|
|
1101
|
+
export interface MonetaryMaximumAdjustment {
|
|
1098
1102
|
id: string;
|
|
1099
1103
|
|
|
1100
1104
|
adjustment_type: 'maximum';
|
|
1101
1105
|
|
|
1106
|
+
/**
|
|
1107
|
+
* The value applied by an adjustment.
|
|
1108
|
+
*/
|
|
1109
|
+
amount: string;
|
|
1110
|
+
|
|
1102
1111
|
/**
|
|
1103
1112
|
* The price IDs that this adjustment applies to.
|
|
1104
1113
|
*/
|
|
@@ -1116,11 +1125,6 @@ export namespace Invoice {
|
|
|
1116
1125
|
*/
|
|
1117
1126
|
maximum_amount: string;
|
|
1118
1127
|
|
|
1119
|
-
/**
|
|
1120
|
-
* The plan phase in which this adjustment is active.
|
|
1121
|
-
*/
|
|
1122
|
-
plan_phase_order: number | null;
|
|
1123
|
-
|
|
1124
1128
|
/**
|
|
1125
1129
|
* The reason for the adjustment.
|
|
1126
1130
|
*/
|
|
@@ -2053,29 +2057,30 @@ export namespace InvoiceFetchUpcomingResponse {
|
|
|
2053
2057
|
id: string;
|
|
2054
2058
|
|
|
2055
2059
|
/**
|
|
2056
|
-
* The line amount after any adjustments
|
|
2060
|
+
* The line amount after any adjustments and before overage conversion, credits and
|
|
2057
2061
|
* partial invoicing.
|
|
2058
2062
|
*/
|
|
2059
2063
|
adjusted_subtotal: string;
|
|
2060
2064
|
|
|
2061
2065
|
/**
|
|
2062
|
-
* All adjustments applied to the line item.
|
|
2066
|
+
* All adjustments (ie. maximums, minimums, discounts) applied to the line item.
|
|
2063
2067
|
*/
|
|
2064
2068
|
adjustments: Array<
|
|
2065
|
-
| LineItem.
|
|
2066
|
-
| LineItem.
|
|
2067
|
-
| LineItem.
|
|
2068
|
-
| LineItem.
|
|
2069
|
-
| LineItem.
|
|
2069
|
+
| LineItem.MonetaryUsageDiscountAdjustment
|
|
2070
|
+
| LineItem.MonetaryAmountDiscountAdjustment
|
|
2071
|
+
| LineItem.MonetaryPercentageDiscountAdjustment
|
|
2072
|
+
| LineItem.MonetaryMinimumAdjustment
|
|
2073
|
+
| LineItem.MonetaryMaximumAdjustment
|
|
2070
2074
|
>;
|
|
2071
2075
|
|
|
2072
2076
|
/**
|
|
2073
|
-
* The final amount after
|
|
2077
|
+
* The final amount for a line item after all adjustments and pre paid credits have
|
|
2078
|
+
* been applied.
|
|
2074
2079
|
*/
|
|
2075
2080
|
amount: string;
|
|
2076
2081
|
|
|
2077
2082
|
/**
|
|
2078
|
-
* The number of credits
|
|
2083
|
+
* The number of prepaid credits applied.
|
|
2079
2084
|
*/
|
|
2080
2085
|
credits_applied: string;
|
|
2081
2086
|
|
|
@@ -2137,6 +2142,9 @@ export namespace InvoiceFetchUpcomingResponse {
|
|
|
2137
2142
|
*/
|
|
2138
2143
|
price: PricesAPI.Price | null;
|
|
2139
2144
|
|
|
2145
|
+
/**
|
|
2146
|
+
* Either the fixed fee quantity or the usage during the service period.
|
|
2147
|
+
*/
|
|
2140
2148
|
quantity: number;
|
|
2141
2149
|
|
|
2142
2150
|
/**
|
|
@@ -2151,7 +2159,7 @@ export namespace InvoiceFetchUpcomingResponse {
|
|
|
2151
2159
|
sub_line_items: Array<LineItem.MatrixSubLineItem | LineItem.TierSubLineItem | LineItem.OtherSubLineItem>;
|
|
2152
2160
|
|
|
2153
2161
|
/**
|
|
2154
|
-
* The line amount before any
|
|
2162
|
+
* The line amount before before any adjustments.
|
|
2155
2163
|
*/
|
|
2156
2164
|
subtotal: string;
|
|
2157
2165
|
|
|
@@ -2163,16 +2171,15 @@ export namespace InvoiceFetchUpcomingResponse {
|
|
|
2163
2171
|
}
|
|
2164
2172
|
|
|
2165
2173
|
export namespace LineItem {
|
|
2166
|
-
export interface
|
|
2174
|
+
export interface MonetaryUsageDiscountAdjustment {
|
|
2167
2175
|
id: string;
|
|
2168
2176
|
|
|
2169
|
-
adjustment_type: '
|
|
2177
|
+
adjustment_type: 'usage_discount';
|
|
2170
2178
|
|
|
2171
2179
|
/**
|
|
2172
|
-
* The
|
|
2173
|
-
* billing period.
|
|
2180
|
+
* The value applied by an adjustment.
|
|
2174
2181
|
*/
|
|
2175
|
-
|
|
2182
|
+
amount: string;
|
|
2176
2183
|
|
|
2177
2184
|
/**
|
|
2178
2185
|
* The price IDs that this adjustment applies to.
|
|
@@ -2186,42 +2193,43 @@ export namespace InvoiceFetchUpcomingResponse {
|
|
|
2186
2193
|
is_invoice_level: boolean;
|
|
2187
2194
|
|
|
2188
2195
|
/**
|
|
2189
|
-
* The
|
|
2196
|
+
* The reason for the adjustment.
|
|
2190
2197
|
*/
|
|
2191
|
-
|
|
2198
|
+
reason: string | null;
|
|
2192
2199
|
|
|
2193
2200
|
/**
|
|
2194
|
-
* The
|
|
2201
|
+
* The number of usage units by which to discount the price this adjustment applies
|
|
2202
|
+
* to in a given billing period.
|
|
2195
2203
|
*/
|
|
2196
|
-
|
|
2204
|
+
usage_discount: number;
|
|
2197
2205
|
}
|
|
2198
2206
|
|
|
2199
|
-
export interface
|
|
2207
|
+
export interface MonetaryAmountDiscountAdjustment {
|
|
2200
2208
|
id: string;
|
|
2201
2209
|
|
|
2202
|
-
adjustment_type: '
|
|
2210
|
+
adjustment_type: 'amount_discount';
|
|
2203
2211
|
|
|
2204
2212
|
/**
|
|
2205
|
-
* The
|
|
2213
|
+
* The value applied by an adjustment.
|
|
2206
2214
|
*/
|
|
2207
|
-
|
|
2215
|
+
amount: string;
|
|
2208
2216
|
|
|
2209
2217
|
/**
|
|
2210
|
-
*
|
|
2211
|
-
*
|
|
2218
|
+
* The amount by which to discount the prices this adjustment applies to in a given
|
|
2219
|
+
* billing period.
|
|
2212
2220
|
*/
|
|
2213
|
-
|
|
2221
|
+
amount_discount: string;
|
|
2214
2222
|
|
|
2215
2223
|
/**
|
|
2216
|
-
* The
|
|
2217
|
-
* intervals this adjustment applies to in a given billing period.
|
|
2224
|
+
* The price IDs that this adjustment applies to.
|
|
2218
2225
|
*/
|
|
2219
|
-
|
|
2226
|
+
applies_to_price_ids: Array<string>;
|
|
2220
2227
|
|
|
2221
2228
|
/**
|
|
2222
|
-
*
|
|
2229
|
+
* True for adjustments that apply to an entire invocice, false for adjustments
|
|
2230
|
+
* that apply to only one price.
|
|
2223
2231
|
*/
|
|
2224
|
-
|
|
2232
|
+
is_invoice_level: boolean;
|
|
2225
2233
|
|
|
2226
2234
|
/**
|
|
2227
2235
|
* The reason for the adjustment.
|
|
@@ -2229,10 +2237,15 @@ export namespace InvoiceFetchUpcomingResponse {
|
|
|
2229
2237
|
reason: string | null;
|
|
2230
2238
|
}
|
|
2231
2239
|
|
|
2232
|
-
export interface
|
|
2240
|
+
export interface MonetaryPercentageDiscountAdjustment {
|
|
2233
2241
|
id: string;
|
|
2234
2242
|
|
|
2235
|
-
adjustment_type: '
|
|
2243
|
+
adjustment_type: 'percentage_discount';
|
|
2244
|
+
|
|
2245
|
+
/**
|
|
2246
|
+
* The value applied by an adjustment.
|
|
2247
|
+
*/
|
|
2248
|
+
amount: string;
|
|
2236
2249
|
|
|
2237
2250
|
/**
|
|
2238
2251
|
* The price IDs that this adjustment applies to.
|
|
@@ -2246,27 +2259,27 @@ export namespace InvoiceFetchUpcomingResponse {
|
|
|
2246
2259
|
is_invoice_level: boolean;
|
|
2247
2260
|
|
|
2248
2261
|
/**
|
|
2249
|
-
* The
|
|
2262
|
+
* The percentage (as a value between 0 and 1) by which to discount the price
|
|
2263
|
+
* intervals this adjustment applies to in a given billing period.
|
|
2250
2264
|
*/
|
|
2251
|
-
|
|
2265
|
+
percentage_discount: number;
|
|
2252
2266
|
|
|
2253
2267
|
/**
|
|
2254
2268
|
* The reason for the adjustment.
|
|
2255
2269
|
*/
|
|
2256
2270
|
reason: string | null;
|
|
2257
|
-
|
|
2258
|
-
/**
|
|
2259
|
-
* The number of usage units by which to discount the price this adjustment applies
|
|
2260
|
-
* to in a given billing period.
|
|
2261
|
-
*/
|
|
2262
|
-
usage_discount: number;
|
|
2263
2271
|
}
|
|
2264
2272
|
|
|
2265
|
-
export interface
|
|
2273
|
+
export interface MonetaryMinimumAdjustment {
|
|
2266
2274
|
id: string;
|
|
2267
2275
|
|
|
2268
2276
|
adjustment_type: 'minimum';
|
|
2269
2277
|
|
|
2278
|
+
/**
|
|
2279
|
+
* The value applied by an adjustment.
|
|
2280
|
+
*/
|
|
2281
|
+
amount: string;
|
|
2282
|
+
|
|
2270
2283
|
/**
|
|
2271
2284
|
* The price IDs that this adjustment applies to.
|
|
2272
2285
|
*/
|
|
@@ -2289,22 +2302,22 @@ export namespace InvoiceFetchUpcomingResponse {
|
|
|
2289
2302
|
*/
|
|
2290
2303
|
minimum_amount: string;
|
|
2291
2304
|
|
|
2292
|
-
/**
|
|
2293
|
-
* The plan phase in which this adjustment is active.
|
|
2294
|
-
*/
|
|
2295
|
-
plan_phase_order: number | null;
|
|
2296
|
-
|
|
2297
2305
|
/**
|
|
2298
2306
|
* The reason for the adjustment.
|
|
2299
2307
|
*/
|
|
2300
2308
|
reason: string | null;
|
|
2301
2309
|
}
|
|
2302
2310
|
|
|
2303
|
-
export interface
|
|
2311
|
+
export interface MonetaryMaximumAdjustment {
|
|
2304
2312
|
id: string;
|
|
2305
2313
|
|
|
2306
2314
|
adjustment_type: 'maximum';
|
|
2307
2315
|
|
|
2316
|
+
/**
|
|
2317
|
+
* The value applied by an adjustment.
|
|
2318
|
+
*/
|
|
2319
|
+
amount: string;
|
|
2320
|
+
|
|
2308
2321
|
/**
|
|
2309
2322
|
* The price IDs that this adjustment applies to.
|
|
2310
2323
|
*/
|
|
@@ -2322,11 +2335,6 @@ export namespace InvoiceFetchUpcomingResponse {
|
|
|
2322
2335
|
*/
|
|
2323
2336
|
maximum_amount: string;
|
|
2324
2337
|
|
|
2325
|
-
/**
|
|
2326
|
-
* The plan phase in which this adjustment is active.
|
|
2327
|
-
*/
|
|
2328
|
-
plan_phase_order: number | null;
|
|
2329
|
-
|
|
2330
2338
|
/**
|
|
2331
2339
|
* The reason for the adjustment.
|
|
2332
2340
|
*/
|
|
@@ -88,11 +88,11 @@ export interface Plan {
|
|
|
88
88
|
* across all phases of the plan.
|
|
89
89
|
*/
|
|
90
90
|
adjustments: Array<
|
|
91
|
-
| Plan.
|
|
92
|
-
| Plan.
|
|
93
|
-
| Plan.
|
|
94
|
-
| Plan.
|
|
95
|
-
| Plan.
|
|
91
|
+
| Plan.PlanPhaseUsageDiscountAdjustment
|
|
92
|
+
| Plan.PlanPhaseAmountDiscountAdjustment
|
|
93
|
+
| Plan.PlanPhasePercentageDiscountAdjustment
|
|
94
|
+
| Plan.PlanPhaseMinimumAdjustment
|
|
95
|
+
| Plan.PlanPhaseMaximumAdjustment
|
|
96
96
|
>;
|
|
97
97
|
|
|
98
98
|
base_plan: Plan.BasePlan | null;
|
|
@@ -179,16 +179,10 @@ export interface Plan {
|
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
export namespace Plan {
|
|
182
|
-
export interface
|
|
182
|
+
export interface PlanPhaseUsageDiscountAdjustment {
|
|
183
183
|
id: string;
|
|
184
184
|
|
|
185
|
-
adjustment_type: '
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* The amount by which to discount the prices this adjustment applies to in a given
|
|
189
|
-
* billing period.
|
|
190
|
-
*/
|
|
191
|
-
amount_discount: string;
|
|
185
|
+
adjustment_type: 'usage_discount';
|
|
192
186
|
|
|
193
187
|
/**
|
|
194
188
|
* The price IDs that this adjustment applies to.
|
|
@@ -210,12 +204,24 @@ export namespace Plan {
|
|
|
210
204
|
* The reason for the adjustment.
|
|
211
205
|
*/
|
|
212
206
|
reason: string | null;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* The number of usage units by which to discount the price this adjustment applies
|
|
210
|
+
* to in a given billing period.
|
|
211
|
+
*/
|
|
212
|
+
usage_discount: number;
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
export interface
|
|
215
|
+
export interface PlanPhaseAmountDiscountAdjustment {
|
|
216
216
|
id: string;
|
|
217
217
|
|
|
218
|
-
adjustment_type: '
|
|
218
|
+
adjustment_type: 'amount_discount';
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* The amount by which to discount the prices this adjustment applies to in a given
|
|
222
|
+
* billing period.
|
|
223
|
+
*/
|
|
224
|
+
amount_discount: string;
|
|
219
225
|
|
|
220
226
|
/**
|
|
221
227
|
* The price IDs that this adjustment applies to.
|
|
@@ -228,12 +234,6 @@ export namespace Plan {
|
|
|
228
234
|
*/
|
|
229
235
|
is_invoice_level: boolean;
|
|
230
236
|
|
|
231
|
-
/**
|
|
232
|
-
* The percentage (as a value between 0 and 1) by which to discount the price
|
|
233
|
-
* intervals this adjustment applies to in a given billing period.
|
|
234
|
-
*/
|
|
235
|
-
percentage_discount: number;
|
|
236
|
-
|
|
237
237
|
/**
|
|
238
238
|
* The plan phase in which this adjustment is active.
|
|
239
239
|
*/
|
|
@@ -245,10 +245,10 @@ export namespace Plan {
|
|
|
245
245
|
reason: string | null;
|
|
246
246
|
}
|
|
247
247
|
|
|
248
|
-
export interface
|
|
248
|
+
export interface PlanPhasePercentageDiscountAdjustment {
|
|
249
249
|
id: string;
|
|
250
250
|
|
|
251
|
-
adjustment_type: '
|
|
251
|
+
adjustment_type: 'percentage_discount';
|
|
252
252
|
|
|
253
253
|
/**
|
|
254
254
|
* The price IDs that this adjustment applies to.
|
|
@@ -261,6 +261,12 @@ export namespace Plan {
|
|
|
261
261
|
*/
|
|
262
262
|
is_invoice_level: boolean;
|
|
263
263
|
|
|
264
|
+
/**
|
|
265
|
+
* The percentage (as a value between 0 and 1) by which to discount the price
|
|
266
|
+
* intervals this adjustment applies to in a given billing period.
|
|
267
|
+
*/
|
|
268
|
+
percentage_discount: number;
|
|
269
|
+
|
|
264
270
|
/**
|
|
265
271
|
* The plan phase in which this adjustment is active.
|
|
266
272
|
*/
|
|
@@ -270,15 +276,9 @@ export namespace Plan {
|
|
|
270
276
|
* The reason for the adjustment.
|
|
271
277
|
*/
|
|
272
278
|
reason: string | null;
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* The number of usage units by which to discount the price this adjustment applies
|
|
276
|
-
* to in a given billing period.
|
|
277
|
-
*/
|
|
278
|
-
usage_discount: number;
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
-
export interface
|
|
281
|
+
export interface PlanPhaseMinimumAdjustment {
|
|
282
282
|
id: string;
|
|
283
283
|
|
|
284
284
|
adjustment_type: 'minimum';
|
|
@@ -316,7 +316,7 @@ export namespace Plan {
|
|
|
316
316
|
reason: string | null;
|
|
317
317
|
}
|
|
318
318
|
|
|
319
|
-
export interface
|
|
319
|
+
export interface PlanPhaseMaximumAdjustment {
|
|
320
320
|
id: string;
|
|
321
321
|
|
|
322
322
|
adjustment_type: 'maximum';
|