Skip to content

Commit 0543caa

Browse files
docs: Add card embed documentation
1 parent 979bd5d commit 0543caa

37 files changed

Lines changed: 789 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: 214
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-09b6d1b85c657173562e9a372adc74551f07d476122003078e9168467329f792.yml
3-
openapi_spec_hash: a2b3a526310ceccd4ccb59ec428d246f
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-2d2600072500797474f0d7798c1a8b668bfbc4e0c6a8f076ca7b4cc7ad82058b.yml
3+
openapi_spec_hash: 7605eb6be77a3d150078916f0eb0e9ac
44
config_hash: 5bb913c05ebeb301ec925b16e75bb251

lib/lithic.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@
256256
require_relative "lithic/models/dispute_updated_webhook_event"
257257
require_relative "lithic/models/dispute_update_params"
258258
require_relative "lithic/models/document"
259+
require_relative "lithic/models/embed_session_generated_webhook_event"
260+
require_relative "lithic/models/embed_viewed_webhook_event"
259261
require_relative "lithic/models/event"
260262
require_relative "lithic/models/event_list_attempts_params"
261263
require_relative "lithic/models/event_list_params"

lib/lithic/models.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,10 @@ module Lithic
290290

291291
Document = Lithic::Models::Document
292292

293+
EmbedSessionGeneratedWebhookEvent = Lithic::Models::EmbedSessionGeneratedWebhookEvent
294+
295+
EmbedViewedWebhookEvent = Lithic::Models::EmbedViewedWebhookEvent
296+
293297
Event = Lithic::Models::Event
294298

295299
EventListAttemptsParams = Lithic::Models::EventListAttemptsParams
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# frozen_string_literal: true
2+
3+
module Lithic
4+
module Models
5+
class EmbedSessionGeneratedWebhookEvent < Lithic::Internal::Type::BaseModel
6+
# @!attribute account_token
7+
# The token of the account associated with the card
8+
#
9+
# @return [String]
10+
required :account_token, String
11+
12+
# @!attribute card_token
13+
# The token of the card associated with the embed session
14+
#
15+
# @return [String]
16+
required :card_token, String
17+
18+
# @!attribute device_details
19+
# Details about the request that generated the embed session
20+
#
21+
# @return [Lithic::Models::EmbedSessionGeneratedWebhookEvent::DeviceDetails]
22+
required :device_details, -> { Lithic::EmbedSessionGeneratedWebhookEvent::DeviceDetails }
23+
24+
# @!attribute event_type
25+
# The type of event
26+
#
27+
# @return [Symbol, :"embed.session_generated"]
28+
required :event_type, const: :"embed.session_generated"
29+
30+
# @!attribute session_id
31+
# The identifier shared by webhook events for the same embed session.
32+
#
33+
# @return [String]
34+
required :session_id, String
35+
36+
# @!attribute session_type
37+
# The type of embed session that was generated
38+
#
39+
# @return [Symbol, Lithic::Models::EmbedSessionGeneratedWebhookEvent::SessionType]
40+
required :session_type, enum: -> { Lithic::EmbedSessionGeneratedWebhookEvent::SessionType }
41+
42+
# @!method initialize(account_token:, card_token:, device_details:, session_id:, session_type:, event_type: :"embed.session_generated")
43+
# @param account_token [String] The token of the account associated with the card
44+
#
45+
# @param card_token [String] The token of the card associated with the embed session
46+
#
47+
# @param device_details [Lithic::Models::EmbedSessionGeneratedWebhookEvent::DeviceDetails] Details about the request that generated the embed session
48+
#
49+
# @param session_id [String] The identifier shared by webhook events for the same embed session.
50+
#
51+
# @param session_type [Symbol, Lithic::Models::EmbedSessionGeneratedWebhookEvent::SessionType] The type of embed session that was generated
52+
#
53+
# @param event_type [Symbol, :"embed.session_generated"] The type of event
54+
55+
# @see Lithic::Models::EmbedSessionGeneratedWebhookEvent#device_details
56+
class DeviceDetails < Lithic::Internal::Type::BaseModel
57+
# @!attribute ip_address
58+
# The IP address recorded for the request that generated the event
59+
#
60+
# @return [String]
61+
required :ip_address, String
62+
63+
# @!method initialize(ip_address:)
64+
# Details about the request that generated the embed session
65+
#
66+
# @param ip_address [String] The IP address recorded for the request that generated the event
67+
end
68+
69+
# The type of embed session that was generated
70+
#
71+
# @see Lithic::Models::EmbedSessionGeneratedWebhookEvent#session_type
72+
module SessionType
73+
extend Lithic::Internal::Type::Enum
74+
75+
CARD_EMBED = :CARD_EMBED
76+
PIN_SETTING_EMBED = :PIN_SETTING_EMBED
77+
78+
# @!method self.values
79+
# @return [Array<Symbol>]
80+
end
81+
end
82+
end
83+
end
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# frozen_string_literal: true
2+
3+
module Lithic
4+
module Models
5+
class EmbedViewedWebhookEvent < Lithic::Internal::Type::BaseModel
6+
# @!attribute account_token
7+
# The token of the account associated with the card
8+
#
9+
# @return [String]
10+
required :account_token, String
11+
12+
# @!attribute card_token
13+
# The token of the card whose details were revealed
14+
#
15+
# @return [String]
16+
required :card_token, String
17+
18+
# @!attribute device_details
19+
# Details about the request that revealed the card detail
20+
#
21+
# @return [Lithic::Models::EmbedViewedWebhookEvent::DeviceDetails]
22+
required :device_details, -> { Lithic::EmbedViewedWebhookEvent::DeviceDetails }
23+
24+
# @!attribute embed_type
25+
# The type of card detail that was revealed
26+
#
27+
# @return [Symbol, Lithic::Models::EmbedViewedWebhookEvent::EmbedType]
28+
required :embed_type, enum: -> { Lithic::EmbedViewedWebhookEvent::EmbedType }
29+
30+
# @!attribute event_type
31+
# The type of event
32+
#
33+
# @return [Symbol, :"embed.viewed"]
34+
required :event_type, const: :"embed.viewed"
35+
36+
# @!attribute session_id
37+
# The identifier shared by webhook events for the same embed session.
38+
#
39+
# @return [String]
40+
required :session_id, String
41+
42+
# @!method initialize(account_token:, card_token:, device_details:, embed_type:, session_id:, event_type: :"embed.viewed")
43+
# @param account_token [String] The token of the account associated with the card
44+
#
45+
# @param card_token [String] The token of the card whose details were revealed
46+
#
47+
# @param device_details [Lithic::Models::EmbedViewedWebhookEvent::DeviceDetails] Details about the request that revealed the card detail
48+
#
49+
# @param embed_type [Symbol, Lithic::Models::EmbedViewedWebhookEvent::EmbedType] The type of card detail that was revealed
50+
#
51+
# @param session_id [String] The identifier shared by webhook events for the same embed session.
52+
#
53+
# @param event_type [Symbol, :"embed.viewed"] The type of event
54+
55+
# @see Lithic::Models::EmbedViewedWebhookEvent#device_details
56+
class DeviceDetails < Lithic::Internal::Type::BaseModel
57+
# @!attribute ip_address
58+
# The IP address recorded for the request that generated the event
59+
#
60+
# @return [String]
61+
required :ip_address, String
62+
63+
# @!method initialize(ip_address:)
64+
# Details about the request that revealed the card detail
65+
#
66+
# @param ip_address [String] The IP address recorded for the request that generated the event
67+
end
68+
69+
# The type of card detail that was revealed
70+
#
71+
# @see Lithic::Models::EmbedViewedWebhookEvent#embed_type
72+
module EmbedType
73+
extend Lithic::Internal::Type::Enum
74+
75+
PAN = :PAN
76+
CVV = :CVV
77+
EXP_MONTH = :EXP_MONTH
78+
EXP_YEAR = :EXP_YEAR
79+
80+
# @!method self.values
81+
# @return [Array<Symbol>]
82+
end
83+
end
84+
end
85+
end

