orb-billing 5.6.0 → 5.7.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 +19 -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 +924 -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 +2468 -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 +1367 -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 +1058 -113
  55. package/src/resources/shared.ts +2786 -288
  56. package/src/resources/subscriptions.ts +1607 -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,42 @@ 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.
992
+ */
993
+ tiers: Array<TieredPackageConfig.Tier>;
994
+ }
995
+
996
+ export namespace TieredPackageConfig {
997
+ /**
998
+ * Configuration for a single tier with business logic
999
+ */
1000
+ export interface Tier {
1001
+ /**
1002
+ * Price per package
1003
+ */
1004
+ per_unit: string;
1005
+
1006
+ /**
1007
+ * Tier lower bound
1008
+ */
1009
+ tier_lower_bound: string;
1010
+ }
1011
+ }
1012
+ }
1013
+
1014
+ export interface NewFloatingTieredWithMinimumPrice {
903
1015
  /**
904
1016
  * The cadence to bill for this price on.
905
1017
  */
@@ -915,14 +1027,20 @@ export declare namespace PriceCreateParams {
915
1027
  */
916
1028
  item_id: string;
917
1029
 
918
- model_type: 'tiered_package';
1030
+ /**
1031
+ * The pricing model type
1032
+ */
1033
+ model_type: 'tiered_with_minimum';
919
1034
 
920
1035
  /**
921
1036
  * The name of the price.
922
1037
  */
923
1038
  name: string;
924
1039
 
925
- tiered_package_config: { [key: string]: unknown };
1040
+ /**
1041
+ * Configuration for tiered_with_minimum pricing
1042
+ */
1043
+ tiered_with_minimum_config: NewFloatingTieredWithMinimumPrice.TieredWithMinimumConfig;
926
1044
 
927
1045
  /**
928
1046
  * The id of the billable metric for the price. Only needed if the price is
@@ -987,6 +1105,51 @@ export declare namespace PriceCreateParams {
987
1105
  metadata?: { [key: string]: string | null } | null;
988
1106
  }
989
1107
 
1108
+ export namespace NewFloatingTieredWithMinimumPrice {
1109
+ /**
1110
+ * Configuration for tiered_with_minimum pricing
1111
+ */
1112
+ export interface TieredWithMinimumConfig {
1113
+ /**
1114
+ * Tiered pricing with a minimum amount dependent on the volume tier. Tiers are
1115
+ * defined using exclusive lower bounds.
1116
+ */
1117
+ tiers: Array<TieredWithMinimumConfig.Tier>;
1118
+
1119
+ /**
1120
+ * If true, tiers with an accrued amount of 0 will not be included in the rating.
1121
+ */
1122
+ hide_zero_amount_tiers?: boolean;
1123
+
1124
+ /**
1125
+ * If true, the unit price will be prorated to the billing period
1126
+ */
1127
+ prorate?: boolean;
1128
+ }
1129
+
1130
+ export namespace TieredWithMinimumConfig {
1131
+ /**
1132
+ * Configuration for a single tier
1133
+ */
1134
+ export interface Tier {
1135
+ /**
1136
+ * Minimum amount
1137
+ */
1138
+ minimum_amount: string;
1139
+
1140
+ /**
1141
+ * Tier lower bound
1142
+ */
1143
+ tier_lower_bound: string;
1144
+
1145
+ /**
1146
+ * Per unit amount
1147
+ */
1148
+ unit_amount: string;
1149
+ }
1150
+ }
1151
+ }
1152
+
990
1153
  export interface NewFloatingGroupedTieredPrice {
991
1154
  /**
992
1155
  * The cadence to bill for this price on.
@@ -998,13 +1161,19 @@ export declare namespace PriceCreateParams {
998
1161
  */
999
1162
  currency: string;
1000
1163
 
1001
- grouped_tiered_config: { [key: string]: unknown };
1164
+ /**
1165
+ * Configuration for grouped_tiered pricing
1166
+ */
1167
+ grouped_tiered_config: NewFloatingGroupedTieredPrice.GroupedTieredConfig;
1002
1168
 
1003
1169
  /**
1004
1170
  * The id of the item the price will be associated with.
1005
1171
  */
1006
1172
  item_id: string;
1007
1173
 
1174
+ /**
1175
+ * The pricing model type
1176
+ */
1008
1177
  model_type: 'grouped_tiered';
1009
1178
 
1010
1179
  /**
@@ -1075,7 +1244,42 @@ export declare namespace PriceCreateParams {
1075
1244
  metadata?: { [key: string]: string | null } | null;
1076
1245
  }
1077
1246
 
1078
- export interface NewFloatingMaxGroupTieredPackagePrice {
1247
+ export namespace NewFloatingGroupedTieredPrice {
1248
+ /**
1249
+ * Configuration for grouped_tiered pricing
1250
+ */
1251
+ export interface GroupedTieredConfig {
1252
+ /**
1253
+ * The billable metric property used to group before tiering
1254
+ */
1255
+ grouping_key: string;
1256
+
1257
+ /**
1258
+ * Apply tiered pricing to each segment generated after grouping with the provided
1259
+ * key
1260
+ */
1261
+ tiers: Array<GroupedTieredConfig.Tier>;
1262
+ }
1263
+
1264
+ export namespace GroupedTieredConfig {
1265
+ /**
1266
+ * Configuration for a single tier
1267
+ */
1268
+ export interface Tier {
1269
+ /**
1270
+ * Tier lower bound
1271
+ */
1272
+ tier_lower_bound: string;
1273
+
1274
+ /**
1275
+ * Per unit amount
1276
+ */
1277
+ unit_amount: string;
1278
+ }
1279
+ }
1280
+ }
1281
+
1282
+ export interface NewFloatingTieredPackageWithMinimumPrice {
1079
1283
  /**
1080
1284
  * The cadence to bill for this price on.
1081
1285
  */
@@ -1091,15 +1295,21 @@ export declare namespace PriceCreateParams {
1091
1295
  */
1092
1296
  item_id: string;
1093
1297
 
1094
- max_group_tiered_package_config: { [key: string]: unknown };
1095
-
1096
- model_type: 'max_group_tiered_package';
1298
+ /**
1299
+ * The pricing model type
1300
+ */
1301
+ model_type: 'tiered_package_with_minimum';
1097
1302
 
1098
1303
  /**
1099
1304
  * The name of the price.
1100
1305
  */
1101
1306
  name: string;
1102
1307
 
1308
+ /**
1309
+ * Configuration for tiered_package_with_minimum pricing
1310
+ */
1311
+ tiered_package_with_minimum_config: NewFloatingTieredPackageWithMinimumPrice.TieredPackageWithMinimumConfig;
1312
+
1103
1313
  /**
1104
1314
  * The id of the billable metric for the price. Only needed if the price is
1105
1315
  * usage-based.
@@ -1163,7 +1373,47 @@ export declare namespace PriceCreateParams {
1163
1373
  metadata?: { [key: string]: string | null } | null;
1164
1374
  }
1165
1375
 
1166
- export interface NewFloatingTieredWithMinimumPrice {
1376
+ export namespace NewFloatingTieredPackageWithMinimumPrice {
1377
+ /**
1378
+ * Configuration for tiered_package_with_minimum pricing
1379
+ */
1380
+ export interface TieredPackageWithMinimumConfig {
1381
+ /**
1382
+ * Package size
1383
+ */
1384
+ package_size: number;
1385
+
1386
+ /**
1387
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
1388
+ * are defined using exclusive lower bounds.
1389
+ */
1390
+ tiers: Array<TieredPackageWithMinimumConfig.Tier>;
1391
+ }
1392
+
1393
+ export namespace TieredPackageWithMinimumConfig {
1394
+ /**
1395
+ * Configuration for a single tier
1396
+ */
1397
+ export interface Tier {
1398
+ /**
1399
+ * Minimum amount
1400
+ */
1401
+ minimum_amount: string;
1402
+
1403
+ /**
1404
+ * Price per package
1405
+ */
1406
+ per_unit: string;
1407
+
1408
+ /**
1409
+ * Tier lower bound
1410
+ */
1411
+ tier_lower_bound: string;
1412
+ }
1413
+ }
1414
+ }
1415
+
1416
+ export interface NewFloatingPackageWithAllocationPrice {
1167
1417
  /**
1168
1418
  * The cadence to bill for this price on.
1169
1419
  */
@@ -1179,14 +1429,20 @@ export declare namespace PriceCreateParams {
1179
1429
  */
1180
1430
  item_id: string;
1181
1431
 
1182
- model_type: 'tiered_with_minimum';
1432
+ /**
1433
+ * The pricing model type
1434
+ */
1435
+ model_type: 'package_with_allocation';
1183
1436
 
1184
1437
  /**
1185
1438
  * The name of the price.
1186
1439
  */
1187
1440
  name: string;
1188
1441
 
1189
- tiered_with_minimum_config: { [key: string]: unknown };
1442
+ /**
1443
+ * Configuration for package_with_allocation pricing
1444
+ */
1445
+ package_with_allocation_config: NewFloatingPackageWithAllocationPrice.PackageWithAllocationConfig;
1190
1446
 
1191
1447
  /**
1192
1448
  * The id of the billable metric for the price. Only needed if the price is
@@ -1251,7 +1507,29 @@ export declare namespace PriceCreateParams {
1251
1507
  metadata?: { [key: string]: string | null } | null;
1252
1508
  }
1253
1509
 
1254
- export interface NewFloatingPackageWithAllocationPrice {
1510
+ export namespace NewFloatingPackageWithAllocationPrice {
1511
+ /**
1512
+ * Configuration for package_with_allocation pricing
1513
+ */
1514
+ export interface PackageWithAllocationConfig {
1515
+ /**
1516
+ * Usage allocation
1517
+ */
1518
+ allocation: string;
1519
+
1520
+ /**
1521
+ * Price per package
1522
+ */
1523
+ package_amount: string;
1524
+
1525
+ /**
1526
+ * Package size
1527
+ */
1528
+ package_size: string;
1529
+ }
1530
+ }
1531
+
1532
+ export interface NewFloatingUnitWithPercentPrice {
1255
1533
  /**
1256
1534
  * The cadence to bill for this price on.
1257
1535
  */
@@ -1267,14 +1545,20 @@ export declare namespace PriceCreateParams {
1267
1545
  */
1268
1546
  item_id: string;
1269
1547
 
1270
- model_type: 'package_with_allocation';
1548
+ /**
1549
+ * The pricing model type
1550
+ */
1551
+ model_type: 'unit_with_percent';
1271
1552
 
1272
1553
  /**
1273
1554
  * The name of the price.
1274
1555
  */
1275
1556
  name: string;
1276
1557
 
1277
- package_with_allocation_config: { [key: string]: unknown };
1558
+ /**
1559
+ * Configuration for unit_with_percent pricing
1560
+ */
1561
+ unit_with_percent_config: NewFloatingUnitWithPercentPrice.UnitWithPercentConfig;
1278
1562
 
1279
1563
  /**
1280
1564
  * The id of the billable metric for the price. Only needed if the price is
@@ -1339,7 +1623,24 @@ export declare namespace PriceCreateParams {
1339
1623
  metadata?: { [key: string]: string | null } | null;
1340
1624
  }
1341
1625
 
1342
- export interface NewFloatingTieredPackageWithMinimumPrice {
1626
+ export namespace NewFloatingUnitWithPercentPrice {
1627
+ /**
1628
+ * Configuration for unit_with_percent pricing
1629
+ */
1630
+ export interface UnitWithPercentConfig {
1631
+ /**
1632
+ * What percent, out of 100, of the calculated total to charge
1633
+ */
1634
+ percent: string;
1635
+
1636
+ /**
1637
+ * Rate per unit of usage
1638
+ */
1639
+ unit_amount: string;
1640
+ }
1641
+ }
1642
+
1643
+ export interface NewFloatingMatrixWithAllocationPrice {
1343
1644
  /**
1344
1645
  * The cadence to bill for this price on.
1345
1646
  */
@@ -1355,15 +1656,21 @@ export declare namespace PriceCreateParams {
1355
1656
  */
1356
1657
  item_id: string;
1357
1658
 
1358
- model_type: 'tiered_package_with_minimum';
1659
+ /**
1660
+ * Configuration for matrix_with_allocation pricing
1661
+ */
1662
+ matrix_with_allocation_config: Shared.MatrixWithAllocationConfig;
1663
+
1664
+ /**
1665
+ * The pricing model type
1666
+ */
1667
+ model_type: 'matrix_with_allocation';
1359
1668
 
1360
1669
  /**
1361
1670
  * The name of the price.
1362
1671
  */
1363
1672
  name: string;
1364
1673
 
1365
- tiered_package_with_minimum_config: { [key: string]: unknown };
1366
-
1367
1674
  /**
1368
1675
  * The id of the billable metric for the price. Only needed if the price is
1369
1676
  * usage-based.
@@ -1427,7 +1734,7 @@ export declare namespace PriceCreateParams {
1427
1734
  metadata?: { [key: string]: string | null } | null;
1428
1735
  }
1429
1736
 
1430
- export interface NewFloatingUnitWithPercentPrice {
1737
+ export interface NewFloatingTieredWithProrationPrice {
1431
1738
  /**
1432
1739
  * The cadence to bill for this price on.
1433
1740
  */
@@ -1443,14 +1750,20 @@ export declare namespace PriceCreateParams {
1443
1750
  */
1444
1751
  item_id: string;
1445
1752
 
1446
- model_type: 'unit_with_percent';
1753
+ /**
1754
+ * The pricing model type
1755
+ */
1756
+ model_type: 'tiered_with_proration';
1447
1757
 
1448
1758
  /**
1449
1759
  * The name of the price.
1450
1760
  */
1451
1761
  name: string;
1452
1762
 
1453
- unit_with_percent_config: { [key: string]: unknown };
1763
+ /**
1764
+ * Configuration for tiered_with_proration pricing
1765
+ */
1766
+ tiered_with_proration_config: NewFloatingTieredWithProrationPrice.TieredWithProrationConfig;
1454
1767
 
1455
1768
  /**
1456
1769
  * The id of the billable metric for the price. Only needed if the price is
@@ -1515,7 +1828,37 @@ export declare namespace PriceCreateParams {
1515
1828
  metadata?: { [key: string]: string | null } | null;
1516
1829
  }
1517
1830
 
1518
- export interface NewFloatingTieredWithProrationPrice {
1831
+ export namespace NewFloatingTieredWithProrationPrice {
1832
+ /**
1833
+ * Configuration for tiered_with_proration pricing
1834
+ */
1835
+ export interface TieredWithProrationConfig {
1836
+ /**
1837
+ * Tiers for rating based on total usage quantities into the specified tier with
1838
+ * proration
1839
+ */
1840
+ tiers: Array<TieredWithProrationConfig.Tier>;
1841
+ }
1842
+
1843
+ export namespace TieredWithProrationConfig {
1844
+ /**
1845
+ * Configuration for a single tiered with proration tier
1846
+ */
1847
+ export interface Tier {
1848
+ /**
1849
+ * Inclusive tier starting value
1850
+ */
1851
+ tier_lower_bound: string;
1852
+
1853
+ /**
1854
+ * Amount per unit
1855
+ */
1856
+ unit_amount: string;
1857
+ }
1858
+ }
1859
+ }
1860
+
1861
+ export interface NewFloatingUnitWithProrationPrice {
1519
1862
  /**
1520
1863
  * The cadence to bill for this price on.
1521
1864
  */
@@ -1531,15 +1874,21 @@ export declare namespace PriceCreateParams {
1531
1874
  */
1532
1875
  item_id: string;
1533
1876
 
1534
- model_type: 'tiered_with_proration';
1877
+ /**
1878
+ * The pricing model type
1879
+ */
1880
+ model_type: 'unit_with_proration';
1535
1881
 
1536
1882
  /**
1537
1883
  * The name of the price.
1538
1884
  */
1539
1885
  name: string;
1540
1886
 
1541
- tiered_with_proration_config: { [key: string]: unknown };
1542
-
1887
+ /**
1888
+ * Configuration for unit_with_proration pricing
1889
+ */
1890
+ unit_with_proration_config: NewFloatingUnitWithProrationPrice.UnitWithProrationConfig;
1891
+
1543
1892
  /**
1544
1893
  * The id of the billable metric for the price. Only needed if the price is
1545
1894
  * usage-based.
@@ -1603,7 +1952,19 @@ export declare namespace PriceCreateParams {
1603
1952
  metadata?: { [key: string]: string | null } | null;
1604
1953
  }
1605
1954
 
1606
- export interface NewFloatingUnitWithProrationPrice {
1955
+ export namespace NewFloatingUnitWithProrationPrice {
1956
+ /**
1957
+ * Configuration for unit_with_proration pricing
1958
+ */
1959
+ export interface UnitWithProrationConfig {
1960
+ /**
1961
+ * Rate per unit of usage
1962
+ */
1963
+ unit_amount: string;
1964
+ }
1965
+ }
1966
+
1967
+ export interface NewFloatingGroupedAllocationPrice {
1607
1968
  /**
1608
1969
  * The cadence to bill for this price on.
1609
1970
  */
@@ -1614,20 +1975,26 @@ export declare namespace PriceCreateParams {
1614
1975
  */
1615
1976
  currency: string;
1616
1977
 
1978
+ /**
1979
+ * Configuration for grouped_allocation pricing
1980
+ */
1981
+ grouped_allocation_config: NewFloatingGroupedAllocationPrice.GroupedAllocationConfig;
1982
+
1617
1983
  /**
1618
1984
  * The id of the item the price will be associated with.
1619
1985
  */
1620
1986
  item_id: string;
1621
1987
 
1622
- model_type: 'unit_with_proration';
1988
+ /**
1989
+ * The pricing model type
1990
+ */
1991
+ model_type: 'grouped_allocation';
1623
1992
 
1624
1993
  /**
1625
1994
  * The name of the price.
1626
1995
  */
1627
1996
  name: string;
1628
1997
 
1629
- unit_with_proration_config: { [key: string]: unknown };
1630
-
1631
1998
  /**
1632
1999
  * The id of the billable metric for the price. Only needed if the price is
1633
2000
  * usage-based.
@@ -1691,7 +2058,34 @@ export declare namespace PriceCreateParams {
1691
2058
  metadata?: { [key: string]: string | null } | null;
1692
2059
  }
1693
2060
 
1694
- export interface NewFloatingGroupedAllocationPrice {
2061
+ export namespace NewFloatingGroupedAllocationPrice {
2062
+ /**
2063
+ * Configuration for grouped_allocation pricing
2064
+ */
2065
+ export interface GroupedAllocationConfig {
2066
+ /**
2067
+ * Usage allocation per group
2068
+ */
2069
+ allocation: string;
2070
+
2071
+ /**
2072
+ * How to determine the groups that should each be allocated some quantity
2073
+ */
2074
+ grouping_key: string;
2075
+
2076
+ /**
2077
+ * Unit rate for post-allocation
2078
+ */
2079
+ overage_unit_rate: string;
2080
+ }
2081
+ }
2082
+
2083
+ export interface NewFloatingBulkWithProrationPrice {
2084
+ /**
2085
+ * Configuration for bulk_with_proration pricing
2086
+ */
2087
+ bulk_with_proration_config: NewFloatingBulkWithProrationPrice.BulkWithProrationConfig;
2088
+
1695
2089
  /**
1696
2090
  * The cadence to bill for this price on.
1697
2091
  */
@@ -1702,14 +2096,15 @@ export declare namespace PriceCreateParams {
1702
2096
  */
1703
2097
  currency: string;
1704
2098
 
1705
- grouped_allocation_config: { [key: string]: unknown };
1706
-
1707
2099
  /**
1708
2100
  * The id of the item the price will be associated with.
1709
2101
  */
1710
2102
  item_id: string;
1711
2103
 
1712
- model_type: 'grouped_allocation';
2104
+ /**
2105
+ * The pricing model type
2106
+ */
2107
+ model_type: 'bulk_with_proration';
1713
2108
 
1714
2109
  /**
1715
2110
  * The name of the price.
@@ -1779,6 +2174,35 @@ export declare namespace PriceCreateParams {
1779
2174
  metadata?: { [key: string]: string | null } | null;
1780
2175
  }
1781
2176
 
2177
+ export namespace NewFloatingBulkWithProrationPrice {
2178
+ /**
2179
+ * Configuration for bulk_with_proration pricing
2180
+ */
2181
+ export interface BulkWithProrationConfig {
2182
+ /**
2183
+ * Bulk tiers for rating based on total usage volume
2184
+ */
2185
+ tiers: Array<BulkWithProrationConfig.Tier>;
2186
+ }
2187
+
2188
+ export namespace BulkWithProrationConfig {
2189
+ /**
2190
+ * Configuration for a single bulk pricing tier with proration
2191
+ */
2192
+ export interface Tier {
2193
+ /**
2194
+ * Cost per unit
2195
+ */
2196
+ unit_amount: string;
2197
+
2198
+ /**
2199
+ * The lower bound for this tier
2200
+ */
2201
+ tier_lower_bound?: string | null;
2202
+ }
2203
+ }
2204
+ }
2205
+
1782
2206
  export interface NewFloatingGroupedWithProratedMinimumPrice {
1783
2207
  /**
1784
2208
  * The cadence to bill for this price on.
@@ -1790,13 +2214,19 @@ export declare namespace PriceCreateParams {
1790
2214
  */
1791
2215
  currency: string;
1792
2216
 
1793
- grouped_with_prorated_minimum_config: { [key: string]: unknown };
2217
+ /**
2218
+ * Configuration for grouped_with_prorated_minimum pricing
2219
+ */
2220
+ grouped_with_prorated_minimum_config: NewFloatingGroupedWithProratedMinimumPrice.GroupedWithProratedMinimumConfig;
1794
2221
 
1795
2222
  /**
1796
2223
  * The id of the item the price will be associated with.
1797
2224
  */
1798
2225
  item_id: string;
1799
2226
 
2227
+ /**
2228
+ * The pricing model type
2229
+ */
1800
2230
  model_type: 'grouped_with_prorated_minimum';
1801
2231
 
1802
2232
  /**
@@ -1867,6 +2297,28 @@ export declare namespace PriceCreateParams {
1867
2297
  metadata?: { [key: string]: string | null } | null;
1868
2298
  }
1869
2299
 
2300
+ export namespace NewFloatingGroupedWithProratedMinimumPrice {
2301
+ /**
2302
+ * Configuration for grouped_with_prorated_minimum pricing
2303
+ */
2304
+ export interface GroupedWithProratedMinimumConfig {
2305
+ /**
2306
+ * How to determine the groups that should each have a minimum
2307
+ */
2308
+ grouping_key: string;
2309
+
2310
+ /**
2311
+ * The minimum amount to charge per group
2312
+ */
2313
+ minimum: string;
2314
+
2315
+ /**
2316
+ * The amount to charge per unit
2317
+ */
2318
+ unit_rate: string;
2319
+ }
2320
+ }
2321
+
1870
2322
  export interface NewFloatingGroupedWithMeteredMinimumPrice {
1871
2323
  /**
1872
2324
  * The cadence to bill for this price on.
@@ -1878,13 +2330,19 @@ export declare namespace PriceCreateParams {
1878
2330
  */
1879
2331
  currency: string;
1880
2332
 
1881
- grouped_with_metered_minimum_config: { [key: string]: unknown };
2333
+ /**
2334
+ * Configuration for grouped_with_metered_minimum pricing
2335
+ */
2336
+ grouped_with_metered_minimum_config: NewFloatingGroupedWithMeteredMinimumPrice.GroupedWithMeteredMinimumConfig;
1882
2337
 
1883
2338
  /**
1884
2339
  * The id of the item the price will be associated with.
1885
2340
  */
1886
2341
  item_id: string;
1887
2342
 
2343
+ /**
2344
+ * The pricing model type
2345
+ */
1888
2346
  model_type: 'grouped_with_metered_minimum';
1889
2347
 
1890
2348
  /**
@@ -1955,7 +2413,78 @@ export declare namespace PriceCreateParams {
1955
2413
  metadata?: { [key: string]: string | null } | null;
1956
2414
  }
1957
2415
 
1958
- export interface NewFloatingMatrixWithDisplayNamePrice {
2416
+ export namespace NewFloatingGroupedWithMeteredMinimumPrice {
2417
+ /**
2418
+ * Configuration for grouped_with_metered_minimum pricing
2419
+ */
2420
+ export interface GroupedWithMeteredMinimumConfig {
2421
+ /**
2422
+ * Used to partition the usage into groups. The minimum amount is applied to each
2423
+ * group.
2424
+ */
2425
+ grouping_key: string;
2426
+
2427
+ /**
2428
+ * The minimum amount to charge per group per unit
2429
+ */
2430
+ minimum_unit_amount: string;
2431
+
2432
+ /**
2433
+ * Used to determine the unit rate
2434
+ */
2435
+ pricing_key: string;
2436
+
2437
+ /**
2438
+ * Scale the unit rates by the scaling factor.
2439
+ */
2440
+ scaling_factors: Array<GroupedWithMeteredMinimumConfig.ScalingFactor>;
2441
+
2442
+ /**
2443
+ * Used to determine the unit rate scaling factor
2444
+ */
2445
+ scaling_key: string;
2446
+
2447
+ /**
2448
+ * Apply per unit pricing to each pricing value. The minimum amount is applied any
2449
+ * unmatched usage.
2450
+ */
2451
+ unit_amounts: Array<GroupedWithMeteredMinimumConfig.UnitAmount>;
2452
+ }
2453
+
2454
+ export namespace GroupedWithMeteredMinimumConfig {
2455
+ /**
2456
+ * Configuration for a scaling factor
2457
+ */
2458
+ export interface ScalingFactor {
2459
+ /**
2460
+ * Scaling factor
2461
+ */
2462
+ scaling_factor: string;
2463
+
2464
+ /**
2465
+ * Scaling value
2466
+ */
2467
+ scaling_value: string;
2468
+ }
2469
+
2470
+ /**
2471
+ * Configuration for a unit amount
2472
+ */
2473
+ export interface UnitAmount {
2474
+ /**
2475
+ * Pricing value
2476
+ */
2477
+ pricing_value: string;
2478
+
2479
+ /**
2480
+ * Per unit amount
2481
+ */
2482
+ unit_amount: string;
2483
+ }
2484
+ }
2485
+ }
2486
+
2487
+ export interface NewFloatingGroupedWithMinMaxThresholdsPrice {
1959
2488
  /**
1960
2489
  * The cadence to bill for this price on.
1961
2490
  */
@@ -1966,14 +2495,20 @@ export declare namespace PriceCreateParams {
1966
2495
  */
1967
2496
  currency: string;
1968
2497
 
2498
+ /**
2499
+ * Configuration for grouped_with_min_max_thresholds pricing
2500
+ */
2501
+ grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
2502
+
1969
2503
  /**
1970
2504
  * The id of the item the price will be associated with.
1971
2505
  */
1972
2506
  item_id: string;
1973
2507
 
1974
- matrix_with_display_name_config: { [key: string]: unknown };
1975
-
1976
- model_type: 'matrix_with_display_name';
2508
+ /**
2509
+ * The pricing model type
2510
+ */
2511
+ model_type: 'grouped_with_min_max_thresholds';
1977
2512
 
1978
2513
  /**
1979
2514
  * The name of the price.
@@ -2043,9 +2578,34 @@ export declare namespace PriceCreateParams {
2043
2578
  metadata?: { [key: string]: string | null } | null;
2044
2579
  }
2045
2580
 
2046
- export interface NewFloatingBulkWithProrationPrice {
2047
- bulk_with_proration_config: { [key: string]: unknown };
2581
+ export namespace NewFloatingGroupedWithMinMaxThresholdsPrice {
2582
+ /**
2583
+ * Configuration for grouped_with_min_max_thresholds pricing
2584
+ */
2585
+ export interface GroupedWithMinMaxThresholdsConfig {
2586
+ /**
2587
+ * The event property used to group before applying thresholds
2588
+ */
2589
+ grouping_key: string;
2048
2590
 
2591
+ /**
2592
+ * The maximum amount to charge each group
2593
+ */
2594
+ maximum_charge: string;
2595
+
2596
+ /**
2597
+ * The minimum amount to charge each group, regardless of usage
2598
+ */
2599
+ minimum_charge: string;
2600
+
2601
+ /**
2602
+ * The base price charged per group
2603
+ */
2604
+ per_unit_rate: string;
2605
+ }
2606
+ }
2607
+
2608
+ export interface NewFloatingMatrixWithDisplayNamePrice {
2049
2609
  /**
2050
2610
  * The cadence to bill for this price on.
2051
2611
  */
@@ -2061,7 +2621,15 @@ export declare namespace PriceCreateParams {
2061
2621
  */
2062
2622
  item_id: string;
2063
2623
 
2064
- model_type: 'bulk_with_proration';
2624
+ /**
2625
+ * Configuration for matrix_with_display_name pricing
2626
+ */
2627
+ matrix_with_display_name_config: NewFloatingMatrixWithDisplayNamePrice.MatrixWithDisplayNameConfig;
2628
+
2629
+ /**
2630
+ * The pricing model type
2631
+ */
2632
+ model_type: 'matrix_with_display_name';
2065
2633
 
2066
2634
  /**
2067
2635
  * The name of the price.
@@ -2131,6 +2699,45 @@ export declare namespace PriceCreateParams {
2131
2699
  metadata?: { [key: string]: string | null } | null;
2132
2700
  }
2133
2701
 
2702
+ export namespace NewFloatingMatrixWithDisplayNamePrice {
2703
+ /**
2704
+ * Configuration for matrix_with_display_name pricing
2705
+ */
2706
+ export interface MatrixWithDisplayNameConfig {
2707
+ /**
2708
+ * Used to determine the unit rate
2709
+ */
2710
+ dimension: string;
2711
+
2712
+ /**
2713
+ * Apply per unit pricing to each dimension value
2714
+ */
2715
+ unit_amounts: Array<MatrixWithDisplayNameConfig.UnitAmount>;
2716
+ }
2717
+
2718
+ export namespace MatrixWithDisplayNameConfig {
2719
+ /**
2720
+ * Configuration for a unit amount item
2721
+ */
2722
+ export interface UnitAmount {
2723
+ /**
2724
+ * The dimension value
2725
+ */
2726
+ dimension_value: string;
2727
+
2728
+ /**
2729
+ * Display name for this dimension value
2730
+ */
2731
+ display_name: string;
2732
+
2733
+ /**
2734
+ * Per unit amount
2735
+ */
2736
+ unit_amount: string;
2737
+ }
2738
+ }
2739
+ }
2740
+
2134
2741
  export interface NewFloatingGroupedTieredPackagePrice {
2135
2742
  /**
2136
2743
  * The cadence to bill for this price on.
@@ -2142,13 +2749,19 @@ export declare namespace PriceCreateParams {
2142
2749
  */
2143
2750
  currency: string;
2144
2751
 
2145
- grouped_tiered_package_config: { [key: string]: unknown };
2752
+ /**
2753
+ * Configuration for grouped_tiered_package pricing
2754
+ */
2755
+ grouped_tiered_package_config: NewFloatingGroupedTieredPackagePrice.GroupedTieredPackageConfig;
2146
2756
 
2147
2757
  /**
2148
2758
  * The id of the item the price will be associated with.
2149
2759
  */
2150
2760
  item_id: string;
2151
2761
 
2762
+ /**
2763
+ * The pricing model type
2764
+ */
2152
2765
  model_type: 'grouped_tiered_package';
2153
2766
 
2154
2767
  /**
@@ -2219,7 +2832,47 @@ export declare namespace PriceCreateParams {
2219
2832
  metadata?: { [key: string]: string | null } | null;
2220
2833
  }
2221
2834
 
2222
- export interface NewFloatingScalableMatrixWithUnitPricingPrice {
2835
+ export namespace NewFloatingGroupedTieredPackagePrice {
2836
+ /**
2837
+ * Configuration for grouped_tiered_package pricing
2838
+ */
2839
+ export interface GroupedTieredPackageConfig {
2840
+ /**
2841
+ * The event property used to group before tiering
2842
+ */
2843
+ grouping_key: string;
2844
+
2845
+ /**
2846
+ * Package size
2847
+ */
2848
+ package_size: string;
2849
+
2850
+ /**
2851
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
2852
+ * are defined using exclusive lower bounds.
2853
+ */
2854
+ tiers: Array<GroupedTieredPackageConfig.Tier>;
2855
+ }
2856
+
2857
+ export namespace GroupedTieredPackageConfig {
2858
+ /**
2859
+ * Configuration for a single tier
2860
+ */
2861
+ export interface Tier {
2862
+ /**
2863
+ * Price per package
2864
+ */
2865
+ per_unit: string;
2866
+
2867
+ /**
2868
+ * Tier lower bound
2869
+ */
2870
+ tier_lower_bound: string;
2871
+ }
2872
+ }
2873
+ }
2874
+
2875
+ export interface NewFloatingMaxGroupTieredPackagePrice {
2223
2876
  /**
2224
2877
  * The cadence to bill for this price on.
2225
2878
  */
@@ -2235,15 +2888,21 @@ export declare namespace PriceCreateParams {
2235
2888
  */
2236
2889
  item_id: string;
2237
2890
 
2238
- model_type: 'scalable_matrix_with_unit_pricing';
2891
+ /**
2892
+ * Configuration for max_group_tiered_package pricing
2893
+ */
2894
+ max_group_tiered_package_config: NewFloatingMaxGroupTieredPackagePrice.MaxGroupTieredPackageConfig;
2895
+
2896
+ /**
2897
+ * The pricing model type
2898
+ */
2899
+ model_type: 'max_group_tiered_package';
2239
2900
 
2240
2901
  /**
2241
2902
  * The name of the price.
2242
2903
  */
2243
2904
  name: string;
2244
2905
 
2245
- scalable_matrix_with_unit_pricing_config: { [key: string]: unknown };
2246
-
2247
2906
  /**
2248
2907
  * The id of the billable metric for the price. Only needed if the price is
2249
2908
  * usage-based.
@@ -2307,7 +2966,46 @@ export declare namespace PriceCreateParams {
2307
2966
  metadata?: { [key: string]: string | null } | null;
2308
2967
  }
2309
2968
 
2310
- export interface NewFloatingScalableMatrixWithTieredPricingPrice {
2969
+ export namespace NewFloatingMaxGroupTieredPackagePrice {
2970
+ /**
2971
+ * Configuration for max_group_tiered_package pricing
2972
+ */
2973
+ export interface MaxGroupTieredPackageConfig {
2974
+ /**
2975
+ * The event property used to group before tiering the group with the highest value
2976
+ */
2977
+ grouping_key: string;
2978
+
2979
+ /**
2980
+ * Package size
2981
+ */
2982
+ package_size: string;
2983
+
2984
+ /**
2985
+ * Apply tiered pricing to the largest group after grouping with the provided key.
2986
+ */
2987
+ tiers: Array<MaxGroupTieredPackageConfig.Tier>;
2988
+ }
2989
+
2990
+ export namespace MaxGroupTieredPackageConfig {
2991
+ /**
2992
+ * Configuration for a single tier
2993
+ */
2994
+ export interface Tier {
2995
+ /**
2996
+ * Tier lower bound
2997
+ */
2998
+ tier_lower_bound: string;
2999
+
3000
+ /**
3001
+ * Per unit amount
3002
+ */
3003
+ unit_amount: string;
3004
+ }
3005
+ }
3006
+ }
3007
+
3008
+ export interface NewFloatingScalableMatrixWithUnitPricingPrice {
2311
3009
  /**
2312
3010
  * The cadence to bill for this price on.
2313
3011
  */
@@ -2323,14 +3021,20 @@ export declare namespace PriceCreateParams {
2323
3021
  */
2324
3022
  item_id: string;
2325
3023
 
2326
- model_type: 'scalable_matrix_with_tiered_pricing';
3024
+ /**
3025
+ * The pricing model type
3026
+ */
3027
+ model_type: 'scalable_matrix_with_unit_pricing';
2327
3028
 
2328
3029
  /**
2329
3030
  * The name of the price.
2330
3031
  */
2331
3032
  name: string;
2332
3033
 
2333
- scalable_matrix_with_tiered_pricing_config: { [key: string]: unknown };
3034
+ /**
3035
+ * Configuration for scalable_matrix_with_unit_pricing pricing
3036
+ */
3037
+ scalable_matrix_with_unit_pricing_config: NewFloatingScalableMatrixWithUnitPricingPrice.ScalableMatrixWithUnitPricingConfig;
2334
3038
 
2335
3039
  /**
2336
3040
  * The id of the billable metric for the price. Only needed if the price is
@@ -2395,14 +3099,66 @@ export declare namespace PriceCreateParams {
2395
3099
  metadata?: { [key: string]: string | null } | null;
2396
3100
  }
2397
3101
 
2398
- export interface NewFloatingCumulativeGroupedBulkPrice {
3102
+ export namespace NewFloatingScalableMatrixWithUnitPricingPrice {
3103
+ /**
3104
+ * Configuration for scalable_matrix_with_unit_pricing pricing
3105
+ */
3106
+ export interface ScalableMatrixWithUnitPricingConfig {
3107
+ /**
3108
+ * Used to determine the unit rate
3109
+ */
3110
+ first_dimension: string;
3111
+
3112
+ /**
3113
+ * Apply a scaling factor to each dimension
3114
+ */
3115
+ matrix_scaling_factors: Array<ScalableMatrixWithUnitPricingConfig.MatrixScalingFactor>;
3116
+
3117
+ /**
3118
+ * The final unit price to rate against the output of the matrix
3119
+ */
3120
+ unit_price: string;
3121
+
3122
+ /**
3123
+ * If true, the unit price will be prorated to the billing period
3124
+ */
3125
+ prorate?: boolean | null;
3126
+
3127
+ /**
3128
+ * Used to determine the unit rate (optional)
3129
+ */
3130
+ second_dimension?: string | null;
3131
+ }
3132
+
3133
+ export namespace ScalableMatrixWithUnitPricingConfig {
3134
+ /**
3135
+ * Configuration for a single matrix scaling factor
3136
+ */
3137
+ export interface MatrixScalingFactor {
3138
+ /**
3139
+ * First dimension value
3140
+ */
3141
+ first_dimension_value: string;
3142
+
3143
+ /**
3144
+ * Scaling factor
3145
+ */
3146
+ scaling_factor: string;
3147
+
3148
+ /**
3149
+ * Second dimension value (optional)
3150
+ */
3151
+ second_dimension_value?: string | null;
3152
+ }
3153
+ }
3154
+ }
3155
+
3156
+ export interface NewFloatingScalableMatrixWithTieredPricingPrice {
2399
3157
  /**
2400
3158
  * The cadence to bill for this price on.
2401
3159
  */
2402
3160
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
2403
3161
 
2404
- cumulative_grouped_bulk_config: { [key: string]: unknown };
2405
-
2406
3162
  /**
2407
3163
  * An ISO 4217 currency string for which this price is billed in.
2408
3164
  */
@@ -2413,13 +3169,21 @@ export declare namespace PriceCreateParams {
2413
3169
  */
2414
3170
  item_id: string;
2415
3171
 
2416
- model_type: 'cumulative_grouped_bulk';
3172
+ /**
3173
+ * The pricing model type
3174
+ */
3175
+ model_type: 'scalable_matrix_with_tiered_pricing';
2417
3176
 
2418
3177
  /**
2419
3178
  * The name of the price.
2420
3179
  */
2421
3180
  name: string;
2422
3181
 
3182
+ /**
3183
+ * Configuration for scalable_matrix_with_tiered_pricing pricing
3184
+ */
3185
+ scalable_matrix_with_tiered_pricing_config: NewFloatingScalableMatrixWithTieredPricingPrice.ScalableMatrixWithTieredPricingConfig;
3186
+
2423
3187
  /**
2424
3188
  * The id of the billable metric for the price. Only needed if the price is
2425
3189
  * usage-based.
@@ -2483,25 +3247,95 @@ export declare namespace PriceCreateParams {
2483
3247
  metadata?: { [key: string]: string | null } | null;
2484
3248
  }
2485
3249
 
2486
- export interface NewFloatingGroupedWithMinMaxThresholdsPrice {
3250
+ export namespace NewFloatingScalableMatrixWithTieredPricingPrice {
3251
+ /**
3252
+ * Configuration for scalable_matrix_with_tiered_pricing pricing
3253
+ */
3254
+ export interface ScalableMatrixWithTieredPricingConfig {
3255
+ /**
3256
+ * Used for the scalable matrix first dimension
3257
+ */
3258
+ first_dimension: string;
3259
+
3260
+ /**
3261
+ * Apply a scaling factor to each dimension
3262
+ */
3263
+ matrix_scaling_factors: Array<ScalableMatrixWithTieredPricingConfig.MatrixScalingFactor>;
3264
+
3265
+ /**
3266
+ * Tier pricing structure
3267
+ */
3268
+ tiers: Array<ScalableMatrixWithTieredPricingConfig.Tier>;
3269
+
3270
+ /**
3271
+ * Used for the scalable matrix second dimension (optional)
3272
+ */
3273
+ second_dimension?: string | null;
3274
+ }
3275
+
3276
+ export namespace ScalableMatrixWithTieredPricingConfig {
3277
+ /**
3278
+ * Configuration for a single matrix scaling factor
3279
+ */
3280
+ export interface MatrixScalingFactor {
3281
+ /**
3282
+ * First dimension value
3283
+ */
3284
+ first_dimension_value: string;
3285
+
3286
+ /**
3287
+ * Scaling factor
3288
+ */
3289
+ scaling_factor: string;
3290
+
3291
+ /**
3292
+ * Second dimension value (optional)
3293
+ */
3294
+ second_dimension_value?: string | null;
3295
+ }
3296
+
3297
+ /**
3298
+ * Configuration for a single tier entry with business logic
3299
+ */
3300
+ export interface Tier {
3301
+ /**
3302
+ * Tier lower bound
3303
+ */
3304
+ tier_lower_bound: string;
3305
+
3306
+ /**
3307
+ * Per unit amount
3308
+ */
3309
+ unit_amount: string;
3310
+ }
3311
+ }
3312
+ }
3313
+
3314
+ export interface NewFloatingCumulativeGroupedBulkPrice {
2487
3315
  /**
2488
3316
  * The cadence to bill for this price on.
2489
3317
  */
2490
3318
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
2491
3319
 
3320
+ /**
3321
+ * Configuration for cumulative_grouped_bulk pricing
3322
+ */
3323
+ cumulative_grouped_bulk_config: NewFloatingCumulativeGroupedBulkPrice.CumulativeGroupedBulkConfig;
3324
+
2492
3325
  /**
2493
3326
  * An ISO 4217 currency string for which this price is billed in.
2494
3327
  */
2495
3328
  currency: string;
2496
3329
 
2497
- grouped_with_min_max_thresholds_config: { [key: string]: unknown };
2498
-
2499
3330
  /**
2500
3331
  * The id of the item the price will be associated with.
2501
3332
  */
2502
3333
  item_id: string;
2503
3334
 
2504
- model_type: 'grouped_with_min_max_thresholds';
3335
+ /**
3336
+ * The pricing model type
3337
+ */
3338
+ model_type: 'cumulative_grouped_bulk';
2505
3339
 
2506
3340
  /**
2507
3341
  * The name of the price.
@@ -2571,6 +3405,45 @@ export declare namespace PriceCreateParams {
2571
3405
  metadata?: { [key: string]: string | null } | null;
2572
3406
  }
2573
3407
 
3408
+ export namespace NewFloatingCumulativeGroupedBulkPrice {
3409
+ /**
3410
+ * Configuration for cumulative_grouped_bulk pricing
3411
+ */
3412
+ export interface CumulativeGroupedBulkConfig {
3413
+ /**
3414
+ * Each tier lower bound must have the same group of values.
3415
+ */
3416
+ dimension_values: Array<CumulativeGroupedBulkConfig.DimensionValue>;
3417
+
3418
+ /**
3419
+ * Grouping key name
3420
+ */
3421
+ group: string;
3422
+ }
3423
+
3424
+ export namespace CumulativeGroupedBulkConfig {
3425
+ /**
3426
+ * Configuration for a dimension value entry
3427
+ */
3428
+ export interface DimensionValue {
3429
+ /**
3430
+ * Grouping key value
3431
+ */
3432
+ grouping_key: string;
3433
+
3434
+ /**
3435
+ * Tier lower bound
3436
+ */
3437
+ tier_lower_bound: string;
3438
+
3439
+ /**
3440
+ * Unit amount for this combination
3441
+ */
3442
+ unit_amount: string;
3443
+ }
3444
+ }
3445
+ }
3446
+
2574
3447
  export interface NewFloatingMinimumCompositePrice {
2575
3448
  /**
2576
3449
  * The cadence to bill for this price on.
@@ -2587,8 +3460,14 @@ export declare namespace PriceCreateParams {
2587
3460
  */
2588
3461
  item_id: string;
2589
3462
 
3463
+ /**
3464
+ * Configuration for minimum pricing
3465
+ */
2590
3466
  minimum_config: NewFloatingMinimumCompositePrice.MinimumConfig;
2591
3467
 
3468
+ /**
3469
+ * The pricing model type
3470
+ */
2592
3471
  model_type: 'minimum';
2593
3472
 
2594
3473
  /**
@@ -2660,6 +3539,9 @@ export declare namespace PriceCreateParams {
2660
3539
  }
2661
3540
 
2662
3541
  export namespace NewFloatingMinimumCompositePrice {
3542
+ /**
3543
+ * Configuration for minimum pricing
3544
+ */
2663
3545
  export interface MinimumConfig {
2664
3546
  /**
2665
3547
  * The minimum amount to apply
@@ -2667,10 +3549,9 @@ export declare namespace PriceCreateParams {
2667
3549
  minimum_amount: string;
2668
3550
 
2669
3551
  /**
2670
- * By default, subtotals from minimum composite prices are prorated based on the
2671
- * service period. Set to false to disable proration.
3552
+ * If true, subtotals from this price are prorated based on the service period
2672
3553
  */
2673
- prorated?: boolean | null;
3554
+ prorated?: boolean;
2674
3555
  }
2675
3556
  }
2676
3557
  }
@@ -2771,36 +3652,35 @@ export namespace PriceEvaluateMultipleParams {
2771
3652
  grouping_keys?: Array<string>;
2772
3653
 
2773
3654
  /**
2774
- * An inline price definition to evaluate, allowing you to test price
2775
- * configurations before adding them to Orb.
3655
+ * New floating price request body params.
2776
3656
  */
2777
3657
  price?:
2778
3658
  | Shared.NewFloatingUnitPrice
2779
- | Shared.NewFloatingPackagePrice
2780
- | Shared.NewFloatingMatrixPrice
2781
- | Shared.NewFloatingMatrixWithAllocationPrice
2782
3659
  | Shared.NewFloatingTieredPrice
2783
3660
  | Shared.NewFloatingBulkPrice
3661
+ | Shared.NewFloatingPackagePrice
3662
+ | Shared.NewFloatingMatrixPrice
2784
3663
  | Shared.NewFloatingThresholdTotalAmountPrice
2785
3664
  | Shared.NewFloatingTieredPackagePrice
2786
- | Shared.NewFloatingGroupedTieredPrice
2787
- | Shared.NewFloatingMaxGroupTieredPackagePrice
2788
3665
  | Shared.NewFloatingTieredWithMinimumPrice
2789
- | Shared.NewFloatingPackageWithAllocationPrice
3666
+ | Shared.NewFloatingGroupedTieredPrice
2790
3667
  | Shared.NewFloatingTieredPackageWithMinimumPrice
3668
+ | Shared.NewFloatingPackageWithAllocationPrice
2791
3669
  | Shared.NewFloatingUnitWithPercentPrice
3670
+ | Shared.NewFloatingMatrixWithAllocationPrice
2792
3671
  | Shared.NewFloatingTieredWithProrationPrice
2793
3672
  | Shared.NewFloatingUnitWithProrationPrice
2794
3673
  | Shared.NewFloatingGroupedAllocationPrice
3674
+ | Shared.NewFloatingBulkWithProrationPrice
2795
3675
  | Shared.NewFloatingGroupedWithProratedMinimumPrice
2796
3676
  | Shared.NewFloatingGroupedWithMeteredMinimumPrice
3677
+ | PriceEvaluation.NewFloatingGroupedWithMinMaxThresholdsPrice
2797
3678
  | Shared.NewFloatingMatrixWithDisplayNamePrice
2798
- | Shared.NewFloatingBulkWithProrationPrice
2799
3679
  | Shared.NewFloatingGroupedTieredPackagePrice
3680
+ | Shared.NewFloatingMaxGroupTieredPackagePrice
2800
3681
  | Shared.NewFloatingScalableMatrixWithUnitPricingPrice
2801
3682
  | Shared.NewFloatingScalableMatrixWithTieredPricingPrice
2802
3683
  | Shared.NewFloatingCumulativeGroupedBulkPrice
2803
- | PriceEvaluation.NewFloatingGroupedWithMinMaxThresholdsPrice
2804
3684
  | Shared.NewFloatingMinimumCompositePrice
2805
3685
  | null;
2806
3686
 
@@ -2822,13 +3702,19 @@ export namespace PriceEvaluateMultipleParams {
2822
3702
  */
2823
3703
  currency: string;
2824
3704
 
2825
- grouped_with_min_max_thresholds_config: { [key: string]: unknown };
3705
+ /**
3706
+ * Configuration for grouped_with_min_max_thresholds pricing
3707
+ */
3708
+ grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
2826
3709
 
2827
3710
  /**
2828
3711
  * The id of the item the price will be associated with.
2829
3712
  */
2830
3713
  item_id: string;
2831
3714
 
3715
+ /**
3716
+ * The pricing model type
3717
+ */
2832
3718
  model_type: 'grouped_with_min_max_thresholds';
2833
3719
 
2834
3720
  /**
@@ -2898,6 +3784,33 @@ export namespace PriceEvaluateMultipleParams {
2898
3784
  */
2899
3785
  metadata?: { [key: string]: string | null } | null;
2900
3786
  }
3787
+
3788
+ export namespace NewFloatingGroupedWithMinMaxThresholdsPrice {
3789
+ /**
3790
+ * Configuration for grouped_with_min_max_thresholds pricing
3791
+ */
3792
+ export interface GroupedWithMinMaxThresholdsConfig {
3793
+ /**
3794
+ * The event property used to group before applying thresholds
3795
+ */
3796
+ grouping_key: string;
3797
+
3798
+ /**
3799
+ * The maximum amount to charge each group
3800
+ */
3801
+ maximum_charge: string;
3802
+
3803
+ /**
3804
+ * The minimum amount to charge each group, regardless of usage
3805
+ */
3806
+ minimum_charge: string;
3807
+
3808
+ /**
3809
+ * The base price charged per group
3810
+ */
3811
+ per_unit_rate: string;
3812
+ }
3813
+ }
2901
3814
  }
2902
3815
  }
2903
3816
 
@@ -2986,36 +3899,35 @@ export namespace PriceEvaluatePreviewEventsParams {
2986
3899
  grouping_keys?: Array<string>;
2987
3900
 
2988
3901
  /**
2989
- * An inline price definition to evaluate, allowing you to test price
2990
- * configurations before adding them to Orb.
3902
+ * New floating price request body params.
2991
3903
  */
2992
3904
  price?:
2993
3905
  | Shared.NewFloatingUnitPrice
2994
- | Shared.NewFloatingPackagePrice
2995
- | Shared.NewFloatingMatrixPrice
2996
- | Shared.NewFloatingMatrixWithAllocationPrice
2997
3906
  | Shared.NewFloatingTieredPrice
2998
3907
  | Shared.NewFloatingBulkPrice
3908
+ | Shared.NewFloatingPackagePrice
3909
+ | Shared.NewFloatingMatrixPrice
2999
3910
  | Shared.NewFloatingThresholdTotalAmountPrice
3000
3911
  | Shared.NewFloatingTieredPackagePrice
3001
- | Shared.NewFloatingGroupedTieredPrice
3002
- | Shared.NewFloatingMaxGroupTieredPackagePrice
3003
3912
  | Shared.NewFloatingTieredWithMinimumPrice
3004
- | Shared.NewFloatingPackageWithAllocationPrice
3913
+ | Shared.NewFloatingGroupedTieredPrice
3005
3914
  | Shared.NewFloatingTieredPackageWithMinimumPrice
3915
+ | Shared.NewFloatingPackageWithAllocationPrice
3006
3916
  | Shared.NewFloatingUnitWithPercentPrice
3917
+ | Shared.NewFloatingMatrixWithAllocationPrice
3007
3918
  | Shared.NewFloatingTieredWithProrationPrice
3008
3919
  | Shared.NewFloatingUnitWithProrationPrice
3009
3920
  | Shared.NewFloatingGroupedAllocationPrice
3921
+ | Shared.NewFloatingBulkWithProrationPrice
3010
3922
  | Shared.NewFloatingGroupedWithProratedMinimumPrice
3011
3923
  | Shared.NewFloatingGroupedWithMeteredMinimumPrice
3924
+ | PriceEvaluation.NewFloatingGroupedWithMinMaxThresholdsPrice
3012
3925
  | Shared.NewFloatingMatrixWithDisplayNamePrice
3013
- | Shared.NewFloatingBulkWithProrationPrice
3014
3926
  | Shared.NewFloatingGroupedTieredPackagePrice
3927
+ | Shared.NewFloatingMaxGroupTieredPackagePrice
3015
3928
  | Shared.NewFloatingScalableMatrixWithUnitPricingPrice
3016
3929
  | Shared.NewFloatingScalableMatrixWithTieredPricingPrice
3017
3930
  | Shared.NewFloatingCumulativeGroupedBulkPrice
3018
- | PriceEvaluation.NewFloatingGroupedWithMinMaxThresholdsPrice
3019
3931
  | Shared.NewFloatingMinimumCompositePrice
3020
3932
  | null;
3021
3933
 
@@ -3037,13 +3949,19 @@ export namespace PriceEvaluatePreviewEventsParams {
3037
3949
  */
3038
3950
  currency: string;
3039
3951
 
3040
- grouped_with_min_max_thresholds_config: { [key: string]: unknown };
3952
+ /**
3953
+ * Configuration for grouped_with_min_max_thresholds pricing
3954
+ */
3955
+ grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
3041
3956
 
3042
3957
  /**
3043
3958
  * The id of the item the price will be associated with.
3044
3959
  */
3045
3960
  item_id: string;
3046
3961
 
3962
+ /**
3963
+ * The pricing model type
3964
+ */
3047
3965
  model_type: 'grouped_with_min_max_thresholds';
3048
3966
 
3049
3967
  /**
@@ -3113,6 +4031,33 @@ export namespace PriceEvaluatePreviewEventsParams {
3113
4031
  */
3114
4032
  metadata?: { [key: string]: string | null } | null;
3115
4033
  }
4034
+
4035
+ export namespace NewFloatingGroupedWithMinMaxThresholdsPrice {
4036
+ /**
4037
+ * Configuration for grouped_with_min_max_thresholds pricing
4038
+ */
4039
+ export interface GroupedWithMinMaxThresholdsConfig {
4040
+ /**
4041
+ * The event property used to group before applying thresholds
4042
+ */
4043
+ grouping_key: string;
4044
+
4045
+ /**
4046
+ * The maximum amount to charge each group
4047
+ */
4048
+ maximum_charge: string;
4049
+
4050
+ /**
4051
+ * The minimum amount to charge each group, regardless of usage
4052
+ */
4053
+ minimum_charge: string;
4054
+
4055
+ /**
4056
+ * The base price charged per group
4057
+ */
4058
+ per_unit_rate: string;
4059
+ }
4060
+ }
3116
4061
  }
3117
4062
  }
3118
4063