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
@@ -1093,6 +1093,9 @@ export interface DiscountOverride {
1093
1093
  }
1094
1094
 
1095
1095
  export interface NewSubscriptionBulkPrice {
1096
+ /**
1097
+ * Configuration for bulk pricing
1098
+ */
1096
1099
  bulk_config: Shared.BulkConfig;
1097
1100
 
1098
1101
  /**
@@ -1105,6 +1108,9 @@ export interface NewSubscriptionBulkPrice {
1105
1108
  */
1106
1109
  item_id: string;
1107
1110
 
1111
+ /**
1112
+ * The pricing model type
1113
+ */
1108
1114
  model_type: 'bulk';
1109
1115
 
1110
1116
  /**
@@ -1188,7 +1194,10 @@ export interface NewSubscriptionBulkPrice {
1188
1194
  }
1189
1195
 
1190
1196
  export interface NewSubscriptionBulkWithProrationPrice {
1191
- bulk_with_proration_config: { [key: string]: unknown };
1197
+ /**
1198
+ * Configuration for bulk_with_proration pricing
1199
+ */
1200
+ bulk_with_proration_config: NewSubscriptionBulkWithProrationPrice.BulkWithProrationConfig;
1192
1201
 
1193
1202
  /**
1194
1203
  * The cadence to bill for this price on.
@@ -1200,6 +1209,9 @@ export interface NewSubscriptionBulkWithProrationPrice {
1200
1209
  */
1201
1210
  item_id: string;
1202
1211
 
1212
+ /**
1213
+ * The pricing model type
1214
+ */
1203
1215
  model_type: 'bulk_with_proration';
1204
1216
 
1205
1217
  /**
@@ -1282,19 +1294,54 @@ export interface NewSubscriptionBulkWithProrationPrice {
1282
1294
  reference_id?: string | null;
1283
1295
  }
1284
1296
 
1297
+ export namespace NewSubscriptionBulkWithProrationPrice {
1298
+ /**
1299
+ * Configuration for bulk_with_proration pricing
1300
+ */
1301
+ export interface BulkWithProrationConfig {
1302
+ /**
1303
+ * Bulk tiers for rating based on total usage volume
1304
+ */
1305
+ tiers: Array<BulkWithProrationConfig.Tier>;
1306
+ }
1307
+
1308
+ export namespace BulkWithProrationConfig {
1309
+ /**
1310
+ * Configuration for a single bulk pricing tier with proration
1311
+ */
1312
+ export interface Tier {
1313
+ /**
1314
+ * Cost per unit
1315
+ */
1316
+ unit_amount: string;
1317
+
1318
+ /**
1319
+ * The lower bound for this tier
1320
+ */
1321
+ tier_lower_bound?: string | null;
1322
+ }
1323
+ }
1324
+ }
1325
+
1285
1326
  export interface NewSubscriptionCumulativeGroupedBulkPrice {
1286
1327
  /**
1287
1328
  * The cadence to bill for this price on.
1288
1329
  */
1289
1330
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1290
1331
 
1291
- cumulative_grouped_bulk_config: { [key: string]: unknown };
1332
+ /**
1333
+ * Configuration for cumulative_grouped_bulk pricing
1334
+ */
1335
+ cumulative_grouped_bulk_config: NewSubscriptionCumulativeGroupedBulkPrice.CumulativeGroupedBulkConfig;
1292
1336
 
1293
1337
  /**
1294
1338
  * The id of the item the price will be associated with.
1295
1339
  */
1296
1340
  item_id: string;
1297
1341
 
1342
+ /**
1343
+ * The pricing model type
1344
+ */
1298
1345
  model_type: 'cumulative_grouped_bulk';
1299
1346
 
1300
1347
  /**
@@ -1377,19 +1424,64 @@ export interface NewSubscriptionCumulativeGroupedBulkPrice {
1377
1424
  reference_id?: string | null;
1378
1425
  }
1379
1426
 
1427
+ export namespace NewSubscriptionCumulativeGroupedBulkPrice {
1428
+ /**
1429
+ * Configuration for cumulative_grouped_bulk pricing
1430
+ */
1431
+ export interface CumulativeGroupedBulkConfig {
1432
+ /**
1433
+ * Each tier lower bound must have the same group of values.
1434
+ */
1435
+ dimension_values: Array<CumulativeGroupedBulkConfig.DimensionValue>;
1436
+
1437
+ /**
1438
+ * Grouping key name
1439
+ */
1440
+ group: string;
1441
+ }
1442
+
1443
+ export namespace CumulativeGroupedBulkConfig {
1444
+ /**
1445
+ * Configuration for a dimension value entry
1446
+ */
1447
+ export interface DimensionValue {
1448
+ /**
1449
+ * Grouping key value
1450
+ */
1451
+ grouping_key: string;
1452
+
1453
+ /**
1454
+ * Tier lower bound
1455
+ */
1456
+ tier_lower_bound: string;
1457
+
1458
+ /**
1459
+ * Unit amount for this combination
1460
+ */
1461
+ unit_amount: string;
1462
+ }
1463
+ }
1464
+ }
1465
+
1380
1466
  export interface NewSubscriptionGroupedAllocationPrice {
1381
1467
  /**
1382
1468
  * The cadence to bill for this price on.
1383
1469
  */
1384
1470
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1385
1471
 
1386
- grouped_allocation_config: { [key: string]: unknown };
1472
+ /**
1473
+ * Configuration for grouped_allocation pricing
1474
+ */
1475
+ grouped_allocation_config: NewSubscriptionGroupedAllocationPrice.GroupedAllocationConfig;
1387
1476
 
1388
1477
  /**
1389
1478
  * The id of the item the price will be associated with.
1390
1479
  */
1391
1480
  item_id: string;
1392
1481
 
1482
+ /**
1483
+ * The pricing model type
1484
+ */
1393
1485
  model_type: 'grouped_allocation';
1394
1486
 
1395
1487
  /**
@@ -1472,19 +1564,47 @@ export interface NewSubscriptionGroupedAllocationPrice {
1472
1564
  reference_id?: string | null;
1473
1565
  }
1474
1566
 
1567
+ export namespace NewSubscriptionGroupedAllocationPrice {
1568
+ /**
1569
+ * Configuration for grouped_allocation pricing
1570
+ */
1571
+ export interface GroupedAllocationConfig {
1572
+ /**
1573
+ * Usage allocation per group
1574
+ */
1575
+ allocation: string;
1576
+
1577
+ /**
1578
+ * How to determine the groups that should each be allocated some quantity
1579
+ */
1580
+ grouping_key: string;
1581
+
1582
+ /**
1583
+ * Unit rate for post-allocation
1584
+ */
1585
+ overage_unit_rate: string;
1586
+ }
1587
+ }
1588
+
1475
1589
  export interface NewSubscriptionGroupedTieredPackagePrice {
1476
1590
  /**
1477
1591
  * The cadence to bill for this price on.
1478
1592
  */
1479
1593
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1480
1594
 
1481
- grouped_tiered_package_config: { [key: string]: unknown };
1595
+ /**
1596
+ * Configuration for grouped_tiered_package pricing
1597
+ */
1598
+ grouped_tiered_package_config: NewSubscriptionGroupedTieredPackagePrice.GroupedTieredPackageConfig;
1482
1599
 
1483
1600
  /**
1484
1601
  * The id of the item the price will be associated with.
1485
1602
  */
1486
1603
  item_id: string;
1487
1604
 
1605
+ /**
1606
+ * The pricing model type
1607
+ */
1488
1608
  model_type: 'grouped_tiered_package';
1489
1609
 
1490
1610
  /**
@@ -1567,19 +1687,65 @@ export interface NewSubscriptionGroupedTieredPackagePrice {
1567
1687
  reference_id?: string | null;
1568
1688
  }
1569
1689
 
1690
+ export namespace NewSubscriptionGroupedTieredPackagePrice {
1691
+ /**
1692
+ * Configuration for grouped_tiered_package pricing
1693
+ */
1694
+ export interface GroupedTieredPackageConfig {
1695
+ /**
1696
+ * The event property used to group before tiering
1697
+ */
1698
+ grouping_key: string;
1699
+
1700
+ /**
1701
+ * Package size
1702
+ */
1703
+ package_size: string;
1704
+
1705
+ /**
1706
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
1707
+ * are defined using exclusive lower bounds.
1708
+ */
1709
+ tiers: Array<GroupedTieredPackageConfig.Tier>;
1710
+ }
1711
+
1712
+ export namespace GroupedTieredPackageConfig {
1713
+ /**
1714
+ * Configuration for a single tier
1715
+ */
1716
+ export interface Tier {
1717
+ /**
1718
+ * Price per package
1719
+ */
1720
+ per_unit: string;
1721
+
1722
+ /**
1723
+ * Tier lower bound
1724
+ */
1725
+ tier_lower_bound: string;
1726
+ }
1727
+ }
1728
+ }
1729
+
1570
1730
  export interface NewSubscriptionGroupedTieredPrice {
1571
1731
  /**
1572
1732
  * The cadence to bill for this price on.
1573
1733
  */
1574
1734
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1575
1735
 
1576
- grouped_tiered_config: { [key: string]: unknown };
1736
+ /**
1737
+ * Configuration for grouped_tiered pricing
1738
+ */
1739
+ grouped_tiered_config: NewSubscriptionGroupedTieredPrice.GroupedTieredConfig;
1577
1740
 
1578
1741
  /**
1579
1742
  * The id of the item the price will be associated with.
1580
1743
  */
1581
1744
  item_id: string;
1582
1745
 
1746
+ /**
1747
+ * The pricing model type
1748
+ */
1583
1749
  model_type: 'grouped_tiered';
1584
1750
 
1585
1751
  /**
@@ -1662,19 +1828,60 @@ export interface NewSubscriptionGroupedTieredPrice {
1662
1828
  reference_id?: string | null;
1663
1829
  }
1664
1830
 
1831
+ export namespace NewSubscriptionGroupedTieredPrice {
1832
+ /**
1833
+ * Configuration for grouped_tiered pricing
1834
+ */
1835
+ export interface GroupedTieredConfig {
1836
+ /**
1837
+ * The billable metric property used to group before tiering
1838
+ */
1839
+ grouping_key: string;
1840
+
1841
+ /**
1842
+ * Apply tiered pricing to each segment generated after grouping with the provided
1843
+ * key
1844
+ */
1845
+ tiers: Array<GroupedTieredConfig.Tier>;
1846
+ }
1847
+
1848
+ export namespace GroupedTieredConfig {
1849
+ /**
1850
+ * Configuration for a single tier
1851
+ */
1852
+ export interface Tier {
1853
+ /**
1854
+ * Tier lower bound
1855
+ */
1856
+ tier_lower_bound: string;
1857
+
1858
+ /**
1859
+ * Per unit amount
1860
+ */
1861
+ unit_amount: string;
1862
+ }
1863
+ }
1864
+ }
1865
+
1665
1866
  export interface NewSubscriptionGroupedWithMeteredMinimumPrice {
1666
1867
  /**
1667
1868
  * The cadence to bill for this price on.
1668
1869
  */
1669
1870
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1670
1871
 
1671
- grouped_with_metered_minimum_config: { [key: string]: unknown };
1872
+ /**
1873
+ * Configuration for grouped_with_metered_minimum pricing
1874
+ */
1875
+ grouped_with_metered_minimum_config: NewSubscriptionGroupedWithMeteredMinimumPrice.GroupedWithMeteredMinimumConfig;
1672
1876
 
1673
1877
  /**
1674
1878
  * The id of the item the price will be associated with.
1675
1879
  */
1676
1880
  item_id: string;
1677
1881
 
1882
+ /**
1883
+ * The pricing model type
1884
+ */
1678
1885
  model_type: 'grouped_with_metered_minimum';
1679
1886
 
1680
1887
  /**
@@ -1757,19 +1964,96 @@ export interface NewSubscriptionGroupedWithMeteredMinimumPrice {
1757
1964
  reference_id?: string | null;
1758
1965
  }
1759
1966
 
1967
+ export namespace NewSubscriptionGroupedWithMeteredMinimumPrice {
1968
+ /**
1969
+ * Configuration for grouped_with_metered_minimum pricing
1970
+ */
1971
+ export interface GroupedWithMeteredMinimumConfig {
1972
+ /**
1973
+ * Used to partition the usage into groups. The minimum amount is applied to each
1974
+ * group.
1975
+ */
1976
+ grouping_key: string;
1977
+
1978
+ /**
1979
+ * The minimum amount to charge per group per unit
1980
+ */
1981
+ minimum_unit_amount: string;
1982
+
1983
+ /**
1984
+ * Used to determine the unit rate
1985
+ */
1986
+ pricing_key: string;
1987
+
1988
+ /**
1989
+ * Scale the unit rates by the scaling factor.
1990
+ */
1991
+ scaling_factors: Array<GroupedWithMeteredMinimumConfig.ScalingFactor>;
1992
+
1993
+ /**
1994
+ * Used to determine the unit rate scaling factor
1995
+ */
1996
+ scaling_key: string;
1997
+
1998
+ /**
1999
+ * Apply per unit pricing to each pricing value. The minimum amount is applied any
2000
+ * unmatched usage.
2001
+ */
2002
+ unit_amounts: Array<GroupedWithMeteredMinimumConfig.UnitAmount>;
2003
+ }
2004
+
2005
+ export namespace GroupedWithMeteredMinimumConfig {
2006
+ /**
2007
+ * Configuration for a scaling factor
2008
+ */
2009
+ export interface ScalingFactor {
2010
+ /**
2011
+ * Scaling factor
2012
+ */
2013
+ scaling_factor: string;
2014
+
2015
+ /**
2016
+ * Scaling value
2017
+ */
2018
+ scaling_value: string;
2019
+ }
2020
+
2021
+ /**
2022
+ * Configuration for a unit amount
2023
+ */
2024
+ export interface UnitAmount {
2025
+ /**
2026
+ * Pricing value
2027
+ */
2028
+ pricing_value: string;
2029
+
2030
+ /**
2031
+ * Per unit amount
2032
+ */
2033
+ unit_amount: string;
2034
+ }
2035
+ }
2036
+ }
2037
+
1760
2038
  export interface NewSubscriptionGroupedWithProratedMinimumPrice {
1761
2039
  /**
1762
2040
  * The cadence to bill for this price on.
1763
2041
  */
1764
2042
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1765
2043
 
1766
- grouped_with_prorated_minimum_config: { [key: string]: unknown };
2044
+ /**
2045
+ * Configuration for grouped_with_prorated_minimum pricing
2046
+ */
2047
+ grouped_with_prorated_minimum_config: NewSubscriptionGroupedWithProratedMinimumPrice.GroupedWithProratedMinimumConfig;
1767
2048
 
1768
2049
  /**
1769
2050
  * The id of the item the price will be associated with.
1770
2051
  */
1771
2052
  item_id: string;
1772
2053
 
2054
+ /**
2055
+ * The pricing model type
2056
+ */
1773
2057
  model_type: 'grouped_with_prorated_minimum';
1774
2058
 
1775
2059
  /**
@@ -1852,6 +2136,28 @@ export interface NewSubscriptionGroupedWithProratedMinimumPrice {
1852
2136
  reference_id?: string | null;
1853
2137
  }
1854
2138
 
2139
+ export namespace NewSubscriptionGroupedWithProratedMinimumPrice {
2140
+ /**
2141
+ * Configuration for grouped_with_prorated_minimum pricing
2142
+ */
2143
+ export interface GroupedWithProratedMinimumConfig {
2144
+ /**
2145
+ * How to determine the groups that should each have a minimum
2146
+ */
2147
+ grouping_key: string;
2148
+
2149
+ /**
2150
+ * The minimum amount to charge per group
2151
+ */
2152
+ minimum: string;
2153
+
2154
+ /**
2155
+ * The amount to charge per unit
2156
+ */
2157
+ unit_rate: string;
2158
+ }
2159
+ }
2160
+
1855
2161
  export interface NewSubscriptionMatrixPrice {
1856
2162
  /**
1857
2163
  * The cadence to bill for this price on.
@@ -1863,8 +2169,14 @@ export interface NewSubscriptionMatrixPrice {
1863
2169
  */
1864
2170
  item_id: string;
1865
2171
 
2172
+ /**
2173
+ * Configuration for matrix pricing
2174
+ */
1866
2175
  matrix_config: Shared.MatrixConfig;
1867
2176
 
2177
+ /**
2178
+ * The pricing model type
2179
+ */
1868
2180
  model_type: 'matrix';
1869
2181
 
1870
2182
  /**
@@ -1958,8 +2270,14 @@ export interface NewSubscriptionMatrixWithAllocationPrice {
1958
2270
  */
1959
2271
  item_id: string;
1960
2272
 
2273
+ /**
2274
+ * Configuration for matrix_with_allocation pricing
2275
+ */
1961
2276
  matrix_with_allocation_config: Shared.MatrixWithAllocationConfig;
1962
2277
 
2278
+ /**
2279
+ * The pricing model type
2280
+ */
1963
2281
  model_type: 'matrix_with_allocation';
1964
2282
 
1965
2283
  /**
@@ -2053,8 +2371,14 @@ export interface NewSubscriptionMatrixWithDisplayNamePrice {
2053
2371
  */
2054
2372
  item_id: string;
2055
2373
 
2056
- matrix_with_display_name_config: { [key: string]: unknown };
2374
+ /**
2375
+ * Configuration for matrix_with_display_name pricing
2376
+ */
2377
+ matrix_with_display_name_config: NewSubscriptionMatrixWithDisplayNamePrice.MatrixWithDisplayNameConfig;
2057
2378
 
2379
+ /**
2380
+ * The pricing model type
2381
+ */
2058
2382
  model_type: 'matrix_with_display_name';
2059
2383
 
2060
2384
  /**
@@ -2137,6 +2461,45 @@ export interface NewSubscriptionMatrixWithDisplayNamePrice {
2137
2461
  reference_id?: string | null;
2138
2462
  }
2139
2463
 
2464
+ export namespace NewSubscriptionMatrixWithDisplayNamePrice {
2465
+ /**
2466
+ * Configuration for matrix_with_display_name pricing
2467
+ */
2468
+ export interface MatrixWithDisplayNameConfig {
2469
+ /**
2470
+ * Used to determine the unit rate
2471
+ */
2472
+ dimension: string;
2473
+
2474
+ /**
2475
+ * Apply per unit pricing to each dimension value
2476
+ */
2477
+ unit_amounts: Array<MatrixWithDisplayNameConfig.UnitAmount>;
2478
+ }
2479
+
2480
+ export namespace MatrixWithDisplayNameConfig {
2481
+ /**
2482
+ * Configuration for a unit amount item
2483
+ */
2484
+ export interface UnitAmount {
2485
+ /**
2486
+ * The dimension value
2487
+ */
2488
+ dimension_value: string;
2489
+
2490
+ /**
2491
+ * Display name for this dimension value
2492
+ */
2493
+ display_name: string;
2494
+
2495
+ /**
2496
+ * Per unit amount
2497
+ */
2498
+ unit_amount: string;
2499
+ }
2500
+ }
2501
+ }
2502
+
2140
2503
  export interface NewSubscriptionMaxGroupTieredPackagePrice {
2141
2504
  /**
2142
2505
  * The cadence to bill for this price on.
@@ -2148,8 +2511,14 @@ export interface NewSubscriptionMaxGroupTieredPackagePrice {
2148
2511
  */
2149
2512
  item_id: string;
2150
2513
 
2151
- max_group_tiered_package_config: { [key: string]: unknown };
2514
+ /**
2515
+ * Configuration for max_group_tiered_package pricing
2516
+ */
2517
+ max_group_tiered_package_config: NewSubscriptionMaxGroupTieredPackagePrice.MaxGroupTieredPackageConfig;
2152
2518
 
2519
+ /**
2520
+ * The pricing model type
2521
+ */
2153
2522
  model_type: 'max_group_tiered_package';
2154
2523
 
2155
2524
  /**
@@ -2232,6 +2601,45 @@ export interface NewSubscriptionMaxGroupTieredPackagePrice {
2232
2601
  reference_id?: string | null;
2233
2602
  }
2234
2603
 
2604
+ export namespace NewSubscriptionMaxGroupTieredPackagePrice {
2605
+ /**
2606
+ * Configuration for max_group_tiered_package pricing
2607
+ */
2608
+ export interface MaxGroupTieredPackageConfig {
2609
+ /**
2610
+ * The event property used to group before tiering the group with the highest value
2611
+ */
2612
+ grouping_key: string;
2613
+
2614
+ /**
2615
+ * Package size
2616
+ */
2617
+ package_size: string;
2618
+
2619
+ /**
2620
+ * Apply tiered pricing to the largest group after grouping with the provided key.
2621
+ */
2622
+ tiers: Array<MaxGroupTieredPackageConfig.Tier>;
2623
+ }
2624
+
2625
+ export namespace MaxGroupTieredPackageConfig {
2626
+ /**
2627
+ * Configuration for a single tier
2628
+ */
2629
+ export interface Tier {
2630
+ /**
2631
+ * Tier lower bound
2632
+ */
2633
+ tier_lower_bound: string;
2634
+
2635
+ /**
2636
+ * Per unit amount
2637
+ */
2638
+ unit_amount: string;
2639
+ }
2640
+ }
2641
+ }
2642
+
2235
2643
  export interface NewSubscriptionMinimumCompositePrice {
2236
2644
  /**
2237
2645
  * The cadence to bill for this price on.
@@ -2243,8 +2651,14 @@ export interface NewSubscriptionMinimumCompositePrice {
2243
2651
  */
2244
2652
  item_id: string;
2245
2653
 
2654
+ /**
2655
+ * Configuration for minimum pricing
2656
+ */
2246
2657
  minimum_config: NewSubscriptionMinimumCompositePrice.MinimumConfig;
2247
2658
 
2659
+ /**
2660
+ * The pricing model type
2661
+ */
2248
2662
  model_type: 'minimum';
2249
2663
 
2250
2664
  /**
@@ -2328,6 +2742,9 @@ export interface NewSubscriptionMinimumCompositePrice {
2328
2742
  }
2329
2743
 
2330
2744
  export namespace NewSubscriptionMinimumCompositePrice {
2745
+ /**
2746
+ * Configuration for minimum pricing
2747
+ */
2331
2748
  export interface MinimumConfig {
2332
2749
  /**
2333
2750
  * The minimum amount to apply
@@ -2335,10 +2752,9 @@ export namespace NewSubscriptionMinimumCompositePrice {
2335
2752
  minimum_amount: string;
2336
2753
 
2337
2754
  /**
2338
- * By default, subtotals from minimum composite prices are prorated based on the
2339
- * service period. Set to false to disable proration.
2755
+ * If true, subtotals from this price are prorated based on the service period
2340
2756
  */
2341
- prorated?: boolean | null;
2757
+ prorated?: boolean;
2342
2758
  }
2343
2759
  }
