|
| 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 |
0 commit comments