orb-billing 5.6.0 → 5.8.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 (60) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/core.js +3 -3
  3. package/core.js.map +1 -1
  4. package/core.mjs +3 -3
  5. package/core.mjs.map +1 -1
  6. package/index.d.mts +2 -4
  7. package/index.d.ts +2 -4
  8. package/index.d.ts.map +1 -1
  9. package/index.js.map +1 -1
  10. package/index.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/beta/beta.d.ts +288 -10
  13. package/resources/beta/beta.d.ts.map +1 -1
  14. package/resources/beta/beta.js.map +1 -1
  15. package/resources/beta/beta.mjs.map +1 -1
  16. package/resources/beta/external-plan-id.d.ts +288 -10
  17. package/resources/beta/external-plan-id.d.ts.map +1 -1
  18. package/resources/customers/customers.d.ts +27 -6
  19. package/resources/customers/customers.d.ts.map +1 -1
  20. package/resources/customers/customers.js.map +1 -1
  21. package/resources/customers/customers.mjs.map +1 -1
  22. package/resources/index.d.ts +1 -1
  23. package/resources/index.d.ts.map +1 -1
  24. package/resources/index.js.map +1 -1
  25. package/resources/index.mjs.map +1 -1
  26. package/resources/invoices.d.ts +3 -0
  27. package/resources/invoices.d.ts.map +1 -1
  28. package/resources/invoices.js.map +1 -1
  29. package/resources/invoices.mjs.map +1 -1
  30. package/resources/plans/plans.d.ts +144 -5
  31. package/resources/plans/plans.d.ts.map +1 -1
  32. package/resources/plans/plans.js.map +1 -1
  33. package/resources/plans/plans.mjs.map +1 -1
  34. package/resources/prices/prices.d.ts +926 -123
  35. package/resources/prices/prices.d.ts.map +1 -1
  36. package/resources/prices/prices.js.map +1 -1
  37. package/resources/prices/prices.mjs.map +1 -1
  38. package/resources/shared.d.ts +2474 -338
  39. package/resources/shared.d.ts.map +1 -1
  40. package/resources/shared.js.map +1 -1
  41. package/resources/shared.mjs.map +1 -1
  42. package/resources/subscriptions.d.ts +1369 -174
  43. package/resources/subscriptions.d.ts.map +1 -1
  44. package/resources/subscriptions.js.map +1 -1
  45. package/resources/subscriptions.mjs.map +1 -1
  46. package/src/core.ts +3 -3
  47. package/src/index.ts +0 -4
  48. package/src/resources/beta/beta.ts +348 -20
  49. package/src/resources/beta/external-plan-id.ts +348 -20
  50. package/src/resources/customers/customers.ts +48 -6
  51. package/src/resources/index.ts +0 -1
  52. package/src/resources/invoices.ts +3 -0
  53. package/src/resources/plans/plans.ts +174 -10
  54. package/src/resources/prices/prices.ts +1060 -113
  55. package/src/resources/shared.ts +2792 -288
  56. package/src/resources/subscriptions.ts +1609 -202
  57. package/src/version.ts +1 -1
  58. package/version.d.ts +1 -1
  59. package/version.js +1 -1
  60. package/version.mjs +1 -1
