Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored Aug 22, 2024
1 parent 5d4dbac commit a9083b4
Show file tree
Hide file tree
Showing 16 changed files with 71 additions and 327 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 87
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/metronome%2Fmetronome-a756f558dba48293f7654cbd12f726b747c70f975bc6888a1c01101c73983595.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/metronome%2Fmetronome-3fc5b7182f99e8b635b27a63450f287515cdea409b7308509ee676b01354c4c0.yml
51 changes: 3 additions & 48 deletions src/resources/billable-metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,22 +98,7 @@ export namespace BillableMetricRetrieveResponse {
/**
* Specifies the type of aggregation performed on matching events.
*/
aggregation_type?:
| 'count'
| 'Count'
| 'COUNT'
| 'latest'
| 'Latest'
| 'LATEST'
| 'max'
| 'Max'
| 'MAX'
| 'sum'
| 'Sum'
| 'SUM'
| 'unique'
| 'Unique'
| 'UNIQUE';
aggregation_type?: 'COUNT' | 'LATEST' | 'MAX' | 'SUM' | 'UNIQUE';

custom_fields?: Record<string, string>;

Expand Down Expand Up @@ -219,22 +204,7 @@ export interface BillableMetricListResponse {
/**
* Specifies the type of aggregation performed on matching events.
*/
aggregation_type?:
| 'count'
| 'Count'
| 'COUNT'
| 'latest'
| 'Latest'
| 'LATEST'
| 'max'
| 'Max'
| 'MAX'
| 'sum'
| 'Sum'
| 'SUM'
| 'unique'
| 'Unique'
| 'UNIQUE';
aggregation_type?: 'COUNT' | 'LATEST' | 'MAX' | 'SUM' | 'UNIQUE';

custom_fields?: Record<string, string>;

Expand Down Expand Up @@ -332,22 +302,7 @@ export interface BillableMetricCreateParams {
/**
* Specifies the type of aggregation performed on matching events.
*/
aggregation_type:
| 'count'
| 'Count'
| 'COUNT'
| 'latest'
| 'Latest'
| 'LATEST'
| 'max'
| 'Max'
| 'MAX'
| 'sum'
| 'Sum'
| 'SUM'
| 'unique'
| 'Unique'
| 'UNIQUE';
aggregation_type: 'COUNT' | 'LATEST' | 'MAX' | 'SUM' | 'UNIQUE';

/**
* The display name of the billable metric.
Expand Down
114 changes: 23 additions & 91 deletions src/resources/contracts/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ export interface ContractCreateParams {
* each multiplier; the one with the lowest priority value will be prioritized
* first. If tiered overrides are used, prioritization must be explicit.
*/
multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'lowest_multiplier' | 'EXPLICIT' | 'explicit';
multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT';

name?: string;

Expand Down Expand Up @@ -1066,7 +1066,7 @@ export namespace ContractCreateParams {
export interface Commit {
product_id: string;

type: 'PREPAID' | 'prepaid' | 'POSTPAID' | 'postpaid';
type: 'PREPAID' | 'POSTPAID';

/**
* Required: Schedule for distributing the commit to the customer. For "POSTPAID"
Expand Down Expand Up @@ -1189,22 +1189,14 @@ export namespace ContractCreateParams {
* quantity is inferred to be 1.
*/
export interface RecurringSchedule {
amount_distribution: 'DIVIDED' | 'divided' | 'DIVIDED_ROUNDED' | 'divided_rounded' | 'EACH' | 'each';
amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH';

/**
* RFC 3339 timestamp (exclusive).
*/
ending_before: string;

frequency:
| 'MONTHLY'
| 'monthly'
| 'QUARTERLY'
| 'quarterly'
| 'SEMI_ANNUAL'
| 'semi_annual'
| 'ANNUAL'
| 'annual';
frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL';

/**
* RFC 3339 timestamp (inclusive).
Expand Down Expand Up @@ -1383,22 +1375,14 @@ export namespace ContractCreateParams {
* quantity is inferred to be 1.
*/
export interface RecurringSchedule {
amount_distribution: 'DIVIDED' | 'divided' | 'DIVIDED_ROUNDED' | 'divided_rounded' | 'EACH' | 'each';
amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH';

/**
* RFC 3339 timestamp (exclusive).
*/
ending_before: string;

frequency:
| 'MONTHLY'
| 'monthly'
| 'QUARTERLY'
| 'quarterly'
| 'SEMI_ANNUAL'
| 'semi_annual'
| 'ANNUAL'
| 'annual';
frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL';

/**
* RFC 3339 timestamp (inclusive).
Expand Down Expand Up @@ -1512,7 +1496,7 @@ export namespace ContractCreateParams {
/**
* Overwrites are prioritized over multipliers and tiered overrides.
*/
type?: 'OVERWRITE' | 'overwrite' | 'MULTIPLIER' | 'multiplier' | 'TIERED' | 'tiered';
type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED';
}

export namespace Override {
Expand Down Expand Up @@ -1546,17 +1530,7 @@ export namespace ContractCreateParams {
* Required for OVERWRITE type.
*/
export interface OverwriteRate {
rate_type:
| 'FLAT'
| 'flat'
| 'PERCENTAGE'
| 'percentage'
| 'SUBSCRIPTION'
| 'subscription'
| 'TIERED'
| 'tiered'
| 'CUSTOM'
| 'custom';
rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'CUSTOM';

credit_type_id?: string;

Expand Down Expand Up @@ -1726,22 +1700,14 @@ export namespace ContractCreateParams {
* quantity is inferred to be 1.
*/
export interface RecurringSchedule {
amount_distribution: 'DIVIDED' | 'divided' | 'DIVIDED_ROUNDED' | 'divided_rounded' | 'EACH' | 'each';
amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH';

/**
* RFC 3339 timestamp (exclusive).
*/
ending_before: string;

frequency:
| 'MONTHLY'
| 'monthly'
| 'QUARTERLY'
| 'quarterly'
| 'SEMI_ANNUAL'
| 'semi_annual'
| 'ANNUAL'
| 'annual';
frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL';

/**
* RFC 3339 timestamp (inclusive).
Expand Down Expand Up @@ -1806,7 +1772,7 @@ export namespace ContractCreateParams {
/**
* This field's available values may vary based on your client's configuration.
*/
type: 'SUPERSEDE' | 'RENEWAL' | 'supersede' | 'renewal';
type: 'SUPERSEDE' | 'RENEWAL';

future_invoice_behavior?: Transition.FutureInvoiceBehavior;
}
Expand All @@ -1817,7 +1783,7 @@ export namespace ContractCreateParams {
* Controls whether future trueup invoices are billed or removed. Default behavior
* is AS_IS if not specified.
*/
trueup?: 'remove' | 'as_is' | 'REMOVE' | 'AS_IS' | null;
trueup?: 'REMOVE' | 'AS_IS' | null;
}
}

Expand All @@ -1830,12 +1796,12 @@ export namespace ContractCreateParams {
}

export interface UsageStatementSchedule {
frequency: 'MONTHLY' | 'monthly' | 'QUARTERLY' | 'quarterly';
frequency: 'MONTHLY' | 'QUARTERLY';

/**
* If not provided, defaults to the first day of the month.
*/
day?: 'FIRST_OF_MONTH' | 'first_of_month' | 'CONTRACT_START' | 'contract_start';
day?: 'FIRST_OF_MONTH' | 'CONTRACT_START';

/**
* The date Metronome should start generating usage invoices. If unspecified,
Expand Down Expand Up @@ -1987,7 +1953,7 @@ export namespace ContractAmendParams {
export interface Commit {
product_id: string;

type: 'PREPAID' | 'prepaid' | 'POSTPAID' | 'postpaid';
type: 'PREPAID' | 'POSTPAID';

/**
* Required: Schedule for distributing the commit to the customer. For "POSTPAID"
Expand Down Expand Up @@ -2110,22 +2076,14 @@ export namespace ContractAmendParams {
* quantity is inferred to be 1.
*/
export interface RecurringSchedule {
amount_distribution: 'DIVIDED' | 'divided' | 'DIVIDED_ROUNDED' | 'divided_rounded' | 'EACH' | 'each';
amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH';

/**
* RFC 3339 timestamp (exclusive).
*/
ending_before: string;

frequency:
| 'MONTHLY'
| 'monthly'
| 'QUARTERLY'
| 'quarterly'
| 'SEMI_ANNUAL'
| 'semi_annual'
| 'ANNUAL'
| 'annual';
frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL';

/**
* RFC 3339 timestamp (inclusive).
Expand Down Expand Up @@ -2304,22 +2262,14 @@ export namespace ContractAmendParams {
* quantity is inferred to be 1.
*/
export interface RecurringSchedule {
amount_distribution: 'DIVIDED' | 'divided' | 'DIVIDED_ROUNDED' | 'divided_rounded' | 'EACH' | 'each';
amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH';

/**
* RFC 3339 timestamp (exclusive).
*/
ending_before: string;

frequency:
| 'MONTHLY'
| 'monthly'
| 'QUARTERLY'
| 'quarterly'
| 'SEMI_ANNUAL'
| 'semi_annual'
| 'ANNUAL'
| 'annual';
frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL';

/**
* RFC 3339 timestamp (inclusive).
Expand Down Expand Up @@ -2433,7 +2383,7 @@ export namespace ContractAmendParams {
/**
* Overwrites are prioritized over multipliers and tiered overrides.
*/
type?: 'OVERWRITE' | 'overwrite' | 'MULTIPLIER' | 'multiplier' | 'TIERED' | 'tiered';
type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED';
}

export namespace Override {
Expand Down Expand Up @@ -2467,17 +2417,7 @@ export namespace ContractAmendParams {
* Required for OVERWRITE type.
*/
export interface OverwriteRate {
rate_type:
| 'FLAT'
| 'flat'
| 'PERCENTAGE'
| 'percentage'
| 'SUBSCRIPTION'
| 'subscription'
| 'TIERED'
| 'tiered'
| 'CUSTOM'
| 'custom';
rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'CUSTOM';

credit_type_id?: string;

Expand Down Expand Up @@ -2650,22 +2590,14 @@ export namespace ContractAmendParams {
* quantity is inferred to be 1.
*/
export interface RecurringSchedule {
amount_distribution: 'DIVIDED' | 'divided' | 'DIVIDED_ROUNDED' | 'divided_rounded' | 'EACH' | 'each';
amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH';

/**
* RFC 3339 timestamp (exclusive).
*/
ending_before: string;

frequency:
| 'MONTHLY'
| 'monthly'
| 'QUARTERLY'
| 'quarterly'
| 'SEMI_ANNUAL'
| 'semi_annual'
| 'ANNUAL'
| 'annual';
frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL';

/**
* RFC 3339 timestamp (inclusive).
Expand Down
Loading

0 comments on commit a9083b4

Please sign in to comment.