Skip to content

Commit 0a384b1

Browse files
feat(api): Add card.updated event
1 parent c6b8cea commit 0a384b1

7 files changed

Lines changed: 37 additions & 2 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 176
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-a64e7cc23f0e28427e8a433dd951f05da5d35d982fe695ab2914941711bdfb0f.yml
3-
openapi_spec_hash: 22ea6fa451b7bea3cc33a23d3aded4d6
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-11ebfaf7523a8c0eafca9e2c914e44102537634be4b22289fe85d46b9ab3d650.yml
3+
openapi_spec_hash: 38fdabb7812d528c839eadad87d49e5a
44
config_hash: 31d71922d7838f34ae0875c9b8026d99

api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,7 @@ Types:
747747
- <code><a href="./src/resources/webhooks.ts">CardRenewedWebhookEvent</a></code>
748748
- <code><a href="./src/resources/webhooks.ts">CardReissuedWebhookEvent</a></code>
749749
- <code><a href="./src/resources/webhooks.ts">CardShippedWebhookEvent</a></code>
750+
- <code><a href="./src/resources/webhooks.ts">CardUpdatedWebhookEvent</a></code>
750751
- <code><a href="./src/resources/webhooks.ts">CardTransactionUpdatedWebhookEvent</a></code>
751752
- <code><a href="./src/resources/webhooks.ts">CardTransactionEnhancedDataCreatedWebhookEvent</a></code>
752753
- <code><a href="./src/resources/webhooks.ts">CardTransactionEnhancedDataUpdatedWebhookEvent</a></code>

