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