orb-billing 5.6.0 → 5.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/core.js +3 -3
  3. package/core.js.map +1 -1
  4. package/core.mjs +3 -3
  5. package/core.mjs.map +1 -1
  6. package/index.d.mts +2 -4
  7. package/index.d.ts +2 -4
  8. package/index.d.ts.map +1 -1
  9. package/index.js.map +1 -1
  10. package/index.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/beta/beta.d.ts +288 -10
  13. package/resources/beta/beta.d.ts.map +1 -1
  14. package/resources/beta/beta.js.map +1 -1
  15. package/resources/beta/beta.mjs.map +1 -1
  16. package/resources/beta/external-plan-id.d.ts +288 -10
  17. package/resources/beta/external-plan-id.d.ts.map +1 -1
  18. package/resources/customers/customers.d.ts +27 -6
  19. package/resources/customers/customers.d.ts.map +1 -1
  20. package/resources/customers/customers.js.map +1 -1
  21. package/resources/customers/customers.mjs.map +1 -1
  22. package/resources/index.d.ts +1 -1
  23. package/resources/index.d.ts.map +1 -1
  24. package/resources/index.js.map +1 -1
  25. package/resources/index.mjs.map +1 -1
  26. package/resources/invoices.d.ts +3 -0
  27. package/resources/invoices.d.ts.map +1 -1
  28. package/resources/invoices.js.map +1 -1
  29. package/resources/invoices.mjs.map +1 -1
  30. package/resources/plans/plans.d.ts +144 -5
  31. package/resources/plans/plans.d.ts.map +1 -1
  32. package/resources/plans/plans.js.map +1 -1
  33. package/resources/plans/plans.mjs.map +1 -1
  34. package/resources/prices/prices.d.ts +926 -123
  35. package/resources/prices/prices.d.ts.map +1 -1
  36. package/resources/prices/prices.js.map +1 -1
  37. package/resources/prices/prices.mjs.map +1 -1
  38. package/resources/shared.d.ts +2474 -338
  39. package/resources/shared.d.ts.map +1 -1
  40. package/resources/shared.js.map +1 -1
  41. package/resources/shared.mjs.map +1 -1
  42. package/resources/subscriptions.d.ts +1369 -174
  43. package/resources/subscriptions.d.ts.map +1 -1
  44. package/resources/subscriptions.js.map +1 -1
  45. package/resources/subscriptions.mjs.map +1 -1
  46. package/src/core.ts +3 -3
  47. package/src/index.ts +0 -4
  48. package/src/resources/beta/beta.ts +348 -20
  49. package/src/resources/beta/external-plan-id.ts +348 -20
  50. package/src/resources/customers/customers.ts +48 -6
  51. package/src/resources/index.ts +0 -1
  52. package/src/resources/invoices.ts +3 -0
  53. package/src/resources/plans/plans.ts +174 -10
  54. package/src/resources/prices/prices.ts +1060 -113
  55. package/src/resources/shared.ts +2792 -288
  56. package/src/resources/subscriptions.ts +1609 -202
  57. package/src/version.ts +1 -1
  58. package/version.d.ts +1 -1
  59. package/version.js +1 -1
  60. package/version.mjs +1 -1
