From a087b3bddff381d51dc2c6fa89cadae9855ac6a9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 23 Jun 2026 12:17:32 +0000 Subject: [PATCH 1/3] feat(api): Register dispute intake webhook events --- .stats.yml | 4 +- lib/lithic.rb | 5 + lib/lithic/models.rb | 10 + .../models/claim_created_webhook_event.rb | 190 +++++++++ .../claim_document_accepted_webhook_event.rb | 175 ++++++++ .../claim_document_rejected_webhook_event.rb | 175 ++++++++ .../claim_document_uploaded_webhook_event.rb | 175 ++++++++ .../models/claim_updated_webhook_event.rb | 190 +++++++++ lib/lithic/models/event.rb | 23 ++ lib/lithic/models/event_list_params.rb | 14 + lib/lithic/models/event_subscription.rb | 14 + .../events/subscription_create_params.rb | 14 + ...scription_send_simulated_example_params.rb | 5 + .../events/subscription_update_params.rb | 14 + lib/lithic/models/parsed_webhook_event.rb | 12 +- lib/lithic/resources/webhooks.rb | 2 +- rbi/lithic/models.rbi | 13 + .../models/claim_created_webhook_event.rbi | 386 ++++++++++++++++++ .../claim_document_accepted_webhook_event.rbi | 315 ++++++++++++++ .../claim_document_rejected_webhook_event.rbi | 315 ++++++++++++++ .../claim_document_uploaded_webhook_event.rbi | 315 ++++++++++++++ .../models/claim_updated_webhook_event.rbi | 386 ++++++++++++++++++ rbi/lithic/models/event.rbi | 46 +++ rbi/lithic/models/event_list_params.rbi | 34 ++ rbi/lithic/models/event_subscription.rbi | 34 ++ .../events/subscription_create_params.rbi | 34 ++ ...cription_send_simulated_example_params.rbi | 25 ++ .../events/subscription_update_params.rbi | 34 ++ rbi/lithic/models/parsed_webhook_event.rbi | 5 + rbi/lithic/resources/webhooks.rbi | 5 + sig/lithic/models.rbs | 10 + .../models/claim_created_webhook_event.rbs | 169 ++++++++ .../claim_document_accepted_webhook_event.rbs | 131 ++++++ .../claim_document_rejected_webhook_event.rbs | 131 ++++++ .../claim_document_uploaded_webhook_event.rbs | 131 ++++++ .../models/claim_updated_webhook_event.rbs | 169 ++++++++ sig/lithic/models/event.rbs | 10 + sig/lithic/models/event_list_params.rbs | 10 + sig/lithic/models/event_subscription.rbs | 10 + .../events/subscription_create_params.rbs | 10 + ...cription_send_simulated_example_params.rbs | 10 + .../events/subscription_update_params.rbs | 10 + sig/lithic/models/parsed_webhook_event.rbs | 5 + sig/lithic/resources/webhooks.rbs | 5 + 44 files changed, 3776 insertions(+), 4 deletions(-) create mode 100644 lib/lithic/models/claim_created_webhook_event.rb create mode 100644 lib/lithic/models/claim_document_accepted_webhook_event.rb create mode 100644 lib/lithic/models/claim_document_rejected_webhook_event.rb create mode 100644 lib/lithic/models/claim_document_uploaded_webhook_event.rb create mode 100644 lib/lithic/models/claim_updated_webhook_event.rb create mode 100644 rbi/lithic/models/claim_created_webhook_event.rbi create mode 100644 rbi/lithic/models/claim_document_accepted_webhook_event.rbi create mode 100644 rbi/lithic/models/claim_document_rejected_webhook_event.rbi create mode 100644 rbi/lithic/models/claim_document_uploaded_webhook_event.rbi create mode 100644 rbi/lithic/models/claim_updated_webhook_event.rbi create mode 100644 sig/lithic/models/claim_created_webhook_event.rbs create mode 100644 sig/lithic/models/claim_document_accepted_webhook_event.rbs create mode 100644 sig/lithic/models/claim_document_rejected_webhook_event.rbs create mode 100644 sig/lithic/models/claim_document_uploaded_webhook_event.rbs create mode 100644 sig/lithic/models/claim_updated_webhook_event.rbs diff --git a/.stats.yml b/.stats.yml index 3a685932..91095e83 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-185b3d93b4e6ed5ae02c32f0bc9133b0ac99dcd1263a12b7aa9ba64e71a5461e.yml -openapi_spec_hash: 2418116f58a464afdd5611865e860d30 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-48e8284d7f1f51f36402cf5f22a23b27071af86110e2aeddb8da06f8c790fd3d.yml +openapi_spec_hash: a64ba9e94686bce4f0a8c5b1b3c704da config_hash: 5bb913c05ebeb301ec925b16e75bb251 diff --git a/lib/lithic.rb b/lib/lithic.rb index 7e61260c..f15b663e 100644 --- a/lib/lithic.rb +++ b/lib/lithic.rb @@ -219,6 +219,11 @@ require_relative "lithic/models/card_web_provision_response" require_relative "lithic/models/carrier" require_relative "lithic/models/category_details" +require_relative "lithic/models/claim_created_webhook_event" +require_relative "lithic/models/claim_document_accepted_webhook_event" +require_relative "lithic/models/claim_document_rejected_webhook_event" +require_relative "lithic/models/claim_document_uploaded_webhook_event" +require_relative "lithic/models/claim_updated_webhook_event" require_relative "lithic/models/client_api_status_params" require_relative "lithic/models/credit_products/extended_credit" require_relative "lithic/models/credit_products/extended_credit_retrieve_params" diff --git a/lib/lithic/models.rb b/lib/lithic/models.rb index 310ecb79..4e098cc5 100644 --- a/lib/lithic/models.rb +++ b/lib/lithic/models.rb @@ -214,6 +214,16 @@ module Lithic CategoryDetails = Lithic::Models::CategoryDetails + ClaimCreatedWebhookEvent = Lithic::Models::ClaimCreatedWebhookEvent + + ClaimDocumentAcceptedWebhookEvent = Lithic::Models::ClaimDocumentAcceptedWebhookEvent + + ClaimDocumentRejectedWebhookEvent = Lithic::Models::ClaimDocumentRejectedWebhookEvent + + ClaimDocumentUploadedWebhookEvent = Lithic::Models::ClaimDocumentUploadedWebhookEvent + + ClaimUpdatedWebhookEvent = Lithic::Models::ClaimUpdatedWebhookEvent + ClientAPIStatusParams = Lithic::Models::ClientAPIStatusParams CreditProducts = Lithic::Models::CreditProducts diff --git a/lib/lithic/models/claim_created_webhook_event.rb b/lib/lithic/models/claim_created_webhook_event.rb new file mode 100644 index 00000000..4d1c6094 --- /dev/null +++ b/lib/lithic/models/claim_created_webhook_event.rb @@ -0,0 +1,190 @@ +# frozen_string_literal: true + +module Lithic + module Models + class ClaimCreatedWebhookEvent < Lithic::Internal::Type::BaseModel + # @!attribute token + # Unique identifier for the claim, in UUID format + # + # @return [String] + required :token, String + + # @!attribute account_holder_token + # Token for the account holder that filed the claim + # + # @return [String, nil] + required :account_holder_token, String, nil?: true + + # @!attribute account_token + # Token for the account associated with the claim + # + # @return [String, nil] + required :account_token, String, nil?: true + + # @!attribute card_tokens + # Tokens for the cards associated with the disputed transactions + # + # @return [Array] + required :card_tokens, Lithic::Internal::Type::ArrayOf[String] + + # @!attribute created + # When the claim was created + # + # @return [Time] + required :created, Time + + # @!attribute disputed_transactions + # Transactions included in this claim + # + # @return [Array] + required :disputed_transactions, + -> { Lithic::Internal::Type::ArrayOf[Lithic::ClaimCreatedWebhookEvent::DisputedTransaction] } + + # @!attribute event_type + # The type of event that occurred. + # + # @return [Symbol, :"claim.created"] + required :event_type, const: :"claim.created" + + # @!attribute outstanding_requirements + # Requirements that must be fulfilled before the claim can be submitted + # + # @return [Array] + required :outstanding_requirements, + -> { Lithic::Internal::Type::ArrayOf[enum: Lithic::ClaimCreatedWebhookEvent::OutstandingRequirement] } + + # @!attribute reason + # Dispute reason code provided when creating the claim + # + # @return [Symbol, Lithic::Models::ClaimCreatedWebhookEvent::Reason] + required :reason, enum: -> { Lithic::ClaimCreatedWebhookEvent::Reason } + + # @!attribute status + # Current lifecycle status of the claim + # + # @return [Symbol, Lithic::Models::ClaimCreatedWebhookEvent::Status] + required :status, enum: -> { Lithic::ClaimCreatedWebhookEvent::Status } + + # @!attribute submitted + # When the claim was submitted. Null until the claim reaches `SUBMITTED` status + # + # @return [Time, nil] + required :submitted, Time, nil?: true + + # @!attribute updated + # When the claim was last updated + # + # @return [Time] + required :updated, Time + + # @!method initialize(token:, account_holder_token:, account_token:, card_tokens:, created:, disputed_transactions:, outstanding_requirements:, reason:, status:, submitted:, updated:, event_type: :"claim.created") + # @param token [String] Unique identifier for the claim, in UUID format + # + # @param account_holder_token [String, nil] Token for the account holder that filed the claim + # + # @param account_token [String, nil] Token for the account associated with the claim + # + # @param card_tokens [Array] Tokens for the cards associated with the disputed transactions + # + # @param created [Time] When the claim was created + # + # @param disputed_transactions [Array] Transactions included in this claim + # + # @param outstanding_requirements [Array] Requirements that must be fulfilled before the claim can be submitted + # + # @param reason [Symbol, Lithic::Models::ClaimCreatedWebhookEvent::Reason] Dispute reason code provided when creating the claim + # + # @param status [Symbol, Lithic::Models::ClaimCreatedWebhookEvent::Status] Current lifecycle status of the claim + # + # @param submitted [Time, nil] When the claim was submitted. Null until the claim reaches `SUBMITTED` status + # + # @param updated [Time] When the claim was last updated + # + # @param event_type [Symbol, :"claim.created"] The type of event that occurred. + + class DisputedTransaction < Lithic::Internal::Type::BaseModel + # @!attribute event_tokens + # Tokens for the specific events within the transaction being disputed. Lithic + # creates one dispute per event token + # + # @return [Array] + required :event_tokens, Lithic::Internal::Type::ArrayOf[String] + + # @!attribute transaction_token + # Token for the transaction being disputed, in UUID format + # + # @return [String] + required :transaction_token, String + + # @!method initialize(event_tokens:, transaction_token:) + # Some parameter documentations has been truncated, see + # {Lithic::Models::ClaimCreatedWebhookEvent::DisputedTransaction} for more + # details. + # + # A transaction included in a claim, along with the specific events being + # disputed. + # + # @param event_tokens [Array] Tokens for the specific events within the transaction being disputed. Lithic cre + # + # @param transaction_token [String] Token for the transaction being disputed, in UUID format + end + + module OutstandingRequirement + extend Lithic::Internal::Type::Enum + + QUESTIONNAIRE = :QUESTIONNAIRE + DOCUMENTS = :DOCUMENTS + + # @!method self.values + # @return [Array] + end + + # Dispute reason code provided when creating the claim + # + # @see Lithic::Models::ClaimCreatedWebhookEvent#reason + module Reason + extend Lithic::Internal::Type::Enum + + CARD_NOT_PRESENT = :CARD_NOT_PRESENT + CARD_LOST = :CARD_LOST + CARD_STOLEN = :CARD_STOLEN + CARD_NEVER_RECEIVED = :CARD_NEVER_RECEIVED + COUNTERFEIT = :COUNTERFEIT + ACCOUNT_TAKEOVER = :ACCOUNT_TAKEOVER + PRODUCT_NOT_RECEIVED = :PRODUCT_NOT_RECEIVED + NOT_AS_DESCRIBED = :NOT_AS_DESCRIBED + CREDIT_NOT_PROCESSED = :CREDIT_NOT_PROCESSED + CANCELLED_RECURRING = :CANCELLED_RECURRING + PAID_BY_OTHER_MEANS = :PAID_BY_OTHER_MEANS + DUPLICATE_CHARGE = :DUPLICATE_CHARGE + LATE_PRESENTMENT = :LATE_PRESENTMENT + INCORRECT_TRANSACTION_CODE = :INCORRECT_TRANSACTION_CODE + NO_AUTHORIZATION = :NO_AUTHORIZATION + DECLINED = :DECLINED + INCORRECT_AMOUNT = :INCORRECT_AMOUNT + ATM_CASH_NOT_DISPENSED = :ATM_CASH_NOT_DISPENSED + ATM_DEPOSIT_WRONG_AMOUNT = :ATM_DEPOSIT_WRONG_AMOUNT + ATM_DEPOSIT_MISSING = :ATM_DEPOSIT_MISSING + + # @!method self.values + # @return [Array] + end + + # Current lifecycle status of the claim + # + # @see Lithic::Models::ClaimCreatedWebhookEvent#status + module Status + extend Lithic::Internal::Type::Enum + + INITIALIZING = :INITIALIZING + AWAITING_INFO = :AWAITING_INFO + SUBMITTED = :SUBMITTED + RESOLVED = :RESOLVED + ABANDONED = :ABANDONED + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/lithic/models/claim_document_accepted_webhook_event.rb b/lib/lithic/models/claim_document_accepted_webhook_event.rb new file mode 100644 index 00000000..c268f8c3 --- /dev/null +++ b/lib/lithic/models/claim_document_accepted_webhook_event.rb @@ -0,0 +1,175 @@ +# frozen_string_literal: true + +module Lithic + module Models + class ClaimDocumentAcceptedWebhookEvent < Lithic::Internal::Type::BaseModel + # @!attribute token + # Unique identifier for the document, in UUID format + # + # @return [String] + required :token, String + + # @!attribute created + # When the document was created + # + # @return [Time] + required :created, Time + + # @!attribute download_url + # Presigned URL for downloading the uploaded document. Available once the document + # is being validated or has been accepted (`VALIDATING` or `ACCEPTED`) + # + # @return [String, nil] + required :download_url, String, nil?: true + + # @!attribute download_url_expires_at + # When the download URL expires + # + # @return [Time, nil] + required :download_url_expires_at, Time, nil?: true + + # @!attribute event_type + # The type of event that occurred. + # + # @return [Symbol, :"claim_document.accepted"] + required :event_type, const: :"claim_document.accepted" + + # @!attribute failure_reason + # Reason the document failed validation. Null unless `status` is `REJECTED` + # + # @return [Symbol, Lithic::Models::ClaimDocumentAcceptedWebhookEvent::FailureReason, nil] + required :failure_reason, + enum: -> { Lithic::ClaimDocumentAcceptedWebhookEvent::FailureReason }, + nil?: true + + # @!attribute name + # Name provided when the upload intent was created + # + # @return [String] + required :name, String + + # @!attribute requirement_id + # Identifier of the document requirement this document satisfies. Null for + # supplemental documents not tied to a specific requirement + # + # @return [String, nil] + required :requirement_id, String, nil?: true + + # @!attribute status + # Current validation status of the document + # + # @return [Symbol, Lithic::Models::ClaimDocumentAcceptedWebhookEvent::Status] + required :status, enum: -> { Lithic::ClaimDocumentAcceptedWebhookEvent::Status } + + # @!attribute updated + # When the document was last updated + # + # @return [Time] + required :updated, Time + + # @!attribute upload_constraints + # Constraints that an uploaded file must satisfy. + # + # @return [Lithic::Models::ClaimDocumentAcceptedWebhookEvent::UploadConstraints, nil] + required :upload_constraints, + -> { Lithic::ClaimDocumentAcceptedWebhookEvent::UploadConstraints }, + nil?: true + + # @!attribute upload_url + # Presigned URL for uploading the file via HTTP PUT. Null after the upload window + # expires or after the document has been validated + # + # @return [String, nil] + required :upload_url, String, nil?: true + + # @!attribute upload_url_expires_at + # When the upload URL expires + # + # @return [Time, nil] + required :upload_url_expires_at, Time, nil?: true + + # @!method initialize(token:, created:, download_url:, download_url_expires_at:, failure_reason:, name:, requirement_id:, status:, updated:, upload_constraints:, upload_url:, upload_url_expires_at:, event_type: :"claim_document.accepted") + # Some parameter documentations has been truncated, see + # {Lithic::Models::ClaimDocumentAcceptedWebhookEvent} for more details. + # + # @param token [String] Unique identifier for the document, in UUID format + # + # @param created [Time] When the document was created + # + # @param download_url [String, nil] Presigned URL for downloading the uploaded document. Available once the document + # + # @param download_url_expires_at [Time, nil] When the download URL expires + # + # @param failure_reason [Symbol, Lithic::Models::ClaimDocumentAcceptedWebhookEvent::FailureReason, nil] Reason the document failed validation. Null unless `status` is `REJECTED` + # + # @param name [String] Name provided when the upload intent was created + # + # @param requirement_id [String, nil] Identifier of the document requirement this document satisfies. Null for supplem + # + # @param status [Symbol, Lithic::Models::ClaimDocumentAcceptedWebhookEvent::Status] Current validation status of the document + # + # @param updated [Time] When the document was last updated + # + # @param upload_constraints [Lithic::Models::ClaimDocumentAcceptedWebhookEvent::UploadConstraints, nil] Constraints that an uploaded file must satisfy. + # + # @param upload_url [String, nil] Presigned URL for uploading the file via HTTP PUT. Null after the upload window + # + # @param upload_url_expires_at [Time, nil] When the upload URL expires + # + # @param event_type [Symbol, :"claim_document.accepted"] The type of event that occurred. + + # Reason the document failed validation. Null unless `status` is `REJECTED` + # + # @see Lithic::Models::ClaimDocumentAcceptedWebhookEvent#failure_reason + module FailureReason + extend Lithic::Internal::Type::Enum + + INVALID_MIME_TYPE = :INVALID_MIME_TYPE + FILE_TOO_LARGE = :FILE_TOO_LARGE + FILE_EMPTY = :FILE_EMPTY + CORRUPT_FILE = :CORRUPT_FILE + OTHER = :OTHER + + # @!method self.values + # @return [Array] + end + + # Current validation status of the document + # + # @see Lithic::Models::ClaimDocumentAcceptedWebhookEvent#status + module Status + extend Lithic::Internal::Type::Enum + + PENDING = :PENDING + VALIDATING = :VALIDATING + ACCEPTED = :ACCEPTED + REJECTED = :REJECTED + + # @!method self.values + # @return [Array] + end + + # @see Lithic::Models::ClaimDocumentAcceptedWebhookEvent#upload_constraints + class UploadConstraints < Lithic::Internal::Type::BaseModel + # @!attribute accepted_mime_types + # MIME types accepted for upload + # + # @return [Array] + required :accepted_mime_types, Lithic::Internal::Type::ArrayOf[String] + + # @!attribute max_size_bytes + # Maximum file size in bytes. Null if there is no enforced size limit + # + # @return [Integer, nil] + required :max_size_bytes, Integer, nil?: true + + # @!method initialize(accepted_mime_types:, max_size_bytes:) + # Constraints that an uploaded file must satisfy. + # + # @param accepted_mime_types [Array] MIME types accepted for upload + # + # @param max_size_bytes [Integer, nil] Maximum file size in bytes. Null if there is no enforced size limit + end + end + end +end diff --git a/lib/lithic/models/claim_document_rejected_webhook_event.rb b/lib/lithic/models/claim_document_rejected_webhook_event.rb new file mode 100644 index 00000000..f97cf857 --- /dev/null +++ b/lib/lithic/models/claim_document_rejected_webhook_event.rb @@ -0,0 +1,175 @@ +# frozen_string_literal: true + +module Lithic + module Models + class ClaimDocumentRejectedWebhookEvent < Lithic::Internal::Type::BaseModel + # @!attribute token + # Unique identifier for the document, in UUID format + # + # @return [String] + required :token, String + + # @!attribute created + # When the document was created + # + # @return [Time] + required :created, Time + + # @!attribute download_url + # Presigned URL for downloading the uploaded document. Available once the document + # is being validated or has been accepted (`VALIDATING` or `ACCEPTED`) + # + # @return [String, nil] + required :download_url, String, nil?: true + + # @!attribute download_url_expires_at + # When the download URL expires + # + # @return [Time, nil] + required :download_url_expires_at, Time, nil?: true + + # @!attribute event_type + # The type of event that occurred. + # + # @return [Symbol, :"claim_document.rejected"] + required :event_type, const: :"claim_document.rejected" + + # @!attribute failure_reason + # Reason the document failed validation. Null unless `status` is `REJECTED` + # + # @return [Symbol, Lithic::Models::ClaimDocumentRejectedWebhookEvent::FailureReason, nil] + required :failure_reason, + enum: -> { Lithic::ClaimDocumentRejectedWebhookEvent::FailureReason }, + nil?: true + + # @!attribute name + # Name provided when the upload intent was created + # + # @return [String] + required :name, String + + # @!attribute requirement_id + # Identifier of the document requirement this document satisfies. Null for + # supplemental documents not tied to a specific requirement + # + # @return [String, nil] + required :requirement_id, String, nil?: true + + # @!attribute status + # Current validation status of the document + # + # @return [Symbol, Lithic::Models::ClaimDocumentRejectedWebhookEvent::Status] + required :status, enum: -> { Lithic::ClaimDocumentRejectedWebhookEvent::Status } + + # @!attribute updated + # When the document was last updated + # + # @return [Time] + required :updated, Time + + # @!attribute upload_constraints + # Constraints that an uploaded file must satisfy. + # + # @return [Lithic::Models::ClaimDocumentRejectedWebhookEvent::UploadConstraints, nil] + required :upload_constraints, + -> { Lithic::ClaimDocumentRejectedWebhookEvent::UploadConstraints }, + nil?: true + + # @!attribute upload_url + # Presigned URL for uploading the file via HTTP PUT. Null after the upload window + # expires or after the document has been validated + # + # @return [String, nil] + required :upload_url, String, nil?: true + + # @!attribute upload_url_expires_at + # When the upload URL expires + # + # @return [Time, nil] + required :upload_url_expires_at, Time, nil?: true + + # @!method initialize(token:, created:, download_url:, download_url_expires_at:, failure_reason:, name:, requirement_id:, status:, updated:, upload_constraints:, upload_url:, upload_url_expires_at:, event_type: :"claim_document.rejected") + # Some parameter documentations has been truncated, see + # {Lithic::Models::ClaimDocumentRejectedWebhookEvent} for more details. + # + # @param token [String] Unique identifier for the document, in UUID format + # + # @param created [Time] When the document was created + # + # @param download_url [String, nil] Presigned URL for downloading the uploaded document. Available once the document + # + # @param download_url_expires_at [Time, nil] When the download URL expires + # + # @param failure_reason [Symbol, Lithic::Models::ClaimDocumentRejectedWebhookEvent::FailureReason, nil] Reason the document failed validation. Null unless `status` is `REJECTED` + # + # @param name [String] Name provided when the upload intent was created + # + # @param requirement_id [String, nil] Identifier of the document requirement this document satisfies. Null for supplem + # + # @param status [Symbol, Lithic::Models::ClaimDocumentRejectedWebhookEvent::Status] Current validation status of the document + # + # @param updated [Time] When the document was last updated + # + # @param upload_constraints [Lithic::Models::ClaimDocumentRejectedWebhookEvent::UploadConstraints, nil] Constraints that an uploaded file must satisfy. + # + # @param upload_url [String, nil] Presigned URL for uploading the file via HTTP PUT. Null after the upload window + # + # @param upload_url_expires_at [Time, nil] When the upload URL expires + # + # @param event_type [Symbol, :"claim_document.rejected"] The type of event that occurred. + + # Reason the document failed validation. Null unless `status` is `REJECTED` + # + # @see Lithic::Models::ClaimDocumentRejectedWebhookEvent#failure_reason + module FailureReason + extend Lithic::Internal::Type::Enum + + INVALID_MIME_TYPE = :INVALID_MIME_TYPE + FILE_TOO_LARGE = :FILE_TOO_LARGE + FILE_EMPTY = :FILE_EMPTY + CORRUPT_FILE = :CORRUPT_FILE + OTHER = :OTHER + + # @!method self.values + # @return [Array] + end + + # Current validation status of the document + # + # @see Lithic::Models::ClaimDocumentRejectedWebhookEvent#status + module Status + extend Lithic::Internal::Type::Enum + + PENDING = :PENDING + VALIDATING = :VALIDATING + ACCEPTED = :ACCEPTED + REJECTED = :REJECTED + + # @!method self.values + # @return [Array] + end + + # @see Lithic::Models::ClaimDocumentRejectedWebhookEvent#upload_constraints + class UploadConstraints < Lithic::Internal::Type::BaseModel + # @!attribute accepted_mime_types + # MIME types accepted for upload + # + # @return [Array] + required :accepted_mime_types, Lithic::Internal::Type::ArrayOf[String] + + # @!attribute max_size_bytes + # Maximum file size in bytes. Null if there is no enforced size limit + # + # @return [Integer, nil] + required :max_size_bytes, Integer, nil?: true + + # @!method initialize(accepted_mime_types:, max_size_bytes:) + # Constraints that an uploaded file must satisfy. + # + # @param accepted_mime_types [Array] MIME types accepted for upload + # + # @param max_size_bytes [Integer, nil] Maximum file size in bytes. Null if there is no enforced size limit + end + end + end +end diff --git a/lib/lithic/models/claim_document_uploaded_webhook_event.rb b/lib/lithic/models/claim_document_uploaded_webhook_event.rb new file mode 100644 index 00000000..6cd737af --- /dev/null +++ b/lib/lithic/models/claim_document_uploaded_webhook_event.rb @@ -0,0 +1,175 @@ +# frozen_string_literal: true + +module Lithic + module Models + class ClaimDocumentUploadedWebhookEvent < Lithic::Internal::Type::BaseModel + # @!attribute token + # Unique identifier for the document, in UUID format + # + # @return [String] + required :token, String + + # @!attribute created + # When the document was created + # + # @return [Time] + required :created, Time + + # @!attribute download_url + # Presigned URL for downloading the uploaded document. Available once the document + # is being validated or has been accepted (`VALIDATING` or `ACCEPTED`) + # + # @return [String, nil] + required :download_url, String, nil?: true + + # @!attribute download_url_expires_at + # When the download URL expires + # + # @return [Time, nil] + required :download_url_expires_at, Time, nil?: true + + # @!attribute event_type + # The type of event that occurred. + # + # @return [Symbol, :"claim_document.uploaded"] + required :event_type, const: :"claim_document.uploaded" + + # @!attribute failure_reason + # Reason the document failed validation. Null unless `status` is `REJECTED` + # + # @return [Symbol, Lithic::Models::ClaimDocumentUploadedWebhookEvent::FailureReason, nil] + required :failure_reason, + enum: -> { Lithic::ClaimDocumentUploadedWebhookEvent::FailureReason }, + nil?: true + + # @!attribute name + # Name provided when the upload intent was created + # + # @return [String] + required :name, String + + # @!attribute requirement_id + # Identifier of the document requirement this document satisfies. Null for + # supplemental documents not tied to a specific requirement + # + # @return [String, nil] + required :requirement_id, String, nil?: true + + # @!attribute status + # Current validation status of the document + # + # @return [Symbol, Lithic::Models::ClaimDocumentUploadedWebhookEvent::Status] + required :status, enum: -> { Lithic::ClaimDocumentUploadedWebhookEvent::Status } + + # @!attribute updated + # When the document was last updated + # + # @return [Time] + required :updated, Time + + # @!attribute upload_constraints + # Constraints that an uploaded file must satisfy. + # + # @return [Lithic::Models::ClaimDocumentUploadedWebhookEvent::UploadConstraints, nil] + required :upload_constraints, + -> { Lithic::ClaimDocumentUploadedWebhookEvent::UploadConstraints }, + nil?: true + + # @!attribute upload_url + # Presigned URL for uploading the file via HTTP PUT. Null after the upload window + # expires or after the document has been validated + # + # @return [String, nil] + required :upload_url, String, nil?: true + + # @!attribute upload_url_expires_at + # When the upload URL expires + # + # @return [Time, nil] + required :upload_url_expires_at, Time, nil?: true + + # @!method initialize(token:, created:, download_url:, download_url_expires_at:, failure_reason:, name:, requirement_id:, status:, updated:, upload_constraints:, upload_url:, upload_url_expires_at:, event_type: :"claim_document.uploaded") + # Some parameter documentations has been truncated, see + # {Lithic::Models::ClaimDocumentUploadedWebhookEvent} for more details. + # + # @param token [String] Unique identifier for the document, in UUID format + # + # @param created [Time] When the document was created + # + # @param download_url [String, nil] Presigned URL for downloading the uploaded document. Available once the document + # + # @param download_url_expires_at [Time, nil] When the download URL expires + # + # @param failure_reason [Symbol, Lithic::Models::ClaimDocumentUploadedWebhookEvent::FailureReason, nil] Reason the document failed validation. Null unless `status` is `REJECTED` + # + # @param name [String] Name provided when the upload intent was created + # + # @param requirement_id [String, nil] Identifier of the document requirement this document satisfies. Null for supplem + # + # @param status [Symbol, Lithic::Models::ClaimDocumentUploadedWebhookEvent::Status] Current validation status of the document + # + # @param updated [Time] When the document was last updated + # + # @param upload_constraints [Lithic::Models::ClaimDocumentUploadedWebhookEvent::UploadConstraints, nil] Constraints that an uploaded file must satisfy. + # + # @param upload_url [String, nil] Presigned URL for uploading the file via HTTP PUT. Null after the upload window + # + # @param upload_url_expires_at [Time, nil] When the upload URL expires + # + # @param event_type [Symbol, :"claim_document.uploaded"] The type of event that occurred. + + # Reason the document failed validation. Null unless `status` is `REJECTED` + # + # @see Lithic::Models::ClaimDocumentUploadedWebhookEvent#failure_reason + module FailureReason + extend Lithic::Internal::Type::Enum + + INVALID_MIME_TYPE = :INVALID_MIME_TYPE + FILE_TOO_LARGE = :FILE_TOO_LARGE + FILE_EMPTY = :FILE_EMPTY + CORRUPT_FILE = :CORRUPT_FILE + OTHER = :OTHER + + # @!method self.values + # @return [Array] + end + + # Current validation status of the document + # + # @see Lithic::Models::ClaimDocumentUploadedWebhookEvent#status + module Status + extend Lithic::Internal::Type::Enum + + PENDING = :PENDING + VALIDATING = :VALIDATING + ACCEPTED = :ACCEPTED + REJECTED = :REJECTED + + # @!method self.values + # @return [Array] + end + + # @see Lithic::Models::ClaimDocumentUploadedWebhookEvent#upload_constraints + class UploadConstraints < Lithic::Internal::Type::BaseModel + # @!attribute accepted_mime_types + # MIME types accepted for upload + # + # @return [Array] + required :accepted_mime_types, Lithic::Internal::Type::ArrayOf[String] + + # @!attribute max_size_bytes + # Maximum file size in bytes. Null if there is no enforced size limit + # + # @return [Integer, nil] + required :max_size_bytes, Integer, nil?: true + + # @!method initialize(accepted_mime_types:, max_size_bytes:) + # Constraints that an uploaded file must satisfy. + # + # @param accepted_mime_types [Array] MIME types accepted for upload + # + # @param max_size_bytes [Integer, nil] Maximum file size in bytes. Null if there is no enforced size limit + end + end + end +end diff --git a/lib/lithic/models/claim_updated_webhook_event.rb b/lib/lithic/models/claim_updated_webhook_event.rb new file mode 100644 index 00000000..c7e34d6f --- /dev/null +++ b/lib/lithic/models/claim_updated_webhook_event.rb @@ -0,0 +1,190 @@ +# frozen_string_literal: true + +module Lithic + module Models + class ClaimUpdatedWebhookEvent < Lithic::Internal::Type::BaseModel + # @!attribute token + # Unique identifier for the claim, in UUID format + # + # @return [String] + required :token, String + + # @!attribute account_holder_token + # Token for the account holder that filed the claim + # + # @return [String, nil] + required :account_holder_token, String, nil?: true + + # @!attribute account_token + # Token for the account associated with the claim + # + # @return [String, nil] + required :account_token, String, nil?: true + + # @!attribute card_tokens + # Tokens for the cards associated with the disputed transactions + # + # @return [Array] + required :card_tokens, Lithic::Internal::Type::ArrayOf[String] + + # @!attribute created + # When the claim was created + # + # @return [Time] + required :created, Time + + # @!attribute disputed_transactions + # Transactions included in this claim + # + # @return [Array] + required :disputed_transactions, + -> { Lithic::Internal::Type::ArrayOf[Lithic::ClaimUpdatedWebhookEvent::DisputedTransaction] } + + # @!attribute event_type + # The type of event that occurred. + # + # @return [Symbol, :"claim.updated"] + required :event_type, const: :"claim.updated" + + # @!attribute outstanding_requirements + # Requirements that must be fulfilled before the claim can be submitted + # + # @return [Array] + required :outstanding_requirements, + -> { Lithic::Internal::Type::ArrayOf[enum: Lithic::ClaimUpdatedWebhookEvent::OutstandingRequirement] } + + # @!attribute reason + # Dispute reason code provided when creating the claim + # + # @return [Symbol, Lithic::Models::ClaimUpdatedWebhookEvent::Reason] + required :reason, enum: -> { Lithic::ClaimUpdatedWebhookEvent::Reason } + + # @!attribute status + # Current lifecycle status of the claim + # + # @return [Symbol, Lithic::Models::ClaimUpdatedWebhookEvent::Status] + required :status, enum: -> { Lithic::ClaimUpdatedWebhookEvent::Status } + + # @!attribute submitted + # When the claim was submitted. Null until the claim reaches `SUBMITTED` status + # + # @return [Time, nil] + required :submitted, Time, nil?: true + + # @!attribute updated + # When the claim was last updated + # + # @return [Time] + required :updated, Time + + # @!method initialize(token:, account_holder_token:, account_token:, card_tokens:, created:, disputed_transactions:, outstanding_requirements:, reason:, status:, submitted:, updated:, event_type: :"claim.updated") + # @param token [String] Unique identifier for the claim, in UUID format + # + # @param account_holder_token [String, nil] Token for the account holder that filed the claim + # + # @param account_token [String, nil] Token for the account associated with the claim + # + # @param card_tokens [Array] Tokens for the cards associated with the disputed transactions + # + # @param created [Time] When the claim was created + # + # @param disputed_transactions [Array] Transactions included in this claim + # + # @param outstanding_requirements [Array] Requirements that must be fulfilled before the claim can be submitted + # + # @param reason [Symbol, Lithic::Models::ClaimUpdatedWebhookEvent::Reason] Dispute reason code provided when creating the claim + # + # @param status [Symbol, Lithic::Models::ClaimUpdatedWebhookEvent::Status] Current lifecycle status of the claim + # + # @param submitted [Time, nil] When the claim was submitted. Null until the claim reaches `SUBMITTED` status + # + # @param updated [Time] When the claim was last updated + # + # @param event_type [Symbol, :"claim.updated"] The type of event that occurred. + + class DisputedTransaction < Lithic::Internal::Type::BaseModel + # @!attribute event_tokens + # Tokens for the specific events within the transaction being disputed. Lithic + # creates one dispute per event token + # + # @return [Array] + required :event_tokens, Lithic::Internal::Type::ArrayOf[String] + + # @!attribute transaction_token + # Token for the transaction being disputed, in UUID format + # + # @return [String] + required :transaction_token, String + + # @!method initialize(event_tokens:, transaction_token:) + # Some parameter documentations has been truncated, see + # {Lithic::Models::ClaimUpdatedWebhookEvent::DisputedTransaction} for more + # details. + # + # A transaction included in a claim, along with the specific events being + # disputed. + # + # @param event_tokens [Array] Tokens for the specific events within the transaction being disputed. Lithic cre + # + # @param transaction_token [String] Token for the transaction being disputed, in UUID format + end + + module OutstandingRequirement + extend Lithic::Internal::Type::Enum + + QUESTIONNAIRE = :QUESTIONNAIRE + DOCUMENTS = :DOCUMENTS + + # @!method self.values + # @return [Array] + end + + # Dispute reason code provided when creating the claim + # + # @see Lithic::Models::ClaimUpdatedWebhookEvent#reason + module Reason + extend Lithic::Internal::Type::Enum + + CARD_NOT_PRESENT = :CARD_NOT_PRESENT + CARD_LOST = :CARD_LOST + CARD_STOLEN = :CARD_STOLEN + CARD_NEVER_RECEIVED = :CARD_NEVER_RECEIVED + COUNTERFEIT = :COUNTERFEIT + ACCOUNT_TAKEOVER = :ACCOUNT_TAKEOVER + PRODUCT_NOT_RECEIVED = :PRODUCT_NOT_RECEIVED + NOT_AS_DESCRIBED = :NOT_AS_DESCRIBED + CREDIT_NOT_PROCESSED = :CREDIT_NOT_PROCESSED + CANCELLED_RECURRING = :CANCELLED_RECURRING + PAID_BY_OTHER_MEANS = :PAID_BY_OTHER_MEANS + DUPLICATE_CHARGE = :DUPLICATE_CHARGE + LATE_PRESENTMENT = :LATE_PRESENTMENT + INCORRECT_TRANSACTION_CODE = :INCORRECT_TRANSACTION_CODE + NO_AUTHORIZATION = :NO_AUTHORIZATION + DECLINED = :DECLINED + INCORRECT_AMOUNT = :INCORRECT_AMOUNT + ATM_CASH_NOT_DISPENSED = :ATM_CASH_NOT_DISPENSED + ATM_DEPOSIT_WRONG_AMOUNT = :ATM_DEPOSIT_WRONG_AMOUNT + ATM_DEPOSIT_MISSING = :ATM_DEPOSIT_MISSING + + # @!method self.values + # @return [Array] + end + + # Current lifecycle status of the claim + # + # @see Lithic::Models::ClaimUpdatedWebhookEvent#status + module Status + extend Lithic::Internal::Type::Enum + + INITIALIZING = :INITIALIZING + AWAITING_INFO = :AWAITING_INFO + SUBMITTED = :SUBMITTED + RESOLVED = :RESOLVED + ABANDONED = :ABANDONED + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/lithic/models/event.rb b/lib/lithic/models/event.rb index 81f4fe74..3ba2bec2 100644 --- a/lib/lithic/models/event.rb +++ b/lib/lithic/models/event.rb @@ -51,6 +51,15 @@ class Event < Lithic::Internal::Type::BaseModel # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. # - card.updated: Occurs when a card is updated. + # - claim_document.accepted: Occurs when a claim document passes validation and is + # accepted. + # - claim_document.rejected: Occurs when a claim document fails validation and is + # rejected. + # - claim_document.uploaded: Occurs when a claim document is uploaded and begins + # validation. + # - claim.created: Occurs when a dispute intake claim is created. + # - claim.updated: Occurs when a dispute intake claim is updated, such as a status + # change or a change to its outstanding requirements. # - digital_wallet.tokenization_result: Occurs when a tokenization request # succeeded or failed. # @@ -178,6 +187,15 @@ class Event < Lithic::Internal::Type::BaseModel # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. # - card.updated: Occurs when a card is updated. + # - claim_document.accepted: Occurs when a claim document passes validation and is + # accepted. + # - claim_document.rejected: Occurs when a claim document fails validation and is + # rejected. + # - claim_document.uploaded: Occurs when a claim document is uploaded and begins + # validation. + # - claim.created: Occurs when a dispute intake claim is created. + # - claim.updated: Occurs when a dispute intake claim is updated, such as a status + # change or a change to its outstanding requirements. # - digital_wallet.tokenization_result: Occurs when a tokenization request # succeeded or failed. # @@ -274,6 +292,11 @@ module EventType CARD_RENEWED = :"card.renewed" CARD_SHIPPED = :"card.shipped" CARD_UPDATED = :"card.updated" + CLAIM_DOCUMENT_ACCEPTED = :"claim_document.accepted" + CLAIM_DOCUMENT_REJECTED = :"claim_document.rejected" + CLAIM_DOCUMENT_UPLOADED = :"claim_document.uploaded" + CLAIM_CREATED = :"claim.created" + CLAIM_UPDATED = :"claim.updated" DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE = :"digital_wallet.tokenization_two_factor_authentication_code" diff --git a/lib/lithic/models/event_list_params.rb b/lib/lithic/models/event_list_params.rb index c7d4136b..e4b64766 100644 --- a/lib/lithic/models/event_list_params.rb +++ b/lib/lithic/models/event_list_params.rb @@ -105,6 +105,15 @@ class EventListParams < Lithic::Internal::Type::BaseModel # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. # - card.updated: Occurs when a card is updated. + # - claim_document.accepted: Occurs when a claim document passes validation and is + # accepted. + # - claim_document.rejected: Occurs when a claim document fails validation and is + # rejected. + # - claim_document.uploaded: Occurs when a claim document is uploaded and begins + # validation. + # - claim.created: Occurs when a dispute intake claim is created. + # - claim.updated: Occurs when a dispute intake claim is updated, such as a status + # change or a change to its outstanding requirements. # - digital_wallet.tokenization_result: Occurs when a tokenization request # succeeded or failed. # @@ -199,6 +208,11 @@ module EventType CARD_RENEWED = :"card.renewed" CARD_SHIPPED = :"card.shipped" CARD_UPDATED = :"card.updated" + CLAIM_DOCUMENT_ACCEPTED = :"claim_document.accepted" + CLAIM_DOCUMENT_REJECTED = :"claim_document.rejected" + CLAIM_DOCUMENT_UPLOADED = :"claim_document.uploaded" + CLAIM_CREATED = :"claim.created" + CLAIM_UPDATED = :"claim.updated" DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE = :"digital_wallet.tokenization_two_factor_authentication_code" diff --git a/lib/lithic/models/event_subscription.rb b/lib/lithic/models/event_subscription.rb index 1fa8ace5..daab3ce3 100644 --- a/lib/lithic/models/event_subscription.rb +++ b/lib/lithic/models/event_subscription.rb @@ -78,6 +78,15 @@ class EventSubscription < Lithic::Internal::Type::BaseModel # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. # - card.updated: Occurs when a card is updated. + # - claim_document.accepted: Occurs when a claim document passes validation and is + # accepted. + # - claim_document.rejected: Occurs when a claim document fails validation and is + # rejected. + # - claim_document.uploaded: Occurs when a claim document is uploaded and begins + # validation. + # - claim.created: Occurs when a dispute intake claim is created. + # - claim.updated: Occurs when a dispute intake claim is updated, such as a status + # change or a change to its outstanding requirements. # - digital_wallet.tokenization_result: Occurs when a tokenization request # succeeded or failed. # @@ -172,6 +181,11 @@ module EventType CARD_RENEWED = :"card.renewed" CARD_SHIPPED = :"card.shipped" CARD_UPDATED = :"card.updated" + CLAIM_DOCUMENT_ACCEPTED = :"claim_document.accepted" + CLAIM_DOCUMENT_REJECTED = :"claim_document.rejected" + CLAIM_DOCUMENT_UPLOADED = :"claim_document.uploaded" + CLAIM_CREATED = :"claim.created" + CLAIM_UPDATED = :"claim.updated" DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE = :"digital_wallet.tokenization_two_factor_authentication_code" diff --git a/lib/lithic/models/events/subscription_create_params.rb b/lib/lithic/models/events/subscription_create_params.rb index ca2cb392..218b5879 100644 --- a/lib/lithic/models/events/subscription_create_params.rb +++ b/lib/lithic/models/events/subscription_create_params.rb @@ -80,6 +80,15 @@ class SubscriptionCreateParams < Lithic::Internal::Type::BaseModel # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. # - card.updated: Occurs when a card is updated. + # - claim_document.accepted: Occurs when a claim document passes validation and is + # accepted. + # - claim_document.rejected: Occurs when a claim document fails validation and is + # rejected. + # - claim_document.uploaded: Occurs when a claim document is uploaded and begins + # validation. + # - claim.created: Occurs when a dispute intake claim is created. + # - claim.updated: Occurs when a dispute intake claim is updated, such as a status + # change or a change to its outstanding requirements. # - digital_wallet.tokenization_result: Occurs when a tokenization request # succeeded or failed. # @@ -174,6 +183,11 @@ module EventType CARD_RENEWED = :"card.renewed" CARD_SHIPPED = :"card.shipped" CARD_UPDATED = :"card.updated" + CLAIM_DOCUMENT_ACCEPTED = :"claim_document.accepted" + CLAIM_DOCUMENT_REJECTED = :"claim_document.rejected" + CLAIM_DOCUMENT_UPLOADED = :"claim_document.uploaded" + CLAIM_CREATED = :"claim.created" + CLAIM_UPDATED = :"claim.updated" DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE = :"digital_wallet.tokenization_two_factor_authentication_code" diff --git a/lib/lithic/models/events/subscription_send_simulated_example_params.rb b/lib/lithic/models/events/subscription_send_simulated_example_params.rb index 9219f6c0..a572d64c 100644 --- a/lib/lithic/models/events/subscription_send_simulated_example_params.rb +++ b/lib/lithic/models/events/subscription_send_simulated_example_params.rb @@ -49,6 +49,11 @@ module EventType CARD_RENEWED = :"card.renewed" CARD_SHIPPED = :"card.shipped" CARD_UPDATED = :"card.updated" + CLAIM_DOCUMENT_ACCEPTED = :"claim_document.accepted" + CLAIM_DOCUMENT_REJECTED = :"claim_document.rejected" + CLAIM_DOCUMENT_UPLOADED = :"claim_document.uploaded" + CLAIM_CREATED = :"claim.created" + CLAIM_UPDATED = :"claim.updated" DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE = :"digital_wallet.tokenization_two_factor_authentication_code" diff --git a/lib/lithic/models/events/subscription_update_params.rb b/lib/lithic/models/events/subscription_update_params.rb index 99170b15..40c826a0 100644 --- a/lib/lithic/models/events/subscription_update_params.rb +++ b/lib/lithic/models/events/subscription_update_params.rb @@ -87,6 +87,15 @@ class SubscriptionUpdateParams < Lithic::Internal::Type::BaseModel # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. # - card.updated: Occurs when a card is updated. + # - claim_document.accepted: Occurs when a claim document passes validation and is + # accepted. + # - claim_document.rejected: Occurs when a claim document fails validation and is + # rejected. + # - claim_document.uploaded: Occurs when a claim document is uploaded and begins + # validation. + # - claim.created: Occurs when a dispute intake claim is created. + # - claim.updated: Occurs when a dispute intake claim is updated, such as a status + # change or a change to its outstanding requirements. # - digital_wallet.tokenization_result: Occurs when a tokenization request # succeeded or failed. # @@ -181,6 +190,11 @@ module EventType CARD_RENEWED = :"card.renewed" CARD_SHIPPED = :"card.shipped" CARD_UPDATED = :"card.updated" + CLAIM_DOCUMENT_ACCEPTED = :"claim_document.accepted" + CLAIM_DOCUMENT_REJECTED = :"claim_document.rejected" + CLAIM_DOCUMENT_UPLOADED = :"claim_document.uploaded" + CLAIM_CREATED = :"claim.created" + CLAIM_UPDATED = :"claim.updated" DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE = :"digital_wallet.tokenization_two_factor_authentication_code" diff --git a/lib/lithic/models/parsed_webhook_event.rb b/lib/lithic/models/parsed_webhook_event.rb index ca1e2301..effdc98b 100644 --- a/lib/lithic/models/parsed_webhook_event.rb +++ b/lib/lithic/models/parsed_webhook_event.rb @@ -56,6 +56,16 @@ module ParsedWebhookEvent variant -> { Lithic::CardTransactionEnhancedDataUpdatedWebhookEvent } + variant -> { Lithic::ClaimCreatedWebhookEvent } + + variant -> { Lithic::ClaimUpdatedWebhookEvent } + + variant -> { Lithic::ClaimDocumentUploadedWebhookEvent } + + variant -> { Lithic::ClaimDocumentAcceptedWebhookEvent } + + variant -> { Lithic::ClaimDocumentRejectedWebhookEvent } + # Payload for digital wallet tokenization approval requests. Used for both the decisioning responder request (sent to the customer's endpoint for a real-time decision) and the subsequent webhook event (sent after the decision is made). Fields like customer_tokenization_decision, tokenization_decline_reasons, tokenization_tfa_reasons, and rule_results are only populated in the webhook event, not in the initial decisioning request. variant -> { Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent } @@ -816,7 +826,7 @@ module EventType end # @!method self.variants - # @return [Array(Lithic::Models::AccountHolderCreatedWebhookEvent, Lithic::Models::ParsedWebhookEvent::KYBPayload, Lithic::Models::ParsedWebhookEvent::KYCPayload, Lithic::Models::ParsedWebhookEvent::LegacyPayload, Lithic::Models::AccountHolderVerificationWebhookEvent, Lithic::Models::AccountHolderDocumentUpdatedWebhookEvent, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent, Lithic::Models::CardAuthorizationChallengeWebhookEvent, Lithic::Models::CardAuthorizationChallengeResponseWebhookEvent, Lithic::Models::AuthRulesBacktestReportCreatedWebhookEvent, Lithic::Models::BalanceUpdatedWebhookEvent, Lithic::Models::BookTransferTransactionCreatedWebhookEvent, Lithic::Models::BookTransferTransactionUpdatedWebhookEvent, Lithic::Models::CardCreatedWebhookEvent, Lithic::Models::CardConvertedWebhookEvent, Lithic::Models::CardRenewedWebhookEvent, Lithic::Models::CardReissuedWebhookEvent, Lithic::Models::CardShippedWebhookEvent, Lithic::Models::CardUpdatedWebhookEvent, Lithic::Models::CardTransactionUpdatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataCreatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataUpdatedWebhookEvent, Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent, Lithic::Models::DigitalWalletTokenizationResultWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::DigitalWalletTokenizationUpdatedWebhookEvent, Lithic::Models::DisputeUpdatedWebhookEvent, Lithic::Models::DisputeEvidenceUploadFailedWebhookEvent, Lithic::Models::ExternalBankAccountCreatedWebhookEvent, Lithic::Models::ExternalBankAccountUpdatedWebhookEvent, Lithic::Models::ExternalPaymentCreatedWebhookEvent, Lithic::Models::ExternalPaymentUpdatedWebhookEvent, Lithic::Models::FinancialAccountCreatedWebhookEvent, Lithic::Models::FinancialAccountUpdatedWebhookEvent, Lithic::Models::FundingEventCreatedWebhookEvent, Lithic::Models::LoanTapeCreatedWebhookEvent, Lithic::Models::LoanTapeUpdatedWebhookEvent, Lithic::Models::ManagementOperationCreatedWebhookEvent, Lithic::Models::ManagementOperationUpdatedWebhookEvent, Lithic::Models::InternalTransactionCreatedWebhookEvent, Lithic::Models::InternalTransactionUpdatedWebhookEvent, Lithic::Models::NetworkTotalCreatedWebhookEvent, Lithic::Models::NetworkTotalUpdatedWebhookEvent, Lithic::Models::PaymentTransactionCreatedWebhookEvent, Lithic::Models::PaymentTransactionUpdatedWebhookEvent, Lithic::Models::SettlementReportUpdatedWebhookEvent, Lithic::Models::StatementsCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationChallengeWebhookEvent, Lithic::Models::TokenizationApprovalRequestWebhookEvent, Lithic::Models::TokenizationResultWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::TokenizationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationApprovalRequestWebhookEvent, Lithic::Models::DisputeTransactionCreatedWebhookEvent, Lithic::Models::DisputeTransactionUpdatedWebhookEvent)] + # @return [Array(Lithic::Models::AccountHolderCreatedWebhookEvent, Lithic::Models::ParsedWebhookEvent::KYBPayload, Lithic::Models::ParsedWebhookEvent::KYCPayload, Lithic::Models::ParsedWebhookEvent::LegacyPayload, Lithic::Models::AccountHolderVerificationWebhookEvent, Lithic::Models::AccountHolderDocumentUpdatedWebhookEvent, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent, Lithic::Models::CardAuthorizationChallengeWebhookEvent, Lithic::Models::CardAuthorizationChallengeResponseWebhookEvent, Lithic::Models::AuthRulesBacktestReportCreatedWebhookEvent, Lithic::Models::BalanceUpdatedWebhookEvent, Lithic::Models::BookTransferTransactionCreatedWebhookEvent, Lithic::Models::BookTransferTransactionUpdatedWebhookEvent, Lithic::Models::CardCreatedWebhookEvent, Lithic::Models::CardConvertedWebhookEvent, Lithic::Models::CardRenewedWebhookEvent, Lithic::Models::CardReissuedWebhookEvent, Lithic::Models::CardShippedWebhookEvent, Lithic::Models::CardUpdatedWebhookEvent, Lithic::Models::CardTransactionUpdatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataCreatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataUpdatedWebhookEvent, Lithic::Models::ClaimCreatedWebhookEvent, Lithic::Models::ClaimUpdatedWebhookEvent, Lithic::Models::ClaimDocumentUploadedWebhookEvent, Lithic::Models::ClaimDocumentAcceptedWebhookEvent, Lithic::Models::ClaimDocumentRejectedWebhookEvent, Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent, Lithic::Models::DigitalWalletTokenizationResultWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::DigitalWalletTokenizationUpdatedWebhookEvent, Lithic::Models::DisputeUpdatedWebhookEvent, Lithic::Models::DisputeEvidenceUploadFailedWebhookEvent, Lithic::Models::ExternalBankAccountCreatedWebhookEvent, Lithic::Models::ExternalBankAccountUpdatedWebhookEvent, Lithic::Models::ExternalPaymentCreatedWebhookEvent, Lithic::Models::ExternalPaymentUpdatedWebhookEvent, Lithic::Models::FinancialAccountCreatedWebhookEvent, Lithic::Models::FinancialAccountUpdatedWebhookEvent, Lithic::Models::FundingEventCreatedWebhookEvent, Lithic::Models::LoanTapeCreatedWebhookEvent, Lithic::Models::LoanTapeUpdatedWebhookEvent, Lithic::Models::ManagementOperationCreatedWebhookEvent, Lithic::Models::ManagementOperationUpdatedWebhookEvent, Lithic::Models::InternalTransactionCreatedWebhookEvent, Lithic::Models::InternalTransactionUpdatedWebhookEvent, Lithic::Models::NetworkTotalCreatedWebhookEvent, Lithic::Models::NetworkTotalUpdatedWebhookEvent, Lithic::Models::PaymentTransactionCreatedWebhookEvent, Lithic::Models::PaymentTransactionUpdatedWebhookEvent, Lithic::Models::SettlementReportUpdatedWebhookEvent, Lithic::Models::StatementsCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationChallengeWebhookEvent, Lithic::Models::TokenizationApprovalRequestWebhookEvent, Lithic::Models::TokenizationResultWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::TokenizationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationApprovalRequestWebhookEvent, Lithic::Models::DisputeTransactionCreatedWebhookEvent, Lithic::Models::DisputeTransactionUpdatedWebhookEvent)] end end end diff --git a/lib/lithic/resources/webhooks.rb b/lib/lithic/resources/webhooks.rb index f6a89221..6ce46b1c 100644 --- a/lib/lithic/resources/webhooks.rb +++ b/lib/lithic/resources/webhooks.rb @@ -9,7 +9,7 @@ class Webhooks # @param headers [Hash{String => String}] The webhook request headers # @param secret [String, nil] The webhook secret. If not provided, reads from LITHIC_WEBHOOK_SECRET environment variable. # - # @return [Lithic::Models::AccountHolderCreatedWebhookEvent, Lithic::Models::ParsedWebhookEvent::KYBPayload, Lithic::Models::ParsedWebhookEvent::KYCPayload, Lithic::Models::ParsedWebhookEvent::LegacyPayload, Lithic::Models::AccountHolderVerificationWebhookEvent, Lithic::Models::AccountHolderDocumentUpdatedWebhookEvent, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent, Lithic::Models::CardAuthorizationChallengeWebhookEvent, Lithic::Models::CardAuthorizationChallengeResponseWebhookEvent, Lithic::Models::AuthRulesBacktestReportCreatedWebhookEvent, Lithic::Models::BalanceUpdatedWebhookEvent, Lithic::Models::BookTransferTransactionCreatedWebhookEvent, Lithic::Models::BookTransferTransactionUpdatedWebhookEvent, Lithic::Models::CardCreatedWebhookEvent, Lithic::Models::CardConvertedWebhookEvent, Lithic::Models::CardRenewedWebhookEvent, Lithic::Models::CardReissuedWebhookEvent, Lithic::Models::CardShippedWebhookEvent, Lithic::Models::CardUpdatedWebhookEvent, Lithic::Models::CardTransactionUpdatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataCreatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataUpdatedWebhookEvent, Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent, Lithic::Models::DigitalWalletTokenizationResultWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::DigitalWalletTokenizationUpdatedWebhookEvent, Lithic::Models::DisputeUpdatedWebhookEvent, Lithic::Models::DisputeEvidenceUploadFailedWebhookEvent, Lithic::Models::ExternalBankAccountCreatedWebhookEvent, Lithic::Models::ExternalBankAccountUpdatedWebhookEvent, Lithic::Models::ExternalPaymentCreatedWebhookEvent, Lithic::Models::ExternalPaymentUpdatedWebhookEvent, Lithic::Models::FinancialAccountCreatedWebhookEvent, Lithic::Models::FinancialAccountUpdatedWebhookEvent, Lithic::Models::FundingEventCreatedWebhookEvent, Lithic::Models::LoanTapeCreatedWebhookEvent, Lithic::Models::LoanTapeUpdatedWebhookEvent, Lithic::Models::ManagementOperationCreatedWebhookEvent, Lithic::Models::ManagementOperationUpdatedWebhookEvent, Lithic::Models::InternalTransactionCreatedWebhookEvent, Lithic::Models::InternalTransactionUpdatedWebhookEvent, Lithic::Models::NetworkTotalCreatedWebhookEvent, Lithic::Models::NetworkTotalUpdatedWebhookEvent, Lithic::Models::PaymentTransactionCreatedWebhookEvent, Lithic::Models::PaymentTransactionUpdatedWebhookEvent, Lithic::Models::SettlementReportUpdatedWebhookEvent, Lithic::Models::StatementsCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationChallengeWebhookEvent, Lithic::Models::TokenizationApprovalRequestWebhookEvent, Lithic::Models::TokenizationResultWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::TokenizationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationApprovalRequestWebhookEvent, Lithic::Models::DisputeTransactionCreatedWebhookEvent, Lithic::Models::DisputeTransactionUpdatedWebhookEvent] # + # @return [Lithic::Models::AccountHolderCreatedWebhookEvent, Lithic::Models::ParsedWebhookEvent::KYBPayload, Lithic::Models::ParsedWebhookEvent::KYCPayload, Lithic::Models::ParsedWebhookEvent::LegacyPayload, Lithic::Models::AccountHolderVerificationWebhookEvent, Lithic::Models::AccountHolderDocumentUpdatedWebhookEvent, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent, Lithic::Models::CardAuthorizationChallengeWebhookEvent, Lithic::Models::CardAuthorizationChallengeResponseWebhookEvent, Lithic::Models::AuthRulesBacktestReportCreatedWebhookEvent, Lithic::Models::BalanceUpdatedWebhookEvent, Lithic::Models::BookTransferTransactionCreatedWebhookEvent, Lithic::Models::BookTransferTransactionUpdatedWebhookEvent, Lithic::Models::CardCreatedWebhookEvent, Lithic::Models::CardConvertedWebhookEvent, Lithic::Models::CardRenewedWebhookEvent, Lithic::Models::CardReissuedWebhookEvent, Lithic::Models::CardShippedWebhookEvent, Lithic::Models::CardUpdatedWebhookEvent, Lithic::Models::CardTransactionUpdatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataCreatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataUpdatedWebhookEvent, Lithic::Models::ClaimCreatedWebhookEvent, Lithic::Models::ClaimUpdatedWebhookEvent, Lithic::Models::ClaimDocumentUploadedWebhookEvent, Lithic::Models::ClaimDocumentAcceptedWebhookEvent, Lithic::Models::ClaimDocumentRejectedWebhookEvent, Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent, Lithic::Models::DigitalWalletTokenizationResultWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::DigitalWalletTokenizationUpdatedWebhookEvent, Lithic::Models::DisputeUpdatedWebhookEvent, Lithic::Models::DisputeEvidenceUploadFailedWebhookEvent, Lithic::Models::ExternalBankAccountCreatedWebhookEvent, Lithic::Models::ExternalBankAccountUpdatedWebhookEvent, Lithic::Models::ExternalPaymentCreatedWebhookEvent, Lithic::Models::ExternalPaymentUpdatedWebhookEvent, Lithic::Models::FinancialAccountCreatedWebhookEvent, Lithic::Models::FinancialAccountUpdatedWebhookEvent, Lithic::Models::FundingEventCreatedWebhookEvent, Lithic::Models::LoanTapeCreatedWebhookEvent, Lithic::Models::LoanTapeUpdatedWebhookEvent, Lithic::Models::ManagementOperationCreatedWebhookEvent, Lithic::Models::ManagementOperationUpdatedWebhookEvent, Lithic::Models::InternalTransactionCreatedWebhookEvent, Lithic::Models::InternalTransactionUpdatedWebhookEvent, Lithic::Models::NetworkTotalCreatedWebhookEvent, Lithic::Models::NetworkTotalUpdatedWebhookEvent, Lithic::Models::PaymentTransactionCreatedWebhookEvent, Lithic::Models::PaymentTransactionUpdatedWebhookEvent, Lithic::Models::SettlementReportUpdatedWebhookEvent, Lithic::Models::StatementsCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationChallengeWebhookEvent, Lithic::Models::TokenizationApprovalRequestWebhookEvent, Lithic::Models::TokenizationResultWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::TokenizationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationApprovalRequestWebhookEvent, Lithic::Models::DisputeTransactionCreatedWebhookEvent, Lithic::Models::DisputeTransactionUpdatedWebhookEvent] # # @raise [ArgumentError] if secret is not provided and LITHIC_WEBHOOK_SECRET env var is not set # @raise [Lithic::Errors::MissingDependencyError] if the standardwebhooks gem is not installed # @raise [StandardWebhooks::WebhookVerificationError] if the signature is invalid diff --git a/rbi/lithic/models.rbi b/rbi/lithic/models.rbi index 1ec0dbd0..448fbd2c 100644 --- a/rbi/lithic/models.rbi +++ b/rbi/lithic/models.rbi @@ -194,6 +194,19 @@ module Lithic CategoryDetails = Lithic::Models::CategoryDetails + ClaimCreatedWebhookEvent = Lithic::Models::ClaimCreatedWebhookEvent + + ClaimDocumentAcceptedWebhookEvent = + Lithic::Models::ClaimDocumentAcceptedWebhookEvent + + ClaimDocumentRejectedWebhookEvent = + Lithic::Models::ClaimDocumentRejectedWebhookEvent + + ClaimDocumentUploadedWebhookEvent = + Lithic::Models::ClaimDocumentUploadedWebhookEvent + + ClaimUpdatedWebhookEvent = Lithic::Models::ClaimUpdatedWebhookEvent + ClientAPIStatusParams = Lithic::Models::ClientAPIStatusParams CreditProducts = Lithic::Models::CreditProducts diff --git a/rbi/lithic/models/claim_created_webhook_event.rbi b/rbi/lithic/models/claim_created_webhook_event.rbi new file mode 100644 index 00000000..3754e53c --- /dev/null +++ b/rbi/lithic/models/claim_created_webhook_event.rbi @@ -0,0 +1,386 @@ +# typed: strong + +module Lithic + module Models + class ClaimCreatedWebhookEvent < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(Lithic::ClaimCreatedWebhookEvent, Lithic::Internal::AnyHash) + end + + # Unique identifier for the claim, in UUID format + sig { returns(String) } + attr_accessor :token + + # Token for the account holder that filed the claim + sig { returns(T.nilable(String)) } + attr_accessor :account_holder_token + + # Token for the account associated with the claim + sig { returns(T.nilable(String)) } + attr_accessor :account_token + + # Tokens for the cards associated with the disputed transactions + sig { returns(T::Array[String]) } + attr_accessor :card_tokens + + # When the claim was created + sig { returns(Time) } + attr_accessor :created + + # Transactions included in this claim + sig do + returns(T::Array[Lithic::ClaimCreatedWebhookEvent::DisputedTransaction]) + end + attr_accessor :disputed_transactions + + # The type of event that occurred. + sig { returns(Symbol) } + attr_accessor :event_type + + # Requirements that must be fulfilled before the claim can be submitted + sig do + returns( + T::Array[ + Lithic::ClaimCreatedWebhookEvent::OutstandingRequirement::TaggedSymbol + ] + ) + end + attr_accessor :outstanding_requirements + + # Dispute reason code provided when creating the claim + sig { returns(Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol) } + attr_accessor :reason + + # Current lifecycle status of the claim + sig { returns(Lithic::ClaimCreatedWebhookEvent::Status::TaggedSymbol) } + attr_accessor :status + + # When the claim was submitted. Null until the claim reaches `SUBMITTED` status + sig { returns(T.nilable(Time)) } + attr_accessor :submitted + + # When the claim was last updated + sig { returns(Time) } + attr_accessor :updated + + sig do + params( + token: String, + account_holder_token: T.nilable(String), + account_token: T.nilable(String), + card_tokens: T::Array[String], + created: Time, + disputed_transactions: + T::Array[ + Lithic::ClaimCreatedWebhookEvent::DisputedTransaction::OrHash + ], + outstanding_requirements: + T::Array[ + Lithic::ClaimCreatedWebhookEvent::OutstandingRequirement::OrSymbol + ], + reason: Lithic::ClaimCreatedWebhookEvent::Reason::OrSymbol, + status: Lithic::ClaimCreatedWebhookEvent::Status::OrSymbol, + submitted: T.nilable(Time), + updated: Time, + event_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # Unique identifier for the claim, in UUID format + token:, + # Token for the account holder that filed the claim + account_holder_token:, + # Token for the account associated with the claim + account_token:, + # Tokens for the cards associated with the disputed transactions + card_tokens:, + # When the claim was created + created:, + # Transactions included in this claim + disputed_transactions:, + # Requirements that must be fulfilled before the claim can be submitted + outstanding_requirements:, + # Dispute reason code provided when creating the claim + reason:, + # Current lifecycle status of the claim + status:, + # When the claim was submitted. Null until the claim reaches `SUBMITTED` status + submitted:, + # When the claim was last updated + updated:, + # The type of event that occurred. + event_type: :"claim.created" + ) + end + + sig do + override.returns( + { + token: String, + account_holder_token: T.nilable(String), + account_token: T.nilable(String), + card_tokens: T::Array[String], + created: Time, + disputed_transactions: + T::Array[Lithic::ClaimCreatedWebhookEvent::DisputedTransaction], + event_type: Symbol, + outstanding_requirements: + T::Array[ + Lithic::ClaimCreatedWebhookEvent::OutstandingRequirement::TaggedSymbol + ], + reason: Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol, + status: Lithic::ClaimCreatedWebhookEvent::Status::TaggedSymbol, + submitted: T.nilable(Time), + updated: Time + } + ) + end + def to_hash + end + + class DisputedTransaction < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::ClaimCreatedWebhookEvent::DisputedTransaction, + Lithic::Internal::AnyHash + ) + end + + # Tokens for the specific events within the transaction being disputed. Lithic + # creates one dispute per event token + sig { returns(T::Array[String]) } + attr_accessor :event_tokens + + # Token for the transaction being disputed, in UUID format + sig { returns(String) } + attr_accessor :transaction_token + + # A transaction included in a claim, along with the specific events being + # disputed. + sig do + params( + event_tokens: T::Array[String], + transaction_token: String + ).returns(T.attached_class) + end + def self.new( + # Tokens for the specific events within the transaction being disputed. Lithic + # creates one dispute per event token + event_tokens:, + # Token for the transaction being disputed, in UUID format + transaction_token: + ) + end + + sig do + override.returns( + { event_tokens: T::Array[String], transaction_token: String } + ) + end + def to_hash + end + end + + module OutstandingRequirement + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::ClaimCreatedWebhookEvent::OutstandingRequirement + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + QUESTIONNAIRE = + T.let( + :QUESTIONNAIRE, + Lithic::ClaimCreatedWebhookEvent::OutstandingRequirement::TaggedSymbol + ) + DOCUMENTS = + T.let( + :DOCUMENTS, + Lithic::ClaimCreatedWebhookEvent::OutstandingRequirement::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::ClaimCreatedWebhookEvent::OutstandingRequirement::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Dispute reason code provided when creating the claim + module Reason + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::ClaimCreatedWebhookEvent::Reason) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CARD_NOT_PRESENT = + T.let( + :CARD_NOT_PRESENT, + Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol + ) + CARD_LOST = + T.let( + :CARD_LOST, + Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol + ) + CARD_STOLEN = + T.let( + :CARD_STOLEN, + Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol + ) + CARD_NEVER_RECEIVED = + T.let( + :CARD_NEVER_RECEIVED, + Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol + ) + COUNTERFEIT = + T.let( + :COUNTERFEIT, + Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol + ) + ACCOUNT_TAKEOVER = + T.let( + :ACCOUNT_TAKEOVER, + Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol + ) + PRODUCT_NOT_RECEIVED = + T.let( + :PRODUCT_NOT_RECEIVED, + Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol + ) + NOT_AS_DESCRIBED = + T.let( + :NOT_AS_DESCRIBED, + Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol + ) + CREDIT_NOT_PROCESSED = + T.let( + :CREDIT_NOT_PROCESSED, + Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol + ) + CANCELLED_RECURRING = + T.let( + :CANCELLED_RECURRING, + Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol + ) + PAID_BY_OTHER_MEANS = + T.let( + :PAID_BY_OTHER_MEANS, + Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol + ) + DUPLICATE_CHARGE = + T.let( + :DUPLICATE_CHARGE, + Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol + ) + LATE_PRESENTMENT = + T.let( + :LATE_PRESENTMENT, + Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol + ) + INCORRECT_TRANSACTION_CODE = + T.let( + :INCORRECT_TRANSACTION_CODE, + Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol + ) + NO_AUTHORIZATION = + T.let( + :NO_AUTHORIZATION, + Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol + ) + DECLINED = + T.let( + :DECLINED, + Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol + ) + INCORRECT_AMOUNT = + T.let( + :INCORRECT_AMOUNT, + Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol + ) + ATM_CASH_NOT_DISPENSED = + T.let( + :ATM_CASH_NOT_DISPENSED, + Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol + ) + ATM_DEPOSIT_WRONG_AMOUNT = + T.let( + :ATM_DEPOSIT_WRONG_AMOUNT, + Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol + ) + ATM_DEPOSIT_MISSING = + T.let( + :ATM_DEPOSIT_MISSING, + Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Lithic::ClaimCreatedWebhookEvent::Reason::TaggedSymbol] + ) + end + def self.values + end + end + + # Current lifecycle status of the claim + module Status + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::ClaimCreatedWebhookEvent::Status) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + INITIALIZING = + T.let( + :INITIALIZING, + Lithic::ClaimCreatedWebhookEvent::Status::TaggedSymbol + ) + AWAITING_INFO = + T.let( + :AWAITING_INFO, + Lithic::ClaimCreatedWebhookEvent::Status::TaggedSymbol + ) + SUBMITTED = + T.let( + :SUBMITTED, + Lithic::ClaimCreatedWebhookEvent::Status::TaggedSymbol + ) + RESOLVED = + T.let( + :RESOLVED, + Lithic::ClaimCreatedWebhookEvent::Status::TaggedSymbol + ) + ABANDONED = + T.let( + :ABANDONED, + Lithic::ClaimCreatedWebhookEvent::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Lithic::ClaimCreatedWebhookEvent::Status::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/lithic/models/claim_document_accepted_webhook_event.rbi b/rbi/lithic/models/claim_document_accepted_webhook_event.rbi new file mode 100644 index 00000000..1abc1b09 --- /dev/null +++ b/rbi/lithic/models/claim_document_accepted_webhook_event.rbi @@ -0,0 +1,315 @@ +# typed: strong + +module Lithic + module Models + class ClaimDocumentAcceptedWebhookEvent < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::ClaimDocumentAcceptedWebhookEvent, + Lithic::Internal::AnyHash + ) + end + + # Unique identifier for the document, in UUID format + sig { returns(String) } + attr_accessor :token + + # When the document was created + sig { returns(Time) } + attr_accessor :created + + # Presigned URL for downloading the uploaded document. Available once the document + # is being validated or has been accepted (`VALIDATING` or `ACCEPTED`) + sig { returns(T.nilable(String)) } + attr_accessor :download_url + + # When the download URL expires + sig { returns(T.nilable(Time)) } + attr_accessor :download_url_expires_at + + # The type of event that occurred. + sig { returns(Symbol) } + attr_accessor :event_type + + # Reason the document failed validation. Null unless `status` is `REJECTED` + sig do + returns( + T.nilable( + Lithic::ClaimDocumentAcceptedWebhookEvent::FailureReason::TaggedSymbol + ) + ) + end + attr_accessor :failure_reason + + # Name provided when the upload intent was created + sig { returns(String) } + attr_accessor :name + + # Identifier of the document requirement this document satisfies. Null for + # supplemental documents not tied to a specific requirement + sig { returns(T.nilable(String)) } + attr_accessor :requirement_id + + # Current validation status of the document + sig do + returns(Lithic::ClaimDocumentAcceptedWebhookEvent::Status::TaggedSymbol) + end + attr_accessor :status + + # When the document was last updated + sig { returns(Time) } + attr_accessor :updated + + # Constraints that an uploaded file must satisfy. + sig do + returns( + T.nilable( + Lithic::ClaimDocumentAcceptedWebhookEvent::UploadConstraints + ) + ) + end + attr_reader :upload_constraints + + sig do + params( + upload_constraints: + T.nilable( + Lithic::ClaimDocumentAcceptedWebhookEvent::UploadConstraints::OrHash + ) + ).void + end + attr_writer :upload_constraints + + # Presigned URL for uploading the file via HTTP PUT. Null after the upload window + # expires or after the document has been validated + sig { returns(T.nilable(String)) } + attr_accessor :upload_url + + # When the upload URL expires + sig { returns(T.nilable(Time)) } + attr_accessor :upload_url_expires_at + + sig do + params( + token: String, + created: Time, + download_url: T.nilable(String), + download_url_expires_at: T.nilable(Time), + failure_reason: + T.nilable( + Lithic::ClaimDocumentAcceptedWebhookEvent::FailureReason::OrSymbol + ), + name: String, + requirement_id: T.nilable(String), + status: Lithic::ClaimDocumentAcceptedWebhookEvent::Status::OrSymbol, + updated: Time, + upload_constraints: + T.nilable( + Lithic::ClaimDocumentAcceptedWebhookEvent::UploadConstraints::OrHash + ), + upload_url: T.nilable(String), + upload_url_expires_at: T.nilable(Time), + event_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # Unique identifier for the document, in UUID format + token:, + # When the document was created + created:, + # Presigned URL for downloading the uploaded document. Available once the document + # is being validated or has been accepted (`VALIDATING` or `ACCEPTED`) + download_url:, + # When the download URL expires + download_url_expires_at:, + # Reason the document failed validation. Null unless `status` is `REJECTED` + failure_reason:, + # Name provided when the upload intent was created + name:, + # Identifier of the document requirement this document satisfies. Null for + # supplemental documents not tied to a specific requirement + requirement_id:, + # Current validation status of the document + status:, + # When the document was last updated + updated:, + # Constraints that an uploaded file must satisfy. + upload_constraints:, + # Presigned URL for uploading the file via HTTP PUT. Null after the upload window + # expires or after the document has been validated + upload_url:, + # When the upload URL expires + upload_url_expires_at:, + # The type of event that occurred. + event_type: :"claim_document.accepted" + ) + end + + sig do + override.returns( + { + token: String, + created: Time, + download_url: T.nilable(String), + download_url_expires_at: T.nilable(Time), + event_type: Symbol, + failure_reason: + T.nilable( + Lithic::ClaimDocumentAcceptedWebhookEvent::FailureReason::TaggedSymbol + ), + name: String, + requirement_id: T.nilable(String), + status: + Lithic::ClaimDocumentAcceptedWebhookEvent::Status::TaggedSymbol, + updated: Time, + upload_constraints: + T.nilable( + Lithic::ClaimDocumentAcceptedWebhookEvent::UploadConstraints + ), + upload_url: T.nilable(String), + upload_url_expires_at: T.nilable(Time) + } + ) + end + def to_hash + end + + # Reason the document failed validation. Null unless `status` is `REJECTED` + module FailureReason + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::ClaimDocumentAcceptedWebhookEvent::FailureReason + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + INVALID_MIME_TYPE = + T.let( + :INVALID_MIME_TYPE, + Lithic::ClaimDocumentAcceptedWebhookEvent::FailureReason::TaggedSymbol + ) + FILE_TOO_LARGE = + T.let( + :FILE_TOO_LARGE, + Lithic::ClaimDocumentAcceptedWebhookEvent::FailureReason::TaggedSymbol + ) + FILE_EMPTY = + T.let( + :FILE_EMPTY, + Lithic::ClaimDocumentAcceptedWebhookEvent::FailureReason::TaggedSymbol + ) + CORRUPT_FILE = + T.let( + :CORRUPT_FILE, + Lithic::ClaimDocumentAcceptedWebhookEvent::FailureReason::TaggedSymbol + ) + OTHER = + T.let( + :OTHER, + Lithic::ClaimDocumentAcceptedWebhookEvent::FailureReason::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::ClaimDocumentAcceptedWebhookEvent::FailureReason::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Current validation status of the document + module Status + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::ClaimDocumentAcceptedWebhookEvent::Status) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PENDING = + T.let( + :PENDING, + Lithic::ClaimDocumentAcceptedWebhookEvent::Status::TaggedSymbol + ) + VALIDATING = + T.let( + :VALIDATING, + Lithic::ClaimDocumentAcceptedWebhookEvent::Status::TaggedSymbol + ) + ACCEPTED = + T.let( + :ACCEPTED, + Lithic::ClaimDocumentAcceptedWebhookEvent::Status::TaggedSymbol + ) + REJECTED = + T.let( + :REJECTED, + Lithic::ClaimDocumentAcceptedWebhookEvent::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::ClaimDocumentAcceptedWebhookEvent::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + + class UploadConstraints < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::ClaimDocumentAcceptedWebhookEvent::UploadConstraints, + Lithic::Internal::AnyHash + ) + end + + # MIME types accepted for upload + sig { returns(T::Array[String]) } + attr_accessor :accepted_mime_types + + # Maximum file size in bytes. Null if there is no enforced size limit + sig { returns(T.nilable(Integer)) } + attr_accessor :max_size_bytes + + # Constraints that an uploaded file must satisfy. + sig do + params( + accepted_mime_types: T::Array[String], + max_size_bytes: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # MIME types accepted for upload + accepted_mime_types:, + # Maximum file size in bytes. Null if there is no enforced size limit + max_size_bytes: + ) + end + + sig do + override.returns( + { + accepted_mime_types: T::Array[String], + max_size_bytes: T.nilable(Integer) + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/lithic/models/claim_document_rejected_webhook_event.rbi b/rbi/lithic/models/claim_document_rejected_webhook_event.rbi new file mode 100644 index 00000000..f1708540 --- /dev/null +++ b/rbi/lithic/models/claim_document_rejected_webhook_event.rbi @@ -0,0 +1,315 @@ +# typed: strong + +module Lithic + module Models + class ClaimDocumentRejectedWebhookEvent < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::ClaimDocumentRejectedWebhookEvent, + Lithic::Internal::AnyHash + ) + end + + # Unique identifier for the document, in UUID format + sig { returns(String) } + attr_accessor :token + + # When the document was created + sig { returns(Time) } + attr_accessor :created + + # Presigned URL for downloading the uploaded document. Available once the document + # is being validated or has been accepted (`VALIDATING` or `ACCEPTED`) + sig { returns(T.nilable(String)) } + attr_accessor :download_url + + # When the download URL expires + sig { returns(T.nilable(Time)) } + attr_accessor :download_url_expires_at + + # The type of event that occurred. + sig { returns(Symbol) } + attr_accessor :event_type + + # Reason the document failed validation. Null unless `status` is `REJECTED` + sig do + returns( + T.nilable( + Lithic::ClaimDocumentRejectedWebhookEvent::FailureReason::TaggedSymbol + ) + ) + end + attr_accessor :failure_reason + + # Name provided when the upload intent was created + sig { returns(String) } + attr_accessor :name + + # Identifier of the document requirement this document satisfies. Null for + # supplemental documents not tied to a specific requirement + sig { returns(T.nilable(String)) } + attr_accessor :requirement_id + + # Current validation status of the document + sig do + returns(Lithic::ClaimDocumentRejectedWebhookEvent::Status::TaggedSymbol) + end + attr_accessor :status + + # When the document was last updated + sig { returns(Time) } + attr_accessor :updated + + # Constraints that an uploaded file must satisfy. + sig do + returns( + T.nilable( + Lithic::ClaimDocumentRejectedWebhookEvent::UploadConstraints + ) + ) + end + attr_reader :upload_constraints + + sig do + params( + upload_constraints: + T.nilable( + Lithic::ClaimDocumentRejectedWebhookEvent::UploadConstraints::OrHash + ) + ).void + end + attr_writer :upload_constraints + + # Presigned URL for uploading the file via HTTP PUT. Null after the upload window + # expires or after the document has been validated + sig { returns(T.nilable(String)) } + attr_accessor :upload_url + + # When the upload URL expires + sig { returns(T.nilable(Time)) } + attr_accessor :upload_url_expires_at + + sig do + params( + token: String, + created: Time, + download_url: T.nilable(String), + download_url_expires_at: T.nilable(Time), + failure_reason: + T.nilable( + Lithic::ClaimDocumentRejectedWebhookEvent::FailureReason::OrSymbol + ), + name: String, + requirement_id: T.nilable(String), + status: Lithic::ClaimDocumentRejectedWebhookEvent::Status::OrSymbol, + updated: Time, + upload_constraints: + T.nilable( + Lithic::ClaimDocumentRejectedWebhookEvent::UploadConstraints::OrHash + ), + upload_url: T.nilable(String), + upload_url_expires_at: T.nilable(Time), + event_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # Unique identifier for the document, in UUID format + token:, + # When the document was created + created:, + # Presigned URL for downloading the uploaded document. Available once the document + # is being validated or has been accepted (`VALIDATING` or `ACCEPTED`) + download_url:, + # When the download URL expires + download_url_expires_at:, + # Reason the document failed validation. Null unless `status` is `REJECTED` + failure_reason:, + # Name provided when the upload intent was created + name:, + # Identifier of the document requirement this document satisfies. Null for + # supplemental documents not tied to a specific requirement + requirement_id:, + # Current validation status of the document + status:, + # When the document was last updated + updated:, + # Constraints that an uploaded file must satisfy. + upload_constraints:, + # Presigned URL for uploading the file via HTTP PUT. Null after the upload window + # expires or after the document has been validated + upload_url:, + # When the upload URL expires + upload_url_expires_at:, + # The type of event that occurred. + event_type: :"claim_document.rejected" + ) + end + + sig do + override.returns( + { + token: String, + created: Time, + download_url: T.nilable(String), + download_url_expires_at: T.nilable(Time), + event_type: Symbol, + failure_reason: + T.nilable( + Lithic::ClaimDocumentRejectedWebhookEvent::FailureReason::TaggedSymbol + ), + name: String, + requirement_id: T.nilable(String), + status: + Lithic::ClaimDocumentRejectedWebhookEvent::Status::TaggedSymbol, + updated: Time, + upload_constraints: + T.nilable( + Lithic::ClaimDocumentRejectedWebhookEvent::UploadConstraints + ), + upload_url: T.nilable(String), + upload_url_expires_at: T.nilable(Time) + } + ) + end + def to_hash + end + + # Reason the document failed validation. Null unless `status` is `REJECTED` + module FailureReason + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::ClaimDocumentRejectedWebhookEvent::FailureReason + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + INVALID_MIME_TYPE = + T.let( + :INVALID_MIME_TYPE, + Lithic::ClaimDocumentRejectedWebhookEvent::FailureReason::TaggedSymbol + ) + FILE_TOO_LARGE = + T.let( + :FILE_TOO_LARGE, + Lithic::ClaimDocumentRejectedWebhookEvent::FailureReason::TaggedSymbol + ) + FILE_EMPTY = + T.let( + :FILE_EMPTY, + Lithic::ClaimDocumentRejectedWebhookEvent::FailureReason::TaggedSymbol + ) + CORRUPT_FILE = + T.let( + :CORRUPT_FILE, + Lithic::ClaimDocumentRejectedWebhookEvent::FailureReason::TaggedSymbol + ) + OTHER = + T.let( + :OTHER, + Lithic::ClaimDocumentRejectedWebhookEvent::FailureReason::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::ClaimDocumentRejectedWebhookEvent::FailureReason::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Current validation status of the document + module Status + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::ClaimDocumentRejectedWebhookEvent::Status) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PENDING = + T.let( + :PENDING, + Lithic::ClaimDocumentRejectedWebhookEvent::Status::TaggedSymbol + ) + VALIDATING = + T.let( + :VALIDATING, + Lithic::ClaimDocumentRejectedWebhookEvent::Status::TaggedSymbol + ) + ACCEPTED = + T.let( + :ACCEPTED, + Lithic::ClaimDocumentRejectedWebhookEvent::Status::TaggedSymbol + ) + REJECTED = + T.let( + :REJECTED, + Lithic::ClaimDocumentRejectedWebhookEvent::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::ClaimDocumentRejectedWebhookEvent::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + + class UploadConstraints < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::ClaimDocumentRejectedWebhookEvent::UploadConstraints, + Lithic::Internal::AnyHash + ) + end + + # MIME types accepted for upload + sig { returns(T::Array[String]) } + attr_accessor :accepted_mime_types + + # Maximum file size in bytes. Null if there is no enforced size limit + sig { returns(T.nilable(Integer)) } + attr_accessor :max_size_bytes + + # Constraints that an uploaded file must satisfy. + sig do + params( + accepted_mime_types: T::Array[String], + max_size_bytes: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # MIME types accepted for upload + accepted_mime_types:, + # Maximum file size in bytes. Null if there is no enforced size limit + max_size_bytes: + ) + end + + sig do + override.returns( + { + accepted_mime_types: T::Array[String], + max_size_bytes: T.nilable(Integer) + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/lithic/models/claim_document_uploaded_webhook_event.rbi b/rbi/lithic/models/claim_document_uploaded_webhook_event.rbi new file mode 100644 index 00000000..aecdab1b --- /dev/null +++ b/rbi/lithic/models/claim_document_uploaded_webhook_event.rbi @@ -0,0 +1,315 @@ +# typed: strong + +module Lithic + module Models + class ClaimDocumentUploadedWebhookEvent < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::ClaimDocumentUploadedWebhookEvent, + Lithic::Internal::AnyHash + ) + end + + # Unique identifier for the document, in UUID format + sig { returns(String) } + attr_accessor :token + + # When the document was created + sig { returns(Time) } + attr_accessor :created + + # Presigned URL for downloading the uploaded document. Available once the document + # is being validated or has been accepted (`VALIDATING` or `ACCEPTED`) + sig { returns(T.nilable(String)) } + attr_accessor :download_url + + # When the download URL expires + sig { returns(T.nilable(Time)) } + attr_accessor :download_url_expires_at + + # The type of event that occurred. + sig { returns(Symbol) } + attr_accessor :event_type + + # Reason the document failed validation. Null unless `status` is `REJECTED` + sig do + returns( + T.nilable( + Lithic::ClaimDocumentUploadedWebhookEvent::FailureReason::TaggedSymbol + ) + ) + end + attr_accessor :failure_reason + + # Name provided when the upload intent was created + sig { returns(String) } + attr_accessor :name + + # Identifier of the document requirement this document satisfies. Null for + # supplemental documents not tied to a specific requirement + sig { returns(T.nilable(String)) } + attr_accessor :requirement_id + + # Current validation status of the document + sig do + returns(Lithic::ClaimDocumentUploadedWebhookEvent::Status::TaggedSymbol) + end + attr_accessor :status + + # When the document was last updated + sig { returns(Time) } + attr_accessor :updated + + # Constraints that an uploaded file must satisfy. + sig do + returns( + T.nilable( + Lithic::ClaimDocumentUploadedWebhookEvent::UploadConstraints + ) + ) + end + attr_reader :upload_constraints + + sig do + params( + upload_constraints: + T.nilable( + Lithic::ClaimDocumentUploadedWebhookEvent::UploadConstraints::OrHash + ) + ).void + end + attr_writer :upload_constraints + + # Presigned URL for uploading the file via HTTP PUT. Null after the upload window + # expires or after the document has been validated + sig { returns(T.nilable(String)) } + attr_accessor :upload_url + + # When the upload URL expires + sig { returns(T.nilable(Time)) } + attr_accessor :upload_url_expires_at + + sig do + params( + token: String, + created: Time, + download_url: T.nilable(String), + download_url_expires_at: T.nilable(Time), + failure_reason: + T.nilable( + Lithic::ClaimDocumentUploadedWebhookEvent::FailureReason::OrSymbol + ), + name: String, + requirement_id: T.nilable(String), + status: Lithic::ClaimDocumentUploadedWebhookEvent::Status::OrSymbol, + updated: Time, + upload_constraints: + T.nilable( + Lithic::ClaimDocumentUploadedWebhookEvent::UploadConstraints::OrHash + ), + upload_url: T.nilable(String), + upload_url_expires_at: T.nilable(Time), + event_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # Unique identifier for the document, in UUID format + token:, + # When the document was created + created:, + # Presigned URL for downloading the uploaded document. Available once the document + # is being validated or has been accepted (`VALIDATING` or `ACCEPTED`) + download_url:, + # When the download URL expires + download_url_expires_at:, + # Reason the document failed validation. Null unless `status` is `REJECTED` + failure_reason:, + # Name provided when the upload intent was created + name:, + # Identifier of the document requirement this document satisfies. Null for + # supplemental documents not tied to a specific requirement + requirement_id:, + # Current validation status of the document + status:, + # When the document was last updated + updated:, + # Constraints that an uploaded file must satisfy. + upload_constraints:, + # Presigned URL for uploading the file via HTTP PUT. Null after the upload window + # expires or after the document has been validated + upload_url:, + # When the upload URL expires + upload_url_expires_at:, + # The type of event that occurred. + event_type: :"claim_document.uploaded" + ) + end + + sig do + override.returns( + { + token: String, + created: Time, + download_url: T.nilable(String), + download_url_expires_at: T.nilable(Time), + event_type: Symbol, + failure_reason: + T.nilable( + Lithic::ClaimDocumentUploadedWebhookEvent::FailureReason::TaggedSymbol + ), + name: String, + requirement_id: T.nilable(String), + status: + Lithic::ClaimDocumentUploadedWebhookEvent::Status::TaggedSymbol, + updated: Time, + upload_constraints: + T.nilable( + Lithic::ClaimDocumentUploadedWebhookEvent::UploadConstraints + ), + upload_url: T.nilable(String), + upload_url_expires_at: T.nilable(Time) + } + ) + end + def to_hash + end + + # Reason the document failed validation. Null unless `status` is `REJECTED` + module FailureReason + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::ClaimDocumentUploadedWebhookEvent::FailureReason + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + INVALID_MIME_TYPE = + T.let( + :INVALID_MIME_TYPE, + Lithic::ClaimDocumentUploadedWebhookEvent::FailureReason::TaggedSymbol + ) + FILE_TOO_LARGE = + T.let( + :FILE_TOO_LARGE, + Lithic::ClaimDocumentUploadedWebhookEvent::FailureReason::TaggedSymbol + ) + FILE_EMPTY = + T.let( + :FILE_EMPTY, + Lithic::ClaimDocumentUploadedWebhookEvent::FailureReason::TaggedSymbol + ) + CORRUPT_FILE = + T.let( + :CORRUPT_FILE, + Lithic::ClaimDocumentUploadedWebhookEvent::FailureReason::TaggedSymbol + ) + OTHER = + T.let( + :OTHER, + Lithic::ClaimDocumentUploadedWebhookEvent::FailureReason::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::ClaimDocumentUploadedWebhookEvent::FailureReason::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Current validation status of the document + module Status + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::ClaimDocumentUploadedWebhookEvent::Status) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PENDING = + T.let( + :PENDING, + Lithic::ClaimDocumentUploadedWebhookEvent::Status::TaggedSymbol + ) + VALIDATING = + T.let( + :VALIDATING, + Lithic::ClaimDocumentUploadedWebhookEvent::Status::TaggedSymbol + ) + ACCEPTED = + T.let( + :ACCEPTED, + Lithic::ClaimDocumentUploadedWebhookEvent::Status::TaggedSymbol + ) + REJECTED = + T.let( + :REJECTED, + Lithic::ClaimDocumentUploadedWebhookEvent::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::ClaimDocumentUploadedWebhookEvent::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + + class UploadConstraints < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::ClaimDocumentUploadedWebhookEvent::UploadConstraints, + Lithic::Internal::AnyHash + ) + end + + # MIME types accepted for upload + sig { returns(T::Array[String]) } + attr_accessor :accepted_mime_types + + # Maximum file size in bytes. Null if there is no enforced size limit + sig { returns(T.nilable(Integer)) } + attr_accessor :max_size_bytes + + # Constraints that an uploaded file must satisfy. + sig do + params( + accepted_mime_types: T::Array[String], + max_size_bytes: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # MIME types accepted for upload + accepted_mime_types:, + # Maximum file size in bytes. Null if there is no enforced size limit + max_size_bytes: + ) + end + + sig do + override.returns( + { + accepted_mime_types: T::Array[String], + max_size_bytes: T.nilable(Integer) + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/lithic/models/claim_updated_webhook_event.rbi b/rbi/lithic/models/claim_updated_webhook_event.rbi new file mode 100644 index 00000000..2cf12342 --- /dev/null +++ b/rbi/lithic/models/claim_updated_webhook_event.rbi @@ -0,0 +1,386 @@ +# typed: strong + +module Lithic + module Models + class ClaimUpdatedWebhookEvent < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(Lithic::ClaimUpdatedWebhookEvent, Lithic::Internal::AnyHash) + end + + # Unique identifier for the claim, in UUID format + sig { returns(String) } + attr_accessor :token + + # Token for the account holder that filed the claim + sig { returns(T.nilable(String)) } + attr_accessor :account_holder_token + + # Token for the account associated with the claim + sig { returns(T.nilable(String)) } + attr_accessor :account_token + + # Tokens for the cards associated with the disputed transactions + sig { returns(T::Array[String]) } + attr_accessor :card_tokens + + # When the claim was created + sig { returns(Time) } + attr_accessor :created + + # Transactions included in this claim + sig do + returns(T::Array[Lithic::ClaimUpdatedWebhookEvent::DisputedTransaction]) + end + attr_accessor :disputed_transactions + + # The type of event that occurred. + sig { returns(Symbol) } + attr_accessor :event_type + + # Requirements that must be fulfilled before the claim can be submitted + sig do + returns( + T::Array[ + Lithic::ClaimUpdatedWebhookEvent::OutstandingRequirement::TaggedSymbol + ] + ) + end + attr_accessor :outstanding_requirements + + # Dispute reason code provided when creating the claim + sig { returns(Lithic::ClaimUpdatedWebhookEvent::Reason::TaggedSymbol) } + attr_accessor :reason + + # Current lifecycle status of the claim + sig { returns(Lithic::ClaimUpdatedWebhookEvent::Status::TaggedSymbol) } + attr_accessor :status + + # When the claim was submitted. Null until the claim reaches `SUBMITTED` status + sig { returns(T.nilable(Time)) } + attr_accessor :submitted + + # When the claim was last updated + sig { returns(Time) } + attr_accessor :updated + + sig do + params( + token: String, + account_holder_token: T.nilable(String), + account_token: T.nilable(String), + card_tokens: T::Array[String], + created: Time, + disputed_transactions: + T::Array[ + Lithic::ClaimUpdatedWebhookEvent::DisputedTransaction::OrHash + ], + outstanding_requirements: + T::Array[ + Lithic::ClaimUpdatedWebhookEvent::OutstandingRequirement::OrSymbol + ], + reason: Lithic::ClaimUpdatedWebhookEvent::Reason::OrSymbol, + status: Lithic::ClaimUpdatedWebhookEvent::Status::OrSymbol, + submitted: T.nilable(Time), + updated: Time, + event_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # Unique identifier for the claim, in UUID format + token:, + # Token for the account holder that filed the claim + account_holder_token:, + # Token for the account associated with the claim + account_token:, + # Tokens for the cards associated with the disputed transactions + card_tokens:, + # When the claim was created + created:, + # Transactions included in this claim + disputed_transactions:, + # Requirements that must be fulfilled before the claim can be submitted + outstanding_requirements:, + # Dispute reason code provided when creating the claim + reason:, + # Current lifecycle status of the claim + status:, + # When the claim was submitted. Null until the claim reaches `SUBMITTED` status + submitted:, + # When the claim was last updated + updated:, + # The type of event that occurred. + event_type: :"claim.updated" + ) + end + + sig do + override.returns( + { + token: String, + account_holder_token: T.nilable(String), + account_token: T.nilable(String), + card_tokens: T::Array[String], + created: Time, + disputed_transactions: + T::Array[Lithic::ClaimUpdatedWebhookEvent::DisputedTransaction], + event_type: Symbol, + outstanding_requirements: + T::Array[ + Lithic::ClaimUpdatedWebhookEvent::OutstandingRequirement::TaggedSymbol + ], + reason: Lithic::ClaimUpdatedWebhookEvent::Reason::TaggedSymbol, + status: Lithic::ClaimUpdatedWebhookEvent::Status::TaggedSymbol, + submitted: T.nilable(Time), + updated: Time + } + ) + end + def to_hash + end + + class DisputedTransaction < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::ClaimUpdatedWebhookEvent::DisputedTransaction, + Lithic::Internal::AnyHash + ) + end + + # Tokens for the specific events within the transaction being disputed. Lithic + # creates one dispute per event token + sig { returns(T::Array[String]) } + attr_accessor :event_tokens + + # Token for the transaction being disputed, in UUID format + sig { returns(String) } + attr_accessor :transaction_token + + # A transaction included in a claim, along with the specific events being + # disputed. + sig do + params( + event_tokens: T::Array[String], + transaction_token: String + ).returns(T.attached_class) + end + def self.new( + # Tokens for the specific events within the transaction being disputed. Lithic + # creates one dispute per event token + event_tokens:, + # Token for the transaction being disputed, in UUID format + transaction_token: + ) + end + + sig do + override.returns( + { event_tokens: T::Array[String], transaction_token: String } + ) + end + def to_hash + end + end + + module OutstandingRequirement + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::ClaimUpdatedWebhookEvent::OutstandingRequirement + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + QUESTIONNAIRE = + T.let( + :QUESTIONNAIRE, + Lithic::ClaimUpdatedWebhookEvent::OutstandingRequirement::TaggedSymbol + ) + DOCUMENTS = + T.let( + :DOCUMENTS, + Lithic::ClaimUpdatedWebhookEvent::OutstandingRequirement::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::ClaimUpdatedWebhookEvent::OutstandingRequirement::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Dispute reason code provided when creating the claim + module Reason + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::ClaimUpdatedWebhookEvent::Reason) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CARD_NOT_PRESENT = + T.let( + :CARD_NOT_PRESENT, + Lithic::ClaimUpdatedWebhookEvent::Reason::TaggedSymbol + ) + CARD_LOST = + T.let( + :CARD_LOST, + Lithic::ClaimUpdatedWebhookEvent::Reason::TaggedSymbol + ) + CARD_STOLEN = + T.let( + :CARD_STOLEN, + Lithic::ClaimUpdatedWebhookEvent::Reason::TaggedSymbol + ) + CARD_NEVER_RECEIVED = + T.let( + :CARD_NEVER_RECEIVED, + Lithic::ClaimUpdatedWebhookEvent::Reason::TaggedSymbol + ) + COUNTERFEIT = + T.let( + :COUNTERFEIT, + Lithic::ClaimUpdatedWebhookEvent::Reason::TaggedSymbol + ) + ACCOUNT_TAKEOVER = + T.let( + :ACCOUNT_TAKEOVER, + Lithic::ClaimUpdatedWebhookEvent::Reason::TaggedSymbol + ) + PRODUCT_NOT_RECEIVED = + T.let( + :PRODUCT_NOT_RECEIVED, + Lithic::ClaimUpdatedWebhookEvent::Reason::TaggedSymbol + ) + NOT_AS_DESCRIBED = + T.let( + :NOT_AS_DESCRIBED, + Lithic::ClaimUpdatedWebhookEvent::Reason::TaggedSymbol + ) + CREDIT_NOT_PROCESSED = + T.let( + :CREDIT_NOT_PROCESSED, + Lithic::ClaimUpdatedWebhookEvent::Reason::TaggedSymbol + ) + CANCELLED_RECURRING = + T.let( + :CANCELLED_RECURRING, + Lithic::ClaimUpdatedWebhookEvent::Reason::TaggedSymbol + ) + PAID_BY_OTHER_MEANS = + T.let( + :PAID_BY_OTHER_MEANS, + Lithic::ClaimUpdatedWebhookEvent::Reason::TaggedSymbol + ) + DUPLICATE_CHARGE = + T.let( + :DUPLICATE_CHARGE, + Lithic::ClaimUpdatedWebhookEvent::Reason::TaggedSymbol + ) + LATE_PRESENTMENT = + T.let( + :LATE_PRESENTMENT, + Lithic::ClaimUpdatedWebhookEvent::Reason::TaggedSymbol + ) + INCORRECT_TRANSACTION_CODE = + T.let( + :INCORRECT_TRANSACTION_CODE, + Lithic::ClaimUpdatedWebhookEvent::Reason::TaggedSymbol + ) + NO_AUTHORIZATION = + T.let( + :NO_AUTHORIZATION, + Lithic::ClaimUpdatedWebhookEvent::Reason::TaggedSymbol + ) + DECLINED = + T.let( + :DECLINED, + Lithic::ClaimUpdatedWebhookEvent::Reason::TaggedSymbol + ) + INCORRECT_AMOUNT = + T.let( + :INCORRECT_AMOUNT, + Lithic::ClaimUpdatedWebhookEvent::Reason::TaggedSymbol + ) + ATM_CASH_NOT_DISPENSED = + T.let( + :ATM_CASH_NOT_DISPENSED, + Lithic::ClaimUpdatedWebhookEvent::Reason::TaggedSymbol + ) + ATM_DEPOSIT_WRONG_AMOUNT = + T.let( + :ATM_DEPOSIT_WRONG_AMOUNT, + Lithic::ClaimUpdatedWebhookEvent::Reason::TaggedSymbol + ) + ATM_DEPOSIT_MISSING = + T.let( + :ATM_DEPOSIT_MISSING, + Lithic::ClaimUpdatedWebhookEvent::Reason::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Lithic::ClaimUpdatedWebhookEvent::Reason::TaggedSymbol] + ) + end + def self.values + end + end + + # Current lifecycle status of the claim + module Status + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::ClaimUpdatedWebhookEvent::Status) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + INITIALIZING = + T.let( + :INITIALIZING, + Lithic::ClaimUpdatedWebhookEvent::Status::TaggedSymbol + ) + AWAITING_INFO = + T.let( + :AWAITING_INFO, + Lithic::ClaimUpdatedWebhookEvent::Status::TaggedSymbol + ) + SUBMITTED = + T.let( + :SUBMITTED, + Lithic::ClaimUpdatedWebhookEvent::Status::TaggedSymbol + ) + RESOLVED = + T.let( + :RESOLVED, + Lithic::ClaimUpdatedWebhookEvent::Status::TaggedSymbol + ) + ABANDONED = + T.let( + :ABANDONED, + Lithic::ClaimUpdatedWebhookEvent::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Lithic::ClaimUpdatedWebhookEvent::Status::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/lithic/models/event.rbi b/rbi/lithic/models/event.rbi index c203e23a..f7fa3974 100644 --- a/rbi/lithic/models/event.rbi +++ b/rbi/lithic/models/event.rbi @@ -47,6 +47,15 @@ module Lithic # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. # - card.updated: Occurs when a card is updated. + # - claim_document.accepted: Occurs when a claim document passes validation and is + # accepted. + # - claim_document.rejected: Occurs when a claim document fails validation and is + # rejected. + # - claim_document.uploaded: Occurs when a claim document is uploaded and begins + # validation. + # - claim.created: Occurs when a dispute intake claim is created. + # - claim.updated: Occurs when a dispute intake claim is updated, such as a status + # change or a change to its outstanding requirements. # - digital_wallet.tokenization_result: Occurs when a tokenization request # succeeded or failed. # @@ -173,6 +182,15 @@ module Lithic # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. # - card.updated: Occurs when a card is updated. + # - claim_document.accepted: Occurs when a claim document passes validation and is + # accepted. + # - claim_document.rejected: Occurs when a claim document fails validation and is + # rejected. + # - claim_document.uploaded: Occurs when a claim document is uploaded and begins + # validation. + # - claim.created: Occurs when a dispute intake claim is created. + # - claim.updated: Occurs when a dispute intake claim is updated, such as a status + # change or a change to its outstanding requirements. # - digital_wallet.tokenization_result: Occurs when a tokenization request # succeeded or failed. # @@ -295,6 +313,15 @@ module Lithic # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. # - card.updated: Occurs when a card is updated. + # - claim_document.accepted: Occurs when a claim document passes validation and is + # accepted. + # - claim_document.rejected: Occurs when a claim document fails validation and is + # rejected. + # - claim_document.uploaded: Occurs when a claim document is uploaded and begins + # validation. + # - claim.created: Occurs when a dispute intake claim is created. + # - claim.updated: Occurs when a dispute intake claim is updated, such as a status + # change or a change to its outstanding requirements. # - digital_wallet.tokenization_result: Occurs when a tokenization request # succeeded or failed. # @@ -447,6 +474,25 @@ module Lithic T.let(:"card.shipped", Lithic::Event::EventType::TaggedSymbol) CARD_UPDATED = T.let(:"card.updated", Lithic::Event::EventType::TaggedSymbol) + CLAIM_DOCUMENT_ACCEPTED = + T.let( + :"claim_document.accepted", + Lithic::Event::EventType::TaggedSymbol + ) + CLAIM_DOCUMENT_REJECTED = + T.let( + :"claim_document.rejected", + Lithic::Event::EventType::TaggedSymbol + ) + CLAIM_DOCUMENT_UPLOADED = + T.let( + :"claim_document.uploaded", + Lithic::Event::EventType::TaggedSymbol + ) + CLAIM_CREATED = + T.let(:"claim.created", Lithic::Event::EventType::TaggedSymbol) + CLAIM_UPDATED = + T.let(:"claim.updated", Lithic::Event::EventType::TaggedSymbol) DIGITAL_WALLET_TOKENIZATION_RESULT = T.let( :"digital_wallet.tokenization_result", diff --git a/rbi/lithic/models/event_list_params.rbi b/rbi/lithic/models/event_list_params.rbi index 17c89e05..de6e6516 100644 --- a/rbi/lithic/models/event_list_params.rbi +++ b/rbi/lithic/models/event_list_params.rbi @@ -156,6 +156,15 @@ module Lithic # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. # - card.updated: Occurs when a card is updated. + # - claim_document.accepted: Occurs when a claim document passes validation and is + # accepted. + # - claim_document.rejected: Occurs when a claim document fails validation and is + # rejected. + # - claim_document.uploaded: Occurs when a claim document is uploaded and begins + # validation. + # - claim.created: Occurs when a dispute intake claim is created. + # - claim.updated: Occurs when a dispute intake claim is updated, such as a status + # change or a change to its outstanding requirements. # - digital_wallet.tokenization_result: Occurs when a tokenization request # succeeded or failed. # @@ -330,6 +339,31 @@ module Lithic :"card.updated", Lithic::EventListParams::EventType::TaggedSymbol ) + CLAIM_DOCUMENT_ACCEPTED = + T.let( + :"claim_document.accepted", + Lithic::EventListParams::EventType::TaggedSymbol + ) + CLAIM_DOCUMENT_REJECTED = + T.let( + :"claim_document.rejected", + Lithic::EventListParams::EventType::TaggedSymbol + ) + CLAIM_DOCUMENT_UPLOADED = + T.let( + :"claim_document.uploaded", + Lithic::EventListParams::EventType::TaggedSymbol + ) + CLAIM_CREATED = + T.let( + :"claim.created", + Lithic::EventListParams::EventType::TaggedSymbol + ) + CLAIM_UPDATED = + T.let( + :"claim.updated", + Lithic::EventListParams::EventType::TaggedSymbol + ) DIGITAL_WALLET_TOKENIZATION_RESULT = T.let( :"digital_wallet.tokenization_result", diff --git a/rbi/lithic/models/event_subscription.rbi b/rbi/lithic/models/event_subscription.rbi index dd729079..266af7b7 100644 --- a/rbi/lithic/models/event_subscription.rbi +++ b/rbi/lithic/models/event_subscription.rbi @@ -104,6 +104,15 @@ module Lithic # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. # - card.updated: Occurs when a card is updated. + # - claim_document.accepted: Occurs when a claim document passes validation and is + # accepted. + # - claim_document.rejected: Occurs when a claim document fails validation and is + # rejected. + # - claim_document.uploaded: Occurs when a claim document is uploaded and begins + # validation. + # - claim.created: Occurs when a dispute intake claim is created. + # - claim.updated: Occurs when a dispute intake claim is updated, such as a status + # change or a change to its outstanding requirements. # - digital_wallet.tokenization_result: Occurs when a tokenization request # succeeded or failed. # @@ -278,6 +287,31 @@ module Lithic :"card.updated", Lithic::EventSubscription::EventType::TaggedSymbol ) + CLAIM_DOCUMENT_ACCEPTED = + T.let( + :"claim_document.accepted", + Lithic::EventSubscription::EventType::TaggedSymbol + ) + CLAIM_DOCUMENT_REJECTED = + T.let( + :"claim_document.rejected", + Lithic::EventSubscription::EventType::TaggedSymbol + ) + CLAIM_DOCUMENT_UPLOADED = + T.let( + :"claim_document.uploaded", + Lithic::EventSubscription::EventType::TaggedSymbol + ) + CLAIM_CREATED = + T.let( + :"claim.created", + Lithic::EventSubscription::EventType::TaggedSymbol + ) + CLAIM_UPDATED = + T.let( + :"claim.updated", + Lithic::EventSubscription::EventType::TaggedSymbol + ) DIGITAL_WALLET_TOKENIZATION_RESULT = T.let( :"digital_wallet.tokenization_result", diff --git a/rbi/lithic/models/events/subscription_create_params.rbi b/rbi/lithic/models/events/subscription_create_params.rbi index c5c4510b..d52e03b3 100644 --- a/rbi/lithic/models/events/subscription_create_params.rbi +++ b/rbi/lithic/models/events/subscription_create_params.rbi @@ -131,6 +131,15 @@ module Lithic # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. # - card.updated: Occurs when a card is updated. + # - claim_document.accepted: Occurs when a claim document passes validation and is + # accepted. + # - claim_document.rejected: Occurs when a claim document fails validation and is + # rejected. + # - claim_document.uploaded: Occurs when a claim document is uploaded and begins + # validation. + # - claim.created: Occurs when a dispute intake claim is created. + # - claim.updated: Occurs when a dispute intake claim is updated, such as a status + # change or a change to its outstanding requirements. # - digital_wallet.tokenization_result: Occurs when a tokenization request # succeeded or failed. # @@ -307,6 +316,31 @@ module Lithic :"card.updated", Lithic::Events::SubscriptionCreateParams::EventType::TaggedSymbol ) + CLAIM_DOCUMENT_ACCEPTED = + T.let( + :"claim_document.accepted", + Lithic::Events::SubscriptionCreateParams::EventType::TaggedSymbol + ) + CLAIM_DOCUMENT_REJECTED = + T.let( + :"claim_document.rejected", + Lithic::Events::SubscriptionCreateParams::EventType::TaggedSymbol + ) + CLAIM_DOCUMENT_UPLOADED = + T.let( + :"claim_document.uploaded", + Lithic::Events::SubscriptionCreateParams::EventType::TaggedSymbol + ) + CLAIM_CREATED = + T.let( + :"claim.created", + Lithic::Events::SubscriptionCreateParams::EventType::TaggedSymbol + ) + CLAIM_UPDATED = + T.let( + :"claim.updated", + Lithic::Events::SubscriptionCreateParams::EventType::TaggedSymbol + ) DIGITAL_WALLET_TOKENIZATION_RESULT = T.let( :"digital_wallet.tokenization_result", diff --git a/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi b/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi index d7968cfa..bf3bef6d 100644 --- a/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +++ b/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi @@ -173,6 +173,31 @@ module Lithic :"card.updated", Lithic::Events::SubscriptionSendSimulatedExampleParams::EventType::TaggedSymbol ) + CLAIM_DOCUMENT_ACCEPTED = + T.let( + :"claim_document.accepted", + Lithic::Events::SubscriptionSendSimulatedExampleParams::EventType::TaggedSymbol + ) + CLAIM_DOCUMENT_REJECTED = + T.let( + :"claim_document.rejected", + Lithic::Events::SubscriptionSendSimulatedExampleParams::EventType::TaggedSymbol + ) + CLAIM_DOCUMENT_UPLOADED = + T.let( + :"claim_document.uploaded", + Lithic::Events::SubscriptionSendSimulatedExampleParams::EventType::TaggedSymbol + ) + CLAIM_CREATED = + T.let( + :"claim.created", + Lithic::Events::SubscriptionSendSimulatedExampleParams::EventType::TaggedSymbol + ) + CLAIM_UPDATED = + T.let( + :"claim.updated", + Lithic::Events::SubscriptionSendSimulatedExampleParams::EventType::TaggedSymbol + ) DIGITAL_WALLET_TOKENIZATION_RESULT = T.let( :"digital_wallet.tokenization_result", diff --git a/rbi/lithic/models/events/subscription_update_params.rbi b/rbi/lithic/models/events/subscription_update_params.rbi index f978ae67..4b283d59 100644 --- a/rbi/lithic/models/events/subscription_update_params.rbi +++ b/rbi/lithic/models/events/subscription_update_params.rbi @@ -137,6 +137,15 @@ module Lithic # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. # - card.updated: Occurs when a card is updated. + # - claim_document.accepted: Occurs when a claim document passes validation and is + # accepted. + # - claim_document.rejected: Occurs when a claim document fails validation and is + # rejected. + # - claim_document.uploaded: Occurs when a claim document is uploaded and begins + # validation. + # - claim.created: Occurs when a dispute intake claim is created. + # - claim.updated: Occurs when a dispute intake claim is updated, such as a status + # change or a change to its outstanding requirements. # - digital_wallet.tokenization_result: Occurs when a tokenization request # succeeded or failed. # @@ -313,6 +322,31 @@ module Lithic :"card.updated", Lithic::Events::SubscriptionUpdateParams::EventType::TaggedSymbol ) + CLAIM_DOCUMENT_ACCEPTED = + T.let( + :"claim_document.accepted", + Lithic::Events::SubscriptionUpdateParams::EventType::TaggedSymbol + ) + CLAIM_DOCUMENT_REJECTED = + T.let( + :"claim_document.rejected", + Lithic::Events::SubscriptionUpdateParams::EventType::TaggedSymbol + ) + CLAIM_DOCUMENT_UPLOADED = + T.let( + :"claim_document.uploaded", + Lithic::Events::SubscriptionUpdateParams::EventType::TaggedSymbol + ) + CLAIM_CREATED = + T.let( + :"claim.created", + Lithic::Events::SubscriptionUpdateParams::EventType::TaggedSymbol + ) + CLAIM_UPDATED = + T.let( + :"claim.updated", + Lithic::Events::SubscriptionUpdateParams::EventType::TaggedSymbol + ) DIGITAL_WALLET_TOKENIZATION_RESULT = T.let( :"digital_wallet.tokenization_result", diff --git a/rbi/lithic/models/parsed_webhook_event.rbi b/rbi/lithic/models/parsed_webhook_event.rbi index 907b25f3..a7a78543 100644 --- a/rbi/lithic/models/parsed_webhook_event.rbi +++ b/rbi/lithic/models/parsed_webhook_event.rbi @@ -31,6 +31,11 @@ module Lithic Lithic::CardTransactionUpdatedWebhookEvent, Lithic::CardTransactionEnhancedDataCreatedWebhookEvent, Lithic::CardTransactionEnhancedDataUpdatedWebhookEvent, + Lithic::ClaimCreatedWebhookEvent, + Lithic::ClaimUpdatedWebhookEvent, + Lithic::ClaimDocumentUploadedWebhookEvent, + Lithic::ClaimDocumentAcceptedWebhookEvent, + Lithic::ClaimDocumentRejectedWebhookEvent, Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent, Lithic::DigitalWalletTokenizationResultWebhookEvent, Lithic::DigitalWalletTokenizationTwoFactorAuthenticationCodeWebhookEvent, diff --git a/rbi/lithic/resources/webhooks.rbi b/rbi/lithic/resources/webhooks.rbi index e424b370..b0449734 100644 --- a/rbi/lithic/resources/webhooks.rbi +++ b/rbi/lithic/resources/webhooks.rbi @@ -32,6 +32,11 @@ module Lithic Lithic::CardTransactionUpdatedWebhookEvent, Lithic::CardTransactionEnhancedDataCreatedWebhookEvent, Lithic::CardTransactionEnhancedDataUpdatedWebhookEvent, + Lithic::ClaimCreatedWebhookEvent, + Lithic::ClaimUpdatedWebhookEvent, + Lithic::ClaimDocumentUploadedWebhookEvent, + Lithic::ClaimDocumentAcceptedWebhookEvent, + Lithic::ClaimDocumentRejectedWebhookEvent, Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent, Lithic::DigitalWalletTokenizationResultWebhookEvent, Lithic::DigitalWalletTokenizationTwoFactorAuthenticationCodeWebhookEvent, diff --git a/sig/lithic/models.rbs b/sig/lithic/models.rbs index d80ccd69..90535c76 100644 --- a/sig/lithic/models.rbs +++ b/sig/lithic/models.rbs @@ -169,6 +169,16 @@ module Lithic class CategoryDetails = Lithic::Models::CategoryDetails + class ClaimCreatedWebhookEvent = Lithic::Models::ClaimCreatedWebhookEvent + + class ClaimDocumentAcceptedWebhookEvent = Lithic::Models::ClaimDocumentAcceptedWebhookEvent + + class ClaimDocumentRejectedWebhookEvent = Lithic::Models::ClaimDocumentRejectedWebhookEvent + + class ClaimDocumentUploadedWebhookEvent = Lithic::Models::ClaimDocumentUploadedWebhookEvent + + class ClaimUpdatedWebhookEvent = Lithic::Models::ClaimUpdatedWebhookEvent + class ClientAPIStatusParams = Lithic::Models::ClientAPIStatusParams module CreditProducts = Lithic::Models::CreditProducts diff --git a/sig/lithic/models/claim_created_webhook_event.rbs b/sig/lithic/models/claim_created_webhook_event.rbs new file mode 100644 index 00000000..9d1b17f7 --- /dev/null +++ b/sig/lithic/models/claim_created_webhook_event.rbs @@ -0,0 +1,169 @@ +module Lithic + module Models + type claim_created_webhook_event = + { + token: String, + account_holder_token: String?, + account_token: String?, + card_tokens: ::Array[String], + created: Time, + disputed_transactions: ::Array[Lithic::ClaimCreatedWebhookEvent::DisputedTransaction], + event_type: :"claim.created", + outstanding_requirements: ::Array[Lithic::Models::ClaimCreatedWebhookEvent::outstanding_requirement], + reason: Lithic::Models::ClaimCreatedWebhookEvent::reason, + status: Lithic::Models::ClaimCreatedWebhookEvent::status, + submitted: Time?, + updated: Time + } + + class ClaimCreatedWebhookEvent < Lithic::Internal::Type::BaseModel + attr_accessor token: String + + attr_accessor account_holder_token: String? + + attr_accessor account_token: String? + + attr_accessor card_tokens: ::Array[String] + + attr_accessor created: Time + + attr_accessor disputed_transactions: ::Array[Lithic::ClaimCreatedWebhookEvent::DisputedTransaction] + + attr_accessor event_type: :"claim.created" + + attr_accessor outstanding_requirements: ::Array[Lithic::Models::ClaimCreatedWebhookEvent::outstanding_requirement] + + attr_accessor reason: Lithic::Models::ClaimCreatedWebhookEvent::reason + + attr_accessor status: Lithic::Models::ClaimCreatedWebhookEvent::status + + attr_accessor submitted: Time? + + attr_accessor updated: Time + + def initialize: ( + token: String, + account_holder_token: String?, + account_token: String?, + card_tokens: ::Array[String], + created: Time, + disputed_transactions: ::Array[Lithic::ClaimCreatedWebhookEvent::DisputedTransaction], + outstanding_requirements: ::Array[Lithic::Models::ClaimCreatedWebhookEvent::outstanding_requirement], + reason: Lithic::Models::ClaimCreatedWebhookEvent::reason, + status: Lithic::Models::ClaimCreatedWebhookEvent::status, + submitted: Time?, + updated: Time, + ?event_type: :"claim.created" + ) -> void + + def to_hash: -> { + token: String, + account_holder_token: String?, + account_token: String?, + card_tokens: ::Array[String], + created: Time, + disputed_transactions: ::Array[Lithic::ClaimCreatedWebhookEvent::DisputedTransaction], + event_type: :"claim.created", + outstanding_requirements: ::Array[Lithic::Models::ClaimCreatedWebhookEvent::outstanding_requirement], + reason: Lithic::Models::ClaimCreatedWebhookEvent::reason, + status: Lithic::Models::ClaimCreatedWebhookEvent::status, + submitted: Time?, + updated: Time + } + + type disputed_transaction = + { event_tokens: ::Array[String], transaction_token: String } + + class DisputedTransaction < Lithic::Internal::Type::BaseModel + attr_accessor event_tokens: ::Array[String] + + attr_accessor transaction_token: String + + def initialize: ( + event_tokens: ::Array[String], + transaction_token: String + ) -> void + + def to_hash: -> { + event_tokens: ::Array[String], + transaction_token: String + } + end + + type outstanding_requirement = :QUESTIONNAIRE | :DOCUMENTS + + module OutstandingRequirement + extend Lithic::Internal::Type::Enum + + QUESTIONNAIRE: :QUESTIONNAIRE + DOCUMENTS: :DOCUMENTS + + def self?.values: -> ::Array[Lithic::Models::ClaimCreatedWebhookEvent::outstanding_requirement] + end + + type reason = + :CARD_NOT_PRESENT + | :CARD_LOST + | :CARD_STOLEN + | :CARD_NEVER_RECEIVED + | :COUNTERFEIT + | :ACCOUNT_TAKEOVER + | :PRODUCT_NOT_RECEIVED + | :NOT_AS_DESCRIBED + | :CREDIT_NOT_PROCESSED + | :CANCELLED_RECURRING + | :PAID_BY_OTHER_MEANS + | :DUPLICATE_CHARGE + | :LATE_PRESENTMENT + | :INCORRECT_TRANSACTION_CODE + | :NO_AUTHORIZATION + | :DECLINED + | :INCORRECT_AMOUNT + | :ATM_CASH_NOT_DISPENSED + | :ATM_DEPOSIT_WRONG_AMOUNT + | :ATM_DEPOSIT_MISSING + + module Reason + extend Lithic::Internal::Type::Enum + + CARD_NOT_PRESENT: :CARD_NOT_PRESENT + CARD_LOST: :CARD_LOST + CARD_STOLEN: :CARD_STOLEN + CARD_NEVER_RECEIVED: :CARD_NEVER_RECEIVED + COUNTERFEIT: :COUNTERFEIT + ACCOUNT_TAKEOVER: :ACCOUNT_TAKEOVER + PRODUCT_NOT_RECEIVED: :PRODUCT_NOT_RECEIVED + NOT_AS_DESCRIBED: :NOT_AS_DESCRIBED + CREDIT_NOT_PROCESSED: :CREDIT_NOT_PROCESSED + CANCELLED_RECURRING: :CANCELLED_RECURRING + PAID_BY_OTHER_MEANS: :PAID_BY_OTHER_MEANS + DUPLICATE_CHARGE: :DUPLICATE_CHARGE + LATE_PRESENTMENT: :LATE_PRESENTMENT + INCORRECT_TRANSACTION_CODE: :INCORRECT_TRANSACTION_CODE + NO_AUTHORIZATION: :NO_AUTHORIZATION + DECLINED: :DECLINED + INCORRECT_AMOUNT: :INCORRECT_AMOUNT + ATM_CASH_NOT_DISPENSED: :ATM_CASH_NOT_DISPENSED + ATM_DEPOSIT_WRONG_AMOUNT: :ATM_DEPOSIT_WRONG_AMOUNT + ATM_DEPOSIT_MISSING: :ATM_DEPOSIT_MISSING + + def self?.values: -> ::Array[Lithic::Models::ClaimCreatedWebhookEvent::reason] + end + + type status = + :INITIALIZING | :AWAITING_INFO | :SUBMITTED | :RESOLVED | :ABANDONED + + module Status + extend Lithic::Internal::Type::Enum + + INITIALIZING: :INITIALIZING + AWAITING_INFO: :AWAITING_INFO + SUBMITTED: :SUBMITTED + RESOLVED: :RESOLVED + ABANDONED: :ABANDONED + + def self?.values: -> ::Array[Lithic::Models::ClaimCreatedWebhookEvent::status] + end + end + end +end diff --git a/sig/lithic/models/claim_document_accepted_webhook_event.rbs b/sig/lithic/models/claim_document_accepted_webhook_event.rbs new file mode 100644 index 00000000..11e40286 --- /dev/null +++ b/sig/lithic/models/claim_document_accepted_webhook_event.rbs @@ -0,0 +1,131 @@ +module Lithic + module Models + type claim_document_accepted_webhook_event = + { + token: String, + created: Time, + download_url: String?, + download_url_expires_at: Time?, + event_type: :"claim_document.accepted", + failure_reason: Lithic::Models::ClaimDocumentAcceptedWebhookEvent::failure_reason?, + name: String, + requirement_id: String?, + status: Lithic::Models::ClaimDocumentAcceptedWebhookEvent::status, + updated: Time, + upload_constraints: Lithic::ClaimDocumentAcceptedWebhookEvent::UploadConstraints?, + upload_url: String?, + upload_url_expires_at: Time? + } + + class ClaimDocumentAcceptedWebhookEvent < Lithic::Internal::Type::BaseModel + attr_accessor token: String + + attr_accessor created: Time + + attr_accessor download_url: String? + + attr_accessor download_url_expires_at: Time? + + attr_accessor event_type: :"claim_document.accepted" + + attr_accessor failure_reason: Lithic::Models::ClaimDocumentAcceptedWebhookEvent::failure_reason? + + attr_accessor name: String + + attr_accessor requirement_id: String? + + attr_accessor status: Lithic::Models::ClaimDocumentAcceptedWebhookEvent::status + + attr_accessor updated: Time + + attr_accessor upload_constraints: Lithic::ClaimDocumentAcceptedWebhookEvent::UploadConstraints? + + attr_accessor upload_url: String? + + attr_accessor upload_url_expires_at: Time? + + def initialize: ( + token: String, + created: Time, + download_url: String?, + download_url_expires_at: Time?, + failure_reason: Lithic::Models::ClaimDocumentAcceptedWebhookEvent::failure_reason?, + name: String, + requirement_id: String?, + status: Lithic::Models::ClaimDocumentAcceptedWebhookEvent::status, + updated: Time, + upload_constraints: Lithic::ClaimDocumentAcceptedWebhookEvent::UploadConstraints?, + upload_url: String?, + upload_url_expires_at: Time?, + ?event_type: :"claim_document.accepted" + ) -> void + + def to_hash: -> { + token: String, + created: Time, + download_url: String?, + download_url_expires_at: Time?, + event_type: :"claim_document.accepted", + failure_reason: Lithic::Models::ClaimDocumentAcceptedWebhookEvent::failure_reason?, + name: String, + requirement_id: String?, + status: Lithic::Models::ClaimDocumentAcceptedWebhookEvent::status, + updated: Time, + upload_constraints: Lithic::ClaimDocumentAcceptedWebhookEvent::UploadConstraints?, + upload_url: String?, + upload_url_expires_at: Time? + } + + type failure_reason = + :INVALID_MIME_TYPE + | :FILE_TOO_LARGE + | :FILE_EMPTY + | :CORRUPT_FILE + | :OTHER + + module FailureReason + extend Lithic::Internal::Type::Enum + + INVALID_MIME_TYPE: :INVALID_MIME_TYPE + FILE_TOO_LARGE: :FILE_TOO_LARGE + FILE_EMPTY: :FILE_EMPTY + CORRUPT_FILE: :CORRUPT_FILE + OTHER: :OTHER + + def self?.values: -> ::Array[Lithic::Models::ClaimDocumentAcceptedWebhookEvent::failure_reason] + end + + type status = :PENDING | :VALIDATING | :ACCEPTED | :REJECTED + + module Status + extend Lithic::Internal::Type::Enum + + PENDING: :PENDING + VALIDATING: :VALIDATING + ACCEPTED: :ACCEPTED + REJECTED: :REJECTED + + def self?.values: -> ::Array[Lithic::Models::ClaimDocumentAcceptedWebhookEvent::status] + end + + type upload_constraints = + { accepted_mime_types: ::Array[String], max_size_bytes: Integer? } + + class UploadConstraints < Lithic::Internal::Type::BaseModel + attr_accessor accepted_mime_types: ::Array[String] + + attr_accessor max_size_bytes: Integer? + + def initialize: ( + accepted_mime_types: ::Array[String], + max_size_bytes: Integer? + ) -> void + + def to_hash: -> { + accepted_mime_types: ::Array[String], + max_size_bytes: Integer? + } + end + end + end +end diff --git a/sig/lithic/models/claim_document_rejected_webhook_event.rbs b/sig/lithic/models/claim_document_rejected_webhook_event.rbs new file mode 100644 index 00000000..7817b55b --- /dev/null +++ b/sig/lithic/models/claim_document_rejected_webhook_event.rbs @@ -0,0 +1,131 @@ +module Lithic + module Models + type claim_document_rejected_webhook_event = + { + token: String, + created: Time, + download_url: String?, + download_url_expires_at: Time?, + event_type: :"claim_document.rejected", + failure_reason: Lithic::Models::ClaimDocumentRejectedWebhookEvent::failure_reason?, + name: String, + requirement_id: String?, + status: Lithic::Models::ClaimDocumentRejectedWebhookEvent::status, + updated: Time, + upload_constraints: Lithic::ClaimDocumentRejectedWebhookEvent::UploadConstraints?, + upload_url: String?, + upload_url_expires_at: Time? + } + + class ClaimDocumentRejectedWebhookEvent < Lithic::Internal::Type::BaseModel + attr_accessor token: String + + attr_accessor created: Time + + attr_accessor download_url: String? + + attr_accessor download_url_expires_at: Time? + + attr_accessor event_type: :"claim_document.rejected" + + attr_accessor failure_reason: Lithic::Models::ClaimDocumentRejectedWebhookEvent::failure_reason? + + attr_accessor name: String + + attr_accessor requirement_id: String? + + attr_accessor status: Lithic::Models::ClaimDocumentRejectedWebhookEvent::status + + attr_accessor updated: Time + + attr_accessor upload_constraints: Lithic::ClaimDocumentRejectedWebhookEvent::UploadConstraints? + + attr_accessor upload_url: String? + + attr_accessor upload_url_expires_at: Time? + + def initialize: ( + token: String, + created: Time, + download_url: String?, + download_url_expires_at: Time?, + failure_reason: Lithic::Models::ClaimDocumentRejectedWebhookEvent::failure_reason?, + name: String, + requirement_id: String?, + status: Lithic::Models::ClaimDocumentRejectedWebhookEvent::status, + updated: Time, + upload_constraints: Lithic::ClaimDocumentRejectedWebhookEvent::UploadConstraints?, + upload_url: String?, + upload_url_expires_at: Time?, + ?event_type: :"claim_document.rejected" + ) -> void + + def to_hash: -> { + token: String, + created: Time, + download_url: String?, + download_url_expires_at: Time?, + event_type: :"claim_document.rejected", + failure_reason: Lithic::Models::ClaimDocumentRejectedWebhookEvent::failure_reason?, + name: String, + requirement_id: String?, + status: Lithic::Models::ClaimDocumentRejectedWebhookEvent::status, + updated: Time, + upload_constraints: Lithic::ClaimDocumentRejectedWebhookEvent::UploadConstraints?, + upload_url: String?, + upload_url_expires_at: Time? + } + + type failure_reason = + :INVALID_MIME_TYPE + | :FILE_TOO_LARGE + | :FILE_EMPTY + | :CORRUPT_FILE + | :OTHER + + module FailureReason + extend Lithic::Internal::Type::Enum + + INVALID_MIME_TYPE: :INVALID_MIME_TYPE + FILE_TOO_LARGE: :FILE_TOO_LARGE + FILE_EMPTY: :FILE_EMPTY + CORRUPT_FILE: :CORRUPT_FILE + OTHER: :OTHER + + def self?.values: -> ::Array[Lithic::Models::ClaimDocumentRejectedWebhookEvent::failure_reason] + end + + type status = :PENDING | :VALIDATING | :ACCEPTED | :REJECTED + + module Status + extend Lithic::Internal::Type::Enum + + PENDING: :PENDING + VALIDATING: :VALIDATING + ACCEPTED: :ACCEPTED + REJECTED: :REJECTED + + def self?.values: -> ::Array[Lithic::Models::ClaimDocumentRejectedWebhookEvent::status] + end + + type upload_constraints = + { accepted_mime_types: ::Array[String], max_size_bytes: Integer? } + + class UploadConstraints < Lithic::Internal::Type::BaseModel + attr_accessor accepted_mime_types: ::Array[String] + + attr_accessor max_size_bytes: Integer? + + def initialize: ( + accepted_mime_types: ::Array[String], + max_size_bytes: Integer? + ) -> void + + def to_hash: -> { + accepted_mime_types: ::Array[String], + max_size_bytes: Integer? + } + end + end + end +end diff --git a/sig/lithic/models/claim_document_uploaded_webhook_event.rbs b/sig/lithic/models/claim_document_uploaded_webhook_event.rbs new file mode 100644 index 00000000..3fd937b7 --- /dev/null +++ b/sig/lithic/models/claim_document_uploaded_webhook_event.rbs @@ -0,0 +1,131 @@ +module Lithic + module Models + type claim_document_uploaded_webhook_event = + { + token: String, + created: Time, + download_url: String?, + download_url_expires_at: Time?, + event_type: :"claim_document.uploaded", + failure_reason: Lithic::Models::ClaimDocumentUploadedWebhookEvent::failure_reason?, + name: String, + requirement_id: String?, + status: Lithic::Models::ClaimDocumentUploadedWebhookEvent::status, + updated: Time, + upload_constraints: Lithic::ClaimDocumentUploadedWebhookEvent::UploadConstraints?, + upload_url: String?, + upload_url_expires_at: Time? + } + + class ClaimDocumentUploadedWebhookEvent < Lithic::Internal::Type::BaseModel + attr_accessor token: String + + attr_accessor created: Time + + attr_accessor download_url: String? + + attr_accessor download_url_expires_at: Time? + + attr_accessor event_type: :"claim_document.uploaded" + + attr_accessor failure_reason: Lithic::Models::ClaimDocumentUploadedWebhookEvent::failure_reason? + + attr_accessor name: String + + attr_accessor requirement_id: String? + + attr_accessor status: Lithic::Models::ClaimDocumentUploadedWebhookEvent::status + + attr_accessor updated: Time + + attr_accessor upload_constraints: Lithic::ClaimDocumentUploadedWebhookEvent::UploadConstraints? + + attr_accessor upload_url: String? + + attr_accessor upload_url_expires_at: Time? + + def initialize: ( + token: String, + created: Time, + download_url: String?, + download_url_expires_at: Time?, + failure_reason: Lithic::Models::ClaimDocumentUploadedWebhookEvent::failure_reason?, + name: String, + requirement_id: String?, + status: Lithic::Models::ClaimDocumentUploadedWebhookEvent::status, + updated: Time, + upload_constraints: Lithic::ClaimDocumentUploadedWebhookEvent::UploadConstraints?, + upload_url: String?, + upload_url_expires_at: Time?, + ?event_type: :"claim_document.uploaded" + ) -> void + + def to_hash: -> { + token: String, + created: Time, + download_url: String?, + download_url_expires_at: Time?, + event_type: :"claim_document.uploaded", + failure_reason: Lithic::Models::ClaimDocumentUploadedWebhookEvent::failure_reason?, + name: String, + requirement_id: String?, + status: Lithic::Models::ClaimDocumentUploadedWebhookEvent::status, + updated: Time, + upload_constraints: Lithic::ClaimDocumentUploadedWebhookEvent::UploadConstraints?, + upload_url: String?, + upload_url_expires_at: Time? + } + + type failure_reason = + :INVALID_MIME_TYPE + | :FILE_TOO_LARGE + | :FILE_EMPTY + | :CORRUPT_FILE + | :OTHER + + module FailureReason + extend Lithic::Internal::Type::Enum + + INVALID_MIME_TYPE: :INVALID_MIME_TYPE + FILE_TOO_LARGE: :FILE_TOO_LARGE + FILE_EMPTY: :FILE_EMPTY + CORRUPT_FILE: :CORRUPT_FILE + OTHER: :OTHER + + def self?.values: -> ::Array[Lithic::Models::ClaimDocumentUploadedWebhookEvent::failure_reason] + end + + type status = :PENDING | :VALIDATING | :ACCEPTED | :REJECTED + + module Status + extend Lithic::Internal::Type::Enum + + PENDING: :PENDING + VALIDATING: :VALIDATING + ACCEPTED: :ACCEPTED + REJECTED: :REJECTED + + def self?.values: -> ::Array[Lithic::Models::ClaimDocumentUploadedWebhookEvent::status] + end + + type upload_constraints = + { accepted_mime_types: ::Array[String], max_size_bytes: Integer? } + + class UploadConstraints < Lithic::Internal::Type::BaseModel + attr_accessor accepted_mime_types: ::Array[String] + + attr_accessor max_size_bytes: Integer? + + def initialize: ( + accepted_mime_types: ::Array[String], + max_size_bytes: Integer? + ) -> void + + def to_hash: -> { + accepted_mime_types: ::Array[String], + max_size_bytes: Integer? + } + end + end + end +end diff --git a/sig/lithic/models/claim_updated_webhook_event.rbs b/sig/lithic/models/claim_updated_webhook_event.rbs new file mode 100644 index 00000000..90cad5b6 --- /dev/null +++ b/sig/lithic/models/claim_updated_webhook_event.rbs @@ -0,0 +1,169 @@ +module Lithic + module Models + type claim_updated_webhook_event = + { + token: String, + account_holder_token: String?, + account_token: String?, + card_tokens: ::Array[String], + created: Time, + disputed_transactions: ::Array[Lithic::ClaimUpdatedWebhookEvent::DisputedTransaction], + event_type: :"claim.updated", + outstanding_requirements: ::Array[Lithic::Models::ClaimUpdatedWebhookEvent::outstanding_requirement], + reason: Lithic::Models::ClaimUpdatedWebhookEvent::reason, + status: Lithic::Models::ClaimUpdatedWebhookEvent::status, + submitted: Time?, + updated: Time + } + + class ClaimUpdatedWebhookEvent < Lithic::Internal::Type::BaseModel + attr_accessor token: String + + attr_accessor account_holder_token: String? + + attr_accessor account_token: String? + + attr_accessor card_tokens: ::Array[String] + + attr_accessor created: Time + + attr_accessor disputed_transactions: ::Array[Lithic::ClaimUpdatedWebhookEvent::DisputedTransaction] + + attr_accessor event_type: :"claim.updated" + + attr_accessor outstanding_requirements: ::Array[Lithic::Models::ClaimUpdatedWebhookEvent::outstanding_requirement] + + attr_accessor reason: Lithic::Models::ClaimUpdatedWebhookEvent::reason + + attr_accessor status: Lithic::Models::ClaimUpdatedWebhookEvent::status + + attr_accessor submitted: Time? + + attr_accessor updated: Time + + def initialize: ( + token: String, + account_holder_token: String?, + account_token: String?, + card_tokens: ::Array[String], + created: Time, + disputed_transactions: ::Array[Lithic::ClaimUpdatedWebhookEvent::DisputedTransaction], + outstanding_requirements: ::Array[Lithic::Models::ClaimUpdatedWebhookEvent::outstanding_requirement], + reason: Lithic::Models::ClaimUpdatedWebhookEvent::reason, + status: Lithic::Models::ClaimUpdatedWebhookEvent::status, + submitted: Time?, + updated: Time, + ?event_type: :"claim.updated" + ) -> void + + def to_hash: -> { + token: String, + account_holder_token: String?, + account_token: String?, + card_tokens: ::Array[String], + created: Time, + disputed_transactions: ::Array[Lithic::ClaimUpdatedWebhookEvent::DisputedTransaction], + event_type: :"claim.updated", + outstanding_requirements: ::Array[Lithic::Models::ClaimUpdatedWebhookEvent::outstanding_requirement], + reason: Lithic::Models::ClaimUpdatedWebhookEvent::reason, + status: Lithic::Models::ClaimUpdatedWebhookEvent::status, + submitted: Time?, + updated: Time + } + + type disputed_transaction = + { event_tokens: ::Array[String], transaction_token: String } + + class DisputedTransaction < Lithic::Internal::Type::BaseModel + attr_accessor event_tokens: ::Array[String] + + attr_accessor transaction_token: String + + def initialize: ( + event_tokens: ::Array[String], + transaction_token: String + ) -> void + + def to_hash: -> { + event_tokens: ::Array[String], + transaction_token: String + } + end + + type outstanding_requirement = :QUESTIONNAIRE | :DOCUMENTS + + module OutstandingRequirement + extend Lithic::Internal::Type::Enum + + QUESTIONNAIRE: :QUESTIONNAIRE + DOCUMENTS: :DOCUMENTS + + def self?.values: -> ::Array[Lithic::Models::ClaimUpdatedWebhookEvent::outstanding_requirement] + end + + type reason = + :CARD_NOT_PRESENT + | :CARD_LOST + | :CARD_STOLEN + | :CARD_NEVER_RECEIVED + | :COUNTERFEIT + | :ACCOUNT_TAKEOVER + | :PRODUCT_NOT_RECEIVED + | :NOT_AS_DESCRIBED + | :CREDIT_NOT_PROCESSED + | :CANCELLED_RECURRING + | :PAID_BY_OTHER_MEANS + | :DUPLICATE_CHARGE + | :LATE_PRESENTMENT + | :INCORRECT_TRANSACTION_CODE + | :NO_AUTHORIZATION + | :DECLINED + | :INCORRECT_AMOUNT + | :ATM_CASH_NOT_DISPENSED + | :ATM_DEPOSIT_WRONG_AMOUNT + | :ATM_DEPOSIT_MISSING + + module Reason + extend Lithic::Internal::Type::Enum + + CARD_NOT_PRESENT: :CARD_NOT_PRESENT + CARD_LOST: :CARD_LOST + CARD_STOLEN: :CARD_STOLEN + CARD_NEVER_RECEIVED: :CARD_NEVER_RECEIVED + COUNTERFEIT: :COUNTERFEIT + ACCOUNT_TAKEOVER: :ACCOUNT_TAKEOVER + PRODUCT_NOT_RECEIVED: :PRODUCT_NOT_RECEIVED + NOT_AS_DESCRIBED: :NOT_AS_DESCRIBED + CREDIT_NOT_PROCESSED: :CREDIT_NOT_PROCESSED + CANCELLED_RECURRING: :CANCELLED_RECURRING + PAID_BY_OTHER_MEANS: :PAID_BY_OTHER_MEANS + DUPLICATE_CHARGE: :DUPLICATE_CHARGE + LATE_PRESENTMENT: :LATE_PRESENTMENT + INCORRECT_TRANSACTION_CODE: :INCORRECT_TRANSACTION_CODE + NO_AUTHORIZATION: :NO_AUTHORIZATION + DECLINED: :DECLINED + INCORRECT_AMOUNT: :INCORRECT_AMOUNT + ATM_CASH_NOT_DISPENSED: :ATM_CASH_NOT_DISPENSED + ATM_DEPOSIT_WRONG_AMOUNT: :ATM_DEPOSIT_WRONG_AMOUNT + ATM_DEPOSIT_MISSING: :ATM_DEPOSIT_MISSING + + def self?.values: -> ::Array[Lithic::Models::ClaimUpdatedWebhookEvent::reason] + end + + type status = + :INITIALIZING | :AWAITING_INFO | :SUBMITTED | :RESOLVED | :ABANDONED + + module Status + extend Lithic::Internal::Type::Enum + + INITIALIZING: :INITIALIZING + AWAITING_INFO: :AWAITING_INFO + SUBMITTED: :SUBMITTED + RESOLVED: :RESOLVED + ABANDONED: :ABANDONED + + def self?.values: -> ::Array[Lithic::Models::ClaimUpdatedWebhookEvent::status] + end + end + end +end diff --git a/sig/lithic/models/event.rbs b/sig/lithic/models/event.rbs index 5950629b..7c0d9592 100644 --- a/sig/lithic/models/event.rbs +++ b/sig/lithic/models/event.rbs @@ -51,6 +51,11 @@ module Lithic | :"card.renewed" | :"card.shipped" | :"card.updated" + | :"claim_document.accepted" + | :"claim_document.rejected" + | :"claim_document.uploaded" + | :"claim.created" + | :"claim.updated" | :"digital_wallet.tokenization_result" | :"digital_wallet.tokenization_two_factor_authentication_code" | :"digital_wallet.tokenization_two_factor_authentication_code_sent" @@ -109,6 +114,11 @@ module Lithic CARD_RENEWED: :"card.renewed" CARD_SHIPPED: :"card.shipped" CARD_UPDATED: :"card.updated" + CLAIM_DOCUMENT_ACCEPTED: :"claim_document.accepted" + CLAIM_DOCUMENT_REJECTED: :"claim_document.rejected" + CLAIM_DOCUMENT_UPLOADED: :"claim_document.uploaded" + CLAIM_CREATED: :"claim.created" + CLAIM_UPDATED: :"claim.updated" DIGITAL_WALLET_TOKENIZATION_RESULT: :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE: :"digital_wallet.tokenization_two_factor_authentication_code" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT: :"digital_wallet.tokenization_two_factor_authentication_code_sent" diff --git a/sig/lithic/models/event_list_params.rbs b/sig/lithic/models/event_list_params.rbs index 91c0c1e0..1d636a58 100644 --- a/sig/lithic/models/event_list_params.rbs +++ b/sig/lithic/models/event_list_params.rbs @@ -88,6 +88,11 @@ module Lithic | :"card.renewed" | :"card.shipped" | :"card.updated" + | :"claim_document.accepted" + | :"claim_document.rejected" + | :"claim_document.uploaded" + | :"claim.created" + | :"claim.updated" | :"digital_wallet.tokenization_result" | :"digital_wallet.tokenization_two_factor_authentication_code" | :"digital_wallet.tokenization_two_factor_authentication_code_sent" @@ -146,6 +151,11 @@ module Lithic CARD_RENEWED: :"card.renewed" CARD_SHIPPED: :"card.shipped" CARD_UPDATED: :"card.updated" + CLAIM_DOCUMENT_ACCEPTED: :"claim_document.accepted" + CLAIM_DOCUMENT_REJECTED: :"claim_document.rejected" + CLAIM_DOCUMENT_UPLOADED: :"claim_document.uploaded" + CLAIM_CREATED: :"claim.created" + CLAIM_UPDATED: :"claim.updated" DIGITAL_WALLET_TOKENIZATION_RESULT: :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE: :"digital_wallet.tokenization_two_factor_authentication_code" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT: :"digital_wallet.tokenization_two_factor_authentication_code_sent" diff --git a/sig/lithic/models/event_subscription.rbs b/sig/lithic/models/event_subscription.rbs index 377c7fce..26f4d54d 100644 --- a/sig/lithic/models/event_subscription.rbs +++ b/sig/lithic/models/event_subscription.rbs @@ -56,6 +56,11 @@ module Lithic | :"card.renewed" | :"card.shipped" | :"card.updated" + | :"claim_document.accepted" + | :"claim_document.rejected" + | :"claim_document.uploaded" + | :"claim.created" + | :"claim.updated" | :"digital_wallet.tokenization_result" | :"digital_wallet.tokenization_two_factor_authentication_code" | :"digital_wallet.tokenization_two_factor_authentication_code_sent" @@ -114,6 +119,11 @@ module Lithic CARD_RENEWED: :"card.renewed" CARD_SHIPPED: :"card.shipped" CARD_UPDATED: :"card.updated" + CLAIM_DOCUMENT_ACCEPTED: :"claim_document.accepted" + CLAIM_DOCUMENT_REJECTED: :"claim_document.rejected" + CLAIM_DOCUMENT_UPLOADED: :"claim_document.uploaded" + CLAIM_CREATED: :"claim.created" + CLAIM_UPDATED: :"claim.updated" DIGITAL_WALLET_TOKENIZATION_RESULT: :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE: :"digital_wallet.tokenization_two_factor_authentication_code" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT: :"digital_wallet.tokenization_two_factor_authentication_code_sent" diff --git a/sig/lithic/models/events/subscription_create_params.rbs b/sig/lithic/models/events/subscription_create_params.rbs index a35263b3..f59147ad 100644 --- a/sig/lithic/models/events/subscription_create_params.rbs +++ b/sig/lithic/models/events/subscription_create_params.rbs @@ -66,6 +66,11 @@ module Lithic | :"card.renewed" | :"card.shipped" | :"card.updated" + | :"claim_document.accepted" + | :"claim_document.rejected" + | :"claim_document.uploaded" + | :"claim.created" + | :"claim.updated" | :"digital_wallet.tokenization_result" | :"digital_wallet.tokenization_two_factor_authentication_code" | :"digital_wallet.tokenization_two_factor_authentication_code_sent" @@ -124,6 +129,11 @@ module Lithic CARD_RENEWED: :"card.renewed" CARD_SHIPPED: :"card.shipped" CARD_UPDATED: :"card.updated" + CLAIM_DOCUMENT_ACCEPTED: :"claim_document.accepted" + CLAIM_DOCUMENT_REJECTED: :"claim_document.rejected" + CLAIM_DOCUMENT_UPLOADED: :"claim_document.uploaded" + CLAIM_CREATED: :"claim.created" + CLAIM_UPDATED: :"claim.updated" DIGITAL_WALLET_TOKENIZATION_RESULT: :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE: :"digital_wallet.tokenization_two_factor_authentication_code" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT: :"digital_wallet.tokenization_two_factor_authentication_code_sent" diff --git a/sig/lithic/models/events/subscription_send_simulated_example_params.rbs b/sig/lithic/models/events/subscription_send_simulated_example_params.rbs index 2f5dfbd0..efaaac92 100644 --- a/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +++ b/sig/lithic/models/events/subscription_send_simulated_example_params.rbs @@ -52,6 +52,11 @@ module Lithic | :"card.renewed" | :"card.shipped" | :"card.updated" + | :"claim_document.accepted" + | :"claim_document.rejected" + | :"claim_document.uploaded" + | :"claim.created" + | :"claim.updated" | :"digital_wallet.tokenization_result" | :"digital_wallet.tokenization_two_factor_authentication_code" | :"digital_wallet.tokenization_two_factor_authentication_code_sent" @@ -110,6 +115,11 @@ module Lithic CARD_RENEWED: :"card.renewed" CARD_SHIPPED: :"card.shipped" CARD_UPDATED: :"card.updated" + CLAIM_DOCUMENT_ACCEPTED: :"claim_document.accepted" + CLAIM_DOCUMENT_REJECTED: :"claim_document.rejected" + CLAIM_DOCUMENT_UPLOADED: :"claim_document.uploaded" + CLAIM_CREATED: :"claim.created" + CLAIM_UPDATED: :"claim.updated" DIGITAL_WALLET_TOKENIZATION_RESULT: :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE: :"digital_wallet.tokenization_two_factor_authentication_code" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT: :"digital_wallet.tokenization_two_factor_authentication_code_sent" diff --git a/sig/lithic/models/events/subscription_update_params.rbs b/sig/lithic/models/events/subscription_update_params.rbs index ce74dca2..d2f6ffe2 100644 --- a/sig/lithic/models/events/subscription_update_params.rbs +++ b/sig/lithic/models/events/subscription_update_params.rbs @@ -71,6 +71,11 @@ module Lithic | :"card.renewed" | :"card.shipped" | :"card.updated" + | :"claim_document.accepted" + | :"claim_document.rejected" + | :"claim_document.uploaded" + | :"claim.created" + | :"claim.updated" | :"digital_wallet.tokenization_result" | :"digital_wallet.tokenization_two_factor_authentication_code" | :"digital_wallet.tokenization_two_factor_authentication_code_sent" @@ -129,6 +134,11 @@ module Lithic CARD_RENEWED: :"card.renewed" CARD_SHIPPED: :"card.shipped" CARD_UPDATED: :"card.updated" + CLAIM_DOCUMENT_ACCEPTED: :"claim_document.accepted" + CLAIM_DOCUMENT_REJECTED: :"claim_document.rejected" + CLAIM_DOCUMENT_UPLOADED: :"claim_document.uploaded" + CLAIM_CREATED: :"claim.created" + CLAIM_UPDATED: :"claim.updated" DIGITAL_WALLET_TOKENIZATION_RESULT: :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE: :"digital_wallet.tokenization_two_factor_authentication_code" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT: :"digital_wallet.tokenization_two_factor_authentication_code_sent" diff --git a/sig/lithic/models/parsed_webhook_event.rbs b/sig/lithic/models/parsed_webhook_event.rbs index 0698e0f9..262cc435 100644 --- a/sig/lithic/models/parsed_webhook_event.rbs +++ b/sig/lithic/models/parsed_webhook_event.rbs @@ -23,6 +23,11 @@ module Lithic | Lithic::CardTransactionUpdatedWebhookEvent | Lithic::CardTransactionEnhancedDataCreatedWebhookEvent | Lithic::CardTransactionEnhancedDataUpdatedWebhookEvent + | Lithic::ClaimCreatedWebhookEvent + | Lithic::ClaimUpdatedWebhookEvent + | Lithic::ClaimDocumentUploadedWebhookEvent + | Lithic::ClaimDocumentAcceptedWebhookEvent + | Lithic::ClaimDocumentRejectedWebhookEvent | Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent | Lithic::DigitalWalletTokenizationResultWebhookEvent | Lithic::DigitalWalletTokenizationTwoFactorAuthenticationCodeWebhookEvent diff --git a/sig/lithic/resources/webhooks.rbs b/sig/lithic/resources/webhooks.rbs index 1b29cc10..ba637e58 100644 --- a/sig/lithic/resources/webhooks.rbs +++ b/sig/lithic/resources/webhooks.rbs @@ -27,6 +27,11 @@ module Lithic | Lithic::CardTransactionUpdatedWebhookEvent | Lithic::CardTransactionEnhancedDataCreatedWebhookEvent | Lithic::CardTransactionEnhancedDataUpdatedWebhookEvent + | Lithic::ClaimCreatedWebhookEvent + | Lithic::ClaimUpdatedWebhookEvent + | Lithic::ClaimDocumentUploadedWebhookEvent + | Lithic::ClaimDocumentAcceptedWebhookEvent + | Lithic::ClaimDocumentRejectedWebhookEvent | Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent | Lithic::DigitalWalletTokenizationResultWebhookEvent | Lithic::DigitalWalletTokenizationTwoFactorAuthenticationCodeWebhookEvent From 2812623bab59b68a8a1de32b149153567fa5d3ea Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 23 Jun 2026 11:49:40 +0000 Subject: [PATCH 2/3] fix(api): Sync templated rule features with authorizer external feature set --- .stats.yml | 4 +- lib/lithic/models/auth_rules/rule_feature.rb | 293 +++++++- .../auth_rules/typescript_code_parameters.rb | 4 +- rbi/lithic/models/auth_rules/rule_feature.rbi | 688 +++++++++++++++++- .../auth_rules/typescript_code_parameters.rbi | 18 +- sig/lithic/models/auth_rules/rule_feature.rbs | 252 +++++++ 6 files changed, 1248 insertions(+), 11 deletions(-) diff --git a/.stats.yml b/.stats.yml index 91095e83..d092e24a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-48e8284d7f1f51f36402cf5f22a23b27071af86110e2aeddb8da06f8c790fd3d.yml -openapi_spec_hash: a64ba9e94686bce4f0a8c5b1b3c704da +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-47e9f78d22682623e313f1689f5fa7e3420575ff285a14a2f4704c49ffb6b72e.yml +openapi_spec_hash: 4797fe46d942cb32e648a79015783d01 config_hash: 5bb913c05ebeb301ec925b16e75bb251 diff --git a/lib/lithic/models/auth_rules/rule_feature.rb b/lib/lithic/models/auth_rules/rule_feature.rb index f771481d..e5d8cccf 100644 --- a/lib/lithic/models/auth_rules/rule_feature.rb +++ b/lib/lithic/models/auth_rules/rule_feature.rb @@ -19,6 +19,8 @@ module AuthRules # CARD_TRANSACTION_UPDATE event stream rules. # - `ACH_PAYMENT`: The ACH payment being evaluated. Only available for # ACH_PAYMENT_UPDATE event stream rules. + # - `EXTERNAL_BANK_ACCOUNT`: The external bank account tied to the ACH payment + # being evaluated. Only available for ACH_PAYMENT_UPDATE event stream rules. # - `CARD`: The card associated with the event. Available for AUTHORIZATION, # THREE_DS_AUTHENTICATION, and CARD_TRANSACTION_UPDATE event stream rules. # - `ACCOUNT_HOLDER`: The account holder associated with the event. Available for @@ -28,7 +30,17 @@ module AuthRules # THREE_DS_AUTHENTICATION event stream rules. # - `SPEND_VELOCITY`: Spend velocity data for the card or account. Requires # `scope`, `period`, and optionally `filters` to configure the velocity - # calculation. Available for AUTHORIZATION event stream rules. + # calculation. Available for AUTHORIZATION and CARD_TRANSACTION_UPDATE event + # stream rules. + # - `PAYMENT_VELOCITY`: ACH payment velocity data, aggregated over the given + # scope. Requires `scope`, `period`, and optionally `filters` to configure the + # velocity calculation. Available for ACH_PAYMENT_UPDATE event stream rules. + # - `CONSECUTIVE_DECLINES`: The number of consecutive declined transactions since + # the last approval for the card or account. Requires `scope`. Available for + # AUTHORIZATION and CARD_TRANSACTION_UPDATE event stream rules. + # - `ACH_PAYMENT_HISTORY`: Windowed settled-amount statistics derived from the + # financial account's ACH payment history. Requires `scope`. Available for + # ACH_PAYMENT_UPDATE event stream rules. # - `TRANSACTION_HISTORY_SIGNALS`: Behavioral feature state derived from the # entity's transaction history. Requires `scope` to specify whether to load # card, account, or business account history. Available for AUTHORIZATION and @@ -48,6 +60,8 @@ module RuleFeature variant -> { Lithic::AuthRules::RuleFeature::ACHPaymentFeature } + variant -> { Lithic::AuthRules::RuleFeature::ExternalBankAccountFeature } + variant -> { Lithic::AuthRules::RuleFeature::CardFeature } variant -> { Lithic::AuthRules::RuleFeature::AccountHolderFeature } @@ -56,8 +70,14 @@ module RuleFeature variant -> { Lithic::AuthRules::RuleFeature::SpendVelocityFeature } + variant -> { Lithic::AuthRules::RuleFeature::PaymentVelocityFeature } + variant -> { Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature } + variant -> { Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature } + + variant -> { Lithic::AuthRules::RuleFeature::ACHPaymentHistoryFeature } + class AuthorizationFeature < Lithic::Internal::Type::BaseModel # @!attribute type # @@ -166,6 +186,24 @@ class ACHPaymentFeature < Lithic::Internal::Type::BaseModel # @param type [Symbol, :ACH_PAYMENT] end + class ExternalBankAccountFeature < Lithic::Internal::Type::BaseModel + # @!attribute type + # + # @return [Symbol, :EXTERNAL_BANK_ACCOUNT] + required :type, const: :EXTERNAL_BANK_ACCOUNT + + # @!attribute name + # The variable name for this feature in the rule function signature + # + # @return [String, nil] + optional :name, String + + # @!method initialize(name: nil, type: :EXTERNAL_BANK_ACCOUNT) + # @param name [String] The variable name for this feature in the rule function signature + # + # @param type [Symbol, :EXTERNAL_BANK_ACCOUNT] + end + class CardFeature < Lithic::Internal::Type::BaseModel # @!attribute type # @@ -274,6 +312,180 @@ module Scope end end + class PaymentVelocityFeature < Lithic::Internal::Type::BaseModel + # @!attribute period + # Velocity over the current day since 00:00 / 12 AM in Eastern Time + # + # @return [Lithic::Models::AuthRules::VelocityLimitPeriod::TrailingWindowObject, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowDay, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowWeek, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowMonth, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowYear] + required :period, union: -> { Lithic::AuthRules::VelocityLimitPeriod } + + # @!attribute scope + # The scope over which the ACH payment velocity is aggregated. + # + # @return [Symbol, Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Scope] + required :scope, enum: -> { Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Scope } + + # @!attribute type + # + # @return [Symbol, :PAYMENT_VELOCITY] + required :type, const: :PAYMENT_VELOCITY + + # @!attribute filters + # Optional filters applied when aggregating ACH payment velocity. Payments not + # matching the provided filters are excluded from the calculated velocity. + # + # @return [Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters, nil] + optional :filters, -> { Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters } + + # @!attribute name + # The variable name for this feature in the rule function signature + # + # @return [String, nil] + optional :name, String + + # @!method initialize(period:, scope:, filters: nil, name: nil, type: :PAYMENT_VELOCITY) + # Some parameter documentations has been truncated, see + # {Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature} for more + # details. + # + # @param period [Lithic::Models::AuthRules::VelocityLimitPeriod::TrailingWindowObject, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowDay, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowWeek, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowMonth, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowYear] Velocity over the current day since 00:00 / 12 AM in Eastern Time + # + # @param scope [Symbol, Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Scope] The scope over which the ACH payment velocity is aggregated. + # + # @param filters [Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters] Optional filters applied when aggregating ACH payment velocity. Payments not mat + # + # @param name [String] The variable name for this feature in the rule function signature + # + # @param type [Symbol, :PAYMENT_VELOCITY] + + # The scope over which the ACH payment velocity is aggregated. + # + # @see Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature#scope + module Scope + extend Lithic::Internal::Type::Enum + + FINANCIAL_ACCOUNT = :FINANCIAL_ACCOUNT + GLOBAL = :GLOBAL + + # @!method self.values + # @return [Array] + end + + # @see Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature#filters + class Filters < Lithic::Internal::Type::BaseModel + # @!attribute exclude_tags + # Exclude payments matching any of the provided tag key-value pairs. + # + # @return [Hash{Symbol=>String}, nil] + optional :exclude_tags, Lithic::Internal::Type::HashOf[String], nil?: true + + # @!attribute include_payment_types + # Payment types to include in the velocity calculation. + # + # @return [Array, nil] + optional :include_payment_types, + -> { + Lithic::Internal::Type::ArrayOf[enum: Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePaymentType] + }, + nil?: true + + # @!attribute include_polarities + # Payment polarities to include in the velocity calculation. + # + # @return [Array, nil] + optional :include_polarities, + -> { + Lithic::Internal::Type::ArrayOf[enum: Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePolarity] + }, + nil?: true + + # @!attribute include_statuses + # Payment statuses to include in the velocity calculation. + # + # @return [Array, nil] + optional :include_statuses, + -> { + Lithic::Internal::Type::ArrayOf[enum: Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludeStatus] + }, + nil?: true + + # @!attribute include_tags + # Only include payments matching all of the provided tag key-value pairs. + # + # @return [Hash{Symbol=>String}, nil] + optional :include_tags, Lithic::Internal::Type::HashOf[String], nil?: true + + # @!attribute result + # Only include payments with the given result. + # + # @return [Symbol, Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::Result, nil] + optional :result, enum: -> { Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::Result } + + # @!method initialize(exclude_tags: nil, include_payment_types: nil, include_polarities: nil, include_statuses: nil, include_tags: nil, result: nil) + # Optional filters applied when aggregating ACH payment velocity. Payments not + # matching the provided filters are excluded from the calculated velocity. + # + # @param exclude_tags [Hash{Symbol=>String}, nil] Exclude payments matching any of the provided tag key-value pairs. + # + # @param include_payment_types [Array, nil] Payment types to include in the velocity calculation. + # + # @param include_polarities [Array, nil] Payment polarities to include in the velocity calculation. + # + # @param include_statuses [Array, nil] Payment statuses to include in the velocity calculation. + # + # @param include_tags [Hash{Symbol=>String}, nil] Only include payments matching all of the provided tag key-value pairs. + # + # @param result [Symbol, Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::Result] Only include payments with the given result. + + module IncludePaymentType + extend Lithic::Internal::Type::Enum + + ORIGINATION = :ORIGINATION + RECEIPT = :RECEIPT + + # @!method self.values + # @return [Array] + end + + module IncludePolarity + extend Lithic::Internal::Type::Enum + + CREDIT = :CREDIT + DEBIT = :DEBIT + + # @!method self.values + # @return [Array] + end + + module IncludeStatus + extend Lithic::Internal::Type::Enum + + PENDING = :PENDING + SETTLED = :SETTLED + DECLINED = :DECLINED + REVERSED = :REVERSED + CANCELED = :CANCELED + RETURNED = :RETURNED + + # @!method self.values + # @return [Array] + end + + # Only include payments with the given result. + # + # @see Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters#result + module Result + extend Lithic::Internal::Type::Enum + + APPROVED = :APPROVED + DECLINED = :DECLINED + + # @!method self.values + # @return [Array] + end + end + end + class TransactionHistorySignalsFeature < Lithic::Internal::Type::BaseModel # @!attribute scope # The entity scope to load transaction history signals for. @@ -314,8 +526,85 @@ module Scope end end + class ConsecutiveDeclinesFeature < Lithic::Internal::Type::BaseModel + # @!attribute scope + # The entity scope to count consecutive declines for. + # + # @return [Symbol, Lithic::Models::AuthRules::RuleFeature::ConsecutiveDeclinesFeature::Scope] + required :scope, enum: -> { Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature::Scope } + + # @!attribute type + # + # @return [Symbol, :CONSECUTIVE_DECLINES] + required :type, const: :CONSECUTIVE_DECLINES + + # @!attribute name + # The variable name for this feature in the rule function signature + # + # @return [String, nil] + optional :name, String + + # @!method initialize(scope:, name: nil, type: :CONSECUTIVE_DECLINES) + # @param scope [Symbol, Lithic::Models::AuthRules::RuleFeature::ConsecutiveDeclinesFeature::Scope] The entity scope to count consecutive declines for. + # + # @param name [String] The variable name for this feature in the rule function signature + # + # @param type [Symbol, :CONSECUTIVE_DECLINES] + + # The entity scope to count consecutive declines for. + # + # @see Lithic::Models::AuthRules::RuleFeature::ConsecutiveDeclinesFeature#scope + module Scope + extend Lithic::Internal::Type::Enum + + CARD = :CARD + ACCOUNT = :ACCOUNT + + # @!method self.values + # @return [Array] + end + end + + class ACHPaymentHistoryFeature < Lithic::Internal::Type::BaseModel + # @!attribute scope + # The entity scope to load ACH payment history for. + # + # @return [Symbol, Lithic::Models::AuthRules::RuleFeature::ACHPaymentHistoryFeature::Scope] + required :scope, enum: -> { Lithic::AuthRules::RuleFeature::ACHPaymentHistoryFeature::Scope } + + # @!attribute type + # + # @return [Symbol, :ACH_PAYMENT_HISTORY] + required :type, const: :ACH_PAYMENT_HISTORY + + # @!attribute name + # The variable name for this feature in the rule function signature + # + # @return [String, nil] + optional :name, String + + # @!method initialize(scope:, name: nil, type: :ACH_PAYMENT_HISTORY) + # @param scope [Symbol, Lithic::Models::AuthRules::RuleFeature::ACHPaymentHistoryFeature::Scope] The entity scope to load ACH payment history for. + # + # @param name [String] The variable name for this feature in the rule function signature + # + # @param type [Symbol, :ACH_PAYMENT_HISTORY] + + # The entity scope to load ACH payment history for. + # + # @see Lithic::Models::AuthRules::RuleFeature::ACHPaymentHistoryFeature#scope + module Scope + extend Lithic::Internal::Type::Enum + + FINANCIAL_ACCOUNT = :FINANCIAL_ACCOUNT + + # @!method self.values + # @return [Array] + end + end + # @!method self.variants - # @return [Array(Lithic::Models::AuthRules::RuleFeature::AuthorizationFeature, Lithic::Models::AuthRules::RuleFeature::AuthenticationFeature, Lithic::Models::AuthRules::RuleFeature::TokenizationFeature, Lithic::Models::AuthRules::RuleFeature::ACHReceiptFeature, Lithic::Models::AuthRules::RuleFeature::CardTransactionFeature, Lithic::Models::AuthRules::RuleFeature::ACHPaymentFeature, Lithic::Models::AuthRules::RuleFeature::CardFeature, Lithic::Models::AuthRules::RuleFeature::AccountHolderFeature, Lithic::Models::AuthRules::RuleFeature::IPMetadataFeature, Lithic::Models::AuthRules::RuleFeature::SpendVelocityFeature, Lithic::Models::AuthRules::RuleFeature::TransactionHistorySignalsFeature)] + # @return [Array(Lithic::Models::AuthRules::RuleFeature::AuthorizationFeature, Lithic::Models::AuthRules::RuleFeature::AuthenticationFeature, Lithic::Models::AuthRules::RuleFeature::TokenizationFeature, Lithic::Models::AuthRules::RuleFeature::ACHReceiptFeature, Lithic::Models::AuthRules::RuleFeature::CardTransactionFeature, Lithic::Models::AuthRules::RuleFeature::ACHPaymentFeature, Lithic::Models::AuthRules::RuleFeature::ExternalBankAccountFeature, Lithic::Models::AuthRules::RuleFeature::CardFeature, Lithic::Models::AuthRules::RuleFeature::AccountHolderFeature, Lithic::Models::AuthRules::RuleFeature::IPMetadataFeature, Lithic::Models::AuthRules::RuleFeature::SpendVelocityFeature, Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature, Lithic::Models::AuthRules::RuleFeature::TransactionHistorySignalsFeature, Lithic::Models::AuthRules::RuleFeature::ConsecutiveDeclinesFeature, Lithic::Models::AuthRules::RuleFeature::ACHPaymentHistoryFeature)] end end end diff --git a/lib/lithic/models/auth_rules/typescript_code_parameters.rb b/lib/lithic/models/auth_rules/typescript_code_parameters.rb index f2ea530c..a35ff856 100644 --- a/lib/lithic/models/auth_rules/typescript_code_parameters.rb +++ b/lib/lithic/models/auth_rules/typescript_code_parameters.rb @@ -15,7 +15,7 @@ class TypescriptCodeParameters < Lithic::Internal::Type::BaseModel # @!attribute features # Features available to the TypeScript code at evaluation time # - # @return [Array] + # @return [Array] required :features, -> { Lithic::Internal::Type::ArrayOf[union: Lithic::AuthRules::RuleFeature] } # @!method initialize(code:, features:) @@ -26,7 +26,7 @@ class TypescriptCodeParameters < Lithic::Internal::Type::BaseModel # # @param code [String] The TypeScript source code of the rule. Must define a `rule()` function that acc # - # @param features [Array] Features available to the TypeScript code at evaluation time + # @param features [Array] Features available to the TypeScript code at evaluation time end end end diff --git a/rbi/lithic/models/auth_rules/rule_feature.rbi b/rbi/lithic/models/auth_rules/rule_feature.rbi index 3ddc0f37..1be5b76b 100644 --- a/rbi/lithic/models/auth_rules/rule_feature.rbi +++ b/rbi/lithic/models/auth_rules/rule_feature.rbi @@ -19,6 +19,8 @@ module Lithic # CARD_TRANSACTION_UPDATE event stream rules. # - `ACH_PAYMENT`: The ACH payment being evaluated. Only available for # ACH_PAYMENT_UPDATE event stream rules. + # - `EXTERNAL_BANK_ACCOUNT`: The external bank account tied to the ACH payment + # being evaluated. Only available for ACH_PAYMENT_UPDATE event stream rules. # - `CARD`: The card associated with the event. Available for AUTHORIZATION, # THREE_DS_AUTHENTICATION, and CARD_TRANSACTION_UPDATE event stream rules. # - `ACCOUNT_HOLDER`: The account holder associated with the event. Available for @@ -28,7 +30,17 @@ module Lithic # THREE_DS_AUTHENTICATION event stream rules. # - `SPEND_VELOCITY`: Spend velocity data for the card or account. Requires # `scope`, `period`, and optionally `filters` to configure the velocity - # calculation. Available for AUTHORIZATION event stream rules. + # calculation. Available for AUTHORIZATION and CARD_TRANSACTION_UPDATE event + # stream rules. + # - `PAYMENT_VELOCITY`: ACH payment velocity data, aggregated over the given + # scope. Requires `scope`, `period`, and optionally `filters` to configure the + # velocity calculation. Available for ACH_PAYMENT_UPDATE event stream rules. + # - `CONSECUTIVE_DECLINES`: The number of consecutive declined transactions since + # the last approval for the card or account. Requires `scope`. Available for + # AUTHORIZATION and CARD_TRANSACTION_UPDATE event stream rules. + # - `ACH_PAYMENT_HISTORY`: Windowed settled-amount statistics derived from the + # financial account's ACH payment history. Requires `scope`. Available for + # ACH_PAYMENT_UPDATE event stream rules. # - `TRANSACTION_HISTORY_SIGNALS`: Behavioral feature state derived from the # entity's transaction history. Requires `scope` to specify whether to load # card, account, or business account history. Available for AUTHORIZATION and @@ -45,11 +57,15 @@ module Lithic Lithic::AuthRules::RuleFeature::ACHReceiptFeature, Lithic::AuthRules::RuleFeature::CardTransactionFeature, Lithic::AuthRules::RuleFeature::ACHPaymentFeature, + Lithic::AuthRules::RuleFeature::ExternalBankAccountFeature, Lithic::AuthRules::RuleFeature::CardFeature, Lithic::AuthRules::RuleFeature::AccountHolderFeature, Lithic::AuthRules::RuleFeature::IPMetadataFeature, Lithic::AuthRules::RuleFeature::SpendVelocityFeature, - Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature, + Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature, + Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature, + Lithic::AuthRules::RuleFeature::ACHPaymentHistoryFeature ) end @@ -245,6 +261,38 @@ module Lithic end end + class ExternalBankAccountFeature < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::RuleFeature::ExternalBankAccountFeature, + Lithic::Internal::AnyHash + ) + end + + sig { returns(Symbol) } + attr_accessor :type + + # The variable name for this feature in the rule function signature + sig { returns(T.nilable(String)) } + attr_reader :name + + sig { params(name: String).void } + attr_writer :name + + sig { params(name: String, type: Symbol).returns(T.attached_class) } + def self.new( + # The variable name for this feature in the rule function signature + name: nil, + type: :EXTERNAL_BANK_ACCOUNT + ) + end + + sig { override.returns({ type: Symbol, name: String }) } + def to_hash + end + end + class CardFeature < Lithic::Internal::Type::BaseModel OrHash = T.type_alias do @@ -479,6 +527,461 @@ module Lithic end end + class PaymentVelocityFeature < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature, + Lithic::Internal::AnyHash + ) + end + + # Velocity over the current day since 00:00 / 12 AM in Eastern Time + sig do + returns( + T.any( + Lithic::AuthRules::VelocityLimitPeriod::TrailingWindowObject, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowDay, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowWeek, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowMonth, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowYear + ) + ) + end + attr_accessor :period + + # The scope over which the ACH payment velocity is aggregated. + sig do + returns( + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Scope::OrSymbol + ) + end + attr_accessor :scope + + sig { returns(Symbol) } + attr_accessor :type + + # Optional filters applied when aggregating ACH payment velocity. Payments not + # matching the provided filters are excluded from the calculated velocity. + sig do + returns( + T.nilable( + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters + ) + ) + end + attr_reader :filters + + sig do + params( + filters: + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::OrHash + ).void + end + attr_writer :filters + + # The variable name for this feature in the rule function signature + sig { returns(T.nilable(String)) } + attr_reader :name + + sig { params(name: String).void } + attr_writer :name + + sig do + params( + period: + T.any( + Lithic::AuthRules::VelocityLimitPeriod::TrailingWindowObject::OrHash, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowDay::OrHash, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowWeek::OrHash, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowMonth::OrHash, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowYear::OrHash + ), + scope: + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Scope::OrSymbol, + filters: + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::OrHash, + name: String, + type: Symbol + ).returns(T.attached_class) + end + def self.new( + # Velocity over the current day since 00:00 / 12 AM in Eastern Time + period:, + # The scope over which the ACH payment velocity is aggregated. + scope:, + # Optional filters applied when aggregating ACH payment velocity. Payments not + # matching the provided filters are excluded from the calculated velocity. + filters: nil, + # The variable name for this feature in the rule function signature + name: nil, + type: :PAYMENT_VELOCITY + ) + end + + sig do + override.returns( + { + period: + T.any( + Lithic::AuthRules::VelocityLimitPeriod::TrailingWindowObject, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowDay, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowWeek, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowMonth, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowYear + ), + scope: + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Scope::OrSymbol, + type: Symbol, + filters: + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters, + name: String + } + ) + end + def to_hash + end + + # The scope over which the ACH payment velocity is aggregated. + module Scope + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Scope + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + FINANCIAL_ACCOUNT = + T.let( + :FINANCIAL_ACCOUNT, + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Scope::TaggedSymbol + ) + GLOBAL = + T.let( + :GLOBAL, + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Scope::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Scope::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Filters < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters, + Lithic::Internal::AnyHash + ) + end + + # Exclude payments matching any of the provided tag key-value pairs. + sig { returns(T.nilable(T::Hash[Symbol, String])) } + attr_accessor :exclude_tags + + # Payment types to include in the velocity calculation. + sig do + returns( + T.nilable( + T::Array[ + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePaymentType::OrSymbol + ] + ) + ) + end + attr_accessor :include_payment_types + + # Payment polarities to include in the velocity calculation. + sig do + returns( + T.nilable( + T::Array[ + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePolarity::OrSymbol + ] + ) + ) + end + attr_accessor :include_polarities + + # Payment statuses to include in the velocity calculation. + sig do + returns( + T.nilable( + T::Array[ + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludeStatus::OrSymbol + ] + ) + ) + end + attr_accessor :include_statuses + + # Only include payments matching all of the provided tag key-value pairs. + sig { returns(T.nilable(T::Hash[Symbol, String])) } + attr_accessor :include_tags + + # Only include payments with the given result. + sig do + returns( + T.nilable( + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::Result::OrSymbol + ) + ) + end + attr_reader :result + + sig do + params( + result: + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::Result::OrSymbol + ).void + end + attr_writer :result + + # Optional filters applied when aggregating ACH payment velocity. Payments not + # matching the provided filters are excluded from the calculated velocity. + sig do + params( + exclude_tags: T.nilable(T::Hash[Symbol, String]), + include_payment_types: + T.nilable( + T::Array[ + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePaymentType::OrSymbol + ] + ), + include_polarities: + T.nilable( + T::Array[ + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePolarity::OrSymbol + ] + ), + include_statuses: + T.nilable( + T::Array[ + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludeStatus::OrSymbol + ] + ), + include_tags: T.nilable(T::Hash[Symbol, String]), + result: + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::Result::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # Exclude payments matching any of the provided tag key-value pairs. + exclude_tags: nil, + # Payment types to include in the velocity calculation. + include_payment_types: nil, + # Payment polarities to include in the velocity calculation. + include_polarities: nil, + # Payment statuses to include in the velocity calculation. + include_statuses: nil, + # Only include payments matching all of the provided tag key-value pairs. + include_tags: nil, + # Only include payments with the given result. + result: nil + ) + end + + sig do + override.returns( + { + exclude_tags: T.nilable(T::Hash[Symbol, String]), + include_payment_types: + T.nilable( + T::Array[ + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePaymentType::OrSymbol + ] + ), + include_polarities: + T.nilable( + T::Array[ + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePolarity::OrSymbol + ] + ), + include_statuses: + T.nilable( + T::Array[ + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludeStatus::OrSymbol + ] + ), + include_tags: T.nilable(T::Hash[Symbol, String]), + result: + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::Result::OrSymbol + } + ) + end + def to_hash + end + + module IncludePaymentType + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePaymentType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ORIGINATION = + T.let( + :ORIGINATION, + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePaymentType::TaggedSymbol + ) + RECEIPT = + T.let( + :RECEIPT, + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePaymentType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePaymentType::TaggedSymbol + ] + ) + end + def self.values + end + end + + module IncludePolarity + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePolarity + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CREDIT = + T.let( + :CREDIT, + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePolarity::TaggedSymbol + ) + DEBIT = + T.let( + :DEBIT, + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePolarity::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludePolarity::TaggedSymbol + ] + ) + end + def self.values + end + end + + module IncludeStatus + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludeStatus + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PENDING = + T.let( + :PENDING, + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludeStatus::TaggedSymbol + ) + SETTLED = + T.let( + :SETTLED, + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludeStatus::TaggedSymbol + ) + DECLINED = + T.let( + :DECLINED, + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludeStatus::TaggedSymbol + ) + REVERSED = + T.let( + :REVERSED, + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludeStatus::TaggedSymbol + ) + CANCELED = + T.let( + :CANCELED, + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludeStatus::TaggedSymbol + ) + RETURNED = + T.let( + :RETURNED, + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludeStatus::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::IncludeStatus::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Only include payments with the given result. + module Result + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::Result + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + APPROVED = + T.let( + :APPROVED, + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::Result::TaggedSymbol + ) + DECLINED = + T.let( + :DECLINED, + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::Result::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::Result::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + class TransactionHistorySignalsFeature < Lithic::Internal::Type::BaseModel OrHash = T.type_alias do @@ -577,6 +1080,187 @@ module Lithic end end + class ConsecutiveDeclinesFeature < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature, + Lithic::Internal::AnyHash + ) + end + + # The entity scope to count consecutive declines for. + sig do + returns( + Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature::Scope::OrSymbol + ) + end + attr_accessor :scope + + sig { returns(Symbol) } + attr_accessor :type + + # The variable name for this feature in the rule function signature + sig { returns(T.nilable(String)) } + attr_reader :name + + sig { params(name: String).void } + attr_writer :name + + sig do + params( + scope: + Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature::Scope::OrSymbol, + name: String, + type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The entity scope to count consecutive declines for. + scope:, + # The variable name for this feature in the rule function signature + name: nil, + type: :CONSECUTIVE_DECLINES + ) + end + + sig do + override.returns( + { + scope: + Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature::Scope::OrSymbol, + type: Symbol, + name: String + } + ) + end + def to_hash + end + + # The entity scope to count consecutive declines for. + module Scope + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature::Scope + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CARD = + T.let( + :CARD, + Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature::Scope::TaggedSymbol + ) + ACCOUNT = + T.let( + :ACCOUNT, + Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature::Scope::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature::Scope::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class ACHPaymentHistoryFeature < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::RuleFeature::ACHPaymentHistoryFeature, + Lithic::Internal::AnyHash + ) + end + + # The entity scope to load ACH payment history for. + sig do + returns( + Lithic::AuthRules::RuleFeature::ACHPaymentHistoryFeature::Scope::OrSymbol + ) + end + attr_accessor :scope + + sig { returns(Symbol) } + attr_accessor :type + + # The variable name for this feature in the rule function signature + sig { returns(T.nilable(String)) } + attr_reader :name + + sig { params(name: String).void } + attr_writer :name + + sig do + params( + scope: + Lithic::AuthRules::RuleFeature::ACHPaymentHistoryFeature::Scope::OrSymbol, + name: String, + type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The entity scope to load ACH payment history for. + scope:, + # The variable name for this feature in the rule function signature + name: nil, + type: :ACH_PAYMENT_HISTORY + ) + end + + sig do + override.returns( + { + scope: + Lithic::AuthRules::RuleFeature::ACHPaymentHistoryFeature::Scope::OrSymbol, + type: Symbol, + name: String + } + ) + end + def to_hash + end + + # The entity scope to load ACH payment history for. + module Scope + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::AuthRules::RuleFeature::ACHPaymentHistoryFeature::Scope + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + FINANCIAL_ACCOUNT = + T.let( + :FINANCIAL_ACCOUNT, + Lithic::AuthRules::RuleFeature::ACHPaymentHistoryFeature::Scope::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::AuthRules::RuleFeature::ACHPaymentHistoryFeature::Scope::TaggedSymbol + ] + ) + end + def self.values + end + end + end + sig do override.returns(T::Array[Lithic::AuthRules::RuleFeature::Variants]) end diff --git a/rbi/lithic/models/auth_rules/typescript_code_parameters.rbi b/rbi/lithic/models/auth_rules/typescript_code_parameters.rbi index b08b4d5b..c3254195 100644 --- a/rbi/lithic/models/auth_rules/typescript_code_parameters.rbi +++ b/rbi/lithic/models/auth_rules/typescript_code_parameters.rbi @@ -29,11 +29,15 @@ module Lithic Lithic::AuthRules::RuleFeature::ACHReceiptFeature, Lithic::AuthRules::RuleFeature::CardTransactionFeature, Lithic::AuthRules::RuleFeature::ACHPaymentFeature, + Lithic::AuthRules::RuleFeature::ExternalBankAccountFeature, Lithic::AuthRules::RuleFeature::CardFeature, Lithic::AuthRules::RuleFeature::AccountHolderFeature, Lithic::AuthRules::RuleFeature::IPMetadataFeature, Lithic::AuthRules::RuleFeature::SpendVelocityFeature, - Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature, + Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature, + Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature, + Lithic::AuthRules::RuleFeature::ACHPaymentHistoryFeature ) ] ) @@ -53,11 +57,15 @@ module Lithic Lithic::AuthRules::RuleFeature::ACHReceiptFeature::OrHash, Lithic::AuthRules::RuleFeature::CardTransactionFeature::OrHash, Lithic::AuthRules::RuleFeature::ACHPaymentFeature::OrHash, + Lithic::AuthRules::RuleFeature::ExternalBankAccountFeature::OrHash, Lithic::AuthRules::RuleFeature::CardFeature::OrHash, Lithic::AuthRules::RuleFeature::AccountHolderFeature::OrHash, Lithic::AuthRules::RuleFeature::IPMetadataFeature::OrHash, Lithic::AuthRules::RuleFeature::SpendVelocityFeature::OrHash, - Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature::OrHash + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::OrHash, + Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature::OrHash, + Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature::OrHash, + Lithic::AuthRules::RuleFeature::ACHPaymentHistoryFeature::OrHash ) ] ).returns(T.attached_class) @@ -85,11 +93,15 @@ module Lithic Lithic::AuthRules::RuleFeature::ACHReceiptFeature, Lithic::AuthRules::RuleFeature::CardTransactionFeature, Lithic::AuthRules::RuleFeature::ACHPaymentFeature, + Lithic::AuthRules::RuleFeature::ExternalBankAccountFeature, Lithic::AuthRules::RuleFeature::CardFeature, Lithic::AuthRules::RuleFeature::AccountHolderFeature, Lithic::AuthRules::RuleFeature::IPMetadataFeature, Lithic::AuthRules::RuleFeature::SpendVelocityFeature, - Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature, + Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature, + Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature, + Lithic::AuthRules::RuleFeature::ACHPaymentHistoryFeature ) ] } diff --git a/sig/lithic/models/auth_rules/rule_feature.rbs b/sig/lithic/models/auth_rules/rule_feature.rbs index 148d67bf..c115aa40 100644 --- a/sig/lithic/models/auth_rules/rule_feature.rbs +++ b/sig/lithic/models/auth_rules/rule_feature.rbs @@ -8,11 +8,15 @@ module Lithic | Lithic::AuthRules::RuleFeature::ACHReceiptFeature | Lithic::AuthRules::RuleFeature::CardTransactionFeature | Lithic::AuthRules::RuleFeature::ACHPaymentFeature + | Lithic::AuthRules::RuleFeature::ExternalBankAccountFeature | Lithic::AuthRules::RuleFeature::CardFeature | Lithic::AuthRules::RuleFeature::AccountHolderFeature | Lithic::AuthRules::RuleFeature::IPMetadataFeature | Lithic::AuthRules::RuleFeature::SpendVelocityFeature + | Lithic::AuthRules::RuleFeature::PaymentVelocityFeature | Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature + | Lithic::AuthRules::RuleFeature::ConsecutiveDeclinesFeature + | Lithic::AuthRules::RuleFeature::ACHPaymentHistoryFeature module RuleFeature extend Lithic::Internal::Type::Union @@ -102,6 +106,21 @@ module Lithic def to_hash: -> { type: :ACH_PAYMENT, name: String } end + type external_bank_account_feature = + { type: :EXTERNAL_BANK_ACCOUNT, name: String } + + class ExternalBankAccountFeature < Lithic::Internal::Type::BaseModel + attr_accessor type: :EXTERNAL_BANK_ACCOUNT + + attr_reader name: String? + + def name=: (String) -> String + + def initialize: (?name: String, ?type: :EXTERNAL_BANK_ACCOUNT) -> void + + def to_hash: -> { type: :EXTERNAL_BANK_ACCOUNT, name: String } + end + type card_feature = { type: :CARD, name: String } class CardFeature < Lithic::Internal::Type::BaseModel @@ -198,6 +217,160 @@ module Lithic end end + type payment_velocity_feature = + { + period: Lithic::Models::AuthRules::velocity_limit_period, + scope: Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::scope, + type: :PAYMENT_VELOCITY, + filters: Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters, + name: String + } + + class PaymentVelocityFeature < Lithic::Internal::Type::BaseModel + attr_accessor period: Lithic::Models::AuthRules::velocity_limit_period + + attr_accessor scope: Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::scope + + attr_accessor type: :PAYMENT_VELOCITY + + attr_reader filters: Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters? + + def filters=: ( + Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters + ) -> Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters + + attr_reader name: String? + + def name=: (String) -> String + + def initialize: ( + period: Lithic::Models::AuthRules::velocity_limit_period, + scope: Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::scope, + ?filters: Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters, + ?name: String, + ?type: :PAYMENT_VELOCITY + ) -> void + + def to_hash: -> { + period: Lithic::Models::AuthRules::velocity_limit_period, + scope: Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::scope, + type: :PAYMENT_VELOCITY, + filters: Lithic::AuthRules::RuleFeature::PaymentVelocityFeature::Filters, + name: String + } + + type scope = :FINANCIAL_ACCOUNT | :GLOBAL + + module Scope + extend Lithic::Internal::Type::Enum + + FINANCIAL_ACCOUNT: :FINANCIAL_ACCOUNT + GLOBAL: :GLOBAL + + def self?.values: -> ::Array[Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::scope] + end + + type filters = + { + exclude_tags: ::Hash[Symbol, String]?, + include_payment_types: ::Array[Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::include_payment_type]?, + include_polarities: ::Array[Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::include_polarity]?, + include_statuses: ::Array[Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::include_status]?, + include_tags: ::Hash[Symbol, String]?, + result: Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::result + } + + class Filters < Lithic::Internal::Type::BaseModel + attr_accessor exclude_tags: ::Hash[Symbol, String]? + + attr_accessor include_payment_types: ::Array[Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::include_payment_type]? + + attr_accessor include_polarities: ::Array[Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::include_polarity]? + + attr_accessor include_statuses: ::Array[Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::include_status]? + + attr_accessor include_tags: ::Hash[Symbol, String]? + + attr_reader result: Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::result? + + def result=: ( + Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::result + ) -> Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::result + + def initialize: ( + ?exclude_tags: ::Hash[Symbol, String]?, + ?include_payment_types: ::Array[Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::include_payment_type]?, + ?include_polarities: ::Array[Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::include_polarity]?, + ?include_statuses: ::Array[Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::include_status]?, + ?include_tags: ::Hash[Symbol, String]?, + ?result: Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::result + ) -> void + + def to_hash: -> { + exclude_tags: ::Hash[Symbol, String]?, + include_payment_types: ::Array[Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::include_payment_type]?, + include_polarities: ::Array[Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::include_polarity]?, + include_statuses: ::Array[Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::include_status]?, + include_tags: ::Hash[Symbol, String]?, + result: Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::result + } + + type include_payment_type = :ORIGINATION | :RECEIPT + + module IncludePaymentType + extend Lithic::Internal::Type::Enum + + ORIGINATION: :ORIGINATION + RECEIPT: :RECEIPT + + def self?.values: -> ::Array[Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::include_payment_type] + end + + type include_polarity = :CREDIT | :DEBIT + + module IncludePolarity + extend Lithic::Internal::Type::Enum + + CREDIT: :CREDIT + DEBIT: :DEBIT + + def self?.values: -> ::Array[Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::include_polarity] + end + + type include_status = + :PENDING + | :SETTLED + | :DECLINED + | :REVERSED + | :CANCELED + | :RETURNED + + module IncludeStatus + extend Lithic::Internal::Type::Enum + + PENDING: :PENDING + SETTLED: :SETTLED + DECLINED: :DECLINED + REVERSED: :REVERSED + CANCELED: :CANCELED + RETURNED: :RETURNED + + def self?.values: -> ::Array[Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::include_status] + end + + type result = :APPROVED | :DECLINED + + module Result + extend Lithic::Internal::Type::Enum + + APPROVED: :APPROVED + DECLINED: :DECLINED + + def self?.values: -> ::Array[Lithic::Models::AuthRules::RuleFeature::PaymentVelocityFeature::Filters::result] + end + end + end + type transaction_history_signals_feature = { scope: Lithic::Models::AuthRules::RuleFeature::TransactionHistorySignalsFeature::scope, @@ -239,6 +412,85 @@ module Lithic end end + type consecutive_declines_feature = + { + scope: Lithic::Models::AuthRules::RuleFeature::ConsecutiveDeclinesFeature::scope, + type: :CONSECUTIVE_DECLINES, + name: String + } + + class ConsecutiveDeclinesFeature < Lithic::Internal::Type::BaseModel + attr_accessor scope: Lithic::Models::AuthRules::RuleFeature::ConsecutiveDeclinesFeature::scope + + attr_accessor type: :CONSECUTIVE_DECLINES + + attr_reader name: String? + + def name=: (String) -> String + + def initialize: ( + scope: Lithic::Models::AuthRules::RuleFeature::ConsecutiveDeclinesFeature::scope, + ?name: String, + ?type: :CONSECUTIVE_DECLINES + ) -> void + + def to_hash: -> { + scope: Lithic::Models::AuthRules::RuleFeature::ConsecutiveDeclinesFeature::scope, + type: :CONSECUTIVE_DECLINES, + name: String + } + + type scope = :CARD | :ACCOUNT + + module Scope + extend Lithic::Internal::Type::Enum + + CARD: :CARD + ACCOUNT: :ACCOUNT + + def self?.values: -> ::Array[Lithic::Models::AuthRules::RuleFeature::ConsecutiveDeclinesFeature::scope] + end + end + + type ach_payment_history_feature = + { + scope: Lithic::Models::AuthRules::RuleFeature::ACHPaymentHistoryFeature::scope, + type: :ACH_PAYMENT_HISTORY, + name: String + } + + class ACHPaymentHistoryFeature < Lithic::Internal::Type::BaseModel + attr_accessor scope: Lithic::Models::AuthRules::RuleFeature::ACHPaymentHistoryFeature::scope + + attr_accessor type: :ACH_PAYMENT_HISTORY + + attr_reader name: String? + + def name=: (String) -> String + + def initialize: ( + scope: Lithic::Models::AuthRules::RuleFeature::ACHPaymentHistoryFeature::scope, + ?name: String, + ?type: :ACH_PAYMENT_HISTORY + ) -> void + + def to_hash: -> { + scope: Lithic::Models::AuthRules::RuleFeature::ACHPaymentHistoryFeature::scope, + type: :ACH_PAYMENT_HISTORY, + name: String + } + + type scope = :FINANCIAL_ACCOUNT + + module Scope + extend Lithic::Internal::Type::Enum + + FINANCIAL_ACCOUNT: :FINANCIAL_ACCOUNT + + def self?.values: -> ::Array[Lithic::Models::AuthRules::RuleFeature::ACHPaymentHistoryFeature::scope] + end + end + def self?.variants: -> ::Array[Lithic::Models::AuthRules::rule_feature] end end From 3e7437538418b55546b299a672c32f1520d72011 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 23 Jun 2026 12:18:06 +0000 Subject: [PATCH 3/3] release: 0.18.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/lithic/version.rb | 2 +- 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6db19b95..4ad3fef3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.17.0" + ".": "0.18.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 0efd8f60..1288b916 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 0.18.0 (2026-06-23) + +Full Changelog: [v0.17.0...v0.18.0](https://github.com/lithic-com/lithic-ruby/compare/v0.17.0...v0.18.0) + +### Features + +* **api:** Register dispute intake webhook events ([a087b3b](https://github.com/lithic-com/lithic-ruby/commit/a087b3bddff381d51dc2c6fa89cadae9855ac6a9)) + + +### Bug Fixes + +* **api:** Sync templated rule features with authorizer external feature set ([2812623](https://github.com/lithic-com/lithic-ruby/commit/2812623bab59b68a8a1de32b149153567fa5d3ea)) + ## 0.17.0 (2026-06-22) Full Changelog: [v0.16.0...v0.17.0](https://github.com/lithic-com/lithic-ruby/compare/v0.16.0...v0.17.0) diff --git a/Gemfile.lock b/Gemfile.lock index c4578b8e..3afffbfd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - lithic (0.17.0) + lithic (0.18.0) cgi connection_pool diff --git a/README.md b/README.md index f2e9e6de..45f01c1f 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "lithic", "~> 0.17.0" +gem "lithic", "~> 0.18.0" ``` diff --git a/lib/lithic/version.rb b/lib/lithic/version.rb index cc48d967..fc3aad92 100644 --- a/lib/lithic/version.rb +++ b/lib/lithic/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Lithic - VERSION = "0.17.0" + VERSION = "0.18.0" end