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

feat(api): api update #128

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
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/metronome%2Fmetronome-b84ae14053713dcb9bed31b22b072ae44659936b582ca7c2bda56632f079445c.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/metronome%2Fmetronome-2364d37901fa069d859d9d2e0f75c0ef5453b38cb06e59d7f7cc7c185ec1f8c9.yml
58 changes: 0 additions & 58 deletions src/resources/contracts/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -642,18 +642,10 @@ export namespace ContractCreateParams {
*/
priority?: number;

rate_type?: 'COMMIT_RATE' | 'commit_rate' | 'LIST_RATE' | 'list_rate';

/**
* Fraction of unused segments that will be rolled over. Must be between 0 and 1.
*/
rollover_fraction?: number;

/**
* A temporary ID for the commit that can be used to reference the commit for
* commit specific overrides.
*/
temporary_id?: string;
}

export namespace Commit {
Expand Down Expand Up @@ -986,13 +978,6 @@ export namespace ContractCreateParams {

entitled?: boolean;

/**
* Indicates whether the override should only apply to commits. Defaults to
* `false`. If `true`, you can specify relevant commits in `override_specifiers` by
* passing `commit_ids`.
*/
is_commit_specific?: boolean;

/**
* Required for MULTIPLIER type. Must be >=0.
*/
Expand Down Expand Up @@ -1022,13 +1007,6 @@ export namespace ContractCreateParams {
*/
product_id?: string;

/**
* Indicates whether the override applies to commit rates or list rates. Can only
* be used for overrides that have `is_commit_specific` set to `true`. Defaults to
* `"LIST_RATE"`.
*/
target?: 'COMMIT_RATE' | 'commit_rate' | 'LIST_RATE' | 'list_rate';

/**
* Required for TIERED type. Must have at least one tier.
*/
Expand All @@ -1042,13 +1020,6 @@ export namespace ContractCreateParams {

export namespace Override {
export interface OverrideSpecifier {
/**
* If provided, the override will only apply to the specified commits. Can only be
* used for commit specific overrides. If not provided, the override will apply to
* all commits.
*/
commit_ids?: Array<string>;

/**
* A map of group names to values. The override will only apply to line items with
* the specified presentation group values. Can only be used for multiplier
Expand Down Expand Up @@ -1551,18 +1522,10 @@ export namespace ContractAmendParams {
*/
priority?: number;

rate_type?: 'COMMIT_RATE' | 'commit_rate' | 'LIST_RATE' | 'list_rate';

/**
* Fraction of unused segments that will be rolled over. Must be between 0 and 1.
*/
rollover_fraction?: number;

/**
* A temporary ID for the commit that can be used to reference the commit for
* commit specific overrides.
*/
temporary_id?: string;
}

export namespace Commit {
Expand Down Expand Up @@ -1895,13 +1858,6 @@ export namespace ContractAmendParams {

entitled?: boolean;

/**
* Indicates whether the override should only apply to commits. Defaults to
* `false`. If `true`, you can specify relevant commits in `override_specifiers` by
* passing `commit_ids`.
*/
is_commit_specific?: boolean;

/**
* Required for MULTIPLIER type. Must be >=0.
*/
Expand Down Expand Up @@ -1931,13 +1887,6 @@ export namespace ContractAmendParams {
*/
product_id?: string;

/**
* Indicates whether the override applies to commit rates or list rates. Can only
* be used for overrides that have `is_commit_specific` set to `true`. Defaults to
* `"LIST_RATE"`.
*/
target?: 'COMMIT_RATE' | 'commit_rate' | 'LIST_RATE' | 'list_rate';

/**
* Required for TIERED type. Must have at least one tier.
*/
Expand All @@ -1951,13 +1900,6 @@ export namespace ContractAmendParams {

export namespace Override {
export interface OverrideSpecifier {
/**
* If provided, the override will only apply to the specified commits. Can only be
* used for commit specific overrides. If not provided, the override will apply to
* all commits.
*/
commit_ids?: Array<string>;

/**
* A map of group names to values. The override will only apply to line items with
* the specified presentation group values. Can only be used for multiplier
Expand Down
8 changes: 0 additions & 8 deletions src/resources/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ export interface Commit {
*/
priority?: number;

rate_type?: 'COMMIT_RATE' | 'LIST_RATE';

rolled_over_from?: Commit.RolledOverFrom;

rollover_fraction?: number;
Expand Down Expand Up @@ -582,8 +580,6 @@ export interface Override {

entitled?: boolean;

is_commit_specific?: boolean;

/**
* Default proration configuration. Only valid for SUBSCRIPTION rate_type.
*/
Expand Down Expand Up @@ -614,8 +610,6 @@ export interface Override {

rate_type?: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'CUSTOM';

target?: 'COMMIT_RATE' | 'LIST_RATE';

/**
* Only set for TIERED rate_type.
*/
Expand All @@ -632,8 +626,6 @@ export interface Override {

export namespace Override {
export interface OverrideSpecifier {
commit_ids?: Array<string>;

presentation_group_values?: Record<string, string | null>;

pricing_group_values?: Record<string, string>;
Expand Down
Loading