orb-billing 5.17.0 → 5.18.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.
@@ -184,6 +184,7 @@ export namespace BetaCreatePlanVersionParams {
184
184
  | Shared.NewPlanUnitPrice
185
185
  | Shared.NewPlanTieredPrice
186
186
  | Shared.NewPlanBulkPrice
187
+ | AddPrice.NewPlanBulkWithFiltersPrice
187
188
  | Shared.NewPlanPackagePrice
188
189
  | Shared.NewPlanMatrixPrice
189
190
  | Shared.NewPlanThresholdTotalAmountPrice
@@ -214,6 +215,156 @@ export namespace BetaCreatePlanVersionParams {
214
215
  }
215
216
 
216
217
  export namespace AddPrice {
218
+ export interface NewPlanBulkWithFiltersPrice {
219
+ /**
220
+ * Configuration for bulk_with_filters pricing
221
+ */
222
+ bulk_with_filters_config: NewPlanBulkWithFiltersPrice.BulkWithFiltersConfig;
223
+
224
+ /**
225
+ * The cadence to bill for this price on.
226
+ */
227
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
228
+
229
+ /**
230
+ * The id of the item the price will be associated with.
231
+ */
232
+ item_id: string;
233
+
234
+ /**
235
+ * The pricing model type
236
+ */
237
+ model_type: 'bulk_with_filters';
238
+
239
+ /**
240
+ * The name of the price.
241
+ */
242
+ name: string;
243
+
244
+ /**
245
+ * The id of the billable metric for the price. Only needed if the price is
246
+ * usage-based.
247
+ */
248
+ billable_metric_id?: string | null;
249
+
250
+ /**
251
+ * If the Price represents a fixed cost, the price will be billed in-advance if
252
+ * this is true, and in-arrears if this is false.
253
+ */
254
+ billed_in_advance?: boolean | null;
255
+
256
+ /**
257
+ * For custom cadence: specifies the duration of the billing period in days or
258
+ * months.
259
+ */
260
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
261
+
262
+ /**
263
+ * The per unit conversion rate of the price currency to the invoicing currency.
264
+ */
265
+ conversion_rate?: number | null;
266
+
267
+ /**
268
+ * The configuration for the rate of the price currency to the invoicing currency.
269
+ */
270
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
271
+
272
+ /**
273
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
274
+ * price is billed.
275
+ */
276
+ currency?: string | null;
277
+
278
+ /**
279
+ * For dimensional price: specifies a price group and dimension values
280
+ */
281
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
282
+
283
+ /**
284
+ * An alias for the price.
285
+ */
286
+ external_price_id?: string | null;
287
+
288
+ /**
289
+ * If the Price represents a fixed cost, this represents the quantity of units
290
+ * applied.
291
+ */
292
+ fixed_price_quantity?: number | null;
293
+
294
+ /**
295
+ * The property used to group this price on an invoice
296
+ */
297
+ invoice_grouping_key?: string | null;
298
+
299
+ /**
300
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
301
+ * If unspecified, a single invoice is produced per billing cycle.
302
+ */
303
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
304
+
305
+ /**
306
+ * User-specified key/value pairs for the resource. Individual keys can be removed
307
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
308
+ * by setting `metadata` to `null`.
309
+ */
310
+ metadata?: { [key: string]: string | null } | null;
311
+
312
+ /**
313
+ * A transient ID that can be used to reference this price when adding adjustments
314
+ * in the same API call.
315
+ */
316
+ reference_id?: string | null;
317
+ }
318
+
319
+ export namespace NewPlanBulkWithFiltersPrice {
320
+ /**
321
+ * Configuration for bulk_with_filters pricing
322
+ */
323
+ export interface BulkWithFiltersConfig {
324
+ /**
325
+ * Property filters to apply (all must match)
326
+ */
327
+ filters: Array<BulkWithFiltersConfig.Filter>;
328
+
329
+ /**
330
+ * Bulk tiers for rating based on total usage volume
331
+ */
332
+ tiers: Array<BulkWithFiltersConfig.Tier>;
333
+ }
334
+
335
+ export namespace BulkWithFiltersConfig {
336
+ /**
337
+ * Configuration for a single property filter
338
+ */
339
+ export interface Filter {
340
+ /**
341
+ * Event property key to filter on
342
+ */
343
+ property_key: string;
344
+
345
+ /**
346
+ * Event property value to match
347
+ */
348
+ property_value: string;
349
+ }
350
+
351
+ /**
352
+ * Configuration for a single bulk pricing tier
353
+ */
354
+ export interface Tier {
355
+ /**
356
+ * Amount per unit
357
+ */
358
+ unit_amount: string;
359
+
360
+ /**
361
+ * The lower bound for this tier
362
+ */
363
+ tier_lower_bound?: string | null;
364
+ }
365
+ }
366
+ }
367
+
217
368
  export interface NewPlanTieredWithProrationPrice {
218
369
  /**
219
370
  * The cadence to bill for this price on.
@@ -775,6 +926,7 @@ export namespace BetaCreatePlanVersionParams {
775
926
  | Shared.NewPlanUnitPrice
776
927
  | Shared.NewPlanTieredPrice
777
928
  | Shared.NewPlanBulkPrice
929
+ | ReplacePrice.NewPlanBulkWithFiltersPrice
778
930
  | Shared.NewPlanPackagePrice
779
931
  | Shared.NewPlanMatrixPrice
780
932
  | Shared.NewPlanThresholdTotalAmountPrice
@@ -805,6 +957,156 @@ export namespace BetaCreatePlanVersionParams {
805
957
  }
806
958
 
807
959
  export namespace ReplacePrice {
960
+ export interface NewPlanBulkWithFiltersPrice {
961
+ /**
962
+ * Configuration for bulk_with_filters pricing
963
+ */
964
+ bulk_with_filters_config: NewPlanBulkWithFiltersPrice.BulkWithFiltersConfig;
965
+
966
+ /**
967
+ * The cadence to bill for this price on.
968
+ */
969
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
970
+
971
+ /**
972
+ * The id of the item the price will be associated with.
973
+ */
974
+ item_id: string;
975
+
976
+ /**
977
+ * The pricing model type
978
+ */
979
+ model_type: 'bulk_with_filters';
980
+
981
+ /**
982
+ * The name of the price.
983
+ */
984
+ name: string;
985
+
986
+ /**
987
+ * The id of the billable metric for the price. Only needed if the price is
988
+ * usage-based.
989
+ */
990
+ billable_metric_id?: string | null;
991
+
992
+ /**
993
+ * If the Price represents a fixed cost, the price will be billed in-advance if
994
+ * this is true, and in-arrears if this is false.
995
+ */
996
+ billed_in_advance?: boolean | null;
997
+
998
+ /**
999
+ * For custom cadence: specifies the duration of the billing period in days or
1000
+ * months.
1001
+ */
1002
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1003
+
1004
+ /**
1005
+ * The per unit conversion rate of the price currency to the invoicing currency.
1006
+ */
1007
+ conversion_rate?: number | null;
1008
+
1009
+ /**
1010
+ * The configuration for the rate of the price currency to the invoicing currency.
1011
+ */
1012
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
1013
+
1014
+ /**
1015
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
1016
+ * price is billed.
1017
+ */
1018
+ currency?: string | null;
1019
+
1020
+ /**
1021
+ * For dimensional price: specifies a price group and dimension values
1022
+ */
1023
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
1024
+
1025
+ /**
1026
+ * An alias for the price.
1027
+ */
1028
+ external_price_id?: string | null;
1029
+
1030
+ /**
1031
+ * If the Price represents a fixed cost, this represents the quantity of units
1032
+ * applied.
1033
+ */
1034
+ fixed_price_quantity?: number | null;
1035
+
1036
+ /**
1037
+ * The property used to group this price on an invoice
1038
+ */
1039
+ invoice_grouping_key?: string | null;
1040
+
1041
+ /**
1042
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
1043
+ * If unspecified, a single invoice is produced per billing cycle.
1044
+ */
1045
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1046
+
1047
+ /**
1048
+ * User-specified key/value pairs for the resource. Individual keys can be removed
1049
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
1050
+ * by setting `metadata` to `null`.
1051
+ */
1052
+ metadata?: { [key: string]: string | null } | null;
1053
+
1054
+ /**
1055
+ * A transient ID that can be used to reference this price when adding adjustments
1056
+ * in the same API call.
1057
+ */
1058
+ reference_id?: string | null;
1059
+ }
1060
+
1061
+ export namespace NewPlanBulkWithFiltersPrice {
1062
+ /**
1063
+ * Configuration for bulk_with_filters pricing
1064
+ */
1065
+ export interface BulkWithFiltersConfig {
1066
+ /**
1067
+ * Property filters to apply (all must match)
1068
+ */
1069
+ filters: Array<BulkWithFiltersConfig.Filter>;
1070
+
1071
+ /**
1072
+ * Bulk tiers for rating based on total usage volume
1073
+ */
1074
+ tiers: Array<BulkWithFiltersConfig.Tier>;
1075
+ }
1076
+
1077
+ export namespace BulkWithFiltersConfig {
1078
+ /**
1079
+ * Configuration for a single property filter
1080
+ */
1081
+ export interface Filter {
1082
+ /**
1083
+ * Event property key to filter on
1084
+ */
1085
+ property_key: string;
1086
+
1087
+ /**
1088
+ * Event property value to match
1089
+ */
1090
+ property_value: string;
1091
+ }
1092
+
1093
+ /**
1094
+ * Configuration for a single bulk pricing tier
1095
+ */
1096
+ export interface Tier {
1097
+ /**
1098
+ * Amount per unit
1099
+ */
1100
+ unit_amount: string;
1101
+
1102
+ /**
1103
+ * The lower bound for this tier
1104
+ */
1105
+ tier_lower_bound?: string | null;
1106
+ }
1107
+ }
1108
+ }
1109
+
808
1110
  export interface NewPlanTieredWithProrationPrice {
809
1111
  /**
810
1112
  * The cadence to bill for this price on.
@@ -129,6 +129,7 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
129
129
  | Shared.NewPlanUnitPrice
130
130
  | Shared.NewPlanTieredPrice
131
131
  | Shared.NewPlanBulkPrice
132
+ | AddPrice.NewPlanBulkWithFiltersPrice
132
133
  | Shared.NewPlanPackagePrice
133
134
  | Shared.NewPlanMatrixPrice
134
135
  | Shared.NewPlanThresholdTotalAmountPrice
@@ -159,6 +160,156 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
159
160
  }
160
161
 
161
162
  export namespace AddPrice {
163
+ export interface NewPlanBulkWithFiltersPrice {
164
+ /**
165
+ * Configuration for bulk_with_filters pricing
166
+ */
167
+ bulk_with_filters_config: NewPlanBulkWithFiltersPrice.BulkWithFiltersConfig;
168
+
169
+ /**
170
+ * The cadence to bill for this price on.
171
+ */
172
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
173
+
174
+ /**
175
+ * The id of the item the price will be associated with.
176
+ */
177
+ item_id: string;
178
+
179
+ /**
180
+ * The pricing model type
181
+ */
182
+ model_type: 'bulk_with_filters';
183
+
184
+ /**
185
+ * The name of the price.
186
+ */
187
+ name: string;
188
+
189
+ /**
190
+ * The id of the billable metric for the price. Only needed if the price is
191
+ * usage-based.
192
+ */
193
+ billable_metric_id?: string | null;
194
+
195
+ /**
196
+ * If the Price represents a fixed cost, the price will be billed in-advance if
197
+ * this is true, and in-arrears if this is false.
198
+ */
199
+ billed_in_advance?: boolean | null;
200
+
201
+ /**
202
+ * For custom cadence: specifies the duration of the billing period in days or
203
+ * months.
204
+ */
205
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
206
+
207
+ /**
208
+ * The per unit conversion rate of the price currency to the invoicing currency.
209
+ */
210
+ conversion_rate?: number | null;
211
+
212
+ /**
213
+ * The configuration for the rate of the price currency to the invoicing currency.
214
+ */
215
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
216
+
217
+ /**
218
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
219
+ * price is billed.
220
+ */
221
+ currency?: string | null;
222
+
223
+ /**
224
+ * For dimensional price: specifies a price group and dimension values
225
+ */
226
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
227
+
228
+ /**
229
+ * An alias for the price.
230
+ */
231
+ external_price_id?: string | null;
232
+
233
+ /**
234
+ * If the Price represents a fixed cost, this represents the quantity of units
235
+ * applied.
236
+ */
237
+ fixed_price_quantity?: number | null;
238
+
239
+ /**
240
+ * The property used to group this price on an invoice
241
+ */
242
+ invoice_grouping_key?: string | null;
243
+
244
+ /**
245
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
246
+ * If unspecified, a single invoice is produced per billing cycle.
247
+ */
248
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
249
+
250
+ /**
251
+ * User-specified key/value pairs for the resource. Individual keys can be removed
252
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
253
+ * by setting `metadata` to `null`.
254
+ */
255
+ metadata?: { [key: string]: string | null } | null;
256
+
257
+ /**
258
+ * A transient ID that can be used to reference this price when adding adjustments
259
+ * in the same API call.
260
+ */
261
+ reference_id?: string | null;
262
+ }
263
+
264
+ export namespace NewPlanBulkWithFiltersPrice {
265
+ /**
266
+ * Configuration for bulk_with_filters pricing
267
+ */
268
+ export interface BulkWithFiltersConfig {
269
+ /**
270
+ * Property filters to apply (all must match)
271
+ */
272
+ filters: Array<BulkWithFiltersConfig.Filter>;
273
+
274
+ /**
275
+ * Bulk tiers for rating based on total usage volume
276
+ */
277
+ tiers: Array<BulkWithFiltersConfig.Tier>;
278
+ }
279
+
280
+ export namespace BulkWithFiltersConfig {
281
+ /**
282
+ * Configuration for a single property filter
283
+ */
284
+ export interface Filter {
285
+ /**
286
+ * Event property key to filter on
287
+ */
288
+ property_key: string;
289
+
290
+ /**
291
+ * Event property value to match
292
+ */
293
+ property_value: string;
294
+ }
295
+
296
+ /**
297
+ * Configuration for a single bulk pricing tier
298
+ */
299
+ export interface Tier {
300
+ /**
301
+ * Amount per unit
302
+ */
303
+ unit_amount: string;
304
+
305
+ /**
306
+ * The lower bound for this tier
307
+ */
308
+ tier_lower_bound?: string | null;
309
+ }
310
+ }
311
+ }
312
+
162
313
  export interface NewPlanTieredWithProrationPrice {
163
314
  /**
164
315
  * The cadence to bill for this price on.
@@ -720,6 +871,7 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
720
871
  | Shared.NewPlanUnitPrice
721
872
  | Shared.NewPlanTieredPrice
722
873
  | Shared.NewPlanBulkPrice
874
+ | ReplacePrice.NewPlanBulkWithFiltersPrice
723
875
  | Shared.NewPlanPackagePrice
724
876
  | Shared.NewPlanMatrixPrice
725
877
  | Shared.NewPlanThresholdTotalAmountPrice
@@ -750,6 +902,156 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
750
902
  }
751
903
 
752
904
  export namespace ReplacePrice {
905
+ export interface NewPlanBulkWithFiltersPrice {
906
+ /**
907
+ * Configuration for bulk_with_filters pricing
908
+ */
909
+ bulk_with_filters_config: NewPlanBulkWithFiltersPrice.BulkWithFiltersConfig;
910
+
911
+ /**
912
+ * The cadence to bill for this price on.
913
+ */
914
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
915
+
916
+ /**
917
+ * The id of the item the price will be associated with.
918
+ */
919
+ item_id: string;
920
+
921
+ /**
922
+ * The pricing model type
923
+ */
924
+ model_type: 'bulk_with_filters';
925
+
926
+ /**
927
+ * The name of the price.
928
+ */
929
+ name: string;
930
+
931
+ /**
932
+ * The id of the billable metric for the price. Only needed if the price is
933
+ * usage-based.
934
+ */
935
+ billable_metric_id?: string | null;
936
+
937
+ /**
938
+ * If the Price represents a fixed cost, the price will be billed in-advance if
939
+ * this is true, and in-arrears if this is false.
940
+ */
941
+ billed_in_advance?: boolean | null;
942
+
943
+ /**
944
+ * For custom cadence: specifies the duration of the billing period in days or
945
+ * months.
946
+ */
947
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
948
+
949
+ /**
950
+ * The per unit conversion rate of the price currency to the invoicing currency.
951
+ */
952
+ conversion_rate?: number | null;
953
+
954
+ /**
955
+ * The configuration for the rate of the price currency to the invoicing currency.
956
+ */
957
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
958
+
959
+ /**
960
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
961
+ * price is billed.
962
+ */
963
+ currency?: string | null;
964
+
965
+ /**
966
+ * For dimensional price: specifies a price group and dimension values
967
+ */
968
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
969
+
970
+ /**
971
+ * An alias for the price.
972
+ */
973
+ external_price_id?: string | null;
974
+
975
+ /**
976
+ * If the Price represents a fixed cost, this represents the quantity of units
977
+ * applied.
978
+ */
979
+ fixed_price_quantity?: number | null;
980
+
981
+ /**
982
+ * The property used to group this price on an invoice
983
+ */
984
+ invoice_grouping_key?: string | null;
985
+
986
+ /**
987
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
988
+ * If unspecified, a single invoice is produced per billing cycle.
989
+ */
990
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
991
+
992
+ /**
993
+ * User-specified key/value pairs for the resource. Individual keys can be removed
994
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
995
+ * by setting `metadata` to `null`.
996
+ */
997
+ metadata?: { [key: string]: string | null } | null;
998
+
999
+ /**
1000
+ * A transient ID that can be used to reference this price when adding adjustments
1001
+ * in the same API call.
1002
+ */
1003
+ reference_id?: string | null;
1004
+ }
1005
+
1006
+ export namespace NewPlanBulkWithFiltersPrice {
1007
+ /**
1008
+ * Configuration for bulk_with_filters pricing
1009
+ */
1010
+ export interface BulkWithFiltersConfig {
1011
+ /**
1012
+ * Property filters to apply (all must match)
1013
+ */
1014
+ filters: Array<BulkWithFiltersConfig.Filter>;
1015
+
1016
+ /**
1017
+ * Bulk tiers for rating based on total usage volume
1018
+ */
1019
+ tiers: Array<BulkWithFiltersConfig.Tier>;
1020
+ }
1021
+
1022
+ export namespace BulkWithFiltersConfig {
1023
+ /**
1024
+ * Configuration for a single property filter
1025
+ */
1026
+ export interface Filter {
1027
+ /**
1028
+ * Event property key to filter on
1029
+ */
1030
+ property_key: string;
1031
+
1032
+ /**
1033
+ * Event property value to match
1034
+ */
1035
+ property_value: string;
1036
+ }
1037
+
1038
+ /**
1039
+ * Configuration for a single bulk pricing tier
1040
+ */
1041
+ export interface Tier {
1042
+ /**
1043
+ * Amount per unit
1044
+ */
1045
+ unit_amount: string;
1046
+
1047
+ /**
1048
+ * The lower bound for this tier
1049
+ */
1050
+ tier_lower_bound?: string | null;
1051
+ }
1052
+ }
1053
+ }
1054
+
753
1055
  export interface NewPlanTieredWithProrationPrice {
754
1056
  /**
755
1057
  * The cadence to bill for this price on.