diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 06c868a5..83b53019 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -55,14 +55,18 @@ jobs:
run: ./scripts/build
- name: Get GitHub OIDC Token
- if: github.repository == 'stainless-sdks/orb-node'
+ if: |-
+ github.repository == 'stainless-sdks/orb-node' &&
+ !startsWith(github.ref, 'refs/heads/stl/')
id: github-oidc
uses: actions/github-script@v8
with:
script: core.setOutput('github_token', await core.getIDToken());
- name: Upload tarball
- if: github.repository == 'stainless-sdks/orb-node'
+ if: |-
+ github.repository == 'stainless-sdks/orb-node' &&
+ !startsWith(github.ref, 'refs/heads/stl/')
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 6b6edec6..633fb4ef 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "5.44.0"
+ ".": "5.45.0"
}
diff --git a/.stats.yml b/.stats.yml
index a6cf36af..438843fd 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 126
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-931771ff4ab183044ee50ce43ea794ac0a15bfafbaf7df61ac0344af3ff08944.yml
-openapi_spec_hash: 71371804e373f662585284bf5d93cc62
-config_hash: bcf82bddb691f6be773ac6cae8c03b9a
+configured_endpoints: 139
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-d6a851f21804170f796637f1911c3382f1c57f5ed6b9b77cd7d0c6f74c06e174.yml
+openapi_spec_hash: 82df33badf54d0c7087a61145d379f58
+config_hash: 3279841440b02d4e8303c961d6983492
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 600830bf..7fbaeee9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,42 @@
# Changelog
+## 5.45.0 (2026-03-07)
+
+Full Changelog: [v5.44.0...v5.45.0](https://github.com/orbcorp/orb-node/compare/v5.44.0...v5.45.0)
+
+### Features
+
+* **api:** api update ([fc0292b](https://github.com/orbcorp/orb-node/commit/fc0292bb065e65eba0010879df704f97b422ca41))
+* **api:** api update ([295182a](https://github.com/orbcorp/orb-node/commit/295182a5de863633a751117d261047c830bc499d))
+* **api:** api update ([4e98ace](https://github.com/orbcorp/orb-node/commit/4e98ace57d456ad4e77421ae74eab18ade208ce7))
+* **api:** api update ([bfe8270](https://github.com/orbcorp/orb-node/commit/bfe8270c1e7aaa297e8dc5258f0e9bc905f3a88a))
+* **api:** api update ([57b665f](https://github.com/orbcorp/orb-node/commit/57b665f8d62be71de028d9d2944cacabb41edfc8))
+* **api:** api update ([a8fe88d](https://github.com/orbcorp/orb-node/commit/a8fe88da2c64e76c8bff26161dc97a29f8110909))
+* **api:** api update ([c76b284](https://github.com/orbcorp/orb-node/commit/c76b2844ff044681670d98568efd179058783f6f))
+* **api:** api update ([720c5a3](https://github.com/orbcorp/orb-node/commit/720c5a3e0989b93ee36734ef09e7d3795fe3a2dc))
+* **api:** api update ([1ddb26c](https://github.com/orbcorp/orb-node/commit/1ddb26ca1c2f60891ef1a11a7a1182a8ea4483d3))
+* **api:** api update ([5476617](https://github.com/orbcorp/orb-node/commit/5476617ca804ee1de20da3f084b8d9d02ad7e361))
+* **api:** manual updates ([d6168c3](https://github.com/orbcorp/orb-node/commit/d6168c30d48d79be48dc074b8c61350354cdbe69))
+
+
+### Bug Fixes
+
+* **client:** preserve URL params already embedded in path ([ff159b3](https://github.com/orbcorp/orb-node/commit/ff159b3a11672e6cf9a9bd37df098b5373e7dd97))
+* **docs/contributing:** correct pnpm link command ([69cfdec](https://github.com/orbcorp/orb-node/commit/69cfdec7ae1c862e6430fedba7a1534257153054))
+* fix request delays for retrying to be more respectful of high requested delays ([e28e89e](https://github.com/orbcorp/orb-node/commit/e28e89e3828daee3333582f654b9811611027357))
+
+
+### Chores
+
+* **ci:** skip uploading artifacts on stainless-internal branches ([c0dc840](https://github.com/orbcorp/orb-node/commit/c0dc84020c1a346e76d23f474f847485c818a016))
+* **docs:** add missing descriptions ([bb3d420](https://github.com/orbcorp/orb-node/commit/bb3d420ec711c7783d7ebf84a3fc3188dafc65e2))
+* **docs:** remove www prefix ([37e00fc](https://github.com/orbcorp/orb-node/commit/37e00fc4e60ac1107d74b83a1d2057aad91d13b5))
+* **internal:** codegen related update ([43c7ba8](https://github.com/orbcorp/orb-node/commit/43c7ba830b0546c01132ae9a333f631186706ff7))
+* **internal:** codegen related update ([8128355](https://github.com/orbcorp/orb-node/commit/8128355f63538b59a5be56e67397b65a1ca560f9))
+* **internal:** move stringifyQuery implementation to internal function ([cd14352](https://github.com/orbcorp/orb-node/commit/cd1435211504da9a1c270636477b1dd60904d522))
+* **test:** do not count install time for mock server timeout ([352ee5f](https://github.com/orbcorp/orb-node/commit/352ee5fcb680e65bf7a5f65182f9ade565a45f4e))
+* update mock server docs ([7186ac0](https://github.com/orbcorp/orb-node/commit/7186ac06f4803670d98bc10c97ee5bfce1a0b7f3))
+
## 5.44.0 (2026-02-03)
Full Changelog: [v5.43.0...v5.44.0](https://github.com/orbcorp/orb-node/compare/v5.43.0...v5.44.0)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 717743f3..22a49134 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -60,7 +60,7 @@ $ yarn link orb-billing
# With pnpm
$ pnpm link --global
$ cd ../my-package
-$ pnpm link -—global orb-billing
+$ pnpm link --global orb-billing
```
## Running tests
@@ -68,7 +68,7 @@ $ pnpm link -—global orb-billing
Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.
```sh
-$ npx prism mock path/to/your/openapi.yml
+$ ./scripts/mock
```
```sh
diff --git a/api.md b/api.md
index 5925d152..4b9c170e 100644
--- a/api.md
+++ b/api.md
@@ -355,6 +355,7 @@ Methods:
Types:
- InvoiceFetchUpcomingResponse
+- InvoiceIssueSummaryResponse
- InvoiceListSummaryResponse
Methods:
@@ -366,6 +367,7 @@ Methods:
- client.invoices.fetch(invoiceId) -> Invoice
- client.invoices.fetchUpcoming({ ...params }) -> InvoiceFetchUpcomingResponse
- client.invoices.issue(invoiceId, { ...params }) -> Invoice
+- client.invoices.issueSummary(invoiceId, { ...params }) -> InvoiceIssueSummaryResponse
- client.invoices.listSummary({ ...params }) -> InvoiceListSummaryResponsesPage
- client.invoices.markPaid(invoiceId, { ...params }) -> Invoice
- client.invoices.pay(invoiceId) -> Invoice
@@ -575,8 +577,64 @@ Methods:
Types:
- CreditBlockRetrieveResponse
+- CreditBlockListInvoicesResponse
Methods:
- client.creditBlocks.retrieve(blockId) -> CreditBlockRetrieveResponse
- client.creditBlocks.delete(blockId) -> void
+- client.creditBlocks.listInvoices(blockId) -> CreditBlockListInvoicesResponse
+
+# LicenseTypes
+
+Types:
+
+- LicenseTypeCreateResponse
+- LicenseTypeRetrieveResponse
+- LicenseTypeListResponse
+
+Methods:
+
+- client.licenseTypes.create({ ...params }) -> LicenseTypeCreateResponse
+- client.licenseTypes.retrieve(licenseTypeId) -> LicenseTypeRetrieveResponse
+- client.licenseTypes.list({ ...params }) -> LicenseTypeListResponsesPage
+
+# Licenses
+
+Types:
+
+- LicenseCreateResponse
+- LicenseRetrieveResponse
+- LicenseListResponse
+- LicenseDeactivateResponse
+- LicenseRetrieveByExternalIDResponse
+
+Methods:
+
+- client.licenses.create({ ...params }) -> LicenseCreateResponse
+- client.licenses.retrieve(licenseId) -> LicenseRetrieveResponse
+- client.licenses.list({ ...params }) -> LicenseListResponsesPage
+- client.licenses.deactivate(licenseId, { ...params }) -> LicenseDeactivateResponse
+- client.licenses.retrieveByExternalId(externalLicenseId, { ...params }) -> LicenseRetrieveByExternalIDResponse
+
+## ExternalLicenses
+
+Types:
+
+- ExternalLicenseGetUsageResponse
+
+Methods:
+
+- client.licenses.externalLicenses.getUsage(externalLicenseId, { ...params }) -> ExternalLicenseGetUsageResponse
+
+## Usage
+
+Types:
+
+- UsageGetAllUsageResponse
+- UsageGetUsageResponse
+
+Methods:
+
+- client.licenses.usage.getAllUsage({ ...params }) -> UsageGetAllUsageResponse
+- client.licenses.usage.getUsage(licenseId, { ...params }) -> UsageGetUsageResponse
diff --git a/package.json b/package.json
index ea6a6c42..e030f609 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "orb-billing",
- "version": "5.44.0",
+ "version": "5.45.0",
"description": "The official TypeScript library for the Orb API",
"author": "Orb ",
"types": "dist/index.d.ts",
diff --git a/scripts/mock b/scripts/mock
index 0b28f6ea..bcf3b392 100755
--- a/scripts/mock
+++ b/scripts/mock
@@ -21,11 +21,22 @@ echo "==> Starting mock server with URL ${URL}"
# Run prism mock on the given spec
if [ "$1" == "--daemon" ]; then
+ # Pre-install the package so the download doesn't eat into the startup timeout
+ npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism --version
+
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log &
- # Wait for server to come online
+ # Wait for server to come online (max 30s)
echo -n "Waiting for server"
+ attempts=0
while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do
+ attempts=$((attempts + 1))
+ if [ "$attempts" -ge 300 ]; then
+ echo
+ echo "Timed out waiting for Prism server to start"
+ cat .prism.log
+ exit 1
+ fi
echo -n "."
sleep 0.1
done
diff --git a/src/core.ts b/src/core.ts
index 961aff1f..c18ac5c4 100644
--- a/src/core.ts
+++ b/src/core.ts
@@ -6,6 +6,7 @@ import {
APIConnectionTimeoutError,
APIUserAbortError,
} from './error';
+import { stringifyQuery } from './internal/utils/query';
import {
kind as shimsKind,
type Readable,
@@ -523,32 +524,20 @@ export abstract class APIClient {
: new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
const defaultQuery = this.defaultQuery();
- if (!isEmptyObj(defaultQuery)) {
- query = { ...defaultQuery, ...query } as Req;
+ const pathQuery = Object.fromEntries(url.searchParams);
+ if (!isEmptyObj(defaultQuery) || !isEmptyObj(pathQuery)) {
+ query = { ...pathQuery, ...defaultQuery, ...query } as Req;
}
if (typeof query === 'object' && query && !Array.isArray(query)) {
- url.search = this.stringifyQuery(query as Record);
+ url.search = this.stringifyQuery(query);
}
return url.toString();
}
- protected stringifyQuery(query: Record): string {
- return Object.entries(query)
- .filter(([_, value]) => typeof value !== 'undefined')
- .map(([key, value]) => {
- if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
- return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
- }
- if (value === null) {
- return `${encodeURIComponent(key)}=`;
- }
- throw new OrbError(
- `Cannot stringify type ${typeof value}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`,
- );
- })
- .join('&');
+ protected stringifyQuery(query: object | Record): string {
+ return stringifyQuery(query);
}
async fetchWithTimeout(
@@ -630,9 +619,9 @@ export abstract class APIClient {
}
}
- // If the API asks us to wait a certain amount of time (and it's a reasonable amount),
- // just do what it says, but otherwise calculate a default
- if (!(timeoutMillis && 0 <= timeoutMillis && timeoutMillis < 60 * 1000)) {
+ // If the API asks us to wait a certain amount of time, do what it says.
+ // Otherwise calculate a default.
+ if (timeoutMillis === undefined) {
const maxRetries = options.maxRetries ?? this.maxRetries;
timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries);
}
diff --git a/src/index.ts b/src/index.ts
index 1b264f79..b2ecc854 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -1,7 +1,7 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { type Agent } from './_shims/index';
-import * as qs from './internal/qs';
+import { stringifyQuery } from './internal/utils/query';
import * as Core from './core';
import * as Errors from './error';
import * as Pagination from './pagination';
@@ -21,7 +21,11 @@ import {
AlertsPage,
Threshold,
} from './resources/alerts';
-import { CreditBlockRetrieveResponse, CreditBlocks } from './resources/credit-blocks';
+import {
+ CreditBlockListInvoicesResponse,
+ CreditBlockRetrieveResponse,
+ CreditBlocks,
+} from './resources/credit-blocks';
import { CreditNoteCreateParams, CreditNoteListParams, CreditNotes } from './resources/credit-notes';
import {
InvoiceLineItemCreateParams,
@@ -33,6 +37,8 @@ import {
InvoiceFetchUpcomingParams,
InvoiceFetchUpcomingResponse,
InvoiceIssueParams,
+ InvoiceIssueSummaryParams,
+ InvoiceIssueSummaryResponse,
InvoiceListParams,
InvoiceListSummaryParams,
InvoiceListSummaryResponse,
@@ -49,6 +55,15 @@ import {
Items,
ItemsPage,
} from './resources/items';
+import {
+ LicenseTypeCreateParams,
+ LicenseTypeCreateResponse,
+ LicenseTypeListParams,
+ LicenseTypeListResponse,
+ LicenseTypeListResponsesPage,
+ LicenseTypeRetrieveResponse,
+ LicenseTypes,
+} from './resources/license-types';
import {
BillableMetric,
BillableMetricsPage,
@@ -167,6 +182,19 @@ import {
EventUpdateResponse,
Events,
} from './resources/events/events';
+import {
+ LicenseCreateParams,
+ LicenseCreateResponse,
+ LicenseDeactivateParams,
+ LicenseDeactivateResponse,
+ LicenseListParams,
+ LicenseListResponse,
+ LicenseListResponsesPage,
+ LicenseRetrieveByExternalIDParams,
+ LicenseRetrieveByExternalIDResponse,
+ LicenseRetrieveResponse,
+ Licenses,
+} from './resources/licenses/licenses';
import {
Plan,
PlanCreateParams,
@@ -317,23 +345,105 @@ export class Orb extends Core.APIClient {
}
topLevel: API.TopLevel = new API.TopLevel(this);
+ /**
+ * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
+ * customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
+ * in the [Price resource](/reference/price).
+ */
beta: API.Beta = new API.Beta(this);
+ /**
+ * A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users.
+ */
coupons: API.Coupons = new API.Coupons(this);
+ /**
+ * The [Credit Note](/invoicing/credit-notes) resource represents a credit that has been applied to a
+ * particular invoice.
+ */
creditNotes: API.CreditNotes = new API.CreditNotes(this);
+ /**
+ * A customer is a buyer of your products, and the other party to the billing relationship.
+ *
+ * In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these
+ * match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an
+ * `external_customer_id` with your own identifier. See
+ * [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these
+ * aliases work in Orb.
+ *
+ * In addition to having an identifier in your system, a customer may exist in a payment provider solution like
+ * Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping.
+ *
+ * A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which
+ * defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for
+ * information on what this timezone parameter influences within Orb.
+ */
customers: API.Customers = new API.Customers(this);
+ /**
+ * The [Event](/core-concepts#event) resource represents a usage event that has been created for a
+ * customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for
+ * a given billing period.
+ */
events: API.Events = new API.Events(this);
+ /**
+ * An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, representing the request for payment for
+ * a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and
+ * can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as
+ * the result of an action, such as a cancellation.
+ */
invoiceLineItems: API.InvoiceLineItems = new API.InvoiceLineItems(this);
+ /**
+ * An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, representing the request for payment for
+ * a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and
+ * can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as
+ * the result of an action, such as a cancellation.
+ */
invoices: API.Invoices = new API.Invoices(this);
+ /**
+ * The Item resource represents a sellable product or good. Items are associated with all line items, billable metrics,
+ * and prices and are used for defining external sync behavior for invoices and tax calculation purposes.
+ */
items: API.Items = new API.Items(this);
+ /**
+ * The Metric resource represents a calculation of a quantity based on events.
+ * Metrics are defined by the query that transforms raw usage events into meaningful values for your customers.
+ */
metrics: API.Metrics = new API.Metrics(this);
+ /**
+ * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
+ * customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
+ * in the [Price resource](/reference/price).
+ */
plans: API.Plans = new API.Plans(this);
+ /**
+ * The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in
+ * the form of an invoice line item. Prices take a quantity and determine an amount to bill.
+ *
+ * Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a
+ * given Price object. The model_type field determines the key for the configuration object that is present.
+ *
+ * For more on the types of prices, see [the core concepts documentation](/core-concepts#plan-and-price)
+ */
prices: API.Prices = new API.Prices(this);
subscriptions: API.Subscriptions = new API.Subscriptions(this);
webhooks: API.Webhooks = new API.Webhooks(this);
+ /**
+ * [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending,
+ * usage, or credit balance and trigger webhooks when a threshold is exceeded.
+ *
+ * Alerts created through the API can be scoped to either customers or subscriptions.
+ */
alerts: API.Alerts = new API.Alerts(this);
dimensionalPriceGroups: API.DimensionalPriceGroups = new API.DimensionalPriceGroups(this);
subscriptionChanges: API.SubscriptionChanges = new API.SubscriptionChanges(this);
+ /**
+ * The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb.
+ */
creditBlocks: API.CreditBlocks = new API.CreditBlocks(this);
+ /**
+ * The LicenseType resource represents a type of license that can be assigned to users.
+ * License types are used during billing by grouping metrics on the configured grouping key.
+ */
+ licenseTypes: API.LicenseTypes = new API.LicenseTypes(this);
+ licenses: API.Licenses = new API.Licenses(this);
/**
* Check whether the base URL is set to its default.
@@ -357,8 +467,8 @@ export class Orb extends Core.APIClient {
return { Authorization: `Bearer ${this.apiKey}` };
}
- protected override stringifyQuery(query: Record): string {
- return qs.stringify(query, { arrayFormat: 'brackets' });
+ protected override stringifyQuery(query: object | Record): string {
+ return stringifyQuery(query);
}
static Orb = this;
@@ -420,6 +530,10 @@ Orb.DimensionalPriceGroupsPage = DimensionalPriceGroupsPage;
Orb.SubscriptionChanges = SubscriptionChanges;
Orb.SubscriptionChangeListResponsesPage = SubscriptionChangeListResponsesPage;
Orb.CreditBlocks = CreditBlocks;
+Orb.LicenseTypes = LicenseTypes;
+Orb.LicenseTypeListResponsesPage = LicenseTypeListResponsesPage;
+Orb.Licenses = Licenses;
+Orb.LicenseListResponsesPage = LicenseListResponsesPage;
export declare namespace Orb {
export type RequestOptions = Core.RequestOptions;
@@ -489,6 +603,7 @@ export declare namespace Orb {
export {
Invoices as Invoices,
type InvoiceFetchUpcomingResponse as InvoiceFetchUpcomingResponse,
+ type InvoiceIssueSummaryResponse as InvoiceIssueSummaryResponse,
type InvoiceListSummaryResponse as InvoiceListSummaryResponse,
InvoiceListSummaryResponsesPage as InvoiceListSummaryResponsesPage,
type InvoiceCreateParams as InvoiceCreateParams,
@@ -496,6 +611,7 @@ export declare namespace Orb {
type InvoiceListParams as InvoiceListParams,
type InvoiceFetchUpcomingParams as InvoiceFetchUpcomingParams,
type InvoiceIssueParams as InvoiceIssueParams,
+ type InvoiceIssueSummaryParams as InvoiceIssueSummaryParams,
type InvoiceListSummaryParams as InvoiceListSummaryParams,
type InvoiceMarkPaidParams as InvoiceMarkPaidParams,
};
@@ -626,7 +742,35 @@ export declare namespace Orb {
type SubscriptionChangeApplyParams as SubscriptionChangeApplyParams,
};
- export { CreditBlocks as CreditBlocks, type CreditBlockRetrieveResponse as CreditBlockRetrieveResponse };
+ export {
+ CreditBlocks as CreditBlocks,
+ type CreditBlockRetrieveResponse as CreditBlockRetrieveResponse,
+ type CreditBlockListInvoicesResponse as CreditBlockListInvoicesResponse,
+ };
+
+ export {
+ LicenseTypes as LicenseTypes,
+ type LicenseTypeCreateResponse as LicenseTypeCreateResponse,
+ type LicenseTypeRetrieveResponse as LicenseTypeRetrieveResponse,
+ type LicenseTypeListResponse as LicenseTypeListResponse,
+ LicenseTypeListResponsesPage as LicenseTypeListResponsesPage,
+ type LicenseTypeCreateParams as LicenseTypeCreateParams,
+ type LicenseTypeListParams as LicenseTypeListParams,
+ };
+
+ export {
+ Licenses as Licenses,
+ type LicenseCreateResponse as LicenseCreateResponse,
+ type LicenseRetrieveResponse as LicenseRetrieveResponse,
+ type LicenseListResponse as LicenseListResponse,
+ type LicenseDeactivateResponse as LicenseDeactivateResponse,
+ type LicenseRetrieveByExternalIDResponse as LicenseRetrieveByExternalIDResponse,
+ LicenseListResponsesPage as LicenseListResponsesPage,
+ type LicenseCreateParams as LicenseCreateParams,
+ type LicenseListParams as LicenseListParams,
+ type LicenseDeactivateParams as LicenseDeactivateParams,
+ type LicenseRetrieveByExternalIDParams as LicenseRetrieveByExternalIDParams,
+ };
export type Address = API.Address;
export type AdjustmentInterval = API.AdjustmentInterval;
diff --git a/src/internal/utils/query.ts b/src/internal/utils/query.ts
new file mode 100644
index 00000000..f7d1b4b2
--- /dev/null
+++ b/src/internal/utils/query.ts
@@ -0,0 +1,7 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import * as qs from '../qs/stringify';
+
+export function stringifyQuery(query: object | Record) {
+ return qs.stringify(query, { arrayFormat: 'brackets' });
+}
diff --git a/src/resources/alerts.ts b/src/resources/alerts.ts
index 7e3ab7c9..cb4617d8 100644
--- a/src/resources/alerts.ts
+++ b/src/resources/alerts.ts
@@ -6,6 +6,12 @@ import * as Core from '../core';
import * as Shared from './shared';
import { Page, type PageParams } from '../pagination';
+/**
+ * [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending,
+ * usage, or credit balance and trigger webhooks when a threshold is exceeded.
+ *
+ * Alerts created through the API can be scoped to either customers or subscriptions.
+ */
export class Alerts extends APIResource {
/**
* This endpoint retrieves an alert by its ID.
@@ -233,6 +239,12 @@ export interface Alert {
*/
balance_alert_status?: Array | null;
+ /**
+ * The property keys to group cost alerts by. Only present for cost alerts with
+ * grouping enabled.
+ */
+ grouping_keys?: Array | null;
+
/**
* Minified license type for alert serialization.
*/
@@ -378,10 +390,22 @@ export interface AlertCreateForSubscriptionParams {
*/
type: 'usage_exceeded' | 'cost_exceeded';
+ /**
+ * The property keys to group cost alerts by. Only applicable for cost_exceeded
+ * alerts.
+ */
+ grouping_keys?: Array | null;
+
/**
* The metric to track usage for.
*/
metric_id?: string | null;
+
+ /**
+ * The pricing unit to use for grouped cost alerts. Required when grouping_keys is
+ * set.
+ */
+ pricing_unit_id?: string | null;
}
export interface AlertDisableParams {
diff --git a/src/resources/beta/beta.ts b/src/resources/beta/beta.ts
index 87dba090..77890eda 100644
--- a/src/resources/beta/beta.ts
+++ b/src/resources/beta/beta.ts
@@ -11,6 +11,11 @@ import {
} from './external-plan-id';
import * as PlansAPI from '../plans/plans';
+/**
+ * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
+ * customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
+ * in the [Price resource](/reference/price).
+ */
export class Beta extends APIResource {
externalPlanId: ExternalPlanIDAPI.ExternalPlanID = new ExternalPlanIDAPI.ExternalPlanID(this._client);
@@ -166,6 +171,43 @@ export namespace BetaCreatePlanVersionParams {
*/
allocation_price?: Shared.NewAllocationPrice | null;
+ /**
+ * The license allocation price to add to the plan.
+ */
+ license_allocation_price?:
+ | AddPrice.NewLicenseAllocationUnitPrice
+ | AddPrice.NewLicenseAllocationTieredPrice
+ | AddPrice.NewLicenseAllocationBulkPrice
+ | AddPrice.NewLicenseAllocationBulkWithFiltersPrice
+ | AddPrice.NewLicenseAllocationPackagePrice
+ | AddPrice.NewLicenseAllocationMatrixPrice
+ | AddPrice.NewLicenseAllocationThresholdTotalAmountPrice
+ | AddPrice.NewLicenseAllocationTieredPackagePrice
+ | AddPrice.NewLicenseAllocationTieredWithMinimumPrice
+ | AddPrice.NewLicenseAllocationGroupedTieredPrice
+ | AddPrice.NewLicenseAllocationTieredPackageWithMinimumPrice
+ | AddPrice.NewLicenseAllocationPackageWithAllocationPrice
+ | AddPrice.NewLicenseAllocationUnitWithPercentPrice
+ | AddPrice.NewLicenseAllocationMatrixWithAllocationPrice
+ | AddPrice.NewLicenseAllocationTieredWithProrationPrice
+ | AddPrice.NewLicenseAllocationUnitWithProrationPrice
+ | AddPrice.NewLicenseAllocationGroupedAllocationPrice
+ | AddPrice.NewLicenseAllocationBulkWithProrationPrice
+ | AddPrice.NewLicenseAllocationGroupedWithProratedMinimumPrice
+ | AddPrice.NewLicenseAllocationGroupedWithMeteredMinimumPrice
+ | AddPrice.NewLicenseAllocationGroupedWithMinMaxThresholdsPrice
+ | AddPrice.NewLicenseAllocationMatrixWithDisplayNamePrice
+ | AddPrice.NewLicenseAllocationGroupedTieredPackagePrice
+ | AddPrice.NewLicenseAllocationMaxGroupTieredPackagePrice
+ | AddPrice.NewLicenseAllocationScalableMatrixWithUnitPricingPrice
+ | AddPrice.NewLicenseAllocationScalableMatrixWithTieredPricingPrice
+ | AddPrice.NewLicenseAllocationCumulativeGroupedBulkPrice
+ | AddPrice.NewLicenseAllocationCumulativeGroupedAllocationPrice
+ | AddPrice.NewLicenseAllocationMinimumCompositePrice
+ | AddPrice.NewLicenseAllocationPercentCompositePrice
+ | AddPrice.NewLicenseAllocationEventOutputPrice
+ | null;
+
/**
* The phase to add this price to.
*/
@@ -210,12 +252,7 @@ export namespace BetaCreatePlanVersionParams {
}
export namespace AddPrice {
- export interface NewPlanBulkWithFiltersPrice {
- /**
- * Configuration for bulk_with_filters pricing
- */
- bulk_with_filters_config: NewPlanBulkWithFiltersPrice.BulkWithFiltersConfig;
-
+ export interface NewLicenseAllocationUnitPrice {
/**
* The cadence to bill for this price on.
*/
@@ -226,16 +263,28 @@ export namespace BetaCreatePlanVersionParams {
*/
item_id: string;
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
/**
* The pricing model type
*/
- model_type: 'bulk_with_filters';
+ model_type: 'unit';
/**
* The name of the price.
*/
name: string;
+ /**
+ * Configuration for unit pricing
+ */
+ unit_config: Shared.UnitConfig;
+
/**
* The id of the billable metric for the price. Only needed if the price is
* usage-based.
@@ -297,6 +346,11 @@ export namespace BetaCreatePlanVersionParams {
*/
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
/**
* User-specified key/value pairs for the resource. Individual keys can be removed
* by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -311,56 +365,163 @@ export namespace BetaCreatePlanVersionParams {
reference_id?: string | null;
}
- export namespace NewPlanBulkWithFiltersPrice {
- /**
- * Configuration for bulk_with_filters pricing
- */
- export interface BulkWithFiltersConfig {
+ export namespace NewLicenseAllocationUnitPrice {
+ export interface LicenseAllocation {
/**
- * Property filters to apply (all must match)
+ * The amount of credits granted per active license per cadence.
*/
- filters: Array;
+ amount: string;
/**
- * Bulk tiers for rating based on total usage volume
+ * The currency of the license allocation.
*/
- tiers: Array;
- }
+ currency: string;
- export namespace BulkWithFiltersConfig {
/**
- * Configuration for a single property filter
+ * When True, overage beyond the allocation is written off.
*/
- export interface Filter {
- /**
- * Event property key to filter on
- */
- property_key: string;
+ write_off_overage?: boolean | null;
+ }
+ }
- /**
- * Event property value to match
- */
- property_value: string;
- }
+ export interface NewLicenseAllocationTieredPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'tiered';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for tiered pricing
+ */
+ tiered_config: Shared.TieredConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+ export namespace NewLicenseAllocationTieredPrice {
+ export interface LicenseAllocation {
/**
- * Configuration for a single bulk pricing tier
+ * The amount of credits granted per active license per cadence.
*/
- export interface Tier {
- /**
- * Amount per unit
- */
- unit_amount: string;
+ amount: string;
- /**
- * The lower bound for this tier
- */
- tier_lower_bound?: string | null;
- }
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
}
}
- export interface NewPlanTieredWithProrationPrice {
+ export interface NewLicenseAllocationBulkPrice {
+ /**
+ * Configuration for bulk pricing
+ */
+ bulk_config: Shared.BulkConfig;
+
/**
* The cadence to bill for this price on.
*/
@@ -371,10 +532,17 @@ export namespace BetaCreatePlanVersionParams {
*/
item_id: string;
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
/**
* The pricing model type
*/
- model_type: 'tiered_with_proration';
+ model_type: 'bulk';
/**
* The name of the price.
@@ -382,9 +550,9530 @@ export namespace BetaCreatePlanVersionParams {
name: string;
/**
- * Configuration for tiered_with_proration pricing
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
*/
- tiered_with_proration_config: NewPlanTieredWithProrationPrice.TieredWithProrationConfig;
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationBulkPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationBulkWithFiltersPrice {
+ /**
+ * Configuration for bulk_with_filters pricing
+ */
+ bulk_with_filters_config: NewLicenseAllocationBulkWithFiltersPrice.BulkWithFiltersConfig;
+
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'bulk_with_filters';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationBulkWithFiltersPrice {
+ /**
+ * Configuration for bulk_with_filters pricing
+ */
+ export interface BulkWithFiltersConfig {
+ /**
+ * Property filters to apply (all must match)
+ */
+ filters: Array;
+
+ /**
+ * Bulk tiers for rating based on total usage volume
+ */
+ tiers: Array;
+ }
+
+ export namespace BulkWithFiltersConfig {
+ /**
+ * Configuration for a single property filter
+ */
+ export interface Filter {
+ /**
+ * Event property key to filter on
+ */
+ property_key: string;
+
+ /**
+ * Event property value to match
+ */
+ property_value: string;
+ }
+
+ /**
+ * Configuration for a single bulk pricing tier
+ */
+ export interface Tier {
+ /**
+ * Amount per unit
+ */
+ unit_amount: string;
+
+ /**
+ * The lower bound for this tier
+ */
+ tier_lower_bound?: string | null;
+ }
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationPackagePrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'package';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for package pricing
+ */
+ package_config: Shared.PackageConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationPackagePrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationMatrixPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * Configuration for matrix pricing
+ */
+ matrix_config: Shared.MatrixConfig;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'matrix';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationMatrixPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationThresholdTotalAmountPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'threshold_total_amount';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for threshold_total_amount pricing
+ */
+ threshold_total_amount_config: NewLicenseAllocationThresholdTotalAmountPrice.ThresholdTotalAmountConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationThresholdTotalAmountPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for threshold_total_amount pricing
+ */
+ export interface ThresholdTotalAmountConfig {
+ /**
+ * When the quantity consumed passes a provided threshold, the configured total
+ * will be charged
+ */
+ consumption_table: Array;
+
+ /**
+ * If true, the unit price will be prorated to the billing period
+ */
+ prorate?: boolean | null;
+ }
+
+ export namespace ThresholdTotalAmountConfig {
+ /**
+ * Configuration for a single threshold
+ */
+ export interface ConsumptionTable {
+ threshold: string;
+
+ /**
+ * Total amount for this threshold
+ */
+ total_amount: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationTieredPackagePrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'tiered_package';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for tiered_package pricing
+ */
+ tiered_package_config: NewLicenseAllocationTieredPackagePrice.TieredPackageConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationTieredPackagePrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for tiered_package pricing
+ */
+ export interface TieredPackageConfig {
+ package_size: string;
+
+ /**
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
+ * are defined using exclusive lower bounds. The tier bounds are defined based on
+ * the total quantity rather than the number of packages, so they must be multiples
+ * of the package size.
+ */
+ tiers: Array;
+ }
+
+ export namespace TieredPackageConfig {
+ /**
+ * Configuration for a single tier with business logic
+ */
+ export interface Tier {
+ /**
+ * Price per package
+ */
+ per_unit: string;
+
+ tier_lower_bound: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationTieredWithMinimumPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'tiered_with_minimum';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for tiered_with_minimum pricing
+ */
+ tiered_with_minimum_config: NewLicenseAllocationTieredWithMinimumPrice.TieredWithMinimumConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationTieredWithMinimumPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for tiered_with_minimum pricing
+ */
+ export interface TieredWithMinimumConfig {
+ /**
+ * Tiered pricing with a minimum amount dependent on the volume tier. Tiers are
+ * defined using exclusive lower bounds.
+ */
+ tiers: Array;
+
+ /**
+ * If true, tiers with an accrued amount of 0 will not be included in the rating.
+ */
+ hide_zero_amount_tiers?: boolean;
+
+ /**
+ * If true, the unit price will be prorated to the billing period
+ */
+ prorate?: boolean;
+ }
+
+ export namespace TieredWithMinimumConfig {
+ /**
+ * Configuration for a single tier
+ */
+ export interface Tier {
+ minimum_amount: string;
+
+ tier_lower_bound: string;
+
+ /**
+ * Per unit amount
+ */
+ unit_amount: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationGroupedTieredPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for grouped_tiered pricing
+ */
+ grouped_tiered_config: NewLicenseAllocationGroupedTieredPrice.GroupedTieredConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'grouped_tiered';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationGroupedTieredPrice {
+ /**
+ * Configuration for grouped_tiered pricing
+ */
+ export interface GroupedTieredConfig {
+ /**
+ * The billable metric property used to group before tiering
+ */
+ grouping_key: string;
+
+ /**
+ * Apply tiered pricing to each segment generated after grouping with the provided
+ * key
+ */
+ tiers: Array;
+ }
+
+ export namespace GroupedTieredConfig {
+ /**
+ * Configuration for a single tier
+ */
+ export interface Tier {
+ tier_lower_bound: string;
+
+ /**
+ * Per unit amount
+ */
+ unit_amount: string;
+ }
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationTieredPackageWithMinimumPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'tiered_package_with_minimum';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for tiered_package_with_minimum pricing
+ */
+ tiered_package_with_minimum_config: NewLicenseAllocationTieredPackageWithMinimumPrice.TieredPackageWithMinimumConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationTieredPackageWithMinimumPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for tiered_package_with_minimum pricing
+ */
+ export interface TieredPackageWithMinimumConfig {
+ package_size: number;
+
+ /**
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
+ * are defined using exclusive lower bounds.
+ */
+ tiers: Array;
+ }
+
+ export namespace TieredPackageWithMinimumConfig {
+ /**
+ * Configuration for a single tier
+ */
+ export interface Tier {
+ minimum_amount: string;
+
+ per_unit: string;
+
+ tier_lower_bound: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationPackageWithAllocationPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'package_with_allocation';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for package_with_allocation pricing
+ */
+ package_with_allocation_config: NewLicenseAllocationPackageWithAllocationPrice.PackageWithAllocationConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationPackageWithAllocationPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for package_with_allocation pricing
+ */
+ export interface PackageWithAllocationConfig {
+ allocation: string;
+
+ package_amount: string;
+
+ package_size: string;
+ }
+ }
+
+ export interface NewLicenseAllocationUnitWithPercentPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'unit_with_percent';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for unit_with_percent pricing
+ */
+ unit_with_percent_config: NewLicenseAllocationUnitWithPercentPrice.UnitWithPercentConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationUnitWithPercentPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for unit_with_percent pricing
+ */
+ export interface UnitWithPercentConfig {
+ /**
+ * What percent, out of 100, of the calculated total to charge
+ */
+ percent: string;
+
+ /**
+ * Rate per unit of usage
+ */
+ unit_amount: string;
+ }
+ }
+
+ export interface NewLicenseAllocationMatrixWithAllocationPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * Configuration for matrix_with_allocation pricing
+ */
+ matrix_with_allocation_config: Shared.MatrixWithAllocationConfig;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'matrix_with_allocation';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationMatrixWithAllocationPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationTieredWithProrationPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'tiered_with_proration';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for tiered_with_proration pricing
+ */
+ tiered_with_proration_config: NewLicenseAllocationTieredWithProrationPrice.TieredWithProrationConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationTieredWithProrationPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for tiered_with_proration pricing
+ */
+ export interface TieredWithProrationConfig {
+ /**
+ * Tiers for rating based on total usage quantities into the specified tier with
+ * proration
+ */
+ tiers: Array;
+ }
+
+ export namespace TieredWithProrationConfig {
+ /**
+ * Configuration for a single tiered with proration tier
+ */
+ export interface Tier {
+ /**
+ * Inclusive tier starting value
+ */
+ tier_lower_bound: string;
+
+ /**
+ * Amount per unit
+ */
+ unit_amount: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationUnitWithProrationPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'unit_with_proration';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for unit_with_proration pricing
+ */
+ unit_with_proration_config: NewLicenseAllocationUnitWithProrationPrice.UnitWithProrationConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationUnitWithProrationPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for unit_with_proration pricing
+ */
+ export interface UnitWithProrationConfig {
+ /**
+ * Rate per unit of usage
+ */
+ unit_amount: string;
+ }
+ }
+
+ export interface NewLicenseAllocationGroupedAllocationPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for grouped_allocation pricing
+ */
+ grouped_allocation_config: NewLicenseAllocationGroupedAllocationPrice.GroupedAllocationConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'grouped_allocation';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationGroupedAllocationPrice {
+ /**
+ * Configuration for grouped_allocation pricing
+ */
+ export interface GroupedAllocationConfig {
+ /**
+ * Usage allocation per group
+ */
+ allocation: string;
+
+ /**
+ * How to determine the groups that should each be allocated some quantity
+ */
+ grouping_key: string;
+
+ /**
+ * Unit rate for post-allocation
+ */
+ overage_unit_rate: string;
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationBulkWithProrationPrice {
+ /**
+ * Configuration for bulk_with_proration pricing
+ */
+ bulk_with_proration_config: NewLicenseAllocationBulkWithProrationPrice.BulkWithProrationConfig;
+
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'bulk_with_proration';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationBulkWithProrationPrice {
+ /**
+ * Configuration for bulk_with_proration pricing
+ */
+ export interface BulkWithProrationConfig {
+ /**
+ * Bulk tiers for rating based on total usage volume
+ */
+ tiers: Array;
+ }
+
+ export namespace BulkWithProrationConfig {
+ /**
+ * Configuration for a single bulk pricing tier with proration
+ */
+ export interface Tier {
+ /**
+ * Cost per unit
+ */
+ unit_amount: string;
+
+ /**
+ * The lower bound for this tier
+ */
+ tier_lower_bound?: string | null;
+ }
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationGroupedWithProratedMinimumPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for grouped_with_prorated_minimum pricing
+ */
+ grouped_with_prorated_minimum_config: NewLicenseAllocationGroupedWithProratedMinimumPrice.GroupedWithProratedMinimumConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'grouped_with_prorated_minimum';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationGroupedWithProratedMinimumPrice {
+ /**
+ * Configuration for grouped_with_prorated_minimum pricing
+ */
+ export interface GroupedWithProratedMinimumConfig {
+ /**
+ * How to determine the groups that should each have a minimum
+ */
+ grouping_key: string;
+
+ /**
+ * The minimum amount to charge per group
+ */
+ minimum: string;
+
+ /**
+ * The amount to charge per unit
+ */
+ unit_rate: string;
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationGroupedWithMeteredMinimumPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for grouped_with_metered_minimum pricing
+ */
+ grouped_with_metered_minimum_config: NewLicenseAllocationGroupedWithMeteredMinimumPrice.GroupedWithMeteredMinimumConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'grouped_with_metered_minimum';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationGroupedWithMeteredMinimumPrice {
+ /**
+ * Configuration for grouped_with_metered_minimum pricing
+ */
+ export interface GroupedWithMeteredMinimumConfig {
+ /**
+ * Used to partition the usage into groups. The minimum amount is applied to each
+ * group.
+ */
+ grouping_key: string;
+
+ /**
+ * The minimum amount to charge per group per unit
+ */
+ minimum_unit_amount: string;
+
+ /**
+ * Used to determine the unit rate
+ */
+ pricing_key: string;
+
+ /**
+ * Scale the unit rates by the scaling factor.
+ */
+ scaling_factors: Array;
+
+ /**
+ * Used to determine the unit rate scaling factor
+ */
+ scaling_key: string;
+
+ /**
+ * Apply per unit pricing to each pricing value. The minimum amount is applied any
+ * unmatched usage.
+ */
+ unit_amounts: Array;
+ }
+
+ export namespace GroupedWithMeteredMinimumConfig {
+ /**
+ * Configuration for a scaling factor
+ */
+ export interface ScalingFactor {
+ scaling_factor: string;
+
+ scaling_value: string;
+ }
+
+ /**
+ * Configuration for a unit amount
+ */
+ export interface UnitAmount {
+ pricing_value: string;
+
+ /**
+ * Per unit amount
+ */
+ unit_amount: string;
+ }
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationGroupedWithMinMaxThresholdsPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for grouped_with_min_max_thresholds pricing
+ */
+ grouped_with_min_max_thresholds_config: NewLicenseAllocationGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'grouped_with_min_max_thresholds';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationGroupedWithMinMaxThresholdsPrice {
+ /**
+ * Configuration for grouped_with_min_max_thresholds pricing
+ */
+ export interface GroupedWithMinMaxThresholdsConfig {
+ /**
+ * The event property used to group before applying thresholds
+ */
+ grouping_key: string;
+
+ /**
+ * The maximum amount to charge each group
+ */
+ maximum_charge: string;
+
+ /**
+ * The minimum amount to charge each group, regardless of usage
+ */
+ minimum_charge: string;
+
+ /**
+ * The base price charged per group
+ */
+ per_unit_rate: string;
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationMatrixWithDisplayNamePrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * Configuration for matrix_with_display_name pricing
+ */
+ matrix_with_display_name_config: NewLicenseAllocationMatrixWithDisplayNamePrice.MatrixWithDisplayNameConfig;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'matrix_with_display_name';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationMatrixWithDisplayNamePrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for matrix_with_display_name pricing
+ */
+ export interface MatrixWithDisplayNameConfig {
+ /**
+ * Used to determine the unit rate
+ */
+ dimension: string;
+
+ /**
+ * Apply per unit pricing to each dimension value
+ */
+ unit_amounts: Array;
+ }
+
+ export namespace MatrixWithDisplayNameConfig {
+ /**
+ * Configuration for a unit amount item
+ */
+ export interface UnitAmount {
+ /**
+ * The dimension value
+ */
+ dimension_value: string;
+
+ /**
+ * Display name for this dimension value
+ */
+ display_name: string;
+
+ /**
+ * Per unit amount
+ */
+ unit_amount: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationGroupedTieredPackagePrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for grouped_tiered_package pricing
+ */
+ grouped_tiered_package_config: NewLicenseAllocationGroupedTieredPackagePrice.GroupedTieredPackageConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'grouped_tiered_package';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationGroupedTieredPackagePrice {
+ /**
+ * Configuration for grouped_tiered_package pricing
+ */
+ export interface GroupedTieredPackageConfig {
+ /**
+ * The event property used to group before tiering
+ */
+ grouping_key: string;
+
+ package_size: string;
+
+ /**
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
+ * are defined using exclusive lower bounds.
+ */
+ tiers: Array;
+ }
+
+ export namespace GroupedTieredPackageConfig {
+ /**
+ * Configuration for a single tier
+ */
+ export interface Tier {
+ /**
+ * Per package
+ */
+ per_unit: string;
+
+ tier_lower_bound: string;
+ }
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationMaxGroupTieredPackagePrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * Configuration for max_group_tiered_package pricing
+ */
+ max_group_tiered_package_config: NewLicenseAllocationMaxGroupTieredPackagePrice.MaxGroupTieredPackageConfig;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'max_group_tiered_package';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationMaxGroupTieredPackagePrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for max_group_tiered_package pricing
+ */
+ export interface MaxGroupTieredPackageConfig {
+ /**
+ * The event property used to group before tiering the group with the highest value
+ */
+ grouping_key: string;
+
+ package_size: string;
+
+ /**
+ * Apply tiered pricing to the largest group after grouping with the provided key.
+ */
+ tiers: Array;
+ }
+
+ export namespace MaxGroupTieredPackageConfig {
+ /**
+ * Configuration for a single tier
+ */
+ export interface Tier {
+ tier_lower_bound: string;
+
+ /**
+ * Per unit amount
+ */
+ unit_amount: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationScalableMatrixWithUnitPricingPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'scalable_matrix_with_unit_pricing';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for scalable_matrix_with_unit_pricing pricing
+ */
+ scalable_matrix_with_unit_pricing_config: NewLicenseAllocationScalableMatrixWithUnitPricingPrice.ScalableMatrixWithUnitPricingConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationScalableMatrixWithUnitPricingPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for scalable_matrix_with_unit_pricing pricing
+ */
+ export interface ScalableMatrixWithUnitPricingConfig {
+ /**
+ * Used to determine the unit rate
+ */
+ first_dimension: string;
+
+ /**
+ * Apply a scaling factor to each dimension
+ */
+ matrix_scaling_factors: Array;
+
+ /**
+ * The final unit price to rate against the output of the matrix
+ */
+ unit_price: string;
+
+ /**
+ * The property used to group this price
+ */
+ grouping_key?: string | null;
+
+ /**
+ * If true, the unit price will be prorated to the billing period
+ */
+ prorate?: boolean | null;
+
+ /**
+ * Used to determine the unit rate (optional)
+ */
+ second_dimension?: string | null;
+ }
+
+ export namespace ScalableMatrixWithUnitPricingConfig {
+ /**
+ * Configuration for a single matrix scaling factor
+ */
+ export interface MatrixScalingFactor {
+ first_dimension_value: string;
+
+ scaling_factor: string;
+
+ second_dimension_value?: string | null;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationScalableMatrixWithTieredPricingPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'scalable_matrix_with_tiered_pricing';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for scalable_matrix_with_tiered_pricing pricing
+ */
+ scalable_matrix_with_tiered_pricing_config: NewLicenseAllocationScalableMatrixWithTieredPricingPrice.ScalableMatrixWithTieredPricingConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationScalableMatrixWithTieredPricingPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for scalable_matrix_with_tiered_pricing pricing
+ */
+ export interface ScalableMatrixWithTieredPricingConfig {
+ /**
+ * Used for the scalable matrix first dimension
+ */
+ first_dimension: string;
+
+ /**
+ * Apply a scaling factor to each dimension
+ */
+ matrix_scaling_factors: Array;
+
+ tiers: Array;
+
+ /**
+ * Used for the scalable matrix second dimension (optional)
+ */
+ second_dimension?: string | null;
+ }
+
+ export namespace ScalableMatrixWithTieredPricingConfig {
+ /**
+ * Configuration for a single matrix scaling factor
+ */
+ export interface MatrixScalingFactor {
+ first_dimension_value: string;
+
+ scaling_factor: string;
+
+ second_dimension_value?: string | null;
+ }
+
+ /**
+ * Configuration for a single tier entry with business logic
+ */
+ export interface Tier {
+ tier_lower_bound: string;
+
+ unit_amount: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationCumulativeGroupedBulkPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for cumulative_grouped_bulk pricing
+ */
+ cumulative_grouped_bulk_config: NewLicenseAllocationCumulativeGroupedBulkPrice.CumulativeGroupedBulkConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'cumulative_grouped_bulk';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationCumulativeGroupedBulkPrice {
+ /**
+ * Configuration for cumulative_grouped_bulk pricing
+ */
+ export interface CumulativeGroupedBulkConfig {
+ /**
+ * Each tier lower bound must have the same group of values.
+ */
+ dimension_values: Array;
+
+ group: string;
+ }
+
+ export namespace CumulativeGroupedBulkConfig {
+ /**
+ * Configuration for a dimension value entry
+ */
+ export interface DimensionValue {
+ /**
+ * Grouping key value
+ */
+ grouping_key: string;
+
+ /**
+ * Tier lower bound
+ */
+ tier_lower_bound: string;
+
+ /**
+ * Unit amount for this combination
+ */
+ unit_amount: string;
+ }
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationCumulativeGroupedAllocationPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for cumulative_grouped_allocation pricing
+ */
+ cumulative_grouped_allocation_config: NewLicenseAllocationCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'cumulative_grouped_allocation';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationCumulativeGroupedAllocationPrice {
+ /**
+ * Configuration for cumulative_grouped_allocation pricing
+ */
+ export interface CumulativeGroupedAllocationConfig {
+ /**
+ * The overall allocation across all groups
+ */
+ cumulative_allocation: string;
+
+ /**
+ * The allocation per individual group
+ */
+ group_allocation: string;
+
+ /**
+ * The event property used to group usage before applying allocations
+ */
+ grouping_key: string;
+
+ /**
+ * The amount to charge for each unit outside of the allocation
+ */
+ unit_amount: string;
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationMinimumCompositePrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * Configuration for minimum_composite pricing
+ */
+ minimum_composite_config: NewLicenseAllocationMinimumCompositePrice.MinimumCompositeConfig;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'minimum_composite';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationMinimumCompositePrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for minimum_composite pricing
+ */
+ export interface MinimumCompositeConfig {
+ /**
+ * The minimum amount to apply
+ */
+ minimum_amount: string;
+
+ /**
+ * If true, subtotals from this price are prorated based on the service period
+ */
+ prorated?: boolean;
+ }
+ }
+
+ export interface NewLicenseAllocationPercentCompositePrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'percent';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for percent pricing
+ */
+ percent_config: NewLicenseAllocationPercentCompositePrice.PercentConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationPercentCompositePrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for percent pricing
+ */
+ export interface PercentConfig {
+ /**
+ * What percent of the component subtotals to charge
+ */
+ percent: number;
+ }
+ }
+
+ export interface NewLicenseAllocationEventOutputPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for event_output pricing
+ */
+ event_output_config: NewLicenseAllocationEventOutputPrice.EventOutputConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'event_output';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationEventOutputPrice {
+ /**
+ * Configuration for event_output pricing
+ */
+ export interface EventOutputConfig {
+ /**
+ * The key in the event data to extract the unit rate from.
+ */
+ unit_rating_key: string;
+
+ /**
+ * If provided, this amount will be used as the unit rate when an event does not
+ * have a value for the `unit_rating_key`. If not provided, events missing a unit
+ * rate will be ignored.
+ */
+ default_unit_rate?: string | null;
+
+ /**
+ * An optional key in the event data to group by (e.g., event ID). All events will
+ * also be grouped by their unit rate.
+ */
+ grouping_key?: string | null;
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewPlanBulkWithFiltersPrice {
+ /**
+ * Configuration for bulk_with_filters pricing
+ */
+ bulk_with_filters_config: NewPlanBulkWithFiltersPrice.BulkWithFiltersConfig;
+
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'bulk_with_filters';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewPlanBulkWithFiltersPrice {
+ /**
+ * Configuration for bulk_with_filters pricing
+ */
+ export interface BulkWithFiltersConfig {
+ /**
+ * Property filters to apply (all must match)
+ */
+ filters: Array;
+
+ /**
+ * Bulk tiers for rating based on total usage volume
+ */
+ tiers: Array;
+ }
+
+ export namespace BulkWithFiltersConfig {
+ /**
+ * Configuration for a single property filter
+ */
+ export interface Filter {
+ /**
+ * Event property key to filter on
+ */
+ property_key: string;
+
+ /**
+ * Event property value to match
+ */
+ property_value: string;
+ }
+
+ /**
+ * Configuration for a single bulk pricing tier
+ */
+ export interface Tier {
+ /**
+ * Amount per unit
+ */
+ unit_amount: string;
+
+ /**
+ * The lower bound for this tier
+ */
+ tier_lower_bound?: string | null;
+ }
+ }
+ }
+
+ export interface NewPlanTieredWithProrationPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'tiered_with_proration';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for tiered_with_proration pricing
+ */
+ tiered_with_proration_config: NewPlanTieredWithProrationPrice.TieredWithProrationConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewPlanTieredWithProrationPrice {
+ /**
+ * Configuration for tiered_with_proration pricing
+ */
+ export interface TieredWithProrationConfig {
+ /**
+ * Tiers for rating based on total usage quantities into the specified tier with
+ * proration
+ */
+ tiers: Array;
+ }
+
+ export namespace TieredWithProrationConfig {
+ /**
+ * Configuration for a single tiered with proration tier
+ */
+ export interface Tier {
+ /**
+ * Inclusive tier starting value
+ */
+ tier_lower_bound: string;
+
+ /**
+ * Amount per unit
+ */
+ unit_amount: string;
+ }
+ }
+ }
+
+ export interface NewPlanGroupedWithMinMaxThresholdsPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for grouped_with_min_max_thresholds pricing
+ */
+ grouped_with_min_max_thresholds_config: NewPlanGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'grouped_with_min_max_thresholds';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewPlanGroupedWithMinMaxThresholdsPrice {
+ /**
+ * Configuration for grouped_with_min_max_thresholds pricing
+ */
+ export interface GroupedWithMinMaxThresholdsConfig {
+ /**
+ * The event property used to group before applying thresholds
+ */
+ grouping_key: string;
+
+ /**
+ * The maximum amount to charge each group
+ */
+ maximum_charge: string;
+
+ /**
+ * The minimum amount to charge each group, regardless of usage
+ */
+ minimum_charge: string;
+
+ /**
+ * The base price charged per group
+ */
+ per_unit_rate: string;
+ }
+ }
+
+ export interface NewPlanCumulativeGroupedAllocationPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for cumulative_grouped_allocation pricing
+ */
+ cumulative_grouped_allocation_config: NewPlanCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'cumulative_grouped_allocation';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewPlanCumulativeGroupedAllocationPrice {
+ /**
+ * Configuration for cumulative_grouped_allocation pricing
+ */
+ export interface CumulativeGroupedAllocationConfig {
+ /**
+ * The overall allocation across all groups
+ */
+ cumulative_allocation: string;
+
+ /**
+ * The allocation per individual group
+ */
+ group_allocation: string;
+
+ /**
+ * The event property used to group usage before applying allocations
+ */
+ grouping_key: string;
+
+ /**
+ * The amount to charge for each unit outside of the allocation
+ */
+ unit_amount: string;
+ }
+ }
+
+ export interface NewPlanPercentCompositePrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'percent';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for percent pricing
+ */
+ percent_config: NewPlanPercentCompositePrice.PercentConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewPlanPercentCompositePrice {
+ /**
+ * Configuration for percent pricing
+ */
+ export interface PercentConfig {
+ /**
+ * What percent of the component subtotals to charge
+ */
+ percent: number;
+ }
+ }
+
+ export interface NewPlanEventOutputPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for event_output pricing
+ */
+ event_output_config: NewPlanEventOutputPrice.EventOutputConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'event_output';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewPlanEventOutputPrice {
+ /**
+ * Configuration for event_output pricing
+ */
+ export interface EventOutputConfig {
+ /**
+ * The key in the event data to extract the unit rate from.
+ */
+ unit_rating_key: string;
+
+ /**
+ * If provided, this amount will be used as the unit rate when an event does not
+ * have a value for the `unit_rating_key`. If not provided, events missing a unit
+ * rate will be ignored.
+ */
+ default_unit_rate?: string | null;
+
+ /**
+ * An optional key in the event data to group by (e.g., event ID). All events will
+ * also be grouped by their unit rate.
+ */
+ grouping_key?: string | null;
+ }
+ }
+ }
+
+ export interface RemoveAdjustment {
+ /**
+ * The id of the adjustment to remove from on the plan.
+ */
+ adjustment_id: string;
+
+ /**
+ * The phase to remove this adjustment from.
+ */
+ plan_phase_order?: number | null;
+ }
+
+ export interface RemovePrice {
+ /**
+ * The id of the price to remove from the plan.
+ */
+ price_id: string;
+
+ /**
+ * The phase to remove this price from.
+ */
+ plan_phase_order?: number | null;
+ }
+
+ export interface ReplaceAdjustment {
+ /**
+ * The definition of a new adjustment to create and add to the plan.
+ */
+ adjustment:
+ | Shared.NewPercentageDiscount
+ | Shared.NewUsageDiscount
+ | Shared.NewAmountDiscount
+ | Shared.NewMinimum
+ | Shared.NewMaximum;
+
+ /**
+ * The id of the adjustment on the plan to replace in the plan.
+ */
+ replaces_adjustment_id: string;
+
+ /**
+ * The phase to replace this adjustment from.
+ */
+ plan_phase_order?: number | null;
+ }
+
+ export interface ReplacePrice {
+ /**
+ * The id of the price on the plan to replace in the plan.
+ */
+ replaces_price_id: string;
+
+ /**
+ * The allocation price to add to the plan.
+ */
+ allocation_price?: Shared.NewAllocationPrice | null;
+
+ /**
+ * The license allocation price to add to the plan.
+ */
+ license_allocation_price?:
+ | ReplacePrice.NewLicenseAllocationUnitPrice
+ | ReplacePrice.NewLicenseAllocationTieredPrice
+ | ReplacePrice.NewLicenseAllocationBulkPrice
+ | ReplacePrice.NewLicenseAllocationBulkWithFiltersPrice
+ | ReplacePrice.NewLicenseAllocationPackagePrice
+ | ReplacePrice.NewLicenseAllocationMatrixPrice
+ | ReplacePrice.NewLicenseAllocationThresholdTotalAmountPrice
+ | ReplacePrice.NewLicenseAllocationTieredPackagePrice
+ | ReplacePrice.NewLicenseAllocationTieredWithMinimumPrice
+ | ReplacePrice.NewLicenseAllocationGroupedTieredPrice
+ | ReplacePrice.NewLicenseAllocationTieredPackageWithMinimumPrice
+ | ReplacePrice.NewLicenseAllocationPackageWithAllocationPrice
+ | ReplacePrice.NewLicenseAllocationUnitWithPercentPrice
+ | ReplacePrice.NewLicenseAllocationMatrixWithAllocationPrice
+ | ReplacePrice.NewLicenseAllocationTieredWithProrationPrice
+ | ReplacePrice.NewLicenseAllocationUnitWithProrationPrice
+ | ReplacePrice.NewLicenseAllocationGroupedAllocationPrice
+ | ReplacePrice.NewLicenseAllocationBulkWithProrationPrice
+ | ReplacePrice.NewLicenseAllocationGroupedWithProratedMinimumPrice
+ | ReplacePrice.NewLicenseAllocationGroupedWithMeteredMinimumPrice
+ | ReplacePrice.NewLicenseAllocationGroupedWithMinMaxThresholdsPrice
+ | ReplacePrice.NewLicenseAllocationMatrixWithDisplayNamePrice
+ | ReplacePrice.NewLicenseAllocationGroupedTieredPackagePrice
+ | ReplacePrice.NewLicenseAllocationMaxGroupTieredPackagePrice
+ | ReplacePrice.NewLicenseAllocationScalableMatrixWithUnitPricingPrice
+ | ReplacePrice.NewLicenseAllocationScalableMatrixWithTieredPricingPrice
+ | ReplacePrice.NewLicenseAllocationCumulativeGroupedBulkPrice
+ | ReplacePrice.NewLicenseAllocationCumulativeGroupedAllocationPrice
+ | ReplacePrice.NewLicenseAllocationMinimumCompositePrice
+ | ReplacePrice.NewLicenseAllocationPercentCompositePrice
+ | ReplacePrice.NewLicenseAllocationEventOutputPrice
+ | null;
+
+ /**
+ * The phase to replace this price from.
+ */
+ plan_phase_order?: number | null;
+
+ /**
+ * New plan price request body params.
+ */
+ price?:
+ | Shared.NewPlanUnitPrice
+ | Shared.NewPlanTieredPrice
+ | Shared.NewPlanBulkPrice
+ | ReplacePrice.NewPlanBulkWithFiltersPrice
+ | Shared.NewPlanPackagePrice
+ | Shared.NewPlanMatrixPrice
+ | Shared.NewPlanThresholdTotalAmountPrice
+ | Shared.NewPlanTieredPackagePrice
+ | Shared.NewPlanTieredWithMinimumPrice
+ | Shared.NewPlanGroupedTieredPrice
+ | Shared.NewPlanTieredPackageWithMinimumPrice
+ | Shared.NewPlanPackageWithAllocationPrice
+ | Shared.NewPlanUnitWithPercentPrice
+ | Shared.NewPlanMatrixWithAllocationPrice
+ | ReplacePrice.NewPlanTieredWithProrationPrice
+ | Shared.NewPlanUnitWithProrationPrice
+ | Shared.NewPlanGroupedAllocationPrice
+ | Shared.NewPlanBulkWithProrationPrice
+ | Shared.NewPlanGroupedWithProratedMinimumPrice
+ | Shared.NewPlanGroupedWithMeteredMinimumPrice
+ | ReplacePrice.NewPlanGroupedWithMinMaxThresholdsPrice
+ | Shared.NewPlanMatrixWithDisplayNamePrice
+ | Shared.NewPlanGroupedTieredPackagePrice
+ | Shared.NewPlanMaxGroupTieredPackagePrice
+ | Shared.NewPlanScalableMatrixWithUnitPricingPrice
+ | Shared.NewPlanScalableMatrixWithTieredPricingPrice
+ | Shared.NewPlanCumulativeGroupedBulkPrice
+ | ReplacePrice.NewPlanCumulativeGroupedAllocationPrice
+ | Shared.NewPlanMinimumCompositePrice
+ | ReplacePrice.NewPlanPercentCompositePrice
+ | ReplacePrice.NewPlanEventOutputPrice
+ | null;
+ }
+
+ export namespace ReplacePrice {
+ export interface NewLicenseAllocationUnitPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'unit';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for unit pricing
+ */
+ unit_config: Shared.UnitConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationUnitPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationTieredPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'tiered';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for tiered pricing
+ */
+ tiered_config: Shared.TieredConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationTieredPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationBulkPrice {
+ /**
+ * Configuration for bulk pricing
+ */
+ bulk_config: Shared.BulkConfig;
+
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'bulk';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationBulkPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationBulkWithFiltersPrice {
+ /**
+ * Configuration for bulk_with_filters pricing
+ */
+ bulk_with_filters_config: NewLicenseAllocationBulkWithFiltersPrice.BulkWithFiltersConfig;
+
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'bulk_with_filters';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationBulkWithFiltersPrice {
+ /**
+ * Configuration for bulk_with_filters pricing
+ */
+ export interface BulkWithFiltersConfig {
+ /**
+ * Property filters to apply (all must match)
+ */
+ filters: Array;
+
+ /**
+ * Bulk tiers for rating based on total usage volume
+ */
+ tiers: Array;
+ }
+
+ export namespace BulkWithFiltersConfig {
+ /**
+ * Configuration for a single property filter
+ */
+ export interface Filter {
+ /**
+ * Event property key to filter on
+ */
+ property_key: string;
+
+ /**
+ * Event property value to match
+ */
+ property_value: string;
+ }
+
+ /**
+ * Configuration for a single bulk pricing tier
+ */
+ export interface Tier {
+ /**
+ * Amount per unit
+ */
+ unit_amount: string;
+
+ /**
+ * The lower bound for this tier
+ */
+ tier_lower_bound?: string | null;
+ }
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationPackagePrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'package';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for package pricing
+ */
+ package_config: Shared.PackageConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationPackagePrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationMatrixPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * Configuration for matrix pricing
+ */
+ matrix_config: Shared.MatrixConfig;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'matrix';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationMatrixPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationThresholdTotalAmountPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'threshold_total_amount';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for threshold_total_amount pricing
+ */
+ threshold_total_amount_config: NewLicenseAllocationThresholdTotalAmountPrice.ThresholdTotalAmountConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationThresholdTotalAmountPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for threshold_total_amount pricing
+ */
+ export interface ThresholdTotalAmountConfig {
+ /**
+ * When the quantity consumed passes a provided threshold, the configured total
+ * will be charged
+ */
+ consumption_table: Array;
+
+ /**
+ * If true, the unit price will be prorated to the billing period
+ */
+ prorate?: boolean | null;
+ }
+
+ export namespace ThresholdTotalAmountConfig {
+ /**
+ * Configuration for a single threshold
+ */
+ export interface ConsumptionTable {
+ threshold: string;
+
+ /**
+ * Total amount for this threshold
+ */
+ total_amount: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationTieredPackagePrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'tiered_package';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for tiered_package pricing
+ */
+ tiered_package_config: NewLicenseAllocationTieredPackagePrice.TieredPackageConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationTieredPackagePrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for tiered_package pricing
+ */
+ export interface TieredPackageConfig {
+ package_size: string;
+
+ /**
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
+ * are defined using exclusive lower bounds. The tier bounds are defined based on
+ * the total quantity rather than the number of packages, so they must be multiples
+ * of the package size.
+ */
+ tiers: Array;
+ }
+
+ export namespace TieredPackageConfig {
+ /**
+ * Configuration for a single tier with business logic
+ */
+ export interface Tier {
+ /**
+ * Price per package
+ */
+ per_unit: string;
+
+ tier_lower_bound: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationTieredWithMinimumPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'tiered_with_minimum';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for tiered_with_minimum pricing
+ */
+ tiered_with_minimum_config: NewLicenseAllocationTieredWithMinimumPrice.TieredWithMinimumConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationTieredWithMinimumPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for tiered_with_minimum pricing
+ */
+ export interface TieredWithMinimumConfig {
+ /**
+ * Tiered pricing with a minimum amount dependent on the volume tier. Tiers are
+ * defined using exclusive lower bounds.
+ */
+ tiers: Array;
+
+ /**
+ * If true, tiers with an accrued amount of 0 will not be included in the rating.
+ */
+ hide_zero_amount_tiers?: boolean;
+
+ /**
+ * If true, the unit price will be prorated to the billing period
+ */
+ prorate?: boolean;
+ }
+
+ export namespace TieredWithMinimumConfig {
+ /**
+ * Configuration for a single tier
+ */
+ export interface Tier {
+ minimum_amount: string;
+
+ tier_lower_bound: string;
+
+ /**
+ * Per unit amount
+ */
+ unit_amount: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationGroupedTieredPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for grouped_tiered pricing
+ */
+ grouped_tiered_config: NewLicenseAllocationGroupedTieredPrice.GroupedTieredConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'grouped_tiered';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationGroupedTieredPrice {
+ /**
+ * Configuration for grouped_tiered pricing
+ */
+ export interface GroupedTieredConfig {
+ /**
+ * The billable metric property used to group before tiering
+ */
+ grouping_key: string;
+
+ /**
+ * Apply tiered pricing to each segment generated after grouping with the provided
+ * key
+ */
+ tiers: Array;
+ }
+
+ export namespace GroupedTieredConfig {
+ /**
+ * Configuration for a single tier
+ */
+ export interface Tier {
+ tier_lower_bound: string;
+
+ /**
+ * Per unit amount
+ */
+ unit_amount: string;
+ }
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationTieredPackageWithMinimumPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'tiered_package_with_minimum';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for tiered_package_with_minimum pricing
+ */
+ tiered_package_with_minimum_config: NewLicenseAllocationTieredPackageWithMinimumPrice.TieredPackageWithMinimumConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationTieredPackageWithMinimumPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for tiered_package_with_minimum pricing
+ */
+ export interface TieredPackageWithMinimumConfig {
+ package_size: number;
+
+ /**
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
+ * are defined using exclusive lower bounds.
+ */
+ tiers: Array;
+ }
+
+ export namespace TieredPackageWithMinimumConfig {
+ /**
+ * Configuration for a single tier
+ */
+ export interface Tier {
+ minimum_amount: string;
+
+ per_unit: string;
+
+ tier_lower_bound: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationPackageWithAllocationPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'package_with_allocation';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for package_with_allocation pricing
+ */
+ package_with_allocation_config: NewLicenseAllocationPackageWithAllocationPrice.PackageWithAllocationConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationPackageWithAllocationPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for package_with_allocation pricing
+ */
+ export interface PackageWithAllocationConfig {
+ allocation: string;
+
+ package_amount: string;
+
+ package_size: string;
+ }
+ }
+
+ export interface NewLicenseAllocationUnitWithPercentPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'unit_with_percent';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for unit_with_percent pricing
+ */
+ unit_with_percent_config: NewLicenseAllocationUnitWithPercentPrice.UnitWithPercentConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationUnitWithPercentPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for unit_with_percent pricing
+ */
+ export interface UnitWithPercentConfig {
+ /**
+ * What percent, out of 100, of the calculated total to charge
+ */
+ percent: string;
+
+ /**
+ * Rate per unit of usage
+ */
+ unit_amount: string;
+ }
+ }
+
+ export interface NewLicenseAllocationMatrixWithAllocationPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * Configuration for matrix_with_allocation pricing
+ */
+ matrix_with_allocation_config: Shared.MatrixWithAllocationConfig;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'matrix_with_allocation';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationMatrixWithAllocationPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationTieredWithProrationPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'tiered_with_proration';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for tiered_with_proration pricing
+ */
+ tiered_with_proration_config: NewLicenseAllocationTieredWithProrationPrice.TieredWithProrationConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationTieredWithProrationPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for tiered_with_proration pricing
+ */
+ export interface TieredWithProrationConfig {
+ /**
+ * Tiers for rating based on total usage quantities into the specified tier with
+ * proration
+ */
+ tiers: Array;
+ }
+
+ export namespace TieredWithProrationConfig {
+ /**
+ * Configuration for a single tiered with proration tier
+ */
+ export interface Tier {
+ /**
+ * Inclusive tier starting value
+ */
+ tier_lower_bound: string;
+
+ /**
+ * Amount per unit
+ */
+ unit_amount: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationUnitWithProrationPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'unit_with_proration';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for unit_with_proration pricing
+ */
+ unit_with_proration_config: NewLicenseAllocationUnitWithProrationPrice.UnitWithProrationConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationUnitWithProrationPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for unit_with_proration pricing
+ */
+ export interface UnitWithProrationConfig {
+ /**
+ * Rate per unit of usage
+ */
+ unit_amount: string;
+ }
+ }
+
+ export interface NewLicenseAllocationGroupedAllocationPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for grouped_allocation pricing
+ */
+ grouped_allocation_config: NewLicenseAllocationGroupedAllocationPrice.GroupedAllocationConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'grouped_allocation';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationGroupedAllocationPrice {
+ /**
+ * Configuration for grouped_allocation pricing
+ */
+ export interface GroupedAllocationConfig {
+ /**
+ * Usage allocation per group
+ */
+ allocation: string;
+
+ /**
+ * How to determine the groups that should each be allocated some quantity
+ */
+ grouping_key: string;
+
+ /**
+ * Unit rate for post-allocation
+ */
+ overage_unit_rate: string;
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationBulkWithProrationPrice {
+ /**
+ * Configuration for bulk_with_proration pricing
+ */
+ bulk_with_proration_config: NewLicenseAllocationBulkWithProrationPrice.BulkWithProrationConfig;
+
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'bulk_with_proration';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationBulkWithProrationPrice {
+ /**
+ * Configuration for bulk_with_proration pricing
+ */
+ export interface BulkWithProrationConfig {
+ /**
+ * Bulk tiers for rating based on total usage volume
+ */
+ tiers: Array;
+ }
+
+ export namespace BulkWithProrationConfig {
+ /**
+ * Configuration for a single bulk pricing tier with proration
+ */
+ export interface Tier {
+ /**
+ * Cost per unit
+ */
+ unit_amount: string;
+
+ /**
+ * The lower bound for this tier
+ */
+ tier_lower_bound?: string | null;
+ }
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationGroupedWithProratedMinimumPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for grouped_with_prorated_minimum pricing
+ */
+ grouped_with_prorated_minimum_config: NewLicenseAllocationGroupedWithProratedMinimumPrice.GroupedWithProratedMinimumConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'grouped_with_prorated_minimum';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationGroupedWithProratedMinimumPrice {
+ /**
+ * Configuration for grouped_with_prorated_minimum pricing
+ */
+ export interface GroupedWithProratedMinimumConfig {
+ /**
+ * How to determine the groups that should each have a minimum
+ */
+ grouping_key: string;
+
+ /**
+ * The minimum amount to charge per group
+ */
+ minimum: string;
+
+ /**
+ * The amount to charge per unit
+ */
+ unit_rate: string;
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationGroupedWithMeteredMinimumPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for grouped_with_metered_minimum pricing
+ */
+ grouped_with_metered_minimum_config: NewLicenseAllocationGroupedWithMeteredMinimumPrice.GroupedWithMeteredMinimumConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'grouped_with_metered_minimum';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationGroupedWithMeteredMinimumPrice {
+ /**
+ * Configuration for grouped_with_metered_minimum pricing
+ */
+ export interface GroupedWithMeteredMinimumConfig {
+ /**
+ * Used to partition the usage into groups. The minimum amount is applied to each
+ * group.
+ */
+ grouping_key: string;
+
+ /**
+ * The minimum amount to charge per group per unit
+ */
+ minimum_unit_amount: string;
+
+ /**
+ * Used to determine the unit rate
+ */
+ pricing_key: string;
+
+ /**
+ * Scale the unit rates by the scaling factor.
+ */
+ scaling_factors: Array;
+
+ /**
+ * Used to determine the unit rate scaling factor
+ */
+ scaling_key: string;
+
+ /**
+ * Apply per unit pricing to each pricing value. The minimum amount is applied any
+ * unmatched usage.
+ */
+ unit_amounts: Array;
+ }
+
+ export namespace GroupedWithMeteredMinimumConfig {
+ /**
+ * Configuration for a scaling factor
+ */
+ export interface ScalingFactor {
+ scaling_factor: string;
+
+ scaling_value: string;
+ }
+
+ /**
+ * Configuration for a unit amount
+ */
+ export interface UnitAmount {
+ pricing_value: string;
+
+ /**
+ * Per unit amount
+ */
+ unit_amount: string;
+ }
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationGroupedWithMinMaxThresholdsPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for grouped_with_min_max_thresholds pricing
+ */
+ grouped_with_min_max_thresholds_config: NewLicenseAllocationGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'grouped_with_min_max_thresholds';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationGroupedWithMinMaxThresholdsPrice {
+ /**
+ * Configuration for grouped_with_min_max_thresholds pricing
+ */
+ export interface GroupedWithMinMaxThresholdsConfig {
+ /**
+ * The event property used to group before applying thresholds
+ */
+ grouping_key: string;
+
+ /**
+ * The maximum amount to charge each group
+ */
+ maximum_charge: string;
+
+ /**
+ * The minimum amount to charge each group, regardless of usage
+ */
+ minimum_charge: string;
+
+ /**
+ * The base price charged per group
+ */
+ per_unit_rate: string;
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationMatrixWithDisplayNamePrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * Configuration for matrix_with_display_name pricing
+ */
+ matrix_with_display_name_config: NewLicenseAllocationMatrixWithDisplayNamePrice.MatrixWithDisplayNameConfig;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'matrix_with_display_name';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationMatrixWithDisplayNamePrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for matrix_with_display_name pricing
+ */
+ export interface MatrixWithDisplayNameConfig {
+ /**
+ * Used to determine the unit rate
+ */
+ dimension: string;
+
+ /**
+ * Apply per unit pricing to each dimension value
+ */
+ unit_amounts: Array;
+ }
+
+ export namespace MatrixWithDisplayNameConfig {
+ /**
+ * Configuration for a unit amount item
+ */
+ export interface UnitAmount {
+ /**
+ * The dimension value
+ */
+ dimension_value: string;
+
+ /**
+ * Display name for this dimension value
+ */
+ display_name: string;
+
+ /**
+ * Per unit amount
+ */
+ unit_amount: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationGroupedTieredPackagePrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for grouped_tiered_package pricing
+ */
+ grouped_tiered_package_config: NewLicenseAllocationGroupedTieredPackagePrice.GroupedTieredPackageConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'grouped_tiered_package';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationGroupedTieredPackagePrice {
+ /**
+ * Configuration for grouped_tiered_package pricing
+ */
+ export interface GroupedTieredPackageConfig {
+ /**
+ * The event property used to group before tiering
+ */
+ grouping_key: string;
+
+ package_size: string;
+
+ /**
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
+ * are defined using exclusive lower bounds.
+ */
+ tiers: Array;
+ }
+
+ export namespace GroupedTieredPackageConfig {
+ /**
+ * Configuration for a single tier
+ */
+ export interface Tier {
+ /**
+ * Per package
+ */
+ per_unit: string;
+
+ tier_lower_bound: string;
+ }
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationMaxGroupTieredPackagePrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * Configuration for max_group_tiered_package pricing
+ */
+ max_group_tiered_package_config: NewLicenseAllocationMaxGroupTieredPackagePrice.MaxGroupTieredPackageConfig;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'max_group_tiered_package';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationMaxGroupTieredPackagePrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for max_group_tiered_package pricing
+ */
+ export interface MaxGroupTieredPackageConfig {
+ /**
+ * The event property used to group before tiering the group with the highest value
+ */
+ grouping_key: string;
+
+ package_size: string;
+
+ /**
+ * Apply tiered pricing to the largest group after grouping with the provided key.
+ */
+ tiers: Array;
+ }
+
+ export namespace MaxGroupTieredPackageConfig {
+ /**
+ * Configuration for a single tier
+ */
+ export interface Tier {
+ tier_lower_bound: string;
+
+ /**
+ * Per unit amount
+ */
+ unit_amount: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationScalableMatrixWithUnitPricingPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'scalable_matrix_with_unit_pricing';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for scalable_matrix_with_unit_pricing pricing
+ */
+ scalable_matrix_with_unit_pricing_config: NewLicenseAllocationScalableMatrixWithUnitPricingPrice.ScalableMatrixWithUnitPricingConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationScalableMatrixWithUnitPricingPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for scalable_matrix_with_unit_pricing pricing
+ */
+ export interface ScalableMatrixWithUnitPricingConfig {
+ /**
+ * Used to determine the unit rate
+ */
+ first_dimension: string;
+
+ /**
+ * Apply a scaling factor to each dimension
+ */
+ matrix_scaling_factors: Array;
+
+ /**
+ * The final unit price to rate against the output of the matrix
+ */
+ unit_price: string;
+
+ /**
+ * The property used to group this price
+ */
+ grouping_key?: string | null;
+
+ /**
+ * If true, the unit price will be prorated to the billing period
+ */
+ prorate?: boolean | null;
+
+ /**
+ * Used to determine the unit rate (optional)
+ */
+ second_dimension?: string | null;
+ }
+
+ export namespace ScalableMatrixWithUnitPricingConfig {
+ /**
+ * Configuration for a single matrix scaling factor
+ */
+ export interface MatrixScalingFactor {
+ first_dimension_value: string;
+
+ scaling_factor: string;
+
+ second_dimension_value?: string | null;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationScalableMatrixWithTieredPricingPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'scalable_matrix_with_tiered_pricing';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for scalable_matrix_with_tiered_pricing pricing
+ */
+ scalable_matrix_with_tiered_pricing_config: NewLicenseAllocationScalableMatrixWithTieredPricingPrice.ScalableMatrixWithTieredPricingConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationScalableMatrixWithTieredPricingPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for scalable_matrix_with_tiered_pricing pricing
+ */
+ export interface ScalableMatrixWithTieredPricingConfig {
+ /**
+ * Used for the scalable matrix first dimension
+ */
+ first_dimension: string;
+
+ /**
+ * Apply a scaling factor to each dimension
+ */
+ matrix_scaling_factors: Array;
+
+ tiers: Array;
+
+ /**
+ * Used for the scalable matrix second dimension (optional)
+ */
+ second_dimension?: string | null;
+ }
+
+ export namespace ScalableMatrixWithTieredPricingConfig {
+ /**
+ * Configuration for a single matrix scaling factor
+ */
+ export interface MatrixScalingFactor {
+ first_dimension_value: string;
+
+ scaling_factor: string;
+
+ second_dimension_value?: string | null;
+ }
+
+ /**
+ * Configuration for a single tier entry with business logic
+ */
+ export interface Tier {
+ tier_lower_bound: string;
+
+ unit_amount: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationCumulativeGroupedBulkPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for cumulative_grouped_bulk pricing
+ */
+ cumulative_grouped_bulk_config: NewLicenseAllocationCumulativeGroupedBulkPrice.CumulativeGroupedBulkConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'cumulative_grouped_bulk';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
/**
* The id of the billable metric for the price. Only needed if the price is
@@ -447,6 +10136,11 @@ export namespace BetaCreatePlanVersionParams {
*/
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
/**
* User-specified key/value pairs for the resource. Individual keys can be removed
* by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -461,56 +10155,86 @@ export namespace BetaCreatePlanVersionParams {
reference_id?: string | null;
}
- export namespace NewPlanTieredWithProrationPrice {
+ export namespace NewLicenseAllocationCumulativeGroupedBulkPrice {
/**
- * Configuration for tiered_with_proration pricing
+ * Configuration for cumulative_grouped_bulk pricing
*/
- export interface TieredWithProrationConfig {
+ export interface CumulativeGroupedBulkConfig {
/**
- * Tiers for rating based on total usage quantities into the specified tier with
- * proration
+ * Each tier lower bound must have the same group of values.
*/
- tiers: Array;
+ dimension_values: Array;
+
+ group: string;
}
- export namespace TieredWithProrationConfig {
+ export namespace CumulativeGroupedBulkConfig {
/**
- * Configuration for a single tiered with proration tier
+ * Configuration for a dimension value entry
*/
- export interface Tier {
+ export interface DimensionValue {
/**
- * Inclusive tier starting value
+ * Grouping key value
+ */
+ grouping_key: string;
+
+ /**
+ * Tier lower bound
*/
tier_lower_bound: string;
/**
- * Amount per unit
+ * Unit amount for this combination
*/
unit_amount: string;
}
}
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
}
- export interface NewPlanGroupedWithMinMaxThresholdsPrice {
+ export interface NewLicenseAllocationCumulativeGroupedAllocationPrice {
/**
* The cadence to bill for this price on.
*/
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
/**
- * Configuration for grouped_with_min_max_thresholds pricing
+ * Configuration for cumulative_grouped_allocation pricing
*/
- grouped_with_min_max_thresholds_config: NewPlanGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
+ cumulative_grouped_allocation_config: NewLicenseAllocationCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
/**
* The id of the item the price will be associated with.
*/
item_id: string;
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
/**
* The pricing model type
*/
- model_type: 'grouped_with_min_max_thresholds';
+ model_type: 'cumulative_grouped_allocation';
/**
* The name of the price.
@@ -578,6 +10302,11 @@ export namespace BetaCreatePlanVersionParams {
*/
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
/**
* User-specified key/value pairs for the resource. Individual keys can be removed
* by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -592,53 +10321,77 @@ export namespace BetaCreatePlanVersionParams {
reference_id?: string | null;
}
- export namespace NewPlanGroupedWithMinMaxThresholdsPrice {
+ export namespace NewLicenseAllocationCumulativeGroupedAllocationPrice {
/**
- * Configuration for grouped_with_min_max_thresholds pricing
+ * Configuration for cumulative_grouped_allocation pricing
*/
- export interface GroupedWithMinMaxThresholdsConfig {
+ export interface CumulativeGroupedAllocationConfig {
/**
- * The event property used to group before applying thresholds
+ * The overall allocation across all groups
+ */
+ cumulative_allocation: string;
+
+ /**
+ * The allocation per individual group
+ */
+ group_allocation: string;
+
+ /**
+ * The event property used to group usage before applying allocations
*/
grouping_key: string;
/**
- * The maximum amount to charge each group
+ * The amount to charge for each unit outside of the allocation
*/
- maximum_charge: string;
+ unit_amount: string;
+ }
+ export interface LicenseAllocation {
/**
- * The minimum amount to charge each group, regardless of usage
+ * The amount of credits granted per active license per cadence.
*/
- minimum_charge: string;
+ amount: string;
/**
- * The base price charged per group
+ * The currency of the license allocation.
*/
- per_unit_rate: string;
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
}
}
- export interface NewPlanCumulativeGroupedAllocationPrice {
+ export interface NewLicenseAllocationMinimumCompositePrice {
/**
* The cadence to bill for this price on.
*/
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
/**
- * Configuration for cumulative_grouped_allocation pricing
+ * The id of the item the price will be associated with.
*/
- cumulative_grouped_allocation_config: NewPlanCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
+ item_id: string;
/**
- * The id of the item the price will be associated with.
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
*/
- item_id: string;
+ license_allocations: Array;
+
+ /**
+ * Configuration for minimum_composite pricing
+ */
+ minimum_composite_config: NewLicenseAllocationMinimumCompositePrice.MinimumCompositeConfig;
/**
* The pricing model type
*/
- model_type: 'cumulative_grouped_allocation';
+ model_type: 'minimum_composite';
/**
* The name of the price.
@@ -706,6 +10459,11 @@ export namespace BetaCreatePlanVersionParams {
*/
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
/**
* User-specified key/value pairs for the resource. Individual keys can be removed
* by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -720,34 +10478,41 @@ export namespace BetaCreatePlanVersionParams {
reference_id?: string | null;
}
- export namespace NewPlanCumulativeGroupedAllocationPrice {
- /**
- * Configuration for cumulative_grouped_allocation pricing
- */
- export interface CumulativeGroupedAllocationConfig {
+ export namespace NewLicenseAllocationMinimumCompositePrice {
+ export interface LicenseAllocation {
/**
- * The overall allocation across all groups
+ * The amount of credits granted per active license per cadence.
*/
- cumulative_allocation: string;
+ amount: string;
/**
- * The allocation per individual group
+ * The currency of the license allocation.
*/
- group_allocation: string;
+ currency: string;
/**
- * The event property used to group usage before applying allocations
+ * When True, overage beyond the allocation is written off.
*/
- grouping_key: string;
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for minimum_composite pricing
+ */
+ export interface MinimumCompositeConfig {
+ /**
+ * The minimum amount to apply
+ */
+ minimum_amount: string;
/**
- * The amount to charge for each unit outside of the allocation
+ * If true, subtotals from this price are prorated based on the service period
*/
- unit_amount: string;
+ prorated?: boolean;
}
}
- export interface NewPlanPercentCompositePrice {
+ export interface NewLicenseAllocationPercentCompositePrice {
/**
* The cadence to bill for this price on.
*/
@@ -758,6 +10523,13 @@ export namespace BetaCreatePlanVersionParams {
*/
item_id: string;
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
/**
* The pricing model type
*/
@@ -771,7 +10543,7 @@ export namespace BetaCreatePlanVersionParams {
/**
* Configuration for percent pricing
*/
- percent_config: NewPlanPercentCompositePrice.PercentConfig;
+ percent_config: NewLicenseAllocationPercentCompositePrice.PercentConfig;
/**
* The id of the billable metric for the price. Only needed if the price is
@@ -834,6 +10606,11 @@ export namespace BetaCreatePlanVersionParams {
*/
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
/**
* User-specified key/value pairs for the resource. Individual keys can be removed
* by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -848,7 +10625,24 @@ export namespace BetaCreatePlanVersionParams {
reference_id?: string | null;
}
- export namespace NewPlanPercentCompositePrice {
+ export namespace NewLicenseAllocationPercentCompositePrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
/**
* Configuration for percent pricing
*/
@@ -860,7 +10654,7 @@ export namespace BetaCreatePlanVersionParams {
}
}
- export interface NewPlanEventOutputPrice {
+ export interface NewLicenseAllocationEventOutputPrice {
/**
* The cadence to bill for this price on.
*/
@@ -869,13 +10663,20 @@ export namespace BetaCreatePlanVersionParams {
/**
* Configuration for event_output pricing
*/
- event_output_config: NewPlanEventOutputPrice.EventOutputConfig;
+ event_output_config: NewLicenseAllocationEventOutputPrice.EventOutputConfig;
/**
* The id of the item the price will be associated with.
*/
item_id: string;
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
/**
* The pricing model type
*/
@@ -947,6 +10748,11 @@ export namespace BetaCreatePlanVersionParams {
*/
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
/**
* User-specified key/value pairs for the resource. Individual keys can be removed
* by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -961,7 +10767,7 @@ export namespace BetaCreatePlanVersionParams {
reference_id?: string | null;
}
- export namespace NewPlanEventOutputPrice {
+ export namespace NewLicenseAllocationEventOutputPrice {
/**
* Configuration for event_output pricing
*/
@@ -984,110 +10790,25 @@ export namespace BetaCreatePlanVersionParams {
*/
grouping_key?: string | null;
}
- }
- }
-
- export interface RemoveAdjustment {
- /**
- * The id of the adjustment to remove from on the plan.
- */
- adjustment_id: string;
-
- /**
- * The phase to remove this adjustment from.
- */
- plan_phase_order?: number | null;
- }
-
- export interface RemovePrice {
- /**
- * The id of the price to remove from the plan.
- */
- price_id: string;
-
- /**
- * The phase to remove this price from.
- */
- plan_phase_order?: number | null;
- }
-
- export interface ReplaceAdjustment {
- /**
- * The definition of a new adjustment to create and add to the plan.
- */
- adjustment:
- | Shared.NewPercentageDiscount
- | Shared.NewUsageDiscount
- | Shared.NewAmountDiscount
- | Shared.NewMinimum
- | Shared.NewMaximum;
-
- /**
- * The id of the adjustment on the plan to replace in the plan.
- */
- replaces_adjustment_id: string;
-
- /**
- * The phase to replace this adjustment from.
- */
- plan_phase_order?: number | null;
- }
-
- export interface ReplacePrice {
- /**
- * The id of the price on the plan to replace in the plan.
- */
- replaces_price_id: string;
- /**
- * The allocation price to add to the plan.
- */
- allocation_price?: Shared.NewAllocationPrice | null;
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
- /**
- * The phase to replace this price from.
- */
- plan_phase_order?: number | null;
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
- /**
- * New plan price request body params.
- */
- price?:
- | Shared.NewPlanUnitPrice
- | Shared.NewPlanTieredPrice
- | Shared.NewPlanBulkPrice
- | ReplacePrice.NewPlanBulkWithFiltersPrice
- | Shared.NewPlanPackagePrice
- | Shared.NewPlanMatrixPrice
- | Shared.NewPlanThresholdTotalAmountPrice
- | Shared.NewPlanTieredPackagePrice
- | Shared.NewPlanTieredWithMinimumPrice
- | Shared.NewPlanGroupedTieredPrice
- | Shared.NewPlanTieredPackageWithMinimumPrice
- | Shared.NewPlanPackageWithAllocationPrice
- | Shared.NewPlanUnitWithPercentPrice
- | Shared.NewPlanMatrixWithAllocationPrice
- | ReplacePrice.NewPlanTieredWithProrationPrice
- | Shared.NewPlanUnitWithProrationPrice
- | Shared.NewPlanGroupedAllocationPrice
- | Shared.NewPlanBulkWithProrationPrice
- | Shared.NewPlanGroupedWithProratedMinimumPrice
- | Shared.NewPlanGroupedWithMeteredMinimumPrice
- | ReplacePrice.NewPlanGroupedWithMinMaxThresholdsPrice
- | Shared.NewPlanMatrixWithDisplayNamePrice
- | Shared.NewPlanGroupedTieredPackagePrice
- | Shared.NewPlanMaxGroupTieredPackagePrice
- | Shared.NewPlanScalableMatrixWithUnitPricingPrice
- | Shared.NewPlanScalableMatrixWithTieredPricingPrice
- | Shared.NewPlanCumulativeGroupedBulkPrice
- | ReplacePrice.NewPlanCumulativeGroupedAllocationPrice
- | Shared.NewPlanMinimumCompositePrice
- | ReplacePrice.NewPlanPercentCompositePrice
- | ReplacePrice.NewPlanEventOutputPrice
- | null;
- }
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
- export namespace ReplacePrice {
export interface NewPlanBulkWithFiltersPrice {
/**
* Configuration for bulk_with_filters pricing
@@ -1175,6 +10896,11 @@ export namespace BetaCreatePlanVersionParams {
*/
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
/**
* User-specified key/value pairs for the resource. Individual keys can be removed
* by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -1325,6 +11051,11 @@ export namespace BetaCreatePlanVersionParams {
*/
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
/**
* User-specified key/value pairs for the resource. Individual keys can be removed
* by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -1456,6 +11187,11 @@ export namespace BetaCreatePlanVersionParams {
*/
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
/**
* User-specified key/value pairs for the resource. Individual keys can be removed
* by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -1584,6 +11320,11 @@ export namespace BetaCreatePlanVersionParams {
*/
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
/**
* User-specified key/value pairs for the resource. Individual keys can be removed
* by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -1712,6 +11453,11 @@ export namespace BetaCreatePlanVersionParams {
*/
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
/**
* User-specified key/value pairs for the resource. Individual keys can be removed
* by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -1825,6 +11571,11 @@ export namespace BetaCreatePlanVersionParams {
*/
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
/**
* User-specified key/value pairs for the resource. Individual keys can be removed
* by setting the value to `null`, and the entire metadata mapping can be cleared
diff --git a/src/resources/beta/external-plan-id.ts b/src/resources/beta/external-plan-id.ts
index d33ee80b..07c872de 100644
--- a/src/resources/beta/external-plan-id.ts
+++ b/src/resources/beta/external-plan-id.ts
@@ -6,6 +6,11 @@ import * as Shared from '../shared';
import * as BetaAPI from './beta';
import * as PlansAPI from '../plans/plans';
+/**
+ * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
+ * customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
+ * in the [Price resource](/reference/price).
+ */
export class ExternalPlanID extends APIResource {
/**
* This endpoint allows the creation of a new plan version for an existing plan.
@@ -111,6 +116,43 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
*/
allocation_price?: Shared.NewAllocationPrice | null;
+ /**
+ * The license allocation price to add to the plan.
+ */
+ license_allocation_price?:
+ | AddPrice.NewLicenseAllocationUnitPrice
+ | AddPrice.NewLicenseAllocationTieredPrice
+ | AddPrice.NewLicenseAllocationBulkPrice
+ | AddPrice.NewLicenseAllocationBulkWithFiltersPrice
+ | AddPrice.NewLicenseAllocationPackagePrice
+ | AddPrice.NewLicenseAllocationMatrixPrice
+ | AddPrice.NewLicenseAllocationThresholdTotalAmountPrice
+ | AddPrice.NewLicenseAllocationTieredPackagePrice
+ | AddPrice.NewLicenseAllocationTieredWithMinimumPrice
+ | AddPrice.NewLicenseAllocationGroupedTieredPrice
+ | AddPrice.NewLicenseAllocationTieredPackageWithMinimumPrice
+ | AddPrice.NewLicenseAllocationPackageWithAllocationPrice
+ | AddPrice.NewLicenseAllocationUnitWithPercentPrice
+ | AddPrice.NewLicenseAllocationMatrixWithAllocationPrice
+ | AddPrice.NewLicenseAllocationTieredWithProrationPrice
+ | AddPrice.NewLicenseAllocationUnitWithProrationPrice
+ | AddPrice.NewLicenseAllocationGroupedAllocationPrice
+ | AddPrice.NewLicenseAllocationBulkWithProrationPrice
+ | AddPrice.NewLicenseAllocationGroupedWithProratedMinimumPrice
+ | AddPrice.NewLicenseAllocationGroupedWithMeteredMinimumPrice
+ | AddPrice.NewLicenseAllocationGroupedWithMinMaxThresholdsPrice
+ | AddPrice.NewLicenseAllocationMatrixWithDisplayNamePrice
+ | AddPrice.NewLicenseAllocationGroupedTieredPackagePrice
+ | AddPrice.NewLicenseAllocationMaxGroupTieredPackagePrice
+ | AddPrice.NewLicenseAllocationScalableMatrixWithUnitPricingPrice
+ | AddPrice.NewLicenseAllocationScalableMatrixWithTieredPricingPrice
+ | AddPrice.NewLicenseAllocationCumulativeGroupedBulkPrice
+ | AddPrice.NewLicenseAllocationCumulativeGroupedAllocationPrice
+ | AddPrice.NewLicenseAllocationMinimumCompositePrice
+ | AddPrice.NewLicenseAllocationPercentCompositePrice
+ | AddPrice.NewLicenseAllocationEventOutputPrice
+ | null;
+
/**
* The phase to add this price to.
*/
@@ -155,12 +197,7 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
}
export namespace AddPrice {
- export interface NewPlanBulkWithFiltersPrice {
- /**
- * Configuration for bulk_with_filters pricing
- */
- bulk_with_filters_config: NewPlanBulkWithFiltersPrice.BulkWithFiltersConfig;
-
+ export interface NewLicenseAllocationUnitPrice {
/**
* The cadence to bill for this price on.
*/
@@ -171,16 +208,28 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
*/
item_id: string;
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
/**
* The pricing model type
*/
- model_type: 'bulk_with_filters';
+ model_type: 'unit';
/**
* The name of the price.
*/
name: string;
+ /**
+ * Configuration for unit pricing
+ */
+ unit_config: Shared.UnitConfig;
+
/**
* The id of the billable metric for the price. Only needed if the price is
* usage-based.
@@ -242,6 +291,11 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
*/
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
/**
* User-specified key/value pairs for the resource. Individual keys can be removed
* by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -256,56 +310,163 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
reference_id?: string | null;
}
- export namespace NewPlanBulkWithFiltersPrice {
- /**
- * Configuration for bulk_with_filters pricing
- */
- export interface BulkWithFiltersConfig {
+ export namespace NewLicenseAllocationUnitPrice {
+ export interface LicenseAllocation {
/**
- * Property filters to apply (all must match)
+ * The amount of credits granted per active license per cadence.
*/
- filters: Array;
+ amount: string;
/**
- * Bulk tiers for rating based on total usage volume
+ * The currency of the license allocation.
*/
- tiers: Array;
- }
+ currency: string;
- export namespace BulkWithFiltersConfig {
/**
- * Configuration for a single property filter
+ * When True, overage beyond the allocation is written off.
*/
- export interface Filter {
- /**
- * Event property key to filter on
- */
- property_key: string;
+ write_off_overage?: boolean | null;
+ }
+ }
- /**
- * Event property value to match
- */
- property_value: string;
- }
+ export interface NewLicenseAllocationTieredPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'tiered';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for tiered pricing
+ */
+ tiered_config: Shared.TieredConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+ export namespace NewLicenseAllocationTieredPrice {
+ export interface LicenseAllocation {
/**
- * Configuration for a single bulk pricing tier
+ * The amount of credits granted per active license per cadence.
*/
- export interface Tier {
- /**
- * Amount per unit
- */
- unit_amount: string;
+ amount: string;
- /**
- * The lower bound for this tier
- */
- tier_lower_bound?: string | null;
- }
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
}
}
- export interface NewPlanTieredWithProrationPrice {
+ export interface NewLicenseAllocationBulkPrice {
+ /**
+ * Configuration for bulk pricing
+ */
+ bulk_config: Shared.BulkConfig;
+
/**
* The cadence to bill for this price on.
*/
@@ -316,10 +477,17 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
*/
item_id: string;
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
/**
* The pricing model type
*/
- model_type: 'tiered_with_proration';
+ model_type: 'bulk';
/**
* The name of the price.
@@ -327,9 +495,9530 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
name: string;
/**
- * Configuration for tiered_with_proration pricing
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
*/
- tiered_with_proration_config: NewPlanTieredWithProrationPrice.TieredWithProrationConfig;
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationBulkPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationBulkWithFiltersPrice {
+ /**
+ * Configuration for bulk_with_filters pricing
+ */
+ bulk_with_filters_config: NewLicenseAllocationBulkWithFiltersPrice.BulkWithFiltersConfig;
+
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'bulk_with_filters';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationBulkWithFiltersPrice {
+ /**
+ * Configuration for bulk_with_filters pricing
+ */
+ export interface BulkWithFiltersConfig {
+ /**
+ * Property filters to apply (all must match)
+ */
+ filters: Array;
+
+ /**
+ * Bulk tiers for rating based on total usage volume
+ */
+ tiers: Array;
+ }
+
+ export namespace BulkWithFiltersConfig {
+ /**
+ * Configuration for a single property filter
+ */
+ export interface Filter {
+ /**
+ * Event property key to filter on
+ */
+ property_key: string;
+
+ /**
+ * Event property value to match
+ */
+ property_value: string;
+ }
+
+ /**
+ * Configuration for a single bulk pricing tier
+ */
+ export interface Tier {
+ /**
+ * Amount per unit
+ */
+ unit_amount: string;
+
+ /**
+ * The lower bound for this tier
+ */
+ tier_lower_bound?: string | null;
+ }
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationPackagePrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'package';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for package pricing
+ */
+ package_config: Shared.PackageConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationPackagePrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationMatrixPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * Configuration for matrix pricing
+ */
+ matrix_config: Shared.MatrixConfig;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'matrix';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationMatrixPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationThresholdTotalAmountPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'threshold_total_amount';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for threshold_total_amount pricing
+ */
+ threshold_total_amount_config: NewLicenseAllocationThresholdTotalAmountPrice.ThresholdTotalAmountConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationThresholdTotalAmountPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for threshold_total_amount pricing
+ */
+ export interface ThresholdTotalAmountConfig {
+ /**
+ * When the quantity consumed passes a provided threshold, the configured total
+ * will be charged
+ */
+ consumption_table: Array;
+
+ /**
+ * If true, the unit price will be prorated to the billing period
+ */
+ prorate?: boolean | null;
+ }
+
+ export namespace ThresholdTotalAmountConfig {
+ /**
+ * Configuration for a single threshold
+ */
+ export interface ConsumptionTable {
+ threshold: string;
+
+ /**
+ * Total amount for this threshold
+ */
+ total_amount: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationTieredPackagePrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'tiered_package';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for tiered_package pricing
+ */
+ tiered_package_config: NewLicenseAllocationTieredPackagePrice.TieredPackageConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationTieredPackagePrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for tiered_package pricing
+ */
+ export interface TieredPackageConfig {
+ package_size: string;
+
+ /**
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
+ * are defined using exclusive lower bounds. The tier bounds are defined based on
+ * the total quantity rather than the number of packages, so they must be multiples
+ * of the package size.
+ */
+ tiers: Array;
+ }
+
+ export namespace TieredPackageConfig {
+ /**
+ * Configuration for a single tier with business logic
+ */
+ export interface Tier {
+ /**
+ * Price per package
+ */
+ per_unit: string;
+
+ tier_lower_bound: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationTieredWithMinimumPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'tiered_with_minimum';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for tiered_with_minimum pricing
+ */
+ tiered_with_minimum_config: NewLicenseAllocationTieredWithMinimumPrice.TieredWithMinimumConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationTieredWithMinimumPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for tiered_with_minimum pricing
+ */
+ export interface TieredWithMinimumConfig {
+ /**
+ * Tiered pricing with a minimum amount dependent on the volume tier. Tiers are
+ * defined using exclusive lower bounds.
+ */
+ tiers: Array;
+
+ /**
+ * If true, tiers with an accrued amount of 0 will not be included in the rating.
+ */
+ hide_zero_amount_tiers?: boolean;
+
+ /**
+ * If true, the unit price will be prorated to the billing period
+ */
+ prorate?: boolean;
+ }
+
+ export namespace TieredWithMinimumConfig {
+ /**
+ * Configuration for a single tier
+ */
+ export interface Tier {
+ minimum_amount: string;
+
+ tier_lower_bound: string;
+
+ /**
+ * Per unit amount
+ */
+ unit_amount: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationGroupedTieredPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for grouped_tiered pricing
+ */
+ grouped_tiered_config: NewLicenseAllocationGroupedTieredPrice.GroupedTieredConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'grouped_tiered';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationGroupedTieredPrice {
+ /**
+ * Configuration for grouped_tiered pricing
+ */
+ export interface GroupedTieredConfig {
+ /**
+ * The billable metric property used to group before tiering
+ */
+ grouping_key: string;
+
+ /**
+ * Apply tiered pricing to each segment generated after grouping with the provided
+ * key
+ */
+ tiers: Array;
+ }
+
+ export namespace GroupedTieredConfig {
+ /**
+ * Configuration for a single tier
+ */
+ export interface Tier {
+ tier_lower_bound: string;
+
+ /**
+ * Per unit amount
+ */
+ unit_amount: string;
+ }
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationTieredPackageWithMinimumPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'tiered_package_with_minimum';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for tiered_package_with_minimum pricing
+ */
+ tiered_package_with_minimum_config: NewLicenseAllocationTieredPackageWithMinimumPrice.TieredPackageWithMinimumConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationTieredPackageWithMinimumPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for tiered_package_with_minimum pricing
+ */
+ export interface TieredPackageWithMinimumConfig {
+ package_size: number;
+
+ /**
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
+ * are defined using exclusive lower bounds.
+ */
+ tiers: Array;
+ }
+
+ export namespace TieredPackageWithMinimumConfig {
+ /**
+ * Configuration for a single tier
+ */
+ export interface Tier {
+ minimum_amount: string;
+
+ per_unit: string;
+
+ tier_lower_bound: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationPackageWithAllocationPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'package_with_allocation';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for package_with_allocation pricing
+ */
+ package_with_allocation_config: NewLicenseAllocationPackageWithAllocationPrice.PackageWithAllocationConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationPackageWithAllocationPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for package_with_allocation pricing
+ */
+ export interface PackageWithAllocationConfig {
+ allocation: string;
+
+ package_amount: string;
+
+ package_size: string;
+ }
+ }
+
+ export interface NewLicenseAllocationUnitWithPercentPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'unit_with_percent';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for unit_with_percent pricing
+ */
+ unit_with_percent_config: NewLicenseAllocationUnitWithPercentPrice.UnitWithPercentConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationUnitWithPercentPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for unit_with_percent pricing
+ */
+ export interface UnitWithPercentConfig {
+ /**
+ * What percent, out of 100, of the calculated total to charge
+ */
+ percent: string;
+
+ /**
+ * Rate per unit of usage
+ */
+ unit_amount: string;
+ }
+ }
+
+ export interface NewLicenseAllocationMatrixWithAllocationPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * Configuration for matrix_with_allocation pricing
+ */
+ matrix_with_allocation_config: Shared.MatrixWithAllocationConfig;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'matrix_with_allocation';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationMatrixWithAllocationPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationTieredWithProrationPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'tiered_with_proration';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for tiered_with_proration pricing
+ */
+ tiered_with_proration_config: NewLicenseAllocationTieredWithProrationPrice.TieredWithProrationConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationTieredWithProrationPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for tiered_with_proration pricing
+ */
+ export interface TieredWithProrationConfig {
+ /**
+ * Tiers for rating based on total usage quantities into the specified tier with
+ * proration
+ */
+ tiers: Array;
+ }
+
+ export namespace TieredWithProrationConfig {
+ /**
+ * Configuration for a single tiered with proration tier
+ */
+ export interface Tier {
+ /**
+ * Inclusive tier starting value
+ */
+ tier_lower_bound: string;
+
+ /**
+ * Amount per unit
+ */
+ unit_amount: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationUnitWithProrationPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'unit_with_proration';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for unit_with_proration pricing
+ */
+ unit_with_proration_config: NewLicenseAllocationUnitWithProrationPrice.UnitWithProrationConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationUnitWithProrationPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for unit_with_proration pricing
+ */
+ export interface UnitWithProrationConfig {
+ /**
+ * Rate per unit of usage
+ */
+ unit_amount: string;
+ }
+ }
+
+ export interface NewLicenseAllocationGroupedAllocationPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for grouped_allocation pricing
+ */
+ grouped_allocation_config: NewLicenseAllocationGroupedAllocationPrice.GroupedAllocationConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'grouped_allocation';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationGroupedAllocationPrice {
+ /**
+ * Configuration for grouped_allocation pricing
+ */
+ export interface GroupedAllocationConfig {
+ /**
+ * Usage allocation per group
+ */
+ allocation: string;
+
+ /**
+ * How to determine the groups that should each be allocated some quantity
+ */
+ grouping_key: string;
+
+ /**
+ * Unit rate for post-allocation
+ */
+ overage_unit_rate: string;
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationBulkWithProrationPrice {
+ /**
+ * Configuration for bulk_with_proration pricing
+ */
+ bulk_with_proration_config: NewLicenseAllocationBulkWithProrationPrice.BulkWithProrationConfig;
+
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'bulk_with_proration';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationBulkWithProrationPrice {
+ /**
+ * Configuration for bulk_with_proration pricing
+ */
+ export interface BulkWithProrationConfig {
+ /**
+ * Bulk tiers for rating based on total usage volume
+ */
+ tiers: Array;
+ }
+
+ export namespace BulkWithProrationConfig {
+ /**
+ * Configuration for a single bulk pricing tier with proration
+ */
+ export interface Tier {
+ /**
+ * Cost per unit
+ */
+ unit_amount: string;
+
+ /**
+ * The lower bound for this tier
+ */
+ tier_lower_bound?: string | null;
+ }
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationGroupedWithProratedMinimumPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for grouped_with_prorated_minimum pricing
+ */
+ grouped_with_prorated_minimum_config: NewLicenseAllocationGroupedWithProratedMinimumPrice.GroupedWithProratedMinimumConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'grouped_with_prorated_minimum';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationGroupedWithProratedMinimumPrice {
+ /**
+ * Configuration for grouped_with_prorated_minimum pricing
+ */
+ export interface GroupedWithProratedMinimumConfig {
+ /**
+ * How to determine the groups that should each have a minimum
+ */
+ grouping_key: string;
+
+ /**
+ * The minimum amount to charge per group
+ */
+ minimum: string;
+
+ /**
+ * The amount to charge per unit
+ */
+ unit_rate: string;
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationGroupedWithMeteredMinimumPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for grouped_with_metered_minimum pricing
+ */
+ grouped_with_metered_minimum_config: NewLicenseAllocationGroupedWithMeteredMinimumPrice.GroupedWithMeteredMinimumConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'grouped_with_metered_minimum';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationGroupedWithMeteredMinimumPrice {
+ /**
+ * Configuration for grouped_with_metered_minimum pricing
+ */
+ export interface GroupedWithMeteredMinimumConfig {
+ /**
+ * Used to partition the usage into groups. The minimum amount is applied to each
+ * group.
+ */
+ grouping_key: string;
+
+ /**
+ * The minimum amount to charge per group per unit
+ */
+ minimum_unit_amount: string;
+
+ /**
+ * Used to determine the unit rate
+ */
+ pricing_key: string;
+
+ /**
+ * Scale the unit rates by the scaling factor.
+ */
+ scaling_factors: Array;
+
+ /**
+ * Used to determine the unit rate scaling factor
+ */
+ scaling_key: string;
+
+ /**
+ * Apply per unit pricing to each pricing value. The minimum amount is applied any
+ * unmatched usage.
+ */
+ unit_amounts: Array;
+ }
+
+ export namespace GroupedWithMeteredMinimumConfig {
+ /**
+ * Configuration for a scaling factor
+ */
+ export interface ScalingFactor {
+ scaling_factor: string;
+
+ scaling_value: string;
+ }
+
+ /**
+ * Configuration for a unit amount
+ */
+ export interface UnitAmount {
+ pricing_value: string;
+
+ /**
+ * Per unit amount
+ */
+ unit_amount: string;
+ }
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationGroupedWithMinMaxThresholdsPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for grouped_with_min_max_thresholds pricing
+ */
+ grouped_with_min_max_thresholds_config: NewLicenseAllocationGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'grouped_with_min_max_thresholds';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationGroupedWithMinMaxThresholdsPrice {
+ /**
+ * Configuration for grouped_with_min_max_thresholds pricing
+ */
+ export interface GroupedWithMinMaxThresholdsConfig {
+ /**
+ * The event property used to group before applying thresholds
+ */
+ grouping_key: string;
+
+ /**
+ * The maximum amount to charge each group
+ */
+ maximum_charge: string;
+
+ /**
+ * The minimum amount to charge each group, regardless of usage
+ */
+ minimum_charge: string;
+
+ /**
+ * The base price charged per group
+ */
+ per_unit_rate: string;
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationMatrixWithDisplayNamePrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * Configuration for matrix_with_display_name pricing
+ */
+ matrix_with_display_name_config: NewLicenseAllocationMatrixWithDisplayNamePrice.MatrixWithDisplayNameConfig;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'matrix_with_display_name';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationMatrixWithDisplayNamePrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for matrix_with_display_name pricing
+ */
+ export interface MatrixWithDisplayNameConfig {
+ /**
+ * Used to determine the unit rate
+ */
+ dimension: string;
+
+ /**
+ * Apply per unit pricing to each dimension value
+ */
+ unit_amounts: Array;
+ }
+
+ export namespace MatrixWithDisplayNameConfig {
+ /**
+ * Configuration for a unit amount item
+ */
+ export interface UnitAmount {
+ /**
+ * The dimension value
+ */
+ dimension_value: string;
+
+ /**
+ * Display name for this dimension value
+ */
+ display_name: string;
+
+ /**
+ * Per unit amount
+ */
+ unit_amount: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationGroupedTieredPackagePrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for grouped_tiered_package pricing
+ */
+ grouped_tiered_package_config: NewLicenseAllocationGroupedTieredPackagePrice.GroupedTieredPackageConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'grouped_tiered_package';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationGroupedTieredPackagePrice {
+ /**
+ * Configuration for grouped_tiered_package pricing
+ */
+ export interface GroupedTieredPackageConfig {
+ /**
+ * The event property used to group before tiering
+ */
+ grouping_key: string;
+
+ package_size: string;
+
+ /**
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
+ * are defined using exclusive lower bounds.
+ */
+ tiers: Array;
+ }
+
+ export namespace GroupedTieredPackageConfig {
+ /**
+ * Configuration for a single tier
+ */
+ export interface Tier {
+ /**
+ * Per package
+ */
+ per_unit: string;
+
+ tier_lower_bound: string;
+ }
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationMaxGroupTieredPackagePrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * Configuration for max_group_tiered_package pricing
+ */
+ max_group_tiered_package_config: NewLicenseAllocationMaxGroupTieredPackagePrice.MaxGroupTieredPackageConfig;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'max_group_tiered_package';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationMaxGroupTieredPackagePrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for max_group_tiered_package pricing
+ */
+ export interface MaxGroupTieredPackageConfig {
+ /**
+ * The event property used to group before tiering the group with the highest value
+ */
+ grouping_key: string;
+
+ package_size: string;
+
+ /**
+ * Apply tiered pricing to the largest group after grouping with the provided key.
+ */
+ tiers: Array;
+ }
+
+ export namespace MaxGroupTieredPackageConfig {
+ /**
+ * Configuration for a single tier
+ */
+ export interface Tier {
+ tier_lower_bound: string;
+
+ /**
+ * Per unit amount
+ */
+ unit_amount: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationScalableMatrixWithUnitPricingPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'scalable_matrix_with_unit_pricing';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for scalable_matrix_with_unit_pricing pricing
+ */
+ scalable_matrix_with_unit_pricing_config: NewLicenseAllocationScalableMatrixWithUnitPricingPrice.ScalableMatrixWithUnitPricingConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationScalableMatrixWithUnitPricingPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for scalable_matrix_with_unit_pricing pricing
+ */
+ export interface ScalableMatrixWithUnitPricingConfig {
+ /**
+ * Used to determine the unit rate
+ */
+ first_dimension: string;
+
+ /**
+ * Apply a scaling factor to each dimension
+ */
+ matrix_scaling_factors: Array;
+
+ /**
+ * The final unit price to rate against the output of the matrix
+ */
+ unit_price: string;
+
+ /**
+ * The property used to group this price
+ */
+ grouping_key?: string | null;
+
+ /**
+ * If true, the unit price will be prorated to the billing period
+ */
+ prorate?: boolean | null;
+
+ /**
+ * Used to determine the unit rate (optional)
+ */
+ second_dimension?: string | null;
+ }
+
+ export namespace ScalableMatrixWithUnitPricingConfig {
+ /**
+ * Configuration for a single matrix scaling factor
+ */
+ export interface MatrixScalingFactor {
+ first_dimension_value: string;
+
+ scaling_factor: string;
+
+ second_dimension_value?: string | null;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationScalableMatrixWithTieredPricingPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'scalable_matrix_with_tiered_pricing';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for scalable_matrix_with_tiered_pricing pricing
+ */
+ scalable_matrix_with_tiered_pricing_config: NewLicenseAllocationScalableMatrixWithTieredPricingPrice.ScalableMatrixWithTieredPricingConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationScalableMatrixWithTieredPricingPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for scalable_matrix_with_tiered_pricing pricing
+ */
+ export interface ScalableMatrixWithTieredPricingConfig {
+ /**
+ * Used for the scalable matrix first dimension
+ */
+ first_dimension: string;
+
+ /**
+ * Apply a scaling factor to each dimension
+ */
+ matrix_scaling_factors: Array;
+
+ tiers: Array;
+
+ /**
+ * Used for the scalable matrix second dimension (optional)
+ */
+ second_dimension?: string | null;
+ }
+
+ export namespace ScalableMatrixWithTieredPricingConfig {
+ /**
+ * Configuration for a single matrix scaling factor
+ */
+ export interface MatrixScalingFactor {
+ first_dimension_value: string;
+
+ scaling_factor: string;
+
+ second_dimension_value?: string | null;
+ }
+
+ /**
+ * Configuration for a single tier entry with business logic
+ */
+ export interface Tier {
+ tier_lower_bound: string;
+
+ unit_amount: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationCumulativeGroupedBulkPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for cumulative_grouped_bulk pricing
+ */
+ cumulative_grouped_bulk_config: NewLicenseAllocationCumulativeGroupedBulkPrice.CumulativeGroupedBulkConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'cumulative_grouped_bulk';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationCumulativeGroupedBulkPrice {
+ /**
+ * Configuration for cumulative_grouped_bulk pricing
+ */
+ export interface CumulativeGroupedBulkConfig {
+ /**
+ * Each tier lower bound must have the same group of values.
+ */
+ dimension_values: Array;
+
+ group: string;
+ }
+
+ export namespace CumulativeGroupedBulkConfig {
+ /**
+ * Configuration for a dimension value entry
+ */
+ export interface DimensionValue {
+ /**
+ * Grouping key value
+ */
+ grouping_key: string;
+
+ /**
+ * Tier lower bound
+ */
+ tier_lower_bound: string;
+
+ /**
+ * Unit amount for this combination
+ */
+ unit_amount: string;
+ }
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationCumulativeGroupedAllocationPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for cumulative_grouped_allocation pricing
+ */
+ cumulative_grouped_allocation_config: NewLicenseAllocationCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'cumulative_grouped_allocation';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationCumulativeGroupedAllocationPrice {
+ /**
+ * Configuration for cumulative_grouped_allocation pricing
+ */
+ export interface CumulativeGroupedAllocationConfig {
+ /**
+ * The overall allocation across all groups
+ */
+ cumulative_allocation: string;
+
+ /**
+ * The allocation per individual group
+ */
+ group_allocation: string;
+
+ /**
+ * The event property used to group usage before applying allocations
+ */
+ grouping_key: string;
+
+ /**
+ * The amount to charge for each unit outside of the allocation
+ */
+ unit_amount: string;
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationMinimumCompositePrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * Configuration for minimum_composite pricing
+ */
+ minimum_composite_config: NewLicenseAllocationMinimumCompositePrice.MinimumCompositeConfig;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'minimum_composite';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationMinimumCompositePrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for minimum_composite pricing
+ */
+ export interface MinimumCompositeConfig {
+ /**
+ * The minimum amount to apply
+ */
+ minimum_amount: string;
+
+ /**
+ * If true, subtotals from this price are prorated based on the service period
+ */
+ prorated?: boolean;
+ }
+ }
+
+ export interface NewLicenseAllocationPercentCompositePrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'percent';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for percent pricing
+ */
+ percent_config: NewLicenseAllocationPercentCompositePrice.PercentConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationPercentCompositePrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for percent pricing
+ */
+ export interface PercentConfig {
+ /**
+ * What percent of the component subtotals to charge
+ */
+ percent: number;
+ }
+ }
+
+ export interface NewLicenseAllocationEventOutputPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for event_output pricing
+ */
+ event_output_config: NewLicenseAllocationEventOutputPrice.EventOutputConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'event_output';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationEventOutputPrice {
+ /**
+ * Configuration for event_output pricing
+ */
+ export interface EventOutputConfig {
+ /**
+ * The key in the event data to extract the unit rate from.
+ */
+ unit_rating_key: string;
+
+ /**
+ * If provided, this amount will be used as the unit rate when an event does not
+ * have a value for the `unit_rating_key`. If not provided, events missing a unit
+ * rate will be ignored.
+ */
+ default_unit_rate?: string | null;
+
+ /**
+ * An optional key in the event data to group by (e.g., event ID). All events will
+ * also be grouped by their unit rate.
+ */
+ grouping_key?: string | null;
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewPlanBulkWithFiltersPrice {
+ /**
+ * Configuration for bulk_with_filters pricing
+ */
+ bulk_with_filters_config: NewPlanBulkWithFiltersPrice.BulkWithFiltersConfig;
+
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'bulk_with_filters';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewPlanBulkWithFiltersPrice {
+ /**
+ * Configuration for bulk_with_filters pricing
+ */
+ export interface BulkWithFiltersConfig {
+ /**
+ * Property filters to apply (all must match)
+ */
+ filters: Array;
+
+ /**
+ * Bulk tiers for rating based on total usage volume
+ */
+ tiers: Array;
+ }
+
+ export namespace BulkWithFiltersConfig {
+ /**
+ * Configuration for a single property filter
+ */
+ export interface Filter {
+ /**
+ * Event property key to filter on
+ */
+ property_key: string;
+
+ /**
+ * Event property value to match
+ */
+ property_value: string;
+ }
+
+ /**
+ * Configuration for a single bulk pricing tier
+ */
+ export interface Tier {
+ /**
+ * Amount per unit
+ */
+ unit_amount: string;
+
+ /**
+ * The lower bound for this tier
+ */
+ tier_lower_bound?: string | null;
+ }
+ }
+ }
+
+ export interface NewPlanTieredWithProrationPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'tiered_with_proration';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for tiered_with_proration pricing
+ */
+ tiered_with_proration_config: NewPlanTieredWithProrationPrice.TieredWithProrationConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewPlanTieredWithProrationPrice {
+ /**
+ * Configuration for tiered_with_proration pricing
+ */
+ export interface TieredWithProrationConfig {
+ /**
+ * Tiers for rating based on total usage quantities into the specified tier with
+ * proration
+ */
+ tiers: Array;
+ }
+
+ export namespace TieredWithProrationConfig {
+ /**
+ * Configuration for a single tiered with proration tier
+ */
+ export interface Tier {
+ /**
+ * Inclusive tier starting value
+ */
+ tier_lower_bound: string;
+
+ /**
+ * Amount per unit
+ */
+ unit_amount: string;
+ }
+ }
+ }
+
+ export interface NewPlanGroupedWithMinMaxThresholdsPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for grouped_with_min_max_thresholds pricing
+ */
+ grouped_with_min_max_thresholds_config: NewPlanGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'grouped_with_min_max_thresholds';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewPlanGroupedWithMinMaxThresholdsPrice {
+ /**
+ * Configuration for grouped_with_min_max_thresholds pricing
+ */
+ export interface GroupedWithMinMaxThresholdsConfig {
+ /**
+ * The event property used to group before applying thresholds
+ */
+ grouping_key: string;
+
+ /**
+ * The maximum amount to charge each group
+ */
+ maximum_charge: string;
+
+ /**
+ * The minimum amount to charge each group, regardless of usage
+ */
+ minimum_charge: string;
+
+ /**
+ * The base price charged per group
+ */
+ per_unit_rate: string;
+ }
+ }
+
+ export interface NewPlanCumulativeGroupedAllocationPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for cumulative_grouped_allocation pricing
+ */
+ cumulative_grouped_allocation_config: NewPlanCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'cumulative_grouped_allocation';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewPlanCumulativeGroupedAllocationPrice {
+ /**
+ * Configuration for cumulative_grouped_allocation pricing
+ */
+ export interface CumulativeGroupedAllocationConfig {
+ /**
+ * The overall allocation across all groups
+ */
+ cumulative_allocation: string;
+
+ /**
+ * The allocation per individual group
+ */
+ group_allocation: string;
+
+ /**
+ * The event property used to group usage before applying allocations
+ */
+ grouping_key: string;
+
+ /**
+ * The amount to charge for each unit outside of the allocation
+ */
+ unit_amount: string;
+ }
+ }
+
+ export interface NewPlanPercentCompositePrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'percent';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for percent pricing
+ */
+ percent_config: NewPlanPercentCompositePrice.PercentConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewPlanPercentCompositePrice {
+ /**
+ * Configuration for percent pricing
+ */
+ export interface PercentConfig {
+ /**
+ * What percent of the component subtotals to charge
+ */
+ percent: number;
+ }
+ }
+
+ export interface NewPlanEventOutputPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for event_output pricing
+ */
+ event_output_config: NewPlanEventOutputPrice.EventOutputConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'event_output';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewPlanEventOutputPrice {
+ /**
+ * Configuration for event_output pricing
+ */
+ export interface EventOutputConfig {
+ /**
+ * The key in the event data to extract the unit rate from.
+ */
+ unit_rating_key: string;
+
+ /**
+ * If provided, this amount will be used as the unit rate when an event does not
+ * have a value for the `unit_rating_key`. If not provided, events missing a unit
+ * rate will be ignored.
+ */
+ default_unit_rate?: string | null;
+
+ /**
+ * An optional key in the event data to group by (e.g., event ID). All events will
+ * also be grouped by their unit rate.
+ */
+ grouping_key?: string | null;
+ }
+ }
+ }
+
+ export interface RemoveAdjustment {
+ /**
+ * The id of the adjustment to remove from on the plan.
+ */
+ adjustment_id: string;
+
+ /**
+ * The phase to remove this adjustment from.
+ */
+ plan_phase_order?: number | null;
+ }
+
+ export interface RemovePrice {
+ /**
+ * The id of the price to remove from the plan.
+ */
+ price_id: string;
+
+ /**
+ * The phase to remove this price from.
+ */
+ plan_phase_order?: number | null;
+ }
+
+ export interface ReplaceAdjustment {
+ /**
+ * The definition of a new adjustment to create and add to the plan.
+ */
+ adjustment:
+ | Shared.NewPercentageDiscount
+ | Shared.NewUsageDiscount
+ | Shared.NewAmountDiscount
+ | Shared.NewMinimum
+ | Shared.NewMaximum;
+
+ /**
+ * The id of the adjustment on the plan to replace in the plan.
+ */
+ replaces_adjustment_id: string;
+
+ /**
+ * The phase to replace this adjustment from.
+ */
+ plan_phase_order?: number | null;
+ }
+
+ export interface ReplacePrice {
+ /**
+ * The id of the price on the plan to replace in the plan.
+ */
+ replaces_price_id: string;
+
+ /**
+ * The allocation price to add to the plan.
+ */
+ allocation_price?: Shared.NewAllocationPrice | null;
+
+ /**
+ * The license allocation price to add to the plan.
+ */
+ license_allocation_price?:
+ | ReplacePrice.NewLicenseAllocationUnitPrice
+ | ReplacePrice.NewLicenseAllocationTieredPrice
+ | ReplacePrice.NewLicenseAllocationBulkPrice
+ | ReplacePrice.NewLicenseAllocationBulkWithFiltersPrice
+ | ReplacePrice.NewLicenseAllocationPackagePrice
+ | ReplacePrice.NewLicenseAllocationMatrixPrice
+ | ReplacePrice.NewLicenseAllocationThresholdTotalAmountPrice
+ | ReplacePrice.NewLicenseAllocationTieredPackagePrice
+ | ReplacePrice.NewLicenseAllocationTieredWithMinimumPrice
+ | ReplacePrice.NewLicenseAllocationGroupedTieredPrice
+ | ReplacePrice.NewLicenseAllocationTieredPackageWithMinimumPrice
+ | ReplacePrice.NewLicenseAllocationPackageWithAllocationPrice
+ | ReplacePrice.NewLicenseAllocationUnitWithPercentPrice
+ | ReplacePrice.NewLicenseAllocationMatrixWithAllocationPrice
+ | ReplacePrice.NewLicenseAllocationTieredWithProrationPrice
+ | ReplacePrice.NewLicenseAllocationUnitWithProrationPrice
+ | ReplacePrice.NewLicenseAllocationGroupedAllocationPrice
+ | ReplacePrice.NewLicenseAllocationBulkWithProrationPrice
+ | ReplacePrice.NewLicenseAllocationGroupedWithProratedMinimumPrice
+ | ReplacePrice.NewLicenseAllocationGroupedWithMeteredMinimumPrice
+ | ReplacePrice.NewLicenseAllocationGroupedWithMinMaxThresholdsPrice
+ | ReplacePrice.NewLicenseAllocationMatrixWithDisplayNamePrice
+ | ReplacePrice.NewLicenseAllocationGroupedTieredPackagePrice
+ | ReplacePrice.NewLicenseAllocationMaxGroupTieredPackagePrice
+ | ReplacePrice.NewLicenseAllocationScalableMatrixWithUnitPricingPrice
+ | ReplacePrice.NewLicenseAllocationScalableMatrixWithTieredPricingPrice
+ | ReplacePrice.NewLicenseAllocationCumulativeGroupedBulkPrice
+ | ReplacePrice.NewLicenseAllocationCumulativeGroupedAllocationPrice
+ | ReplacePrice.NewLicenseAllocationMinimumCompositePrice
+ | ReplacePrice.NewLicenseAllocationPercentCompositePrice
+ | ReplacePrice.NewLicenseAllocationEventOutputPrice
+ | null;
+
+ /**
+ * The phase to replace this price from.
+ */
+ plan_phase_order?: number | null;
+
+ /**
+ * New plan price request body params.
+ */
+ price?:
+ | Shared.NewPlanUnitPrice
+ | Shared.NewPlanTieredPrice
+ | Shared.NewPlanBulkPrice
+ | ReplacePrice.NewPlanBulkWithFiltersPrice
+ | Shared.NewPlanPackagePrice
+ | Shared.NewPlanMatrixPrice
+ | Shared.NewPlanThresholdTotalAmountPrice
+ | Shared.NewPlanTieredPackagePrice
+ | Shared.NewPlanTieredWithMinimumPrice
+ | Shared.NewPlanGroupedTieredPrice
+ | Shared.NewPlanTieredPackageWithMinimumPrice
+ | Shared.NewPlanPackageWithAllocationPrice
+ | Shared.NewPlanUnitWithPercentPrice
+ | Shared.NewPlanMatrixWithAllocationPrice
+ | ReplacePrice.NewPlanTieredWithProrationPrice
+ | Shared.NewPlanUnitWithProrationPrice
+ | Shared.NewPlanGroupedAllocationPrice
+ | Shared.NewPlanBulkWithProrationPrice
+ | Shared.NewPlanGroupedWithProratedMinimumPrice
+ | Shared.NewPlanGroupedWithMeteredMinimumPrice
+ | ReplacePrice.NewPlanGroupedWithMinMaxThresholdsPrice
+ | Shared.NewPlanMatrixWithDisplayNamePrice
+ | Shared.NewPlanGroupedTieredPackagePrice
+ | Shared.NewPlanMaxGroupTieredPackagePrice
+ | Shared.NewPlanScalableMatrixWithUnitPricingPrice
+ | Shared.NewPlanScalableMatrixWithTieredPricingPrice
+ | Shared.NewPlanCumulativeGroupedBulkPrice
+ | ReplacePrice.NewPlanCumulativeGroupedAllocationPrice
+ | Shared.NewPlanMinimumCompositePrice
+ | ReplacePrice.NewPlanPercentCompositePrice
+ | ReplacePrice.NewPlanEventOutputPrice
+ | null;
+ }
+
+ export namespace ReplacePrice {
+ export interface NewLicenseAllocationUnitPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'unit';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for unit pricing
+ */
+ unit_config: Shared.UnitConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationUnitPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationTieredPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'tiered';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for tiered pricing
+ */
+ tiered_config: Shared.TieredConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationTieredPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationBulkPrice {
+ /**
+ * Configuration for bulk pricing
+ */
+ bulk_config: Shared.BulkConfig;
+
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'bulk';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationBulkPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationBulkWithFiltersPrice {
+ /**
+ * Configuration for bulk_with_filters pricing
+ */
+ bulk_with_filters_config: NewLicenseAllocationBulkWithFiltersPrice.BulkWithFiltersConfig;
+
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'bulk_with_filters';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationBulkWithFiltersPrice {
+ /**
+ * Configuration for bulk_with_filters pricing
+ */
+ export interface BulkWithFiltersConfig {
+ /**
+ * Property filters to apply (all must match)
+ */
+ filters: Array;
+
+ /**
+ * Bulk tiers for rating based on total usage volume
+ */
+ tiers: Array;
+ }
+
+ export namespace BulkWithFiltersConfig {
+ /**
+ * Configuration for a single property filter
+ */
+ export interface Filter {
+ /**
+ * Event property key to filter on
+ */
+ property_key: string;
+
+ /**
+ * Event property value to match
+ */
+ property_value: string;
+ }
+
+ /**
+ * Configuration for a single bulk pricing tier
+ */
+ export interface Tier {
+ /**
+ * Amount per unit
+ */
+ unit_amount: string;
+
+ /**
+ * The lower bound for this tier
+ */
+ tier_lower_bound?: string | null;
+ }
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationPackagePrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'package';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for package pricing
+ */
+ package_config: Shared.PackageConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationPackagePrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationMatrixPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * Configuration for matrix pricing
+ */
+ matrix_config: Shared.MatrixConfig;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'matrix';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationMatrixPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationThresholdTotalAmountPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'threshold_total_amount';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for threshold_total_amount pricing
+ */
+ threshold_total_amount_config: NewLicenseAllocationThresholdTotalAmountPrice.ThresholdTotalAmountConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationThresholdTotalAmountPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for threshold_total_amount pricing
+ */
+ export interface ThresholdTotalAmountConfig {
+ /**
+ * When the quantity consumed passes a provided threshold, the configured total
+ * will be charged
+ */
+ consumption_table: Array;
+
+ /**
+ * If true, the unit price will be prorated to the billing period
+ */
+ prorate?: boolean | null;
+ }
+
+ export namespace ThresholdTotalAmountConfig {
+ /**
+ * Configuration for a single threshold
+ */
+ export interface ConsumptionTable {
+ threshold: string;
+
+ /**
+ * Total amount for this threshold
+ */
+ total_amount: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationTieredPackagePrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'tiered_package';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for tiered_package pricing
+ */
+ tiered_package_config: NewLicenseAllocationTieredPackagePrice.TieredPackageConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationTieredPackagePrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for tiered_package pricing
+ */
+ export interface TieredPackageConfig {
+ package_size: string;
+
+ /**
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
+ * are defined using exclusive lower bounds. The tier bounds are defined based on
+ * the total quantity rather than the number of packages, so they must be multiples
+ * of the package size.
+ */
+ tiers: Array;
+ }
+
+ export namespace TieredPackageConfig {
+ /**
+ * Configuration for a single tier with business logic
+ */
+ export interface Tier {
+ /**
+ * Price per package
+ */
+ per_unit: string;
+
+ tier_lower_bound: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationTieredWithMinimumPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'tiered_with_minimum';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for tiered_with_minimum pricing
+ */
+ tiered_with_minimum_config: NewLicenseAllocationTieredWithMinimumPrice.TieredWithMinimumConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationTieredWithMinimumPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for tiered_with_minimum pricing
+ */
+ export interface TieredWithMinimumConfig {
+ /**
+ * Tiered pricing with a minimum amount dependent on the volume tier. Tiers are
+ * defined using exclusive lower bounds.
+ */
+ tiers: Array;
+
+ /**
+ * If true, tiers with an accrued amount of 0 will not be included in the rating.
+ */
+ hide_zero_amount_tiers?: boolean;
+
+ /**
+ * If true, the unit price will be prorated to the billing period
+ */
+ prorate?: boolean;
+ }
+
+ export namespace TieredWithMinimumConfig {
+ /**
+ * Configuration for a single tier
+ */
+ export interface Tier {
+ minimum_amount: string;
+
+ tier_lower_bound: string;
+
+ /**
+ * Per unit amount
+ */
+ unit_amount: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationGroupedTieredPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for grouped_tiered pricing
+ */
+ grouped_tiered_config: NewLicenseAllocationGroupedTieredPrice.GroupedTieredConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'grouped_tiered';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationGroupedTieredPrice {
+ /**
+ * Configuration for grouped_tiered pricing
+ */
+ export interface GroupedTieredConfig {
+ /**
+ * The billable metric property used to group before tiering
+ */
+ grouping_key: string;
+
+ /**
+ * Apply tiered pricing to each segment generated after grouping with the provided
+ * key
+ */
+ tiers: Array;
+ }
+
+ export namespace GroupedTieredConfig {
+ /**
+ * Configuration for a single tier
+ */
+ export interface Tier {
+ tier_lower_bound: string;
+
+ /**
+ * Per unit amount
+ */
+ unit_amount: string;
+ }
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationTieredPackageWithMinimumPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'tiered_package_with_minimum';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for tiered_package_with_minimum pricing
+ */
+ tiered_package_with_minimum_config: NewLicenseAllocationTieredPackageWithMinimumPrice.TieredPackageWithMinimumConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationTieredPackageWithMinimumPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for tiered_package_with_minimum pricing
+ */
+ export interface TieredPackageWithMinimumConfig {
+ package_size: number;
+
+ /**
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
+ * are defined using exclusive lower bounds.
+ */
+ tiers: Array;
+ }
+
+ export namespace TieredPackageWithMinimumConfig {
+ /**
+ * Configuration for a single tier
+ */
+ export interface Tier {
+ minimum_amount: string;
+
+ per_unit: string;
+
+ tier_lower_bound: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationPackageWithAllocationPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'package_with_allocation';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for package_with_allocation pricing
+ */
+ package_with_allocation_config: NewLicenseAllocationPackageWithAllocationPrice.PackageWithAllocationConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationPackageWithAllocationPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for package_with_allocation pricing
+ */
+ export interface PackageWithAllocationConfig {
+ allocation: string;
+
+ package_amount: string;
+
+ package_size: string;
+ }
+ }
+
+ export interface NewLicenseAllocationUnitWithPercentPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'unit_with_percent';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for unit_with_percent pricing
+ */
+ unit_with_percent_config: NewLicenseAllocationUnitWithPercentPrice.UnitWithPercentConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationUnitWithPercentPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for unit_with_percent pricing
+ */
+ export interface UnitWithPercentConfig {
+ /**
+ * What percent, out of 100, of the calculated total to charge
+ */
+ percent: string;
+
+ /**
+ * Rate per unit of usage
+ */
+ unit_amount: string;
+ }
+ }
+
+ export interface NewLicenseAllocationMatrixWithAllocationPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * Configuration for matrix_with_allocation pricing
+ */
+ matrix_with_allocation_config: Shared.MatrixWithAllocationConfig;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'matrix_with_allocation';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationMatrixWithAllocationPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationTieredWithProrationPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'tiered_with_proration';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for tiered_with_proration pricing
+ */
+ tiered_with_proration_config: NewLicenseAllocationTieredWithProrationPrice.TieredWithProrationConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationTieredWithProrationPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for tiered_with_proration pricing
+ */
+ export interface TieredWithProrationConfig {
+ /**
+ * Tiers for rating based on total usage quantities into the specified tier with
+ * proration
+ */
+ tiers: Array;
+ }
+
+ export namespace TieredWithProrationConfig {
+ /**
+ * Configuration for a single tiered with proration tier
+ */
+ export interface Tier {
+ /**
+ * Inclusive tier starting value
+ */
+ tier_lower_bound: string;
+
+ /**
+ * Amount per unit
+ */
+ unit_amount: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationUnitWithProrationPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'unit_with_proration';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for unit_with_proration pricing
+ */
+ unit_with_proration_config: NewLicenseAllocationUnitWithProrationPrice.UnitWithProrationConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationUnitWithProrationPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for unit_with_proration pricing
+ */
+ export interface UnitWithProrationConfig {
+ /**
+ * Rate per unit of usage
+ */
+ unit_amount: string;
+ }
+ }
+
+ export interface NewLicenseAllocationGroupedAllocationPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for grouped_allocation pricing
+ */
+ grouped_allocation_config: NewLicenseAllocationGroupedAllocationPrice.GroupedAllocationConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'grouped_allocation';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationGroupedAllocationPrice {
+ /**
+ * Configuration for grouped_allocation pricing
+ */
+ export interface GroupedAllocationConfig {
+ /**
+ * Usage allocation per group
+ */
+ allocation: string;
+
+ /**
+ * How to determine the groups that should each be allocated some quantity
+ */
+ grouping_key: string;
+
+ /**
+ * Unit rate for post-allocation
+ */
+ overage_unit_rate: string;
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationBulkWithProrationPrice {
+ /**
+ * Configuration for bulk_with_proration pricing
+ */
+ bulk_with_proration_config: NewLicenseAllocationBulkWithProrationPrice.BulkWithProrationConfig;
+
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'bulk_with_proration';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationBulkWithProrationPrice {
+ /**
+ * Configuration for bulk_with_proration pricing
+ */
+ export interface BulkWithProrationConfig {
+ /**
+ * Bulk tiers for rating based on total usage volume
+ */
+ tiers: Array;
+ }
+
+ export namespace BulkWithProrationConfig {
+ /**
+ * Configuration for a single bulk pricing tier with proration
+ */
+ export interface Tier {
+ /**
+ * Cost per unit
+ */
+ unit_amount: string;
+
+ /**
+ * The lower bound for this tier
+ */
+ tier_lower_bound?: string | null;
+ }
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationGroupedWithProratedMinimumPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for grouped_with_prorated_minimum pricing
+ */
+ grouped_with_prorated_minimum_config: NewLicenseAllocationGroupedWithProratedMinimumPrice.GroupedWithProratedMinimumConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'grouped_with_prorated_minimum';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationGroupedWithProratedMinimumPrice {
+ /**
+ * Configuration for grouped_with_prorated_minimum pricing
+ */
+ export interface GroupedWithProratedMinimumConfig {
+ /**
+ * How to determine the groups that should each have a minimum
+ */
+ grouping_key: string;
+
+ /**
+ * The minimum amount to charge per group
+ */
+ minimum: string;
+
+ /**
+ * The amount to charge per unit
+ */
+ unit_rate: string;
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationGroupedWithMeteredMinimumPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for grouped_with_metered_minimum pricing
+ */
+ grouped_with_metered_minimum_config: NewLicenseAllocationGroupedWithMeteredMinimumPrice.GroupedWithMeteredMinimumConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'grouped_with_metered_minimum';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationGroupedWithMeteredMinimumPrice {
+ /**
+ * Configuration for grouped_with_metered_minimum pricing
+ */
+ export interface GroupedWithMeteredMinimumConfig {
+ /**
+ * Used to partition the usage into groups. The minimum amount is applied to each
+ * group.
+ */
+ grouping_key: string;
+
+ /**
+ * The minimum amount to charge per group per unit
+ */
+ minimum_unit_amount: string;
+
+ /**
+ * Used to determine the unit rate
+ */
+ pricing_key: string;
+
+ /**
+ * Scale the unit rates by the scaling factor.
+ */
+ scaling_factors: Array;
+
+ /**
+ * Used to determine the unit rate scaling factor
+ */
+ scaling_key: string;
+
+ /**
+ * Apply per unit pricing to each pricing value. The minimum amount is applied any
+ * unmatched usage.
+ */
+ unit_amounts: Array;
+ }
+
+ export namespace GroupedWithMeteredMinimumConfig {
+ /**
+ * Configuration for a scaling factor
+ */
+ export interface ScalingFactor {
+ scaling_factor: string;
+
+ scaling_value: string;
+ }
+
+ /**
+ * Configuration for a unit amount
+ */
+ export interface UnitAmount {
+ pricing_value: string;
+
+ /**
+ * Per unit amount
+ */
+ unit_amount: string;
+ }
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationGroupedWithMinMaxThresholdsPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for grouped_with_min_max_thresholds pricing
+ */
+ grouped_with_min_max_thresholds_config: NewLicenseAllocationGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'grouped_with_min_max_thresholds';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationGroupedWithMinMaxThresholdsPrice {
+ /**
+ * Configuration for grouped_with_min_max_thresholds pricing
+ */
+ export interface GroupedWithMinMaxThresholdsConfig {
+ /**
+ * The event property used to group before applying thresholds
+ */
+ grouping_key: string;
+
+ /**
+ * The maximum amount to charge each group
+ */
+ maximum_charge: string;
+
+ /**
+ * The minimum amount to charge each group, regardless of usage
+ */
+ minimum_charge: string;
+
+ /**
+ * The base price charged per group
+ */
+ per_unit_rate: string;
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationMatrixWithDisplayNamePrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * Configuration for matrix_with_display_name pricing
+ */
+ matrix_with_display_name_config: NewLicenseAllocationMatrixWithDisplayNamePrice.MatrixWithDisplayNameConfig;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'matrix_with_display_name';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationMatrixWithDisplayNamePrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for matrix_with_display_name pricing
+ */
+ export interface MatrixWithDisplayNameConfig {
+ /**
+ * Used to determine the unit rate
+ */
+ dimension: string;
+
+ /**
+ * Apply per unit pricing to each dimension value
+ */
+ unit_amounts: Array;
+ }
+
+ export namespace MatrixWithDisplayNameConfig {
+ /**
+ * Configuration for a unit amount item
+ */
+ export interface UnitAmount {
+ /**
+ * The dimension value
+ */
+ dimension_value: string;
+
+ /**
+ * Display name for this dimension value
+ */
+ display_name: string;
+
+ /**
+ * Per unit amount
+ */
+ unit_amount: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationGroupedTieredPackagePrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for grouped_tiered_package pricing
+ */
+ grouped_tiered_package_config: NewLicenseAllocationGroupedTieredPackagePrice.GroupedTieredPackageConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'grouped_tiered_package';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationGroupedTieredPackagePrice {
+ /**
+ * Configuration for grouped_tiered_package pricing
+ */
+ export interface GroupedTieredPackageConfig {
+ /**
+ * The event property used to group before tiering
+ */
+ grouping_key: string;
+
+ package_size: string;
+
+ /**
+ * Apply tiered pricing after rounding up the quantity to the package size. Tiers
+ * are defined using exclusive lower bounds.
+ */
+ tiers: Array;
+ }
+
+ export namespace GroupedTieredPackageConfig {
+ /**
+ * Configuration for a single tier
+ */
+ export interface Tier {
+ /**
+ * Per package
+ */
+ per_unit: string;
+
+ tier_lower_bound: string;
+ }
+ }
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
+
+ export interface NewLicenseAllocationMaxGroupTieredPackagePrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * Configuration for max_group_tiered_package pricing
+ */
+ max_group_tiered_package_config: NewLicenseAllocationMaxGroupTieredPackagePrice.MaxGroupTieredPackageConfig;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'max_group_tiered_package';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationMaxGroupTieredPackagePrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for max_group_tiered_package pricing
+ */
+ export interface MaxGroupTieredPackageConfig {
+ /**
+ * The event property used to group before tiering the group with the highest value
+ */
+ grouping_key: string;
+
+ package_size: string;
+
+ /**
+ * Apply tiered pricing to the largest group after grouping with the provided key.
+ */
+ tiers: Array;
+ }
+
+ export namespace MaxGroupTieredPackageConfig {
+ /**
+ * Configuration for a single tier
+ */
+ export interface Tier {
+ tier_lower_bound: string;
+
+ /**
+ * Per unit amount
+ */
+ unit_amount: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationScalableMatrixWithUnitPricingPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'scalable_matrix_with_unit_pricing';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for scalable_matrix_with_unit_pricing pricing
+ */
+ scalable_matrix_with_unit_pricing_config: NewLicenseAllocationScalableMatrixWithUnitPricingPrice.ScalableMatrixWithUnitPricingConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationScalableMatrixWithUnitPricingPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for scalable_matrix_with_unit_pricing pricing
+ */
+ export interface ScalableMatrixWithUnitPricingConfig {
+ /**
+ * Used to determine the unit rate
+ */
+ first_dimension: string;
+
+ /**
+ * Apply a scaling factor to each dimension
+ */
+ matrix_scaling_factors: Array;
+
+ /**
+ * The final unit price to rate against the output of the matrix
+ */
+ unit_price: string;
+
+ /**
+ * The property used to group this price
+ */
+ grouping_key?: string | null;
+
+ /**
+ * If true, the unit price will be prorated to the billing period
+ */
+ prorate?: boolean | null;
+
+ /**
+ * Used to determine the unit rate (optional)
+ */
+ second_dimension?: string | null;
+ }
+
+ export namespace ScalableMatrixWithUnitPricingConfig {
+ /**
+ * Configuration for a single matrix scaling factor
+ */
+ export interface MatrixScalingFactor {
+ first_dimension_value: string;
+
+ scaling_factor: string;
+
+ second_dimension_value?: string | null;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationScalableMatrixWithTieredPricingPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'scalable_matrix_with_tiered_pricing';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ /**
+ * Configuration for scalable_matrix_with_tiered_pricing pricing
+ */
+ scalable_matrix_with_tiered_pricing_config: NewLicenseAllocationScalableMatrixWithTieredPricingPrice.ScalableMatrixWithTieredPricingConfig;
+
+ /**
+ * The id of the billable metric for the price. Only needed if the price is
+ * usage-based.
+ */
+ billable_metric_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, the price will be billed in-advance if
+ * this is true, and in-arrears if this is false.
+ */
+ billed_in_advance?: boolean | null;
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | null;
+
+ /**
+ * The configuration for the rate of the price currency to the invoicing currency.
+ */
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
+
+ /**
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ * price is billed.
+ */
+ currency?: string | null;
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
+
+ /**
+ * An alias for the price.
+ */
+ external_price_id?: string | null;
+
+ /**
+ * If the Price represents a fixed cost, this represents the quantity of units
+ * applied.
+ */
+ fixed_price_quantity?: number | null;
+
+ /**
+ * The property used to group this price on an invoice
+ */
+ invoice_grouping_key?: string | null;
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
+ /**
+ * User-specified key/value pairs for the resource. Individual keys can be removed
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
+ * by setting `metadata` to `null`.
+ */
+ metadata?: { [key: string]: string | null } | null;
+
+ /**
+ * A transient ID that can be used to reference this price when adding adjustments
+ * in the same API call.
+ */
+ reference_id?: string | null;
+ }
+
+ export namespace NewLicenseAllocationScalableMatrixWithTieredPricingPrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for scalable_matrix_with_tiered_pricing pricing
+ */
+ export interface ScalableMatrixWithTieredPricingConfig {
+ /**
+ * Used for the scalable matrix first dimension
+ */
+ first_dimension: string;
+
+ /**
+ * Apply a scaling factor to each dimension
+ */
+ matrix_scaling_factors: Array;
+
+ tiers: Array;
+
+ /**
+ * Used for the scalable matrix second dimension (optional)
+ */
+ second_dimension?: string | null;
+ }
+
+ export namespace ScalableMatrixWithTieredPricingConfig {
+ /**
+ * Configuration for a single matrix scaling factor
+ */
+ export interface MatrixScalingFactor {
+ first_dimension_value: string;
+
+ scaling_factor: string;
+
+ second_dimension_value?: string | null;
+ }
+
+ /**
+ * Configuration for a single tier entry with business logic
+ */
+ export interface Tier {
+ tier_lower_bound: string;
+
+ unit_amount: string;
+ }
+ }
+ }
+
+ export interface NewLicenseAllocationCumulativeGroupedBulkPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ /**
+ * Configuration for cumulative_grouped_bulk pricing
+ */
+ cumulative_grouped_bulk_config: NewLicenseAllocationCumulativeGroupedBulkPrice.CumulativeGroupedBulkConfig;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
+ /**
+ * The pricing model type
+ */
+ model_type: 'cumulative_grouped_bulk';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
/**
* The id of the billable metric for the price. Only needed if the price is
@@ -392,6 +10081,11 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
*/
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
/**
* User-specified key/value pairs for the resource. Individual keys can be removed
* by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -406,56 +10100,86 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
reference_id?: string | null;
}
- export namespace NewPlanTieredWithProrationPrice {
+ export namespace NewLicenseAllocationCumulativeGroupedBulkPrice {
/**
- * Configuration for tiered_with_proration pricing
+ * Configuration for cumulative_grouped_bulk pricing
*/
- export interface TieredWithProrationConfig {
+ export interface CumulativeGroupedBulkConfig {
/**
- * Tiers for rating based on total usage quantities into the specified tier with
- * proration
+ * Each tier lower bound must have the same group of values.
*/
- tiers: Array;
+ dimension_values: Array;
+
+ group: string;
}
- export namespace TieredWithProrationConfig {
+ export namespace CumulativeGroupedBulkConfig {
/**
- * Configuration for a single tiered with proration tier
+ * Configuration for a dimension value entry
*/
- export interface Tier {
+ export interface DimensionValue {
/**
- * Inclusive tier starting value
+ * Grouping key value
+ */
+ grouping_key: string;
+
+ /**
+ * Tier lower bound
*/
tier_lower_bound: string;
/**
- * Amount per unit
+ * Unit amount for this combination
*/
unit_amount: string;
}
}
+
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
}
- export interface NewPlanGroupedWithMinMaxThresholdsPrice {
+ export interface NewLicenseAllocationCumulativeGroupedAllocationPrice {
/**
* The cadence to bill for this price on.
*/
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
/**
- * Configuration for grouped_with_min_max_thresholds pricing
+ * Configuration for cumulative_grouped_allocation pricing
*/
- grouped_with_min_max_thresholds_config: NewPlanGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
+ cumulative_grouped_allocation_config: NewLicenseAllocationCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
/**
* The id of the item the price will be associated with.
*/
item_id: string;
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
/**
* The pricing model type
*/
- model_type: 'grouped_with_min_max_thresholds';
+ model_type: 'cumulative_grouped_allocation';
/**
* The name of the price.
@@ -523,6 +10247,11 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
*/
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
/**
* User-specified key/value pairs for the resource. Individual keys can be removed
* by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -537,53 +10266,77 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
reference_id?: string | null;
}
- export namespace NewPlanGroupedWithMinMaxThresholdsPrice {
+ export namespace NewLicenseAllocationCumulativeGroupedAllocationPrice {
/**
- * Configuration for grouped_with_min_max_thresholds pricing
+ * Configuration for cumulative_grouped_allocation pricing
*/
- export interface GroupedWithMinMaxThresholdsConfig {
+ export interface CumulativeGroupedAllocationConfig {
/**
- * The event property used to group before applying thresholds
+ * The overall allocation across all groups
+ */
+ cumulative_allocation: string;
+
+ /**
+ * The allocation per individual group
+ */
+ group_allocation: string;
+
+ /**
+ * The event property used to group usage before applying allocations
*/
grouping_key: string;
/**
- * The maximum amount to charge each group
+ * The amount to charge for each unit outside of the allocation
*/
- maximum_charge: string;
+ unit_amount: string;
+ }
+ export interface LicenseAllocation {
/**
- * The minimum amount to charge each group, regardless of usage
+ * The amount of credits granted per active license per cadence.
*/
- minimum_charge: string;
+ amount: string;
/**
- * The base price charged per group
+ * The currency of the license allocation.
*/
- per_unit_rate: string;
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
}
}
- export interface NewPlanCumulativeGroupedAllocationPrice {
+ export interface NewLicenseAllocationMinimumCompositePrice {
/**
* The cadence to bill for this price on.
*/
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
/**
- * Configuration for cumulative_grouped_allocation pricing
+ * The id of the item the price will be associated with.
*/
- cumulative_grouped_allocation_config: NewPlanCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
+ item_id: string;
/**
- * The id of the item the price will be associated with.
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
*/
- item_id: string;
+ license_allocations: Array;
+
+ /**
+ * Configuration for minimum_composite pricing
+ */
+ minimum_composite_config: NewLicenseAllocationMinimumCompositePrice.MinimumCompositeConfig;
/**
* The pricing model type
*/
- model_type: 'cumulative_grouped_allocation';
+ model_type: 'minimum_composite';
/**
* The name of the price.
@@ -651,6 +10404,11 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
*/
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
/**
* User-specified key/value pairs for the resource. Individual keys can be removed
* by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -665,34 +10423,41 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
reference_id?: string | null;
}
- export namespace NewPlanCumulativeGroupedAllocationPrice {
- /**
- * Configuration for cumulative_grouped_allocation pricing
- */
- export interface CumulativeGroupedAllocationConfig {
+ export namespace NewLicenseAllocationMinimumCompositePrice {
+ export interface LicenseAllocation {
/**
- * The overall allocation across all groups
+ * The amount of credits granted per active license per cadence.
*/
- cumulative_allocation: string;
+ amount: string;
/**
- * The allocation per individual group
+ * The currency of the license allocation.
*/
- group_allocation: string;
+ currency: string;
/**
- * The event property used to group usage before applying allocations
+ * When True, overage beyond the allocation is written off.
*/
- grouping_key: string;
+ write_off_overage?: boolean | null;
+ }
+
+ /**
+ * Configuration for minimum_composite pricing
+ */
+ export interface MinimumCompositeConfig {
+ /**
+ * The minimum amount to apply
+ */
+ minimum_amount: string;
/**
- * The amount to charge for each unit outside of the allocation
+ * If true, subtotals from this price are prorated based on the service period
*/
- unit_amount: string;
+ prorated?: boolean;
}
}
- export interface NewPlanPercentCompositePrice {
+ export interface NewLicenseAllocationPercentCompositePrice {
/**
* The cadence to bill for this price on.
*/
@@ -703,6 +10468,13 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
*/
item_id: string;
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
/**
* The pricing model type
*/
@@ -716,7 +10488,7 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
/**
* Configuration for percent pricing
*/
- percent_config: NewPlanPercentCompositePrice.PercentConfig;
+ percent_config: NewLicenseAllocationPercentCompositePrice.PercentConfig;
/**
* The id of the billable metric for the price. Only needed if the price is
@@ -779,6 +10551,11 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
*/
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
/**
* User-specified key/value pairs for the resource. Individual keys can be removed
* by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -793,7 +10570,24 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
reference_id?: string | null;
}
- export namespace NewPlanPercentCompositePrice {
+ export namespace NewLicenseAllocationPercentCompositePrice {
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
+
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
+
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+
/**
* Configuration for percent pricing
*/
@@ -805,7 +10599,7 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
}
}
- export interface NewPlanEventOutputPrice {
+ export interface NewLicenseAllocationEventOutputPrice {
/**
* The cadence to bill for this price on.
*/
@@ -814,13 +10608,20 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
/**
* Configuration for event_output pricing
*/
- event_output_config: NewPlanEventOutputPrice.EventOutputConfig;
+ event_output_config: NewLicenseAllocationEventOutputPrice.EventOutputConfig;
/**
* The id of the item the price will be associated with.
*/
item_id: string;
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
/**
* The pricing model type
*/
@@ -892,6 +10693,11 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
*/
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
/**
* User-specified key/value pairs for the resource. Individual keys can be removed
* by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -906,7 +10712,7 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
reference_id?: string | null;
}
- export namespace NewPlanEventOutputPrice {
+ export namespace NewLicenseAllocationEventOutputPrice {
/**
* Configuration for event_output pricing
*/
@@ -929,110 +10735,25 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
*/
grouping_key?: string | null;
}
- }
- }
-
- export interface RemoveAdjustment {
- /**
- * The id of the adjustment to remove from on the plan.
- */
- adjustment_id: string;
-
- /**
- * The phase to remove this adjustment from.
- */
- plan_phase_order?: number | null;
- }
-
- export interface RemovePrice {
- /**
- * The id of the price to remove from the plan.
- */
- price_id: string;
-
- /**
- * The phase to remove this price from.
- */
- plan_phase_order?: number | null;
- }
-
- export interface ReplaceAdjustment {
- /**
- * The definition of a new adjustment to create and add to the plan.
- */
- adjustment:
- | Shared.NewPercentageDiscount
- | Shared.NewUsageDiscount
- | Shared.NewAmountDiscount
- | Shared.NewMinimum
- | Shared.NewMaximum;
-
- /**
- * The id of the adjustment on the plan to replace in the plan.
- */
- replaces_adjustment_id: string;
-
- /**
- * The phase to replace this adjustment from.
- */
- plan_phase_order?: number | null;
- }
-
- export interface ReplacePrice {
- /**
- * The id of the price on the plan to replace in the plan.
- */
- replaces_price_id: string;
- /**
- * The allocation price to add to the plan.
- */
- allocation_price?: Shared.NewAllocationPrice | null;
+ export interface LicenseAllocation {
+ /**
+ * The amount of credits granted per active license per cadence.
+ */
+ amount: string;
- /**
- * The phase to replace this price from.
- */
- plan_phase_order?: number | null;
+ /**
+ * The currency of the license allocation.
+ */
+ currency: string;
- /**
- * New plan price request body params.
- */
- price?:
- | Shared.NewPlanUnitPrice
- | Shared.NewPlanTieredPrice
- | Shared.NewPlanBulkPrice
- | ReplacePrice.NewPlanBulkWithFiltersPrice
- | Shared.NewPlanPackagePrice
- | Shared.NewPlanMatrixPrice
- | Shared.NewPlanThresholdTotalAmountPrice
- | Shared.NewPlanTieredPackagePrice
- | Shared.NewPlanTieredWithMinimumPrice
- | Shared.NewPlanGroupedTieredPrice
- | Shared.NewPlanTieredPackageWithMinimumPrice
- | Shared.NewPlanPackageWithAllocationPrice
- | Shared.NewPlanUnitWithPercentPrice
- | Shared.NewPlanMatrixWithAllocationPrice
- | ReplacePrice.NewPlanTieredWithProrationPrice
- | Shared.NewPlanUnitWithProrationPrice
- | Shared.NewPlanGroupedAllocationPrice
- | Shared.NewPlanBulkWithProrationPrice
- | Shared.NewPlanGroupedWithProratedMinimumPrice
- | Shared.NewPlanGroupedWithMeteredMinimumPrice
- | ReplacePrice.NewPlanGroupedWithMinMaxThresholdsPrice
- | Shared.NewPlanMatrixWithDisplayNamePrice
- | Shared.NewPlanGroupedTieredPackagePrice
- | Shared.NewPlanMaxGroupTieredPackagePrice
- | Shared.NewPlanScalableMatrixWithUnitPricingPrice
- | Shared.NewPlanScalableMatrixWithTieredPricingPrice
- | Shared.NewPlanCumulativeGroupedBulkPrice
- | ReplacePrice.NewPlanCumulativeGroupedAllocationPrice
- | Shared.NewPlanMinimumCompositePrice
- | ReplacePrice.NewPlanPercentCompositePrice
- | ReplacePrice.NewPlanEventOutputPrice
- | null;
- }
+ /**
+ * When True, overage beyond the allocation is written off.
+ */
+ write_off_overage?: boolean | null;
+ }
+ }
- export namespace ReplacePrice {
export interface NewPlanBulkWithFiltersPrice {
/**
* Configuration for bulk_with_filters pricing
@@ -1120,6 +10841,11 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
*/
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
/**
* User-specified key/value pairs for the resource. Individual keys can be removed
* by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -1270,6 +10996,11 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
*/
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
/**
* User-specified key/value pairs for the resource. Individual keys can be removed
* by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -1401,6 +11132,11 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
*/
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
/**
* User-specified key/value pairs for the resource. Individual keys can be removed
* by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -1529,6 +11265,11 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
*/
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
/**
* User-specified key/value pairs for the resource. Individual keys can be removed
* by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -1657,6 +11398,11 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
*/
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
/**
* User-specified key/value pairs for the resource. Individual keys can be removed
* by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -1770,6 +11516,11 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
*/
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
/**
* User-specified key/value pairs for the resource. Individual keys can be removed
* by setting the value to `null`, and the entire metadata mapping can be cleared
diff --git a/src/resources/coupons/coupons.ts b/src/resources/coupons/coupons.ts
index 98d9bf38..fad6e8ca 100644
--- a/src/resources/coupons/coupons.ts
+++ b/src/resources/coupons/coupons.ts
@@ -8,6 +8,9 @@ import * as SubscriptionsAPI from './subscriptions';
import { SubscriptionListParams, Subscriptions } from './subscriptions';
import { Page, type PageParams } from '../../pagination';
+/**
+ * A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users.
+ */
export class Coupons extends APIResource {
subscriptions: SubscriptionsAPI.Subscriptions = new SubscriptionsAPI.Subscriptions(this._client);
diff --git a/src/resources/coupons/subscriptions.ts b/src/resources/coupons/subscriptions.ts
index cdb02554..a9328087 100644
--- a/src/resources/coupons/subscriptions.ts
+++ b/src/resources/coupons/subscriptions.ts
@@ -7,6 +7,9 @@ import * as SubscriptionsAPI from '../subscriptions';
import { SubscriptionsPage } from '../subscriptions';
import { type PageParams } from '../../pagination';
+/**
+ * A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users.
+ */
export class Subscriptions extends APIResource {
/**
* This endpoint returns a list of all subscriptions that have redeemed a given
diff --git a/src/resources/credit-blocks.ts b/src/resources/credit-blocks.ts
index ac8a8e9c..1af96b1f 100644
--- a/src/resources/credit-blocks.ts
+++ b/src/resources/credit-blocks.ts
@@ -2,7 +2,11 @@
import { APIResource } from '../resource';
import * as Core from '../core';
+import * as Shared from './shared';
+/**
+ * The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb.
+ */
export class CreditBlocks extends APIResource {
/**
* This endpoint returns a credit block identified by its block_id.
@@ -34,6 +38,29 @@ export class CreditBlocks extends APIResource {
headers: { Accept: '*/*', ...options?.headers },
});
}
+
+ /**
+ * This endpoint returns the credit block and its associated purchasing invoices.
+ *
+ * If a credit block was purchased (as opposed to being manually added or allocated
+ * from a subscription), this endpoint returns the invoices that were created to
+ * charge the customer for the credit block. For credit blocks with payment
+ * schedules spanning multiple periods (e.g., monthly payments over 12 months),
+ * multiple invoices will be returned.
+ *
+ * If the credit block was not purchased (e.g., manual increment, allocation), an
+ * empty invoices list is returned.
+ *
+ * **Note: This endpoint is currently experimental and its interface may change in
+ * future releases. Please contact support before building production integrations
+ * against this endpoint.**
+ */
+ listInvoices(
+ blockId: string,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ return this._client.get(`/credit_blocks/${blockId}/invoices`, options);
+ }
}
/**
@@ -52,6 +79,14 @@ export interface CreditBlockRetrieveResponse {
maximum_initial_balance: number | null;
+ /**
+ * User specified key-value pairs for the resource. If not present, this defaults
+ * to an empty dictionary. Individual keys can be removed by setting the value to
+ * `null`, and the entire metadata mapping can be cleared by setting `metadata` to
+ * `null`.
+ */
+ metadata: { [key: string]: string };
+
per_unit_cost_basis: string | null;
status: 'active' | 'pending_payment';
@@ -76,6 +111,80 @@ export namespace CreditBlockRetrieveResponse {
}
}
+export interface CreditBlockListInvoicesResponse {
+ /**
+ * The Credit Block resource models prepaid credits within Orb.
+ */
+ block: CreditBlockListInvoicesResponse.Block;
+
+ invoices: Array;
+}
+
+export namespace CreditBlockListInvoicesResponse {
+ /**
+ * The Credit Block resource models prepaid credits within Orb.
+ */
+ export interface Block {
+ id: string;
+
+ balance: number;
+
+ effective_date: string | null;
+
+ expiry_date: string | null;
+
+ filters: Array;
+
+ maximum_initial_balance: number | null;
+
+ /**
+ * User specified key-value pairs for the resource. If not present, this defaults
+ * to an empty dictionary. Individual keys can be removed by setting the value to
+ * `null`, and the entire metadata mapping can be cleared by setting `metadata` to
+ * `null`.
+ */
+ metadata: { [key: string]: string };
+
+ per_unit_cost_basis: string | null;
+
+ status: 'active' | 'pending_payment';
+ }
+
+ export namespace Block {
+ export interface Filter {
+ /**
+ * The property of the price to filter on.
+ */
+ field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
+
+ /**
+ * Should prices that match the filter be included or excluded.
+ */
+ operator: 'includes' | 'excludes';
+
+ /**
+ * The IDs or values that match this filter.
+ */
+ values: Array;
+ }
+ }
+
+ export interface Invoice {
+ id: string;
+
+ customer: Shared.CustomerMinified;
+
+ invoice_number: string;
+
+ status: 'issued' | 'paid' | 'synced' | 'void' | 'draft';
+
+ subscription: Shared.SubscriptionMinified | null;
+ }
+}
+
export declare namespace CreditBlocks {
- export { type CreditBlockRetrieveResponse as CreditBlockRetrieveResponse };
+ export {
+ type CreditBlockRetrieveResponse as CreditBlockRetrieveResponse,
+ type CreditBlockListInvoicesResponse as CreditBlockListInvoicesResponse,
+ };
}
diff --git a/src/resources/credit-notes.ts b/src/resources/credit-notes.ts
index 1b2467ea..2563ce7b 100644
--- a/src/resources/credit-notes.ts
+++ b/src/resources/credit-notes.ts
@@ -7,6 +7,10 @@ import * as Shared from './shared';
import { CreditNotesPage } from './shared';
import { type PageParams } from '../pagination';
+/**
+ * The [Credit Note](/invoicing/credit-notes) resource represents a credit that has been applied to a
+ * particular invoice.
+ */
export class CreditNotes extends APIResource {
/**
* This endpoint is used to create a single
diff --git a/src/resources/customers/balance-transactions.ts b/src/resources/customers/balance-transactions.ts
index 2e78634f..769b5c07 100644
--- a/src/resources/customers/balance-transactions.ts
+++ b/src/resources/customers/balance-transactions.ts
@@ -6,6 +6,22 @@ import * as Core from '../../core';
import * as Shared from '../shared';
import { Page, type PageParams } from '../../pagination';
+/**
+ * A customer is a buyer of your products, and the other party to the billing relationship.
+ *
+ * In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these
+ * match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an
+ * `external_customer_id` with your own identifier. See
+ * [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these
+ * aliases work in Orb.
+ *
+ * In addition to having an identifier in your system, a customer may exist in a payment provider solution like
+ * Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping.
+ *
+ * A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which
+ * defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for
+ * information on what this timezone parameter influences within Orb.
+ */
export class BalanceTransactions extends APIResource {
/**
* Creates an immutable balance transaction that updates the customer's balance and
diff --git a/src/resources/customers/costs.ts b/src/resources/customers/costs.ts
index b7a76c00..37b65b5c 100644
--- a/src/resources/customers/costs.ts
+++ b/src/resources/customers/costs.ts
@@ -5,6 +5,22 @@ import { isRequestOptions } from '../../core';
import * as Core from '../../core';
import * as Shared from '../shared';
+/**
+ * A customer is a buyer of your products, and the other party to the billing relationship.
+ *
+ * In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these
+ * match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an
+ * `external_customer_id` with your own identifier. See
+ * [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these
+ * aliases work in Orb.
+ *
+ * In addition to having an identifier in your system, a customer may exist in a payment provider solution like
+ * Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping.
+ *
+ * A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which
+ * defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for
+ * information on what this timezone parameter influences within Orb.
+ */
export class Costs extends APIResource {
/**
* This endpoint is used to fetch a day-by-day snapshot of a customer's costs in
diff --git a/src/resources/customers/credits/credits.ts b/src/resources/customers/credits/credits.ts
index 6e031476..45fe2561 100644
--- a/src/resources/customers/credits/credits.ts
+++ b/src/resources/customers/credits/credits.ts
@@ -42,6 +42,9 @@ import {
} from './top-ups';
import { Page, type PageParams } from '../../../pagination';
+/**
+ * The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb.
+ */
export class Credits extends APIResource {
ledger: LedgerAPI.Ledger = new LedgerAPI.Ledger(this._client);
topUps: TopUpsAPI.TopUps = new TopUpsAPI.TopUps(this._client);
@@ -54,6 +57,11 @@ export class Credits extends APIResource {
*
* Note that `currency` defaults to credits if not specified. To use a real world
* currency, set `currency` to an ISO 4217 string.
+ *
+ * Results can be filtered by the block's `effective_date` using the
+ * `effective_date[gte]`, `effective_date[gt]`, `effective_date[lt]`, and
+ * `effective_date[lte]` query parameters. This filters on when the credit block
+ * becomes effective, which may differ from creation time for backdated credits.
*/
list(
customerId: string,
@@ -86,6 +94,11 @@ export class Credits extends APIResource {
*
* Note that `currency` defaults to credits if not specified. To use a real world
* currency, set `currency` to an ISO 4217 string.
+ *
+ * Results can be filtered by the block's `effective_date` using the
+ * `effective_date[gte]`, `effective_date[gt]`, `effective_date[lt]`, and
+ * `effective_date[lte]` query parameters. This filters on when the credit block
+ * becomes effective, which may differ from creation time for backdated credits.
*/
listByExternalId(
externalCustomerId: string,
@@ -129,6 +142,14 @@ export interface CreditListResponse {
maximum_initial_balance: number | null;
+ /**
+ * User specified key-value pairs for the resource. If not present, this defaults
+ * to an empty dictionary. Individual keys can be removed by setting the value to
+ * `null`, and the entire metadata mapping can be cleared by setting `metadata` to
+ * `null`.
+ */
+ metadata: { [key: string]: string };
+
per_unit_cost_basis: string | null;
status: 'active' | 'pending_payment';
@@ -169,6 +190,14 @@ export interface CreditListByExternalIDResponse {
maximum_initial_balance: number | null;
+ /**
+ * User specified key-value pairs for the resource. If not present, this defaults
+ * to an empty dictionary. Individual keys can be removed by setting the value to
+ * `null`, and the entire metadata mapping can be cleared by setting `metadata` to
+ * `null`.
+ */
+ metadata: { [key: string]: string };
+
per_unit_cost_basis: string | null;
status: 'active' | 'pending_payment';
@@ -202,6 +231,14 @@ export interface CreditListParams extends PageParams {
*/
currency?: string | null;
+ 'effective_date[gt]'?: string | null;
+
+ 'effective_date[gte]'?: string | null;
+
+ 'effective_date[lt]'?: string | null;
+
+ 'effective_date[lte]'?: string | null;
+
/**
* If set to True, all expired and depleted blocks, as well as active block will be
* returned.
@@ -215,6 +252,14 @@ export interface CreditListByExternalIDParams extends PageParams {
*/
currency?: string | null;
+ 'effective_date[gt]'?: string | null;
+
+ 'effective_date[gte]'?: string | null;
+
+ 'effective_date[lt]'?: string | null;
+
+ 'effective_date[lte]'?: string | null;
+
/**
* If set to True, all expired and depleted blocks, as well as active block will be
* returned.
diff --git a/src/resources/customers/credits/ledger.ts b/src/resources/customers/credits/ledger.ts
index 88692464..8ec352fd 100644
--- a/src/resources/customers/credits/ledger.ts
+++ b/src/resources/customers/credits/ledger.ts
@@ -6,6 +6,9 @@ import * as Core from '../../../core';
import * as Shared from '../../shared';
import { Page, type PageParams } from '../../../pagination';
+/**
+ * The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb.
+ */
export class Ledger extends APIResource {
/**
* The credits ledger provides _auditing_ functionality over Orb's credits system
@@ -162,7 +165,14 @@ export class Ledger extends APIResource {
* also generate a one-off invoice for the customer for the credits pre-purchase.
* Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
* on the invoice are calculated by multiplying the cost basis with the number of
- * credit units added.
+ * credit units added. If you invoice or handle payment of credits outside of Orb
+ * (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to
+ * `true` to prevent duplicate invoicing effects.
+ *
+ * - if `per_unit_cost_basis` is greater than zero, an invoice will be generated
+ * and `invoice_settings` must be included
+ * - if `invoice_settings` is passed, one of either `custom_due_date` or
+ * `net_terms` is required to determine the due date
*
* ## Deducting Credits
*
@@ -282,7 +292,14 @@ export class Ledger extends APIResource {
* also generate a one-off invoice for the customer for the credits pre-purchase.
* Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
* on the invoice are calculated by multiplying the cost basis with the number of
- * credit units added.
+ * credit units added. If you invoice or handle payment of credits outside of Orb
+ * (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to
+ * `true` to prevent duplicate invoicing effects.
+ *
+ * - if `per_unit_cost_basis` is greater than zero, an invoice will be generated
+ * and `invoice_settings` must be included
+ * - if `invoice_settings` is passed, one of either `custom_due_date` or
+ * `net_terms` is required to determine the due date
*
* ## Deducting Credits
*
@@ -957,6 +974,11 @@ export declare namespace LedgerCreateEntryParams {
*/
item_id?: string | null;
+ /**
+ * If true, the new credits purchase invoice will be marked as paid.
+ */
+ mark_as_paid?: boolean;
+
/**
* An optional memo to display on the invoice.
*/
@@ -967,7 +989,8 @@ export declare namespace LedgerCreateEntryParams {
* based on the invoice or issuance date, depending on the account's configured due
* date calculation method. A value of '0' here represents that the invoice is due
* on issue, whereas a value of '30' represents that the customer has 30 days to
- * pay the invoice. Do not set this field if you want to set a custom due date.
+ * pay the invoice. You must set either `net_terms` or `custom_due_date`, but not
+ * both.
*/
net_terms?: number | null;
@@ -1255,6 +1278,11 @@ export declare namespace LedgerCreateEntryByExternalIDParams {
*/
item_id?: string | null;
+ /**
+ * If true, the new credits purchase invoice will be marked as paid.
+ */
+ mark_as_paid?: boolean;
+
/**
* An optional memo to display on the invoice.
*/
@@ -1265,7 +1293,8 @@ export declare namespace LedgerCreateEntryByExternalIDParams {
* based on the invoice or issuance date, depending on the account's configured due
* date calculation method. A value of '0' here represents that the invoice is due
* on issue, whereas a value of '30' represents that the customer has 30 days to
- * pay the invoice. Do not set this field if you want to set a custom due date.
+ * pay the invoice. You must set either `net_terms` or `custom_due_date`, but not
+ * both.
*/
net_terms?: number | null;
diff --git a/src/resources/customers/credits/top-ups.ts b/src/resources/customers/credits/top-ups.ts
index e3f5db40..1b05bfa0 100644
--- a/src/resources/customers/credits/top-ups.ts
+++ b/src/resources/customers/credits/top-ups.ts
@@ -5,6 +5,9 @@ import { isRequestOptions } from '../../../core';
import * as Core from '../../../core';
import { Page, type PageParams } from '../../../pagination';
+/**
+ * The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb.
+ */
export class TopUps extends APIResource {
/**
* This endpoint allows you to create a new top-up for a specified customer's
diff --git a/src/resources/customers/customers.ts b/src/resources/customers/customers.ts
index e1e99e73..be649d74 100644
--- a/src/resources/customers/customers.ts
+++ b/src/resources/customers/customers.ts
@@ -33,6 +33,22 @@ import {
} from './credits/credits';
import { Page, type PageParams } from '../../pagination';
+/**
+ * A customer is a buyer of your products, and the other party to the billing relationship.
+ *
+ * In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these
+ * match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an
+ * `external_customer_id` with your own identifier. See
+ * [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these
+ * aliases work in Orb.
+ *
+ * In addition to having an identifier in your system, a customer may exist in a payment provider solution like
+ * Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping.
+ *
+ * A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which
+ * defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for
+ * information on what this timezone parameter influences within Orb.
+ */
export class Customers extends APIResource {
costs: CostsAPI.Costs = new CostsAPI.Costs(this._client);
credits: CreditsAPI.Credits = new CreditsAPI.Credits(this._client);
@@ -60,9 +76,10 @@ export class Customers extends APIResource {
/**
* This endpoint can be used to update the `payment_provider`,
* `payment_provider_id`, `name`, `email`, `email_delivery`, `tax_id`,
- * `auto_collection`, `metadata`, `shipping_address`, `billing_address`, and
- * `additional_emails` of an existing customer. Other fields on a customer are
- * currently immutable.
+ * `auto_collection`, `metadata`, `shipping_address`, `billing_address`,
+ * `additional_emails`, and `currency` of an existing customer. `currency` can only
+ * be set if it has not already been set on the customer. Other fields on a
+ * customer are currently immutable.
*/
update(
customerId: string,
@@ -947,8 +964,10 @@ export interface CustomerUpdateParams {
billing_address?: AddressInput | null;
/**
- * An ISO 4217 currency string used for the customer's invoices and balance. If not
- * set at creation time, will be set at subscription creation time.
+ * An ISO 4217 currency string used for the customer's invoices and balance. This
+ * can only be set if the customer does not already have a currency configured. If
+ * not set at creation or update time, it will be set at subscription creation
+ * time.
*/
currency?: string | null;
@@ -1276,8 +1295,10 @@ export interface CustomerUpdateByExternalIDParams {
billing_address?: AddressInput | null;
/**
- * An ISO 4217 currency string used for the customer's invoices and balance. If not
- * set at creation time, will be set at subscription creation time.
+ * An ISO 4217 currency string used for the customer's invoices and balance. This
+ * can only be set if the customer does not already have a currency configured. If
+ * not set at creation or update time, it will be set at subscription creation
+ * time.
*/
currency?: string | null;
diff --git a/src/resources/dimensional-price-groups/external-dimensional-price-group-id.ts b/src/resources/dimensional-price-groups/external-dimensional-price-group-id.ts
index 0250df26..f720a9bd 100644
--- a/src/resources/dimensional-price-groups/external-dimensional-price-group-id.ts
+++ b/src/resources/dimensional-price-groups/external-dimensional-price-group-id.ts
@@ -42,7 +42,7 @@ export interface ExternalDimensionalPriceGroupIDUpdateParams {
* field to identify a dimensional price group by an existing identifier in your
* system.
*/
- body_external_dimensional_price_group_id?: string | null;
+ external_dimensional_price_group_id?: string | null;
/**
* User-specified key/value pairs for the resource. Individual keys can be removed
diff --git a/src/resources/events/backfills.ts b/src/resources/events/backfills.ts
index 093ec5ff..9a2cc8c7 100644
--- a/src/resources/events/backfills.ts
+++ b/src/resources/events/backfills.ts
@@ -5,6 +5,11 @@ import { isRequestOptions } from '../../core';
import * as Core from '../../core';
import { Page, type PageParams } from '../../pagination';
+/**
+ * The [Event](/core-concepts#event) resource represents a usage event that has been created for a
+ * customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for
+ * a given billing period.
+ */
export class Backfills extends APIResource {
/**
* Creating the backfill enables adding or replacing past events, even those that
diff --git a/src/resources/events/events.ts b/src/resources/events/events.ts
index 6f2ba833..eda982d8 100644
--- a/src/resources/events/events.ts
+++ b/src/resources/events/events.ts
@@ -17,6 +17,11 @@ import {
import * as VolumeAPI from './volume';
import { EventVolumes, Volume, VolumeListParams } from './volume';
+/**
+ * The [Event](/core-concepts#event) resource represents a usage event that has been created for a
+ * customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for
+ * a given billing period.
+ */
export class Events extends APIResource {
backfills: BackfillsAPI.Backfills = new BackfillsAPI.Backfills(this._client);
volume: VolumeAPI.Volume = new VolumeAPI.Volume(this._client);
diff --git a/src/resources/events/volume.ts b/src/resources/events/volume.ts
index 6440ca6e..b70b7646 100644
--- a/src/resources/events/volume.ts
+++ b/src/resources/events/volume.ts
@@ -3,6 +3,11 @@
import { APIResource } from '../../resource';
import * as Core from '../../core';
+/**
+ * The [Event](/core-concepts#event) resource represents a usage event that has been created for a
+ * customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for
+ * a given billing period.
+ */
export class Volume extends APIResource {
/**
* This endpoint returns the event volume for an account in a
diff --git a/src/resources/index.ts b/src/resources/index.ts
index ee5da84b..bf4c7f46 100644
--- a/src/resources/index.ts
+++ b/src/resources/index.ts
@@ -36,7 +36,11 @@ export {
type CouponCreateParams,
type CouponListParams,
} from './coupons/coupons';
-export { CreditBlocks, type CreditBlockRetrieveResponse } from './credit-blocks';
+export {
+ CreditBlocks,
+ type CreditBlockRetrieveResponse,
+ type CreditBlockListInvoicesResponse,
+} from './credit-blocks';
export { CreditNotes, type CreditNoteCreateParams, type CreditNoteListParams } from './credit-notes';
export {
CustomersPage,
@@ -82,12 +86,14 @@ export {
InvoiceListSummaryResponsesPage,
Invoices,
type InvoiceFetchUpcomingResponse,
+ type InvoiceIssueSummaryResponse,
type InvoiceListSummaryResponse,
type InvoiceCreateParams,
type InvoiceUpdateParams,
type InvoiceListParams,
type InvoiceFetchUpcomingParams,
type InvoiceIssueParams,
+ type InvoiceIssueSummaryParams,
type InvoiceListSummaryParams,
type InvoiceMarkPaidParams,
} from './invoices';
@@ -99,6 +105,28 @@ export {
type ItemUpdateParams,
type ItemListParams,
} from './items';
+export {
+ LicenseListResponsesPage,
+ Licenses,
+ type LicenseCreateResponse,
+ type LicenseRetrieveResponse,
+ type LicenseListResponse,
+ type LicenseDeactivateResponse,
+ type LicenseRetrieveByExternalIDResponse,
+ type LicenseCreateParams,
+ type LicenseListParams,
+ type LicenseDeactivateParams,
+ type LicenseRetrieveByExternalIDParams,
+} from './licenses/licenses';
+export {
+ LicenseTypeListResponsesPage,
+ LicenseTypes,
+ type LicenseTypeCreateResponse,
+ type LicenseTypeRetrieveResponse,
+ type LicenseTypeListResponse,
+ type LicenseTypeCreateParams,
+ type LicenseTypeListParams,
+} from './license-types';
export {
PlansPage,
Plans,
diff --git a/src/resources/invoice-line-items.ts b/src/resources/invoice-line-items.ts
index 7fabadec..bc7b1917 100644
--- a/src/resources/invoice-line-items.ts
+++ b/src/resources/invoice-line-items.ts
@@ -4,6 +4,12 @@ import { APIResource } from '../resource';
import * as Core from '../core';
import * as Shared from './shared';
+/**
+ * An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, representing the request for payment for
+ * a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and
+ * can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as
+ * the result of an action, such as a cancellation.
+ */
export class InvoiceLineItems extends APIResource {
/**
* This creates a one-off fixed fee invoice line item on an Invoice. This can only
diff --git a/src/resources/invoices.ts b/src/resources/invoices.ts
index 8f4aa068..206df383 100644
--- a/src/resources/invoices.ts
+++ b/src/resources/invoices.ts
@@ -7,6 +7,12 @@ import * as Shared from './shared';
import { InvoicesPage } from './shared';
import { Page, type PageParams } from '../pagination';
+/**
+ * An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, representing the request for payment for
+ * a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and
+ * can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as
+ * the result of an action, such as a cancellation.
+ */
export class Invoices extends APIResource {
/**
* This endpoint is used to create a one-off invoice for a customer.
@@ -16,13 +22,14 @@ export class Invoices extends APIResource {
}
/**
- * This endpoint allows you to update the `metadata`, `net_terms`, `due_date`, and
- * `invoice_date` properties on an invoice. If you pass null for the metadata
- * value, it will clear any existing metadata for that invoice.
+ * This endpoint allows you to update the `metadata`, `net_terms`, `due_date`,
+ * `invoice_date`, and `auto_collection` properties on an invoice. If you pass null
+ * for the metadata value, it will clear any existing metadata for that invoice.
*
* `metadata` can be modified regardless of invoice state. `net_terms`, `due_date`,
- * and `invoice_date` can only be modified if the invoice is in a `draft` state.
- * `invoice_date` can only be modified for non-subscription invoices.
+ * `invoice_date`, and `auto_collection` can only be modified if the invoice is in
+ * a `draft` state. `invoice_date` can only be modified for non-subscription
+ * invoices.
*/
update(
invoiceId: string,
@@ -125,6 +132,37 @@ export class Invoices extends APIResource {
return this._client.post(`/invoices/${invoiceId}/issue`, { body, ...options });
}
+ /**
+ * This endpoint allows an eligible invoice to be issued manually. This is only
+ * possible with invoices where status is `draft`, `will_auto_issue` is false, and
+ * an `eligible_to_issue_at` is a time in the past. Issuing an invoice could
+ * possibly trigger side effects, some of which could be customer-visible (e.g.
+ * sending emails, auto-collecting payment, syncing the invoice to external
+ * providers, etc).
+ *
+ * This is a lighter-weight alternative to the issue invoice endpoint, returning an
+ * invoice summary without any line item details.
+ */
+ issueSummary(
+ invoiceId: string,
+ body?: InvoiceIssueSummaryParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise;
+ issueSummary(
+ invoiceId: string,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise;
+ issueSummary(
+ invoiceId: string,
+ body: InvoiceIssueSummaryParams | Core.RequestOptions = {},
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ if (isRequestOptions(body)) {
+ return this.issueSummary(invoiceId, {}, body);
+ }
+ return this._client.post(`/invoices/summary/${invoiceId}/issue`, { body, ...options });
+ }
+
/**
* This is a lighter-weight endpoint that returns a list of all
* [`Invoice`](/core-concepts#invoice) summaries for an account in a list format.
@@ -789,6 +827,458 @@ export namespace InvoiceFetchUpcomingResponse {
}
}
+/**
+ * #InvoiceApiResourceWithoutLineItems
+ */
+export interface InvoiceIssueSummaryResponse {
+ id: string;
+
+ /**
+ * This is the final amount required to be charged to the customer and reflects the
+ * application of the customer balance to the `total` of the invoice.
+ */
+ amount_due: string;
+
+ auto_collection: InvoiceIssueSummaryResponse.AutoCollection;
+
+ billing_address: Shared.Address | null;
+
+ /**
+ * The creation time of the resource in Orb.
+ */
+ created_at: string;
+
+ /**
+ * A list of credit notes associated with the invoice
+ */
+ credit_notes: Array;
+
+ /**
+ * An ISO 4217 currency string or `credits`
+ */
+ currency: string;
+
+ customer: Shared.CustomerMinified;
+
+ customer_balance_transactions: Array;
+
+ /**
+ * Tax IDs are commonly required to be displayed on customer invoices, which are
+ * added to the headers of invoices.
+ *
+ * ### Supported Tax ID Countries and Types
+ *
+ * | Country | Type | Description |
+ * | ---------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
+ * | Albania | `al_tin` | Albania Tax Identification Number |
+ * | Andorra | `ad_nrt` | Andorran NRT Number |
+ * | Angola | `ao_tin` | Angola Tax Identification Number |
+ * | Argentina | `ar_cuit` | Argentinian Tax ID Number |
+ * | Armenia | `am_tin` | Armenia Tax Identification Number |
+ * | Aruba | `aw_tin` | Aruba Tax Identification Number |
+ * | Australia | `au_abn` | Australian Business Number (AU ABN) |
+ * | Australia | `au_arn` | Australian Taxation Office Reference Number |
+ * | Austria | `eu_vat` | European VAT Number |
+ * | Azerbaijan | `az_tin` | Azerbaijan Tax Identification Number |
+ * | Bahamas | `bs_tin` | Bahamas Tax Identification Number |
+ * | Bahrain | `bh_vat` | Bahraini VAT Number |
+ * | Bangladesh | `bd_bin` | Bangladesh Business Identification Number |
+ * | Barbados | `bb_tin` | Barbados Tax Identification Number |
+ * | Belarus | `by_tin` | Belarus TIN Number |
+ * | Belgium | `eu_vat` | European VAT Number |
+ * | Benin | `bj_ifu` | Benin Tax Identification Number (Identifiant Fiscal Unique) |
+ * | Bolivia | `bo_tin` | Bolivian Tax ID |
+ * | Bosnia and Herzegovina | `ba_tin` | Bosnia and Herzegovina Tax Identification Number |
+ * | Brazil | `br_cnpj` | Brazilian CNPJ Number |
+ * | Brazil | `br_cpf` | Brazilian CPF Number |
+ * | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code |
+ * | Bulgaria | `eu_vat` | European VAT Number |
+ * | Burkina Faso | `bf_ifu` | Burkina Faso Tax Identification Number (Numéro d'Identifiant Fiscal Unique) |
+ * | Cambodia | `kh_tin` | Cambodia Tax Identification Number |
+ * | Cameroon | `cm_niu` | Cameroon Tax Identification Number (Numéro d'Identifiant fiscal Unique) |
+ * | Canada | `ca_bn` | Canadian BN |
+ * | Canada | `ca_gst_hst` | Canadian GST/HST Number |
+ * | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) |
+ * | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) |
+ * | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) |
+ * | Canada | `ca_qst` | Canadian QST Number (Québec) |
+ * | Cape Verde | `cv_nif` | Cape Verde Tax Identification Number (Número de Identificação Fiscal) |
+ * | Chile | `cl_tin` | Chilean TIN |
+ * | China | `cn_tin` | Chinese Tax ID |
+ * | Colombia | `co_nit` | Colombian NIT Number |
+ * | Congo-Kinshasa | `cd_nif` | Congo (DR) Tax Identification Number (Número de Identificação Fiscal) |
+ * | Costa Rica | `cr_tin` | Costa Rican Tax ID |
+ * | Croatia | `eu_vat` | European VAT Number |
+ * | Croatia | `hr_oib` | Croatian Personal Identification Number (OIB) |
+ * | Cyprus | `eu_vat` | European VAT Number |
+ * | Czech Republic | `eu_vat` | European VAT Number |
+ * | Denmark | `eu_vat` | European VAT Number |
+ * | Dominican Republic | `do_rcn` | Dominican RCN Number |
+ * | Ecuador | `ec_ruc` | Ecuadorian RUC Number |
+ * | Egypt | `eg_tin` | Egyptian Tax Identification Number |
+ * | El Salvador | `sv_nit` | El Salvadorian NIT Number |
+ * | Estonia | `eu_vat` | European VAT Number |
+ * | Ethiopia | `et_tin` | Ethiopia Tax Identification Number |
+ * | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
+ * | Finland | `eu_vat` | European VAT Number |
+ * | France | `eu_vat` | European VAT Number |
+ * | Georgia | `ge_vat` | Georgian VAT |
+ * | Germany | `de_stn` | German Tax Number (Steuernummer) |
+ * | Germany | `eu_vat` | European VAT Number |
+ * | Greece | `eu_vat` | European VAT Number |
+ * | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) |
+ * | Hong Kong | `hk_br` | Hong Kong BR Number |
+ * | Hungary | `eu_vat` | European VAT Number |
+ * | Hungary | `hu_tin` | Hungary Tax Number (adószám) |
+ * | Iceland | `is_vat` | Icelandic VAT |
+ * | India | `in_gst` | Indian GST Number |
+ * | Indonesia | `id_npwp` | Indonesian NPWP Number |
+ * | Ireland | `eu_vat` | European VAT Number |
+ * | Israel | `il_vat` | Israel VAT |
+ * | Italy | `eu_vat` | European VAT Number |
+ * | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
+ * | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
+ * | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
+ * | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number |
+ * | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number |
+ * | Kyrgyzstan | `kg_tin` | Kyrgyzstan Tax Identification Number |
+ * | Laos | `la_tin` | Laos Tax Identification Number |
+ * | Latvia | `eu_vat` | European VAT Number |
+ * | Liechtenstein | `li_uid` | Liechtensteinian UID Number |
+ * | Liechtenstein | `li_vat` | Liechtenstein VAT Number |
+ * | Lithuania | `eu_vat` | European VAT Number |
+ * | Luxembourg | `eu_vat` | European VAT Number |
+ * | Malaysia | `my_frp` | Malaysian FRP Number |
+ * | Malaysia | `my_itn` | Malaysian ITN |
+ * | Malaysia | `my_sst` | Malaysian SST Number |
+ * | Malta | `eu_vat` | European VAT Number |
+ * | Mauritania | `mr_nif` | Mauritania Tax Identification Number (Número de Identificação Fiscal) |
+ * | Mexico | `mx_rfc` | Mexican RFC Number |
+ * | Moldova | `md_vat` | Moldova VAT Number |
+ * | Montenegro | `me_pib` | Montenegro PIB Number |
+ * | Morocco | `ma_vat` | Morocco VAT Number |
+ * | Nepal | `np_pan` | Nepal PAN Number |
+ * | Netherlands | `eu_vat` | European VAT Number |
+ * | New Zealand | `nz_gst` | New Zealand GST Number |
+ * | Nigeria | `ng_tin` | Nigerian Tax Identification Number |
+ * | North Macedonia | `mk_vat` | North Macedonia VAT Number |
+ * | Northern Ireland | `eu_vat` | Northern Ireland VAT Number |
+ * | Norway | `no_vat` | Norwegian VAT Number |
+ * | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
+ * | Oman | `om_vat` | Omani VAT Number |
+ * | Peru | `pe_ruc` | Peruvian RUC Number |
+ * | Philippines | `ph_tin` | Philippines Tax Identification Number |
+ * | Poland | `eu_vat` | European VAT Number |
+ * | Poland | `pl_nip` | Polish Tax ID Number |
+ * | Portugal | `eu_vat` | European VAT Number |
+ * | Romania | `eu_vat` | European VAT Number |
+ * | Romania | `ro_tin` | Romanian Tax ID Number |
+ * | Russia | `ru_inn` | Russian INN |
+ * | Russia | `ru_kpp` | Russian KPP |
+ * | Saudi Arabia | `sa_vat` | Saudi Arabia VAT |
+ * | Senegal | `sn_ninea` | Senegal NINEA Number |
+ * | Serbia | `rs_pib` | Serbian PIB Number |
+ * | Singapore | `sg_gst` | Singaporean GST |
+ * | Singapore | `sg_uen` | Singaporean UEN |
+ * | Slovakia | `eu_vat` | European VAT Number |
+ * | Slovenia | `eu_vat` | European VAT Number |
+ * | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) |
+ * | South Africa | `za_vat` | South African VAT Number |
+ * | South Korea | `kr_brn` | Korean BRN |
+ * | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
+ * | Spain | `eu_vat` | European VAT Number |
+ * | Suriname | `sr_fin` | Suriname FIN Number |
+ * | Sweden | `eu_vat` | European VAT Number |
+ * | Switzerland | `ch_uid` | Switzerland UID Number |
+ * | Switzerland | `ch_vat` | Switzerland VAT Number |
+ * | Taiwan | `tw_vat` | Taiwanese VAT |
+ * | Tajikistan | `tj_tin` | Tajikistan Tax Identification Number |
+ * | Tanzania | `tz_vat` | Tanzania VAT Number |
+ * | Thailand | `th_vat` | Thai VAT |
+ * | Turkey | `tr_tin` | Turkish Tax Identification Number |
+ * | Uganda | `ug_tin` | Uganda Tax Identification Number |
+ * | Ukraine | `ua_vat` | Ukrainian VAT |
+ * | United Arab Emirates | `ae_trn` | United Arab Emirates TRN |
+ * | United Kingdom | `gb_vat` | United Kingdom VAT Number |
+ * | United States | `us_ein` | United States EIN |
+ * | Uruguay | `uy_ruc` | Uruguayan RUC Number |
+ * | Uzbekistan | `uz_tin` | Uzbekistan TIN Number |
+ * | Uzbekistan | `uz_vat` | Uzbekistan VAT Number |
+ * | Venezuela | `ve_rif` | Venezuelan RIF Number |
+ * | Vietnam | `vn_tin` | Vietnamese Tax ID Number |
+ * | Zambia | `zm_tin` | Zambia Tax Identification Number |
+ * | Zimbabwe | `zw_tin` | Zimbabwe Tax Identification Number |
+ */
+ customer_tax_id: Shared.CustomerTaxID | null;
+
+ /**
+ * When the invoice payment is due. The due date is null if the invoice is not yet
+ * finalized.
+ */
+ due_date: string | null;
+
+ /**
+ * If the invoice has a status of `draft`, this will be the time that the invoice
+ * will be eligible to be issued, otherwise it will be `null`. If `auto-issue` is
+ * true, the invoice will automatically begin issuing at this time.
+ */
+ eligible_to_issue_at: string | null;
+
+ /**
+ * A URL for the customer-facing invoice portal. This URL expires 30 days after the
+ * invoice's due date, or 60 days after being re-generated through the UI.
+ */
+ hosted_invoice_url: string | null;
+
+ /**
+ * The scheduled date of the invoice
+ */
+ invoice_date: string;
+
+ /**
+ * Automatically generated invoice number to help track and reconcile invoices.
+ * Invoice numbers have a prefix such as `RFOBWG`. These can be sequential per
+ * account or customer.
+ */
+ invoice_number: string;
+
+ /**
+ * The link to download the PDF representation of the `Invoice`.
+ */
+ invoice_pdf: string | null;
+
+ invoice_source: 'subscription' | 'partial' | 'one_off';
+
+ /**
+ * If the invoice failed to issue, this will be the last time it failed to issue
+ * (even if it is now in a different state.)
+ */
+ issue_failed_at: string | null;
+
+ /**
+ * If the invoice has been issued, this will be the time it transitioned to
+ * `issued` (even if it is now in a different state.)
+ */
+ issued_at: string | null;
+
+ /**
+ * Free-form text which is available on the invoice PDF and the Orb invoice portal.
+ */
+ memo: string | null;
+
+ /**
+ * User specified key-value pairs for the resource. If not present, this defaults
+ * to an empty dictionary. Individual keys can be removed by setting the value to
+ * `null`, and the entire metadata mapping can be cleared by setting `metadata` to
+ * `null`.
+ */
+ metadata: { [key: string]: string };
+
+ /**
+ * If the invoice has a status of `paid`, this gives a timestamp when the invoice
+ * was paid.
+ */
+ paid_at: string | null;
+
+ /**
+ * A list of payment attempts associated with the invoice
+ */
+ payment_attempts: Array;
+
+ /**
+ * If payment was attempted on this invoice but failed, this will be the time of
+ * the most recent attempt.
+ */
+ payment_failed_at: string | null;
+
+ /**
+ * If payment was attempted on this invoice, this will be the start time of the
+ * most recent attempt. This field is especially useful for delayed-notification
+ * payment mechanisms (like bank transfers), where payment can take 3 days or more.
+ */
+ payment_started_at: string | null;
+
+ /**
+ * If the invoice is in draft, this timestamp will reflect when the invoice is
+ * scheduled to be issued.
+ */
+ scheduled_issue_at: string | null;
+
+ shipping_address: Shared.Address | null;
+
+ status: 'issued' | 'paid' | 'synced' | 'void' | 'draft';
+
+ subscription: Shared.SubscriptionMinified | null;
+
+ /**
+ * If the invoice failed to sync, this will be the last time an external invoicing
+ * provider sync was attempted. This field will always be `null` for invoices using
+ * Orb Invoicing.
+ */
+ sync_failed_at: string | null;
+
+ /**
+ * The total after any minimums and discounts have been applied.
+ */
+ total: string;
+
+ /**
+ * If the invoice has a status of `void`, this gives a timestamp when the invoice
+ * was voided.
+ */
+ voided_at: string | null;
+
+ /**
+ * This is true if the invoice will be automatically issued in the future, and
+ * false otherwise.
+ */
+ will_auto_issue: boolean;
+}
+
+export namespace InvoiceIssueSummaryResponse {
+ export interface AutoCollection {
+ /**
+ * True only if auto-collection is enabled for this invoice.
+ */
+ enabled: boolean | null;
+
+ /**
+ * If the invoice is scheduled for auto-collection, this field will reflect when
+ * the next attempt will occur. If dunning has been exhausted, or auto-collection
+ * is not enabled for this invoice, this field will be `null`.
+ */
+ next_attempt_at: string | null;
+
+ /**
+ * Number of auto-collection payment attempts.
+ */
+ num_attempts: number | null;
+
+ /**
+ * If Orb has ever attempted payment auto-collection for this invoice, this field
+ * will reflect when that attempt occurred. In conjunction with `next_attempt_at`,
+ * this can be used to tell whether the invoice is currently in dunning (that is,
+ * `previously_attempted_at` is non-null, and `next_attempt_time` is non-null), or
+ * if dunning has been exhausted (`previously_attempted_at` is non-null, but
+ * `next_attempt_time` is null).
+ */
+ previously_attempted_at: string | null;
+ }
+
+ export interface CreditNote {
+ id: string;
+
+ credit_note_number: string;
+
+ /**
+ * An optional memo supplied on the credit note.
+ */
+ memo: string | null;
+
+ reason: string;
+
+ total: string;
+
+ type: string;
+
+ /**
+ * If the credit note has a status of `void`, this gives a timestamp when the
+ * credit note was voided.
+ */
+ voided_at: string | null;
+ }
+
+ export interface CustomerBalanceTransaction {
+ /**
+ * A unique id for this transaction.
+ */
+ id: string;
+
+ action:
+ | 'applied_to_invoice'
+ | 'manual_adjustment'
+ | 'prorated_refund'
+ | 'revert_prorated_refund'
+ | 'return_from_voiding'
+ | 'credit_note_applied'
+ | 'credit_note_voided'
+ | 'overpayment_refund'
+ | 'external_payment'
+ | 'small_invoice_carryover';
+
+ /**
+ * The value of the amount changed in the transaction.
+ */
+ amount: string;
+
+ /**
+ * The creation time of this transaction.
+ */
+ created_at: string;
+
+ credit_note: Shared.CreditNoteTiny | null;
+
+ /**
+ * An optional description provided for manual customer balance adjustments.
+ */
+ description: string | null;
+
+ /**
+ * The new value of the customer's balance prior to the transaction, in the
+ * customer's currency.
+ */
+ ending_balance: string;
+
+ invoice: Shared.InvoiceTiny | null;
+
+ /**
+ * The original value of the customer's balance prior to the transaction, in the
+ * customer's currency.
+ */
+ starting_balance: string;
+
+ type: 'increment' | 'decrement';
+ }
+
+ export interface PaymentAttempt {
+ /**
+ * The ID of the payment attempt.
+ */
+ id: string;
+
+ /**
+ * The amount of the payment attempt.
+ */
+ amount: string;
+
+ /**
+ * The time at which the payment attempt was created.
+ */
+ created_at: string;
+
+ /**
+ * The payment provider that attempted to collect the payment.
+ */
+ payment_provider: 'stripe' | null;
+
+ /**
+ * The ID of the payment attempt in the payment provider.
+ */
+ payment_provider_id: string | null;
+
+ /**
+ * URL to the downloadable PDF version of the receipt. This field will be `null`
+ * for payment attempts that did not succeed.
+ */
+ receipt_pdf: string | null;
+
+ /**
+ * Whether the payment attempt succeeded.
+ */
+ succeeded: boolean;
+ }
+}
+
/**
* #InvoiceApiResourceWithoutLineItems
*/
@@ -1256,6 +1746,13 @@ export interface InvoiceCreateParams {
line_items: Array;
+ /**
+ * Determines whether this invoice will automatically attempt to charge a saved
+ * payment method, if any. If not specified, the invoice inherits the customer's
+ * auto_collection setting.
+ */
+ auto_collection?: boolean | null;
+
/**
* The id of the `Customer` to create this invoice for. One of `customer_id` and
* `external_customer_id` are required.
@@ -1343,6 +1840,13 @@ export namespace InvoiceCreateParams {
}
export interface InvoiceUpdateParams {
+ /**
+ * Determines whether this invoice will automatically attempt to charge a saved
+ * payment method, if any. Can only be modified on draft invoices. If not
+ * specified, the invoice's existing setting is unchanged.
+ */
+ auto_collection?: boolean | null;
+
/**
* An optional custom due date for the invoice. If not set, the due date will be
* calculated based on the `net_terms` value.
@@ -1428,6 +1932,17 @@ export interface InvoiceIssueParams {
synchronous?: boolean;
}
+export interface InvoiceIssueSummaryParams {
+ /**
+ * If true, the invoice will be issued synchronously. If false, the invoice will be
+ * issued asynchronously. The synchronous option is only available for invoices
+ * that have no usage fees. If the invoice is configured to sync to an external
+ * provider, a successful response from this endpoint guarantees the invoice is
+ * present in the provider.
+ */
+ synchronous?: boolean;
+}
+
export interface InvoiceListSummaryParams extends PageParams {
amount?: string | null;
@@ -1465,7 +1980,7 @@ export interface InvoiceListSummaryParams extends PageParams {
is_recurring?: boolean | null;
- status?: Array<'draft' | 'issued' | 'paid' | 'synced' | 'void'> | null;
+ status?: 'draft' | 'issued' | 'paid' | 'synced' | 'void' | null;
subscription_id?: string | null;
}
@@ -1492,6 +2007,7 @@ Invoices.InvoiceListSummaryResponsesPage = InvoiceListSummaryResponsesPage;
export declare namespace Invoices {
export {
type InvoiceFetchUpcomingResponse as InvoiceFetchUpcomingResponse,
+ type InvoiceIssueSummaryResponse as InvoiceIssueSummaryResponse,
type InvoiceListSummaryResponse as InvoiceListSummaryResponse,
InvoiceListSummaryResponsesPage as InvoiceListSummaryResponsesPage,
type InvoiceCreateParams as InvoiceCreateParams,
@@ -1499,6 +2015,7 @@ export declare namespace Invoices {
type InvoiceListParams as InvoiceListParams,
type InvoiceFetchUpcomingParams as InvoiceFetchUpcomingParams,
type InvoiceIssueParams as InvoiceIssueParams,
+ type InvoiceIssueSummaryParams as InvoiceIssueSummaryParams,
type InvoiceListSummaryParams as InvoiceListSummaryParams,
type InvoiceMarkPaidParams as InvoiceMarkPaidParams,
};
diff --git a/src/resources/items.ts b/src/resources/items.ts
index 65ea0ca3..5d42e7e2 100644
--- a/src/resources/items.ts
+++ b/src/resources/items.ts
@@ -5,6 +5,10 @@ import { isRequestOptions } from '../core';
import * as Core from '../core';
import { Page, type PageParams } from '../pagination';
+/**
+ * The Item resource represents a sellable product or good. Items are associated with all line items, billable metrics,
+ * and prices and are used for defining external sync behavior for invoices and tax calculation purposes.
+ */
export class Items extends APIResource {
/**
* This endpoint is used to create an [Item](/core-concepts#item).
@@ -111,7 +115,8 @@ export namespace Item {
| 'taxjar'
| 'avalara'
| 'anrok'
- | 'numeral';
+ | 'numeral'
+ | 'stripe_tax';
/**
* The identifier of this item in the external system.
@@ -164,7 +169,8 @@ export namespace ItemUpdateParams {
| 'taxjar'
| 'avalara'
| 'anrok'
- | 'numeral';
+ | 'numeral'
+ | 'stripe_tax';
/**
* The identifier of this item in the external system.
diff --git a/src/resources/license-types.ts b/src/resources/license-types.ts
new file mode 100644
index 00000000..d5fc4035
--- /dev/null
+++ b/src/resources/license-types.ts
@@ -0,0 +1,163 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../resource';
+import { isRequestOptions } from '../core';
+import * as Core from '../core';
+import { Page, type PageParams } from '../pagination';
+
+/**
+ * The LicenseType resource represents a type of license that can be assigned to users.
+ * License types are used during billing by grouping metrics on the configured grouping key.
+ */
+export class LicenseTypes extends APIResource {
+ /**
+ * This endpoint is used to create a new license type.
+ *
+ * License types are used to group licenses and define billing behavior. Each
+ * license type has a name and a grouping key that determines how metrics are
+ * aggregated for billing purposes.
+ */
+ create(
+ body: LicenseTypeCreateParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ return this._client.post('/license_types', { body, ...options });
+ }
+
+ /**
+ * This endpoint returns a license type identified by its license_type_id.
+ *
+ * Use this endpoint to retrieve details about a specific license type, including
+ * its name and grouping key.
+ */
+ retrieve(
+ licenseTypeId: string,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ return this._client.get(`/license_types/${licenseTypeId}`, options);
+ }
+
+ /**
+ * This endpoint returns a list of all license types configured for the account,
+ * ordered in ascending order by creation time.
+ *
+ * License types are used to group licenses and define billing behavior. Each
+ * license type has a name and a grouping key that determines how metrics are
+ * aggregated for billing purposes.
+ */
+ list(
+ query?: LicenseTypeListParams,
+ options?: Core.RequestOptions,
+ ): Core.PagePromise;
+ list(
+ options?: Core.RequestOptions,
+ ): Core.PagePromise;
+ list(
+ query: LicenseTypeListParams | Core.RequestOptions = {},
+ options?: Core.RequestOptions,
+ ): Core.PagePromise {
+ if (isRequestOptions(query)) {
+ return this.list({}, query);
+ }
+ return this._client.getAPIList('/license_types', LicenseTypeListResponsesPage, { query, ...options });
+ }
+}
+
+export class LicenseTypeListResponsesPage extends Page {}
+
+/**
+ * The LicenseType resource represents a type of license that can be assigned to
+ * users. License types are used during billing by grouping metrics on the
+ * configured grouping key.
+ */
+export interface LicenseTypeCreateResponse {
+ /**
+ * The Orb-assigned unique identifier for the license type.
+ */
+ id: string;
+
+ /**
+ * The key used for grouping licenses of this type. This is typically a user
+ * identifier field.
+ */
+ grouping_key: string;
+
+ /**
+ * The name of the license type.
+ */
+ name: string;
+}
+
+/**
+ * The LicenseType resource represents a type of license that can be assigned to
+ * users. License types are used during billing by grouping metrics on the
+ * configured grouping key.
+ */
+export interface LicenseTypeRetrieveResponse {
+ /**
+ * The Orb-assigned unique identifier for the license type.
+ */
+ id: string;
+
+ /**
+ * The key used for grouping licenses of this type. This is typically a user
+ * identifier field.
+ */
+ grouping_key: string;
+
+ /**
+ * The name of the license type.
+ */
+ name: string;
+}
+
+/**
+ * The LicenseType resource represents a type of license that can be assigned to
+ * users. License types are used during billing by grouping metrics on the
+ * configured grouping key.
+ */
+export interface LicenseTypeListResponse {
+ /**
+ * The Orb-assigned unique identifier for the license type.
+ */
+ id: string;
+
+ /**
+ * The key used for grouping licenses of this type. This is typically a user
+ * identifier field.
+ */
+ grouping_key: string;
+
+ /**
+ * The name of the license type.
+ */
+ name: string;
+}
+
+export interface LicenseTypeCreateParams {
+ /**
+ * The key used for grouping licenses of this type. This is typically a user
+ * identifier field.
+ */
+ grouping_key: string;
+
+ /**
+ * The name of the license type.
+ */
+ name: string;
+}
+
+export interface LicenseTypeListParams extends PageParams {}
+
+LicenseTypes.LicenseTypeListResponsesPage = LicenseTypeListResponsesPage;
+
+export declare namespace LicenseTypes {
+ export {
+ type LicenseTypeCreateResponse as LicenseTypeCreateResponse,
+ type LicenseTypeRetrieveResponse as LicenseTypeRetrieveResponse,
+ type LicenseTypeListResponse as LicenseTypeListResponse,
+ LicenseTypeListResponsesPage as LicenseTypeListResponsesPage,
+ type LicenseTypeCreateParams as LicenseTypeCreateParams,
+ type LicenseTypeListParams as LicenseTypeListParams,
+ };
+}
diff --git a/src/resources/licenses.ts b/src/resources/licenses.ts
new file mode 100644
index 00000000..0bfd54db
--- /dev/null
+++ b/src/resources/licenses.ts
@@ -0,0 +1,3 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+export * from './licenses/index';
diff --git a/src/resources/licenses/external-licenses.ts b/src/resources/licenses/external-licenses.ts
new file mode 100644
index 00000000..6b3f7e88
--- /dev/null
+++ b/src/resources/licenses/external-licenses.ts
@@ -0,0 +1,147 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../../resource';
+import * as Core from '../../core';
+import * as Shared from '../shared';
+
+export class ExternalLicenses extends APIResource {
+ /**
+ * Returns usage and remaining credits for a license identified by its external
+ * license ID.
+ *
+ * Date range defaults to the current billing period if not specified.
+ */
+ getUsage(
+ externalLicenseId: string,
+ query: ExternalLicenseGetUsageParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ return this._client.get(`/licenses/external_licenses/${externalLicenseId}/usage`, { query, ...options });
+ }
+}
+
+export interface ExternalLicenseGetUsageResponse {
+ data: Array;
+
+ pagination_metadata: Shared.PaginationMetadata;
+}
+
+export namespace ExternalLicenseGetUsageResponse {
+ /**
+ * The LicenseUsage resource represents usage and remaining credits for a license
+ * over a date range.
+ *
+ * When grouped by 'day' only, license_id and external_license_id will be null as
+ * the data is aggregated across all licenses.
+ */
+ export interface Data {
+ /**
+ * The total credits allocated to this license for the period.
+ */
+ allocated_credits: number;
+
+ /**
+ * The credits consumed by this license for the period.
+ */
+ consumed_credits: number;
+
+ /**
+ * The end date of the usage period.
+ */
+ end_date: string;
+
+ /**
+ * The unique identifier for the license type.
+ */
+ license_type_id: string;
+
+ /**
+ * The pricing unit for the credits (e.g., 'credits').
+ */
+ pricing_unit: string;
+
+ /**
+ * The remaining credits available for this license (allocated - consumed).
+ */
+ remaining_credits: number;
+
+ /**
+ * The start date of the usage period.
+ */
+ start_date: string;
+
+ /**
+ * The unique identifier for the subscription.
+ */
+ subscription_id: string;
+
+ /**
+ * Credits consumed while the license was active (eligible for individual
+ * allocation deduction).
+ */
+ allocation_eligible_credits?: number | null;
+
+ /**
+ * The external identifier for the license. Null when grouped by day only.
+ */
+ external_license_id?: string | null;
+
+ /**
+ * The unique identifier for the license. Null when grouped by day only.
+ */
+ license_id?: string | null;
+
+ /**
+ * Credits consumed while the license was inactive (draws from shared pool, not
+ * individual allocation).
+ */
+ shared_pool_credits?: number | null;
+ }
+}
+
+export interface ExternalLicenseGetUsageParams {
+ /**
+ * The license type ID to filter licenses by.
+ */
+ license_type_id: string;
+
+ /**
+ * The subscription ID to get license usage for.
+ */
+ subscription_id: string;
+
+ /**
+ * Pagination cursor from a previous request.
+ */
+ cursor?: string | null;
+
+ /**
+ * End date for the usage period (YYYY-MM-DD). Defaults to end of current billing
+ * period.
+ */
+ end_date?: string | null;
+
+ /**
+ * How to group the results. Valid values: 'license', 'day'. Can be combined (e.g.,
+ * 'license,day').
+ */
+ group_by?: Array | null;
+
+ /**
+ * Maximum number of rows in the response data (default 20, max 100).
+ */
+ limit?: number;
+
+ /**
+ * Start date for the usage period (YYYY-MM-DD). Defaults to start of current
+ * billing period.
+ */
+ start_date?: string | null;
+}
+
+export declare namespace ExternalLicenses {
+ export {
+ type ExternalLicenseGetUsageResponse as ExternalLicenseGetUsageResponse,
+ type ExternalLicenseGetUsageParams as ExternalLicenseGetUsageParams,
+ };
+}
diff --git a/src/resources/licenses/index.ts b/src/resources/licenses/index.ts
new file mode 100644
index 00000000..516a55d6
--- /dev/null
+++ b/src/resources/licenses/index.ts
@@ -0,0 +1,27 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+export {
+ ExternalLicenses,
+ type ExternalLicenseGetUsageResponse,
+ type ExternalLicenseGetUsageParams,
+} from './external-licenses';
+export {
+ LicenseListResponsesPage,
+ Licenses,
+ type LicenseCreateResponse,
+ type LicenseRetrieveResponse,
+ type LicenseListResponse,
+ type LicenseDeactivateResponse,
+ type LicenseRetrieveByExternalIDResponse,
+ type LicenseCreateParams,
+ type LicenseListParams,
+ type LicenseDeactivateParams,
+ type LicenseRetrieveByExternalIDParams,
+} from './licenses';
+export {
+ Usage,
+ type UsageGetAllUsageResponse,
+ type UsageGetUsageResponse,
+ type UsageGetAllUsageParams,
+ type UsageGetUsageParams,
+} from './usage';
diff --git a/src/resources/licenses/licenses.ts b/src/resources/licenses/licenses.ts
new file mode 100644
index 00000000..885bd221
--- /dev/null
+++ b/src/resources/licenses/licenses.ts
@@ -0,0 +1,248 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../../resource';
+import * as Core from '../../core';
+import * as ExternalLicensesAPI from './external-licenses';
+import {
+ ExternalLicenseGetUsageParams,
+ ExternalLicenseGetUsageResponse,
+ ExternalLicenses,
+} from './external-licenses';
+import * as UsageAPI from './usage';
+import {
+ Usage,
+ UsageGetAllUsageParams,
+ UsageGetAllUsageResponse,
+ UsageGetUsageParams,
+ UsageGetUsageResponse,
+} from './usage';
+import { Page, type PageParams } from '../../pagination';
+
+export class Licenses extends APIResource {
+ externalLicenses: ExternalLicensesAPI.ExternalLicenses = new ExternalLicensesAPI.ExternalLicenses(
+ this._client,
+ );
+ usage: UsageAPI.Usage = new UsageAPI.Usage(this._client);
+
+ /**
+ * This endpoint is used to create a new license for a user.
+ *
+ * If a start date is provided, the license will be activated at the **start** of
+ * the specified date in the customer's timezone. Otherwise, the activation time
+ * will default to the **start** of the current day in the customer's timezone.
+ */
+ create(body: LicenseCreateParams, options?: Core.RequestOptions): Core.APIPromise {
+ return this._client.post('/licenses', { body, ...options });
+ }
+
+ /**
+ * This endpoint is used to fetch a license given an identifier.
+ */
+ retrieve(licenseId: string, options?: Core.RequestOptions): Core.APIPromise {
+ return this._client.get(`/licenses/${licenseId}`, options);
+ }
+
+ /**
+ * This endpoint returns a list of all licenses for a subscription.
+ */
+ list(
+ query: LicenseListParams,
+ options?: Core.RequestOptions,
+ ): Core.PagePromise {
+ return this._client.getAPIList('/licenses', LicenseListResponsesPage, { query, ...options });
+ }
+
+ /**
+ * This endpoint is used to deactivate an existing license.
+ *
+ * If an end date is provided, the license will be deactivated at the **start** of
+ * the specified date in the customer's timezone. Otherwise, the deactivation time
+ * will default to the **end** of the current day in the customer's timezone.
+ */
+ deactivate(
+ licenseId: string,
+ body: LicenseDeactivateParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ return this._client.post(`/licenses/${licenseId}/deactivate`, { body, ...options });
+ }
+
+ /**
+ * This endpoint is used to fetch a license given an external license identifier.
+ */
+ retrieveByExternalId(
+ externalLicenseId: string,
+ query: LicenseRetrieveByExternalIDParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ return this._client.get(`/licenses/external_license_id/${externalLicenseId}`, { query, ...options });
+ }
+}
+
+export class LicenseListResponsesPage extends Page {}
+
+export interface LicenseCreateResponse {
+ id: string;
+
+ end_date: string | null;
+
+ external_license_id: string;
+
+ license_type_id: string;
+
+ start_date: string;
+
+ status: 'active' | 'inactive';
+
+ subscription_id: string;
+}
+
+export interface LicenseRetrieveResponse {
+ id: string;
+
+ end_date: string | null;
+
+ external_license_id: string;
+
+ license_type_id: string;
+
+ start_date: string;
+
+ status: 'active' | 'inactive';
+
+ subscription_id: string;
+}
+
+export interface LicenseListResponse {
+ id: string;
+
+ end_date: string | null;
+
+ external_license_id: string;
+
+ license_type_id: string;
+
+ start_date: string;
+
+ status: 'active' | 'inactive';
+
+ subscription_id: string;
+}
+
+export interface LicenseDeactivateResponse {
+ id: string;
+
+ end_date: string | null;
+
+ external_license_id: string;
+
+ license_type_id: string;
+
+ start_date: string;
+
+ status: 'active' | 'inactive';
+
+ subscription_id: string;
+}
+
+export interface LicenseRetrieveByExternalIDResponse {
+ id: string;
+
+ end_date: string | null;
+
+ external_license_id: string;
+
+ license_type_id: string;
+
+ start_date: string;
+
+ status: 'active' | 'inactive';
+
+ subscription_id: string;
+}
+
+export interface LicenseCreateParams {
+ /**
+ * The external identifier for the license.
+ */
+ external_license_id: string;
+
+ license_type_id: string;
+
+ subscription_id: string;
+
+ /**
+ * The end date of the license. If not provided, the license will remain active
+ * until deactivated.
+ */
+ end_date?: string | null;
+
+ /**
+ * The start date of the license. If not provided, defaults to start of day today
+ * in the customer's timezone.
+ */
+ start_date?: string | null;
+}
+
+export interface LicenseListParams extends PageParams {
+ subscription_id: string;
+
+ external_license_id?: string | null;
+
+ license_type_id?: string | null;
+
+ status?: 'active' | 'inactive' | null;
+}
+
+export interface LicenseDeactivateParams {
+ /**
+ * The date to deactivate the license. If not provided, defaults to end of day
+ * today in the customer's timezone.
+ */
+ end_date?: string | null;
+}
+
+export interface LicenseRetrieveByExternalIDParams {
+ /**
+ * The ID of the license type to fetch the license for.
+ */
+ license_type_id: string;
+
+ /**
+ * The ID of the subscription to fetch the license for.
+ */
+ subscription_id: string;
+}
+
+Licenses.LicenseListResponsesPage = LicenseListResponsesPage;
+Licenses.ExternalLicenses = ExternalLicenses;
+Licenses.Usage = Usage;
+
+export declare namespace Licenses {
+ export {
+ type LicenseCreateResponse as LicenseCreateResponse,
+ type LicenseRetrieveResponse as LicenseRetrieveResponse,
+ type LicenseListResponse as LicenseListResponse,
+ type LicenseDeactivateResponse as LicenseDeactivateResponse,
+ type LicenseRetrieveByExternalIDResponse as LicenseRetrieveByExternalIDResponse,
+ LicenseListResponsesPage as LicenseListResponsesPage,
+ type LicenseCreateParams as LicenseCreateParams,
+ type LicenseListParams as LicenseListParams,
+ type LicenseDeactivateParams as LicenseDeactivateParams,
+ type LicenseRetrieveByExternalIDParams as LicenseRetrieveByExternalIDParams,
+ };
+
+ export {
+ ExternalLicenses as ExternalLicenses,
+ type ExternalLicenseGetUsageResponse as ExternalLicenseGetUsageResponse,
+ type ExternalLicenseGetUsageParams as ExternalLicenseGetUsageParams,
+ };
+
+ export {
+ Usage as Usage,
+ type UsageGetAllUsageResponse as UsageGetAllUsageResponse,
+ type UsageGetUsageResponse as UsageGetUsageResponse,
+ type UsageGetAllUsageParams as UsageGetAllUsageParams,
+ type UsageGetUsageParams as UsageGetUsageParams,
+ };
+}
diff --git a/src/resources/licenses/usage.ts b/src/resources/licenses/usage.ts
new file mode 100644
index 00000000..f3230fe9
--- /dev/null
+++ b/src/resources/licenses/usage.ts
@@ -0,0 +1,280 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../../resource';
+import { isRequestOptions } from '../../core';
+import * as Core from '../../core';
+import * as Shared from '../shared';
+
+export class Usage extends APIResource {
+ /**
+ * Returns usage and remaining credits for all licenses of a given type on a
+ * subscription.
+ *
+ * Date range defaults to the current billing period if not specified.
+ */
+ getAllUsage(
+ query: UsageGetAllUsageParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ return this._client.get('/licenses/usage', { query, ...options });
+ }
+
+ /**
+ * Returns usage and remaining credits for a specific license over a date range.
+ *
+ * Date range defaults to the current billing period if not specified.
+ */
+ getUsage(
+ licenseId: string,
+ query?: UsageGetUsageParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise;
+ getUsage(licenseId: string, options?: Core.RequestOptions): Core.APIPromise;
+ getUsage(
+ licenseId: string,
+ query: UsageGetUsageParams | Core.RequestOptions = {},
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ if (isRequestOptions(query)) {
+ return this.getUsage(licenseId, {}, query);
+ }
+ return this._client.get(`/licenses/${licenseId}/usage`, { query, ...options });
+ }
+}
+
+export interface UsageGetAllUsageResponse {
+ data: Array;
+
+ pagination_metadata: Shared.PaginationMetadata;
+}
+
+export namespace UsageGetAllUsageResponse {
+ /**
+ * The LicenseUsage resource represents usage and remaining credits for a license
+ * over a date range.
+ *
+ * When grouped by 'day' only, license_id and external_license_id will be null as
+ * the data is aggregated across all licenses.
+ */
+ export interface Data {
+ /**
+ * The total credits allocated to this license for the period.
+ */
+ allocated_credits: number;
+
+ /**
+ * The credits consumed by this license for the period.
+ */
+ consumed_credits: number;
+
+ /**
+ * The end date of the usage period.
+ */
+ end_date: string;
+
+ /**
+ * The unique identifier for the license type.
+ */
+ license_type_id: string;
+
+ /**
+ * The pricing unit for the credits (e.g., 'credits').
+ */
+ pricing_unit: string;
+
+ /**
+ * The remaining credits available for this license (allocated - consumed).
+ */
+ remaining_credits: number;
+
+ /**
+ * The start date of the usage period.
+ */
+ start_date: string;
+
+ /**
+ * The unique identifier for the subscription.
+ */
+ subscription_id: string;
+
+ /**
+ * Credits consumed while the license was active (eligible for individual
+ * allocation deduction).
+ */
+ allocation_eligible_credits?: number | null;
+
+ /**
+ * The external identifier for the license. Null when grouped by day only.
+ */
+ external_license_id?: string | null;
+
+ /**
+ * The unique identifier for the license. Null when grouped by day only.
+ */
+ license_id?: string | null;
+
+ /**
+ * Credits consumed while the license was inactive (draws from shared pool, not
+ * individual allocation).
+ */
+ shared_pool_credits?: number | null;
+ }
+}
+
+export interface UsageGetUsageResponse {
+ data: Array;
+
+ pagination_metadata: Shared.PaginationMetadata;
+}
+
+export namespace UsageGetUsageResponse {
+ /**
+ * The LicenseUsage resource represents usage and remaining credits for a license
+ * over a date range.
+ *
+ * When grouped by 'day' only, license_id and external_license_id will be null as
+ * the data is aggregated across all licenses.
+ */
+ export interface Data {
+ /**
+ * The total credits allocated to this license for the period.
+ */
+ allocated_credits: number;
+
+ /**
+ * The credits consumed by this license for the period.
+ */
+ consumed_credits: number;
+
+ /**
+ * The end date of the usage period.
+ */
+ end_date: string;
+
+ /**
+ * The unique identifier for the license type.
+ */
+ license_type_id: string;
+
+ /**
+ * The pricing unit for the credits (e.g., 'credits').
+ */
+ pricing_unit: string;
+
+ /**
+ * The remaining credits available for this license (allocated - consumed).
+ */
+ remaining_credits: number;
+
+ /**
+ * The start date of the usage period.
+ */
+ start_date: string;
+
+ /**
+ * The unique identifier for the subscription.
+ */
+ subscription_id: string;
+
+ /**
+ * Credits consumed while the license was active (eligible for individual
+ * allocation deduction).
+ */
+ allocation_eligible_credits?: number | null;
+
+ /**
+ * The external identifier for the license. Null when grouped by day only.
+ */
+ external_license_id?: string | null;
+
+ /**
+ * The unique identifier for the license. Null when grouped by day only.
+ */
+ license_id?: string | null;
+
+ /**
+ * Credits consumed while the license was inactive (draws from shared pool, not
+ * individual allocation).
+ */
+ shared_pool_credits?: number | null;
+ }
+}
+
+export interface UsageGetAllUsageParams {
+ /**
+ * The license type ID to filter licenses by.
+ */
+ license_type_id: string;
+
+ /**
+ * The subscription ID to get license usage for.
+ */
+ subscription_id: string;
+
+ /**
+ * Pagination cursor from a previous request.
+ */
+ cursor?: string | null;
+
+ /**
+ * End date for the usage period (YYYY-MM-DD). Defaults to end of current billing
+ * period.
+ */
+ end_date?: string | null;
+
+ /**
+ * How to group the results. Valid values: 'license', 'day'. Can be combined (e.g.,
+ * 'license,day').
+ */
+ group_by?: Array | null;
+
+ /**
+ * Maximum number of rows in the response data (default 20, max 100).
+ */
+ limit?: number;
+
+ /**
+ * Start date for the usage period (YYYY-MM-DD). Defaults to start of current
+ * billing period.
+ */
+ start_date?: string | null;
+}
+
+export interface UsageGetUsageParams {
+ /**
+ * Pagination cursor from a previous request.
+ */
+ cursor?: string | null;
+
+ /**
+ * End date for the usage period (YYYY-MM-DD). Defaults to end of current billing
+ * period.
+ */
+ end_date?: string | null;
+
+ /**
+ * How to group the results. Valid values: 'license', 'day'. Can be combined (e.g.,
+ * 'license,day').
+ */
+ group_by?: Array | null;
+
+ /**
+ * Maximum number of rows in the response data (default 20, max 100).
+ */
+ limit?: number;
+
+ /**
+ * Start date for the usage period (YYYY-MM-DD). Defaults to start of current
+ * billing period.
+ */
+ start_date?: string | null;
+}
+
+export declare namespace Usage {
+ export {
+ type UsageGetAllUsageResponse as UsageGetAllUsageResponse,
+ type UsageGetUsageResponse as UsageGetUsageResponse,
+ type UsageGetAllUsageParams as UsageGetAllUsageParams,
+ type UsageGetUsageParams as UsageGetUsageParams,
+ };
+}
diff --git a/src/resources/metrics.ts b/src/resources/metrics.ts
index 47662568..3a7b2c58 100644
--- a/src/resources/metrics.ts
+++ b/src/resources/metrics.ts
@@ -6,6 +6,10 @@ import * as Core from '../core';
import * as ItemsAPI from './items';
import { Page, type PageParams } from '../pagination';
+/**
+ * The Metric resource represents a calculation of a quantity based on events.
+ * Metrics are defined by the query that transforms raw usage events into meaningful values for your customers.
+ */
export class Metrics extends APIResource {
/**
* This endpoint is used to create a [metric](/core-concepts###metric) using a SQL
@@ -88,6 +92,8 @@ export interface BillableMetric {
name: string;
status: 'active' | 'draft' | 'archived';
+
+ parameter_definitions?: Array<{ [key: string]: unknown }> | null;
}
export interface MetricCreateParams {
diff --git a/src/resources/plans/external-plan-id.ts b/src/resources/plans/external-plan-id.ts
index e936d0f7..41d8a161 100644
--- a/src/resources/plans/external-plan-id.ts
+++ b/src/resources/plans/external-plan-id.ts
@@ -4,6 +4,11 @@ import { APIResource } from '../../resource';
import * as Core from '../../core';
import * as PlansAPI from './plans';
+/**
+ * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
+ * customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
+ * in the [Price resource](/reference/price).
+ */
export class ExternalPlanID extends APIResource {
/**
* This endpoint can be used to update the `external_plan_id`, and `metadata` of an
diff --git a/src/resources/plans/migrations.ts b/src/resources/plans/migrations.ts
index 7940ab4c..31ec755a 100644
--- a/src/resources/plans/migrations.ts
+++ b/src/resources/plans/migrations.ts
@@ -5,6 +5,11 @@ import { isRequestOptions } from '../../core';
import * as Core from '../../core';
import { Page, type PageParams } from '../../pagination';
+/**
+ * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
+ * customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
+ * in the [Price resource](/reference/price).
+ */
export class Migrations extends APIResource {
/**
* Fetch migration
diff --git a/src/resources/plans/plans.ts b/src/resources/plans/plans.ts
index b684caa9..b9bf250b 100644
--- a/src/resources/plans/plans.ts
+++ b/src/resources/plans/plans.ts
@@ -17,6 +17,11 @@ import {
} from './migrations';
import { Page, type PageParams } from '../../pagination';
+/**
+ * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
+ * customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
+ * in the [Price resource](/reference/price).
+ */
export class Plans extends APIResource {
externalPlanId: ExternalPlanIDAPI.ExternalPlanID = new ExternalPlanIDAPI.ExternalPlanID(this._client);
migrations: MigrationsAPI.Migrations = new MigrationsAPI.Migrations(this._client);
@@ -332,6 +337,43 @@ export namespace PlanCreateParams {
*/
allocation_price?: Shared.NewAllocationPrice | null;
+ /**
+ * The license allocation price to add to the plan.
+ */
+ license_allocation_price?:
+ | Price.NewLicenseAllocationUnitPrice
+ | Price.NewLicenseAllocationTieredPrice
+ | Price.NewLicenseAllocationBulkPrice
+ | Price.NewLicenseAllocationBulkWithFiltersPrice
+ | Price.NewLicenseAllocationPackagePrice
+ | Price.NewLicenseAllocationMatrixPrice
+ | Price.NewLicenseAllocationThresholdTotalAmountPrice
+ | Price.NewLicenseAllocationTieredPackagePrice
+ | Price.NewLicenseAllocationTieredWithMinimumPrice
+ | Price.NewLicenseAllocationGroupedTieredPrice
+ | Price.NewLicenseAllocationTieredPackageWithMinimumPrice
+ | Price.NewLicenseAllocationPackageWithAllocationPrice
+ | Price.NewLicenseAllocationUnitWithPercentPrice
+ | Price.NewLicenseAllocationMatrixWithAllocationPrice
+ | Price.NewLicenseAllocationTieredWithProrationPrice
+ | Price.NewLicenseAllocationUnitWithProrationPrice
+ | Price.NewLicenseAllocationGroupedAllocationPrice
+ | Price.NewLicenseAllocationBulkWithProrationPrice
+ | Price.NewLicenseAllocationGroupedWithProratedMinimumPrice
+ | Price.NewLicenseAllocationGroupedWithMeteredMinimumPrice
+ | Price.NewLicenseAllocationGroupedWithMinMaxThresholdsPrice
+ | Price.NewLicenseAllocationMatrixWithDisplayNamePrice
+ | Price.NewLicenseAllocationGroupedTieredPackagePrice
+ | Price.NewLicenseAllocationMaxGroupTieredPackagePrice
+ | Price.NewLicenseAllocationScalableMatrixWithUnitPricingPrice
+ | Price.NewLicenseAllocationScalableMatrixWithTieredPricingPrice
+ | Price.NewLicenseAllocationCumulativeGroupedBulkPrice
+ | Price.NewLicenseAllocationCumulativeGroupedAllocationPrice
+ | Price.NewLicenseAllocationMinimumCompositePrice
+ | Price.NewLicenseAllocationPercentCompositePrice
+ | Price.NewLicenseAllocationEventOutputPrice
+ | null;
+
/**
* The phase to add this price to.
*/
@@ -376,12 +418,7 @@ export namespace PlanCreateParams {
}
export namespace Price {
- export interface NewPlanBulkWithFiltersPrice {
- /**
- * Configuration for bulk_with_filters pricing
- */
- bulk_with_filters_config: NewPlanBulkWithFiltersPrice.BulkWithFiltersConfig;
-
+ export interface NewLicenseAllocationUnitPrice {
/**
* The cadence to bill for this price on.
*/
@@ -392,16 +429,28 @@ export namespace PlanCreateParams {
*/
item_id: string;
+ /**
+ * License allocations to associate with this price. Each entry defines a
+ * per-license credit pool granted each cadence. Requires license_type_id or
+ * license_type_configuration to be set.
+ */
+ license_allocations: Array;
+
/**
* The pricing model type
*/
- model_type: 'bulk_with_filters';
+ model_type: 'unit';
/**
* The name of the price.
*/
name: string;
+ /**
+ * Configuration for unit pricing
+ */
+ unit_config: Shared.UnitConfig;
+
/**
* The id of the billable metric for the price. Only needed if the price is
* usage-based.
@@ -463,6 +512,11 @@ export namespace PlanCreateParams {
*/
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
+ /**
+ * The ID of the license type to associate with this price.
+ */
+ license_type_id?: string | null;
+
/**
* User-specified key/value pairs for the resource. Individual keys can be removed
* by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -477,56 +531,26 @@ export namespace PlanCreateParams {
reference_id?: string | null;
}
- export namespace NewPlanBulkWithFiltersPrice {
- /**
- * Configuration for bulk_with_filters pricing
- */
- export interface BulkWithFiltersConfig {
- /**
- * Property filters to apply (all must match)
- */
- filters: Array;
-
+ export namespace NewLicenseAllocationUnitPrice {
+ export interface LicenseAllocation {
/**
- * Bulk tiers for rating based on total usage volume
+ * The amount of credits granted per active license per cadence.
*/
- tiers: Array