Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Jun 7, 2024
1 parent ea63380 commit 67c97fe
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 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: 43
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/metronome%2Fmetronome-5d39943fc1800dd6b6314bfe3d9c49de28e45eef6d03433c40f507e6b3ab66a6.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/metronome%2Fmetronome-9bf61eb5c44919a639ac96813ead04300b93f4e18cd1b3c84907c4651b58e1c0.yml
9 changes: 7 additions & 2 deletions src/resources/credits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ export class Credits extends APIResource {
if (isRequestOptions(params)) {
return this.listGrants({}, params);
}
const { next_page, ...body } = params;
return this._client.post('/credits/listGrants', { query: { next_page }, body, ...options });
const { limit, next_page, ...body } = params;
return this._client.post('/credits/listGrants', { query: { limit, next_page }, body, ...options });
}

/**
Expand Down Expand Up @@ -659,6 +659,11 @@ export interface CreditListEntriesParams {
}

export interface CreditListGrantsParams {
/**
* Query param: Max number of results that should be returned
*/
limit?: number;

/**
* Query param: Cursor that indicates where the next page of results should start.
*/
Expand Down
1 change: 1 addition & 0 deletions tests/api-resources/credits.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ describe('resource credits', () => {
await expect(
metronome.credits.listGrants(
{
limit: 1,
next_page: 'string',
credit_grant_ids: [
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
Expand Down

0 comments on commit 67c97fe

Please sign in to comment.