Skip to content

Commit 80369fe

Browse files
feat(api): Add card.updated event
1 parent 35a67d3 commit 80369fe

32 files changed

Lines changed: 268 additions & 5 deletions

.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

lib/lithic.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@
185185
require_relative "lithic/models/card_transaction_enhanced_data_created_webhook_event"
186186
require_relative "lithic/models/card_transaction_enhanced_data_updated_webhook_event"
187187
require_relative "lithic/models/card_transaction_updated_webhook_event"
188+
require_relative "lithic/models/card_updated_webhook_event"
188189
require_relative "lithic/models/card_update_params"
189190
require_relative "lithic/models/card_web_provision_params"
190191
require_relative "lithic/models/card_web_provision_response"

lib/lithic/models.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ module Lithic
189189

190190
CardTransactionUpdatedWebhookEvent = Lithic::Models::CardTransactionUpdatedWebhookEvent
191191

192+
CardUpdatedWebhookEvent = Lithic::Models::CardUpdatedWebhookEvent
193+
192194
CardUpdateParams = Lithic::Models::CardUpdateParams
193195

194196
CardWebProvisionParams = Lithic::Models::CardWebProvisionParams
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# frozen_string_literal: true
2+
3+
module Lithic
4+
module Models
5+
class CardUpdatedWebhookEvent < Lithic::Internal::Type::BaseModel
6+
# @!attribute token
7+
# The token of the card that was updated.
8+
#
9+
# @return [String]
10+
required :token, String
11+
12+
# @!attribute event_type
13+
# The type of event that occurred.
14+
#
15+
# @return [Symbol, :"card.updated"]
16+
required :event_type, const: :"card.updated"
17+
18+
# @!attribute previous_fields
19+
# The previous values of the fields that were updated.
20+
#
21+
# @return [Object]
22+
required :previous_fields, Lithic::Internal::Type::Unknown
23+
24+
# @!attribute state
25+
# The current state of the card.
26+
#
27+
# @return [String]
28+
required :state, String
29+
30+
# @!method initialize(token:, previous_fields:, state:, event_type: :"card.updated")
31+
# @param token [String] The token of the card that was updated.
32+
#
33+
# @param previous_fields [Object] The previous values of the fields that were updated.
34+
#
35+
# @param state [String] The current state of the card.
36+
#
37+
# @param event_type [Symbol, :"card.updated"] The type of event that occurred.
38+
end
39+
end
40+
end

lib/lithic/models/event.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class Event < Lithic::Internal::Type::BaseModel
4444
# - card.reissued: Occurs when a card is reissued.
4545
# - card.renewed: Occurs when a card is renewed.
4646
# - card.shipped: Occurs when a card is shipped.
47+
# - card.updated: Occurs when a card is updated.
4748
# - digital_wallet.tokenization_approval_request: Occurs when a tokenization
4849
# approval request is made. This event will be deprecated in the future. We
4950
# recommend using `tokenization.approval_request` instead.
@@ -167,6 +168,7 @@ class Event < Lithic::Internal::Type::BaseModel
167168
# - card.reissued: Occurs when a card is reissued.
168169
# - card.renewed: Occurs when a card is renewed.
169170
# - card.shipped: Occurs when a card is shipped.
171+
# - card.updated: Occurs when a card is updated.
170172
# - digital_wallet.tokenization_approval_request: Occurs when a tokenization
171173
# approval request is made. This event will be deprecated in the future. We
172174
# recommend using `tokenization.approval_request` instead.
@@ -263,6 +265,7 @@ module EventType
263265
CARD_REISSUED = :"card.reissued"
264266
CARD_RENEWED = :"card.renewed"
265267
CARD_SHIPPED = :"card.shipped"
268+
CARD_UPDATED = :"card.updated"
266269
DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = :"digital_wallet.tokenization_approval_request"
267270
DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result"
268271
DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE =

