orb-billing 4.33.0 → 4.47.1
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 +175 -0
- package/LICENSE +1 -1
- package/README.md +10 -1
- package/core.d.ts +4 -5
- package/core.d.ts.map +1 -1
- package/core.js +16 -11
- package/core.js.map +1 -1
- package/core.mjs +16 -11
- package/core.mjs.map +1 -1
- package/error.d.ts +30 -36
- package/error.d.ts.map +1 -1
- package/error.js +24 -43
- package/error.js.map +1 -1
- package/error.mjs +24 -43
- package/error.mjs.map +1 -1
- package/index.d.mts +43 -109
- package/index.d.ts +43 -109
- package/index.d.ts.map +1 -1
- package/index.js +71 -33
- package/index.js.map +1 -1
- package/index.mjs +43 -32
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/alerts.d.ts +58 -19
- package/resources/alerts.d.ts.map +1 -1
- package/resources/alerts.js +19 -37
- package/resources/alerts.js.map +1 -1
- package/resources/alerts.mjs +19 -14
- package/resources/alerts.mjs.map +1 -1
- package/resources/coupons/coupons.d.ts +3 -7
- package/resources/coupons/coupons.d.ts.map +1 -1
- package/resources/coupons/coupons.js +3 -5
- package/resources/coupons/coupons.js.map +1 -1
- package/resources/coupons/coupons.mjs +3 -5
- package/resources/coupons/coupons.mjs.map +1 -1
- package/resources/coupons/index.d.ts +2 -2
- package/resources/coupons/index.d.ts.map +1 -1
- package/resources/coupons/index.js.map +1 -1
- package/resources/coupons/index.mjs.map +1 -1
- package/resources/coupons/subscriptions.d.ts +1 -2
- package/resources/coupons/subscriptions.d.ts.map +1 -1
- package/resources/coupons/subscriptions.js +0 -2
- package/resources/coupons/subscriptions.js.map +1 -1
- package/resources/coupons/subscriptions.mjs +0 -2
- package/resources/coupons/subscriptions.mjs.map +1 -1
- package/resources/credit-notes.d.ts +29 -4
- package/resources/credit-notes.d.ts.map +1 -1
- package/resources/credit-notes.js +8 -27
- package/resources/credit-notes.js.map +1 -1
- package/resources/credit-notes.mjs +8 -4
- package/resources/credit-notes.mjs.map +1 -1
- package/resources/customers/balance-transactions.d.ts +1 -6
- package/resources/customers/balance-transactions.d.ts.map +1 -1
- package/resources/customers/balance-transactions.js +1 -27
- package/resources/customers/balance-transactions.js.map +1 -1
- package/resources/customers/balance-transactions.mjs +1 -4
- package/resources/customers/balance-transactions.mjs.map +1 -1
- package/resources/customers/costs.d.ts +1 -5
- package/resources/customers/costs.d.ts.map +1 -1
- package/resources/customers/costs.js +0 -2
- package/resources/customers/costs.js.map +1 -1
- package/resources/customers/costs.mjs +0 -2
- package/resources/customers/costs.mjs.map +1 -1
- package/resources/customers/credits/credits.d.ts +15 -31
- package/resources/customers/credits/credits.d.ts.map +1 -1
- package/resources/customers/credits/credits.js +10 -11
- package/resources/customers/credits/credits.js.map +1 -1
- package/resources/customers/credits/credits.mjs +10 -11
- package/resources/customers/credits/credits.mjs.map +1 -1
- package/resources/customers/credits/index.d.ts +3 -3
- package/resources/customers/credits/index.d.ts.map +1 -1
- package/resources/customers/credits/index.js.map +1 -1
- package/resources/customers/credits/index.mjs.map +1 -1
- package/resources/customers/credits/ledger.d.ts +15 -23
- package/resources/customers/credits/ledger.d.ts.map +1 -1
- package/resources/customers/credits/ledger.js +12 -36
- package/resources/customers/credits/ledger.js.map +1 -1
- package/resources/customers/credits/ledger.mjs +12 -13
- package/resources/customers/credits/ledger.mjs.map +1 -1
- package/resources/customers/credits/top-ups.d.ts +1 -11
- package/resources/customers/credits/top-ups.d.ts.map +1 -1
- package/resources/customers/credits/top-ups.js +2 -28
- package/resources/customers/credits/top-ups.js.map +1 -1
- package/resources/customers/credits/top-ups.mjs +2 -5
- package/resources/customers/credits/top-ups.mjs.map +1 -1
- package/resources/customers/customers.d.ts +7 -25
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js +10 -10
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs +10 -10
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/customers/index.d.ts +4 -4
- package/resources/customers/index.d.ts.map +1 -1
- package/resources/customers/index.js.map +1 -1
- package/resources/customers/index.mjs.map +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.d.ts +90 -0
- package/resources/dimensional-price-groups/dimensional-price-groups.d.ts.map +1 -0
- package/resources/dimensional-price-groups/dimensional-price-groups.js +73 -0
- package/resources/dimensional-price-groups/dimensional-price-groups.js.map +1 -0
- package/resources/dimensional-price-groups/dimensional-price-groups.mjs +45 -0
- package/resources/dimensional-price-groups/dimensional-price-groups.mjs.map +1 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts +10 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts.map +1 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.js +15 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.js.map +1 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs +11 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs.map +1 -0
- package/resources/dimensional-price-groups/index.d.ts +3 -0
- package/resources/dimensional-price-groups/index.d.ts.map +1 -0
- package/resources/dimensional-price-groups/index.js +9 -0
- package/resources/dimensional-price-groups/index.js.map +1 -0
- package/resources/dimensional-price-groups/index.mjs +4 -0
- package/resources/dimensional-price-groups/index.mjs.map +1 -0
- package/resources/events/backfills.d.ts +5 -11
- package/resources/events/backfills.d.ts.map +1 -1
- package/resources/events/backfills.js +5 -29
- package/resources/events/backfills.js.map +1 -1
- package/resources/events/backfills.mjs +5 -6
- package/resources/events/backfills.mjs.map +1 -1
- package/resources/events/events.d.ts +7 -22
- package/resources/events/events.d.ts.map +1 -1
- package/resources/events/events.js +7 -7
- package/resources/events/events.js.map +1 -1
- package/resources/events/events.mjs +7 -7
- package/resources/events/events.mjs.map +1 -1
- package/resources/events/index.d.ts +3 -3
- package/resources/events/index.d.ts.map +1 -1
- package/resources/events/index.js.map +1 -1
- package/resources/events/index.mjs.map +1 -1
- package/resources/events/volume.d.ts +1 -3
- package/resources/events/volume.d.ts.map +1 -1
- package/resources/events/volume.js +0 -2
- package/resources/events/volume.js.map +1 -1
- package/resources/events/volume.mjs +0 -2
- package/resources/events/volume.mjs.map +1 -1
- package/resources/index.d.ts +14 -13
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +10 -7
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +8 -7
- package/resources/index.mjs.map +1 -1
- package/resources/invoice-line-items.d.ts +1 -3
- package/resources/invoice-line-items.d.ts.map +1 -1
- package/resources/invoice-line-items.js +0 -2
- package/resources/invoice-line-items.js.map +1 -1
- package/resources/invoice-line-items.mjs +0 -2
- package/resources/invoice-line-items.mjs.map +1 -1
- package/resources/invoices.d.ts +78 -13
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +8 -27
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +8 -4
- package/resources/invoices.mjs.map +1 -1
- package/resources/items.d.ts +1 -6
- package/resources/items.d.ts.map +1 -1
- package/resources/items.js +1 -27
- package/resources/items.js.map +1 -1
- package/resources/items.mjs +1 -4
- package/resources/items.mjs.map +1 -1
- package/resources/metrics.d.ts +1 -6
- package/resources/metrics.d.ts.map +1 -1
- package/resources/metrics.js +1 -27
- package/resources/metrics.js.map +1 -1
- package/resources/metrics.mjs +1 -4
- package/resources/metrics.mjs.map +1 -1
- package/resources/plans/external-plan-id.d.ts +1 -2
- package/resources/plans/external-plan-id.d.ts.map +1 -1
- package/resources/plans/external-plan-id.js +0 -2
- package/resources/plans/external-plan-id.js.map +1 -1
- package/resources/plans/external-plan-id.mjs +0 -2
- package/resources/plans/external-plan-id.mjs.map +1 -1
- package/resources/plans/index.d.ts +2 -2
- package/resources/plans/index.d.ts.map +1 -1
- package/resources/plans/index.js.map +1 -1
- package/resources/plans/index.mjs +1 -1
- package/resources/plans/index.mjs.map +1 -1
- package/resources/plans/plans.d.ts +331 -9
- package/resources/plans/plans.d.ts.map +1 -1
- package/resources/plans/plans.js +3 -5
- package/resources/plans/plans.js.map +1 -1
- package/resources/plans/plans.mjs +3 -5
- package/resources/plans/plans.mjs.map +1 -1
- package/resources/prices/external-price-id.d.ts +1 -2
- package/resources/prices/external-price-id.d.ts.map +1 -1
- package/resources/prices/external-price-id.js +0 -2
- package/resources/prices/external-price-id.js.map +1 -1
- package/resources/prices/external-price-id.mjs +0 -2
- package/resources/prices/external-price-id.mjs.map +1 -1
- package/resources/prices/index.d.ts +2 -2
- 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 +339 -13
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/prices/prices.js +3 -5
- package/resources/prices/prices.js.map +1 -1
- package/resources/prices/prices.mjs +3 -5
- package/resources/prices/prices.mjs.map +1 -1
- package/resources/subscriptions.d.ts +7629 -191
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +2 -29
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +2 -6
- package/resources/subscriptions.mjs.map +1 -1
- package/resources/top-level.d.ts +1 -2
- package/resources/top-level.d.ts.map +1 -1
- package/resources/top-level.js +0 -2
- package/resources/top-level.js.map +1 -1
- package/resources/top-level.mjs +0 -2
- package/resources/top-level.mjs.map +1 -1
- package/src/core.ts +23 -19
- package/src/error.ts +82 -125
- package/src/index.ts +334 -130
- package/src/resources/alerts.ts +117 -24
- package/src/resources/coupons/coupons.ts +13 -8
- package/src/resources/coupons/index.ts +2 -2
- package/src/resources/coupons/subscriptions.ts +2 -3
- package/src/resources/credit-notes.ts +45 -5
- package/src/resources/customers/balance-transactions.ts +10 -7
- package/src/resources/customers/costs.ts +7 -6
- package/src/resources/customers/credits/credits.ts +82 -32
- package/src/resources/customers/credits/index.ts +20 -20
- package/src/resources/customers/credits/ledger.ts +30 -24
- package/src/resources/customers/credits/top-ups.ts +16 -12
- package/src/resources/customers/customers.ts +68 -26
- package/src/resources/customers/index.ts +17 -17
- package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +146 -0
- package/src/resources/dimensional-price-groups/external-dimensional-price-group-id.ts +20 -0
- package/src/resources/dimensional-price-groups/index.ts +10 -0
- package/src/resources/events/backfills.ts +17 -12
- package/src/resources/events/events.ts +42 -23
- package/src/resources/events/index.ts +15 -15
- package/src/resources/events/volume.ts +2 -4
- package/src/resources/index.ts +113 -67
- package/src/resources/invoice-line-items.ts +5 -4
- package/src/resources/invoices.ts +108 -14
- package/src/resources/items.ts +10 -7
- package/src/resources/metrics.ts +10 -7
- package/src/resources/plans/external-plan-id.ts +2 -3
- package/src/resources/plans/index.ts +9 -2
- package/src/resources/plans/plans.ts +424 -9
- package/src/resources/prices/external-price-id.ts +2 -3
- package/src/resources/prices/index.ts +8 -8
- package/src/resources/prices/prices.ts +470 -14
- package/src/resources/subscriptions.ts +9231 -400
- package/src/resources/top-level.ts +2 -3
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
export {
|
|
4
|
-
BalanceTransactionCreateResponse,
|
|
5
|
-
BalanceTransactionListResponse,
|
|
6
|
-
BalanceTransactionCreateParams,
|
|
7
|
-
BalanceTransactionListParams,
|
|
8
4
|
BalanceTransactionListResponsesPage,
|
|
9
5
|
BalanceTransactions,
|
|
6
|
+
type BalanceTransactionCreateResponse,
|
|
7
|
+
type BalanceTransactionListResponse,
|
|
8
|
+
type BalanceTransactionCreateParams,
|
|
9
|
+
type BalanceTransactionListParams,
|
|
10
10
|
} from './balance-transactions';
|
|
11
11
|
export {
|
|
12
|
-
CostListResponse,
|
|
13
|
-
CostListByExternalIDResponse,
|
|
14
|
-
CostListParams,
|
|
15
|
-
CostListByExternalIDParams,
|
|
16
12
|
Costs,
|
|
13
|
+
type CostListResponse,
|
|
14
|
+
type CostListByExternalIDResponse,
|
|
15
|
+
type CostListParams,
|
|
16
|
+
type CostListByExternalIDParams,
|
|
17
17
|
} from './costs';
|
|
18
18
|
export {
|
|
19
|
-
CreditListResponse,
|
|
20
|
-
CreditListByExternalIDResponse,
|
|
21
|
-
CreditListParams,
|
|
22
|
-
CreditListByExternalIDParams,
|
|
23
19
|
CreditListResponsesPage,
|
|
24
20
|
CreditListByExternalIDResponsesPage,
|
|
25
21
|
Credits,
|
|
22
|
+
type CreditListResponse,
|
|
23
|
+
type CreditListByExternalIDResponse,
|
|
24
|
+
type CreditListParams,
|
|
25
|
+
type CreditListByExternalIDParams,
|
|
26
26
|
} from './credits/index';
|
|
27
27
|
export {
|
|
28
|
-
Customer,
|
|
29
|
-
CustomerCreateParams,
|
|
30
|
-
CustomerUpdateParams,
|
|
31
|
-
CustomerListParams,
|
|
32
|
-
CustomerUpdateByExternalIDParams,
|
|
33
28
|
CustomersPage,
|
|
34
29
|
Customers,
|
|
30
|
+
type Customer,
|
|
31
|
+
type CustomerCreateParams,
|
|
32
|
+
type CustomerUpdateParams,
|
|
33
|
+
type CustomerListParams,
|
|
34
|
+
type CustomerUpdateByExternalIDParams,
|
|
35
35
|
} from './customers';
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import { isRequestOptions } from '../../core';
|
|
5
|
+
import * as Core from '../../core';
|
|
6
|
+
import * as Shared from '../shared';
|
|
7
|
+
import * as ExternalDimensionalPriceGroupIDAPI from './external-dimensional-price-group-id';
|
|
8
|
+
import { ExternalDimensionalPriceGroupID } from './external-dimensional-price-group-id';
|
|
9
|
+
import { Page, type PageParams } from '../../pagination';
|
|
10
|
+
|
|
11
|
+
export class DimensionalPriceGroups extends APIResource {
|
|
12
|
+
externalDimensionalPriceGroupId: ExternalDimensionalPriceGroupIDAPI.ExternalDimensionalPriceGroupID =
|
|
13
|
+
new ExternalDimensionalPriceGroupIDAPI.ExternalDimensionalPriceGroupID(this._client);
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* A dimensional price group is used to partition the result of a billable metric
|
|
17
|
+
* by a set of dimensions. Prices in a price group must specify the parition used
|
|
18
|
+
* to derive their usage.
|
|
19
|
+
*
|
|
20
|
+
* For example, suppose we have a billable metric that measures the number of
|
|
21
|
+
* widgets used and we want to charge differently depending on the color of the
|
|
22
|
+
* widget. We can create a price group with a dimension "color" and two prices: one
|
|
23
|
+
* that charges $10 per red widget and one that charges $20 per blue widget.
|
|
24
|
+
*/
|
|
25
|
+
create(
|
|
26
|
+
body: DimensionalPriceGroupCreateParams,
|
|
27
|
+
options?: Core.RequestOptions,
|
|
28
|
+
): Core.APIPromise<DimensionalPriceGroup> {
|
|
29
|
+
return this._client.post('/dimensional_price_groups', { body, ...options });
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Fetch dimensional price group
|
|
34
|
+
*/
|
|
35
|
+
retrieve(
|
|
36
|
+
dimensionalPriceGroupId: string,
|
|
37
|
+
options?: Core.RequestOptions,
|
|
38
|
+
): Core.APIPromise<DimensionalPriceGroup> {
|
|
39
|
+
return this._client.get(`/dimensional_price_groups/${dimensionalPriceGroupId}`, options);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* List dimensional price groups
|
|
44
|
+
*/
|
|
45
|
+
list(
|
|
46
|
+
query?: DimensionalPriceGroupListParams,
|
|
47
|
+
options?: Core.RequestOptions,
|
|
48
|
+
): Core.PagePromise<DimensionalPriceGroupsPage, DimensionalPriceGroup>;
|
|
49
|
+
list(options?: Core.RequestOptions): Core.PagePromise<DimensionalPriceGroupsPage, DimensionalPriceGroup>;
|
|
50
|
+
list(
|
|
51
|
+
query: DimensionalPriceGroupListParams | Core.RequestOptions = {},
|
|
52
|
+
options?: Core.RequestOptions,
|
|
53
|
+
): Core.PagePromise<DimensionalPriceGroupsPage, DimensionalPriceGroup> {
|
|
54
|
+
if (isRequestOptions(query)) {
|
|
55
|
+
return this.list({}, query);
|
|
56
|
+
}
|
|
57
|
+
return this._client.getAPIList('/dimensional_price_groups', DimensionalPriceGroupsPage, {
|
|
58
|
+
query,
|
|
59
|
+
...options,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export class DimensionalPriceGroupsPage extends Page<DimensionalPriceGroup> {}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* A dimensional price group is used to partition the result of a billable metric
|
|
68
|
+
* by a set of dimensions. Prices in a price group must specify the parition used
|
|
69
|
+
* to derive their usage.
|
|
70
|
+
*/
|
|
71
|
+
export interface DimensionalPriceGroup {
|
|
72
|
+
id: string;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* The billable metric associated with this dimensional price group. All prices
|
|
76
|
+
* associated with this dimensional price group will be computed using this
|
|
77
|
+
* billable metric.
|
|
78
|
+
*/
|
|
79
|
+
billable_metric_id: string;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* The dimensions that this dimensional price group is defined over
|
|
83
|
+
*/
|
|
84
|
+
dimensions: Array<string>;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* An alias for the dimensional price group
|
|
88
|
+
*/
|
|
89
|
+
external_dimensional_price_group_id: string | null;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
93
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
94
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
95
|
+
* `null`.
|
|
96
|
+
*/
|
|
97
|
+
metadata: Record<string, string>;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* The name of the dimensional price group
|
|
101
|
+
*/
|
|
102
|
+
name: string;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface DimensionalPriceGroups {
|
|
106
|
+
data: Array<DimensionalPriceGroup>;
|
|
107
|
+
|
|
108
|
+
pagination_metadata: Shared.PaginationMetadata;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface DimensionalPriceGroupCreateParams {
|
|
112
|
+
billable_metric_id: string;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* The set of keys (in order) used to disambiguate prices in the group.
|
|
116
|
+
*/
|
|
117
|
+
dimensions: Array<string>;
|
|
118
|
+
|
|
119
|
+
name: string;
|
|
120
|
+
|
|
121
|
+
external_dimensional_price_group_id?: string | null;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
125
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
126
|
+
* by setting `metadata` to `null`.
|
|
127
|
+
*/
|
|
128
|
+
metadata?: Record<string, string | null> | null;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export interface DimensionalPriceGroupListParams extends PageParams {}
|
|
132
|
+
|
|
133
|
+
DimensionalPriceGroups.DimensionalPriceGroupsPage = DimensionalPriceGroupsPage;
|
|
134
|
+
DimensionalPriceGroups.ExternalDimensionalPriceGroupID = ExternalDimensionalPriceGroupID;
|
|
135
|
+
|
|
136
|
+
export declare namespace DimensionalPriceGroups {
|
|
137
|
+
export {
|
|
138
|
+
type DimensionalPriceGroup as DimensionalPriceGroup,
|
|
139
|
+
type DimensionalPriceGroups as DimensionalPriceGroups,
|
|
140
|
+
DimensionalPriceGroupsPage as DimensionalPriceGroupsPage,
|
|
141
|
+
type DimensionalPriceGroupCreateParams as DimensionalPriceGroupCreateParams,
|
|
142
|
+
type DimensionalPriceGroupListParams as DimensionalPriceGroupListParams,
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export { ExternalDimensionalPriceGroupID as ExternalDimensionalPriceGroupID };
|
|
146
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import * as Core from '../../core';
|
|
5
|
+
import * as DimensionalPriceGroupsAPI from './dimensional-price-groups';
|
|
6
|
+
|
|
7
|
+
export class ExternalDimensionalPriceGroupID extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Fetch dimensional price group by external ID
|
|
10
|
+
*/
|
|
11
|
+
retrieve(
|
|
12
|
+
externalDimensionalPriceGroupId: string,
|
|
13
|
+
options?: Core.RequestOptions,
|
|
14
|
+
): Core.APIPromise<DimensionalPriceGroupsAPI.DimensionalPriceGroup> {
|
|
15
|
+
return this._client.get(
|
|
16
|
+
`/dimensional_price_groups/external_dimensional_price_group_id/${externalDimensionalPriceGroupId}`,
|
|
17
|
+
options,
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
DimensionalPriceGroupsPage,
|
|
5
|
+
type DimensionalPriceGroups,
|
|
6
|
+
type DimensionalPriceGroup,
|
|
7
|
+
type DimensionalPriceGroupCreateParams,
|
|
8
|
+
type DimensionalPriceGroupListParams,
|
|
9
|
+
} from './dimensional-price-groups';
|
|
10
|
+
export { ExternalDimensionalPriceGroupID } from './external-dimensional-price-group-id';
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import { APIResource } from '../../resource';
|
|
4
4
|
import { isRequestOptions } from '../../core';
|
|
5
5
|
import * as Core from '../../core';
|
|
6
|
-
import * as BackfillsAPI from './backfills';
|
|
7
6
|
import { Page, type PageParams } from '../../pagination';
|
|
8
7
|
|
|
9
8
|
export class Backfills extends APIResource {
|
|
@@ -38,8 +37,10 @@ export class Backfills extends APIResource {
|
|
|
38
37
|
* only affect events for that customer. If neither is specified, the backfill will
|
|
39
38
|
* affect all customers.
|
|
40
39
|
*
|
|
41
|
-
* When `replace_existing_events` is `true`,
|
|
42
|
-
*
|
|
40
|
+
* When `replace_existing_events` is `true`, this indicates that existing events in
|
|
41
|
+
* the timeframe should no longer be counted towards invoiced usage. In this
|
|
42
|
+
* scenario, the parameter `filter` can be optionally added which enables filtering
|
|
43
|
+
* using
|
|
43
44
|
* [computed properties](../guides/extensibility/advanced-metrics#computed-properties).
|
|
44
45
|
* The expressiveness of computed properties allows you to deprecate existing
|
|
45
46
|
* events based on both a period of time and specific property values.
|
|
@@ -391,13 +392,17 @@ export interface BackfillCreateParams {
|
|
|
391
392
|
|
|
392
393
|
export interface BackfillListParams extends PageParams {}
|
|
393
394
|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
export
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
395
|
+
Backfills.BackfillListResponsesPage = BackfillListResponsesPage;
|
|
396
|
+
|
|
397
|
+
export declare namespace Backfills {
|
|
398
|
+
export {
|
|
399
|
+
type BackfillCreateResponse as BackfillCreateResponse,
|
|
400
|
+
type BackfillListResponse as BackfillListResponse,
|
|
401
|
+
type BackfillCloseResponse as BackfillCloseResponse,
|
|
402
|
+
type BackfillFetchResponse as BackfillFetchResponse,
|
|
403
|
+
type BackfillRevertResponse as BackfillRevertResponse,
|
|
404
|
+
BackfillListResponsesPage as BackfillListResponsesPage,
|
|
405
|
+
type BackfillCreateParams as BackfillCreateParams,
|
|
406
|
+
type BackfillListParams as BackfillListParams,
|
|
407
|
+
};
|
|
403
408
|
}
|
|
@@ -2,9 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../resource';
|
|
4
4
|
import * as Core from '../../core';
|
|
5
|
-
import * as EventsAPI from './events';
|
|
6
5
|
import * as BackfillsAPI from './backfills';
|
|
6
|
+
import {
|
|
7
|
+
BackfillCloseResponse,
|
|
8
|
+
BackfillCreateParams,
|
|
9
|
+
BackfillCreateResponse,
|
|
10
|
+
BackfillFetchResponse,
|
|
11
|
+
BackfillListParams,
|
|
12
|
+
BackfillListResponse,
|
|
13
|
+
BackfillListResponsesPage,
|
|
14
|
+
BackfillRevertResponse,
|
|
15
|
+
Backfills,
|
|
16
|
+
} from './backfills';
|
|
7
17
|
import * as VolumeAPI from './volume';
|
|
18
|
+
import { EventVolumes, Volume, VolumeListParams } from './volume';
|
|
8
19
|
|
|
9
20
|
export class Events extends APIResource {
|
|
10
21
|
backfills: BackfillsAPI.Backfills = new BackfillsAPI.Backfills(this._client);
|
|
@@ -81,8 +92,8 @@ export class Events extends APIResource {
|
|
|
81
92
|
* call to a payment gateway failed and the user should not be billed)
|
|
82
93
|
*
|
|
83
94
|
* If you want to only change specific properties of an event, but keep the event
|
|
84
|
-
* as part of the billing calculation, use the [Amend
|
|
85
|
-
*
|
|
95
|
+
* as part of the billing calculation, use the [Amend event](amend-event) endpoint
|
|
96
|
+
* instead.
|
|
86
97
|
*
|
|
87
98
|
* This API is always audit-safe. The process will still retain the deprecated
|
|
88
99
|
* event, though it will be ignored for billing calculations. For auditing and data
|
|
@@ -562,24 +573,32 @@ export interface EventSearchParams {
|
|
|
562
573
|
timeframe_start?: string | null;
|
|
563
574
|
}
|
|
564
575
|
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
export
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
export
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
576
|
+
Events.Backfills = Backfills;
|
|
577
|
+
Events.BackfillListResponsesPage = BackfillListResponsesPage;
|
|
578
|
+
Events.Volume = Volume;
|
|
579
|
+
|
|
580
|
+
export declare namespace Events {
|
|
581
|
+
export {
|
|
582
|
+
type EventUpdateResponse as EventUpdateResponse,
|
|
583
|
+
type EventDeprecateResponse as EventDeprecateResponse,
|
|
584
|
+
type EventIngestResponse as EventIngestResponse,
|
|
585
|
+
type EventSearchResponse as EventSearchResponse,
|
|
586
|
+
type EventUpdateParams as EventUpdateParams,
|
|
587
|
+
type EventIngestParams as EventIngestParams,
|
|
588
|
+
type EventSearchParams as EventSearchParams,
|
|
589
|
+
};
|
|
590
|
+
|
|
591
|
+
export {
|
|
592
|
+
Backfills as Backfills,
|
|
593
|
+
type BackfillCreateResponse as BackfillCreateResponse,
|
|
594
|
+
type BackfillListResponse as BackfillListResponse,
|
|
595
|
+
type BackfillCloseResponse as BackfillCloseResponse,
|
|
596
|
+
type BackfillFetchResponse as BackfillFetchResponse,
|
|
597
|
+
type BackfillRevertResponse as BackfillRevertResponse,
|
|
598
|
+
BackfillListResponsesPage as BackfillListResponsesPage,
|
|
599
|
+
type BackfillCreateParams as BackfillCreateParams,
|
|
600
|
+
type BackfillListParams as BackfillListParams,
|
|
601
|
+
};
|
|
602
|
+
|
|
603
|
+
export { Volume as Volume, type EventVolumes as EventVolumes, type VolumeListParams as VolumeListParams };
|
|
585
604
|
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
export {
|
|
4
|
-
BackfillCreateResponse,
|
|
5
|
-
BackfillListResponse,
|
|
6
|
-
BackfillCloseResponse,
|
|
7
|
-
BackfillFetchResponse,
|
|
8
|
-
BackfillRevertResponse,
|
|
9
|
-
BackfillCreateParams,
|
|
10
|
-
BackfillListParams,
|
|
11
4
|
BackfillListResponsesPage,
|
|
12
5
|
Backfills,
|
|
6
|
+
type BackfillCreateResponse,
|
|
7
|
+
type BackfillListResponse,
|
|
8
|
+
type BackfillCloseResponse,
|
|
9
|
+
type BackfillFetchResponse,
|
|
10
|
+
type BackfillRevertResponse,
|
|
11
|
+
type BackfillCreateParams,
|
|
12
|
+
type BackfillListParams,
|
|
13
13
|
} from './backfills';
|
|
14
14
|
export {
|
|
15
|
-
EventUpdateResponse,
|
|
16
|
-
EventDeprecateResponse,
|
|
17
|
-
EventIngestResponse,
|
|
18
|
-
EventSearchResponse,
|
|
19
|
-
EventUpdateParams,
|
|
20
|
-
EventIngestParams,
|
|
21
|
-
EventSearchParams,
|
|
22
15
|
Events,
|
|
16
|
+
type EventUpdateResponse,
|
|
17
|
+
type EventDeprecateResponse,
|
|
18
|
+
type EventIngestResponse,
|
|
19
|
+
type EventSearchResponse,
|
|
20
|
+
type EventUpdateParams,
|
|
21
|
+
type EventIngestParams,
|
|
22
|
+
type EventSearchParams,
|
|
23
23
|
} from './events';
|
|
24
|
-
export { EventVolumes, VolumeListParams
|
|
24
|
+
export { Volume, type EventVolumes, type VolumeListParams } from './volume';
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../resource';
|
|
4
4
|
import * as Core from '../../core';
|
|
5
|
-
import * as VolumeAPI from './volume';
|
|
6
5
|
|
|
7
6
|
export class Volume extends APIResource {
|
|
8
7
|
/**
|
|
@@ -75,7 +74,6 @@ export interface VolumeListParams {
|
|
|
75
74
|
timeframe_end?: string;
|
|
76
75
|
}
|
|
77
76
|
|
|
78
|
-
export namespace Volume {
|
|
79
|
-
export
|
|
80
|
-
export import VolumeListParams = VolumeAPI.VolumeListParams;
|
|
77
|
+
export declare namespace Volume {
|
|
78
|
+
export { type EventVolumes as EventVolumes, type VolumeListParams as VolumeListParams };
|
|
81
79
|
}
|
package/src/resources/index.ts
CHANGED
|
@@ -2,95 +2,141 @@
|
|
|
2
2
|
|
|
3
3
|
export * from './shared';
|
|
4
4
|
export {
|
|
5
|
-
Alert,
|
|
6
|
-
AlertUpdateParams,
|
|
7
|
-
AlertListParams,
|
|
8
|
-
AlertCreateForCustomerParams,
|
|
9
|
-
AlertCreateForExternalCustomerParams,
|
|
10
|
-
AlertCreateForSubscriptionParams,
|
|
11
5
|
AlertsPage,
|
|
12
6
|
Alerts,
|
|
7
|
+
type Alert,
|
|
8
|
+
type AlertUpdateParams,
|
|
9
|
+
type AlertListParams,
|
|
10
|
+
type AlertCreateForCustomerParams,
|
|
11
|
+
type AlertCreateForExternalCustomerParams,
|
|
12
|
+
type AlertCreateForSubscriptionParams,
|
|
13
|
+
type AlertDisableParams,
|
|
14
|
+
type AlertEnableParams,
|
|
13
15
|
} from './alerts';
|
|
14
16
|
export {
|
|
15
|
-
BillableMetric,
|
|
16
|
-
MetricCreateParams,
|
|
17
|
-
MetricUpdateParams,
|
|
18
|
-
MetricListParams,
|
|
19
17
|
BillableMetricsPage,
|
|
20
18
|
Metrics,
|
|
19
|
+
type BillableMetric,
|
|
20
|
+
type MetricCreateParams,
|
|
21
|
+
type MetricUpdateParams,
|
|
22
|
+
type MetricListParams,
|
|
21
23
|
} from './metrics';
|
|
22
|
-
export { Coupon, CouponCreateParams, CouponListParams, CouponsPage, Coupons } from './coupons/coupons';
|
|
23
|
-
export { CreditNote, CreditNoteListParams, CreditNotesPage, CreditNotes } from './credit-notes';
|
|
24
24
|
export {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
CouponsPage,
|
|
26
|
+
Coupons,
|
|
27
|
+
type Coupon,
|
|
28
|
+
type CouponCreateParams,
|
|
29
|
+
type CouponListParams,
|
|
30
|
+
} from './coupons/coupons';
|
|
31
|
+
export {
|
|
32
|
+
CreditNotesPage,
|
|
33
|
+
CreditNotes,
|
|
34
|
+
type CreditNote,
|
|
35
|
+
type CreditNoteCreateParams,
|
|
36
|
+
type CreditNoteListParams,
|
|
37
|
+
} from './credit-notes';
|
|
38
|
+
export {
|
|
30
39
|
CustomersPage,
|
|
31
40
|
Customers,
|
|
41
|
+
type Customer,
|
|
42
|
+
type CustomerCreateParams,
|
|
43
|
+
type CustomerUpdateParams,
|
|
44
|
+
type CustomerListParams,
|
|
45
|
+
type CustomerUpdateByExternalIDParams,
|
|
32
46
|
} from './customers/customers';
|
|
33
47
|
export {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
PriceEvaluateParams,
|
|
41
|
-
PricesPage,
|
|
42
|
-
Prices,
|
|
43
|
-
} from './prices/prices';
|
|
48
|
+
DimensionalPriceGroupsPage,
|
|
49
|
+
DimensionalPriceGroups,
|
|
50
|
+
type DimensionalPriceGroup,
|
|
51
|
+
type DimensionalPriceGroupCreateParams,
|
|
52
|
+
type DimensionalPriceGroupListParams,
|
|
53
|
+
} from './dimensional-price-groups/dimensional-price-groups';
|
|
44
54
|
export {
|
|
45
|
-
EventUpdateResponse,
|
|
46
|
-
EventDeprecateResponse,
|
|
47
|
-
EventIngestResponse,
|
|
48
|
-
EventSearchResponse,
|
|
49
|
-
EventUpdateParams,
|
|
50
|
-
EventIngestParams,
|
|
51
|
-
EventSearchParams,
|
|
52
55
|
Events,
|
|
56
|
+
type EventUpdateResponse,
|
|
57
|
+
type EventDeprecateResponse,
|
|
58
|
+
type EventIngestResponse,
|
|
59
|
+
type EventSearchResponse,
|
|
60
|
+
type EventUpdateParams,
|
|
61
|
+
type EventIngestParams,
|
|
62
|
+
type EventSearchParams,
|
|
53
63
|
} from './events/events';
|
|
54
64
|
export {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
InvoiceFetchUpcomingParams,
|
|
61
|
-
InvoiceIssueParams,
|
|
62
|
-
InvoiceMarkPaidParams,
|
|
65
|
+
InvoiceLineItems,
|
|
66
|
+
type InvoiceLineItemCreateResponse,
|
|
67
|
+
type InvoiceLineItemCreateParams,
|
|
68
|
+
} from './invoice-line-items';
|
|
69
|
+
export {
|
|
63
70
|
InvoicesPage,
|
|
64
71
|
Invoices,
|
|
72
|
+
type Invoice,
|
|
73
|
+
type InvoiceFetchUpcomingResponse,
|
|
74
|
+
type InvoiceCreateParams,
|
|
75
|
+
type InvoiceUpdateParams,
|
|
76
|
+
type InvoiceListParams,
|
|
77
|
+
type InvoiceFetchUpcomingParams,
|
|
78
|
+
type InvoiceIssueParams,
|
|
79
|
+
type InvoiceMarkPaidParams,
|
|
65
80
|
} from './invoices';
|
|
66
81
|
export {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
82
|
+
ItemsPage,
|
|
83
|
+
Items,
|
|
84
|
+
type Item,
|
|
85
|
+
type ItemCreateParams,
|
|
86
|
+
type ItemUpdateParams,
|
|
87
|
+
type ItemListParams,
|
|
88
|
+
} from './items';
|
|
89
|
+
export {
|
|
90
|
+
PlansPage,
|
|
91
|
+
Plans,
|
|
92
|
+
type Plan,
|
|
93
|
+
type PlanCreateParams,
|
|
94
|
+
type PlanUpdateParams,
|
|
95
|
+
type PlanListParams,
|
|
96
|
+
} from './plans/plans';
|
|
97
|
+
export {
|
|
98
|
+
PricesPage,
|
|
99
|
+
Prices,
|
|
100
|
+
type EvaluatePriceGroup,
|
|
101
|
+
type Price,
|
|
102
|
+
type PriceEvaluateResponse,
|
|
103
|
+
type PriceCreateParams,
|
|
104
|
+
type PriceUpdateParams,
|
|
105
|
+
type PriceListParams,
|
|
106
|
+
type PriceEvaluateParams,
|
|
107
|
+
} from './prices/prices';
|
|
73
108
|
export {
|
|
74
|
-
Subscription,
|
|
75
|
-
SubscriptionUsage,
|
|
76
|
-
Subscriptions,
|
|
77
|
-
SubscriptionFetchCostsResponse,
|
|
78
|
-
SubscriptionFetchScheduleResponse,
|
|
79
|
-
SubscriptionCreateParams,
|
|
80
|
-
SubscriptionUpdateParams,
|
|
81
|
-
SubscriptionListParams,
|
|
82
|
-
SubscriptionCancelParams,
|
|
83
|
-
SubscriptionFetchCostsParams,
|
|
84
|
-
SubscriptionFetchScheduleParams,
|
|
85
|
-
SubscriptionFetchUsageParams,
|
|
86
|
-
SubscriptionPriceIntervalsParams,
|
|
87
|
-
SubscriptionSchedulePlanChangeParams,
|
|
88
|
-
SubscriptionTriggerPhaseParams,
|
|
89
|
-
SubscriptionUnscheduleFixedFeeQuantityUpdatesParams,
|
|
90
|
-
SubscriptionUpdateFixedFeeQuantityParams,
|
|
91
|
-
SubscriptionUpdateTrialParams,
|
|
92
109
|
SubscriptionsPage,
|
|
93
110
|
SubscriptionFetchScheduleResponsesPage,
|
|
111
|
+
Subscriptions,
|
|
112
|
+
type Subscription,
|
|
113
|
+
type SubscriptionUsage,
|
|
114
|
+
type SubscriptionCreateResponse,
|
|
115
|
+
type SubscriptionCancelResponse,
|
|
116
|
+
type SubscriptionFetchCostsResponse,
|
|
117
|
+
type SubscriptionFetchScheduleResponse,
|
|
118
|
+
type SubscriptionPriceIntervalsResponse,
|
|
119
|
+
type SubscriptionSchedulePlanChangeResponse,
|
|
120
|
+
type SubscriptionTriggerPhaseResponse,
|
|
121
|
+
type SubscriptionUnscheduleCancellationResponse,
|
|
122
|
+
type SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse,
|
|
123
|
+
type SubscriptionUnschedulePendingPlanChangesResponse,
|
|
124
|
+
type SubscriptionUpdateFixedFeeQuantityResponse,
|
|
125
|
+
type SubscriptionUpdateTrialResponse,
|
|
126
|
+
type SubscriptionCreateParams,
|
|
127
|
+
type SubscriptionUpdateParams,
|
|
128
|
+
type SubscriptionListParams,
|
|
129
|
+
type SubscriptionCancelParams,
|
|
130
|
+
type SubscriptionFetchCostsParams,
|
|
131
|
+
type SubscriptionFetchScheduleParams,
|
|
132
|
+
type SubscriptionFetchUsageParams,
|
|
133
|
+
type SubscriptionPriceIntervalsParams,
|
|
134
|
+
type SubscriptionSchedulePlanChangeParams,
|
|
135
|
+
type SubscriptionTriggerPhaseParams,
|
|
136
|
+
type SubscriptionUnscheduleFixedFeeQuantityUpdatesParams,
|
|
137
|
+
type SubscriptionUpdateFixedFeeQuantityParams,
|
|
138
|
+
type SubscriptionUpdateTrialParams,
|
|
94
139
|
} from './subscriptions';
|
|
95
|
-
export {
|
|
140
|
+
export { TopLevel, type TopLevelPingResponse } from './top-level';
|
|
141
|
+
|
|
96
142
|
export { Webhooks } from './webhooks';
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../resource';
|
|
4
4
|
import * as Core from '../core';
|
|
5
|
-
import * as InvoiceLineItemsAPI from './invoice-line-items';
|
|
6
5
|
import * as Shared from './shared';
|
|
7
6
|
import * as PricesAPI from './prices/prices';
|
|
8
7
|
|
|
@@ -496,7 +495,9 @@ export interface InvoiceLineItemCreateParams {
|
|
|
496
495
|
start_date: string;
|
|
497
496
|
}
|
|
498
497
|
|
|
499
|
-
export namespace InvoiceLineItems {
|
|
500
|
-
export
|
|
501
|
-
|
|
498
|
+
export declare namespace InvoiceLineItems {
|
|
499
|
+
export {
|
|
500
|
+
type InvoiceLineItemCreateResponse as InvoiceLineItemCreateResponse,
|
|
501
|
+
type InvoiceLineItemCreateParams as InvoiceLineItemCreateParams,
|
|
502
|
+
};
|
|
502
503
|
}
|