Skip to content

Commit 8abc734

Browse files
feat(api): Add card_authorization.challenge_response webhook
1 parent 4045409 commit 8abc734

32 files changed

Lines changed: 447 additions & 4 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 190
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-fd53f07a8b1f148011972d7eba834d5995778d707ff8ef1ead92580b44142a15.yml
3-
openapi_spec_hash: 45892e6361542824364d82181d4eb80d
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-28c9b43d3182bf0e1c9635f6100e4995a744724db1edd635cfd3fc7702ced68c.yml
3+
openapi_spec_hash: aba00a65f877c5095499d9d1a66b5e5f
44
config_hash: 5eca052bb23d273fa970eac3127dd919

lib/lithic.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@
168168
require_relative "lithic/models/book_transfer_transaction_updated_webhook_event"
169169
require_relative "lithic/models/card"
170170
require_relative "lithic/models/card_authorization_approval_request_webhook_event"
171+
require_relative "lithic/models/card_authorization_challenge_response_webhook_event"
171172
require_relative "lithic/models/card_bulk_order"
172173
require_relative "lithic/models/card_bulk_order_create_params"
173174
require_relative "lithic/models/card_bulk_order_list_params"

lib/lithic/models.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ module Lithic
131131
CardAuthorizationApprovalRequestWebhookEvent =
132132
Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent
133133

134+
CardAuthorizationChallengeResponseWebhookEvent =
135+
Lithic::Models::CardAuthorizationChallengeResponseWebhookEvent
136+
134137
CardBulkOrder = Lithic::Models::CardBulkOrder
135138

136139
CardBulkOrderCreateParams = Lithic::Models::CardBulkOrderCreateParams
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# frozen_string_literal: true
2+
3+
module Lithic
4+
module Models
5+
class CardAuthorizationChallengeResponseWebhookEvent < Lithic::Internal::Type::BaseModel
6+
# @!attribute card_token
7+
# The token of the card associated with the challenge
8+
#
9+
# @return [String, nil]
10+
required :card_token, String, nil?: true
11+
12+
# @!attribute challenge_method
13+
# The method used to deliver the challenge to the cardholder
14+
#
15+
# @return [Symbol, Lithic::Models::CardAuthorizationChallengeResponseWebhookEvent::ChallengeMethod]
16+
required :challenge_method,
17+
enum: -> { Lithic::CardAuthorizationChallengeResponseWebhookEvent::ChallengeMethod }
18+
19+
# @!attribute completed
20+
# The timestamp of when the challenge was completed
21+
#
22+
# @return [Time, nil]
23+
required :completed, Time, nil?: true
24+
25+
# @!attribute created
26+
# The timestamp of when the challenge was created
27+
#
28+
# @return [Time]
29+
required :created, Time
30+
31+
# @!attribute event_token
32+
# Globally unique identifier for the event
33+
#
34+
# @return [String]
35+
required :event_token, String
36+
37+
# @!attribute event_type
38+
# Event type
39+
#
40+
# @return [Symbol, :"card_authorization.challenge_response"]
41+
required :event_type, const: :"card_authorization.challenge_response"
42+
43+
# @!attribute response
44+
# The cardholder's response to the challenge
45+
#
46+
# @return [Symbol, Lithic::Models::CardAuthorizationChallengeResponseWebhookEvent::Response]
47+
required :response, enum: -> { Lithic::CardAuthorizationChallengeResponseWebhookEvent::Response }
48+
49+
# @!attribute transaction_token
50+
# The token of the transaction associated with the authorization event being
51+
# challenged
52+
#
53+
# @return [String, nil]
54+
required :transaction_token, String, nil?: true
55+
56+
# @!method initialize(card_token:, challenge_method:, completed:, created:, event_token:, response:, transaction_token:, event_type: :"card_authorization.challenge_response")
57+
# Some parameter documentations has been truncated, see
58+
# {Lithic::Models::CardAuthorizationChallengeResponseWebhookEvent} for more
59+
# details.
60+
#
61+
# @param card_token [String, nil] The token of the card associated with the challenge
62+
#
63+
# @param challenge_method [Symbol, Lithic::Models::CardAuthorizationChallengeResponseWebhookEvent::ChallengeMethod] The method used to deliver the challenge to the cardholder
64+
#
65+
# @param completed [Time, nil] The timestamp of when the challenge was completed
66+
#
67+
# @param created [Time] The timestamp of when the challenge was created
68+
#
69+
# @param event_token [String] Globally unique identifier for the event
70+
#
71+
# @param response [Symbol, Lithic::Models::CardAuthorizationChallengeResponseWebhookEvent::Response] The cardholder's response to the challenge
72+
#
73+
# @param transaction_token [String, nil] The token of the transaction associated with the authorization event being chall
74+
#
75+
# @param event_type [Symbol, :"card_authorization.challenge_response"] Event type
76+
77+
# The method used to deliver the challenge to the cardholder
78+
#
79+
# @see Lithic::Models::CardAuthorizationChallengeResponseWebhookEvent#challenge_method
80+
module ChallengeMethod
81+
extend Lithic::Internal::Type::Enum
82+
83+
SMS = :SMS
84+
85+
# @!method self.values
86+
# @return [Array<Symbol>]
87+
end
88+
89+
# The cardholder's response to the challenge
90+
#
91+
# @see Lithic::Models::CardAuthorizationChallengeResponseWebhookEvent#response
92+
module Response
93+
extend Lithic::Internal::Type::Enum
94+
95+
APPROVE = :APPROVE
96+
DECLINE = :DECLINE
97+
98+
# @!method self.values
99+
# @return [Array<Symbol>]
100+
end
101+
end
102+
end
103+
end