2344
2760
 
@@ -2353,6 +2769,9 @@ export interface NewSubscriptionPackagePrice {
2353
2769
  */
2354
2770
  item_id: string;
2355
2771
 
2772
+ /**
2773
+ * The pricing model type
2774
+ */
2356
2775
  model_type: 'package';
2357
2776
 
2358
2777
  /**
@@ -2360,6 +2779,9 @@ export interface NewSubscriptionPackagePrice {
2360
2779
  */
2361
2780
  name: string;
2362
2781
 
2782
+ /**
2783
+ * Configuration for package pricing
2784
+ */
2363
2785
  package_config: Shared.PackageConfig;
2364
2786
 
2365
2787
  /**
@@ -2448,6 +2870,9 @@ export interface NewSubscriptionPackageWithAllocationPrice {
2448
2870
  */
2449
2871
  item_id: string;
2450
2872
 
2873
+ /**
2874
+ * The pricing model type
2875
+ */
2451
2876
  model_type: 'package_with_allocation';
2452
2877
 
2453
2878
  /**
@@ -2455,7 +2880,10 @@ export interface NewSubscriptionPackageWithAllocationPrice {
2455
2880
  */
2456
2881
  name: string;
2457
2882
 
2458
- package_with_allocation_config: { [key: string]: unknown };
2883
+ /**
2884
+ * Configuration for package_with_allocation pricing
2885
+ */
2886
+ package_with_allocation_config: NewSubscriptionPackageWithAllocationPrice.PackageWithAllocationConfig;
2459
2887
 
2460
2888
  /**
2461
2889
  * The id of the billable metric for the price. Only needed if the price is
@@ -2532,6 +2960,28 @@ export interface NewSubscriptionPackageWithAllocationPrice {
2532
2960
  reference_id?: string | null;
2533
2961
  }
2534
2962
 
2963
+ export namespace NewSubscriptionPackageWithAllocationPrice {
2964
+ /**
2965
+ * Configuration for package_with_allocation pricing
2966
+ */
2967
+ export interface PackageWithAllocationConfig {
2968
+ /**
2969
+ * Usage allocation
2970
+ */
2971
+ allocation: string;
2972
+
2973
+ /**
2974
+ * Price per package
2975
+ */
2976
+ package_amount: string;
2977
+
2978
+ /**
2979
+ * Package size
2980
+ */
2981
+ package_size: string;
2982
+ }
2983
+ }
2984
+
2535
2985
  export interface NewSubscriptionScalableMatrixWithTieredPricingPrice {
2536
2986
  /**
2537
2987
  * The cadence to bill for this price on.
@@ -2543,6 +2993,9 @@ export interface NewSubscriptionScalableMatrixWithTieredPricingPrice {
2543
2993
  */
2544
2994
  item_id: string;
2545
2995
 
2996
+ /**
2997
+ * The pricing model type
2998
+ */
2546
2999
  model_type: 'scalable_matrix_with_tiered_pricing';
2547
3000
 
2548
3001
  /**
@@ -2550,7 +3003,10 @@ export interface NewSubscriptionScalableMatrixWithTieredPricingPrice {
2550
3003
  */
2551
3004
  name: string;
2552
3005
 
2553
- scalable_matrix_with_tiered_pricing_config: { [key: string]: unknown };
3006
+ /**
3007
+ * Configuration for scalable_matrix_with_tiered_pricing pricing
3008
+ */
3009
+ scalable_matrix_with_tiered_pricing_config: NewSubscriptionScalableMatrixWithTieredPricingPrice.ScalableMatrixWithTieredPricingConfig;
2554
3010
 
2555
3011
  /**
2556
3012
  * The id of the billable metric for the price. Only needed if the price is
@@ -2627,6 +3083,70 @@ export interface NewSubscriptionScalableMatrixWithTieredPricingPrice {
2627
3083
  reference_id?: string | null;
2628
3084
  }
2629
3085
 
3086
+ export namespace NewSubscriptionScalableMatrixWithTieredPricingPrice {
3087
+ /**
3088
+ * Configuration for scalable_matrix_with_tiered_pricing pricing
3089
+ */
3090
+ export interface ScalableMatrixWithTieredPricingConfig {
3091
+ /**
3092
+ * Used for the scalable matrix first dimension
3093
+ */
3094
+ first_dimension: string;
3095
+
3096
+ /**
3097
+ * Apply a scaling factor to each dimension
3098
+ */
3099
+ matrix_scaling_factors: Array<ScalableMatrixWithTieredPricingConfig.MatrixScalingFactor>;
3100
+
3101
+ /**
3102
+ * Tier pricing structure
3103
+ */
3104
+ tiers: Array<ScalableMatrixWithTieredPricingConfig.Tier>;
3105
+
3106
+ /**
3107
+ * Used for the scalable matrix second dimension (optional)
3108
+ */
3109
+ second_dimension?: string | null;
3110
+ }
3111
+
3112
+ export namespace ScalableMatrixWithTieredPricingConfig {
3113
+ /**
3114
+ * Configuration for a single matrix scaling factor
3115
+ */
3116
+ export interface MatrixScalingFactor {
3117
+ /**
3118
+ * First dimension value
3119
+ */
3120
+ first_dimension_value: string;
3121
+
3122
+ /**
3123
+ * Scaling factor
3124
+ */
3125
+ scaling_factor: string;
3126
+
3127
+ /**
3128
+ * Second dimension value (optional)
3129
+ */
3130
+ second_dimension_value?: string | null;
3131
+ }
3132
+
3133
+ /**
3134
+ * Configuration for a single tier entry with business logic
3135
+ */
3136
+ export interface Tier {
3137
+ /**
3138
+ * Tier lower bound
3139
+ */
3140
+ tier_lower_bound: string;
3141
+
3142
+ /**
3143
+ * Per unit amount
3144
+ */
3145
+ unit_amount: string;
3146
+ }
3147
+ }
3148
+ }
3149
+
2630
3150
  export interface NewSubscriptionScalableMatrixWithUnitPricingPrice {
2631
3151
  /**
2632
3152
  * The cadence to bill for this price on.
@@ -2638,6 +3158,9 @@ export interface NewSubscriptionScalableMatrixWithUnitPricingPrice {
2638
3158
  */
2639
3159
  item_id: string;
2640
3160
 
3161
+ /**
3162
+ * The pricing model type
3163
+ */
2641
3164
  model_type: 'scalable_matrix_with_unit_pricing';
2642
3165
 
2643
3166
  /**
@@ -2645,7 +3168,10 @@ export interface NewSubscriptionScalableMatrixWithUnitPricingPrice {
2645
3168
  */
2646
3169
  name: string;
2647
3170
 
2648
- scalable_matrix_with_unit_pricing_config: { [key: string]: unknown };
3171
+ /**
3172
+ * Configuration for scalable_matrix_with_unit_pricing pricing
3173
+ */
3174
+ scalable_matrix_with_unit_pricing_config: NewSubscriptionScalableMatrixWithUnitPricingPrice.ScalableMatrixWithUnitPricingConfig;
2649
3175
 
2650
3176
  /**
2651
3177
  * The id of the billable metric for the price. Only needed if the price is
@@ -2722,6 +3248,60 @@ export interface NewSubscriptionScalableMatrixWithUnitPricingPrice {
2722
3248
  reference_id?: string | null;
2723
3249
  }
2724
3250
 
3251
+ export namespace NewSubscriptionScalableMatrixWithUnitPricingPrice {
3252
+ /**
3253
+ * Configuration for scalable_matrix_with_unit_pricing pricing
3254
+ */
3255
+ export interface ScalableMatrixWithUnitPricingConfig {
3256
+ /**
3257
+ * Used to determine the unit rate
3258
+ */
3259
+ first_dimension: string;
3260
+
3261
+ /**
3262
+ * Apply a scaling factor to each dimension
3263
+ */
3264
+ matrix_scaling_factors: Array<ScalableMatrixWithUnitPricingConfig.MatrixScalingFactor>;
3265
+
3266
+ /**
3267
+ * The final unit price to rate against the output of the matrix
3268
+ */
3269
+ unit_price: string;
3270
+
3271
+ /**
3272
+ * If true, the unit price will be prorated to the billing period
3273
+ */
3274
+ prorate?: boolean | null;
3275
+
3276
+ /**
3277
+ * Used to determine the unit rate (optional)
3278
+ */
3279
+ second_dimension?: string | null;
3280
+ }
3281
+
3282
+ export namespace ScalableMatrixWithUnitPricingConfig {
3283
+ /**
3284
+ * Configuration for a single matrix scaling factor
3285
+ */
3286
+ export interface MatrixScalingFactor {
3287
+ /**
3288
+ * First dimension value
3289
+ */
3290
+ first_dimension_value: string;
3291
+
3292
+ /**
3293
+ * Scaling factor
3294
+ */
3295
+ scaling_factor: string;
3296
+
3297
+ /**
3298
+ * Second dimension value (optional)
3299
+ */
3300
+ second_dimension_value?: string | null;
3301
+ }
3302
+ }
3303
+ }
3304
+
2725
3305
  export interface NewSubscriptionThresholdTotalAmountPrice {
2726
3306
  /**
2727
3307
  * The cadence to bill for this price on.
@@ -2733,6 +3313,9 @@ export interface NewSubscriptionThresholdTotalAmountPrice {
2733
3313
  */
2734
3314
  item_id: string;
2735
3315
 
3316
+ /**
3317
+ * The pricing model type
3318
+ */
2736
3319
  model_type: 'threshold_total_amount';
2737
3320
 
2738
3321
  /**
@@ -2740,7 +3323,10 @@ export interface NewSubscriptionThresholdTotalAmountPrice {
2740
3323
  */
2741
3324
  name: string;
2742
3325
 
2743
- threshold_total_amount_config: { [key: string]: unknown };
3326
+ /**
3327
+ * Configuration for threshold_total_amount pricing
3328
+ */
3329
+ threshold_total_amount_config: NewSubscriptionThresholdTotalAmountPrice.ThresholdTotalAmountConfig;
2744
3330
 
2745
3331
  /**
2746
3332
  * The id of the billable metric for the price. Only needed if the price is
@@ -2817,7 +3403,42 @@ export interface NewSubscriptionThresholdTotalAmountPrice {
2817
3403
  reference_id?: string | null;
2818
3404
  }
2819
3405
 
2820
- export interface NewSubscriptionTierWithProrationPrice {
3406
+ export namespace NewSubscriptionThresholdTotalAmountPrice {
3407
+ /**
3408
+ * Configuration for threshold_total_amount pricing
3409
+ */
3410
+ export interface ThresholdTotalAmountConfig {
3411
+ /**
3412
+ * When the quantity consumed passes a provided threshold, the configured total
3413
+ * will be charged
3414
+ */
3415
+ consumption_table: Array<ThresholdTotalAmountConfig.ConsumptionTable>;
3416
+
3417
+ /**
3418
+ * If true, the unit price will be prorated to the billing period
3419
+ */
3420
+ prorate?: boolean | null;
3421
+ }
3422
+
3423
+ export namespace ThresholdTotalAmountConfig {
3424
+ /**
3425
+ * Configuration for a single threshold
3426
+ */
3427
+ export interface ConsumptionTable {
3428
+ /**
3429
+ * Quantity threshold
3430
+ */
3431
+ threshold: string;
3432
+
3433
+ /**
3434
+ * Total amount for this threshold
3435
+ */
3436
+ total_amount: string;
3437
+ }
3438
+ }
3439
+ }
3440
+
3441
+ export interface NewSubscriptionTieredPackagePrice {
2821
3442
  /**
2822
3443
  * The cadence to bill for this price on.
2823
3444
  */
@@ -2828,14 +3449,20 @@ export interface NewSubscriptionTierWithProrationPrice {
2828
3449
  */
2829
3450
  item_id: string;
2830
3451
 
2831
- model_type: 'tiered_with_proration';
3452
+ /**
3453
+ * The pricing model type
3454
+ */
3455
+ model_type: 'tiered_package';
2832
3456
 
2833
3457
  /**
2834
3458
  * The name of the price.
2835
3459
  */
2836
3460
  name: string;
2837
3461
 
2838
- tiered_with_proration_config: { [key: string]: unknown };
3462
+ /**
3463
+ * Configuration for tiered_package pricing
3464
+ */
3465
+ tiered_package_config: NewSubscriptionTieredPackagePrice.TieredPackageConfig;
2839
3466
 
2840
3467
  /**
2841
3468
  * The id of the billable metric for the price. Only needed if the price is
@@ -2912,7 +3539,44 @@ export interface NewSubscriptionTierWithProrationPrice {
2912
3539
  reference_id?: string | null;
2913
3540
  }
2914
3541
 
2915
- export interface NewSubscriptionTieredPackagePrice {
3542
+ export namespace NewSubscriptionTieredPackagePrice {
3543
+ /**
3544
+ * Configuration for tiered_package pricing
3545
+ */
3546
+ export interface TieredPackageConfig {
3547
+ /**
3548
+ * Package size
3549
+ */
3550
+ package_size: string;
3551
+
3552
+ /**
3553
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
3554
+ * are defined using exclusive lower bounds. The tier bounds are defined based on
3555
+ * the total quantity rather than the number of packages, so they must be multiples
3556
+ * of the package size.
3557
+ */
3558
+ tiers: Array<TieredPackageConfig.Tier>;
3559
+ }
3560
+
3561
+ export namespace TieredPackageConfig {
3562
+ /**
3563
+ * Configuration for a single tier with business logic
3564
+ */
3565
+ export interface Tier {
3566
+ /**
3567
+ * Price per package
3568
+ */
3569
+ per_unit: string;
3570
+
3571
+ /**
3572
+ * Tier lower bound
3573
+ */
3574
+ tier_lower_bound: string;
3575
+ }
3576
+ }
3577
+ }
3578
+
3579
+ export interface NewSubscriptionTieredPackageWithMinimumPrice {
2916
3580
  /**
2917
3581
  * The cadence to bill for this price on.
2918
3582
  */
@@ -2923,14 +3587,20 @@ export interface NewSubscriptionTieredPackagePrice {
2923
3587
  */
2924
3588
  item_id: string;
2925
3589
 
2926
- model_type: 'tiered_package';
3590
+ /**
3591
+ * The pricing model type
3592
+ */
3593
+ model_type: 'tiered_package_with_minimum';
2927
3594
 
2928
3595
  /**
2929
3596
  * The name of the price.
2930
3597
  */
2931
3598
  name: string;
2932
3599
 
2933
- tiered_package_config: { [key: string]: unknown };
3600
+ /**
3601
+ * Configuration for tiered_package_with_minimum pricing
3602
+ */
3603
+ tiered_package_with_minimum_config: NewSubscriptionTieredPackageWithMinimumPrice.TieredPackageWithMinimumConfig;
2934
3604
 
2935
3605
  /**
2936
3606
  * The id of the billable metric for the price. Only needed if the price is
@@ -3007,7 +3677,47 @@ export interface NewSubscriptionTieredPackagePrice {
3007
3677
  reference_id?: string | null;
3008
3678
  }
3009
3679
 
3010
- export interface NewSubscriptionTieredPackageWithMinimumPrice {
3680
+ export namespace NewSubscriptionTieredPackageWithMinimumPrice {
3681
+ /**
3682
+ * Configuration for tiered_package_with_minimum pricing
3683
+ */
3684
+ export interface TieredPackageWithMinimumConfig {
3685
+ /**
3686
+ * Package size
3687
+ */
3688
+ package_size: number;
3689
+
3690
+ /**
3691
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
3692
+ * are defined using exclusive lower bounds.
3693
+ */
3694
+ tiers: Array<TieredPackageWithMinimumConfig.Tier>;
3695
+ }
3696
+
3697
+ export namespace TieredPackageWithMinimumConfig {
3698
+ /**
3699
+ * Configuration for a single tier
3700
+ */
3701
+ export interface Tier {
3702
+ /**
3703
+ * Minimum amount
3704
+ */
3705
+ minimum_amount: string;
3706
+
3707
+ /**
3708
+ * Price per package
3709
+ */
3710
+ per_unit: string;
3711
+
3712
+ /**
3713
+ * Tier lower bound
3714
+ */
3715
+ tier_lower_bound: string;
3716
+ }
3717
+ }
3718
+ }
3719
+
3720
+ export interface NewSubscriptionTieredPrice {
3011
3721
  /**
3012
3722
  * The cadence to bill for this price on.
3013
3723
  */
@@ -3018,14 +3728,20 @@ export interface NewSubscriptionTieredPackageWithMinimumPrice {
3018
3728
  */
3019
3729
  item_id: string;
3020
3730
 
3021
- model_type: 'tiered_package_with_minimum';
3731
+ /**
3732
+ * The pricing model type
3733
+ */
3734
+ model_type: 'tiered';
3022
3735
 
3023
3736
  /**
3024
3737
  * The name of the price.
3025
3738
  */
3026
3739
  name: string;
3027
3740
 
3028
- tiered_package_with_minimum_config: { [key: string]: unknown };
3741
+ /**
3742
+ * Configuration for tiered pricing
3743
+ */
3744
+ tiered_config: Shared.TieredConfig;
3029
3745
 
3030
3746
  /**
3031
3747
  * The id of the billable metric for the price. Only needed if the price is
@@ -3102,7 +3818,7 @@ export interface NewSubscriptionTieredPackageWithMinimumPrice {
3102
3818
  reference_id?: string | null;
3103
3819
  }
3104
3820
 
3105
- export interface NewSubscriptionTieredPrice {
3821
+ export interface NewSubscriptionTieredWithMinimumPrice {
3106
3822
  /**
3107
3823
  * The cadence to bill for this price on.
3108
3824
  */
@@ -3113,14 +3829,20 @@ export interface NewSubscriptionTieredPrice {
3113
3829
  */
3114
3830
  item_id: string;
3115
3831
 
3116
- model_type: 'tiered';
3832
+ /**
3833
+ * The pricing model type
3834
+ */
3835
+ model_type: 'tiered_with_minimum';
3117
3836
 
3118
3837
  /**
3119
3838
  * The name of the price.
3120
3839
  */
3121
3840
  name: string;
3122
3841
 
3123
- tiered_config: Shared.TieredConfig;
3842
+ /**
3843
+ * Configuration for tiered_with_minimum pricing
3844
+ */
3845
+ tiered_with_minimum_config: NewSubscriptionTieredWithMinimumPrice.TieredWithMinimumConfig;
3124
3846
 
3125
3847
  /**
3126
3848
  * The id of the billable metric for the price. Only needed if the price is
@@ -3197,7 +3919,52 @@ export interface NewSubscriptionTieredPrice {
3197
3919
  reference_id?: string | null;
3198
3920
  }
3199
3921
 
3200
- export interface NewSubscriptionTieredWithMinimumPrice {
3922
+ export namespace NewSubscriptionTieredWithMinimumPrice {
3923
+ /**
3924
+ * Configuration for tiered_with_minimum pricing
3925
+ */
3926
+ export interface TieredWithMinimumConfig {
3927
+ /**
3928
+ * Tiered pricing with a minimum amount dependent on the volume tier. Tiers are
3929
+ * defined using exclusive lower bounds.
3930
+ */
3931
+ tiers: Array<TieredWithMinimumConfig.Tier>;
3932
+
3933
+ /**
3934
+ * If true, tiers with an accrued amount of 0 will not be included in the rating.
3935
+ */
3936
+ hide_zero_amount_tiers?: boolean;
3937
+
3938
+ /**
3939
+ * If true, the unit price will be prorated to the billing period
3940
+ */
3941
+ prorate?: boolean;
3942
+ }
3943
+
3944
+ export namespace TieredWithMinimumConfig {
3945
+ /**
3946
+ * Configuration for a single tier
3947
+ */
3948
+ export interface Tier {
3949
+ /**
3950
+ * Minimum amount
3951
+ */
3952
+ minimum_amount: string;
3953
+
3954
+ /**
3955
+ * Tier lower bound
3956
+ */
3957
+ tier_lower_bound: string;
3958
+
3959
+ /**
3960
+ * Per unit amount
3961
+ */
3962
+ unit_amount: string;
3963
+ }
3964
+ }
3965
+ }
3966
+
3967
+ export interface NewSubscriptionUnitPrice {
3201
3968
  /**
3202
3969
  * The cadence to bill for this price on.
3203
3970
  */
@@ -3208,14 +3975,20 @@ export interface NewSubscriptionTieredWithMinimumPrice {
3208
3975
  */
3209
3976
  item_id: string;
3210
3977
 
3211
- model_type: 'tiered_with_minimum';
3978
+ /**
3979
+ * The pricing model type
3980
+ */
3981
+ model_type: 'unit';
3212
3982
 
3213
3983
  /**
3214
3984
  * The name of the price.
3215
3985
  */
3216
3986
  name: string;
3217
3987
 
3218
- tiered_with_minimum_config: { [key: string]: unknown };
3988
+ /**
3989
+ * Configuration for unit pricing
3990
+ */
3991
+ unit_config: Shared.UnitConfig;
3219
3992
 
3220
3993
  /**
3221
3994
  * The id of the billable metric for the price. Only needed if the price is
@@ -3292,7 +4065,7 @@ export interface NewSubscriptionTieredWithMinimumPrice {
3292
4065
  reference_id?: string | null;
3293
4066
  }
3294
4067
 
3295
- export interface NewSubscriptionUnitPrice {
4068
+ export interface NewSubscriptionUnitWithPercentPrice {
3296
4069
  /**
3297
4070
  * The cadence to bill for this price on.
3298
4071
  */
@@ -3303,14 +4076,20 @@ export interface NewSubscriptionUnitPrice {
3303
4076
  */
3304
4077
  item_id: string;
3305
4078
 
3306
- model_type: 'unit';
4079
+ /**
4080
+ * The pricing model type
4081
+ */
4082
+ model_type: 'unit_with_percent';
3307
4083
 
3308
4084
  /**
3309
4085
  * The name of the price.
3310
4086
  */
3311
4087
  name: string;
3312
4088
 
3313
- unit_config: Shared.UnitConfig;
4089
+ /**
4090
+ * Configuration for unit_with_percent pricing
4091
+ */
4092
+ unit_with_percent_config: NewSubscriptionUnitWithPercentPrice.UnitWithPercentConfig;
3314
4093
 
3315
4094
  /**
3316
4095
  * The id of the billable metric for the price. Only needed if the price is
@@ -3387,7 +4166,24 @@ export interface NewSubscriptionUnitPrice {
3387
4166
  reference_id?: string | null;
3388
4167
  }
3389
4168
 
3390
- export interface NewSubscriptionUnitWithPercentPrice {
4169
+ export namespace NewSubscriptionUnitWithPercentPrice {
4170
+ /**
4171
+ * Configuration for unit_with_percent pricing
4172
+ */
4173
+ export interface UnitWithPercentConfig {
4174
+ /**
4175
+ * What percent, out of 100, of the calculated total to charge
4176
+ */
4177
+ percent: string;
4178
+
4179
+ /**
4180
+ * Rate per unit of usage
4181
+ */
4182
+ unit_amount: string;
4183
+ }
4184
+ }
4185
+
4186
+ export interface NewSubscriptionUnitWithProrationPrice {
3391
4187
  /**
3392
4188
  * The cadence to bill for this price on.
3393
4189
  */
@@ -3398,14 +4194,20 @@ export interface NewSubscriptionUnitWithPercentPrice {
3398
4194
  */
3399
4195
  item_id: string;
3400
4196
 
3401
- model_type: 'unit_with_percent';
4197
+ /**
4198
+ * The pricing model type
4199
+ */
4200
+ model_type: 'unit_with_proration';
3402
4201
 
3403
4202
  /**
3404
4203
  * The name of the price.
3405
4204
  */
3406
4205
  name: string;
3407
4206
 
3408
- unit_with_percent_config: { [key: string]: unknown };
4207
+ /**
4208
+ * Configuration for unit_with_proration pricing
4209
+ */
4210
+ unit_with_proration_config: NewSubscriptionUnitWithProrationPrice.UnitWithProrationConfig;
3409
4211
 
3410
4212
  /**
3411
4213
  * The id of the billable metric for the price. Only needed if the price is
@@ -3482,99 +4284,16 @@ export interface NewSubscriptionUnitWithPercentPrice {
3482
4284
  reference_id?: string | null;
3483
4285
  }
3484
4286
 
3485
- export interface NewSubscriptionUnitWithProrationPrice {
4287
+ export namespace NewSubscriptionUnitWithProrationPrice {
3486
4288
  /**
3487
- * The cadence to bill for this price on.
4289
+ * Configuration for unit_with_proration pricing
3488
4290
  */
3489
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
3490
-
3491
- /**
3492
- * The id of the item the price will be associated with.
3493
- */
3494
- item_id: string;
3495
-
3496
- model_type: 'unit_with_proration';
3497
-
3498
- /**
3499
- * The name of the price.
3500
- */
3501
- name: string;
3502
-
3503
- unit_with_proration_config: { [key: string]: unknown };
3504
-
3505
- /**
3506
- * The id of the billable metric for the price. Only needed if the price is
3507
- * usage-based.
3508
- */
3509
- billable_metric_id?: string | null;
3510
-
3511
- /**
3512
- * If the Price represents a fixed cost, the price will be billed in-advance if
3513
- * this is true, and in-arrears if this is false.
3514
- */
3515
- billed_in_advance?: boolean | null;
3516
-
3517
- /**
3518
- * For custom cadence: specifies the duration of the billing period in days or
3519
- * months.
3520
- */
3521
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3522
-
3523
- /**
3524
- * The per unit conversion rate of the price currency to the invoicing currency.
3525
- */
3526
- conversion_rate?: number | null;
3527
-
3528
- /**
3529
- * The configuration for the rate of the price currency to the invoicing currency.
3530
- */
3531
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
3532
-
3533
- /**
3534
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
3535
- * price is billed.
3536
- */
3537
- currency?: string | null;
3538
-
3539
- /**
3540
- * For dimensional price: specifies a price group and dimension values
3541
- */
3542
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
3543
-
3544
- /**
3545
- * An alias for the price.
3546
- */
3547
- external_price_id?: string | null;
3548
-
3549
- /**
3550
- * If the Price represents a fixed cost, this represents the quantity of units
3551
- * applied.
3552
- */
3553
- fixed_price_quantity?: number | null;
3554
-
3555
- /**
3556
- * The property used to group this price on an invoice
3557
- */
3558
- invoice_grouping_key?: string | null;
3559
-
3560
- /**
3561
- * Within each billing cycle, specifies the cadence at which invoices are produced.
3562
- * If unspecified, a single invoice is produced per billing cycle.
3563
- */
3564
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3565
-
3566
- /**
3567
- * User-specified key/value pairs for the resource. Individual keys can be removed
3568
- * by setting the value to `null`, and the entire metadata mapping can be cleared
3569
- * by setting `metadata` to `null`.
3570
- */
3571
- metadata?: { [key: string]: string | null } | null;
3572
-
3573
- /**
3574
- * A transient ID that can be used to reference this price when adding adjustments
3575
- * in the same API call.
3576
- */
3577
- reference_id?: string | null;
4291
+ export interface UnitWithProrationConfig {
4292
+ /**
4293
+ * Rate per unit of usage
4294
+ */
4295
+ unit_amount: string;
4296
+ }
3578
4297
  }
3579
4298
 
3580
4299
  /**
@@ -4120,35 +4839,35 @@ export namespace SubscriptionCreateParams {
4120
4839
  plan_phase_order?: number | null;
4121
4840
 
4122
4841
  /**
4123
- * The definition of a new price to create and add to the subscription.
4842
+ * New subscription price request body params.
4124
4843
  */
4125
4844
  price?:
4126
4845
  | SubscriptionsAPI.NewSubscriptionUnitPrice
4127
- | SubscriptionsAPI.NewSubscriptionPackagePrice
4128
- | SubscriptionsAPI.NewSubscriptionMatrixPrice
4129
4846
  | SubscriptionsAPI.NewSubscriptionTieredPrice
4130
4847
  | SubscriptionsAPI.NewSubscriptionBulkPrice
4848
+ | SubscriptionsAPI.NewSubscriptionPackagePrice
4849
+ | SubscriptionsAPI.NewSubscriptionMatrixPrice
4131
4850
  | SubscriptionsAPI.NewSubscriptionThresholdTotalAmountPrice
4132
4851
  | SubscriptionsAPI.NewSubscriptionTieredPackagePrice
4133
4852
  | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice
4134
- | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice
4853
+ | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice
4854
+ | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice
4135
4855
  | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice
4136
- | SubscriptionsAPI.NewSubscriptionTierWithProrationPrice
4856
+ | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice
4857
+ | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice
4858
+ | AddPrice.NewSubscriptionTieredWithProrationPrice
4137
4859
  | SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice
4138
4860
  | SubscriptionsAPI.NewSubscriptionGroupedAllocationPrice
4139
- | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice
4140
4861
  | SubscriptionsAPI.NewSubscriptionBulkWithProrationPrice
4141
- | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice
4142
- | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice
4143
- | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice
4144
- | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice
4862
+ | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice
4145
4863
  | SubscriptionsAPI.NewSubscriptionGroupedWithMeteredMinimumPrice
4864
+ | AddPrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice
4146
4865
  | SubscriptionsAPI.NewSubscriptionMatrixWithDisplayNamePrice
4147
4866
  | SubscriptionsAPI.NewSubscriptionGroupedTieredPackagePrice
4148
- | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice
4149
- | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice
4150
- | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice
4151
- | AddPrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice
4867
+ | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice
4868
+ | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice
4869
+ | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice
4870
+ | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice
4152
4871
  | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice
4153
4872
  | null;
4154
4873
 
@@ -4166,19 +4885,156 @@ export namespace SubscriptionCreateParams {
4166
4885
  }
4167
4886
 
4168
4887
  export namespace AddPrice {
4888
+ export interface NewSubscriptionTieredWithProrationPrice {
4889
+ /**
4890
+ * The cadence to bill for this price on.
4891
+ */
4892
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4893
+
4894
+ /**
4895
+ * The id of the item the price will be associated with.
4896
+ */
4897
+ item_id: string;
4898
+
4899
+ /**
4900
+ * The pricing model type
4901
+ */
4902
+ model_type: 'tiered_with_proration';
4903
+
4904
+ /**
4905
+ * The name of the price.
4906
+ */
4907
+ name: string;
4908
+
4909
+ /**
4910
+ * Configuration for tiered_with_proration pricing
4911
+ */
4912
+ tiered_with_proration_config: NewSubscriptionTieredWithProrationPrice.TieredWithProrationConfig;
4913
+
4914
+ /**
4915
+ * The id of the billable metric for the price. Only needed if the price is
4916
+ * usage-based.
4917
+ */
4918
+ billable_metric_id?: string | null;
4919
+
4920
+ /**
4921
+ * If the Price represents a fixed cost, the price will be billed in-advance if
4922
+ * this is true, and in-arrears if this is false.
4923
+ */
4924
+ billed_in_advance?: boolean | null;
4925
+
4926
+ /**
4927
+ * For custom cadence: specifies the duration of the billing period in days or
4928
+ * months.
4929
+ */
4930
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4931
+
4932
+ /**
4933
+ * The per unit conversion rate of the price currency to the invoicing currency.
4934
+ */
4935
+ conversion_rate?: number | null;
4936
+
4937
+ /**
4938
+ * The configuration for the rate of the price currency to the invoicing currency.
4939
+ */
4940
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
4941
+
4942
+ /**
4943
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
4944
+ * price is billed.
4945
+ */
4946
+ currency?: string | null;
4947
+
4948
+ /**
4949
+ * For dimensional price: specifies a price group and dimension values
4950
+ */
4951
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
4952
+
4953
+ /**
4954
+ * An alias for the price.
4955
+ */
4956
+ external_price_id?: string | null;
4957
+
4958
+ /**
4959
+ * If the Price represents a fixed cost, this represents the quantity of units
4960
+ * applied.
4961
+ */
4962
+ fixed_price_quantity?: number | null;
4963
+
4964
+ /**
4965
+ * The property used to group this price on an invoice
4966
+ */
4967
+ invoice_grouping_key?: string | null;
4968
+
4969
+ /**
4970
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4971
+ * If unspecified, a single invoice is produced per billing cycle.
4972
+ */
4973
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4974
+
4975
+ /**
4976
+ * User-specified key/value pairs for the resource. Individual keys can be removed
4977
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
4978
+ * by setting `metadata` to `null`.
4979
+ */
4980
+ metadata?: { [key: string]: string | null } | null;
4981
+
4982
+ /**
4983
+ * A transient ID that can be used to reference this price when adding adjustments
4984
+ * in the same API call.
4985
+ */
4986
+ reference_id?: string | null;
4987
+ }
4988
+
4989
+ export namespace NewSubscriptionTieredWithProrationPrice {
4990
+ /**
4991
+ * Configuration for tiered_with_proration pricing
4992
+ */
4993
+ export interface TieredWithProrationConfig {
4994
+ /**
4995
+ * Tiers for rating based on total usage quantities into the specified tier with
4996
+ * proration
4997
+ */
4998
+ tiers: Array<TieredWithProrationConfig.Tier>;
4999
+ }
5000
+
5001
+ export namespace TieredWithProrationConfig {
5002
+ /**
5003
+ * Configuration for a single tiered with proration tier
5004
+ */
5005
+ export interface Tier {
5006
+ /**
5007
+ * Inclusive tier starting value
5008
+ */
5009
+ tier_lower_bound: string;
5010
+
5011
+ /**
5012
+ * Amount per unit
5013
+ */
5014
+ unit_amount: string;
5015
+ }
5016
+ }
5017
+ }
5018
+
4169
5019
  export interface NewSubscriptionGroupedWithMinMaxThresholdsPrice {
4170
5020
  /**
4171
5021
  * The cadence to bill for this price on.
4172
5022
  */
4173
5023
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4174
5024
 
4175
- grouped_with_min_max_thresholds_config: { [key: string]: unknown };
5025
+ /**
5026
+ * Configuration for grouped_with_min_max_thresholds pricing
5027
+ */
5028
+ grouped_with_min_max_thresholds_config: NewSubscriptionGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
4176
5029
 
4177
5030
  /**
4178
5031
  * The id of the item the price will be associated with.
4179
5032
  */
4180
5033
  item_id: string;
4181
5034
 
5035
+ /**
5036
+ * The pricing model type
5037
+ */
4182
5038
  model_type: 'grouped_with_min_max_thresholds';
4183
5039
 
4184
5040
  /**
@@ -4260,6 +5116,33 @@ export namespace SubscriptionCreateParams {
4260
5116
  */
4261
5117
  reference_id?: string | null;
4262
5118
  }
5119
+
5120
+ export namespace NewSubscriptionGroupedWithMinMaxThresholdsPrice {
5121
+ /**
5122
+ * Configuration for grouped_with_min_max_thresholds pricing
5123
+ */
5124
+ export interface GroupedWithMinMaxThresholdsConfig {
5125
+ /**
5126
+ * The event property used to group before applying thresholds
5127
+ */
5128
+ grouping_key: string;
5129
+
5130
+ /**
5131
+ * The maximum amount to charge each group
5132
+ */
5133
+ maximum_charge: string;
5134
+
5135
+ /**
5136
+ * The minimum amount to charge each group, regardless of usage
5137
+ */
5138
+ minimum_charge: string;
5139
+
5140
+ /**
5141
+ * The base price charged per group
5142
+ */
5143
+ per_unit_rate: string;
5144
+ }
5145
+ }
4263
5146
  }
4264
5147
 
4265
5148
  export interface RemoveAdjustment {
@@ -4338,35 +5221,35 @@ export namespace SubscriptionCreateParams {
4338
5221
  minimum_amount?: string | null;
4339
5222
 
4340
5223
  /**
4341
- * The definition of a new price to create and add to the subscription.
5224
+ * New subscription price request body params.
4342
5225
  */
4343
5226
  price?:
4344
5227
  | SubscriptionsAPI.NewSubscriptionUnitPrice
4345
- | SubscriptionsAPI.NewSubscriptionPackagePrice
4346
- | SubscriptionsAPI.NewSubscriptionMatrixPrice
4347
5228
  | SubscriptionsAPI.NewSubscriptionTieredPrice
4348
5229
  | SubscriptionsAPI.NewSubscriptionBulkPrice
5230
+ | SubscriptionsAPI.NewSubscriptionPackagePrice
5231
+ | SubscriptionsAPI.NewSubscriptionMatrixPrice
4349
5232
  | SubscriptionsAPI.NewSubscriptionThresholdTotalAmountPrice
4350
5233
  | SubscriptionsAPI.NewSubscriptionTieredPackagePrice
4351
5234
  | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice
4352
- | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice
5235
+ | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice
5236
+ | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice
4353
5237
  | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice
4354
- | SubscriptionsAPI.NewSubscriptionTierWithProrationPrice
5238
+ | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice
5239
+ | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice
5240
+ | ReplacePrice.NewSubscriptionTieredWithProrationPrice
4355
5241
  | SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice
4356
5242
  | SubscriptionsAPI.NewSubscriptionGroupedAllocationPrice
4357
- | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice
4358
5243
  | SubscriptionsAPI.NewSubscriptionBulkWithProrationPrice
4359
- | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice
4360
- | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice
4361
- | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice
4362
- | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice
5244
+ | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice
4363
5245
  | SubscriptionsAPI.NewSubscriptionGroupedWithMeteredMinimumPrice
5246
+ | ReplacePrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice
4364
5247
  | SubscriptionsAPI.NewSubscriptionMatrixWithDisplayNamePrice
4365
5248
  | SubscriptionsAPI.NewSubscriptionGroupedTieredPackagePrice
4366
- | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice
4367
- | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice
4368
- | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice
4369
- | ReplacePrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice
5249
+ | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice
5250
+ | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice
5251
+ | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice
5252
+ | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice
4370
5253
  | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice
4371
5254
  | null;
4372
5255
 
@@ -4377,26 +5260,32 @@ export namespace SubscriptionCreateParams {
4377
5260
  }
4378
5261
 
4379
5262
  export namespace ReplacePrice {
4380
- export interface NewSubscriptionGroupedWithMinMaxThresholdsPrice {
5263
+ export interface NewSubscriptionTieredWithProrationPrice {
4381
5264
  /**
4382
5265
  * The cadence to bill for this price on.
4383
5266
  */
4384
5267
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4385
5268
 
4386
- grouped_with_min_max_thresholds_config: { [key: string]: unknown };
4387
-
4388
5269
  /**
4389
5270
  * The id of the item the price will be associated with.
4390
5271
  */
4391
5272
  item_id: string;
4392
5273
 
4393
- model_type: 'grouped_with_min_max_thresholds';
5274
+ /**
5275
+ * The pricing model type
5276
+ */
5277
+ model_type: 'tiered_with_proration';
4394
5278
 
4395
5279
  /**
4396
5280
  * The name of the price.
4397
5281
  */
4398
5282
  name: string;
4399
5283
 
5284
+ /**
5285
+ * Configuration for tiered_with_proration pricing
5286
+ */
5287
+ tiered_with_proration_config: NewSubscriptionTieredWithProrationPrice.TieredWithProrationConfig;
5288
+
4400
5289
  /**
4401
5290
  * The id of the billable metric for the price. Only needed if the price is
4402
5291
  * usage-based.
@@ -4471,6 +5360,164 @@ export namespace SubscriptionCreateParams {
4471
5360
  */
4472
5361
  reference_id?: string | null;
4473
5362
  }
5363
+
5364
+ export namespace NewSubscriptionTieredWithProrationPrice {
5365
+ /**
5366
+ * Configuration for tiered_with_proration pricing
5367
+ */
5368
+ export 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
+
5376
+ export namespace TieredWithProrationConfig {
5377
+ /**
5378
+ * Configuration for a single tiered with proration tier
5379
+ */
5380
+ export interface Tier {
5381
+ /**
5382
+ * Inclusive tier starting value
5383
+ */
5384
+ tier_lower_bound: string;
5385
+
5386
+ /**
5387
+ * Amount per unit
5388
+ */
5389
+ unit_amount: string;
5390
+ }
5391
+ }
5392
+ }
5393
+
5394
+ export interface NewSubscriptionGroupedWithMinMaxThresholdsPrice {
5395
+ /**
5396
+ * The cadence to bill for this price on.
5397
+ */
5398
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
5399
+
5400
+ /**
5401
+ * Configuration for grouped_with_min_max_thresholds pricing
5402
+ */
5403
+ grouped_with_min_max_thresholds_config: NewSubscriptionGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
5404
+
5405
+ /**
5406
+ * The id of the item the price will be associated with.
5407
+ */
5408
+ item_id: string;
5409
+
5410
+ /**
5411
+ * The pricing model type
5412
+ */
5413
+ model_type: 'grouped_with_min_max_thresholds';
5414
+
5415
+ /**
5416
+ * The name of the price.
5417
+ */
5418
+ name: string;
5419
+
5420
+ /**
5421
+ * The id of the billable metric for the price. Only needed if the price is
5422
+ * usage-based.
5423
+ */
5424
+ billable_metric_id?: string | null;
5425
+
5426
+ /**
5427
+ * If the Price represents a fixed cost, the price will be billed in-advance if
5428
+ * this is true, and in-arrears if this is false.
5429
+ */
5430
+ billed_in_advance?: boolean | null;
5431
+
5432
+ /**
5433
+ * For custom cadence: specifies the duration of the billing period in days or
5434
+ * months.
5435
+ */
5436
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
5437
+
5438
+ /**
5439
+ * The per unit conversion rate of the price currency to the invoicing currency.
5440
+ */
5441
+ conversion_rate?: number | null;
5442
+
5443
+ /**
5444
+ * The configuration for the rate of the price currency to the invoicing currency.
5445
+ */
5446
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
5447
+
5448
+ /**
5449
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
5450
+ * price is billed.
5451
+ */
5452
+ currency?: string | null;
5453
+
5454
+ /**
5455
+ * For dimensional price: specifies a price group and dimension values
5456
+ */
5457
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
5458
+
5459
+ /**
5460
+ * An alias for the price.
5461
+ */
5462
+ external_price_id?: string | null;
5463
+
5464
+ /**
5465
+ * If the Price represents a fixed cost, this represents the quantity of units
5466
+ * applied.
5467
+ */
5468
+ fixed_price_quantity?: number | null;
5469
+
5470
+ /**
5471
+ * The property used to group this price on an invoice
5472
+ */
5473
+ invoice_grouping_key?: string | null;
5474
+
5475
+ /**
5476
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5477
+ * If unspecified, a single invoice is produced per billing cycle.
5478
+ */
5479
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
5480
+
5481
+ /**
5482
+ * User-specified key/value pairs for the resource. Individual keys can be removed
5483
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
5484
+ * by setting `metadata` to `null`.
5485
+ */
5486
+ metadata?: { [key: string]: string | null } | null;
5487
+
5488
+ /**
5489
+ * A transient ID that can be used to reference this price when adding adjustments
5490
+ * in the same API call.
5491
+ */
5492
+ reference_id?: string | null;
5493
+ }
5494
+
5495
+ export namespace NewSubscriptionGroupedWithMinMaxThresholdsPrice {
5496
+ /**
5497
+ * Configuration for grouped_with_min_max_thresholds pricing
5498
+ */
5499
+ export interface GroupedWithMinMaxThresholdsConfig {
5500
+ /**
5501
+ * The event property used to group before applying thresholds
5502
+ */
5503
+ grouping_key: string;
5504
+
5505
+ /**
5506
+ * The maximum amount to charge each group
5507
+ */
5508
+ maximum_charge: string;
5509
+
5510
+ /**
5511
+ * The minimum amount to charge each group, regardless of usage
5512
+ */
5513
+ minimum_charge: string;
5514
+
5515
+ /**
5516
+ * The base price charged per group
5517
+ */
5518
+ per_unit_rate: string;
5519
+ }
5520
+ }
4474
5521
  }
4475
5522
  }
4476
5523
 
@@ -4715,35 +5762,35 @@ export namespace SubscriptionPriceIntervalsParams {
4715
5762
  minimum_amount?: number | null;
4716
5763
 
4717
5764
  /**
4718
- * The definition of a new price to create and add to the subscription.
5765
+ * New floating price request body params.
4719
5766
  */
4720
5767
  price?:
4721
5768
  | Shared.NewFloatingUnitPrice
4722
- | Shared.NewFloatingPackagePrice
4723
- | Shared.NewFloatingMatrixPrice
4724
- | Shared.NewFloatingMatrixWithAllocationPrice
4725
5769
  | Shared.NewFloatingTieredPrice
4726
5770
  | Shared.NewFloatingBulkPrice
5771
+ | Shared.NewFloatingPackagePrice
5772
+ | Shared.NewFloatingMatrixPrice
4727
5773
  | Shared.NewFloatingThresholdTotalAmountPrice
4728
5774
  | Shared.NewFloatingTieredPackagePrice
4729
- | Shared.NewFloatingGroupedTieredPrice
4730
- | Shared.NewFloatingMaxGroupTieredPackagePrice
4731
5775
  | Shared.NewFloatingTieredWithMinimumPrice
4732
- | Shared.NewFloatingPackageWithAllocationPrice
5776
+ | Shared.NewFloatingGroupedTieredPrice
4733
5777
  | Shared.NewFloatingTieredPackageWithMinimumPrice
5778
+ | Shared.NewFloatingPackageWithAllocationPrice
4734
5779
  | Shared.NewFloatingUnitWithPercentPrice
5780
+ | Shared.NewFloatingMatrixWithAllocationPrice
4735
5781
  | Shared.NewFloatingTieredWithProrationPrice
4736
5782
  | Shared.NewFloatingUnitWithProrationPrice
4737
5783
  | Shared.NewFloatingGroupedAllocationPrice
5784
+ | Shared.NewFloatingBulkWithProrationPrice
4738
5785
  | Shared.NewFloatingGroupedWithProratedMinimumPrice
4739
5786
  | Shared.NewFloatingGroupedWithMeteredMinimumPrice
5787
+ | Add.NewFloatingGroupedWithMinMaxThresholdsPrice
4740
5788
  | Shared.NewFloatingMatrixWithDisplayNamePrice
4741
- | Shared.NewFloatingBulkWithProrationPrice
4742
5789
  | Shared.NewFloatingGroupedTieredPackagePrice
5790
+ | Shared.NewFloatingMaxGroupTieredPackagePrice
4743
5791
  | Shared.NewFloatingScalableMatrixWithUnitPricingPrice
4744
5792
  | Shared.NewFloatingScalableMatrixWithTieredPricingPrice
4745
5793
  | Shared.NewFloatingCumulativeGroupedBulkPrice
4746
- | Add.NewFloatingGroupedWithMinMaxThresholdsPrice
4747
5794
  | Shared.NewFloatingMinimumCompositePrice
4748
5795
  | null;
4749
5796
 
@@ -4816,13 +5863,19 @@ export namespace SubscriptionPriceIntervalsParams {
4816
5863
  */
4817
5864
  currency: string;
4818
5865
 
4819
- grouped_with_min_max_thresholds_config: { [key: string]: unknown };
5866
+ /**
5867
+ * Configuration for grouped_with_min_max_thresholds pricing
5868
+ */
5869
+ grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
4820
5870
 
4821
5871
  /**
4822
5872
  * The id of the item the price will be associated with.
4823
5873
  */
4824
5874
  item_id: string;
4825
5875
 
5876
+ /**
5877
+ * The pricing model type
5878
+ */
4826
5879
  model_type: 'grouped_with_min_max_thresholds';
4827
5880
 
4828
5881
  /**
@@ -4892,6 +5945,33 @@ export namespace SubscriptionPriceIntervalsParams {
4892
5945
  */
4893
5946
  metadata?: { [key: string]: string | null } | null;
4894
5947
  }
5948
+
5949
+ export namespace NewFloatingGroupedWithMinMaxThresholdsPrice {
5950
+ /**
5951
+ * Configuration for grouped_with_min_max_thresholds pricing
5952
+ */
5953
+ export interface GroupedWithMinMaxThresholdsConfig {
5954
+ /**
5955
+ * The event property used to group before applying thresholds
5956
+ */
5957
+ grouping_key: string;
5958
+
5959
+ /**
5960
+ * The maximum amount to charge each group
5961
+ */
5962
+ maximum_charge: string;
5963
+
5964
+ /**
5965
+ * The minimum amount to charge each group, regardless of usage
5966
+ */
5967
+ minimum_charge: string;
5968
+
5969
+ /**
5970
+ * The base price charged per group
5971
+ */
5972
+ per_unit_rate: string;
5973
+ }
5974
+ }
4895
5975
  }
4896
5976
 
4897
5977
  export interface AddAdjustment {
@@ -5275,35 +6355,35 @@ export namespace SubscriptionSchedulePlanChangeParams {
5275
6355
  plan_phase_order?: number | null;
5276
6356
 
5277
6357
  /**
5278
- * The definition of a new price to create and add to the subscription.
6358
+ * New subscription price request body params.
5279
6359
  */
5280
6360
  price?:
5281
6361
  | SubscriptionsAPI.NewSubscriptionUnitPrice
5282
- | SubscriptionsAPI.NewSubscriptionPackagePrice
5283
- | SubscriptionsAPI.NewSubscriptionMatrixPrice
5284
6362
  | SubscriptionsAPI.NewSubscriptionTieredPrice
5285
6363
  | SubscriptionsAPI.NewSubscriptionBulkPrice
6364
+ | SubscriptionsAPI.NewSubscriptionPackagePrice
6365
+ | SubscriptionsAPI.NewSubscriptionMatrixPrice
5286
6366
  | SubscriptionsAPI.NewSubscriptionThresholdTotalAmountPrice
5287
6367
  | SubscriptionsAPI.NewSubscriptionTieredPackagePrice
5288
6368
  | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice
5289
- | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice
6369
+ | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice
6370
+ | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice
5290
6371
  | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice
5291
- | SubscriptionsAPI.NewSubscriptionTierWithProrationPrice
6372
+ | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice
6373
+ | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice
6374
+ | AddPrice.NewSubscriptionTieredWithProrationPrice
5292
6375
  | SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice
5293
6376
  | SubscriptionsAPI.NewSubscriptionGroupedAllocationPrice
5294
- | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice
5295
6377
  | SubscriptionsAPI.NewSubscriptionBulkWithProrationPrice
5296
- | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice
5297
- | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice
5298
- | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice
5299
- | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice
6378
+ | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice
5300
6379
  | SubscriptionsAPI.NewSubscriptionGroupedWithMeteredMinimumPrice
6380
+ | AddPrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice
5301
6381
  | SubscriptionsAPI.NewSubscriptionMatrixWithDisplayNamePrice
5302
6382
  | SubscriptionsAPI.NewSubscriptionGroupedTieredPackagePrice
5303
- | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice
5304
- | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice
5305
- | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice
5306
- | AddPrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice
6383
+ | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice
6384
+ | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice
6385
+ | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice
6386
+ | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice
5307
6387
  | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice
5308
6388
  | null;
5309
6389
 
@@ -5321,19 +6401,156 @@ export namespace SubscriptionSchedulePlanChangeParams {
5321
6401
  }
5322
6402
 
5323
6403
  export namespace AddPrice {
6404
+ export interface NewSubscriptionTieredWithProrationPrice {
6405
+ /**
6406
+ * The cadence to bill for this price on.
6407
+ */
6408
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
6409
+
6410
+ /**
6411
+ * The id of the item the price will be associated with.
6412
+ */
6413
+ item_id: string;
6414
+
6415
+ /**
6416
+ * The pricing model type
6417
+ */
6418
+ model_type: 'tiered_with_proration';
6419
+
6420
+ /**
6421
+ * The name of the price.
6422
+ */
6423
+ name: string;
6424
+
6425
+ /**
6426
+ * Configuration for tiered_with_proration pricing
6427
+ */
6428
+ tiered_with_proration_config: NewSubscriptionTieredWithProrationPrice.TieredWithProrationConfig;
6429
+
6430
+ /**
6431
+ * The id of the billable metric for the price. Only needed if the price is
6432
+ * usage-based.
6433
+ */
6434
+ billable_metric_id?: string | null;
6435
+
6436
+ /**
6437
+ * If the Price represents a fixed cost, the price will be billed in-advance if
6438
+ * this is true, and in-arrears if this is false.
6439
+ */
6440
+ billed_in_advance?: boolean | null;
6441
+
6442
+ /**
6443
+ * For custom cadence: specifies the duration of the billing period in days or
6444
+ * months.
6445
+ */
6446
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
6447
+
6448
+ /**
6449
+ * The per unit conversion rate of the price currency to the invoicing currency.
6450
+ */
6451
+ conversion_rate?: number | null;
6452
+
6453
+ /**
6454
+ * The configuration for the rate of the price currency to the invoicing currency.
6455
+ */
6456
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
6457
+
6458
+ /**
6459
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
6460
+ * price is billed.
6461
+ */
6462
+ currency?: string | null;
6463
+
6464
+ /**
6465
+ * For dimensional price: specifies a price group and dimension values
6466
+ */
6467
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
6468
+
6469
+ /**
6470
+ * An alias for the price.
6471
+ */
6472
+ external_price_id?: string | null;
6473
+
6474
+ /**
6475
+ * If the Price represents a fixed cost, this represents the quantity of units
6476
+ * applied.
6477
+ */
6478
+ fixed_price_quantity?: number | null;
6479
+
6480
+ /**
6481
+ * The property used to group this price on an invoice
6482
+ */
6483
+ invoice_grouping_key?: string | null;
6484
+
6485
+ /**
6486
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
6487
+ * If unspecified, a single invoice is produced per billing cycle.
6488
+ */
6489
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
6490
+
6491
+ /**
6492
+ * User-specified key/value pairs for the resource. Individual keys can be removed
6493
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
6494
+ * by setting `metadata` to `null`.
6495
+ */
6496
+ metadata?: { [key: string]: string | null } | null;
6497
+
6498
+ /**
6499
+ * A transient ID that can be used to reference this price when adding adjustments
6500
+ * in the same API call.
6501
+ */
6502
+ reference_id?: string | null;
6503
+ }
6504
+
6505
+ export namespace NewSubscriptionTieredWithProrationPrice {
6506
+ /**
6507
+ * Configuration for tiered_with_proration pricing
6508
+ */
6509
+ export interface TieredWithProrationConfig {
6510
+ /**
6511
+ * Tiers for rating based on total usage quantities into the specified tier with
6512
+ * proration
6513
+ */
6514
+ tiers: Array<TieredWithProrationConfig.Tier>;
6515
+ }
6516
+
6517
+ export namespace TieredWithProrationConfig {
6518
+ /**
6519
+ * Configuration for a single tiered with proration tier
6520
+ */
6521
+ export interface Tier {
6522
+ /**
6523
+ * Inclusive tier starting value
6524
+ */
6525
+ tier_lower_bound: string;
6526
+
6527
+ /**
6528
+ * Amount per unit
6529
+ */
6530
+ unit_amount: string;
6531
+ }
6532
+ }
6533
+ }
6534
+
5324
6535
  export interface NewSubscriptionGroupedWithMinMaxThresholdsPrice {
5325
6536
  /**
5326
6537
  * The cadence to bill for this price on.
5327
6538
  */
5328
6539
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
5329
6540
 
5330
- grouped_with_min_max_thresholds_config: { [key: string]: unknown };
6541
+ /**
6542
+ * Configuration for grouped_with_min_max_thresholds pricing
6543
+ */
6544
+ grouped_with_min_max_thresholds_config: NewSubscriptionGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
5331
6545
 
5332
6546
  /**
5333
6547
  * The id of the item the price will be associated with.
5334
6548
  */
5335
6549
  item_id: string;
5336
6550
 
6551
+ /**
6552
+ * The pricing model type
6553
+ */
5337
6554
  model_type: 'grouped_with_min_max_thresholds';
5338
6555
 
5339
6556
  /**
@@ -5415,6 +6632,33 @@ export namespace SubscriptionSchedulePlanChangeParams {
5415
6632
  */
5416
6633
  reference_id?: string | null;
5417
6634
  }
6635
+
6636
+ export namespace NewSubscriptionGroupedWithMinMaxThresholdsPrice {
6637
+ /**
6638
+ * Configuration for grouped_with_min_max_thresholds pricing
6639
+ */
6640
+ export interface GroupedWithMinMaxThresholdsConfig {
6641
+ /**
6642
+ * The event property used to group before applying thresholds
6643
+ */
6644
+ grouping_key: string;
6645
+
6646
+ /**
6647
+ * The maximum amount to charge each group
6648
+ */
6649
+ maximum_charge: string;
6650
+
6651
+ /**
6652
+ * The minimum amount to charge each group, regardless of usage
6653
+ */
6654
+ minimum_charge: string;
6655
+
6656
+ /**
6657
+ * The base price charged per group
6658
+ */
6659
+ per_unit_rate: string;
6660
+ }
6661
+ }
5418
6662
  }
5419
6663
 
5420
6664
  export interface RemoveAdjustment {
@@ -5493,35 +6737,35 @@ export namespace SubscriptionSchedulePlanChangeParams {
5493
6737
  minimum_amount?: string | null;
5494
6738
 
5495
6739
  /**
5496
- * The definition of a new price to create and add to the subscription.
6740
+ * New subscription price request body params.
5497
6741
  */
5498
6742
  price?:
5499
6743
  | SubscriptionsAPI.NewSubscriptionUnitPrice
5500
- | SubscriptionsAPI.NewSubscriptionPackagePrice
5501
- | SubscriptionsAPI.NewSubscriptionMatrixPrice
5502
6744
  | SubscriptionsAPI.NewSubscriptionTieredPrice
5503
6745
  | SubscriptionsAPI.NewSubscriptionBulkPrice
6746
+ | SubscriptionsAPI.NewSubscriptionPackagePrice
6747
+ | SubscriptionsAPI.NewSubscriptionMatrixPrice
5504
6748
  | SubscriptionsAPI.NewSubscriptionThresholdTotalAmountPrice
5505
6749
  | SubscriptionsAPI.NewSubscriptionTieredPackagePrice
5506
6750
  | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice
5507
- | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice
6751
+ | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice
6752
+ | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice
5508
6753
  | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice
5509
- | SubscriptionsAPI.NewSubscriptionTierWithProrationPrice
6754
+ | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice
6755
+ | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice
6756
+ | ReplacePrice.NewSubscriptionTieredWithProrationPrice
5510
6757
  | SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice
5511
6758
  | SubscriptionsAPI.NewSubscriptionGroupedAllocationPrice
5512
- | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice
5513
6759
  | SubscriptionsAPI.NewSubscriptionBulkWithProrationPrice
5514
- | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice
5515
- | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice
5516
- | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice
5517
- | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice
6760
+ | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice
5518
6761
  | SubscriptionsAPI.NewSubscriptionGroupedWithMeteredMinimumPrice
6762
+ | ReplacePrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice
5519
6763
  | SubscriptionsAPI.NewSubscriptionMatrixWithDisplayNamePrice
5520
6764
  | SubscriptionsAPI.NewSubscriptionGroupedTieredPackagePrice
5521
- | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice
5522
- | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice
5523
- | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice
5524
- | ReplacePrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice
6765
+ | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice
6766
+ | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice
6767
+ | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice
6768
+ | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice
5525
6769
  | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice
5526
6770
  | null;
5527
6771
 
@@ -5532,19 +6776,156 @@ export namespace SubscriptionSchedulePlanChangeParams {
5532
6776
  }
5533
6777
 
5534
6778
  export namespace ReplacePrice {
6779
+ export interface NewSubscriptionTieredWithProrationPrice {
6780
+ /**
6781
+ * The cadence to bill for this price on.
6782
+ */
6783
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
6784
+
6785
+ /**
6786
+ * The id of the item the price will be associated with.
6787
+ */
6788
+ item_id: string;
6789
+
6790
+ /**
6791
+ * The pricing model type
6792
+ */
6793
+ model_type: 'tiered_with_proration';
6794
+
6795
+ /**
6796
+ * The name of the price.
6797
+ */
6798
+ name: string;
6799
+
6800
+ /**
6801
+ * Configuration for tiered_with_proration pricing
6802
+ */
6803
+ tiered_with_proration_config: NewSubscriptionTieredWithProrationPrice.TieredWithProrationConfig;
6804
+
6805
+ /**
6806
+ * The id of the billable metric for the price. Only needed if the price is
6807
+ * usage-based.
6808
+ */
6809
+ billable_metric_id?: string | null;
6810
+
6811
+ /**
6812
+ * If the Price represents a fixed cost, the price will be billed in-advance if
6813
+ * this is true, and in-arrears if this is false.
6814
+ */
6815
+ billed_in_advance?: boolean | null;
6816
+
6817
+ /**
6818
+ * For custom cadence: specifies the duration of the billing period in days or
6819
+ * months.
6820
+ */
6821
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
6822
+
6823
+ /**
6824
+ * The per unit conversion rate of the price currency to the invoicing currency.
6825
+ */
6826
+ conversion_rate?: number | null;
6827
+
6828
+ /**
6829
+ * The configuration for the rate of the price currency to the invoicing currency.
6830
+ */
6831
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
6832
+
6833
+ /**
6834
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
6835
+ * price is billed.
6836
+ */
6837
+ currency?: string | null;
6838
+
6839
+ /**
6840
+ * For dimensional price: specifies a price group and dimension values
6841
+ */
6842
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
6843
+
6844
+ /**
6845
+ * An alias for the price.
6846
+ */
6847
+ external_price_id?: string | null;
6848
+
6849
+ /**
6850
+ * If the Price represents a fixed cost, this represents the quantity of units
6851
+ * applied.
6852
+ */
6853
+ fixed_price_quantity?: number | null;
6854
+
6855
+ /**
6856
+ * The property used to group this price on an invoice
6857
+ */
6858
+ invoice_grouping_key?: string | null;
6859
+
6860
+ /**
6861
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
6862
+ * If unspecified, a single invoice is produced per billing cycle.
6863
+ */
6864
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
6865
+
6866
+ /**
6867
+ * User-specified key/value pairs for the resource. Individual keys can be removed
6868
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
6869
+ * by setting `metadata` to `null`.
6870
+ */
6871
+ metadata?: { [key: string]: string | null } | null;
6872
+
6873
+ /**
6874
+ * A transient ID that can be used to reference this price when adding adjustments
6875
+ * in the same API call.
6876
+ */
6877
+ reference_id?: string | null;
6878
+ }
6879
+
6880
+ export namespace NewSubscriptionTieredWithProrationPrice {
6881
+ /**
6882
+ * Configuration for tiered_with_proration pricing
6883
+ */
6884
+ export interface TieredWithProrationConfig {
6885
+ /**
6886
+ * Tiers for rating based on total usage quantities into the specified tier with
6887
+ * proration
6888
+ */
6889
+ tiers: Array<TieredWithProrationConfig.Tier>;
6890
+ }
6891
+
6892
+ export namespace TieredWithProrationConfig {
6893
+ /**
6894
+ * Configuration for a single tiered with proration tier
6895
+ */
6896
+ export interface Tier {
6897
+ /**
6898
+ * Inclusive tier starting value
6899
+ */
6900
+ tier_lower_bound: string;
6901
+
6902
+ /**
6903
+ * Amount per unit
6904
+ */
6905
+ unit_amount: string;
6906
+ }
6907
+ }
6908
+ }
6909
+
5535
6910
  export interface NewSubscriptionGroupedWithMinMaxThresholdsPrice {
5536
6911
  /**
5537
6912
  * The cadence to bill for this price on.
5538
6913
  */
5539
6914
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
5540
6915
 
5541
- grouped_with_min_max_thresholds_config: { [key: string]: unknown };
6916
+ /**
6917
+ * Configuration for grouped_with_min_max_thresholds pricing
6918
+ */
6919
+ grouped_with_min_max_thresholds_config: NewSubscriptionGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
5542
6920
 
5543
6921
  /**
5544
6922
  * The id of the item the price will be associated with.
5545
6923
  */
5546
6924
  item_id: string;
5547
6925
 
6926
+ /**
6927
+ * The pricing model type
6928
+ */
5548
6929
  model_type: 'grouped_with_min_max_thresholds';
5549
6930
 
5550
6931
  /**
@@ -5626,6 +7007,33 @@ export namespace SubscriptionSchedulePlanChangeParams {
5626
7007
  */
5627
7008
  reference_id?: string | null;
5628
7009
  }
7010
+
7011
+ export namespace NewSubscriptionGroupedWithMinMaxThresholdsPrice {
7012
+ /**
7013
+ * Configuration for grouped_with_min_max_thresholds pricing
7014
+ */
7015
+ export interface GroupedWithMinMaxThresholdsConfig {
7016
+ /**
7017
+ * The event property used to group before applying thresholds
7018
+ */
7019
+ grouping_key: string;
7020
+
7021
+ /**
7022
+ * The maximum amount to charge each group
7023
+ */
7024
+ maximum_charge: string;
7025
+
7026
+ /**
7027
+ * The minimum amount to charge each group, regardless of usage
7028
+ */
7029
+ minimum_charge: string;
7030
+
7031
+ /**
7032
+ * The base price charged per group
7033
+ */
7034
+ per_unit_rate: string;
7035
+ }
7036
+ }
5629
7037
  }
5630
7038
  }
5631
7039
 
@@ -5719,7 +7127,6 @@ export declare namespace Subscriptions {
5719
7127
  type NewSubscriptionScalableMatrixWithTieredPricingPrice as NewSubscriptionScalableMatrixWithTieredPricingPrice,
5720
7128
  type NewSubscriptionScalableMatrixWithUnitPricingPrice as NewSubscriptionScalableMatrixWithUnitPricingPrice,
5721
7129
  type NewSubscriptionThresholdTotalAmountPrice as NewSubscriptionThresholdTotalAmountPrice,
5722
- type NewSubscriptionTierWithProrationPrice as NewSubscriptionTierWithProrationPrice,
5723
7130
  type NewSubscriptionTieredPackagePrice as NewSubscriptionTieredPackagePrice,
5724
7131
  type NewSubscriptionTieredPackageWithMinimumPrice as NewSubscriptionTieredPackageWithMinimumPrice,
5725
7132
  type NewSubscriptionTieredPrice as NewSubscriptionTieredPrice,