lib/lithic/models/event.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ class Event < Lithic::Internal::Type::BaseModel
101101
# This event is not emitted for Managed Disputes. Use
102102
# `dispute_transaction.created` and `dispute_transaction.updated` instead.
103103
#
104+
# - embed.session_generated: Occurs when a card embed session is successfully
105+
# generated.
106+
# - embed.viewed: Occurs when a card detail is successfully revealed through an
107+
# embed.
104108
# - external_bank_account.created: Occurs when an external bank account is
105109
# created.
106110
# - external_bank_account.updated: Occurs when an external bank account is
@@ -248,6 +252,10 @@ class Event < Lithic::Internal::Type::BaseModel
248252
# This event is not emitted for Managed Disputes. Use
249253
# `dispute_transaction.created` and `dispute_transaction.updated` instead.
250254
#
255+
# - embed.session_generated: Occurs when a card embed session is successfully
256+
# generated.
257+
# - embed.viewed: Occurs when a card detail is successfully revealed through an
258+
# embed.
251259
# - external_bank_account.created: Occurs when an external bank account is
252260
# created.
253261
# - external_bank_account.updated: Occurs when an external bank account is
@@ -329,6 +337,8 @@ module EventType
329337
DISPUTE_TRANSACTION_CREATED = :"dispute_transaction.created"
330338
DISPUTE_TRANSACTION_UPDATED = :"dispute_transaction.updated"
331339
DISPUTE_UPDATED = :"dispute.updated"
340+
EMBED_SESSION_GENERATED = :"embed.session_generated"
341+
EMBED_VIEWED = :"embed.viewed"
332342
EXTERNAL_BANK_ACCOUNT_CREATED = :"external_bank_account.created"
333343
EXTERNAL_BANK_ACCOUNT_UPDATED = :"external_bank_account.updated"
334344
EXTERNAL_PAYMENT_CREATED = :"external_payment.created"

