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
@@ -190,7 +190,7 @@ export declare namespace PriceEvaluatePreviewEventsResponse {
190
190
  price_id?: string | null;
191
191
  }
192
192
  }
193
- export type PriceCreateParams = PriceCreateParams.NewFloatingUnitPrice | PriceCreateParams.NewFloatingPackagePrice | PriceCreateParams.NewFloatingMatrixPrice | PriceCreateParams.NewFloatingMatrixWithAllocationPrice | PriceCreateParams.NewFloatingTieredPrice | PriceCreateParams.NewFloatingBulkPrice | PriceCreateParams.NewFloatingThresholdTotalAmountPrice | PriceCreateParams.NewFloatingTieredPackagePrice | PriceCreateParams.NewFloatingGroupedTieredPrice | PriceCreateParams.NewFloatingMaxGroupTieredPackagePrice | PriceCreateParams.NewFloatingTieredWithMinimumPrice | PriceCreateParams.NewFloatingPackageWithAllocationPrice | PriceCreateParams.NewFloatingTieredPackageWithMinimumPrice | PriceCreateParams.NewFloatingUnitWithPercentPrice | PriceCreateParams.NewFloatingTieredWithProrationPrice | PriceCreateParams.NewFloatingUnitWithProrationPrice | PriceCreateParams.NewFloatingGroupedAllocationPrice | PriceCreateParams.NewFloatingGroupedWithProratedMinimumPrice | PriceCreateParams.NewFloatingGroupedWithMeteredMinimumPrice | PriceCreateParams.NewFloatingMatrixWithDisplayNamePrice | PriceCreateParams.NewFloatingBulkWithProrationPrice | PriceCreateParams.NewFloatingGroupedTieredPackagePrice | PriceCreateParams.NewFloatingScalableMatrixWithUnitPricingPrice | PriceCreateParams.NewFloatingScalableMatrixWithTieredPricingPrice | PriceCreateParams.NewFloatingCumulativeGroupedBulkPrice | PriceCreateParams.NewFloatingGroupedWithMinMaxThresholdsPrice | PriceCreateParams.NewFloatingMinimumCompositePrice;
193
+ export type PriceCreateParams = PriceCreateParams.NewFloatingUnitPrice | PriceCreateParams.NewFloatingTieredPrice | PriceCreateParams.NewFloatingBulkPrice | PriceCreateParams.NewFloatingPackagePrice | PriceCreateParams.NewFloatingMatrixPrice | PriceCreateParams.NewFloatingThresholdTotalAmountPrice | PriceCreateParams.NewFloatingTieredPackagePrice | PriceCreateParams.NewFloatingTieredWithMinimumPrice | PriceCreateParams.NewFloatingGroupedTieredPrice | PriceCreateParams.NewFloatingTieredPackageWithMinimumPrice | PriceCreateParams.NewFloatingPackageWithAllocationPrice | PriceCreateParams.NewFloatingUnitWithPercentPrice | PriceCreateParams.NewFloatingMatrixWithAllocationPrice | PriceCreateParams.NewFloatingTieredWithProrationPrice | PriceCreateParams.NewFloatingUnitWithProrationPrice | PriceCreateParams.NewFloatingGroupedAllocationPrice | PriceCreateParams.NewFloatingBulkWithProrationPrice | PriceCreateParams.NewFloatingGroupedWithProratedMinimumPrice | PriceCreateParams.NewFloatingGroupedWithMeteredMinimumPrice | PriceCreateParams.NewFloatingGroupedWithMinMaxThresholdsPrice | PriceCreateParams.NewFloatingMatrixWithDisplayNamePrice | PriceCreateParams.NewFloatingGroupedTieredPackagePrice | PriceCreateParams.NewFloatingMaxGroupTieredPackagePrice | PriceCreateParams.NewFloatingScalableMatrixWithUnitPricingPrice | PriceCreateParams.NewFloatingScalableMatrixWithTieredPricingPrice | PriceCreateParams.NewFloatingCumulativeGroupedBulkPrice | PriceCreateParams.NewFloatingMinimumCompositePrice;
194
194
  export declare namespace PriceCreateParams {
195
195
  interface NewFloatingUnitPrice {
196
196
  /**
@@ -205,11 +205,17 @@ export declare namespace PriceCreateParams {
205
205
  * The id of the item the price will be associated with.
206
206
  */
207
207
  item_id: string;
208
+ /**
209
+ * The pricing model type
210
+ */
208
211
  model_type: 'unit';
209
212
  /**
210
213
  * The name of the price.
211
214
  */
212
215
  name: string;
216
+ /**
217
+ * Configuration for unit pricing
218
+ */
213
219
  unit_config: Shared.UnitConfig;
214
220
  /**
215
221
  * The id of the billable metric for the price. Only needed if the price is
@@ -265,7 +271,7 @@ export declare namespace PriceCreateParams {
265
271
  [key: string]: string | null;
266
272
  } | null;
267
273
  }
268
- interface NewFloatingPackagePrice {
274
+ interface NewFloatingTieredPrice {
269
275
  /**
270
276
  * The cadence to bill for this price on.
271
277
  */
@@ -278,12 +284,18 @@ export declare namespace PriceCreateParams {
278
284
  * The id of the item the price will be associated with.
279
285
  */
280
286
  item_id: string;
281
- model_type: 'package';
287
+ /**
288
+ * The pricing model type
289
+ */
290
+ model_type: 'tiered';
282
291
  /**
283
292
  * The name of the price.
284
293
  */
285
294
  name: string;
286
- package_config: Shared.PackageConfig;
295
+ /**
296
+ * Configuration for tiered pricing
297
+ */
298
+ tiered_config: Shared.TieredConfig;
287
299
  /**
288
300
  * The id of the billable metric for the price. Only needed if the price is
289
301
  * usage-based.
@@ -338,7 +350,11 @@ export declare namespace PriceCreateParams {
338
350
  [key: string]: string | null;
339
351
  } | null;
340
352
  }
341
- interface NewFloatingMatrixPrice {
353
+ interface NewFloatingBulkPrice {
354
+ /**
355
+ * Configuration for bulk pricing
356
+ */
357
+ bulk_config: Shared.BulkConfig;
342
358
  /**
343
359
  * The cadence to bill for this price on.
344
360
  */
@@ -351,8 +367,10 @@ export declare namespace PriceCreateParams {
351
367
  * The id of the item the price will be associated with.
352
368
  */
353
369
  item_id: string;
354
- matrix_config: Shared.MatrixConfig;
355
- model_type: 'matrix';
370
+ /**
371
+ * The pricing model type
372
+ */
373
+ model_type: 'bulk';
356
374
  /**
357
375
  * The name of the price.
358
376
  */
@@ -411,7 +429,7 @@ export declare namespace PriceCreateParams {
411
429
  [key: string]: string | null;
412
430
  } | null;
413
431
  }
414
- interface NewFloatingMatrixWithAllocationPrice {
432
+ interface NewFloatingPackagePrice {
415
433
  /**
416
434
  * The cadence to bill for this price on.
417
435
  */
@@ -424,12 +442,18 @@ export declare namespace PriceCreateParams {
424
442
  * The id of the item the price will be associated with.
425
443
  */
426
444
  item_id: string;
427
- matrix_with_allocation_config: Shared.MatrixWithAllocationConfig;
428
- model_type: 'matrix_with_allocation';
445
+ /**
446
+ * The pricing model type
447
+ */
448
+ model_type: 'package';
429
449
  /**
430
450
  * The name of the price.
431
451
  */
432
452
  name: string;
453
+ /**
454
+ * Configuration for package pricing
455
+ */
456
+ package_config: Shared.PackageConfig;
433
457
  /**
434
458
  * The id of the billable metric for the price. Only needed if the price is
435
459
  * usage-based.
@@ -484,7 +508,7 @@ export declare namespace PriceCreateParams {
484
508
  [key: string]: string | null;
485
509
  } | null;
486
510
  }
487
- interface NewFloatingTieredPrice {
511
+ interface NewFloatingMatrixPrice {
488
512
  /**
489
513
  * The cadence to bill for this price on.
490
514
  */
@@ -497,12 +521,18 @@ export declare namespace PriceCreateParams {
497
521
  * The id of the item the price will be associated with.
498
522
  */
499
523
  item_id: string;
500
- model_type: 'tiered';
524
+ /**
525
+ * Configuration for matrix pricing
526
+ */
527
+ matrix_config: Shared.MatrixConfig;
528
+ /**
529
+ * The pricing model type
530
+ */
531
+ model_type: 'matrix';
501
532
  /**
502
533
  * The name of the price.
503
534
  */
504
535
  name: string;
505
- tiered_config: Shared.TieredConfig;
506
536
  /**
507
537
  * The id of the billable metric for the price. Only needed if the price is
508
538
  * usage-based.
@@ -557,8 +587,7 @@ export declare namespace PriceCreateParams {
557
587
  [key: string]: string | null;
558
588
  } | null;
559
589
  }
560
- interface NewFloatingBulkPrice {
561
- bulk_config: Shared.BulkConfig;
590
+ interface NewFloatingThresholdTotalAmountPrice {
562
591
  /**
563
592
  * The cadence to bill for this price on.
564
593
  */
@@ -571,11 +600,18 @@ export declare namespace PriceCreateParams {
571
600
  * The id of the item the price will be associated with.
572
601
  */
573
602
  item_id: string;
574
- model_type: 'bulk';
603
+ /**
604
+ * The pricing model type
605
+ */
606
+ model_type: 'threshold_total_amount';
575
607
  /**
576
608
  * The name of the price.
577
609
  */
578
610
  name: string;
611
+ /**
612
+ * Configuration for threshold_total_amount pricing
613
+ */
614
+ threshold_total_amount_config: NewFloatingThresholdTotalAmountPrice.ThresholdTotalAmountConfig;
579
615
  /**
580
616
  * The id of the billable metric for the price. Only needed if the price is
581
617
  * usage-based.
@@ -630,7 +666,38 @@ export declare namespace PriceCreateParams {
630
666
  [key: string]: string | null;
631
667
  } | null;
632
668
  }
633
- interface NewFloatingThresholdTotalAmountPrice {
669
+ namespace NewFloatingThresholdTotalAmountPrice {
670
+ /**
671
+ * Configuration for threshold_total_amount pricing
672
+ */
673
+ interface ThresholdTotalAmountConfig {
674
+ /**
675
+ * When the quantity consumed passes a provided threshold, the configured total
676
+ * will be charged
677
+ */
678
+ consumption_table: Array<ThresholdTotalAmountConfig.ConsumptionTable>;
679
+ /**
680
+ * If true, the unit price will be prorated to the billing period
681
+ */
682
+ prorate?: boolean | null;
683
+ }
684
+ namespace ThresholdTotalAmountConfig {
685
+ /**
686
+ * Configuration for a single threshold
687
+ */
688
+ interface ConsumptionTable {
689
+ /**
690
+ * Quantity threshold
691
+ */
692
+ threshold: string;
693
+ /**
694
+ * Total amount for this threshold
695
+ */
696
+ total_amount: string;
697
+ }
698
+ }
699
+ }
700
+ interface NewFloatingTieredPackagePrice {
634
701
  /**
635
702
  * The cadence to bill for this price on.
636
703
  */
@@ -643,14 +710,18 @@ export declare namespace PriceCreateParams {
643
710
  * The id of the item the price will be associated with.
644
711
  */
645
712
  item_id: string;
646
- model_type: 'threshold_total_amount';
713
+ /**
714
+ * The pricing model type
715
+ */
716
+ model_type: 'tiered_package';
647
717
  /**
648
718
  * The name of the price.
649
719
  */
650
720
  name: string;
651
- threshold_total_amount_config: {
652
- [key: string]: unknown;
653
- };
721
+ /**
722
+ * Configuration for tiered_package pricing
723
+ */
724
+ tiered_package_config: NewFloatingTieredPackagePrice.TieredPackageConfig;
654
725
  /**
655
726
  * The id of the billable metric for the price. Only needed if the price is
656
727
  * usage-based.
@@ -705,7 +776,38 @@ export declare namespace PriceCreateParams {
705
776
  [key: string]: string | null;
706
777
  } | null;
707
778
  }
708
- interface NewFloatingTieredPackagePrice {
779
+ namespace NewFloatingTieredPackagePrice {
780
+ /**
781
+ * Configuration for tiered_package pricing
782
+ */
783
+ interface TieredPackageConfig {
784
+ /**
785
+ * Package size
786
+ */
787
+ package_size: string;
788
+ /**
789
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
790
+ * are defined using exclusive lower bounds.
791
+ */
792
+ tiers: Array<TieredPackageConfig.Tier>;
793
+ }
794
+ namespace TieredPackageConfig {
795
+ /**
796
+ * Configuration for a single tier with business logic
797
+ */
798
+ interface Tier {
799
+ /**
800
+ * Price per package
801
+ */
802
+ per_unit: string;
803
+ /**
804
+ * Tier lower bound
805
+ */
806
+ tier_lower_bound: string;
807
+ }
808
+ }
809
+ }
810
+ interface NewFloatingTieredWithMinimumPrice {
709
811
  /**
710
812
  * The cadence to bill for this price on.
711
813
  */
@@ -718,14 +820,18 @@ export declare namespace PriceCreateParams {
718
820
  * The id of the item the price will be associated with.
719
821
  */
720
822
  item_id: string;
721
- model_type: 'tiered_package';
823
+ /**
824
+ * The pricing model type
825
+ */
826
+ model_type: 'tiered_with_minimum';
722
827
  /**
723
828
  * The name of the price.
724
829
  */
725
830
  name: string;
726
- tiered_package_config: {
727
- [key: string]: unknown;
728
- };
831
+ /**
832
+ * Configuration for tiered_with_minimum pricing
833
+ */
834
+ tiered_with_minimum_config: NewFloatingTieredWithMinimumPrice.TieredWithMinimumConfig;
729
835
  /**
730
836
  * The id of the billable metric for the price. Only needed if the price is
731
837
  * usage-based.
@@ -780,6 +886,45 @@ export declare namespace PriceCreateParams {
780
886
  [key: string]: string | null;
781
887
  } | null;
782
888
  }
889
+ namespace NewFloatingTieredWithMinimumPrice {
890
+ /**
891
+ * Configuration for tiered_with_minimum pricing
892
+ */
893
+ interface TieredWithMinimumConfig {
894
+ /**
895
+ * Tiered pricing with a minimum amount dependent on the volume tier. Tiers are
896
+ * defined using exclusive lower bounds.
897
+ */
898
+ tiers: Array<TieredWithMinimumConfig.Tier>;
899
+ /**
900
+ * If true, tiers with an accrued amount of 0 will not be included in the rating.
901
+ */
902
+ hide_zero_amount_tiers?: boolean;
903
+ /**
904
+ * If true, the unit price will be prorated to the billing period
905
+ */
906
+ prorate?: boolean;
907
+ }
908
+ namespace TieredWithMinimumConfig {
909
+ /**
910
+ * Configuration for a single tier
911
+ */
912
+ interface Tier {
913
+ /**
914
+ * Minimum amount
915
+ */
916
+ minimum_amount: string;
917
+ /**
918
+ * Tier lower bound
919
+ */
920
+ tier_lower_bound: string;
921
+ /**
922
+ * Per unit amount
923
+ */
924
+ unit_amount: string;
925
+ }
926
+ }
927
+ }
783
928
  interface NewFloatingGroupedTieredPrice {
784
929
  /**
785
930
  * The cadence to bill for this price on.
@@ -789,13 +934,17 @@ export declare namespace PriceCreateParams {
789
934
  * An ISO 4217 currency string for which this price is billed in.
790
935
  */
791
936
  currency: string;
792
- grouped_tiered_config: {
793
- [key: string]: unknown;
794
- };
937
+ /**
938
+ * Configuration for grouped_tiered pricing
939
+ */
940
+ grouped_tiered_config: NewFloatingGroupedTieredPrice.GroupedTieredConfig;
795
941
  /**
796
942
  * The id of the item the price will be associated with.
797
943
  */
798
944
  item_id: string;
945
+ /**
946
+ * The pricing model type
947
+ */
799
948
  model_type: 'grouped_tiered';
800
949
  /**
801
950
  * The name of the price.
@@ -855,7 +1004,38 @@ export declare namespace PriceCreateParams {
855
1004
  [key: string]: string | null;
856
1005
  } | null;
857
1006
  }
858
- interface NewFloatingMaxGroupTieredPackagePrice {
1007
+ namespace NewFloatingGroupedTieredPrice {
1008
+ /**
1009
+ * Configuration for grouped_tiered pricing
1010
+ */
1011
+ interface GroupedTieredConfig {
1012
+ /**
1013
+ * The billable metric property used to group before tiering
1014
+ */
1015
+ grouping_key: string;
1016
+ /**
1017
+ * Apply tiered pricing to each segment generated after grouping with the provided
1018
+ * key
1019
+ */
1020
+ tiers: Array<GroupedTieredConfig.Tier>;
1021
+ }
1022
+ namespace GroupedTieredConfig {
1023
+ /**
1024
+ * Configuration for a single tier
1025
+ */
1026
+ interface Tier {
1027
+ /**
1028
+ * Tier lower bound
1029
+ */
1030
+ tier_lower_bound: string;
1031
+ /**
1032
+ * Per unit amount
1033
+ */
1034
+ unit_amount: string;
1035
+ }
1036
+ }
1037
+ }
1038
+ interface NewFloatingTieredPackageWithMinimumPrice {
859
1039
  /**
860
1040
  * The cadence to bill for this price on.
861
1041
  */
@@ -868,14 +1048,18 @@ export declare namespace PriceCreateParams {
868
1048
  * The id of the item the price will be associated with.
869
1049
  */
870
1050
  item_id: string;
871
- max_group_tiered_package_config: {
872
- [key: string]: unknown;
873
- };
874
- model_type: 'max_group_tiered_package';
1051
+ /**
1052
+ * The pricing model type
1053
+ */
1054
+ model_type: 'tiered_package_with_minimum';
875
1055
  /**
876
1056
  * The name of the price.
877
1057
  */
878
1058
  name: string;
1059
+ /**
1060
+ * Configuration for tiered_package_with_minimum pricing
1061
+ */
1062
+ tiered_package_with_minimum_config: NewFloatingTieredPackageWithMinimumPrice.TieredPackageWithMinimumConfig;
879
1063
  /**
880
1064
  * The id of the billable metric for the price. Only needed if the price is
881
1065
  * usage-based.
@@ -930,7 +1114,42 @@ export declare namespace PriceCreateParams {
930
1114
  [key: string]: string | null;
931
1115
  } | null;
932
1116
  }
933
- interface NewFloatingTieredWithMinimumPrice {
1117
+ namespace NewFloatingTieredPackageWithMinimumPrice {
1118
+ /**
1119
+ * Configuration for tiered_package_with_minimum pricing
1120
+ */
1121
+ interface TieredPackageWithMinimumConfig {
1122
+ /**
1123
+ * Package size
1124
+ */
1125
+ package_size: number;
1126
+ /**
1127
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
1128
+ * are defined using exclusive lower bounds.
1129
+ */
1130
+ tiers: Array<TieredPackageWithMinimumConfig.Tier>;
1131
+ }
1132
+ namespace TieredPackageWithMinimumConfig {
1133
+ /**
1134
+ * Configuration for a single tier
1135
+ */
1136
+ interface Tier {
1137
+ /**
1138
+ * Minimum amount
1139
+ */
1140
+ minimum_amount: string;
1141
+ /**
1142
+ * Price per package
1143
+ */
1144
+ per_unit: string;
1145
+ /**
1146
+ * Tier lower bound
1147
+ */
1148
+ tier_lower_bound: string;
1149
+ }
1150
+ }
1151
+ }
1152
+ interface NewFloatingPackageWithAllocationPrice {
934
1153
  /**
935
1154
  * The cadence to bill for this price on.
936
1155
  */
@@ -943,14 +1162,18 @@ export declare namespace PriceCreateParams {
943
1162
  * The id of the item the price will be associated with.
944
1163
  */
945
1164
  item_id: string;
946
- model_type: 'tiered_with_minimum';
1165
+ /**
1166
+ * The pricing model type
1167
+ */
1168
+ model_type: 'package_with_allocation';
947
1169
  /**
948
1170
  * The name of the price.
949
1171
  */
950
1172
  name: string;
951
- tiered_with_minimum_config: {
952
- [key: string]: unknown;
953
- };
1173
+ /**
1174
+ * Configuration for package_with_allocation pricing
1175
+ */
1176
+ package_with_allocation_config: NewFloatingPackageWithAllocationPrice.PackageWithAllocationConfig;
954
1177
  /**
955
1178
  * The id of the billable metric for the price. Only needed if the price is
956
1179
  * usage-based.
@@ -1005,7 +1228,26 @@ export declare namespace PriceCreateParams {
1005
1228
  [key: string]: string | null;
1006
1229
  } | null;
1007
1230
  }
1008
- interface NewFloatingPackageWithAllocationPrice {
1231
+ namespace NewFloatingPackageWithAllocationPrice {
1232
+ /**
1233
+ * Configuration for package_with_allocation pricing
1234
+ */
1235
+ interface PackageWithAllocationConfig {
1236
+ /**
1237
+ * Usage allocation
1238
+ */
1239
+ allocation: string;
1240
+ /**
1241
+ * Price per package
1242
+ */
1243
+ package_amount: string;
1244
+ /**
1245
+ * Package size
1246
+ */
1247
+ package_size: string;
1248
+ }
1249
+ }
1250
+ interface NewFloatingUnitWithPercentPrice {
1009
1251
  /**
1010
1252
  * The cadence to bill for this price on.
1011
1253
  */
@@ -1018,14 +1260,18 @@ export declare namespace PriceCreateParams {
1018
1260
  * The id of the item the price will be associated with.
1019
1261
  */
1020
1262
  item_id: string;
1021
- model_type: 'package_with_allocation';
1263
+ /**
1264
+ * The pricing model type
1265
+ */
1266
+ model_type: 'unit_with_percent';
1022
1267
  /**
1023
1268
  * The name of the price.
1024
1269
  */
1025
1270
  name: string;
1026
- package_with_allocation_config: {
1027
- [key: string]: unknown;
1028
- };
1271
+ /**
1272
+ * Configuration for unit_with_percent pricing
1273
+ */
1274
+ unit_with_percent_config: NewFloatingUnitWithPercentPrice.UnitWithPercentConfig;
1029
1275
  /**
1030
1276
  * The id of the billable metric for the price. Only needed if the price is
1031
1277
  * usage-based.
@@ -1080,7 +1326,22 @@ export declare namespace PriceCreateParams {
1080
1326
  [key: string]: string | null;
1081
1327
  } | null;
1082
1328
  }
1083
- interface NewFloatingTieredPackageWithMinimumPrice {
1329
+ namespace NewFloatingUnitWithPercentPrice {
1330
+ /**
1331
+ * Configuration for unit_with_percent pricing
1332
+ */
1333
+ interface UnitWithPercentConfig {
1334
+ /**
1335
+ * What percent, out of 100, of the calculated total to charge
1336
+ */
1337
+ percent: string;
1338
+ /**
1339
+ * Rate per unit of usage
1340
+ */
1341
+ unit_amount: string;
1342
+ }
1343
+ }
1344
+ interface NewFloatingMatrixWithAllocationPrice {
1084
1345
  /**
1085
1346
  * The cadence to bill for this price on.
1086
1347
  */
@@ -1093,14 +1354,18 @@ export declare namespace PriceCreateParams {
1093
1354
  * The id of the item the price will be associated with.
1094
1355
  */
1095
1356
  item_id: string;
1096
- model_type: 'tiered_package_with_minimum';
1357
+ /**
1358
+ * Configuration for matrix_with_allocation pricing
1359
+ */
1360
+ matrix_with_allocation_config: Shared.MatrixWithAllocationConfig;
1361
+ /**
1362
+ * The pricing model type
1363
+ */
1364
+ model_type: 'matrix_with_allocation';
1097
1365
  /**
1098
1366
  * The name of the price.
1099
1367
  */
1100
1368
  name: string;
1101
- tiered_package_with_minimum_config: {
1102
- [key: string]: unknown;
1103
- };
1104
1369
  /**
1105
1370
  * The id of the billable metric for the price. Only needed if the price is
1106
1371
  * usage-based.
@@ -1155,7 +1420,7 @@ export declare namespace PriceCreateParams {
1155
1420
  [key: string]: string | null;
1156
1421
  } | null;
1157
1422
  }
1158
- interface NewFloatingUnitWithPercentPrice {
1423
+ interface NewFloatingTieredWithProrationPrice {
1159
1424
  /**
1160
1425
  * The cadence to bill for this price on.
1161
1426
  */
@@ -1168,14 +1433,18 @@ export declare namespace PriceCreateParams {
1168
1433
  * The id of the item the price will be associated with.
1169
1434
  */
1170
1435
  item_id: string;
1171
- model_type: 'unit_with_percent';
1436
+ /**
1437
+ * The pricing model type
1438
+ */
1439
+ model_type: 'tiered_with_proration';
1172
1440
  /**
1173
1441
  * The name of the price.
1174
1442
  */
1175
1443
  name: string;
1176
- unit_with_percent_config: {
1177
- [key: string]: unknown;
1178
- };
1444
+ /**
1445
+ * Configuration for tiered_with_proration pricing
1446
+ */
1447
+ tiered_with_proration_config: NewFloatingTieredWithProrationPrice.TieredWithProrationConfig;
1179
1448
  /**
1180
1449
  * The id of the billable metric for the price. Only needed if the price is
1181
1450
  * usage-based.
@@ -1230,7 +1499,34 @@ export declare namespace PriceCreateParams {
1230
1499
  [key: string]: string | null;
1231
1500
  } | null;
1232
1501
  }
1233
- interface NewFloatingTieredWithProrationPrice {
1502
+ namespace NewFloatingTieredWithProrationPrice {
1503
+ /**
1504
+ * Configuration for tiered_with_proration pricing
1505
+ */
1506
+ interface TieredWithProrationConfig {
1507
+ /**
1508
+ * Tiers for rating based on total usage quantities into the specified tier with
1509
+ * proration
1510
+ */
1511
+ tiers: Array<TieredWithProrationConfig.Tier>;
1512
+ }
1513
+ namespace TieredWithProrationConfig {
1514
+ /**
1515
+ * Configuration for a single tiered with proration tier
1516
+ */
1517
+ interface Tier {
1518
+ /**
1519
+ * Inclusive tier starting value
1520
+ */
1521
+ tier_lower_bound: string;
1522
+ /**
1523
+ * Amount per unit
1524
+ */
1525
+ unit_amount: string;
1526
+ }
1527
+ }
1528
+ }
1529
+ interface NewFloatingUnitWithProrationPrice {
1234
1530
  /**
1235
1531
  * The cadence to bill for this price on.
1236
1532
  */
@@ -1243,14 +1539,18 @@ export declare namespace PriceCreateParams {
1243
1539
  * The id of the item the price will be associated with.
1244
1540
  */
1245
1541
  item_id: string;
1246
- model_type: 'tiered_with_proration';
1542
+ /**
1543
+ * The pricing model type
1544
+ */
1545
+ model_type: 'unit_with_proration';
1247
1546
  /**
1248
1547
  * The name of the price.
1249
1548
  */
1250
1549
  name: string;
1251
- tiered_with_proration_config: {
1252
- [key: string]: unknown;
1253
- };
1550
+ /**
1551
+ * Configuration for unit_with_proration pricing
1552
+ */
1553
+ unit_with_proration_config: NewFloatingUnitWithProrationPrice.UnitWithProrationConfig;
1254
1554
  /**
1255
1555
  * The id of the billable metric for the price. Only needed if the price is
1256
1556
  * usage-based.
@@ -1305,7 +1605,18 @@ export declare namespace PriceCreateParams {
1305
1605
  [key: string]: string | null;
1306
1606
  } | null;
1307
1607
  }
1308
- interface NewFloatingUnitWithProrationPrice {
1608
+ namespace NewFloatingUnitWithProrationPrice {
1609
+ /**
1610
+ * Configuration for unit_with_proration pricing
1611
+ */
1612
+ interface UnitWithProrationConfig {
1613
+ /**
1614
+ * Rate per unit of usage
1615
+ */
1616
+ unit_amount: string;
1617
+ }
1618
+ }
1619
+ interface NewFloatingGroupedAllocationPrice {
1309
1620
  /**
1310
1621
  * The cadence to bill for this price on.
1311
1622
  */
@@ -1314,18 +1625,22 @@ export declare namespace PriceCreateParams {
1314
1625
  * An ISO 4217 currency string for which this price is billed in.
1315
1626
  */
1316
1627
  currency: string;
1628
+ /**
1629
+ * Configuration for grouped_allocation pricing
1630
+ */
1631
+ grouped_allocation_config: NewFloatingGroupedAllocationPrice.GroupedAllocationConfig;
1317
1632
  /**
1318
1633
  * The id of the item the price will be associated with.
1319
1634
  */
1320
1635
  item_id: string;
1321
- model_type: 'unit_with_proration';
1636
+ /**
1637
+ * The pricing model type
1638
+ */
1639
+ model_type: 'grouped_allocation';
1322
1640
  /**
1323
1641
  * The name of the price.
1324
1642
  */
1325
1643
  name: string;
1326
- unit_with_proration_config: {
1327
- [key: string]: unknown;
1328
- };
1329
1644
  /**
1330
1645
  * The id of the billable metric for the price. Only needed if the price is
1331
1646
  * usage-based.
@@ -1380,7 +1695,30 @@ export declare namespace PriceCreateParams {
1380
1695
  [key: string]: string | null;
1381
1696
  } | null;
1382
1697
  }
1383
- interface NewFloatingGroupedAllocationPrice {
1698
+ namespace NewFloatingGroupedAllocationPrice {
1699
+ /**
1700
+ * Configuration for grouped_allocation pricing
1701
+ */
1702
+ interface GroupedAllocationConfig {
1703
+ /**
1704
+ * Usage allocation per group
1705
+ */
1706
+ allocation: string;
1707
+ /**
1708
+ * How to determine the groups that should each be allocated some quantity
1709
+ */
1710
+ grouping_key: string;
1711
+ /**
1712
+ * Unit rate for post-allocation
1713
+ */
1714
+ overage_unit_rate: string;
1715
+ }
1716
+ }
1717
+ interface NewFloatingBulkWithProrationPrice {
1718
+ /**
1719
+ * Configuration for bulk_with_proration pricing
1720
+ */
1721
+ bulk_with_proration_config: NewFloatingBulkWithProrationPrice.BulkWithProrationConfig;
1384
1722
  /**
1385
1723
  * The cadence to bill for this price on.
1386
1724
  */
@@ -1389,14 +1727,14 @@ export declare namespace PriceCreateParams {
1389
1727
  * An ISO 4217 currency string for which this price is billed in.
1390
1728
  */
1391
1729
  currency: string;
1392
- grouped_allocation_config: {
1393
- [key: string]: unknown;
1394
- };
1395
1730
  /**
1396
1731
  * The id of the item the price will be associated with.
1397
1732
  */
1398
1733
  item_id: string;
1399
- model_type: 'grouped_allocation';
1734
+ /**
1735
+ * The pricing model type
1736
+ */
1737
+ model_type: 'bulk_with_proration';
1400
1738
  /**
1401
1739
  * The name of the price.
1402
1740
  */
@@ -1455,6 +1793,32 @@ export declare namespace PriceCreateParams {
1455
1793
  [key: string]: string | null;
1456
1794
  } | null;
1457
1795
  }
1796
+ namespace NewFloatingBulkWithProrationPrice {
1797
+ /**
1798
+ * Configuration for bulk_with_proration pricing
1799
+ */
1800
+ interface BulkWithProrationConfig {
1801
+ /**
1802
+ * Bulk tiers for rating based on total usage volume
1803
+ */
1804
+ tiers: Array<BulkWithProrationConfig.Tier>;
1805
+ }
1806
+ namespace BulkWithProrationConfig {
1807
+ /**
1808
+ * Configuration for a single bulk pricing tier with proration
1809
+ */
1810
+ interface Tier {
1811
+ /**
1812
+ * Cost per unit
1813
+ */
1814
+ unit_amount: string;
1815
+ /**
1816
+ * The lower bound for this tier
1817
+ */
1818
+ tier_lower_bound?: string | null;
1819
+ }
1820
+ }
1821
+ }
1458
1822
  interface NewFloatingGroupedWithProratedMinimumPrice {
1459
1823
  /**
1460
1824
  * The cadence to bill for this price on.
@@ -1464,13 +1828,17 @@ export declare namespace PriceCreateParams {
1464
1828
  * An ISO 4217 currency string for which this price is billed in.
1465
1829
  */
1466
1830
  currency: string;
1467
- grouped_with_prorated_minimum_config: {
1468
- [key: string]: unknown;
1469
- };
1831
+ /**
1832
+ * Configuration for grouped_with_prorated_minimum pricing
1833
+ */
1834
+ grouped_with_prorated_minimum_config: NewFloatingGroupedWithProratedMinimumPrice.GroupedWithProratedMinimumConfig;
1470
1835
  /**
1471
1836
  * The id of the item the price will be associated with.
1472
1837
  */
1473
1838
  item_id: string;
1839
+ /**
1840
+ * The pricing model type
1841
+ */
1474
1842
  model_type: 'grouped_with_prorated_minimum';
1475
1843
  /**
1476
1844
  * The name of the price.
@@ -1530,6 +1898,25 @@ export declare namespace PriceCreateParams {
1530
1898
  [key: string]: string | null;
1531
1899
  } | null;
1532
1900
  }
1901
+ namespace NewFloatingGroupedWithProratedMinimumPrice {
1902
+ /**
1903
+ * Configuration for grouped_with_prorated_minimum pricing
1904
+ */
1905
+ interface GroupedWithProratedMinimumConfig {
1906
+ /**
1907
+ * How to determine the groups that should each have a minimum
1908
+ */
1909
+ grouping_key: string;
1910
+ /**
1911
+ * The minimum amount to charge per group
1912
+ */
1913
+ minimum: string;
1914
+ /**
1915
+ * The amount to charge per unit
1916
+ */
1917
+ unit_rate: string;
1918
+ }
1919
+ }
1533
1920
  interface NewFloatingGroupedWithMeteredMinimumPrice {
1534
1921
  /**
1535
1922
  * The cadence to bill for this price on.
@@ -1539,13 +1926,17 @@ export declare namespace PriceCreateParams {
1539
1926
  * An ISO 4217 currency string for which this price is billed in.
1540
1927
  */
1541
1928
  currency: string;
1542
- grouped_with_metered_minimum_config: {
1543
- [key: string]: unknown;
1544
- };
1929
+ /**
1930
+ * Configuration for grouped_with_metered_minimum pricing
1931
+ */
1932
+ grouped_with_metered_minimum_config: NewFloatingGroupedWithMeteredMinimumPrice.GroupedWithMeteredMinimumConfig;
1545
1933
  /**
1546
1934
  * The id of the item the price will be associated with.
1547
1935
  */
1548
1936
  item_id: string;
1937
+ /**
1938
+ * The pricing model type
1939
+ */
1549
1940
  model_type: 'grouped_with_metered_minimum';
1550
1941
  /**
1551
1942
  * The name of the price.
@@ -1605,7 +1996,68 @@ export declare namespace PriceCreateParams {
1605
1996
  [key: string]: string | null;
1606
1997
  } | null;
1607
1998
  }
1608
- interface NewFloatingMatrixWithDisplayNamePrice {
1999
+ namespace NewFloatingGroupedWithMeteredMinimumPrice {
2000
+ /**
2001
+ * Configuration for grouped_with_metered_minimum pricing
2002
+ */
2003
+ interface GroupedWithMeteredMinimumConfig {
2004
+ /**
2005
+ * Used to partition the usage into groups. The minimum amount is applied to each
2006
+ * group.
2007
+ */
2008
+ grouping_key: string;
2009
+ /**
2010
+ * The minimum amount to charge per group per unit
2011
+ */
2012
+ minimum_unit_amount: string;
2013
+ /**
2014
+ * Used to determine the unit rate
2015
+ */
2016
+ pricing_key: string;
2017
+ /**
2018
+ * Scale the unit rates by the scaling factor.
2019
+ */
2020
+ scaling_factors: Array<GroupedWithMeteredMinimumConfig.ScalingFactor>;
2021
+ /**
2022
+ * Used to determine the unit rate scaling factor
2023
+ */
2024
+ scaling_key: string;
2025
+ /**
2026
+ * Apply per unit pricing to each pricing value. The minimum amount is applied any
2027
+ * unmatched usage.
2028
+ */
2029
+ unit_amounts: Array<GroupedWithMeteredMinimumConfig.UnitAmount>;
2030
+ }
2031
+ namespace GroupedWithMeteredMinimumConfig {
2032
+ /**
2033
+ * Configuration for a scaling factor
2034
+ */
2035
+ interface ScalingFactor {
2036
+ /**
2037
+ * Scaling factor
2038
+ */
2039
+ scaling_factor: string;
2040
+ /**
2041
+ * Scaling value
2042
+ */
2043
+ scaling_value: string;
2044
+ }
2045
+ /**
2046
+ * Configuration for a unit amount
2047
+ */
2048
+ interface UnitAmount {
2049
+ /**
2050
+ * Pricing value
2051
+ */
2052
+ pricing_value: string;
2053
+ /**
2054
+ * Per unit amount
2055
+ */
2056
+ unit_amount: string;
2057
+ }
2058
+ }
2059
+ }
2060
+ interface NewFloatingGroupedWithMinMaxThresholdsPrice {
1609
2061
  /**
1610
2062
  * The cadence to bill for this price on.
1611
2063
  */
@@ -1614,14 +2066,18 @@ export declare namespace PriceCreateParams {
1614
2066
  * An ISO 4217 currency string for which this price is billed in.
1615
2067
  */
1616
2068
  currency: string;
2069
+ /**
2070
+ * Configuration for grouped_with_min_max_thresholds pricing
2071
+ */
2072
+ grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
1617
2073
  /**
1618
2074
  * The id of the item the price will be associated with.
1619
2075
  */
1620
2076
  item_id: string;
1621
- matrix_with_display_name_config: {
1622
- [key: string]: unknown;
1623
- };
1624
- model_type: 'matrix_with_display_name';
2077
+ /**
2078
+ * The pricing model type
2079
+ */
2080
+ model_type: 'grouped_with_min_max_thresholds';
1625
2081
  /**
1626
2082
  * The name of the price.
1627
2083
  */
@@ -1680,10 +2136,30 @@ export declare namespace PriceCreateParams {
1680
2136
  [key: string]: string | null;
1681
2137
  } | null;
1682
2138
  }
1683
- interface NewFloatingBulkWithProrationPrice {
1684
- bulk_with_proration_config: {
1685
- [key: string]: unknown;
1686
- };
2139
+ namespace NewFloatingGroupedWithMinMaxThresholdsPrice {
2140
+ /**
2141
+ * Configuration for grouped_with_min_max_thresholds pricing
2142
+ */
2143
+ interface GroupedWithMinMaxThresholdsConfig {
2144
+ /**
2145
+ * The event property used to group before applying thresholds
2146
+ */
2147
+ grouping_key: string;
2148
+ /**
2149
+ * The maximum amount to charge each group
2150
+ */
2151
+ maximum_charge: string;
2152
+ /**
2153
+ * The minimum amount to charge each group, regardless of usage
2154
+ */
2155
+ minimum_charge: string;
2156
+ /**
2157
+ * The base price charged per group
2158
+ */
2159
+ per_unit_rate: string;
2160
+ }
2161
+ }
2162
+ interface NewFloatingMatrixWithDisplayNamePrice {
1687
2163
  /**
1688
2164
  * The cadence to bill for this price on.
1689
2165
  */
@@ -1696,7 +2172,14 @@ export declare namespace PriceCreateParams {
1696
2172
  * The id of the item the price will be associated with.
1697
2173
  */
1698
2174
  item_id: string;
1699
- model_type: 'bulk_with_proration';
2175
+ /**
2176
+ * Configuration for matrix_with_display_name pricing
2177
+ */
2178
+ matrix_with_display_name_config: NewFloatingMatrixWithDisplayNamePrice.MatrixWithDisplayNameConfig;
2179
+ /**
2180
+ * The pricing model type
2181
+ */
2182
+ model_type: 'matrix_with_display_name';
1700
2183
  /**
1701
2184
  * The name of the price.
1702
2185
  */
@@ -1755,6 +2238,40 @@ export declare namespace PriceCreateParams {
1755
2238
  [key: string]: string | null;
1756
2239
  } | null;
1757
2240
  }
2241
+ namespace NewFloatingMatrixWithDisplayNamePrice {
2242
+ /**
2243
+ * Configuration for matrix_with_display_name pricing
2244
+ */
2245
+ interface MatrixWithDisplayNameConfig {
2246
+ /**
2247
+ * Used to determine the unit rate
2248
+ */
2249
+ dimension: string;
2250
+ /**
2251
+ * Apply per unit pricing to each dimension value
2252
+ */
2253
+ unit_amounts: Array<MatrixWithDisplayNameConfig.UnitAmount>;
2254
+ }
2255
+ namespace MatrixWithDisplayNameConfig {
2256
+ /**
2257
+ * Configuration for a unit amount item
2258
+ */
2259
+ interface UnitAmount {
2260
+ /**
2261
+ * The dimension value
2262
+ */
2263
+ dimension_value: string;
2264
+ /**
2265
+ * Display name for this dimension value
2266
+ */
2267
+ display_name: string;
2268
+ /**
2269
+ * Per unit amount
2270
+ */
2271
+ unit_amount: string;
2272
+ }
2273
+ }
2274
+ }
1758
2275
  interface NewFloatingGroupedTieredPackagePrice {
1759
2276
  /**
1760
2277
  * The cadence to bill for this price on.
@@ -1764,13 +2281,17 @@ export declare namespace PriceCreateParams {
1764
2281
  * An ISO 4217 currency string for which this price is billed in.
1765
2282
  */
1766
2283
  currency: string;
1767
- grouped_tiered_package_config: {
1768
- [key: string]: unknown;
1769
- };
2284
+ /**
2285
+ * Configuration for grouped_tiered_package pricing
2286
+ */
2287
+ grouped_tiered_package_config: NewFloatingGroupedTieredPackagePrice.GroupedTieredPackageConfig;
1770
2288
  /**
1771
2289
  * The id of the item the price will be associated with.
1772
2290
  */
1773
2291
  item_id: string;
2292
+ /**
2293
+ * The pricing model type
2294
+ */
1774
2295
  model_type: 'grouped_tiered_package';
1775
2296
  /**
1776
2297
  * The name of the price.
@@ -1830,7 +2351,42 @@ export declare namespace PriceCreateParams {
1830
2351
  [key: string]: string | null;
1831
2352
  } | null;
1832
2353
  }
1833
- interface NewFloatingScalableMatrixWithUnitPricingPrice {
2354
+ namespace NewFloatingGroupedTieredPackagePrice {
2355
+ /**
2356
+ * Configuration for grouped_tiered_package pricing
2357
+ */
2358
+ interface GroupedTieredPackageConfig {
2359
+ /**
2360
+ * The event property used to group before tiering
2361
+ */
2362
+ grouping_key: string;
2363
+ /**
2364
+ * Package size
2365
+ */
2366
+ package_size: string;
2367
+ /**
2368
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
2369
+ * are defined using exclusive lower bounds.
2370
+ */
2371
+ tiers: Array<GroupedTieredPackageConfig.Tier>;
2372
+ }
2373
+ namespace GroupedTieredPackageConfig {
2374
+ /**
2375
+ * Configuration for a single tier
2376
+ */
2377
+ interface Tier {
2378
+ /**
2379
+ * Price per package
2380
+ */
2381
+ per_unit: string;
2382
+ /**
2383
+ * Tier lower bound
2384
+ */
2385
+ tier_lower_bound: string;
2386
+ }
2387
+ }
2388
+ }
2389
+ interface NewFloatingMaxGroupTieredPackagePrice {
1834
2390
  /**
1835
2391
  * The cadence to bill for this price on.
1836
2392
  */
@@ -1843,14 +2399,18 @@ export declare namespace PriceCreateParams {
1843
2399
  * The id of the item the price will be associated with.
1844
2400
  */
1845
2401
  item_id: string;
1846
- model_type: 'scalable_matrix_with_unit_pricing';
2402
+ /**
2403
+ * Configuration for max_group_tiered_package pricing
2404
+ */
2405
+ max_group_tiered_package_config: NewFloatingMaxGroupTieredPackagePrice.MaxGroupTieredPackageConfig;
2406
+ /**
2407
+ * The pricing model type
2408
+ */
2409
+ model_type: 'max_group_tiered_package';
1847
2410
  /**
1848
2411
  * The name of the price.
1849
2412
  */
1850
2413
  name: string;
1851
- scalable_matrix_with_unit_pricing_config: {
1852
- [key: string]: unknown;
1853
- };
1854
2414
  /**
1855
2415
  * The id of the billable metric for the price. Only needed if the price is
1856
2416
  * usage-based.
@@ -1905,7 +2465,41 @@ export declare namespace PriceCreateParams {
1905
2465
  [key: string]: string | null;
1906
2466
  } | null;
1907
2467
  }
1908
- interface NewFloatingScalableMatrixWithTieredPricingPrice {
2468
+ namespace NewFloatingMaxGroupTieredPackagePrice {
2469
+ /**
2470
+ * Configuration for max_group_tiered_package pricing
2471
+ */
2472
+ interface MaxGroupTieredPackageConfig {
2473
+ /**
2474
+ * The event property used to group before tiering the group with the highest value
2475
+ */
2476
+ grouping_key: string;
2477
+ /**
2478
+ * Package size
2479
+ */
2480
+ package_size: string;
2481
+ /**
2482
+ * Apply tiered pricing to the largest group after grouping with the provided key.
2483
+ */
2484
+ tiers: Array<MaxGroupTieredPackageConfig.Tier>;
2485
+ }
2486
+ namespace MaxGroupTieredPackageConfig {
2487
+ /**
2488
+ * Configuration for a single tier
2489
+ */
2490
+ interface Tier {
2491
+ /**
2492
+ * Tier lower bound
2493
+ */
2494
+ tier_lower_bound: string;
2495
+ /**
2496
+ * Per unit amount
2497
+ */
2498
+ unit_amount: string;
2499
+ }
2500
+ }
2501
+ }
2502
+ interface NewFloatingScalableMatrixWithUnitPricingPrice {
1909
2503
  /**
1910
2504
  * The cadence to bill for this price on.
1911
2505
  */
@@ -1918,14 +2512,18 @@ export declare namespace PriceCreateParams {
1918
2512
  * The id of the item the price will be associated with.
1919
2513
  */
1920
2514
  item_id: string;
1921
- model_type: 'scalable_matrix_with_tiered_pricing';
2515
+ /**
2516
+ * The pricing model type
2517
+ */
2518
+ model_type: 'scalable_matrix_with_unit_pricing';
1922
2519
  /**
1923
2520
  * The name of the price.
1924
2521
  */
1925
2522
  name: string;
1926
- scalable_matrix_with_tiered_pricing_config: {
1927
- [key: string]: unknown;
1928
- };
2523
+ /**
2524
+ * Configuration for scalable_matrix_with_unit_pricing pricing
2525
+ */
2526
+ scalable_matrix_with_unit_pricing_config: NewFloatingScalableMatrixWithUnitPricingPrice.ScalableMatrixWithUnitPricingConfig;
1929
2527
  /**
1930
2528
  * The id of the billable metric for the price. Only needed if the price is
1931
2529
  * usage-based.
@@ -1980,14 +2578,57 @@ export declare namespace PriceCreateParams {
1980
2578
  [key: string]: string | null;
1981
2579
  } | null;
1982
2580
  }
1983
- interface NewFloatingCumulativeGroupedBulkPrice {
2581
+ namespace NewFloatingScalableMatrixWithUnitPricingPrice {
2582
+ /**
2583
+ * Configuration for scalable_matrix_with_unit_pricing pricing
2584
+ */
2585
+ interface ScalableMatrixWithUnitPricingConfig {
2586
+ /**
2587
+ * Used to determine the unit rate
2588
+ */
2589
+ first_dimension: string;
2590
+ /**
2591
+ * Apply a scaling factor to each dimension
2592
+ */
2593
+ matrix_scaling_factors: Array<ScalableMatrixWithUnitPricingConfig.MatrixScalingFactor>;
2594
+ /**
2595
+ * The final unit price to rate against the output of the matrix
2596
+ */
2597
+ unit_price: string;
2598
+ /**
2599
+ * If true, the unit price will be prorated to the billing period
2600
+ */
2601
+ prorate?: boolean | null;
2602
+ /**
2603
+ * Used to determine the unit rate (optional)
2604
+ */
2605
+ second_dimension?: string | null;
2606
+ }
2607
+ namespace ScalableMatrixWithUnitPricingConfig {
2608
+ /**
2609
+ * Configuration for a single matrix scaling factor
2610
+ */
2611
+ interface MatrixScalingFactor {
2612
+ /**
2613
+ * First dimension value
2614
+ */
2615
+ first_dimension_value: string;
2616
+ /**
2617
+ * Scaling factor
2618
+ */
2619
+ scaling_factor: string;
2620
+ /**
2621
+ * Second dimension value (optional)
2622
+ */
2623
+ second_dimension_value?: string | null;
2624
+ }
2625
+ }
2626
+ }
2627
+ interface NewFloatingScalableMatrixWithTieredPricingPrice {
1984
2628
  /**
1985
2629
  * The cadence to bill for this price on.
1986
2630
  */
1987
2631
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1988
- cumulative_grouped_bulk_config: {
1989
- [key: string]: unknown;
1990
- };
1991
2632
  /**
1992
2633
  * An ISO 4217 currency string for which this price is billed in.
1993
2634
  */
@@ -1996,11 +2637,18 @@ export declare namespace PriceCreateParams {
1996
2637
  * The id of the item the price will be associated with.
1997
2638
  */
1998
2639
  item_id: string;
1999
- model_type: 'cumulative_grouped_bulk';
2640
+ /**
2641
+ * The pricing model type
2642
+ */
2643
+ model_type: 'scalable_matrix_with_tiered_pricing';
2000
2644
  /**
2001
2645
  * The name of the price.
2002
2646
  */
2003
2647
  name: string;
2648
+ /**
2649
+ * Configuration for scalable_matrix_with_tiered_pricing pricing
2650
+ */
2651
+ scalable_matrix_with_tiered_pricing_config: NewFloatingScalableMatrixWithTieredPricingPrice.ScalableMatrixWithTieredPricingConfig;
2004
2652
  /**
2005
2653
  * The id of the billable metric for the price. Only needed if the price is
2006
2654
  * usage-based.
@@ -2055,23 +2703,82 @@ export declare namespace PriceCreateParams {
2055
2703
  [key: string]: string | null;
2056
2704
  } | null;
2057
2705
  }
2058
- interface NewFloatingGroupedWithMinMaxThresholdsPrice {
2706
+ namespace NewFloatingScalableMatrixWithTieredPricingPrice {
2707
+ /**
2708
+ * Configuration for scalable_matrix_with_tiered_pricing pricing
2709
+ */
2710
+ interface ScalableMatrixWithTieredPricingConfig {
2711
+ /**
2712
+ * Used for the scalable matrix first dimension
2713
+ */
2714
+ first_dimension: string;
2715
+ /**
2716
+ * Apply a scaling factor to each dimension
2717
+ */
2718
+ matrix_scaling_factors: Array<ScalableMatrixWithTieredPricingConfig.MatrixScalingFactor>;
2719
+ /**
2720
+ * Tier pricing structure
2721
+ */
2722
+ tiers: Array<ScalableMatrixWithTieredPricingConfig.Tier>;
2723
+ /**
2724
+ * Used for the scalable matrix second dimension (optional)
2725
+ */
2726
+ second_dimension?: string | null;
2727
+ }
2728
+ namespace ScalableMatrixWithTieredPricingConfig {
2729
+ /**
2730
+ * Configuration for a single matrix scaling factor
2731
+ */
2732
+ interface MatrixScalingFactor {
2733
+ /**
2734
+ * First dimension value
2735
+ */
2736
+ first_dimension_value: string;
2737
+ /**
2738
+ * Scaling factor
2739
+ */
2740
+ scaling_factor: string;
2741
+ /**
2742
+ * Second dimension value (optional)
2743
+ */
2744
+ second_dimension_value?: string | null;
2745
+ }
2746
+ /**
2747
+ * Configuration for a single tier entry with business logic
2748
+ */
2749
+ interface Tier {
2750
+ /**
2751
+ * Tier lower bound
2752
+ */
2753
+ tier_lower_bound: string;
2754
+ /**
2755
+ * Per unit amount
2756
+ */
2757
+ unit_amount: string;
2758
+ }
2759
+ }
2760
+ }
2761
+ interface NewFloatingCumulativeGroupedBulkPrice {
2059
2762
  /**
2060
2763
  * The cadence to bill for this price on.
2061
2764
  */
2062
2765
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
2766
+ /**
2767
+ * Configuration for cumulative_grouped_bulk pricing
2768
+ */
2769
+ cumulative_grouped_bulk_config: NewFloatingCumulativeGroupedBulkPrice.CumulativeGroupedBulkConfig;
2063
2770
  /**
2064
2771
  * An ISO 4217 currency string for which this price is billed in.
2065
2772
  */
2066
2773
  currency: string;
2067
- grouped_with_min_max_thresholds_config: {
2068
- [key: string]: unknown;
2069
- };
2070
2774
  /**
2071
2775
  * The id of the item the price will be associated with.
2072
2776
  */
2073
2777
  item_id: string;
2074
- model_type: 'grouped_with_min_max_thresholds';
2778
+ /**
2779
+ * The pricing model type
2780
+ */
2781
+ model_type: 'cumulative_grouped_bulk';
2075
2782
  /**
2076
2783
  * The name of the price.
2077
2784
  */
@@ -2130,6 +2837,40 @@ export declare namespace PriceCreateParams {
2130
2837
  [key: string]: string | null;
2131
2838
  } | null;
2132
2839
  }
2840
+ namespace NewFloatingCumulativeGroupedBulkPrice {
2841
+ /**
2842
+ * Configuration for cumulative_grouped_bulk pricing
2843
+ */
2844
+ interface CumulativeGroupedBulkConfig {
2845
+ /**
2846
+ * Each tier lower bound must have the same group of values.
2847
+ */
2848
+ dimension_values: Array<CumulativeGroupedBulkConfig.DimensionValue>;
2849
+ /**
2850
+ * Grouping key name
2851
+ */
2852
+ group: string;
2853
+ }
2854
+ namespace CumulativeGroupedBulkConfig {
2855
+ /**
2856
+ * Configuration for a dimension value entry
2857
+ */
2858
+ interface DimensionValue {
2859
+ /**
2860
+ * Grouping key value
2861
+ */
2862
+ grouping_key: string;
2863
+ /**
2864
+ * Tier lower bound
2865
+ */
2866
+ tier_lower_bound: string;
2867
+ /**
2868
+ * Unit amount for this combination
2869
+ */
2870
+ unit_amount: string;
2871
+ }
2872
+ }
2873
+ }
2133
2874
  interface NewFloatingMinimumCompositePrice {
2134
2875
  /**
2135
2876
  * The cadence to bill for this price on.
@@ -2143,7 +2884,13 @@ export declare namespace PriceCreateParams {
2143
2884
  * The id of the item the price will be associated with.
2144
2885
  */
2145
2886
  item_id: string;
2887
+ /**
2888
+ * Configuration for minimum pricing
2889
+ */
2146
2890
  minimum_config: NewFloatingMinimumCompositePrice.MinimumConfig;
2891
+ /**
2892
+ * The pricing model type
2893
+ */
2147
2894
  model_type: 'minimum';
2148
2895
  /**
2149
2896
  * The name of the price.
@@ -2204,16 +2951,18 @@ export declare namespace PriceCreateParams {
2204
2951
  } | null;
2205
2952
  }
2206
2953
  namespace NewFloatingMinimumCompositePrice {
2954
+ /**
2955
+ * Configuration for minimum pricing
2956
+ */
2207
2957
  interface MinimumConfig {
2208
2958
  /**
2209
2959
  * The minimum amount to apply
2210
2960
  */
2211
2961
  minimum_amount: string;
2212
2962
  /**
2213
- * By default, subtotals from minimum composite prices are prorated based on the
2214
- * service period. Set to false to disable proration.
2963
+ * If true, subtotals from this price are prorated based on the service period
2215
2964
  */
2216
- prorated?: boolean | null;
2965
+ prorated?: boolean;
2217
2966
  }
2218
2967
  }
2219
2968
  }
@@ -2300,10 +3049,9 @@ export declare namespace PriceEvaluateMultipleParams {
2300
3049
  */
2301
3050
  grouping_keys?: Array<string>;
2302
3051
  /**
2303
- * An inline price definition to evaluate, allowing you to test price
2304
- * configurations before adding them to Orb.
3052
+ * New floating price request body params.
2305
3053
  */
2306
- price?: Shared.NewFloatingUnitPrice | Shared.NewFloatingPackagePrice | Shared.NewFloatingMatrixPrice | Shared.NewFloatingMatrixWithAllocationPrice | Shared.NewFloatingTieredPrice | Shared.NewFloatingBulkPrice | Shared.NewFloatingThresholdTotalAmountPrice | Shared.NewFloatingTieredPackagePrice | Shared.NewFloatingGroupedTieredPrice | Shared.NewFloatingMaxGroupTieredPackagePrice | Shared.NewFloatingTieredWithMinimumPrice | Shared.NewFloatingPackageWithAllocationPrice | Shared.NewFloatingTieredPackageWithMinimumPrice | Shared.NewFloatingUnitWithPercentPrice | Shared.NewFloatingTieredWithProrationPrice | Shared.NewFloatingUnitWithProrationPrice | Shared.NewFloatingGroupedAllocationPrice | Shared.NewFloatingGroupedWithProratedMinimumPrice | Shared.NewFloatingGroupedWithMeteredMinimumPrice | Shared.NewFloatingMatrixWithDisplayNamePrice | Shared.NewFloatingBulkWithProrationPrice | Shared.NewFloatingGroupedTieredPackagePrice | Shared.NewFloatingScalableMatrixWithUnitPricingPrice | Shared.NewFloatingScalableMatrixWithTieredPricingPrice | Shared.NewFloatingCumulativeGroupedBulkPrice | PriceEvaluation.NewFloatingGroupedWithMinMaxThresholdsPrice | Shared.NewFloatingMinimumCompositePrice | null;
3054
+ price?: Shared.NewFloatingUnitPrice | Shared.NewFloatingTieredPrice | Shared.NewFloatingBulkPrice | Shared.NewFloatingPackagePrice | Shared.NewFloatingMatrixPrice | Shared.NewFloatingThresholdTotalAmountPrice | Shared.NewFloatingTieredPackagePrice | Shared.NewFloatingTieredWithMinimumPrice | Shared.NewFloatingGroupedTieredPrice | Shared.NewFloatingTieredPackageWithMinimumPrice | Shared.NewFloatingPackageWithAllocationPrice | Shared.NewFloatingUnitWithPercentPrice | Shared.NewFloatingMatrixWithAllocationPrice | Shared.NewFloatingTieredWithProrationPrice | Shared.NewFloatingUnitWithProrationPrice | Shared.NewFloatingGroupedAllocationPrice | Shared.NewFloatingBulkWithProrationPrice | Shared.NewFloatingGroupedWithProratedMinimumPrice | Shared.NewFloatingGroupedWithMeteredMinimumPrice | PriceEvaluation.NewFloatingGroupedWithMinMaxThresholdsPrice | Shared.NewFloatingMatrixWithDisplayNamePrice | Shared.NewFloatingGroupedTieredPackagePrice | Shared.NewFloatingMaxGroupTieredPackagePrice | Shared.NewFloatingScalableMatrixWithUnitPricingPrice | Shared.NewFloatingScalableMatrixWithTieredPricingPrice | Shared.NewFloatingCumulativeGroupedBulkPrice | Shared.NewFloatingMinimumCompositePrice | null;
2307
3055
  /**
2308
3056
  * The ID of a price to evaluate that exists in your Orb account.
2309
3057
  */
@@ -2319,13 +3067,17 @@ export declare namespace PriceEvaluateMultipleParams {
2319
3067
  * An ISO 4217 currency string for which this price is billed in.
2320
3068
  */
2321
3069
  currency: string;
2322
- grouped_with_min_max_thresholds_config: {
2323
- [key: string]: unknown;
2324
- };
3070
+ /**
3071
+ * Configuration for grouped_with_min_max_thresholds pricing
3072
+ */
3073
+ grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
2325
3074
  /**
2326
3075
  * The id of the item the price will be associated with.
2327
3076
  */
2328
3077
  item_id: string;
3078
+ /**
3079
+ * The pricing model type
3080
+ */
2329
3081
  model_type: 'grouped_with_min_max_thresholds';
2330
3082
  /**
2331
3083
  * The name of the price.
@@ -2385,6 +3137,29 @@ export declare namespace PriceEvaluateMultipleParams {
2385
3137
  [key: string]: string | null;
2386
3138
  } | null;
2387
3139
  }
3140
+ namespace NewFloatingGroupedWithMinMaxThresholdsPrice {
3141
+ /**
3142
+ * Configuration for grouped_with_min_max_thresholds pricing
3143
+ */
3144
+ interface GroupedWithMinMaxThresholdsConfig {
3145
+ /**
3146
+ * The event property used to group before applying thresholds
3147
+ */
3148
+ grouping_key: string;
3149
+ /**
3150
+ * The maximum amount to charge each group
3151
+ */
3152
+ maximum_charge: string;
3153
+ /**
3154
+ * The minimum amount to charge each group, regardless of usage
3155
+ */
3156
+ minimum_charge: string;
3157
+ /**
3158
+ * The base price charged per group
3159
+ */
3160
+ per_unit_rate: string;
3161
+ }
3162
+ }
2388
3163
  }
2389
3164
  }
2390
3165
  export interface PriceEvaluatePreviewEventsParams {
@@ -2460,10 +3235,9 @@ export declare namespace PriceEvaluatePreviewEventsParams {
2460
3235
  */
2461
3236
  grouping_keys?: Array<string>;
2462
3237
  /**
2463
- * An inline price definition to evaluate, allowing you to test price
2464
- * configurations before adding them to Orb.
3238
+ * New floating price request body params.
2465
3239
  */
2466
- price?: Shared.NewFloatingUnitPrice | Shared.NewFloatingPackagePrice | Shared.NewFloatingMatrixPrice | Shared.NewFloatingMatrixWithAllocationPrice | Shared.NewFloatingTieredPrice | Shared.NewFloatingBulkPrice | Shared.NewFloatingThresholdTotalAmountPrice | Shared.NewFloatingTieredPackagePrice | Shared.NewFloatingGroupedTieredPrice | Shared.NewFloatingMaxGroupTieredPackagePrice | Shared.NewFloatingTieredWithMinimumPrice | Shared.NewFloatingPackageWithAllocationPrice | Shared.NewFloatingTieredPackageWithMinimumPrice | Shared.NewFloatingUnitWithPercentPrice | Shared.NewFloatingTieredWithProrationPrice | Shared.NewFloatingUnitWithProrationPrice | Shared.NewFloatingGroupedAllocationPrice | Shared.NewFloatingGroupedWithProratedMinimumPrice | Shared.NewFloatingGroupedWithMeteredMinimumPrice | Shared.NewFloatingMatrixWithDisplayNamePrice | Shared.NewFloatingBulkWithProrationPrice | Shared.NewFloatingGroupedTieredPackagePrice | Shared.NewFloatingScalableMatrixWithUnitPricingPrice | Shared.NewFloatingScalableMatrixWithTieredPricingPrice | Shared.NewFloatingCumulativeGroupedBulkPrice | PriceEvaluation.NewFloatingGroupedWithMinMaxThresholdsPrice | Shared.NewFloatingMinimumCompositePrice | null;
3240
+ price?: Shared.NewFloatingUnitPrice | Shared.NewFloatingTieredPrice | Shared.NewFloatingBulkPrice | Shared.NewFloatingPackagePrice | Shared.NewFloatingMatrixPrice | Shared.NewFloatingThresholdTotalAmountPrice | Shared.NewFloatingTieredPackagePrice | Shared.NewFloatingTieredWithMinimumPrice | Shared.NewFloatingGroupedTieredPrice | Shared.NewFloatingTieredPackageWithMinimumPrice | Shared.NewFloatingPackageWithAllocationPrice | Shared.NewFloatingUnitWithPercentPrice | Shared.NewFloatingMatrixWithAllocationPrice | Shared.NewFloatingTieredWithProrationPrice | Shared.NewFloatingUnitWithProrationPrice | Shared.NewFloatingGroupedAllocationPrice | Shared.NewFloatingBulkWithProrationPrice | Shared.NewFloatingGroupedWithProratedMinimumPrice | Shared.NewFloatingGroupedWithMeteredMinimumPrice | PriceEvaluation.NewFloatingGroupedWithMinMaxThresholdsPrice | Shared.NewFloatingMatrixWithDisplayNamePrice | Shared.NewFloatingGroupedTieredPackagePrice | Shared.NewFloatingMaxGroupTieredPackagePrice | Shared.NewFloatingScalableMatrixWithUnitPricingPrice | Shared.NewFloatingScalableMatrixWithTieredPricingPrice | Shared.NewFloatingCumulativeGroupedBulkPrice | Shared.NewFloatingMinimumCompositePrice | null;
2467
3241
  /**
2468
3242
  * The ID of a price to evaluate that exists in your Orb account.
2469
3243
  */
@@ -2479,13 +3253,17 @@ export declare namespace PriceEvaluatePreviewEventsParams {
2479
3253
  * An ISO 4217 currency string for which this price is billed in.
2480
3254
  */
2481
3255
  currency: string;
2482
- grouped_with_min_max_thresholds_config: {
2483
- [key: string]: unknown;
2484
- };
3256
+ /**
3257
+ * Configuration for grouped_with_min_max_thresholds pricing
3258
+ */
3259
+ grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
2485
3260
  /**
2486
3261
  * The id of the item the price will be associated with.
2487
3262
  */
2488
3263
  item_id: string;
3264
+ /**
3265
+ * The pricing model type
3266
+ */
2489
3267
  model_type: 'grouped_with_min_max_thresholds';
2490
3268
  /**
2491
3269
  * The name of the price.
@@ -2545,6 +3323,29 @@ export declare namespace PriceEvaluatePreviewEventsParams {
2545
3323
  [key: string]: string | null;
2546
3324
  } | null;
2547
3325
  }
3326
+ namespace NewFloatingGroupedWithMinMaxThresholdsPrice {
3327
+ /**
3328
+ * Configuration for grouped_with_min_max_thresholds pricing
3329
+ */
3330
+ interface GroupedWithMinMaxThresholdsConfig {
3331
+ /**
3332
+ * The event property used to group before applying thresholds
3333
+ */
3334
+ grouping_key: string;
3335
+ /**
3336
+ * The maximum amount to charge each group
3337
+ */
3338
+ maximum_charge: string;
3339
+ /**
3340
+ * The minimum amount to charge each group, regardless of usage
3341
+ */
3342
+ minimum_charge: string;
3343
+ /**
3344
+ * The base price charged per group
3345
+ */
3346
+ per_unit_rate: string;
3347
+ }
3348
+ }
2548
3349
  }
2549
3350
  }
2550
3351
  export declare namespace Prices {