diff --git a/.stats.yml b/.stats.yml index 85cd569..eb7d19c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 48 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/metronome%2Fmetronome-1ba87fe3b31769922c40c192fab50b9bdda6518303b16c4c1821ea8ecefb5def.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/metronome%2Fmetronome-4065131979feacf59598b6266ddaca7f6a2177203dd04a98be28ed2310cd359d.yml diff --git a/src/resources/alerts.ts b/src/resources/alerts.ts index 6079b0a..621f566 100644 --- a/src/resources/alerts.ts +++ b/src/resources/alerts.ts @@ -64,6 +64,13 @@ export interface AlertCreateParams { */ billable_metric_id?: string; + /** + * An array of strings, representing a way to filter the credit grant this alert + * applies to, by looking at the credit_grant_type field on the credit grant. This + * field is only defined for CreditPercentage and CreditBalance alerts + */ + credit_grant_type_filters?: Array; + credit_type_id?: string; /** diff --git a/src/resources/customers/alerts.ts b/src/resources/customers/alerts.ts index 8b645d7..89df9cb 100644 --- a/src/resources/customers/alerts.ts +++ b/src/resources/customers/alerts.ts @@ -94,6 +94,13 @@ export namespace CustomerAlert { */ updated_at: string; + /** + * An array of strings, representing a way to filter the credit grant this alert + * applies to, by looking at the credit_grant_type field on the credit grant. This + * field is only defined for CreditPercentage and CreditBalance alerts + */ + credit_grant_type_filters?: Array; + credit_type?: Shared.CreditType | null; /** diff --git a/src/resources/customers/invoices.ts b/src/resources/customers/invoices.ts index 495381e..3b9856e 100644 --- a/src/resources/customers/invoices.ts +++ b/src/resources/customers/invoices.ts @@ -298,12 +298,22 @@ export namespace Invoice { credit_grant_id?: string; + /** + * The end date for the charge (for seats charges only). + */ + end_date?: string; + /** * the unit price for this charge, present only if the charge is not tiered and the * quantity is nonzero */ price?: number; + /** + * The start date for the charge (for seats charges only). + */ + start_date?: string; + tiers?: Array; } diff --git a/tests/api-resources/alerts.test.ts b/tests/api-resources/alerts.test.ts index 08335fc..a8c2bdc 100644 --- a/tests/api-resources/alerts.test.ts +++ b/tests/api-resources/alerts.test.ts @@ -30,6 +30,7 @@ describe('resource alerts', () => { name: '$100 spend threshold reached', threshold: 10000, billable_metric_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + credit_grant_type_filters: ['enterprise'], credit_type_id: '2714e483-4ff1-48e4-9e25-ac732e8f24f2', custom_field_filters: [ { entity: 'Contract', key: 'string', value: 'string' }, diff --git a/yarn.lock b/yarn.lock index eaac0d4..69a045c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3033,9 +3033,9 @@ pure-rand@^6.0.0: integrity sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA== qs@^6.10.3: - version "6.12.1" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.12.1.tgz#39422111ca7cbdb70425541cba20c7d7b216599a" - integrity sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ== + version "6.12.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.12.2.tgz#5443b587f3bf73ac68968de491e5b25bafe04478" + integrity sha512-x+NLUpx9SYrcwXtX7ob1gnkSems4i/mGZX5SlYxwIau6RrUSODO89TR/XDGGpn5RPWSYIB+aSfuSlV5+CmbTBg== dependencies: side-channel "^1.0.6"