lib/lithic/models/event_list_params.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ class EventListParams < Lithic::Internal::Type::BaseModel
9898
# - card.reissued: Occurs when a card is reissued.
9999
# - card.renewed: Occurs when a card is renewed.
100100
# - card.shipped: Occurs when a card is shipped.
101+
# - card.updated: Occurs when a card is updated.
101102
# - digital_wallet.tokenization_approval_request: Occurs when a tokenization
102103
# approval request is made. This event will be deprecated in the future. We
103104
# recommend using `tokenization.approval_request` instead.
@@ -192,6 +193,7 @@ module EventType
192193
CARD_REISSUED = :"card.reissued"
193194
CARD_RENEWED = :"card.renewed"
194195
CARD_SHIPPED = :"card.shipped"
196+
CARD_UPDATED = :"card.updated"
195197
DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = :"digital_wallet.tokenization_approval_request"
196198
DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result"
197199
DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE =

lib/lithic/models/event_subscription.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ class EventSubscription < Lithic::Internal::Type::BaseModel
7171
# - card.reissued: Occurs when a card is reissued.
7272
# - card.renewed: Occurs when a card is renewed.
7373
# - card.shipped: Occurs when a card is shipped.
74+
# - card.updated: Occurs when a card is updated.
7475
# - digital_wallet.tokenization_approval_request: Occurs when a tokenization
7576
# approval request is made. This event will be deprecated in the future. We
7677
# recommend using `tokenization.approval_request` instead.
@@ -165,6 +166,7 @@ module EventType
165166
CARD_REISSUED = :"card.reissued"
166167
CARD_RENEWED = :"card.renewed"
167168
CARD_SHIPPED = :"card.shipped"
169+
CARD_UPDATED = :"card.updated"
168170
DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = :"digital_wallet.tokenization_approval_request"
169171
DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result"
170172
DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE =

lib/lithic/models/events/subscription_create_params.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ class SubscriptionCreateParams < Lithic::Internal::Type::BaseModel
7373
# - card.reissued: Occurs when a card is reissued.
7474
# - card.renewed: Occurs when a card is renewed.
7575
# - card.shipped: Occurs when a card is shipped.
76+
# - card.updated: Occurs when a card is updated.
7677
# - digital_wallet.tokenization_approval_request: Occurs when a tokenization
7778
# approval request is made. This event will be deprecated in the future. We
7879
# recommend using `tokenization.approval_request` instead.
@@ -167,6 +168,7 @@ module EventType
167168
CARD_REISSUED = :"card.reissued"
168169
CARD_RENEWED = :"card.renewed"
169170
CARD_SHIPPED = :"card.shipped"
171+
CARD_UPDATED = :"card.updated"
170172
DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = :"digital_wallet.tokenization_approval_request"
171173
DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result"
172174
DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE =

lib/lithic/models/events/subscription_send_simulated_example_params.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ module EventType
3939
CARD_REISSUED = :"card.reissued"
4040
CARD_RENEWED = :"card.renewed"
4141
CARD_SHIPPED = :"card.shipped"
42+
CARD_UPDATED = :"card.updated"
4243
DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = :"digital_wallet.tokenization_approval_request"
4344
DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result"
4445
DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE =

lib/lithic/models/events/subscription_update_params.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ class SubscriptionUpdateParams < Lithic::Internal::Type::BaseModel
7373
# - card.reissued: Occurs when a card is reissued.
7474
# - card.renewed: Occurs when a card is renewed.
7575
# - card.shipped: Occurs when a card is shipped.
76+
# - card.updated: Occurs when a card is updated.
7677
# - digital_wallet.tokenization_approval_request: Occurs when a tokenization
7778
# approval request is made. This event will be deprecated in the future. We
7879
# recommend using `tokenization.approval_request` instead.
@@ -167,6 +168,7 @@ module EventType
167168
CARD_REISSUED = :"card.reissued"
168169
CARD_RENEWED = :"card.renewed"
169170
CARD_SHIPPED = :"card.shipped"
171+
CARD_UPDATED = :"card.updated"
170172
DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = :"digital_wallet.tokenization_approval_request"
171173
DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result"
172174
DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE =

0 commit comments

Comments
 (0)