From d431aae064fa65d8aaf44d0fbc650f5fe66311b5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 16 Nov 2025 02:25:26 +0000 Subject: [PATCH 1/2] feat(api): api update --- .stats.yml | 4 +- src/resources/beta/beta.ts | 258 ++++++++++ src/resources/beta/external-plan-id.ts | 258 ++++++++++ src/resources/plans/plans.ts | 171 ++++++- src/resources/prices/prices.ts | 366 ++++++++++++++ src/resources/shared.ts | 138 +++++ src/resources/subscriptions.ts | 672 ++++++++++++++++++++++++- 7 files changed, 1827 insertions(+), 40 deletions(-) diff --git a/.stats.yml b/.stats.yml index 107688d5..30ac7b66 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 118 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-9e751a2aefff382af949380b5979a80cb02743eca1583cf5146325fb400ba87f.yml -openapi_spec_hash: 219a1008f47d3293f64f1baebe2d6eb5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-947253d9be505473c1c2cb0193d2602fa6b017e221f482be3f4f374c6156b350.yml +openapi_spec_hash: 1b40d1a85b4b846a1c14634fbbc65da3 config_hash: e6db17547fe854b1c240407cf4c6dc9e diff --git a/src/resources/beta/beta.ts b/src/resources/beta/beta.ts index 09d43f70..87dba090 100644 --- a/src/resources/beta/beta.ts +++ b/src/resources/beta/beta.ts @@ -202,6 +202,7 @@ export namespace BetaCreatePlanVersionParams { | Shared.NewPlanScalableMatrixWithUnitPricingPrice | Shared.NewPlanScalableMatrixWithTieredPricingPrice | Shared.NewPlanCumulativeGroupedBulkPrice + | AddPrice.NewPlanCumulativeGroupedAllocationPrice | Shared.NewPlanMinimumCompositePrice | AddPrice.NewPlanPercentCompositePrice | AddPrice.NewPlanEventOutputPrice @@ -618,6 +619,134 @@ export namespace BetaCreatePlanVersionParams { } } + export interface NewPlanCumulativeGroupedAllocationPrice { + /** + * The cadence to bill for this price on. + */ + cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; + + /** + * Configuration for cumulative_grouped_allocation pricing + */ + cumulative_grouped_allocation_config: NewPlanCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig; + + /** + * The id of the item the price will be associated with. + */ + item_id: string; + + /** + * The pricing model type + */ + model_type: 'cumulative_grouped_allocation'; + + /** + * The name of the price. + */ + name: string; + + /** + * The id of the billable metric for the price. Only needed if the price is + * usage-based. + */ + billable_metric_id?: string | null; + + /** + * If the Price represents a fixed cost, the price will be billed in-advance if + * this is true, and in-arrears if this is false. + */ + billed_in_advance?: boolean | null; + + /** + * For custom cadence: specifies the duration of the billing period in days or + * months. + */ + billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null; + + /** + * The per unit conversion rate of the price currency to the invoicing currency. + */ + conversion_rate?: number | null; + + /** + * The configuration for the rate of the price currency to the invoicing currency. + */ + conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null; + + /** + * An ISO 4217 currency string, or custom pricing unit identifier, in which this + * price is billed. + */ + currency?: string | null; + + /** + * For dimensional price: specifies a price group and dimension values + */ + dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null; + + /** + * An alias for the price. + */ + external_price_id?: string | null; + + /** + * If the Price represents a fixed cost, this represents the quantity of units + * applied. + */ + fixed_price_quantity?: number | null; + + /** + * The property used to group this price on an invoice + */ + invoice_grouping_key?: string | null; + + /** + * Within each billing cycle, specifies the cadence at which invoices are produced. + * If unspecified, a single invoice is produced per billing cycle. + */ + invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null; + + /** + * User-specified key/value pairs for the resource. Individual keys can be removed + * by setting the value to `null`, and the entire metadata mapping can be cleared + * by setting `metadata` to `null`. + */ + metadata?: { [key: string]: string | null } | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; + } + + export namespace NewPlanCumulativeGroupedAllocationPrice { + /** + * Configuration for cumulative_grouped_allocation pricing + */ + export interface CumulativeGroupedAllocationConfig { + /** + * The overall allocation across all groups + */ + cumulative_allocation: string; + + /** + * The allocation per individual group + */ + group_allocation: string; + + /** + * The event property used to group usage before applying allocations + */ + grouping_key: string; + + /** + * The amount to charge for each unit outside of the allocation + */ + unit_amount: string; + } + } + export interface NewPlanPercentCompositePrice { /** * The cadence to bill for this price on. @@ -951,6 +1080,7 @@ export namespace BetaCreatePlanVersionParams { | Shared.NewPlanScalableMatrixWithUnitPricingPrice | Shared.NewPlanScalableMatrixWithTieredPricingPrice | Shared.NewPlanCumulativeGroupedBulkPrice + | ReplacePrice.NewPlanCumulativeGroupedAllocationPrice | Shared.NewPlanMinimumCompositePrice | ReplacePrice.NewPlanPercentCompositePrice | ReplacePrice.NewPlanEventOutputPrice @@ -1367,6 +1497,134 @@ export namespace BetaCreatePlanVersionParams { } } + export interface NewPlanCumulativeGroupedAllocationPrice { + /** + * The cadence to bill for this price on. + */ + cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; + + /** + * Configuration for cumulative_grouped_allocation pricing + */ + cumulative_grouped_allocation_config: NewPlanCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig; + + /** + * The id of the item the price will be associated with. + */ + item_id: string; + + /** + * The pricing model type + */ + model_type: 'cumulative_grouped_allocation'; + + /** + * The name of the price. + */ + name: string; + + /** + * The id of the billable metric for the price. Only needed if the price is + * usage-based. + */ + billable_metric_id?: string | null; + + /** + * If the Price represents a fixed cost, the price will be billed in-advance if + * this is true, and in-arrears if this is false. + */ + billed_in_advance?: boolean | null; + + /** + * For custom cadence: specifies the duration of the billing period in days or + * months. + */ + billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null; + + /** + * The per unit conversion rate of the price currency to the invoicing currency. + */ + conversion_rate?: number | null; + + /** + * The configuration for the rate of the price currency to the invoicing currency. + */ + conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null; + + /** + * An ISO 4217 currency string, or custom pricing unit identifier, in which this + * price is billed. + */ + currency?: string | null; + + /** + * For dimensional price: specifies a price group and dimension values + */ + dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null; + + /** + * An alias for the price. + */ + external_price_id?: string | null; + + /** + * If the Price represents a fixed cost, this represents the quantity of units + * applied. + */ + fixed_price_quantity?: number | null; + + /** + * The property used to group this price on an invoice + */ + invoice_grouping_key?: string | null; + + /** + * Within each billing cycle, specifies the cadence at which invoices are produced. + * If unspecified, a single invoice is produced per billing cycle. + */ + invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null; + + /** + * User-specified key/value pairs for the resource. Individual keys can be removed + * by setting the value to `null`, and the entire metadata mapping can be cleared + * by setting `metadata` to `null`. + */ + metadata?: { [key: string]: string | null } | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; + } + + export namespace NewPlanCumulativeGroupedAllocationPrice { + /** + * Configuration for cumulative_grouped_allocation pricing + */ + export interface CumulativeGroupedAllocationConfig { + /** + * The overall allocation across all groups + */ + cumulative_allocation: string; + + /** + * The allocation per individual group + */ + group_allocation: string; + + /** + * The event property used to group usage before applying allocations + */ + grouping_key: string; + + /** + * The amount to charge for each unit outside of the allocation + */ + unit_amount: string; + } + } + export interface NewPlanPercentCompositePrice { /** * The cadence to bill for this price on. diff --git a/src/resources/beta/external-plan-id.ts b/src/resources/beta/external-plan-id.ts index 6c56838f..d33ee80b 100644 --- a/src/resources/beta/external-plan-id.ts +++ b/src/resources/beta/external-plan-id.ts @@ -147,6 +147,7 @@ export namespace ExternalPlanIDCreatePlanVersionParams { | Shared.NewPlanScalableMatrixWithUnitPricingPrice | Shared.NewPlanScalableMatrixWithTieredPricingPrice | Shared.NewPlanCumulativeGroupedBulkPrice + | AddPrice.NewPlanCumulativeGroupedAllocationPrice | Shared.NewPlanMinimumCompositePrice | AddPrice.NewPlanPercentCompositePrice | AddPrice.NewPlanEventOutputPrice @@ -563,6 +564,134 @@ export namespace ExternalPlanIDCreatePlanVersionParams { } } + export interface NewPlanCumulativeGroupedAllocationPrice { + /** + * The cadence to bill for this price on. + */ + cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; + + /** + * Configuration for cumulative_grouped_allocation pricing + */ + cumulative_grouped_allocation_config: NewPlanCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig; + + /** + * The id of the item the price will be associated with. + */ + item_id: string; + + /** + * The pricing model type + */ + model_type: 'cumulative_grouped_allocation'; + + /** + * The name of the price. + */ + name: string; + + /** + * The id of the billable metric for the price. Only needed if the price is + * usage-based. + */ + billable_metric_id?: string | null; + + /** + * If the Price represents a fixed cost, the price will be billed in-advance if + * this is true, and in-arrears if this is false. + */ + billed_in_advance?: boolean | null; + + /** + * For custom cadence: specifies the duration of the billing period in days or + * months. + */ + billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null; + + /** + * The per unit conversion rate of the price currency to the invoicing currency. + */ + conversion_rate?: number | null; + + /** + * The configuration for the rate of the price currency to the invoicing currency. + */ + conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null; + + /** + * An ISO 4217 currency string, or custom pricing unit identifier, in which this + * price is billed. + */ + currency?: string | null; + + /** + * For dimensional price: specifies a price group and dimension values + */ + dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null; + + /** + * An alias for the price. + */ + external_price_id?: string | null; + + /** + * If the Price represents a fixed cost, this represents the quantity of units + * applied. + */ + fixed_price_quantity?: number | null; + + /** + * The property used to group this price on an invoice + */ + invoice_grouping_key?: string | null; + + /** + * Within each billing cycle, specifies the cadence at which invoices are produced. + * If unspecified, a single invoice is produced per billing cycle. + */ + invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null; + + /** + * User-specified key/value pairs for the resource. Individual keys can be removed + * by setting the value to `null`, and the entire metadata mapping can be cleared + * by setting `metadata` to `null`. + */ + metadata?: { [key: string]: string | null } | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; + } + + export namespace NewPlanCumulativeGroupedAllocationPrice { + /** + * Configuration for cumulative_grouped_allocation pricing + */ + export interface CumulativeGroupedAllocationConfig { + /** + * The overall allocation across all groups + */ + cumulative_allocation: string; + + /** + * The allocation per individual group + */ + group_allocation: string; + + /** + * The event property used to group usage before applying allocations + */ + grouping_key: string; + + /** + * The amount to charge for each unit outside of the allocation + */ + unit_amount: string; + } + } + export interface NewPlanPercentCompositePrice { /** * The cadence to bill for this price on. @@ -896,6 +1025,7 @@ export namespace ExternalPlanIDCreatePlanVersionParams { | Shared.NewPlanScalableMatrixWithUnitPricingPrice | Shared.NewPlanScalableMatrixWithTieredPricingPrice | Shared.NewPlanCumulativeGroupedBulkPrice + | ReplacePrice.NewPlanCumulativeGroupedAllocationPrice | Shared.NewPlanMinimumCompositePrice | ReplacePrice.NewPlanPercentCompositePrice | ReplacePrice.NewPlanEventOutputPrice @@ -1312,6 +1442,134 @@ export namespace ExternalPlanIDCreatePlanVersionParams { } } + export interface NewPlanCumulativeGroupedAllocationPrice { + /** + * The cadence to bill for this price on. + */ + cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; + + /** + * Configuration for cumulative_grouped_allocation pricing + */ + cumulative_grouped_allocation_config: NewPlanCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig; + + /** + * The id of the item the price will be associated with. + */ + item_id: string; + + /** + * The pricing model type + */ + model_type: 'cumulative_grouped_allocation'; + + /** + * The name of the price. + */ + name: string; + + /** + * The id of the billable metric for the price. Only needed if the price is + * usage-based. + */ + billable_metric_id?: string | null; + + /** + * If the Price represents a fixed cost, the price will be billed in-advance if + * this is true, and in-arrears if this is false. + */ + billed_in_advance?: boolean | null; + + /** + * For custom cadence: specifies the duration of the billing period in days or + * months. + */ + billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null; + + /** + * The per unit conversion rate of the price currency to the invoicing currency. + */ + conversion_rate?: number | null; + + /** + * The configuration for the rate of the price currency to the invoicing currency. + */ + conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null; + + /** + * An ISO 4217 currency string, or custom pricing unit identifier, in which this + * price is billed. + */ + currency?: string | null; + + /** + * For dimensional price: specifies a price group and dimension values + */ + dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null; + + /** + * An alias for the price. + */ + external_price_id?: string | null; + + /** + * If the Price represents a fixed cost, this represents the quantity of units + * applied. + */ + fixed_price_quantity?: number | null; + + /** + * The property used to group this price on an invoice + */ + invoice_grouping_key?: string | null; + + /** + * Within each billing cycle, specifies the cadence at which invoices are produced. + * If unspecified, a single invoice is produced per billing cycle. + */ + invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null; + + /** + * User-specified key/value pairs for the resource. Individual keys can be removed + * by setting the value to `null`, and the entire metadata mapping can be cleared + * by setting `metadata` to `null`. + */ + metadata?: { [key: string]: string | null } | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; + } + + export namespace NewPlanCumulativeGroupedAllocationPrice { + /** + * Configuration for cumulative_grouped_allocation pricing + */ + export interface CumulativeGroupedAllocationConfig { + /** + * The overall allocation across all groups + */ + cumulative_allocation: string; + + /** + * The allocation per individual group + */ + group_allocation: string; + + /** + * The event property used to group usage before applying allocations + */ + grouping_key: string; + + /** + * The amount to charge for each unit outside of the allocation + */ + unit_amount: string; + } + } + export interface NewPlanPercentCompositePrice { /** * The cadence to bill for this price on. diff --git a/src/resources/plans/plans.ts b/src/resources/plans/plans.ts index d0483499..e118d84c 100644 --- a/src/resources/plans/plans.ts +++ b/src/resources/plans/plans.ts @@ -94,14 +94,6 @@ export interface Plan { | Shared.PlanPhaseMaximumAdjustment >; - base_plan: Plan.BasePlan | null; - - /** - * The parent plan id if the given plan was created by overriding one or more of - * the parent's prices - */ - base_plan_id: string | null; - created_at: string; /** @@ -190,22 +182,17 @@ export interface Plan { trial_config: Plan.TrialConfig; version: number; -} -export namespace Plan { - export interface BasePlan { - id: string | null; + base_plan?: Plan.BasePlan | null; - /** - * An optional user-defined ID for this plan resource, used throughout the system - * as an alias for this Plan. Use this field to identify a plan by an existing - * identifier in your system. - */ - external_plan_id: string | null; - - name: string | null; - } + /** + * The parent plan id if the given plan was created by overriding one or more of + * the parent's prices + */ + base_plan_id?: string | null; +} +export namespace Plan { export interface PlanPhase { id: string; @@ -250,6 +237,19 @@ export namespace Plan { trial_period_unit: 'days'; } + + export interface BasePlan { + id: string | null; + + /** + * An optional user-defined ID for this plan resource, used throughout the system + * as an alias for this Plan. Use this field to identify a plan by an existing + * identifier in your system. + */ + external_plan_id: string | null; + + name: string | null; + } } export interface PlanCreateParams { @@ -350,6 +350,7 @@ export namespace PlanCreateParams { | Shared.NewPlanScalableMatrixWithUnitPricingPrice | Shared.NewPlanScalableMatrixWithTieredPricingPrice | Shared.NewPlanCumulativeGroupedBulkPrice + | Price.NewPlanCumulativeGroupedAllocationPrice | Shared.NewPlanMinimumCompositePrice | Price.NewPlanPercentCompositePrice | Price.NewPlanEventOutputPrice @@ -766,6 +767,134 @@ export namespace PlanCreateParams { } } + export interface NewPlanCumulativeGroupedAllocationPrice { + /** + * The cadence to bill for this price on. + */ + cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; + + /** + * Configuration for cumulative_grouped_allocation pricing + */ + cumulative_grouped_allocation_config: NewPlanCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig; + + /** + * The id of the item the price will be associated with. + */ + item_id: string; + + /** + * The pricing model type + */ + model_type: 'cumulative_grouped_allocation'; + + /** + * The name of the price. + */ + name: string; + + /** + * The id of the billable metric for the price. Only needed if the price is + * usage-based. + */ + billable_metric_id?: string | null; + + /** + * If the Price represents a fixed cost, the price will be billed in-advance if + * this is true, and in-arrears if this is false. + */ + billed_in_advance?: boolean | null; + + /** + * For custom cadence: specifies the duration of the billing period in days or + * months. + */ + billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null; + + /** + * The per unit conversion rate of the price currency to the invoicing currency. + */ + conversion_rate?: number | null; + + /** + * The configuration for the rate of the price currency to the invoicing currency. + */ + conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null; + + /** + * An ISO 4217 currency string, or custom pricing unit identifier, in which this + * price is billed. + */ + currency?: string | null; + + /** + * For dimensional price: specifies a price group and dimension values + */ + dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null; + + /** + * An alias for the price. + */ + external_price_id?: string | null; + + /** + * If the Price represents a fixed cost, this represents the quantity of units + * applied. + */ + fixed_price_quantity?: number | null; + + /** + * The property used to group this price on an invoice + */ + invoice_grouping_key?: string | null; + + /** + * Within each billing cycle, specifies the cadence at which invoices are produced. + * If unspecified, a single invoice is produced per billing cycle. + */ + invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null; + + /** + * User-specified key/value pairs for the resource. Individual keys can be removed + * by setting the value to `null`, and the entire metadata mapping can be cleared + * by setting `metadata` to `null`. + */ + metadata?: { [key: string]: string | null } | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; + } + + export namespace NewPlanCumulativeGroupedAllocationPrice { + /** + * Configuration for cumulative_grouped_allocation pricing + */ + export interface CumulativeGroupedAllocationConfig { + /** + * The overall allocation across all groups + */ + cumulative_allocation: string; + + /** + * The allocation per individual group + */ + group_allocation: string; + + /** + * The event property used to group usage before applying allocations + */ + grouping_key: string; + + /** + * The amount to charge for each unit outside of the allocation + */ + unit_amount: string; + } + } + export interface NewPlanPercentCompositePrice { /** * The cadence to bill for this price on. diff --git a/src/resources/prices/prices.ts b/src/resources/prices/prices.ts index b19cbe96..77720bfd 100644 --- a/src/resources/prices/prices.ts +++ b/src/resources/prices/prices.ts @@ -281,6 +281,7 @@ export type PriceCreateParams = | PriceCreateParams.NewFloatingScalableMatrixWithUnitPricingPrice | PriceCreateParams.NewFloatingScalableMatrixWithTieredPricingPrice | PriceCreateParams.NewFloatingCumulativeGroupedBulkPrice + | PriceCreateParams.NewFloatingCumulativeGroupedAllocationPrice | PriceCreateParams.NewFloatingMinimumCompositePrice | PriceCreateParams.NewFloatingPercentCompositePrice | PriceCreateParams.NewFloatingEventOutputPrice; @@ -3592,6 +3593,127 @@ export declare namespace PriceCreateParams { } } + export interface NewFloatingCumulativeGroupedAllocationPrice { + /** + * The cadence to bill for this price on. + */ + cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; + + /** + * Configuration for cumulative_grouped_allocation pricing + */ + cumulative_grouped_allocation_config: NewFloatingCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig; + + /** + * An ISO 4217 currency string for which this price is billed in. + */ + currency: string; + + /** + * The id of the item the price will be associated with. + */ + item_id: string; + + /** + * The pricing model type + */ + model_type: 'cumulative_grouped_allocation'; + + /** + * The name of the price. + */ + name: string; + + /** + * The id of the billable metric for the price. Only needed if the price is + * usage-based. + */ + billable_metric_id?: string | null; + + /** + * If the Price represents a fixed cost, the price will be billed in-advance if + * this is true, and in-arrears if this is false. + */ + billed_in_advance?: boolean | null; + + /** + * For custom cadence: specifies the duration of the billing period in days or + * months. + */ + billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null; + + /** + * The per unit conversion rate of the price currency to the invoicing currency. + */ + conversion_rate?: number | null; + + /** + * The configuration for the rate of the price currency to the invoicing currency. + */ + conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null; + + /** + * For dimensional price: specifies a price group and dimension values + */ + dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null; + + /** + * An alias for the price. + */ + external_price_id?: string | null; + + /** + * If the Price represents a fixed cost, this represents the quantity of units + * applied. + */ + fixed_price_quantity?: number | null; + + /** + * The property used to group this price on an invoice + */ + invoice_grouping_key?: string | null; + + /** + * Within each billing cycle, specifies the cadence at which invoices are produced. + * If unspecified, a single invoice is produced per billing cycle. + */ + invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null; + + /** + * User-specified key/value pairs for the resource. Individual keys can be removed + * by setting the value to `null`, and the entire metadata mapping can be cleared + * by setting `metadata` to `null`. + */ + metadata?: { [key: string]: string | null } | null; + } + + export namespace NewFloatingCumulativeGroupedAllocationPrice { + /** + * Configuration for cumulative_grouped_allocation pricing + */ + export interface CumulativeGroupedAllocationConfig { + /** + * The overall allocation across all groups + */ + cumulative_allocation: string; + + /** + * The allocation per individual group + */ + group_allocation: string; + + /** + * The event property used to group usage before applying allocations + */ + grouping_key: string; + + /** + * The amount to charge for each unit outside of the allocation + */ + unit_amount: string; + } + } + export interface NewFloatingMinimumCompositePrice { /** * The cadence to bill for this price on. @@ -4055,6 +4177,7 @@ export namespace PriceEvaluateMultipleParams { | Shared.NewFloatingScalableMatrixWithUnitPricingPrice | Shared.NewFloatingScalableMatrixWithTieredPricingPrice | Shared.NewFloatingCumulativeGroupedBulkPrice + | PriceEvaluation.NewFloatingCumulativeGroupedAllocationPrice | Shared.NewFloatingMinimumCompositePrice | PriceEvaluation.NewFloatingPercentCompositePrice | PriceEvaluation.NewFloatingEventOutputPrice @@ -4331,6 +4454,127 @@ export namespace PriceEvaluateMultipleParams { } } + export interface NewFloatingCumulativeGroupedAllocationPrice { + /** + * The cadence to bill for this price on. + */ + cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; + + /** + * Configuration for cumulative_grouped_allocation pricing + */ + cumulative_grouped_allocation_config: NewFloatingCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig; + + /** + * An ISO 4217 currency string for which this price is billed in. + */ + currency: string; + + /** + * The id of the item the price will be associated with. + */ + item_id: string; + + /** + * The pricing model type + */ + model_type: 'cumulative_grouped_allocation'; + + /** + * The name of the price. + */ + name: string; + + /** + * The id of the billable metric for the price. Only needed if the price is + * usage-based. + */ + billable_metric_id?: string | null; + + /** + * If the Price represents a fixed cost, the price will be billed in-advance if + * this is true, and in-arrears if this is false. + */ + billed_in_advance?: boolean | null; + + /** + * For custom cadence: specifies the duration of the billing period in days or + * months. + */ + billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null; + + /** + * The per unit conversion rate of the price currency to the invoicing currency. + */ + conversion_rate?: number | null; + + /** + * The configuration for the rate of the price currency to the invoicing currency. + */ + conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null; + + /** + * For dimensional price: specifies a price group and dimension values + */ + dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null; + + /** + * An alias for the price. + */ + external_price_id?: string | null; + + /** + * If the Price represents a fixed cost, this represents the quantity of units + * applied. + */ + fixed_price_quantity?: number | null; + + /** + * The property used to group this price on an invoice + */ + invoice_grouping_key?: string | null; + + /** + * Within each billing cycle, specifies the cadence at which invoices are produced. + * If unspecified, a single invoice is produced per billing cycle. + */ + invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null; + + /** + * User-specified key/value pairs for the resource. Individual keys can be removed + * by setting the value to `null`, and the entire metadata mapping can be cleared + * by setting `metadata` to `null`. + */ + metadata?: { [key: string]: string | null } | null; + } + + export namespace NewFloatingCumulativeGroupedAllocationPrice { + /** + * Configuration for cumulative_grouped_allocation pricing + */ + export interface CumulativeGroupedAllocationConfig { + /** + * The overall allocation across all groups + */ + cumulative_allocation: string; + + /** + * The allocation per individual group + */ + group_allocation: string; + + /** + * The event property used to group usage before applying allocations + */ + grouping_key: string; + + /** + * The amount to charge for each unit outside of the allocation + */ + unit_amount: string; + } + } + export interface NewFloatingPercentCompositePrice { /** * The cadence to bill for this price on. @@ -4673,6 +4917,7 @@ export namespace PriceEvaluatePreviewEventsParams { | Shared.NewFloatingScalableMatrixWithUnitPricingPrice | Shared.NewFloatingScalableMatrixWithTieredPricingPrice | Shared.NewFloatingCumulativeGroupedBulkPrice + | PriceEvaluation.NewFloatingCumulativeGroupedAllocationPrice | Shared.NewFloatingMinimumCompositePrice | PriceEvaluation.NewFloatingPercentCompositePrice | PriceEvaluation.NewFloatingEventOutputPrice @@ -4949,6 +5194,127 @@ export namespace PriceEvaluatePreviewEventsParams { } } + export interface NewFloatingCumulativeGroupedAllocationPrice { + /** + * The cadence to bill for this price on. + */ + cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; + + /** + * Configuration for cumulative_grouped_allocation pricing + */ + cumulative_grouped_allocation_config: NewFloatingCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig; + + /** + * An ISO 4217 currency string for which this price is billed in. + */ + currency: string; + + /** + * The id of the item the price will be associated with. + */ + item_id: string; + + /** + * The pricing model type + */ + model_type: 'cumulative_grouped_allocation'; + + /** + * The name of the price. + */ + name: string; + + /** + * The id of the billable metric for the price. Only needed if the price is + * usage-based. + */ + billable_metric_id?: string | null; + + /** + * If the Price represents a fixed cost, the price will be billed in-advance if + * this is true, and in-arrears if this is false. + */ + billed_in_advance?: boolean | null; + + /** + * For custom cadence: specifies the duration of the billing period in days or + * months. + */ + billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null; + + /** + * The per unit conversion rate of the price currency to the invoicing currency. + */ + conversion_rate?: number | null; + + /** + * The configuration for the rate of the price currency to the invoicing currency. + */ + conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null; + + /** + * For dimensional price: specifies a price group and dimension values + */ + dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null; + + /** + * An alias for the price. + */ + external_price_id?: string | null; + + /** + * If the Price represents a fixed cost, this represents the quantity of units + * applied. + */ + fixed_price_quantity?: number | null; + + /** + * The property used to group this price on an invoice + */ + invoice_grouping_key?: string | null; + + /** + * Within each billing cycle, specifies the cadence at which invoices are produced. + * If unspecified, a single invoice is produced per billing cycle. + */ + invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null; + + /** + * User-specified key/value pairs for the resource. Individual keys can be removed + * by setting the value to `null`, and the entire metadata mapping can be cleared + * by setting `metadata` to `null`. + */ + metadata?: { [key: string]: string | null } | null; + } + + export namespace NewFloatingCumulativeGroupedAllocationPrice { + /** + * Configuration for cumulative_grouped_allocation pricing + */ + export interface CumulativeGroupedAllocationConfig { + /** + * The overall allocation across all groups + */ + cumulative_allocation: string; + + /** + * The allocation per individual group + */ + group_allocation: string; + + /** + * The event property used to group usage before applying allocations + */ + grouping_key: string; + + /** + * The amount to charge for each unit outside of the allocation + */ + unit_amount: string; + } + } + export interface NewFloatingPercentCompositePrice { /** * The cadence to bill for this price on. diff --git a/src/resources/shared.ts b/src/resources/shared.ts index f1008ee2..221fbda0 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -9979,6 +9979,7 @@ export type Price = | Price.ScalableMatrixWithUnitPricingPrice | Price.ScalableMatrixWithTieredPricingPrice | Price.CumulativeGroupedBulkPrice + | Price.CumulativeGroupedAllocationPrice | Price.MinimumCompositePrice | Price.PercentCompositePrice | Price.EventOutputPrice; @@ -13734,6 +13735,143 @@ export namespace Price { } } + export interface CumulativeGroupedAllocationPrice { + id: string; + + billable_metric: Shared.BillableMetricTiny | null; + + billing_cycle_configuration: Shared.BillingCycleConfiguration; + + billing_mode: 'in_advance' | 'in_arrear'; + + cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom'; + + composite_price_filters: Array | null; + + conversion_rate: number | null; + + conversion_rate_config: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null; + + created_at: string; + + credit_allocation: Shared.Allocation | null; + + /** + * Configuration for cumulative_grouped_allocation pricing + */ + cumulative_grouped_allocation_config: CumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig; + + currency: string; + + /** + * @deprecated + */ + discount: Shared.Discount | null; + + external_price_id: string | null; + + fixed_price_quantity: number | null; + + invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null; + + /** + * A minimal representation of an Item containing only the essential identifying + * information. + */ + item: Shared.ItemSlim; + + /** + * @deprecated + */ + maximum: Shared.Maximum | null; + + /** + * @deprecated + */ + maximum_amount: string | null; + + /** + * User specified key-value pairs for the resource. If not present, this defaults + * to an empty dictionary. Individual keys can be removed by setting the value to + * `null`, and the entire metadata mapping can be cleared by setting `metadata` to + * `null`. + */ + metadata: { [key: string]: string }; + + /** + * @deprecated + */ + minimum: Shared.Minimum | null; + + /** + * @deprecated + */ + minimum_amount: string | null; + + /** + * The pricing model type + */ + model_type: 'cumulative_grouped_allocation'; + + name: string; + + plan_phase_order: number | null; + + price_type: 'usage_price' | 'fixed_price' | 'composite_price'; + + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + + dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; + } + + export namespace CumulativeGroupedAllocationPrice { + export interface CompositePriceFilter { + /** + * 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; + } + + /** + * Configuration for cumulative_grouped_allocation pricing + */ + export interface CumulativeGroupedAllocationConfig { + /** + * The overall allocation across all groups + */ + cumulative_allocation: string; + + /** + * The allocation per individual group + */ + group_allocation: string; + + /** + * The event property used to group usage before applying allocations + */ + grouping_key: string; + + /** + * The amount to charge for each unit outside of the allocation + */ + unit_amount: string; + } + } + export interface MinimumCompositePrice { id: string; diff --git a/src/resources/subscriptions.ts b/src/resources/subscriptions.ts index 37ff53b6..2f15b31d 100644 --- a/src/resources/subscriptions.ts +++ b/src/resources/subscriptions.ts @@ -4869,6 +4869,7 @@ export namespace SubscriptionCreateParams { | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice + | AddPrice.NewSubscriptionCumulativeGroupedAllocationPrice | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice | AddPrice.NewSubscriptionPercentCompositePrice | AddPrice.NewSubscriptionEventOutputPrice @@ -5297,6 +5298,134 @@ export namespace SubscriptionCreateParams { } } + export interface NewSubscriptionCumulativeGroupedAllocationPrice { + /** + * The cadence to bill for this price on. + */ + cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; + + /** + * Configuration for cumulative_grouped_allocation pricing + */ + cumulative_grouped_allocation_config: NewSubscriptionCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig; + + /** + * The id of the item the price will be associated with. + */ + item_id: string; + + /** + * The pricing model type + */ + model_type: 'cumulative_grouped_allocation'; + + /** + * The name of the price. + */ + name: string; + + /** + * The id of the billable metric for the price. Only needed if the price is + * usage-based. + */ + billable_metric_id?: string | null; + + /** + * If the Price represents a fixed cost, the price will be billed in-advance if + * this is true, and in-arrears if this is false. + */ + billed_in_advance?: boolean | null; + + /** + * For custom cadence: specifies the duration of the billing period in days or + * months. + */ + billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null; + + /** + * The per unit conversion rate of the price currency to the invoicing currency. + */ + conversion_rate?: number | null; + + /** + * The configuration for the rate of the price currency to the invoicing currency. + */ + conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null; + + /** + * An ISO 4217 currency string, or custom pricing unit identifier, in which this + * price is billed. + */ + currency?: string | null; + + /** + * For dimensional price: specifies a price group and dimension values + */ + dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null; + + /** + * An alias for the price. + */ + external_price_id?: string | null; + + /** + * If the Price represents a fixed cost, this represents the quantity of units + * applied. + */ + fixed_price_quantity?: number | null; + + /** + * The property used to group this price on an invoice + */ + invoice_grouping_key?: string | null; + + /** + * Within each billing cycle, specifies the cadence at which invoices are produced. + * If unspecified, a single invoice is produced per billing cycle. + */ + invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null; + + /** + * User-specified key/value pairs for the resource. Individual keys can be removed + * by setting the value to `null`, and the entire metadata mapping can be cleared + * by setting `metadata` to `null`. + */ + metadata?: { [key: string]: string | null } | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; + } + + export namespace NewSubscriptionCumulativeGroupedAllocationPrice { + /** + * Configuration for cumulative_grouped_allocation pricing + */ + export interface CumulativeGroupedAllocationConfig { + /** + * The overall allocation across all groups + */ + cumulative_allocation: string; + + /** + * The allocation per individual group + */ + group_allocation: string; + + /** + * The event property used to group usage before applying allocations + */ + grouping_key: string; + + /** + * The amount to charge for each unit outside of the allocation + */ + unit_amount: string; + } + } + export interface NewSubscriptionPercentCompositePrice { /** * The cadence to bill for this price on. @@ -5643,6 +5772,7 @@ export namespace SubscriptionCreateParams { | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice + | ReplacePrice.NewSubscriptionCumulativeGroupedAllocationPrice | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice | ReplacePrice.NewSubscriptionPercentCompositePrice | ReplacePrice.NewSubscriptionEventOutputPrice @@ -6064,6 +6194,134 @@ export namespace SubscriptionCreateParams { } } + export interface NewSubscriptionCumulativeGroupedAllocationPrice { + /** + * The cadence to bill for this price on. + */ + cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; + + /** + * Configuration for cumulative_grouped_allocation pricing + */ + cumulative_grouped_allocation_config: NewSubscriptionCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig; + + /** + * The id of the item the price will be associated with. + */ + item_id: string; + + /** + * The pricing model type + */ + model_type: 'cumulative_grouped_allocation'; + + /** + * The name of the price. + */ + name: string; + + /** + * The id of the billable metric for the price. Only needed if the price is + * usage-based. + */ + billable_metric_id?: string | null; + + /** + * If the Price represents a fixed cost, the price will be billed in-advance if + * this is true, and in-arrears if this is false. + */ + billed_in_advance?: boolean | null; + + /** + * For custom cadence: specifies the duration of the billing period in days or + * months. + */ + billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null; + + /** + * The per unit conversion rate of the price currency to the invoicing currency. + */ + conversion_rate?: number | null; + + /** + * The configuration for the rate of the price currency to the invoicing currency. + */ + conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null; + + /** + * An ISO 4217 currency string, or custom pricing unit identifier, in which this + * price is billed. + */ + currency?: string | null; + + /** + * For dimensional price: specifies a price group and dimension values + */ + dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null; + + /** + * An alias for the price. + */ + external_price_id?: string | null; + + /** + * If the Price represents a fixed cost, this represents the quantity of units + * applied. + */ + fixed_price_quantity?: number | null; + + /** + * The property used to group this price on an invoice + */ + invoice_grouping_key?: string | null; + + /** + * Within each billing cycle, specifies the cadence at which invoices are produced. + * If unspecified, a single invoice is produced per billing cycle. + */ + invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null; + + /** + * User-specified key/value pairs for the resource. Individual keys can be removed + * by setting the value to `null`, and the entire metadata mapping can be cleared + * by setting `metadata` to `null`. + */ + metadata?: { [key: string]: string | null } | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; + } + + export namespace NewSubscriptionCumulativeGroupedAllocationPrice { + /** + * Configuration for cumulative_grouped_allocation pricing + */ + export interface CumulativeGroupedAllocationConfig { + /** + * The overall allocation across all groups + */ + cumulative_allocation: string; + + /** + * The allocation per individual group + */ + group_allocation: string; + + /** + * The event property used to group usage before applying allocations + */ + grouping_key: string; + + /** + * The amount to charge for each unit outside of the allocation + */ + unit_amount: string; + } + } + export interface NewSubscriptionPercentCompositePrice { /** * The cadence to bill for this price on. @@ -6587,6 +6845,7 @@ export namespace SubscriptionPriceIntervalsParams { | Shared.NewFloatingScalableMatrixWithUnitPricingPrice | Shared.NewFloatingScalableMatrixWithTieredPricingPrice | Shared.NewFloatingCumulativeGroupedBulkPrice + | Add.NewFloatingCumulativeGroupedAllocationPrice | Shared.NewFloatingMinimumCompositePrice | Add.NewFloatingPercentCompositePrice | Add.NewFloatingEventOutputPrice @@ -6793,21 +7052,142 @@ export namespace SubscriptionPriceIntervalsParams { } } - export interface NewFloatingGroupedWithMinMaxThresholdsPrice { + export interface NewFloatingGroupedWithMinMaxThresholdsPrice { + /** + * The cadence to bill for this price on. + */ + cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; + + /** + * An ISO 4217 currency string for which this price is billed in. + */ + currency: string; + + /** + * Configuration for grouped_with_min_max_thresholds pricing + */ + grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig; + + /** + * The id of the item the price will be associated with. + */ + item_id: string; + + /** + * The pricing model type + */ + model_type: 'grouped_with_min_max_thresholds'; + + /** + * The name of the price. + */ + name: string; + + /** + * The id of the billable metric for the price. Only needed if the price is + * usage-based. + */ + billable_metric_id?: string | null; + + /** + * If the Price represents a fixed cost, the price will be billed in-advance if + * this is true, and in-arrears if this is false. + */ + billed_in_advance?: boolean | null; + + /** + * For custom cadence: specifies the duration of the billing period in days or + * months. + */ + billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null; + + /** + * The per unit conversion rate of the price currency to the invoicing currency. + */ + conversion_rate?: number | null; + + /** + * The configuration for the rate of the price currency to the invoicing currency. + */ + conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null; + + /** + * For dimensional price: specifies a price group and dimension values + */ + dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null; + + /** + * An alias for the price. + */ + external_price_id?: string | null; + + /** + * If the Price represents a fixed cost, this represents the quantity of units + * applied. + */ + fixed_price_quantity?: number | null; + + /** + * The property used to group this price on an invoice + */ + invoice_grouping_key?: string | null; + + /** + * Within each billing cycle, specifies the cadence at which invoices are produced. + * If unspecified, a single invoice is produced per billing cycle. + */ + invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null; + + /** + * User-specified key/value pairs for the resource. Individual keys can be removed + * by setting the value to `null`, and the entire metadata mapping can be cleared + * by setting `metadata` to `null`. + */ + metadata?: { [key: string]: string | null } | null; + } + + export namespace NewFloatingGroupedWithMinMaxThresholdsPrice { + /** + * Configuration for grouped_with_min_max_thresholds pricing + */ + export interface GroupedWithMinMaxThresholdsConfig { + /** + * The event property used to group before applying thresholds + */ + grouping_key: string; + + /** + * The maximum amount to charge each group + */ + maximum_charge: string; + + /** + * The minimum amount to charge each group, regardless of usage + */ + minimum_charge: string; + + /** + * The base price charged per group + */ + per_unit_rate: string; + } + } + + export interface NewFloatingCumulativeGroupedAllocationPrice { /** * The cadence to bill for this price on. */ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; /** - * An ISO 4217 currency string for which this price is billed in. + * Configuration for cumulative_grouped_allocation pricing */ - currency: string; + cumulative_grouped_allocation_config: NewFloatingCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig; /** - * Configuration for grouped_with_min_max_thresholds pricing + * An ISO 4217 currency string for which this price is billed in. */ - grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig; + currency: string; /** * The id of the item the price will be associated with. @@ -6817,7 +7197,7 @@ export namespace SubscriptionPriceIntervalsParams { /** * The pricing model type */ - model_type: 'grouped_with_min_max_thresholds'; + model_type: 'cumulative_grouped_allocation'; /** * The name of the price. @@ -6887,30 +7267,30 @@ export namespace SubscriptionPriceIntervalsParams { metadata?: { [key: string]: string | null } | null; } - export namespace NewFloatingGroupedWithMinMaxThresholdsPrice { + export namespace NewFloatingCumulativeGroupedAllocationPrice { /** - * Configuration for grouped_with_min_max_thresholds pricing + * Configuration for cumulative_grouped_allocation pricing */ - export interface GroupedWithMinMaxThresholdsConfig { + export interface CumulativeGroupedAllocationConfig { /** - * The event property used to group before applying thresholds + * The overall allocation across all groups */ - grouping_key: string; + cumulative_allocation: string; /** - * The maximum amount to charge each group + * The allocation per individual group */ - maximum_charge: string; + group_allocation: string; /** - * The minimum amount to charge each group, regardless of usage + * The event property used to group usage before applying allocations */ - minimum_charge: string; + grouping_key: string; /** - * The base price charged per group + * The amount to charge for each unit outside of the allocation */ - per_unit_rate: string; + unit_amount: string; } } @@ -7558,6 +7938,7 @@ export namespace SubscriptionSchedulePlanChangeParams { | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice + | AddPrice.NewSubscriptionCumulativeGroupedAllocationPrice | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice | AddPrice.NewSubscriptionPercentCompositePrice | AddPrice.NewSubscriptionEventOutputPrice @@ -7986,6 +8367,134 @@ export namespace SubscriptionSchedulePlanChangeParams { } } + export interface NewSubscriptionCumulativeGroupedAllocationPrice { + /** + * The cadence to bill for this price on. + */ + cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; + + /** + * Configuration for cumulative_grouped_allocation pricing + */ + cumulative_grouped_allocation_config: NewSubscriptionCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig; + + /** + * The id of the item the price will be associated with. + */ + item_id: string; + + /** + * The pricing model type + */ + model_type: 'cumulative_grouped_allocation'; + + /** + * The name of the price. + */ + name: string; + + /** + * The id of the billable metric for the price. Only needed if the price is + * usage-based. + */ + billable_metric_id?: string | null; + + /** + * If the Price represents a fixed cost, the price will be billed in-advance if + * this is true, and in-arrears if this is false. + */ + billed_in_advance?: boolean | null; + + /** + * For custom cadence: specifies the duration of the billing period in days or + * months. + */ + billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null; + + /** + * The per unit conversion rate of the price currency to the invoicing currency. + */ + conversion_rate?: number | null; + + /** + * The configuration for the rate of the price currency to the invoicing currency. + */ + conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null; + + /** + * An ISO 4217 currency string, or custom pricing unit identifier, in which this + * price is billed. + */ + currency?: string | null; + + /** + * For dimensional price: specifies a price group and dimension values + */ + dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null; + + /** + * An alias for the price. + */ + external_price_id?: string | null; + + /** + * If the Price represents a fixed cost, this represents the quantity of units + * applied. + */ + fixed_price_quantity?: number | null; + + /** + * The property used to group this price on an invoice + */ + invoice_grouping_key?: string | null; + + /** + * Within each billing cycle, specifies the cadence at which invoices are produced. + * If unspecified, a single invoice is produced per billing cycle. + */ + invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null; + + /** + * User-specified key/value pairs for the resource. Individual keys can be removed + * by setting the value to `null`, and the entire metadata mapping can be cleared + * by setting `metadata` to `null`. + */ + metadata?: { [key: string]: string | null } | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; + } + + export namespace NewSubscriptionCumulativeGroupedAllocationPrice { + /** + * Configuration for cumulative_grouped_allocation pricing + */ + export interface CumulativeGroupedAllocationConfig { + /** + * The overall allocation across all groups + */ + cumulative_allocation: string; + + /** + * The allocation per individual group + */ + group_allocation: string; + + /** + * The event property used to group usage before applying allocations + */ + grouping_key: string; + + /** + * The amount to charge for each unit outside of the allocation + */ + unit_amount: string; + } + } + export interface NewSubscriptionPercentCompositePrice { /** * The cadence to bill for this price on. @@ -8332,6 +8841,7 @@ export namespace SubscriptionSchedulePlanChangeParams { | SubscriptionsAPI.NewSubscriptionScalableMatrixWithUnitPricingPrice | SubscriptionsAPI.NewSubscriptionScalableMatrixWithTieredPricingPrice | SubscriptionsAPI.NewSubscriptionCumulativeGroupedBulkPrice + | ReplacePrice.NewSubscriptionCumulativeGroupedAllocationPrice | SubscriptionsAPI.NewSubscriptionMinimumCompositePrice | ReplacePrice.NewSubscriptionPercentCompositePrice | ReplacePrice.NewSubscriptionEventOutputPrice @@ -8753,6 +9263,134 @@ export namespace SubscriptionSchedulePlanChangeParams { } } + export interface NewSubscriptionCumulativeGroupedAllocationPrice { + /** + * The cadence to bill for this price on. + */ + cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; + + /** + * Configuration for cumulative_grouped_allocation pricing + */ + cumulative_grouped_allocation_config: NewSubscriptionCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig; + + /** + * The id of the item the price will be associated with. + */ + item_id: string; + + /** + * The pricing model type + */ + model_type: 'cumulative_grouped_allocation'; + + /** + * The name of the price. + */ + name: string; + + /** + * The id of the billable metric for the price. Only needed if the price is + * usage-based. + */ + billable_metric_id?: string | null; + + /** + * If the Price represents a fixed cost, the price will be billed in-advance if + * this is true, and in-arrears if this is false. + */ + billed_in_advance?: boolean | null; + + /** + * For custom cadence: specifies the duration of the billing period in days or + * months. + */ + billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null; + + /** + * The per unit conversion rate of the price currency to the invoicing currency. + */ + conversion_rate?: number | null; + + /** + * The configuration for the rate of the price currency to the invoicing currency. + */ + conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null; + + /** + * An ISO 4217 currency string, or custom pricing unit identifier, in which this + * price is billed. + */ + currency?: string | null; + + /** + * For dimensional price: specifies a price group and dimension values + */ + dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null; + + /** + * An alias for the price. + */ + external_price_id?: string | null; + + /** + * If the Price represents a fixed cost, this represents the quantity of units + * applied. + */ + fixed_price_quantity?: number | null; + + /** + * The property used to group this price on an invoice + */ + invoice_grouping_key?: string | null; + + /** + * Within each billing cycle, specifies the cadence at which invoices are produced. + * If unspecified, a single invoice is produced per billing cycle. + */ + invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null; + + /** + * User-specified key/value pairs for the resource. Individual keys can be removed + * by setting the value to `null`, and the entire metadata mapping can be cleared + * by setting `metadata` to `null`. + */ + metadata?: { [key: string]: string | null } | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; + } + + export namespace NewSubscriptionCumulativeGroupedAllocationPrice { + /** + * Configuration for cumulative_grouped_allocation pricing + */ + export interface CumulativeGroupedAllocationConfig { + /** + * The overall allocation across all groups + */ + cumulative_allocation: string; + + /** + * The allocation per individual group + */ + group_allocation: string; + + /** + * The event property used to group usage before applying allocations + */ + grouping_key: string; + + /** + * The amount to charge for each unit outside of the allocation + */ + unit_amount: string; + } + } + export interface NewSubscriptionPercentCompositePrice { /** * The cadence to bill for this price on. From 40f093e3664c2a80d6a24c7e58cfeced9d86ee91 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 16 Nov 2025 02:25:50 +0000 Subject: [PATCH 2/2] release: 5.32.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ package.json | 2 +- src/version.ts | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b557a5b6..bb508a8f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "5.31.0" + ".": "5.32.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 31abe15d..db891a3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 5.32.0 (2025-11-16) + +Full Changelog: [v5.31.0...v5.32.0](https://github.com/orbcorp/orb-node/compare/v5.31.0...v5.32.0) + +### Features + +* **api:** api update ([d431aae](https://github.com/orbcorp/orb-node/commit/d431aae064fa65d8aaf44d0fbc650f5fe66311b5)) + ## 5.31.0 (2025-11-13) Full Changelog: [v5.30.0...v5.31.0](https://github.com/orbcorp/orb-node/compare/v5.30.0...v5.31.0) diff --git a/package.json b/package.json index c7764de0..51b37176 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orb-billing", - "version": "5.31.0", + "version": "5.32.0", "description": "The official TypeScript library for the Orb API", "author": "Orb ", "types": "dist/index.d.ts", diff --git a/src/version.ts b/src/version.ts index 8f54dfad..3dc1801d 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '5.31.0'; // x-release-please-version +export const VERSION = '5.32.0'; // x-release-please-version