orb-billing 4.33.0 → 4.47.2
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 +188 -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/shared.d.ts +14 -16
- package/resources/shared.d.ts.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 +32 -26
- 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 +471 -15
- package/src/resources/shared.ts +18 -20
- 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
|
@@ -3,10 +3,33 @@
|
|
|
3
3
|
import { APIResource } from '../../resource';
|
|
4
4
|
import { isRequestOptions } from '../../core';
|
|
5
5
|
import * as Core from '../../core';
|
|
6
|
-
import * as CustomersAPI from './customers';
|
|
7
6
|
import * as BalanceTransactionsAPI from './balance-transactions';
|
|
7
|
+
import {
|
|
8
|
+
BalanceTransactionCreateParams,
|
|
9
|
+
BalanceTransactionCreateResponse,
|
|
10
|
+
BalanceTransactionListParams,
|
|
11
|
+
BalanceTransactionListResponse,
|
|
12
|
+
BalanceTransactionListResponsesPage,
|
|
13
|
+
BalanceTransactions,
|
|
14
|
+
} from './balance-transactions';
|
|
8
15
|
import * as CostsAPI from './costs';
|
|
16
|
+
import {
|
|
17
|
+
CostListByExternalIDParams,
|
|
18
|
+
CostListByExternalIDResponse,
|
|
19
|
+
CostListParams,
|
|
20
|
+
CostListResponse,
|
|
21
|
+
Costs,
|
|
22
|
+
} from './costs';
|
|
9
23
|
import * as CreditsAPI from './credits/credits';
|
|
24
|
+
import {
|
|
25
|
+
CreditListByExternalIDParams,
|
|
26
|
+
CreditListByExternalIDResponse,
|
|
27
|
+
CreditListByExternalIDResponsesPage,
|
|
28
|
+
CreditListParams,
|
|
29
|
+
CreditListResponse,
|
|
30
|
+
CreditListResponsesPage,
|
|
31
|
+
Credits,
|
|
32
|
+
} from './credits/credits';
|
|
10
33
|
import { Page, type PageParams } from '../../pagination';
|
|
11
34
|
|
|
12
35
|
export class Customers extends APIResource {
|
|
@@ -2200,29 +2223,48 @@ export namespace CustomerUpdateByExternalIDParams {
|
|
|
2200
2223
|
}
|
|
2201
2224
|
}
|
|
2202
2225
|
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
export
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
export
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2226
|
+
Customers.CustomersPage = CustomersPage;
|
|
2227
|
+
Customers.Costs = Costs;
|
|
2228
|
+
Customers.Credits = Credits;
|
|
2229
|
+
Customers.CreditListResponsesPage = CreditListResponsesPage;
|
|
2230
|
+
Customers.CreditListByExternalIDResponsesPage = CreditListByExternalIDResponsesPage;
|
|
2231
|
+
Customers.BalanceTransactions = BalanceTransactions;
|
|
2232
|
+
Customers.BalanceTransactionListResponsesPage = BalanceTransactionListResponsesPage;
|
|
2233
|
+
|
|
2234
|
+
export declare namespace Customers {
|
|
2235
|
+
export {
|
|
2236
|
+
type Customer as Customer,
|
|
2237
|
+
CustomersPage as CustomersPage,
|
|
2238
|
+
type CustomerCreateParams as CustomerCreateParams,
|
|
2239
|
+
type CustomerUpdateParams as CustomerUpdateParams,
|
|
2240
|
+
type CustomerListParams as CustomerListParams,
|
|
2241
|
+
type CustomerUpdateByExternalIDParams as CustomerUpdateByExternalIDParams,
|
|
2242
|
+
};
|
|
2243
|
+
|
|
2244
|
+
export {
|
|
2245
|
+
Costs as Costs,
|
|
2246
|
+
type CostListResponse as CostListResponse,
|
|
2247
|
+
type CostListByExternalIDResponse as CostListByExternalIDResponse,
|
|
2248
|
+
type CostListParams as CostListParams,
|
|
2249
|
+
type CostListByExternalIDParams as CostListByExternalIDParams,
|
|
2250
|
+
};
|
|
2251
|
+
|
|
2252
|
+
export {
|
|
2253
|
+
Credits as Credits,
|
|
2254
|
+
type CreditListResponse as CreditListResponse,
|
|
2255
|
+
type CreditListByExternalIDResponse as CreditListByExternalIDResponse,
|
|
2256
|
+
CreditListResponsesPage as CreditListResponsesPage,
|
|
2257
|
+
CreditListByExternalIDResponsesPage as CreditListByExternalIDResponsesPage,
|
|
2258
|
+
type CreditListParams as CreditListParams,
|
|
2259
|
+
type CreditListByExternalIDParams as CreditListByExternalIDParams,
|
|
2260
|
+
};
|
|
2261
|
+
|
|
2262
|
+
export {
|
|
2263
|
+
BalanceTransactions as BalanceTransactions,
|
|
2264
|
+
type BalanceTransactionCreateResponse as BalanceTransactionCreateResponse,
|
|
2265
|
+
type BalanceTransactionListResponse as BalanceTransactionListResponse,
|
|
2266
|
+
BalanceTransactionListResponsesPage as BalanceTransactionListResponsesPage,
|
|
2267
|
+
type BalanceTransactionCreateParams as BalanceTransactionCreateParams,
|
|
2268
|
+
type BalanceTransactionListParams as BalanceTransactionListParams,
|
|
2269
|
+
};
|
|
2228
2270
|
}
|
|
@@ -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
|
}
|