diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index ce4dacbf..d3e84862 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "4.72.3"
+ ".": "4.73.0"
}
diff --git a/.stats.yml b/.stats.yml
index c71a786b..605226f0 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 106
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-e8dad7eee5621fe2ba948dfd00dabf170d9d92ce615a9f04b0f546f4d8bf39ba.yml
-openapi_spec_hash: 3f6a98e3a1b3a47acebd67a960090ebf
-config_hash: f6da12790e8f46d93592def474d41c69
+configured_endpoints: 114
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-6d2a5b5d2cfb485e1a548aa15e1e36844e1f14f42553033822e1c570c8aa0825.yml
+openapi_spec_hash: 0266a5aaced5e768bcf6a70924d69799
+config_hash: e63f2d098e5d12f63ae4cd8270aa5c3c
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e9f70403..13462250 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,21 @@
# Changelog
+## 4.73.0 (2025-05-28)
+
+Full Changelog: [v4.72.3...v4.73.0](https://github.com/orbcorp/orb-node/compare/v4.72.3...v4.73.0)
+
+### Features
+
+* **api:** api update ([e7c0e9b](https://github.com/orbcorp/orb-node/commit/e7c0e9ba2894fe00871aff9d542402aefdb514fe))
+* **api:** api update ([6314aab](https://github.com/orbcorp/orb-node/commit/6314aab469494941759c2c4ca9dd40951411c143))
+* **api:** manual updates ([1148ae8](https://github.com/orbcorp/orb-node/commit/1148ae84a3dccdc9a0f7f16582457b01842bc303))
+
+
+### Chores
+
+* **docs:** grammar improvements ([7734e2c](https://github.com/orbcorp/orb-node/commit/7734e2c2d52411326b3ae2eb1fbed42d63ba4c08))
+* improve publish-npm script --latest tag logic ([642fae3](https://github.com/orbcorp/orb-node/commit/642fae3d1d137b24687643c0f700a5637162584b))
+
## 4.72.3 (2025-05-18)
Full Changelog: [v4.72.2...v4.72.3](https://github.com/orbcorp/orb-node/compare/v4.72.2...v4.72.3)
diff --git a/SECURITY.md b/SECURITY.md
index 6f64d22c..3011c342 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -16,11 +16,11 @@ before making any information public.
## Reporting Non-SDK Related Security Issues
If you encounter security issues that are not directly related to SDKs but pertain to the services
-or products provided by Orb please follow the respective company's security reporting guidelines.
+or products provided by Orb, please follow the respective company's security reporting guidelines.
### Orb Terms and Policies
-Please contact team@withorb.com for any questions or concerns regarding security of our services.
+Please contact team@withorb.com for any questions or concerns regarding the security of our services.
---
diff --git a/api.md b/api.md
index 65c62733..6002814d 100644
--- a/api.md
+++ b/api.md
@@ -22,6 +22,27 @@ Methods:
- client.topLevel.ping() -> TopLevelPingResponse
+# Beta
+
+Types:
+
+- PlanVersion
+- PlanVersionPhase
+
+Methods:
+
+- client.beta.createPlanVersion(planId, { ...params }) -> PlanVersion
+- client.beta.fetchPlanVersion(planId, version) -> PlanVersion
+- client.beta.setDefaultPlanVersion(planId, { ...params }) -> Plan
+
+## ExternalPlanID
+
+Methods:
+
+- client.beta.externalPlanId.createPlanVersion(externalPlanId, { ...params }) -> PlanVersion
+- client.beta.externalPlanId.fetchPlanVersion(externalPlanId, version) -> PlanVersion
+- client.beta.externalPlanId.setDefaultPlanVersion(externalPlanId, { ...params }) -> Plan
+
# Coupons
Types:
@@ -225,6 +246,7 @@ Methods:
- client.items.create({ ...params }) -> Item
- client.items.update(itemId, { ...params }) -> Item
- client.items.list({ ...params }) -> ItemsPage
+- client.items.archive(itemId) -> Item
- client.items.fetch(itemId) -> Item
# Metrics
@@ -267,6 +289,7 @@ Types:
- EvaluatePriceGroup
- Price
- PriceEvaluateResponse
+- PriceEvaluateMultipleResponse
Methods:
@@ -274,6 +297,7 @@ Methods:
- client.prices.update(priceId, { ...params }) -> Price
- client.prices.list({ ...params }) -> PricesPage
- client.prices.evaluate(priceId, { ...params }) -> PriceEvaluateResponse
+- client.prices.evaluateMultiple({ ...params }) -> PriceEvaluateMultipleResponse
- client.prices.fetch(priceId) -> Price
## ExternalPriceID
diff --git a/bin/publish-npm b/bin/publish-npm
index 4c21181b..2505deca 100644
--- a/bin/publish-npm
+++ b/bin/publish-npm
@@ -4,19 +4,35 @@ set -eux
npm config set '//registry.npmjs.org/:_authToken' "$NPM_TOKEN"
-# Build the project
yarn build
-
-# Navigate to the dist directory
cd dist
-# Get the version from package.json
+# Get latest version from npm
+#
+# If the package doesn't exist, yarn will return
+# {"type":"error","data":"Received invalid response from npm."}
+# where .data.version doesn't exist so LAST_VERSION will be an empty string.
+LAST_VERSION="$(yarn info --json 2> /dev/null | jq -r '.data.version')"
+
+# Get current version from package.json
VERSION="$(node -p "require('./package.json').version")"
-# Extract the pre-release tag if it exists
+# Check if current version is pre-release (e.g. alpha / beta / rc)
+CURRENT_IS_PRERELEASE=false
if [[ "$VERSION" =~ -([a-zA-Z]+) ]]; then
- # Extract the part before any dot in the pre-release identifier
- TAG="${BASH_REMATCH[1]}"
+ CURRENT_IS_PRERELEASE=true
+ CURRENT_TAG="${BASH_REMATCH[1]}"
+fi
+
+# Check if last version is a stable release
+LAST_IS_STABLE_RELEASE=true
+if [[ -z "$LAST_VERSION" || "$LAST_VERSION" =~ -([a-zA-Z]+) ]]; then
+ LAST_IS_STABLE_RELEASE=false
+fi
+
+# Use a corresponding alpha/beta tag if there already is a stable release and we're publishing a prerelease.
+if $CURRENT_IS_PRERELEASE && $LAST_IS_STABLE_RELEASE; then
+ TAG="$CURRENT_TAG"
else
TAG="latest"
fi
diff --git a/package.json b/package.json
index c6368a1e..6bc80b7b 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "orb-billing",
- "version": "4.72.3",
+ "version": "4.73.0",
"description": "The official TypeScript library for the Orb API",
"author": "Orb ",
"types": "dist/index.d.ts",
diff --git a/src/index.ts b/src/index.ts
index ea1589b0..266b9b50 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -100,6 +100,13 @@ import {
SubscriptionsPage,
} from './resources/subscriptions';
import { TopLevel, TopLevelPingResponse } from './resources/top-level';
+import {
+ Beta,
+ BetaCreatePlanVersionParams,
+ BetaSetDefaultPlanVersionParams,
+ PlanVersion,
+ PlanVersionPhase,
+} from './resources/beta/beta';
import {
Coupon,
CouponCreateParams,
@@ -145,6 +152,8 @@ import {
EvaluatePriceGroup,
Price,
PriceCreateParams,
+ PriceEvaluateMultipleParams,
+ PriceEvaluateMultipleResponse,
PriceEvaluateParams,
PriceEvaluateResponse,
PriceListParams,
@@ -278,6 +287,7 @@ export class Orb extends Core.APIClient {
}
topLevel: API.TopLevel = new API.TopLevel(this);
+ beta: API.Beta = new API.Beta(this);
coupons: API.Coupons = new API.Coupons(this);
creditNotes: API.CreditNotes = new API.CreditNotes(this);
customers: API.Customers = new API.Customers(this);
@@ -347,6 +357,7 @@ export class Orb extends Core.APIClient {
}
Orb.TopLevel = TopLevel;
+Orb.Beta = Beta;
Orb.Coupons = Coupons;
Orb.CouponsPage = CouponsPage;
Orb.CreditNotes = CreditNotes;
@@ -379,6 +390,14 @@ export declare namespace Orb {
export { TopLevel as TopLevel, type TopLevelPingResponse as TopLevelPingResponse };
+ export {
+ Beta as Beta,
+ type PlanVersion as PlanVersion,
+ type PlanVersionPhase as PlanVersionPhase,
+ type BetaCreatePlanVersionParams as BetaCreatePlanVersionParams,
+ type BetaSetDefaultPlanVersionParams as BetaSetDefaultPlanVersionParams,
+ };
+
export {
Coupons as Coupons,
type Coupon as Coupon,
@@ -467,11 +486,13 @@ export declare namespace Orb {
type EvaluatePriceGroup as EvaluatePriceGroup,
type Price as Price,
type PriceEvaluateResponse as PriceEvaluateResponse,
+ type PriceEvaluateMultipleResponse as PriceEvaluateMultipleResponse,
PricesPage as PricesPage,
type PriceCreateParams as PriceCreateParams,
type PriceUpdateParams as PriceUpdateParams,
type PriceListParams as PriceListParams,
type PriceEvaluateParams as PriceEvaluateParams,
+ type PriceEvaluateMultipleParams as PriceEvaluateMultipleParams,
};
export {
diff --git a/src/resources/alerts.ts b/src/resources/alerts.ts
index e6e37a99..c0df1076 100644
--- a/src/resources/alerts.ts
+++ b/src/resources/alerts.ts
@@ -224,6 +224,12 @@ export interface Alert {
| 'credit_balance_recovered'
| 'usage_exceeded'
| 'cost_exceeded';
+
+ /**
+ * The current status of the alert. This field is only present for credit balance
+ * alerts.
+ */
+ balance_alert_status?: Array | null;
}
export namespace Alert {
@@ -280,6 +286,21 @@ export namespace Alert {
*/
value: number;
}
+
+ /**
+ * Alert status is used to determine if an alert is currently in-alert or not.
+ */
+ export interface BalanceAlertStatus {
+ /**
+ * Whether the alert is currently in-alert or not.
+ */
+ in_alert: boolean;
+
+ /**
+ * The value of the threshold that defines the alert status.
+ */
+ threshold_value: number;
+ }
}
export interface AlertUpdateParams {
diff --git a/src/resources/beta.ts b/src/resources/beta.ts
new file mode 100644
index 00000000..1542e942
--- /dev/null
+++ b/src/resources/beta.ts
@@ -0,0 +1,3 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+export * from './beta/index';
diff --git a/src/resources/beta/beta.ts b/src/resources/beta/beta.ts
new file mode 100644
index 00000000..9d49fe4a
--- /dev/null
+++ b/src/resources/beta/beta.ts
@@ -0,0 +1,9106 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../../resource';
+import * as Core from '../../core';
+import * as ExternalPlanIDAPI from './external-plan-id';
+import {
+ ExternalPlanID,
+ ExternalPlanIDCreatePlanVersionParams,
+ ExternalPlanIDSetDefaultPlanVersionParams,
+} from './external-plan-id';
+import * as PlansAPI from '../plans/plans';
+import * as PricesAPI from '../prices/prices';
+
+export class Beta extends APIResource {
+ externalPlanId: ExternalPlanIDAPI.ExternalPlanID = new ExternalPlanIDAPI.ExternalPlanID(this._client);
+
+ /**
+ * This API endpoint is in beta and its interface may change. It is recommended for
+ * use only in test mode.
+ *
+ * This endpoint allows the creation of a new plan version for an existing plan.
+ */
+ createPlanVersion(
+ planId: string,
+ body: BetaCreatePlanVersionParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ return this._client.post(`/plans/${planId}/versions`, { body, ...options });
+ }
+
+ /**
+ * This API endpoint is in beta and its interface may change. It is recommended for
+ * use only in test mode.
+ *
+ * This endpoint is used to fetch a plan version. It returns the phases, prices,
+ * and adjustments present on this version of the plan.
+ */
+ fetchPlanVersion(
+ planId: string,
+ version: string,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ return this._client.get(`/plans/${planId}/versions/${version}`, options);
+ }
+
+ /**
+ * This API endpoint is in beta and its interface may change. It is recommended for
+ * use only in test mode.
+ *
+ * This endpoint allows setting the default version of a plan.
+ */
+ setDefaultPlanVersion(
+ planId: string,
+ body: BetaSetDefaultPlanVersionParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ return this._client.post(`/plans/${planId}/set_default_version`, { body, ...options });
+ }
+}
+
+/**
+ * The PlanVersion resource represents the prices and adjustments present on a
+ * specific version of a plan.
+ */
+export interface PlanVersion {
+ /**
+ * Adjustments for this plan. If the plan has phases, this includes adjustments
+ * across all phases of the plan.
+ */
+ adjustments: Array<
+ | PlanVersion.PlanPhaseUsageDiscountAdjustment
+ | PlanVersion.PlanPhaseAmountDiscountAdjustment
+ | PlanVersion.PlanPhasePercentageDiscountAdjustment
+ | PlanVersion.PlanPhaseMinimumAdjustment
+ | PlanVersion.PlanPhaseMaximumAdjustment
+ >;
+
+ created_at: string;
+
+ plan_phases: Array | null;
+
+ /**
+ * Prices for this plan. If the plan has phases, this includes prices across all
+ * phases of the plan.
+ */
+ prices: Array;
+
+ version: number;
+}
+
+export namespace PlanVersion {
+ export interface PlanPhaseUsageDiscountAdjustment {
+ id: string;
+
+ adjustment_type: 'usage_discount';
+
+ /**
+ * @deprecated The price IDs that this adjustment applies to.
+ */
+ applies_to_price_ids: Array;
+
+ /**
+ * The filters that determine which prices to apply this adjustment to.
+ */
+ filters: Array;
+
+ /**
+ * True for adjustments that apply to an entire invocice, false for adjustments
+ * that apply to only one price.
+ */
+ is_invoice_level: boolean;
+
+ /**
+ * The plan phase in which this adjustment is active.
+ */
+ plan_phase_order: number | null;
+
+ /**
+ * The reason for the adjustment.
+ */
+ reason: string | null;
+
+ /**
+ * The number of usage units by which to discount the price this adjustment applies
+ * to in a given billing period.
+ */
+ usage_discount: number;
+ }
+
+ export namespace PlanPhaseUsageDiscountAdjustment {
+ 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 PlanPhaseAmountDiscountAdjustment {
+ id: string;
+
+ adjustment_type: 'amount_discount';
+
+ /**
+ * The amount by which to discount the prices this adjustment applies to in a given
+ * billing period.
+ */
+ amount_discount: string;
+
+ /**
+ * @deprecated The price IDs that this adjustment applies to.
+ */
+ applies_to_price_ids: Array;
+
+ /**
+ * The filters that determine which prices to apply this adjustment to.
+ */
+ filters: Array;
+
+ /**
+ * True for adjustments that apply to an entire invocice, false for adjustments
+ * that apply to only one price.
+ */
+ is_invoice_level: boolean;
+
+ /**
+ * The plan phase in which this adjustment is active.
+ */
+ plan_phase_order: number | null;
+
+ /**
+ * The reason for the adjustment.
+ */
+ reason: string | null;
+ }
+
+ export namespace PlanPhaseAmountDiscountAdjustment {
+ 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 PlanPhasePercentageDiscountAdjustment {
+ id: string;
+
+ adjustment_type: 'percentage_discount';
+
+ /**
+ * @deprecated The price IDs that this adjustment applies to.
+ */
+ applies_to_price_ids: Array;
+
+ /**
+ * The filters that determine which prices to apply this adjustment to.
+ */
+ filters: Array;
+
+ /**
+ * True for adjustments that apply to an entire invocice, false for adjustments
+ * that apply to only one price.
+ */
+ is_invoice_level: boolean;
+
+ /**
+ * The percentage (as a value between 0 and 1) by which to discount the price
+ * intervals this adjustment applies to in a given billing period.
+ */
+ percentage_discount: number;
+
+ /**
+ * The plan phase in which this adjustment is active.
+ */
+ plan_phase_order: number | null;
+
+ /**
+ * The reason for the adjustment.
+ */
+ reason: string | null;
+ }
+
+ export namespace PlanPhasePercentageDiscountAdjustment {
+ 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 PlanPhaseMinimumAdjustment {
+ id: string;
+
+ adjustment_type: 'minimum';
+
+ /**
+ * @deprecated The price IDs that this adjustment applies to.
+ */
+ applies_to_price_ids: Array;
+
+ /**
+ * The filters that determine which prices to apply this adjustment to.
+ */
+ filters: Array;
+
+ /**
+ * True for adjustments that apply to an entire invocice, false for adjustments
+ * that apply to only one price.
+ */
+ is_invoice_level: boolean;
+
+ /**
+ * The item ID that revenue from this minimum will be attributed to.
+ */
+ item_id: string;
+
+ /**
+ * The minimum amount to charge in a given billing period for the prices this
+ * adjustment applies to.
+ */
+ minimum_amount: string;
+
+ /**
+ * The plan phase in which this adjustment is active.
+ */
+ plan_phase_order: number | null;
+
+ /**
+ * The reason for the adjustment.
+ */
+ reason: string | null;
+ }
+
+ export namespace PlanPhaseMinimumAdjustment {
+ 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 PlanPhaseMaximumAdjustment {
+ id: string;
+
+ adjustment_type: 'maximum';
+
+ /**
+ * @deprecated The price IDs that this adjustment applies to.
+ */
+ applies_to_price_ids: Array;
+
+ /**
+ * The filters that determine which prices to apply this adjustment to.
+ */
+ filters: Array;
+
+ /**
+ * True for adjustments that apply to an entire invocice, false for adjustments
+ * that apply to only one price.
+ */
+ is_invoice_level: boolean;
+
+ /**
+ * The maximum amount to charge in a given billing period for the prices this
+ * adjustment applies to.
+ */
+ maximum_amount: string;
+
+ /**
+ * The plan phase in which this adjustment is active.
+ */
+ plan_phase_order: number | null;
+
+ /**
+ * The reason for the adjustment.
+ */
+ reason: string | null;
+ }
+
+ export namespace PlanPhaseMaximumAdjustment {
+ 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 PlanVersionPhase {
+ id: string;
+
+ description: string | null;
+
+ /**
+ * How many terms of length `duration_unit` this phase is active for. If null, this
+ * phase is evergreen and active indefinitely
+ */
+ duration: number | null;
+
+ duration_unit: 'daily' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | null;
+
+ name: string;
+
+ /**
+ * Determines the ordering of the phase in a plan's lifecycle. 1 = first phase.
+ */
+ order: number;
+}
+
+export interface BetaCreatePlanVersionParams {
+ /**
+ * New version number.
+ */
+ version: number;
+
+ /**
+ * Additional adjustments to be added to the plan.
+ */
+ add_adjustments?: Array | null;
+
+ /**
+ * Additional prices to be added to the plan.
+ */
+ add_prices?: Array | null;
+
+ /**
+ * Adjustments to be removed from the plan.
+ */
+ remove_adjustments?: Array | null;
+
+ /**
+ * Prices to be removed from the plan.
+ */
+ remove_prices?: Array | null;
+
+ /**
+ * Adjustments to be replaced with additional adjustments on the plan.
+ */
+ replace_adjustments?: Array | null;
+
+ /**
+ * Prices to be replaced with additional prices on the plan.
+ */
+ replace_prices?: Array | null;
+
+ /**
+ * Set this new plan version as the default
+ */
+ set_as_default?: boolean | null;
+}
+
+export namespace BetaCreatePlanVersionParams {
+ export interface AddAdjustment {
+ /**
+ * The definition of a new adjustment to create and add to the plan.
+ */
+ adjustment:
+ | AddAdjustment.NewPercentageDiscount
+ | AddAdjustment.NewUsageDiscount
+ | AddAdjustment.NewAmountDiscount
+ | AddAdjustment.NewMinimum
+ | AddAdjustment.NewMaximum;
+
+ /**
+ * The phase to add this adjustment to.
+ */
+ plan_phase_order?: number | null;
+ }
+
+ export namespace AddAdjustment {
+ export interface NewPercentageDiscount {
+ adjustment_type: 'percentage_discount';
+
+ percentage_discount: number;
+
+ /**
+ * The set of price IDs to which this adjustment applies.
+ */
+ applies_to_price_ids?: Array | null;
+
+ /**
+ * When false, this adjustment will be applied to a single price. Otherwise, it
+ * will be applied at the invoice level, possibly to multiple prices.
+ */
+ is_invoice_level?: boolean;
+ }
+
+ export interface NewUsageDiscount {
+ adjustment_type: 'usage_discount';
+
+ usage_discount: number;
+
+ /**
+ * The set of price IDs to which this adjustment applies.
+ */
+ applies_to_price_ids?: Array | null;
+
+ /**
+ * When false, this adjustment will be applied to a single price. Otherwise, it
+ * will be applied at the invoice level, possibly to multiple prices.
+ */
+ is_invoice_level?: boolean;
+ }
+
+ export interface NewAmountDiscount {
+ adjustment_type: 'amount_discount';
+
+ amount_discount: string;
+
+ /**
+ * The set of price IDs to which this adjustment applies.
+ */
+ applies_to_price_ids?: Array | null;
+
+ /**
+ * When false, this adjustment will be applied to a single price. Otherwise, it
+ * will be applied at the invoice level, possibly to multiple prices.
+ */
+ is_invoice_level?: boolean;
+ }
+
+ export interface NewMinimum {
+ adjustment_type: 'minimum';
+
+ /**
+ * The item ID that revenue from this minimum will be attributed to.
+ */
+ item_id: string;
+
+ minimum_amount: string;
+
+ /**
+ * The set of price IDs to which this adjustment applies.
+ */
+ applies_to_price_ids?: Array | null;
+
+ /**
+ * When false, this adjustment will be applied to a single price. Otherwise, it
+ * will be applied at the invoice level, possibly to multiple prices.
+ */
+ is_invoice_level?: boolean;
+ }
+
+ export interface NewMaximum {
+ adjustment_type: 'maximum';
+
+ maximum_amount: string;
+
+ /**
+ * The set of price IDs to which this adjustment applies.
+ */
+ applies_to_price_ids?: Array | null;
+
+ /**
+ * When false, this adjustment will be applied to a single price. Otherwise, it
+ * will be applied at the invoice level, possibly to multiple prices.
+ */
+ is_invoice_level?: boolean;
+ }
+ }
+
+ export interface AddPrice {
+ /**
+ * The allocation price to add to the plan.
+ */
+ allocation_price?: AddPrice.AllocationPrice | null;
+
+ /**
+ * The phase to add this price to.
+ */
+ plan_phase_order?: number | null;
+
+ /**
+ * The price to add to the plan
+ */
+ price?:
+ | AddPrice.NewPlanUnitPrice
+ | AddPrice.NewPlanPackagePrice
+ | AddPrice.NewPlanMatrixPrice
+ | AddPrice.NewPlanTieredPrice
+ | AddPrice.NewPlanTieredBpsPrice
+ | AddPrice.NewPlanBpsPrice
+ | AddPrice.NewPlanBulkBpsPrice
+ | AddPrice.NewPlanBulkPrice
+ | AddPrice.NewPlanThresholdTotalAmountPrice
+ | AddPrice.NewPlanTieredPackagePrice
+ | AddPrice.NewPlanTieredWithMinimumPrice
+ | AddPrice.NewPlanUnitWithPercentPrice
+ | AddPrice.NewPlanPackageWithAllocationPrice
+ | AddPrice.NewPlanTierWithProrationPrice
+ | AddPrice.NewPlanUnitWithProrationPrice
+ | AddPrice.NewPlanGroupedAllocationPrice
+ | AddPrice.NewPlanGroupedWithProratedMinimumPrice
+ | AddPrice.NewPlanGroupedWithMeteredMinimumPrice
+ | AddPrice.NewPlanMatrixWithDisplayNamePrice
+ | AddPrice.NewPlanBulkWithProrationPrice
+ | AddPrice.NewPlanGroupedTieredPackagePrice
+ | AddPrice.NewPlanMaxGroupTieredPackagePrice
+ | AddPrice.NewPlanScalableMatrixWithUnitPricingPrice
+ | AddPrice.NewPlanScalableMatrixWithTieredPricingPrice
+ | AddPrice.NewPlanCumulativeGroupedBulkPrice
+ | AddPrice.NewPlanTieredPackageWithMinimumPrice
+ | AddPrice.NewPlanMatrixWithAllocationPrice
+ | AddPrice.NewPlanGroupedTieredPrice
+ | null;
+ }
+
+ export namespace AddPrice {
+ /**
+ * The allocation price to add to the plan.
+ */
+ export interface AllocationPrice {
+ /**
+ * An amount of the currency to allocate to the customer at the specified cadence.
+ */
+ amount: string;
+
+ /**
+ * The cadence at which to allocate the amount to the customer.
+ */
+ cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
+
+ /**
+ * An ISO 4217 currency string or a custom pricing unit identifier in which to bill
+ * this price.
+ */
+ currency: string;
+
+ /**
+ * The custom expiration for the allocation.
+ */
+ custom_expiration?: AllocationPrice.CustomExpiration | null;
+
+ /**
+ * Whether the allocated amount should expire at the end of the cadence or roll
+ * over to the next period. Set to null if using custom_expiration.
+ */
+ expires_at_end_of_cadence?: boolean | null;
+ }
+
+ export namespace AllocationPrice {
+ /**
+ * The custom expiration for the allocation.
+ */
+ export interface CustomExpiration {
+ duration: number;
+
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanUnitPrice {
+ /**
+ * 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;
+
+ model_type: 'unit';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ unit_config: NewPlanUnitPrice.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?: NewPlanUnitPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanUnitPrice.DimensionalPriceConfiguration | 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?: NewPlanUnitPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanUnitPrice {
+ export interface UnitConfig {
+ /**
+ * Rate per unit of usage
+ */
+ unit_amount: string;
+ }
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanPackagePrice {
+ /**
+ * 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;
+
+ model_type: 'package';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ package_config: NewPlanPackagePrice.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?: NewPlanPackagePrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanPackagePrice.DimensionalPriceConfiguration | 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?: NewPlanPackagePrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanPackagePrice {
+ export interface PackageConfig {
+ /**
+ * A currency amount to rate usage by
+ */
+ package_amount: string;
+
+ /**
+ * An integer amount to represent package size. For example, 1000 here would divide
+ * usage by 1000 before multiplying by package_amount in rating
+ */
+ package_size: number;
+ }
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanMatrixPrice {
+ /**
+ * 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;
+
+ matrix_config: NewPlanMatrixPrice.MatrixConfig;
+
+ 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?: NewPlanMatrixPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanMatrixPrice.DimensionalPriceConfiguration | 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?: NewPlanMatrixPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanMatrixPrice {
+ export interface MatrixConfig {
+ /**
+ * Default per unit rate for any usage not bucketed into a specified matrix_value
+ */
+ default_unit_amount: string;
+
+ /**
+ * One or two event property values to evaluate matrix groups by
+ */
+ dimensions: Array;
+
+ /**
+ * Matrix values for specified matrix grouping keys
+ */
+ matrix_values: Array;
+ }
+
+ export namespace MatrixConfig {
+ export interface MatrixValue {
+ /**
+ * One or two matrix keys to filter usage to this Matrix value by. For example,
+ * ["region", "tier"] could be used to filter cloud usage by a cloud region and an
+ * instance tier.
+ */
+ dimension_values: Array;
+
+ /**
+ * Unit price for the specified dimension_values
+ */
+ unit_amount: string;
+ }
+ }
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanTieredPrice {
+ /**
+ * 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;
+
+ model_type: 'tiered';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ tiered_config: NewPlanTieredPrice.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?: NewPlanTieredPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanTieredPrice.DimensionalPriceConfiguration | 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?: NewPlanTieredPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanTieredPrice {
+ export interface TieredConfig {
+ /**
+ * Tiers for rating based on total usage quantities into the specified tier
+ */
+ tiers: Array;
+ }
+
+ export namespace TieredConfig {
+ export interface Tier {
+ /**
+ * Exclusive tier starting value
+ */
+ first_unit: number;
+
+ /**
+ * Amount per unit
+ */
+ unit_amount: string;
+
+ /**
+ * Inclusive tier ending value. If null, this is treated as the last tier
+ */
+ last_unit?: number | null;
+ }
+ }
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanTieredBpsPrice {
+ /**
+ * 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;
+
+ model_type: 'tiered_bps';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ tiered_bps_config: NewPlanTieredBpsPrice.TieredBpsConfig;
+
+ /**
+ * 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?: NewPlanTieredBpsPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanTieredBpsPrice.DimensionalPriceConfiguration | 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?: NewPlanTieredBpsPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanTieredBpsPrice {
+ export interface TieredBpsConfig {
+ /**
+ * Tiers for a Graduated BPS pricing model, where usage is bucketed into specified
+ * tiers
+ */
+ tiers: Array;
+ }
+
+ export namespace TieredBpsConfig {
+ export interface Tier {
+ /**
+ * Per-event basis point rate
+ */
+ bps: number;
+
+ /**
+ * Exclusive tier starting value
+ */
+ minimum_amount: string;
+
+ /**
+ * Inclusive tier ending value
+ */
+ maximum_amount?: string | null;
+
+ /**
+ * Per unit maximum to charge
+ */
+ per_unit_maximum?: string | null;
+ }
+ }
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanBpsPrice {
+ bps_config: NewPlanBpsPrice.BpsConfig;
+
+ /**
+ * 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;
+
+ model_type: 'bps';
+
+ /**
+ * 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?: NewPlanBpsPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanBpsPrice.DimensionalPriceConfiguration | 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?: NewPlanBpsPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanBpsPrice {
+ export interface BpsConfig {
+ /**
+ * Basis point take rate per event
+ */
+ bps: number;
+
+ /**
+ * Optional currency amount maximum to cap spend per event
+ */
+ per_unit_maximum?: string | null;
+ }
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanBulkBpsPrice {
+ bulk_bps_config: NewPlanBulkBpsPrice.BulkBpsConfig;
+
+ /**
+ * 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;
+
+ model_type: 'bulk_bps';
+
+ /**
+ * 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?: NewPlanBulkBpsPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanBulkBpsPrice.DimensionalPriceConfiguration | 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?: NewPlanBulkBpsPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanBulkBpsPrice {
+ export interface BulkBpsConfig {
+ /**
+ * Tiers for a bulk BPS pricing model where all usage is aggregated to a single
+ * tier based on total volume
+ */
+ tiers: Array;
+ }
+
+ export namespace BulkBpsConfig {
+ export interface Tier {
+ /**
+ * Basis points to rate on
+ */
+ bps: number;
+
+ /**
+ * Upper bound for tier
+ */
+ maximum_amount?: string | null;
+
+ /**
+ * The maximum amount to charge for any one event
+ */
+ per_unit_maximum?: string | null;
+ }
+ }
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanBulkPrice {
+ bulk_config: NewPlanBulkPrice.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;
+
+ 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?: NewPlanBulkPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanBulkPrice.DimensionalPriceConfiguration | 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?: NewPlanBulkPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanBulkPrice {
+ export interface BulkConfig {
+ /**
+ * Bulk tiers for rating based on total usage volume
+ */
+ tiers: Array;
+ }
+
+ export namespace BulkConfig {
+ export interface Tier {
+ /**
+ * Amount per unit
+ */
+ unit_amount: string;
+
+ /**
+ * Upper bound for this tier
+ */
+ maximum_units?: number | null;
+ }
+ }
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanThresholdTotalAmountPrice {
+ /**
+ * 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;
+
+ model_type: 'threshold_total_amount';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ threshold_total_amount_config: Record;
+
+ /**
+ * 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?: NewPlanThresholdTotalAmountPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanThresholdTotalAmountPrice.DimensionalPriceConfiguration | 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?: NewPlanThresholdTotalAmountPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanThresholdTotalAmountPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanTieredPackagePrice {
+ /**
+ * 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;
+
+ model_type: 'tiered_package';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ tiered_package_config: Record;
+
+ /**
+ * 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?: NewPlanTieredPackagePrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanTieredPackagePrice.DimensionalPriceConfiguration | 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?: NewPlanTieredPackagePrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanTieredPackagePrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanTieredWithMinimumPrice {
+ /**
+ * 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;
+
+ model_type: 'tiered_with_minimum';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ tiered_with_minimum_config: Record;
+
+ /**
+ * 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?: NewPlanTieredWithMinimumPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanTieredWithMinimumPrice.DimensionalPriceConfiguration | 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?: NewPlanTieredWithMinimumPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanTieredWithMinimumPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanUnitWithPercentPrice {
+ /**
+ * 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;
+
+ model_type: 'unit_with_percent';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ unit_with_percent_config: Record;
+
+ /**
+ * 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?: NewPlanUnitWithPercentPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanUnitWithPercentPrice.DimensionalPriceConfiguration | 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?: NewPlanUnitWithPercentPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanUnitWithPercentPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanPackageWithAllocationPrice {
+ /**
+ * 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;
+
+ model_type: 'package_with_allocation';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ package_with_allocation_config: Record;
+
+ /**
+ * 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?: NewPlanPackageWithAllocationPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanPackageWithAllocationPrice.DimensionalPriceConfiguration | 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?: NewPlanPackageWithAllocationPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanPackageWithAllocationPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanTierWithProrationPrice {
+ /**
+ * 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;
+
+ model_type: 'tiered_with_proration';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ tiered_with_proration_config: Record;
+
+ /**
+ * 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?: NewPlanTierWithProrationPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanTierWithProrationPrice.DimensionalPriceConfiguration | 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?: NewPlanTierWithProrationPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanTierWithProrationPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanUnitWithProrationPrice {
+ /**
+ * 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;
+
+ model_type: 'unit_with_proration';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ unit_with_proration_config: Record;
+
+ /**
+ * 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?: NewPlanUnitWithProrationPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanUnitWithProrationPrice.DimensionalPriceConfiguration | 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?: NewPlanUnitWithProrationPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanUnitWithProrationPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanGroupedAllocationPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ grouped_allocation_config: Record;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ 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?: NewPlanGroupedAllocationPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanGroupedAllocationPrice.DimensionalPriceConfiguration | 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?: NewPlanGroupedAllocationPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanGroupedAllocationPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanGroupedWithProratedMinimumPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ grouped_with_prorated_minimum_config: Record;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ 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?: NewPlanGroupedWithProratedMinimumPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanGroupedWithProratedMinimumPrice.DimensionalPriceConfiguration | 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?: NewPlanGroupedWithProratedMinimumPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanGroupedWithProratedMinimumPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanGroupedWithMeteredMinimumPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ grouped_with_metered_minimum_config: Record;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ 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?: NewPlanGroupedWithMeteredMinimumPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanGroupedWithMeteredMinimumPrice.DimensionalPriceConfiguration | 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?: NewPlanGroupedWithMeteredMinimumPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanGroupedWithMeteredMinimumPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanMatrixWithDisplayNamePrice {
+ /**
+ * 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;
+
+ matrix_with_display_name_config: Record;
+
+ 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?: NewPlanMatrixWithDisplayNamePrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanMatrixWithDisplayNamePrice.DimensionalPriceConfiguration | 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?: NewPlanMatrixWithDisplayNamePrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanMatrixWithDisplayNamePrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanBulkWithProrationPrice {
+ bulk_with_proration_config: Record;
+
+ /**
+ * 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;
+
+ 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?: NewPlanBulkWithProrationPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanBulkWithProrationPrice.DimensionalPriceConfiguration | 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?: NewPlanBulkWithProrationPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanBulkWithProrationPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanGroupedTieredPackagePrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ grouped_tiered_package_config: Record;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ 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?: NewPlanGroupedTieredPackagePrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanGroupedTieredPackagePrice.DimensionalPriceConfiguration | 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?: NewPlanGroupedTieredPackagePrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanGroupedTieredPackagePrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanMaxGroupTieredPackagePrice {
+ /**
+ * 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;
+
+ max_group_tiered_package_config: Record;
+
+ 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?: NewPlanMaxGroupTieredPackagePrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanMaxGroupTieredPackagePrice.DimensionalPriceConfiguration | 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?: NewPlanMaxGroupTieredPackagePrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanMaxGroupTieredPackagePrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanScalableMatrixWithUnitPricingPrice {
+ /**
+ * 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;
+
+ model_type: 'scalable_matrix_with_unit_pricing';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ scalable_matrix_with_unit_pricing_config: Record;
+
+ /**
+ * 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?: NewPlanScalableMatrixWithUnitPricingPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanScalableMatrixWithUnitPricingPrice.DimensionalPriceConfiguration | 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?: NewPlanScalableMatrixWithUnitPricingPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanScalableMatrixWithUnitPricingPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanScalableMatrixWithTieredPricingPrice {
+ /**
+ * 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;
+
+ model_type: 'scalable_matrix_with_tiered_pricing';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ scalable_matrix_with_tiered_pricing_config: Record;
+
+ /**
+ * 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?: NewPlanScalableMatrixWithTieredPricingPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanScalableMatrixWithTieredPricingPrice.DimensionalPriceConfiguration | 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?: NewPlanScalableMatrixWithTieredPricingPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanScalableMatrixWithTieredPricingPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanCumulativeGroupedBulkPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ cumulative_grouped_bulk_config: Record;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ 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?: NewPlanCumulativeGroupedBulkPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanCumulativeGroupedBulkPrice.DimensionalPriceConfiguration | 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?: NewPlanCumulativeGroupedBulkPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanCumulativeGroupedBulkPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanTieredPackageWithMinimumPrice {
+ /**
+ * 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;
+
+ model_type: 'tiered_package_with_minimum';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ tiered_package_with_minimum_config: Record;
+
+ /**
+ * 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?: NewPlanTieredPackageWithMinimumPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanTieredPackageWithMinimumPrice.DimensionalPriceConfiguration | 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?: NewPlanTieredPackageWithMinimumPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanTieredPackageWithMinimumPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanMatrixWithAllocationPrice {
+ /**
+ * 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;
+
+ matrix_with_allocation_config: NewPlanMatrixWithAllocationPrice.MatrixWithAllocationConfig;
+
+ 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?: NewPlanMatrixWithAllocationPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanMatrixWithAllocationPrice.DimensionalPriceConfiguration | 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?: NewPlanMatrixWithAllocationPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanMatrixWithAllocationPrice {
+ export interface MatrixWithAllocationConfig {
+ /**
+ * Allocation to be used to calculate the price
+ */
+ allocation: number;
+
+ /**
+ * Default per unit rate for any usage not bucketed into a specified matrix_value
+ */
+ default_unit_amount: string;
+
+ /**
+ * One or two event property values to evaluate matrix groups by
+ */
+ dimensions: Array;
+
+ /**
+ * Matrix values for specified matrix grouping keys
+ */
+ matrix_values: Array;
+ }
+
+ export namespace MatrixWithAllocationConfig {
+ export interface MatrixValue {
+ /**
+ * One or two matrix keys to filter usage to this Matrix value by. For example,
+ * ["region", "tier"] could be used to filter cloud usage by a cloud region and an
+ * instance tier.
+ */
+ dimension_values: Array;
+
+ /**
+ * Unit price for the specified dimension_values
+ */
+ unit_amount: string;
+ }
+ }
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanGroupedTieredPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ grouped_tiered_config: Record;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ 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?: NewPlanGroupedTieredPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanGroupedTieredPrice.DimensionalPriceConfiguration | 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?: NewPlanGroupedTieredPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanGroupedTieredPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+ }
+
+ 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:
+ | ReplaceAdjustment.NewPercentageDiscount
+ | ReplaceAdjustment.NewUsageDiscount
+ | ReplaceAdjustment.NewAmountDiscount
+ | ReplaceAdjustment.NewMinimum
+ | ReplaceAdjustment.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 namespace ReplaceAdjustment {
+ export interface NewPercentageDiscount {
+ adjustment_type: 'percentage_discount';
+
+ percentage_discount: number;
+
+ /**
+ * The set of price IDs to which this adjustment applies.
+ */
+ applies_to_price_ids?: Array | null;
+
+ /**
+ * When false, this adjustment will be applied to a single price. Otherwise, it
+ * will be applied at the invoice level, possibly to multiple prices.
+ */
+ is_invoice_level?: boolean;
+ }
+
+ export interface NewUsageDiscount {
+ adjustment_type: 'usage_discount';
+
+ usage_discount: number;
+
+ /**
+ * The set of price IDs to which this adjustment applies.
+ */
+ applies_to_price_ids?: Array | null;
+
+ /**
+ * When false, this adjustment will be applied to a single price. Otherwise, it
+ * will be applied at the invoice level, possibly to multiple prices.
+ */
+ is_invoice_level?: boolean;
+ }
+
+ export interface NewAmountDiscount {
+ adjustment_type: 'amount_discount';
+
+ amount_discount: string;
+
+ /**
+ * The set of price IDs to which this adjustment applies.
+ */
+ applies_to_price_ids?: Array | null;
+
+ /**
+ * When false, this adjustment will be applied to a single price. Otherwise, it
+ * will be applied at the invoice level, possibly to multiple prices.
+ */
+ is_invoice_level?: boolean;
+ }
+
+ export interface NewMinimum {
+ adjustment_type: 'minimum';
+
+ /**
+ * The item ID that revenue from this minimum will be attributed to.
+ */
+ item_id: string;
+
+ minimum_amount: string;
+
+ /**
+ * The set of price IDs to which this adjustment applies.
+ */
+ applies_to_price_ids?: Array | null;
+
+ /**
+ * When false, this adjustment will be applied to a single price. Otherwise, it
+ * will be applied at the invoice level, possibly to multiple prices.
+ */
+ is_invoice_level?: boolean;
+ }
+
+ export interface NewMaximum {
+ adjustment_type: 'maximum';
+
+ maximum_amount: string;
+
+ /**
+ * The set of price IDs to which this adjustment applies.
+ */
+ applies_to_price_ids?: Array | null;
+
+ /**
+ * When false, this adjustment will be applied to a single price. Otherwise, it
+ * will be applied at the invoice level, possibly to multiple prices.
+ */
+ is_invoice_level?: boolean;
+ }
+ }
+
+ 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?: ReplacePrice.AllocationPrice | null;
+
+ /**
+ * The phase to replace this price from.
+ */
+ plan_phase_order?: number | null;
+
+ /**
+ * The price to add to the plan
+ */
+ price?:
+ | ReplacePrice.NewPlanUnitPrice
+ | ReplacePrice.NewPlanPackagePrice
+ | ReplacePrice.NewPlanMatrixPrice
+ | ReplacePrice.NewPlanTieredPrice
+ | ReplacePrice.NewPlanTieredBpsPrice
+ | ReplacePrice.NewPlanBpsPrice
+ | ReplacePrice.NewPlanBulkBpsPrice
+ | ReplacePrice.NewPlanBulkPrice
+ | ReplacePrice.NewPlanThresholdTotalAmountPrice
+ | ReplacePrice.NewPlanTieredPackagePrice
+ | ReplacePrice.NewPlanTieredWithMinimumPrice
+ | ReplacePrice.NewPlanUnitWithPercentPrice
+ | ReplacePrice.NewPlanPackageWithAllocationPrice
+ | ReplacePrice.NewPlanTierWithProrationPrice
+ | ReplacePrice.NewPlanUnitWithProrationPrice
+ | ReplacePrice.NewPlanGroupedAllocationPrice
+ | ReplacePrice.NewPlanGroupedWithProratedMinimumPrice
+ | ReplacePrice.NewPlanGroupedWithMeteredMinimumPrice
+ | ReplacePrice.NewPlanMatrixWithDisplayNamePrice
+ | ReplacePrice.NewPlanBulkWithProrationPrice
+ | ReplacePrice.NewPlanGroupedTieredPackagePrice
+ | ReplacePrice.NewPlanMaxGroupTieredPackagePrice
+ | ReplacePrice.NewPlanScalableMatrixWithUnitPricingPrice
+ | ReplacePrice.NewPlanScalableMatrixWithTieredPricingPrice
+ | ReplacePrice.NewPlanCumulativeGroupedBulkPrice
+ | ReplacePrice.NewPlanTieredPackageWithMinimumPrice
+ | ReplacePrice.NewPlanMatrixWithAllocationPrice
+ | ReplacePrice.NewPlanGroupedTieredPrice
+ | null;
+ }
+
+ export namespace ReplacePrice {
+ /**
+ * The allocation price to add to the plan.
+ */
+ export interface AllocationPrice {
+ /**
+ * An amount of the currency to allocate to the customer at the specified cadence.
+ */
+ amount: string;
+
+ /**
+ * The cadence at which to allocate the amount to the customer.
+ */
+ cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
+
+ /**
+ * An ISO 4217 currency string or a custom pricing unit identifier in which to bill
+ * this price.
+ */
+ currency: string;
+
+ /**
+ * The custom expiration for the allocation.
+ */
+ custom_expiration?: AllocationPrice.CustomExpiration | null;
+
+ /**
+ * Whether the allocated amount should expire at the end of the cadence or roll
+ * over to the next period. Set to null if using custom_expiration.
+ */
+ expires_at_end_of_cadence?: boolean | null;
+ }
+
+ export namespace AllocationPrice {
+ /**
+ * The custom expiration for the allocation.
+ */
+ export interface CustomExpiration {
+ duration: number;
+
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanUnitPrice {
+ /**
+ * 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;
+
+ model_type: 'unit';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ unit_config: NewPlanUnitPrice.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?: NewPlanUnitPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanUnitPrice.DimensionalPriceConfiguration | 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?: NewPlanUnitPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanUnitPrice {
+ export interface UnitConfig {
+ /**
+ * Rate per unit of usage
+ */
+ unit_amount: string;
+ }
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanPackagePrice {
+ /**
+ * 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;
+
+ model_type: 'package';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ package_config: NewPlanPackagePrice.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?: NewPlanPackagePrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanPackagePrice.DimensionalPriceConfiguration | 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?: NewPlanPackagePrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanPackagePrice {
+ export interface PackageConfig {
+ /**
+ * A currency amount to rate usage by
+ */
+ package_amount: string;
+
+ /**
+ * An integer amount to represent package size. For example, 1000 here would divide
+ * usage by 1000 before multiplying by package_amount in rating
+ */
+ package_size: number;
+ }
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanMatrixPrice {
+ /**
+ * 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;
+
+ matrix_config: NewPlanMatrixPrice.MatrixConfig;
+
+ 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?: NewPlanMatrixPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanMatrixPrice.DimensionalPriceConfiguration | 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?: NewPlanMatrixPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanMatrixPrice {
+ export interface MatrixConfig {
+ /**
+ * Default per unit rate for any usage not bucketed into a specified matrix_value
+ */
+ default_unit_amount: string;
+
+ /**
+ * One or two event property values to evaluate matrix groups by
+ */
+ dimensions: Array;
+
+ /**
+ * Matrix values for specified matrix grouping keys
+ */
+ matrix_values: Array;
+ }
+
+ export namespace MatrixConfig {
+ export interface MatrixValue {
+ /**
+ * One or two matrix keys to filter usage to this Matrix value by. For example,
+ * ["region", "tier"] could be used to filter cloud usage by a cloud region and an
+ * instance tier.
+ */
+ dimension_values: Array;
+
+ /**
+ * Unit price for the specified dimension_values
+ */
+ unit_amount: string;
+ }
+ }
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanTieredPrice {
+ /**
+ * 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;
+
+ model_type: 'tiered';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ tiered_config: NewPlanTieredPrice.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?: NewPlanTieredPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanTieredPrice.DimensionalPriceConfiguration | 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?: NewPlanTieredPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanTieredPrice {
+ export interface TieredConfig {
+ /**
+ * Tiers for rating based on total usage quantities into the specified tier
+ */
+ tiers: Array;
+ }
+
+ export namespace TieredConfig {
+ export interface Tier {
+ /**
+ * Exclusive tier starting value
+ */
+ first_unit: number;
+
+ /**
+ * Amount per unit
+ */
+ unit_amount: string;
+
+ /**
+ * Inclusive tier ending value. If null, this is treated as the last tier
+ */
+ last_unit?: number | null;
+ }
+ }
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanTieredBpsPrice {
+ /**
+ * 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;
+
+ model_type: 'tiered_bps';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ tiered_bps_config: NewPlanTieredBpsPrice.TieredBpsConfig;
+
+ /**
+ * 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?: NewPlanTieredBpsPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanTieredBpsPrice.DimensionalPriceConfiguration | 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?: NewPlanTieredBpsPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanTieredBpsPrice {
+ export interface TieredBpsConfig {
+ /**
+ * Tiers for a Graduated BPS pricing model, where usage is bucketed into specified
+ * tiers
+ */
+ tiers: Array;
+ }
+
+ export namespace TieredBpsConfig {
+ export interface Tier {
+ /**
+ * Per-event basis point rate
+ */
+ bps: number;
+
+ /**
+ * Exclusive tier starting value
+ */
+ minimum_amount: string;
+
+ /**
+ * Inclusive tier ending value
+ */
+ maximum_amount?: string | null;
+
+ /**
+ * Per unit maximum to charge
+ */
+ per_unit_maximum?: string | null;
+ }
+ }
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanBpsPrice {
+ bps_config: NewPlanBpsPrice.BpsConfig;
+
+ /**
+ * 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;
+
+ model_type: 'bps';
+
+ /**
+ * 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?: NewPlanBpsPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanBpsPrice.DimensionalPriceConfiguration | 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?: NewPlanBpsPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanBpsPrice {
+ export interface BpsConfig {
+ /**
+ * Basis point take rate per event
+ */
+ bps: number;
+
+ /**
+ * Optional currency amount maximum to cap spend per event
+ */
+ per_unit_maximum?: string | null;
+ }
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanBulkBpsPrice {
+ bulk_bps_config: NewPlanBulkBpsPrice.BulkBpsConfig;
+
+ /**
+ * 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;
+
+ model_type: 'bulk_bps';
+
+ /**
+ * 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?: NewPlanBulkBpsPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanBulkBpsPrice.DimensionalPriceConfiguration | 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?: NewPlanBulkBpsPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanBulkBpsPrice {
+ export interface BulkBpsConfig {
+ /**
+ * Tiers for a bulk BPS pricing model where all usage is aggregated to a single
+ * tier based on total volume
+ */
+ tiers: Array;
+ }
+
+ export namespace BulkBpsConfig {
+ export interface Tier {
+ /**
+ * Basis points to rate on
+ */
+ bps: number;
+
+ /**
+ * Upper bound for tier
+ */
+ maximum_amount?: string | null;
+
+ /**
+ * The maximum amount to charge for any one event
+ */
+ per_unit_maximum?: string | null;
+ }
+ }
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanBulkPrice {
+ bulk_config: NewPlanBulkPrice.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;
+
+ 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?: NewPlanBulkPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanBulkPrice.DimensionalPriceConfiguration | 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?: NewPlanBulkPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanBulkPrice {
+ export interface BulkConfig {
+ /**
+ * Bulk tiers for rating based on total usage volume
+ */
+ tiers: Array;
+ }
+
+ export namespace BulkConfig {
+ export interface Tier {
+ /**
+ * Amount per unit
+ */
+ unit_amount: string;
+
+ /**
+ * Upper bound for this tier
+ */
+ maximum_units?: number | null;
+ }
+ }
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanThresholdTotalAmountPrice {
+ /**
+ * 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;
+
+ model_type: 'threshold_total_amount';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ threshold_total_amount_config: Record;
+
+ /**
+ * 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?: NewPlanThresholdTotalAmountPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanThresholdTotalAmountPrice.DimensionalPriceConfiguration | 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?: NewPlanThresholdTotalAmountPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanThresholdTotalAmountPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanTieredPackagePrice {
+ /**
+ * 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;
+
+ model_type: 'tiered_package';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ tiered_package_config: Record;
+
+ /**
+ * 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?: NewPlanTieredPackagePrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanTieredPackagePrice.DimensionalPriceConfiguration | 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?: NewPlanTieredPackagePrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanTieredPackagePrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanTieredWithMinimumPrice {
+ /**
+ * 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;
+
+ model_type: 'tiered_with_minimum';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ tiered_with_minimum_config: Record;
+
+ /**
+ * 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?: NewPlanTieredWithMinimumPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanTieredWithMinimumPrice.DimensionalPriceConfiguration | 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?: NewPlanTieredWithMinimumPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanTieredWithMinimumPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanUnitWithPercentPrice {
+ /**
+ * 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;
+
+ model_type: 'unit_with_percent';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ unit_with_percent_config: Record;
+
+ /**
+ * 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?: NewPlanUnitWithPercentPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanUnitWithPercentPrice.DimensionalPriceConfiguration | 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?: NewPlanUnitWithPercentPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanUnitWithPercentPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanPackageWithAllocationPrice {
+ /**
+ * 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;
+
+ model_type: 'package_with_allocation';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ package_with_allocation_config: Record;
+
+ /**
+ * 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?: NewPlanPackageWithAllocationPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanPackageWithAllocationPrice.DimensionalPriceConfiguration | 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?: NewPlanPackageWithAllocationPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanPackageWithAllocationPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanTierWithProrationPrice {
+ /**
+ * 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;
+
+ model_type: 'tiered_with_proration';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ tiered_with_proration_config: Record;
+
+ /**
+ * 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?: NewPlanTierWithProrationPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanTierWithProrationPrice.DimensionalPriceConfiguration | 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?: NewPlanTierWithProrationPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanTierWithProrationPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanUnitWithProrationPrice {
+ /**
+ * 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;
+
+ model_type: 'unit_with_proration';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ unit_with_proration_config: Record;
+
+ /**
+ * 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?: NewPlanUnitWithProrationPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanUnitWithProrationPrice.DimensionalPriceConfiguration | 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?: NewPlanUnitWithProrationPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanUnitWithProrationPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanGroupedAllocationPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ grouped_allocation_config: Record;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ 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?: NewPlanGroupedAllocationPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanGroupedAllocationPrice.DimensionalPriceConfiguration | 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?: NewPlanGroupedAllocationPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanGroupedAllocationPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanGroupedWithProratedMinimumPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ grouped_with_prorated_minimum_config: Record;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ 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?: NewPlanGroupedWithProratedMinimumPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanGroupedWithProratedMinimumPrice.DimensionalPriceConfiguration | 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?: NewPlanGroupedWithProratedMinimumPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanGroupedWithProratedMinimumPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanGroupedWithMeteredMinimumPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ grouped_with_metered_minimum_config: Record;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ 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?: NewPlanGroupedWithMeteredMinimumPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanGroupedWithMeteredMinimumPrice.DimensionalPriceConfiguration | 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?: NewPlanGroupedWithMeteredMinimumPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanGroupedWithMeteredMinimumPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanMatrixWithDisplayNamePrice {
+ /**
+ * 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;
+
+ matrix_with_display_name_config: Record;
+
+ 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?: NewPlanMatrixWithDisplayNamePrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanMatrixWithDisplayNamePrice.DimensionalPriceConfiguration | 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?: NewPlanMatrixWithDisplayNamePrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanMatrixWithDisplayNamePrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanBulkWithProrationPrice {
+ bulk_with_proration_config: Record;
+
+ /**
+ * 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;
+
+ 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?: NewPlanBulkWithProrationPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanBulkWithProrationPrice.DimensionalPriceConfiguration | 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?: NewPlanBulkWithProrationPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanBulkWithProrationPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanGroupedTieredPackagePrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ grouped_tiered_package_config: Record;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ 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?: NewPlanGroupedTieredPackagePrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanGroupedTieredPackagePrice.DimensionalPriceConfiguration | 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?: NewPlanGroupedTieredPackagePrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanGroupedTieredPackagePrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanMaxGroupTieredPackagePrice {
+ /**
+ * 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;
+
+ max_group_tiered_package_config: Record;
+
+ 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?: NewPlanMaxGroupTieredPackagePrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanMaxGroupTieredPackagePrice.DimensionalPriceConfiguration | 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?: NewPlanMaxGroupTieredPackagePrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanMaxGroupTieredPackagePrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanScalableMatrixWithUnitPricingPrice {
+ /**
+ * 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;
+
+ model_type: 'scalable_matrix_with_unit_pricing';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ scalable_matrix_with_unit_pricing_config: Record;
+
+ /**
+ * 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?: NewPlanScalableMatrixWithUnitPricingPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanScalableMatrixWithUnitPricingPrice.DimensionalPriceConfiguration | 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?: NewPlanScalableMatrixWithUnitPricingPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanScalableMatrixWithUnitPricingPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanScalableMatrixWithTieredPricingPrice {
+ /**
+ * 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;
+
+ model_type: 'scalable_matrix_with_tiered_pricing';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ scalable_matrix_with_tiered_pricing_config: Record;
+
+ /**
+ * 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?: NewPlanScalableMatrixWithTieredPricingPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanScalableMatrixWithTieredPricingPrice.DimensionalPriceConfiguration | 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?: NewPlanScalableMatrixWithTieredPricingPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanScalableMatrixWithTieredPricingPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanCumulativeGroupedBulkPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ cumulative_grouped_bulk_config: Record;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ 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?: NewPlanCumulativeGroupedBulkPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanCumulativeGroupedBulkPrice.DimensionalPriceConfiguration | 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?: NewPlanCumulativeGroupedBulkPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanCumulativeGroupedBulkPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanTieredPackageWithMinimumPrice {
+ /**
+ * 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;
+
+ model_type: 'tiered_package_with_minimum';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ tiered_package_with_minimum_config: Record;
+
+ /**
+ * 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?: NewPlanTieredPackageWithMinimumPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanTieredPackageWithMinimumPrice.DimensionalPriceConfiguration | 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?: NewPlanTieredPackageWithMinimumPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanTieredPackageWithMinimumPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanMatrixWithAllocationPrice {
+ /**
+ * 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;
+
+ matrix_with_allocation_config: NewPlanMatrixWithAllocationPrice.MatrixWithAllocationConfig;
+
+ 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?: NewPlanMatrixWithAllocationPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanMatrixWithAllocationPrice.DimensionalPriceConfiguration | 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?: NewPlanMatrixWithAllocationPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanMatrixWithAllocationPrice {
+ export interface MatrixWithAllocationConfig {
+ /**
+ * Allocation to be used to calculate the price
+ */
+ allocation: number;
+
+ /**
+ * Default per unit rate for any usage not bucketed into a specified matrix_value
+ */
+ default_unit_amount: string;
+
+ /**
+ * One or two event property values to evaluate matrix groups by
+ */
+ dimensions: Array;
+
+ /**
+ * Matrix values for specified matrix grouping keys
+ */
+ matrix_values: Array;
+ }
+
+ export namespace MatrixWithAllocationConfig {
+ export interface MatrixValue {
+ /**
+ * One or two matrix keys to filter usage to this Matrix value by. For example,
+ * ["region", "tier"] could be used to filter cloud usage by a cloud region and an
+ * instance tier.
+ */
+ dimension_values: Array;
+
+ /**
+ * Unit price for the specified dimension_values
+ */
+ unit_amount: string;
+ }
+ }
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanGroupedTieredPrice {
+ /**
+ * The cadence to bill for this price on.
+ */
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+
+ grouped_tiered_config: Record;
+
+ /**
+ * The id of the item the price will be associated with.
+ */
+ item_id: string;
+
+ 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?: NewPlanGroupedTieredPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanGroupedTieredPrice.DimensionalPriceConfiguration | 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?: NewPlanGroupedTieredPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanGroupedTieredPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+ }
+}
+
+export interface BetaSetDefaultPlanVersionParams {
+ /**
+ * Plan version to set as the default.
+ */
+ version: number;
+}
+
+Beta.ExternalPlanID = ExternalPlanID;
+
+export declare namespace Beta {
+ export {
+ type PlanVersion as PlanVersion,
+ type PlanVersionPhase as PlanVersionPhase,
+ type BetaCreatePlanVersionParams as BetaCreatePlanVersionParams,
+ type BetaSetDefaultPlanVersionParams as BetaSetDefaultPlanVersionParams,
+ };
+
+ export {
+ ExternalPlanID as ExternalPlanID,
+ type ExternalPlanIDCreatePlanVersionParams as ExternalPlanIDCreatePlanVersionParams,
+ type ExternalPlanIDSetDefaultPlanVersionParams as ExternalPlanIDSetDefaultPlanVersionParams,
+ };
+}
diff --git a/src/resources/beta/external-plan-id.ts b/src/resources/beta/external-plan-id.ts
new file mode 100644
index 00000000..9bd9e353
--- /dev/null
+++ b/src/resources/beta/external-plan-id.ts
@@ -0,0 +1,8748 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../../resource';
+import * as Core from '../../core';
+import * as BetaAPI from './beta';
+import * as PlansAPI from '../plans/plans';
+
+export class ExternalPlanID extends APIResource {
+ /**
+ * This API endpoint is in beta and its interface may change. It is recommended for
+ * use only in test mode.
+ *
+ * This endpoint allows the creation of a new plan version for an existing plan.
+ */
+ createPlanVersion(
+ externalPlanId: string,
+ body: ExternalPlanIDCreatePlanVersionParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ return this._client.post(`/plans/external_plan_id/${externalPlanId}/versions`, { body, ...options });
+ }
+
+ /**
+ * This API endpoint is in beta and its interface may change. It is recommended for
+ * use only in test mode.
+ *
+ * This endpoint is used to fetch a plan version. It returns the phases, prices,
+ * and adjustments present on this version of the plan.
+ */
+ fetchPlanVersion(
+ externalPlanId: string,
+ version: string,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ return this._client.get(`/plans/external_plan_id/${externalPlanId}/versions/${version}`, options);
+ }
+
+ /**
+ * This API endpoint is in beta and its interface may change. It is recommended for
+ * use only in test mode.
+ *
+ * This endpoint allows setting the default version of a plan.
+ */
+ setDefaultPlanVersion(
+ externalPlanId: string,
+ body: ExternalPlanIDSetDefaultPlanVersionParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ return this._client.post(`/plans/external_plan_id/${externalPlanId}/set_default_version`, {
+ body,
+ ...options,
+ });
+ }
+}
+
+export interface ExternalPlanIDCreatePlanVersionParams {
+ /**
+ * New version number.
+ */
+ version: number;
+
+ /**
+ * Additional adjustments to be added to the plan.
+ */
+ add_adjustments?: Array | null;
+
+ /**
+ * Additional prices to be added to the plan.
+ */
+ add_prices?: Array | null;
+
+ /**
+ * Adjustments to be removed from the plan.
+ */
+ remove_adjustments?: Array | null;
+
+ /**
+ * Prices to be removed from the plan.
+ */
+ remove_prices?: Array | null;
+
+ /**
+ * Adjustments to be replaced with additional adjustments on the plan.
+ */
+ replace_adjustments?: Array | null;
+
+ /**
+ * Prices to be replaced with additional prices on the plan.
+ */
+ replace_prices?: Array | null;
+
+ /**
+ * Set this new plan version as the default
+ */
+ set_as_default?: boolean | null;
+}
+
+export namespace ExternalPlanIDCreatePlanVersionParams {
+ export interface AddAdjustment {
+ /**
+ * The definition of a new adjustment to create and add to the plan.
+ */
+ adjustment:
+ | AddAdjustment.NewPercentageDiscount
+ | AddAdjustment.NewUsageDiscount
+ | AddAdjustment.NewAmountDiscount
+ | AddAdjustment.NewMinimum
+ | AddAdjustment.NewMaximum;
+
+ /**
+ * The phase to add this adjustment to.
+ */
+ plan_phase_order?: number | null;
+ }
+
+ export namespace AddAdjustment {
+ export interface NewPercentageDiscount {
+ adjustment_type: 'percentage_discount';
+
+ percentage_discount: number;
+
+ /**
+ * The set of price IDs to which this adjustment applies.
+ */
+ applies_to_price_ids?: Array | null;
+
+ /**
+ * When false, this adjustment will be applied to a single price. Otherwise, it
+ * will be applied at the invoice level, possibly to multiple prices.
+ */
+ is_invoice_level?: boolean;
+ }
+
+ export interface NewUsageDiscount {
+ adjustment_type: 'usage_discount';
+
+ usage_discount: number;
+
+ /**
+ * The set of price IDs to which this adjustment applies.
+ */
+ applies_to_price_ids?: Array | null;
+
+ /**
+ * When false, this adjustment will be applied to a single price. Otherwise, it
+ * will be applied at the invoice level, possibly to multiple prices.
+ */
+ is_invoice_level?: boolean;
+ }
+
+ export interface NewAmountDiscount {
+ adjustment_type: 'amount_discount';
+
+ amount_discount: string;
+
+ /**
+ * The set of price IDs to which this adjustment applies.
+ */
+ applies_to_price_ids?: Array | null;
+
+ /**
+ * When false, this adjustment will be applied to a single price. Otherwise, it
+ * will be applied at the invoice level, possibly to multiple prices.
+ */
+ is_invoice_level?: boolean;
+ }
+
+ export interface NewMinimum {
+ adjustment_type: 'minimum';
+
+ /**
+ * The item ID that revenue from this minimum will be attributed to.
+ */
+ item_id: string;
+
+ minimum_amount: string;
+
+ /**
+ * The set of price IDs to which this adjustment applies.
+ */
+ applies_to_price_ids?: Array | null;
+
+ /**
+ * When false, this adjustment will be applied to a single price. Otherwise, it
+ * will be applied at the invoice level, possibly to multiple prices.
+ */
+ is_invoice_level?: boolean;
+ }
+
+ export interface NewMaximum {
+ adjustment_type: 'maximum';
+
+ maximum_amount: string;
+
+ /**
+ * The set of price IDs to which this adjustment applies.
+ */
+ applies_to_price_ids?: Array | null;
+
+ /**
+ * When false, this adjustment will be applied to a single price. Otherwise, it
+ * will be applied at the invoice level, possibly to multiple prices.
+ */
+ is_invoice_level?: boolean;
+ }
+ }
+
+ export interface AddPrice {
+ /**
+ * The allocation price to add to the plan.
+ */
+ allocation_price?: AddPrice.AllocationPrice | null;
+
+ /**
+ * The phase to add this price to.
+ */
+ plan_phase_order?: number | null;
+
+ /**
+ * The price to add to the plan
+ */
+ price?:
+ | AddPrice.NewPlanUnitPrice
+ | AddPrice.NewPlanPackagePrice
+ | AddPrice.NewPlanMatrixPrice
+ | AddPrice.NewPlanTieredPrice
+ | AddPrice.NewPlanTieredBpsPrice
+ | AddPrice.NewPlanBpsPrice
+ | AddPrice.NewPlanBulkBpsPrice
+ | AddPrice.NewPlanBulkPrice
+ | AddPrice.NewPlanThresholdTotalAmountPrice
+ | AddPrice.NewPlanTieredPackagePrice
+ | AddPrice.NewPlanTieredWithMinimumPrice
+ | AddPrice.NewPlanUnitWithPercentPrice
+ | AddPrice.NewPlanPackageWithAllocationPrice
+ | AddPrice.NewPlanTierWithProrationPrice
+ | AddPrice.NewPlanUnitWithProrationPrice
+ | AddPrice.NewPlanGroupedAllocationPrice
+ | AddPrice.NewPlanGroupedWithProratedMinimumPrice
+ | AddPrice.NewPlanGroupedWithMeteredMinimumPrice
+ | AddPrice.NewPlanMatrixWithDisplayNamePrice
+ | AddPrice.NewPlanBulkWithProrationPrice
+ | AddPrice.NewPlanGroupedTieredPackagePrice
+ | AddPrice.NewPlanMaxGroupTieredPackagePrice
+ | AddPrice.NewPlanScalableMatrixWithUnitPricingPrice
+ | AddPrice.NewPlanScalableMatrixWithTieredPricingPrice
+ | AddPrice.NewPlanCumulativeGroupedBulkPrice
+ | AddPrice.NewPlanTieredPackageWithMinimumPrice
+ | AddPrice.NewPlanMatrixWithAllocationPrice
+ | AddPrice.NewPlanGroupedTieredPrice
+ | null;
+ }
+
+ export namespace AddPrice {
+ /**
+ * The allocation price to add to the plan.
+ */
+ export interface AllocationPrice {
+ /**
+ * An amount of the currency to allocate to the customer at the specified cadence.
+ */
+ amount: string;
+
+ /**
+ * The cadence at which to allocate the amount to the customer.
+ */
+ cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
+
+ /**
+ * An ISO 4217 currency string or a custom pricing unit identifier in which to bill
+ * this price.
+ */
+ currency: string;
+
+ /**
+ * The custom expiration for the allocation.
+ */
+ custom_expiration?: AllocationPrice.CustomExpiration | null;
+
+ /**
+ * Whether the allocated amount should expire at the end of the cadence or roll
+ * over to the next period. Set to null if using custom_expiration.
+ */
+ expires_at_end_of_cadence?: boolean | null;
+ }
+
+ export namespace AllocationPrice {
+ /**
+ * The custom expiration for the allocation.
+ */
+ export interface CustomExpiration {
+ duration: number;
+
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanUnitPrice {
+ /**
+ * 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;
+
+ model_type: 'unit';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ unit_config: NewPlanUnitPrice.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?: NewPlanUnitPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanUnitPrice.DimensionalPriceConfiguration | 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?: NewPlanUnitPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanUnitPrice {
+ export interface UnitConfig {
+ /**
+ * Rate per unit of usage
+ */
+ unit_amount: string;
+ }
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanPackagePrice {
+ /**
+ * 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;
+
+ model_type: 'package';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ package_config: NewPlanPackagePrice.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?: NewPlanPackagePrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanPackagePrice.DimensionalPriceConfiguration | 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?: NewPlanPackagePrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanPackagePrice {
+ export interface PackageConfig {
+ /**
+ * A currency amount to rate usage by
+ */
+ package_amount: string;
+
+ /**
+ * An integer amount to represent package size. For example, 1000 here would divide
+ * usage by 1000 before multiplying by package_amount in rating
+ */
+ package_size: number;
+ }
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanMatrixPrice {
+ /**
+ * 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;
+
+ matrix_config: NewPlanMatrixPrice.MatrixConfig;
+
+ 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?: NewPlanMatrixPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanMatrixPrice.DimensionalPriceConfiguration | 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?: NewPlanMatrixPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanMatrixPrice {
+ export interface MatrixConfig {
+ /**
+ * Default per unit rate for any usage not bucketed into a specified matrix_value
+ */
+ default_unit_amount: string;
+
+ /**
+ * One or two event property values to evaluate matrix groups by
+ */
+ dimensions: Array;
+
+ /**
+ * Matrix values for specified matrix grouping keys
+ */
+ matrix_values: Array;
+ }
+
+ export namespace MatrixConfig {
+ export interface MatrixValue {
+ /**
+ * One or two matrix keys to filter usage to this Matrix value by. For example,
+ * ["region", "tier"] could be used to filter cloud usage by a cloud region and an
+ * instance tier.
+ */
+ dimension_values: Array;
+
+ /**
+ * Unit price for the specified dimension_values
+ */
+ unit_amount: string;
+ }
+ }
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanTieredPrice {
+ /**
+ * 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;
+
+ model_type: 'tiered';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ tiered_config: NewPlanTieredPrice.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?: NewPlanTieredPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanTieredPrice.DimensionalPriceConfiguration | 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?: NewPlanTieredPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanTieredPrice {
+ export interface TieredConfig {
+ /**
+ * Tiers for rating based on total usage quantities into the specified tier
+ */
+ tiers: Array;
+ }
+
+ export namespace TieredConfig {
+ export interface Tier {
+ /**
+ * Exclusive tier starting value
+ */
+ first_unit: number;
+
+ /**
+ * Amount per unit
+ */
+ unit_amount: string;
+
+ /**
+ * Inclusive tier ending value. If null, this is treated as the last tier
+ */
+ last_unit?: number | null;
+ }
+ }
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanTieredBpsPrice {
+ /**
+ * 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;
+
+ model_type: 'tiered_bps';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ tiered_bps_config: NewPlanTieredBpsPrice.TieredBpsConfig;
+
+ /**
+ * 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?: NewPlanTieredBpsPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanTieredBpsPrice.DimensionalPriceConfiguration | 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?: NewPlanTieredBpsPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanTieredBpsPrice {
+ export interface TieredBpsConfig {
+ /**
+ * Tiers for a Graduated BPS pricing model, where usage is bucketed into specified
+ * tiers
+ */
+ tiers: Array;
+ }
+
+ export namespace TieredBpsConfig {
+ export interface Tier {
+ /**
+ * Per-event basis point rate
+ */
+ bps: number;
+
+ /**
+ * Exclusive tier starting value
+ */
+ minimum_amount: string;
+
+ /**
+ * Inclusive tier ending value
+ */
+ maximum_amount?: string | null;
+
+ /**
+ * Per unit maximum to charge
+ */
+ per_unit_maximum?: string | null;
+ }
+ }
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanBpsPrice {
+ bps_config: NewPlanBpsPrice.BpsConfig;
+
+ /**
+ * 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;
+
+ model_type: 'bps';
+
+ /**
+ * 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?: NewPlanBpsPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanBpsPrice.DimensionalPriceConfiguration | 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?: NewPlanBpsPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanBpsPrice {
+ export interface BpsConfig {
+ /**
+ * Basis point take rate per event
+ */
+ bps: number;
+
+ /**
+ * Optional currency amount maximum to cap spend per event
+ */
+ per_unit_maximum?: string | null;
+ }
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanBulkBpsPrice {
+ bulk_bps_config: NewPlanBulkBpsPrice.BulkBpsConfig;
+
+ /**
+ * 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;
+
+ model_type: 'bulk_bps';
+
+ /**
+ * 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?: NewPlanBulkBpsPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanBulkBpsPrice.DimensionalPriceConfiguration | 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?: NewPlanBulkBpsPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanBulkBpsPrice {
+ export interface BulkBpsConfig {
+ /**
+ * Tiers for a bulk BPS pricing model where all usage is aggregated to a single
+ * tier based on total volume
+ */
+ tiers: Array;
+ }
+
+ export namespace BulkBpsConfig {
+ export interface Tier {
+ /**
+ * Basis points to rate on
+ */
+ bps: number;
+
+ /**
+ * Upper bound for tier
+ */
+ maximum_amount?: string | null;
+
+ /**
+ * The maximum amount to charge for any one event
+ */
+ per_unit_maximum?: string | null;
+ }
+ }
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanBulkPrice {
+ bulk_config: NewPlanBulkPrice.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;
+
+ 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?: NewPlanBulkPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanBulkPrice.DimensionalPriceConfiguration | 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?: NewPlanBulkPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanBulkPrice {
+ export interface BulkConfig {
+ /**
+ * Bulk tiers for rating based on total usage volume
+ */
+ tiers: Array;
+ }
+
+ export namespace BulkConfig {
+ export interface Tier {
+ /**
+ * Amount per unit
+ */
+ unit_amount: string;
+
+ /**
+ * Upper bound for this tier
+ */
+ maximum_units?: number | null;
+ }
+ }
+
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanThresholdTotalAmountPrice {
+ /**
+ * 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;
+
+ model_type: 'threshold_total_amount';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ threshold_total_amount_config: Record;
+
+ /**
+ * 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?: NewPlanThresholdTotalAmountPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanThresholdTotalAmountPrice.DimensionalPriceConfiguration | 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?: NewPlanThresholdTotalAmountPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanThresholdTotalAmountPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanTieredPackagePrice {
+ /**
+ * 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;
+
+ model_type: 'tiered_package';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ tiered_package_config: Record;
+
+ /**
+ * 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?: NewPlanTieredPackagePrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanTieredPackagePrice.DimensionalPriceConfiguration | 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?: NewPlanTieredPackagePrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanTieredPackagePrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanTieredWithMinimumPrice {
+ /**
+ * 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;
+
+ model_type: 'tiered_with_minimum';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ tiered_with_minimum_config: Record;
+
+ /**
+ * 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?: NewPlanTieredWithMinimumPrice.BillingCycleConfiguration | null;
+
+ /**
+ * The per unit conversion rate of the price currency to the invoicing currency.
+ */
+ conversion_rate?: number | 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?: NewPlanTieredWithMinimumPrice.DimensionalPriceConfiguration | 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?: NewPlanTieredWithMinimumPrice.InvoicingCycleConfiguration | 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?: Record | null;
+ }
+
+ export namespace NewPlanTieredWithMinimumPrice {
+ /**
+ * For custom cadence: specifies the duration of the billing period in days or
+ * months.
+ */
+ export interface BillingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+
+ /**
+ * For dimensional price: specifies a price group and dimension values
+ */
+ export interface DimensionalPriceConfiguration {
+ /**
+ * The list of dimension values matching (in order) the dimensions of the price
+ * group
+ */
+ dimension_values: Array;
+
+ /**
+ * The id of the dimensional price group to include this price in
+ */
+ dimensional_price_group_id?: string | null;
+
+ /**
+ * The external id of the dimensional price group to include this price in
+ */
+ external_dimensional_price_group_id?: string | null;
+ }
+
+ /**
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
+ * If unspecified, a single invoice is produced per billing cycle.
+ */
+ export interface InvoicingCycleConfiguration {
+ /**
+ * The duration of the billing period.
+ */
+ duration: number;
+
+ /**
+ * The unit of billing period duration.
+ */
+ duration_unit: 'day' | 'month';
+ }
+ }
+
+ export interface NewPlanUnitWithPercentPrice {
+ /**
+ * 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;
+
+ model_type: 'unit_with_percent';
+
+ /**
+ * The name of the price.
+ */
+ name: string;
+
+ unit_with_percent_config: Record