|
| 1 | +# frozen_string_literal: true |
| 2 | + |
| 3 | +module Lithic |
| 4 | + module Models |
| 5 | + class ClaimCreatedWebhookEvent < Lithic::Internal::Type::BaseModel |
| 6 | + # @!attribute token |
| 7 | + # Unique identifier for the claim, in UUID format |
| 8 | + # |
| 9 | + # @return [String] |
| 10 | + required :token, String |
| 11 | + |
| 12 | + # @!attribute account_holder_token |
| 13 | + # Token for the account holder that filed the claim |
| 14 | + # |
| 15 | + # @return [String, nil] |
| 16 | + required :account_holder_token, String, nil?: true |
| 17 | + |
| 18 | + # @!attribute account_token |
| 19 | + # Token for the account associated with the claim |
| 20 | + # |
| 21 | + # @return [String, nil] |
| 22 | + required :account_token, String, nil?: true |
| 23 | + |
| 24 | + # @!attribute card_tokens |
| 25 | + # Tokens for the cards associated with the disputed transactions |
| 26 | + # |
| 27 | + # @return [Array<String>] |
| 28 | + required :card_tokens, Lithic::Internal::Type::ArrayOf[String] |
| 29 | + |
| 30 | + # @!attribute created |
| 31 | + # When the claim was created |
| 32 | + # |
| 33 | + # @return [Time] |
| 34 | + required :created, Time |
| 35 | + |
| 36 | + # @!attribute disputed_transactions |
| 37 | + # Transactions included in this claim |
| 38 | + # |
| 39 | + # @return [Array<Lithic::Models::ClaimCreatedWebhookEvent::DisputedTransaction>] |
| 40 | + required :disputed_transactions, |
| 41 | + -> { Lithic::Internal::Type::ArrayOf[Lithic::ClaimCreatedWebhookEvent::DisputedTransaction] } |
| 42 | + |
| 43 | + # @!attribute event_type |
| 44 | + # The type of event that occurred. |
| 45 | + # |
| 46 | + # @return [Symbol, :"claim.created"] |
| 47 | + required :event_type, const: :"claim.created" |
| 48 | + |
| 49 | + # @!attribute outstanding_requirements |
| 50 | + # Requirements that must be fulfilled before the claim can be submitted |
| 51 | + # |
| 52 | + # @return [Array<Symbol, Lithic::Models::ClaimCreatedWebhookEvent::OutstandingRequirement>] |
| 53 | + required :outstanding_requirements, |
| 54 | + -> { Lithic::Internal::Type::ArrayOf[enum: Lithic::ClaimCreatedWebhookEvent::OutstandingRequirement] } |
| 55 | + |
| 56 | + # @!attribute reason |
| 57 | + # Dispute reason code provided when creating the claim |
| 58 | + # |
| 59 | + # @return [Symbol, Lithic::Models::ClaimCreatedWebhookEvent::Reason] |
| 60 | + required :reason, enum: -> { Lithic::ClaimCreatedWebhookEvent::Reason } |
| 61 | + |
| 62 | + # @!attribute status |
| 63 | + # Current lifecycle status of the claim |
| 64 | + # |
| 65 | + # @return [Symbol, Lithic::Models::ClaimCreatedWebhookEvent::Status] |
| 66 | + required :status, enum: -> { Lithic::ClaimCreatedWebhookEvent::Status } |
| 67 | + |
| 68 | + # @!attribute submitted |
| 69 | + # When the claim was submitted. Null until the claim reaches `SUBMITTED` status |
| 70 | + # |
| 71 | + # @return [Time, nil] |
| 72 | + required :submitted, Time, nil?: true |
| 73 | + |
| 74 | + # @!attribute updated |
| 75 | + # When the claim was last updated |
| 76 | + # |
| 77 | + # @return [Time] |
| 78 | + required :updated, Time |
| 79 | + |
| 80 | + # @!method initialize(token:, account_holder_token:, account_token:, card_tokens:, created:, disputed_transactions:, outstanding_requirements:, reason:, status:, submitted:, updated:, event_type: :"claim.created") |
| 81 | + # @param token [String] Unique identifier for the claim, in UUID format |
| 82 | + # |
| 83 | + # @param account_holder_token [String, nil] Token for the account holder that filed the claim |
| 84 | + # |
| 85 | + # @param account_token [String, nil] Token for the account associated with the claim |
| 86 | + # |
| 87 | + # @param card_tokens [Array<String>] Tokens for the cards associated with the disputed transactions |
| 88 | + # |
| 89 | + # @param created [Time] When the claim was created |
| 90 | + # |
| 91 | + # @param disputed_transactions [Array<Lithic::Models::ClaimCreatedWebhookEvent::DisputedTransaction>] Transactions included in this claim |
| 92 | + # |
| 93 | + # @param outstanding_requirements [Array<Symbol, Lithic::Models::ClaimCreatedWebhookEvent::OutstandingRequirement>] Requirements that must be fulfilled before the claim can be submitted |
| 94 | + # |
| 95 | + # @param reason [Symbol, Lithic::Models::ClaimCreatedWebhookEvent::Reason] Dispute reason code provided when creating the claim |
| 96 | + # |
| 97 | + # @param status [Symbol, Lithic::Models::ClaimCreatedWebhookEvent::Status] Current lifecycle status of the claim |
| 98 | + # |
| 99 | + # @param submitted [Time, nil] When the claim was submitted. Null until the claim reaches `SUBMITTED` status |
| 100 | + # |
| 101 | + # @param updated [Time] When the claim was last updated |
| 102 | + # |
| 103 | + # @param event_type [Symbol, :"claim.created"] The type of event that occurred. |
| 104 | + |
| 105 | + class DisputedTransaction < Lithic::Internal::Type::BaseModel |
| 106 | + # @!attribute event_tokens |
| 107 | + # Tokens for the specific events within the transaction being disputed. Lithic |
| 108 | + # creates one dispute per event token |
| 109 | + # |
| 110 | + # @return [Array<String>] |
| 111 | + required :event_tokens, Lithic::Internal::Type::ArrayOf[String] |
| 112 | + |
| 113 | + # @!attribute transaction_token |
| 114 | + # Token for the transaction being disputed, in UUID format |
| 115 | + # |
| 116 | + # @return [String] |
| 117 | + required :transaction_token, String |
| 118 | + |
| 119 | + # @!method initialize(event_tokens:, transaction_token:) |
| 120 | + # Some parameter documentations has been truncated, see |
| 121 | + # {Lithic::Models::ClaimCreatedWebhookEvent::DisputedTransaction} for more |
| 122 | + # details. |
| 123 | + # |
| 124 | + # A transaction included in a claim, along with the specific events being |
| 125 | + # disputed. |
| 126 | + # |
| 127 | + # @param event_tokens [Array<String>] Tokens for the specific events within the transaction being disputed. Lithic cre |
| 128 | + # |
| 129 | + # @param transaction_token [String] Token for the transaction being disputed, in UUID format |
| 130 | + end |
| 131 | + |
| 132 | + module OutstandingRequirement |
| 133 | + extend Lithic::Internal::Type::Enum |
| 134 | + |
| 135 | + QUESTIONNAIRE = :QUESTIONNAIRE |
| 136 | + DOCUMENTS = :DOCUMENTS |
| 137 | + |
| 138 | + # @!method self.values |
| 139 | + # @return [Array<Symbol>] |
| 140 | + end |
| 141 | + |
| 142 | + # Dispute reason code provided when creating the claim |
| 143 | + # |
| 144 | + # @see Lithic::Models::ClaimCreatedWebhookEvent#reason |
| 145 | + module Reason |
| 146 | + extend Lithic::Internal::Type::Enum |
| 147 | + |
| 148 | + CARD_NOT_PRESENT = :CARD_NOT_PRESENT |
| 149 | + CARD_LOST = :CARD_LOST |
| 150 | + CARD_STOLEN = :CARD_STOLEN |
| 151 | + CARD_NEVER_RECEIVED = :CARD_NEVER_RECEIVED |
| 152 | + COUNTERFEIT = :COUNTERFEIT |
| 153 | + ACCOUNT_TAKEOVER = :ACCOUNT_TAKEOVER |
| 154 | + PRODUCT_NOT_RECEIVED = :PRODUCT_NOT_RECEIVED |
| 155 | + NOT_AS_DESCRIBED = :NOT_AS_DESCRIBED |
| 156 | + CREDIT_NOT_PROCESSED = :CREDIT_NOT_PROCESSED |
| 157 | + CANCELLED_RECURRING = :CANCELLED_RECURRING |
| 158 | + PAID_BY_OTHER_MEANS = :PAID_BY_OTHER_MEANS |
| 159 | + DUPLICATE_CHARGE = :DUPLICATE_CHARGE |
| 160 | + LATE_PRESENTMENT = :LATE_PRESENTMENT |
| 161 | + INCORRECT_TRANSACTION_CODE = :INCORRECT_TRANSACTION_CODE |
| 162 | + NO_AUTHORIZATION = :NO_AUTHORIZATION |
| 163 | + DECLINED = :DECLINED |
| 164 | + INCORRECT_AMOUNT = :INCORRECT_AMOUNT |
| 165 | + ATM_CASH_NOT_DISPENSED = :ATM_CASH_NOT_DISPENSED |
| 166 | + ATM_DEPOSIT_WRONG_AMOUNT = :ATM_DEPOSIT_WRONG_AMOUNT |
| 167 | + ATM_DEPOSIT_MISSING = :ATM_DEPOSIT_MISSING |
| 168 | + |
| 169 | + # @!method self.values |
| 170 | + # @return [Array<Symbol>] |
| 171 | + end |
| 172 | + |
| 173 | + # Current lifecycle status of the claim |
| 174 | + # |
| 175 | + # @see Lithic::Models::ClaimCreatedWebhookEvent#status |
| 176 | + module Status |
| 177 | + extend Lithic::Internal::Type::Enum |
| 178 | + |
| 179 | + INITIALIZING = :INITIALIZING |
| 180 | + AWAITING_INFO = :AWAITING_INFO |
| 181 | + SUBMITTED = :SUBMITTED |
| 182 | + RESOLVED = :RESOLVED |
| 183 | + ABANDONED = :ABANDONED |
| 184 | + |
| 185 | + # @!method self.values |
| 186 | + # @return [Array<Symbol>] |
| 187 | + end |
| 188 | + end |
| 189 | + end |
| 190 | +end |
0 commit comments