@@ -255,31 +255,31 @@ export namespace PriceEvaluatePreviewEventsResponse {
255
255
 
256
256
  export type PriceCreateParams =
257
257
  | PriceCreateParams.NewFloatingUnitPrice
258
- | PriceCreateParams.NewFloatingPackagePrice
259
- | PriceCreateParams.NewFloatingMatrixPrice
260
- | PriceCreateParams.NewFloatingMatrixWithAllocationPrice
261
258
  | PriceCreateParams.NewFloatingTieredPrice
262
259
  | PriceCreateParams.NewFloatingBulkPrice
260
+ | PriceCreateParams.NewFloatingPackagePrice
261
+ | PriceCreateParams.NewFloatingMatrixPrice
263
262
  | PriceCreateParams.NewFloatingThresholdTotalAmountPrice
264
263
  | PriceCreateParams.NewFloatingTieredPackagePrice
265
- | PriceCreateParams.NewFloatingGroupedTieredPrice
266
- | PriceCreateParams.NewFloatingMaxGroupTieredPackagePrice
267
264
  | PriceCreateParams.NewFloatingTieredWithMinimumPrice
268
- | PriceCreateParams.NewFloatingPackageWithAllocationPrice
265
+ | PriceCreateParams.NewFloatingGroupedTieredPrice
269
266
  | PriceCreateParams.NewFloatingTieredPackageWithMinimumPrice
267
+ | PriceCreateParams.NewFloatingPackageWithAllocationPrice
270
268
  | PriceCreateParams.NewFloatingUnitWithPercentPrice
269
+ | PriceCreateParams.NewFloatingMatrixWithAllocationPrice
271
270
  | PriceCreateParams.NewFloatingTieredWithProrationPrice
272
271
  | PriceCreateParams.NewFloatingUnitWithProrationPrice
273
272
  | PriceCreateParams.NewFloatingGroupedAllocationPrice
273
+ | PriceCreateParams.NewFloatingBulkWithProrationPrice
274
274
  | PriceCreateParams.NewFloatingGroupedWithProratedMinimumPrice
275
275
  | PriceCreateParams.NewFloatingGroupedWithMeteredMinimumPrice
276
+ | PriceCreateParams.NewFloatingGroupedWithMinMaxThresholdsPrice
276
277
  | PriceCreateParams.NewFloatingMatrixWithDisplayNamePrice
277
- | PriceCreateParams.NewFloatingBulkWithProrationPrice
278
278
  | PriceCreateParams.NewFloatingGroupedTieredPackagePrice
279
+ | PriceCreateParams.NewFloatingMaxGroupTieredPackagePrice
279
280
  | PriceCreateParams.NewFloatingScalableMatrixWithUnitPricingPrice
280
281
  | PriceCreateParams.NewFloatingScalableMatrixWithTieredPricingPrice
281
282
  | PriceCreateParams.NewFloatingCumulativeGroupedBulkPrice
282
- | PriceCreateParams.NewFloatingGroupedWithMinMaxThresholdsPrice
283
283
  | PriceCreateParams.NewFloatingMinimumCompositePrice;
284
284
 
285
285
  export declare namespace PriceCreateParams {
@@ -299,6 +299,9 @@ export declare namespace PriceCreateParams {
299
299
  */
300
300
  item_id: string;
301
301
 
302
+ /**
303
+ * The pricing model type
304
+ */
302
305
  model_type: 'unit';
303
306
 
304
307
  /**
@@ -306,6 +309,9 @@ export declare namespace PriceCreateParams {
306
309
  */
307
310
  name: string;
308
311
 
312
+ /**
313
+ * Configuration for unit pricing
314
+ */
309
315
  unit_config: Shared.UnitConfig;
310
316
 
311
317
  /**
@@ -371,7 +377,7 @@ export declare namespace PriceCreateParams {
371
377
  metadata?: { [key: string]: string | null } | null;
372
378
  }
373
379
 
374
- export interface NewFloatingPackagePrice {
380
+ export interface NewFloatingTieredPrice {
375
381
  /**
376
382
  * The cadence to bill for this price on.
377
383
  */
@@ -387,14 +393,20 @@ export declare namespace PriceCreateParams {
387
393
  */
388
394
  item_id: string;
389
395
 
390
- model_type: 'package';
396
+ /**
397
+ * The pricing model type
398
+ */
399
+ model_type: 'tiered';
391
400
 
392
401
  /**
393
402
  * The name of the price.
394
403
  */
395
404
  name: string;
396
405
 
397
- package_config: Shared.PackageConfig;
406
+ /**
407
+ * Configuration for tiered pricing
408
+ */
409
+ tiered_config: Shared.TieredConfig;
398
410
 
399
411
  /**
400
412
  * The id of the billable metric for the price. Only needed if the price is
@@ -459,7 +471,12 @@ export declare namespace PriceCreateParams {
459
471
  metadata?: { [key: string]: string | null } | null;
460
472
  }
461
473
 
462
- export interface NewFloatingMatrixPrice {
474
+ export interface NewFloatingBulkPrice {
475
+ /**
476
+ * Configuration for bulk pricing
477
+ */
478
+ bulk_config: Shared.BulkConfig;
479
+
463
480
  /**
464
481
  * The cadence to bill for this price on.
465
482
  */
@@ -475,9 +492,10 @@ export declare namespace PriceCreateParams {
475
492
  */
476
493
  item_id: string;
477
494
 
478
- matrix_config: Shared.MatrixConfig;
479
-
480
- model_type: 'matrix';
495
+ /**
496
+ * The pricing model type
497
+ */
498
+ model_type: 'bulk';
481
499
 
482
500
  /**
483
501
  * The name of the price.
@@ -547,7 +565,7 @@ export declare namespace PriceCreateParams {
547
565
  metadata?: { [key: string]: string | null } | null;
548
566
  }
549
567
 
550
- export interface NewFloatingMatrixWithAllocationPrice {
568
+ export interface NewFloatingPackagePrice {
551
569
  /**
552
570
  * The cadence to bill for this price on.
553
571
  */
@@ -563,15 +581,21 @@ export declare namespace PriceCreateParams {
563
581
  */
564
582
  item_id: string;
565
583
 
566
- matrix_with_allocation_config: Shared.MatrixWithAllocationConfig;
567
-
568
- model_type: 'matrix_with_allocation';
584
+ /**
585
+ * The pricing model type
586
+ */
587
+ model_type: 'package';
569
588
 
570
589
  /**
571
590
  * The name of the price.
572
591
  */
573
592
  name: string;
574
593
 
594
+ /**
595
+ * Configuration for package pricing
596
+ */
597
+ package_config: Shared.PackageConfig;
598
+
575
599
  /**
576
600
  * The id of the billable metric for the price. Only needed if the price is
577
601
  * usage-based.
@@ -635,7 +659,7 @@ export declare namespace PriceCreateParams {
635
659
  metadata?: { [key: string]: string | null } | null;
636
660
  }
637
661
 
638
- export interface NewFloatingTieredPrice {
662
+ export interface NewFloatingMatrixPrice {
639
663
  /**
640
664
  * The cadence to bill for this price on.
641
665
  */
@@ -651,15 +675,21 @@ export declare namespace PriceCreateParams {
651
675
  */
652
676
  item_id: string;
653
677
 
654
- model_type: 'tiered';
678
+ /**
679
+ * Configuration for matrix pricing
680
+ */
681
+ matrix_config: Shared.MatrixConfig;
682
+
683
+ /**
684
+ * The pricing model type
685
+ */
686
+ model_type: 'matrix';
655
687
 
656
688
  /**
657
689
  * The name of the price.
658
690
  */
659
691
  name: string;
660
692
 
661
- tiered_config: Shared.TieredConfig;
662
-
663
693
  /**
664
694
  * The id of the billable metric for the price. Only needed if the price is
665
695
  * usage-based.
@@ -723,9 +753,7 @@ export declare namespace PriceCreateParams {
723
753
  metadata?: { [key: string]: string | null } | null;
724
754
  }
725
755
 
726
- export interface NewFloatingBulkPrice {
727
- bulk_config: Shared.BulkConfig;
728
-
756
+ export interface NewFloatingThresholdTotalAmountPrice {
729
757
  /**
730
758
  * The cadence to bill for this price on.
731
759
  */
@@ -741,13 +769,21 @@ export declare namespace PriceCreateParams {
741
769
  */
742
770
  item_id: string;
743
771
 
744
- model_type: 'bulk';
772
+ /**
773
+ * The pricing model type
774
+ */
775
+ model_type: 'threshold_total_amount';
745
776
 
746
777
  /**
747
778
  * The name of the price.
748
779
  */
749
780
  name: string;
750
781
 
782
+ /**
783
+ * Configuration for threshold_total_amount pricing
784
+ */
785
+ threshold_total_amount_config: NewFloatingThresholdTotalAmountPrice.ThresholdTotalAmountConfig;
786
+
751
787
  /**
752
788
  * The id of the billable metric for the price. Only needed if the price is
753
789
  * usage-based.
@@ -811,7 +847,42 @@ export declare namespace PriceCreateParams {
811
847
  metadata?: { [key: string]: string | null } | null;
812
848
  }
813
849
 
814
- export interface NewFloatingThresholdTotalAmountPrice {
850
+ export namespace NewFloatingThresholdTotalAmountPrice {
851
+ /**
852
+ * Configuration for threshold_total_amount pricing
853
+ */
854
+ export interface ThresholdTotalAmountConfig {
855
+ /**
856
+ * When the quantity consumed passes a provided threshold, the configured total
857
+ * will be charged
858
+ */
859
+ consumption_table: Array<ThresholdTotalAmountConfig.ConsumptionTable>;
860
+
861
+ /**
862
+ * If true, the unit price will be prorated to the billing period
863
+ */
864
+ prorate?: boolean | null;
865
+ }
866
+
867
+ export namespace ThresholdTotalAmountConfig {
868
+ /**
869
+ * Configuration for a single threshold
870
+ */
871
+ export interface ConsumptionTable {
872
+ /**
873
+ * Quantity threshold
874
+ */
875
+ threshold: string;
876
+
877
+ /**
878
+ * Total amount for this threshold
879
+ */
880
+ total_amount: string;
881
+ }
882
+ }
883
+ }
884
+
885
+ export interface NewFloatingTieredPackagePrice {
815
886
  /**
816
887
  * The cadence to bill for this price on.
817
888
  */
@@ -827,14 +898,20 @@ export declare namespace PriceCreateParams {
827
898
  */
828
899
  item_id: string;
829
900
 
830
- model_type: 'threshold_total_amount';
901
+ /**
902
+ * The pricing model type
903
+ */
904
+ model_type: 'tiered_package';
831
905
 
832
906
  /**
833
907
  * The name of the price.
834
908
  */
835
909
  name: string;
836
910
 
837
- threshold_total_amount_config: { [key: string]: unknown };
911
+ /**
912
+ * Configuration for tiered_package pricing
913
+ */
914
+ tiered_package_config: NewFloatingTieredPackagePrice.TieredPackageConfig;
838
915
 
839
916
  /**
840
917
  * The id of the billable metric for the price. Only needed if the price is
@@ -899,7 +976,44 @@ export declare namespace PriceCreateParams {
899
976
  metadata?: { [key: string]: string | null } | null;
900
977
  }
901
978
 
902
- export interface NewFloatingTieredPackagePrice {
979
+ export namespace NewFloatingTieredPackagePrice {
980
+ /**
981
+ * Configuration for tiered_package pricing
982
+ */
983
+ export interface TieredPackageConfig {
984
+ /**
985
+ * Package size
986
+ */
987
+ package_size: string;
988
+
989
+ /**
990
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
991
+ * are defined using exclusive lower bounds. The tier bounds are defined based on
992
+ * the total quantity rather than the number of packages, so they must be multiples
993
+ * of the package size.
994
+ */
995
+ tiers: Array<TieredPackageConfig.Tier>;
996
+ }
997
+
998
+ export namespace TieredPackageConfig {
999
+ /**
1000
+ * Configuration for a single tier with business logic
1001
+ */
1002
+ export interface Tier {
1003
+ /**
1004
+ * Price per package
1005
+ */
1006
+ per_unit: string;
1007
+
1008
+ /**
1009
+ * Tier lower bound
1010
+ */
1011
+ tier_lower_bound: string;
1012
+ }
1013
+ }
1014
+ }
1015
+
1016
+ export interface NewFloatingTieredWithMinimumPrice {
903
1017
  /**
904
1018
  * The cadence to bill for this price on.
905
1019
  */
@@ -915,14 +1029,20 @@ export declare namespace PriceCreateParams {
915
1029
  */
916
1030
  item_id: string;
917
1031
 
918
- model_type: 'tiered_package';
1032
+ /**
1033
+ * The pricing model type
1034
+ */
1035
+ model_type: 'tiered_with_minimum';
919
1036
 
920
1037
  /**
921
1038
  * The name of the price.
922
1039
  */
923
1040
  name: string;
924
1041
 
925
- tiered_package_config: { [key: string]: unknown };
1042
+ /**
1043
+ * Configuration for tiered_with_minimum pricing
1044
+ */
1045
+ tiered_with_minimum_config: NewFloatingTieredWithMinimumPrice.TieredWithMinimumConfig;
926
1046
 
927
1047
  /**
928
1048
  * The id of the billable metric for the price. Only needed if the price is
@@ -987,6 +1107,51 @@ export declare namespace PriceCreateParams {
987
1107
  metadata?: { [key: string]: string | null } | null;
988
1108
  }
989
1109
 
1110
+ export namespace NewFloatingTieredWithMinimumPrice {
1111
+ /**
1112
+ * Configuration for tiered_with_minimum pricing
1113
+ */
1114
+ export interface TieredWithMinimumConfig {
1115
+ /**
1116
+ * Tiered pricing with a minimum amount dependent on the volume tier. Tiers are
1117
+ * defined using exclusive lower bounds.
1118
+ */
1119
+ tiers: Array<TieredWithMinimumConfig.Tier>;
1120
+
1121
+ /**
1122
+ * If true, tiers with an accrued amount of 0 will not be included in the rating.
1123
+ */
1124
+ hide_zero_amount_tiers?: boolean;
1125
+
1126
+ /**
1127
+ * If true, the unit price will be prorated to the billing period
1128
+ */
1129
+ prorate?: boolean;
1130
+ }
1131
+
1132
+ export namespace TieredWithMinimumConfig {
1133
+ /**
1134
+ * Configuration for a single tier
1135
+ */
1136
+ export interface Tier {
1137
+ /**
1138
+ * Minimum amount
1139
+ */
1140
+ minimum_amount: string;
1141
+
1142
+ /**
1143
+ * Tier lower bound
1144
+ */
1145
+ tier_lower_bound: string;
1146
+
1147
+ /**
1148
+ * Per unit amount
1149
+ */
1150
+ unit_amount: string;
1151
+ }
1152
+ }
1153
+ }
1154
+
990
1155
  export interface NewFloatingGroupedTieredPrice {
991
1156
  /**
992
1157
  * The cadence to bill for this price on.
@@ -998,13 +1163,19 @@ export declare namespace PriceCreateParams {
998
1163
  */
999
1164
  currency: string;
1000
1165
 
1001
- grouped_tiered_config: { [key: string]: unknown };
1166
+ /**
1167
+ * Configuration for grouped_tiered pricing
1168
+ */
1169
+ grouped_tiered_config: NewFloatingGroupedTieredPrice.GroupedTieredConfig;
1002
1170
 
1003
1171
  /**
1004
1172
  * The id of the item the price will be associated with.
1005
1173
  */
1006
1174
  item_id: string;
1007
1175
 
1176
+ /**
1177
+ * The pricing model type
1178
+ */
1008
1179
  model_type: 'grouped_tiered';
1009
1180
 
1010
1181
  /**
@@ -1075,7 +1246,42 @@ export declare namespace PriceCreateParams {
1075
1246
  metadata?: { [key: string]: string | null } | null;
1076
1247
  }
1077
1248
 
1078
- export interface NewFloatingMaxGroupTieredPackagePrice {
1249
+ export namespace NewFloatingGroupedTieredPrice {
1250
+ /**
1251
+ * Configuration for grouped_tiered pricing
1252
+ */
1253
+ export interface GroupedTieredConfig {
1254
+ /**
1255
+ * The billable metric property used to group before tiering
1256
+ */
1257
+ grouping_key: string;
1258
+
1259
+ /**
1260
+ * Apply tiered pricing to each segment generated after grouping with the provided
1261
+ * key
1262
+ */
1263
+ tiers: Array<GroupedTieredConfig.Tier>;
1264
+ }
1265
+
1266
+ export namespace GroupedTieredConfig {
1267
+ /**
1268
+ * Configuration for a single tier
1269
+ */
1270
+ export interface Tier {
1271
+ /**
1272
+ * Tier lower bound
1273
+ */
1274
+ tier_lower_bound: string;
1275
+
1276
+ /**
1277
+ * Per unit amount
1278
+ */
1279
+ unit_amount: string;
1280
+ }
1281
+ }
1282
+ }
1283
+
1284
+ export interface NewFloatingTieredPackageWithMinimumPrice {
1079
1285
  /**
1080
1286
  * The cadence to bill for this price on.
1081
1287
  */
@@ -1091,15 +1297,21 @@ export declare namespace PriceCreateParams {
1091
1297
  */
1092
1298
  item_id: string;
1093
1299
 
1094
- max_group_tiered_package_config: { [key: string]: unknown };
1095
-
1096
- model_type: 'max_group_tiered_package';
1300
+ /**
1301
+ * The pricing model type
1302
+ */
1303
+ model_type: 'tiered_package_with_minimum';
1097
1304
 
1098
1305
  /**
1099
1306
  * The name of the price.
1100
1307
  */
1101
1308
  name: string;
1102
1309
 
1310
+ /**
1311
+ * Configuration for tiered_package_with_minimum pricing
1312
+ */
1313
+ tiered_package_with_minimum_config: NewFloatingTieredPackageWithMinimumPrice.TieredPackageWithMinimumConfig;
1314
+
1103
1315
  /**
1104
1316
  * The id of the billable metric for the price. Only needed if the price is
1105
1317
  * usage-based.
@@ -1163,7 +1375,47 @@ export declare namespace PriceCreateParams {
1163
1375
  metadata?: { [key: string]: string | null } | null;
1164
1376
  }
1165
1377
 
1166
- export interface NewFloatingTieredWithMinimumPrice {
1378
+ export namespace NewFloatingTieredPackageWithMinimumPrice {
1379
+ /**
1380
+ * Configuration for tiered_package_with_minimum pricing
1381
+ */
1382
+ export interface TieredPackageWithMinimumConfig {
1383
+ /**
1384
+ * Package size
1385
+ */
1386
+ package_size: number;
1387
+
1388
+ /**
1389
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
1390
+ * are defined using exclusive lower bounds.
1391
+ */
1392
+ tiers: Array<TieredPackageWithMinimumConfig.Tier>;
1393
+ }
1394
+
1395
+ export namespace TieredPackageWithMinimumConfig {
1396
+ /**
1397
+ * Configuration for a single tier
1398
+ */
1399
+ export interface Tier {
1400
+ /**
1401
+ * Minimum amount
1402
+ */
1403
+ minimum_amount: string;
1404
+
1405
+ /**
1406
+ * Price per package
1407
+ */
1408
+ per_unit: string;
1409
+
1410
+ /**
1411
+ * Tier lower bound
1412
+ */
1413
+ tier_lower_bound: string;
1414
+ }
1415
+ }
1416
+ }
1417
+
1418
+ export interface NewFloatingPackageWithAllocationPrice {
1167
1419
  /**
1168
1420
  * The cadence to bill for this price on.
1169
1421
  */
@@ -1179,14 +1431,20 @@ export declare namespace PriceCreateParams {
1179
1431
  */
1180
1432
  item_id: string;
1181
1433
 
1182
- model_type: 'tiered_with_minimum';
1434
+ /**
1435
+ * The pricing model type
1436
+ */
1437
+ model_type: 'package_with_allocation';
1183
1438
 
1184
1439
  /**
1185
1440
  * The name of the price.
1186
1441
  */
1187
1442
  name: string;
1188
1443
 
1189
- tiered_with_minimum_config: { [key: string]: unknown };
1444
+ /**
1445
+ * Configuration for package_with_allocation pricing
1446
+ */
1447
+ package_with_allocation_config: NewFloatingPackageWithAllocationPrice.PackageWithAllocationConfig;
1190
1448
 
1191
1449
  /**
1192
1450
  * The id of the billable metric for the price. Only needed if the price is
@@ -1251,7 +1509,29 @@ export declare namespace PriceCreateParams {
1251
1509
  metadata?: { [key: string]: string | null } | null;
1252
1510
  }
1253
1511
 
1254
- export interface NewFloatingPackageWithAllocationPrice {
1512
+ export namespace NewFloatingPackageWithAllocationPrice {
1513
+ /**
1514
+ * Configuration for package_with_allocation pricing
1515
+ */
1516
+ export interface PackageWithAllocationConfig {
1517
+ /**
1518
+ * Usage allocation
1519
+ */
1520
+ allocation: string;
1521
+
1522
+ /**
1523
+ * Price per package
1524
+ */
1525
+ package_amount: string;
1526
+
1527
+ /**
1528
+ * Package size
1529
+ */
1530
+ package_size: string;
1531
+ }
1532
+ }
1533
+
1534
+ export interface NewFloatingUnitWithPercentPrice {
1255
1535
  /**
1256
1536
  * The cadence to bill for this price on.
1257
1537
  */
@@ -1267,14 +1547,20 @@ export declare namespace PriceCreateParams {
1267
1547
  */
1268
1548
  item_id: string;
1269
1549
 
1270
- model_type: 'package_with_allocation';
1550
+ /**
1551
+ * The pricing model type
1552
+ */
1553
+ model_type: 'unit_with_percent';
1271
1554
 
1272
1555
  /**
1273
1556
  * The name of the price.
1274
1557
  */
1275
1558
  name: string;
1276
1559
 
1277
- package_with_allocation_config: { [key: string]: unknown };
1560
+ /**
1561
+ * Configuration for unit_with_percent pricing
1562
+ */
1563
+ unit_with_percent_config: NewFloatingUnitWithPercentPrice.UnitWithPercentConfig;
1278
1564
 
1279
1565
  /**
1280
1566
  * The id of the billable metric for the price. Only needed if the price is
@@ -1339,7 +1625,24 @@ export declare namespace PriceCreateParams {
1339
1625
  metadata?: { [key: string]: string | null } | null;
1340
1626
  }
1341
1627
 
1342
- export interface NewFloatingTieredPackageWithMinimumPrice {
1628
+ export namespace NewFloatingUnitWithPercentPrice {
1629
+ /**
1630
+ * Configuration for unit_with_percent pricing
1631
+ */
1632
+ export interface UnitWithPercentConfig {
1633
+ /**
1634
+ * What percent, out of 100, of the calculated total to charge
1635
+ */
1636
+ percent: string;
1637
+
1638
+ /**
1639
+ * Rate per unit of usage
1640
+ */
1641
+ unit_amount: string;
1642
+ }
1643
+ }
1644
+
1645
+ export interface NewFloatingMatrixWithAllocationPrice {
1343
1646
  /**
1344
1647
  * The cadence to bill for this price on.
1345
1648
  */
@@ -1355,15 +1658,21 @@ export declare namespace PriceCreateParams {
1355
1658
  */
1356
1659
  item_id: string;
1357
1660
 
1358
- model_type: 'tiered_package_with_minimum';
1661
+ /**
1662
+ * Configuration for matrix_with_allocation pricing
1663
+ */
1664
+ matrix_with_allocation_config: Shared.MatrixWithAllocationConfig;
1665
+
1666
+ /**
1667
+ * The pricing model type
1668
+ */
1669
+ model_type: 'matrix_with_allocation';
1359
1670
 
1360
1671
  /**
1361
1672
  * The name of the price.
1362
1673
  */
1363
1674
  name: string;
1364
1675
 
1365
- tiered_package_with_minimum_config: { [key: string]: unknown };
1366
-
1367
1676
  /**
1368
1677
  * The id of the billable metric for the price. Only needed if the price is
1369
1678
  * usage-based.
@@ -1427,7 +1736,7 @@ export declare namespace PriceCreateParams {
1427
1736
  metadata?: { [key: string]: string | null } | null;
1428
1737
  }
1429
1738
 
1430
- export interface NewFloatingUnitWithPercentPrice {
1739
+ export interface NewFloatingTieredWithProrationPrice {
1431
1740
  /**
1432
1741
  * The cadence to bill for this price on.
1433
1742
  */
@@ -1443,14 +1752,20 @@ export declare namespace PriceCreateParams {
1443
1752
  */
1444
1753
  item_id: string;
1445
1754
 
1446
- model_type: 'unit_with_percent';
1755
+ /**
1756
+ * The pricing model type
1757
+ */
1758
+ model_type: 'tiered_with_proration';
1447
1759
 
1448
1760
  /**
1449
1761
  * The name of the price.
1450
1762
  */
1451
1763
  name: string;
1452
1764
 
1453
- unit_with_percent_config: { [key: string]: unknown };
1765
+ /**
1766
+ * Configuration for tiered_with_proration pricing
1767
+ */
1768
+ tiered_with_proration_config: NewFloatingTieredWithProrationPrice.TieredWithProrationConfig;
1454
1769
 
1455
1770
  /**
1456
1771
  * The id of the billable metric for the price. Only needed if the price is
@@ -1515,7 +1830,37 @@ export declare namespace PriceCreateParams {
1515
1830
  metadata?: { [key: string]: string | null } | null;
1516
1831
  }
1517
1832
 
1518
- export interface NewFloatingTieredWithProrationPrice {
1833
+ export namespace NewFloatingTieredWithProrationPrice {
1834
+ /**
1835
+ * Configuration for tiered_with_proration pricing
1836
+ */
1837
+ export interface TieredWithProrationConfig {
1838
+ /**
1839
+ * Tiers for rating based on total usage quantities into the specified tier with
1840
+ * proration
1841
+ */
1842
+ tiers: Array<TieredWithProrationConfig.Tier>;
1843
+ }
1844
+
1845
+ export namespace TieredWithProrationConfig {
1846
+ /**
1847
+ * Configuration for a single tiered with proration tier
1848
+ */
1849
+ export interface Tier {
1850
+ /**
1851
+ * Inclusive tier starting value
1852
+ */
1853
+ tier_lower_bound: string;
1854
+
1855
+ /**
1856
+ * Amount per unit
1857
+ */
1858
+ unit_amount: string;
1859
+ }
1860
+ }
1861
+ }
1862
+
1863
+ export interface NewFloatingUnitWithProrationPrice {
1519
1864
  /**
1520
1865
  * The cadence to bill for this price on.
1521
1866
  */
@@ -1531,15 +1876,21 @@ export declare namespace PriceCreateParams {
1531
1876
  */
1532
1877
  item_id: string;
1533
1878
 
1534
- model_type: 'tiered_with_proration';
1879
+ /**
1880
+ * The pricing model type
1881
+ */
1882
+ model_type: 'unit_with_proration';
1535
1883
 
1536
1884
  /**
1537
1885
  * The name of the price.
1538
1886
  */
1539
1887
  name: string;
1540
1888
 
1541
- tiered_with_proration_config: { [key: string]: unknown };
1542
-
1889
+ /**
1890
+ * Configuration for unit_with_proration pricing
1891
+ */
1892
+ unit_with_proration_config: NewFloatingUnitWithProrationPrice.UnitWithProrationConfig;
1893
+
1543
1894
  /**
1544
1895
  * The id of the billable metric for the price. Only needed if the price is
1545
1896
  * usage-based.
@@ -1603,7 +1954,19 @@ export declare namespace PriceCreateParams {
1603
1954
  metadata?: { [key: string]: string | null } | null;
1604
1955
  }
1605
1956
 
1606
- export interface NewFloatingUnitWithProrationPrice {
1957
+ export namespace NewFloatingUnitWithProrationPrice {
1958
+ /**
1959
+ * Configuration for unit_with_proration pricing
1960
+ */
1961
+ export interface UnitWithProrationConfig {
1962
+ /**
1963
+ * Rate per unit of usage
1964
+ */
1965
+ unit_amount: string;
1966
+ }
1967
+ }
1968
+
1969
+ export interface NewFloatingGroupedAllocationPrice {
1607
1970
  /**
1608
1971
  * The cadence to bill for this price on.
1609
1972
  */
@@ -1614,20 +1977,26 @@ export declare namespace PriceCreateParams {
1614
1977
  */
1615
1978
  currency: string;
1616
1979
 
1980
+ /**
1981
+ * Configuration for grouped_allocation pricing
1982
+ */
1983
+ grouped_allocation_config: NewFloatingGroupedAllocationPrice.GroupedAllocationConfig;
1984
+
1617
1985
  /**
1618
1986
  * The id of the item the price will be associated with.
1619
1987
  */
1620
1988
  item_id: string;
1621
1989
 
1622
- model_type: 'unit_with_proration';
1990
+ /**
1991
+ * The pricing model type
1992
+ */
1993
+ model_type: 'grouped_allocation';
1623
1994
 
1624
1995
  /**
1625
1996
  * The name of the price.
1626
1997
  */
1627
1998
  name: string;
1628
1999
 
1629
- unit_with_proration_config: { [key: string]: unknown };
1630
-
1631
2000
  /**
1632
2001
  * The id of the billable metric for the price. Only needed if the price is
1633
2002
  * usage-based.
@@ -1691,7 +2060,34 @@ export declare namespace PriceCreateParams {
1691
2060
  metadata?: { [key: string]: string | null } | null;
1692
2061
  }
1693
2062
 
1694
- export interface NewFloatingGroupedAllocationPrice {
2063
+ export namespace NewFloatingGroupedAllocationPrice {
2064
+ /**
2065
+ * Configuration for grouped_allocation pricing
2066
+ */
2067
+ export interface GroupedAllocationConfig {
2068
+ /**
2069
+ * Usage allocation per group
2070
+ */
2071
+ allocation: string;
2072
+
2073
+ /**
2074
+ * How to determine the groups that should each be allocated some quantity
2075
+ */
2076
+ grouping_key: string;
2077
+
2078
+ /**
2079
+ * Unit rate for post-allocation
2080
+ */
2081
+ overage_unit_rate: string;
2082
+ }
2083
+ }
2084
+
2085
+ export interface NewFloatingBulkWithProrationPrice {
2086
+ /**
2087
+ * Configuration for bulk_with_proration pricing
2088
+ */
2089
+ bulk_with_proration_config: NewFloatingBulkWithProrationPrice.BulkWithProrationConfig;
2090
+
1695
2091
  /**
1696
2092
  * The cadence to bill for this price on.
1697
2093
  */
@@ -1702,14 +2098,15 @@ export declare namespace PriceCreateParams {
1702
2098
  */
1703
2099
  currency: string;
1704
2100
 
1705
- grouped_allocation_config: { [key: string]: unknown };
1706
-
1707
2101
  /**
1708
2102
  * The id of the item the price will be associated with.
1709
2103
  */
1710
2104
  item_id: string;
1711
2105
 
1712
- model_type: 'grouped_allocation';
2106
+ /**
2107
+ * The pricing model type
2108
+ */
2109
+ model_type: 'bulk_with_proration';
1713
2110
 
1714
2111
  /**
1715
2112
  * The name of the price.
@@ -1779,6 +2176,35 @@ export declare namespace PriceCreateParams {
1779
2176
  metadata?: { [key: string]: string | null } | null;
1780
2177
  }
1781
2178
 
2179
+ export namespace NewFloatingBulkWithProrationPrice {
2180
+ /**
2181
+ * Configuration for bulk_with_proration pricing
2182
+ */
2183
+ export interface BulkWithProrationConfig {
2184
+ /**
2185
+ * Bulk tiers for rating based on total usage volume
2186
+ */
2187
+ tiers: Array<BulkWithProrationConfig.Tier>;
2188
+ }
2189
+
2190
+ export namespace BulkWithProrationConfig {
2191
+ /**
2192
+ * Configuration for a single bulk pricing tier with proration
2193
+ */
2194
+ export interface Tier {
2195
+ /**
2196
+ * Cost per unit
2197
+ */
2198
+ unit_amount: string;
2199
+
2200
+ /**
2201
+ * The lower bound for this tier
2202
+ */
2203
+ tier_lower_bound?: string | null;
2204
+ }
2205
+ }
2206
+ }
2207
+
1782
2208
  export interface NewFloatingGroupedWithProratedMinimumPrice {
1783
2209
  /**
1784
2210
  * The cadence to bill for this price on.
@@ -1790,13 +2216,19 @@ export declare namespace PriceCreateParams {
1790
2216
  */
1791
2217
  currency: string;
1792
2218
 
1793
- grouped_with_prorated_minimum_config: { [key: string]: unknown };
2219
+ /**
2220
+ * Configuration for grouped_with_prorated_minimum pricing
2221
+ */
2222
+ grouped_with_prorated_minimum_config: NewFloatingGroupedWithProratedMinimumPrice.GroupedWithProratedMinimumConfig;
1794
2223
 
1795
2224
  /**
1796
2225
  * The id of the item the price will be associated with.
1797
2226
  */
1798
2227
  item_id: string;
1799
2228
 
2229
+ /**
2230
+ * The pricing model type
2231
+ */
1800
2232
  model_type: 'grouped_with_prorated_minimum';
1801
2233
 
1802
2234
  /**
@@ -1867,6 +2299,28 @@ export declare namespace PriceCreateParams {
1867
2299
  metadata?: { [key: string]: string | null } | null;
1868
2300
  }
1869
2301
 
2302
+ export namespace NewFloatingGroupedWithProratedMinimumPrice {
2303
+ /**
2304
+ * Configuration for grouped_with_prorated_minimum pricing
2305
+ */
2306
+ export interface GroupedWithProratedMinimumConfig {
2307
+ /**
2308
+ * How to determine the groups that should each have a minimum
2309
+ */
2310
+ grouping_key: string;
2311
+
2312
+ /**
2313
+ * The minimum amount to charge per group
2314
+ */
2315
+ minimum: string;
2316
+
2317
+ /**
2318
+ * The amount to charge per unit
2319
+ */
2320
+ unit_rate: string;
2321
+ }
2322
+ }
2323
+
1870
2324
  export interface NewFloatingGroupedWithMeteredMinimumPrice {
1871
2325
  /**
1872
2326
  * The cadence to bill for this price on.
@@ -1878,13 +2332,19 @@ export declare namespace PriceCreateParams {
1878
2332
  */
1879
2333
  currency: string;
1880
2334
 
1881
- grouped_with_metered_minimum_config: { [key: string]: unknown };
2335
+ /**
2336
+ * Configuration for grouped_with_metered_minimum pricing
2337
+ */
2338
+ grouped_with_metered_minimum_config: NewFloatingGroupedWithMeteredMinimumPrice.GroupedWithMeteredMinimumConfig;
1882
2339
 
1883
2340
  /**
1884
2341
  * The id of the item the price will be associated with.
1885
2342
  */
1886
2343
  item_id: string;
1887
2344
 
2345
+ /**
2346
+ * The pricing model type
2347
+ */
1888
2348
  model_type: 'grouped_with_metered_minimum';
1889
2349
 
1890
2350
  /**
@@ -1955,7 +2415,78 @@ export declare namespace PriceCreateParams {
1955
2415
  metadata?: { [key: string]: string | null } | null;
1956
2416
  }
1957
2417
 
1958
- export interface NewFloatingMatrixWithDisplayNamePrice {
2418
+ export namespace NewFloatingGroupedWithMeteredMinimumPrice {
2419
+ /**
2420
+ * Configuration for grouped_with_metered_minimum pricing
2421
+ */
2422
+ export interface GroupedWithMeteredMinimumConfig {
2423
+ /**
2424
+ * Used to partition the usage into groups. The minimum amount is applied to each
2425
+ * group.
2426
+ */
2427
+ grouping_key: string;
2428
+
2429
+ /**
2430
+ * The minimum amount to charge per group per unit
2431
+ */
2432
+ minimum_unit_amount: string;
2433
+
2434
+ /**
2435
+ * Used to determine the unit rate
2436
+ */
2437
+ pricing_key: string;
2438
+
2439
+ /**
2440
+ * Scale the unit rates by the scaling factor.
2441
+ */
2442
+ scaling_factors: Array<GroupedWithMeteredMinimumConfig.ScalingFactor>;
2443
+
2444
+ /**
2445
+ * Used to determine the unit rate scaling factor
2446
+ */
2447
+ scaling_key: string;
2448
+
2449
+ /**
2450
+ * Apply per unit pricing to each pricing value. The minimum amount is applied any
2451
+ * unmatched usage.
2452
+ */
2453
+ unit_amounts: Array<GroupedWithMeteredMinimumConfig.UnitAmount>;
2454
+ }
2455
+
2456
+ export namespace GroupedWithMeteredMinimumConfig {
2457
+ /**
2458
+ * Configuration for a scaling factor
2459
+ */
2460
+ export interface ScalingFactor {
2461
+ /**
2462
+ * Scaling factor
2463
+ */
2464
+ scaling_factor: string;
2465
+
2466
+ /**
2467
+ * Scaling value
2468
+ */
2469
+ scaling_value: string;
2470
+ }
2471
+
2472
+ /**
2473
+ * Configuration for a unit amount
2474
+ */
2475
+ export interface UnitAmount {
2476
+ /**
2477
+ * Pricing value
2478
+ */
2479
+ pricing_value: string;
2480
+
2481
+ /**
2482
+ * Per unit amount
2483
+ */
2484
+ unit_amount: string;
2485
+ }
2486
+ }
2487
+ }
2488
+
2489
+ export interface NewFloatingGroupedWithMinMaxThresholdsPrice {
1959
2490
  /**
1960
2491
  * The cadence to bill for this price on.
1961
2492
  */
@@ -1966,14 +2497,20 @@ export declare namespace PriceCreateParams {
1966
2497
  */
1967
2498
  currency: string;
1968
2499
 
2500
+ /**
2501
+ * Configuration for grouped_with_min_max_thresholds pricing
2502
+ */
2503
+ grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
2504
+
1969
2505
  /**
1970
2506
  * The id of the item the price will be associated with.
1971
2507
  */
1972
2508
  item_id: string;
1973
2509
 
1974
- matrix_with_display_name_config: { [key: string]: unknown };
1975
-
1976
- model_type: 'matrix_with_display_name';
2510
+ /**
2511
+ * The pricing model type
2512
+ */
2513
+ model_type: 'grouped_with_min_max_thresholds';
1977
2514
 
1978
2515
  /**
1979
2516
  * The name of the price.
@@ -2043,9 +2580,34 @@ export declare namespace PriceCreateParams {
2043
2580
  metadata?: { [key: string]: string | null } | null;
2044
2581
  }
2045
2582
 
2046
- export interface NewFloatingBulkWithProrationPrice {
2047
- bulk_with_proration_config: { [key: string]: unknown };
2583
+ export namespace NewFloatingGroupedWithMinMaxThresholdsPrice {
2584
+ /**
2585
+ * Configuration for grouped_with_min_max_thresholds pricing
2586
+ */
2587
+ export interface GroupedWithMinMaxThresholdsConfig {
2588
+ /**
2589
+ * The event property used to group before applying thresholds
2590
+ */
2591
+ grouping_key: string;
2048
2592
 
2593
+ /**
2594
+ * The maximum amount to charge each group
2595
+ */
2596
+ maximum_charge: string;
2597
+
2598
+ /**
2599
+ * The minimum amount to charge each group, regardless of usage
2600
+ */
2601
+ minimum_charge: string;
2602
+
2603
+ /**
2604
+ * The base price charged per group
2605
+ */
2606
+ per_unit_rate: string;
2607
+ }
2608
+ }
2609
+
2610
+ export interface NewFloatingMatrixWithDisplayNamePrice {
2049
2611
  /**
2050
2612
  * The cadence to bill for this price on.
2051
2613
  */
@@ -2061,7 +2623,15 @@ export declare namespace PriceCreateParams {
2061
2623
  */
2062
2624
  item_id: string;
2063
2625
 
2064
- model_type: 'bulk_with_proration';
2626
+ /**
2627
+ * Configuration for matrix_with_display_name pricing
2628
+ */
2629
+ matrix_with_display_name_config: NewFloatingMatrixWithDisplayNamePrice.MatrixWithDisplayNameConfig;
2630
+
2631
+ /**
2632
+ * The pricing model type
2633
+ */
2634
+ model_type: 'matrix_with_display_name';
2065
2635
 
2066
2636
  /**
2067
2637
  * The name of the price.
@@ -2131,6 +2701,45 @@ export declare namespace PriceCreateParams {
2131
2701
  metadata?: { [key: string]: string | null } | null;
2132
2702
  }
2133
2703
 
2704
+ export namespace NewFloatingMatrixWithDisplayNamePrice {
2705
+ /**
2706
+ * Configuration for matrix_with_display_name pricing
2707
+ */
2708
+ export interface MatrixWithDisplayNameConfig {
2709
+ /**
2710
+ * Used to determine the unit rate
2711
+ */
2712
+ dimension: string;
2713
+
2714
+ /**
2715
+ * Apply per unit pricing to each dimension value
2716
+ */
2717
+ unit_amounts: Array<MatrixWithDisplayNameConfig.UnitAmount>;
2718
+ }
2719
+
2720
+ export namespace MatrixWithDisplayNameConfig {
2721
+ /**
2722
+ * Configuration for a unit amount item
2723
+ */
2724
+ export interface UnitAmount {
2725
+ /**
2726
+ * The dimension value
2727
+ */
2728
+ dimension_value: string;
2729
+
2730
+ /**
2731
+ * Display name for this dimension value
2732
+ */
2733
+ display_name: string;
2734
+
2735
+ /**
2736
+ * Per unit amount
2737
+ */
2738
+ unit_amount: string;
2739
+ }
2740
+ }
2741
+ }
2742
+
2134
2743
  export interface NewFloatingGroupedTieredPackagePrice {
2135
2744
  /**
2136
2745
  * The cadence to bill for this price on.
@@ -2142,13 +2751,19 @@ export declare namespace PriceCreateParams {
2142
2751
  */
2143
2752
  currency: string;
2144
2753
 
2145
- grouped_tiered_package_config: { [key: string]: unknown };
2754
+ /**
2755
+ * Configuration for grouped_tiered_package pricing
2756
+ */
2757
+ grouped_tiered_package_config: NewFloatingGroupedTieredPackagePrice.GroupedTieredPackageConfig;
2146
2758
 
2147
2759
  /**
2148
2760
  * The id of the item the price will be associated with.
2149
2761
  */
2150
2762
  item_id: string;
2151
2763
 
2764
+ /**
2765
+ * The pricing model type
2766
+ */
2152
2767
  model_type: 'grouped_tiered_package';
2153
2768
 
2154
2769
  /**
@@ -2219,7 +2834,47 @@ export declare namespace PriceCreateParams {
2219
2834
  metadata?: { [key: string]: string | null } | null;
2220
2835
  }
2221
2836
 
2222
- export interface NewFloatingScalableMatrixWithUnitPricingPrice {
2837
+ export namespace NewFloatingGroupedTieredPackagePrice {
2838
+ /**
2839
+ * Configuration for grouped_tiered_package pricing
2840
+ */
2841
+ export interface GroupedTieredPackageConfig {
2842
+ /**
2843
+ * The event property used to group before tiering
2844
+ */
2845
+ grouping_key: string;
2846
+
2847
+ /**
2848
+ * Package size
2849
+ */
2850
+ package_size: string;
2851
+
2852
+ /**
2853
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
2854
+ * are defined using exclusive lower bounds.
2855
+ */
2856
+ tiers: Array<GroupedTieredPackageConfig.Tier>;
2857
+ }
2858
+
2859
+ export namespace GroupedTieredPackageConfig {
2860
+ /**
2861
+ * Configuration for a single tier
2862
+ */
2863
+ export interface Tier {
2864
+ /**
2865
+ * Price per package
2866
+ */
2867
+ per_unit: string;
2868
+
2869
+ /**
2870
+ * Tier lower bound
2871
+ */
2872
+ tier_lower_bound: string;
2873
+ }
2874
+ }
2875
+ }
2876
+
2877
+ export interface NewFloatingMaxGroupTieredPackagePrice {
2223
2878
  /**
2224
2879
  * The cadence to bill for this price on.
2225
2880
  */
@@ -2235,15 +2890,21 @@ export declare namespace PriceCreateParams {
2235
2890
  */
2236
2891
  item_id: string;
2237
2892
 
2238
- model_type: 'scalable_matrix_with_unit_pricing';
2893
+ /**
2894
+ * Configuration for max_group_tiered_package pricing
2895
+ */
2896
+ max_group_tiered_package_config: NewFloatingMaxGroupTieredPackagePrice.MaxGroupTieredPackageConfig;
2897
+
2898
+ /**
2899
+ * The pricing model type
2900
+ */
2901
+ model_type: 'max_group_tiered_package';
2239
2902
 
2240
2903
  /**
2241
2904
  * The name of the price.
2242
2905
  */
2243
2906
  name: string;
2244
2907
 
2245
- scalable_matrix_with_unit_pricing_config: { [key: string]: unknown };
2246
-
2247
2908
  /**
2248
2909
  * The id of the billable metric for the price. Only needed if the price is
2249
2910
  * usage-based.
@@ -2307,7 +2968,46 @@ export declare namespace PriceCreateParams {
2307
2968
  metadata?: { [key: string]: string | null } | null;
2308
2969
  }
2309
2970
 
2310
- export interface NewFloatingScalableMatrixWithTieredPricingPrice {
2971
+ export namespace NewFloatingMaxGroupTieredPackagePrice {
2972
+ /**
2973
+ * Configuration for max_group_tiered_package pricing
2974
+ */
2975
+ export interface MaxGroupTieredPackageConfig {
2976
+ /**
2977
+ * The event property used to group before tiering the group with the highest value
2978
+ */
2979
+ grouping_key: string;
2980
+
2981
+ /**
2982
+ * Package size
2983
+ */
2984
+ package_size: string;
2985
+
2986
+ /**
2987
+ * Apply tiered pricing to the largest group after grouping with the provided key.
2988
+ */
2989
+ tiers: Array<MaxGroupTieredPackageConfig.Tier>;
2990
+ }
2991
+
2992
+ export namespace MaxGroupTieredPackageConfig {
2993
+ /**
2994
+ * Configuration for a single tier
2995
+ */
2996
+ export interface Tier {
2997
+ /**
2998
+ * Tier lower bound
2999
+ */
3000
+ tier_lower_bound: string;
3001
+
3002
+ /**
3003
+ * Per unit amount
3004
+ */
3005
+ unit_amount: string;
3006
+ }
3007
+ }
3008
+ }
3009
+
3010
+ export interface NewFloatingScalableMatrixWithUnitPricingPrice {
2311
3011
  /**
2312
3012
  * The cadence to bill for this price on.
2313
3013
  */
@@ -2323,14 +3023,20 @@ export declare namespace PriceCreateParams {
2323
3023
  */
2324
3024
  item_id: string;
2325
3025
 
2326
- model_type: 'scalable_matrix_with_tiered_pricing';
3026
+ /**
3027
+ * The pricing model type
3028
+ */
3029
+ model_type: 'scalable_matrix_with_unit_pricing';
2327
3030
 
2328
3031
  /**
2329
3032
  * The name of the price.
2330
3033
  */
2331
3034
  name: string;
2332
3035
 
2333
- scalable_matrix_with_tiered_pricing_config: { [key: string]: unknown };
3036
+ /**
3037
+ * Configuration for scalable_matrix_with_unit_pricing pricing
3038
+ */
3039
+ scalable_matrix_with_unit_pricing_config: NewFloatingScalableMatrixWithUnitPricingPrice.ScalableMatrixWithUnitPricingConfig;
2334
3040
 
2335
3041
  /**
2336
3042
  * The id of the billable metric for the price. Only needed if the price is
@@ -2395,14 +3101,66 @@ export declare namespace PriceCreateParams {
2395
3101
  metadata?: { [key: string]: string | null } | null;
2396
3102
  }
2397
3103
 
2398
- export interface NewFloatingCumulativeGroupedBulkPrice {
3104
+ export namespace NewFloatingScalableMatrixWithUnitPricingPrice {
3105
+ /**
3106
+ * Configuration for scalable_matrix_with_unit_pricing pricing
3107
+ */
3108
+ export interface ScalableMatrixWithUnitPricingConfig {
3109
+ /**
3110
+ * Used to determine the unit rate
3111
+ */
3112
+ first_dimension: string;
3113
+
3114
+ /**
3115
+ * Apply a scaling factor to each dimension
3116
+ */
3117
+ matrix_scaling_factors: Array<ScalableMatrixWithUnitPricingConfig.MatrixScalingFactor>;
3118
+
3119
+ /**
3120
+ * The final unit price to rate against the output of the matrix
3121
+ */
3122
+ unit_price: string;
3123
+
3124
+ /**
3125
+ * If true, the unit price will be prorated to the billing period
3126
+ */
3127
+ prorate?: boolean | null;
3128
+
3129
+ /**
3130
+ * Used to determine the unit rate (optional)
3131
+ */
3132
+ second_dimension?: string | null;
3133
+ }
3134
+
3135
+ export namespace ScalableMatrixWithUnitPricingConfig {
3136
+ /**
3137
+ * Configuration for a single matrix scaling factor
3138
+ */
3139
+ export interface MatrixScalingFactor {
3140
+ /**
3141
+ * First dimension value
3142
+ */
3143
+ first_dimension_value: string;
3144
+
3145
+ /**
3146
+ * Scaling factor
3147
+ */
3148
+ scaling_factor: string;
3149
+
3150
+ /**
3151
+ * Second dimension value (optional)
3152
+ */
3153
+ second_dimension_value?: string | null;
3154
+ }
3155
+ }
3156
+ }
3157
+
3158
+ export interface NewFloatingScalableMatrixWithTieredPricingPrice {
2399
3159
  /**
2400
3160
  * The cadence to bill for this price on.
2401
3161
  */
2402
3162
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
2403
3163
 
2404
- cumulative_grouped_bulk_config: { [key: string]: unknown };
2405
-
2406
3164
  /**
2407
3165
  * An ISO 4217 currency string for which this price is billed in.
2408
3166
  */
@@ -2413,13 +3171,21 @@ export declare namespace PriceCreateParams {
2413
3171
  */
2414
3172
  item_id: string;
2415
3173
 
2416
- model_type: 'cumulative_grouped_bulk';
3174
+ /**
3175
+ * The pricing model type
3176
+ */
3177
+ model_type: 'scalable_matrix_with_tiered_pricing';
2417
3178
 
2418
3179
  /**
2419
3180
  * The name of the price.
2420
3181
  */
2421
3182
  name: string;
2422
3183
 
3184
+ /**
3185
+ * Configuration for scalable_matrix_with_tiered_pricing pricing
3186
+ */
3187
+ scalable_matrix_with_tiered_pricing_config: NewFloatingScalableMatrixWithTieredPricingPrice.ScalableMatrixWithTieredPricingConfig;
3188
+
2423
3189
  /**
2424
3190
  * The id of the billable metric for the price. Only needed if the price is
2425
3191
  * usage-based.
@@ -2483,25 +3249,95 @@ export declare namespace PriceCreateParams {
2483
3249
  metadata?: { [key: string]: string | null } | null;
2484
3250
  }
2485
3251
 
2486
- export interface NewFloatingGroupedWithMinMaxThresholdsPrice {
3252
+ export namespace NewFloatingScalableMatrixWithTieredPricingPrice {
3253
+ /**
3254
+ * Configuration for scalable_matrix_with_tiered_pricing pricing
3255
+ */
3256
+ export interface ScalableMatrixWithTieredPricingConfig {
3257
+ /**
3258
+ * Used for the scalable matrix first dimension
3259
+ */
3260
+ first_dimension: string;
3261
+
3262
+ /**
3263
+ * Apply a scaling factor to each dimension
3264
+ */
3265
+ matrix_scaling_factors: Array<ScalableMatrixWithTieredPricingConfig.MatrixScalingFactor>;
3266
+
3267
+ /**
3268
+ * Tier pricing structure
3269
+ */
3270
+ tiers: Array<ScalableMatrixWithTieredPricingConfig.Tier>;
3271
+
3272
+ /**
3273
+ * Used for the scalable matrix second dimension (optional)
3274
+ */
3275
+ second_dimension?: string | null;
3276
+ }
3277
+
3278
+ export namespace ScalableMatrixWithTieredPricingConfig {
3279
+ /**
3280
+ * Configuration for a single matrix scaling factor
3281
+ */
3282
+ export interface MatrixScalingFactor {
3283
+ /**
3284
+ * First dimension value
3285
+ */
3286
+ first_dimension_value: string;
3287
+
3288
+ /**
3289
+ * Scaling factor
3290
+ */
3291
+ scaling_factor: string;
3292
+
3293
+ /**
3294
+ * Second dimension value (optional)
3295
+ */
3296
+ second_dimension_value?: string | null;
3297
+ }
3298
+
3299
+ /**
3300
+ * Configuration for a single tier entry with business logic
3301
+ */
3302
+ export interface Tier {
3303
+ /**
3304
+ * Tier lower bound
3305
+ */
3306
+ tier_lower_bound: string;
3307
+
3308
+ /**
3309
+ * Per unit amount
3310
+ */
3311
+ unit_amount: string;
3312
+ }
3313
+ }
3314
+ }
3315
+
3316
+ export interface NewFloatingCumulativeGroupedBulkPrice {
2487
3317
  /**
2488
3318
  * The cadence to bill for this price on.
2489
3319
  */
2490
3320
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
2491
3321
 
3322
+ /**
3323
+ * Configuration for cumulative_grouped_bulk pricing
3324
+ */
3325
+ cumulative_grouped_bulk_config: NewFloatingCumulativeGroupedBulkPrice.CumulativeGroupedBulkConfig;
3326
+
2492
3327
  /**
2493
3328
  * An ISO 4217 currency string for which this price is billed in.
2494
3329
  */
2495
3330
  currency: string;
2496
3331
 
2497
- grouped_with_min_max_thresholds_config: { [key: string]: unknown };
2498
-
2499
3332
  /**
2500
3333
  * The id of the item the price will be associated with.
2501
3334
  */
2502
3335
  item_id: string;
2503
3336
 
2504
- model_type: 'grouped_with_min_max_thresholds';
3337
+ /**
3338
+ * The pricing model type
3339
+ */
3340
+ model_type: 'cumulative_grouped_bulk';
2505
3341
 
2506
3342
  /**
2507
3343
  * The name of the price.
@@ -2571,6 +3407,45 @@ export declare namespace PriceCreateParams {
2571
3407
  metadata?: { [key: string]: string | null } | null;
2572
3408
  }
2573
3409
 
3410
+ export namespace NewFloatingCumulativeGroupedBulkPrice {
3411
+ /**
3412
+ * Configuration for cumulative_grouped_bulk pricing
3413
+ */
3414
+ export interface CumulativeGroupedBulkConfig {
3415
+ /**
3416
+ * Each tier lower bound must have the same group of values.
3417
+ */
3418
+ dimension_values: Array<CumulativeGroupedBulkConfig.DimensionValue>;
3419
+
3420
+ /**
3421
+ * Grouping key name
3422
+ */
3423
+ group: string;
3424
+ }
3425
+
3426
+ export namespace CumulativeGroupedBulkConfig {
3427
+ /**
3428
+ * Configuration for a dimension value entry
3429
+ */
3430
+ export interface DimensionValue {
3431
+ /**
3432
+ * Grouping key value
3433
+ */
3434
+ grouping_key: string;
3435
+
3436
+ /**
3437
+ * Tier lower bound
3438
+ */
3439
+ tier_lower_bound: string;
3440
+
3441
+ /**
3442
+ * Unit amount for this combination
3443
+ */
3444
+ unit_amount: string;
3445
+ }
3446
+ }
3447
+ }
3448
+
2574
3449
  export interface NewFloatingMinimumCompositePrice {
2575
3450
  /**
2576
3451
  * The cadence to bill for this price on.
@@ -2587,8 +3462,14 @@ export declare namespace PriceCreateParams {
2587
3462
  */
2588
3463
  item_id: string;
2589
3464
 
3465
+ /**
3466
+ * Configuration for minimum pricing
3467
+ */
2590
3468
  minimum_config: NewFloatingMinimumCompositePrice.MinimumConfig;
2591
3469
 
3470
+ /**
3471
+ * The pricing model type
3472
+ */
2592
3473
  model_type: 'minimum';
2593
3474
 
2594
3475
  /**
@@ -2660,6 +3541,9 @@ export declare namespace PriceCreateParams {
2660
3541
  }
2661
3542
 
2662
3543
  export namespace NewFloatingMinimumCompositePrice {
3544
+ /**
3545
+ * Configuration for minimum pricing
3546
+ */
2663
3547
  export interface MinimumConfig {
2664
3548
  /**
2665
3549
  * The minimum amount to apply
@@ -2667,10 +3551,9 @@ export declare namespace PriceCreateParams {
2667
3551
  minimum_amount: string;
2668
3552
 
2669
3553
  /**
2670
- * By default, subtotals from minimum composite prices are prorated based on the
2671
- * service period. Set to false to disable proration.
3554
+ * If true, subtotals from this price are prorated based on the service period
2672
3555
  */
2673
- prorated?: boolean | null;
3556
+ prorated?: boolean;
2674
3557
  }
2675
3558
  }
2676
3559
  }
@@ -2771,36 +3654,35 @@ export namespace PriceEvaluateMultipleParams {
2771
3654
  grouping_keys?: Array<string>;
2772
3655
 
2773
3656
  /**
2774
- * An inline price definition to evaluate, allowing you to test price
2775
- * configurations before adding them to Orb.
3657
+ * New floating price request body params.
2776
3658
  */
2777
3659
  price?:
2778
3660
  | Shared.NewFloatingUnitPrice
2779
- | Shared.NewFloatingPackagePrice
2780
- | Shared.NewFloatingMatrixPrice
2781
- | Shared.NewFloatingMatrixWithAllocationPrice
2782
3661
  | Shared.NewFloatingTieredPrice
2783
3662
  | Shared.NewFloatingBulkPrice
3663
+ | Shared.NewFloatingPackagePrice
3664
+ | Shared.NewFloatingMatrixPrice
2784
3665
  | Shared.NewFloatingThresholdTotalAmountPrice
2785
3666
  | Shared.NewFloatingTieredPackagePrice
2786
- | Shared.NewFloatingGroupedTieredPrice
2787
- | Shared.NewFloatingMaxGroupTieredPackagePrice
2788
3667
  | Shared.NewFloatingTieredWithMinimumPrice
2789
- | Shared.NewFloatingPackageWithAllocationPrice
3668
+ | Shared.NewFloatingGroupedTieredPrice
2790
3669
  | Shared.NewFloatingTieredPackageWithMinimumPrice
3670
+ | Shared.NewFloatingPackageWithAllocationPrice
2791
3671
  | Shared.NewFloatingUnitWithPercentPrice
3672
+ | Shared.NewFloatingMatrixWithAllocationPrice
2792
3673
  | Shared.NewFloatingTieredWithProrationPrice
2793
3674
  | Shared.NewFloatingUnitWithProrationPrice
2794
3675
  | Shared.NewFloatingGroupedAllocationPrice
3676
+ | Shared.NewFloatingBulkWithProrationPrice
2795
3677
  | Shared.NewFloatingGroupedWithProratedMinimumPrice
2796
3678
  | Shared.NewFloatingGroupedWithMeteredMinimumPrice
3679
+ | PriceEvaluation.NewFloatingGroupedWithMinMaxThresholdsPrice
2797
3680
  | Shared.NewFloatingMatrixWithDisplayNamePrice
2798
- | Shared.NewFloatingBulkWithProrationPrice
2799
3681
  | Shared.NewFloatingGroupedTieredPackagePrice
3682
+ | Shared.NewFloatingMaxGroupTieredPackagePrice
2800
3683
  | Shared.NewFloatingScalableMatrixWithUnitPricingPrice
2801
3684
  | Shared.NewFloatingScalableMatrixWithTieredPricingPrice
2802
3685
  | Shared.NewFloatingCumulativeGroupedBulkPrice
2803
- | PriceEvaluation.NewFloatingGroupedWithMinMaxThresholdsPrice
2804
3686
  | Shared.NewFloatingMinimumCompositePrice
2805
3687
  | null;
2806
3688
 
@@ -2822,13 +3704,19 @@ export namespace PriceEvaluateMultipleParams {
2822
3704
  */
2823
3705
  currency: string;
2824
3706
 
2825
- grouped_with_min_max_thresholds_config: { [key: string]: unknown };
3707
+ /**
3708
+ * Configuration for grouped_with_min_max_thresholds pricing
3709
+ */
3710
+ grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
2826
3711
 
2827
3712
  /**
2828
3713
  * The id of the item the price will be associated with.
2829
3714
  */
2830
3715
  item_id: string;
2831
3716
 
3717
+ /**
3718
+ * The pricing model type
3719
+ */
2832
3720
  model_type: 'grouped_with_min_max_thresholds';
2833
3721
 
2834
3722
  /**
@@ -2898,6 +3786,33 @@ export namespace PriceEvaluateMultipleParams {
2898
3786
  */
2899
3787
  metadata?: { [key: string]: string | null } | null;
2900
3788
  }
3789
+
3790
+ export namespace NewFloatingGroupedWithMinMaxThresholdsPrice {
3791
+ /**
3792
+ * Configuration for grouped_with_min_max_thresholds pricing
3793
+ */
3794
+ export interface GroupedWithMinMaxThresholdsConfig {
3795
+ /**
3796
+ * The event property used to group before applying thresholds
3797
+ */
3798
+ grouping_key: string;
3799
+
3800
+ /**
3801
+ * The maximum amount to charge each group
3802
+ */
3803
+ maximum_charge: string;
3804
+
3805
+ /**
3806
+ * The minimum amount to charge each group, regardless of usage
3807
+ */
3808
+ minimum_charge: string;
3809
+
3810
+ /**
3811
+ * The base price charged per group
3812
+ */
3813
+ per_unit_rate: string;
3814
+ }
3815
+ }
2901
3816
  }
2902
3817
  }
2903
3818
 
@@ -2986,36 +3901,35 @@ export namespace PriceEvaluatePreviewEventsParams {
2986
3901
  grouping_keys?: Array<string>;
2987
3902
 
2988
3903
  /**
2989
- * An inline price definition to evaluate, allowing you to test price
2990
- * configurations before adding them to Orb.
3904
+ * New floating price request body params.
2991
3905
  */
2992
3906
  price?:
2993
3907
  | Shared.NewFloatingUnitPrice
2994
- | Shared.NewFloatingPackagePrice
2995
- | Shared.NewFloatingMatrixPrice
2996
- | Shared.NewFloatingMatrixWithAllocationPrice
2997
3908
  | Shared.NewFloatingTieredPrice
2998
3909
  | Shared.NewFloatingBulkPrice
3910
+ | Shared.NewFloatingPackagePrice
3911
+ | Shared.NewFloatingMatrixPrice
2999
3912
  | Shared.NewFloatingThresholdTotalAmountPrice
3000
3913
  | Shared.NewFloatingTieredPackagePrice
3001
- | Shared.NewFloatingGroupedTieredPrice
3002
- | Shared.NewFloatingMaxGroupTieredPackagePrice
3003
3914
  | Shared.NewFloatingTieredWithMinimumPrice
3004
- | Shared.NewFloatingPackageWithAllocationPrice
3915
+ | Shared.NewFloatingGroupedTieredPrice
3005
3916
  | Shared.NewFloatingTieredPackageWithMinimumPrice
3917
+ | Shared.NewFloatingPackageWithAllocationPrice
3006
3918
  | Shared.NewFloatingUnitWithPercentPrice
3919
+ | Shared.NewFloatingMatrixWithAllocationPrice
3007
3920
  | Shared.NewFloatingTieredWithProrationPrice
3008
3921
  | Shared.NewFloatingUnitWithProrationPrice
3009
3922
  | Shared.NewFloatingGroupedAllocationPrice
3923
+ | Shared.NewFloatingBulkWithProrationPrice
3010
3924
  | Shared.NewFloatingGroupedWithProratedMinimumPrice
3011
3925
  | Shared.NewFloatingGroupedWithMeteredMinimumPrice
3926
+ | PriceEvaluation.NewFloatingGroupedWithMinMaxThresholdsPrice
3012
3927
  | Shared.NewFloatingMatrixWithDisplayNamePrice
3013
- | Shared.NewFloatingBulkWithProrationPrice
3014
3928
  | Shared.NewFloatingGroupedTieredPackagePrice
3929
+ | Shared.NewFloatingMaxGroupTieredPackagePrice
3015
3930
  | Shared.NewFloatingScalableMatrixWithUnitPricingPrice
3016
3931
  | Shared.NewFloatingScalableMatrixWithTieredPricingPrice
3017
3932
  | Shared.NewFloatingCumulativeGroupedBulkPrice
3018
- | PriceEvaluation.NewFloatingGroupedWithMinMaxThresholdsPrice
3019
3933
  | Shared.NewFloatingMinimumCompositePrice
3020
3934
  | null;
3021
3935
 
@@ -3037,13 +3951,19 @@ export namespace PriceEvaluatePreviewEventsParams {
3037
3951
  */
3038
3952
  currency: string;
3039
3953
 
3040
- grouped_with_min_max_thresholds_config: { [key: string]: unknown };
3954
+ /**
3955
+ * Configuration for grouped_with_min_max_thresholds pricing
3956
+ */
3957
+ grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
3041
3958
 
3042
3959
  /**
3043
3960
  * The id of the item the price will be associated with.
3044
3961
  */
3045
3962
  item_id: string;
3046
3963
 
3964
+ /**
3965
+ * The pricing model type
3966
+ */
3047
3967
  model_type: 'grouped_with_min_max_thresholds';
3048
3968
 
3049
3969
  /**
@@ -3113,6 +4033,33 @@ export namespace PriceEvaluatePreviewEventsParams {
3113
4033
  */
3114
4034
  metadata?: { [key: string]: string | null } | null;
3115
4035
  }
4036
+
4037
+ export namespace NewFloatingGroupedWithMinMaxThresholdsPrice {
4038
+ /**
4039
+ * Configuration for grouped_with_min_max_thresholds pricing
4040
+ */
4041
+ export interface GroupedWithMinMaxThresholdsConfig {
4042
+ /**
4043
+ * The event property used to group before applying thresholds
4044
+ */
4045
+ grouping_key: string;
4046
+
4047
+ /**
4048
+ * The maximum amount to charge each group
4049
+ */
4050
+ maximum_charge: string;
4051
+
4052
+ /**
4053
+ * The minimum amount to charge each group, regardless of usage
4054
+ */
4055
+ minimum_charge: string;
4056
+
4057
+ /**
4058
+ * The base price charged per group
4059
+ */
4060
+ per_unit_rate: string;
4061
+ }
4062
+ }
3116
4063
  }
3117
4064
  }
3118
4065