lib/lithic/models/event.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ class Event < Lithic::Internal::Type::BaseModel
3333
# created.
3434
# - book_transfer_transaction.updated: Occurs when a book transfer transaction is
3535
# updated.
36+
# - card_authorization.challenge_response: Occurs when a cardholder responds to an
37+
# SMS challenge during card authorization.
3638
# - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial
3739
# data is processed for a transaction event.
3840
# - card_transaction.enhanced_data.updated: Occurs when L2/L3 enhanced commercial
@@ -154,6 +156,8 @@ class Event < Lithic::Internal::Type::BaseModel
154156
# created.
155157
# - book_transfer_transaction.updated: Occurs when a book transfer transaction is
156158
# updated.
159+
# - card_authorization.challenge_response: Occurs when a cardholder responds to an
160+
# SMS challenge during card authorization.
157161
# - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial
158162
# data is processed for a transaction event.
159163
# - card_transaction.enhanced_data.updated: Occurs when L2/L3 enhanced commercial
@@ -251,6 +255,7 @@ module EventType
251255
BALANCE_UPDATED = :"balance.updated"
252256
BOOK_TRANSFER_TRANSACTION_CREATED = :"book_transfer_transaction.created"
253257
BOOK_TRANSFER_TRANSACTION_UPDATED = :"book_transfer_transaction.updated"
258+
CARD_AUTHORIZATION_CHALLENGE_RESPONSE = :"card_authorization.challenge_response"
254259
CARD_TRANSACTION_ENHANCED_DATA_CREATED = :"card_transaction.enhanced_data.created"
255260
CARD_TRANSACTION_ENHANCED_DATA_UPDATED = :"card_transaction.enhanced_data.updated"
256261
CARD_TRANSACTION_UPDATED = :"card_transaction.updated"

lib/lithic/models/event_list_params.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ class EventListParams < Lithic::Internal::Type::BaseModel
8787
# created.
8888
# - book_transfer_transaction.updated: Occurs when a book transfer transaction is
8989
# updated.
90+
# - card_authorization.challenge_response: Occurs when a cardholder responds to an
91+
# SMS challenge during card authorization.
9092
# - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial
9193
# data is processed for a transaction event.
9294
# - card_transaction.enhanced_data.updated: Occurs when L2/L3 enhanced commercial
@@ -182,6 +184,7 @@ module EventType
182184
BALANCE_UPDATED = :"balance.updated"
183185
BOOK_TRANSFER_TRANSACTION_CREATED = :"book_transfer_transaction.created"
184186
BOOK_TRANSFER_TRANSACTION_UPDATED = :"book_transfer_transaction.updated"
187+
CARD_AUTHORIZATION_CHALLENGE_RESPONSE = :"card_authorization.challenge_response"
185188
CARD_TRANSACTION_ENHANCED_DATA_CREATED = :"card_transaction.enhanced_data.created"
186189
CARD_TRANSACTION_ENHANCED_DATA_UPDATED = :"card_transaction.enhanced_data.updated"
187190
CARD_TRANSACTION_UPDATED = :"card_transaction.updated"

