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
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { ExternalPriceID, type ExternalPriceIDUpdateParams } from "./external-price-id.js";
|
|
2
|
+
export { PricesPage, Prices, type EvaluatePriceGroup, type Price, type PriceEvaluateResponse, type PriceCreateParams, type PriceUpdateParams, type PriceListParams, type PriceEvaluateParams, } from "./prices.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/prices/index.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/prices/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,KAAK,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AACxF,OAAO,EACL,UAAU,EACV,MAAM,EACN,KAAK,kBAAkB,EACvB,KAAK,KAAK,EACV,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,mBAAmB,GACzB,MAAM,UAAU,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.Prices = exports.PricesPage = exports.ExternalPriceID = void 0;
|
|
5
|
+
var external_price_id_1 = require("./external-price-id.js");
|
|
6
|
+
Object.defineProperty(exports, "ExternalPriceID", { enumerable: true, get: function () { return external_price_id_1.ExternalPriceID; } });
|
|
5
7
|
var prices_1 = require("./prices.js");
|
|
6
8
|
Object.defineProperty(exports, "PricesPage", { enumerable: true, get: function () { return prices_1.PricesPage; } });
|
|
7
9
|
Object.defineProperty(exports, "Prices", { enumerable: true, get: function () { return prices_1.Prices; } });
|
|
8
|
-
var external_price_id_1 = require("./external-price-id.js");
|
|
9
|
-
Object.defineProperty(exports, "ExternalPriceID", { enumerable: true, get: function () { return external_price_id_1.ExternalPriceID; } });
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/prices/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sCAUkB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/prices/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,4DAAwF;AAA/E,oHAAA,eAAe,OAAA;AACxB,sCAUkB;AAThB,oGAAA,UAAU,OAAA;AACV,gGAAA,MAAM,OAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
export { PricesPage, Prices, } from "./prices.mjs";
|
|
3
2
|
export { ExternalPriceID } from "./external-price-id.mjs";
|
|
3
|
+
export { PricesPage, Prices, } from "./prices.mjs";
|
|
4
4
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/prices/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/prices/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,eAAe,EAAoC;OACrD,EACL,UAAU,EACV,MAAM,GAQP"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { APIResource } from "../../resource.js";
|
|
2
2
|
import * as Core from "../../core.js";
|
|
3
|
-
import * as PricesAPI from "./prices.js";
|
|
4
3
|
import * as Shared from "../shared.js";
|
|
5
4
|
import * as ExternalPriceIDAPI from "./external-price-id.js";
|
|
5
|
+
import { ExternalPriceID, ExternalPriceIDUpdateParams } from "./external-price-id.js";
|
|
6
6
|
import { Page, type PageParams } from "../../pagination.js";
|
|
7
7
|
export declare class Prices extends APIResource {
|
|
8
8
|
externalPriceId: ExternalPriceIDAPI.ExternalPriceID;
|
|
@@ -309,7 +309,7 @@ export interface EvaluatePriceGroup {
|
|
|
309
309
|
* }
|
|
310
310
|
* ```
|
|
311
311
|
*/
|
|
312
|
-
export type Price = Price.UnitPrice | Price.PackagePrice | Price.MatrixPrice | Price.TieredPrice | Price.TieredBpsPrice | Price.BpsPrice | Price.BulkBpsPrice | Price.BulkPrice | Price.ThresholdTotalAmountPrice | Price.TieredPackagePrice | Price.GroupedTieredPrice | Price.TieredWithMinimumPrice | Price.TieredPackageWithMinimumPrice | Price.PackageWithAllocationPrice | Price.UnitWithPercentPrice | Price.MatrixWithAllocationPrice | Price.TieredWithProrationPrice | Price.UnitWithProrationPrice | Price.GroupedAllocationPrice | Price.GroupedWithProratedMinimumPrice | Price.GroupedWithMeteredMinimumPrice | Price.BulkWithProrationPrice;
|
|
312
|
+
export type Price = Price.UnitPrice | Price.PackagePrice | Price.MatrixPrice | Price.TieredPrice | Price.TieredBpsPrice | Price.BpsPrice | Price.BulkBpsPrice | Price.BulkPrice | Price.ThresholdTotalAmountPrice | Price.TieredPackagePrice | Price.GroupedTieredPrice | Price.TieredWithMinimumPrice | Price.TieredPackageWithMinimumPrice | Price.PackageWithAllocationPrice | Price.UnitWithPercentPrice | Price.MatrixWithAllocationPrice | Price.TieredWithProrationPrice | Price.UnitWithProrationPrice | Price.GroupedAllocationPrice | Price.GroupedWithProratedMinimumPrice | Price.GroupedWithMeteredMinimumPrice | Price.MatrixWithDisplayNamePrice | Price.BulkWithProrationPrice | Price.GroupedTieredPackagePrice;
|
|
313
313
|
export declare namespace Price {
|
|
314
314
|
interface UnitPrice {
|
|
315
315
|
id: string;
|
|
@@ -2042,6 +2042,80 @@ export declare namespace Price {
|
|
|
2042
2042
|
minimum_amount: string;
|
|
2043
2043
|
}
|
|
2044
2044
|
}
|
|
2045
|
+
interface MatrixWithDisplayNamePrice {
|
|
2046
|
+
id: string;
|
|
2047
|
+
billable_metric: MatrixWithDisplayNamePrice.BillableMetric | null;
|
|
2048
|
+
billing_cycle_configuration: MatrixWithDisplayNamePrice.BillingCycleConfiguration;
|
|
2049
|
+
cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
|
|
2050
|
+
conversion_rate: number | null;
|
|
2051
|
+
created_at: string;
|
|
2052
|
+
credit_allocation: MatrixWithDisplayNamePrice.CreditAllocation | null;
|
|
2053
|
+
currency: string;
|
|
2054
|
+
discount: Shared.Discount | null;
|
|
2055
|
+
external_price_id: string | null;
|
|
2056
|
+
fixed_price_quantity: number | null;
|
|
2057
|
+
invoicing_cycle_configuration: MatrixWithDisplayNamePrice.InvoicingCycleConfiguration | null;
|
|
2058
|
+
item: MatrixWithDisplayNamePrice.Item;
|
|
2059
|
+
matrix_with_display_name_config: Record<string, unknown>;
|
|
2060
|
+
maximum: MatrixWithDisplayNamePrice.Maximum | null;
|
|
2061
|
+
maximum_amount: string | null;
|
|
2062
|
+
/**
|
|
2063
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
2064
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
2065
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
2066
|
+
* `null`.
|
|
2067
|
+
*/
|
|
2068
|
+
metadata: Record<string, string>;
|
|
2069
|
+
minimum: MatrixWithDisplayNamePrice.Minimum | null;
|
|
2070
|
+
minimum_amount: string | null;
|
|
2071
|
+
model_type: 'matrix_with_display_name';
|
|
2072
|
+
name: string;
|
|
2073
|
+
plan_phase_order: number | null;
|
|
2074
|
+
price_type: 'usage_price' | 'fixed_price';
|
|
2075
|
+
}
|
|
2076
|
+
namespace MatrixWithDisplayNamePrice {
|
|
2077
|
+
interface BillableMetric {
|
|
2078
|
+
id: string;
|
|
2079
|
+
}
|
|
2080
|
+
interface BillingCycleConfiguration {
|
|
2081
|
+
duration: number;
|
|
2082
|
+
duration_unit: 'day' | 'month';
|
|
2083
|
+
}
|
|
2084
|
+
interface CreditAllocation {
|
|
2085
|
+
allows_rollover: boolean;
|
|
2086
|
+
currency: string;
|
|
2087
|
+
}
|
|
2088
|
+
interface InvoicingCycleConfiguration {
|
|
2089
|
+
duration: number;
|
|
2090
|
+
duration_unit: 'day' | 'month';
|
|
2091
|
+
}
|
|
2092
|
+
interface Item {
|
|
2093
|
+
id: string;
|
|
2094
|
+
name: string;
|
|
2095
|
+
}
|
|
2096
|
+
interface Maximum {
|
|
2097
|
+
/**
|
|
2098
|
+
* List of price_ids that this maximum amount applies to. For plan/plan phase
|
|
2099
|
+
* maximums, this can be a subset of prices.
|
|
2100
|
+
*/
|
|
2101
|
+
applies_to_price_ids: Array<string>;
|
|
2102
|
+
/**
|
|
2103
|
+
* Maximum amount applied
|
|
2104
|
+
*/
|
|
2105
|
+
maximum_amount: string;
|
|
2106
|
+
}
|
|
2107
|
+
interface Minimum {
|
|
2108
|
+
/**
|
|
2109
|
+
* List of price_ids that this minimum amount applies to. For plan/plan phase
|
|
2110
|
+
* minimums, this can be a subset of prices.
|
|
2111
|
+
*/
|
|
2112
|
+
applies_to_price_ids: Array<string>;
|
|
2113
|
+
/**
|
|
2114
|
+
* Minimum amount applied
|
|
2115
|
+
*/
|
|
2116
|
+
minimum_amount: string;
|
|
2117
|
+
}
|
|
2118
|
+
}
|
|
2045
2119
|
interface BulkWithProrationPrice {
|
|
2046
2120
|
id: string;
|
|
2047
2121
|
billable_metric: BulkWithProrationPrice.BillableMetric | null;
|
|
@@ -2116,11 +2190,85 @@ export declare namespace Price {
|
|
|
2116
2190
|
minimum_amount: string;
|
|
2117
2191
|
}
|
|
2118
2192
|
}
|
|
2193
|
+
interface GroupedTieredPackagePrice {
|
|
2194
|
+
id: string;
|
|
2195
|
+
billable_metric: GroupedTieredPackagePrice.BillableMetric | null;
|
|
2196
|
+
billing_cycle_configuration: GroupedTieredPackagePrice.BillingCycleConfiguration;
|
|
2197
|
+
cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
|
|
2198
|
+
conversion_rate: number | null;
|
|
2199
|
+
created_at: string;
|
|
2200
|
+
credit_allocation: GroupedTieredPackagePrice.CreditAllocation | null;
|
|
2201
|
+
currency: string;
|
|
2202
|
+
discount: Shared.Discount | null;
|
|
2203
|
+
external_price_id: string | null;
|
|
2204
|
+
fixed_price_quantity: number | null;
|
|
2205
|
+
grouped_tiered_package_config: Record<string, unknown>;
|
|
2206
|
+
invoicing_cycle_configuration: GroupedTieredPackagePrice.InvoicingCycleConfiguration | null;
|
|
2207
|
+
item: GroupedTieredPackagePrice.Item;
|
|
2208
|
+
maximum: GroupedTieredPackagePrice.Maximum | null;
|
|
2209
|
+
maximum_amount: string | null;
|
|
2210
|
+
/**
|
|
2211
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
2212
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
2213
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
2214
|
+
* `null`.
|
|
2215
|
+
*/
|
|
2216
|
+
metadata: Record<string, string>;
|
|
2217
|
+
minimum: GroupedTieredPackagePrice.Minimum | null;
|
|
2218
|
+
minimum_amount: string | null;
|
|
2219
|
+
model_type: 'grouped_tiered_package';
|
|
2220
|
+
name: string;
|
|
2221
|
+
plan_phase_order: number | null;
|
|
2222
|
+
price_type: 'usage_price' | 'fixed_price';
|
|
2223
|
+
}
|
|
2224
|
+
namespace GroupedTieredPackagePrice {
|
|
2225
|
+
interface BillableMetric {
|
|
2226
|
+
id: string;
|
|
2227
|
+
}
|
|
2228
|
+
interface BillingCycleConfiguration {
|
|
2229
|
+
duration: number;
|
|
2230
|
+
duration_unit: 'day' | 'month';
|
|
2231
|
+
}
|
|
2232
|
+
interface CreditAllocation {
|
|
2233
|
+
allows_rollover: boolean;
|
|
2234
|
+
currency: string;
|
|
2235
|
+
}
|
|
2236
|
+
interface InvoicingCycleConfiguration {
|
|
2237
|
+
duration: number;
|
|
2238
|
+
duration_unit: 'day' | 'month';
|
|
2239
|
+
}
|
|
2240
|
+
interface Item {
|
|
2241
|
+
id: string;
|
|
2242
|
+
name: string;
|
|
2243
|
+
}
|
|
2244
|
+
interface Maximum {
|
|
2245
|
+
/**
|
|
2246
|
+
* List of price_ids that this maximum amount applies to. For plan/plan phase
|
|
2247
|
+
* maximums, this can be a subset of prices.
|
|
2248
|
+
*/
|
|
2249
|
+
applies_to_price_ids: Array<string>;
|
|
2250
|
+
/**
|
|
2251
|
+
* Maximum amount applied
|
|
2252
|
+
*/
|
|
2253
|
+
maximum_amount: string;
|
|
2254
|
+
}
|
|
2255
|
+
interface Minimum {
|
|
2256
|
+
/**
|
|
2257
|
+
* List of price_ids that this minimum amount applies to. For plan/plan phase
|
|
2258
|
+
* minimums, this can be a subset of prices.
|
|
2259
|
+
*/
|
|
2260
|
+
applies_to_price_ids: Array<string>;
|
|
2261
|
+
/**
|
|
2262
|
+
* Minimum amount applied
|
|
2263
|
+
*/
|
|
2264
|
+
minimum_amount: string;
|
|
2265
|
+
}
|
|
2266
|
+
}
|
|
2119
2267
|
}
|
|
2120
2268
|
export interface PriceEvaluateResponse {
|
|
2121
2269
|
data: Array<EvaluatePriceGroup>;
|
|
2122
2270
|
}
|
|
2123
|
-
export type PriceCreateParams = PriceCreateParams.NewFloatingUnitPrice | PriceCreateParams.NewFloatingPackagePrice | PriceCreateParams.NewFloatingMatrixPrice | PriceCreateParams.NewFloatingMatrixWithAllocationPrice | PriceCreateParams.NewFloatingTieredPrice | PriceCreateParams.NewFloatingTieredBpsPrice | PriceCreateParams.NewFloatingBpsPrice | PriceCreateParams.NewFloatingBulkBpsPrice | PriceCreateParams.NewFloatingBulkPrice | PriceCreateParams.NewFloatingThresholdTotalAmountPrice | PriceCreateParams.NewFloatingTieredPackagePrice | PriceCreateParams.NewFloatingGroupedTieredPrice | PriceCreateParams.NewFloatingTieredWithMinimumPrice | PriceCreateParams.NewFloatingPackageWithAllocationPrice | PriceCreateParams.NewFloatingTieredPackageWithMinimumPrice | PriceCreateParams.NewFloatingUnitWithPercentPrice | PriceCreateParams.NewFloatingTieredWithProrationPrice | PriceCreateParams.NewFloatingUnitWithProrationPrice | PriceCreateParams.NewFloatingGroupedAllocationPrice | PriceCreateParams.NewFloatingGroupedWithProratedMinimumPrice | PriceCreateParams.NewFloatingGroupedWithMeteredMinimumPrice | PriceCreateParams.NewFloatingBulkWithProrationPrice;
|
|
2271
|
+
export type PriceCreateParams = PriceCreateParams.NewFloatingUnitPrice | PriceCreateParams.NewFloatingPackagePrice | PriceCreateParams.NewFloatingMatrixPrice | PriceCreateParams.NewFloatingMatrixWithAllocationPrice | PriceCreateParams.NewFloatingTieredPrice | PriceCreateParams.NewFloatingTieredBpsPrice | PriceCreateParams.NewFloatingBpsPrice | PriceCreateParams.NewFloatingBulkBpsPrice | PriceCreateParams.NewFloatingBulkPrice | PriceCreateParams.NewFloatingThresholdTotalAmountPrice | PriceCreateParams.NewFloatingTieredPackagePrice | PriceCreateParams.NewFloatingGroupedTieredPrice | PriceCreateParams.NewFloatingTieredWithMinimumPrice | PriceCreateParams.NewFloatingPackageWithAllocationPrice | PriceCreateParams.NewFloatingTieredPackageWithMinimumPrice | PriceCreateParams.NewFloatingUnitWithPercentPrice | PriceCreateParams.NewFloatingTieredWithProrationPrice | PriceCreateParams.NewFloatingUnitWithProrationPrice | PriceCreateParams.NewFloatingGroupedAllocationPrice | PriceCreateParams.NewFloatingGroupedWithProratedMinimumPrice | PriceCreateParams.NewFloatingGroupedWithMeteredMinimumPrice | PriceCreateParams.NewFloatingMatrixWithDisplayNamePrice | PriceCreateParams.NewFloatingBulkWithProrationPrice | PriceCreateParams.NewFloatingGroupedTieredPackagePrice;
|
|
2124
2272
|
export declare namespace PriceCreateParams {
|
|
2125
2273
|
interface NewFloatingUnitPrice {
|
|
2126
2274
|
/**
|
|
@@ -4252,6 +4400,99 @@ export declare namespace PriceCreateParams {
|
|
|
4252
4400
|
duration_unit: 'day' | 'month';
|
|
4253
4401
|
}
|
|
4254
4402
|
}
|
|
4403
|
+
interface NewFloatingMatrixWithDisplayNamePrice {
|
|
4404
|
+
/**
|
|
4405
|
+
* The cadence to bill for this price on.
|
|
4406
|
+
*/
|
|
4407
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
4408
|
+
/**
|
|
4409
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
4410
|
+
*/
|
|
4411
|
+
currency: string;
|
|
4412
|
+
/**
|
|
4413
|
+
* The id of the item the plan will be associated with.
|
|
4414
|
+
*/
|
|
4415
|
+
item_id: string;
|
|
4416
|
+
matrix_with_display_name_config: Record<string, unknown>;
|
|
4417
|
+
model_type: 'matrix_with_display_name';
|
|
4418
|
+
/**
|
|
4419
|
+
* The name of the price.
|
|
4420
|
+
*/
|
|
4421
|
+
name: string;
|
|
4422
|
+
/**
|
|
4423
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
4424
|
+
* usage-based.
|
|
4425
|
+
*/
|
|
4426
|
+
billable_metric_id?: string | null;
|
|
4427
|
+
/**
|
|
4428
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
4429
|
+
* this is true, and in-arrears if this is false.
|
|
4430
|
+
*/
|
|
4431
|
+
billed_in_advance?: boolean | null;
|
|
4432
|
+
/**
|
|
4433
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
4434
|
+
* months.
|
|
4435
|
+
*/
|
|
4436
|
+
billing_cycle_configuration?: PriceCreateParams.NewFloatingMatrixWithDisplayNamePrice.BillingCycleConfiguration | null;
|
|
4437
|
+
/**
|
|
4438
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
4439
|
+
*/
|
|
4440
|
+
conversion_rate?: number | null;
|
|
4441
|
+
/**
|
|
4442
|
+
* An alias for the price.
|
|
4443
|
+
*/
|
|
4444
|
+
external_price_id?: string | null;
|
|
4445
|
+
/**
|
|
4446
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
4447
|
+
* applied.
|
|
4448
|
+
*/
|
|
4449
|
+
fixed_price_quantity?: number | null;
|
|
4450
|
+
/**
|
|
4451
|
+
* The property used to group this price on an invoice
|
|
4452
|
+
*/
|
|
4453
|
+
invoice_grouping_key?: string | null;
|
|
4454
|
+
/**
|
|
4455
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
4456
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
4457
|
+
*/
|
|
4458
|
+
invoicing_cycle_configuration?: PriceCreateParams.NewFloatingMatrixWithDisplayNamePrice.InvoicingCycleConfiguration | null;
|
|
4459
|
+
/**
|
|
4460
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
4461
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
4462
|
+
* by setting `metadata` to `null`.
|
|
4463
|
+
*/
|
|
4464
|
+
metadata?: Record<string, string | null> | null;
|
|
4465
|
+
}
|
|
4466
|
+
namespace NewFloatingMatrixWithDisplayNamePrice {
|
|
4467
|
+
/**
|
|
4468
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
4469
|
+
* months.
|
|
4470
|
+
*/
|
|
4471
|
+
interface BillingCycleConfiguration {
|
|
4472
|
+
/**
|
|
4473
|
+
* The duration of the billing period.
|
|
4474
|
+
*/
|
|
4475
|
+
duration: number;
|
|
4476
|
+
/**
|
|
4477
|
+
* The unit of billing period duration.
|
|
4478
|
+
*/
|
|
4479
|
+
duration_unit: 'day' | 'month';
|
|
4480
|
+
}
|
|
4481
|
+
/**
|
|
4482
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
4483
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
4484
|
+
*/
|
|
4485
|
+
interface InvoicingCycleConfiguration {
|
|
4486
|
+
/**
|
|
4487
|
+
* The duration of the billing period.
|
|
4488
|
+
*/
|
|
4489
|
+
duration: number;
|
|
4490
|
+
/**
|
|
4491
|
+
* The unit of billing period duration.
|
|
4492
|
+
*/
|
|
4493
|
+
duration_unit: 'day' | 'month';
|
|
4494
|
+
}
|
|
4495
|
+
}
|
|
4255
4496
|
interface NewFloatingBulkWithProrationPrice {
|
|
4256
4497
|
bulk_with_proration_config: Record<string, unknown>;
|
|
4257
4498
|
/**
|
|
@@ -4345,6 +4586,99 @@ export declare namespace PriceCreateParams {
|
|
|
4345
4586
|
duration_unit: 'day' | 'month';
|
|
4346
4587
|
}
|
|
4347
4588
|
}
|
|
4589
|
+
interface NewFloatingGroupedTieredPackagePrice {
|
|
4590
|
+
/**
|
|
4591
|
+
* The cadence to bill for this price on.
|
|
4592
|
+
*/
|
|
4593
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
4594
|
+
/**
|
|
4595
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
4596
|
+
*/
|
|
4597
|
+
currency: string;
|
|
4598
|
+
grouped_tiered_package_config: Record<string, unknown>;
|
|
4599
|
+
/**
|
|
4600
|
+
* The id of the item the plan will be associated with.
|
|
4601
|
+
*/
|
|
4602
|
+
item_id: string;
|
|
4603
|
+
model_type: 'grouped_tiered_package';
|
|
4604
|
+
/**
|
|
4605
|
+
* The name of the price.
|
|
4606
|
+
*/
|
|
4607
|
+
name: string;
|
|
4608
|
+
/**
|
|
4609
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
4610
|
+
* usage-based.
|
|
4611
|
+
*/
|
|
4612
|
+
billable_metric_id?: string | null;
|
|
4613
|
+
/**
|
|
4614
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
4615
|
+
* this is true, and in-arrears if this is false.
|
|
4616
|
+
*/
|
|
4617
|
+
billed_in_advance?: boolean | null;
|
|
4618
|
+
/**
|
|
4619
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
4620
|
+
* months.
|
|
4621
|
+
*/
|
|
4622
|
+
billing_cycle_configuration?: PriceCreateParams.NewFloatingGroupedTieredPackagePrice.BillingCycleConfiguration | null;
|
|
4623
|
+
/**
|
|
4624
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
4625
|
+
*/
|
|
4626
|
+
conversion_rate?: number | null;
|
|
4627
|
+
/**
|
|
4628
|
+
* An alias for the price.
|
|
4629
|
+
*/
|
|
4630
|
+
external_price_id?: string | null;
|
|
4631
|
+
/**
|
|
4632
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
4633
|
+
* applied.
|
|
4634
|
+
*/
|
|
4635
|
+
fixed_price_quantity?: number | null;
|
|
4636
|
+
/**
|
|
4637
|
+
* The property used to group this price on an invoice
|
|
4638
|
+
*/
|
|
4639
|
+
invoice_grouping_key?: string | null;
|
|
4640
|
+
/**
|
|
4641
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
4642
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
4643
|
+
*/
|
|
4644
|
+
invoicing_cycle_configuration?: PriceCreateParams.NewFloatingGroupedTieredPackagePrice.InvoicingCycleConfiguration | null;
|
|
4645
|
+
/**
|
|
4646
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
4647
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
4648
|
+
* by setting `metadata` to `null`.
|
|
4649
|
+
*/
|
|
4650
|
+
metadata?: Record<string, string | null> | null;
|
|
4651
|
+
}
|
|
4652
|
+
namespace NewFloatingGroupedTieredPackagePrice {
|
|
4653
|
+
/**
|
|
4654
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
4655
|
+
* months.
|
|
4656
|
+
*/
|
|
4657
|
+
interface BillingCycleConfiguration {
|
|
4658
|
+
/**
|
|
4659
|
+
* The duration of the billing period.
|
|
4660
|
+
*/
|
|
4661
|
+
duration: number;
|
|
4662
|
+
/**
|
|
4663
|
+
* The unit of billing period duration.
|
|
4664
|
+
*/
|
|
4665
|
+
duration_unit: 'day' | 'month';
|
|
4666
|
+
}
|
|
4667
|
+
/**
|
|
4668
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
4669
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
4670
|
+
*/
|
|
4671
|
+
interface InvoicingCycleConfiguration {
|
|
4672
|
+
/**
|
|
4673
|
+
* The duration of the billing period.
|
|
4674
|
+
*/
|
|
4675
|
+
duration: number;
|
|
4676
|
+
/**
|
|
4677
|
+
* The unit of billing period duration.
|
|
4678
|
+
*/
|
|
4679
|
+
duration_unit: 'day' | 'month';
|
|
4680
|
+
}
|
|
4681
|
+
}
|
|
4348
4682
|
}
|
|
4349
4683
|
export interface PriceUpdateParams {
|
|
4350
4684
|
/**
|
|
@@ -4387,15 +4721,7 @@ export interface PriceEvaluateParams {
|
|
|
4387
4721
|
grouping_keys?: Array<string>;
|
|
4388
4722
|
}
|
|
4389
4723
|
export declare namespace Prices {
|
|
4390
|
-
export
|
|
4391
|
-
export
|
|
4392
|
-
export import PriceEvaluateResponse = PricesAPI.PriceEvaluateResponse;
|
|
4393
|
-
export import PricesPage = PricesAPI.PricesPage;
|
|
4394
|
-
export import PriceCreateParams = PricesAPI.PriceCreateParams;
|
|
4395
|
-
export import PriceUpdateParams = PricesAPI.PriceUpdateParams;
|
|
4396
|
-
export import PriceListParams = PricesAPI.PriceListParams;
|
|
4397
|
-
export import PriceEvaluateParams = PricesAPI.PriceEvaluateParams;
|
|
4398
|
-
export import ExternalPriceID = ExternalPriceIDAPI.ExternalPriceID;
|
|
4399
|
-
export import ExternalPriceIDUpdateParams = ExternalPriceIDAPI.ExternalPriceIDUpdateParams;
|
|
4724
|
+
export { type EvaluatePriceGroup as EvaluatePriceGroup, type Price as Price, type PriceEvaluateResponse as PriceEvaluateResponse, PricesPage as PricesPage, type PriceCreateParams as PriceCreateParams, type PriceUpdateParams as PriceUpdateParams, type PriceListParams as PriceListParams, type PriceEvaluateParams as PriceEvaluateParams, };
|
|
4725
|
+
export { ExternalPriceID as ExternalPriceID, type ExternalPriceIDUpdateParams as ExternalPriceIDUpdateParams, };
|
|
4400
4726
|
}
|
|
4401
4727
|
//# sourceMappingURL=prices.d.ts.map
|