orb-billing 5.5.1 → 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.
- package/CHANGELOG.md +33 -0
- package/core.js +3 -3
- package/core.js.map +1 -1
- package/core.mjs +3 -3
- package/core.mjs.map +1 -1
- package/index.d.mts +4 -15
- package/index.d.ts +4 -15
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs.map +1 -1
- package/package.json +4 -1
- package/resources/alerts.d.ts +1 -1
- package/resources/beta/beta.d.ts +448 -4
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/external-plan-id.d.ts +448 -4
- package/resources/beta/external-plan-id.d.ts.map +1 -1
- package/resources/customers/balance-transactions.d.ts +2 -2
- package/resources/customers/balance-transactions.d.ts.map +1 -1
- package/resources/customers/balance-transactions.js.map +1 -1
- package/resources/customers/balance-transactions.mjs.map +1 -1
- package/resources/customers/credits/ledger.d.ts +22 -8
- package/resources/customers/credits/ledger.d.ts.map +1 -1
- package/resources/customers/credits/ledger.js.map +1 -1
- package/resources/customers/credits/ledger.mjs.map +1 -1
- package/resources/customers/customers.d.ts +54 -6
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.d.ts +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.js +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.mjs +1 -1
- package/resources/events/backfills.d.ts +2 -2
- package/resources/events/backfills.js +2 -2
- package/resources/events/backfills.mjs +2 -2
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/invoice-line-items.d.ts +1 -1
- package/resources/invoices.d.ts +39 -11
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +4 -4
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +4 -4
- package/resources/invoices.mjs.map +1 -1
- package/resources/plans/plans.d.ts +224 -2
- package/resources/plans/plans.d.ts.map +1 -1
- package/resources/plans/plans.js.map +1 -1
- package/resources/plans/plans.mjs.map +1 -1
- package/resources/prices/prices.d.ts +1089 -192
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/prices/prices.js.map +1 -1
- package/resources/prices/prices.mjs.map +1 -1
- package/resources/shared.d.ts +2656 -925
- package/resources/shared.d.ts.map +1 -1
- package/resources/shared.js.map +1 -1
- package/resources/shared.mjs.map +1 -1
- package/resources/subscriptions.d.ts +1831 -370
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +1 -1
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +1 -1
- package/resources/subscriptions.mjs.map +1 -1
- package/src/core.ts +3 -3
- package/src/index.ts +5 -21
- package/src/resources/alerts.ts +1 -1
- package/src/resources/beta/beta.ts +544 -24
- package/src/resources/beta/external-plan-id.ts +544 -24
- package/src/resources/customers/balance-transactions.ts +4 -2
- package/src/resources/customers/credits/ledger.ts +24 -8
- package/src/resources/customers/customers.ts +79 -6
- package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +1 -1
- package/src/resources/events/backfills.ts +2 -2
- package/src/resources/index.ts +1 -4
- package/src/resources/invoice-line-items.ts +1 -1
- package/src/resources/invoices.ts +44 -11
- package/src/resources/plans/plans.ts +272 -12
- package/src/resources/prices/prices.ts +1255 -206
- package/src/resources/shared.ts +3057 -1046
- package/src/resources/subscriptions.ts +2401 -694
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -657,7 +657,7 @@ export declare class Subscriptions extends APIResource {
|
|
|
657
657
|
* This endpoint can be used to change an existing subscription's plan. It returns
|
|
658
658
|
* the serialized updated subscription object.
|
|
659
659
|
*
|
|
660
|
-
* The body parameter `change_option` determines when the plan change
|
|
660
|
+
* The body parameter `change_option` determines when the plan change occurs. Orb
|
|
661
661
|
* supports three options:
|
|
662
662
|
*
|
|
663
663
|
* - `end_of_subscription_term`: changes the plan at the end of the existing plan's
|
|
@@ -926,8 +926,11 @@ export interface DiscountOverride {
|
|
|
926
926
|
*/
|
|
927
927
|
usage_discount?: number | null;
|
|
928
928
|
}
|
|
929
|
-
export interface
|
|
930
|
-
|
|
929
|
+
export interface NewSubscriptionBulkPrice {
|
|
930
|
+
/**
|
|
931
|
+
* Configuration for bulk pricing
|
|
932
|
+
*/
|
|
933
|
+
bulk_config: Shared.BulkConfig;
|
|
931
934
|
/**
|
|
932
935
|
* The cadence to bill for this price on.
|
|
933
936
|
*/
|
|
@@ -936,7 +939,10 @@ export interface NewSubscriptionBPSPrice {
|
|
|
936
939
|
* The id of the item the price will be associated with.
|
|
937
940
|
*/
|
|
938
941
|
item_id: string;
|
|
939
|
-
|
|
942
|
+
/**
|
|
943
|
+
* The pricing model type
|
|
944
|
+
*/
|
|
945
|
+
model_type: 'bulk';
|
|
940
946
|
/**
|
|
941
947
|
* The name of the price.
|
|
942
948
|
*/
|
|
@@ -1005,8 +1011,11 @@ export interface NewSubscriptionBPSPrice {
|
|
|
1005
1011
|
*/
|
|
1006
1012
|
reference_id?: string | null;
|
|
1007
1013
|
}
|
|
1008
|
-
export interface
|
|
1009
|
-
|
|
1014
|
+
export interface NewSubscriptionBulkWithProrationPrice {
|
|
1015
|
+
/**
|
|
1016
|
+
* Configuration for bulk_with_proration pricing
|
|
1017
|
+
*/
|
|
1018
|
+
bulk_with_proration_config: NewSubscriptionBulkWithProrationPrice.BulkWithProrationConfig;
|
|
1010
1019
|
/**
|
|
1011
1020
|
* The cadence to bill for this price on.
|
|
1012
1021
|
*/
|
|
@@ -1015,7 +1024,10 @@ export interface NewSubscriptionBulkBPSPrice {
|
|
|
1015
1024
|
* The id of the item the price will be associated with.
|
|
1016
1025
|
*/
|
|
1017
1026
|
item_id: string;
|
|
1018
|
-
|
|
1027
|
+
/**
|
|
1028
|
+
* The pricing model type
|
|
1029
|
+
*/
|
|
1030
|
+
model_type: 'bulk_with_proration';
|
|
1019
1031
|
/**
|
|
1020
1032
|
* The name of the price.
|
|
1021
1033
|
*/
|
|
@@ -1084,17 +1096,49 @@ export interface NewSubscriptionBulkBPSPrice {
|
|
|
1084
1096
|
*/
|
|
1085
1097
|
reference_id?: string | null;
|
|
1086
1098
|
}
|
|
1087
|
-
export
|
|
1088
|
-
|
|
1099
|
+
export declare namespace NewSubscriptionBulkWithProrationPrice {
|
|
1100
|
+
/**
|
|
1101
|
+
* Configuration for bulk_with_proration pricing
|
|
1102
|
+
*/
|
|
1103
|
+
interface BulkWithProrationConfig {
|
|
1104
|
+
/**
|
|
1105
|
+
* Bulk tiers for rating based on total usage volume
|
|
1106
|
+
*/
|
|
1107
|
+
tiers: Array<BulkWithProrationConfig.Tier>;
|
|
1108
|
+
}
|
|
1109
|
+
namespace BulkWithProrationConfig {
|
|
1110
|
+
/**
|
|
1111
|
+
* Configuration for a single bulk pricing tier with proration
|
|
1112
|
+
*/
|
|
1113
|
+
interface Tier {
|
|
1114
|
+
/**
|
|
1115
|
+
* Cost per unit
|
|
1116
|
+
*/
|
|
1117
|
+
unit_amount: string;
|
|
1118
|
+
/**
|
|
1119
|
+
* The lower bound for this tier
|
|
1120
|
+
*/
|
|
1121
|
+
tier_lower_bound?: string | null;
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
export interface NewSubscriptionCumulativeGroupedBulkPrice {
|
|
1089
1126
|
/**
|
|
1090
1127
|
* The cadence to bill for this price on.
|
|
1091
1128
|
*/
|
|
1092
1129
|
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
1130
|
+
/**
|
|
1131
|
+
* Configuration for cumulative_grouped_bulk pricing
|
|
1132
|
+
*/
|
|
1133
|
+
cumulative_grouped_bulk_config: NewSubscriptionCumulativeGroupedBulkPrice.CumulativeGroupedBulkConfig;
|
|
1093
1134
|
/**
|
|
1094
1135
|
* The id of the item the price will be associated with.
|
|
1095
1136
|
*/
|
|
1096
1137
|
item_id: string;
|
|
1097
|
-
|
|
1138
|
+
/**
|
|
1139
|
+
* The pricing model type
|
|
1140
|
+
*/
|
|
1141
|
+
model_type: 'cumulative_grouped_bulk';
|
|
1098
1142
|
/**
|
|
1099
1143
|
* The name of the price.
|
|
1100
1144
|
*/
|
|
@@ -1163,19 +1207,57 @@ export interface NewSubscriptionBulkPrice {
|
|
|
1163
1207
|
*/
|
|
1164
1208
|
reference_id?: string | null;
|
|
1165
1209
|
}
|
|
1166
|
-
export
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1210
|
+
export declare namespace NewSubscriptionCumulativeGroupedBulkPrice {
|
|
1211
|
+
/**
|
|
1212
|
+
* Configuration for cumulative_grouped_bulk pricing
|
|
1213
|
+
*/
|
|
1214
|
+
interface CumulativeGroupedBulkConfig {
|
|
1215
|
+
/**
|
|
1216
|
+
* Each tier lower bound must have the same group of values.
|
|
1217
|
+
*/
|
|
1218
|
+
dimension_values: Array<CumulativeGroupedBulkConfig.DimensionValue>;
|
|
1219
|
+
/**
|
|
1220
|
+
* Grouping key name
|
|
1221
|
+
*/
|
|
1222
|
+
group: string;
|
|
1223
|
+
}
|
|
1224
|
+
namespace CumulativeGroupedBulkConfig {
|
|
1225
|
+
/**
|
|
1226
|
+
* Configuration for a dimension value entry
|
|
1227
|
+
*/
|
|
1228
|
+
interface DimensionValue {
|
|
1229
|
+
/**
|
|
1230
|
+
* Grouping key value
|
|
1231
|
+
*/
|
|
1232
|
+
grouping_key: string;
|
|
1233
|
+
/**
|
|
1234
|
+
* Tier lower bound
|
|
1235
|
+
*/
|
|
1236
|
+
tier_lower_bound: string;
|
|
1237
|
+
/**
|
|
1238
|
+
* Unit amount for this combination
|
|
1239
|
+
*/
|
|
1240
|
+
unit_amount: string;
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
export interface NewSubscriptionGroupedAllocationPrice {
|
|
1170
1245
|
/**
|
|
1171
1246
|
* The cadence to bill for this price on.
|
|
1172
1247
|
*/
|
|
1173
1248
|
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
1249
|
+
/**
|
|
1250
|
+
* Configuration for grouped_allocation pricing
|
|
1251
|
+
*/
|
|
1252
|
+
grouped_allocation_config: NewSubscriptionGroupedAllocationPrice.GroupedAllocationConfig;
|
|
1174
1253
|
/**
|
|
1175
1254
|
* The id of the item the price will be associated with.
|
|
1176
1255
|
*/
|
|
1177
1256
|
item_id: string;
|
|
1178
|
-
|
|
1257
|
+
/**
|
|
1258
|
+
* The pricing model type
|
|
1259
|
+
*/
|
|
1260
|
+
model_type: 'grouped_allocation';
|
|
1179
1261
|
/**
|
|
1180
1262
|
* The name of the price.
|
|
1181
1263
|
*/
|
|
@@ -1244,19 +1326,42 @@ export interface NewSubscriptionBulkWithProrationPrice {
|
|
|
1244
1326
|
*/
|
|
1245
1327
|
reference_id?: string | null;
|
|
1246
1328
|
}
|
|
1247
|
-
export
|
|
1329
|
+
export declare namespace NewSubscriptionGroupedAllocationPrice {
|
|
1330
|
+
/**
|
|
1331
|
+
* Configuration for grouped_allocation pricing
|
|
1332
|
+
*/
|
|
1333
|
+
interface GroupedAllocationConfig {
|
|
1334
|
+
/**
|
|
1335
|
+
* Usage allocation per group
|
|
1336
|
+
*/
|
|
1337
|
+
allocation: string;
|
|
1338
|
+
/**
|
|
1339
|
+
* How to determine the groups that should each be allocated some quantity
|
|
1340
|
+
*/
|
|
1341
|
+
grouping_key: string;
|
|
1342
|
+
/**
|
|
1343
|
+
* Unit rate for post-allocation
|
|
1344
|
+
*/
|
|
1345
|
+
overage_unit_rate: string;
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
export interface NewSubscriptionGroupedTieredPackagePrice {
|
|
1248
1349
|
/**
|
|
1249
1350
|
* The cadence to bill for this price on.
|
|
1250
1351
|
*/
|
|
1251
1352
|
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1353
|
+
/**
|
|
1354
|
+
* Configuration for grouped_tiered_package pricing
|
|
1355
|
+
*/
|
|
1356
|
+
grouped_tiered_package_config: NewSubscriptionGroupedTieredPackagePrice.GroupedTieredPackageConfig;
|
|
1255
1357
|
/**
|
|
1256
1358
|
* The id of the item the price will be associated with.
|
|
1257
1359
|
*/
|
|
1258
1360
|
item_id: string;
|
|
1259
|
-
|
|
1361
|
+
/**
|
|
1362
|
+
* The pricing model type
|
|
1363
|
+
*/
|
|
1364
|
+
model_type: 'grouped_tiered_package';
|
|
1260
1365
|
/**
|
|
1261
1366
|
* The name of the price.
|
|
1262
1367
|
*/
|
|
@@ -1325,19 +1430,58 @@ export interface NewSubscriptionCumulativeGroupedBulkPrice {
|
|
|
1325
1430
|
*/
|
|
1326
1431
|
reference_id?: string | null;
|
|
1327
1432
|
}
|
|
1328
|
-
export
|
|
1433
|
+
export declare namespace NewSubscriptionGroupedTieredPackagePrice {
|
|
1434
|
+
/**
|
|
1435
|
+
* Configuration for grouped_tiered_package pricing
|
|
1436
|
+
*/
|
|
1437
|
+
interface GroupedTieredPackageConfig {
|
|
1438
|
+
/**
|
|
1439
|
+
* The event property used to group before tiering
|
|
1440
|
+
*/
|
|
1441
|
+
grouping_key: string;
|
|
1442
|
+
/**
|
|
1443
|
+
* Package size
|
|
1444
|
+
*/
|
|
1445
|
+
package_size: string;
|
|
1446
|
+
/**
|
|
1447
|
+
* Apply tiered pricing after rounding up the quantity to the package size. Tiers
|
|
1448
|
+
* are defined using exclusive lower bounds.
|
|
1449
|
+
*/
|
|
1450
|
+
tiers: Array<GroupedTieredPackageConfig.Tier>;
|
|
1451
|
+
}
|
|
1452
|
+
namespace GroupedTieredPackageConfig {
|
|
1453
|
+
/**
|
|
1454
|
+
* Configuration for a single tier
|
|
1455
|
+
*/
|
|
1456
|
+
interface Tier {
|
|
1457
|
+
/**
|
|
1458
|
+
* Price per package
|
|
1459
|
+
*/
|
|
1460
|
+
per_unit: string;
|
|
1461
|
+
/**
|
|
1462
|
+
* Tier lower bound
|
|
1463
|
+
*/
|
|
1464
|
+
tier_lower_bound: string;
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
export interface NewSubscriptionGroupedTieredPrice {
|
|
1329
1469
|
/**
|
|
1330
1470
|
* The cadence to bill for this price on.
|
|
1331
1471
|
*/
|
|
1332
1472
|
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1473
|
+
/**
|
|
1474
|
+
* Configuration for grouped_tiered pricing
|
|
1475
|
+
*/
|
|
1476
|
+
grouped_tiered_config: NewSubscriptionGroupedTieredPrice.GroupedTieredConfig;
|
|
1336
1477
|
/**
|
|
1337
1478
|
* The id of the item the price will be associated with.
|
|
1338
1479
|
*/
|
|
1339
1480
|
item_id: string;
|
|
1340
|
-
|
|
1481
|
+
/**
|
|
1482
|
+
* The pricing model type
|
|
1483
|
+
*/
|
|
1484
|
+
model_type: 'grouped_tiered';
|
|
1341
1485
|
/**
|
|
1342
1486
|
* The name of the price.
|
|
1343
1487
|
*/
|
|
@@ -1406,19 +1550,54 @@ export interface NewSubscriptionGroupedAllocationPrice {
|
|
|
1406
1550
|
*/
|
|
1407
1551
|
reference_id?: string | null;
|
|
1408
1552
|
}
|
|
1409
|
-
export
|
|
1553
|
+
export declare namespace NewSubscriptionGroupedTieredPrice {
|
|
1554
|
+
/**
|
|
1555
|
+
* Configuration for grouped_tiered pricing
|
|
1556
|
+
*/
|
|
1557
|
+
interface GroupedTieredConfig {
|
|
1558
|
+
/**
|
|
1559
|
+
* The billable metric property used to group before tiering
|
|
1560
|
+
*/
|
|
1561
|
+
grouping_key: string;
|
|
1562
|
+
/**
|
|
1563
|
+
* Apply tiered pricing to each segment generated after grouping with the provided
|
|
1564
|
+
* key
|
|
1565
|
+
*/
|
|
1566
|
+
tiers: Array<GroupedTieredConfig.Tier>;
|
|
1567
|
+
}
|
|
1568
|
+
namespace GroupedTieredConfig {
|
|
1569
|
+
/**
|
|
1570
|
+
* Configuration for a single tier
|
|
1571
|
+
*/
|
|
1572
|
+
interface Tier {
|
|
1573
|
+
/**
|
|
1574
|
+
* Tier lower bound
|
|
1575
|
+
*/
|
|
1576
|
+
tier_lower_bound: string;
|
|
1577
|
+
/**
|
|
1578
|
+
* Per unit amount
|
|
1579
|
+
*/
|
|
1580
|
+
unit_amount: string;
|
|
1581
|
+
}
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1584
|
+
export interface NewSubscriptionGroupedWithMeteredMinimumPrice {
|
|
1410
1585
|
/**
|
|
1411
1586
|
* The cadence to bill for this price on.
|
|
1412
1587
|
*/
|
|
1413
1588
|
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1589
|
+
/**
|
|
1590
|
+
* Configuration for grouped_with_metered_minimum pricing
|
|
1591
|
+
*/
|
|
1592
|
+
grouped_with_metered_minimum_config: NewSubscriptionGroupedWithMeteredMinimumPrice.GroupedWithMeteredMinimumConfig;
|
|
1417
1593
|
/**
|
|
1418
1594
|
* The id of the item the price will be associated with.
|
|
1419
1595
|
*/
|
|
1420
1596
|
item_id: string;
|
|
1421
|
-
|
|
1597
|
+
/**
|
|
1598
|
+
* The pricing model type
|
|
1599
|
+
*/
|
|
1600
|
+
model_type: 'grouped_with_metered_minimum';
|
|
1422
1601
|
/**
|
|
1423
1602
|
* The name of the price.
|
|
1424
1603
|
*/
|
|
@@ -1487,19 +1666,84 @@ export interface NewSubscriptionGroupedTieredPackagePrice {
|
|
|
1487
1666
|
*/
|
|
1488
1667
|
reference_id?: string | null;
|
|
1489
1668
|
}
|
|
1490
|
-
export
|
|
1669
|
+
export declare namespace NewSubscriptionGroupedWithMeteredMinimumPrice {
|
|
1670
|
+
/**
|
|
1671
|
+
* Configuration for grouped_with_metered_minimum pricing
|
|
1672
|
+
*/
|
|
1673
|
+
interface GroupedWithMeteredMinimumConfig {
|
|
1674
|
+
/**
|
|
1675
|
+
* Used to partition the usage into groups. The minimum amount is applied to each
|
|
1676
|
+
* group.
|
|
1677
|
+
*/
|
|
1678
|
+
grouping_key: string;
|
|
1679
|
+
/**
|
|
1680
|
+
* The minimum amount to charge per group per unit
|
|
1681
|
+
*/
|
|
1682
|
+
minimum_unit_amount: string;
|
|
1683
|
+
/**
|
|
1684
|
+
* Used to determine the unit rate
|
|
1685
|
+
*/
|
|
1686
|
+
pricing_key: string;
|
|
1687
|
+
/**
|
|
1688
|
+
* Scale the unit rates by the scaling factor.
|
|
1689
|
+
*/
|
|
1690
|
+
scaling_factors: Array<GroupedWithMeteredMinimumConfig.ScalingFactor>;
|
|
1691
|
+
/**
|
|
1692
|
+
* Used to determine the unit rate scaling factor
|
|
1693
|
+
*/
|
|
1694
|
+
scaling_key: string;
|
|
1695
|
+
/**
|
|
1696
|
+
* Apply per unit pricing to each pricing value. The minimum amount is applied any
|
|
1697
|
+
* unmatched usage.
|
|
1698
|
+
*/
|
|
1699
|
+
unit_amounts: Array<GroupedWithMeteredMinimumConfig.UnitAmount>;
|
|
1700
|
+
}
|
|
1701
|
+
namespace GroupedWithMeteredMinimumConfig {
|
|
1702
|
+
/**
|
|
1703
|
+
* Configuration for a scaling factor
|
|
1704
|
+
*/
|
|
1705
|
+
interface ScalingFactor {
|
|
1706
|
+
/**
|
|
1707
|
+
* Scaling factor
|
|
1708
|
+
*/
|
|
1709
|
+
scaling_factor: string;
|
|
1710
|
+
/**
|
|
1711
|
+
* Scaling value
|
|
1712
|
+
*/
|
|
1713
|
+
scaling_value: string;
|
|
1714
|
+
}
|
|
1715
|
+
/**
|
|
1716
|
+
* Configuration for a unit amount
|
|
1717
|
+
*/
|
|
1718
|
+
interface UnitAmount {
|
|
1719
|
+
/**
|
|
1720
|
+
* Pricing value
|
|
1721
|
+
*/
|
|
1722
|
+
pricing_value: string;
|
|
1723
|
+
/**
|
|
1724
|
+
* Per unit amount
|
|
1725
|
+
*/
|
|
1726
|
+
unit_amount: string;
|
|
1727
|
+
}
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
export interface NewSubscriptionGroupedWithProratedMinimumPrice {
|
|
1491
1731
|
/**
|
|
1492
1732
|
* The cadence to bill for this price on.
|
|
1493
1733
|
*/
|
|
1494
1734
|
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1735
|
+
/**
|
|
1736
|
+
* Configuration for grouped_with_prorated_minimum pricing
|
|
1737
|
+
*/
|
|
1738
|
+
grouped_with_prorated_minimum_config: NewSubscriptionGroupedWithProratedMinimumPrice.GroupedWithProratedMinimumConfig;
|
|
1498
1739
|
/**
|
|
1499
1740
|
* The id of the item the price will be associated with.
|
|
1500
1741
|
*/
|
|
1501
1742
|
item_id: string;
|
|
1502
|
-
|
|
1743
|
+
/**
|
|
1744
|
+
* The pricing model type
|
|
1745
|
+
*/
|
|
1746
|
+
model_type: 'grouped_with_prorated_minimum';
|
|
1503
1747
|
/**
|
|
1504
1748
|
* The name of the price.
|
|
1505
1749
|
*/
|
|
@@ -1568,19 +1812,42 @@ export interface NewSubscriptionGroupedTieredPrice {
|
|
|
1568
1812
|
*/
|
|
1569
1813
|
reference_id?: string | null;
|
|
1570
1814
|
}
|
|
1571
|
-
export
|
|
1815
|
+
export declare namespace NewSubscriptionGroupedWithProratedMinimumPrice {
|
|
1816
|
+
/**
|
|
1817
|
+
* Configuration for grouped_with_prorated_minimum pricing
|
|
1818
|
+
*/
|
|
1819
|
+
interface GroupedWithProratedMinimumConfig {
|
|
1820
|
+
/**
|
|
1821
|
+
* How to determine the groups that should each have a minimum
|
|
1822
|
+
*/
|
|
1823
|
+
grouping_key: string;
|
|
1824
|
+
/**
|
|
1825
|
+
* The minimum amount to charge per group
|
|
1826
|
+
*/
|
|
1827
|
+
minimum: string;
|
|
1828
|
+
/**
|
|
1829
|
+
* The amount to charge per unit
|
|
1830
|
+
*/
|
|
1831
|
+
unit_rate: string;
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1834
|
+
export interface NewSubscriptionMatrixPrice {
|
|
1572
1835
|
/**
|
|
1573
1836
|
* The cadence to bill for this price on.
|
|
1574
1837
|
*/
|
|
1575
1838
|
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
1576
|
-
grouped_with_metered_minimum_config: {
|
|
1577
|
-
[key: string]: unknown;
|
|
1578
|
-
};
|
|
1579
1839
|
/**
|
|
1580
1840
|
* The id of the item the price will be associated with.
|
|
1581
1841
|
*/
|
|
1582
1842
|
item_id: string;
|
|
1583
|
-
|
|
1843
|
+
/**
|
|
1844
|
+
* Configuration for matrix pricing
|
|
1845
|
+
*/
|
|
1846
|
+
matrix_config: Shared.MatrixConfig;
|
|
1847
|
+
/**
|
|
1848
|
+
* The pricing model type
|
|
1849
|
+
*/
|
|
1850
|
+
model_type: 'matrix';
|
|
1584
1851
|
/**
|
|
1585
1852
|
* The name of the price.
|
|
1586
1853
|
*/
|
|
@@ -1649,19 +1916,23 @@ export interface NewSubscriptionGroupedWithMeteredMinimumPrice {
|
|
|
1649
1916
|
*/
|
|
1650
1917
|
reference_id?: string | null;
|
|
1651
1918
|
}
|
|
1652
|
-
export interface
|
|
1919
|
+
export interface NewSubscriptionMatrixWithAllocationPrice {
|
|
1653
1920
|
/**
|
|
1654
1921
|
* The cadence to bill for this price on.
|
|
1655
1922
|
*/
|
|
1656
1923
|
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
1657
|
-
grouped_with_prorated_minimum_config: {
|
|
1658
|
-
[key: string]: unknown;
|
|
1659
|
-
};
|
|
1660
1924
|
/**
|
|
1661
1925
|
* The id of the item the price will be associated with.
|
|
1662
1926
|
*/
|
|
1663
1927
|
item_id: string;
|
|
1664
|
-
|
|
1928
|
+
/**
|
|
1929
|
+
* Configuration for matrix_with_allocation pricing
|
|
1930
|
+
*/
|
|
1931
|
+
matrix_with_allocation_config: Shared.MatrixWithAllocationConfig;
|
|
1932
|
+
/**
|
|
1933
|
+
* The pricing model type
|
|
1934
|
+
*/
|
|
1935
|
+
model_type: 'matrix_with_allocation';
|
|
1665
1936
|
/**
|
|
1666
1937
|
* The name of the price.
|
|
1667
1938
|
*/
|
|
@@ -1730,7 +2001,7 @@ export interface NewSubscriptionGroupedWithProratedMinimumPrice {
|
|
|
1730
2001
|
*/
|
|
1731
2002
|
reference_id?: string | null;
|
|
1732
2003
|
}
|
|
1733
|
-
export interface
|
|
2004
|
+
export interface NewSubscriptionMatrixWithDisplayNamePrice {
|
|
1734
2005
|
/**
|
|
1735
2006
|
* The cadence to bill for this price on.
|
|
1736
2007
|
*/
|
|
@@ -1739,8 +2010,14 @@ export interface NewSubscriptionMatrixPrice {
|
|
|
1739
2010
|
* The id of the item the price will be associated with.
|
|
1740
2011
|
*/
|
|
1741
2012
|
item_id: string;
|
|
1742
|
-
|
|
1743
|
-
|
|
2013
|
+
/**
|
|
2014
|
+
* Configuration for matrix_with_display_name pricing
|
|
2015
|
+
*/
|
|
2016
|
+
matrix_with_display_name_config: NewSubscriptionMatrixWithDisplayNamePrice.MatrixWithDisplayNameConfig;
|
|
2017
|
+
/**
|
|
2018
|
+
* The pricing model type
|
|
2019
|
+
*/
|
|
2020
|
+
model_type: 'matrix_with_display_name';
|
|
1744
2021
|
/**
|
|
1745
2022
|
* The name of the price.
|
|
1746
2023
|
*/
|
|
@@ -1809,7 +2086,41 @@ export interface NewSubscriptionMatrixPrice {
|
|
|
1809
2086
|
*/
|
|
1810
2087
|
reference_id?: string | null;
|
|
1811
2088
|
}
|
|
1812
|
-
export
|
|
2089
|
+
export declare namespace NewSubscriptionMatrixWithDisplayNamePrice {
|
|
2090
|
+
/**
|
|
2091
|
+
* Configuration for matrix_with_display_name pricing
|
|
2092
|
+
*/
|
|
2093
|
+
interface MatrixWithDisplayNameConfig {
|
|
2094
|
+
/**
|
|
2095
|
+
* Used to determine the unit rate
|
|
2096
|
+
*/
|
|
2097
|
+
dimension: string;
|
|
2098
|
+
/**
|
|
2099
|
+
* Apply per unit pricing to each dimension value
|
|
2100
|
+
*/
|
|
2101
|
+
unit_amounts: Array<MatrixWithDisplayNameConfig.UnitAmount>;
|
|
2102
|
+
}
|
|
2103
|
+
namespace MatrixWithDisplayNameConfig {
|
|
2104
|
+
/**
|
|
2105
|
+
* Configuration for a unit amount item
|
|
2106
|
+
*/
|
|
2107
|
+
interface UnitAmount {
|
|
2108
|
+
/**
|
|
2109
|
+
* The dimension value
|
|
2110
|
+
*/
|
|
2111
|
+
dimension_value: string;
|
|
2112
|
+
/**
|
|
2113
|
+
* Display name for this dimension value
|
|
2114
|
+
*/
|
|
2115
|
+
display_name: string;
|
|
2116
|
+
/**
|
|
2117
|
+
* Per unit amount
|
|
2118
|
+
*/
|
|
2119
|
+
unit_amount: string;
|
|
2120
|
+
}
|
|
2121
|
+
}
|
|
2122
|
+
}
|
|
2123
|
+
export interface NewSubscriptionMaxGroupTieredPackagePrice {
|
|
1813
2124
|
/**
|
|
1814
2125
|
* The cadence to bill for this price on.
|
|
1815
2126
|
*/
|
|
@@ -1818,8 +2129,14 @@ export interface NewSubscriptionMatrixWithAllocationPrice {
|
|
|
1818
2129
|
* The id of the item the price will be associated with.
|
|
1819
2130
|
*/
|
|
1820
2131
|
item_id: string;
|
|
1821
|
-
|
|
1822
|
-
|
|
2132
|
+
/**
|
|
2133
|
+
* Configuration for max_group_tiered_package pricing
|
|
2134
|
+
*/
|
|
2135
|
+
max_group_tiered_package_config: NewSubscriptionMaxGroupTieredPackagePrice.MaxGroupTieredPackageConfig;
|
|
2136
|
+
/**
|
|
2137
|
+
* The pricing model type
|
|
2138
|
+
*/
|
|
2139
|
+
model_type: 'max_group_tiered_package';
|
|
1823
2140
|
/**
|
|
1824
2141
|
* The name of the price.
|
|
1825
2142
|
*/
|
|
@@ -1888,26 +2205,64 @@ export interface NewSubscriptionMatrixWithAllocationPrice {
|
|
|
1888
2205
|
*/
|
|
1889
2206
|
reference_id?: string | null;
|
|
1890
2207
|
}
|
|
1891
|
-
export
|
|
1892
|
-
/**
|
|
1893
|
-
* The cadence to bill for this price on.
|
|
1894
|
-
*/
|
|
1895
|
-
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
1896
|
-
/**
|
|
1897
|
-
* The id of the item the price will be associated with.
|
|
1898
|
-
*/
|
|
1899
|
-
item_id: string;
|
|
1900
|
-
matrix_with_display_name_config: {
|
|
1901
|
-
[key: string]: unknown;
|
|
1902
|
-
};
|
|
1903
|
-
model_type: 'matrix_with_display_name';
|
|
2208
|
+
export declare namespace NewSubscriptionMaxGroupTieredPackagePrice {
|
|
1904
2209
|
/**
|
|
1905
|
-
*
|
|
2210
|
+
* Configuration for max_group_tiered_package pricing
|
|
1906
2211
|
*/
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
2212
|
+
interface MaxGroupTieredPackageConfig {
|
|
2213
|
+
/**
|
|
2214
|
+
* The event property used to group before tiering the group with the highest value
|
|
2215
|
+
*/
|
|
2216
|
+
grouping_key: string;
|
|
2217
|
+
/**
|
|
2218
|
+
* Package size
|
|
2219
|
+
*/
|
|
2220
|
+
package_size: string;
|
|
2221
|
+
/**
|
|
2222
|
+
* Apply tiered pricing to the largest group after grouping with the provided key.
|
|
2223
|
+
*/
|
|
2224
|
+
tiers: Array<MaxGroupTieredPackageConfig.Tier>;
|
|
2225
|
+
}
|
|
2226
|
+
namespace MaxGroupTieredPackageConfig {
|
|
2227
|
+
/**
|
|
2228
|
+
* Configuration for a single tier
|
|
2229
|
+
*/
|
|
2230
|
+
interface Tier {
|
|
2231
|
+
/**
|
|
2232
|
+
* Tier lower bound
|
|
2233
|
+
*/
|
|
2234
|
+
tier_lower_bound: string;
|
|
2235
|
+
/**
|
|
2236
|
+
* Per unit amount
|
|
2237
|
+
*/
|
|
2238
|
+
unit_amount: string;
|
|
2239
|
+
}
|
|
2240
|
+
}
|
|
2241
|
+
}
|
|
2242
|
+
export interface NewSubscriptionMinimumCompositePrice {
|
|
2243
|
+
/**
|
|
2244
|
+
* The cadence to bill for this price on.
|
|
2245
|
+
*/
|
|
2246
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
2247
|
+
/**
|
|
2248
|
+
* The id of the item the price will be associated with.
|
|
2249
|
+
*/
|
|
2250
|
+
item_id: string;
|
|
2251
|
+
/**
|
|
2252
|
+
* Configuration for minimum pricing
|
|
2253
|
+
*/
|
|
2254
|
+
minimum_config: NewSubscriptionMinimumCompositePrice.MinimumConfig;
|
|
2255
|
+
/**
|
|
2256
|
+
* The pricing model type
|
|
2257
|
+
*/
|
|
2258
|
+
model_type: 'minimum';
|
|
2259
|
+
/**
|
|
2260
|
+
* The name of the price.
|
|
2261
|
+
*/
|
|
2262
|
+
name: string;
|
|
2263
|
+
/**
|
|
2264
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
2265
|
+
* usage-based.
|
|
1911
2266
|
*/
|
|
1912
2267
|
billable_metric_id?: string | null;
|
|
1913
2268
|
/**
|
|
@@ -1969,7 +2324,22 @@ export interface NewSubscriptionMatrixWithDisplayNamePrice {
|
|
|
1969
2324
|
*/
|
|
1970
2325
|
reference_id?: string | null;
|
|
1971
2326
|
}
|
|
1972
|
-
export
|
|
2327
|
+
export declare namespace NewSubscriptionMinimumCompositePrice {
|
|
2328
|
+
/**
|
|
2329
|
+
* Configuration for minimum pricing
|
|
2330
|
+
*/
|
|
2331
|
+
interface MinimumConfig {
|
|
2332
|
+
/**
|
|
2333
|
+
* The minimum amount to apply
|
|
2334
|
+
*/
|
|
2335
|
+
minimum_amount: string;
|
|
2336
|
+
/**
|
|
2337
|
+
* If true, subtotals from this price are prorated based on the service period
|
|
2338
|
+
*/
|
|
2339
|
+
prorated?: boolean;
|
|
2340
|
+
}
|
|
2341
|
+
}
|
|
2342
|
+
export interface NewSubscriptionPackagePrice {
|
|
1973
2343
|
/**
|
|
1974
2344
|
* The cadence to bill for this price on.
|
|
1975
2345
|
*/
|
|
@@ -1978,14 +2348,18 @@ export interface NewSubscriptionMaxGroupTieredPackagePrice {
|
|
|
1978
2348
|
* The id of the item the price will be associated with.
|
|
1979
2349
|
*/
|
|
1980
2350
|
item_id: string;
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
model_type: '
|
|
2351
|
+
/**
|
|
2352
|
+
* The pricing model type
|
|
2353
|
+
*/
|
|
2354
|
+
model_type: 'package';
|
|
1985
2355
|
/**
|
|
1986
2356
|
* The name of the price.
|
|
1987
2357
|
*/
|
|
1988
2358
|
name: string;
|
|
2359
|
+
/**
|
|
2360
|
+
* Configuration for package pricing
|
|
2361
|
+
*/
|
|
2362
|
+
package_config: Shared.PackageConfig;
|
|
1989
2363
|
/**
|
|
1990
2364
|
* The id of the billable metric for the price. Only needed if the price is
|
|
1991
2365
|
* usage-based.
|
|
@@ -2050,7 +2424,7 @@ export interface NewSubscriptionMaxGroupTieredPackagePrice {
|
|
|
2050
2424
|
*/
|
|
2051
2425
|
reference_id?: string | null;
|
|
2052
2426
|
}
|
|
2053
|
-
export interface
|
|
2427
|
+
export interface NewSubscriptionPackageWithAllocationPrice {
|
|
2054
2428
|
/**
|
|
2055
2429
|
* The cadence to bill for this price on.
|
|
2056
2430
|
*/
|
|
@@ -2059,12 +2433,18 @@ export interface NewSubscriptionPackagePrice {
|
|
|
2059
2433
|
* The id of the item the price will be associated with.
|
|
2060
2434
|
*/
|
|
2061
2435
|
item_id: string;
|
|
2062
|
-
|
|
2436
|
+
/**
|
|
2437
|
+
* The pricing model type
|
|
2438
|
+
*/
|
|
2439
|
+
model_type: 'package_with_allocation';
|
|
2063
2440
|
/**
|
|
2064
2441
|
* The name of the price.
|
|
2065
2442
|
*/
|
|
2066
2443
|
name: string;
|
|
2067
|
-
|
|
2444
|
+
/**
|
|
2445
|
+
* Configuration for package_with_allocation pricing
|
|
2446
|
+
*/
|
|
2447
|
+
package_with_allocation_config: NewSubscriptionPackageWithAllocationPrice.PackageWithAllocationConfig;
|
|
2068
2448
|
/**
|
|
2069
2449
|
* The id of the billable metric for the price. Only needed if the price is
|
|
2070
2450
|
* usage-based.
|
|
@@ -2129,7 +2509,26 @@ export interface NewSubscriptionPackagePrice {
|
|
|
2129
2509
|
*/
|
|
2130
2510
|
reference_id?: string | null;
|
|
2131
2511
|
}
|
|
2132
|
-
export
|
|
2512
|
+
export declare namespace NewSubscriptionPackageWithAllocationPrice {
|
|
2513
|
+
/**
|
|
2514
|
+
* Configuration for package_with_allocation pricing
|
|
2515
|
+
*/
|
|
2516
|
+
interface PackageWithAllocationConfig {
|
|
2517
|
+
/**
|
|
2518
|
+
* Usage allocation
|
|
2519
|
+
*/
|
|
2520
|
+
allocation: string;
|
|
2521
|
+
/**
|
|
2522
|
+
* Price per package
|
|
2523
|
+
*/
|
|
2524
|
+
package_amount: string;
|
|
2525
|
+
/**
|
|
2526
|
+
* Package size
|
|
2527
|
+
*/
|
|
2528
|
+
package_size: string;
|
|
2529
|
+
}
|
|
2530
|
+
}
|
|
2531
|
+
export interface NewSubscriptionScalableMatrixWithTieredPricingPrice {
|
|
2133
2532
|
/**
|
|
2134
2533
|
* The cadence to bill for this price on.
|
|
2135
2534
|
*/
|
|
@@ -2138,14 +2537,18 @@ export interface NewSubscriptionPackageWithAllocationPrice {
|
|
|
2138
2537
|
* The id of the item the price will be associated with.
|
|
2139
2538
|
*/
|
|
2140
2539
|
item_id: string;
|
|
2141
|
-
|
|
2540
|
+
/**
|
|
2541
|
+
* The pricing model type
|
|
2542
|
+
*/
|
|
2543
|
+
model_type: 'scalable_matrix_with_tiered_pricing';
|
|
2142
2544
|
/**
|
|
2143
2545
|
* The name of the price.
|
|
2144
2546
|
*/
|
|
2145
2547
|
name: string;
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2548
|
+
/**
|
|
2549
|
+
* Configuration for scalable_matrix_with_tiered_pricing pricing
|
|
2550
|
+
*/
|
|
2551
|
+
scalable_matrix_with_tiered_pricing_config: NewSubscriptionScalableMatrixWithTieredPricingPrice.ScalableMatrixWithTieredPricingConfig;
|
|
2149
2552
|
/**
|
|
2150
2553
|
* The id of the billable metric for the price. Only needed if the price is
|
|
2151
2554
|
* usage-based.
|
|
@@ -2210,7 +2613,62 @@ export interface NewSubscriptionPackageWithAllocationPrice {
|
|
|
2210
2613
|
*/
|
|
2211
2614
|
reference_id?: string | null;
|
|
2212
2615
|
}
|
|
2213
|
-
export
|
|
2616
|
+
export declare namespace NewSubscriptionScalableMatrixWithTieredPricingPrice {
|
|
2617
|
+
/**
|
|
2618
|
+
* Configuration for scalable_matrix_with_tiered_pricing pricing
|
|
2619
|
+
*/
|
|
2620
|
+
interface ScalableMatrixWithTieredPricingConfig {
|
|
2621
|
+
/**
|
|
2622
|
+
* Used for the scalable matrix first dimension
|
|
2623
|
+
*/
|
|
2624
|
+
first_dimension: string;
|
|
2625
|
+
/**
|
|
2626
|
+
* Apply a scaling factor to each dimension
|
|
2627
|
+
*/
|
|
2628
|
+
matrix_scaling_factors: Array<ScalableMatrixWithTieredPricingConfig.MatrixScalingFactor>;
|
|
2629
|
+
/**
|
|
2630
|
+
* Tier pricing structure
|
|
2631
|
+
*/
|
|
2632
|
+
tiers: Array<ScalableMatrixWithTieredPricingConfig.Tier>;
|
|
2633
|
+
/**
|
|
2634
|
+
* Used for the scalable matrix second dimension (optional)
|
|
2635
|
+
*/
|
|
2636
|
+
second_dimension?: string | null;
|
|
2637
|
+
}
|
|
2638
|
+
namespace ScalableMatrixWithTieredPricingConfig {
|
|
2639
|
+
/**
|
|
2640
|
+
* Configuration for a single matrix scaling factor
|
|
2641
|
+
*/
|
|
2642
|
+
interface MatrixScalingFactor {
|
|
2643
|
+
/**
|
|
2644
|
+
* First dimension value
|
|
2645
|
+
*/
|
|
2646
|
+
first_dimension_value: string;
|
|
2647
|
+
/**
|
|
2648
|
+
* Scaling factor
|
|
2649
|
+
*/
|
|
2650
|
+
scaling_factor: string;
|
|
2651
|
+
/**
|
|
2652
|
+
* Second dimension value (optional)
|
|
2653
|
+
*/
|
|
2654
|
+
second_dimension_value?: string | null;
|
|
2655
|
+
}
|
|
2656
|
+
/**
|
|
2657
|
+
* Configuration for a single tier entry with business logic
|
|
2658
|
+
*/
|
|
2659
|
+
interface Tier {
|
|
2660
|
+
/**
|
|
2661
|
+
* Tier lower bound
|
|
2662
|
+
*/
|
|
2663
|
+
tier_lower_bound: string;
|
|
2664
|
+
/**
|
|
2665
|
+
* Per unit amount
|
|
2666
|
+
*/
|
|
2667
|
+
unit_amount: string;
|
|
2668
|
+
}
|
|
2669
|
+
}
|
|
2670
|
+
}
|
|
2671
|
+
export interface NewSubscriptionScalableMatrixWithUnitPricingPrice {
|
|
2214
2672
|
/**
|
|
2215
2673
|
* The cadence to bill for this price on.
|
|
2216
2674
|
*/
|
|
@@ -2219,14 +2677,18 @@ export interface NewSubscriptionScalableMatrixWithTieredPricingPrice {
|
|
|
2219
2677
|
* The id of the item the price will be associated with.
|
|
2220
2678
|
*/
|
|
2221
2679
|
item_id: string;
|
|
2222
|
-
|
|
2680
|
+
/**
|
|
2681
|
+
* The pricing model type
|
|
2682
|
+
*/
|
|
2683
|
+
model_type: 'scalable_matrix_with_unit_pricing';
|
|
2223
2684
|
/**
|
|
2224
2685
|
* The name of the price.
|
|
2225
2686
|
*/
|
|
2226
2687
|
name: string;
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2688
|
+
/**
|
|
2689
|
+
* Configuration for scalable_matrix_with_unit_pricing pricing
|
|
2690
|
+
*/
|
|
2691
|
+
scalable_matrix_with_unit_pricing_config: NewSubscriptionScalableMatrixWithUnitPricingPrice.ScalableMatrixWithUnitPricingConfig;
|
|
2230
2692
|
/**
|
|
2231
2693
|
* The id of the billable metric for the price. Only needed if the price is
|
|
2232
2694
|
* usage-based.
|
|
@@ -2291,7 +2753,53 @@ export interface NewSubscriptionScalableMatrixWithTieredPricingPrice {
|
|
|
2291
2753
|
*/
|
|
2292
2754
|
reference_id?: string | null;
|
|
2293
2755
|
}
|
|
2294
|
-
export
|
|
2756
|
+
export declare namespace NewSubscriptionScalableMatrixWithUnitPricingPrice {
|
|
2757
|
+
/**
|
|
2758
|
+
* Configuration for scalable_matrix_with_unit_pricing pricing
|
|
2759
|
+
*/
|
|
2760
|
+
interface ScalableMatrixWithUnitPricingConfig {
|
|
2761
|
+
/**
|
|
2762
|
+
* Used to determine the unit rate
|
|
2763
|
+
*/
|
|
2764
|
+
first_dimension: string;
|
|
2765
|
+
/**
|
|
2766
|
+
* Apply a scaling factor to each dimension
|
|
2767
|
+
*/
|
|
2768
|
+
matrix_scaling_factors: Array<ScalableMatrixWithUnitPricingConfig.MatrixScalingFactor>;
|
|
2769
|
+
/**
|
|
2770
|
+
* The final unit price to rate against the output of the matrix
|
|
2771
|
+
*/
|
|
2772
|
+
unit_price: string;
|
|
2773
|
+
/**
|
|
2774
|
+
* If true, the unit price will be prorated to the billing period
|
|
2775
|
+
*/
|
|
2776
|
+
prorate?: boolean | null;
|
|
2777
|
+
/**
|
|
2778
|
+
* Used to determine the unit rate (optional)
|
|
2779
|
+
*/
|
|
2780
|
+
second_dimension?: string | null;
|
|
2781
|
+
}
|
|
2782
|
+
namespace ScalableMatrixWithUnitPricingConfig {
|
|
2783
|
+
/**
|
|
2784
|
+
* Configuration for a single matrix scaling factor
|
|
2785
|
+
*/
|
|
2786
|
+
interface MatrixScalingFactor {
|
|
2787
|
+
/**
|
|
2788
|
+
* First dimension value
|
|
2789
|
+
*/
|
|
2790
|
+
first_dimension_value: string;
|
|
2791
|
+
/**
|
|
2792
|
+
* Scaling factor
|
|
2793
|
+
*/
|
|
2794
|
+
scaling_factor: string;
|
|
2795
|
+
/**
|
|
2796
|
+
* Second dimension value (optional)
|
|
2797
|
+
*/
|
|
2798
|
+
second_dimension_value?: string | null;
|
|
2799
|
+
}
|
|
2800
|
+
}
|
|
2801
|
+
}
|
|
2802
|
+
export interface NewSubscriptionThresholdTotalAmountPrice {
|
|
2295
2803
|
/**
|
|
2296
2804
|
* The cadence to bill for this price on.
|
|
2297
2805
|
*/
|
|
@@ -2300,14 +2808,18 @@ export interface NewSubscriptionScalableMatrixWithUnitPricingPrice {
|
|
|
2300
2808
|
* The id of the item the price will be associated with.
|
|
2301
2809
|
*/
|
|
2302
2810
|
item_id: string;
|
|
2303
|
-
|
|
2811
|
+
/**
|
|
2812
|
+
* The pricing model type
|
|
2813
|
+
*/
|
|
2814
|
+
model_type: 'threshold_total_amount';
|
|
2304
2815
|
/**
|
|
2305
2816
|
* The name of the price.
|
|
2306
2817
|
*/
|
|
2307
2818
|
name: string;
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2819
|
+
/**
|
|
2820
|
+
* Configuration for threshold_total_amount pricing
|
|
2821
|
+
*/
|
|
2822
|
+
threshold_total_amount_config: NewSubscriptionThresholdTotalAmountPrice.ThresholdTotalAmountConfig;
|
|
2311
2823
|
/**
|
|
2312
2824
|
* The id of the billable metric for the price. Only needed if the price is
|
|
2313
2825
|
* usage-based.
|
|
@@ -2372,7 +2884,38 @@ export interface NewSubscriptionScalableMatrixWithUnitPricingPrice {
|
|
|
2372
2884
|
*/
|
|
2373
2885
|
reference_id?: string | null;
|
|
2374
2886
|
}
|
|
2375
|
-
export
|
|
2887
|
+
export declare namespace NewSubscriptionThresholdTotalAmountPrice {
|
|
2888
|
+
/**
|
|
2889
|
+
* Configuration for threshold_total_amount pricing
|
|
2890
|
+
*/
|
|
2891
|
+
interface ThresholdTotalAmountConfig {
|
|
2892
|
+
/**
|
|
2893
|
+
* When the quantity consumed passes a provided threshold, the configured total
|
|
2894
|
+
* will be charged
|
|
2895
|
+
*/
|
|
2896
|
+
consumption_table: Array<ThresholdTotalAmountConfig.ConsumptionTable>;
|
|
2897
|
+
/**
|
|
2898
|
+
* If true, the unit price will be prorated to the billing period
|
|
2899
|
+
*/
|
|
2900
|
+
prorate?: boolean | null;
|
|
2901
|
+
}
|
|
2902
|
+
namespace ThresholdTotalAmountConfig {
|
|
2903
|
+
/**
|
|
2904
|
+
* Configuration for a single threshold
|
|
2905
|
+
*/
|
|
2906
|
+
interface ConsumptionTable {
|
|
2907
|
+
/**
|
|
2908
|
+
* Quantity threshold
|
|
2909
|
+
*/
|
|
2910
|
+
threshold: string;
|
|
2911
|
+
/**
|
|
2912
|
+
* Total amount for this threshold
|
|
2913
|
+
*/
|
|
2914
|
+
total_amount: string;
|
|
2915
|
+
}
|
|
2916
|
+
}
|
|
2917
|
+
}
|
|
2918
|
+
export interface NewSubscriptionTieredPackagePrice {
|
|
2376
2919
|
/**
|
|
2377
2920
|
* The cadence to bill for this price on.
|
|
2378
2921
|
*/
|
|
@@ -2381,14 +2924,18 @@ export interface NewSubscriptionThresholdTotalAmountPrice {
|
|
|
2381
2924
|
* The id of the item the price will be associated with.
|
|
2382
2925
|
*/
|
|
2383
2926
|
item_id: string;
|
|
2384
|
-
|
|
2927
|
+
/**
|
|
2928
|
+
* The pricing model type
|
|
2929
|
+
*/
|
|
2930
|
+
model_type: 'tiered_package';
|
|
2385
2931
|
/**
|
|
2386
2932
|
* The name of the price.
|
|
2387
2933
|
*/
|
|
2388
2934
|
name: string;
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2935
|
+
/**
|
|
2936
|
+
* Configuration for tiered_package pricing
|
|
2937
|
+
*/
|
|
2938
|
+
tiered_package_config: NewSubscriptionTieredPackagePrice.TieredPackageConfig;
|
|
2392
2939
|
/**
|
|
2393
2940
|
* The id of the billable metric for the price. Only needed if the price is
|
|
2394
2941
|
* usage-based.
|
|
@@ -2453,7 +3000,38 @@ export interface NewSubscriptionThresholdTotalAmountPrice {
|
|
|
2453
3000
|
*/
|
|
2454
3001
|
reference_id?: string | null;
|
|
2455
3002
|
}
|
|
2456
|
-
export
|
|
3003
|
+
export declare namespace NewSubscriptionTieredPackagePrice {
|
|
3004
|
+
/**
|
|
3005
|
+
* Configuration for tiered_package pricing
|
|
3006
|
+
*/
|
|
3007
|
+
interface TieredPackageConfig {
|
|
3008
|
+
/**
|
|
3009
|
+
* Package size
|
|
3010
|
+
*/
|
|
3011
|
+
package_size: string;
|
|
3012
|
+
/**
|
|
3013
|
+
* Apply tiered pricing after rounding up the quantity to the package size. Tiers
|
|
3014
|
+
* are defined using exclusive lower bounds.
|
|
3015
|
+
*/
|
|
3016
|
+
tiers: Array<TieredPackageConfig.Tier>;
|
|
3017
|
+
}
|
|
3018
|
+
namespace TieredPackageConfig {
|
|
3019
|
+
/**
|
|
3020
|
+
* Configuration for a single tier with business logic
|
|
3021
|
+
*/
|
|
3022
|
+
interface Tier {
|
|
3023
|
+
/**
|
|
3024
|
+
* Price per package
|
|
3025
|
+
*/
|
|
3026
|
+
per_unit: string;
|
|
3027
|
+
/**
|
|
3028
|
+
* Tier lower bound
|
|
3029
|
+
*/
|
|
3030
|
+
tier_lower_bound: string;
|
|
3031
|
+
}
|
|
3032
|
+
}
|
|
3033
|
+
}
|
|
3034
|
+
export interface NewSubscriptionTieredPackageWithMinimumPrice {
|
|
2457
3035
|
/**
|
|
2458
3036
|
* The cadence to bill for this price on.
|
|
2459
3037
|
*/
|
|
@@ -2462,14 +3040,18 @@ export interface NewSubscriptionTierWithProrationPrice {
|
|
|
2462
3040
|
* The id of the item the price will be associated with.
|
|
2463
3041
|
*/
|
|
2464
3042
|
item_id: string;
|
|
2465
|
-
|
|
3043
|
+
/**
|
|
3044
|
+
* The pricing model type
|
|
3045
|
+
*/
|
|
3046
|
+
model_type: 'tiered_package_with_minimum';
|
|
2466
3047
|
/**
|
|
2467
3048
|
* The name of the price.
|
|
2468
3049
|
*/
|
|
2469
3050
|
name: string;
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
3051
|
+
/**
|
|
3052
|
+
* Configuration for tiered_package_with_minimum pricing
|
|
3053
|
+
*/
|
|
3054
|
+
tiered_package_with_minimum_config: NewSubscriptionTieredPackageWithMinimumPrice.TieredPackageWithMinimumConfig;
|
|
2473
3055
|
/**
|
|
2474
3056
|
* The id of the billable metric for the price. Only needed if the price is
|
|
2475
3057
|
* usage-based.
|
|
@@ -2534,7 +3116,42 @@ export interface NewSubscriptionTierWithProrationPrice {
|
|
|
2534
3116
|
*/
|
|
2535
3117
|
reference_id?: string | null;
|
|
2536
3118
|
}
|
|
2537
|
-
export
|
|
3119
|
+
export declare namespace NewSubscriptionTieredPackageWithMinimumPrice {
|
|
3120
|
+
/**
|
|
3121
|
+
* Configuration for tiered_package_with_minimum pricing
|
|
3122
|
+
*/
|
|
3123
|
+
interface TieredPackageWithMinimumConfig {
|
|
3124
|
+
/**
|
|
3125
|
+
* Package size
|
|
3126
|
+
*/
|
|
3127
|
+
package_size: number;
|
|
3128
|
+
/**
|
|
3129
|
+
* Apply tiered pricing after rounding up the quantity to the package size. Tiers
|
|
3130
|
+
* are defined using exclusive lower bounds.
|
|
3131
|
+
*/
|
|
3132
|
+
tiers: Array<TieredPackageWithMinimumConfig.Tier>;
|
|
3133
|
+
}
|
|
3134
|
+
namespace TieredPackageWithMinimumConfig {
|
|
3135
|
+
/**
|
|
3136
|
+
* Configuration for a single tier
|
|
3137
|
+
*/
|
|
3138
|
+
interface Tier {
|
|
3139
|
+
/**
|
|
3140
|
+
* Minimum amount
|
|
3141
|
+
*/
|
|
3142
|
+
minimum_amount: string;
|
|
3143
|
+
/**
|
|
3144
|
+
* Price per package
|
|
3145
|
+
*/
|
|
3146
|
+
per_unit: string;
|
|
3147
|
+
/**
|
|
3148
|
+
* Tier lower bound
|
|
3149
|
+
*/
|
|
3150
|
+
tier_lower_bound: string;
|
|
3151
|
+
}
|
|
3152
|
+
}
|
|
3153
|
+
}
|
|
3154
|
+
export interface NewSubscriptionTieredPrice {
|
|
2538
3155
|
/**
|
|
2539
3156
|
* The cadence to bill for this price on.
|
|
2540
3157
|
*/
|
|
@@ -2543,12 +3160,18 @@ export interface NewSubscriptionTieredBPSPrice {
|
|
|
2543
3160
|
* The id of the item the price will be associated with.
|
|
2544
3161
|
*/
|
|
2545
3162
|
item_id: string;
|
|
2546
|
-
|
|
3163
|
+
/**
|
|
3164
|
+
* The pricing model type
|
|
3165
|
+
*/
|
|
3166
|
+
model_type: 'tiered';
|
|
2547
3167
|
/**
|
|
2548
3168
|
* The name of the price.
|
|
2549
3169
|
*/
|
|
2550
3170
|
name: string;
|
|
2551
|
-
|
|
3171
|
+
/**
|
|
3172
|
+
* Configuration for tiered pricing
|
|
3173
|
+
*/
|
|
3174
|
+
tiered_config: Shared.TieredConfig;
|
|
2552
3175
|
/**
|
|
2553
3176
|
* The id of the billable metric for the price. Only needed if the price is
|
|
2554
3177
|
* usage-based.
|
|
@@ -2613,7 +3236,7 @@ export interface NewSubscriptionTieredBPSPrice {
|
|
|
2613
3236
|
*/
|
|
2614
3237
|
reference_id?: string | null;
|
|
2615
3238
|
}
|
|
2616
|
-
export interface
|
|
3239
|
+
export interface NewSubscriptionTieredWithMinimumPrice {
|
|
2617
3240
|
/**
|
|
2618
3241
|
* The cadence to bill for this price on.
|
|
2619
3242
|
*/
|
|
@@ -2622,14 +3245,18 @@ export interface NewSubscriptionTieredPackagePrice {
|
|
|
2622
3245
|
* The id of the item the price will be associated with.
|
|
2623
3246
|
*/
|
|
2624
3247
|
item_id: string;
|
|
2625
|
-
|
|
3248
|
+
/**
|
|
3249
|
+
* The pricing model type
|
|
3250
|
+
*/
|
|
3251
|
+
model_type: 'tiered_with_minimum';
|
|
2626
3252
|
/**
|
|
2627
3253
|
* The name of the price.
|
|
2628
3254
|
*/
|
|
2629
3255
|
name: string;
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
3256
|
+
/**
|
|
3257
|
+
* Configuration for tiered_with_minimum pricing
|
|
3258
|
+
*/
|
|
3259
|
+
tiered_with_minimum_config: NewSubscriptionTieredWithMinimumPrice.TieredWithMinimumConfig;
|
|
2633
3260
|
/**
|
|
2634
3261
|
* The id of the billable metric for the price. Only needed if the price is
|
|
2635
3262
|
* usage-based.
|
|
@@ -2694,7 +3321,46 @@ export interface NewSubscriptionTieredPackagePrice {
|
|
|
2694
3321
|
*/
|
|
2695
3322
|
reference_id?: string | null;
|
|
2696
3323
|
}
|
|
2697
|
-
export
|
|
3324
|
+
export declare namespace NewSubscriptionTieredWithMinimumPrice {
|
|
3325
|
+
/**
|
|
3326
|
+
* Configuration for tiered_with_minimum pricing
|
|
3327
|
+
*/
|
|
3328
|
+
interface TieredWithMinimumConfig {
|
|
3329
|
+
/**
|
|
3330
|
+
* Tiered pricing with a minimum amount dependent on the volume tier. Tiers are
|
|
3331
|
+
* defined using exclusive lower bounds.
|
|
3332
|
+
*/
|
|
3333
|
+
tiers: Array<TieredWithMinimumConfig.Tier>;
|
|
3334
|
+
/**
|
|
3335
|
+
* If true, tiers with an accrued amount of 0 will not be included in the rating.
|
|
3336
|
+
*/
|
|
3337
|
+
hide_zero_amount_tiers?: boolean;
|
|
3338
|
+
/**
|
|
3339
|
+
* If true, the unit price will be prorated to the billing period
|
|
3340
|
+
*/
|
|
3341
|
+
prorate?: boolean;
|
|
3342
|
+
}
|
|
3343
|
+
namespace TieredWithMinimumConfig {
|
|
3344
|
+
/**
|
|
3345
|
+
* Configuration for a single tier
|
|
3346
|
+
*/
|
|
3347
|
+
interface Tier {
|
|
3348
|
+
/**
|
|
3349
|
+
* Minimum amount
|
|
3350
|
+
*/
|
|
3351
|
+
minimum_amount: string;
|
|
3352
|
+
/**
|
|
3353
|
+
* Tier lower bound
|
|
3354
|
+
*/
|
|
3355
|
+
tier_lower_bound: string;
|
|
3356
|
+
/**
|
|
3357
|
+
* Per unit amount
|
|
3358
|
+
*/
|
|
3359
|
+
unit_amount: string;
|
|
3360
|
+
}
|
|
3361
|
+
}
|
|
3362
|
+
}
|
|
3363
|
+
export interface NewSubscriptionUnitPrice {
|
|
2698
3364
|
/**
|
|
2699
3365
|
* The cadence to bill for this price on.
|
|
2700
3366
|
*/
|
|
@@ -2703,252 +3369,17 @@ export interface NewSubscriptionTieredPackageWithMinimumPrice {
|
|
|
2703
3369
|
* The id of the item the price will be associated with.
|
|
2704
3370
|
*/
|
|
2705
3371
|
item_id: string;
|
|
2706
|
-
model_type: 'tiered_package_with_minimum';
|
|
2707
|
-
/**
|
|
2708
|
-
* The name of the price.
|
|
2709
|
-
*/
|
|
2710
|
-
name: string;
|
|
2711
|
-
tiered_package_with_minimum_config: {
|
|
2712
|
-
[key: string]: unknown;
|
|
2713
|
-
};
|
|
2714
|
-
/**
|
|
2715
|
-
* The id of the billable metric for the price. Only needed if the price is
|
|
2716
|
-
* usage-based.
|
|
2717
|
-
*/
|
|
2718
|
-
billable_metric_id?: string | null;
|
|
2719
|
-
/**
|
|
2720
|
-
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
2721
|
-
* this is true, and in-arrears if this is false.
|
|
2722
|
-
*/
|
|
2723
|
-
billed_in_advance?: boolean | null;
|
|
2724
|
-
/**
|
|
2725
|
-
* For custom cadence: specifies the duration of the billing period in days or
|
|
2726
|
-
* months.
|
|
2727
|
-
*/
|
|
2728
|
-
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
2729
|
-
/**
|
|
2730
|
-
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
2731
|
-
*/
|
|
2732
|
-
conversion_rate?: number | null;
|
|
2733
|
-
/**
|
|
2734
|
-
* The configuration for the rate of the price currency to the invoicing currency.
|
|
2735
|
-
*/
|
|
2736
|
-
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
2737
|
-
/**
|
|
2738
|
-
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
2739
|
-
* price is billed.
|
|
2740
|
-
*/
|
|
2741
|
-
currency?: string | null;
|
|
2742
|
-
/**
|
|
2743
|
-
* For dimensional price: specifies a price group and dimension values
|
|
2744
|
-
*/
|
|
2745
|
-
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
2746
|
-
/**
|
|
2747
|
-
* An alias for the price.
|
|
2748
|
-
*/
|
|
2749
|
-
external_price_id?: string | null;
|
|
2750
|
-
/**
|
|
2751
|
-
* If the Price represents a fixed cost, this represents the quantity of units
|
|
2752
|
-
* applied.
|
|
2753
|
-
*/
|
|
2754
|
-
fixed_price_quantity?: number | null;
|
|
2755
|
-
/**
|
|
2756
|
-
* The property used to group this price on an invoice
|
|
2757
|
-
*/
|
|
2758
|
-
invoice_grouping_key?: string | null;
|
|
2759
|
-
/**
|
|
2760
|
-
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
2761
|
-
* If unspecified, a single invoice is produced per billing cycle.
|
|
2762
|
-
*/
|
|
2763
|
-
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
2764
|
-
/**
|
|
2765
|
-
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
2766
|
-
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
2767
|
-
* by setting `metadata` to `null`.
|
|
2768
|
-
*/
|
|
2769
|
-
metadata?: {
|
|
2770
|
-
[key: string]: string | null;
|
|
2771
|
-
} | null;
|
|
2772
|
-
/**
|
|
2773
|
-
* A transient ID that can be used to reference this price when adding adjustments
|
|
2774
|
-
* in the same API call.
|
|
2775
|
-
*/
|
|
2776
|
-
reference_id?: string | null;
|
|
2777
|
-
}
|
|
2778
|
-
export interface NewSubscriptionTieredPrice {
|
|
2779
|
-
/**
|
|
2780
|
-
* The cadence to bill for this price on.
|
|
2781
|
-
*/
|
|
2782
|
-
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
2783
|
-
/**
|
|
2784
|
-
* The id of the item the price will be associated with.
|
|
2785
|
-
*/
|
|
2786
|
-
item_id: string;
|
|
2787
|
-
model_type: 'tiered';
|
|
2788
|
-
/**
|
|
2789
|
-
* The name of the price.
|
|
2790
|
-
*/
|
|
2791
|
-
name: string;
|
|
2792
|
-
tiered_config: Shared.TieredConfig;
|
|
2793
|
-
/**
|
|
2794
|
-
* The id of the billable metric for the price. Only needed if the price is
|
|
2795
|
-
* usage-based.
|
|
2796
|
-
*/
|
|
2797
|
-
billable_metric_id?: string | null;
|
|
2798
|
-
/**
|
|
2799
|
-
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
2800
|
-
* this is true, and in-arrears if this is false.
|
|
2801
|
-
*/
|
|
2802
|
-
billed_in_advance?: boolean | null;
|
|
2803
|
-
/**
|
|
2804
|
-
* For custom cadence: specifies the duration of the billing period in days or
|
|
2805
|
-
* months.
|
|
2806
|
-
*/
|
|
2807
|
-
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
2808
|
-
/**
|
|
2809
|
-
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
2810
|
-
*/
|
|
2811
|
-
conversion_rate?: number | null;
|
|
2812
3372
|
/**
|
|
2813
|
-
* The
|
|
2814
|
-
*/
|
|
2815
|
-
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
2816
|
-
/**
|
|
2817
|
-
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
2818
|
-
* price is billed.
|
|
3373
|
+
* The pricing model type
|
|
2819
3374
|
*/
|
|
2820
|
-
|
|
2821
|
-
/**
|
|
2822
|
-
* For dimensional price: specifies a price group and dimension values
|
|
2823
|
-
*/
|
|
2824
|
-
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
2825
|
-
/**
|
|
2826
|
-
* An alias for the price.
|
|
2827
|
-
*/
|
|
2828
|
-
external_price_id?: string | null;
|
|
2829
|
-
/**
|
|
2830
|
-
* If the Price represents a fixed cost, this represents the quantity of units
|
|
2831
|
-
* applied.
|
|
2832
|
-
*/
|
|
2833
|
-
fixed_price_quantity?: number | null;
|
|
2834
|
-
/**
|
|
2835
|
-
* The property used to group this price on an invoice
|
|
2836
|
-
*/
|
|
2837
|
-
invoice_grouping_key?: string | null;
|
|
2838
|
-
/**
|
|
2839
|
-
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
2840
|
-
* If unspecified, a single invoice is produced per billing cycle.
|
|
2841
|
-
*/
|
|
2842
|
-
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
2843
|
-
/**
|
|
2844
|
-
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
2845
|
-
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
2846
|
-
* by setting `metadata` to `null`.
|
|
2847
|
-
*/
|
|
2848
|
-
metadata?: {
|
|
2849
|
-
[key: string]: string | null;
|
|
2850
|
-
} | null;
|
|
2851
|
-
/**
|
|
2852
|
-
* A transient ID that can be used to reference this price when adding adjustments
|
|
2853
|
-
* in the same API call.
|
|
2854
|
-
*/
|
|
2855
|
-
reference_id?: string | null;
|
|
2856
|
-
}
|
|
2857
|
-
export interface NewSubscriptionTieredWithMinimumPrice {
|
|
2858
|
-
/**
|
|
2859
|
-
* The cadence to bill for this price on.
|
|
2860
|
-
*/
|
|
2861
|
-
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
2862
|
-
/**
|
|
2863
|
-
* The id of the item the price will be associated with.
|
|
2864
|
-
*/
|
|
2865
|
-
item_id: string;
|
|
2866
|
-
model_type: 'tiered_with_minimum';
|
|
3375
|
+
model_type: 'unit';
|
|
2867
3376
|
/**
|
|
2868
3377
|
* The name of the price.
|
|
2869
3378
|
*/
|
|
2870
3379
|
name: string;
|
|
2871
|
-
tiered_with_minimum_config: {
|
|
2872
|
-
[key: string]: unknown;
|
|
2873
|
-
};
|
|
2874
|
-
/**
|
|
2875
|
-
* The id of the billable metric for the price. Only needed if the price is
|
|
2876
|
-
* usage-based.
|
|
2877
|
-
*/
|
|
2878
|
-
billable_metric_id?: string | null;
|
|
2879
|
-
/**
|
|
2880
|
-
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
2881
|
-
* this is true, and in-arrears if this is false.
|
|
2882
|
-
*/
|
|
2883
|
-
billed_in_advance?: boolean | null;
|
|
2884
|
-
/**
|
|
2885
|
-
* For custom cadence: specifies the duration of the billing period in days or
|
|
2886
|
-
* months.
|
|
2887
|
-
*/
|
|
2888
|
-
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
2889
|
-
/**
|
|
2890
|
-
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
2891
|
-
*/
|
|
2892
|
-
conversion_rate?: number | null;
|
|
2893
|
-
/**
|
|
2894
|
-
* The configuration for the rate of the price currency to the invoicing currency.
|
|
2895
|
-
*/
|
|
2896
|
-
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
2897
3380
|
/**
|
|
2898
|
-
*
|
|
2899
|
-
* price is billed.
|
|
2900
|
-
*/
|
|
2901
|
-
currency?: string | null;
|
|
2902
|
-
/**
|
|
2903
|
-
* For dimensional price: specifies a price group and dimension values
|
|
3381
|
+
* Configuration for unit pricing
|
|
2904
3382
|
*/
|
|
2905
|
-
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
2906
|
-
/**
|
|
2907
|
-
* An alias for the price.
|
|
2908
|
-
*/
|
|
2909
|
-
external_price_id?: string | null;
|
|
2910
|
-
/**
|
|
2911
|
-
* If the Price represents a fixed cost, this represents the quantity of units
|
|
2912
|
-
* applied.
|
|
2913
|
-
*/
|
|
2914
|
-
fixed_price_quantity?: number | null;
|
|
2915
|
-
/**
|
|
2916
|
-
* The property used to group this price on an invoice
|
|
2917
|
-
*/
|
|
2918
|
-
invoice_grouping_key?: string | null;
|
|
2919
|
-
/**
|
|
2920
|
-
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
2921
|
-
* If unspecified, a single invoice is produced per billing cycle.
|
|
2922
|
-
*/
|
|
2923
|
-
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
2924
|
-
/**
|
|
2925
|
-
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
2926
|
-
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
2927
|
-
* by setting `metadata` to `null`.
|
|
2928
|
-
*/
|
|
2929
|
-
metadata?: {
|
|
2930
|
-
[key: string]: string | null;
|
|
2931
|
-
} | null;
|
|
2932
|
-
/**
|
|
2933
|
-
* A transient ID that can be used to reference this price when adding adjustments
|
|
2934
|
-
* in the same API call.
|
|
2935
|
-
*/
|
|
2936
|
-
reference_id?: string | null;
|
|
2937
|
-
}
|
|
2938
|
-
export interface NewSubscriptionUnitPrice {
|
|
2939
|
-
/**
|
|
2940
|
-
* The cadence to bill for this price on.
|
|
2941
|
-
*/
|
|
2942
|
-
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
2943
|
-
/**
|
|
2944
|
-
* The id of the item the price will be associated with.
|
|
2945
|
-
*/
|
|
2946
|
-
item_id: string;
|
|
2947
|
-
model_type: 'unit';
|
|
2948
|
-
/**
|
|
2949
|
-
* The name of the price.
|
|
2950
|
-
*/
|
|
2951
|
-
name: string;
|
|
2952
3383
|
unit_config: Shared.UnitConfig;
|
|
2953
3384
|
/**
|
|
2954
3385
|
* The id of the billable metric for the price. Only needed if the price is
|
|
@@ -3023,14 +3454,18 @@ export interface NewSubscriptionUnitWithPercentPrice {
|
|
|
3023
3454
|
* The id of the item the price will be associated with.
|
|
3024
3455
|
*/
|
|
3025
3456
|
item_id: string;
|
|
3457
|
+
/**
|
|
3458
|
+
* The pricing model type
|
|
3459
|
+
*/
|
|
3026
3460
|
model_type: 'unit_with_percent';
|
|
3027
3461
|
/**
|
|
3028
3462
|
* The name of the price.
|
|
3029
3463
|
*/
|
|
3030
3464
|
name: string;
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3465
|
+
/**
|
|
3466
|
+
* Configuration for unit_with_percent pricing
|
|
3467
|
+
*/
|
|
3468
|
+
unit_with_percent_config: NewSubscriptionUnitWithPercentPrice.UnitWithPercentConfig;
|
|
3034
3469
|
/**
|
|
3035
3470
|
* The id of the billable metric for the price. Only needed if the price is
|
|
3036
3471
|
* usage-based.
|
|
@@ -3095,6 +3530,21 @@ export interface NewSubscriptionUnitWithPercentPrice {
|
|
|
3095
3530
|
*/
|
|
3096
3531
|
reference_id?: string | null;
|
|
3097
3532
|
}
|
|
3533
|
+
export declare namespace NewSubscriptionUnitWithPercentPrice {
|
|
3534
|
+
/**
|
|
3535
|
+
* Configuration for unit_with_percent pricing
|
|
3536
|
+
*/
|
|
3537
|
+
interface UnitWithPercentConfig {
|
|
3538
|
+
/**
|
|
3539
|
+
* What percent, out of 100, of the calculated total to charge
|
|
3540
|
+
*/
|
|
3541
|
+
percent: string;
|
|
3542
|
+
/**
|
|
3543
|
+
* Rate per unit of usage
|
|
3544
|
+
*/
|
|
3545
|
+
unit_amount: string;
|
|
3546
|
+
}
|
|
3547
|
+
}
|
|
3098
3548
|
export interface NewSubscriptionUnitWithProrationPrice {
|
|
3099
3549
|
/**
|
|
3100
3550
|
* The cadence to bill for this price on.
|
|
@@ -3104,14 +3554,18 @@ export interface NewSubscriptionUnitWithProrationPrice {
|
|
|
3104
3554
|
* The id of the item the price will be associated with.
|
|
3105
3555
|
*/
|
|
3106
3556
|
item_id: string;
|
|
3557
|
+
/**
|
|
3558
|
+
* The pricing model type
|
|
3559
|
+
*/
|
|
3107
3560
|
model_type: 'unit_with_proration';
|
|
3108
3561
|
/**
|
|
3109
3562
|
* The name of the price.
|
|
3110
3563
|
*/
|
|
3111
3564
|
name: string;
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3565
|
+
/**
|
|
3566
|
+
* Configuration for unit_with_proration pricing
|
|
3567
|
+
*/
|
|
3568
|
+
unit_with_proration_config: NewSubscriptionUnitWithProrationPrice.UnitWithProrationConfig;
|
|
3115
3569
|
/**
|
|
3116
3570
|
* The id of the billable metric for the price. Only needed if the price is
|
|
3117
3571
|
* usage-based.
|
|
@@ -3176,6 +3630,17 @@ export interface NewSubscriptionUnitWithProrationPrice {
|
|
|
3176
3630
|
*/
|
|
3177
3631
|
reference_id?: string | null;
|
|
3178
3632
|
}
|
|
3633
|
+
export declare namespace NewSubscriptionUnitWithProrationPrice {
|
|
3634
|
+
/**
|
|
3635
|
+
* Configuration for unit_with_proration pricing
|
|
3636
|
+
*/
|
|
3637
|
+
interface UnitWithProrationConfig {
|
|
3638
|
+
/**
|
|
3639
|
+
* Rate per unit of usage
|
|
3640
|
+
*/
|
|
3641
|
+
unit_amount: string;
|
|
3642
|
+
}
|
|
3643
|
+
}
|
|
3179
3644
|
/**
|
|
3180
3645
|
* A [subscription](/core-concepts#subscription) represents the purchase of a plan
|
|
3181
3646
|
* by a customer.
|
|
@@ -3610,9 +4075,9 @@ export declare namespace SubscriptionCreateParams {
|
|
|
3610
4075
|
*/
|
|
3611
4076
|
plan_phase_order?: number | null;
|
|
3612
4077
|
/**
|
|
3613
|
-
*
|
|
4078
|
+
* New subscription price request body params.
|
|
3614
4079
|
*/
|
|
3615
|
-
price?: SubscriptionsAPI.NewSubscriptionUnitPrice | SubscriptionsAPI.
|
|
4080
|
+
price?: SubscriptionsAPI.NewSubscriptionUnitPrice | SubscriptionsAPI.NewSubscriptionTieredPrice | SubscriptionsAPI.NewSubscriptionBulkPrice | SubscriptionsAPI.NewSubscriptionPackagePrice | SubscriptionsAPI.NewSubscriptionMatrixPrice | SubscriptionsAPI.NewSubscriptionThresholdTotalAmountPrice | SubscriptionsAPI.NewSubscriptionTieredPackagePrice | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice | AddPrice.NewSubscriptionTieredWithProrationPrice | SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedAllocationPrice | SubscriptionsAPI.NewSubscriptionBulkWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedWithMeteredMinimumPrice | AddPrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice | SubscriptionsAPI.NewSubscriptionMatrixWithDisplayNamePrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPackagePrice | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice | null;
|
|
3616
4081
|
/**
|
|
3617
4082
|
* The id of the price to add to the subscription.
|
|
3618
4083
|
*/
|
|
@@ -3624,6 +4089,228 @@ export declare namespace SubscriptionCreateParams {
|
|
|
3624
4089
|
*/
|
|
3625
4090
|
start_date?: string | null;
|
|
3626
4091
|
}
|
|
4092
|
+
namespace AddPrice {
|
|
4093
|
+
interface NewSubscriptionTieredWithProrationPrice {
|
|
4094
|
+
/**
|
|
4095
|
+
* The cadence to bill for this price on.
|
|
4096
|
+
*/
|
|
4097
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
4098
|
+
/**
|
|
4099
|
+
* The id of the item the price will be associated with.
|
|
4100
|
+
*/
|
|
4101
|
+
item_id: string;
|
|
4102
|
+
/**
|
|
4103
|
+
* The pricing model type
|
|
4104
|
+
*/
|
|
4105
|
+
model_type: 'tiered_with_proration';
|
|
4106
|
+
/**
|
|
4107
|
+
* The name of the price.
|
|
4108
|
+
*/
|
|
4109
|
+
name: string;
|
|
4110
|
+
/**
|
|
4111
|
+
* Configuration for tiered_with_proration pricing
|
|
4112
|
+
*/
|
|
4113
|
+
tiered_with_proration_config: NewSubscriptionTieredWithProrationPrice.TieredWithProrationConfig;
|
|
4114
|
+
/**
|
|
4115
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
4116
|
+
* usage-based.
|
|
4117
|
+
*/
|
|
4118
|
+
billable_metric_id?: string | null;
|
|
4119
|
+
/**
|
|
4120
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
4121
|
+
* this is true, and in-arrears if this is false.
|
|
4122
|
+
*/
|
|
4123
|
+
billed_in_advance?: boolean | null;
|
|
4124
|
+
/**
|
|
4125
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
4126
|
+
* months.
|
|
4127
|
+
*/
|
|
4128
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
4129
|
+
/**
|
|
4130
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
4131
|
+
*/
|
|
4132
|
+
conversion_rate?: number | null;
|
|
4133
|
+
/**
|
|
4134
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
4135
|
+
*/
|
|
4136
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
4137
|
+
/**
|
|
4138
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
4139
|
+
* price is billed.
|
|
4140
|
+
*/
|
|
4141
|
+
currency?: string | null;
|
|
4142
|
+
/**
|
|
4143
|
+
* For dimensional price: specifies a price group and dimension values
|
|
4144
|
+
*/
|
|
4145
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
4146
|
+
/**
|
|
4147
|
+
* An alias for the price.
|
|
4148
|
+
*/
|
|
4149
|
+
external_price_id?: string | null;
|
|
4150
|
+
/**
|
|
4151
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
4152
|
+
* applied.
|
|
4153
|
+
*/
|
|
4154
|
+
fixed_price_quantity?: number | null;
|
|
4155
|
+
/**
|
|
4156
|
+
* The property used to group this price on an invoice
|
|
4157
|
+
*/
|
|
4158
|
+
invoice_grouping_key?: string | null;
|
|
4159
|
+
/**
|
|
4160
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
4161
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
4162
|
+
*/
|
|
4163
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
4164
|
+
/**
|
|
4165
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
4166
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
4167
|
+
* by setting `metadata` to `null`.
|
|
4168
|
+
*/
|
|
4169
|
+
metadata?: {
|
|
4170
|
+
[key: string]: string | null;
|
|
4171
|
+
} | null;
|
|
4172
|
+
/**
|
|
4173
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
4174
|
+
* in the same API call.
|
|
4175
|
+
*/
|
|
4176
|
+
reference_id?: string | null;
|
|
4177
|
+
}
|
|
4178
|
+
namespace NewSubscriptionTieredWithProrationPrice {
|
|
4179
|
+
/**
|
|
4180
|
+
* Configuration for tiered_with_proration pricing
|
|
4181
|
+
*/
|
|
4182
|
+
interface TieredWithProrationConfig {
|
|
4183
|
+
/**
|
|
4184
|
+
* Tiers for rating based on total usage quantities into the specified tier with
|
|
4185
|
+
* proration
|
|
4186
|
+
*/
|
|
4187
|
+
tiers: Array<TieredWithProrationConfig.Tier>;
|
|
4188
|
+
}
|
|
4189
|
+
namespace TieredWithProrationConfig {
|
|
4190
|
+
/**
|
|
4191
|
+
* Configuration for a single tiered with proration tier
|
|
4192
|
+
*/
|
|
4193
|
+
interface Tier {
|
|
4194
|
+
/**
|
|
4195
|
+
* Inclusive tier starting value
|
|
4196
|
+
*/
|
|
4197
|
+
tier_lower_bound: string;
|
|
4198
|
+
/**
|
|
4199
|
+
* Amount per unit
|
|
4200
|
+
*/
|
|
4201
|
+
unit_amount: string;
|
|
4202
|
+
}
|
|
4203
|
+
}
|
|
4204
|
+
}
|
|
4205
|
+
interface NewSubscriptionGroupedWithMinMaxThresholdsPrice {
|
|
4206
|
+
/**
|
|
4207
|
+
* The cadence to bill for this price on.
|
|
4208
|
+
*/
|
|
4209
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
4210
|
+
/**
|
|
4211
|
+
* Configuration for grouped_with_min_max_thresholds pricing
|
|
4212
|
+
*/
|
|
4213
|
+
grouped_with_min_max_thresholds_config: NewSubscriptionGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
|
|
4214
|
+
/**
|
|
4215
|
+
* The id of the item the price will be associated with.
|
|
4216
|
+
*/
|
|
4217
|
+
item_id: string;
|
|
4218
|
+
/**
|
|
4219
|
+
* The pricing model type
|
|
4220
|
+
*/
|
|
4221
|
+
model_type: 'grouped_with_min_max_thresholds';
|
|
4222
|
+
/**
|
|
4223
|
+
* The name of the price.
|
|
4224
|
+
*/
|
|
4225
|
+
name: string;
|
|
4226
|
+
/**
|
|
4227
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
4228
|
+
* usage-based.
|
|
4229
|
+
*/
|
|
4230
|
+
billable_metric_id?: string | null;
|
|
4231
|
+
/**
|
|
4232
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
4233
|
+
* this is true, and in-arrears if this is false.
|
|
4234
|
+
*/
|
|
4235
|
+
billed_in_advance?: boolean | null;
|
|
4236
|
+
/**
|
|
4237
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
4238
|
+
* months.
|
|
4239
|
+
*/
|
|
4240
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
4241
|
+
/**
|
|
4242
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
4243
|
+
*/
|
|
4244
|
+
conversion_rate?: number | null;
|
|
4245
|
+
/**
|
|
4246
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
4247
|
+
*/
|
|
4248
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
4249
|
+
/**
|
|
4250
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
4251
|
+
* price is billed.
|
|
4252
|
+
*/
|
|
4253
|
+
currency?: string | null;
|
|
4254
|
+
/**
|
|
4255
|
+
* For dimensional price: specifies a price group and dimension values
|
|
4256
|
+
*/
|
|
4257
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
4258
|
+
/**
|
|
4259
|
+
* An alias for the price.
|
|
4260
|
+
*/
|
|
4261
|
+
external_price_id?: string | null;
|
|
4262
|
+
/**
|
|
4263
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
4264
|
+
* applied.
|
|
4265
|
+
*/
|
|
4266
|
+
fixed_price_quantity?: number | null;
|
|
4267
|
+
/**
|
|
4268
|
+
* The property used to group this price on an invoice
|
|
4269
|
+
*/
|
|
4270
|
+
invoice_grouping_key?: string | null;
|
|
4271
|
+
/**
|
|
4272
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
4273
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
4274
|
+
*/
|
|
4275
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
4276
|
+
/**
|
|
4277
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
4278
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
4279
|
+
* by setting `metadata` to `null`.
|
|
4280
|
+
*/
|
|
4281
|
+
metadata?: {
|
|
4282
|
+
[key: string]: string | null;
|
|
4283
|
+
} | null;
|
|
4284
|
+
/**
|
|
4285
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
4286
|
+
* in the same API call.
|
|
4287
|
+
*/
|
|
4288
|
+
reference_id?: string | null;
|
|
4289
|
+
}
|
|
4290
|
+
namespace NewSubscriptionGroupedWithMinMaxThresholdsPrice {
|
|
4291
|
+
/**
|
|
4292
|
+
* Configuration for grouped_with_min_max_thresholds pricing
|
|
4293
|
+
*/
|
|
4294
|
+
interface GroupedWithMinMaxThresholdsConfig {
|
|
4295
|
+
/**
|
|
4296
|
+
* The event property used to group before applying thresholds
|
|
4297
|
+
*/
|
|
4298
|
+
grouping_key: string;
|
|
4299
|
+
/**
|
|
4300
|
+
* The maximum amount to charge each group
|
|
4301
|
+
*/
|
|
4302
|
+
maximum_charge: string;
|
|
4303
|
+
/**
|
|
4304
|
+
* The minimum amount to charge each group, regardless of usage
|
|
4305
|
+
*/
|
|
4306
|
+
minimum_charge: string;
|
|
4307
|
+
/**
|
|
4308
|
+
* The base price charged per group
|
|
4309
|
+
*/
|
|
4310
|
+
per_unit_rate: string;
|
|
4311
|
+
}
|
|
4312
|
+
}
|
|
4313
|
+
}
|
|
3627
4314
|
interface RemoveAdjustment {
|
|
3628
4315
|
/**
|
|
3629
4316
|
* The id of the adjustment to remove on the subscription.
|
|
@@ -3683,14 +4370,236 @@ export declare namespace SubscriptionCreateParams {
|
|
|
3683
4370
|
*/
|
|
3684
4371
|
minimum_amount?: string | null;
|
|
3685
4372
|
/**
|
|
3686
|
-
*
|
|
4373
|
+
* New subscription price request body params.
|
|
3687
4374
|
*/
|
|
3688
|
-
price?: SubscriptionsAPI.NewSubscriptionUnitPrice | SubscriptionsAPI.
|
|
4375
|
+
price?: SubscriptionsAPI.NewSubscriptionUnitPrice | SubscriptionsAPI.NewSubscriptionTieredPrice | SubscriptionsAPI.NewSubscriptionBulkPrice | SubscriptionsAPI.NewSubscriptionPackagePrice | SubscriptionsAPI.NewSubscriptionMatrixPrice | SubscriptionsAPI.NewSubscriptionThresholdTotalAmountPrice | SubscriptionsAPI.NewSubscriptionTieredPackagePrice | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice | ReplacePrice.NewSubscriptionTieredWithProrationPrice | SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedAllocationPrice | SubscriptionsAPI.NewSubscriptionBulkWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedWithMeteredMinimumPrice | ReplacePrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice | SubscriptionsAPI.NewSubscriptionMatrixWithDisplayNamePrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPackagePrice | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice | null;
|
|
3689
4376
|
/**
|
|
3690
4377
|
* The id of the price to add to the subscription.
|
|
3691
4378
|
*/
|
|
3692
4379
|
price_id?: string | null;
|
|
3693
4380
|
}
|
|
4381
|
+
namespace ReplacePrice {
|
|
4382
|
+
interface NewSubscriptionTieredWithProrationPrice {
|
|
4383
|
+
/**
|
|
4384
|
+
* The cadence to bill for this price on.
|
|
4385
|
+
*/
|
|
4386
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
4387
|
+
/**
|
|
4388
|
+
* The id of the item the price will be associated with.
|
|
4389
|
+
*/
|
|
4390
|
+
item_id: string;
|
|
4391
|
+
/**
|
|
4392
|
+
* The pricing model type
|
|
4393
|
+
*/
|
|
4394
|
+
model_type: 'tiered_with_proration';
|
|
4395
|
+
/**
|
|
4396
|
+
* The name of the price.
|
|
4397
|
+
*/
|
|
4398
|
+
name: string;
|
|
4399
|
+
/**
|
|
4400
|
+
* Configuration for tiered_with_proration pricing
|
|
4401
|
+
*/
|
|
4402
|
+
tiered_with_proration_config: NewSubscriptionTieredWithProrationPrice.TieredWithProrationConfig;
|
|
4403
|
+
/**
|
|
4404
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
4405
|
+
* usage-based.
|
|
4406
|
+
*/
|
|
4407
|
+
billable_metric_id?: string | null;
|
|
4408
|
+
/**
|
|
4409
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
4410
|
+
* this is true, and in-arrears if this is false.
|
|
4411
|
+
*/
|
|
4412
|
+
billed_in_advance?: boolean | null;
|
|
4413
|
+
/**
|
|
4414
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
4415
|
+
* months.
|
|
4416
|
+
*/
|
|
4417
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
4418
|
+
/**
|
|
4419
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
4420
|
+
*/
|
|
4421
|
+
conversion_rate?: number | null;
|
|
4422
|
+
/**
|
|
4423
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
4424
|
+
*/
|
|
4425
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
4426
|
+
/**
|
|
4427
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
4428
|
+
* price is billed.
|
|
4429
|
+
*/
|
|
4430
|
+
currency?: string | null;
|
|
4431
|
+
/**
|
|
4432
|
+
* For dimensional price: specifies a price group and dimension values
|
|
4433
|
+
*/
|
|
4434
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
4435
|
+
/**
|
|
4436
|
+
* An alias for the price.
|
|
4437
|
+
*/
|
|
4438
|
+
external_price_id?: string | null;
|
|
4439
|
+
/**
|
|
4440
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
4441
|
+
* applied.
|
|
4442
|
+
*/
|
|
4443
|
+
fixed_price_quantity?: number | null;
|
|
4444
|
+
/**
|
|
4445
|
+
* The property used to group this price on an invoice
|
|
4446
|
+
*/
|
|
4447
|
+
invoice_grouping_key?: string | null;
|
|
4448
|
+
/**
|
|
4449
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
4450
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
4451
|
+
*/
|
|
4452
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
4453
|
+
/**
|
|
4454
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
4455
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
4456
|
+
* by setting `metadata` to `null`.
|
|
4457
|
+
*/
|
|
4458
|
+
metadata?: {
|
|
4459
|
+
[key: string]: string | null;
|
|
4460
|
+
} | null;
|
|
4461
|
+
/**
|
|
4462
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
4463
|
+
* in the same API call.
|
|
4464
|
+
*/
|
|
4465
|
+
reference_id?: string | null;
|
|
4466
|
+
}
|
|
4467
|
+
namespace NewSubscriptionTieredWithProrationPrice {
|
|
4468
|
+
/**
|
|
4469
|
+
* Configuration for tiered_with_proration pricing
|
|
4470
|
+
*/
|
|
4471
|
+
interface TieredWithProrationConfig {
|
|
4472
|
+
/**
|
|
4473
|
+
* Tiers for rating based on total usage quantities into the specified tier with
|
|
4474
|
+
* proration
|
|
4475
|
+
*/
|
|
4476
|
+
tiers: Array<TieredWithProrationConfig.Tier>;
|
|
4477
|
+
}
|
|
4478
|
+
namespace TieredWithProrationConfig {
|
|
4479
|
+
/**
|
|
4480
|
+
* Configuration for a single tiered with proration tier
|
|
4481
|
+
*/
|
|
4482
|
+
interface Tier {
|
|
4483
|
+
/**
|
|
4484
|
+
* Inclusive tier starting value
|
|
4485
|
+
*/
|
|
4486
|
+
tier_lower_bound: string;
|
|
4487
|
+
/**
|
|
4488
|
+
* Amount per unit
|
|
4489
|
+
*/
|
|
4490
|
+
unit_amount: string;
|
|
4491
|
+
}
|
|
4492
|
+
}
|
|
4493
|
+
}
|
|
4494
|
+
interface NewSubscriptionGroupedWithMinMaxThresholdsPrice {
|
|
4495
|
+
/**
|
|
4496
|
+
* The cadence to bill for this price on.
|
|
4497
|
+
*/
|
|
4498
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
4499
|
+
/**
|
|
4500
|
+
* Configuration for grouped_with_min_max_thresholds pricing
|
|
4501
|
+
*/
|
|
4502
|
+
grouped_with_min_max_thresholds_config: NewSubscriptionGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
|
|
4503
|
+
/**
|
|
4504
|
+
* The id of the item the price will be associated with.
|
|
4505
|
+
*/
|
|
4506
|
+
item_id: string;
|
|
4507
|
+
/**
|
|
4508
|
+
* The pricing model type
|
|
4509
|
+
*/
|
|
4510
|
+
model_type: 'grouped_with_min_max_thresholds';
|
|
4511
|
+
/**
|
|
4512
|
+
* The name of the price.
|
|
4513
|
+
*/
|
|
4514
|
+
name: string;
|
|
4515
|
+
/**
|
|
4516
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
4517
|
+
* usage-based.
|
|
4518
|
+
*/
|
|
4519
|
+
billable_metric_id?: string | null;
|
|
4520
|
+
/**
|
|
4521
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
4522
|
+
* this is true, and in-arrears if this is false.
|
|
4523
|
+
*/
|
|
4524
|
+
billed_in_advance?: boolean | null;
|
|
4525
|
+
/**
|
|
4526
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
4527
|
+
* months.
|
|
4528
|
+
*/
|
|
4529
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
4530
|
+
/**
|
|
4531
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
4532
|
+
*/
|
|
4533
|
+
conversion_rate?: number | null;
|
|
4534
|
+
/**
|
|
4535
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
4536
|
+
*/
|
|
4537
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
4538
|
+
/**
|
|
4539
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
4540
|
+
* price is billed.
|
|
4541
|
+
*/
|
|
4542
|
+
currency?: string | null;
|
|
4543
|
+
/**
|
|
4544
|
+
* For dimensional price: specifies a price group and dimension values
|
|
4545
|
+
*/
|
|
4546
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
4547
|
+
/**
|
|
4548
|
+
* An alias for the price.
|
|
4549
|
+
*/
|
|
4550
|
+
external_price_id?: string | null;
|
|
4551
|
+
/**
|
|
4552
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
4553
|
+
* applied.
|
|
4554
|
+
*/
|
|
4555
|
+
fixed_price_quantity?: number | null;
|
|
4556
|
+
/**
|
|
4557
|
+
* The property used to group this price on an invoice
|
|
4558
|
+
*/
|
|
4559
|
+
invoice_grouping_key?: string | null;
|
|
4560
|
+
/**
|
|
4561
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
4562
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
4563
|
+
*/
|
|
4564
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
4565
|
+
/**
|
|
4566
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
4567
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
4568
|
+
* by setting `metadata` to `null`.
|
|
4569
|
+
*/
|
|
4570
|
+
metadata?: {
|
|
4571
|
+
[key: string]: string | null;
|
|
4572
|
+
} | null;
|
|
4573
|
+
/**
|
|
4574
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
4575
|
+
* in the same API call.
|
|
4576
|
+
*/
|
|
4577
|
+
reference_id?: string | null;
|
|
4578
|
+
}
|
|
4579
|
+
namespace NewSubscriptionGroupedWithMinMaxThresholdsPrice {
|
|
4580
|
+
/**
|
|
4581
|
+
* Configuration for grouped_with_min_max_thresholds pricing
|
|
4582
|
+
*/
|
|
4583
|
+
interface GroupedWithMinMaxThresholdsConfig {
|
|
4584
|
+
/**
|
|
4585
|
+
* The event property used to group before applying thresholds
|
|
4586
|
+
*/
|
|
4587
|
+
grouping_key: string;
|
|
4588
|
+
/**
|
|
4589
|
+
* The maximum amount to charge each group
|
|
4590
|
+
*/
|
|
4591
|
+
maximum_charge: string;
|
|
4592
|
+
/**
|
|
4593
|
+
* The minimum amount to charge each group, regardless of usage
|
|
4594
|
+
*/
|
|
4595
|
+
minimum_charge: string;
|
|
4596
|
+
/**
|
|
4597
|
+
* The base price charged per group
|
|
4598
|
+
*/
|
|
4599
|
+
per_unit_rate: string;
|
|
4600
|
+
}
|
|
4601
|
+
}
|
|
4602
|
+
}
|
|
3694
4603
|
}
|
|
3695
4604
|
export interface SubscriptionUpdateParams {
|
|
3696
4605
|
/**
|
|
@@ -3884,9 +4793,9 @@ export declare namespace SubscriptionPriceIntervalsParams {
|
|
|
3884
4793
|
*/
|
|
3885
4794
|
minimum_amount?: number | null;
|
|
3886
4795
|
/**
|
|
3887
|
-
*
|
|
4796
|
+
* New floating price request body params.
|
|
3888
4797
|
*/
|
|
3889
|
-
price?: Shared.NewFloatingUnitPrice | Shared.
|
|
4798
|
+
price?: Shared.NewFloatingUnitPrice | Shared.NewFloatingTieredPrice | Shared.NewFloatingBulkPrice | Shared.NewFloatingPackagePrice | Shared.NewFloatingMatrixPrice | Shared.NewFloatingThresholdTotalAmountPrice | Shared.NewFloatingTieredPackagePrice | Shared.NewFloatingTieredWithMinimumPrice | Shared.NewFloatingGroupedTieredPrice | Shared.NewFloatingTieredPackageWithMinimumPrice | Shared.NewFloatingPackageWithAllocationPrice | Shared.NewFloatingUnitWithPercentPrice | Shared.NewFloatingMatrixWithAllocationPrice | Shared.NewFloatingTieredWithProrationPrice | Shared.NewFloatingUnitWithProrationPrice | Shared.NewFloatingGroupedAllocationPrice | Shared.NewFloatingBulkWithProrationPrice | Shared.NewFloatingGroupedWithProratedMinimumPrice | Shared.NewFloatingGroupedWithMeteredMinimumPrice | Add.NewFloatingGroupedWithMinMaxThresholdsPrice | Shared.NewFloatingMatrixWithDisplayNamePrice | Shared.NewFloatingGroupedTieredPackagePrice | Shared.NewFloatingMaxGroupTieredPackagePrice | Shared.NewFloatingScalableMatrixWithUnitPricingPrice | Shared.NewFloatingScalableMatrixWithTieredPricingPrice | Shared.NewFloatingCumulativeGroupedBulkPrice | Shared.NewFloatingMinimumCompositePrice | null;
|
|
3890
4799
|
/**
|
|
3891
4800
|
* The id of the price to add to the subscription.
|
|
3892
4801
|
*/
|
|
@@ -3935,12 +4844,110 @@ export declare namespace SubscriptionPriceIntervalsParams {
|
|
|
3935
4844
|
*/
|
|
3936
4845
|
quantity: number;
|
|
3937
4846
|
}
|
|
4847
|
+
interface NewFloatingGroupedWithMinMaxThresholdsPrice {
|
|
4848
|
+
/**
|
|
4849
|
+
* The cadence to bill for this price on.
|
|
4850
|
+
*/
|
|
4851
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
4852
|
+
/**
|
|
4853
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
4854
|
+
*/
|
|
4855
|
+
currency: string;
|
|
4856
|
+
/**
|
|
4857
|
+
* Configuration for grouped_with_min_max_thresholds pricing
|
|
4858
|
+
*/
|
|
4859
|
+
grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
|
|
4860
|
+
/**
|
|
4861
|
+
* The id of the item the price will be associated with.
|
|
4862
|
+
*/
|
|
4863
|
+
item_id: string;
|
|
4864
|
+
/**
|
|
4865
|
+
* The pricing model type
|
|
4866
|
+
*/
|
|
4867
|
+
model_type: 'grouped_with_min_max_thresholds';
|
|
4868
|
+
/**
|
|
4869
|
+
* The name of the price.
|
|
4870
|
+
*/
|
|
4871
|
+
name: string;
|
|
4872
|
+
/**
|
|
4873
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
4874
|
+
* usage-based.
|
|
4875
|
+
*/
|
|
4876
|
+
billable_metric_id?: string | null;
|
|
4877
|
+
/**
|
|
4878
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
4879
|
+
* this is true, and in-arrears if this is false.
|
|
4880
|
+
*/
|
|
4881
|
+
billed_in_advance?: boolean | null;
|
|
4882
|
+
/**
|
|
4883
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
4884
|
+
* months.
|
|
4885
|
+
*/
|
|
4886
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
4887
|
+
/**
|
|
4888
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
4889
|
+
*/
|
|
4890
|
+
conversion_rate?: number | null;
|
|
4891
|
+
/**
|
|
4892
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
4893
|
+
*/
|
|
4894
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
4895
|
+
/**
|
|
4896
|
+
* For dimensional price: specifies a price group and dimension values
|
|
4897
|
+
*/
|
|
4898
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
4899
|
+
/**
|
|
4900
|
+
* An alias for the price.
|
|
4901
|
+
*/
|
|
4902
|
+
external_price_id?: string | null;
|
|
4903
|
+
/**
|
|
4904
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
4905
|
+
* applied.
|
|
4906
|
+
*/
|
|
4907
|
+
fixed_price_quantity?: number | null;
|
|
4908
|
+
/**
|
|
4909
|
+
* The property used to group this price on an invoice
|
|
4910
|
+
*/
|
|
4911
|
+
invoice_grouping_key?: string | null;
|
|
4912
|
+
/**
|
|
4913
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
4914
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
4915
|
+
*/
|
|
4916
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
4917
|
+
/**
|
|
4918
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
4919
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
4920
|
+
* by setting `metadata` to `null`.
|
|
4921
|
+
*/
|
|
4922
|
+
metadata?: {
|
|
4923
|
+
[key: string]: string | null;
|
|
4924
|
+
} | null;
|
|
4925
|
+
}
|
|
4926
|
+
namespace NewFloatingGroupedWithMinMaxThresholdsPrice {
|
|
4927
|
+
/**
|
|
4928
|
+
* Configuration for grouped_with_min_max_thresholds pricing
|
|
4929
|
+
*/
|
|
4930
|
+
interface GroupedWithMinMaxThresholdsConfig {
|
|
4931
|
+
/**
|
|
4932
|
+
* The event property used to group before applying thresholds
|
|
4933
|
+
*/
|
|
4934
|
+
grouping_key: string;
|
|
4935
|
+
/**
|
|
4936
|
+
* The maximum amount to charge each group
|
|
4937
|
+
*/
|
|
4938
|
+
maximum_charge: string;
|
|
4939
|
+
/**
|
|
4940
|
+
* The minimum amount to charge each group, regardless of usage
|
|
4941
|
+
*/
|
|
4942
|
+
minimum_charge: string;
|
|
4943
|
+
/**
|
|
4944
|
+
* The base price charged per group
|
|
4945
|
+
*/
|
|
4946
|
+
per_unit_rate: string;
|
|
4947
|
+
}
|
|
4948
|
+
}
|
|
3938
4949
|
}
|
|
3939
4950
|
interface AddAdjustment {
|
|
3940
|
-
/**
|
|
3941
|
-
* The definition of a new adjustment to create and add to the subscription.
|
|
3942
|
-
*/
|
|
3943
|
-
adjustment: Shared.NewPercentageDiscount | Shared.NewUsageDiscount | Shared.NewAmountDiscount | Shared.NewMinimum | Shared.NewMaximum;
|
|
3944
4951
|
/**
|
|
3945
4952
|
* The start date of the adjustment interval. This is the date that the adjustment
|
|
3946
4953
|
* will start affecting prices on the subscription. The adjustment will apply to
|
|
@@ -3948,6 +4955,16 @@ export declare namespace SubscriptionPriceIntervalsParams {
|
|
|
3948
4955
|
* as inclusive for in-advance prices, and exclusive for in-arrears prices.
|
|
3949
4956
|
*/
|
|
3950
4957
|
start_date: (string & {}) | Shared.BillingCycleRelativeDate;
|
|
4958
|
+
/**
|
|
4959
|
+
* The definition of a new adjustment to create and add to the subscription.
|
|
4960
|
+
*/
|
|
4961
|
+
adjustment?: Shared.NewPercentageDiscount | Shared.NewUsageDiscount | Shared.NewAmountDiscount | Shared.NewMinimum | Shared.NewMaximum | null;
|
|
4962
|
+
/**
|
|
4963
|
+
* The ID of the adjustment to add to the subscription. Adjustment IDs can be
|
|
4964
|
+
* re-used from existing subscriptions or plans, but adjustments associated with
|
|
4965
|
+
* coupon redemptions cannot be re-used.
|
|
4966
|
+
*/
|
|
4967
|
+
adjustment_id?: string | null;
|
|
3951
4968
|
/**
|
|
3952
4969
|
* The end date of the adjustment interval. This is the date that the adjustment
|
|
3953
4970
|
* will stop affecting prices on the subscription. The adjustment will apply to
|
|
@@ -4242,9 +5259,9 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
|
|
|
4242
5259
|
*/
|
|
4243
5260
|
plan_phase_order?: number | null;
|
|
4244
5261
|
/**
|
|
4245
|
-
*
|
|
5262
|
+
* New subscription price request body params.
|
|
4246
5263
|
*/
|
|
4247
|
-
price?: SubscriptionsAPI.NewSubscriptionUnitPrice | SubscriptionsAPI.
|
|
5264
|
+
price?: SubscriptionsAPI.NewSubscriptionUnitPrice | SubscriptionsAPI.NewSubscriptionTieredPrice | SubscriptionsAPI.NewSubscriptionBulkPrice | SubscriptionsAPI.NewSubscriptionPackagePrice | SubscriptionsAPI.NewSubscriptionMatrixPrice | SubscriptionsAPI.NewSubscriptionThresholdTotalAmountPrice | SubscriptionsAPI.NewSubscriptionTieredPackagePrice | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice | AddPrice.NewSubscriptionTieredWithProrationPrice | SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedAllocationPrice | SubscriptionsAPI.NewSubscriptionBulkWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedWithMeteredMinimumPrice | AddPrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice | SubscriptionsAPI.NewSubscriptionMatrixWithDisplayNamePrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPackagePrice | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice | null;
|
|
4248
5265
|
/**
|
|
4249
5266
|
* The id of the price to add to the subscription.
|
|
4250
5267
|
*/
|
|
@@ -4256,6 +5273,228 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
|
|
|
4256
5273
|
*/
|
|
4257
5274
|
start_date?: string | null;
|
|
4258
5275
|
}
|
|
5276
|
+
namespace AddPrice {
|
|
5277
|
+
interface NewSubscriptionTieredWithProrationPrice {
|
|
5278
|
+
/**
|
|
5279
|
+
* The cadence to bill for this price on.
|
|
5280
|
+
*/
|
|
5281
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
5282
|
+
/**
|
|
5283
|
+
* The id of the item the price will be associated with.
|
|
5284
|
+
*/
|
|
5285
|
+
item_id: string;
|
|
5286
|
+
/**
|
|
5287
|
+
* The pricing model type
|
|
5288
|
+
*/
|
|
5289
|
+
model_type: 'tiered_with_proration';
|
|
5290
|
+
/**
|
|
5291
|
+
* The name of the price.
|
|
5292
|
+
*/
|
|
5293
|
+
name: string;
|
|
5294
|
+
/**
|
|
5295
|
+
* Configuration for tiered_with_proration pricing
|
|
5296
|
+
*/
|
|
5297
|
+
tiered_with_proration_config: NewSubscriptionTieredWithProrationPrice.TieredWithProrationConfig;
|
|
5298
|
+
/**
|
|
5299
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
5300
|
+
* usage-based.
|
|
5301
|
+
*/
|
|
5302
|
+
billable_metric_id?: string | null;
|
|
5303
|
+
/**
|
|
5304
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
5305
|
+
* this is true, and in-arrears if this is false.
|
|
5306
|
+
*/
|
|
5307
|
+
billed_in_advance?: boolean | null;
|
|
5308
|
+
/**
|
|
5309
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
5310
|
+
* months.
|
|
5311
|
+
*/
|
|
5312
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
5313
|
+
/**
|
|
5314
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
5315
|
+
*/
|
|
5316
|
+
conversion_rate?: number | null;
|
|
5317
|
+
/**
|
|
5318
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
5319
|
+
*/
|
|
5320
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
5321
|
+
/**
|
|
5322
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
5323
|
+
* price is billed.
|
|
5324
|
+
*/
|
|
5325
|
+
currency?: string | null;
|
|
5326
|
+
/**
|
|
5327
|
+
* For dimensional price: specifies a price group and dimension values
|
|
5328
|
+
*/
|
|
5329
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
5330
|
+
/**
|
|
5331
|
+
* An alias for the price.
|
|
5332
|
+
*/
|
|
5333
|
+
external_price_id?: string | null;
|
|
5334
|
+
/**
|
|
5335
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
5336
|
+
* applied.
|
|
5337
|
+
*/
|
|
5338
|
+
fixed_price_quantity?: number | null;
|
|
5339
|
+
/**
|
|
5340
|
+
* The property used to group this price on an invoice
|
|
5341
|
+
*/
|
|
5342
|
+
invoice_grouping_key?: string | null;
|
|
5343
|
+
/**
|
|
5344
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
5345
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
5346
|
+
*/
|
|
5347
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
5348
|
+
/**
|
|
5349
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
5350
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
5351
|
+
* by setting `metadata` to `null`.
|
|
5352
|
+
*/
|
|
5353
|
+
metadata?: {
|
|
5354
|
+
[key: string]: string | null;
|
|
5355
|
+
} | null;
|
|
5356
|
+
/**
|
|
5357
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
5358
|
+
* in the same API call.
|
|
5359
|
+
*/
|
|
5360
|
+
reference_id?: string | null;
|
|
5361
|
+
}
|
|
5362
|
+
namespace NewSubscriptionTieredWithProrationPrice {
|
|
5363
|
+
/**
|
|
5364
|
+
* Configuration for tiered_with_proration pricing
|
|
5365
|
+
*/
|
|
5366
|
+
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
|
+
namespace TieredWithProrationConfig {
|
|
5374
|
+
/**
|
|
5375
|
+
* Configuration for a single tiered with proration tier
|
|
5376
|
+
*/
|
|
5377
|
+
interface Tier {
|
|
5378
|
+
/**
|
|
5379
|
+
* Inclusive tier starting value
|
|
5380
|
+
*/
|
|
5381
|
+
tier_lower_bound: string;
|
|
5382
|
+
/**
|
|
5383
|
+
* Amount per unit
|
|
5384
|
+
*/
|
|
5385
|
+
unit_amount: string;
|
|
5386
|
+
}
|
|
5387
|
+
}
|
|
5388
|
+
}
|
|
5389
|
+
interface NewSubscriptionGroupedWithMinMaxThresholdsPrice {
|
|
5390
|
+
/**
|
|
5391
|
+
* The cadence to bill for this price on.
|
|
5392
|
+
*/
|
|
5393
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
5394
|
+
/**
|
|
5395
|
+
* Configuration for grouped_with_min_max_thresholds pricing
|
|
5396
|
+
*/
|
|
5397
|
+
grouped_with_min_max_thresholds_config: NewSubscriptionGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
|
|
5398
|
+
/**
|
|
5399
|
+
* The id of the item the price will be associated with.
|
|
5400
|
+
*/
|
|
5401
|
+
item_id: string;
|
|
5402
|
+
/**
|
|
5403
|
+
* The pricing model type
|
|
5404
|
+
*/
|
|
5405
|
+
model_type: 'grouped_with_min_max_thresholds';
|
|
5406
|
+
/**
|
|
5407
|
+
* The name of the price.
|
|
5408
|
+
*/
|
|
5409
|
+
name: string;
|
|
5410
|
+
/**
|
|
5411
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
5412
|
+
* usage-based.
|
|
5413
|
+
*/
|
|
5414
|
+
billable_metric_id?: string | null;
|
|
5415
|
+
/**
|
|
5416
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
5417
|
+
* this is true, and in-arrears if this is false.
|
|
5418
|
+
*/
|
|
5419
|
+
billed_in_advance?: boolean | null;
|
|
5420
|
+
/**
|
|
5421
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
5422
|
+
* months.
|
|
5423
|
+
*/
|
|
5424
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
5425
|
+
/**
|
|
5426
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
5427
|
+
*/
|
|
5428
|
+
conversion_rate?: number | null;
|
|
5429
|
+
/**
|
|
5430
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
5431
|
+
*/
|
|
5432
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
5433
|
+
/**
|
|
5434
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
5435
|
+
* price is billed.
|
|
5436
|
+
*/
|
|
5437
|
+
currency?: string | null;
|
|
5438
|
+
/**
|
|
5439
|
+
* For dimensional price: specifies a price group and dimension values
|
|
5440
|
+
*/
|
|
5441
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
5442
|
+
/**
|
|
5443
|
+
* An alias for the price.
|
|
5444
|
+
*/
|
|
5445
|
+
external_price_id?: string | null;
|
|
5446
|
+
/**
|
|
5447
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
5448
|
+
* applied.
|
|
5449
|
+
*/
|
|
5450
|
+
fixed_price_quantity?: number | null;
|
|
5451
|
+
/**
|
|
5452
|
+
* The property used to group this price on an invoice
|
|
5453
|
+
*/
|
|
5454
|
+
invoice_grouping_key?: string | null;
|
|
5455
|
+
/**
|
|
5456
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
5457
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
5458
|
+
*/
|
|
5459
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
5460
|
+
/**
|
|
5461
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
5462
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
5463
|
+
* by setting `metadata` to `null`.
|
|
5464
|
+
*/
|
|
5465
|
+
metadata?: {
|
|
5466
|
+
[key: string]: string | null;
|
|
5467
|
+
} | null;
|
|
5468
|
+
/**
|
|
5469
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
5470
|
+
* in the same API call.
|
|
5471
|
+
*/
|
|
5472
|
+
reference_id?: string | null;
|
|
5473
|
+
}
|
|
5474
|
+
namespace NewSubscriptionGroupedWithMinMaxThresholdsPrice {
|
|
5475
|
+
/**
|
|
5476
|
+
* Configuration for grouped_with_min_max_thresholds pricing
|
|
5477
|
+
*/
|
|
5478
|
+
interface GroupedWithMinMaxThresholdsConfig {
|
|
5479
|
+
/**
|
|
5480
|
+
* The event property used to group before applying thresholds
|
|
5481
|
+
*/
|
|
5482
|
+
grouping_key: string;
|
|
5483
|
+
/**
|
|
5484
|
+
* The maximum amount to charge each group
|
|
5485
|
+
*/
|
|
5486
|
+
maximum_charge: string;
|
|
5487
|
+
/**
|
|
5488
|
+
* The minimum amount to charge each group, regardless of usage
|
|
5489
|
+
*/
|
|
5490
|
+
minimum_charge: string;
|
|
5491
|
+
/**
|
|
5492
|
+
* The base price charged per group
|
|
5493
|
+
*/
|
|
5494
|
+
per_unit_rate: string;
|
|
5495
|
+
}
|
|
5496
|
+
}
|
|
5497
|
+
}
|
|
4259
5498
|
interface RemoveAdjustment {
|
|
4260
5499
|
/**
|
|
4261
5500
|
* The id of the adjustment to remove on the subscription.
|
|
@@ -4315,14 +5554,236 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
|
|
|
4315
5554
|
*/
|
|
4316
5555
|
minimum_amount?: string | null;
|
|
4317
5556
|
/**
|
|
4318
|
-
*
|
|
5557
|
+
* New subscription price request body params.
|
|
4319
5558
|
*/
|
|
4320
|
-
price?: SubscriptionsAPI.NewSubscriptionUnitPrice | SubscriptionsAPI.
|
|
5559
|
+
price?: SubscriptionsAPI.NewSubscriptionUnitPrice | SubscriptionsAPI.NewSubscriptionTieredPrice | SubscriptionsAPI.NewSubscriptionBulkPrice | SubscriptionsAPI.NewSubscriptionPackagePrice | SubscriptionsAPI.NewSubscriptionMatrixPrice | SubscriptionsAPI.NewSubscriptionThresholdTotalAmountPrice | SubscriptionsAPI.NewSubscriptionTieredPackagePrice | SubscriptionsAPI.NewSubscriptionTieredWithMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPrice | SubscriptionsAPI.NewSubscriptionTieredPackageWithMinimumPrice | SubscriptionsAPI.NewSubscriptionPackageWithAllocationPrice | SubscriptionsAPI.NewSubscriptionUnitWithPercentPrice | SubscriptionsAPI.NewSubscriptionMatrixWithAllocationPrice | ReplacePrice.NewSubscriptionTieredWithProrationPrice | SubscriptionsAPI.NewSubscriptionUnitWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedAllocationPrice | SubscriptionsAPI.NewSubscriptionBulkWithProrationPrice | SubscriptionsAPI.NewSubscriptionGroupedWithProratedMinimumPrice | SubscriptionsAPI.NewSubscriptionGroupedWithMeteredMinimumPrice | ReplacePrice.NewSubscriptionGroupedWithMinMaxThresholdsPrice | SubscriptionsAPI.NewSubscriptionMatrixWithDisplayNamePrice | SubscriptionsAPI.NewSubscriptionGroupedTieredPackagePrice | SubscriptionsAPI.NewSubscriptionMaxGroupTieredPackagePrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice | null;
|
|
4321
5560
|
/**
|
|
4322
5561
|
* The id of the price to add to the subscription.
|
|
4323
5562
|
*/
|
|
4324
5563
|
price_id?: string | null;
|
|
4325
5564
|
}
|
|
5565
|
+
namespace ReplacePrice {
|
|
5566
|
+
interface NewSubscriptionTieredWithProrationPrice {
|
|
5567
|
+
/**
|
|
5568
|
+
* The cadence to bill for this price on.
|
|
5569
|
+
*/
|
|
5570
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
5571
|
+
/**
|
|
5572
|
+
* The id of the item the price will be associated with.
|
|
5573
|
+
*/
|
|
5574
|
+
item_id: string;
|
|
5575
|
+
/**
|
|
5576
|
+
* The pricing model type
|
|
5577
|
+
*/
|
|
5578
|
+
model_type: 'tiered_with_proration';
|
|
5579
|
+
/**
|
|
5580
|
+
* The name of the price.
|
|
5581
|
+
*/
|
|
5582
|
+
name: string;
|
|
5583
|
+
/**
|
|
5584
|
+
* Configuration for tiered_with_proration pricing
|
|
5585
|
+
*/
|
|
5586
|
+
tiered_with_proration_config: NewSubscriptionTieredWithProrationPrice.TieredWithProrationConfig;
|
|
5587
|
+
/**
|
|
5588
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
5589
|
+
* usage-based.
|
|
5590
|
+
*/
|
|
5591
|
+
billable_metric_id?: string | null;
|
|
5592
|
+
/**
|
|
5593
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
5594
|
+
* this is true, and in-arrears if this is false.
|
|
5595
|
+
*/
|
|
5596
|
+
billed_in_advance?: boolean | null;
|
|
5597
|
+
/**
|
|
5598
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
5599
|
+
* months.
|
|
5600
|
+
*/
|
|
5601
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
5602
|
+
/**
|
|
5603
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
5604
|
+
*/
|
|
5605
|
+
conversion_rate?: number | null;
|
|
5606
|
+
/**
|
|
5607
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
5608
|
+
*/
|
|
5609
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
5610
|
+
/**
|
|
5611
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
5612
|
+
* price is billed.
|
|
5613
|
+
*/
|
|
5614
|
+
currency?: string | null;
|
|
5615
|
+
/**
|
|
5616
|
+
* For dimensional price: specifies a price group and dimension values
|
|
5617
|
+
*/
|
|
5618
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
5619
|
+
/**
|
|
5620
|
+
* An alias for the price.
|
|
5621
|
+
*/
|
|
5622
|
+
external_price_id?: string | null;
|
|
5623
|
+
/**
|
|
5624
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
5625
|
+
* applied.
|
|
5626
|
+
*/
|
|
5627
|
+
fixed_price_quantity?: number | null;
|
|
5628
|
+
/**
|
|
5629
|
+
* The property used to group this price on an invoice
|
|
5630
|
+
*/
|
|
5631
|
+
invoice_grouping_key?: string | null;
|
|
5632
|
+
/**
|
|
5633
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
5634
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
5635
|
+
*/
|
|
5636
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
5637
|
+
/**
|
|
5638
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
5639
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
5640
|
+
* by setting `metadata` to `null`.
|
|
5641
|
+
*/
|
|
5642
|
+
metadata?: {
|
|
5643
|
+
[key: string]: string | null;
|
|
5644
|
+
} | null;
|
|
5645
|
+
/**
|
|
5646
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
5647
|
+
* in the same API call.
|
|
5648
|
+
*/
|
|
5649
|
+
reference_id?: string | null;
|
|
5650
|
+
}
|
|
5651
|
+
namespace NewSubscriptionTieredWithProrationPrice {
|
|
5652
|
+
/**
|
|
5653
|
+
* Configuration for tiered_with_proration pricing
|
|
5654
|
+
*/
|
|
5655
|
+
interface TieredWithProrationConfig {
|
|
5656
|
+
/**
|
|
5657
|
+
* Tiers for rating based on total usage quantities into the specified tier with
|
|
5658
|
+
* proration
|
|
5659
|
+
*/
|
|
5660
|
+
tiers: Array<TieredWithProrationConfig.Tier>;
|
|
5661
|
+
}
|
|
5662
|
+
namespace TieredWithProrationConfig {
|
|
5663
|
+
/**
|
|
5664
|
+
* Configuration for a single tiered with proration tier
|
|
5665
|
+
*/
|
|
5666
|
+
interface Tier {
|
|
5667
|
+
/**
|
|
5668
|
+
* Inclusive tier starting value
|
|
5669
|
+
*/
|
|
5670
|
+
tier_lower_bound: string;
|
|
5671
|
+
/**
|
|
5672
|
+
* Amount per unit
|
|
5673
|
+
*/
|
|
5674
|
+
unit_amount: string;
|
|
5675
|
+
}
|
|
5676
|
+
}
|
|
5677
|
+
}
|
|
5678
|
+
interface NewSubscriptionGroupedWithMinMaxThresholdsPrice {
|
|
5679
|
+
/**
|
|
5680
|
+
* The cadence to bill for this price on.
|
|
5681
|
+
*/
|
|
5682
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
5683
|
+
/**
|
|
5684
|
+
* Configuration for grouped_with_min_max_thresholds pricing
|
|
5685
|
+
*/
|
|
5686
|
+
grouped_with_min_max_thresholds_config: NewSubscriptionGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
|
|
5687
|
+
/**
|
|
5688
|
+
* The id of the item the price will be associated with.
|
|
5689
|
+
*/
|
|
5690
|
+
item_id: string;
|
|
5691
|
+
/**
|
|
5692
|
+
* The pricing model type
|
|
5693
|
+
*/
|
|
5694
|
+
model_type: 'grouped_with_min_max_thresholds';
|
|
5695
|
+
/**
|
|
5696
|
+
* The name of the price.
|
|
5697
|
+
*/
|
|
5698
|
+
name: string;
|
|
5699
|
+
/**
|
|
5700
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
5701
|
+
* usage-based.
|
|
5702
|
+
*/
|
|
5703
|
+
billable_metric_id?: string | null;
|
|
5704
|
+
/**
|
|
5705
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
5706
|
+
* this is true, and in-arrears if this is false.
|
|
5707
|
+
*/
|
|
5708
|
+
billed_in_advance?: boolean | null;
|
|
5709
|
+
/**
|
|
5710
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
5711
|
+
* months.
|
|
5712
|
+
*/
|
|
5713
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
5714
|
+
/**
|
|
5715
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
5716
|
+
*/
|
|
5717
|
+
conversion_rate?: number | null;
|
|
5718
|
+
/**
|
|
5719
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
5720
|
+
*/
|
|
5721
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
5722
|
+
/**
|
|
5723
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
5724
|
+
* price is billed.
|
|
5725
|
+
*/
|
|
5726
|
+
currency?: string | null;
|
|
5727
|
+
/**
|
|
5728
|
+
* For dimensional price: specifies a price group and dimension values
|
|
5729
|
+
*/
|
|
5730
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
5731
|
+
/**
|
|
5732
|
+
* An alias for the price.
|
|
5733
|
+
*/
|
|
5734
|
+
external_price_id?: string | null;
|
|
5735
|
+
/**
|
|
5736
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
5737
|
+
* applied.
|
|
5738
|
+
*/
|
|
5739
|
+
fixed_price_quantity?: number | null;
|
|
5740
|
+
/**
|
|
5741
|
+
* The property used to group this price on an invoice
|
|
5742
|
+
*/
|
|
5743
|
+
invoice_grouping_key?: string | null;
|
|
5744
|
+
/**
|
|
5745
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
5746
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
5747
|
+
*/
|
|
5748
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
5749
|
+
/**
|
|
5750
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
5751
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
5752
|
+
* by setting `metadata` to `null`.
|
|
5753
|
+
*/
|
|
5754
|
+
metadata?: {
|
|
5755
|
+
[key: string]: string | null;
|
|
5756
|
+
} | null;
|
|
5757
|
+
/**
|
|
5758
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
5759
|
+
* in the same API call.
|
|
5760
|
+
*/
|
|
5761
|
+
reference_id?: string | null;
|
|
5762
|
+
}
|
|
5763
|
+
namespace NewSubscriptionGroupedWithMinMaxThresholdsPrice {
|
|
5764
|
+
/**
|
|
5765
|
+
* Configuration for grouped_with_min_max_thresholds pricing
|
|
5766
|
+
*/
|
|
5767
|
+
interface GroupedWithMinMaxThresholdsConfig {
|
|
5768
|
+
/**
|
|
5769
|
+
* The event property used to group before applying thresholds
|
|
5770
|
+
*/
|
|
5771
|
+
grouping_key: string;
|
|
5772
|
+
/**
|
|
5773
|
+
* The maximum amount to charge each group
|
|
5774
|
+
*/
|
|
5775
|
+
maximum_charge: string;
|
|
5776
|
+
/**
|
|
5777
|
+
* The minimum amount to charge each group, regardless of usage
|
|
5778
|
+
*/
|
|
5779
|
+
minimum_charge: string;
|
|
5780
|
+
/**
|
|
5781
|
+
* The base price charged per group
|
|
5782
|
+
*/
|
|
5783
|
+
per_unit_rate: string;
|
|
5784
|
+
}
|
|
5785
|
+
}
|
|
5786
|
+
}
|
|
4326
5787
|
}
|
|
4327
5788
|
export interface SubscriptionTriggerPhaseParams {
|
|
4328
5789
|
/**
|
|
@@ -4381,6 +5842,6 @@ export interface SubscriptionUpdateTrialParams {
|
|
|
4381
5842
|
shift?: boolean;
|
|
4382
5843
|
}
|
|
4383
5844
|
export declare namespace Subscriptions {
|
|
4384
|
-
export { type DiscountOverride as DiscountOverride, type
|
|
5845
|
+
export { type DiscountOverride as DiscountOverride, type NewSubscriptionBulkPrice as NewSubscriptionBulkPrice, type NewSubscriptionBulkWithProrationPrice as NewSubscriptionBulkWithProrationPrice, type NewSubscriptionCumulativeGroupedBulkPrice as NewSubscriptionCumulativeGroupedBulkPrice, type NewSubscriptionGroupedAllocationPrice as NewSubscriptionGroupedAllocationPrice, type NewSubscriptionGroupedTieredPackagePrice as NewSubscriptionGroupedTieredPackagePrice, type NewSubscriptionGroupedTieredPrice as NewSubscriptionGroupedTieredPrice, type NewSubscriptionGroupedWithMeteredMinimumPrice as NewSubscriptionGroupedWithMeteredMinimumPrice, type NewSubscriptionGroupedWithProratedMinimumPrice as NewSubscriptionGroupedWithProratedMinimumPrice, type NewSubscriptionMatrixPrice as NewSubscriptionMatrixPrice, type NewSubscriptionMatrixWithAllocationPrice as NewSubscriptionMatrixWithAllocationPrice, type NewSubscriptionMatrixWithDisplayNamePrice as NewSubscriptionMatrixWithDisplayNamePrice, type NewSubscriptionMaxGroupTieredPackagePrice as NewSubscriptionMaxGroupTieredPackagePrice, type NewSubscriptionMinimumCompositePrice as NewSubscriptionMinimumCompositePrice, type NewSubscriptionPackagePrice as NewSubscriptionPackagePrice, type NewSubscriptionPackageWithAllocationPrice as NewSubscriptionPackageWithAllocationPrice, type NewSubscriptionScalableMatrixWithTieredPricingPrice as NewSubscriptionScalableMatrixWithTieredPricingPrice, type NewSubscriptionScalableMatrixWithUnitPricingPrice as NewSubscriptionScalableMatrixWithUnitPricingPrice, type NewSubscriptionThresholdTotalAmountPrice as NewSubscriptionThresholdTotalAmountPrice, type NewSubscriptionTieredPackagePrice as NewSubscriptionTieredPackagePrice, type NewSubscriptionTieredPackageWithMinimumPrice as NewSubscriptionTieredPackageWithMinimumPrice, type NewSubscriptionTieredPrice as NewSubscriptionTieredPrice, type NewSubscriptionTieredWithMinimumPrice as NewSubscriptionTieredWithMinimumPrice, type NewSubscriptionUnitPrice as NewSubscriptionUnitPrice, type NewSubscriptionUnitWithPercentPrice as NewSubscriptionUnitWithPercentPrice, type NewSubscriptionUnitWithProrationPrice as NewSubscriptionUnitWithProrationPrice, type Subscription as Subscription, type SubscriptionUsage as SubscriptionUsage, type Subscriptions as Subscriptions, type SubscriptionFetchCostsResponse as SubscriptionFetchCostsResponse, type SubscriptionFetchScheduleResponse as SubscriptionFetchScheduleResponse, SubscriptionsPage as SubscriptionsPage, SubscriptionFetchScheduleResponsesPage as SubscriptionFetchScheduleResponsesPage, type SubscriptionCreateParams as SubscriptionCreateParams, type SubscriptionUpdateParams as SubscriptionUpdateParams, type SubscriptionListParams as SubscriptionListParams, type SubscriptionCancelParams as SubscriptionCancelParams, type SubscriptionFetchCostsParams as SubscriptionFetchCostsParams, type SubscriptionFetchScheduleParams as SubscriptionFetchScheduleParams, type SubscriptionFetchUsageParams as SubscriptionFetchUsageParams, type SubscriptionPriceIntervalsParams as SubscriptionPriceIntervalsParams, type SubscriptionRedeemCouponParams as SubscriptionRedeemCouponParams, type SubscriptionSchedulePlanChangeParams as SubscriptionSchedulePlanChangeParams, type SubscriptionTriggerPhaseParams as SubscriptionTriggerPhaseParams, type SubscriptionUnscheduleFixedFeeQuantityUpdatesParams as SubscriptionUnscheduleFixedFeeQuantityUpdatesParams, type SubscriptionUpdateFixedFeeQuantityParams as SubscriptionUpdateFixedFeeQuantityParams, type SubscriptionUpdateTrialParams as SubscriptionUpdateTrialParams, };
|
|
4385
5846
|
}
|
|
4386
5847
|
//# sourceMappingURL=subscriptions.d.ts.map
|