Skip to content

Commit 743b92e

Browse files
feat(api): api update
1 parent 5d1df3a commit 743b92e

File tree

6 files changed

+38
-6
lines changed

6 files changed

+38
-6
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 232
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-92af5c57fac9c88bad16079e7b437371720d00c368fd4eea5987f94b25855fcb.yml
3-
openapi_spec_hash: 7831d7cdab2d8972f5193916c617c9a2
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a822d0695f48967e594a88eef888b826cd51b62959bd4b3d0163b7d010bab969.yml
3+
openapi_spec_hash: 95ea277ed84c04aefd25bcb63ae4e2e5
44
config_hash: 27e44ed36b9c5617b580ead7231a594a

api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Methods:
9393
- <code title="get /card_disputes/{card_dispute_id}">client.cardDisputes.<a href="./src/resources/card-disputes.ts">retrieve</a>(cardDisputeID) -> CardDispute</code>
9494
- <code title="get /card_disputes">client.cardDisputes.<a href="./src/resources/card-disputes.ts">list</a>({ ...params }) -> CardDisputesPage</code>
9595
- <code title="post /card_disputes/{card_dispute_id}/submit_user_submission">client.cardDisputes.<a href="./src/resources/card-disputes.ts">submitUserSubmission</a>(cardDisputeID, { ...params }) -> CardDispute</code>
96-
- <code title="post /card_disputes/{card_dispute_id}/withdraw">client.cardDisputes.<a href="./src/resources/card-disputes.ts">withdraw</a>(cardDisputeID) -> CardDispute</code>
96+
- <code title="post /card_disputes/{card_dispute_id}/withdraw">client.cardDisputes.<a href="./src/resources/card-disputes.ts">withdraw</a>(cardDisputeID, { ...params }) -> CardDispute</code>
9797

9898
# PhysicalCards
9999

src/client.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ import {
9292
CardDisputeCreateParams,
9393
CardDisputeListParams,
9494
CardDisputeSubmitUserSubmissionParams,
95+
CardDisputeWithdrawParams,
9596
CardDisputes,
9697
CardDisputesPage,
9798
} from './resources/card-disputes';
@@ -1306,6 +1307,7 @@ export declare namespace Increase {
13061307
type CardDisputeCreateParams as CardDisputeCreateParams,
13071308
type CardDisputeListParams as CardDisputeListParams,
13081309
type CardDisputeSubmitUserSubmissionParams as CardDisputeSubmitUserSubmissionParams,
1310+
type CardDisputeWithdrawParams as CardDisputeWithdrawParams,
13091311
};
13101312

13111313
export {

src/resources/card-disputes.ts

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,12 @@ export class CardDisputes extends APIResource {
8888
* );
8989
* ```
9090
*/
91-
withdraw(cardDisputeID: string, options?: RequestOptions): APIPromise<CardDispute> {
92-
return this._client.post(path`/card_disputes/${cardDisputeID}/withdraw`, options);
91+
withdraw(
92+
cardDisputeID: string,
93+
body: CardDisputeWithdrawParams,
94+
options?: RequestOptions,
95+
): APIPromise<CardDispute> {
96+
return this._client.post(path`/card_disputes/${cardDisputeID}/withdraw`, { body, ...options });
9397
}
9498
}
9599

@@ -198,6 +202,12 @@ export interface CardDispute {
198202
* dispute.
199203
*/
200204
win: CardDispute.Win | null;
205+
206+
/**
207+
* If the Card Dispute has been withdrawn, this will contain details of the
208+
* withdrawal.
209+
*/
210+
withdrawal: CardDispute.Withdrawal | null;
201211
}
202212

203213
export namespace CardDispute {
@@ -3040,6 +3050,17 @@ export namespace CardDispute {
30403050
*/
30413051
won_at: string;
30423052
}
3053+
3054+
/**
3055+
* If the Card Dispute has been withdrawn, this will contain details of the
3056+
* withdrawal.
3057+
*/
3058+
export interface Withdrawal {
3059+
/**
3060+
* The explanation for the withdrawal of the Card Dispute.
3061+
*/
3062+
explanation: string | null;
3063+
}
30433064
}
30443065

30453066
export interface CardDisputeCreateParams {
@@ -6821,12 +6842,20 @@ export namespace CardDisputeSubmitUserSubmissionParams {
68216842
}
68226843
}
68236844

6845+
export interface CardDisputeWithdrawParams {
6846+
/**
6847+
* The explanation for withdrawing the Card Dispute.
6848+
*/
6849+
explanation?: string;
6850+
}
6851+
68246852
export declare namespace CardDisputes {
68256853
export {
68266854
type CardDispute as CardDispute,
68276855
type CardDisputesPage as CardDisputesPage,
68286856
type CardDisputeCreateParams as CardDisputeCreateParams,
68296857
type CardDisputeListParams as CardDisputeListParams,
68306858
type CardDisputeSubmitUserSubmissionParams as CardDisputeSubmitUserSubmissionParams,
6859+
type CardDisputeWithdrawParams as CardDisputeWithdrawParams,
68316860
};
68326861
}

src/resources/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ export {
7474
type CardDisputeCreateParams,
7575
type CardDisputeListParams,
7676
type CardDisputeSubmitUserSubmissionParams,
77+
type CardDisputeWithdrawParams,
7778
type CardDisputesPage,
7879
} from './card-disputes';
7980
export {

tests/api-resources/card-disputes.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ describe('resource cardDisputes', () => {
575575
});
576576

577577
test('withdraw', async () => {
578-
const responsePromise = client.cardDisputes.withdraw('card_dispute_h9sc95nbl1cgltpp7men');
578+
const responsePromise = client.cardDisputes.withdraw('card_dispute_h9sc95nbl1cgltpp7men', {});
579579
const rawResponse = await responsePromise.asResponse();
580580
expect(rawResponse).toBeInstanceOf(Response);
581581
const response = await responsePromise;

0 commit comments

Comments
 (0)