diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 34a3350..83f9eb8 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.2.0" + ".": "4.3.0" } diff --git a/.stats.yml b/.stats.yml index fa5ec93..e1699c4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 91 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-303379b9db577b964d46fe908e8226e95c60435b11ddd8685bf2fa99c57f4320.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-8cdbf902afe6295b1eee73576b55f8461c36179fd59e5f12cfeb6a3372c08904.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d983d0..27b3373 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 4.3.0 (2024-08-16) + +Full Changelog: [v4.2.0...v4.3.0](https://github.com/orbcorp/orb-node/compare/v4.2.0...v4.3.0) + +### Features + +* **api:** OpenAPI spec update via Stainless API ([#259](https://github.com/orbcorp/orb-node/issues/259)) ([8d141bb](https://github.com/orbcorp/orb-node/commit/8d141bbd86e0c4f93e20519d8ffedb00c66f4199)) + ## 4.2.0 (2024-08-15) Full Changelog: [v4.1.0...v4.2.0](https://github.com/orbcorp/orb-node/compare/v4.1.0...v4.2.0) diff --git a/package.json b/package.json index 3bb50d7..22b7764 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orb-billing", - "version": "4.2.0", + "version": "4.3.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 07e2a2c..875ab56 100644 --- a/src/resources/plans/plans.ts +++ b/src/resources/plans/plans.ts @@ -318,6 +318,7 @@ export interface PlanCreateParams { | PlanCreateParams.NewPlanPackageWithAllocationPrice | PlanCreateParams.NewPlanTierWithProrationPrice | PlanCreateParams.NewPlanUnitWithProrationPrice + | PlanCreateParams.NewPlanGroupedAllocationPrice >; /** @@ -1540,6 +1541,73 @@ export namespace PlanCreateParams { */ metadata?: Record | null; } + + 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 plan 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; + + /** + * 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; + + /** + * User-specified key/value pairs for the resource. Individual 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 interface PlanUpdateParams { diff --git a/src/resources/prices/prices.ts b/src/resources/prices/prices.ts index 526a3d4..2bf66b3 100644 --- a/src/resources/prices/prices.ts +++ b/src/resources/prices/prices.ts @@ -370,7 +370,8 @@ export type Price = | Price.UnitWithPercentPrice | Price.MatrixWithAllocationPrice | Price.TieredWithProrationPrice - | Price.UnitWithProrationPrice; + | Price.UnitWithProrationPrice + | Price.GroupedAllocationPrice; export namespace Price { export interface UnitPrice { @@ -2417,6 +2418,108 @@ export namespace Price { minimum_amount: string; } } + + export interface GroupedAllocationPrice { + id: string; + + billable_metric: GroupedAllocationPrice.BillableMetric | null; + + billing_cycle_configuration: GroupedAllocationPrice.BillingCycleConfiguration | null; + + cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom'; + + conversion_rate: number | null; + + created_at: string; + + credit_allocation: GroupedAllocationPrice.CreditAllocation | null; + + currency: string; + + discount: Shared.Discount | null; + + external_price_id: string | null; + + fixed_price_quantity: number | null; + + grouped_allocation_config: Record; + + item: GroupedAllocationPrice.Item; + + maximum: GroupedAllocationPrice.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: GroupedAllocationPrice.Minimum | null; + + minimum_amount: string | null; + + model_type: 'grouped_allocation'; + + name: string; + + plan_phase_order: number | null; + + price_type: 'usage_price' | 'fixed_price'; + } + + export namespace GroupedAllocationPrice { + export interface BillableMetric { + id: string; + } + + export interface BillingCycleConfiguration { + duration: number; + + duration_unit: 'day' | 'month'; + } + + export interface CreditAllocation { + allows_rollover: boolean; + + currency: string; + } + + 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 { @@ -2441,7 +2544,8 @@ export type PriceCreateParams = | PriceCreateParams.NewFloatingTieredPackageWithMinimumPrice | PriceCreateParams.NewFloatingUnitWithPercentPrice | PriceCreateParams.NewFloatingTieredWithProrationPrice - | PriceCreateParams.NewFloatingUnitWithProrationPrice; + | PriceCreateParams.NewFloatingUnitWithProrationPrice + | PriceCreateParams.NewFloatingGroupedAllocationPrice; export namespace PriceCreateParams { export interface NewFloatingUnitPrice { @@ -3858,6 +3962,72 @@ export namespace PriceCreateParams { */ metadata?: Record | null; } + + export interface NewFloatingGroupedAllocationPrice { + /** + * 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; + + grouped_allocation_config: Record; + + /** + * The id of the item the plan 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; + + /** + * 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; + + /** + * User-specified key/value pairs for the resource. Individual 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 interface PriceUpdateParams { diff --git a/src/resources/subscriptions.ts b/src/resources/subscriptions.ts index 56a7e0f..921479f 100644 --- a/src/resources/subscriptions.ts +++ b/src/resources/subscriptions.ts @@ -3671,6 +3671,7 @@ export namespace SubscriptionPriceIntervalsParams { | Add.NewFloatingUnitWithPercentPrice | Add.NewFloatingTieredWithProrationPrice | Add.NewFloatingUnitWithProrationPrice + | Add.NewFloatingGroupedAllocationPrice | null; /** @@ -5162,6 +5163,72 @@ export namespace SubscriptionPriceIntervalsParams { */ metadata?: Record | null; } + + export interface NewFloatingGroupedAllocationPrice { + /** + * 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; + + grouped_allocation_config: Record; + + /** + * The id of the item the plan 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; + + /** + * 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; + + /** + * User-specified key/value pairs for the resource. Individual 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 interface AddAdjustment { diff --git a/src/version.ts b/src/version.ts index f9ec1c7..e743242 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '4.2.0'; // x-release-please-version +export const VERSION = '4.3.0'; // x-release-please-version