orb-billing 4.72.3 → 4.74.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 +30 -0
- package/README.md +18 -30
- package/index.d.mts +7 -4
- package/index.d.ts +7 -4
- package/index.d.ts.map +1 -1
- package/index.js +3 -0
- package/index.js.map +1 -1
- package/index.mjs +3 -0
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/alerts.d.ts +18 -0
- package/resources/alerts.d.ts.map +1 -1
- package/resources/alerts.js.map +1 -1
- package/resources/alerts.mjs.map +1 -1
- package/resources/beta/beta.d.ts +7492 -0
- package/resources/beta/beta.d.ts.map +1 -0
- package/resources/beta/beta.js +67 -0
- package/resources/beta/beta.js.map +1 -0
- package/resources/beta/beta.mjs +40 -0
- package/resources/beta/beta.mjs.map +1 -0
- package/resources/beta/external-plan-id.d.ts +7218 -0
- package/resources/beta/external-plan-id.d.ts.map +1 -0
- package/resources/beta/external-plan-id.js +40 -0
- package/resources/beta/external-plan-id.js.map +1 -0
- package/resources/beta/external-plan-id.mjs +36 -0
- package/resources/beta/external-plan-id.mjs.map +1 -0
- package/resources/beta/index.d.ts +3 -0
- package/resources/beta/index.d.ts.map +1 -0
- package/resources/beta/index.js +9 -0
- package/resources/beta/index.js.map +1 -0
- package/resources/beta/index.mjs +4 -0
- package/resources/beta/index.mjs.map +1 -0
- package/resources/beta.d.ts +2 -0
- package/resources/beta.d.ts.map +1 -0
- package/resources/beta.js +19 -0
- package/resources/beta.js.map +1 -0
- package/resources/beta.mjs +3 -0
- package/resources/beta.mjs.map +1 -0
- package/resources/credit-notes.d.ts +4 -4
- package/resources/credit-notes.d.ts.map +1 -1
- package/resources/customers/balance-transactions.d.ts +0 -7
- 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 +17 -0
- 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 +26 -14
- 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/customers.d.ts +16 -7
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js +1 -4
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs +1 -4
- 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/events.d.ts +3 -3
- package/resources/events/events.d.ts.map +1 -1
- package/resources/index.d.ts +3 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/invoice-line-items.d.ts +150 -10
- package/resources/invoice-line-items.d.ts.map +1 -1
- package/resources/invoices.d.ts +388 -28
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs.map +1 -1
- package/resources/items.d.ts +23 -0
- package/resources/items.d.ts.map +1 -1
- package/resources/items.js +6 -0
- package/resources/items.js.map +1 -1
- package/resources/items.mjs +6 -0
- package/resources/items.mjs.map +1 -1
- package/resources/plans/external-plan-id.d.ts +1 -1
- package/resources/plans/external-plan-id.js +1 -1
- package/resources/plans/external-plan-id.mjs +1 -1
- package/resources/plans/plans.d.ts +1153 -22
- package/resources/plans/plans.d.ts.map +1 -1
- package/resources/plans/plans.js +1 -1
- package/resources/plans/plans.js.map +1 -1
- package/resources/plans/plans.mjs +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.map +1 -1
- package/resources/prices/index.mjs.map +1 -1
- package/resources/prices/prices.d.ts +6180 -123
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/prices/prices.js +40 -1
- package/resources/prices/prices.js.map +1 -1
- package/resources/prices/prices.mjs +40 -1
- package/resources/prices/prices.mjs.map +1 -1
- package/resources/shared.d.ts +14 -14
- package/resources/shared.d.ts.map +1 -1
- package/resources/subscription-changes.d.ts +648 -87
- package/resources/subscription-changes.d.ts.map +1 -1
- package/resources/subscriptions.d.ts +10981 -3716
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +6 -0
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +6 -0
- package/resources/subscriptions.mjs.map +1 -1
- package/src/index.ts +25 -0
- package/src/resources/alerts.ts +21 -0
- package/src/resources/beta/beta.ts +9106 -0
- package/src/resources/beta/external-plan-id.ts +8748 -0
- package/src/resources/beta/index.ts +14 -0
- package/src/resources/beta.ts +3 -0
- package/src/resources/credit-notes.ts +4 -4
- package/src/resources/customers/balance-transactions.ts +0 -7
- package/src/resources/customers/credits/ledger.ts +21 -0
- package/src/resources/customers/credits/top-ups.ts +26 -14
- package/src/resources/customers/customers.ts +22 -4
- package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +1 -1
- package/src/resources/events/events.ts +3 -3
- package/src/resources/index.ts +11 -0
- package/src/resources/invoice-line-items.ts +178 -10
- package/src/resources/invoices.ts +460 -28
- package/src/resources/items.ts +29 -0
- package/src/resources/plans/external-plan-id.ts +1 -1
- package/src/resources/plans/plans.ts +1375 -30
- package/src/resources/prices/index.ts +2 -0
- package/src/resources/prices/prices.ts +7345 -135
- package/src/resources/shared.ts +18 -18
- package/src/resources/subscription-changes.ts +771 -102
- package/src/resources/subscriptions.ts +13383 -4686
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -37,7 +37,7 @@ class Prices extends resource_1.APIResource {
|
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
39
|
* This endpoint is used to create a [price](/product-catalog/price-configuration).
|
|
40
|
-
* A price created using this endpoint is always an add-on, meaning that it
|
|
40
|
+
* A price created using this endpoint is always an add-on, meaning that it's not
|
|
41
41
|
* associated with a specific plan and can instead be individually added to
|
|
42
42
|
* subscriptions, including subscriptions on different plans.
|
|
43
43
|
*
|
|
@@ -65,6 +65,10 @@ class Prices extends resource_1.APIResource {
|
|
|
65
65
|
return this._client.getAPIList('/prices', PricesPage, { query, ...options });
|
|
66
66
|
}
|
|
67
67
|
/**
|
|
68
|
+
* [NOTE] It is recommended to use the `/v1/prices/evaluate` which offers further
|
|
69
|
+
* functionality, such as multiple prices, inline price definitions, and querying
|
|
70
|
+
* over preview events.
|
|
71
|
+
*
|
|
68
72
|
* This endpoint is used to evaluate the output of a price for a given customer and
|
|
69
73
|
* time range. It enables filtering and grouping the output using
|
|
70
74
|
* [computed properties](/extensibility/advanced-metrics#computed-properties),
|
|
@@ -90,6 +94,41 @@ class Prices extends resource_1.APIResource {
|
|
|
90
94
|
evaluate(priceId, body, options) {
|
|
91
95
|
return this._client.post(`/prices/${priceId}/evaluate`, { body, ...options });
|
|
92
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* This endpoint is used to evaluate the output of price(s) for a given customer
|
|
99
|
+
* and time range over either ingested events or preview events. It enables
|
|
100
|
+
* filtering and grouping the output using
|
|
101
|
+
* [computed properties](/extensibility/advanced-metrics#computed-properties),
|
|
102
|
+
* supporting the following workflows:
|
|
103
|
+
*
|
|
104
|
+
* 1. Showing detailed usage and costs to the end customer.
|
|
105
|
+
* 2. Auditing subtotals on invoice line items.
|
|
106
|
+
*
|
|
107
|
+
* Prices may either reference existing prices in your Orb account or be defined
|
|
108
|
+
* inline in the request body. Up to 100 prices can be evaluated in a single
|
|
109
|
+
* request.
|
|
110
|
+
*
|
|
111
|
+
* Price evaluation by default uses ingested events, but you can also provide a
|
|
112
|
+
* list of preview events to use instead. Up to 500 preview events can be provided
|
|
113
|
+
* in a single request. When using ingested events, the start of the time range
|
|
114
|
+
* must be no more than 100 days ago.
|
|
115
|
+
*
|
|
116
|
+
* For these workflows, the expressiveness of computed properties in both the
|
|
117
|
+
* filters and grouping is critical. For example, if you'd like to show your
|
|
118
|
+
* customer their usage grouped by hour and another property, you can do so with
|
|
119
|
+
* the following `grouping_keys`:
|
|
120
|
+
* `["hour_floor_timestamp_millis(timestamp_millis)", "my_property"]`. If you'd
|
|
121
|
+
* like to examine a customer's usage for a specific property value, you can do so
|
|
122
|
+
* with the following `filter`:
|
|
123
|
+
* `my_property = 'foo' AND my_other_property = 'bar'`.
|
|
124
|
+
*
|
|
125
|
+
* The length of the results must be no greater than 1000. Note that this is a POST
|
|
126
|
+
* endpoint rather than a GET endpoint because it employs a JSON body rather than
|
|
127
|
+
* query parameters.
|
|
128
|
+
*/
|
|
129
|
+
evaluateMultiple(body, options) {
|
|
130
|
+
return this._client.post('/prices/evaluate', { body, ...options });
|
|
131
|
+
}
|
|
93
132
|
/**
|
|
94
133
|
* This endpoint returns a price given an identifier.
|
|
95
134
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prices.js","sourceRoot":"","sources":["../../src/resources/prices/prices.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,gDAA6C;AAC7C,wCAA8C;
|
|
1
|
+
{"version":3,"file":"prices.js","sourceRoot":"","sources":["../../src/resources/prices/prices.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,gDAA6C;AAC7C,wCAA8C;AAI9C,2EAA0D;AAC1D,8DAAmF;AACnF,oDAAyD;AAEzD,MAAa,MAAO,SAAQ,sBAAW;IAAvC;;QACE,oBAAe,GAAuC,IAAI,kBAAkB,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,C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C,WAAW,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;CACF;AA5HD,wBA4HC;AAED,MAAa,UAAW,SAAQ,iBAAW;CAAG;AAA9C,gCAA8C;AAw1b9C,MAAM,CAAC,UAAU,GAAG,UAAU,CAAC;AAC/B,MAAM,CAAC,eAAe,GAAG,mCAAe,CAAC"}
|
|
@@ -11,7 +11,7 @@ export class Prices extends APIResource {
|
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* This endpoint is used to create a [price](/product-catalog/price-configuration).
|
|
14
|
-
* A price created using this endpoint is always an add-on, meaning that it
|
|
14
|
+
* A price created using this endpoint is always an add-on, meaning that it's not
|
|
15
15
|
* associated with a specific plan and can instead be individually added to
|
|
16
16
|
* subscriptions, including subscriptions on different plans.
|
|
17
17
|
*
|
|
@@ -39,6 +39,10 @@ export class Prices extends APIResource {
|
|
|
39
39
|
return this._client.getAPIList('/prices', PricesPage, { query, ...options });
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
|
+
* [NOTE] It is recommended to use the `/v1/prices/evaluate` which offers further
|
|
43
|
+
* functionality, such as multiple prices, inline price definitions, and querying
|
|
44
|
+
* over preview events.
|
|
45
|
+
*
|
|
42
46
|
* This endpoint is used to evaluate the output of a price for a given customer and
|
|
43
47
|
* time range. It enables filtering and grouping the output using
|
|
44
48
|
* [computed properties](/extensibility/advanced-metrics#computed-properties),
|
|
@@ -64,6 +68,41 @@ export class Prices extends APIResource {
|
|
|
64
68
|
evaluate(priceId, body, options) {
|
|
65
69
|
return this._client.post(`/prices/${priceId}/evaluate`, { body, ...options });
|
|
66
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* This endpoint is used to evaluate the output of price(s) for a given customer
|
|
73
|
+
* and time range over either ingested events or preview events. It enables
|
|
74
|
+
* filtering and grouping the output using
|
|
75
|
+
* [computed properties](/extensibility/advanced-metrics#computed-properties),
|
|
76
|
+
* supporting the following workflows:
|
|
77
|
+
*
|
|
78
|
+
* 1. Showing detailed usage and costs to the end customer.
|
|
79
|
+
* 2. Auditing subtotals on invoice line items.
|
|
80
|
+
*
|
|
81
|
+
* Prices may either reference existing prices in your Orb account or be defined
|
|
82
|
+
* inline in the request body. Up to 100 prices can be evaluated in a single
|
|
83
|
+
* request.
|
|
84
|
+
*
|
|
85
|
+
* Price evaluation by default uses ingested events, but you can also provide a
|
|
86
|
+
* list of preview events to use instead. Up to 500 preview events can be provided
|
|
87
|
+
* in a single request. When using ingested events, the start of the time range
|
|
88
|
+
* must be no more than 100 days ago.
|
|
89
|
+
*
|
|
90
|
+
* For these workflows, the expressiveness of computed properties in both the
|
|
91
|
+
* filters and grouping is critical. For example, if you'd like to show your
|
|
92
|
+
* customer their usage grouped by hour and another property, you can do so with
|
|
93
|
+
* the following `grouping_keys`:
|
|
94
|
+
* `["hour_floor_timestamp_millis(timestamp_millis)", "my_property"]`. If you'd
|
|
95
|
+
* like to examine a customer's usage for a specific property value, you can do so
|
|
96
|
+
* with the following `filter`:
|
|
97
|
+
* `my_property = 'foo' AND my_other_property = 'bar'`.
|
|
98
|
+
*
|
|
99
|
+
* The length of the results must be no greater than 1000. Note that this is a POST
|
|
100
|
+
* endpoint rather than a GET endpoint because it employs a JSON body rather than
|
|
101
|
+
* query parameters.
|
|
102
|
+
*/
|
|
103
|
+
evaluateMultiple(body, options) {
|
|
104
|
+
return this._client.post('/prices/evaluate', { body, ...options });
|
|
105
|
+
}
|
|
67
106
|
/**
|
|
68
107
|
* This endpoint returns a price given an identifier.
|
|
69
108
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prices.mjs","sourceRoot":"","sources":["../../src/resources/prices/prices.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;
|
|
1
|
+
{"version":3,"file":"prices.mjs","sourceRoot":"","sources":["../../src/resources/prices/prices.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WA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OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,OAAe,EAAE,OAA6B;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;CACF;AAED,MAAM,OAAO,UAAW,SAAQ,IAAW;CAAG;AAw1b9C,MAAM,CAAC,UAAU,GAAG,UAAU,CAAC;AAC/B,MAAM,CAAC,eAAe,GAAG,eAAe,CAAC"}
|
package/resources/shared.d.ts
CHANGED
|
@@ -3,12 +3,12 @@ export interface AmountDiscount {
|
|
|
3
3
|
* Only available if discount_type is `amount`.
|
|
4
4
|
*/
|
|
5
5
|
amount_discount: string;
|
|
6
|
+
discount_type: 'amount';
|
|
6
7
|
/**
|
|
7
8
|
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
8
9
|
* this can be a subset of prices.
|
|
9
10
|
*/
|
|
10
|
-
applies_to_price_ids
|
|
11
|
-
discount_type: 'amount';
|
|
11
|
+
applies_to_price_ids?: Array<string> | null;
|
|
12
12
|
reason?: string | null;
|
|
13
13
|
}
|
|
14
14
|
export type BillingCycleRelativeDate = 'start_of_term' | 'end_of_term';
|
|
@@ -19,26 +19,26 @@ export interface PaginationMetadata {
|
|
|
19
19
|
next_cursor: string | null;
|
|
20
20
|
}
|
|
21
21
|
export interface PercentageDiscount {
|
|
22
|
-
/**
|
|
23
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
24
|
-
* this can be a subset of prices.
|
|
25
|
-
*/
|
|
26
|
-
applies_to_price_ids: Array<string>;
|
|
27
22
|
discount_type: 'percentage';
|
|
28
23
|
/**
|
|
29
24
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
30
25
|
* and 1.
|
|
31
26
|
*/
|
|
32
27
|
percentage_discount: number;
|
|
28
|
+
/**
|
|
29
|
+
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
30
|
+
* this can be a subset of prices.
|
|
31
|
+
*/
|
|
32
|
+
applies_to_price_ids?: Array<string> | null;
|
|
33
33
|
reason?: string | null;
|
|
34
34
|
}
|
|
35
35
|
export interface TrialDiscount {
|
|
36
|
+
discount_type: 'trial';
|
|
36
37
|
/**
|
|
37
38
|
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
38
39
|
* this can be a subset of prices.
|
|
39
40
|
*/
|
|
40
|
-
applies_to_price_ids
|
|
41
|
-
discount_type: 'trial';
|
|
41
|
+
applies_to_price_ids?: Array<string> | null;
|
|
42
42
|
reason?: string | null;
|
|
43
43
|
/**
|
|
44
44
|
* Only available if discount_type is `trial`
|
|
@@ -50,17 +50,17 @@ export interface TrialDiscount {
|
|
|
50
50
|
trial_percentage_discount?: number | null;
|
|
51
51
|
}
|
|
52
52
|
export interface UsageDiscount {
|
|
53
|
-
/**
|
|
54
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
55
|
-
* this can be a subset of prices.
|
|
56
|
-
*/
|
|
57
|
-
applies_to_price_ids: Array<string>;
|
|
58
53
|
discount_type: 'usage';
|
|
59
54
|
/**
|
|
60
55
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
61
56
|
* discount is for
|
|
62
57
|
*/
|
|
63
58
|
usage_discount: number;
|
|
59
|
+
/**
|
|
60
|
+
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
61
|
+
* this can be a subset of prices.
|
|
62
|
+
*/
|
|
63
|
+
applies_to_price_ids?: Array<string> | null;
|
|
64
64
|
reason?: string | null;
|
|
65
65
|
}
|
|
66
66
|
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,cAAc;IAC7B;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