orb-billing 2.2.0 → 2.4.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 +75 -0
- package/client.d.ts +222 -0
- package/client.d.ts.map +1 -0
- package/client.js +156 -0
- package/client.js.map +1 -0
- package/client.mjs +129 -0
- package/client.mjs.map +1 -0
- package/index.d.mts +5 -217
- package/index.d.ts +5 -217
- package/index.d.ts.map +1 -1
- package/index.js +10 -133
- package/index.js.map +1 -1
- package/index.mjs +5 -130
- package/index.mjs.map +1 -1
- package/package.json +4 -4
- package/resources/coupons/coupons.d.ts +3 -22
- package/resources/coupons/coupons.d.ts.map +1 -1
- package/resources/coupons/coupons.js.map +1 -1
- package/resources/coupons/coupons.mjs.map +1 -1
- package/resources/customers/costs.d.ts +4 -4
- package/resources/customers/costs.d.ts.map +1 -1
- package/resources/customers/costs.js.map +1 -1
- package/resources/customers/costs.mjs.map +1 -1
- package/resources/customers/credits/credits.d.ts +12 -4
- package/resources/customers/credits/credits.d.ts.map +1 -1
- package/resources/customers/credits/credits.js.map +1 -1
- package/resources/customers/credits/credits.mjs.map +1 -1
- package/resources/customers/credits/ledger.d.ts +16 -6
- 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/credits/top-ups.d.ts +38 -8
- package/resources/customers/credits/top-ups.d.ts.map +1 -1
- package/resources/customers/credits/top-ups.js.map +1 -1
- package/resources/customers/credits/top-ups.mjs.map +1 -1
- package/resources/customers/usage.d.ts +2 -2
- package/resources/customers/usage.d.ts.map +1 -1
- package/resources/customers/usage.js.map +1 -1
- package/resources/customers/usage.mjs.map +1 -1
- package/resources/events/backfills.d.ts +20 -0
- package/resources/events/backfills.d.ts.map +1 -1
- package/resources/events/backfills.js.map +1 -1
- package/resources/events/backfills.mjs.map +1 -1
- package/resources/index.d.ts +2 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -6
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -2
- package/resources/index.mjs.map +1 -1
- package/resources/invoices.d.ts +1 -1
- package/resources/invoices.js +1 -1
- package/resources/invoices.mjs +1 -1
- package/resources/plans/plans.d.ts +118 -1
- 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/index.d.ts +1 -1
- package/resources/prices/index.d.ts.map +1 -1
- package/resources/prices/index.js +3 -3
- package/resources/prices/index.js.map +1 -1
- package/resources/prices/index.mjs +1 -1
- package/resources/prices/index.mjs.map +1 -1
- package/resources/prices/prices.d.ts +236 -2
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/prices/prices.js +26 -0
- package/resources/prices/prices.js.map +1 -1
- package/resources/prices/prices.mjs +26 -0
- package/resources/prices/prices.mjs.map +1 -1
- package/resources/shared.d.ts +5 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/subscriptions.d.ts +353 -19
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +11 -0
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +11 -0
- package/resources/subscriptions.mjs.map +1 -1
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +4 -2
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +5 -3
- package/resources/webhooks.mjs.map +1 -1
- package/src/client.ts +301 -0
- package/src/index.ts +6 -297
- package/src/resources/coupons/coupons.ts +3 -26
- package/src/resources/customers/costs.ts +6 -6
- package/src/resources/customers/credits/credits.ts +16 -6
- package/src/resources/customers/credits/ledger.ts +20 -8
- package/src/resources/customers/credits/top-ups.ts +46 -10
- package/src/resources/customers/usage.ts +2 -2
- package/src/resources/events/backfills.ts +25 -0
- package/src/resources/index.ts +11 -2
- package/src/resources/invoices.ts +1 -1
- package/src/resources/plans/plans.ts +144 -1
- package/src/resources/prices/index.ts +10 -1
- package/src/resources/prices/prices.ts +333 -2
- package/src/resources/shared.ts +8 -0
- package/src/resources/subscriptions.ts +441 -23
- package/src/resources/webhooks.ts +5 -3
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/beta/beta.d.ts +0 -12
- package/resources/beta/beta.d.ts.map +0 -1
- package/resources/beta/beta.js +0 -40
- package/resources/beta/beta.js.map +0 -1
- package/resources/beta/beta.mjs +0 -13
- package/resources/beta/beta.mjs.map +0 -1
- package/resources/beta/index.d.ts +0 -3
- package/resources/beta/index.d.ts.map +0 -1
- package/resources/beta/index.js +0 -9
- package/resources/beta/index.js.map +0 -1
- package/resources/beta/index.mjs +0 -4
- package/resources/beta/index.mjs.map +0 -1
- package/resources/beta/price.d.ts +0 -82
- package/resources/beta/price.d.ts.map +0 -1
- package/resources/beta/price.js +0 -37
- package/resources/beta/price.js.map +0 -1
- package/resources/beta/price.mjs +0 -33
- package/resources/beta/price.mjs.map +0 -1
- package/src/resources/beta/beta.ts +0 -15
- package/src/resources/beta/index.ts +0 -4
- package/src/resources/beta/price.ts +0 -101
|
@@ -43,6 +43,37 @@ export class Prices extends APIResource {
|
|
|
43
43
|
return this._client.getAPIList('/prices', PricesPage, { query, ...options });
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
/**
|
|
47
|
+
* This endpoint is used to evaluate the output of a price for a given customer and
|
|
48
|
+
* time range. It enables filtering and grouping the output using
|
|
49
|
+
* [computed properties](../guides/extensibility/advanced-metrics#computed-properties),
|
|
50
|
+
* supporting the following workflows:
|
|
51
|
+
*
|
|
52
|
+
* 1. Showing detailed usage and costs to the end customer.
|
|
53
|
+
* 2. Auditing subtotals on invoice line items.
|
|
54
|
+
*
|
|
55
|
+
* For these workflows, the expressiveness of computed properties in both the
|
|
56
|
+
* filters and grouping is critical. For example, if you'd like to show your
|
|
57
|
+
* customer their usage grouped by hour and another property, you can do so with
|
|
58
|
+
* the following `grouping_keys`:
|
|
59
|
+
* `["hour_floor_timestamp_millis(timestamp_millis)", "my_property"]`. If you'd
|
|
60
|
+
* like to examine a customer's usage for a specific property value, you can do so
|
|
61
|
+
* with the following `filter`:
|
|
62
|
+
* `my_property = 'foo' AND my_other_property = 'bar'`.
|
|
63
|
+
*
|
|
64
|
+
* By default, the start of the time range must be no more than 100 days ago and
|
|
65
|
+
* the length of the results must be no greater than 1000. Note that this is a POST
|
|
66
|
+
* endpoint rather than a GET endpoint because it employs a JSON body rather than
|
|
67
|
+
* query parameters.
|
|
68
|
+
*/
|
|
69
|
+
evaluate(
|
|
70
|
+
priceId: string,
|
|
71
|
+
body: PriceEvaluateParams,
|
|
72
|
+
options?: Core.RequestOptions,
|
|
73
|
+
): Core.APIPromise<PriceEvaluateResponse> {
|
|
74
|
+
return this._client.post(`/prices/${priceId}/evaluate`, { body, ...options });
|
|
75
|
+
}
|
|
76
|
+
|
|
46
77
|
/**
|
|
47
78
|
* This endpoint returns a price given an identifier.
|
|
48
79
|
*/
|
|
@@ -53,6 +84,23 @@ export class Prices extends APIResource {
|
|
|
53
84
|
|
|
54
85
|
export class PricesPage extends Page<Price> {}
|
|
55
86
|
|
|
87
|
+
export interface EvaluatePriceGroup {
|
|
88
|
+
/**
|
|
89
|
+
* The price's output for the group
|
|
90
|
+
*/
|
|
91
|
+
amount: string;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* The values for the group in the order specified by `grouping_keys`
|
|
95
|
+
*/
|
|
96
|
+
grouping_values: Array<string | number | boolean>;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* The price's usage quantity for the group
|
|
100
|
+
*/
|
|
101
|
+
quantity: number;
|
|
102
|
+
}
|
|
103
|
+
|
|
56
104
|
/**
|
|
57
105
|
* The Price resource represents a price that can be billed on a subscription,
|
|
58
106
|
* resulting in a charge on an invoice in the form of an invoice line item. Prices
|
|
@@ -312,8 +360,12 @@ export namespace Price {
|
|
|
312
360
|
|
|
313
361
|
cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
|
|
314
362
|
|
|
363
|
+
conversion_rate: number | null;
|
|
364
|
+
|
|
315
365
|
created_at: string;
|
|
316
366
|
|
|
367
|
+
credit_allocation: UnitPrice.CreditAllocation | null;
|
|
368
|
+
|
|
317
369
|
currency: string;
|
|
318
370
|
|
|
319
371
|
discount: Shared.Discount | null;
|
|
@@ -348,6 +400,12 @@ export namespace Price {
|
|
|
348
400
|
id: string;
|
|
349
401
|
}
|
|
350
402
|
|
|
403
|
+
export interface CreditAllocation {
|
|
404
|
+
allows_rollover: boolean;
|
|
405
|
+
|
|
406
|
+
currency: string;
|
|
407
|
+
}
|
|
408
|
+
|
|
351
409
|
export interface Item {
|
|
352
410
|
id: string;
|
|
353
411
|
|
|
@@ -395,8 +453,12 @@ export namespace Price {
|
|
|
395
453
|
|
|
396
454
|
cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
|
|
397
455
|
|
|
456
|
+
conversion_rate: number | null;
|
|
457
|
+
|
|
398
458
|
created_at: string;
|
|
399
459
|
|
|
460
|
+
credit_allocation: PackagePrice.CreditAllocation | null;
|
|
461
|
+
|
|
400
462
|
currency: string;
|
|
401
463
|
|
|
402
464
|
discount: Shared.Discount | null;
|
|
@@ -431,6 +493,12 @@ export namespace Price {
|
|
|
431
493
|
id: string;
|
|
432
494
|
}
|
|
433
495
|
|
|
496
|
+
export interface CreditAllocation {
|
|
497
|
+
allows_rollover: boolean;
|
|
498
|
+
|
|
499
|
+
currency: string;
|
|
500
|
+
}
|
|
501
|
+
|
|
434
502
|
export interface Item {
|
|
435
503
|
id: string;
|
|
436
504
|
|
|
@@ -473,7 +541,7 @@ export namespace Price {
|
|
|
473
541
|
* An integer amount to represent package size. For example, 1000 here would divide
|
|
474
542
|
* usage by 1000 before multiplying by package_amount in rating
|
|
475
543
|
*/
|
|
476
|
-
package_size
|
|
544
|
+
package_size: number;
|
|
477
545
|
}
|
|
478
546
|
}
|
|
479
547
|
|
|
@@ -484,8 +552,12 @@ export namespace Price {
|
|
|
484
552
|
|
|
485
553
|
cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
|
|
486
554
|
|
|
555
|
+
conversion_rate: number | null;
|
|
556
|
+
|
|
487
557
|
created_at: string;
|
|
488
558
|
|
|
559
|
+
credit_allocation: MatrixPrice.CreditAllocation | null;
|
|
560
|
+
|
|
489
561
|
currency: string;
|
|
490
562
|
|
|
491
563
|
discount: Shared.Discount | null;
|
|
@@ -520,6 +592,12 @@ export namespace Price {
|
|
|
520
592
|
id: string;
|
|
521
593
|
}
|
|
522
594
|
|
|
595
|
+
export interface CreditAllocation {
|
|
596
|
+
allows_rollover: boolean;
|
|
597
|
+
|
|
598
|
+
currency: string;
|
|
599
|
+
}
|
|
600
|
+
|
|
523
601
|
export interface Item {
|
|
524
602
|
id: string;
|
|
525
603
|
|
|
@@ -593,8 +671,12 @@ export namespace Price {
|
|
|
593
671
|
|
|
594
672
|
cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
|
|
595
673
|
|
|
674
|
+
conversion_rate: number | null;
|
|
675
|
+
|
|
596
676
|
created_at: string;
|
|
597
677
|
|
|
678
|
+
credit_allocation: TieredPrice.CreditAllocation | null;
|
|
679
|
+
|
|
598
680
|
currency: string;
|
|
599
681
|
|
|
600
682
|
discount: Shared.Discount | null;
|
|
@@ -629,6 +711,12 @@ export namespace Price {
|
|
|
629
711
|
id: string;
|
|
630
712
|
}
|
|
631
713
|
|
|
714
|
+
export interface CreditAllocation {
|
|
715
|
+
allows_rollover: boolean;
|
|
716
|
+
|
|
717
|
+
currency: string;
|
|
718
|
+
}
|
|
719
|
+
|
|
632
720
|
export interface Item {
|
|
633
721
|
id: string;
|
|
634
722
|
|
|
@@ -695,8 +783,12 @@ export namespace Price {
|
|
|
695
783
|
|
|
696
784
|
cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
|
|
697
785
|
|
|
786
|
+
conversion_rate: number | null;
|
|
787
|
+
|
|
698
788
|
created_at: string;
|
|
699
789
|
|
|
790
|
+
credit_allocation: TieredBpsPrice.CreditAllocation | null;
|
|
791
|
+
|
|
700
792
|
currency: string;
|
|
701
793
|
|
|
702
794
|
discount: Shared.Discount | null;
|
|
@@ -731,6 +823,12 @@ export namespace Price {
|
|
|
731
823
|
id: string;
|
|
732
824
|
}
|
|
733
825
|
|
|
826
|
+
export interface CreditAllocation {
|
|
827
|
+
allows_rollover: boolean;
|
|
828
|
+
|
|
829
|
+
currency: string;
|
|
830
|
+
}
|
|
831
|
+
|
|
734
832
|
export interface Item {
|
|
735
833
|
id: string;
|
|
736
834
|
|
|
@@ -805,8 +903,12 @@ export namespace Price {
|
|
|
805
903
|
|
|
806
904
|
cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
|
|
807
905
|
|
|
906
|
+
conversion_rate: number | null;
|
|
907
|
+
|
|
808
908
|
created_at: string;
|
|
809
909
|
|
|
910
|
+
credit_allocation: BpsPrice.CreditAllocation | null;
|
|
911
|
+
|
|
810
912
|
currency: string;
|
|
811
913
|
|
|
812
914
|
discount: Shared.Discount | null;
|
|
@@ -851,6 +953,12 @@ export namespace Price {
|
|
|
851
953
|
per_unit_maximum?: string | null;
|
|
852
954
|
}
|
|
853
955
|
|
|
956
|
+
export interface CreditAllocation {
|
|
957
|
+
allows_rollover: boolean;
|
|
958
|
+
|
|
959
|
+
currency: string;
|
|
960
|
+
}
|
|
961
|
+
|
|
854
962
|
export interface Item {
|
|
855
963
|
id: string;
|
|
856
964
|
|
|
@@ -893,8 +1001,12 @@ export namespace Price {
|
|
|
893
1001
|
|
|
894
1002
|
cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
|
|
895
1003
|
|
|
1004
|
+
conversion_rate: number | null;
|
|
1005
|
+
|
|
896
1006
|
created_at: string;
|
|
897
1007
|
|
|
1008
|
+
credit_allocation: BulkBpsPrice.CreditAllocation | null;
|
|
1009
|
+
|
|
898
1010
|
currency: string;
|
|
899
1011
|
|
|
900
1012
|
discount: Shared.Discount | null;
|
|
@@ -954,6 +1066,12 @@ export namespace Price {
|
|
|
954
1066
|
}
|
|
955
1067
|
}
|
|
956
1068
|
|
|
1069
|
+
export interface CreditAllocation {
|
|
1070
|
+
allows_rollover: boolean;
|
|
1071
|
+
|
|
1072
|
+
currency: string;
|
|
1073
|
+
}
|
|
1074
|
+
|
|
957
1075
|
export interface Item {
|
|
958
1076
|
id: string;
|
|
959
1077
|
|
|
@@ -996,8 +1114,12 @@ export namespace Price {
|
|
|
996
1114
|
|
|
997
1115
|
cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
|
|
998
1116
|
|
|
1117
|
+
conversion_rate: number | null;
|
|
1118
|
+
|
|
999
1119
|
created_at: string;
|
|
1000
1120
|
|
|
1121
|
+
credit_allocation: BulkPrice.CreditAllocation | null;
|
|
1122
|
+
|
|
1001
1123
|
currency: string;
|
|
1002
1124
|
|
|
1003
1125
|
discount: Shared.Discount | null;
|
|
@@ -1051,6 +1173,12 @@ export namespace Price {
|
|
|
1051
1173
|
}
|
|
1052
1174
|
}
|
|
1053
1175
|
|
|
1176
|
+
export interface CreditAllocation {
|
|
1177
|
+
allows_rollover: boolean;
|
|
1178
|
+
|
|
1179
|
+
currency: string;
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1054
1182
|
export interface Item {
|
|
1055
1183
|
id: string;
|
|
1056
1184
|
|
|
@@ -1091,8 +1219,12 @@ export namespace Price {
|
|
|
1091
1219
|
|
|
1092
1220
|
cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
|
|
1093
1221
|
|
|
1222
|
+
conversion_rate: number | null;
|
|
1223
|
+
|
|
1094
1224
|
created_at: string;
|
|
1095
1225
|
|
|
1226
|
+
credit_allocation: ThresholdTotalAmountPrice.CreditAllocation | null;
|
|
1227
|
+
|
|
1096
1228
|
currency: string;
|
|
1097
1229
|
|
|
1098
1230
|
discount: Shared.Discount | null;
|
|
@@ -1127,6 +1259,12 @@ export namespace Price {
|
|
|
1127
1259
|
id: string;
|
|
1128
1260
|
}
|
|
1129
1261
|
|
|
1262
|
+
export interface CreditAllocation {
|
|
1263
|
+
allows_rollover: boolean;
|
|
1264
|
+
|
|
1265
|
+
currency: string;
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1130
1268
|
export interface Item {
|
|
1131
1269
|
id: string;
|
|
1132
1270
|
|
|
@@ -1167,8 +1305,12 @@ export namespace Price {
|
|
|
1167
1305
|
|
|
1168
1306
|
cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
|
|
1169
1307
|
|
|
1308
|
+
conversion_rate: number | null;
|
|
1309
|
+
|
|
1170
1310
|
created_at: string;
|
|
1171
1311
|
|
|
1312
|
+
credit_allocation: TieredPackagePrice.CreditAllocation | null;
|
|
1313
|
+
|
|
1172
1314
|
currency: string;
|
|
1173
1315
|
|
|
1174
1316
|
discount: Shared.Discount | null;
|
|
@@ -1203,6 +1345,12 @@ export namespace Price {
|
|
|
1203
1345
|
id: string;
|
|
1204
1346
|
}
|
|
1205
1347
|
|
|
1348
|
+
export interface CreditAllocation {
|
|
1349
|
+
allows_rollover: boolean;
|
|
1350
|
+
|
|
1351
|
+
currency: string;
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1206
1354
|
export interface Item {
|
|
1207
1355
|
id: string;
|
|
1208
1356
|
|
|
@@ -1243,8 +1391,12 @@ export namespace Price {
|
|
|
1243
1391
|
|
|
1244
1392
|
cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
|
|
1245
1393
|
|
|
1394
|
+
conversion_rate: number | null;
|
|
1395
|
+
|
|
1246
1396
|
created_at: string;
|
|
1247
1397
|
|
|
1398
|
+
credit_allocation: GroupedTieredPrice.CreditAllocation | null;
|
|
1399
|
+
|
|
1248
1400
|
currency: string;
|
|
1249
1401
|
|
|
1250
1402
|
discount: Shared.Discount | null;
|
|
@@ -1279,6 +1431,12 @@ export namespace Price {
|
|
|
1279
1431
|
id: string;
|
|
1280
1432
|
}
|
|
1281
1433
|
|
|
1434
|
+
export interface CreditAllocation {
|
|
1435
|
+
allows_rollover: boolean;
|
|
1436
|
+
|
|
1437
|
+
currency: string;
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1282
1440
|
export interface Item {
|
|
1283
1441
|
id: string;
|
|
1284
1442
|
|
|
@@ -1319,8 +1477,12 @@ export namespace Price {
|
|
|
1319
1477
|
|
|
1320
1478
|
cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
|
|
1321
1479
|
|
|
1480
|
+
conversion_rate: number | null;
|
|
1481
|
+
|
|
1322
1482
|
created_at: string;
|
|
1323
1483
|
|
|
1484
|
+
credit_allocation: TieredWithMinimumPrice.CreditAllocation | null;
|
|
1485
|
+
|
|
1324
1486
|
currency: string;
|
|
1325
1487
|
|
|
1326
1488
|
discount: Shared.Discount | null;
|
|
@@ -1355,6 +1517,12 @@ export namespace Price {
|
|
|
1355
1517
|
id: string;
|
|
1356
1518
|
}
|
|
1357
1519
|
|
|
1520
|
+
export interface CreditAllocation {
|
|
1521
|
+
allows_rollover: boolean;
|
|
1522
|
+
|
|
1523
|
+
currency: string;
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1358
1526
|
export interface Item {
|
|
1359
1527
|
id: string;
|
|
1360
1528
|
|
|
@@ -1395,8 +1563,12 @@ export namespace Price {
|
|
|
1395
1563
|
|
|
1396
1564
|
cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
|
|
1397
1565
|
|
|
1566
|
+
conversion_rate: number | null;
|
|
1567
|
+
|
|
1398
1568
|
created_at: string;
|
|
1399
1569
|
|
|
1570
|
+
credit_allocation: TieredPackageWithMinimumPrice.CreditAllocation | null;
|
|
1571
|
+
|
|
1400
1572
|
currency: string;
|
|
1401
1573
|
|
|
1402
1574
|
discount: Shared.Discount | null;
|
|
@@ -1431,6 +1603,12 @@ export namespace Price {
|
|
|
1431
1603
|
id: string;
|
|
1432
1604
|
}
|
|
1433
1605
|
|
|
1606
|
+
export interface CreditAllocation {
|
|
1607
|
+
allows_rollover: boolean;
|
|
1608
|
+
|
|
1609
|
+
currency: string;
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1434
1612
|
export interface Item {
|
|
1435
1613
|
id: string;
|
|
1436
1614
|
|
|
@@ -1471,8 +1649,12 @@ export namespace Price {
|
|
|
1471
1649
|
|
|
1472
1650
|
cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
|
|
1473
1651
|
|
|
1652
|
+
conversion_rate: number | null;
|
|
1653
|
+
|
|
1474
1654
|
created_at: string;
|
|
1475
1655
|
|
|
1656
|
+
credit_allocation: PackageWithAllocationPrice.CreditAllocation | null;
|
|
1657
|
+
|
|
1476
1658
|
currency: string;
|
|
1477
1659
|
|
|
1478
1660
|
discount: Shared.Discount | null;
|
|
@@ -1507,6 +1689,12 @@ export namespace Price {
|
|
|
1507
1689
|
id: string;
|
|
1508
1690
|
}
|
|
1509
1691
|
|
|
1692
|
+
export interface CreditAllocation {
|
|
1693
|
+
allows_rollover: boolean;
|
|
1694
|
+
|
|
1695
|
+
currency: string;
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1510
1698
|
export interface Item {
|
|
1511
1699
|
id: string;
|
|
1512
1700
|
|
|
@@ -1547,8 +1735,12 @@ export namespace Price {
|
|
|
1547
1735
|
|
|
1548
1736
|
cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
|
|
1549
1737
|
|
|
1738
|
+
conversion_rate: number | null;
|
|
1739
|
+
|
|
1550
1740
|
created_at: string;
|
|
1551
1741
|
|
|
1742
|
+
credit_allocation: UnitWithPercentPrice.CreditAllocation | null;
|
|
1743
|
+
|
|
1552
1744
|
currency: string;
|
|
1553
1745
|
|
|
1554
1746
|
discount: Shared.Discount | null;
|
|
@@ -1583,6 +1775,12 @@ export namespace Price {
|
|
|
1583
1775
|
id: string;
|
|
1584
1776
|
}
|
|
1585
1777
|
|
|
1778
|
+
export interface CreditAllocation {
|
|
1779
|
+
allows_rollover: boolean;
|
|
1780
|
+
|
|
1781
|
+
currency: string;
|
|
1782
|
+
}
|
|
1783
|
+
|
|
1586
1784
|
export interface Item {
|
|
1587
1785
|
id: string;
|
|
1588
1786
|
|
|
@@ -1623,8 +1821,12 @@ export namespace Price {
|
|
|
1623
1821
|
|
|
1624
1822
|
cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
|
|
1625
1823
|
|
|
1824
|
+
conversion_rate: number | null;
|
|
1825
|
+
|
|
1626
1826
|
created_at: string;
|
|
1627
1827
|
|
|
1828
|
+
credit_allocation: MatrixWithAllocationPrice.CreditAllocation | null;
|
|
1829
|
+
|
|
1628
1830
|
currency: string;
|
|
1629
1831
|
|
|
1630
1832
|
discount: Shared.Discount | null;
|
|
@@ -1659,6 +1861,12 @@ export namespace Price {
|
|
|
1659
1861
|
id: string;
|
|
1660
1862
|
}
|
|
1661
1863
|
|
|
1864
|
+
export interface CreditAllocation {
|
|
1865
|
+
allows_rollover: boolean;
|
|
1866
|
+
|
|
1867
|
+
currency: string;
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1662
1870
|
export interface Item {
|
|
1663
1871
|
id: string;
|
|
1664
1872
|
|
|
@@ -1731,6 +1939,10 @@ export namespace Price {
|
|
|
1731
1939
|
}
|
|
1732
1940
|
}
|
|
1733
1941
|
|
|
1942
|
+
export interface PriceEvaluateResponse {
|
|
1943
|
+
data: Array<EvaluatePriceGroup>;
|
|
1944
|
+
}
|
|
1945
|
+
|
|
1734
1946
|
export type PriceCreateParams =
|
|
1735
1947
|
| PriceCreateParams.NewFloatingUnitPrice
|
|
1736
1948
|
| PriceCreateParams.NewFloatingPackagePrice
|
|
@@ -1787,6 +1999,11 @@ export namespace PriceCreateParams {
|
|
|
1787
1999
|
*/
|
|
1788
2000
|
billed_in_advance?: boolean | null;
|
|
1789
2001
|
|
|
2002
|
+
/**
|
|
2003
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
2004
|
+
*/
|
|
2005
|
+
conversion_rate?: number | null;
|
|
2006
|
+
|
|
1790
2007
|
/**
|
|
1791
2008
|
* An alias for the price.
|
|
1792
2009
|
*/
|
|
@@ -1850,6 +2067,11 @@ export namespace PriceCreateParams {
|
|
|
1850
2067
|
*/
|
|
1851
2068
|
billed_in_advance?: boolean | null;
|
|
1852
2069
|
|
|
2070
|
+
/**
|
|
2071
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
2072
|
+
*/
|
|
2073
|
+
conversion_rate?: number | null;
|
|
2074
|
+
|
|
1853
2075
|
/**
|
|
1854
2076
|
* An alias for the price.
|
|
1855
2077
|
*/
|
|
@@ -1878,7 +2100,7 @@ export namespace PriceCreateParams {
|
|
|
1878
2100
|
* An integer amount to represent package size. For example, 1000 here would divide
|
|
1879
2101
|
* usage by 1000 before multiplying by package_amount in rating
|
|
1880
2102
|
*/
|
|
1881
|
-
package_size
|
|
2103
|
+
package_size: number;
|
|
1882
2104
|
}
|
|
1883
2105
|
}
|
|
1884
2106
|
|
|
@@ -1919,6 +2141,11 @@ export namespace PriceCreateParams {
|
|
|
1919
2141
|
*/
|
|
1920
2142
|
billed_in_advance?: boolean | null;
|
|
1921
2143
|
|
|
2144
|
+
/**
|
|
2145
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
2146
|
+
*/
|
|
2147
|
+
conversion_rate?: number | null;
|
|
2148
|
+
|
|
1922
2149
|
/**
|
|
1923
2150
|
* An alias for the price.
|
|
1924
2151
|
*/
|
|
@@ -2008,6 +2235,11 @@ export namespace PriceCreateParams {
|
|
|
2008
2235
|
*/
|
|
2009
2236
|
billed_in_advance?: boolean | null;
|
|
2010
2237
|
|
|
2238
|
+
/**
|
|
2239
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
2240
|
+
*/
|
|
2241
|
+
conversion_rate?: number | null;
|
|
2242
|
+
|
|
2011
2243
|
/**
|
|
2012
2244
|
* An alias for the price.
|
|
2013
2245
|
*/
|
|
@@ -2102,6 +2334,11 @@ export namespace PriceCreateParams {
|
|
|
2102
2334
|
*/
|
|
2103
2335
|
billed_in_advance?: boolean | null;
|
|
2104
2336
|
|
|
2337
|
+
/**
|
|
2338
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
2339
|
+
*/
|
|
2340
|
+
conversion_rate?: number | null;
|
|
2341
|
+
|
|
2105
2342
|
/**
|
|
2106
2343
|
* An alias for the price.
|
|
2107
2344
|
*/
|
|
@@ -2184,6 +2421,11 @@ export namespace PriceCreateParams {
|
|
|
2184
2421
|
*/
|
|
2185
2422
|
billed_in_advance?: boolean | null;
|
|
2186
2423
|
|
|
2424
|
+
/**
|
|
2425
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
2426
|
+
*/
|
|
2427
|
+
conversion_rate?: number | null;
|
|
2428
|
+
|
|
2187
2429
|
/**
|
|
2188
2430
|
* An alias for the price.
|
|
2189
2431
|
*/
|
|
@@ -2272,6 +2514,11 @@ export namespace PriceCreateParams {
|
|
|
2272
2514
|
*/
|
|
2273
2515
|
billed_in_advance?: boolean | null;
|
|
2274
2516
|
|
|
2517
|
+
/**
|
|
2518
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
2519
|
+
*/
|
|
2520
|
+
conversion_rate?: number | null;
|
|
2521
|
+
|
|
2275
2522
|
/**
|
|
2276
2523
|
* An alias for the price.
|
|
2277
2524
|
*/
|
|
@@ -2340,6 +2587,11 @@ export namespace PriceCreateParams {
|
|
|
2340
2587
|
*/
|
|
2341
2588
|
billed_in_advance?: boolean | null;
|
|
2342
2589
|
|
|
2590
|
+
/**
|
|
2591
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
2592
|
+
*/
|
|
2593
|
+
conversion_rate?: number | null;
|
|
2594
|
+
|
|
2343
2595
|
/**
|
|
2344
2596
|
* An alias for the price.
|
|
2345
2597
|
*/
|
|
@@ -2423,6 +2675,11 @@ export namespace PriceCreateParams {
|
|
|
2423
2675
|
*/
|
|
2424
2676
|
billed_in_advance?: boolean | null;
|
|
2425
2677
|
|
|
2678
|
+
/**
|
|
2679
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
2680
|
+
*/
|
|
2681
|
+
conversion_rate?: number | null;
|
|
2682
|
+
|
|
2426
2683
|
/**
|
|
2427
2684
|
* An alias for the price.
|
|
2428
2685
|
*/
|
|
@@ -2500,6 +2757,11 @@ export namespace PriceCreateParams {
|
|
|
2500
2757
|
*/
|
|
2501
2758
|
billed_in_advance?: boolean | null;
|
|
2502
2759
|
|
|
2760
|
+
/**
|
|
2761
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
2762
|
+
*/
|
|
2763
|
+
conversion_rate?: number | null;
|
|
2764
|
+
|
|
2503
2765
|
/**
|
|
2504
2766
|
* An alias for the price.
|
|
2505
2767
|
*/
|
|
@@ -2554,6 +2816,11 @@ export namespace PriceCreateParams {
|
|
|
2554
2816
|
*/
|
|
2555
2817
|
billed_in_advance?: boolean | null;
|
|
2556
2818
|
|
|
2819
|
+
/**
|
|
2820
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
2821
|
+
*/
|
|
2822
|
+
conversion_rate?: number | null;
|
|
2823
|
+
|
|
2557
2824
|
/**
|
|
2558
2825
|
* An alias for the price.
|
|
2559
2826
|
*/
|
|
@@ -2608,6 +2875,11 @@ export namespace PriceCreateParams {
|
|
|
2608
2875
|
*/
|
|
2609
2876
|
billed_in_advance?: boolean | null;
|
|
2610
2877
|
|
|
2878
|
+
/**
|
|
2879
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
2880
|
+
*/
|
|
2881
|
+
conversion_rate?: number | null;
|
|
2882
|
+
|
|
2611
2883
|
/**
|
|
2612
2884
|
* An alias for the price.
|
|
2613
2885
|
*/
|
|
@@ -2662,6 +2934,11 @@ export namespace PriceCreateParams {
|
|
|
2662
2934
|
*/
|
|
2663
2935
|
billed_in_advance?: boolean | null;
|
|
2664
2936
|
|
|
2937
|
+
/**
|
|
2938
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
2939
|
+
*/
|
|
2940
|
+
conversion_rate?: number | null;
|
|
2941
|
+
|
|
2665
2942
|
/**
|
|
2666
2943
|
* An alias for the price.
|
|
2667
2944
|
*/
|
|
@@ -2716,6 +2993,11 @@ export namespace PriceCreateParams {
|
|
|
2716
2993
|
*/
|
|
2717
2994
|
billed_in_advance?: boolean | null;
|
|
2718
2995
|
|
|
2996
|
+
/**
|
|
2997
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
2998
|
+
*/
|
|
2999
|
+
conversion_rate?: number | null;
|
|
3000
|
+
|
|
2719
3001
|
/**
|
|
2720
3002
|
* An alias for the price.
|
|
2721
3003
|
*/
|
|
@@ -2770,6 +3052,11 @@ export namespace PriceCreateParams {
|
|
|
2770
3052
|
*/
|
|
2771
3053
|
billed_in_advance?: boolean | null;
|
|
2772
3054
|
|
|
3055
|
+
/**
|
|
3056
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
3057
|
+
*/
|
|
3058
|
+
conversion_rate?: number | null;
|
|
3059
|
+
|
|
2773
3060
|
/**
|
|
2774
3061
|
* An alias for the price.
|
|
2775
3062
|
*/
|
|
@@ -2824,6 +3111,11 @@ export namespace PriceCreateParams {
|
|
|
2824
3111
|
*/
|
|
2825
3112
|
billed_in_advance?: boolean | null;
|
|
2826
3113
|
|
|
3114
|
+
/**
|
|
3115
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
3116
|
+
*/
|
|
3117
|
+
conversion_rate?: number | null;
|
|
3118
|
+
|
|
2827
3119
|
/**
|
|
2828
3120
|
* An alias for the price.
|
|
2829
3121
|
*/
|
|
@@ -2844,10 +3136,49 @@ export namespace PriceCreateParams {
|
|
|
2844
3136
|
|
|
2845
3137
|
export interface PriceListParams extends PageParams {}
|
|
2846
3138
|
|
|
3139
|
+
export interface PriceEvaluateParams {
|
|
3140
|
+
/**
|
|
3141
|
+
* The exclusive upper bound for event timestamps
|
|
3142
|
+
*/
|
|
3143
|
+
timeframe_end: string;
|
|
3144
|
+
|
|
3145
|
+
/**
|
|
3146
|
+
* The inclusive lower bound for event timestamps
|
|
3147
|
+
*/
|
|
3148
|
+
timeframe_start: string;
|
|
3149
|
+
|
|
3150
|
+
/**
|
|
3151
|
+
* The ID of the customer to which this evaluation is scoped.
|
|
3152
|
+
*/
|
|
3153
|
+
customer_id?: string | null;
|
|
3154
|
+
|
|
3155
|
+
/**
|
|
3156
|
+
* The external customer ID of the customer to which this evaluation is scoped.
|
|
3157
|
+
*/
|
|
3158
|
+
external_customer_id?: string | null;
|
|
3159
|
+
|
|
3160
|
+
/**
|
|
3161
|
+
* A boolean
|
|
3162
|
+
* [computed property](../guides/extensibility/advanced-metrics#computed-properties)
|
|
3163
|
+
* used to filter the underlying billable metric
|
|
3164
|
+
*/
|
|
3165
|
+
filter?: string | null;
|
|
3166
|
+
|
|
3167
|
+
/**
|
|
3168
|
+
* Properties (or
|
|
3169
|
+
* [computed properties](../guides/extensibility/advanced-metrics#computed-properties))
|
|
3170
|
+
* used to group the underlying billable metric
|
|
3171
|
+
*/
|
|
3172
|
+
grouping_keys?: Array<string>;
|
|
3173
|
+
}
|
|
3174
|
+
|
|
2847
3175
|
export namespace Prices {
|
|
3176
|
+
export import EvaluatePriceGroup = PricesAPI.EvaluatePriceGroup;
|
|
2848
3177
|
export import Price = PricesAPI.Price;
|
|
3178
|
+
export import PriceEvaluateResponse = PricesAPI.PriceEvaluateResponse;
|
|
2849
3179
|
export import PricesPage = PricesAPI.PricesPage;
|
|
2850
3180
|
export import PriceCreateParams = PricesAPI.PriceCreateParams;
|
|
2851
3181
|
export import PriceListParams = PricesAPI.PriceListParams;
|
|
3182
|
+
export import PriceEvaluateParams = PricesAPI.PriceEvaluateParams;
|
|
2852
3183
|
export import ExternalPriceID = ExternalPriceIDAPI.ExternalPriceID;
|
|
2853
3184
|
}
|