lib/lithic/models/event_list_params.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ class EventListParams < Lithic::Internal::Type::BaseModel
155155
# This event is not emitted for Managed Disputes. Use
156156
# `dispute_transaction.created` and `dispute_transaction.updated` instead.
157157
#
158+
# - embed.session_generated: Occurs when a card embed session is successfully
159+
# generated.
160+
# - embed.viewed: Occurs when a card detail is successfully revealed through an
161+
# embed.
158162
# - external_bank_account.created: Occurs when an external bank account is
159163
# created.
160164
# - external_bank_account.updated: Occurs when an external bank account is
@@ -234,6 +238,8 @@ module EventType
234238
DISPUTE_TRANSACTION_CREATED = :"dispute_transaction.created"
235239
DISPUTE_TRANSACTION_UPDATED = :"dispute_transaction.updated"
236240
DISPUTE_UPDATED = :"dispute.updated"
241+
EMBED_SESSION_GENERATED = :"embed.session_generated"
242+
EMBED_VIEWED = :"embed.viewed"
237243
EXTERNAL_BANK_ACCOUNT_CREATED = :"external_bank_account.created"
238244
EXTERNAL_BANK_ACCOUNT_UPDATED = :"external_bank_account.updated"
239245
EXTERNAL_PAYMENT_CREATED = :"external_payment.created"

lib/lithic/models/event_subscription.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ class EventSubscription < Lithic::Internal::Type::BaseModel
128128
# This event is not emitted for Managed Disputes. Use
129129
# `dispute_transaction.created` and `dispute_transaction.updated` instead.
130130
#
131+
# - embed.session_generated: Occurs when a card embed session is successfully
132+
# generated.
133+
# - embed.viewed: Occurs when a card detail is successfully revealed through an
134+
# embed.
131135
# - external_bank_account.created: Occurs when an external bank account is
132136
# created.
133137
# - external_bank_account.updated: Occurs when an external bank account is
@@ -207,6 +211,8 @@ module EventType
207211
DISPUTE_TRANSACTION_CREATED = :"dispute_transaction.created"
208212
DISPUTE_TRANSACTION_UPDATED = :"dispute_transaction.updated"
209213
DISPUTE_UPDATED = :"dispute.updated"
214+
EMBED_SESSION_GENERATED = :"embed.session_generated"
215+
EMBED_VIEWED = :"embed.viewed"
210216
EXTERNAL_BANK_ACCOUNT_CREATED = :"external_bank_account.created"
211217
EXTERNAL_BANK_ACCOUNT_UPDATED = :"external_bank_account.updated"
212218
EXTERNAL_PAYMENT_CREATED = :"external_payment.created"

lib/lithic/models/events/subscription_create_params.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ class SubscriptionCreateParams < Lithic::Internal::Type::BaseModel
130130
# This event is not emitted for Managed Disputes. Use
131131
# `dispute_transaction.created` and `dispute_transaction.updated` instead.
132132
#
133+
# - embed.session_generated: Occurs when a card embed session is successfully
134+
# generated.
135+
# - embed.viewed: Occurs when a card detail is successfully revealed through an
136+
# embed.
133137
# - external_bank_account.created: Occurs when an external bank account is
134138
# created.
135139
# - external_bank_account.updated: Occurs when an external bank account is
@@ -209,6 +213,8 @@ module EventType
209213
DISPUTE_TRANSACTION_CREATED = :"dispute_transaction.created"
210214
DISPUTE_TRANSACTION_UPDATED = :"dispute_transaction.updated"
211215
DISPUTE_UPDATED = :"dispute.updated"
216+
EMBED_SESSION_GENERATED = :"embed.session_generated"
217+
EMBED_VIEWED = :"embed.viewed"
212218
EXTERNAL_BANK_ACCOUNT_CREATED = :"external_bank_account.created"
213219
EXTERNAL_BANK_ACCOUNT_UPDATED = :"external_bank_account.updated"
214220
EXTERNAL_PAYMENT_CREATED = :"external_payment.created"

lib/lithic/models/events/subscription_send_simulated_example_params.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ module EventType
6464
DISPUTE_TRANSACTION_CREATED = :"dispute_transaction.created"
6565
DISPUTE_TRANSACTION_UPDATED = :"dispute_transaction.updated"
6666
DISPUTE_UPDATED = :"dispute.updated"
67+
EMBED_SESSION_GENERATED = :"embed.session_generated"
68+
EMBED_VIEWED = :"embed.viewed"
6769
EXTERNAL_BANK_ACCOUNT_CREATED = :"external_bank_account.created"
6870
EXTERNAL_BANK_ACCOUNT_UPDATED = :"external_bank_account.updated"
6971
EXTERNAL_PAYMENT_CREATED = :"external_payment.created"

0 commit comments

Comments
 (0)