Skip to content

Commit 5f74e21

Browse files
feat: Fix vault provider errors and remove test card mode
Stainless-Generated-From: 293af72203994cbf4993554d97c71692216a11e1
1 parent ca08fa0 commit 5f74e21

2 files changed

Lines changed: 13 additions & 21 deletions

File tree

‎src/resources/vaults/items.ts‎

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ export class Items extends APIResource {
5757
/**
5858
* Retrieve the item first and invoke only an operation listed in
5959
* `available_operations`, following its natural-language description. Operations
60-
* may call an external provider and can return the item's updated state.
60+
* may call an external provider and can return the item's updated state. If the
61+
* provider rate limits spend-request creation, returns HTTP 429 with code
62+
* `spend_request_rate_limited`; stop and back off before retrying.
6163
*/
6264
performOperation(
6365
key: string,
@@ -142,14 +144,16 @@ export interface AgentcardCheckoutAuthorization {
142144
}
143145

144146
/**
145-
* AgentCard reusable card. Each checkout creates an approval-gated authorization
146-
* for spec.merchant / spec.amount. The card stays ready after each authorization.
147+
* Live payment card. Test-mode card creation is not supported.
147148
*/
148149
export type CardVaultItemSpec =
149150
| CardVaultItemSpec.LinkCardVaultItemSpec
150151
| CardVaultItemSpec.AgentCardCardVaultItemSpec;
151152

152153
export namespace CardVaultItemSpec {
154+
/**
155+
* Live payment card. Test-mode card creation is not supported.
156+
*/
153157
export interface LinkCardVaultItemSpec {
154158
/**
155159
* Integer amount in minor currency units.
@@ -173,12 +177,6 @@ export namespace CardVaultItemSpec {
173177

174178
provider: 'link';
175179

176-
/**
177-
* Whether Link should return test credentials instead of a live payment
178-
* credential.
179-
*/
180-
test: boolean;
181-
182180
/**
183181
* Wallet item key used to mint this card.
184182
*/
@@ -243,8 +241,9 @@ export namespace CardVaultItemSpec {
243241
}
244242

245243
/**
246-
* AgentCard reusable card. Each checkout creates an approval-gated authorization
247-
* for spec.merchant / spec.amount. The card stays ready after each authorization.
244+
* AgentCard reusable live payment card. Test-mode card creation is not supported.
245+
* Each checkout creates an approval-gated authorization for spec.merchant /
246+
* spec.amount. The card stays ready after each authorization.
248247
*/
249248
export interface AgentCardCardVaultItemSpec {
250249
/**
@@ -424,8 +423,7 @@ export namespace VaultItem {
424423
key: string;
425424

426425
/**
427-
* AgentCard reusable card. Each checkout creates an approval-gated authorization
428-
* for spec.merchant / spec.amount. The card stays ready after each authorization.
426+
* Live payment card. Test-mode card creation is not supported.
429427
*/
430428
spec: ItemsAPI.CardVaultItemSpec;
431429

@@ -672,9 +670,7 @@ export interface ItemUpdateParams {
672670
id_or_name: string;
673671

674672
/**
675-
* Body param: AgentCard reusable card. Each checkout creates an approval-gated
676-
* authorization for spec.merchant / spec.amount. The card stays ready after each
677-
* authorization.
673+
* Body param: Live payment card. Test-mode card creation is not supported.
678674
*/
679675
spec: CardVaultItemSpec;
680676
}
@@ -743,9 +739,7 @@ export declare namespace ItemUpsertParams {
743739
id_or_name: string;
744740

745741
/**
746-
* Body param: AgentCard reusable card. Each checkout creates an approval-gated
747-
* authorization for spec.merchant / spec.amount. The card stays ready after each
748-
* authorization.
742+
* Body param: Live payment card. Test-mode card creation is not supported.
749743
*/
750744
spec: CardVaultItemSpec;
751745

‎tests/api-resources/vaults/items.test.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ describe('resource items', () => {
4242
merchant_url: 'https://example.com',
4343
payment_method_id: 'x',
4444
provider: 'link',
45-
test: true,
4645
wallet: 'wallet',
4746
},
4847
});
@@ -68,7 +67,6 @@ describe('resource items', () => {
6867
merchant_url: 'https://example.com',
6968
payment_method_id: 'x',
7069
provider: 'link',
71-
test: true,
7270
wallet: 'wallet',
7371
expires_at: 0,
7472
line_items: [

0 commit comments

Comments
 (0)