orb-billing 5.6.0 → 5.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/core.js +3 -3
  3. package/core.js.map +1 -1
  4. package/core.mjs +3 -3
  5. package/core.mjs.map +1 -1
  6. package/index.d.mts +2 -4
  7. package/index.d.ts +2 -4
  8. package/index.d.ts.map +1 -1
  9. package/index.js.map +1 -1
  10. package/index.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/beta/beta.d.ts +288 -10
  13. package/resources/beta/beta.d.ts.map +1 -1
  14. package/resources/beta/beta.js.map +1 -1
  15. package/resources/beta/beta.mjs.map +1 -1
  16. package/resources/beta/external-plan-id.d.ts +288 -10
  17. package/resources/beta/external-plan-id.d.ts.map +1 -1
  18. package/resources/customers/customers.d.ts +27 -6
  19. package/resources/customers/customers.d.ts.map +1 -1
  20. package/resources/customers/customers.js.map +1 -1
  21. package/resources/customers/customers.mjs.map +1 -1
  22. package/resources/index.d.ts +1 -1
  23. package/resources/index.d.ts.map +1 -1
  24. package/resources/index.js.map +1 -1
  25. package/resources/index.mjs.map +1 -1
  26. package/resources/invoices.d.ts +3 -0
  27. package/resources/invoices.d.ts.map +1 -1
  28. package/resources/invoices.js.map +1 -1
  29. package/resources/invoices.mjs.map +1 -1
  30. package/resources/plans/plans.d.ts +144 -5
  31. package/resources/plans/plans.d.ts.map +1 -1
  32. package/resources/plans/plans.js.map +1 -1
  33. package/resources/plans/plans.mjs.map +1 -1
  34. package/resources/prices/prices.d.ts +924 -123
  35. package/resources/prices/prices.d.ts.map +1 -1
  36. package/resources/prices/prices.js.map +1 -1
  37. package/resources/prices/prices.mjs.map +1 -1
  38. package/resources/shared.d.ts +2468 -338
  39. package/resources/shared.d.ts.map +1 -1
  40. package/resources/shared.js.map +1 -1
  41. package/resources/shared.mjs.map +1 -1
  42. package/resources/subscriptions.d.ts +1367 -174
  43. package/resources/subscriptions.d.ts.map +1 -1
  44. package/resources/subscriptions.js.map +1 -1
  45. package/resources/subscriptions.mjs.map +1 -1
  46. package/src/core.ts +3 -3
  47. package/src/index.ts +0 -4
  48. package/src/resources/beta/beta.ts +348 -20
  49. package/src/resources/beta/external-plan-id.ts +348 -20
  50. package/src/resources/customers/customers.ts +48 -6
  51. package/src/resources/index.ts +0 -1
  52. package/src/resources/invoices.ts +3 -0
  53. package/src/resources/plans/plans.ts +174 -10
  54. package/src/resources/prices/prices.ts +1058 -113
  55. package/src/resources/shared.ts +2786 -288
  56. package/src/resources/subscriptions.ts +1607 -202
  57. package/src/version.ts +1 -1
  58. package/version.d.ts +1 -1
  59. package/version.js +1 -1
  60. package/version.mjs +1 -1
