Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Jul 26, 2024
1 parent 373dc8a commit deedff3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Release Doctor
on:
pull_request:
branches:
- main
workflow_dispatch:

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 48
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/metronome%2Fmetronome-a6a7fbd8ded2cbeab9720d042affe4bb529c1e1e94d718966d540aa88afc8d6e.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/metronome%2Fmetronome-d80d0d7ae5d3a3f4c13f732d9893fb4720397c19d3d023353b67383dbc25fb43.yml
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The full API of this library can be found in [api.md](api.md).
```js
import Metronome from '@metronome/sdk';

const client = new Metronome({
const metronome = new Metronome({
bearerToken: process.env['METRONOME_BEARER_TOKEN'], // This is the default and can be omitted
});

Expand Down Expand Up @@ -52,7 +52,7 @@ This library includes TypeScript definitions for all request params and response
```ts
import Metronome from '@metronome/sdk';

const client = new Metronome({
const metronome = new Metronome({
bearerToken: process.env['METRONOME_BEARER_TOKEN'], // This is the default and can be omitted
});

Expand Down Expand Up @@ -119,7 +119,7 @@ You can use the `maxRetries` option to configure or disable this:
<!-- prettier-ignore -->
```js
// Configure the default for all requests:
const client = new Metronome({
const metronome = new Metronome({
maxRetries: 0, // default is 2
});

Expand All @@ -136,7 +136,7 @@ Requests time out after 1 minute by default. You can configure this with a `time
<!-- prettier-ignore -->
```ts
// Configure the default for all requests:
const client = new Metronome({
const metronome = new Metronome({
timeout: 20 * 1000, // 20 seconds (default is 1 minute)
});

Expand All @@ -160,7 +160,7 @@ You can also use the `.withResponse()` method to get the raw `Response` along wi

<!-- prettier-ignore -->
```ts
const client = new Metronome();
const metronome = new Metronome();

const response = await metronome.alerts
.create({ alert_type: 'spend_threshold_reached', name: '$100 spend threshold reached', threshold: 10000 })
Expand Down Expand Up @@ -271,7 +271,7 @@ import http from 'http';
import { HttpsProxyAgent } from 'https-proxy-agent';

// Configure the default for all requests:
const client = new Metronome({
const metronome = new Metronome({
httpAgent: new HttpsProxyAgent(process.env.PROXY_URL),
});

Expand Down Expand Up @@ -302,6 +302,14 @@ TypeScript >= 4.5 is supported.

The following runtimes are supported:

- Node.js 18 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.
- Deno v1.28.0 or higher, using `import Metronome from "npm:@metronome/sdk"`.
- Bun 1.0 or later.
- Cloudflare Workers.
- Vercel Edge Runtime.
- Jest 28 or greater with the `"node"` environment (`"jsdom"` is not supported at this time).
- Nitro v2.6 or greater.

Note that React Native is not supported at this time.

If you are interested in other runtime environments, please open or upvote an issue on GitHub.
2 changes: 2 additions & 0 deletions src/resources/customers/invoices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,8 @@ export namespace Invoice {

total: number;

credit_grant_custom_fields?: Record<string, string>;

credit_grant_id?: string;
}

Expand Down

0 comments on commit deedff3

Please sign in to comment.