Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: 4.3.0 #260

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat(api): OpenAPI spec update via Stainless API (#259)
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Aug 16, 2024
commit 8d141bbd86e0c4f93e20519d8ffedb00c66f4199
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -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
68 changes: 68 additions & 0 deletions src/resources/plans/plans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ export interface PlanCreateParams {
| PlanCreateParams.NewPlanPackageWithAllocationPrice
| PlanCreateParams.NewPlanTierWithProrationPrice
| PlanCreateParams.NewPlanUnitWithProrationPrice
| PlanCreateParams.NewPlanGroupedAllocationPrice
>;

/**
Expand Down Expand Up @@ -1540,6 +1541,73 @@ export namespace PlanCreateParams {
*/
metadata?: Record<string, string | null> | 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<string, unknown>;

/**
* 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<string, string | null> | null;
}
}

export interface PlanUpdateParams {
Expand Down
174 changes: 172 additions & 2 deletions src/resources/prices/prices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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<string, unknown>;

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<string, string>;

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<string>;

/**
* 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<string>;

/**
* Minimum amount applied
*/
minimum_amount: string;
}
}
}

export interface PriceEvaluateResponse {
Expand All @@ -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 {
Expand Down Expand Up @@ -3858,6 +3962,72 @@ export namespace PriceCreateParams {
*/
metadata?: Record<string, string | null> | 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<string, unknown>;

/**
* 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<string, string | null> | null;
}
}

export interface PriceUpdateParams {
Expand Down
67 changes: 67 additions & 0 deletions src/resources/subscriptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3671,6 +3671,7 @@ export namespace SubscriptionPriceIntervalsParams {
| Add.NewFloatingUnitWithPercentPrice
| Add.NewFloatingTieredWithProrationPrice
| Add.NewFloatingUnitWithProrationPrice
| Add.NewFloatingGroupedAllocationPrice
| null;

/**
Expand Down Expand Up @@ -5162,6 +5163,72 @@ export namespace SubscriptionPriceIntervalsParams {
*/
metadata?: Record<string, string | null> | 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<string, unknown>;

/**
* 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<string, string | null> | null;
}
}

export interface AddAdjustment {
Expand Down