@@ -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,42 @@ 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.
3555
+ */
3556
+ tiers: Array<TieredPackageConfig.Tier>;
3557
+ }
3558
+
3559
+ export namespace TieredPackageConfig {
3560
+ /**
3561
+ * Configuration for a single tier with business logic
3562
+ */
3563
+ export interface Tier {
3564
+ /**
3565
+ * Price per package
3566
+ */
3567
+ per_unit: string;
3568
+
3569
+ /**
3570
+ * Tier lower bound
3571
+ */
3572
+ tier_lower_bound: string;
3573
+ }
3574
+ }
3575
+ }
3576
+
3577
+ export interface NewSubscriptionTieredPackageWithMinimumPrice {
2916
3578
  /**
2917
3579
  * The cadence to bill for this price on.
2918
3580
  */
@@ -2923,14 +3585,20 @@ export interface NewSubscriptionTieredPackagePrice {
2923
3585
  */
2924
3586
  item_id: string;
2925
3587
 
2926
- model_type: 'tiered_package';
3588
+ /**
3589
+ * The pricing model type
3590
+ */
3591
+ model_type: 'tiered_package_with_minimum';
2927
3592
 
2928
3593
  /**
2929
3594
  * The name of the price.
2930
3595
  */
2931
3596
  name: string;
2932
3597
 
2933
- tiered_package_config: { [key: string]: unknown };
3598
+ /**
3599
+ * Configuration for tiered_package_with_minimum pricing
3600
+ */
3601
+ tiered_package_with_minimum_config: NewSubscriptionTieredPackageWithMinimumPrice.TieredPackageWithMinimumConfig;
2934
3602
 
2935
3603
  /**
2936
3604
  * The id of the billable metric for the price. Only needed if the price is
@@ -3007,7 +3675,47 @@ export interface NewSubscriptionTieredPackagePrice {
3007
3675
  reference_id?: string | null;
3008
3676
  }
3009
3677
 
3010
- export interface NewSubscriptionTieredPackageWithMinimumPrice {
3678
+ export namespace NewSubscriptionTieredPackageWithMinimumPrice {
3679
+ /**
3680
+ * Configuration for tiered_package_with_minimum pricing
3681
+ */
3682
+ export interface TieredPackageWithMinimumConfig {
3683
+ /**
3684
+ * Package size
3685
+ */
3686
+ package_size: number;
3687
+
3688
+ /**
3689
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
3690
+ * are defined using exclusive lower bounds.
3691
+ */
3692
+ tiers: Array<TieredPackageWithMinimumConfig.Tier>;
3693
+ }
3694
+
3695
+ export namespace TieredPackageWithMinimumConfig {
3696
+ /**
3697
+ * Configuration for a single tier
3698
+ */
3699
+ export interface Tier {
3700
+ /**
3701
+ * Minimum amount
3702
+ */
3703
+ minimum_amount: string;
3704
+
3705
+ /**
3706
+ * Price per package
3707
+ */
3708
+ per_unit: string;
3709
+
3710
+ /**
3711
+ * Tier lower bound
3712
+ */
3713
+ tier_lower_bound: string;
3714
+ }
3715
+ }
3716
+ }
3717
+
3718
+ export interface NewSubscriptionTieredPrice {
3011
3719
  /**
3012
3720
  * The cadence to bill for this price on.
3013
3721
  */
@@ -3018,14 +3726,20 @@ export interface NewSubscriptionTieredPackageWithMinimumPrice {
3018
3726
  */
3019
3727
  item_id: string;
3020
3728
 
3021
- model_type: 'tiered_package_with_minimum';
3729
+ /**
3730
+ * The pricing model type
3731
+ */
3732
+ model_type: 'tiered';
3022
3733
 
3023
3734
  /**
3024
3735
  * The name of the price.
3025
3736
  */
3026
3737
  name: string;
3027
3738
 
3028
- tiered_package_with_minimum_config: { [key: string]: unknown };
3739
+ /**
3740
+ * Configuration for tiered pricing
3741
+ */
3742
+ tiered_config: Shared.TieredConfig;
3029
3743
 
3030
3744
  /**
3031
3745
  * The id of the billable metric for the price. Only needed if the price is
@@ -3102,7 +3816,7 @@ export interface NewSubscriptionTieredPackageWithMinimumPrice {
3102
3816
  reference_id?: string | null;
3103
3817
  }
3104
3818
 
3105
- export interface NewSubscriptionTieredPrice {
3819
+ export interface NewSubscriptionTieredWithMinimumPrice {
3106
3820
  /**
3107
3821
  * The cadence to bill for this price on.
3108
3822
  */
@@ -3113,14 +3827,20 @@ export interface NewSubscriptionTieredPrice {
3113
3827
  */
3114
3828
  item_id: string;
3115
3829
 
3116
- model_type: 'tiered';
3830
+ /**
3831
+ * The pricing model type
3832
+ */
3833
+ model_type: 'tiered_with_minimum';
3117
3834
 
3118
3835
  /**
3119
3836
  * The name of the price.
3120
3837
  */
3121
3838
  name: string;
3122
3839
 
3123
- tiered_config: Shared.TieredConfig;
3840
+ /**
3841
+ * Configuration for tiered_with_minimum pricing
3842
+ */
3843
+ tiered_with_minimum_config: NewSubscriptionTieredWithMinimumPrice.TieredWithMinimumConfig;
3124
3844
 
3125
3845
  /**
3126
3846
  * The id of the billable metric for the price. Only needed if the price is
@@ -3197,7 +3917,52 @@ export interface NewSubscriptionTieredPrice {
3197
3917
  reference_id?: string | null;
3198
3918
  }
3199
3919
 
3200
- export interface NewSubscriptionTieredWithMinimumPrice {
3920
+ export namespace NewSubscriptionTieredWithMinimumPrice {
3921
+ /**
3922
+ * Configuration for tiered_with_minimum pricing
3923
+ */
3924
+ export interface TieredWithMinimumConfig {
3925
+ /**
3926
+ * Tiered pricing with a minimum amount dependent on the volume tier. Tiers are
3927
+ * defined using exclusive lower bounds.
3928
+ */
3929
+ tiers: Array<TieredWithMinimumConfig.Tier>;
3930
+
3931
+ /**
3932
+ * If true, tiers with an accrued amount of 0 will not be included in the rating.
3933
+ */
3934
+ hide_zero_amount_tiers?: boolean;
3935
+
3936
+ /**
3937
+ * If true, the unit price will be prorated to the billing period
3938
+ */
3939
+ prorate?: boolean;
3940
+ }
3941
+
3942
+ export namespace TieredWithMinimumConfig {
3943
+ /**
3944
+ * Configuration for a single tier
3945
+ */
3946
+ export interface Tier {
3947
+ /**
3948
+ * Minimum amount
3949
+ */
3950
+ minimum_amount: string;
3951
+
3952
+ /**
3953
+ * Tier lower bound
3954
+ */
3955
+ tier_lower_bound: string;
3956
+
3957
+ /**
3958
+ * Per unit amount
3959
+ */
3960
+ unit_amount: string;
3961
+ }
3962
+ }
3963
+ }
3964
+
3965
+ export interface NewSubscriptionUnitPrice {
3201
3966
  /**
3202
3967
  * The cadence to bill for this price on.
3203
3968
  */
@@ -3208,14 +3973,20 @@ export interface NewSubscriptionTieredWithMinimumPrice {
3208
3973
  */
3209
3974
  item_id: string;
3210
3975
 
3211
- model_type: 'tiered_with_minimum';
3976
+ /**
3977
+ * The pricing model type
3978
+ */
3979
+ model_type: 'unit';
3212
3980
 
3213
3981
  /**
3214
3982
  * The name of the price.
3215
3983
  */
3216
3984
  name: string;
3217
3985
 
3218
- tiered_with_minimum_config: { [key: string]: unknown };
3986
+ /**
3987
+ * Configuration for unit pricing
3988
+ */
3989
+ unit_config: Shared.UnitConfig;
3219
3990
 
3220
3991
  /**
3221
3992
  * The id of the billable metric for the price. Only needed if the price is
@@ -3292,7 +4063,7 @@ export interface NewSubscriptionTieredWithMinimumPrice {
3292
4063
  reference_id?: string | null;
3293
4064
  }
3294
4065
 
3295
- export interface NewSubscriptionUnitPrice {
4066
+ export interface NewSubscriptionUnitWithPercentPrice {
3296
4067
  /**
3297
4068
  * The cadence to bill for this price on.
3298
4069
  */
@@ -3303,14 +4074,20 @@ export interface NewSubscriptionUnitPrice {
3303
4074
  */
3304
4075
  item_id: string;
3305
4076
 
3306
- model_type: 'unit';
4077
+ /**
4078
+ * The pricing model type
4079
+ */
4080
+ model_type: 'unit_with_percent';
3307
4081
 
3308
4082
  /**
3309
4083
  * The name of the price.
3310
4084
  */
3311
4085
  name: string;
3312
4086
 
3313
- unit_config: Shared.UnitConfig;
4087
+ /**
4088
+ * Configuration for unit_with_percent pricing
4089
+ */
4090
+ unit_with_percent_config: NewSubscriptionUnitWithPercentPrice.UnitWithPercentConfig;
3314
4091
 
3315
4092
  /**
3316
4093
  * The id of the billable metric for the price. Only needed if the price is
@@ -3387,7 +4164,24 @@ export interface NewSubscriptionUnitPrice {
3387
4164
  reference_id?: string | null;
3388
4165
  }
3389
4166
 
3390
- export interface NewSubscriptionUnitWithPercentPrice {
4167
+ export namespace NewSubscriptionUnitWithPercentPrice {
4168
+ /**
4169
+ * Configuration for unit_with_percent pricing
4170
+ */
4171
+ export interface UnitWithPercentConfig {
4172
+ /**
4173
+ * What percent, out of 100, of the calculated total to charge
4174
+ */
4175
+ percent: string;
4176
+
4177
+ /**
4178
+ * Rate per unit of usage
4179
+ */
4180
+ unit_amount: string;
4181
+ }
4182
+ }
4183
+
4184
+ export interface NewSubscriptionUnitWithProrationPrice {
3391
4185
  /**
3392
4186
  * The cadence to bill for this price on.
3393
4187
  */
@@ -3398,14 +4192,20 @@ export interface NewSubscriptionUnitWithPercentPrice {
3398
4192
  */
3399
4193
  item_id: string;
3400
4194
 
3401
- model_type: 'unit_with_percent';
4195
+ /**
4196
+ * The pricing model type
4197
+ */
4198
+ model_type: 'unit_with_proration';
3402
4199
 
3403
4200
  /**
3404
4201
  * The name of the price.
3405
4202
  */
3406
4203
  name: string;
3407
4204
 
3408
- unit_with_percent_config: { [key: string]: unknown };
4205
+ /**
4206
+ * Configuration for unit_with_proration pricing
4207
+ */
4208
+ unit_with_proration_config: NewSubscriptionUnitWithProrationPrice.UnitWithProrationConfig;
3409
4209
 
3410
4210
  /**
3411
4211
  * The id of the billable metric for the price. Only needed if the price is
@@ -3482,99 +4282,16 @@ export interface NewSubscriptionUnitWithPercentPrice {
3482
4282
  reference_id?: string | null;
3483
4283
  }
3484
4284
 
3485
- export interface NewSubscriptionUnitWithProrationPrice {
4285
+ export namespace NewSubscriptionUnitWithProrationPrice {
3486
4286
  /**
3487
- * The cadence to bill for this price on.
4287
+ * Configuration for unit_with_proration pricing
3488
4288
  */
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;
4289
+ export interface UnitWithProrationConfig {
4290
+ /**
4291
+ * Rate per unit of usage
4292
+ */
4293
+ unit_amount: string;
4294
+ }
3578
4295
  }
3579
4296
 
3580
4297
  /**
@@ -4120,35 +4837,35 @@ export namespace SubscriptionCreateParams {
4120
4837
  plan_phase_order?: number | null;
4121
4838
 
4122
4839
  /**
4123
- * The definition of a new price to create and add to the subscription.
4840
+ * New subscription price request body params.
4124
4841
  */
4125
4842
  price?:
4126
4843
  | SubscriptionsAPI.NewSubscriptionUnitPrice
4127
- | SubscriptionsAPI.NewSubscriptionPackagePrice
4128
- | SubscriptionsAPI.NewSubscriptionMatrixPrice
4129
4844
  | SubscriptionsAPI.NewSubscriptionTieredPrice
4130
4845
  | SubscriptionsAPI.NewSubscriptionBulkPrice
4846
+ | SubscriptionsAPI.NewSubscriptionPackagePrice
4847
+ | SubscriptionsAPI.NewSubscriptionMatrixPrice
4131
4848
  | SubscriptionsAPI.NewSubscriptionThresholdTotalAmountPrice
4132
4849
  | SubscriptionsAPI.NewSubscriptionTieredPackagePrice
4133
4850
  | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice
4134
- | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice
4851
+ | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice
4852
+ | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice
4135
4853
  | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice
4136
- | SubscriptionsAPI.NewSubscriptionTierWithProrationPrice
4854
+ | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice
4855
+ | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice
4856
+ | AddPrice.NewSubscriptionTieredWithProrationPrice
4137
4857
  | SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice
4138
4858
  | SubscriptionsAPI.NewSubscriptionGroupedAllocationPrice
4139
- | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice
4140
4859
  | SubscriptionsAPI.NewSubscriptionBulkWithProrationPrice
4141
- | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice
4142
- | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice
4143
- | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice
4144
- | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice
4860
+ | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice
4145
4861
  | SubscriptionsAPI.NewSubscriptionGroupedWithMeteredMinimumPrice
4862
+ | AddPrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice
4146
4863
  | SubscriptionsAPI.NewSubscriptionMatrixWithDisplayNamePrice
4147
4864
  | SubscriptionsAPI.NewSubscriptionGroupedTieredPackagePrice
4148
- | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice
4149
- | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice
4150
- | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice
4151
- | AddPrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice
4865
+ | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice
4866
+ | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice
4867
+ | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice
4868
+ | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice
4152
4869
  | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice
4153
4870
  | null;
4154
4871
 
@@ -4166,19 +4883,156 @@ export namespace SubscriptionCreateParams {
4166
4883
  }
4167
4884
 
4168
4885
  export namespace AddPrice {
4886
+ export interface NewSubscriptionTieredWithProrationPrice {
4887
+ /**
4888
+ * The cadence to bill for this price on.
4889
+ */
4890
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4891
+
4892
+ /**
4893
+ * The id of the item the price will be associated with.
4894
+ */
4895
+ item_id: string;
4896
+
4897
+ /**
4898
+ * The pricing model type
4899
+ */
4900
+ model_type: 'tiered_with_proration';
4901
+
4902
+ /**
4903
+ * The name of the price.
4904
+ */
4905
+ name: string;
4906
+
4907
+ /**
4908
+ * Configuration for tiered_with_proration pricing
4909
+ */
4910
+ tiered_with_proration_config: NewSubscriptionTieredWithProrationPrice.TieredWithProrationConfig;
4911
+
4912
+ /**
4913
+ * The id of the billable metric for the price. Only needed if the price is
4914
+ * usage-based.
4915
+ */
4916
+ billable_metric_id?: string | null;
4917
+
4918
+ /**
4919
+ * If the Price represents a fixed cost, the price will be billed in-advance if
4920
+ * this is true, and in-arrears if this is false.
4921
+ */
4922
+ billed_in_advance?: boolean | null;
4923
+
4924
+ /**
4925
+ * For custom cadence: specifies the duration of the billing period in days or
4926
+ * months.
4927
+ */
4928
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4929
+
4930
+ /**
4931
+ * The per unit conversion rate of the price currency to the invoicing currency.
4932
+ */
4933
+ conversion_rate?: number | null;
4934
+
4935
+ /**
4936
+ * The configuration for the rate of the price currency to the invoicing currency.
4937
+ */
4938
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
4939
+
4940
+ /**
4941
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
4942
+ * price is billed.
4943
+ */
4944
+ currency?: string | null;
4945
+
4946
+ /**
4947
+ * For dimensional price: specifies a price group and dimension values
4948
+ */
4949
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
4950
+
4951
+ /**
4952
+ * An alias for the price.
4953
+ */
4954
+ external_price_id?: string | null;
4955
+
4956
+ /**
4957
+ * If the Price represents a fixed cost, this represents the quantity of units
4958
+ * applied.
4959
+ */
4960
+ fixed_price_quantity?: number | null;
4961
+
4962
+ /**
4963
+ * The property used to group this price on an invoice
4964
+ */
4965
+ invoice_grouping_key?: string | null;
4966
+
4967
+ /**
4968
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4969
+ * If unspecified, a single invoice is produced per billing cycle.
4970
+ */
4971
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4972
+
4973
+ /**
4974
+ * User-specified key/value pairs for the resource. Individual keys can be removed
4975
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
4976
+ * by setting `metadata` to `null`.
4977
+ */
4978
+ metadata?: { [key: string]: string | null } | null;
4979
+
4980
+ /**
4981
+ * A transient ID that can be used to reference this price when adding adjustments
4982
+ * in the same API call.
4983
+ */
4984
+ reference_id?: string | null;
4985
+ }
4986
+
4987
+ export namespace NewSubscriptionTieredWithProrationPrice {
4988
+ /**
4989
+ * Configuration for tiered_with_proration pricing
4990
+ */
4991
+ export interface TieredWithProrationConfig {
4992
+ /**
4993
+ * Tiers for rating based on total usage quantities into the specified tier with
4994
+ * proration
4995
+ */
4996
+ tiers: Array<TieredWithProrationConfig.Tier>;
4997
+ }
4998
+
4999
+ export namespace TieredWithProrationConfig {
5000
+ /**
5001
+ * Configuration for a single tiered with proration tier
5002
+ */
5003
+ export interface Tier {
5004
+ /**
5005
+ * Inclusive tier starting value
5006
+ */
5007
+ tier_lower_bound: string;
5008
+
5009
+ /**
5010
+ * Amount per unit
5011
+ */
5012
+ unit_amount: string;
5013
+ }
5014
+ }
5015
+ }
5016
+
4169
5017
  export interface NewSubscriptionGroupedWithMinMaxThresholdsPrice {
4170
5018
  /**
4171
5019
  * The cadence to bill for this price on.
4172
5020
  */
4173
5021
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4174
5022
 
4175
- grouped_with_min_max_thresholds_config: { [key: string]: unknown };
5023
+ /**
5024
+ * Configuration for grouped_with_min_max_thresholds pricing
5025
+ */
5026
+ grouped_with_min_max_thresholds_config: NewSubscriptionGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
4176
5027
 
4177
5028
  /**
4178
5029
  * The id of the item the price will be associated with.
4179
5030
  */
4180
5031
  item_id: string;
4181
5032
 
5033
+ /**
5034
+ * The pricing model type
5035
+ */
4182
5036
  model_type: 'grouped_with_min_max_thresholds';
4183
5037
 
4184
5038
  /**
@@ -4260,6 +5114,33 @@ export namespace SubscriptionCreateParams {
4260
5114
  */
4261
5115
  reference_id?: string | null;
4262
5116
  }
5117
+
5118
+ export namespace NewSubscriptionGroupedWithMinMaxThresholdsPrice {
5119
+ /**
5120
+ * Configuration for grouped_with_min_max_thresholds pricing
5121
+ */
5122
+ export interface GroupedWithMinMaxThresholdsConfig {
5123
+ /**
5124
+ * The event property used to group before applying thresholds
5125
+ */
5126
+ grouping_key: string;
5127
+
5128
+ /**
5129
+ * The maximum amount to charge each group
5130
+ */
5131
+ maximum_charge: string;
5132
+
5133
+ /**
5134
+ * The minimum amount to charge each group, regardless of usage
5135
+ */
5136
+ minimum_charge: string;
5137
+
5138
+ /**
5139
+ * The base price charged per group
5140
+ */
5141
+ per_unit_rate: string;
5142
+ }
5143
+ }
4263
5144
  }
4264
5145
 
4265
5146
  export interface RemoveAdjustment {
@@ -4338,35 +5219,35 @@ export namespace SubscriptionCreateParams {
4338
5219
  minimum_amount?: string | null;
4339
5220
 
4340
5221
  /**
4341
- * The definition of a new price to create and add to the subscription.
5222
+ * New subscription price request body params.
4342
5223
  */
4343
5224
  price?:
4344
5225
  | SubscriptionsAPI.NewSubscriptionUnitPrice
4345
- | SubscriptionsAPI.NewSubscriptionPackagePrice
4346
- | SubscriptionsAPI.NewSubscriptionMatrixPrice
4347
5226
  | SubscriptionsAPI.NewSubscriptionTieredPrice
4348
5227
  | SubscriptionsAPI.NewSubscriptionBulkPrice
5228
+ | SubscriptionsAPI.NewSubscriptionPackagePrice
5229
+ | SubscriptionsAPI.NewSubscriptionMatrixPrice
4349
5230
  | SubscriptionsAPI.NewSubscriptionThresholdTotalAmountPrice
4350
5231
  | SubscriptionsAPI.NewSubscriptionTieredPackagePrice
4351
5232
  | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice
4352
- | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice
5233
+ | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice
5234
+ | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice
4353
5235
  | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice
4354
- | SubscriptionsAPI.NewSubscriptionTierWithProrationPrice
5236
+ | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice
5237
+ | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice
5238
+ | ReplacePrice.NewSubscriptionTieredWithProrationPrice
4355
5239
  | SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice
4356
5240
  | SubscriptionsAPI.NewSubscriptionGroupedAllocationPrice
4357
- | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice
4358
5241
  | SubscriptionsAPI.NewSubscriptionBulkWithProrationPrice
4359
- | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice
4360
- | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice
4361
- | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice
4362
- | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice
5242
+ | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice
4363
5243
  | SubscriptionsAPI.NewSubscriptionGroupedWithMeteredMinimumPrice
5244
+ | ReplacePrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice
4364
5245
  | SubscriptionsAPI.NewSubscriptionMatrixWithDisplayNamePrice
4365
5246
  | SubscriptionsAPI.NewSubscriptionGroupedTieredPackagePrice
4366
- | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice
4367
- | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice
4368
- | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice
4369
- | ReplacePrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice
5247
+ | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice
5248
+ | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice
5249
+ | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice
5250
+ | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice
4370
5251
  | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice
4371
5252
  | null;
4372
5253
 
@@ -4377,26 +5258,32 @@ export namespace SubscriptionCreateParams {
4377
5258
  }
4378
5259
 
4379
5260
  export namespace ReplacePrice {
4380
- export interface NewSubscriptionGroupedWithMinMaxThresholdsPrice {
5261
+ export interface NewSubscriptionTieredWithProrationPrice {
4381
5262
  /**
4382
5263
  * The cadence to bill for this price on.
4383
5264
  */
4384
5265
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4385
5266
 
4386
- grouped_with_min_max_thresholds_config: { [key: string]: unknown };
4387
-
4388
5267
  /**
4389
5268
  * The id of the item the price will be associated with.
4390
5269
  */
4391
5270
  item_id: string;
4392
5271
 
4393
- model_type: 'grouped_with_min_max_thresholds';
5272
+ /**
5273
+ * The pricing model type
5274
+ */
5275
+ model_type: 'tiered_with_proration';
4394
5276
 
4395
5277
  /**
4396
5278
  * The name of the price.
4397
5279
  */
4398
5280
  name: string;
4399
5281
 
5282
+ /**
5283
+ * Configuration for tiered_with_proration pricing
5284
+ */
5285
+ tiered_with_proration_config: NewSubscriptionTieredWithProrationPrice.TieredWithProrationConfig;
5286
+
4400
5287
  /**
4401
5288
  * The id of the billable metric for the price. Only needed if the price is
4402
5289
  * usage-based.
@@ -4471,6 +5358,164 @@ export namespace SubscriptionCreateParams {
4471
5358
  */
4472
5359
  reference_id?: string | null;
4473
5360
  }
5361
+
5362
+ export namespace NewSubscriptionTieredWithProrationPrice {
5363
+ /**
5364
+ * Configuration for tiered_with_proration pricing
5365
+ */
5366
+ export interface TieredWithProrationConfig {
5367
+ /**
5368
+ * Tiers for rating based on total usage quantities into the specified tier with
5369
+ * proration
5370
+ */
5371
+ tiers: Array<TieredWithProrationConfig.Tier>;
5372
+ }
5373
+
5374
+ export namespace TieredWithProrationConfig {
5375
+ /**
5376
+ * Configuration for a single tiered with proration tier
5377
+ */
5378
+ export interface Tier {
5379
+ /**
5380
+ * Inclusive tier starting value
5381
+ */
5382
+ tier_lower_bound: string;
5383
+
5384
+ /**
5385
+ * Amount per unit
5386
+ */
5387
+ unit_amount: string;
5388
+ }
5389
+ }
5390
+ }
5391
+
5392
+ export interface NewSubscriptionGroupedWithMinMaxThresholdsPrice {
5393
+ /**
5394
+ * The cadence to bill for this price on.
5395
+ */
5396
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
5397
+
5398
+ /**
5399
+ * Configuration for grouped_with_min_max_thresholds pricing
5400
+ */
5401
+ grouped_with_min_max_thresholds_config: NewSubscriptionGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
5402
+
5403
+ /**
5404
+ * The id of the item the price will be associated with.
5405
+ */
5406
+ item_id: string;
5407
+
5408
+ /**
5409
+ * The pricing model type
5410
+ */
5411
+ model_type: 'grouped_with_min_max_thresholds';
5412
+
5413
+ /**
5414
+ * The name of the price.
5415
+ */
5416
+ name: string;
5417
+
5418
+ /**
5419
+ * The id of the billable metric for the price. Only needed if the price is
5420
+ * usage-based.
5421
+ */
5422
+ billable_metric_id?: string | null;
5423
+
5424
+ /**
5425
+ * If the Price represents a fixed cost, the price will be billed in-advance if
5426
+ * this is true, and in-arrears if this is false.
5427
+ */
5428
+ billed_in_advance?: boolean | null;
5429
+
5430
+ /**
5431
+ * For custom cadence: specifies the duration of the billing period in days or
5432
+ * months.
5433
+ */
5434
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
5435
+
5436
+ /**
5437
+ * The per unit conversion rate of the price currency to the invoicing currency.
5438
+ */
5439
+ conversion_rate?: number | null;
5440
+
5441
+ /**
5442
+ * The configuration for the rate of the price currency to the invoicing currency.
5443
+ */
5444
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
5445
+
5446
+ /**
5447
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
5448
+ * price is billed.
5449
+ */
5450
+ currency?: string | null;
5451
+
5452
+ /**
5453
+ * For dimensional price: specifies a price group and dimension values
5454
+ */
5455
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
5456
+
5457
+ /**
5458
+ * An alias for the price.
5459
+ */
5460
+ external_price_id?: string | null;
5461
+
5462
+ /**
5463
+ * If the Price represents a fixed cost, this represents the quantity of units
5464
+ * applied.
5465
+ */
5466
+ fixed_price_quantity?: number | null;
5467
+
5468
+ /**
5469
+ * The property used to group this price on an invoice
5470
+ */
5471
+ invoice_grouping_key?: string | null;
5472
+
5473
+ /**
5474
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5475
+ * If unspecified, a single invoice is produced per billing cycle.
5476
+ */
5477
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
5478
+
5479
+ /**
5480
+ * User-specified key/value pairs for the resource. Individual keys can be removed
5481
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
5482
+ * by setting `metadata` to `null`.
5483
+ */
5484
+ metadata?: { [key: string]: string | null } | null;
5485
+
5486
+ /**
5487
+ * A transient ID that can be used to reference this price when adding adjustments
5488
+ * in the same API call.
5489
+ */
5490
+ reference_id?: string | null;
5491
+ }
5492
+
5493
+ export namespace NewSubscriptionGroupedWithMinMaxThresholdsPrice {
5494
+ /**
5495
+ * Configuration for grouped_with_min_max_thresholds pricing
5496
+ */
5497
+ export interface GroupedWithMinMaxThresholdsConfig {
5498
+ /**
5499
+ * The event property used to group before applying thresholds
5500
+ */
5501
+ grouping_key: string;
5502
+
5503
+ /**
5504
+ * The maximum amount to charge each group
5505
+ */
5506
+ maximum_charge: string;
5507
+
5508
+ /**
5509
+ * The minimum amount to charge each group, regardless of usage
5510
+ */
5511
+ minimum_charge: string;
5512
+
5513
+ /**
5514
+ * The base price charged per group
5515
+ */
5516
+ per_unit_rate: string;
5517
+ }
5518
+ }
4474
5519
  }
4475
5520
  }
4476
5521
 
@@ -4715,35 +5760,35 @@ export namespace SubscriptionPriceIntervalsParams {
4715
5760
  minimum_amount?: number | null;
4716
5761
 
4717
5762
  /**
4718
- * The definition of a new price to create and add to the subscription.
5763
+ * New floating price request body params.
4719
5764
  */
4720
5765
  price?:
4721
5766
  | Shared.NewFloatingUnitPrice
4722
- | Shared.NewFloatingPackagePrice
4723
- | Shared.NewFloatingMatrixPrice
4724
- | Shared.NewFloatingMatrixWithAllocationPrice
4725
5767
  | Shared.NewFloatingTieredPrice
4726
5768
  | Shared.NewFloatingBulkPrice
5769
+ | Shared.NewFloatingPackagePrice
5770
+ | Shared.NewFloatingMatrixPrice
4727
5771
  | Shared.NewFloatingThresholdTotalAmountPrice
4728
5772
  | Shared.NewFloatingTieredPackagePrice
4729
- | Shared.NewFloatingGroupedTieredPrice
4730
- | Shared.NewFloatingMaxGroupTieredPackagePrice
4731
5773
  | Shared.NewFloatingTieredWithMinimumPrice
4732
- | Shared.NewFloatingPackageWithAllocationPrice
5774
+ | Shared.NewFloatingGroupedTieredPrice
4733
5775
  | Shared.NewFloatingTieredPackageWithMinimumPrice
5776
+ | Shared.NewFloatingPackageWithAllocationPrice
4734
5777
  | Shared.NewFloatingUnitWithPercentPrice
5778
+ | Shared.NewFloatingMatrixWithAllocationPrice
4735
5779
  | Shared.NewFloatingTieredWithProrationPrice
4736
5780
  | Shared.NewFloatingUnitWithProrationPrice
4737
5781
  | Shared.NewFloatingGroupedAllocationPrice
5782
+ | Shared.NewFloatingBulkWithProrationPrice
4738
5783
  | Shared.NewFloatingGroupedWithProratedMinimumPrice
4739
5784
  | Shared.NewFloatingGroupedWithMeteredMinimumPrice
5785
+ | Add.NewFloatingGroupedWithMinMaxThresholdsPrice
4740
5786
  | Shared.NewFloatingMatrixWithDisplayNamePrice
4741
- | Shared.NewFloatingBulkWithProrationPrice
4742
5787
  | Shared.NewFloatingGroupedTieredPackagePrice
5788
+ | Shared.NewFloatingMaxGroupTieredPackagePrice
4743
5789
  | Shared.NewFloatingScalableMatrixWithUnitPricingPrice
4744
5790
  | Shared.NewFloatingScalableMatrixWithTieredPricingPrice
4745
5791
  | Shared.NewFloatingCumulativeGroupedBulkPrice
4746
- | Add.NewFloatingGroupedWithMinMaxThresholdsPrice
4747
5792
  | Shared.NewFloatingMinimumCompositePrice
4748
5793
  | null;
4749
5794
 
@@ -4816,13 +5861,19 @@ export namespace SubscriptionPriceIntervalsParams {
4816
5861
  */
4817
5862
  currency: string;
4818
5863
 
4819
- grouped_with_min_max_thresholds_config: { [key: string]: unknown };
5864
+ /**
5865
+ * Configuration for grouped_with_min_max_thresholds pricing
5866
+ */
5867
+ grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
4820
5868
 
4821
5869
  /**
4822
5870
  * The id of the item the price will be associated with.
4823
5871
  */
4824
5872
  item_id: string;
4825
5873
 
5874
+ /**
5875
+ * The pricing model type
5876
+ */
4826
5877
  model_type: 'grouped_with_min_max_thresholds';
4827
5878
 
4828
5879
  /**
@@ -4892,6 +5943,33 @@ export namespace SubscriptionPriceIntervalsParams {
4892
5943
  */
4893
5944
  metadata?: { [key: string]: string | null } | null;
4894
5945
  }
5946
+
5947
+ export namespace NewFloatingGroupedWithMinMaxThresholdsPrice {
5948
+ /**
5949
+ * Configuration for grouped_with_min_max_thresholds pricing
5950
+ */
5951
+ export interface GroupedWithMinMaxThresholdsConfig {
5952
+ /**
5953
+ * The event property used to group before applying thresholds
5954
+ */
5955
+ grouping_key: string;
5956
+
5957
+ /**
5958
+ * The maximum amount to charge each group
5959
+ */
5960
+ maximum_charge: string;
5961
+
5962
+ /**
5963
+ * The minimum amount to charge each group, regardless of usage
5964
+ */
5965
+ minimum_charge: string;
5966
+
5967
+ /**
5968
+ * The base price charged per group
5969
+ */
5970
+ per_unit_rate: string;
5971
+ }
5972
+ }
4895
5973
  }
4896
5974
 
4897
5975
  export interface AddAdjustment {
@@ -5275,35 +6353,35 @@ export namespace SubscriptionSchedulePlanChangeParams {
5275
6353
  plan_phase_order?: number | null;
5276
6354
 
5277
6355
  /**
5278
- * The definition of a new price to create and add to the subscription.
6356
+ * New subscription price request body params.
5279
6357
  */
5280
6358
  price?:
5281
6359
  | SubscriptionsAPI.NewSubscriptionUnitPrice
5282
- | SubscriptionsAPI.NewSubscriptionPackagePrice
5283
- | SubscriptionsAPI.NewSubscriptionMatrixPrice
5284
6360
  | SubscriptionsAPI.NewSubscriptionTieredPrice
5285
6361
  | SubscriptionsAPI.NewSubscriptionBulkPrice
6362
+ | SubscriptionsAPI.NewSubscriptionPackagePrice
6363
+ | SubscriptionsAPI.NewSubscriptionMatrixPrice
5286
6364
  | SubscriptionsAPI.NewSubscriptionThresholdTotalAmountPrice
5287
6365
  | SubscriptionsAPI.NewSubscriptionTieredPackagePrice
5288
6366
  | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice
5289
- | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice
6367
+ | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice
6368
+ | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice
5290
6369
  | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice
5291
- | SubscriptionsAPI.NewSubscriptionTierWithProrationPrice
6370
+ | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice
6371
+ | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice
6372
+ | AddPrice.NewSubscriptionTieredWithProrationPrice
5292
6373
  | SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice
5293
6374
  | SubscriptionsAPI.NewSubscriptionGroupedAllocationPrice
5294
- | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice
5295
6375
  | SubscriptionsAPI.NewSubscriptionBulkWithProrationPrice
5296
- | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice
5297
- | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice
5298
- | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice
5299
- | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice
6376
+ | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice
5300
6377
  | SubscriptionsAPI.NewSubscriptionGroupedWithMeteredMinimumPrice
6378
+ | AddPrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice
5301
6379
  | SubscriptionsAPI.NewSubscriptionMatrixWithDisplayNamePrice
5302
6380
  | SubscriptionsAPI.NewSubscriptionGroupedTieredPackagePrice
5303
- | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice
5304
- | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice
5305
- | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice
5306
- | AddPrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice
6381
+ | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice
6382
+ | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice
6383
+ | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice
6384
+ | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice
5307
6385
  | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice
5308
6386
  | null;
5309
6387
 
@@ -5321,19 +6399,156 @@ export namespace SubscriptionSchedulePlanChangeParams {
5321
6399
  }
5322
6400
 
5323
6401
  export namespace AddPrice {
6402
+ export interface NewSubscriptionTieredWithProrationPrice {
6403
+ /**
6404
+ * The cadence to bill for this price on.
6405
+ */
6406
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
6407
+
6408
+ /**
6409
+ * The id of the item the price will be associated with.
6410
+ */
6411
+ item_id: string;
6412
+
6413
+ /**
6414
+ * The pricing model type
6415
+ */
6416
+ model_type: 'tiered_with_proration';
6417
+
6418
+ /**
6419
+ * The name of the price.
6420
+ */
6421
+ name: string;
6422
+
6423
+ /**
6424
+ * Configuration for tiered_with_proration pricing
6425
+ */
6426
+ tiered_with_proration_config: NewSubscriptionTieredWithProrationPrice.TieredWithProrationConfig;
6427
+
6428
+ /**
6429
+ * The id of the billable metric for the price. Only needed if the price is
6430
+ * usage-based.
6431
+ */
6432
+ billable_metric_id?: string | null;
6433
+
6434
+ /**
6435
+ * If the Price represents a fixed cost, the price will be billed in-advance if
6436
+ * this is true, and in-arrears if this is false.
6437
+ */
6438
+ billed_in_advance?: boolean | null;
6439
+
6440
+ /**
6441
+ * For custom cadence: specifies the duration of the billing period in days or
6442
+ * months.
6443
+ */
6444
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
6445
+
6446
+ /**
6447
+ * The per unit conversion rate of the price currency to the invoicing currency.
6448
+ */
6449
+ conversion_rate?: number | null;
6450
+
6451
+ /**
6452
+ * The configuration for the rate of the price currency to the invoicing currency.
6453
+ */
6454
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
6455
+
6456
+ /**
6457
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
6458
+ * price is billed.
6459
+ */
6460
+ currency?: string | null;
6461
+
6462
+ /**
6463
+ * For dimensional price: specifies a price group and dimension values
6464
+ */
6465
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
6466
+
6467
+ /**
6468
+ * An alias for the price.
6469
+ */
6470
+ external_price_id?: string | null;
6471
+
6472
+ /**
6473
+ * If the Price represents a fixed cost, this represents the quantity of units
6474
+ * applied.
6475
+ */
6476
+ fixed_price_quantity?: number | null;
6477
+
6478
+ /**
6479
+ * The property used to group this price on an invoice
6480
+ */
6481
+ invoice_grouping_key?: string | null;
6482
+
6483
+ /**
6484
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
6485
+ * If unspecified, a single invoice is produced per billing cycle.
6486
+ */
6487
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
6488
+
6489
+ /**
6490
+ * User-specified key/value pairs for the resource. Individual keys can be removed
6491
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
6492
+ * by setting `metadata` to `null`.
6493
+ */
6494
+ metadata?: { [key: string]: string | null } | null;
6495
+
6496
+ /**
6497
+ * A transient ID that can be used to reference this price when adding adjustments
6498
+ * in the same API call.
6499
+ */
6500
+ reference_id?: string | null;
6501
+ }
6502
+
6503
+ export namespace NewSubscriptionTieredWithProrationPrice {
6504
+ /**
6505
+ * Configuration for tiered_with_proration pricing
6506
+ */
6507
+ export interface TieredWithProrationConfig {
6508
+ /**
6509
+ * Tiers for rating based on total usage quantities into the specified tier with
6510
+ * proration
6511
+ */
6512
+ tiers: Array<TieredWithProrationConfig.Tier>;
6513
+ }
6514
+
6515
+ export namespace TieredWithProrationConfig {
6516
+ /**
6517
+ * Configuration for a single tiered with proration tier
6518
+ */
6519
+ export interface Tier {
6520
+ /**
6521
+ * Inclusive tier starting value
6522
+ */
6523
+ tier_lower_bound: string;
6524
+
6525
+ /**
6526
+ * Amount per unit
6527
+ */
6528
+ unit_amount: string;
6529
+ }
6530
+ }
6531
+ }
6532
+
5324
6533
  export interface NewSubscriptionGroupedWithMinMaxThresholdsPrice {
5325
6534
  /**
5326
6535
  * The cadence to bill for this price on.
5327
6536
  */
5328
6537
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
5329
6538
 
5330
- grouped_with_min_max_thresholds_config: { [key: string]: unknown };
6539
+ /**
6540
+ * Configuration for grouped_with_min_max_thresholds pricing
6541
+ */
6542
+ grouped_with_min_max_thresholds_config: NewSubscriptionGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
5331
6543
 
5332
6544
  /**
5333
6545
  * The id of the item the price will be associated with.
5334
6546
  */
5335
6547
  item_id: string;
5336
6548
 
6549
+ /**
6550
+ * The pricing model type
6551
+ */
5337
6552
  model_type: 'grouped_with_min_max_thresholds';
5338
6553
 
5339
6554
  /**
@@ -5415,6 +6630,33 @@ export namespace SubscriptionSchedulePlanChangeParams {
5415
6630
  */
5416
6631
  reference_id?: string | null;
5417
6632
  }
6633
+
6634
+ export namespace NewSubscriptionGroupedWithMinMaxThresholdsPrice {
6635
+ /**
6636
+ * Configuration for grouped_with_min_max_thresholds pricing
6637
+ */
6638
+ export interface GroupedWithMinMaxThresholdsConfig {
6639
+ /**
6640
+ * The event property used to group before applying thresholds
6641
+ */
6642
+ grouping_key: string;
6643
+
6644
+ /**
6645
+ * The maximum amount to charge each group
6646
+ */
6647
+ maximum_charge: string;
6648
+
6649
+ /**
6650
+ * The minimum amount to charge each group, regardless of usage
6651
+ */
6652
+ minimum_charge: string;
6653
+
6654
+ /**
6655
+ * The base price charged per group
6656
+ */
6657
+ per_unit_rate: string;
6658
+ }
6659
+ }
5418
6660
  }
5419
6661
 
5420
6662
  export interface RemoveAdjustment {
@@ -5493,35 +6735,35 @@ export namespace SubscriptionSchedulePlanChangeParams {
5493
6735
  minimum_amount?: string | null;
5494
6736
 
5495
6737
  /**
5496
- * The definition of a new price to create and add to the subscription.
6738
+ * New subscription price request body params.
5497
6739
  */
5498
6740
  price?:
5499
6741
  | SubscriptionsAPI.NewSubscriptionUnitPrice
5500
- | SubscriptionsAPI.NewSubscriptionPackagePrice
5501
- | SubscriptionsAPI.NewSubscriptionMatrixPrice
5502
6742
  | SubscriptionsAPI.NewSubscriptionTieredPrice
5503
6743
  | SubscriptionsAPI.NewSubscriptionBulkPrice
6744
+ | SubscriptionsAPI.NewSubscriptionPackagePrice
6745
+ | SubscriptionsAPI.NewSubscriptionMatrixPrice
5504
6746
  | SubscriptionsAPI.NewSubscriptionThresholdTotalAmountPrice
5505
6747
  | SubscriptionsAPI.NewSubscriptionTieredPackagePrice
5506
6748
  | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice
5507
- | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice
6749
+ | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice
6750
+ | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice
5508
6751
  | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice
5509
- | SubscriptionsAPI.NewSubscriptionTierWithProrationPrice
6752
+ | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice
6753
+ | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice
6754
+ | ReplacePrice.NewSubscriptionTieredWithProrationPrice
5510
6755
  | SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice
5511
6756
  | SubscriptionsAPI.NewSubscriptionGroupedAllocationPrice
5512
- | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice
5513
6757
  | SubscriptionsAPI.NewSubscriptionBulkWithProrationPrice
5514
- | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice
5515
- | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice
5516
- | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice
5517
- | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice
6758
+ | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice
5518
6759
  | SubscriptionsAPI.NewSubscriptionGroupedWithMeteredMinimumPrice
6760
+ | ReplacePrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice
5519
6761
  | SubscriptionsAPI.NewSubscriptionMatrixWithDisplayNamePrice
5520
6762
  | SubscriptionsAPI.NewSubscriptionGroupedTieredPackagePrice
5521
- | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice
5522
- | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice
5523
- | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice
5524
- | ReplacePrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice
6763
+ | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice
6764
+ | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice
6765
+ | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice
6766
+ | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice
5525
6767
  | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice
5526
6768
  | null;
5527
6769
 
@@ -5532,19 +6774,156 @@ export namespace SubscriptionSchedulePlanChangeParams {
5532
6774
  }
5533
6775
 
5534
6776
  export namespace ReplacePrice {
6777
+ export interface NewSubscriptionTieredWithProrationPrice {
6778
+ /**
6779
+ * The cadence to bill for this price on.
6780
+ */
6781
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
6782
+
6783
+ /**
6784
+ * The id of the item the price will be associated with.
6785
+ */
6786
+ item_id: string;
6787
+
6788
+ /**
6789
+ * The pricing model type
6790
+ */
6791
+ model_type: 'tiered_with_proration';
6792
+
6793
+ /**
6794
+ * The name of the price.
6795
+ */
6796
+ name: string;
6797
+
6798
+ /**
6799
+ * Configuration for tiered_with_proration pricing
6800
+ */
6801
+ tiered_with_proration_config: NewSubscriptionTieredWithProrationPrice.TieredWithProrationConfig;
6802
+
6803
+ /**
6804
+ * The id of the billable metric for the price. Only needed if the price is
6805
+ * usage-based.
6806
+ */
6807
+ billable_metric_id?: string | null;
6808
+
6809
+ /**
6810
+ * If the Price represents a fixed cost, the price will be billed in-advance if
6811
+ * this is true, and in-arrears if this is false.
6812
+ */
6813
+ billed_in_advance?: boolean | null;
6814
+
6815
+ /**
6816
+ * For custom cadence: specifies the duration of the billing period in days or
6817
+ * months.
6818
+ */
6819
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
6820
+
6821
+ /**
6822
+ * The per unit conversion rate of the price currency to the invoicing currency.
6823
+ */
6824
+ conversion_rate?: number | null;
6825
+
6826
+ /**
6827
+ * The configuration for the rate of the price currency to the invoicing currency.
6828
+ */
6829
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
6830
+
6831
+ /**
6832
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
6833
+ * price is billed.
6834
+ */
6835
+ currency?: string | null;
6836
+
6837
+ /**
6838
+ * For dimensional price: specifies a price group and dimension values
6839
+ */
6840
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
6841
+
6842
+ /**
6843
+ * An alias for the price.
6844
+ */
6845
+ external_price_id?: string | null;
6846
+
6847
+ /**
6848
+ * If the Price represents a fixed cost, this represents the quantity of units
6849
+ * applied.
6850
+ */
6851
+ fixed_price_quantity?: number | null;
6852
+
6853
+ /**
6854
+ * The property used to group this price on an invoice
6855
+ */
6856
+ invoice_grouping_key?: string | null;
6857
+
6858
+ /**
6859
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
6860
+ * If unspecified, a single invoice is produced per billing cycle.
6861
+ */
6862
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
6863
+
6864
+ /**
6865
+ * User-specified key/value pairs for the resource. Individual keys can be removed
6866
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
6867
+ * by setting `metadata` to `null`.
6868
+ */
6869
+ metadata?: { [key: string]: string | null } | null;
6870
+
6871
+ /**
6872
+ * A transient ID that can be used to reference this price when adding adjustments
6873
+ * in the same API call.
6874
+ */
6875
+ reference_id?: string | null;
6876
+ }
6877
+
6878
+ export namespace NewSubscriptionTieredWithProrationPrice {
6879
+ /**
6880
+ * Configuration for tiered_with_proration pricing
6881
+ */
6882
+ export interface TieredWithProrationConfig {
6883
+ /**
6884
+ * Tiers for rating based on total usage quantities into the specified tier with
6885
+ * proration
6886
+ */
6887
+ tiers: Array<TieredWithProrationConfig.Tier>;
6888
+ }
6889
+
6890
+ export namespace TieredWithProrationConfig {
6891
+ /**
6892
+ * Configuration for a single tiered with proration tier
6893
+ */
6894
+ export interface Tier {
6895
+ /**
6896
+ * Inclusive tier starting value
6897
+ */
6898
+ tier_lower_bound: string;
6899
+
6900
+ /**
6901
+ * Amount per unit
6902
+ */
6903
+ unit_amount: string;
6904
+ }
6905
+ }
6906
+ }
6907
+
5535
6908
  export interface NewSubscriptionGroupedWithMinMaxThresholdsPrice {
5536
6909
  /**
5537
6910
  * The cadence to bill for this price on.
5538
6911
  */
5539
6912
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
5540
6913
 
5541
- grouped_with_min_max_thresholds_config: { [key: string]: unknown };
6914
+ /**
6915
+ * Configuration for grouped_with_min_max_thresholds pricing
6916
+ */
6917
+ grouped_with_min_max_thresholds_config: NewSubscriptionGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
5542
6918
 
5543
6919
  /**
5544
6920
  * The id of the item the price will be associated with.
5545
6921
  */
5546
6922
  item_id: string;
5547
6923
 
6924
+ /**
6925
+ * The pricing model type
6926
+ */
5548
6927
  model_type: 'grouped_with_min_max_thresholds';
5549
6928
 
5550
6929
  /**
@@ -5626,6 +7005,33 @@ export namespace SubscriptionSchedulePlanChangeParams {
5626
7005
  */
5627
7006
  reference_id?: string | null;
5628
7007
  }
7008
+
7009
+ export namespace NewSubscriptionGroupedWithMinMaxThresholdsPrice {
7010
+ /**
7011
+ * Configuration for grouped_with_min_max_thresholds pricing
7012
+ */
7013
+ export interface GroupedWithMinMaxThresholdsConfig {
7014
+ /**
7015
+ * The event property used to group before applying thresholds
7016
+ */
7017
+ grouping_key: string;
7018
+
7019
+ /**
7020
+ * The maximum amount to charge each group
7021
+ */
7022
+ maximum_charge: string;
7023
+
7024
+ /**
7025
+ * The minimum amount to charge each group, regardless of usage
7026
+ */
7027
+ minimum_charge: string;
7028
+
7029
+ /**
7030
+ * The base price charged per group
7031
+ */
7032
+ per_unit_rate: string;
7033
+ }
7034
+ }
5629
7035
  }
5630
7036
  }
5631
7037
 
@@ -5719,7 +7125,6 @@ export declare namespace Subscriptions {
5719
7125
  type NewSubscriptionScalableMatrixWithTieredPricingPrice as NewSubscriptionScalableMatrixWithTieredPricingPrice,
5720
7126
  type NewSubscriptionScalableMatrixWithUnitPricingPrice as NewSubscriptionScalableMatrixWithUnitPricingPrice,
5721
7127
  type NewSubscriptionThresholdTotalAmountPrice as NewSubscriptionThresholdTotalAmountPrice,
5722
- type NewSubscriptionTierWithProrationPrice as NewSubscriptionTierWithProrationPrice,
5723
7128
  type NewSubscriptionTieredPackagePrice as NewSubscriptionTieredPackagePrice,
5724
7129
  type NewSubscriptionTieredPackageWithMinimumPrice as NewSubscriptionTieredPackageWithMinimumPrice,
5725
7130
  type NewSubscriptionTieredPrice as NewSubscriptionTieredPrice,