lib/lithic/models/event_subscription.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ class EventSubscription < Lithic::Internal::Type::BaseModel
6060
# created.
6161
# - book_transfer_transaction.updated: Occurs when a book transfer transaction is
6262
# updated.
63+
# - card_authorization.challenge_response: Occurs when a cardholder responds to an
64+
# SMS challenge during card authorization.
6365
# - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial
6466
# data is processed for a transaction event.
6567
# - card_transaction.enhanced_data.updated: Occurs when L2/L3 enhanced commercial
@@ -155,6 +157,7 @@ module EventType
155157
BALANCE_UPDATED = :"balance.updated"
156158
BOOK_TRANSFER_TRANSACTION_CREATED = :"book_transfer_transaction.created"
157159
BOOK_TRANSFER_TRANSACTION_UPDATED = :"book_transfer_transaction.updated"
160+
CARD_AUTHORIZATION_CHALLENGE_RESPONSE = :"card_authorization.challenge_response"
158161
CARD_TRANSACTION_ENHANCED_DATA_CREATED = :"card_transaction.enhanced_data.created"
159162
CARD_TRANSACTION_ENHANCED_DATA_UPDATED = :"card_transaction.enhanced_data.updated"
160163
CARD_TRANSACTION_UPDATED = :"card_transaction.updated"

lib/lithic/models/events/subscription_create_params.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ class SubscriptionCreateParams < Lithic::Internal::Type::BaseModel
6262
# created.
6363
# - book_transfer_transaction.updated: Occurs when a book transfer transaction is
6464
# updated.
65+
# - card_authorization.challenge_response: Occurs when a cardholder responds to an
66+
# SMS challenge during card authorization.
6567
# - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial
6668
# data is processed for a transaction event.
6769
# - card_transaction.enhanced_data.updated: Occurs when L2/L3 enhanced commercial
@@ -157,6 +159,7 @@ module EventType
157159
BALANCE_UPDATED = :"balance.updated"
158160
BOOK_TRANSFER_TRANSACTION_CREATED = :"book_transfer_transaction.created"
159161
BOOK_TRANSFER_TRANSACTION_UPDATED = :"book_transfer_transaction.updated"
162+
CARD_AUTHORIZATION_CHALLENGE_RESPONSE = :"card_authorization.challenge_response"
160163
CARD_TRANSACTION_ENHANCED_DATA_CREATED = :"card_transaction.enhanced_data.created"
161164
CARD_TRANSACTION_ENHANCED_DATA_UPDATED = :"card_transaction.enhanced_data.updated"
162165
CARD_TRANSACTION_UPDATED = :"card_transaction.updated"

lib/lithic/models/events/subscription_send_simulated_example_params.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ module EventType
3838
BALANCE_UPDATED = :"balance.updated"
3939
BOOK_TRANSFER_TRANSACTION_CREATED = :"book_transfer_transaction.created"
4040
BOOK_TRANSFER_TRANSACTION_UPDATED = :"book_transfer_transaction.updated"
41+
CARD_AUTHORIZATION_CHALLENGE_RESPONSE = :"card_authorization.challenge_response"
4142
CARD_TRANSACTION_ENHANCED_DATA_CREATED = :"card_transaction.enhanced_data.created"
4243
CARD_TRANSACTION_ENHANCED_DATA_UPDATED = :"card_transaction.enhanced_data.updated"
4344
CARD_TRANSACTION_UPDATED = :"card_transaction.updated"

lib/lithic/models/events/subscription_update_params.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ class SubscriptionUpdateParams < Lithic::Internal::Type::BaseModel
6969
# created.
7070
# - book_transfer_transaction.updated: Occurs when a book transfer transaction is
7171
# updated.
72+
# - card_authorization.challenge_response: Occurs when a cardholder responds to an
73+
# SMS challenge during card authorization.
7274
# - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial
7375
# data is processed for a transaction event.
7476
# - card_transaction.enhanced_data.updated: Occurs when L2/L3 enhanced commercial
@@ -164,6 +166,7 @@ module EventType
164166
BALANCE_UPDATED = :"balance.updated"
165167
BOOK_TRANSFER_TRANSACTION_CREATED = :"book_transfer_transaction.created"
166168
BOOK_TRANSFER_TRANSACTION_UPDATED = :"book_transfer_transaction.updated"
169+
CARD_AUTHORIZATION_CHALLENGE_RESPONSE = :"card_authorization.challenge_response"
167170
CARD_TRANSACTION_ENHANCED_DATA_CREATED = :"card_transaction.enhanced_data.created"
168171
CARD_TRANSACTION_ENHANCED_DATA_UPDATED = :"card_transaction.enhanced_data.updated"
169172
CARD_TRANSACTION_UPDATED = :"card_transaction.updated"

0 commit comments

Comments
 (0)