src/client.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ import {
216216
CardTransactionEnhancedDataCreatedWebhookEvent,
217217
CardTransactionEnhancedDataUpdatedWebhookEvent,
218218
CardTransactionUpdatedWebhookEvent,
219+
CardUpdatedWebhookEvent,
219220
DigitalWalletTokenizationApprovalRequestWebhookEvent,
220221
DigitalWalletTokenizationResultWebhookEvent,
221222
DigitalWalletTokenizationTwoFactorAuthenticationCodeSentWebhookEvent,
@@ -1515,6 +1516,7 @@ export declare namespace Lithic {
15151516
type CardRenewedWebhookEvent as CardRenewedWebhookEvent,
15161517
type CardReissuedWebhookEvent as CardReissuedWebhookEvent,
15171518
type CardShippedWebhookEvent as CardShippedWebhookEvent,
1519+
type CardUpdatedWebhookEvent as CardUpdatedWebhookEvent,
15181520
type CardTransactionUpdatedWebhookEvent as CardTransactionUpdatedWebhookEvent,
15191521
type CardTransactionEnhancedDataCreatedWebhookEvent as CardTransactionEnhancedDataCreatedWebhookEvent,
15201522
type CardTransactionEnhancedDataUpdatedWebhookEvent as CardTransactionEnhancedDataUpdatedWebhookEvent,

src/resources/events/events.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ export interface Event {
120120
* - card.reissued: Occurs when a card is reissued.
121121
* - card.renewed: Occurs when a card is renewed.
122122
* - card.shipped: Occurs when a card is shipped.
123+
* - card.updated: Occurs when a card is updated.
123124
* - digital_wallet.tokenization_approval_request: Occurs when a tokenization
124125
* approval request is made. This event will be deprecated in the future. We
125126
* recommend using `tokenization.approval_request` instead.
@@ -213,6 +214,7 @@ export interface Event {
213214
| 'card.reissued'
214215
| 'card.renewed'
215216
| 'card.shipped'
217+
| 'card.updated'
216218
| 'digital_wallet.tokenization_approval_request'
217219
| 'digital_wallet.tokenization_result'
218220
| 'digital_wallet.tokenization_two_factor_authentication_code'
@@ -291,6 +293,7 @@ export interface EventSubscription {
291293
| 'card.reissued'
292294
| 'card.renewed'
293295
| 'card.shipped'
296+
| 'card.updated'
294297
| 'digital_wallet.tokenization_approval_request'
295298
| 'digital_wallet.tokenization_result'
296299
| 'digital_wallet.tokenization_two_factor_authentication_code'
@@ -407,6 +410,7 @@ export interface EventListParams extends CursorPageParams {
407410
| 'card.reissued'
408411
| 'card.renewed'
409412
| 'card.shipped'
413+
| 'card.updated'
410414
| 'digital_wallet.tokenization_approval_request'
411415
| 'digital_wallet.tokenization_result'
412416
| 'digital_wallet.tokenization_two_factor_authentication_code'

src/resources/events/subscriptions.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ export interface SubscriptionCreateParams {
183183
| 'card.reissued'
184184
| 'card.renewed'
185185
| 'card.shipped'
186+
| 'card.updated'
186187
| 'digital_wallet.tokenization_approval_request'
187188
| 'digital_wallet.tokenization_result'
188189
| 'digital_wallet.tokenization_two_factor_authentication_code'
@@ -259,6 +260,7 @@ export interface SubscriptionUpdateParams {
259260
| 'card.reissued'
260261
| 'card.renewed'
261262
| 'card.shipped'
263+
| 'card.updated'
262264
| 'digital_wallet.tokenization_approval_request'
263265
| 'digital_wallet.tokenization_result'
264266
| 'digital_wallet.tokenization_two_factor_authentication_code'
@@ -365,6 +367,7 @@ export interface SubscriptionSendSimulatedExampleParams {
365367
| 'card.reissued'
366368
| 'card.renewed'
367369
| 'card.shipped'
370+
| 'card.updated'
368371
| 'digital_wallet.tokenization_approval_request'
369372
| 'digital_wallet.tokenization_result'
370373
| 'digital_wallet.tokenization_two_factor_authentication_code'

src/resources/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ export {
299299
type CardRenewedWebhookEvent,
300300
type CardReissuedWebhookEvent,
301301
type CardShippedWebhookEvent,
302+
type CardUpdatedWebhookEvent,
302303
type CardTransactionUpdatedWebhookEvent,
303304
type CardTransactionEnhancedDataCreatedWebhookEvent,
304305
type CardTransactionEnhancedDataUpdatedWebhookEvent,

src/resources/webhooks.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,6 +1358,28 @@ export interface CardShippedWebhookEvent {
13581358
tracking_number: string | null;
13591359
}
13601360

1361+
export interface CardUpdatedWebhookEvent {
1362+
/**
1363+
* The token of the card that was updated.
1364+
*/
1365+
token: string;
1366+
1367+
/**
1368+
* The type of event that occurred.
1369+
*/
1370+
event_type: 'card.updated';
1371+
1372+
/**
1373+
* The previous values of the fields that were updated.
1374+
*/
1375+
previous_fields: unknown;
1376+
1377+
/**
1378+
* The current state of the card.
1379+
*/
1380+
state: string;
1381+
}
1382+
13611383
export interface CardTransactionUpdatedWebhookEvent extends TransactionsAPI.Transaction {
13621384
/**
13631385
* The type of event that occurred.
@@ -2296,6 +2318,7 @@ export type ParsedWebhookEvent =
22962318
| CardRenewedWebhookEvent
22972319
| CardReissuedWebhookEvent
22982320
| CardShippedWebhookEvent
2321+
| CardUpdatedWebhookEvent
22992322
| CardTransactionUpdatedWebhookEvent
23002323
| CardTransactionEnhancedDataCreatedWebhookEvent
23012324
| CardTransactionEnhancedDataUpdatedWebhookEvent
@@ -2773,6 +2796,7 @@ export declare namespace Webhooks {
27732796
type CardRenewedWebhookEvent as CardRenewedWebhookEvent,
27742797
type CardReissuedWebhookEvent as CardReissuedWebhookEvent,
27752798
type CardShippedWebhookEvent as CardShippedWebhookEvent,
2799+
type CardUpdatedWebhookEvent as CardUpdatedWebhookEvent,
27762800
type CardTransactionUpdatedWebhookEvent as CardTransactionUpdatedWebhookEvent,
27772801
type CardTransactionEnhancedDataCreatedWebhookEvent as CardTransactionEnhancedDataCreatedWebhookEvent,
27782802
type CardTransactionEnhancedDataUpdatedWebhookEvent as CardTransactionEnhancedDataUpdatedWebhookEvent,

0 commit comments

Comments
 (0)