@@ -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,40 @@ 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. The tier bounds are defined based on
791
+ * the total quantity rather than the number of packages, so they must be multiples
792
+ * of the package size.
793
+ */
794
+ tiers: Array<TieredPackageConfig.Tier>;
795
+ }
796
+ namespace TieredPackageConfig {
797
+ /**
798
+ * Configuration for a single tier with business logic
799
+ */
800
+ interface Tier {
801
+ /**
802
+ * Price per package
803
+ */
804
+ per_unit: string;
805
+ /**
806
+ * Tier lower bound
807
+ */
808
+ tier_lower_bound: string;
809
+ }
810
+ }
811
+ }
812
+ interface NewFloatingTieredWithMinimumPrice {
709
813
  /**
710
814
  * The cadence to bill for this price on.
711
815
  */
@@ -718,14 +822,18 @@ export declare namespace PriceCreateParams {
718
822
  * The id of the item the price will be associated with.
719
823
  */
720
824
  item_id: string;
721
- model_type: 'tiered_package';
825
+ /**
826
+ * The pricing model type
827
+ */
828
+ model_type: 'tiered_with_minimum';
722
829
  /**
723
830
  * The name of the price.
724
831
  */
725
832
  name: string;
726
- tiered_package_config: {
727
- [key: string]: unknown;
728
- };
833
+ /**
834
+ * Configuration for tiered_with_minimum pricing
835
+ */
836
+ tiered_with_minimum_config: NewFloatingTieredWithMinimumPrice.TieredWithMinimumConfig;
729
837
  /**
730
838
  * The id of the billable metric for the price. Only needed if the price is
731
839
  * usage-based.
@@ -780,6 +888,45 @@ export declare namespace PriceCreateParams {
780
888
  [key: string]: string | null;
781
889
  } | null;
782
890
  }
891
+ namespace NewFloatingTieredWithMinimumPrice {
892
+ /**
893
+ * Configuration for tiered_with_minimum pricing
894
+ */
895
+ interface TieredWithMinimumConfig {
896
+ /**
897
+ * Tiered pricing with a minimum amount dependent on the volume tier. Tiers are
898
+ * defined using exclusive lower bounds.
899
+ */
900
+ tiers: Array<TieredWithMinimumConfig.Tier>;
901
+ /**
902
+ * If true, tiers with an accrued amount of 0 will not be included in the rating.
903
+ */
904
+ hide_zero_amount_tiers?: boolean;
905
+ /**
906
+ * If true, the unit price will be prorated to the billing period
907
+ */
908
+ prorate?: boolean;
909
+ }
910
+ namespace TieredWithMinimumConfig {
911
+ /**
912
+ * Configuration for a single tier
913
+ */
914
+ interface Tier {
915
+ /**
916
+ * Minimum amount
917
+ */
918
+ minimum_amount: string;
919
+ /**
920
+ * Tier lower bound
921
+ */
922
+ tier_lower_bound: string;
923
+ /**
924
+ * Per unit amount
925
+ */
926
+ unit_amount: string;
927
+ }
928
+ }
929
+ }
783
930
  interface NewFloatingGroupedTieredPrice {
784
931
  /**
785
932
  * The cadence to bill for this price on.
@@ -789,13 +936,17 @@ export declare namespace PriceCreateParams {
789
936
  * An ISO 4217 currency string for which this price is billed in.
790
937
  */
791
938
  currency: string;
792
- grouped_tiered_config: {
793
- [key: string]: unknown;
794
- };
939
+ /**
940
+ * Configuration for grouped_tiered pricing
941
+ */
942
+ grouped_tiered_config: NewFloatingGroupedTieredPrice.GroupedTieredConfig;
795
943
  /**
796
944
  * The id of the item the price will be associated with.
797
945
  */
798
946
  item_id: string;
947
+ /**
948
+ * The pricing model type
949
+ */
799
950
  model_type: 'grouped_tiered';
800
951
  /**
801
952
  * The name of the price.
@@ -855,7 +1006,38 @@ export declare namespace PriceCreateParams {
855
1006
  [key: string]: string | null;
856
1007
  } | null;
857
1008
  }
858
- interface NewFloatingMaxGroupTieredPackagePrice {
1009
+ namespace NewFloatingGroupedTieredPrice {
1010
+ /**
1011
+ * Configuration for grouped_tiered pricing
1012
+ */
1013
+ interface GroupedTieredConfig {
1014
+ /**
1015
+ * The billable metric property used to group before tiering
1016
+ */
1017
+ grouping_key: string;
1018
+ /**
1019
+ * Apply tiered pricing to each segment generated after grouping with the provided
1020
+ * key
1021
+ */
1022
+ tiers: Array<GroupedTieredConfig.Tier>;
1023
+ }
1024
+ namespace GroupedTieredConfig {
1025
+ /**
1026
+ * Configuration for a single tier
1027
+ */
1028
+ interface Tier {
1029
+ /**
1030
+ * Tier lower bound
1031
+ */
1032
+ tier_lower_bound: string;
1033
+ /**
1034
+ * Per unit amount
1035
+ */
1036
+ unit_amount: string;
1037
+ }
1038
+ }
1039
+ }
1040
+ interface NewFloatingTieredPackageWithMinimumPrice {
859
1041
  /**
860
1042
  * The cadence to bill for this price on.
861
1043
  */
@@ -868,14 +1050,18 @@ export declare namespace PriceCreateParams {
868
1050
  * The id of the item the price will be associated with.
869
1051
  */
870
1052
  item_id: string;
871
- max_group_tiered_package_config: {
872
- [key: string]: unknown;
873
- };
874
- model_type: 'max_group_tiered_package';
1053
+ /**
1054
+ * The pricing model type
1055
+ */
1056
+ model_type: 'tiered_package_with_minimum';
875
1057
  /**
876
1058
  * The name of the price.
877
1059
  */
878
1060
  name: string;
1061
+ /**
1062
+ * Configuration for tiered_package_with_minimum pricing
1063
+ */
1064
+ tiered_package_with_minimum_config: NewFloatingTieredPackageWithMinimumPrice.TieredPackageWithMinimumConfig;
879
1065
  /**
880
1066
  * The id of the billable metric for the price. Only needed if the price is
881
1067
  * usage-based.
@@ -930,7 +1116,42 @@ export declare namespace PriceCreateParams {
930
1116
  [key: string]: string | null;
931
1117
  } | null;
932
1118
  }
933
- interface NewFloatingTieredWithMinimumPrice {
1119
+ namespace NewFloatingTieredPackageWithMinimumPrice {
1120
+ /**
1121
+ * Configuration for tiered_package_with_minimum pricing
1122
+ */
1123
+ interface TieredPackageWithMinimumConfig {
1124
+ /**
1125
+ * Package size
1126
+ */
1127
+ package_size: number;
1128
+ /**
1129
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
1130
+ * are defined using exclusive lower bounds.
1131
+ */
1132
+ tiers: Array<TieredPackageWithMinimumConfig.Tier>;
1133
+ }
1134
+ namespace TieredPackageWithMinimumConfig {
1135
+ /**
1136
+ * Configuration for a single tier
1137
+ */
1138
+ interface Tier {
1139
+ /**
1140
+ * Minimum amount
1141
+ */
1142
+ minimum_amount: string;
1143
+ /**
1144
+ * Price per package
1145
+ */
1146
+ per_unit: string;
1147
+ /**
1148
+ * Tier lower bound
1149
+ */
1150
+ tier_lower_bound: string;
1151
+ }
1152
+ }
1153
+ }
1154
+ interface NewFloatingPackageWithAllocationPrice {
934
1155
  /**
935
1156
  * The cadence to bill for this price on.
936
1157
  */
@@ -943,14 +1164,18 @@ export declare namespace PriceCreateParams {
943
1164
  * The id of the item the price will be associated with.
944
1165
  */
945
1166
  item_id: string;
946
- model_type: 'tiered_with_minimum';
1167
+ /**
1168
+ * The pricing model type
1169
+ */
1170
+ model_type: 'package_with_allocation';
947
1171
  /**
948
1172
  * The name of the price.
949
1173
  */
950
1174
  name: string;
951
- tiered_with_minimum_config: {
952
- [key: string]: unknown;
953
- };
1175
+ /**
1176
+ * Configuration for package_with_allocation pricing
1177
+ */
1178
+ package_with_allocation_config: NewFloatingPackageWithAllocationPrice.PackageWithAllocationConfig;
954
1179
  /**
955
1180
  * The id of the billable metric for the price. Only needed if the price is
956
1181
  * usage-based.
@@ -1005,7 +1230,26 @@ export declare namespace PriceCreateParams {
1005
1230
  [key: string]: string | null;
1006
1231
  } | null;
1007
1232
  }
1008
- interface NewFloatingPackageWithAllocationPrice {
1233
+ namespace NewFloatingPackageWithAllocationPrice {
1234
+ /**
1235
+ * Configuration for package_with_allocation pricing
1236
+ */
1237
+ interface PackageWithAllocationConfig {
1238
+ /**
1239
+ * Usage allocation
1240
+ */
1241
+ allocation: string;
1242
+ /**
1243
+ * Price per package
1244
+ */
1245
+ package_amount: string;
1246
+ /**
1247
+ * Package size
1248
+ */
1249
+ package_size: string;
1250
+ }
1251
+ }
1252
+ interface NewFloatingUnitWithPercentPrice {
1009
1253
  /**
1010
1254
  * The cadence to bill for this price on.
1011
1255
  */
@@ -1018,14 +1262,18 @@ export declare namespace PriceCreateParams {
1018
1262
  * The id of the item the price will be associated with.
1019
1263
  */
1020
1264
  item_id: string;
1021
- model_type: 'package_with_allocation';
1265
+ /**
1266
+ * The pricing model type
1267
+ */
1268
+ model_type: 'unit_with_percent';
1022
1269
  /**
1023
1270
  * The name of the price.
1024
1271
  */
1025
1272
  name: string;
1026
- package_with_allocation_config: {
1027
- [key: string]: unknown;
1028
- };
1273
+ /**
1274
+ * Configuration for unit_with_percent pricing
1275
+ */
1276
+ unit_with_percent_config: NewFloatingUnitWithPercentPrice.UnitWithPercentConfig;
1029
1277
  /**
1030
1278
  * The id of the billable metric for the price. Only needed if the price is
1031
1279
  * usage-based.
@@ -1080,7 +1328,22 @@ export declare namespace PriceCreateParams {
1080
1328
  [key: string]: string | null;
1081
1329
  } | null;
1082
1330
  }
1083
- interface NewFloatingTieredPackageWithMinimumPrice {
1331
+ namespace NewFloatingUnitWithPercentPrice {
1332
+ /**
1333
+ * Configuration for unit_with_percent pricing
1334
+ */
1335
+ interface UnitWithPercentConfig {
1336
+ /**
1337
+ * What percent, out of 100, of the calculated total to charge
1338
+ */
1339
+ percent: string;
1340
+ /**
1341
+ * Rate per unit of usage
1342
+ */
1343
+ unit_amount: string;
1344
+ }
1345
+ }
1346
+ interface NewFloatingMatrixWithAllocationPrice {
1084
1347
  /**
1085
1348
  * The cadence to bill for this price on.
1086
1349
  */
@@ -1093,14 +1356,18 @@ export declare namespace PriceCreateParams {
1093
1356
  * The id of the item the price will be associated with.
1094
1357
  */
1095
1358
  item_id: string;
1096
- model_type: 'tiered_package_with_minimum';
1359
+ /**
1360
+ * Configuration for matrix_with_allocation pricing
1361
+ */
1362
+ matrix_with_allocation_config: Shared.MatrixWithAllocationConfig;
1363
+ /**
1364
+ * The pricing model type
1365
+ */
1366
+ model_type: 'matrix_with_allocation';
1097
1367
  /**
1098
1368
  * The name of the price.
1099
1369
  */
1100
1370
  name: string;
1101
- tiered_package_with_minimum_config: {
1102
- [key: string]: unknown;
1103
- };
1104
1371
  /**
1105
1372
  * The id of the billable metric for the price. Only needed if the price is
1106
1373
  * usage-based.
@@ -1155,7 +1422,7 @@ export declare namespace PriceCreateParams {
1155
1422
  [key: string]: string | null;
1156
1423
  } | null;
1157
1424
  }
1158
- interface NewFloatingUnitWithPercentPrice {
1425
+ interface NewFloatingTieredWithProrationPrice {
1159
1426
  /**
1160
1427
  * The cadence to bill for this price on.
1161
1428
  */
@@ -1168,14 +1435,18 @@ export declare namespace PriceCreateParams {
1168
1435
  * The id of the item the price will be associated with.
1169
1436
  */
1170
1437
  item_id: string;
1171
- model_type: 'unit_with_percent';
1438
+ /**
1439
+ * The pricing model type
1440
+ */
1441
+ model_type: 'tiered_with_proration';
1172
1442
  /**
1173
1443
  * The name of the price.
1174
1444
  */
1175
1445
  name: string;
1176
- unit_with_percent_config: {
1177
- [key: string]: unknown;
1178
- };
1446
+ /**
1447
+ * Configuration for tiered_with_proration pricing
1448
+ */
1449
+ tiered_with_proration_config: NewFloatingTieredWithProrationPrice.TieredWithProrationConfig;
1179
1450
  /**
1180
1451
  * The id of the billable metric for the price. Only needed if the price is
1181
1452
  * usage-based.
@@ -1230,7 +1501,34 @@ export declare namespace PriceCreateParams {
1230
1501
  [key: string]: string | null;
1231
1502
  } | null;
1232
1503
  }
1233
- interface NewFloatingTieredWithProrationPrice {
1504
+ namespace NewFloatingTieredWithProrationPrice {
1505
+ /**
1506
+ * Configuration for tiered_with_proration pricing
1507
+ */
1508
+ interface TieredWithProrationConfig {
1509
+ /**
1510
+ * Tiers for rating based on total usage quantities into the specified tier with
1511
+ * proration
1512
+ */
1513
+ tiers: Array<TieredWithProrationConfig.Tier>;
1514
+ }
1515
+ namespace TieredWithProrationConfig {
1516
+ /**
1517
+ * Configuration for a single tiered with proration tier
1518
+ */
1519
+ interface Tier {
1520
+ /**
1521
+ * Inclusive tier starting value
1522
+ */
1523
+ tier_lower_bound: string;
1524
+ /**
1525
+ * Amount per unit
1526
+ */
1527
+ unit_amount: string;
1528
+ }
1529
+ }
1530
+ }
1531
+ interface NewFloatingUnitWithProrationPrice {
1234
1532
  /**
1235
1533
  * The cadence to bill for this price on.
1236
1534
  */
@@ -1243,14 +1541,18 @@ export declare namespace PriceCreateParams {
1243
1541
  * The id of the item the price will be associated with.
1244
1542
  */
1245
1543
  item_id: string;
1246
- model_type: 'tiered_with_proration';
1544
+ /**
1545
+ * The pricing model type
1546
+ */
1547
+ model_type: 'unit_with_proration';
1247
1548
  /**
1248
1549
  * The name of the price.
1249
1550
  */
1250
1551
  name: string;
1251
- tiered_with_proration_config: {
1252
- [key: string]: unknown;
1253
- };
1552
+ /**
1553
+ * Configuration for unit_with_proration pricing
1554
+ */
1555
+ unit_with_proration_config: NewFloatingUnitWithProrationPrice.UnitWithProrationConfig;
1254
1556
  /**
1255
1557
  * The id of the billable metric for the price. Only needed if the price is
1256
1558
  * usage-based.
@@ -1305,7 +1607,18 @@ export declare namespace PriceCreateParams {
1305
1607
  [key: string]: string | null;
1306
1608
  } | null;
1307
1609
  }
1308
- interface NewFloatingUnitWithProrationPrice {
1610
+ namespace NewFloatingUnitWithProrationPrice {
1611
+ /**
1612
+ * Configuration for unit_with_proration pricing
1613
+ */
1614
+ interface UnitWithProrationConfig {
1615
+ /**
1616
+ * Rate per unit of usage
1617
+ */
1618
+ unit_amount: string;
1619
+ }
1620
+ }
1621
+ interface NewFloatingGroupedAllocationPrice {
1309
1622
  /**
1310
1623
  * The cadence to bill for this price on.
1311
1624
  */
@@ -1314,18 +1627,22 @@ export declare namespace PriceCreateParams {
1314
1627
  * An ISO 4217 currency string for which this price is billed in.
1315
1628
  */
1316
1629
  currency: string;
1630
+ /**
1631
+ * Configuration for grouped_allocation pricing
1632
+ */
1633
+ grouped_allocation_config: NewFloatingGroupedAllocationPrice.GroupedAllocationConfig;
1317
1634
  /**
1318
1635
  * The id of the item the price will be associated with.
1319
1636
  */
1320
1637
  item_id: string;
1321
- model_type: 'unit_with_proration';
1638
+ /**
1639
+ * The pricing model type
1640
+ */
1641
+ model_type: 'grouped_allocation';
1322
1642
  /**
1323
1643
  * The name of the price.
1324
1644
  */
1325
1645
  name: string;
1326
- unit_with_proration_config: {
1327
- [key: string]: unknown;
1328
- };
1329
1646
  /**
1330
1647
  * The id of the billable metric for the price. Only needed if the price is
1331
1648
  * usage-based.
@@ -1380,7 +1697,30 @@ export declare namespace PriceCreateParams {
1380
1697
  [key: string]: string | null;
1381
1698
  } | null;
1382
1699
  }
1383
- interface NewFloatingGroupedAllocationPrice {
1700
+ namespace NewFloatingGroupedAllocationPrice {
1701
+ /**
1702
+ * Configuration for grouped_allocation pricing
1703
+ */
1704
+ interface GroupedAllocationConfig {
1705
+ /**
1706
+ * Usage allocation per group
1707
+ */
1708
+ allocation: string;
1709
+ /**
1710
+ * How to determine the groups that should each be allocated some quantity
1711
+ */
1712
+ grouping_key: string;
1713
+ /**
1714
+ * Unit rate for post-allocation
1715
+ */
1716
+ overage_unit_rate: string;
1717
+ }
1718
+ }
1719
+ interface NewFloatingBulkWithProrationPrice {
1720
+ /**
1721
+ * Configuration for bulk_with_proration pricing
1722
+ */
1723
+ bulk_with_proration_config: NewFloatingBulkWithProrationPrice.BulkWithProrationConfig;
1384
1724
  /**
1385
1725
  * The cadence to bill for this price on.
1386
1726
  */
@@ -1389,14 +1729,14 @@ export declare namespace PriceCreateParams {
1389
1729
  * An ISO 4217 currency string for which this price is billed in.
1390
1730
  */
1391
1731
  currency: string;
1392
- grouped_allocation_config: {
1393
- [key: string]: unknown;
1394
- };
1395
1732
  /**
1396
1733
  * The id of the item the price will be associated with.
1397
1734
  */
1398
1735
  item_id: string;
1399
- model_type: 'grouped_allocation';
1736
+ /**
1737
+ * The pricing model type
1738
+ */
1739
+ model_type: 'bulk_with_proration';
1400
1740
  /**
1401
1741
  * The name of the price.
1402
1742
  */
@@ -1455,6 +1795,32 @@ export declare namespace PriceCreateParams {
1455
1795
  [key: string]: string | null;
1456
1796
  } | null;
1457
1797
  }
1798
+ namespace NewFloatingBulkWithProrationPrice {
1799
+ /**
1800
+ * Configuration for bulk_with_proration pricing
1801
+ */
1802
+ interface BulkWithProrationConfig {
1803
+ /**
1804
+ * Bulk tiers for rating based on total usage volume
1805
+ */
1806
+ tiers: Array<BulkWithProrationConfig.Tier>;
1807
+ }
1808
+ namespace BulkWithProrationConfig {
1809
+ /**
1810
+ * Configuration for a single bulk pricing tier with proration
1811
+ */
1812
+ interface Tier {
1813
+ /**
1814
+ * Cost per unit
1815
+ */
1816
+ unit_amount: string;
1817
+ /**
1818
+ * The lower bound for this tier
1819
+ */
1820
+ tier_lower_bound?: string | null;
1821
+ }
1822
+ }
1823
+ }
1458
1824
  interface NewFloatingGroupedWithProratedMinimumPrice {
1459
1825
  /**
1460
1826
  * The cadence to bill for this price on.
@@ -1464,13 +1830,17 @@ export declare namespace PriceCreateParams {
1464
1830
  * An ISO 4217 currency string for which this price is billed in.
1465
1831
  */
1466
1832
  currency: string;
1467
- grouped_with_prorated_minimum_config: {
1468
- [key: string]: unknown;
1469
- };
1833
+ /**
1834
+ * Configuration for grouped_with_prorated_minimum pricing
1835
+ */
1836
+ grouped_with_prorated_minimum_config: NewFloatingGroupedWithProratedMinimumPrice.GroupedWithProratedMinimumConfig;
1470
1837
  /**
1471
1838
  * The id of the item the price will be associated with.
1472
1839
  */
1473
1840
  item_id: string;
1841
+ /**
1842
+ * The pricing model type
1843
+ */
1474
1844
  model_type: 'grouped_with_prorated_minimum';
1475
1845
  /**
1476
1846
  * The name of the price.
@@ -1530,6 +1900,25 @@ export declare namespace PriceCreateParams {
1530
1900
  [key: string]: string | null;
1531
1901
  } | null;
1532
1902
  }
1903
+ namespace NewFloatingGroupedWithProratedMinimumPrice {
1904
+ /**
1905
+ * Configuration for grouped_with_prorated_minimum pricing
1906
+ */
1907
+ interface GroupedWithProratedMinimumConfig {
1908
+ /**
1909
+ * How to determine the groups that should each have a minimum
1910
+ */
1911
+ grouping_key: string;
1912
+ /**
1913
+ * The minimum amount to charge per group
1914
+ */
1915
+ minimum: string;
1916
+ /**
1917
+ * The amount to charge per unit
1918
+ */
1919
+ unit_rate: string;
1920
+ }
1921
+ }
1533
1922
  interface NewFloatingGroupedWithMeteredMinimumPrice {
1534
1923
  /**
1535
1924
  * The cadence to bill for this price on.
@@ -1539,13 +1928,17 @@ export declare namespace PriceCreateParams {
1539
1928
  * An ISO 4217 currency string for which this price is billed in.
1540
1929
  */
1541
1930
  currency: string;
1542
- grouped_with_metered_minimum_config: {
1543
- [key: string]: unknown;
1544
- };
1931
+ /**
1932
+ * Configuration for grouped_with_metered_minimum pricing
1933
+ */
1934
+ grouped_with_metered_minimum_config: NewFloatingGroupedWithMeteredMinimumPrice.GroupedWithMeteredMinimumConfig;
1545
1935
  /**
1546
1936
  * The id of the item the price will be associated with.
1547
1937
  */
1548
1938
  item_id: string;
1939
+ /**
1940
+ * The pricing model type
1941
+ */
1549
1942
  model_type: 'grouped_with_metered_minimum';
1550
1943
  /**
1551
1944
  * The name of the price.
@@ -1605,7 +1998,68 @@ export declare namespace PriceCreateParams {
1605
1998
  [key: string]: string | null;
1606
1999
  } | null;
1607
2000
  }
1608
- interface NewFloatingMatrixWithDisplayNamePrice {
2001
+ namespace NewFloatingGroupedWithMeteredMinimumPrice {
2002
+ /**
2003
+ * Configuration for grouped_with_metered_minimum pricing
2004
+ */
2005
+ interface GroupedWithMeteredMinimumConfig {
2006
+ /**
2007
+ * Used to partition the usage into groups. The minimum amount is applied to each
2008
+ * group.
2009
+ */
2010
+ grouping_key: string;
2011
+ /**
2012
+ * The minimum amount to charge per group per unit
2013
+ */
2014
+ minimum_unit_amount: string;
2015
+ /**
2016
+ * Used to determine the unit rate
2017
+ */
2018
+ pricing_key: string;
2019
+ /**
2020
+ * Scale the unit rates by the scaling factor.
2021
+ */
2022
+ scaling_factors: Array<GroupedWithMeteredMinimumConfig.ScalingFactor>;
2023
+ /**
2024
+ * Used to determine the unit rate scaling factor
2025
+ */
2026
+ scaling_key: string;
2027
+ /**
2028
+ * Apply per unit pricing to each pricing value. The minimum amount is applied any
2029
+ * unmatched usage.
2030
+ */
2031
+ unit_amounts: Array<GroupedWithMeteredMinimumConfig.UnitAmount>;
2032
+ }
2033
+ namespace GroupedWithMeteredMinimumConfig {
2034
+ /**
2035
+ * Configuration for a scaling factor
2036
+ */
2037
+ interface ScalingFactor {
2038
+ /**
2039
+ * Scaling factor
2040
+ */
2041
+ scaling_factor: string;
2042
+ /**
2043
+ * Scaling value
2044
+ */
2045
+ scaling_value: string;
2046
+ }
2047
+ /**
2048
+ * Configuration for a unit amount
2049
+ */
2050
+ interface UnitAmount {
2051
+ /**
2052
+ * Pricing value
2053
+ */
2054
+ pricing_value: string;
2055
+ /**
2056
+ * Per unit amount
2057
+ */
2058
+ unit_amount: string;
2059
+ }
2060
+ }
2061
+ }
2062
+ interface NewFloatingGroupedWithMinMaxThresholdsPrice {
1609
2063
  /**
1610
2064
  * The cadence to bill for this price on.
1611
2065
  */
@@ -1614,14 +2068,18 @@ export declare namespace PriceCreateParams {
1614
2068
  * An ISO 4217 currency string for which this price is billed in.
1615
2069
  */
1616
2070
  currency: string;
2071
+ /**
2072
+ * Configuration for grouped_with_min_max_thresholds pricing
2073
+ */
2074
+ grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
1617
2075
  /**
1618
2076
  * The id of the item the price will be associated with.
1619
2077
  */
1620
2078
  item_id: string;
1621
- matrix_with_display_name_config: {
1622
- [key: string]: unknown;
1623
- };
1624
- model_type: 'matrix_with_display_name';
2079
+ /**
2080
+ * The pricing model type
2081
+ */
2082
+ model_type: 'grouped_with_min_max_thresholds';
1625
2083
  /**
1626
2084
  * The name of the price.
1627
2085
  */
@@ -1680,10 +2138,30 @@ export declare namespace PriceCreateParams {
1680
2138
  [key: string]: string | null;
1681
2139
  } | null;
1682
2140
  }
1683
- interface NewFloatingBulkWithProrationPrice {
1684
- bulk_with_proration_config: {
1685
- [key: string]: unknown;
1686
- };
2141
+ namespace NewFloatingGroupedWithMinMaxThresholdsPrice {
2142
+ /**
2143
+ * Configuration for grouped_with_min_max_thresholds pricing
2144
+ */
2145
+ interface GroupedWithMinMaxThresholdsConfig {
2146
+ /**
2147
+ * The event property used to group before applying thresholds
2148
+ */
2149
+ grouping_key: string;
2150
+ /**
2151
+ * The maximum amount to charge each group
2152
+ */
2153
+ maximum_charge: string;
2154
+ /**
2155
+ * The minimum amount to charge each group, regardless of usage
2156
+ */
2157
+ minimum_charge: string;
2158
+ /**
2159
+ * The base price charged per group
2160
+ */
2161
+ per_unit_rate: string;
2162
+ }
2163
+ }
2164
+ interface NewFloatingMatrixWithDisplayNamePrice {
1687
2165
  /**
1688
2166
  * The cadence to bill for this price on.
1689
2167
  */
@@ -1696,7 +2174,14 @@ export declare namespace PriceCreateParams {
1696
2174
  * The id of the item the price will be associated with.
1697
2175
  */
1698
2176
  item_id: string;
1699
- model_type: 'bulk_with_proration';
2177
+ /**
2178
+ * Configuration for matrix_with_display_name pricing
2179
+ */
2180
+ matrix_with_display_name_config: NewFloatingMatrixWithDisplayNamePrice.MatrixWithDisplayNameConfig;
2181
+ /**
2182
+ * The pricing model type
2183
+ */
2184
+ model_type: 'matrix_with_display_name';
1700
2185
  /**
1701
2186
  * The name of the price.
1702
2187
  */
@@ -1755,6 +2240,40 @@ export declare namespace PriceCreateParams {
1755
2240
  [key: string]: string | null;
1756
2241
  } | null;
1757
2242
  }
2243
+ namespace NewFloatingMatrixWithDisplayNamePrice {
2244
+ /**
2245
+ * Configuration for matrix_with_display_name pricing
2246
+ */
2247
+ interface MatrixWithDisplayNameConfig {
2248
+ /**
2249
+ * Used to determine the unit rate
2250
+ */
2251
+ dimension: string;
2252
+ /**
2253
+ * Apply per unit pricing to each dimension value
2254
+ */
2255
+ unit_amounts: Array<MatrixWithDisplayNameConfig.UnitAmount>;
2256
+ }
2257
+ namespace MatrixWithDisplayNameConfig {
2258
+ /**
2259
+ * Configuration for a unit amount item
2260
+ */
2261
+ interface UnitAmount {
2262
+ /**
2263
+ * The dimension value
2264
+ */
2265
+ dimension_value: string;
2266
+ /**
2267
+ * Display name for this dimension value
2268
+ */
2269
+ display_name: string;
2270
+ /**
2271
+ * Per unit amount
2272
+ */
2273
+ unit_amount: string;
2274
+ }
2275
+ }
2276
+ }
1758
2277
  interface NewFloatingGroupedTieredPackagePrice {
1759
2278
  /**
1760
2279
  * The cadence to bill for this price on.
@@ -1764,13 +2283,17 @@ export declare namespace PriceCreateParams {
1764
2283
  * An ISO 4217 currency string for which this price is billed in.
1765
2284
  */
1766
2285
  currency: string;
1767
- grouped_tiered_package_config: {
1768
- [key: string]: unknown;
1769
- };
2286
+ /**
2287
+ * Configuration for grouped_tiered_package pricing
2288
+ */
2289
+ grouped_tiered_package_config: NewFloatingGroupedTieredPackagePrice.GroupedTieredPackageConfig;
1770
2290
  /**
1771
2291
  * The id of the item the price will be associated with.
1772
2292
  */
1773
2293
  item_id: string;
2294
+ /**
2295
+ * The pricing model type
2296
+ */
1774
2297
  model_type: 'grouped_tiered_package';
1775
2298
  /**
1776
2299
  * The name of the price.
@@ -1830,7 +2353,42 @@ export declare namespace PriceCreateParams {
1830
2353
  [key: string]: string | null;
1831
2354
  } | null;
1832
2355
  }
1833
- interface NewFloatingScalableMatrixWithUnitPricingPrice {
2356
+ namespace NewFloatingGroupedTieredPackagePrice {
2357
+ /**
2358
+ * Configuration for grouped_tiered_package pricing
2359
+ */
2360
+ interface GroupedTieredPackageConfig {
2361
+ /**
2362
+ * The event property used to group before tiering
2363
+ */
2364
+ grouping_key: string;
2365
+ /**
2366
+ * Package size
2367
+ */
2368
+ package_size: string;
2369
+ /**
2370
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
2371
+ * are defined using exclusive lower bounds.
2372
+ */
2373
+ tiers: Array<GroupedTieredPackageConfig.Tier>;
2374
+ }
2375
+ namespace GroupedTieredPackageConfig {
2376
+ /**
2377
+ * Configuration for a single tier
2378
+ */
2379
+ interface Tier {
2380
+ /**
2381
+ * Price per package
2382
+ */
2383
+ per_unit: string;
2384
+ /**
2385
+ * Tier lower bound
2386
+ */
2387
+ tier_lower_bound: string;
2388
+ }
2389
+ }
2390
+ }
2391
+ interface NewFloatingMaxGroupTieredPackagePrice {
1834
2392
  /**
1835
2393
  * The cadence to bill for this price on.
1836
2394
  */
@@ -1843,14 +2401,18 @@ export declare namespace PriceCreateParams {
1843
2401
  * The id of the item the price will be associated with.
1844
2402
  */
1845
2403
  item_id: string;
1846
- model_type: 'scalable_matrix_with_unit_pricing';
2404
+ /**
2405
+ * Configuration for max_group_tiered_package pricing
2406
+ */
2407
+ max_group_tiered_package_config: NewFloatingMaxGroupTieredPackagePrice.MaxGroupTieredPackageConfig;
2408
+ /**
2409
+ * The pricing model type
2410
+ */
2411
+ model_type: 'max_group_tiered_package';
1847
2412
  /**
1848
2413
  * The name of the price.
1849
2414
  */
1850
2415
  name: string;
1851
- scalable_matrix_with_unit_pricing_config: {
1852
- [key: string]: unknown;
1853
- };
1854
2416
  /**
1855
2417
  * The id of the billable metric for the price. Only needed if the price is
1856
2418
  * usage-based.
@@ -1905,7 +2467,41 @@ export declare namespace PriceCreateParams {
1905
2467
  [key: string]: string | null;
1906
2468
  } | null;
1907
2469
  }
1908
- interface NewFloatingScalableMatrixWithTieredPricingPrice {
2470
+ namespace NewFloatingMaxGroupTieredPackagePrice {
2471
+ /**
2472
+ * Configuration for max_group_tiered_package pricing
2473
+ */
2474
+ interface MaxGroupTieredPackageConfig {
2475
+ /**
2476
+ * The event property used to group before tiering the group with the highest value
2477
+ */
2478
+ grouping_key: string;
2479
+ /**
2480
+ * Package size
2481
+ */
2482
+ package_size: string;
2483
+ /**
2484
+ * Apply tiered pricing to the largest group after grouping with the provided key.
2485
+ */
2486
+ tiers: Array<MaxGroupTieredPackageConfig.Tier>;
2487
+ }
2488
+ namespace MaxGroupTieredPackageConfig {
2489
+ /**
2490
+ * Configuration for a single tier
2491
+ */
2492
+ interface Tier {
2493
+ /**
2494
+ * Tier lower bound
2495
+ */
2496
+ tier_lower_bound: string;
2497
+ /**
2498
+ * Per unit amount
2499
+ */
2500
+ unit_amount: string;
2501
+ }
2502
+ }
2503
+ }
2504
+ interface NewFloatingScalableMatrixWithUnitPricingPrice {
1909
2505
  /**
1910
2506
  * The cadence to bill for this price on.
1911
2507
  */
@@ -1918,14 +2514,18 @@ export declare namespace PriceCreateParams {
1918
2514
  * The id of the item the price will be associated with.
1919
2515
  */
1920
2516
  item_id: string;
1921
- model_type: 'scalable_matrix_with_tiered_pricing';
2517
+ /**
2518
+ * The pricing model type
2519
+ */
2520
+ model_type: 'scalable_matrix_with_unit_pricing';
1922
2521
  /**
1923
2522
  * The name of the price.
1924
2523
  */
1925
2524
  name: string;
1926
- scalable_matrix_with_tiered_pricing_config: {
1927
- [key: string]: unknown;
1928
- };
2525
+ /**
2526
+ * Configuration for scalable_matrix_with_unit_pricing pricing
2527
+ */
2528
+ scalable_matrix_with_unit_pricing_config: NewFloatingScalableMatrixWithUnitPricingPrice.ScalableMatrixWithUnitPricingConfig;
1929
2529
  /**
1930
2530
  * The id of the billable metric for the price. Only needed if the price is
1931
2531
  * usage-based.
@@ -1980,14 +2580,57 @@ export declare namespace PriceCreateParams {
1980
2580
  [key: string]: string | null;
1981
2581
  } | null;
1982
2582
  }
1983
- interface NewFloatingCumulativeGroupedBulkPrice {
2583
+ namespace NewFloatingScalableMatrixWithUnitPricingPrice {
2584
+ /**
2585
+ * Configuration for scalable_matrix_with_unit_pricing pricing
2586
+ */
2587
+ interface ScalableMatrixWithUnitPricingConfig {
2588
+ /**
2589
+ * Used to determine the unit rate
2590
+ */
2591
+ first_dimension: string;
2592
+ /**
2593
+ * Apply a scaling factor to each dimension
2594
+ */
2595
+ matrix_scaling_factors: Array<ScalableMatrixWithUnitPricingConfig.MatrixScalingFactor>;
2596
+ /**
2597
+ * The final unit price to rate against the output of the matrix
2598
+ */
2599
+ unit_price: string;
2600
+ /**
2601
+ * If true, the unit price will be prorated to the billing period
2602
+ */
2603
+ prorate?: boolean | null;
2604
+ /**
2605
+ * Used to determine the unit rate (optional)
2606
+ */
2607
+ second_dimension?: string | null;
2608
+ }
2609
+ namespace ScalableMatrixWithUnitPricingConfig {
2610
+ /**
2611
+ * Configuration for a single matrix scaling factor
2612
+ */
2613
+ interface MatrixScalingFactor {
2614
+ /**
2615
+ * First dimension value
2616
+ */
2617
+ first_dimension_value: string;
2618
+ /**
2619
+ * Scaling factor
2620
+ */
2621
+ scaling_factor: string;
2622
+ /**
2623
+ * Second dimension value (optional)
2624
+ */
2625
+ second_dimension_value?: string | null;
2626
+ }
2627
+ }
2628
+ }
2629
+ interface NewFloatingScalableMatrixWithTieredPricingPrice {
1984
2630
  /**
1985
2631
  * The cadence to bill for this price on.
1986
2632
  */
1987
2633
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1988
- cumulative_grouped_bulk_config: {
1989
- [key: string]: unknown;
1990
- };
1991
2634
  /**
1992
2635
  * An ISO 4217 currency string for which this price is billed in.
1993
2636
  */
@@ -1996,11 +2639,18 @@ export declare namespace PriceCreateParams {
1996
2639
  * The id of the item the price will be associated with.
1997
2640
  */
1998
2641
  item_id: string;
1999
- model_type: 'cumulative_grouped_bulk';
2642
+ /**
2643
+ * The pricing model type
2644
+ */
2645
+ model_type: 'scalable_matrix_with_tiered_pricing';
2000
2646
  /**
2001
2647
  * The name of the price.
2002
2648
  */
2003
2649
  name: string;
2650
+ /**
2651
+ * Configuration for scalable_matrix_with_tiered_pricing pricing
2652
+ */
2653
+ scalable_matrix_with_tiered_pricing_config: NewFloatingScalableMatrixWithTieredPricingPrice.ScalableMatrixWithTieredPricingConfig;
2004
2654
  /**
2005
2655
  * The id of the billable metric for the price. Only needed if the price is
2006
2656
  * usage-based.
@@ -2055,23 +2705,82 @@ export declare namespace PriceCreateParams {
2055
2705
  [key: string]: string | null;
2056
2706
  } | null;
2057
2707
  }
2058
- interface NewFloatingGroupedWithMinMaxThresholdsPrice {
2708
+ namespace NewFloatingScalableMatrixWithTieredPricingPrice {
2709
+ /**
2710
+ * Configuration for scalable_matrix_with_tiered_pricing pricing
2711
+ */
2712
+ interface ScalableMatrixWithTieredPricingConfig {
2713
+ /**
2714
+ * Used for the scalable matrix first dimension
2715
+ */
2716
+ first_dimension: string;
2717
+ /**
2718
+ * Apply a scaling factor to each dimension
2719
+ */
2720
+ matrix_scaling_factors: Array<ScalableMatrixWithTieredPricingConfig.MatrixScalingFactor>;
2721
+ /**
2722
+ * Tier pricing structure
2723
+ */
2724
+ tiers: Array<ScalableMatrixWithTieredPricingConfig.Tier>;
2725
+ /**
2726
+ * Used for the scalable matrix second dimension (optional)
2727
+ */
2728
+ second_dimension?: string | null;
2729
+ }
2730
+ namespace ScalableMatrixWithTieredPricingConfig {
2731
+ /**
2732
+ * Configuration for a single matrix scaling factor
2733
+ */
2734
+ interface MatrixScalingFactor {
2735
+ /**
2736
+ * First dimension value
2737
+ */
2738
+ first_dimension_value: string;
2739
+ /**
2740
+ * Scaling factor
2741
+ */
2742
+ scaling_factor: string;
2743
+ /**
2744
+ * Second dimension value (optional)
2745
+ */
2746
+ second_dimension_value?: string | null;
2747
+ }
2748
+ /**
2749
+ * Configuration for a single tier entry with business logic
2750
+ */
2751
+ interface Tier {
2752
+ /**
2753
+ * Tier lower bound
2754
+ */
2755
+ tier_lower_bound: string;
2756
+ /**
2757
+ * Per unit amount
2758
+ */
2759
+ unit_amount: string;
2760
+ }
2761
+ }
2762
+ }
2763
+ interface NewFloatingCumulativeGroupedBulkPrice {
2059
2764
  /**
2060
2765
  * The cadence to bill for this price on.
2061
2766
  */
2062
2767
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
2768
+ /**
2769
+ * Configuration for cumulative_grouped_bulk pricing
2770
+ */
2771
+ cumulative_grouped_bulk_config: NewFloatingCumulativeGroupedBulkPrice.CumulativeGroupedBulkConfig;
2063
2772
  /**
2064
2773
  * An ISO 4217 currency string for which this price is billed in.
2065
2774
  */
2066
2775
  currency: string;
2067
- grouped_with_min_max_thresholds_config: {
2068
- [key: string]: unknown;
2069
- };
2070
2776
  /**
2071
2777
  * The id of the item the price will be associated with.
2072
2778
  */
2073
2779
  item_id: string;
2074
- model_type: 'grouped_with_min_max_thresholds';
2780
+ /**
2781
+ * The pricing model type
2782
+ */
2783
+ model_type: 'cumulative_grouped_bulk';
2075
2784
  /**
2076
2785
  * The name of the price.
2077
2786
  */
@@ -2130,6 +2839,40 @@ export declare namespace PriceCreateParams {
2130
2839
  [key: string]: string | null;
2131
2840
  } | null;
2132
2841
  }
2842
+ namespace NewFloatingCumulativeGroupedBulkPrice {
2843
+ /**
2844
+ * Configuration for cumulative_grouped_bulk pricing
2845
+ */
2846
+ interface CumulativeGroupedBulkConfig {
2847
+ /**
2848
+ * Each tier lower bound must have the same group of values.
2849
+ */
2850
+ dimension_values: Array<CumulativeGroupedBulkConfig.DimensionValue>;
2851
+ /**
2852
+ * Grouping key name
2853
+ */
2854
+ group: string;
2855
+ }
2856
+ namespace CumulativeGroupedBulkConfig {
2857
+ /**
2858
+ * Configuration for a dimension value entry
2859
+ */
2860
+ interface DimensionValue {
2861
+ /**
2862
+ * Grouping key value
2863
+ */
2864
+ grouping_key: string;
2865
+ /**
2866
+ * Tier lower bound
2867
+ */
2868
+ tier_lower_bound: string;
2869
+ /**
2870
+ * Unit amount for this combination
2871
+ */
2872
+ unit_amount: string;
2873
+ }
2874
+ }
2875
+ }
2133
2876
  interface NewFloatingMinimumCompositePrice {
2134
2877
  /**
2135
2878
  * The cadence to bill for this price on.
@@ -2143,7 +2886,13 @@ export declare namespace PriceCreateParams {
2143
2886
  * The id of the item the price will be associated with.
2144
2887
  */
2145
2888
  item_id: string;
2889
+ /**
2890
+ * Configuration for minimum pricing
2891
+ */
2146
2892
  minimum_config: NewFloatingMinimumCompositePrice.MinimumConfig;
2893
+ /**
2894
+ * The pricing model type
2895
+ */
2147
2896
  model_type: 'minimum';
2148
2897
  /**
2149
2898
  * The name of the price.
@@ -2204,16 +2953,18 @@ export declare namespace PriceCreateParams {
2204
2953
  } | null;
2205
2954
  }
2206
2955
  namespace NewFloatingMinimumCompositePrice {
2956
+ /**
2957
+ * Configuration for minimum pricing
2958
+ */
2207
2959
  interface MinimumConfig {
2208
2960
  /**
2209
2961
  * The minimum amount to apply
2210
2962
  */
2211
2963
  minimum_amount: string;
2212
2964
  /**
2213
- * By default, subtotals from minimum composite prices are prorated based on the
2214
- * service period. Set to false to disable proration.
2965
+ * If true, subtotals from this price are prorated based on the service period
2215
2966
  */
2216
- prorated?: boolean | null;
2967
+ prorated?: boolean;
2217
2968
  }
2218
2969
  }
2219
2970
  }
@@ -2300,10 +3051,9 @@ export declare namespace PriceEvaluateMultipleParams {
2300
3051
  */
2301
3052
  grouping_keys?: Array<string>;
2302
3053
  /**
2303
- * An inline price definition to evaluate, allowing you to test price
2304
- * configurations before adding them to Orb.
3054
+ * New floating price request body params.
2305
3055
  */
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;
3056
+ 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
3057
  /**
2308
3058
  * The ID of a price to evaluate that exists in your Orb account.
2309
3059
  */
@@ -2319,13 +3069,17 @@ export declare namespace PriceEvaluateMultipleParams {
2319
3069
  * An ISO 4217 currency string for which this price is billed in.
2320
3070
  */
2321
3071
  currency: string;
2322
- grouped_with_min_max_thresholds_config: {
2323
- [key: string]: unknown;
2324
- };
3072
+ /**
3073
+ * Configuration for grouped_with_min_max_thresholds pricing
3074
+ */
3075
+ grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
2325
3076
  /**
2326
3077
  * The id of the item the price will be associated with.
2327
3078
  */
2328
3079
  item_id: string;
3080
+ /**
3081
+ * The pricing model type
3082
+ */
2329
3083
  model_type: 'grouped_with_min_max_thresholds';
2330
3084
  /**
2331
3085
  * The name of the price.
@@ -2385,6 +3139,29 @@ export declare namespace PriceEvaluateMultipleParams {
2385
3139
  [key: string]: string | null;
2386
3140
  } | null;
2387
3141
  }
3142
+ namespace NewFloatingGroupedWithMinMaxThresholdsPrice {
3143
+ /**
3144
+ * Configuration for grouped_with_min_max_thresholds pricing
3145
+ */
3146
+ interface GroupedWithMinMaxThresholdsConfig {
3147
+ /**
3148
+ * The event property used to group before applying thresholds
3149
+ */
3150
+ grouping_key: string;
3151
+ /**
3152
+ * The maximum amount to charge each group
3153
+ */
3154
+ maximum_charge: string;
3155
+ /**
3156
+ * The minimum amount to charge each group, regardless of usage
3157
+ */
3158
+ minimum_charge: string;
3159
+ /**
3160
+ * The base price charged per group
3161
+ */
3162
+ per_unit_rate: string;
3163
+ }
3164
+ }
2388
3165
  }
2389
3166
  }
2390
3167
  export interface PriceEvaluatePreviewEventsParams {
@@ -2460,10 +3237,9 @@ export declare namespace PriceEvaluatePreviewEventsParams {
2460
3237
  */
2461
3238
  grouping_keys?: Array<string>;
2462
3239
  /**
2463
- * An inline price definition to evaluate, allowing you to test price
2464
- * configurations before adding them to Orb.
3240
+ * New floating price request body params.
2465
3241
  */
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;
3242
+ 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
3243
  /**
2468
3244
  * The ID of a price to evaluate that exists in your Orb account.
2469
3245
  */
@@ -2479,13 +3255,17 @@ export declare namespace PriceEvaluatePreviewEventsParams {
2479
3255
  * An ISO 4217 currency string for which this price is billed in.
2480
3256
  */
2481
3257
  currency: string;
2482
- grouped_with_min_max_thresholds_config: {
2483
- [key: string]: unknown;
2484
- };
3258
+ /**
3259
+ * Configuration for grouped_with_min_max_thresholds pricing
3260
+ */
3261
+ grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
2485
3262
  /**
2486
3263
  * The id of the item the price will be associated with.
2487
3264
  */
2488
3265
  item_id: string;
3266
+ /**
3267
+ * The pricing model type
3268
+ */
2489
3269
  model_type: 'grouped_with_min_max_thresholds';
2490
3270
  /**
2491
3271
  * The name of the price.
@@ -2545,6 +3325,29 @@ export declare namespace PriceEvaluatePreviewEventsParams {
2545
3325
  [key: string]: string | null;
2546
3326
  } | null;
2547
3327
  }
3328
+ namespace NewFloatingGroupedWithMinMaxThresholdsPrice {
3329
+ /**
3330
+ * Configuration for grouped_with_min_max_thresholds pricing
3331
+ */
3332
+ interface GroupedWithMinMaxThresholdsConfig {
3333
+ /**
3334
+ * The event property used to group before applying thresholds
3335
+ */
3336
+ grouping_key: string;
3337
+ /**
3338
+ * The maximum amount to charge each group
3339
+ */
3340
+ maximum_charge: string;
3341
+ /**
3342
+ * The minimum amount to charge each group, regardless of usage
3343
+ */
3344
+ minimum_charge: string;
3345
+ /**
3346
+ * The base price charged per group
3347
+ */
3348
+ per_unit_rate: string;
3349
+ }
3350
+ }
2548
3351
  }
2549
3352
  }
2550
3353
  export declare namespace Prices {