diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 8edd9c22..32dbe0e2 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "4.74.0"
+ ".": "5.0.0"
}
diff --git a/.stats.yml b/.stats.yml
index 1265d475..645b4c0b 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 115
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-d513be954ba2cb57489bd048f93790cabb13849f0f04d328a5a15694c99550df.yml
-openapi_spec_hash: 0d42694f412abf65defc3f88646a809c
-config_hash: 1e2186b09e57d7d27b6ab5c8e6410b31
+configured_endpoints: 116
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-c2a4808c828c8288c5c8dfe2fdfa51d4d7c1bcc33cacc6b859d0cf4b35ce95cc.yml
+openapi_spec_hash: a2b5a1bfabbd03dd1b411791576eb502
+config_hash: 3c3524be9607afb24d2139ce26ce5389
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fa25db07..a3021d0e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,28 @@
# Changelog
+## 5.0.0 (2025-06-09)
+
+Full Changelog: [v4.74.0...v5.0.0](https://github.com/orbcorp/orb-node/compare/v4.74.0...v5.0.0)
+
+### ⚠ BREAKING CHANGES
+
+* **client:** breaking change to re-use types
+
+### Features
+
+* **api:** api update ([f568653](https://github.com/orbcorp/orb-node/commit/f5686531660890c996aed2bcd3fbfdbf6ba71013))
+* **api:** api update ([4c28249](https://github.com/orbcorp/orb-node/commit/4c28249f71e8a9aa3d75ac9a448ebb6f70301af2))
+* **api:** api update ([9dc5bb3](https://github.com/orbcorp/orb-node/commit/9dc5bb3e4d0e2005691b3a886591a317bd84a60a))
+* **api:** api update ([9328fae](https://github.com/orbcorp/orb-node/commit/9328faed43114dfe9f4fead3e6da314f6e626d33))
+* **api:** api update ([44e9c35](https://github.com/orbcorp/orb-node/commit/44e9c35fb3b805cccb264647d7686fa00dd2a71b))
+* **api:** manual updates ([8cc1c0b](https://github.com/orbcorp/orb-node/commit/8cc1c0bfb17d0ec2537e9470340a7926df177a28))
+* **client:** breaking change to re-use types ([17a06ae](https://github.com/orbcorp/orb-node/commit/17a06aea5f1edb125fb033156a8eb76c6510cd76))
+
+
+### Chores
+
+* **internal:** codegen related update ([89ce8ec](https://github.com/orbcorp/orb-node/commit/89ce8ecf96b39394f17eb8b7735cc710d0e50cc4))
+
## 4.74.0 (2025-06-03)
Full Changelog: [v4.73.0...v4.74.0](https://github.com/orbcorp/orb-node/compare/v4.73.0...v4.74.0)
diff --git a/api.md b/api.md
index 3fb22988..e293b0dc 100644
--- a/api.md
+++ b/api.md
@@ -2,15 +2,148 @@
Types:
+- Address
+- AdjustmentInterval
+- AggregatedCost
+- Allocation
- AmountDiscount
+- AmountDiscountInterval
+- BillableMetricTiny
+- BillingCycleAnchorConfiguration
+- BillingCycleConfiguration
- BillingCycleRelativeDate
+- BPSConfig
+- BPSTier
+- BulkBPSConfig
+- BulkBPSTier
+- BulkConfig
+- BulkTier
+- ChangedSubscriptionResources
+- ConversionRateTier
+- ConversionRateTieredConfig
+- ConversionRateUnitConfig
+- CouponRedemption
+- CreditNote
+- CreditNoteTiny
+- CustomExpiration
+- CustomerMinified
+- CustomerTaxID
+- DimensionalPriceConfiguration
- Discount
+- FixedFeeQuantityScheduleEntry
+- FixedFeeQuantityTransition
+- Invoice
- InvoiceLevelDiscount
+- InvoiceTiny
+- ItemSlim
+- MatrixConfig
+- MatrixSubLineItem
+- MatrixValue
+- MatrixWithAllocationConfig
+- Maximum
+- MaximumInterval
+- Minimum
+- MinimumInterval
+- MonetaryAmountDiscountAdjustment
+- MonetaryMaximumAdjustment
+- MonetaryMinimumAdjustment
+- MonetaryPercentageDiscountAdjustment
+- MonetaryUsageDiscountAdjustment
+- NewAllocationPrice
+- NewAmountDiscount
+- NewBillingCycleConfiguration
+- NewDimensionalPriceConfiguration
+- NewFloatingBPSPrice
+- NewFloatingBulkBPSPrice
+- NewFloatingBulkPrice
+- NewFloatingBulkWithProrationPrice
+- NewFloatingCumulativeGroupedBulkPrice
+- NewFloatingGroupedAllocationPrice
+- NewFloatingGroupedTieredPackagePrice
+- NewFloatingGroupedTieredPrice
+- NewFloatingGroupedWithMeteredMinimumPrice
+- NewFloatingGroupedWithProratedMinimumPrice
+- NewFloatingMatrixPrice
+- NewFloatingMatrixWithAllocationPrice
+- NewFloatingMatrixWithDisplayNamePrice
+- NewFloatingMaxGroupTieredPackagePrice
+- NewFloatingPackagePrice
+- NewFloatingPackageWithAllocationPrice
+- NewFloatingScalableMatrixWithTieredPricingPrice
+- NewFloatingScalableMatrixWithUnitPricingPrice
+- NewFloatingThresholdTotalAmountPrice
+- NewFloatingTieredBPSPrice
+- NewFloatingTieredPackagePrice
+- NewFloatingTieredPackageWithMinimumPrice
+- NewFloatingTieredPrice
+- NewFloatingTieredWithMinimumPrice
+- NewFloatingTieredWithProrationPrice
+- NewFloatingUnitPrice
+- NewFloatingUnitWithPercentPrice
+- NewFloatingUnitWithProrationPrice
+- NewMaximum
+- NewMinimum
+- NewPercentageDiscount
+- NewPlanBPSPrice
+- NewPlanBulkBPSPrice
+- NewPlanBulkPrice
+- NewPlanBulkWithProrationPrice
+- NewPlanCumulativeGroupedBulkPrice
+- NewPlanGroupedAllocationPrice
+- NewPlanGroupedTieredPackagePrice
+- NewPlanGroupedTieredPrice
+- NewPlanGroupedWithMeteredMinimumPrice
+- NewPlanGroupedWithProratedMinimumPrice
+- NewPlanMatrixPrice
+- NewPlanMatrixWithAllocationPrice
+- NewPlanMatrixWithDisplayNamePrice
+- NewPlanMaxGroupTieredPackagePrice
+- NewPlanPackagePrice
+- NewPlanPackageWithAllocationPrice
+- NewPlanScalableMatrixWithTieredPricingPrice
+- NewPlanScalableMatrixWithUnitPricingPrice
+- NewPlanThresholdTotalAmountPrice
+- NewPlanTierWithProrationPrice
+- NewPlanTieredBPSPrice
+- NewPlanTieredPackagePrice
+- NewPlanTieredPackageWithMinimumPrice
+- NewPlanTieredPrice
+- NewPlanTieredWithMinimumPrice
+- NewPlanUnitPrice
+- NewPlanUnitWithPercentPrice
+- NewPlanUnitWithProrationPrice
+- NewUsageDiscount
+- OtherSubLineItem
+- PackageConfig
- PaginationMetadata
+- PerPriceCost
- PercentageDiscount
+- PercentageDiscountInterval
+- PlanPhaseAmountDiscountAdjustment
+- PlanPhaseMaximumAdjustment
+- PlanPhaseMinimumAdjustment
+- PlanPhasePercentageDiscountAdjustment
+- PlanPhaseUsageDiscountAdjustment
+- Price
+- PriceInterval
+- SubLineItemGrouping
+- SubLineItemMatrixConfig
+- SubscriptionChangeMinified
+- SubscriptionMinified
+- SubscriptionTrialInfo
+- TaxAmount
+- Tier
+- TierConfig
+- TierSubLineItem
+- TieredBPSConfig
+- TieredConfig
+- TieredConversionRateConfig
+- TransformPriceFilter
- TrialDiscount
+- UnitConfig
+- UnitConversionRateConfig
- UsageDiscount
-
+- UsageDiscountInterval
# TopLevel
@@ -64,10 +197,6 @@ Methods:
# CreditNotes
-Types:
-
-- CreditNote
-
Methods:
- client.creditNotes.create({ ...params }) -> CreditNote
@@ -78,7 +207,15 @@ Methods:
Types:
+- AccountingProviderConfig
+- AddressInput
- Customer
+- CustomerHierarchyConfig
+- NewAccountingSyncConfiguration
+- NewAvalaraTaxConfiguration
+- NewReportingConfiguration
+- NewSphereConfiguration
+- NewTaxJarConfiguration
Methods:
@@ -120,6 +257,14 @@ Methods:
Types:
+- AffectedBlock
+- AmendmentLedgerEntry
+- CreditBlockExpiryLedgerEntry
+- DecrementLedgerEntry
+- ExpirationChangeLedgerEntry
+- IncrementLedgerEntry
+- VoidInitiatedLedgerEntry
+- VoidLedgerEntry
- LedgerListResponse
- LedgerCreateEntryResponse
- LedgerCreateEntryByExternalIDResponse
@@ -136,6 +281,7 @@ Methods:
Types:
+- TopUpInvoiceSettings
- TopUpCreateResponse
- TopUpListResponse
- TopUpCreateByExternalIDResponse
@@ -220,7 +366,6 @@ Methods:
Types:
-- Invoice
- InvoiceFetchUpcomingResponse
Methods:
@@ -287,9 +432,9 @@ Methods:
Types:
- EvaluatePriceGroup
-- Price
- PriceEvaluateResponse
- PriceEvaluateMultipleResponse
+- PriceEvaluatePreviewEventsResponse
Methods:
@@ -298,6 +443,7 @@ Methods:
- client.prices.list({ ...params }) -> PricesPage
- client.prices.evaluate(priceId, { ...params }) -> PriceEvaluateResponse
- client.prices.evaluateMultiple({ ...params }) -> PriceEvaluateMultipleResponse
+- client.prices.evaluatePreviewEvents({ ...params }) -> PriceEvaluatePreviewEventsResponse
- client.prices.fetch(priceId) -> Price
## ExternalPriceID
@@ -311,48 +457,67 @@ Methods:
Types:
+- DiscountOverride
+- NewSubscriptionBPSPrice
+- NewSubscriptionBulkBPSPrice
+- NewSubscriptionBulkPrice
+- NewSubscriptionBulkWithProrationPrice
+- NewSubscriptionCumulativeGroupedBulkPrice
+- NewSubscriptionGroupedAllocationPrice
+- NewSubscriptionGroupedTieredPackagePrice
+- NewSubscriptionGroupedTieredPrice
+- NewSubscriptionGroupedWithMeteredMinimumPrice
+- NewSubscriptionGroupedWithProratedMinimumPrice
+- NewSubscriptionMatrixPrice
+- NewSubscriptionMatrixWithAllocationPrice
+- NewSubscriptionMatrixWithDisplayNamePrice
+- NewSubscriptionMaxGroupTieredPackagePrice
+- NewSubscriptionPackagePrice
+- NewSubscriptionPackageWithAllocationPrice
+- NewSubscriptionScalableMatrixWithTieredPricingPrice
+- NewSubscriptionScalableMatrixWithUnitPricingPrice
+- NewSubscriptionThresholdTotalAmountPrice
+- NewSubscriptionTierWithProrationPrice
+- NewSubscriptionTieredBPSPrice
+- NewSubscriptionTieredPackagePrice
+- NewSubscriptionTieredPackageWithMinimumPrice
+- NewSubscriptionTieredPrice
+- NewSubscriptionTieredWithMinimumPrice
+- NewSubscriptionUnitPrice
+- NewSubscriptionUnitWithPercentPrice
+- NewSubscriptionUnitWithProrationPrice
- Subscription
- SubscriptionUsage
- Subscriptions
-- SubscriptionCreateResponse
-- SubscriptionCancelResponse
- SubscriptionFetchCostsResponse
- SubscriptionFetchScheduleResponse
-- SubscriptionPriceIntervalsResponse
-- SubscriptionRedeemCouponResponse
-- SubscriptionSchedulePlanChangeResponse
-- SubscriptionTriggerPhaseResponse
-- SubscriptionUnscheduleCancellationResponse
-- SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse
-- SubscriptionUnschedulePendingPlanChangesResponse
-- SubscriptionUpdateFixedFeeQuantityResponse
-- SubscriptionUpdateTrialResponse
Methods:
-- client.subscriptions.create({ ...params }) -> SubscriptionCreateResponse
+- client.subscriptions.create({ ...params }) -> MutatedSubscription
- client.subscriptions.update(subscriptionId, { ...params }) -> Subscription
- client.subscriptions.list({ ...params }) -> SubscriptionsPage
-- client.subscriptions.cancel(subscriptionId, { ...params }) -> SubscriptionCancelResponse
+- client.subscriptions.cancel(subscriptionId, { ...params }) -> MutatedSubscription
- client.subscriptions.fetch(subscriptionId) -> Subscription
- client.subscriptions.fetchCosts(subscriptionId, { ...params }) -> SubscriptionFetchCostsResponse
- client.subscriptions.fetchSchedule(subscriptionId, { ...params }) -> SubscriptionFetchScheduleResponsesPage
- client.subscriptions.fetchUsage(subscriptionId, { ...params }) -> SubscriptionUsage
-- client.subscriptions.priceIntervals(subscriptionId, { ...params }) -> SubscriptionPriceIntervalsResponse
-- client.subscriptions.redeemCoupon(subscriptionId, { ...params }) -> SubscriptionRedeemCouponResponse
-- client.subscriptions.schedulePlanChange(subscriptionId, { ...params }) -> SubscriptionSchedulePlanChangeResponse
-- client.subscriptions.triggerPhase(subscriptionId, { ...params }) -> SubscriptionTriggerPhaseResponse
-- client.subscriptions.unscheduleCancellation(subscriptionId) -> SubscriptionUnscheduleCancellationResponse
-- client.subscriptions.unscheduleFixedFeeQuantityUpdates(subscriptionId, { ...params }) -> SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse
-- client.subscriptions.unschedulePendingPlanChanges(subscriptionId) -> SubscriptionUnschedulePendingPlanChangesResponse
-- client.subscriptions.updateFixedFeeQuantity(subscriptionId, { ...params }) -> SubscriptionUpdateFixedFeeQuantityResponse
-- client.subscriptions.updateTrial(subscriptionId, { ...params }) -> SubscriptionUpdateTrialResponse
+- client.subscriptions.priceIntervals(subscriptionId, { ...params }) -> MutatedSubscription
+- client.subscriptions.redeemCoupon(subscriptionId, { ...params }) -> MutatedSubscription
+- client.subscriptions.schedulePlanChange(subscriptionId, { ...params }) -> MutatedSubscription
+- client.subscriptions.triggerPhase(subscriptionId, { ...params }) -> MutatedSubscription
+- client.subscriptions.unscheduleCancellation(subscriptionId) -> MutatedSubscription
+- client.subscriptions.unscheduleFixedFeeQuantityUpdates(subscriptionId, { ...params }) -> MutatedSubscription
+- client.subscriptions.unschedulePendingPlanChanges(subscriptionId) -> MutatedSubscription
+- client.subscriptions.updateFixedFeeQuantity(subscriptionId, { ...params }) -> MutatedSubscription
+- client.subscriptions.updateTrial(subscriptionId, { ...params }) -> MutatedSubscription
# Alerts
Types:
- Alert
+- Threshold
Methods:
@@ -388,6 +553,7 @@ Methods:
Types:
+- MutatedSubscription
- SubscriptionChangeRetrieveResponse
- SubscriptionChangeApplyResponse
- SubscriptionChangeCancelResponse
diff --git a/package.json b/package.json
index 4f2e7738..8ba0ddf9 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "orb-billing",
- "version": "4.74.0",
+ "version": "5.0.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 76cff6be..493e394a 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -19,21 +19,15 @@ import {
AlertUpdateParams,
Alerts,
AlertsPage,
+ Threshold,
} from './resources/alerts';
-import {
- CreditNote,
- CreditNoteCreateParams,
- CreditNoteListParams,
- CreditNotes,
- CreditNotesPage,
-} from './resources/credit-notes';
+import { CreditNoteCreateParams, CreditNoteListParams, CreditNotes } from './resources/credit-notes';
import {
InvoiceLineItemCreateParams,
InvoiceLineItemCreateResponse,
InvoiceLineItems,
} from './resources/invoice-line-items';
import {
- Invoice,
InvoiceCreateParams,
InvoiceFetchUpcomingParams,
InvoiceFetchUpcomingResponse,
@@ -42,7 +36,6 @@ import {
InvoiceMarkPaidParams,
InvoiceUpdateParams,
Invoices,
- InvoicesPage,
} from './resources/invoices';
import {
Item,
@@ -61,6 +54,7 @@ import {
Metrics,
} from './resources/metrics';
import {
+ MutatedSubscription,
SubscriptionChangeApplyParams,
SubscriptionChangeApplyResponse,
SubscriptionChangeCancelResponse,
@@ -68,11 +62,38 @@ import {
SubscriptionChanges,
} from './resources/subscription-changes';
import {
+ DiscountOverride,
+ NewSubscriptionBPSPrice,
+ NewSubscriptionBulkBPSPrice,
+ NewSubscriptionBulkPrice,
+ NewSubscriptionBulkWithProrationPrice,
+ NewSubscriptionCumulativeGroupedBulkPrice,
+ NewSubscriptionGroupedAllocationPrice,
+ NewSubscriptionGroupedTieredPackagePrice,
+ NewSubscriptionGroupedTieredPrice,
+ NewSubscriptionGroupedWithMeteredMinimumPrice,
+ NewSubscriptionGroupedWithProratedMinimumPrice,
+ NewSubscriptionMatrixPrice,
+ NewSubscriptionMatrixWithAllocationPrice,
+ NewSubscriptionMatrixWithDisplayNamePrice,
+ NewSubscriptionMaxGroupTieredPackagePrice,
+ NewSubscriptionPackagePrice,
+ NewSubscriptionPackageWithAllocationPrice,
+ NewSubscriptionScalableMatrixWithTieredPricingPrice,
+ NewSubscriptionScalableMatrixWithUnitPricingPrice,
+ NewSubscriptionThresholdTotalAmountPrice,
+ NewSubscriptionTierWithProrationPrice,
+ NewSubscriptionTieredBPSPrice,
+ NewSubscriptionTieredPackagePrice,
+ NewSubscriptionTieredPackageWithMinimumPrice,
+ NewSubscriptionTieredPrice,
+ NewSubscriptionTieredWithMinimumPrice,
+ NewSubscriptionUnitPrice,
+ NewSubscriptionUnitWithPercentPrice,
+ NewSubscriptionUnitWithProrationPrice,
Subscription,
SubscriptionCancelParams,
- SubscriptionCancelResponse,
SubscriptionCreateParams,
- SubscriptionCreateResponse,
SubscriptionFetchCostsParams,
SubscriptionFetchCostsResponse,
SubscriptionFetchScheduleParams,
@@ -81,22 +102,13 @@ import {
SubscriptionFetchUsageParams,
SubscriptionListParams,
SubscriptionPriceIntervalsParams,
- SubscriptionPriceIntervalsResponse,
SubscriptionRedeemCouponParams,
- SubscriptionRedeemCouponResponse,
SubscriptionSchedulePlanChangeParams,
- SubscriptionSchedulePlanChangeResponse,
SubscriptionTriggerPhaseParams,
- SubscriptionTriggerPhaseResponse,
- SubscriptionUnscheduleCancellationResponse,
SubscriptionUnscheduleFixedFeeQuantityUpdatesParams,
- SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse,
- SubscriptionUnschedulePendingPlanChangesResponse,
SubscriptionUpdateFixedFeeQuantityParams,
- SubscriptionUpdateFixedFeeQuantityResponse,
SubscriptionUpdateParams,
SubscriptionUpdateTrialParams,
- SubscriptionUpdateTrialResponse,
SubscriptionUsage,
Subscriptions,
SubscriptionsPage,
@@ -117,13 +129,21 @@ import {
CouponsPage,
} from './resources/coupons/coupons';
import {
+ AccountingProviderConfig,
+ AddressInput,
Customer,
CustomerCreateParams,
+ CustomerHierarchyConfig,
CustomerListParams,
CustomerUpdateByExternalIDParams,
CustomerUpdateParams,
Customers,
CustomersPage,
+ NewAccountingSyncConfiguration,
+ NewAvalaraTaxConfiguration,
+ NewReportingConfiguration,
+ NewSphereConfiguration,
+ NewTaxJarConfiguration,
} from './resources/customers/customers';
import {
DimensionalPriceGroup,
@@ -152,16 +172,16 @@ import {
} from './resources/plans/plans';
import {
EvaluatePriceGroup,
- Price,
PriceCreateParams,
PriceEvaluateMultipleParams,
PriceEvaluateMultipleResponse,
PriceEvaluateParams,
+ PriceEvaluatePreviewEventsParams,
+ PriceEvaluatePreviewEventsResponse,
PriceEvaluateResponse,
PriceListParams,
PriceUpdateParams,
Prices,
- PricesPage,
} from './resources/prices/prices';
export interface ClientOptions {
@@ -363,13 +383,11 @@ Orb.Beta = Beta;
Orb.Coupons = Coupons;
Orb.CouponsPage = CouponsPage;
Orb.CreditNotes = CreditNotes;
-Orb.CreditNotesPage = CreditNotesPage;
Orb.Customers = Customers;
Orb.CustomersPage = CustomersPage;
Orb.Events = Events;
Orb.InvoiceLineItems = InvoiceLineItems;
Orb.Invoices = Invoices;
-Orb.InvoicesPage = InvoicesPage;
Orb.Items = Items;
Orb.ItemsPage = ItemsPage;
Orb.Metrics = Metrics;
@@ -377,7 +395,6 @@ Orb.BillableMetricsPage = BillableMetricsPage;
Orb.Plans = Plans;
Orb.PlansPage = PlansPage;
Orb.Prices = Prices;
-Orb.PricesPage = PricesPage;
Orb.SubscriptionsPage = SubscriptionsPage;
Orb.SubscriptionFetchScheduleResponsesPage = SubscriptionFetchScheduleResponsesPage;
Orb.Alerts = Alerts;
@@ -410,15 +427,21 @@ export declare namespace Orb {
export {
CreditNotes as CreditNotes,
- type CreditNote as CreditNote,
- CreditNotesPage as CreditNotesPage,
type CreditNoteCreateParams as CreditNoteCreateParams,
type CreditNoteListParams as CreditNoteListParams,
};
export {
Customers as Customers,
+ type AccountingProviderConfig as AccountingProviderConfig,
+ type AddressInput as AddressInput,
type Customer as Customer,
+ type CustomerHierarchyConfig as CustomerHierarchyConfig,
+ type NewAccountingSyncConfiguration as NewAccountingSyncConfiguration,
+ type NewAvalaraTaxConfiguration as NewAvalaraTaxConfiguration,
+ type NewReportingConfiguration as NewReportingConfiguration,
+ type NewSphereConfiguration as NewSphereConfiguration,
+ type NewTaxJarConfiguration as NewTaxJarConfiguration,
CustomersPage as CustomersPage,
type CustomerCreateParams as CustomerCreateParams,
type CustomerUpdateParams as CustomerUpdateParams,
@@ -445,9 +468,7 @@ export declare namespace Orb {
export {
Invoices as Invoices,
- type Invoice as Invoice,
type InvoiceFetchUpcomingResponse as InvoiceFetchUpcomingResponse,
- InvoicesPage as InvoicesPage,
type InvoiceCreateParams as InvoiceCreateParams,
type InvoiceUpdateParams as InvoiceUpdateParams,
type InvoiceListParams as InvoiceListParams,
@@ -486,34 +507,52 @@ export declare namespace Orb {
export {
Prices as Prices,
type EvaluatePriceGroup as EvaluatePriceGroup,
- type Price as Price,
type PriceEvaluateResponse as PriceEvaluateResponse,
type PriceEvaluateMultipleResponse as PriceEvaluateMultipleResponse,
- PricesPage as PricesPage,
+ type PriceEvaluatePreviewEventsResponse as PriceEvaluatePreviewEventsResponse,
type PriceCreateParams as PriceCreateParams,
type PriceUpdateParams as PriceUpdateParams,
type PriceListParams as PriceListParams,
type PriceEvaluateParams as PriceEvaluateParams,
type PriceEvaluateMultipleParams as PriceEvaluateMultipleParams,
+ type PriceEvaluatePreviewEventsParams as PriceEvaluatePreviewEventsParams,
};
export {
type Subscriptions as Subscriptions,
+ type DiscountOverride as DiscountOverride,
+ type NewSubscriptionBPSPrice as NewSubscriptionBPSPrice,
+ type NewSubscriptionBulkBPSPrice as NewSubscriptionBulkBPSPrice,
+ type NewSubscriptionBulkPrice as NewSubscriptionBulkPrice,
+ type NewSubscriptionBulkWithProrationPrice as NewSubscriptionBulkWithProrationPrice,
+ type NewSubscriptionCumulativeGroupedBulkPrice as NewSubscriptionCumulativeGroupedBulkPrice,
+ type NewSubscriptionGroupedAllocationPrice as NewSubscriptionGroupedAllocationPrice,
+ type NewSubscriptionGroupedTieredPackagePrice as NewSubscriptionGroupedTieredPackagePrice,
+ type NewSubscriptionGroupedTieredPrice as NewSubscriptionGroupedTieredPrice,
+ type NewSubscriptionGroupedWithMeteredMinimumPrice as NewSubscriptionGroupedWithMeteredMinimumPrice,
+ type NewSubscriptionGroupedWithProratedMinimumPrice as NewSubscriptionGroupedWithProratedMinimumPrice,
+ type NewSubscriptionMatrixPrice as NewSubscriptionMatrixPrice,
+ type NewSubscriptionMatrixWithAllocationPrice as NewSubscriptionMatrixWithAllocationPrice,
+ type NewSubscriptionMatrixWithDisplayNamePrice as NewSubscriptionMatrixWithDisplayNamePrice,
+ type NewSubscriptionMaxGroupTieredPackagePrice as NewSubscriptionMaxGroupTieredPackagePrice,
+ type NewSubscriptionPackagePrice as NewSubscriptionPackagePrice,
+ type NewSubscriptionPackageWithAllocationPrice as NewSubscriptionPackageWithAllocationPrice,
+ type NewSubscriptionScalableMatrixWithTieredPricingPrice as NewSubscriptionScalableMatrixWithTieredPricingPrice,
+ type NewSubscriptionScalableMatrixWithUnitPricingPrice as NewSubscriptionScalableMatrixWithUnitPricingPrice,
+ type NewSubscriptionThresholdTotalAmountPrice as NewSubscriptionThresholdTotalAmountPrice,
+ type NewSubscriptionTierWithProrationPrice as NewSubscriptionTierWithProrationPrice,
+ type NewSubscriptionTieredBPSPrice as NewSubscriptionTieredBPSPrice,
+ type NewSubscriptionTieredPackagePrice as NewSubscriptionTieredPackagePrice,
+ type NewSubscriptionTieredPackageWithMinimumPrice as NewSubscriptionTieredPackageWithMinimumPrice,
+ type NewSubscriptionTieredPrice as NewSubscriptionTieredPrice,
+ type NewSubscriptionTieredWithMinimumPrice as NewSubscriptionTieredWithMinimumPrice,
+ type NewSubscriptionUnitPrice as NewSubscriptionUnitPrice,
+ type NewSubscriptionUnitWithPercentPrice as NewSubscriptionUnitWithPercentPrice,
+ type NewSubscriptionUnitWithProrationPrice as NewSubscriptionUnitWithProrationPrice,
type Subscription as Subscription,
type SubscriptionUsage as SubscriptionUsage,
- type SubscriptionCreateResponse as SubscriptionCreateResponse,
- type SubscriptionCancelResponse as SubscriptionCancelResponse,
type SubscriptionFetchCostsResponse as SubscriptionFetchCostsResponse,
type SubscriptionFetchScheduleResponse as SubscriptionFetchScheduleResponse,
- type SubscriptionPriceIntervalsResponse as SubscriptionPriceIntervalsResponse,
- type SubscriptionRedeemCouponResponse as SubscriptionRedeemCouponResponse,
- type SubscriptionSchedulePlanChangeResponse as SubscriptionSchedulePlanChangeResponse,
- type SubscriptionTriggerPhaseResponse as SubscriptionTriggerPhaseResponse,
- type SubscriptionUnscheduleCancellationResponse as SubscriptionUnscheduleCancellationResponse,
- type SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse as SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse,
- type SubscriptionUnschedulePendingPlanChangesResponse as SubscriptionUnschedulePendingPlanChangesResponse,
- type SubscriptionUpdateFixedFeeQuantityResponse as SubscriptionUpdateFixedFeeQuantityResponse,
- type SubscriptionUpdateTrialResponse as SubscriptionUpdateTrialResponse,
SubscriptionsPage as SubscriptionsPage,
SubscriptionFetchScheduleResponsesPage as SubscriptionFetchScheduleResponsesPage,
type SubscriptionCreateParams as SubscriptionCreateParams,
@@ -535,6 +574,7 @@ export declare namespace Orb {
export {
Alerts as Alerts,
type Alert as Alert,
+ type Threshold as Threshold,
AlertsPage as AlertsPage,
type AlertUpdateParams as AlertUpdateParams,
type AlertListParams as AlertListParams,
@@ -555,20 +595,157 @@ export declare namespace Orb {
export {
SubscriptionChanges as SubscriptionChanges,
+ type MutatedSubscription as MutatedSubscription,
type SubscriptionChangeRetrieveResponse as SubscriptionChangeRetrieveResponse,
type SubscriptionChangeApplyResponse as SubscriptionChangeApplyResponse,
type SubscriptionChangeCancelResponse as SubscriptionChangeCancelResponse,
type SubscriptionChangeApplyParams as SubscriptionChangeApplyParams,
};
+ export type Address = API.Address;
+ export type AdjustmentInterval = API.AdjustmentInterval;
+ export type AggregatedCost = API.AggregatedCost;
+ export type Allocation = API.Allocation;
export type AmountDiscount = API.AmountDiscount;
+ export type AmountDiscountInterval = API.AmountDiscountInterval;
+ export type BillableMetricTiny = API.BillableMetricTiny;
+ export type BillingCycleAnchorConfiguration = API.BillingCycleAnchorConfiguration;
+ export type BillingCycleConfiguration = API.BillingCycleConfiguration;
export type BillingCycleRelativeDate = API.BillingCycleRelativeDate;
+ export type BPSConfig = API.BPSConfig;
+ export type BPSTier = API.BPSTier;
+ export type BulkBPSConfig = API.BulkBPSConfig;
+ export type BulkBPSTier = API.BulkBPSTier;
+ export type BulkConfig = API.BulkConfig;
+ export type BulkTier = API.BulkTier;
+ export type ChangedSubscriptionResources = API.ChangedSubscriptionResources;
+ export type ConversionRateTier = API.ConversionRateTier;
+ export type ConversionRateTieredConfig = API.ConversionRateTieredConfig;
+ export type ConversionRateUnitConfig = API.ConversionRateUnitConfig;
+ export type CouponRedemption = API.CouponRedemption;
+ export type CreditNote = API.CreditNote;
+ export type CreditNoteTiny = API.CreditNoteTiny;
+ export type CustomExpiration = API.CustomExpiration;
+ export type CustomerMinified = API.CustomerMinified;
+ export type CustomerTaxID = API.CustomerTaxID;
+ export type DimensionalPriceConfiguration = API.DimensionalPriceConfiguration;
export type Discount = API.Discount;
+ export type FixedFeeQuantityScheduleEntry = API.FixedFeeQuantityScheduleEntry;
+ export type FixedFeeQuantityTransition = API.FixedFeeQuantityTransition;
+ export type Invoice = API.Invoice;
export type InvoiceLevelDiscount = API.InvoiceLevelDiscount;
+ export type InvoiceTiny = API.InvoiceTiny;
+ export type ItemSlim = API.ItemSlim;
+ export type MatrixConfig = API.MatrixConfig;
+ export type MatrixSubLineItem = API.MatrixSubLineItem;
+ export type MatrixValue = API.MatrixValue;
+ export type MatrixWithAllocationConfig = API.MatrixWithAllocationConfig;
+ export type Maximum = API.Maximum;
+ export type MaximumInterval = API.MaximumInterval;
+ export type Minimum = API.Minimum;
+ export type MinimumInterval = API.MinimumInterval;
+ export type MonetaryAmountDiscountAdjustment = API.MonetaryAmountDiscountAdjustment;
+ export type MonetaryMaximumAdjustment = API.MonetaryMaximumAdjustment;
+ export type MonetaryMinimumAdjustment = API.MonetaryMinimumAdjustment;
+ export type MonetaryPercentageDiscountAdjustment = API.MonetaryPercentageDiscountAdjustment;
+ export type MonetaryUsageDiscountAdjustment = API.MonetaryUsageDiscountAdjustment;
+ export type NewAllocationPrice = API.NewAllocationPrice;
+ export type NewAmountDiscount = API.NewAmountDiscount;
+ export type NewBillingCycleConfiguration = API.NewBillingCycleConfiguration;
+ export type NewDimensionalPriceConfiguration = API.NewDimensionalPriceConfiguration;
+ export type NewFloatingBPSPrice = API.NewFloatingBPSPrice;
+ export type NewFloatingBulkBPSPrice = API.NewFloatingBulkBPSPrice;
+ export type NewFloatingBulkPrice = API.NewFloatingBulkPrice;
+ export type NewFloatingBulkWithProrationPrice = API.NewFloatingBulkWithProrationPrice;
+ export type NewFloatingCumulativeGroupedBulkPrice = API.NewFloatingCumulativeGroupedBulkPrice;
+ export type NewFloatingGroupedAllocationPrice = API.NewFloatingGroupedAllocationPrice;
+ export type NewFloatingGroupedTieredPackagePrice = API.NewFloatingGroupedTieredPackagePrice;
+ export type NewFloatingGroupedTieredPrice = API.NewFloatingGroupedTieredPrice;
+ export type NewFloatingGroupedWithMeteredMinimumPrice = API.NewFloatingGroupedWithMeteredMinimumPrice;
+ export type NewFloatingGroupedWithProratedMinimumPrice = API.NewFloatingGroupedWithProratedMinimumPrice;
+ export type NewFloatingMatrixPrice = API.NewFloatingMatrixPrice;
+ export type NewFloatingMatrixWithAllocationPrice = API.NewFloatingMatrixWithAllocationPrice;
+ export type NewFloatingMatrixWithDisplayNamePrice = API.NewFloatingMatrixWithDisplayNamePrice;
+ export type NewFloatingMaxGroupTieredPackagePrice = API.NewFloatingMaxGroupTieredPackagePrice;
+ export type NewFloatingPackagePrice = API.NewFloatingPackagePrice;
+ export type NewFloatingPackageWithAllocationPrice = API.NewFloatingPackageWithAllocationPrice;
+ export type NewFloatingScalableMatrixWithTieredPricingPrice =
+ API.NewFloatingScalableMatrixWithTieredPricingPrice;
+ export type NewFloatingScalableMatrixWithUnitPricingPrice =
+ API.NewFloatingScalableMatrixWithUnitPricingPrice;
+ export type NewFloatingThresholdTotalAmountPrice = API.NewFloatingThresholdTotalAmountPrice;
+ export type NewFloatingTieredBPSPrice = API.NewFloatingTieredBPSPrice;
+ export type NewFloatingTieredPackagePrice = API.NewFloatingTieredPackagePrice;
+ export type NewFloatingTieredPackageWithMinimumPrice = API.NewFloatingTieredPackageWithMinimumPrice;
+ export type NewFloatingTieredPrice = API.NewFloatingTieredPrice;
+ export type NewFloatingTieredWithMinimumPrice = API.NewFloatingTieredWithMinimumPrice;
+ export type NewFloatingTieredWithProrationPrice = API.NewFloatingTieredWithProrationPrice;
+ export type NewFloatingUnitPrice = API.NewFloatingUnitPrice;
+ export type NewFloatingUnitWithPercentPrice = API.NewFloatingUnitWithPercentPrice;
+ export type NewFloatingUnitWithProrationPrice = API.NewFloatingUnitWithProrationPrice;
+ export type NewMaximum = API.NewMaximum;
+ export type NewMinimum = API.NewMinimum;
+ export type NewPercentageDiscount = API.NewPercentageDiscount;
+ export type NewPlanBPSPrice = API.NewPlanBPSPrice;
+ export type NewPlanBulkBPSPrice = API.NewPlanBulkBPSPrice;
+ export type NewPlanBulkPrice = API.NewPlanBulkPrice;
+ export type NewPlanBulkWithProrationPrice = API.NewPlanBulkWithProrationPrice;
+ export type NewPlanCumulativeGroupedBulkPrice = API.NewPlanCumulativeGroupedBulkPrice;
+ export type NewPlanGroupedAllocationPrice = API.NewPlanGroupedAllocationPrice;
+ export type NewPlanGroupedTieredPackagePrice = API.NewPlanGroupedTieredPackagePrice;
+ export type NewPlanGroupedTieredPrice = API.NewPlanGroupedTieredPrice;
+ export type NewPlanGroupedWithMeteredMinimumPrice = API.NewPlanGroupedWithMeteredMinimumPrice;
+ export type NewPlanGroupedWithProratedMinimumPrice = API.NewPlanGroupedWithProratedMinimumPrice;
+ export type NewPlanMatrixPrice = API.NewPlanMatrixPrice;
+ export type NewPlanMatrixWithAllocationPrice = API.NewPlanMatrixWithAllocationPrice;
+ export type NewPlanMatrixWithDisplayNamePrice = API.NewPlanMatrixWithDisplayNamePrice;
+ export type NewPlanMaxGroupTieredPackagePrice = API.NewPlanMaxGroupTieredPackagePrice;
+ export type NewPlanPackagePrice = API.NewPlanPackagePrice;
+ export type NewPlanPackageWithAllocationPrice = API.NewPlanPackageWithAllocationPrice;
+ export type NewPlanScalableMatrixWithTieredPricingPrice = API.NewPlanScalableMatrixWithTieredPricingPrice;
+ export type NewPlanScalableMatrixWithUnitPricingPrice = API.NewPlanScalableMatrixWithUnitPricingPrice;
+ export type NewPlanThresholdTotalAmountPrice = API.NewPlanThresholdTotalAmountPrice;
+ export type NewPlanTierWithProrationPrice = API.NewPlanTierWithProrationPrice;
+ export type NewPlanTieredBPSPrice = API.NewPlanTieredBPSPrice;
+ export type NewPlanTieredPackagePrice = API.NewPlanTieredPackagePrice;
+ export type NewPlanTieredPackageWithMinimumPrice = API.NewPlanTieredPackageWithMinimumPrice;
+ export type NewPlanTieredPrice = API.NewPlanTieredPrice;
+ export type NewPlanTieredWithMinimumPrice = API.NewPlanTieredWithMinimumPrice;
+ export type NewPlanUnitPrice = API.NewPlanUnitPrice;
+ export type NewPlanUnitWithPercentPrice = API.NewPlanUnitWithPercentPrice;
+ export type NewPlanUnitWithProrationPrice = API.NewPlanUnitWithProrationPrice;
+ export type NewUsageDiscount = API.NewUsageDiscount;
+ export type OtherSubLineItem = API.OtherSubLineItem;
+ export type PackageConfig = API.PackageConfig;
export type PaginationMetadata = API.PaginationMetadata;
+ export type PerPriceCost = API.PerPriceCost;
export type PercentageDiscount = API.PercentageDiscount;
+ export type PercentageDiscountInterval = API.PercentageDiscountInterval;
+ export type PlanPhaseAmountDiscountAdjustment = API.PlanPhaseAmountDiscountAdjustment;
+ export type PlanPhaseMaximumAdjustment = API.PlanPhaseMaximumAdjustment;
+ export type PlanPhaseMinimumAdjustment = API.PlanPhaseMinimumAdjustment;
+ export type PlanPhasePercentageDiscountAdjustment = API.PlanPhasePercentageDiscountAdjustment;
+ export type PlanPhaseUsageDiscountAdjustment = API.PlanPhaseUsageDiscountAdjustment;
+ export type Price = API.Price;
+ export type PriceInterval = API.PriceInterval;
+ export type SubLineItemGrouping = API.SubLineItemGrouping;
+ export type SubLineItemMatrixConfig = API.SubLineItemMatrixConfig;
+ export type SubscriptionChangeMinified = API.SubscriptionChangeMinified;
+ export type SubscriptionMinified = API.SubscriptionMinified;
+ export type SubscriptionTrialInfo = API.SubscriptionTrialInfo;
+ export type TaxAmount = API.TaxAmount;
+ export type Tier = API.Tier;
+ export type TierConfig = API.TierConfig;
+ export type TierSubLineItem = API.TierSubLineItem;
+ export type TieredBPSConfig = API.TieredBPSConfig;
+ export type TieredConfig = API.TieredConfig;
+ export type TieredConversionRateConfig = API.TieredConversionRateConfig;
+ export type TransformPriceFilter = API.TransformPriceFilter;
export type TrialDiscount = API.TrialDiscount;
+ export type UnitConfig = API.UnitConfig;
+ export type UnitConversionRateConfig = API.UnitConversionRateConfig;
export type UsageDiscount = API.UsageDiscount;
+ export type UsageDiscountInterval = API.UsageDiscountInterval;
}
export { toFile, fileFromPath } from './uploads';
diff --git a/src/resources/alerts.ts b/src/resources/alerts.ts
index c0df1076..20343056 100644
--- a/src/resources/alerts.ts
+++ b/src/resources/alerts.ts
@@ -3,6 +3,7 @@
import { APIResource } from '../resource';
import { isRequestOptions } from '../core';
import * as Core from '../core';
+import * as Shared from './shared';
import { Page, type PageParams } from '../pagination';
export class Alerts extends APIResource {
@@ -187,7 +188,7 @@ export interface Alert {
/**
* The customer the alert applies to.
*/
- customer: Alert.Customer | null;
+ customer: Shared.CustomerMinified | null;
/**
* Whether the alert is enabled or disabled.
@@ -207,13 +208,13 @@ export interface Alert {
/**
* The subscription the alert applies to.
*/
- subscription: Alert.Subscription | null;
+ subscription: Shared.SubscriptionMinified | null;
/**
* The thresholds that define the conditions under which the alert will be
* triggered.
*/
- thresholds: Array | null;
+ thresholds: Array | null;
/**
* The type of alert. This must be a valid alert type.
@@ -233,15 +234,6 @@ export interface Alert {
}
export namespace Alert {
- /**
- * The customer the alert applies to.
- */
- export interface Customer {
- id: string;
-
- external_customer_id: string | null;
- }
-
/**
* The metric the alert applies to.
*/
@@ -267,26 +259,6 @@ export namespace Alert {
plan_version: string;
}
- /**
- * The subscription the alert applies to.
- */
- export interface Subscription {
- id: string;
- }
-
- /**
- * Thresholds are used to define the conditions under which an alert will be
- * triggered.
- */
- export interface Threshold {
- /**
- * The value at which an alert will fire. For credit balance alerts, the alert will
- * fire at or below this value. For usage and cost alerts, the alert will fire at
- * or above this value.
- */
- value: number;
- }
-
/**
* Alert status is used to determine if an alert is currently in-alert or not.
*/
@@ -303,26 +275,24 @@ export namespace Alert {
}
}
-export interface AlertUpdateParams {
+/**
+ * Thresholds are used to define the conditions under which an alert will be
+ * triggered.
+ */
+export interface Threshold {
/**
- * The thresholds that define the values at which the alert will be triggered.
+ * The value at which an alert will fire. For credit balance alerts, the alert will
+ * fire at or below this value. For usage and cost alerts, the alert will fire at
+ * or above this value.
*/
- thresholds: Array;
+ value: number;
}
-export namespace AlertUpdateParams {
+export interface AlertUpdateParams {
/**
- * Thresholds are used to define the conditions under which an alert will be
- * triggered.
+ * The thresholds that define the values at which the alert will be triggered.
*/
- export interface Threshold {
- /**
- * The value at which an alert will fire. For credit balance alerts, the alert will
- * fire at or below this value. For usage and cost alerts, the alert will fire at
- * or above this value.
- */
- value: number;
- }
+ thresholds: Array;
}
export interface AlertListParams extends PageParams {
@@ -364,22 +334,7 @@ export interface AlertCreateForCustomerParams {
/**
* The thresholds that define the values at which the alert will be triggered.
*/
- thresholds?: Array | null;
-}
-
-export namespace AlertCreateForCustomerParams {
- /**
- * Thresholds are used to define the conditions under which an alert will be
- * triggered.
- */
- export interface Threshold {
- /**
- * The value at which an alert will fire. For credit balance alerts, the alert will
- * fire at or below this value. For usage and cost alerts, the alert will fire at
- * or above this value.
- */
- value: number;
- }
+ thresholds?: Array | null;
}
export interface AlertCreateForExternalCustomerParams {
@@ -396,29 +351,14 @@ export interface AlertCreateForExternalCustomerParams {
/**
* The thresholds that define the values at which the alert will be triggered.
*/
- thresholds?: Array | null;
-}
-
-export namespace AlertCreateForExternalCustomerParams {
- /**
- * Thresholds are used to define the conditions under which an alert will be
- * triggered.
- */
- export interface Threshold {
- /**
- * The value at which an alert will fire. For credit balance alerts, the alert will
- * fire at or below this value. For usage and cost alerts, the alert will fire at
- * or above this value.
- */
- value: number;
- }
+ thresholds?: Array | null;
}
export interface AlertCreateForSubscriptionParams {
/**
* The thresholds that define the values at which the alert will be triggered.
*/
- thresholds: Array;
+ thresholds: Array;
/**
* The type of alert to create. This must be a valid alert type.
@@ -431,21 +371,6 @@ export interface AlertCreateForSubscriptionParams {
metric_id?: string | null;
}
-export namespace AlertCreateForSubscriptionParams {
- /**
- * Thresholds are used to define the conditions under which an alert will be
- * triggered.
- */
- export interface Threshold {
- /**
- * The value at which an alert will fire. For credit balance alerts, the alert will
- * fire at or below this value. For usage and cost alerts, the alert will fire at
- * or above this value.
- */
- value: number;
- }
-}
-
export interface AlertDisableParams {
/**
* Used to update the status of a plan alert scoped to this subscription_id
@@ -465,6 +390,7 @@ Alerts.AlertsPage = AlertsPage;
export declare namespace Alerts {
export {
type Alert as Alert,
+ type Threshold as Threshold,
AlertsPage as AlertsPage,
type AlertUpdateParams as AlertUpdateParams,
type AlertListParams as AlertListParams,
diff --git a/src/resources/beta/beta.ts b/src/resources/beta/beta.ts
index 9d49fe4a..598b3cf8 100644
--- a/src/resources/beta/beta.ts
+++ b/src/resources/beta/beta.ts
@@ -2,6 +2,7 @@
import { APIResource } from '../../resource';
import * as Core from '../../core';
+import * as Shared from '../shared';
import * as ExternalPlanIDAPI from './external-plan-id';
import {
ExternalPlanID,
@@ -9,7 +10,6 @@ import {
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);
@@ -68,11 +68,11 @@ export interface PlanVersion {
* across all phases of the plan.
*/
adjustments: Array<
- | PlanVersion.PlanPhaseUsageDiscountAdjustment
- | PlanVersion.PlanPhaseAmountDiscountAdjustment
- | PlanVersion.PlanPhasePercentageDiscountAdjustment
- | PlanVersion.PlanPhaseMinimumAdjustment
- | PlanVersion.PlanPhaseMaximumAdjustment
+ | Shared.PlanPhaseUsageDiscountAdjustment
+ | Shared.PlanPhaseAmountDiscountAdjustment
+ | Shared.PlanPhasePercentageDiscountAdjustment
+ | Shared.PlanPhaseMinimumAdjustment
+ | Shared.PlanPhaseMaximumAdjustment
>;
created_at: string;
@@ -83,303 +83,11 @@ export interface PlanVersion {
* Prices for this plan. If the plan has phases, this includes prices across all
* phases of the plan.
*/
- prices: Array;
+ 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;
@@ -449,11 +157,11 @@ export namespace BetaCreatePlanVersionParams {
* The definition of a new adjustment to create and add to the plan.
*/
adjustment:
- | AddAdjustment.NewPercentageDiscount
- | AddAdjustment.NewUsageDiscount
- | AddAdjustment.NewAmountDiscount
- | AddAdjustment.NewMinimum
- | AddAdjustment.NewMaximum;
+ | Shared.NewPercentageDiscount
+ | Shared.NewUsageDiscount
+ | Shared.NewAmountDiscount
+ | Shared.NewMinimum
+ | Shared.NewMaximum;
/**
* The phase to add this adjustment to.
@@ -461,103 +169,11 @@ export namespace BetaCreatePlanVersionParams {
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;
+ allocation_price?: Shared.NewAllocationPrice | null;
/**
* The phase to add this price to.
@@ -568,8516 +184,132 @@ export namespace BetaCreatePlanVersionParams {
* 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
+ | Shared.NewPlanUnitPrice
+ | Shared.NewPlanPackagePrice
+ | Shared.NewPlanMatrixPrice
+ | Shared.NewPlanTieredPrice
+ | Shared.NewPlanTieredBPSPrice
+ | Shared.NewPlanBPSPrice
+ | Shared.NewPlanBulkBPSPrice
+ | Shared.NewPlanBulkPrice
+ | Shared.NewPlanThresholdTotalAmountPrice
+ | Shared.NewPlanTieredPackagePrice
+ | Shared.NewPlanTieredWithMinimumPrice
+ | Shared.NewPlanUnitWithPercentPrice
+ | Shared.NewPlanPackageWithAllocationPrice
+ | Shared.NewPlanTierWithProrationPrice
+ | Shared.NewPlanUnitWithProrationPrice
+ | Shared.NewPlanGroupedAllocationPrice
+ | Shared.NewPlanGroupedWithProratedMinimumPrice
+ | Shared.NewPlanGroupedWithMeteredMinimumPrice
+ | Shared.NewPlanMatrixWithDisplayNamePrice
+ | Shared.NewPlanBulkWithProrationPrice
+ | Shared.NewPlanGroupedTieredPackagePrice
+ | Shared.NewPlanMaxGroupTieredPackagePrice
+ | Shared.NewPlanScalableMatrixWithUnitPricingPrice
+ | Shared.NewPlanScalableMatrixWithTieredPricingPrice
+ | Shared.NewPlanCumulativeGroupedBulkPrice
+ | Shared.NewPlanTieredPackageWithMinimumPrice
+ | Shared.NewPlanMatrixWithAllocationPrice
+ | Shared.NewPlanGroupedTieredPrice
| null;
}
- export namespace AddPrice {
+ export interface RemoveAdjustment {
/**
- * The allocation price to add to the plan.
+ * The id of the adjustment to remove from on 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;
+ adjustment_id: string;
- /**
- * The id of the billable metric for the price. Only needed if the price is
- * usage-based.
- */
- billable_metric_id?: string | null;
+ /**
+ * The phase to remove this adjustment from.
+ */
+ plan_phase_order?: number | 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;
+ export interface RemovePrice {
+ /**
+ * The id of the price to remove from the plan.
+ */
+ price_id: string;
- /**
- * For custom cadence: specifies the duration of the billing period in days or
- * months.
- */
- billing_cycle_configuration?: NewPlanMatrixPrice.BillingCycleConfiguration | null;
+ /**
+ * The phase to remove this price from.
+ */
+ plan_phase_order?: number | null;
+ }
- /**
- * The per unit conversion rate of the price currency to the invoicing currency.
- */
- conversion_rate?: number | null;
+ export interface ReplaceAdjustment {
+ /**
+ * The definition of a new adjustment to create and add to the plan.
+ */
+ adjustment:
+ | Shared.NewPercentageDiscount
+ | Shared.NewUsageDiscount
+ | Shared.NewAmountDiscount
+ | Shared.NewMinimum
+ | Shared.NewMaximum;
- /**
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
- * price is billed.
- */
- currency?: string | null;
+ /**
+ * The id of the adjustment on the plan to replace in the plan.
+ */
+ replaces_adjustment_id: string;
- /**
- * For dimensional price: specifies a price group and dimension values
- */
- dimensional_price_configuration?: NewPlanMatrixPrice.DimensionalPriceConfiguration | null;
+ /**
+ * The phase to replace this adjustment from.
+ */
+ plan_phase_order?: number | null;
+ }
- /**
- * An alias for the price.
- */
- external_price_id?: string | null;
+ export interface ReplacePrice {
+ /**
+ * The id of the price on the plan to replace in the plan.
+ */
+ replaces_price_id: string;
- /**
- * If the Price represents a fixed cost, this represents the quantity of units
- * applied.
- */
- fixed_price_quantity?: number | null;
+ /**
+ * The allocation price to add to the plan.
+ */
+ allocation_price?: Shared.NewAllocationPrice | null;
- /**
- * The property used to group this price on an invoice
- */
- invoice_grouping_key?: string | null;
+ /**
+ * The phase to replace this price from.
+ */
+ plan_phase_order?: number | 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';
- }
- }
+ /**
+ * The price to add to the plan
+ */
+ price?:
+ | Shared.NewPlanUnitPrice
+ | Shared.NewPlanPackagePrice
+ | Shared.NewPlanMatrixPrice
+ | Shared.NewPlanTieredPrice
+ | Shared.NewPlanTieredBPSPrice
+ | Shared.NewPlanBPSPrice
+ | Shared.NewPlanBulkBPSPrice
+ | Shared.NewPlanBulkPrice
+ | Shared.NewPlanThresholdTotalAmountPrice
+ | Shared.NewPlanTieredPackagePrice
+ | Shared.NewPlanTieredWithMinimumPrice
+ | Shared.NewPlanUnitWithPercentPrice
+ | Shared.NewPlanPackageWithAllocationPrice
+ | Shared.NewPlanTierWithProrationPrice
+ | Shared.NewPlanUnitWithProrationPrice
+ | Shared.NewPlanGroupedAllocationPrice
+ | Shared.NewPlanGroupedWithProratedMinimumPrice
+ | Shared.NewPlanGroupedWithMeteredMinimumPrice
+ | Shared.NewPlanMatrixWithDisplayNamePrice
+ | Shared.NewPlanBulkWithProrationPrice
+ | Shared.NewPlanGroupedTieredPackagePrice
+ | Shared.NewPlanMaxGroupTieredPackagePrice
+ | Shared.NewPlanScalableMatrixWithUnitPricingPrice
+ | Shared.NewPlanScalableMatrixWithTieredPricingPrice
+ | Shared.NewPlanCumulativeGroupedBulkPrice
+ | Shared.NewPlanTieredPackageWithMinimumPrice
+ | Shared.NewPlanMatrixWithAllocationPrice
+ | Shared.NewPlanGroupedTieredPrice
+ | null;
}
}
diff --git a/src/resources/beta/external-plan-id.ts b/src/resources/beta/external-plan-id.ts
index 9bd9e353..4eecbcec 100644
--- a/src/resources/beta/external-plan-id.ts
+++ b/src/resources/beta/external-plan-id.ts
@@ -2,6 +2,7 @@
import { APIResource } from '../../resource';
import * as Core from '../../core';
+import * as Shared from '../shared';
import * as BetaAPI from './beta';
import * as PlansAPI from '../plans/plans';
@@ -101,11 +102,11 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
* The definition of a new adjustment to create and add to the plan.
*/
adjustment:
- | AddAdjustment.NewPercentageDiscount
- | AddAdjustment.NewUsageDiscount
- | AddAdjustment.NewAmountDiscount
- | AddAdjustment.NewMinimum
- | AddAdjustment.NewMaximum;
+ | Shared.NewPercentageDiscount
+ | Shared.NewUsageDiscount
+ | Shared.NewAmountDiscount
+ | Shared.NewMinimum
+ | Shared.NewMaximum;
/**
* The phase to add this adjustment to.
@@ -113,103 +114,11 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
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;
+ allocation_price?: Shared.NewAllocationPrice | null;
/**
* The phase to add this price to.
@@ -220,8516 +129,132 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
* 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
+ | Shared.NewPlanUnitPrice
+ | Shared.NewPlanPackagePrice
+ | Shared.NewPlanMatrixPrice
+ | Shared.NewPlanTieredPrice
+ | Shared.NewPlanTieredBPSPrice
+ | Shared.NewPlanBPSPrice
+ | Shared.NewPlanBulkBPSPrice
+ | Shared.NewPlanBulkPrice
+ | Shared.NewPlanThresholdTotalAmountPrice
+ | Shared.NewPlanTieredPackagePrice
+ | Shared.NewPlanTieredWithMinimumPrice
+ | Shared.NewPlanUnitWithPercentPrice
+ | Shared.NewPlanPackageWithAllocationPrice
+ | Shared.NewPlanTierWithProrationPrice
+ | Shared.NewPlanUnitWithProrationPrice
+ | Shared.NewPlanGroupedAllocationPrice
+ | Shared.NewPlanGroupedWithProratedMinimumPrice
+ | Shared.NewPlanGroupedWithMeteredMinimumPrice
+ | Shared.NewPlanMatrixWithDisplayNamePrice
+ | Shared.NewPlanBulkWithProrationPrice
+ | Shared.NewPlanGroupedTieredPackagePrice
+ | Shared.NewPlanMaxGroupTieredPackagePrice
+ | Shared.NewPlanScalableMatrixWithUnitPricingPrice
+ | Shared.NewPlanScalableMatrixWithTieredPricingPrice
+ | Shared.NewPlanCumulativeGroupedBulkPrice
+ | Shared.NewPlanTieredPackageWithMinimumPrice
+ | Shared.NewPlanMatrixWithAllocationPrice
+ | Shared.NewPlanGroupedTieredPrice
| null;
}
- export namespace AddPrice {
+ export interface RemoveAdjustment {
/**
- * The allocation price to add to the plan.
+ * The id of the adjustment to remove from on 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;
+ adjustment_id: string;
- /**
- * The unit of billing period duration.
- */
- duration_unit: 'day' | 'month';
- }
- }
+ /**
+ * The phase to remove this adjustment from.
+ */
+ plan_phase_order?: number | null;
+ }
- export interface NewPlanBulkPrice {
- bulk_config: NewPlanBulkPrice.BulkConfig;
+ export interface RemovePrice {
+ /**
+ * The id of the price to remove from the plan.
+ */
+ price_id: string;
- /**
- * The cadence to bill for this price on.
- */
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
+ /**
+ * The phase to remove this price from.
+ */
+ plan_phase_order?: number | null;
+ }
- /**
- * The id of the item the price will be associated with.
- */
- item_id: string;
+ export interface ReplaceAdjustment {
+ /**
+ * The definition of a new adjustment to create and add to the plan.
+ */
+ adjustment:
+ | Shared.NewPercentageDiscount
+ | Shared.NewUsageDiscount
+ | Shared.NewAmountDiscount
+ | Shared.NewMinimum
+ | Shared.NewMaximum;
- model_type: 'bulk';
+ /**
+ * The id of the adjustment on the plan to replace in the plan.
+ */
+ replaces_adjustment_id: string;
- /**
- * The name of the price.
- */
- name: string;
+ /**
+ * The phase to replace this adjustment from.
+ */
+ plan_phase_order?: number | null;
+ }
- /**
- * The id of the billable metric for the price. Only needed if the price is
- * usage-based.
- */
- billable_metric_id?: string | null;
+ export interface ReplacePrice {
+ /**
+ * The id of the price on the plan to replace in the plan.
+ */
+ replaces_price_id: string;
- /**
- * 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;
+ /**
+ * The allocation price to add to the plan.
+ */
+ allocation_price?: Shared.NewAllocationPrice | null;
- /**
- * For custom cadence: specifies the duration of the billing period in days or
- * months.
- */
- billing_cycle_configuration?: NewPlanBulkPrice.BillingCycleConfiguration | null;
+ /**
+ * The phase to replace this price from.
+ */
+ plan_phase_order?: number | 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