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
@@ -927,6 +927,9 @@ export interface DiscountOverride {
927
927
  usage_discount?: number | null;
928
928
  }
929
929
  export interface NewSubscriptionBulkPrice {
930
+ /**
931
+ * Configuration for bulk pricing
932
+ */
930
933
  bulk_config: Shared.BulkConfig;
931
934
  /**
932
935
  * The cadence to bill for this price on.
@@ -936,6 +939,9 @@ export interface NewSubscriptionBulkPrice {
936
939
  * The id of the item the price will be associated with.
937
940
  */
938
941
  item_id: string;
942
+ /**
943
+ * The pricing model type
944
+ */
939
945
  model_type: 'bulk';
940
946
  /**
941
947
  * The name of the price.
@@ -1006,9 +1012,10 @@ export interface NewSubscriptionBulkPrice {
1006
1012
  reference_id?: string | null;
1007
1013
  }
1008
1014
  export interface NewSubscriptionBulkWithProrationPrice {
1009
- bulk_with_proration_config: {
1010
- [key: string]: unknown;
1011
- };
1015
+ /**
1016
+ * Configuration for bulk_with_proration pricing
1017
+ */
1018
+ bulk_with_proration_config: NewSubscriptionBulkWithProrationPrice.BulkWithProrationConfig;
1012
1019
  /**
1013
1020
  * The cadence to bill for this price on.
1014
1021
  */
@@ -1017,6 +1024,9 @@ export interface NewSubscriptionBulkWithProrationPrice {
1017
1024
  * The id of the item the price will be associated with.
1018
1025
  */
1019
1026
  item_id: string;
1027
+ /**
1028
+ * The pricing model type
1029
+ */
1020
1030
  model_type: 'bulk_with_proration';
1021
1031
  /**
1022
1032
  * The name of the price.
@@ -1086,18 +1096,48 @@ export interface NewSubscriptionBulkWithProrationPrice {
1086
1096
  */
1087
1097
  reference_id?: string | null;
1088
1098
  }
1099
+ export declare namespace NewSubscriptionBulkWithProrationPrice {
1100
+ /**
1101
+ * Configuration for bulk_with_proration pricing
1102
+ */
1103
+ interface BulkWithProrationConfig {
1104
+ /**
1105
+ * Bulk tiers for rating based on total usage volume
1106
+ */
1107
+ tiers: Array<BulkWithProrationConfig.Tier>;
1108
+ }
1109
+ namespace BulkWithProrationConfig {
1110
+ /**
1111
+ * Configuration for a single bulk pricing tier with proration
1112
+ */
1113
+ interface Tier {
1114
+ /**
1115
+ * Cost per unit
1116
+ */
1117
+ unit_amount: string;
1118
+ /**
1119
+ * The lower bound for this tier
1120
+ */
1121
+ tier_lower_bound?: string | null;
1122
+ }
1123
+ }
1124
+ }
1089
1125
  export interface NewSubscriptionCumulativeGroupedBulkPrice {
1090
1126
  /**
1091
1127
  * The cadence to bill for this price on.
1092
1128
  */
1093
1129
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1094
- cumulative_grouped_bulk_config: {
1095
- [key: string]: unknown;
1096
- };
1130
+ /**
1131
+ * Configuration for cumulative_grouped_bulk pricing
1132
+ */
1133
+ cumulative_grouped_bulk_config: NewSubscriptionCumulativeGroupedBulkPrice.CumulativeGroupedBulkConfig;
1097
1134
  /**
1098
1135
  * The id of the item the price will be associated with.
1099
1136
  */
1100
1137
  item_id: string;
1138
+ /**
1139
+ * The pricing model type
1140
+ */
1101
1141
  model_type: 'cumulative_grouped_bulk';
1102
1142
  /**
1103
1143
  * The name of the price.
@@ -1167,18 +1207,56 @@ export interface NewSubscriptionCumulativeGroupedBulkPrice {
1167
1207
  */
1168
1208
  reference_id?: string | null;
1169
1209
  }
1210
+ export declare namespace NewSubscriptionCumulativeGroupedBulkPrice {
1211
+ /**
1212
+ * Configuration for cumulative_grouped_bulk pricing
1213
+ */
1214
+ interface CumulativeGroupedBulkConfig {
1215
+ /**
1216
+ * Each tier lower bound must have the same group of values.
1217
+ */
1218
+ dimension_values: Array<CumulativeGroupedBulkConfig.DimensionValue>;
1219
+ /**
1220
+ * Grouping key name
1221
+ */
1222
+ group: string;
1223
+ }
1224
+ namespace CumulativeGroupedBulkConfig {
1225
+ /**
1226
+ * Configuration for a dimension value entry
1227
+ */
1228
+ interface DimensionValue {
1229
+ /**
1230
+ * Grouping key value
1231
+ */
1232
+ grouping_key: string;
1233
+ /**
1234
+ * Tier lower bound
1235
+ */
1236
+ tier_lower_bound: string;
1237
+ /**
1238
+ * Unit amount for this combination
1239
+ */
1240
+ unit_amount: string;
1241
+ }
1242
+ }
1243
+ }
1170
1244
  export interface NewSubscriptionGroupedAllocationPrice {
1171
1245
  /**
1172
1246
  * The cadence to bill for this price on.
1173
1247
  */
1174
1248
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1175
- grouped_allocation_config: {
1176
- [key: string]: unknown;
1177
- };
1249
+ /**
1250
+ * Configuration for grouped_allocation pricing
1251
+ */
1252
+ grouped_allocation_config: NewSubscriptionGroupedAllocationPrice.GroupedAllocationConfig;
1178
1253
  /**
1179
1254
  * The id of the item the price will be associated with.
1180
1255
  */
1181
1256
  item_id: string;
1257
+ /**
1258
+ * The pricing model type
1259
+ */
1182
1260
  model_type: 'grouped_allocation';
1183
1261
  /**
1184
1262
  * The name of the price.
@@ -1248,18 +1326,41 @@ export interface NewSubscriptionGroupedAllocationPrice {
1248
1326
  */
1249
1327
  reference_id?: string | null;
1250
1328
  }
1329
+ export declare namespace NewSubscriptionGroupedAllocationPrice {
1330
+ /**
1331
+ * Configuration for grouped_allocation pricing
1332
+ */
1333
+ interface GroupedAllocationConfig {
1334
+ /**
1335
+ * Usage allocation per group
1336
+ */
1337
+ allocation: string;
1338
+ /**
1339
+ * How to determine the groups that should each be allocated some quantity
1340
+ */
1341
+ grouping_key: string;
1342
+ /**
1343
+ * Unit rate for post-allocation
1344
+ */
1345
+ overage_unit_rate: string;
1346
+ }
1347
+ }
1251
1348
  export interface NewSubscriptionGroupedTieredPackagePrice {
1252
1349
  /**
1253
1350
  * The cadence to bill for this price on.
1254
1351
  */
1255
1352
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1256
- grouped_tiered_package_config: {
1257
- [key: string]: unknown;
1258
- };
1353
+ /**
1354
+ * Configuration for grouped_tiered_package pricing
1355
+ */
1356
+ grouped_tiered_package_config: NewSubscriptionGroupedTieredPackagePrice.GroupedTieredPackageConfig;
1259
1357
  /**
1260
1358
  * The id of the item the price will be associated with.
1261
1359
  */
1262
1360
  item_id: string;
1361
+ /**
1362
+ * The pricing model type
1363
+ */
1263
1364
  model_type: 'grouped_tiered_package';
1264
1365
  /**
1265
1366
  * The name of the price.
@@ -1329,18 +1430,57 @@ export interface NewSubscriptionGroupedTieredPackagePrice {
1329
1430
  */
1330
1431
  reference_id?: string | null;
1331
1432
  }
1433
+ export declare namespace NewSubscriptionGroupedTieredPackagePrice {
1434
+ /**
1435
+ * Configuration for grouped_tiered_package pricing
1436
+ */
1437
+ interface GroupedTieredPackageConfig {
1438
+ /**
1439
+ * The event property used to group before tiering
1440
+ */
1441
+ grouping_key: string;
1442
+ /**
1443
+ * Package size
1444
+ */
1445
+ package_size: string;
1446
+ /**
1447
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
1448
+ * are defined using exclusive lower bounds.
1449
+ */
1450
+ tiers: Array<GroupedTieredPackageConfig.Tier>;
1451
+ }
1452
+ namespace GroupedTieredPackageConfig {
1453
+ /**
1454
+ * Configuration for a single tier
1455
+ */
1456
+ interface Tier {
1457
+ /**
1458
+ * Price per package
1459
+ */
1460
+ per_unit: string;
1461
+ /**
1462
+ * Tier lower bound
1463
+ */
1464
+ tier_lower_bound: string;
1465
+ }
1466
+ }
1467
+ }
1332
1468
  export interface NewSubscriptionGroupedTieredPrice {
1333
1469
  /**
1334
1470
  * The cadence to bill for this price on.
1335
1471
  */
1336
1472
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1337
- grouped_tiered_config: {
1338
- [key: string]: unknown;
1339
- };
1473
+ /**
1474
+ * Configuration for grouped_tiered pricing
1475
+ */
1476
+ grouped_tiered_config: NewSubscriptionGroupedTieredPrice.GroupedTieredConfig;
1340
1477
  /**
1341
1478
  * The id of the item the price will be associated with.
1342
1479
  */
1343
1480
  item_id: string;
1481
+ /**
1482
+ * The pricing model type
1483
+ */
1344
1484
  model_type: 'grouped_tiered';
1345
1485
  /**
1346
1486
  * The name of the price.
@@ -1410,18 +1550,53 @@ export interface NewSubscriptionGroupedTieredPrice {
1410
1550
  */
1411
1551
  reference_id?: string | null;
1412
1552
  }
1553
+ export declare namespace NewSubscriptionGroupedTieredPrice {
1554
+ /**
1555
+ * Configuration for grouped_tiered pricing
1556
+ */
1557
+ interface GroupedTieredConfig {
1558
+ /**
1559
+ * The billable metric property used to group before tiering
1560
+ */
1561
+ grouping_key: string;
1562
+ /**
1563
+ * Apply tiered pricing to each segment generated after grouping with the provided
1564
+ * key
1565
+ */
1566
+ tiers: Array<GroupedTieredConfig.Tier>;
1567
+ }
1568
+ namespace GroupedTieredConfig {
1569
+ /**
1570
+ * Configuration for a single tier
1571
+ */
1572
+ interface Tier {
1573
+ /**
1574
+ * Tier lower bound
1575
+ */
1576
+ tier_lower_bound: string;
1577
+ /**
1578
+ * Per unit amount
1579
+ */
1580
+ unit_amount: string;
1581
+ }
1582
+ }
1583
+ }
1413
1584
  export interface NewSubscriptionGroupedWithMeteredMinimumPrice {
1414
1585
  /**
1415
1586
  * The cadence to bill for this price on.
1416
1587
  */
1417
1588
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1418
- grouped_with_metered_minimum_config: {
1419
- [key: string]: unknown;
1420
- };
1589
+ /**
1590
+ * Configuration for grouped_with_metered_minimum pricing
1591
+ */
1592
+ grouped_with_metered_minimum_config: NewSubscriptionGroupedWithMeteredMinimumPrice.GroupedWithMeteredMinimumConfig;
1421
1593
  /**
1422
1594
  * The id of the item the price will be associated with.
1423
1595
  */
1424
1596
  item_id: string;
1597
+ /**
1598
+ * The pricing model type
1599
+ */
1425
1600
  model_type: 'grouped_with_metered_minimum';
1426
1601
  /**
1427
1602
  * The name of the price.
@@ -1491,18 +1666,83 @@ export interface NewSubscriptionGroupedWithMeteredMinimumPrice {
1491
1666
  */
1492
1667
  reference_id?: string | null;
1493
1668
  }
1669
+ export declare namespace NewSubscriptionGroupedWithMeteredMinimumPrice {
1670
+ /**
1671
+ * Configuration for grouped_with_metered_minimum pricing
1672
+ */
1673
+ interface GroupedWithMeteredMinimumConfig {
1674
+ /**
1675
+ * Used to partition the usage into groups. The minimum amount is applied to each
1676
+ * group.
1677
+ */
1678
+ grouping_key: string;
1679
+ /**
1680
+ * The minimum amount to charge per group per unit
1681
+ */
1682
+ minimum_unit_amount: string;
1683
+ /**
1684
+ * Used to determine the unit rate
1685
+ */
1686
+ pricing_key: string;
1687
+ /**
1688
+ * Scale the unit rates by the scaling factor.
1689
+ */
1690
+ scaling_factors: Array<GroupedWithMeteredMinimumConfig.ScalingFactor>;
1691
+ /**
1692
+ * Used to determine the unit rate scaling factor
1693
+ */
1694
+ scaling_key: string;
1695
+ /**
1696
+ * Apply per unit pricing to each pricing value. The minimum amount is applied any
1697
+ * unmatched usage.
1698
+ */
1699
+ unit_amounts: Array<GroupedWithMeteredMinimumConfig.UnitAmount>;
1700
+ }
1701
+ namespace GroupedWithMeteredMinimumConfig {
1702
+ /**
1703
+ * Configuration for a scaling factor
1704
+ */
1705
+ interface ScalingFactor {
1706
+ /**
1707
+ * Scaling factor
1708
+ */
1709
+ scaling_factor: string;
1710
+ /**
1711
+ * Scaling value
1712
+ */
1713
+ scaling_value: string;
1714
+ }
1715
+ /**
1716
+ * Configuration for a unit amount
1717
+ */
1718
+ interface UnitAmount {
1719
+ /**
1720
+ * Pricing value
1721
+ */
1722
+ pricing_value: string;
1723
+ /**
1724
+ * Per unit amount
1725
+ */
1726
+ unit_amount: string;
1727
+ }
1728
+ }
1729
+ }
1494
1730
  export interface NewSubscriptionGroupedWithProratedMinimumPrice {
1495
1731
  /**
1496
1732
  * The cadence to bill for this price on.
1497
1733
  */
1498
1734
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1499
- grouped_with_prorated_minimum_config: {
1500
- [key: string]: unknown;
1501
- };
1735
+ /**
1736
+ * Configuration for grouped_with_prorated_minimum pricing
1737
+ */
1738
+ grouped_with_prorated_minimum_config: NewSubscriptionGroupedWithProratedMinimumPrice.GroupedWithProratedMinimumConfig;
1502
1739
  /**
1503
1740
  * The id of the item the price will be associated with.
1504
1741
  */
1505
1742
  item_id: string;
1743
+ /**
1744
+ * The pricing model type
1745
+ */
1506
1746
  model_type: 'grouped_with_prorated_minimum';
1507
1747
  /**
1508
1748
  * The name of the price.
@@ -1572,6 +1812,25 @@ export interface NewSubscriptionGroupedWithProratedMinimumPrice {
1572
1812
  */
1573
1813
  reference_id?: string | null;
1574
1814
  }
1815
+ export declare namespace NewSubscriptionGroupedWithProratedMinimumPrice {
1816
+ /**
1817
+ * Configuration for grouped_with_prorated_minimum pricing
1818
+ */
1819
+ interface GroupedWithProratedMinimumConfig {
1820
+ /**
1821
+ * How to determine the groups that should each have a minimum
1822
+ */
1823
+ grouping_key: string;
1824
+ /**
1825
+ * The minimum amount to charge per group
1826
+ */
1827
+ minimum: string;
1828
+ /**
1829
+ * The amount to charge per unit
1830
+ */
1831
+ unit_rate: string;
1832
+ }
1833
+ }
1575
1834
  export interface NewSubscriptionMatrixPrice {
1576
1835
  /**
1577
1836
  * The cadence to bill for this price on.
@@ -1581,7 +1840,13 @@ export interface NewSubscriptionMatrixPrice {
1581
1840
  * The id of the item the price will be associated with.
1582
1841
  */
1583
1842
  item_id: string;
1843
+ /**
1844
+ * Configuration for matrix pricing
1845
+ */
1584
1846
  matrix_config: Shared.MatrixConfig;
1847
+ /**
1848
+ * The pricing model type
1849
+ */
1585
1850
  model_type: 'matrix';
1586
1851
  /**
1587
1852
  * The name of the price.
@@ -1660,7 +1925,13 @@ export interface NewSubscriptionMatrixWithAllocationPrice {
1660
1925
  * The id of the item the price will be associated with.
1661
1926
  */
1662
1927
  item_id: string;
1928
+ /**
1929
+ * Configuration for matrix_with_allocation pricing
1930
+ */
1663
1931
  matrix_with_allocation_config: Shared.MatrixWithAllocationConfig;
1932
+ /**
1933
+ * The pricing model type
1934
+ */
1664
1935
  model_type: 'matrix_with_allocation';
1665
1936
  /**
1666
1937
  * The name of the price.
@@ -1739,9 +2010,13 @@ export interface NewSubscriptionMatrixWithDisplayNamePrice {
1739
2010
  * The id of the item the price will be associated with.
1740
2011
  */
1741
2012
  item_id: string;
1742
- matrix_with_display_name_config: {
1743
- [key: string]: unknown;
1744
- };
2013
+ /**
2014
+ * Configuration for matrix_with_display_name pricing
2015
+ */
2016
+ matrix_with_display_name_config: NewSubscriptionMatrixWithDisplayNamePrice.MatrixWithDisplayNameConfig;
2017
+ /**
2018
+ * The pricing model type
2019
+ */
1745
2020
  model_type: 'matrix_with_display_name';
1746
2021
  /**
1747
2022
  * The name of the price.
@@ -1811,6 +2086,40 @@ export interface NewSubscriptionMatrixWithDisplayNamePrice {
1811
2086
  */
1812
2087
  reference_id?: string | null;
1813
2088
  }
2089
+ export declare namespace NewSubscriptionMatrixWithDisplayNamePrice {
2090
+ /**
2091
+ * Configuration for matrix_with_display_name pricing
2092
+ */
2093
+ interface MatrixWithDisplayNameConfig {
2094
+ /**
2095
+ * Used to determine the unit rate
2096
+ */
2097
+ dimension: string;
2098
+ /**
2099
+ * Apply per unit pricing to each dimension value
2100
+ */
2101
+ unit_amounts: Array<MatrixWithDisplayNameConfig.UnitAmount>;
2102
+ }
2103
+ namespace MatrixWithDisplayNameConfig {
2104
+ /**
2105
+ * Configuration for a unit amount item
2106
+ */
2107
+ interface UnitAmount {
2108
+ /**
2109
+ * The dimension value
2110
+ */
2111
+ dimension_value: string;
2112
+ /**
2113
+ * Display name for this dimension value
2114
+ */
2115
+ display_name: string;
2116
+ /**
2117
+ * Per unit amount
2118
+ */
2119
+ unit_amount: string;
2120
+ }
2121
+ }
2122
+ }
1814
2123
  export interface NewSubscriptionMaxGroupTieredPackagePrice {
1815
2124
  /**
1816
2125
  * The cadence to bill for this price on.
@@ -1820,9 +2129,13 @@ export interface NewSubscriptionMaxGroupTieredPackagePrice {
1820
2129
  * The id of the item the price will be associated with.
1821
2130
  */
1822
2131
  item_id: string;
1823
- max_group_tiered_package_config: {
1824
- [key: string]: unknown;
1825
- };
2132
+ /**
2133
+ * Configuration for max_group_tiered_package pricing
2134
+ */
2135
+ max_group_tiered_package_config: NewSubscriptionMaxGroupTieredPackagePrice.MaxGroupTieredPackageConfig;
2136
+ /**
2137
+ * The pricing model type
2138
+ */
1826
2139
  model_type: 'max_group_tiered_package';
1827
2140
  /**
1828
2141
  * The name of the price.
@@ -1892,6 +2205,40 @@ export interface NewSubscriptionMaxGroupTieredPackagePrice {
1892
2205
  */
1893
2206
  reference_id?: string | null;
1894
2207
  }
2208
+ export declare namespace NewSubscriptionMaxGroupTieredPackagePrice {
2209
+ /**
2210
+ * Configuration for max_group_tiered_package pricing
2211
+ */
2212
+ interface MaxGroupTieredPackageConfig {
2213
+ /**
2214
+ * The event property used to group before tiering the group with the highest value
2215
+ */
2216
+ grouping_key: string;
2217
+ /**
2218
+ * Package size
2219
+ */
2220
+ package_size: string;
2221
+ /**
2222
+ * Apply tiered pricing to the largest group after grouping with the provided key.
2223
+ */
2224
+ tiers: Array<MaxGroupTieredPackageConfig.Tier>;
2225
+ }
2226
+ namespace MaxGroupTieredPackageConfig {
2227
+ /**
2228
+ * Configuration for a single tier
2229
+ */
2230
+ interface Tier {
2231
+ /**
2232
+ * Tier lower bound
2233
+ */
2234
+ tier_lower_bound: string;
2235
+ /**
2236
+ * Per unit amount
2237
+ */
2238
+ unit_amount: string;
2239
+ }
2240
+ }
2241
+ }
1895
2242
  export interface NewSubscriptionMinimumCompositePrice {
1896
2243
  /**
1897
2244
  * The cadence to bill for this price on.
@@ -1901,7 +2248,13 @@ export interface NewSubscriptionMinimumCompositePrice {
1901
2248
  * The id of the item the price will be associated with.
1902
2249
  */
1903
2250
  item_id: string;
2251
+ /**
2252
+ * Configuration for minimum pricing
2253
+ */
1904
2254
  minimum_config: NewSubscriptionMinimumCompositePrice.MinimumConfig;
2255
+ /**
2256
+ * The pricing model type
2257
+ */
1905
2258
  model_type: 'minimum';
1906
2259
  /**
1907
2260
  * The name of the price.
@@ -1972,16 +2325,18 @@ export interface NewSubscriptionMinimumCompositePrice {
1972
2325
  reference_id?: string | null;
1973
2326
  }
1974
2327
  export declare namespace NewSubscriptionMinimumCompositePrice {
2328
+ /**
2329
+ * Configuration for minimum pricing
2330
+ */
1975
2331
  interface MinimumConfig {
1976
2332
  /**
1977
2333
  * The minimum amount to apply
1978
2334
  */
1979
2335
  minimum_amount: string;
1980
2336
  /**
1981
- * By default, subtotals from minimum composite prices are prorated based on the
1982
- * service period. Set to false to disable proration.
2337
+ * If true, subtotals from this price are prorated based on the service period
1983
2338
  */
1984
- prorated?: boolean | null;
2339
+ prorated?: boolean;
1985
2340
  }
1986
2341
  }
1987
2342
  export interface NewSubscriptionPackagePrice {
@@ -1993,11 +2348,17 @@ export interface NewSubscriptionPackagePrice {
1993
2348
  * The id of the item the price will be associated with.
1994
2349
  */
1995
2350
  item_id: string;
2351
+ /**
2352
+ * The pricing model type
2353
+ */
1996
2354
  model_type: 'package';
1997
2355
  /**
1998
2356
  * The name of the price.
1999
2357
  */
2000
2358
  name: string;
2359
+ /**
2360
+ * Configuration for package pricing
2361
+ */
2001
2362
  package_config: Shared.PackageConfig;
2002
2363
  /**
2003
2364
  * The id of the billable metric for the price. Only needed if the price is
@@ -2072,14 +2433,18 @@ export interface NewSubscriptionPackageWithAllocationPrice {
2072
2433
  * The id of the item the price will be associated with.
2073
2434
  */
2074
2435
  item_id: string;
2436
+ /**
2437
+ * The pricing model type
2438
+ */
2075
2439
  model_type: 'package_with_allocation';
2076
2440
  /**
2077
2441
  * The name of the price.
2078
2442
  */
2079
2443
  name: string;
2080
- package_with_allocation_config: {
2081
- [key: string]: unknown;
2082
- };
2444
+ /**
2445
+ * Configuration for package_with_allocation pricing
2446
+ */
2447
+ package_with_allocation_config: NewSubscriptionPackageWithAllocationPrice.PackageWithAllocationConfig;
2083
2448
  /**
2084
2449
  * The id of the billable metric for the price. Only needed if the price is
2085
2450
  * usage-based.
@@ -2144,6 +2509,25 @@ export interface NewSubscriptionPackageWithAllocationPrice {
2144
2509
  */
2145
2510
  reference_id?: string | null;
2146
2511
  }
2512
+ export declare namespace NewSubscriptionPackageWithAllocationPrice {
2513
+ /**
2514
+ * Configuration for package_with_allocation pricing
2515
+ */
2516
+ interface PackageWithAllocationConfig {
2517
+ /**
2518
+ * Usage allocation
2519
+ */
2520
+ allocation: string;
2521
+ /**
2522
+ * Price per package
2523
+ */
2524
+ package_amount: string;
2525
+ /**
2526
+ * Package size
2527
+ */
2528
+ package_size: string;
2529
+ }
2530
+ }
2147
2531
  export interface NewSubscriptionScalableMatrixWithTieredPricingPrice {
2148
2532
  /**
2149
2533
  * The cadence to bill for this price on.
@@ -2153,14 +2537,18 @@ export interface NewSubscriptionScalableMatrixWithTieredPricingPrice {
2153
2537
  * The id of the item the price will be associated with.
2154
2538
  */
2155
2539
  item_id: string;
2540
+ /**
2541
+ * The pricing model type
2542
+ */
2156
2543
  model_type: 'scalable_matrix_with_tiered_pricing';
2157
2544
  /**
2158
2545
  * The name of the price.
2159
2546
  */
2160
2547
  name: string;
2161
- scalable_matrix_with_tiered_pricing_config: {
2162
- [key: string]: unknown;
2163
- };
2548
+ /**
2549
+ * Configuration for scalable_matrix_with_tiered_pricing pricing
2550
+ */
2551
+ scalable_matrix_with_tiered_pricing_config: NewSubscriptionScalableMatrixWithTieredPricingPrice.ScalableMatrixWithTieredPricingConfig;
2164
2552
  /**
2165
2553
  * The id of the billable metric for the price. Only needed if the price is
2166
2554
  * usage-based.
@@ -2225,88 +2613,62 @@ export interface NewSubscriptionScalableMatrixWithTieredPricingPrice {
2225
2613
  */
2226
2614
  reference_id?: string | null;
2227
2615
  }
2228
- export interface NewSubscriptionScalableMatrixWithUnitPricingPrice {
2229
- /**
2230
- * The cadence to bill for this price on.
2231
- */
2232
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
2233
- /**
2234
- * The id of the item the price will be associated with.
2235
- */
2236
- item_id: string;
2237
- model_type: 'scalable_matrix_with_unit_pricing';
2616
+ export declare namespace NewSubscriptionScalableMatrixWithTieredPricingPrice {
2238
2617
  /**
2239
- * The name of the price.
2618
+ * Configuration for scalable_matrix_with_tiered_pricing pricing
2240
2619
  */
2241
- name: string;
2242
- scalable_matrix_with_unit_pricing_config: {
2243
- [key: string]: unknown;
2244
- };
2245
- /**
2246
- * The id of the billable metric for the price. Only needed if the price is
2247
- * usage-based.
2248
- */
2249
- billable_metric_id?: string | null;
2250
- /**
2251
- * If the Price represents a fixed cost, the price will be billed in-advance if
2252
- * this is true, and in-arrears if this is false.
2253
- */
2254
- billed_in_advance?: boolean | null;
2255
- /**
2256
- * For custom cadence: specifies the duration of the billing period in days or
2257
- * months.
2258
- */
2259
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2260
- /**
2261
- * The per unit conversion rate of the price currency to the invoicing currency.
2262
- */
2263
- conversion_rate?: number | null;
2264
- /**
2265
- * The configuration for the rate of the price currency to the invoicing currency.
2266
- */
2267
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
2268
- /**
2269
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
2270
- * price is billed.
2271
- */
2272
- currency?: string | null;
2273
- /**
2274
- * For dimensional price: specifies a price group and dimension values
2275
- */
2276
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
2277
- /**
2278
- * An alias for the price.
2279
- */
2280
- external_price_id?: string | null;
2281
- /**
2282
- * If the Price represents a fixed cost, this represents the quantity of units
2283
- * applied.
2284
- */
2285
- fixed_price_quantity?: number | null;
2286
- /**
2287
- * The property used to group this price on an invoice
2288
- */
2289
- invoice_grouping_key?: string | null;
2290
- /**
2291
- * Within each billing cycle, specifies the cadence at which invoices are produced.
2292
- * If unspecified, a single invoice is produced per billing cycle.
2293
- */
2294
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2295
- /**
2296
- * User-specified key/value pairs for the resource. Individual keys can be removed
2297
- * by setting the value to `null`, and the entire metadata mapping can be cleared
2298
- * by setting `metadata` to `null`.
2299
- */
2300
- metadata?: {
2301
- [key: string]: string | null;
2302
- } | null;
2303
- /**
2304
- * A transient ID that can be used to reference this price when adding adjustments
2305
- * in the same API call.
2306
- */
2307
- reference_id?: string | null;
2620
+ interface ScalableMatrixWithTieredPricingConfig {
2621
+ /**
2622
+ * Used for the scalable matrix first dimension
2623
+ */
2624
+ first_dimension: string;
2625
+ /**
2626
+ * Apply a scaling factor to each dimension
2627
+ */
2628
+ matrix_scaling_factors: Array<ScalableMatrixWithTieredPricingConfig.MatrixScalingFactor>;
2629
+ /**
2630
+ * Tier pricing structure
2631
+ */
2632
+ tiers: Array<ScalableMatrixWithTieredPricingConfig.Tier>;
2633
+ /**
2634
+ * Used for the scalable matrix second dimension (optional)
2635
+ */
2636
+ second_dimension?: string | null;
2637
+ }
2638
+ namespace ScalableMatrixWithTieredPricingConfig {
2639
+ /**
2640
+ * Configuration for a single matrix scaling factor
2641
+ */
2642
+ interface MatrixScalingFactor {
2643
+ /**
2644
+ * First dimension value
2645
+ */
2646
+ first_dimension_value: string;
2647
+ /**
2648
+ * Scaling factor
2649
+ */
2650
+ scaling_factor: string;
2651
+ /**
2652
+ * Second dimension value (optional)
2653
+ */
2654
+ second_dimension_value?: string | null;
2655
+ }
2656
+ /**
2657
+ * Configuration for a single tier entry with business logic
2658
+ */
2659
+ interface Tier {
2660
+ /**
2661
+ * Tier lower bound
2662
+ */
2663
+ tier_lower_bound: string;
2664
+ /**
2665
+ * Per unit amount
2666
+ */
2667
+ unit_amount: string;
2668
+ }
2669
+ }
2308
2670
  }
2309
- export interface NewSubscriptionThresholdTotalAmountPrice {
2671
+ export interface NewSubscriptionScalableMatrixWithUnitPricingPrice {
2310
2672
  /**
2311
2673
  * The cadence to bill for this price on.
2312
2674
  */
@@ -2315,14 +2677,18 @@ export interface NewSubscriptionThresholdTotalAmountPrice {
2315
2677
  * The id of the item the price will be associated with.
2316
2678
  */
2317
2679
  item_id: string;
2318
- model_type: 'threshold_total_amount';
2680
+ /**
2681
+ * The pricing model type
2682
+ */
2683
+ model_type: 'scalable_matrix_with_unit_pricing';
2319
2684
  /**
2320
2685
  * The name of the price.
2321
2686
  */
2322
2687
  name: string;
2323
- threshold_total_amount_config: {
2324
- [key: string]: unknown;
2325
- };
2688
+ /**
2689
+ * Configuration for scalable_matrix_with_unit_pricing pricing
2690
+ */
2691
+ scalable_matrix_with_unit_pricing_config: NewSubscriptionScalableMatrixWithUnitPricingPrice.ScalableMatrixWithUnitPricingConfig;
2326
2692
  /**
2327
2693
  * The id of the billable metric for the price. Only needed if the price is
2328
2694
  * usage-based.
@@ -2387,7 +2753,53 @@ export interface NewSubscriptionThresholdTotalAmountPrice {
2387
2753
  */
2388
2754
  reference_id?: string | null;
2389
2755
  }
2390
- export interface NewSubscriptionTierWithProrationPrice {
2756
+ export declare namespace NewSubscriptionScalableMatrixWithUnitPricingPrice {
2757
+ /**
2758
+ * Configuration for scalable_matrix_with_unit_pricing pricing
2759
+ */
2760
+ interface ScalableMatrixWithUnitPricingConfig {
2761
+ /**
2762
+ * Used to determine the unit rate
2763
+ */
2764
+ first_dimension: string;
2765
+ /**
2766
+ * Apply a scaling factor to each dimension
2767
+ */
2768
+ matrix_scaling_factors: Array<ScalableMatrixWithUnitPricingConfig.MatrixScalingFactor>;
2769
+ /**
2770
+ * The final unit price to rate against the output of the matrix
2771
+ */
2772
+ unit_price: string;
2773
+ /**
2774
+ * If true, the unit price will be prorated to the billing period
2775
+ */
2776
+ prorate?: boolean | null;
2777
+ /**
2778
+ * Used to determine the unit rate (optional)
2779
+ */
2780
+ second_dimension?: string | null;
2781
+ }
2782
+ namespace ScalableMatrixWithUnitPricingConfig {
2783
+ /**
2784
+ * Configuration for a single matrix scaling factor
2785
+ */
2786
+ interface MatrixScalingFactor {
2787
+ /**
2788
+ * First dimension value
2789
+ */
2790
+ first_dimension_value: string;
2791
+ /**
2792
+ * Scaling factor
2793
+ */
2794
+ scaling_factor: string;
2795
+ /**
2796
+ * Second dimension value (optional)
2797
+ */
2798
+ second_dimension_value?: string | null;
2799
+ }
2800
+ }
2801
+ }
2802
+ export interface NewSubscriptionThresholdTotalAmountPrice {
2391
2803
  /**
2392
2804
  * The cadence to bill for this price on.
2393
2805
  */
@@ -2396,14 +2808,18 @@ export interface NewSubscriptionTierWithProrationPrice {
2396
2808
  * The id of the item the price will be associated with.
2397
2809
  */
2398
2810
  item_id: string;
2399
- model_type: 'tiered_with_proration';
2811
+ /**
2812
+ * The pricing model type
2813
+ */
2814
+ model_type: 'threshold_total_amount';
2400
2815
  /**
2401
2816
  * The name of the price.
2402
2817
  */
2403
2818
  name: string;
2404
- tiered_with_proration_config: {
2405
- [key: string]: unknown;
2406
- };
2819
+ /**
2820
+ * Configuration for threshold_total_amount pricing
2821
+ */
2822
+ threshold_total_amount_config: NewSubscriptionThresholdTotalAmountPrice.ThresholdTotalAmountConfig;
2407
2823
  /**
2408
2824
  * The id of the billable metric for the price. Only needed if the price is
2409
2825
  * usage-based.
@@ -2468,6 +2884,37 @@ export interface NewSubscriptionTierWithProrationPrice {
2468
2884
  */
2469
2885
  reference_id?: string | null;
2470
2886
  }
2887
+ export declare namespace NewSubscriptionThresholdTotalAmountPrice {
2888
+ /**
2889
+ * Configuration for threshold_total_amount pricing
2890
+ */
2891
+ interface ThresholdTotalAmountConfig {
2892
+ /**
2893
+ * When the quantity consumed passes a provided threshold, the configured total
2894
+ * will be charged
2895
+ */
2896
+ consumption_table: Array<ThresholdTotalAmountConfig.ConsumptionTable>;
2897
+ /**
2898
+ * If true, the unit price will be prorated to the billing period
2899
+ */
2900
+ prorate?: boolean | null;
2901
+ }
2902
+ namespace ThresholdTotalAmountConfig {
2903
+ /**
2904
+ * Configuration for a single threshold
2905
+ */
2906
+ interface ConsumptionTable {
2907
+ /**
2908
+ * Quantity threshold
2909
+ */
2910
+ threshold: string;
2911
+ /**
2912
+ * Total amount for this threshold
2913
+ */
2914
+ total_amount: string;
2915
+ }
2916
+ }
2917
+ }
2471
2918
  export interface NewSubscriptionTieredPackagePrice {
2472
2919
  /**
2473
2920
  * The cadence to bill for this price on.
@@ -2477,14 +2924,18 @@ export interface NewSubscriptionTieredPackagePrice {
2477
2924
  * The id of the item the price will be associated with.
2478
2925
  */
2479
2926
  item_id: string;
2927
+ /**
2928
+ * The pricing model type
2929
+ */
2480
2930
  model_type: 'tiered_package';
2481
2931
  /**
2482
2932
  * The name of the price.
2483
2933
  */
2484
2934
  name: string;
2485
- tiered_package_config: {
2486
- [key: string]: unknown;
2487
- };
2935
+ /**
2936
+ * Configuration for tiered_package pricing
2937
+ */
2938
+ tiered_package_config: NewSubscriptionTieredPackagePrice.TieredPackageConfig;
2488
2939
  /**
2489
2940
  * The id of the billable metric for the price. Only needed if the price is
2490
2941
  * usage-based.
@@ -2549,6 +3000,39 @@ export interface NewSubscriptionTieredPackagePrice {
2549
3000
  */
2550
3001
  reference_id?: string | null;
2551
3002
  }
3003
+ export declare namespace NewSubscriptionTieredPackagePrice {
3004
+ /**
3005
+ * Configuration for tiered_package pricing
3006
+ */
3007
+ interface TieredPackageConfig {
3008
+ /**
3009
+ * Package size
3010
+ */
3011
+ package_size: string;
3012
+ /**
3013
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
3014
+ * are defined using exclusive lower bounds. The tier bounds are defined based on
3015
+ * the total quantity rather than the number of packages, so they must be multiples
3016
+ * of the package size.
3017
+ */
3018
+ tiers: Array<TieredPackageConfig.Tier>;
3019
+ }
3020
+ namespace TieredPackageConfig {
3021
+ /**
3022
+ * Configuration for a single tier with business logic
3023
+ */
3024
+ interface Tier {
3025
+ /**
3026
+ * Price per package
3027
+ */
3028
+ per_unit: string;
3029
+ /**
3030
+ * Tier lower bound
3031
+ */
3032
+ tier_lower_bound: string;
3033
+ }
3034
+ }
3035
+ }
2552
3036
  export interface NewSubscriptionTieredPackageWithMinimumPrice {
2553
3037
  /**
2554
3038
  * The cadence to bill for this price on.
@@ -2558,14 +3042,18 @@ export interface NewSubscriptionTieredPackageWithMinimumPrice {
2558
3042
  * The id of the item the price will be associated with.
2559
3043
  */
2560
3044
  item_id: string;
3045
+ /**
3046
+ * The pricing model type
3047
+ */
2561
3048
  model_type: 'tiered_package_with_minimum';
2562
3049
  /**
2563
3050
  * The name of the price.
2564
3051
  */
2565
3052
  name: string;
2566
- tiered_package_with_minimum_config: {
2567
- [key: string]: unknown;
2568
- };
3053
+ /**
3054
+ * Configuration for tiered_package_with_minimum pricing
3055
+ */
3056
+ tiered_package_with_minimum_config: NewSubscriptionTieredPackageWithMinimumPrice.TieredPackageWithMinimumConfig;
2569
3057
  /**
2570
3058
  * The id of the billable metric for the price. Only needed if the price is
2571
3059
  * usage-based.
@@ -2630,6 +3118,41 @@ export interface NewSubscriptionTieredPackageWithMinimumPrice {
2630
3118
  */
2631
3119
  reference_id?: string | null;
2632
3120
  }
3121
+ export declare namespace NewSubscriptionTieredPackageWithMinimumPrice {
3122
+ /**
3123
+ * Configuration for tiered_package_with_minimum pricing
3124
+ */
3125
+ interface TieredPackageWithMinimumConfig {
3126
+ /**
3127
+ * Package size
3128
+ */
3129
+ package_size: number;
3130
+ /**
3131
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
3132
+ * are defined using exclusive lower bounds.
3133
+ */
3134
+ tiers: Array<TieredPackageWithMinimumConfig.Tier>;
3135
+ }
3136
+ namespace TieredPackageWithMinimumConfig {
3137
+ /**
3138
+ * Configuration for a single tier
3139
+ */
3140
+ interface Tier {
3141
+ /**
3142
+ * Minimum amount
3143
+ */
3144
+ minimum_amount: string;
3145
+ /**
3146
+ * Price per package
3147
+ */
3148
+ per_unit: string;
3149
+ /**
3150
+ * Tier lower bound
3151
+ */
3152
+ tier_lower_bound: string;
3153
+ }
3154
+ }
3155
+ }
2633
3156
  export interface NewSubscriptionTieredPrice {
2634
3157
  /**
2635
3158
  * The cadence to bill for this price on.
@@ -2639,11 +3162,17 @@ export interface NewSubscriptionTieredPrice {
2639
3162
  * The id of the item the price will be associated with.
2640
3163
  */
2641
3164
  item_id: string;
3165
+ /**
3166
+ * The pricing model type
3167
+ */
2642
3168
  model_type: 'tiered';
2643
3169
  /**
2644
3170
  * The name of the price.
2645
3171
  */
2646
3172
  name: string;
3173
+ /**
3174
+ * Configuration for tiered pricing
3175
+ */
2647
3176
  tiered_config: Shared.TieredConfig;
2648
3177
  /**
2649
3178
  * The id of the billable metric for the price. Only needed if the price is
@@ -2718,14 +3247,18 @@ export interface NewSubscriptionTieredWithMinimumPrice {
2718
3247
  * The id of the item the price will be associated with.
2719
3248
  */
2720
3249
  item_id: string;
3250
+ /**
3251
+ * The pricing model type
3252
+ */
2721
3253
  model_type: 'tiered_with_minimum';
2722
3254
  /**
2723
3255
  * The name of the price.
2724
3256
  */
2725
3257
  name: string;
2726
- tiered_with_minimum_config: {
2727
- [key: string]: unknown;
2728
- };
3258
+ /**
3259
+ * Configuration for tiered_with_minimum pricing
3260
+ */
3261
+ tiered_with_minimum_config: NewSubscriptionTieredWithMinimumPrice.TieredWithMinimumConfig;
2729
3262
  /**
2730
3263
  * The id of the billable metric for the price. Only needed if the price is
2731
3264
  * usage-based.
@@ -2790,6 +3323,45 @@ export interface NewSubscriptionTieredWithMinimumPrice {
2790
3323
  */
2791
3324
  reference_id?: string | null;
2792
3325
  }
3326
+ export declare namespace NewSubscriptionTieredWithMinimumPrice {
3327
+ /**
3328
+ * Configuration for tiered_with_minimum pricing
3329
+ */
3330
+ interface TieredWithMinimumConfig {
3331
+ /**
3332
+ * Tiered pricing with a minimum amount dependent on the volume tier. Tiers are
3333
+ * defined using exclusive lower bounds.
3334
+ */
3335
+ tiers: Array<TieredWithMinimumConfig.Tier>;
3336
+ /**
3337
+ * If true, tiers with an accrued amount of 0 will not be included in the rating.
3338
+ */
3339
+ hide_zero_amount_tiers?: boolean;
3340
+ /**
3341
+ * If true, the unit price will be prorated to the billing period
3342
+ */
3343
+ prorate?: boolean;
3344
+ }
3345
+ namespace TieredWithMinimumConfig {
3346
+ /**
3347
+ * Configuration for a single tier
3348
+ */
3349
+ interface Tier {
3350
+ /**
3351
+ * Minimum amount
3352
+ */
3353
+ minimum_amount: string;
3354
+ /**
3355
+ * Tier lower bound
3356
+ */
3357
+ tier_lower_bound: string;
3358
+ /**
3359
+ * Per unit amount
3360
+ */
3361
+ unit_amount: string;
3362
+ }
3363
+ }
3364
+ }
2793
3365
  export interface NewSubscriptionUnitPrice {
2794
3366
  /**
2795
3367
  * The cadence to bill for this price on.
@@ -2799,11 +3371,17 @@ export interface NewSubscriptionUnitPrice {
2799
3371
  * The id of the item the price will be associated with.
2800
3372
  */
2801
3373
  item_id: string;
3374
+ /**
3375
+ * The pricing model type
3376
+ */
2802
3377
  model_type: 'unit';
2803
3378
  /**
2804
3379
  * The name of the price.
2805
3380
  */
2806
3381
  name: string;
3382
+ /**
3383
+ * Configuration for unit pricing
3384
+ */
2807
3385
  unit_config: Shared.UnitConfig;
2808
3386
  /**
2809
3387
  * The id of the billable metric for the price. Only needed if the price is
@@ -2878,14 +3456,18 @@ export interface NewSubscriptionUnitWithPercentPrice {
2878
3456
  * The id of the item the price will be associated with.
2879
3457
  */
2880
3458
  item_id: string;
3459
+ /**
3460
+ * The pricing model type
3461
+ */
2881
3462
  model_type: 'unit_with_percent';
2882
3463
  /**
2883
3464
  * The name of the price.
2884
3465
  */
2885
3466
  name: string;
2886
- unit_with_percent_config: {
2887
- [key: string]: unknown;
2888
- };
3467
+ /**
3468
+ * Configuration for unit_with_percent pricing
3469
+ */
3470
+ unit_with_percent_config: NewSubscriptionUnitWithPercentPrice.UnitWithPercentConfig;
2889
3471
  /**
2890
3472
  * The id of the billable metric for the price. Only needed if the price is
2891
3473
  * usage-based.
@@ -2950,6 +3532,21 @@ export interface NewSubscriptionUnitWithPercentPrice {
2950
3532
  */
2951
3533
  reference_id?: string | null;
2952
3534
  }
3535
+ export declare namespace NewSubscriptionUnitWithPercentPrice {
3536
+ /**
3537
+ * Configuration for unit_with_percent pricing
3538
+ */
3539
+ interface UnitWithPercentConfig {
3540
+ /**
3541
+ * What percent, out of 100, of the calculated total to charge
3542
+ */
3543
+ percent: string;
3544
+ /**
3545
+ * Rate per unit of usage
3546
+ */
3547
+ unit_amount: string;
3548
+ }
3549
+ }
2953
3550
  export interface NewSubscriptionUnitWithProrationPrice {
2954
3551
  /**
2955
3552
  * The cadence to bill for this price on.
@@ -2959,14 +3556,18 @@ export interface NewSubscriptionUnitWithProrationPrice {
2959
3556
  * The id of the item the price will be associated with.
2960
3557
  */
2961
3558
  item_id: string;
3559
+ /**
3560
+ * The pricing model type
3561
+ */
2962
3562
  model_type: 'unit_with_proration';
2963
3563
  /**
2964
3564
  * The name of the price.
2965
3565
  */
2966
3566
  name: string;
2967
- unit_with_proration_config: {
2968
- [key: string]: unknown;
2969
- };
3567
+ /**
3568
+ * Configuration for unit_with_proration pricing
3569
+ */
3570
+ unit_with_proration_config: NewSubscriptionUnitWithProrationPrice.UnitWithProrationConfig;
2970
3571
  /**
2971
3572
  * The id of the billable metric for the price. Only needed if the price is
2972
3573
  * usage-based.
@@ -3031,6 +3632,17 @@ export interface NewSubscriptionUnitWithProrationPrice {
3031
3632
  */
3032
3633
  reference_id?: string | null;
3033
3634
  }
3635
+ export declare namespace NewSubscriptionUnitWithProrationPrice {
3636
+ /**
3637
+ * Configuration for unit_with_proration pricing
3638
+ */
3639
+ interface UnitWithProrationConfig {
3640
+ /**
3641
+ * Rate per unit of usage
3642
+ */
3643
+ unit_amount: string;
3644
+ }
3645
+ }
3034
3646
  /**
3035
3647
  * A [subscription](/core-concepts#subscription) represents the purchase of a plan
3036
3648
  * by a customer.
@@ -3465,9 +4077,9 @@ export declare namespace SubscriptionCreateParams {
3465
4077
  */
3466
4078
  plan_phase_order?: number | null;
3467
4079
  /**
3468
- * The definition of a new price to create and add to the subscription.
4080
+ * New subscription price request body params.
3469
4081
  */
3470
- price?: SubscriptionsAPI.NewSubscriptionUnitPrice | SubscriptionsAPI.NewSubscriptionPackagePrice | SubscriptionsAPI.NewSubscriptionMatrixPrice | SubscriptionsAPI.NewSubscriptionTieredPrice | SubscriptionsAPI.NewSubscriptionBulkPrice | SubscriptionsAPI.NewSubscriptionThresholdTotalAmountPrice | SubscriptionsAPI.NewSubscriptionTieredPackagePrice | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice | SubscriptionsAPI.NewSubscriptionTierWithProrationPrice | SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedAllocationPrice | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice | SubscriptionsAPI.NewSubscriptionBulkWithProrationPrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice | SubscriptionsAPI.NewSubscriptionGroupedWithMeteredMinimumPrice | SubscriptionsAPI.NewSubscriptionMatrixWithDisplayNamePrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPackagePrice | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice | AddPrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice | null;
4082
+ price?: SubscriptionsAPI.NewSubscriptionUnitPrice | SubscriptionsAPI.NewSubscriptionTieredPrice | SubscriptionsAPI.NewSubscriptionBulkPrice | SubscriptionsAPI.NewSubscriptionPackagePrice | SubscriptionsAPI.NewSubscriptionMatrixPrice | SubscriptionsAPI.NewSubscriptionThresholdTotalAmountPrice | SubscriptionsAPI.NewSubscriptionTieredPackagePrice | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice | AddPrice.NewSubscriptionTieredWithProrationPrice | SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedAllocationPrice | SubscriptionsAPI.NewSubscriptionBulkWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedWithMeteredMinimumPrice | AddPrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice | SubscriptionsAPI.NewSubscriptionMatrixWithDisplayNamePrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPackagePrice | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice | null;
3471
4083
  /**
3472
4084
  * The id of the price to add to the subscription.
3473
4085
  */
@@ -3480,23 +4092,27 @@ export declare namespace SubscriptionCreateParams {
3480
4092
  start_date?: string | null;
3481
4093
  }
3482
4094
  namespace AddPrice {
3483
- interface NewSubscriptionGroupedWithMinMaxThresholdsPrice {
4095
+ interface NewSubscriptionTieredWithProrationPrice {
3484
4096
  /**
3485
4097
  * The cadence to bill for this price on.
3486
4098
  */
3487
4099
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
3488
- grouped_with_min_max_thresholds_config: {
3489
- [key: string]: unknown;
3490
- };
3491
4100
  /**
3492
4101
  * The id of the item the price will be associated with.
3493
4102
  */
3494
4103
  item_id: string;
3495
- model_type: 'grouped_with_min_max_thresholds';
4104
+ /**
4105
+ * The pricing model type
4106
+ */
4107
+ model_type: 'tiered_with_proration';
3496
4108
  /**
3497
4109
  * The name of the price.
3498
4110
  */
3499
4111
  name: string;
4112
+ /**
4113
+ * Configuration for tiered_with_proration pricing
4114
+ */
4115
+ tiered_with_proration_config: NewSubscriptionTieredWithProrationPrice.TieredWithProrationConfig;
3500
4116
  /**
3501
4117
  * The id of the billable metric for the price. Only needed if the price is
3502
4118
  * usage-based.
@@ -3561,13 +4177,148 @@ export declare namespace SubscriptionCreateParams {
3561
4177
  */
3562
4178
  reference_id?: string | null;
3563
4179
  }
3564
- }
3565
- interface RemoveAdjustment {
3566
- /**
3567
- * The id of the adjustment to remove on the subscription.
3568
- */
3569
- adjustment_id: string;
3570
- }
4180
+ namespace NewSubscriptionTieredWithProrationPrice {
4181
+ /**
4182
+ * Configuration for tiered_with_proration pricing
4183
+ */
4184
+ interface TieredWithProrationConfig {
4185
+ /**
4186
+ * Tiers for rating based on total usage quantities into the specified tier with
4187
+ * proration
4188
+ */
4189
+ tiers: Array<TieredWithProrationConfig.Tier>;
4190
+ }
4191
+ namespace TieredWithProrationConfig {
4192
+ /**
4193
+ * Configuration for a single tiered with proration tier
4194
+ */
4195
+ interface Tier {
4196
+ /**
4197
+ * Inclusive tier starting value
4198
+ */
4199
+ tier_lower_bound: string;
4200
+ /**
4201
+ * Amount per unit
4202
+ */
4203
+ unit_amount: string;
4204
+ }
4205
+ }
4206
+ }
4207
+ interface NewSubscriptionGroupedWithMinMaxThresholdsPrice {
4208
+ /**
4209
+ * The cadence to bill for this price on.
4210
+ */
4211
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4212
+ /**
4213
+ * Configuration for grouped_with_min_max_thresholds pricing
4214
+ */
4215
+ grouped_with_min_max_thresholds_config: NewSubscriptionGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
4216
+ /**
4217
+ * The id of the item the price will be associated with.
4218
+ */
4219
+ item_id: string;
4220
+ /**
4221
+ * The pricing model type
4222
+ */
4223
+ model_type: 'grouped_with_min_max_thresholds';
4224
+ /**
4225
+ * The name of the price.
4226
+ */
4227
+ name: string;
4228
+ /**
4229
+ * The id of the billable metric for the price. Only needed if the price is
4230
+ * usage-based.
4231
+ */
4232
+ billable_metric_id?: string | null;
4233
+ /**
4234
+ * If the Price represents a fixed cost, the price will be billed in-advance if
4235
+ * this is true, and in-arrears if this is false.
4236
+ */
4237
+ billed_in_advance?: boolean | null;
4238
+ /**
4239
+ * For custom cadence: specifies the duration of the billing period in days or
4240
+ * months.
4241
+ */
4242
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4243
+ /**
4244
+ * The per unit conversion rate of the price currency to the invoicing currency.
4245
+ */
4246
+ conversion_rate?: number | null;
4247
+ /**
4248
+ * The configuration for the rate of the price currency to the invoicing currency.
4249
+ */
4250
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
4251
+ /**
4252
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
4253
+ * price is billed.
4254
+ */
4255
+ currency?: string | null;
4256
+ /**
4257
+ * For dimensional price: specifies a price group and dimension values
4258
+ */
4259
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
4260
+ /**
4261
+ * An alias for the price.
4262
+ */
4263
+ external_price_id?: string | null;
4264
+ /**
4265
+ * If the Price represents a fixed cost, this represents the quantity of units
4266
+ * applied.
4267
+ */
4268
+ fixed_price_quantity?: number | null;
4269
+ /**
4270
+ * The property used to group this price on an invoice
4271
+ */
4272
+ invoice_grouping_key?: string | null;
4273
+ /**
4274
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4275
+ * If unspecified, a single invoice is produced per billing cycle.
4276
+ */
4277
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4278
+ /**
4279
+ * User-specified key/value pairs for the resource. Individual keys can be removed
4280
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
4281
+ * by setting `metadata` to `null`.
4282
+ */
4283
+ metadata?: {
4284
+ [key: string]: string | null;
4285
+ } | null;
4286
+ /**
4287
+ * A transient ID that can be used to reference this price when adding adjustments
4288
+ * in the same API call.
4289
+ */
4290
+ reference_id?: string | null;
4291
+ }
4292
+ namespace NewSubscriptionGroupedWithMinMaxThresholdsPrice {
4293
+ /**
4294
+ * Configuration for grouped_with_min_max_thresholds pricing
4295
+ */
4296
+ interface GroupedWithMinMaxThresholdsConfig {
4297
+ /**
4298
+ * The event property used to group before applying thresholds
4299
+ */
4300
+ grouping_key: string;
4301
+ /**
4302
+ * The maximum amount to charge each group
4303
+ */
4304
+ maximum_charge: string;
4305
+ /**
4306
+ * The minimum amount to charge each group, regardless of usage
4307
+ */
4308
+ minimum_charge: string;
4309
+ /**
4310
+ * The base price charged per group
4311
+ */
4312
+ per_unit_rate: string;
4313
+ }
4314
+ }
4315
+ }
4316
+ interface RemoveAdjustment {
4317
+ /**
4318
+ * The id of the adjustment to remove on the subscription.
4319
+ */
4320
+ adjustment_id: string;
4321
+ }
3571
4322
  interface RemovePrice {
3572
4323
  /**
3573
4324
  * The external price id of the price to remove on the subscription.
@@ -3621,27 +4372,143 @@ export declare namespace SubscriptionCreateParams {
3621
4372
  */
3622
4373
  minimum_amount?: string | null;
3623
4374
  /**
3624
- * The definition of a new price to create and add to the subscription.
4375
+ * New subscription price request body params.
3625
4376
  */
3626
- price?: SubscriptionsAPI.NewSubscriptionUnitPrice | SubscriptionsAPI.NewSubscriptionPackagePrice | SubscriptionsAPI.NewSubscriptionMatrixPrice | SubscriptionsAPI.NewSubscriptionTieredPrice | SubscriptionsAPI.NewSubscriptionBulkPrice | SubscriptionsAPI.NewSubscriptionThresholdTotalAmountPrice | SubscriptionsAPI.NewSubscriptionTieredPackagePrice | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice | SubscriptionsAPI.NewSubscriptionTierWithProrationPrice | SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedAllocationPrice | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice | SubscriptionsAPI.NewSubscriptionBulkWithProrationPrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice | SubscriptionsAPI.NewSubscriptionGroupedWithMeteredMinimumPrice | SubscriptionsAPI.NewSubscriptionMatrixWithDisplayNamePrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPackagePrice | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice | ReplacePrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice | null;
4377
+ price?: SubscriptionsAPI.NewSubscriptionUnitPrice | SubscriptionsAPI.NewSubscriptionTieredPrice | SubscriptionsAPI.NewSubscriptionBulkPrice | SubscriptionsAPI.NewSubscriptionPackagePrice | SubscriptionsAPI.NewSubscriptionMatrixPrice | SubscriptionsAPI.NewSubscriptionThresholdTotalAmountPrice | SubscriptionsAPI.NewSubscriptionTieredPackagePrice | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice | ReplacePrice.NewSubscriptionTieredWithProrationPrice | SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedAllocationPrice | SubscriptionsAPI.NewSubscriptionBulkWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedWithMeteredMinimumPrice | ReplacePrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice | SubscriptionsAPI.NewSubscriptionMatrixWithDisplayNamePrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPackagePrice | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice | null;
3627
4378
  /**
3628
4379
  * The id of the price to add to the subscription.
3629
4380
  */
3630
4381
  price_id?: string | null;
3631
4382
  }
3632
4383
  namespace ReplacePrice {
4384
+ interface NewSubscriptionTieredWithProrationPrice {
4385
+ /**
4386
+ * The cadence to bill for this price on.
4387
+ */
4388
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4389
+ /**
4390
+ * The id of the item the price will be associated with.
4391
+ */
4392
+ item_id: string;
4393
+ /**
4394
+ * The pricing model type
4395
+ */
4396
+ model_type: 'tiered_with_proration';
4397
+ /**
4398
+ * The name of the price.
4399
+ */
4400
+ name: string;
4401
+ /**
4402
+ * Configuration for tiered_with_proration pricing
4403
+ */
4404
+ tiered_with_proration_config: NewSubscriptionTieredWithProrationPrice.TieredWithProrationConfig;
4405
+ /**
4406
+ * The id of the billable metric for the price. Only needed if the price is
4407
+ * usage-based.
4408
+ */
4409
+ billable_metric_id?: string | null;
4410
+ /**
4411
+ * If the Price represents a fixed cost, the price will be billed in-advance if
4412
+ * this is true, and in-arrears if this is false.
4413
+ */
4414
+ billed_in_advance?: boolean | null;
4415
+ /**
4416
+ * For custom cadence: specifies the duration of the billing period in days or
4417
+ * months.
4418
+ */
4419
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4420
+ /**
4421
+ * The per unit conversion rate of the price currency to the invoicing currency.
4422
+ */
4423
+ conversion_rate?: number | null;
4424
+ /**
4425
+ * The configuration for the rate of the price currency to the invoicing currency.
4426
+ */
4427
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
4428
+ /**
4429
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
4430
+ * price is billed.
4431
+ */
4432
+ currency?: string | null;
4433
+ /**
4434
+ * For dimensional price: specifies a price group and dimension values
4435
+ */
4436
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
4437
+ /**
4438
+ * An alias for the price.
4439
+ */
4440
+ external_price_id?: string | null;
4441
+ /**
4442
+ * If the Price represents a fixed cost, this represents the quantity of units
4443
+ * applied.
4444
+ */
4445
+ fixed_price_quantity?: number | null;
4446
+ /**
4447
+ * The property used to group this price on an invoice
4448
+ */
4449
+ invoice_grouping_key?: string | null;
4450
+ /**
4451
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4452
+ * If unspecified, a single invoice is produced per billing cycle.
4453
+ */
4454
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4455
+ /**
4456
+ * User-specified key/value pairs for the resource. Individual keys can be removed
4457
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
4458
+ * by setting `metadata` to `null`.
4459
+ */
4460
+ metadata?: {
4461
+ [key: string]: string | null;
4462
+ } | null;
4463
+ /**
4464
+ * A transient ID that can be used to reference this price when adding adjustments
4465
+ * in the same API call.
4466
+ */
4467
+ reference_id?: string | null;
4468
+ }
4469
+ namespace NewSubscriptionTieredWithProrationPrice {
4470
+ /**
4471
+ * Configuration for tiered_with_proration pricing
4472
+ */
4473
+ interface TieredWithProrationConfig {
4474
+ /**
4475
+ * Tiers for rating based on total usage quantities into the specified tier with
4476
+ * proration
4477
+ */
4478
+ tiers: Array<TieredWithProrationConfig.Tier>;
4479
+ }
4480
+ namespace TieredWithProrationConfig {
4481
+ /**
4482
+ * Configuration for a single tiered with proration tier
4483
+ */
4484
+ interface Tier {
4485
+ /**
4486
+ * Inclusive tier starting value
4487
+ */
4488
+ tier_lower_bound: string;
4489
+ /**
4490
+ * Amount per unit
4491
+ */
4492
+ unit_amount: string;
4493
+ }
4494
+ }
4495
+ }
3633
4496
  interface NewSubscriptionGroupedWithMinMaxThresholdsPrice {
3634
4497
  /**
3635
4498
  * The cadence to bill for this price on.
3636
4499
  */
3637
4500
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
3638
- grouped_with_min_max_thresholds_config: {
3639
- [key: string]: unknown;
3640
- };
4501
+ /**
4502
+ * Configuration for grouped_with_min_max_thresholds pricing
4503
+ */
4504
+ grouped_with_min_max_thresholds_config: NewSubscriptionGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
3641
4505
  /**
3642
4506
  * The id of the item the price will be associated with.
3643
4507
  */
3644
4508
  item_id: string;
4509
+ /**
4510
+ * The pricing model type
4511
+ */
3645
4512
  model_type: 'grouped_with_min_max_thresholds';
3646
4513
  /**
3647
4514
  * The name of the price.
@@ -3711,6 +4578,29 @@ export declare namespace SubscriptionCreateParams {
3711
4578
  */
3712
4579
  reference_id?: string | null;
3713
4580
  }
4581
+ namespace NewSubscriptionGroupedWithMinMaxThresholdsPrice {
4582
+ /**
4583
+ * Configuration for grouped_with_min_max_thresholds pricing
4584
+ */
4585
+ interface GroupedWithMinMaxThresholdsConfig {
4586
+ /**
4587
+ * The event property used to group before applying thresholds
4588
+ */
4589
+ grouping_key: string;
4590
+ /**
4591
+ * The maximum amount to charge each group
4592
+ */
4593
+ maximum_charge: string;
4594
+ /**
4595
+ * The minimum amount to charge each group, regardless of usage
4596
+ */
4597
+ minimum_charge: string;
4598
+ /**
4599
+ * The base price charged per group
4600
+ */
4601
+ per_unit_rate: string;
4602
+ }
4603
+ }
3714
4604
  }
3715
4605
  }
3716
4606
  export interface SubscriptionUpdateParams {
@@ -3905,9 +4795,9 @@ export declare namespace SubscriptionPriceIntervalsParams {
3905
4795
  */
3906
4796
  minimum_amount?: number | null;
3907
4797
  /**
3908
- * The definition of a new price to create and add to the subscription.
4798
+ * New floating price request body params.
3909
4799
  */
3910
- 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 | Add.NewFloatingGroupedWithMinMaxThresholdsPrice | Shared.NewFloatingMinimumCompositePrice | null;
4800
+ 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 | Add.NewFloatingGroupedWithMinMaxThresholdsPrice | Shared.NewFloatingMatrixWithDisplayNamePrice | Shared.NewFloatingGroupedTieredPackagePrice | Shared.NewFloatingMaxGroupTieredPackagePrice | Shared.NewFloatingScalableMatrixWithUnitPricingPrice | Shared.NewFloatingScalableMatrixWithTieredPricingPrice | Shared.NewFloatingCumulativeGroupedBulkPrice | Shared.NewFloatingMinimumCompositePrice | null;
3911
4801
  /**
3912
4802
  * The id of the price to add to the subscription.
3913
4803
  */
@@ -3965,13 +4855,17 @@ export declare namespace SubscriptionPriceIntervalsParams {
3965
4855
  * An ISO 4217 currency string for which this price is billed in.
3966
4856
  */
3967
4857
  currency: string;
3968
- grouped_with_min_max_thresholds_config: {
3969
- [key: string]: unknown;
3970
- };
4858
+ /**
4859
+ * Configuration for grouped_with_min_max_thresholds pricing
4860
+ */
4861
+ grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
3971
4862
  /**
3972
4863
  * The id of the item the price will be associated with.
3973
4864
  */
3974
4865
  item_id: string;
4866
+ /**
4867
+ * The pricing model type
4868
+ */
3975
4869
  model_type: 'grouped_with_min_max_thresholds';
3976
4870
  /**
3977
4871
  * The name of the price.
@@ -4031,6 +4925,29 @@ export declare namespace SubscriptionPriceIntervalsParams {
4031
4925
  [key: string]: string | null;
4032
4926
  } | null;
4033
4927
  }
4928
+ namespace NewFloatingGroupedWithMinMaxThresholdsPrice {
4929
+ /**
4930
+ * Configuration for grouped_with_min_max_thresholds pricing
4931
+ */
4932
+ interface GroupedWithMinMaxThresholdsConfig {
4933
+ /**
4934
+ * The event property used to group before applying thresholds
4935
+ */
4936
+ grouping_key: string;
4937
+ /**
4938
+ * The maximum amount to charge each group
4939
+ */
4940
+ maximum_charge: string;
4941
+ /**
4942
+ * The minimum amount to charge each group, regardless of usage
4943
+ */
4944
+ minimum_charge: string;
4945
+ /**
4946
+ * The base price charged per group
4947
+ */
4948
+ per_unit_rate: string;
4949
+ }
4950
+ }
4034
4951
  }
4035
4952
  interface AddAdjustment {
4036
4953
  /**
@@ -4344,9 +5261,9 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
4344
5261
  */
4345
5262
  plan_phase_order?: number | null;
4346
5263
  /**
4347
- * The definition of a new price to create and add to the subscription.
5264
+ * New subscription price request body params.
4348
5265
  */
4349
- price?: SubscriptionsAPI.NewSubscriptionUnitPrice | SubscriptionsAPI.NewSubscriptionPackagePrice | SubscriptionsAPI.NewSubscriptionMatrixPrice | SubscriptionsAPI.NewSubscriptionTieredPrice | SubscriptionsAPI.NewSubscriptionBulkPrice | SubscriptionsAPI.NewSubscriptionThresholdTotalAmountPrice | SubscriptionsAPI.NewSubscriptionTieredPackagePrice | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice | SubscriptionsAPI.NewSubscriptionTierWithProrationPrice | SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedAllocationPrice | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice | SubscriptionsAPI.NewSubscriptionBulkWithProrationPrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice | SubscriptionsAPI.NewSubscriptionGroupedWithMeteredMinimumPrice | SubscriptionsAPI.NewSubscriptionMatrixWithDisplayNamePrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPackagePrice | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice | AddPrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice | null;
5266
+ price?: SubscriptionsAPI.NewSubscriptionUnitPrice | SubscriptionsAPI.NewSubscriptionTieredPrice | SubscriptionsAPI.NewSubscriptionBulkPrice | SubscriptionsAPI.NewSubscriptionPackagePrice | SubscriptionsAPI.NewSubscriptionMatrixPrice | SubscriptionsAPI.NewSubscriptionThresholdTotalAmountPrice | SubscriptionsAPI.NewSubscriptionTieredPackagePrice | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice | AddPrice.NewSubscriptionTieredWithProrationPrice | SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedAllocationPrice | SubscriptionsAPI.NewSubscriptionBulkWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedWithMeteredMinimumPrice | AddPrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice | SubscriptionsAPI.NewSubscriptionMatrixWithDisplayNamePrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPackagePrice | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice | null;
4350
5267
  /**
4351
5268
  * The id of the price to add to the subscription.
4352
5269
  */
@@ -4359,18 +5276,134 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
4359
5276
  start_date?: string | null;
4360
5277
  }
4361
5278
  namespace AddPrice {
5279
+ interface NewSubscriptionTieredWithProrationPrice {
5280
+ /**
5281
+ * The cadence to bill for this price on.
5282
+ */
5283
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
5284
+ /**
5285
+ * The id of the item the price will be associated with.
5286
+ */
5287
+ item_id: string;
5288
+ /**
5289
+ * The pricing model type
5290
+ */
5291
+ model_type: 'tiered_with_proration';
5292
+ /**
5293
+ * The name of the price.
5294
+ */
5295
+ name: string;
5296
+ /**
5297
+ * Configuration for tiered_with_proration pricing
5298
+ */
5299
+ tiered_with_proration_config: NewSubscriptionTieredWithProrationPrice.TieredWithProrationConfig;
5300
+ /**
5301
+ * The id of the billable metric for the price. Only needed if the price is
5302
+ * usage-based.
5303
+ */
5304
+ billable_metric_id?: string | null;
5305
+ /**
5306
+ * If the Price represents a fixed cost, the price will be billed in-advance if
5307
+ * this is true, and in-arrears if this is false.
5308
+ */
5309
+ billed_in_advance?: boolean | null;
5310
+ /**
5311
+ * For custom cadence: specifies the duration of the billing period in days or
5312
+ * months.
5313
+ */
5314
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
5315
+ /**
5316
+ * The per unit conversion rate of the price currency to the invoicing currency.
5317
+ */
5318
+ conversion_rate?: number | null;
5319
+ /**
5320
+ * The configuration for the rate of the price currency to the invoicing currency.
5321
+ */
5322
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
5323
+ /**
5324
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
5325
+ * price is billed.
5326
+ */
5327
+ currency?: string | null;
5328
+ /**
5329
+ * For dimensional price: specifies a price group and dimension values
5330
+ */
5331
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
5332
+ /**
5333
+ * An alias for the price.
5334
+ */
5335
+ external_price_id?: string | null;
5336
+ /**
5337
+ * If the Price represents a fixed cost, this represents the quantity of units
5338
+ * applied.
5339
+ */
5340
+ fixed_price_quantity?: number | null;
5341
+ /**
5342
+ * The property used to group this price on an invoice
5343
+ */
5344
+ invoice_grouping_key?: string | null;
5345
+ /**
5346
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5347
+ * If unspecified, a single invoice is produced per billing cycle.
5348
+ */
5349
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
5350
+ /**
5351
+ * User-specified key/value pairs for the resource. Individual keys can be removed
5352
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
5353
+ * by setting `metadata` to `null`.
5354
+ */
5355
+ metadata?: {
5356
+ [key: string]: string | null;
5357
+ } | null;
5358
+ /**
5359
+ * A transient ID that can be used to reference this price when adding adjustments
5360
+ * in the same API call.
5361
+ */
5362
+ reference_id?: string | null;
5363
+ }
5364
+ namespace NewSubscriptionTieredWithProrationPrice {
5365
+ /**
5366
+ * Configuration for tiered_with_proration pricing
5367
+ */
5368
+ interface TieredWithProrationConfig {
5369
+ /**
5370
+ * Tiers for rating based on total usage quantities into the specified tier with
5371
+ * proration
5372
+ */
5373
+ tiers: Array<TieredWithProrationConfig.Tier>;
5374
+ }
5375
+ namespace TieredWithProrationConfig {
5376
+ /**
5377
+ * Configuration for a single tiered with proration tier
5378
+ */
5379
+ interface Tier {
5380
+ /**
5381
+ * Inclusive tier starting value
5382
+ */
5383
+ tier_lower_bound: string;
5384
+ /**
5385
+ * Amount per unit
5386
+ */
5387
+ unit_amount: string;
5388
+ }
5389
+ }
5390
+ }
4362
5391
  interface NewSubscriptionGroupedWithMinMaxThresholdsPrice {
4363
5392
  /**
4364
5393
  * The cadence to bill for this price on.
4365
5394
  */
4366
5395
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4367
- grouped_with_min_max_thresholds_config: {
4368
- [key: string]: unknown;
4369
- };
5396
+ /**
5397
+ * Configuration for grouped_with_min_max_thresholds pricing
5398
+ */
5399
+ grouped_with_min_max_thresholds_config: NewSubscriptionGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
4370
5400
  /**
4371
5401
  * The id of the item the price will be associated with.
4372
5402
  */
4373
5403
  item_id: string;
5404
+ /**
5405
+ * The pricing model type
5406
+ */
4374
5407
  model_type: 'grouped_with_min_max_thresholds';
4375
5408
  /**
4376
5409
  * The name of the price.
@@ -4440,6 +5473,29 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
4440
5473
  */
4441
5474
  reference_id?: string | null;
4442
5475
  }
5476
+ namespace NewSubscriptionGroupedWithMinMaxThresholdsPrice {
5477
+ /**
5478
+ * Configuration for grouped_with_min_max_thresholds pricing
5479
+ */
5480
+ interface GroupedWithMinMaxThresholdsConfig {
5481
+ /**
5482
+ * The event property used to group before applying thresholds
5483
+ */
5484
+ grouping_key: string;
5485
+ /**
5486
+ * The maximum amount to charge each group
5487
+ */
5488
+ maximum_charge: string;
5489
+ /**
5490
+ * The minimum amount to charge each group, regardless of usage
5491
+ */
5492
+ minimum_charge: string;
5493
+ /**
5494
+ * The base price charged per group
5495
+ */
5496
+ per_unit_rate: string;
5497
+ }
5498
+ }
4443
5499
  }
4444
5500
  interface RemoveAdjustment {
4445
5501
  /**
@@ -4500,27 +5556,143 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
4500
5556
  */
4501
5557
  minimum_amount?: string | null;
4502
5558
  /**
4503
- * The definition of a new price to create and add to the subscription.
5559
+ * New subscription price request body params.
4504
5560
  */
4505
- price?: SubscriptionsAPI.NewSubscriptionUnitPrice | SubscriptionsAPI.NewSubscriptionPackagePrice | SubscriptionsAPI.NewSubscriptionMatrixPrice | SubscriptionsAPI.NewSubscriptionTieredPrice | SubscriptionsAPI.NewSubscriptionBulkPrice | SubscriptionsAPI.NewSubscriptionThresholdTotalAmountPrice | SubscriptionsAPI.NewSubscriptionTieredPackagePrice | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice | SubscriptionsAPI.NewSubscriptionTierWithProrationPrice | SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedAllocationPrice | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice | SubscriptionsAPI.NewSubscriptionBulkWithProrationPrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice | SubscriptionsAPI.NewSubscriptionGroupedWithMeteredMinimumPrice | SubscriptionsAPI.NewSubscriptionMatrixWithDisplayNamePrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPackagePrice | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice | ReplacePrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice | null;
5561
+ price?: SubscriptionsAPI.NewSubscriptionUnitPrice | SubscriptionsAPI.NewSubscriptionTieredPrice | SubscriptionsAPI.NewSubscriptionBulkPrice | SubscriptionsAPI.NewSubscriptionPackagePrice | SubscriptionsAPI.NewSubscriptionMatrixPrice | SubscriptionsAPI.NewSubscriptionThresholdTotalAmountPrice | SubscriptionsAPI.NewSubscriptionTieredPackagePrice | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice | ReplacePrice.NewSubscriptionTieredWithProrationPrice | SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedAllocationPrice | SubscriptionsAPI.NewSubscriptionBulkWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedWithMeteredMinimumPrice | ReplacePrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice | SubscriptionsAPI.NewSubscriptionMatrixWithDisplayNamePrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPackagePrice | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice | null;
4506
5562
  /**
4507
5563
  * The id of the price to add to the subscription.
4508
5564
  */
4509
5565
  price_id?: string | null;
4510
5566
  }
4511
5567
  namespace ReplacePrice {
5568
+ interface NewSubscriptionTieredWithProrationPrice {
5569
+ /**
5570
+ * The cadence to bill for this price on.
5571
+ */
5572
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
5573
+ /**
5574
+ * The id of the item the price will be associated with.
5575
+ */
5576
+ item_id: string;
5577
+ /**
5578
+ * The pricing model type
5579
+ */
5580
+ model_type: 'tiered_with_proration';
5581
+ /**
5582
+ * The name of the price.
5583
+ */
5584
+ name: string;
5585
+ /**
5586
+ * Configuration for tiered_with_proration pricing
5587
+ */
5588
+ tiered_with_proration_config: NewSubscriptionTieredWithProrationPrice.TieredWithProrationConfig;
5589
+ /**
5590
+ * The id of the billable metric for the price. Only needed if the price is
5591
+ * usage-based.
5592
+ */
5593
+ billable_metric_id?: string | null;
5594
+ /**
5595
+ * If the Price represents a fixed cost, the price will be billed in-advance if
5596
+ * this is true, and in-arrears if this is false.
5597
+ */
5598
+ billed_in_advance?: boolean | null;
5599
+ /**
5600
+ * For custom cadence: specifies the duration of the billing period in days or
5601
+ * months.
5602
+ */
5603
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
5604
+ /**
5605
+ * The per unit conversion rate of the price currency to the invoicing currency.
5606
+ */
5607
+ conversion_rate?: number | null;
5608
+ /**
5609
+ * The configuration for the rate of the price currency to the invoicing currency.
5610
+ */
5611
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
5612
+ /**
5613
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
5614
+ * price is billed.
5615
+ */
5616
+ currency?: string | null;
5617
+ /**
5618
+ * For dimensional price: specifies a price group and dimension values
5619
+ */
5620
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
5621
+ /**
5622
+ * An alias for the price.
5623
+ */
5624
+ external_price_id?: string | null;
5625
+ /**
5626
+ * If the Price represents a fixed cost, this represents the quantity of units
5627
+ * applied.
5628
+ */
5629
+ fixed_price_quantity?: number | null;
5630
+ /**
5631
+ * The property used to group this price on an invoice
5632
+ */
5633
+ invoice_grouping_key?: string | null;
5634
+ /**
5635
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5636
+ * If unspecified, a single invoice is produced per billing cycle.
5637
+ */
5638
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
5639
+ /**
5640
+ * User-specified key/value pairs for the resource. Individual keys can be removed
5641
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
5642
+ * by setting `metadata` to `null`.
5643
+ */
5644
+ metadata?: {
5645
+ [key: string]: string | null;
5646
+ } | null;
5647
+ /**
5648
+ * A transient ID that can be used to reference this price when adding adjustments
5649
+ * in the same API call.
5650
+ */
5651
+ reference_id?: string | null;
5652
+ }
5653
+ namespace NewSubscriptionTieredWithProrationPrice {
5654
+ /**
5655
+ * Configuration for tiered_with_proration pricing
5656
+ */
5657
+ interface TieredWithProrationConfig {
5658
+ /**
5659
+ * Tiers for rating based on total usage quantities into the specified tier with
5660
+ * proration
5661
+ */
5662
+ tiers: Array<TieredWithProrationConfig.Tier>;
5663
+ }
5664
+ namespace TieredWithProrationConfig {
5665
+ /**
5666
+ * Configuration for a single tiered with proration tier
5667
+ */
5668
+ interface Tier {
5669
+ /**
5670
+ * Inclusive tier starting value
5671
+ */
5672
+ tier_lower_bound: string;
5673
+ /**
5674
+ * Amount per unit
5675
+ */
5676
+ unit_amount: string;
5677
+ }
5678
+ }
5679
+ }
4512
5680
  interface NewSubscriptionGroupedWithMinMaxThresholdsPrice {
4513
5681
  /**
4514
5682
  * The cadence to bill for this price on.
4515
5683
  */
4516
5684
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4517
- grouped_with_min_max_thresholds_config: {
4518
- [key: string]: unknown;
4519
- };
5685
+ /**
5686
+ * Configuration for grouped_with_min_max_thresholds pricing
5687
+ */
5688
+ grouped_with_min_max_thresholds_config: NewSubscriptionGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
4520
5689
  /**
4521
5690
  * The id of the item the price will be associated with.
4522
5691
  */
4523
5692
  item_id: string;
5693
+ /**
5694
+ * The pricing model type
5695
+ */
4524
5696
  model_type: 'grouped_with_min_max_thresholds';
4525
5697
  /**
4526
5698
  * The name of the price.
@@ -4590,6 +5762,29 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
4590
5762
  */
4591
5763
  reference_id?: string | null;
4592
5764
  }
5765
+ namespace NewSubscriptionGroupedWithMinMaxThresholdsPrice {
5766
+ /**
5767
+ * Configuration for grouped_with_min_max_thresholds pricing
5768
+ */
5769
+ interface GroupedWithMinMaxThresholdsConfig {
5770
+ /**
5771
+ * The event property used to group before applying thresholds
5772
+ */
5773
+ grouping_key: string;
5774
+ /**
5775
+ * The maximum amount to charge each group
5776
+ */
5777
+ maximum_charge: string;
5778
+ /**
5779
+ * The minimum amount to charge each group, regardless of usage
5780
+ */
5781
+ minimum_charge: string;
5782
+ /**
5783
+ * The base price charged per group
5784
+ */
5785
+ per_unit_rate: string;
5786
+ }
5787
+ }
4593
5788
  }
4594
5789
  }
4595
5790
  export interface SubscriptionTriggerPhaseParams {
@@ -4649,6 +5844,6 @@ export interface SubscriptionUpdateTrialParams {
4649
5844
  shift?: boolean;
4650
5845
  }
4651
5846
  export declare namespace Subscriptions {
4652
- export { type DiscountOverride as DiscountOverride, type NewSubscriptionBulkPrice as NewSubscriptionBulkPrice, type NewSubscriptionBulkWithProrationPrice as NewSubscriptionBulkWithProrationPrice, type NewSubscriptionCumulativeGroupedBulkPrice as NewSubscriptionCumulativeGroupedBulkPrice, type NewSubscriptionGroupedAllocationPrice as NewSubscriptionGroupedAllocationPrice, type NewSubscriptionGroupedTieredPackagePrice as NewSubscriptionGroupedTieredPackagePrice, type NewSubscriptionGroupedTieredPrice as NewSubscriptionGroupedTieredPrice, type NewSubscriptionGroupedWithMeteredMinimumPrice as NewSubscriptionGroupedWithMeteredMinimumPrice, type NewSubscriptionGroupedWithProratedMinimumPrice as NewSubscriptionGroupedWithProratedMinimumPrice, type NewSubscriptionMatrixPrice as NewSubscriptionMatrixPrice, type NewSubscriptionMatrixWithAllocationPrice as NewSubscriptionMatrixWithAllocationPrice, type NewSubscriptionMatrixWithDisplayNamePrice as NewSubscriptionMatrixWithDisplayNamePrice, type NewSubscriptionMaxGroupTieredPackagePrice as NewSubscriptionMaxGroupTieredPackagePrice, type NewSubscriptionMinimumCompositePrice as NewSubscriptionMinimumCompositePrice, type NewSubscriptionPackagePrice as NewSubscriptionPackagePrice, type NewSubscriptionPackageWithAllocationPrice as NewSubscriptionPackageWithAllocationPrice, type NewSubscriptionScalableMatrixWithTieredPricingPrice as NewSubscriptionScalableMatrixWithTieredPricingPrice, type NewSubscriptionScalableMatrixWithUnitPricingPrice as NewSubscriptionScalableMatrixWithUnitPricingPrice, type NewSubscriptionThresholdTotalAmountPrice as NewSubscriptionThresholdTotalAmountPrice, type NewSubscriptionTierWithProrationPrice as NewSubscriptionTierWithProrationPrice, type NewSubscriptionTieredPackagePrice as NewSubscriptionTieredPackagePrice, type NewSubscriptionTieredPackageWithMinimumPrice as NewSubscriptionTieredPackageWithMinimumPrice, type NewSubscriptionTieredPrice as NewSubscriptionTieredPrice, type NewSubscriptionTieredWithMinimumPrice as NewSubscriptionTieredWithMinimumPrice, type NewSubscriptionUnitPrice as NewSubscriptionUnitPrice, type NewSubscriptionUnitWithPercentPrice as NewSubscriptionUnitWithPercentPrice, type NewSubscriptionUnitWithProrationPrice as NewSubscriptionUnitWithProrationPrice, type Subscription as Subscription, type SubscriptionUsage as SubscriptionUsage, type Subscriptions as Subscriptions, type SubscriptionFetchCostsResponse as SubscriptionFetchCostsResponse, type SubscriptionFetchScheduleResponse as SubscriptionFetchScheduleResponse, SubscriptionsPage as SubscriptionsPage, SubscriptionFetchScheduleResponsesPage as SubscriptionFetchScheduleResponsesPage, type SubscriptionCreateParams as SubscriptionCreateParams, type SubscriptionUpdateParams as SubscriptionUpdateParams, type SubscriptionListParams as SubscriptionListParams, type SubscriptionCancelParams as SubscriptionCancelParams, type SubscriptionFetchCostsParams as SubscriptionFetchCostsParams, type SubscriptionFetchScheduleParams as SubscriptionFetchScheduleParams, type SubscriptionFetchUsageParams as SubscriptionFetchUsageParams, type SubscriptionPriceIntervalsParams as SubscriptionPriceIntervalsParams, type SubscriptionRedeemCouponParams as SubscriptionRedeemCouponParams, type SubscriptionSchedulePlanChangeParams as SubscriptionSchedulePlanChangeParams, type SubscriptionTriggerPhaseParams as SubscriptionTriggerPhaseParams, type SubscriptionUnscheduleFixedFeeQuantityUpdatesParams as SubscriptionUnscheduleFixedFeeQuantityUpdatesParams, type SubscriptionUpdateFixedFeeQuantityParams as SubscriptionUpdateFixedFeeQuantityParams, type SubscriptionUpdateTrialParams as SubscriptionUpdateTrialParams, };
5847
+ export { type DiscountOverride as DiscountOverride, type NewSubscriptionBulkPrice as NewSubscriptionBulkPrice, type NewSubscriptionBulkWithProrationPrice as NewSubscriptionBulkWithProrationPrice, type NewSubscriptionCumulativeGroupedBulkPrice as NewSubscriptionCumulativeGroupedBulkPrice, type NewSubscriptionGroupedAllocationPrice as NewSubscriptionGroupedAllocationPrice, type NewSubscriptionGroupedTieredPackagePrice as NewSubscriptionGroupedTieredPackagePrice, type NewSubscriptionGroupedTieredPrice as NewSubscriptionGroupedTieredPrice, type NewSubscriptionGroupedWithMeteredMinimumPrice as NewSubscriptionGroupedWithMeteredMinimumPrice, type NewSubscriptionGroupedWithProratedMinimumPrice as NewSubscriptionGroupedWithProratedMinimumPrice, type NewSubscriptionMatrixPrice as NewSubscriptionMatrixPrice, type NewSubscriptionMatrixWithAllocationPrice as NewSubscriptionMatrixWithAllocationPrice, type NewSubscriptionMatrixWithDisplayNamePrice as NewSubscriptionMatrixWithDisplayNamePrice, type NewSubscriptionMaxGroupTieredPackagePrice as NewSubscriptionMaxGroupTieredPackagePrice, type NewSubscriptionMinimumCompositePrice as NewSubscriptionMinimumCompositePrice, type NewSubscriptionPackagePrice as NewSubscriptionPackagePrice, type NewSubscriptionPackageWithAllocationPrice as NewSubscriptionPackageWithAllocationPrice, type NewSubscriptionScalableMatrixWithTieredPricingPrice as NewSubscriptionScalableMatrixWithTieredPricingPrice, type NewSubscriptionScalableMatrixWithUnitPricingPrice as NewSubscriptionScalableMatrixWithUnitPricingPrice, type NewSubscriptionThresholdTotalAmountPrice as NewSubscriptionThresholdTotalAmountPrice, type NewSubscriptionTieredPackagePrice as NewSubscriptionTieredPackagePrice, type NewSubscriptionTieredPackageWithMinimumPrice as NewSubscriptionTieredPackageWithMinimumPrice, type NewSubscriptionTieredPrice as NewSubscriptionTieredPrice, type NewSubscriptionTieredWithMinimumPrice as NewSubscriptionTieredWithMinimumPrice, type NewSubscriptionUnitPrice as NewSubscriptionUnitPrice, type NewSubscriptionUnitWithPercentPrice as NewSubscriptionUnitWithPercentPrice, type NewSubscriptionUnitWithProrationPrice as NewSubscriptionUnitWithProrationPrice, type Subscription as Subscription, type SubscriptionUsage as SubscriptionUsage, type Subscriptions as Subscriptions, type SubscriptionFetchCostsResponse as SubscriptionFetchCostsResponse, type SubscriptionFetchScheduleResponse as SubscriptionFetchScheduleResponse, SubscriptionsPage as SubscriptionsPage, SubscriptionFetchScheduleResponsesPage as SubscriptionFetchScheduleResponsesPage, type SubscriptionCreateParams as SubscriptionCreateParams, type SubscriptionUpdateParams as SubscriptionUpdateParams, type SubscriptionListParams as SubscriptionListParams, type SubscriptionCancelParams as SubscriptionCancelParams, type SubscriptionFetchCostsParams as SubscriptionFetchCostsParams, type SubscriptionFetchScheduleParams as SubscriptionFetchScheduleParams, type SubscriptionFetchUsageParams as SubscriptionFetchUsageParams, type SubscriptionPriceIntervalsParams as SubscriptionPriceIntervalsParams, type SubscriptionRedeemCouponParams as SubscriptionRedeemCouponParams, type SubscriptionSchedulePlanChangeParams as SubscriptionSchedulePlanChangeParams, type SubscriptionTriggerPhaseParams as SubscriptionTriggerPhaseParams, type SubscriptionUnscheduleFixedFeeQuantityUpdatesParams as SubscriptionUnscheduleFixedFeeQuantityUpdatesParams, type SubscriptionUpdateFixedFeeQuantityParams as SubscriptionUpdateFixedFeeQuantityParams, type SubscriptionUpdateTrialParams as SubscriptionUpdateTrialParams, };
4653
5848
  }
4654
5849
  //# sourceMappingURL=subscriptions.d.ts.map