diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 79313ca5..999cfc01 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.48.0" + ".": "4.49.0" } diff --git a/.stats.yml b/.stats.yml index 147f6727..eeba5cf5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 101 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-ac2f736602bc631b92de358a7edb395cf53ed506b2cb3d0494fffa31be9e2d9f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-11f40c15fa889d9752019e8a35b82d2e7a3d42f2b42c850b469f120a5b2c47ba.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 14f98925..5873a476 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 4.49.0 (2025-01-16) + +Full Changelog: [v4.48.0...v4.49.0](https://github.com/orbcorp/orb-node/compare/v4.48.0...v4.49.0) + +### Features + +* **api:** api update ([#468](https://github.com/orbcorp/orb-node/issues/468)) ([d4ca190](https://github.com/orbcorp/orb-node/commit/d4ca190dc612304b10422c8d000d4f5c1aa69b8f)) + ## 4.48.0 (2025-01-15) Full Changelog: [v4.47.4...v4.48.0](https://github.com/orbcorp/orb-node/compare/v4.47.4...v4.48.0) diff --git a/package.json b/package.json index 0b50872b..e872b349 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orb-billing", - "version": "4.48.0", + "version": "4.49.0", "description": "The official TypeScript library for the Orb API", "author": "Orb ", "types": "dist/index.d.ts", diff --git a/src/resources/plans/plans.ts b/src/resources/plans/plans.ts index 934d9c4a..0711ff18 100644 --- a/src/resources/plans/plans.ts +++ b/src/resources/plans/plans.ts @@ -497,6 +497,7 @@ export interface PlanCreateParams { | PlanCreateParams.NewPlanMatrixWithDisplayNamePrice | PlanCreateParams.NewPlanBulkWithProrationPrice | PlanCreateParams.NewPlanGroupedTieredPackagePrice + | PlanCreateParams.NewPlanMaxGroupTieredPrice >; /** @@ -3071,6 +3072,119 @@ export namespace PlanCreateParams { duration_unit: 'day' | 'month'; } } + + export interface NewPlanMaxGroupTieredPrice { + /** + * The cadence to bill for this price on. + */ + cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; + + /** + * The id of the item the plan will be associated with. + */ + item_id: string; + + max_group_tiered_config: Record; + + model_type: 'max_group_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?: NewPlanMaxGroupTieredPrice.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; + + /** + * An alias for the price. + */ + external_price_id?: string | null; + + /** + * If the Price represents a fixed cost, this represents the quantity of units + * applied. + */ + fixed_price_quantity?: number | null; + + /** + * The property used to group this price on an invoice + */ + invoice_grouping_key?: string | null; + + /** + * Within each billing cycle, specifies the cadence at which invoices are produced. + * If unspecified, a single invoice is produced per billing cycle. + */ + invoicing_cycle_configuration?: NewPlanMaxGroupTieredPrice.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 NewPlanMaxGroupTieredPrice { + /** + * 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'; + } + + /** + * 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 PlanUpdateParams { diff --git a/src/resources/prices/prices.ts b/src/resources/prices/prices.ts index afe39252..d69f459f 100644 --- a/src/resources/prices/prices.ts +++ b/src/resources/prices/prices.ts @@ -367,7 +367,8 @@ export type Price = | Price.GroupedWithMeteredMinimumPrice | Price.MatrixWithDisplayNamePrice | Price.BulkWithProrationPrice - | Price.GroupedTieredPackagePrice; + | Price.GroupedTieredPackagePrice + | Price.MaxGroupTieredPrice; export namespace Price { export interface UnitPrice { @@ -3218,6 +3219,116 @@ export namespace Price { minimum_amount: string; } } + + export interface MaxGroupTieredPrice { + id: string; + + billable_metric: MaxGroupTieredPrice.BillableMetric | null; + + billing_cycle_configuration: MaxGroupTieredPrice.BillingCycleConfiguration; + + cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom'; + + conversion_rate: number | null; + + created_at: string; + + credit_allocation: MaxGroupTieredPrice.CreditAllocation | null; + + currency: string; + + discount: Shared.Discount | null; + + external_price_id: string | null; + + fixed_price_quantity: number | null; + + invoicing_cycle_configuration: MaxGroupTieredPrice.InvoicingCycleConfiguration | null; + + item: MaxGroupTieredPrice.Item; + + max_group_tiered_config: Record; + + maximum: MaxGroupTieredPrice.Maximum | null; + + 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: Record; + + minimum: MaxGroupTieredPrice.Minimum | null; + + minimum_amount: string | null; + + model_type: 'max_group_tiered'; + + name: string; + + plan_phase_order: number | null; + + price_type: 'usage_price' | 'fixed_price'; + } + + export namespace MaxGroupTieredPrice { + export interface BillableMetric { + id: string; + } + + export interface BillingCycleConfiguration { + duration: number; + + duration_unit: 'day' | 'month'; + } + + export interface CreditAllocation { + allows_rollover: boolean; + + currency: string; + } + + export interface InvoicingCycleConfiguration { + duration: number; + + duration_unit: 'day' | 'month'; + } + + export interface Item { + id: string; + + name: string; + } + + export interface Maximum { + /** + * List of price_ids that this maximum amount applies to. For plan/plan phase + * maximums, this can be a subset of prices. + */ + applies_to_price_ids: Array; + + /** + * Maximum amount applied + */ + maximum_amount: string; + } + + export interface Minimum { + /** + * List of price_ids that this minimum amount applies to. For plan/plan phase + * minimums, this can be a subset of prices. + */ + applies_to_price_ids: Array; + + /** + * Minimum amount applied + */ + minimum_amount: string; + } + } } export interface PriceEvaluateResponse { @@ -3237,6 +3348,7 @@ export type PriceCreateParams = | PriceCreateParams.NewFloatingThresholdTotalAmountPrice | PriceCreateParams.NewFloatingTieredPackagePrice | PriceCreateParams.NewFloatingGroupedTieredPrice + | PriceCreateParams.NewFloatingMaxGroupTieredPrice | PriceCreateParams.NewFloatingTieredWithMinimumPrice | PriceCreateParams.NewFloatingPackageWithAllocationPrice | PriceCreateParams.NewFloatingTieredPackageWithMinimumPrice @@ -4804,6 +4916,118 @@ export declare namespace PriceCreateParams { } } + export interface NewFloatingMaxGroupTieredPrice { + /** + * 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; + + /** + * The id of the item the plan will be associated with. + */ + item_id: string; + + max_group_tiered_config: Record; + + model_type: 'max_group_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?: PriceCreateParams.NewFloatingMaxGroupTieredPrice.BillingCycleConfiguration | null; + + /** + * The per unit conversion rate of the price currency to the invoicing currency. + */ + conversion_rate?: number | null; + + /** + * An alias for the price. + */ + external_price_id?: string | null; + + /** + * If the Price represents a fixed cost, this represents the quantity of units + * applied. + */ + fixed_price_quantity?: number | null; + + /** + * The property used to group this price on an invoice + */ + invoice_grouping_key?: string | null; + + /** + * Within each billing cycle, specifies the cadence at which invoices are produced. + * If unspecified, a single invoice is produced per billing cycle. + */ + invoicing_cycle_configuration?: PriceCreateParams.NewFloatingMaxGroupTieredPrice.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 NewFloatingMaxGroupTieredPrice { + /** + * 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'; + } + + /** + * 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 NewFloatingTieredWithMinimumPrice { /** * The cadence to bill for this price on. diff --git a/src/resources/subscriptions.ts b/src/resources/subscriptions.ts index 7c6c5de3..b2f10dd4 100644 --- a/src/resources/subscriptions.ts +++ b/src/resources/subscriptions.ts @@ -16010,6 +16010,7 @@ export namespace SubscriptionPriceIntervalsParams { | Add.NewFloatingThresholdTotalAmountPrice | Add.NewFloatingTieredPackagePrice | Add.NewFloatingGroupedTieredPrice + | Add.NewFloatingMaxGroupTieredPrice | Add.NewFloatingTieredWithMinimumPrice | Add.NewFloatingPackageWithAllocationPrice | Add.NewFloatingTieredPackageWithMinimumPrice @@ -17652,6 +17653,118 @@ export namespace SubscriptionPriceIntervalsParams { } } + export interface NewFloatingMaxGroupTieredPrice { + /** + * 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; + + /** + * The id of the item the plan will be associated with. + */ + item_id: string; + + max_group_tiered_config: Record; + + model_type: 'max_group_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?: NewFloatingMaxGroupTieredPrice.BillingCycleConfiguration | null; + + /** + * The per unit conversion rate of the price currency to the invoicing currency. + */ + conversion_rate?: number | null; + + /** + * An alias for the price. + */ + external_price_id?: string | null; + + /** + * If the Price represents a fixed cost, this represents the quantity of units + * applied. + */ + fixed_price_quantity?: number | null; + + /** + * The property used to group this price on an invoice + */ + invoice_grouping_key?: string | null; + + /** + * Within each billing cycle, specifies the cadence at which invoices are produced. + * If unspecified, a single invoice is produced per billing cycle. + */ + invoicing_cycle_configuration?: NewFloatingMaxGroupTieredPrice.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 NewFloatingMaxGroupTieredPrice { + /** + * 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'; + } + + /** + * 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 NewFloatingTieredWithMinimumPrice { /** * The cadence to bill for this price on. diff --git a/src/version.ts b/src/version.ts index b09f3834..bb12aad4 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '4.48.0'; // x-release-please-version +export const VERSION = '4.49.0'; // x-release-please-version