From e44230324af07930c8cc84b3035677df54bc031f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 May 2026 11:09:42 +0000 Subject: [PATCH 1/7] feat(api): Add created field to Challenge object --- .stats.yml | 4 +-- lib/lithic/models/card_authorization.rb | 28 ++++++++++------- rbi/lithic/models/card_authorization.rbi | 38 +++++++++++++----------- sig/lithic/models/card_authorization.rbs | 23 +++++++------- 4 files changed, 54 insertions(+), 39 deletions(-) diff --git a/.stats.yml b/.stats.yml index 29c3961c..c47d8ece 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-efe780032e44b3cf0f6914407e43bce6aa7176fa50aa6ec018f93c1f28af8490.yml -openapi_spec_hash: fcb4ca53ca59978f23f21d7c74fcc0b0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-af18ede440e3b8a8b15aa3831c5add93c25934cdb037a0c6128a4c4e82fe5d4f.yml +openapi_spec_hash: be9b3152e28212b685337a42ad1acf97 config_hash: a0a579b0564a5c18568a78f5ba2b6653 diff --git a/lib/lithic/models/card_authorization.rb b/lib/lithic/models/card_authorization.rb index 3f54f069..540983fe 100644 --- a/lib/lithic/models/card_authorization.rb +++ b/lib/lithic/models/card_authorization.rb @@ -793,6 +793,19 @@ module FleetRestrictionCode # @see Lithic::Models::CardAuthorization#latest_challenge class LatestChallenge < Lithic::Internal::Type::BaseModel + # @!attribute completed_at + # The date and time when the Authorization Challenge was completed in UTC. Filled + # only if the challenge has been completed. + # + # @return [Time, nil] + required :completed_at, Time, nil?: true + + # @!attribute created + # The date and time when the Authorization Challenge was created in UTC + # + # @return [Time] + required :created, Time + # @!attribute method_ # The method used to deliver the challenge to the cardholder # @@ -821,27 +834,22 @@ class LatestChallenge < Lithic::Internal::Type::BaseModel # @return [Symbol, Lithic::Models::CardAuthorization::LatestChallenge::Status] required :status, enum: -> { Lithic::CardAuthorization::LatestChallenge::Status } - # @!attribute completed_at - # The date and time when the Authorization Challenge was completed in UTC. Present - # only if the status is `COMPLETED`. - # - # @return [Time, nil] - optional :completed_at, Time - - # @!method initialize(method_:, phone_number:, status:, completed_at: nil) + # @!method initialize(completed_at:, created:, method_:, phone_number:, status:) # Some parameter documentations has been truncated, see # {Lithic::Models::CardAuthorization::LatestChallenge} for more details. # # The latest Authorization Challenge that was issued to the cardholder for this # merchant. # + # @param completed_at [Time, nil] The date and time when the Authorization Challenge was completed in UTC. Filled + # + # @param created [Time] The date and time when the Authorization Challenge was created in UTC + # # @param method_ [Symbol, Lithic::Models::CardAuthorization::LatestChallenge::Method] The method used to deliver the challenge to the cardholder # # @param phone_number [String, nil] The phone number used for sending the Authorization Challenge. Present only when # # @param status [Symbol, Lithic::Models::CardAuthorization::LatestChallenge::Status] The status of the Authorization Challenge - # - # @param completed_at [Time] The date and time when the Authorization Challenge was completed in UTC. Present # The method used to deliver the challenge to the cardholder # diff --git a/rbi/lithic/models/card_authorization.rbi b/rbi/lithic/models/card_authorization.rbi index 50830e84..7ca9b583 100644 --- a/rbi/lithic/models/card_authorization.rbi +++ b/rbi/lithic/models/card_authorization.rbi @@ -1381,6 +1381,15 @@ module Lithic ) end + # The date and time when the Authorization Challenge was completed in UTC. Filled + # only if the challenge has been completed. + sig { returns(T.nilable(Time)) } + attr_accessor :completed_at + + # The date and time when the Authorization Challenge was created in UTC + sig { returns(Time) } + attr_accessor :created + # The method used to deliver the challenge to the cardholder # # - `SMS` - Challenge was delivered via SMS @@ -1411,27 +1420,24 @@ module Lithic end attr_accessor :status - # The date and time when the Authorization Challenge was completed in UTC. Present - # only if the status is `COMPLETED`. - sig { returns(T.nilable(Time)) } - attr_reader :completed_at - - sig { params(completed_at: Time).void } - attr_writer :completed_at - # The latest Authorization Challenge that was issued to the cardholder for this # merchant. sig do params( + completed_at: T.nilable(Time), + created: Time, method_: Lithic::CardAuthorization::LatestChallenge::Method::OrSymbol, phone_number: T.nilable(String), - status: - Lithic::CardAuthorization::LatestChallenge::Status::OrSymbol, - completed_at: Time + status: Lithic::CardAuthorization::LatestChallenge::Status::OrSymbol ).returns(T.attached_class) end def self.new( + # The date and time when the Authorization Challenge was completed in UTC. Filled + # only if the challenge has been completed. + completed_at:, + # The date and time when the Authorization Challenge was created in UTC + created:, # The method used to deliver the challenge to the cardholder # # - `SMS` - Challenge was delivered via SMS @@ -1447,22 +1453,20 @@ module Lithic # - `PENDING` - Challenge is still open # - `EXPIRED` - Challenge has expired without being completed # - `ERROR` - There was an error processing the challenge - status:, - # The date and time when the Authorization Challenge was completed in UTC. Present - # only if the status is `COMPLETED`. - completed_at: nil + status: ) end sig do override.returns( { + completed_at: T.nilable(Time), + created: Time, method_: Lithic::CardAuthorization::LatestChallenge::Method::TaggedSymbol, phone_number: T.nilable(String), status: - Lithic::CardAuthorization::LatestChallenge::Status::TaggedSymbol, - completed_at: Time + Lithic::CardAuthorization::LatestChallenge::Status::TaggedSymbol } ) end diff --git a/sig/lithic/models/card_authorization.rbs b/sig/lithic/models/card_authorization.rbs index 948ebba7..dbc049cc 100644 --- a/sig/lithic/models/card_authorization.rbs +++ b/sig/lithic/models/card_authorization.rbs @@ -588,35 +588,38 @@ module Lithic type latest_challenge = { + completed_at: Time?, + created: Time, method_: Lithic::Models::CardAuthorization::LatestChallenge::method_, phone_number: String?, - status: Lithic::Models::CardAuthorization::LatestChallenge::status, - completed_at: Time + status: Lithic::Models::CardAuthorization::LatestChallenge::status } class LatestChallenge < Lithic::Internal::Type::BaseModel + attr_accessor completed_at: Time? + + attr_accessor created: Time + attr_accessor method_: Lithic::Models::CardAuthorization::LatestChallenge::method_ attr_accessor phone_number: String? attr_accessor status: Lithic::Models::CardAuthorization::LatestChallenge::status - attr_reader completed_at: Time? - - def completed_at=: (Time) -> Time - def initialize: ( + completed_at: Time?, + created: Time, method_: Lithic::Models::CardAuthorization::LatestChallenge::method_, phone_number: String?, - status: Lithic::Models::CardAuthorization::LatestChallenge::status, - ?completed_at: Time + status: Lithic::Models::CardAuthorization::LatestChallenge::status ) -> void def to_hash: -> { + completed_at: Time?, + created: Time, method_: Lithic::Models::CardAuthorization::LatestChallenge::method_, phone_number: String?, - status: Lithic::Models::CardAuthorization::LatestChallenge::status, - completed_at: Time + status: Lithic::Models::CardAuthorization::LatestChallenge::status } type method_ = :SMS | :OUT_OF_BAND From bd7f67927187e7daa99059f5e9190c1df79424c3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 May 2026 18:30:19 +0000 Subject: [PATCH 2/7] docs(api): update support contact from email to URL in account/card resources --- .stats.yml | 4 ++-- lib/lithic/models/account.rb | 4 ++-- lib/lithic/models/card.rb | 2 +- lib/lithic/resources/cards.rb | 4 ++-- rbi/lithic/models/account.rbi | 6 +++--- rbi/lithic/models/card.rbi | 4 ++-- rbi/lithic/resources/cards.rbi | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.stats.yml b/.stats.yml index c47d8ece..3a379657 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-af18ede440e3b8a8b15aa3831c5add93c25934cdb037a0c6128a4c4e82fe5d4f.yml -openapi_spec_hash: be9b3152e28212b685337a42ad1acf97 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-c1cfc621309e4d49899f9b055c399d7ad3eb24c05bad299322c1e03804d3d130.yml +openapi_spec_hash: 799d9da903ff2e4d51fe3f1566d17c92 config_hash: a0a579b0564a5c18568a78f5ba2b6653 diff --git a/lib/lithic/models/account.rb b/lib/lithic/models/account.rb index 8a8c7c61..1e118c7e 100644 --- a/lib/lithic/models/account.rb +++ b/lib/lithic/models/account.rb @@ -38,7 +38,7 @@ class Account < Lithic::Internal::Type::BaseModel # accounts are unable to be transitioned to `ACTIVE` or `PAUSED` states. # Accounts can be manually set to `CLOSED`, or this can be done by Lithic due to # failure to pass KYB/KYC or for risk/compliance reasons. Please contact - # [support@lithic.com](mailto:support@lithic.com) if you believe this was done + # [support.lithic.com](https://support.lithic.com/) if you believe this was done # by mistake. # # @return [Symbol, Lithic::Models::Account::State] @@ -177,7 +177,7 @@ class SpendLimit < Lithic::Internal::Type::BaseModel # accounts are unable to be transitioned to `ACTIVE` or `PAUSED` states. # Accounts can be manually set to `CLOSED`, or this can be done by Lithic due to # failure to pass KYB/KYC or for risk/compliance reasons. Please contact - # [support@lithic.com](mailto:support@lithic.com) if you believe this was done + # [support.lithic.com](https://support.lithic.com/) if you believe this was done # by mistake. # # @see Lithic::Models::Account#state diff --git a/lib/lithic/models/card.rb b/lib/lithic/models/card.rb index 75c62148..cf117a9b 100644 --- a/lib/lithic/models/card.rb +++ b/lib/lithic/models/card.rb @@ -13,7 +13,7 @@ class Card < Lithic::Models::NonPCICard # @!attribute pan # Primary Account Number (PAN) (i.e. the card number). Customers must be PCI # compliant to have PAN returned as a field in production. Please contact - # support@lithic.com for questions. + # https://support.lithic.com/ for questions. # # @return [String, nil] optional :pan, String diff --git a/lib/lithic/resources/cards.rb b/lib/lithic/resources/cards.rb index 029ef58d..7eb72a22 100644 --- a/lib/lithic/resources/cards.rb +++ b/lib/lithic/resources/cards.rb @@ -453,8 +453,8 @@ def retrieve_spend_limits(card_token, params = {}) # Get card configuration such as spend limit and state. Customers must be PCI # compliant to use this endpoint. Please contact - # [support@lithic.com](mailto:support@lithic.com) for questions. _Note: this is a - # `POST` endpoint because it is more secure to send sensitive data in a request + # [support.lithic.com](https://support.lithic.com/) for questions. _Note: this is + # a `POST` endpoint because it is more secure to send sensitive data in a request # body than in a URL._ # # @overload search_by_pan(pan:, request_options: {}) diff --git a/rbi/lithic/models/account.rbi b/rbi/lithic/models/account.rbi index 73441f0a..d94090bb 100644 --- a/rbi/lithic/models/account.rbi +++ b/rbi/lithic/models/account.rbi @@ -36,7 +36,7 @@ module Lithic # accounts are unable to be transitioned to `ACTIVE` or `PAUSED` states. # Accounts can be manually set to `CLOSED`, or this can be done by Lithic due to # failure to pass KYB/KYC or for risk/compliance reasons. Please contact - # [support@lithic.com](mailto:support@lithic.com) if you believe this was done + # [support.lithic.com](https://support.lithic.com/) if you believe this was done # by mistake. sig { returns(Lithic::Account::State::TaggedSymbol) } attr_accessor :state @@ -149,7 +149,7 @@ module Lithic # accounts are unable to be transitioned to `ACTIVE` or `PAUSED` states. # Accounts can be manually set to `CLOSED`, or this can be done by Lithic due to # failure to pass KYB/KYC or for risk/compliance reasons. Please contact - # [support@lithic.com](mailto:support@lithic.com) if you believe this was done + # [support.lithic.com](https://support.lithic.com/) if you believe this was done # by mistake. state:, account_holder: nil, @@ -269,7 +269,7 @@ module Lithic # accounts are unable to be transitioned to `ACTIVE` or `PAUSED` states. # Accounts can be manually set to `CLOSED`, or this can be done by Lithic due to # failure to pass KYB/KYC or for risk/compliance reasons. Please contact - # [support@lithic.com](mailto:support@lithic.com) if you believe this was done + # [support.lithic.com](https://support.lithic.com/) if you believe this was done # by mistake. module State extend Lithic::Internal::Type::Enum diff --git a/rbi/lithic/models/card.rbi b/rbi/lithic/models/card.rbi index e7c510f5..61acefb0 100644 --- a/rbi/lithic/models/card.rbi +++ b/rbi/lithic/models/card.rbi @@ -14,7 +14,7 @@ module Lithic # Primary Account Number (PAN) (i.e. the card number). Customers must be PCI # compliant to have PAN returned as a field in production. Please contact - # support@lithic.com for questions. + # https://support.lithic.com/ for questions. sig { returns(T.nilable(String)) } attr_reader :pan @@ -28,7 +28,7 @@ module Lithic cvv: nil, # Primary Account Number (PAN) (i.e. the card number). Customers must be PCI # compliant to have PAN returned as a field in production. Please contact - # support@lithic.com for questions. + # https://support.lithic.com/ for questions. pan: nil ) end diff --git a/rbi/lithic/resources/cards.rbi b/rbi/lithic/resources/cards.rbi index 73ea5372..dacf2039 100644 --- a/rbi/lithic/resources/cards.rbi +++ b/rbi/lithic/resources/cards.rbi @@ -624,8 +624,8 @@ module Lithic # Get card configuration such as spend limit and state. Customers must be PCI # compliant to use this endpoint. Please contact - # [support@lithic.com](mailto:support@lithic.com) for questions. _Note: this is a - # `POST` endpoint because it is more secure to send sensitive data in a request + # [support.lithic.com](https://support.lithic.com/) for questions. _Note: this is + # a `POST` endpoint because it is more secure to send sensitive data in a request # body than in a URL._ sig do params( From 5747fda7c1065d257bc60d03e770f66be8677d48 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 4 Jun 2026 22:44:44 +0000 Subject: [PATCH 3/7] feat(api): add NVS name_validation fields to ASA request and response --- .stats.yml | 4 +- lib/lithic/models/card_authorization.rb | 100 +++++++++- rbi/lithic/models/card_authorization.rbi | 225 +++++++++++++++++++++++ sig/lithic/models/card_authorization.rbs | 71 +++++++ 4 files changed, 397 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3a379657..6345d62b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-c1cfc621309e4d49899f9b055c399d7ad3eb24c05bad299322c1e03804d3d130.yml -openapi_spec_hash: 799d9da903ff2e4d51fe3f1566d17c92 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-841a8ecd13fc28d3df06e6e11f63df6106be819aad9fe3dd6637afd7bc142a56.yml +openapi_spec_hash: 705fb3eb9dc54e3b2b542896154cff80 config_hash: a0a579b0564a5c18568a78f5ba2b6653 diff --git a/lib/lithic/models/card_authorization.rb b/lib/lithic/models/card_authorization.rb index 540983fe..b77e9ec0 100644 --- a/lib/lithic/models/card_authorization.rb +++ b/lib/lithic/models/card_authorization.rb @@ -110,6 +110,14 @@ class CardAuthorization < Lithic::Internal::Type::BaseModel # @return [String] required :merchant_currency, String + # @!attribute name_validation + # Network name validation data, present when the card network requested name + # validation for this transaction. Contains the cardholder name provided by the + # network and Lithic's computed match result against KYC data on file. + # + # @return [Lithic::Models::CardAuthorization::NameValidation, nil] + required :name_validation, -> { Lithic::CardAuthorization::NameValidation }, nil?: true + # @!attribute service_location # Where the cardholder received the service, when different from the card acceptor # location. This is populated from network data elements such as Mastercard DE-122 @@ -233,7 +241,7 @@ class CardAuthorization < Lithic::Internal::Type::BaseModel # @return [Time, nil] optional :ttl, Time - # @!method initialize(token:, acquirer_fee:, amount:, amounts:, authorization_amount:, avs:, card:, cardholder_currency:, cash_amount:, created:, merchant:, merchant_amount:, merchant_currency:, service_location:, settled_amount:, status:, transaction_initiator:, account_type: nil, cardholder_authentication: nil, cashback: nil, conversion_rate: nil, event_token: nil, fleet_info: nil, latest_challenge: nil, network: nil, network_risk_score: nil, network_specific_data: nil, pos: nil, token_info: nil, ttl: nil) + # @!method initialize(token:, acquirer_fee:, amount:, amounts:, authorization_amount:, avs:, card:, cardholder_currency:, cash_amount:, created:, merchant:, merchant_amount:, merchant_currency:, name_validation:, service_location:, settled_amount:, status:, transaction_initiator:, account_type: nil, cardholder_authentication: nil, cashback: nil, conversion_rate: nil, event_token: nil, fleet_info: nil, latest_challenge: nil, network: nil, network_risk_score: nil, network_specific_data: nil, pos: nil, token_info: nil, ttl: nil) # Some parameter documentations has been truncated, see # {Lithic::Models::CardAuthorization} for more details. # @@ -265,6 +273,8 @@ class CardAuthorization < Lithic::Internal::Type::BaseModel # # @param merchant_currency [String] 3-character alphabetic ISO 4217 code for the local currency of the transaction. # + # @param name_validation [Lithic::Models::CardAuthorization::NameValidation, nil] Network name validation data, present when the card network requested name valid + # # @param service_location [Lithic::Models::CardAuthorization::ServiceLocation, nil] Where the cardholder received the service, when different from the card acceptor # # @param settled_amount [Integer] Deprecated, use `amounts`. Amount (in cents) of the transaction that has been se @@ -623,6 +633,94 @@ class Merchant < Lithic::Models::Merchant # @param street_address [String, nil] Street address of card acceptor. end + # @see Lithic::Models::CardAuthorization#name_validation + class NameValidation < Lithic::Internal::Type::BaseModel + # @!attribute name + # Cardholder name as provided by the card network. + # + # @return [Lithic::Models::CardAuthorization::NameValidation::Name] + required :name, -> { Lithic::CardAuthorization::NameValidation::Name } + + # @!attribute name_on_file_match + # Lithic's computed match result comparing the network-provided name to the name + # on file. + # + # @return [Lithic::Models::CardAuthorization::NameValidation::NameOnFileMatch] + required :name_on_file_match, -> { Lithic::CardAuthorization::NameValidation::NameOnFileMatch } + + # @!method initialize(name:, name_on_file_match:) + # Some parameter documentations has been truncated, see + # {Lithic::Models::CardAuthorization::NameValidation} for more details. + # + # Network name validation data, present when the card network requested name + # validation for this transaction. Contains the cardholder name provided by the + # network and Lithic's computed match result against KYC data on file. + # + # @param name [Lithic::Models::CardAuthorization::NameValidation::Name] Cardholder name as provided by the card network. + # + # @param name_on_file_match [Lithic::Models::CardAuthorization::NameValidation::NameOnFileMatch] Lithic's computed match result comparing the network-provided name to the name o + + # @see Lithic::Models::CardAuthorization::NameValidation#name + class Name < Lithic::Internal::Type::BaseModel + # @!attribute first + # First name + # + # @return [String] + required :first, String + + # @!attribute last + # Last name + # + # @return [String] + required :last, String + + # @!attribute middle + # Middle name + # + # @return [String, nil] + required :middle, String, nil?: true + + # @!method initialize(first:, last:, middle:) + # Cardholder name as provided by the card network. + # + # @param first [String] First name + # + # @param last [String] Last name + # + # @param middle [String, nil] Middle name + end + + # @see Lithic::Models::CardAuthorization::NameValidation#name_on_file_match + class NameOnFileMatch < Lithic::Internal::Type::BaseModel + # @!attribute full_name + # Overall name match result. + # + # @return [Symbol, Lithic::Models::CardAuthorization::NameValidation::NameOnFileMatch::FullName] + required :full_name, enum: -> { Lithic::CardAuthorization::NameValidation::NameOnFileMatch::FullName } + + # @!method initialize(full_name:) + # Lithic's computed match result comparing the network-provided name to the name + # on file. + # + # @param full_name [Symbol, Lithic::Models::CardAuthorization::NameValidation::NameOnFileMatch::FullName] Overall name match result. + + # Overall name match result. + # + # @see Lithic::Models::CardAuthorization::NameValidation::NameOnFileMatch#full_name + module FullName + extend Lithic::Internal::Type::Enum + + MATCH = :MATCH + PARTIAL_MATCH = :PARTIAL_MATCH + NO_MATCH = :NO_MATCH + UNVERIFIED = :UNVERIFIED + + # @!method self.values + # @return [Array] + end + end + end + # @see Lithic::Models::CardAuthorization#service_location class ServiceLocation < Lithic::Internal::Type::BaseModel # @!attribute city diff --git a/rbi/lithic/models/card_authorization.rbi b/rbi/lithic/models/card_authorization.rbi index 7ca9b583..f068d17e 100644 --- a/rbi/lithic/models/card_authorization.rbi +++ b/rbi/lithic/models/card_authorization.rbi @@ -91,6 +91,20 @@ module Lithic sig { returns(String) } attr_accessor :merchant_currency + # Network name validation data, present when the card network requested name + # validation for this transaction. Contains the cardholder name provided by the + # network and Lithic's computed match result against KYC data on file. + sig { returns(T.nilable(Lithic::CardAuthorization::NameValidation)) } + attr_reader :name_validation + + sig do + params( + name_validation: + T.nilable(Lithic::CardAuthorization::NameValidation::OrHash) + ).void + end + attr_writer :name_validation + # Where the cardholder received the service, when different from the card acceptor # location. This is populated from network data elements such as Mastercard DE-122 # SE1 SF9-14 and Visa F34 DS02. @@ -263,6 +277,8 @@ module Lithic merchant: Lithic::CardAuthorization::Merchant::OrHash, merchant_amount: Integer, merchant_currency: String, + name_validation: + T.nilable(Lithic::CardAuthorization::NameValidation::OrHash), service_location: T.nilable(Lithic::CardAuthorization::ServiceLocation::OrHash), settled_amount: Integer, @@ -331,6 +347,10 @@ module Lithic merchant_amount:, # 3-character alphabetic ISO 4217 code for the local currency of the transaction. merchant_currency:, + # Network name validation data, present when the card network requested name + # validation for this transaction. Contains the cardholder name provided by the + # network and Lithic's computed match result against KYC data on file. + name_validation:, # Where the cardholder received the service, when different from the card acceptor # location. This is populated from network data elements such as Mastercard DE-122 # SE1 SF9-14 and Visa F34 DS02. @@ -401,6 +421,8 @@ module Lithic merchant: Lithic::CardAuthorization::Merchant, merchant_amount: Integer, merchant_currency: String, + name_validation: + T.nilable(Lithic::CardAuthorization::NameValidation), service_location: T.nilable(Lithic::CardAuthorization::ServiceLocation), settled_amount: Integer, @@ -1042,6 +1064,209 @@ module Lithic end end + class NameValidation < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::CardAuthorization::NameValidation, + Lithic::Internal::AnyHash + ) + end + + # Cardholder name as provided by the card network. + sig { returns(Lithic::CardAuthorization::NameValidation::Name) } + attr_reader :name + + sig do + params( + name: Lithic::CardAuthorization::NameValidation::Name::OrHash + ).void + end + attr_writer :name + + # Lithic's computed match result comparing the network-provided name to the name + # on file. + sig do + returns(Lithic::CardAuthorization::NameValidation::NameOnFileMatch) + end + attr_reader :name_on_file_match + + sig do + params( + name_on_file_match: + Lithic::CardAuthorization::NameValidation::NameOnFileMatch::OrHash + ).void + end + attr_writer :name_on_file_match + + # Network name validation data, present when the card network requested name + # validation for this transaction. Contains the cardholder name provided by the + # network and Lithic's computed match result against KYC data on file. + sig do + params( + name: Lithic::CardAuthorization::NameValidation::Name::OrHash, + name_on_file_match: + Lithic::CardAuthorization::NameValidation::NameOnFileMatch::OrHash + ).returns(T.attached_class) + end + def self.new( + # Cardholder name as provided by the card network. + name:, + # Lithic's computed match result comparing the network-provided name to the name + # on file. + name_on_file_match: + ) + end + + sig do + override.returns( + { + name: Lithic::CardAuthorization::NameValidation::Name, + name_on_file_match: + Lithic::CardAuthorization::NameValidation::NameOnFileMatch + } + ) + end + def to_hash + end + + class Name < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::CardAuthorization::NameValidation::Name, + Lithic::Internal::AnyHash + ) + end + + # First name + sig { returns(String) } + attr_accessor :first + + # Last name + sig { returns(String) } + attr_accessor :last + + # Middle name + sig { returns(T.nilable(String)) } + attr_accessor :middle + + # Cardholder name as provided by the card network. + sig do + params( + first: String, + last: String, + middle: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # First name + first:, + # Last name + last:, + # Middle name + middle: + ) + end + + sig do + override.returns( + { first: String, last: String, middle: T.nilable(String) } + ) + end + def to_hash + end + end + + class NameOnFileMatch < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::CardAuthorization::NameValidation::NameOnFileMatch, + Lithic::Internal::AnyHash + ) + end + + # Overall name match result. + sig do + returns( + Lithic::CardAuthorization::NameValidation::NameOnFileMatch::FullName::TaggedSymbol + ) + end + attr_accessor :full_name + + # Lithic's computed match result comparing the network-provided name to the name + # on file. + sig do + params( + full_name: + Lithic::CardAuthorization::NameValidation::NameOnFileMatch::FullName::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # Overall name match result. + full_name: + ) + end + + sig do + override.returns( + { + full_name: + Lithic::CardAuthorization::NameValidation::NameOnFileMatch::FullName::TaggedSymbol + } + ) + end + def to_hash + end + + # Overall name match result. + module FullName + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::CardAuthorization::NameValidation::NameOnFileMatch::FullName + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + MATCH = + T.let( + :MATCH, + Lithic::CardAuthorization::NameValidation::NameOnFileMatch::FullName::TaggedSymbol + ) + PARTIAL_MATCH = + T.let( + :PARTIAL_MATCH, + Lithic::CardAuthorization::NameValidation::NameOnFileMatch::FullName::TaggedSymbol + ) + NO_MATCH = + T.let( + :NO_MATCH, + Lithic::CardAuthorization::NameValidation::NameOnFileMatch::FullName::TaggedSymbol + ) + UNVERIFIED = + T.let( + :UNVERIFIED, + Lithic::CardAuthorization::NameValidation::NameOnFileMatch::FullName::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::CardAuthorization::NameValidation::NameOnFileMatch::FullName::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + class ServiceLocation < Lithic::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/sig/lithic/models/card_authorization.rbs b/sig/lithic/models/card_authorization.rbs index dbc049cc..3e3653d1 100644 --- a/sig/lithic/models/card_authorization.rbs +++ b/sig/lithic/models/card_authorization.rbs @@ -15,6 +15,7 @@ module Lithic merchant: Lithic::CardAuthorization::Merchant, merchant_amount: Integer, merchant_currency: String, + name_validation: Lithic::CardAuthorization::NameValidation?, service_location: Lithic::CardAuthorization::ServiceLocation?, settled_amount: Integer, status: Lithic::Models::CardAuthorization::status, @@ -61,6 +62,8 @@ module Lithic attr_accessor merchant_currency: String + attr_accessor name_validation: Lithic::CardAuthorization::NameValidation? + attr_accessor service_location: Lithic::CardAuthorization::ServiceLocation? attr_accessor settled_amount: Integer @@ -137,6 +140,7 @@ module Lithic merchant: Lithic::CardAuthorization::Merchant, merchant_amount: Integer, merchant_currency: String, + name_validation: Lithic::CardAuthorization::NameValidation?, service_location: Lithic::CardAuthorization::ServiceLocation?, settled_amount: Integer, status: Lithic::Models::CardAuthorization::status, @@ -170,6 +174,7 @@ module Lithic merchant: Lithic::CardAuthorization::Merchant, merchant_amount: Integer, merchant_currency: String, + name_validation: Lithic::CardAuthorization::NameValidation?, service_location: Lithic::CardAuthorization::ServiceLocation?, settled_amount: Integer, status: Lithic::Models::CardAuthorization::status, @@ -452,6 +457,72 @@ module Lithic } end + type name_validation = + { + name: Lithic::CardAuthorization::NameValidation::Name, + name_on_file_match: Lithic::CardAuthorization::NameValidation::NameOnFileMatch + } + + class NameValidation < Lithic::Internal::Type::BaseModel + attr_accessor name: Lithic::CardAuthorization::NameValidation::Name + + attr_accessor name_on_file_match: Lithic::CardAuthorization::NameValidation::NameOnFileMatch + + def initialize: ( + name: Lithic::CardAuthorization::NameValidation::Name, + name_on_file_match: Lithic::CardAuthorization::NameValidation::NameOnFileMatch + ) -> void + + def to_hash: -> { + name: Lithic::CardAuthorization::NameValidation::Name, + name_on_file_match: Lithic::CardAuthorization::NameValidation::NameOnFileMatch + } + + type name_ = { first: String, last: String, middle: String? } + + class Name < Lithic::Internal::Type::BaseModel + attr_accessor first: String + + attr_accessor last: String + + attr_accessor middle: String? + + def initialize: (first: String, last: String, middle: String?) -> void + + def to_hash: -> { first: String, last: String, middle: String? } + end + + type name_on_file_match = + { + full_name: Lithic::Models::CardAuthorization::NameValidation::NameOnFileMatch::full_name + } + + class NameOnFileMatch < Lithic::Internal::Type::BaseModel + attr_accessor full_name: Lithic::Models::CardAuthorization::NameValidation::NameOnFileMatch::full_name + + def initialize: ( + full_name: Lithic::Models::CardAuthorization::NameValidation::NameOnFileMatch::full_name + ) -> void + + def to_hash: -> { + full_name: Lithic::Models::CardAuthorization::NameValidation::NameOnFileMatch::full_name + } + + type full_name = :MATCH | :PARTIAL_MATCH | :NO_MATCH | :UNVERIFIED + + module FullName + extend Lithic::Internal::Type::Enum + + MATCH: :MATCH + PARTIAL_MATCH: :PARTIAL_MATCH + NO_MATCH: :NO_MATCH + UNVERIFIED: :UNVERIFIED + + def self?.values: -> ::Array[Lithic::Models::CardAuthorization::NameValidation::NameOnFileMatch::full_name] + end + end + end + type service_location = { city: String?, From bae640faf01eef0b956cb24eaa73f92c40536082 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 5 Jun 2026 06:55:37 +0000 Subject: [PATCH 4/7] feat(api): add hold_adjustment_action variant to auth_rules action parameter --- .stats.yml | 4 +- ...nal_authorization_adjustment_parameters.rb | 38 ++++++------ ...al_authorization_adjustment_parameters.rbi | 58 +++++++++---------- ...al_authorization_adjustment_parameters.rbs | 32 +++++----- 4 files changed, 65 insertions(+), 67 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6345d62b..91f0a5b3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-841a8ecd13fc28d3df06e6e11f63df6106be819aad9fe3dd6637afd7bc142a56.yml -openapi_spec_hash: 705fb3eb9dc54e3b2b542896154cff80 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-93254f6abf9fab9e687be2f48198b5126c298b634e2ad626abf413f560f1cbe1.yml +openapi_spec_hash: 6aaac55fbf96d785ca3867adc3c7ca0e config_hash: a0a579b0564a5c18568a78f5ba2b6653 diff --git a/lib/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rb b/lib/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rb index 8b117e49..6f6178fc 100644 --- a/lib/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rb +++ b/lib/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rb @@ -4,11 +4,11 @@ module Lithic module Models module AuthRules class ConditionalAuthorizationAdjustmentParameters < Lithic::Internal::Type::BaseModel - # @!attribute adjustment - # The hold adjustment to apply if the conditions are met + # @!attribute action + # The hold adjustment to apply if the conditions are met. # - # @return [Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment] - required :adjustment, -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment } + # @return [Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action] + required :action, -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action } # @!attribute conditions # @@ -16,13 +16,13 @@ class ConditionalAuthorizationAdjustmentParameters < Lithic::Internal::Type::Bas required :conditions, -> { Lithic::Internal::Type::ArrayOf[Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition] } - # @!method initialize(adjustment:, conditions:) - # @param adjustment [Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment] The hold adjustment to apply if the conditions are met + # @!method initialize(action:, conditions:) + # @param action [Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action] The hold adjustment to apply if the conditions are met. # # @param conditions [Array] - # @see Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters#adjustment - class Adjustment < Lithic::Internal::Type::BaseModel + # @see Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters#action + class Action < Lithic::Internal::Type::BaseModel # @!attribute mode # The mode of the hold adjustment, determining how the value is interpreted: # @@ -31,16 +31,14 @@ class Adjustment < Lithic::Internal::Type::BaseModel # represents a 10% increase, 0 represents no change. # - `ADD_AMOUNT`: The value is added to the hold amount in cents. # - # @return [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Mode] - required :mode, - enum: -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Mode } + # @return [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::Mode] + required :mode, enum: -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::Mode } # @!attribute type # The type of adjustment to apply # - # @return [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Type] - required :type, - enum: -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Type } + # @return [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::Type] + required :type, enum: -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::Type } # @!attribute value # The value used for the hold adjustment, interpreted based on the mode @@ -50,14 +48,14 @@ class Adjustment < Lithic::Internal::Type::BaseModel # @!method initialize(mode:, type:, value:) # Some parameter documentations has been truncated, see - # {Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment} + # {Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action} # for more details. # - # The hold adjustment to apply if the conditions are met + # The hold adjustment to apply if the conditions are met. # - # @param mode [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Mode] The mode of the hold adjustment, determining how the value is interpreted: + # @param mode [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::Mode] The mode of the hold adjustment, determining how the value is interpreted: # - # @param type [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Type] The type of adjustment to apply + # @param type [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::Type] The type of adjustment to apply # # @param value [Integer] The value used for the hold adjustment, interpreted based on the mode @@ -68,7 +66,7 @@ class Adjustment < Lithic::Internal::Type::BaseModel # represents a 10% increase, 0 represents no change. # - `ADD_AMOUNT`: The value is added to the hold amount in cents. # - # @see Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment#mode + # @see Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action#mode module Mode extend Lithic::Internal::Type::Enum @@ -82,7 +80,7 @@ module Mode # The type of adjustment to apply # - # @see Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment#type + # @see Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action#type module Type extend Lithic::Internal::Type::Enum diff --git a/rbi/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbi b/rbi/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbi index 0d98b214..0eedd3bc 100644 --- a/rbi/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbi +++ b/rbi/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbi @@ -12,21 +12,21 @@ module Lithic ) end - # The hold adjustment to apply if the conditions are met + # The hold adjustment to apply if the conditions are met. sig do returns( - Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action ) end - attr_reader :adjustment + attr_reader :action sig do params( - adjustment: - Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::OrHash + action: + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::OrHash ).void end - attr_writer :adjustment + attr_writer :action sig do returns( @@ -39,8 +39,8 @@ module Lithic sig do params( - adjustment: - Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::OrHash, + action: + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::OrHash, conditions: T::Array[ Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::OrHash @@ -48,8 +48,8 @@ module Lithic ).returns(T.attached_class) end def self.new( - # The hold adjustment to apply if the conditions are met - adjustment:, + # The hold adjustment to apply if the conditions are met. + action:, conditions: ) end @@ -57,8 +57,8 @@ module Lithic sig do override.returns( { - adjustment: - Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment, + action: + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action, conditions: T::Array[ Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition @@ -69,11 +69,11 @@ module Lithic def to_hash end - class Adjustment < Lithic::Internal::Type::BaseModel + class Action < Lithic::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action, Lithic::Internal::AnyHash ) end @@ -86,7 +86,7 @@ module Lithic # - `ADD_AMOUNT`: The value is added to the hold amount in cents. sig do returns( - Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Mode::OrSymbol + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::Mode::OrSymbol ) end attr_accessor :mode @@ -94,7 +94,7 @@ module Lithic # The type of adjustment to apply sig do returns( - Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Type::OrSymbol + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::Type::OrSymbol ) end attr_accessor :type @@ -103,13 +103,13 @@ module Lithic sig { returns(Integer) } attr_accessor :value - # The hold adjustment to apply if the conditions are met + # The hold adjustment to apply if the conditions are met. sig do params( mode: - Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Mode::OrSymbol, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::Mode::OrSymbol, type: - Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Type::OrSymbol, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::Type::OrSymbol, value: Integer ).returns(T.attached_class) end @@ -132,9 +132,9 @@ module Lithic override.returns( { mode: - Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Mode::OrSymbol, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::Mode::OrSymbol, type: - Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Type::OrSymbol, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::Type::OrSymbol, value: Integer } ) @@ -155,7 +155,7 @@ module Lithic T.type_alias do T.all( Symbol, - Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Mode + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::Mode ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -163,23 +163,23 @@ module Lithic REPLACE_WITH_AMOUNT = T.let( :REPLACE_WITH_AMOUNT, - Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Mode::TaggedSymbol + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::Mode::TaggedSymbol ) ADD_PERCENTAGE = T.let( :ADD_PERCENTAGE, - Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Mode::TaggedSymbol + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::Mode::TaggedSymbol ) ADD_AMOUNT = T.let( :ADD_AMOUNT, - Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Mode::TaggedSymbol + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::Mode::TaggedSymbol ) sig do override.returns( T::Array[ - Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Mode::TaggedSymbol + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::Mode::TaggedSymbol ] ) end @@ -195,7 +195,7 @@ module Lithic T.type_alias do T.all( Symbol, - Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Type + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::Type ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -203,13 +203,13 @@ module Lithic HOLD_ADJUSTMENT = T.let( :HOLD_ADJUSTMENT, - Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Type::TaggedSymbol + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::Type::TaggedSymbol ) sig do override.returns( T::Array[ - Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Type::TaggedSymbol + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::Type::TaggedSymbol ] ) end diff --git a/sig/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbs b/sig/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbs index 78663ca9..0a353c6b 100644 --- a/sig/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbs +++ b/sig/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbs @@ -3,48 +3,48 @@ module Lithic module AuthRules type conditional_authorization_adjustment_parameters = { - adjustment: Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment, + action: Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action, conditions: ::Array[Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition] } class ConditionalAuthorizationAdjustmentParameters < Lithic::Internal::Type::BaseModel - attr_accessor adjustment: Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment + attr_accessor action: Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action attr_accessor conditions: ::Array[Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition] def initialize: ( - adjustment: Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment, + action: Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action, conditions: ::Array[Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition] ) -> void def to_hash: -> { - adjustment: Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment, + action: Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action, conditions: ::Array[Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition] } - type adjustment = + type action = { - mode: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::mode, - type: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::type_, + mode: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::mode, + type: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::type_, value: Integer } - class Adjustment < Lithic::Internal::Type::BaseModel - attr_accessor mode: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::mode + class Action < Lithic::Internal::Type::BaseModel + attr_accessor mode: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::mode - attr_accessor type: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::type_ + attr_accessor type: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::type_ attr_accessor value: Integer def initialize: ( - mode: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::mode, - type: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::type_, + mode: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::mode, + type: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::type_, value: Integer ) -> void def to_hash: -> { - mode: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::mode, - type: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::type_, + mode: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::mode, + type: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::type_, value: Integer } @@ -57,7 +57,7 @@ module Lithic ADD_PERCENTAGE: :ADD_PERCENTAGE ADD_AMOUNT: :ADD_AMOUNT - def self?.values: -> ::Array[Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::mode] + def self?.values: -> ::Array[Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::mode] end type type_ = :HOLD_ADJUSTMENT @@ -67,7 +67,7 @@ module Lithic HOLD_ADJUSTMENT: :HOLD_ADJUSTMENT - def self?.values: -> ::Array[Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::type_] + def self?.values: -> ::Array[Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Action::type_] end end From 71ab28b5af8e6118b2133bc8ed190520b6be2396 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 9 Jun 2026 00:42:53 +0000 Subject: [PATCH 5/7] feat(api): add day_of_period field to loan_tape --- .stats.yml | 4 ++-- lib/lithic/models/financial_accounts/loan_tape.rb | 10 +++++++++- rbi/lithic/models/financial_accounts/loan_tape.rbi | 8 ++++++++ sig/lithic/models/financial_accounts/loan_tape.rbs | 5 +++++ .../resources/financial_accounts/loan_tapes_test.rb | 2 ++ 5 files changed, 26 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 91f0a5b3..17fba7ce 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-93254f6abf9fab9e687be2f48198b5126c298b634e2ad626abf413f560f1cbe1.yml -openapi_spec_hash: 6aaac55fbf96d785ca3867adc3c7ca0e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-99f95bae0a9466a3c3032c867cae9878877c1602f2d68c2441813ce2c8dc8f87.yml +openapi_spec_hash: 047fd5b9c00f6acddd3e4f5dc203a4ed config_hash: a0a579b0564a5c18568a78f5ba2b6653 diff --git a/lib/lithic/models/financial_accounts/loan_tape.rb b/lib/lithic/models/financial_accounts/loan_tape.rb index cb8f4c2e..ba2ae2d1 100644 --- a/lib/lithic/models/financial_accounts/loan_tape.rb +++ b/lib/lithic/models/financial_accounts/loan_tape.rb @@ -126,13 +126,19 @@ class LoanTape < Lithic::Internal::Type::BaseModel # @return [Lithic::Models::StatementTotals] required :ytd_totals, -> { Lithic::StatementTotals } + # @!attribute day_of_period + # Day of the billing period that this loan tape covers, starting at 1 + # + # @return [Integer, nil] + optional :day_of_period, Integer, nil?: true + # @!attribute tier # Interest tier to which this account belongs to # # @return [String, nil] optional :tier, String, nil?: true - # @!method initialize(token:, account_standing:, available_credit:, balances:, created:, credit_limit:, credit_product_token:, date:, day_totals:, ending_balance:, excess_credits:, financial_account_token:, interest_details:, minimum_payment_balance:, payment_allocation:, period_totals:, previous_statement_balance:, starting_balance:, updated:, version:, ytd_totals:, tier: nil) + # @!method initialize(token:, account_standing:, available_credit:, balances:, created:, credit_limit:, credit_product_token:, date:, day_totals:, ending_balance:, excess_credits:, financial_account_token:, interest_details:, minimum_payment_balance:, payment_allocation:, period_totals:, previous_statement_balance:, starting_balance:, updated:, version:, ytd_totals:, day_of_period: nil, tier: nil) # Some parameter documentations has been truncated, see # {Lithic::Models::FinancialAccounts::LoanTape} for more details. # @@ -178,6 +184,8 @@ class LoanTape < Lithic::Internal::Type::BaseModel # # @param ytd_totals [Lithic::Models::StatementTotals] # + # @param day_of_period [Integer, nil] Day of the billing period that this loan tape covers, starting at 1 + # # @param tier [String, nil] Interest tier to which this account belongs to # @see Lithic::Models::FinancialAccounts::LoanTape#account_standing diff --git a/rbi/lithic/models/financial_accounts/loan_tape.rbi b/rbi/lithic/models/financial_accounts/loan_tape.rbi index 7b44d44f..cb00dfee 100644 --- a/rbi/lithic/models/financial_accounts/loan_tape.rbi +++ b/rbi/lithic/models/financial_accounts/loan_tape.rbi @@ -157,6 +157,10 @@ module Lithic sig { params(ytd_totals: Lithic::StatementTotals::OrHash).void } attr_writer :ytd_totals + # Day of the billing period that this loan tape covers, starting at 1 + sig { returns(T.nilable(Integer)) } + attr_accessor :day_of_period + # Interest tier to which this account belongs to sig { returns(T.nilable(String)) } attr_accessor :tier @@ -191,6 +195,7 @@ module Lithic updated: Time, version: Integer, ytd_totals: Lithic::StatementTotals::OrHash, + day_of_period: T.nilable(Integer), tier: T.nilable(String) ).returns(T.attached_class) end @@ -232,6 +237,8 @@ module Lithic # Version number of the loan tape. This starts at 1 version:, ytd_totals:, + # Day of the billing period that this loan tape covers, starting at 1 + day_of_period: nil, # Interest tier to which this account belongs to tier: nil ) @@ -266,6 +273,7 @@ module Lithic updated: Time, version: Integer, ytd_totals: Lithic::StatementTotals, + day_of_period: T.nilable(Integer), tier: T.nilable(String) } ) diff --git a/sig/lithic/models/financial_accounts/loan_tape.rbs b/sig/lithic/models/financial_accounts/loan_tape.rbs index dea4a048..c008dff6 100644 --- a/sig/lithic/models/financial_accounts/loan_tape.rbs +++ b/sig/lithic/models/financial_accounts/loan_tape.rbs @@ -24,6 +24,7 @@ module Lithic updated: Time, version: Integer, ytd_totals: Lithic::StatementTotals, + day_of_period: Integer?, tier: String? } @@ -70,6 +71,8 @@ module Lithic attr_accessor ytd_totals: Lithic::StatementTotals + attr_accessor day_of_period: Integer? + attr_accessor tier: String? def initialize: ( @@ -94,6 +97,7 @@ module Lithic updated: Time, version: Integer, ytd_totals: Lithic::StatementTotals, + ?day_of_period: Integer?, ?tier: String? ) -> void @@ -119,6 +123,7 @@ module Lithic updated: Time, version: Integer, ytd_totals: Lithic::StatementTotals, + day_of_period: Integer?, tier: String? } diff --git a/test/lithic/resources/financial_accounts/loan_tapes_test.rb b/test/lithic/resources/financial_accounts/loan_tapes_test.rb index 1e42f8f4..837a0129 100644 --- a/test/lithic/resources/financial_accounts/loan_tapes_test.rb +++ b/test/lithic/resources/financial_accounts/loan_tapes_test.rb @@ -37,6 +37,7 @@ def test_retrieve_required_params updated: Time, version: Integer, ytd_totals: Lithic::StatementTotals, + day_of_period: Integer | nil, tier: String | nil } end @@ -79,6 +80,7 @@ def test_list updated: Time, version: Integer, ytd_totals: Lithic::StatementTotals, + day_of_period: Integer | nil, tier: String | nil } end From 37af713a243f3380aea47019af34fe1d698bae35 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 10 Jun 2026 13:58:40 +0000 Subject: [PATCH 6/7] feat(api): add transaction_monitoring with cases/comments/files/queues, refactor entity_type --- .stats.yml | 8 +- lib/lithic.rb | 39 +++ lib/lithic/client.rb | 4 + lib/lithic/models.rb | 2 + .../account_holders/account_holder_entity.rb | 19 +- .../account_holders/entity_create_params.rb | 17 +- .../case_activity_entry.rb | 74 ++++++ .../case_activity_type.rb | 35 +++ .../transaction_monitoring/case_card.rb | 37 +++ .../transaction_monitoring/case_entity.rb | 50 ++++ .../case_list_activity_params.rb | 53 ++++ .../case_list_params.rb | 136 +++++++++++ .../case_list_transactions_params.rb | 53 ++++ .../transaction_monitoring/case_priority.rb | 20 ++ .../case_retrieve_cards_params.rb | 22 ++ .../case_retrieve_cards_response.rb | 11 + .../case_retrieve_params.rb | 22 ++ .../transaction_monitoring/case_sort_order.rb | 29 +++ .../transaction_monitoring/case_status.rb | 31 +++ .../case_transaction.rb | 53 ++++ .../case_update_params.rb | 116 +++++++++ .../transaction_monitoring/cases/case_file.rb | 141 +++++++++++ .../cases/comment_create_params.rb | 47 ++++ .../cases/comment_delete_params.rb | 30 +++ .../cases/comment_update_params.rb | 54 ++++ .../cases/file_create_params.rb | 33 +++ .../cases/file_delete_params.rb | 30 +++ .../cases/file_list_params.rb | 54 ++++ .../cases/file_retrieve_params.rb | 30 +++ .../cases/file_status.rb | 26 ++ .../cases/upload_constraints.rb | 31 +++ .../transaction_monitoring/entity_type.rb | 18 ++ .../transaction_monitoring/monitoring_case.rb | 168 +++++++++++++ .../models/transaction_monitoring/queue.rb | 120 +++++++++ .../queue_create_params.rb | 32 +++ .../queue_delete_params.rb | 22 ++ .../queue_list_params.rb | 45 ++++ .../queue_retrieve_params.rb | 22 ++ .../queue_update_params.rb | 39 +++ .../resolution_outcome.rb | 28 +++ .../resources/account_holders/entities.rb | 2 +- .../resources/transaction_monitoring.rb | 22 ++ .../resources/transaction_monitoring/cases.rb | 228 +++++++++++++++++ .../transaction_monitoring/cases/comments.rb | 111 +++++++++ .../transaction_monitoring/cases/files.rb | 131 ++++++++++ .../transaction_monitoring/queues.rb | 137 +++++++++++ rbi/lithic/client.rbi | 3 + rbi/lithic/models.rbi | 2 + .../account_holders/account_holder_entity.rbi | 43 +--- .../account_holders/entity_create_params.rbi | 40 +-- .../case_activity_entry.rbi | 107 ++++++++ .../case_activity_type.rbi | 84 +++++++ .../transaction_monitoring/case_card.rbi | 60 +++++ .../transaction_monitoring/case_entity.rbi | 101 ++++++++ .../case_list_activity_params.rbi | 83 +++++++ .../case_list_params.rbi | 220 +++++++++++++++++ .../case_list_transactions_params.rbi | 83 +++++++ .../transaction_monitoring/case_priority.rbi | 44 ++++ .../case_retrieve_cards_params.rbi | 40 +++ .../case_retrieve_cards_response.rbi | 15 ++ .../case_retrieve_params.rbi | 40 +++ .../case_sort_order.rbi | 64 +++++ .../transaction_monitoring/case_status.rbi | 63 +++++ .../case_transaction.rbi | 75 ++++++ .../case_update_params.rbi | 201 +++++++++++++++ .../cases/case_file.rbi | 188 ++++++++++++++ .../cases/comment_create_params.rbi | 71 ++++++ .../cases/comment_delete_params.rbi | 50 ++++ .../cases/comment_update_params.rbi | 77 ++++++ .../cases/file_create_params.rbi | 56 +++++ .../cases/file_delete_params.rbi | 50 ++++ .../cases/file_list_params.rbi | 85 +++++++ .../cases/file_retrieve_params.rbi | 50 ++++ .../cases/file_status.rbi | 51 ++++ .../cases/upload_constraints.rbi | 51 ++++ .../transaction_monitoring/entity_type.rbi | 37 +++ .../monitoring_case.rbi | 226 +++++++++++++++++ .../models/transaction_monitoring/queue.rbi | 189 ++++++++++++++ .../queue_create_params.rbi | 56 +++++ .../queue_delete_params.rbi | 40 +++ .../queue_list_params.rbi | 77 ++++++ .../queue_retrieve_params.rbi | 40 +++ .../queue_update_params.rbi | 65 +++++ .../resolution_outcome.rbi | 61 +++++ .../resources/account_holders/entities.rbi | 2 +- .../resources/transaction_monitoring.rbi | 18 ++ .../transaction_monitoring/cases.rbi | 230 ++++++++++++++++++ .../transaction_monitoring/cases/comments.rbi | 81 ++++++ .../transaction_monitoring/cases/files.rbi | 98 ++++++++ .../transaction_monitoring/queues.rbi | 103 ++++++++ sig/lithic/client.rbs | 2 + sig/lithic/models.rbs | 2 + .../account_holders/account_holder_entity.rbs | 19 +- .../account_holders/entity_create_params.rbs | 19 +- .../case_activity_entry.rbs | 47 ++++ .../case_activity_type.rbs | 32 +++ .../transaction_monitoring/case_card.rbs | 32 +++ .../transaction_monitoring/case_entity.rbs | 38 +++ .../case_list_activity_params.rbs | 49 ++++ .../case_list_params.rbs | 125 ++++++++++ .../case_list_transactions_params.rbs | 49 ++++ .../transaction_monitoring/case_priority.rbs | 18 ++ .../case_retrieve_cards_params.rbs | 25 ++ .../case_retrieve_cards_response.rbs | 10 + .../case_retrieve_params.rbs | 25 ++ .../case_sort_order.rbs | 26 ++ .../transaction_monitoring/case_status.rbs | 21 ++ .../case_transaction.rbs | 42 ++++ .../case_update_params.rbs | 91 +++++++ .../cases/case_file.rbs | 86 +++++++ .../cases/comment_create_params.rbs | 38 +++ .../cases/comment_delete_params.rbs | 32 +++ .../cases/comment_update_params.rbs | 47 ++++ .../cases/file_create_params.rbs | 32 +++ .../cases/file_delete_params.rbs | 32 +++ .../cases/file_list_params.rbs | 51 ++++ .../cases/file_retrieve_params.rbs | 32 +++ .../cases/file_status.rbs | 19 ++ .../cases/upload_constraints.rbs | 26 ++ .../transaction_monitoring/entity_type.rbs | 16 ++ .../monitoring_case.rbs | 102 ++++++++ .../models/transaction_monitoring/queue.rbs | 101 ++++++++ .../queue_create_params.rbs | 30 +++ .../queue_delete_params.rbs | 25 ++ .../queue_list_params.rbs | 40 +++ .../queue_retrieve_params.rbs | 25 ++ .../queue_update_params.rbs | 36 +++ .../resolution_outcome.rbs | 24 ++ .../resources/account_holders/entities.rbs | 2 +- .../resources/transaction_monitoring.rbs | 11 + .../transaction_monitoring/cases.rbs | 71 ++++++ .../transaction_monitoring/cases/comments.rbs | 32 +++ .../transaction_monitoring/cases/files.rbs | 37 +++ .../transaction_monitoring/queues.rbs | 39 +++ test/lithic/resource_namespaces.rb | 8 + .../account_holders/entities_test.rb | 2 +- .../cases/comments_test.rb | 64 +++++ .../cases/files_test.rb | 107 ++++++++ .../transaction_monitoring/cases_test.rb | 161 ++++++++++++ .../transaction_monitoring/queues_test.rb | 96 ++++++++ .../resources/transaction_monitoring_test.rb | 6 + 141 files changed, 7809 insertions(+), 145 deletions(-) create mode 100644 lib/lithic/models/transaction_monitoring/case_activity_entry.rb create mode 100644 lib/lithic/models/transaction_monitoring/case_activity_type.rb create mode 100644 lib/lithic/models/transaction_monitoring/case_card.rb create mode 100644 lib/lithic/models/transaction_monitoring/case_entity.rb create mode 100644 lib/lithic/models/transaction_monitoring/case_list_activity_params.rb create mode 100644 lib/lithic/models/transaction_monitoring/case_list_params.rb create mode 100644 lib/lithic/models/transaction_monitoring/case_list_transactions_params.rb create mode 100644 lib/lithic/models/transaction_monitoring/case_priority.rb create mode 100644 lib/lithic/models/transaction_monitoring/case_retrieve_cards_params.rb create mode 100644 lib/lithic/models/transaction_monitoring/case_retrieve_cards_response.rb create mode 100644 lib/lithic/models/transaction_monitoring/case_retrieve_params.rb create mode 100644 lib/lithic/models/transaction_monitoring/case_sort_order.rb create mode 100644 lib/lithic/models/transaction_monitoring/case_status.rb create mode 100644 lib/lithic/models/transaction_monitoring/case_transaction.rb create mode 100644 lib/lithic/models/transaction_monitoring/case_update_params.rb create mode 100644 lib/lithic/models/transaction_monitoring/cases/case_file.rb create mode 100644 lib/lithic/models/transaction_monitoring/cases/comment_create_params.rb create mode 100644 lib/lithic/models/transaction_monitoring/cases/comment_delete_params.rb create mode 100644 lib/lithic/models/transaction_monitoring/cases/comment_update_params.rb create mode 100644 lib/lithic/models/transaction_monitoring/cases/file_create_params.rb create mode 100644 lib/lithic/models/transaction_monitoring/cases/file_delete_params.rb create mode 100644 lib/lithic/models/transaction_monitoring/cases/file_list_params.rb create mode 100644 lib/lithic/models/transaction_monitoring/cases/file_retrieve_params.rb create mode 100644 lib/lithic/models/transaction_monitoring/cases/file_status.rb create mode 100644 lib/lithic/models/transaction_monitoring/cases/upload_constraints.rb create mode 100644 lib/lithic/models/transaction_monitoring/entity_type.rb create mode 100644 lib/lithic/models/transaction_monitoring/monitoring_case.rb create mode 100644 lib/lithic/models/transaction_monitoring/queue.rb create mode 100644 lib/lithic/models/transaction_monitoring/queue_create_params.rb create mode 100644 lib/lithic/models/transaction_monitoring/queue_delete_params.rb create mode 100644 lib/lithic/models/transaction_monitoring/queue_list_params.rb create mode 100644 lib/lithic/models/transaction_monitoring/queue_retrieve_params.rb create mode 100644 lib/lithic/models/transaction_monitoring/queue_update_params.rb create mode 100644 lib/lithic/models/transaction_monitoring/resolution_outcome.rb create mode 100644 lib/lithic/resources/transaction_monitoring.rb create mode 100644 lib/lithic/resources/transaction_monitoring/cases.rb create mode 100644 lib/lithic/resources/transaction_monitoring/cases/comments.rb create mode 100644 lib/lithic/resources/transaction_monitoring/cases/files.rb create mode 100644 lib/lithic/resources/transaction_monitoring/queues.rb create mode 100644 rbi/lithic/models/transaction_monitoring/case_activity_entry.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/case_activity_type.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/case_card.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/case_entity.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/case_list_activity_params.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/case_list_params.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/case_list_transactions_params.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/case_priority.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/case_retrieve_cards_params.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/case_retrieve_cards_response.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/case_retrieve_params.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/case_sort_order.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/case_status.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/case_transaction.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/case_update_params.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/cases/case_file.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/cases/comment_create_params.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/cases/comment_delete_params.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/cases/comment_update_params.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/cases/file_create_params.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/cases/file_delete_params.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/cases/file_list_params.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/cases/file_retrieve_params.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/cases/file_status.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/cases/upload_constraints.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/entity_type.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/monitoring_case.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/queue.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/queue_create_params.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/queue_delete_params.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/queue_list_params.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/queue_retrieve_params.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/queue_update_params.rbi create mode 100644 rbi/lithic/models/transaction_monitoring/resolution_outcome.rbi create mode 100644 rbi/lithic/resources/transaction_monitoring.rbi create mode 100644 rbi/lithic/resources/transaction_monitoring/cases.rbi create mode 100644 rbi/lithic/resources/transaction_monitoring/cases/comments.rbi create mode 100644 rbi/lithic/resources/transaction_monitoring/cases/files.rbi create mode 100644 rbi/lithic/resources/transaction_monitoring/queues.rbi create mode 100644 sig/lithic/models/transaction_monitoring/case_activity_entry.rbs create mode 100644 sig/lithic/models/transaction_monitoring/case_activity_type.rbs create mode 100644 sig/lithic/models/transaction_monitoring/case_card.rbs create mode 100644 sig/lithic/models/transaction_monitoring/case_entity.rbs create mode 100644 sig/lithic/models/transaction_monitoring/case_list_activity_params.rbs create mode 100644 sig/lithic/models/transaction_monitoring/case_list_params.rbs create mode 100644 sig/lithic/models/transaction_monitoring/case_list_transactions_params.rbs create mode 100644 sig/lithic/models/transaction_monitoring/case_priority.rbs create mode 100644 sig/lithic/models/transaction_monitoring/case_retrieve_cards_params.rbs create mode 100644 sig/lithic/models/transaction_monitoring/case_retrieve_cards_response.rbs create mode 100644 sig/lithic/models/transaction_monitoring/case_retrieve_params.rbs create mode 100644 sig/lithic/models/transaction_monitoring/case_sort_order.rbs create mode 100644 sig/lithic/models/transaction_monitoring/case_status.rbs create mode 100644 sig/lithic/models/transaction_monitoring/case_transaction.rbs create mode 100644 sig/lithic/models/transaction_monitoring/case_update_params.rbs create mode 100644 sig/lithic/models/transaction_monitoring/cases/case_file.rbs create mode 100644 sig/lithic/models/transaction_monitoring/cases/comment_create_params.rbs create mode 100644 sig/lithic/models/transaction_monitoring/cases/comment_delete_params.rbs create mode 100644 sig/lithic/models/transaction_monitoring/cases/comment_update_params.rbs create mode 100644 sig/lithic/models/transaction_monitoring/cases/file_create_params.rbs create mode 100644 sig/lithic/models/transaction_monitoring/cases/file_delete_params.rbs create mode 100644 sig/lithic/models/transaction_monitoring/cases/file_list_params.rbs create mode 100644 sig/lithic/models/transaction_monitoring/cases/file_retrieve_params.rbs create mode 100644 sig/lithic/models/transaction_monitoring/cases/file_status.rbs create mode 100644 sig/lithic/models/transaction_monitoring/cases/upload_constraints.rbs create mode 100644 sig/lithic/models/transaction_monitoring/entity_type.rbs create mode 100644 sig/lithic/models/transaction_monitoring/monitoring_case.rbs create mode 100644 sig/lithic/models/transaction_monitoring/queue.rbs create mode 100644 sig/lithic/models/transaction_monitoring/queue_create_params.rbs create mode 100644 sig/lithic/models/transaction_monitoring/queue_delete_params.rbs create mode 100644 sig/lithic/models/transaction_monitoring/queue_list_params.rbs create mode 100644 sig/lithic/models/transaction_monitoring/queue_retrieve_params.rbs create mode 100644 sig/lithic/models/transaction_monitoring/queue_update_params.rbs create mode 100644 sig/lithic/models/transaction_monitoring/resolution_outcome.rbs create mode 100644 sig/lithic/resources/transaction_monitoring.rbs create mode 100644 sig/lithic/resources/transaction_monitoring/cases.rbs create mode 100644 sig/lithic/resources/transaction_monitoring/cases/comments.rbs create mode 100644 sig/lithic/resources/transaction_monitoring/cases/files.rbs create mode 100644 sig/lithic/resources/transaction_monitoring/queues.rbs create mode 100644 test/lithic/resources/transaction_monitoring/cases/comments_test.rb create mode 100644 test/lithic/resources/transaction_monitoring/cases/files_test.rb create mode 100644 test/lithic/resources/transaction_monitoring/cases_test.rb create mode 100644 test/lithic/resources/transaction_monitoring/queues_test.rb create mode 100644 test/lithic/resources/transaction_monitoring_test.rb diff --git a/.stats.yml b/.stats.yml index 17fba7ce..dbd8648c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-99f95bae0a9466a3c3032c867cae9878877c1602f2d68c2441813ce2c8dc8f87.yml -openapi_spec_hash: 047fd5b9c00f6acddd3e4f5dc203a4ed -config_hash: a0a579b0564a5c18568a78f5ba2b6653 +configured_endpoints: 213 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-65a6644277529a38afcac424d99d87cbfa4d8294423ad618dbbd875634ec1d3c.yml +openapi_spec_hash: 6f3c1bb6a70830afb8af1dacd6352a97 +config_hash: 126e04f676f61e5871a82889336dbf9d diff --git a/lib/lithic.rb b/lib/lithic.rb index 389c2dd4..2390b2bc 100644 --- a/lib/lithic.rb +++ b/lib/lithic.rb @@ -444,6 +444,40 @@ require_relative "lithic/models/token_metadata" require_relative "lithic/models/transaction_expire_authorization_params" require_relative "lithic/models/transaction_list_params" +require_relative "lithic/models/transaction_monitoring/case_activity_entry" +require_relative "lithic/models/transaction_monitoring/case_activity_type" +require_relative "lithic/models/transaction_monitoring/case_card" +require_relative "lithic/models/transaction_monitoring/case_entity" +require_relative "lithic/models/transaction_monitoring/case_list_activity_params" +require_relative "lithic/models/transaction_monitoring/case_list_params" +require_relative "lithic/models/transaction_monitoring/case_list_transactions_params" +require_relative "lithic/models/transaction_monitoring/case_priority" +require_relative "lithic/models/transaction_monitoring/case_retrieve_cards_params" +require_relative "lithic/models/transaction_monitoring/case_retrieve_cards_response" +require_relative "lithic/models/transaction_monitoring/case_retrieve_params" +require_relative "lithic/models/transaction_monitoring/cases/case_file" +require_relative "lithic/models/transaction_monitoring/cases/comment_create_params" +require_relative "lithic/models/transaction_monitoring/cases/comment_delete_params" +require_relative "lithic/models/transaction_monitoring/cases/comment_update_params" +require_relative "lithic/models/transaction_monitoring/cases/file_create_params" +require_relative "lithic/models/transaction_monitoring/cases/file_delete_params" +require_relative "lithic/models/transaction_monitoring/cases/file_list_params" +require_relative "lithic/models/transaction_monitoring/cases/file_retrieve_params" +require_relative "lithic/models/transaction_monitoring/cases/file_status" +require_relative "lithic/models/transaction_monitoring/cases/upload_constraints" +require_relative "lithic/models/transaction_monitoring/case_sort_order" +require_relative "lithic/models/transaction_monitoring/case_status" +require_relative "lithic/models/transaction_monitoring/case_transaction" +require_relative "lithic/models/transaction_monitoring/case_update_params" +require_relative "lithic/models/transaction_monitoring/entity_type" +require_relative "lithic/models/transaction_monitoring/monitoring_case" +require_relative "lithic/models/transaction_monitoring/queue" +require_relative "lithic/models/transaction_monitoring/queue_create_params" +require_relative "lithic/models/transaction_monitoring/queue_delete_params" +require_relative "lithic/models/transaction_monitoring/queue_list_params" +require_relative "lithic/models/transaction_monitoring/queue_retrieve_params" +require_relative "lithic/models/transaction_monitoring/queue_update_params" +require_relative "lithic/models/transaction_monitoring/resolution_outcome" require_relative "lithic/models/transaction_retrieve_params" require_relative "lithic/models/transactions/enhanced_commercial_data_retrieve_params" require_relative "lithic/models/transactions/enhanced_commercial_data_retrieve_response" @@ -525,6 +559,11 @@ require_relative "lithic/resources/three_ds/decisioning" require_relative "lithic/resources/tokenization_decisioning" require_relative "lithic/resources/tokenizations" +require_relative "lithic/resources/transaction_monitoring" +require_relative "lithic/resources/transaction_monitoring/cases" +require_relative "lithic/resources/transaction_monitoring/cases/comments" +require_relative "lithic/resources/transaction_monitoring/cases/files" +require_relative "lithic/resources/transaction_monitoring/queues" require_relative "lithic/resources/transactions" require_relative "lithic/resources/transactions/enhanced_commercial_data" require_relative "lithic/resources/transactions/events" diff --git a/lib/lithic/client.rb b/lib/lithic/client.rb index 80ec0106..a6e1ea35 100644 --- a/lib/lithic/client.rb +++ b/lib/lithic/client.rb @@ -35,6 +35,9 @@ class Client < Lithic::Internal::Transport::BaseClient # @return [Lithic::Resources::AuthRules] attr_reader :auth_rules + # @return [Lithic::Resources::TransactionMonitoring] + attr_reader :transaction_monitoring + # @return [Lithic::Resources::AuthStreamEnrollment] attr_reader :auth_stream_enrollment @@ -221,6 +224,7 @@ def initialize( @accounts = Lithic::Resources::Accounts.new(client: self) @account_holders = Lithic::Resources::AccountHolders.new(client: self) @auth_rules = Lithic::Resources::AuthRules.new(client: self) + @transaction_monitoring = Lithic::Resources::TransactionMonitoring.new(client: self) @auth_stream_enrollment = Lithic::Resources::AuthStreamEnrollment.new(client: self) @tokenization_decisioning = Lithic::Resources::TokenizationDecisioning.new(client: self) @tokenizations = Lithic::Resources::Tokenizations.new(client: self) diff --git a/lib/lithic/models.rb b/lib/lithic/models.rb index c1074113..9d33bd1b 100644 --- a/lib/lithic/models.rb +++ b/lib/lithic/models.rb @@ -574,6 +574,8 @@ module Lithic TransactionListParams = Lithic::Models::TransactionListParams + TransactionMonitoring = Lithic::Models::TransactionMonitoring + TransactionRetrieveParams = Lithic::Models::TransactionRetrieveParams Transactions = Lithic::Models::Transactions diff --git a/lib/lithic/models/account_holders/account_holder_entity.rb b/lib/lithic/models/account_holders/account_holder_entity.rb index 5b55940d..14c63cc0 100644 --- a/lib/lithic/models/account_holders/account_holder_entity.rb +++ b/lib/lithic/models/account_holders/account_holder_entity.rb @@ -62,8 +62,8 @@ class AccountHolderEntity < Lithic::Internal::Type::BaseModel # @!attribute type # The type of entity # - # @return [Symbol, Lithic::Models::AccountHolders::AccountHolderEntity::Type] - required :type, enum: -> { Lithic::AccountHolders::AccountHolderEntity::Type } + # @return [Symbol, Lithic::Models::TransactionMonitoring::EntityType] + required :type, enum: -> { Lithic::TransactionMonitoring::EntityType } # @!method initialize(token:, account_holder_token:, address:, dob:, email:, first_name:, last_name:, phone_number:, status:, type:) # Information about an entity associated with an account holder @@ -86,7 +86,7 @@ class AccountHolderEntity < Lithic::Internal::Type::BaseModel # # @param status [Symbol, Lithic::Models::AccountHolders::AccountHolderEntity::Status] The status of the entity # - # @param type [Symbol, Lithic::Models::AccountHolders::AccountHolderEntity::Type] The type of entity + # @param type [Symbol, Lithic::Models::TransactionMonitoring::EntityType] The type of entity # @see Lithic::Models::AccountHolders::AccountHolderEntity#address class Address < Lithic::Internal::Type::BaseModel @@ -162,19 +162,6 @@ module Status # @!method self.values # @return [Array] end - - # The type of entity - # - # @see Lithic::Models::AccountHolders::AccountHolderEntity#type - module Type - extend Lithic::Internal::Type::Enum - - BENEFICIAL_OWNER_INDIVIDUAL = :BENEFICIAL_OWNER_INDIVIDUAL - CONTROL_PERSON = :CONTROL_PERSON - - # @!method self.values - # @return [Array] - end end end diff --git a/lib/lithic/models/account_holders/entity_create_params.rb b/lib/lithic/models/account_holders/entity_create_params.rb index 8a25482d..ad236750 100644 --- a/lib/lithic/models/account_holders/entity_create_params.rb +++ b/lib/lithic/models/account_holders/entity_create_params.rb @@ -63,8 +63,8 @@ class EntityCreateParams < Lithic::Internal::Type::BaseModel # @!attribute type # The type of entity to create on the account holder # - # @return [Symbol, Lithic::Models::AccountHolders::EntityCreateParams::Type] - required :type, enum: -> { Lithic::AccountHolders::EntityCreateParams::Type } + # @return [Symbol, Lithic::Models::TransactionMonitoring::EntityType] + required :type, enum: -> { Lithic::TransactionMonitoring::EntityType } # @!method initialize(account_holder_token:, address:, dob:, email:, first_name:, government_id:, last_name:, phone_number:, type:, request_options: {}) # Some parameter documentations has been truncated, see @@ -86,7 +86,7 @@ class EntityCreateParams < Lithic::Internal::Type::BaseModel # # @param phone_number [String] Individual's phone number, entered in E.164 format. # - # @param type [Symbol, Lithic::Models::AccountHolders::EntityCreateParams::Type] The type of entity to create on the account holder + # @param type [Symbol, Lithic::Models::TransactionMonitoring::EntityType] The type of entity to create on the account holder # # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] @@ -149,17 +149,6 @@ class Address < Lithic::Internal::Type::BaseModel # # @param address2 [String] Unit or apartment number (if applicable). end - - # The type of entity to create on the account holder - module Type - extend Lithic::Internal::Type::Enum - - BENEFICIAL_OWNER_INDIVIDUAL = :BENEFICIAL_OWNER_INDIVIDUAL - CONTROL_PERSON = :CONTROL_PERSON - - # @!method self.values - # @return [Array] - end end end end diff --git a/lib/lithic/models/transaction_monitoring/case_activity_entry.rb b/lib/lithic/models/transaction_monitoring/case_activity_entry.rb new file mode 100644 index 00000000..51292618 --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/case_activity_entry.rb @@ -0,0 +1,74 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + # @see Lithic::Resources::TransactionMonitoring::Cases#list_activity + class CaseActivityEntry < Lithic::Internal::Type::BaseModel + # @!attribute token + # Globally unique identifier for the activity entry + # + # @return [String] + required :token, String + + # @!attribute actor_token + # Identifier of the actor that produced the activity entry + # + # @return [String, nil] + required :actor_token, String, nil?: true + + # @!attribute created + # Date and time at which the activity entry was created + # + # @return [Time] + required :created, Time + + # @!attribute entry_type + # The case field that changed, or the action that was taken, in an activity entry: + # + # - `STATUS` - The case status changed + # - `TITLE` - The case title changed + # - `ASSIGNED_TO` - The case assignee changed + # - `RESOLUTION_OUTCOME` - The resolution outcome was set or changed + # - `RESOLUTION_NOTES` - The resolution notes were set or changed + # - `TAGS` - The case tags changed + # - `PRIORITY` - The case priority changed + # - `COMMENT` - A comment was added or edited + # - `FILE` - A file was attached to the case + # + # @return [Symbol, Lithic::Models::TransactionMonitoring::CaseActivityType] + required :entry_type, enum: -> { Lithic::TransactionMonitoring::CaseActivityType } + + # @!attribute new_value + # New value of the changed field, when applicable + # + # @return [String, nil] + required :new_value, String, nil?: true + + # @!attribute previous_value + # Previous value of the changed field, when applicable + # + # @return [String, nil] + required :previous_value, String, nil?: true + + # @!method initialize(token:, actor_token:, created:, entry_type:, new_value:, previous_value:) + # Some parameter documentations has been truncated, see + # {Lithic::Models::TransactionMonitoring::CaseActivityEntry} for more details. + # + # A single entry in a case's activity feed + # + # @param token [String] Globally unique identifier for the activity entry + # + # @param actor_token [String, nil] Identifier of the actor that produced the activity entry + # + # @param created [Time] Date and time at which the activity entry was created + # + # @param entry_type [Symbol, Lithic::Models::TransactionMonitoring::CaseActivityType] The case field that changed, or the action that was taken, in an activity entry: + # + # @param new_value [String, nil] New value of the changed field, when applicable + # + # @param previous_value [String, nil] Previous value of the changed field, when applicable + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/case_activity_type.rb b/lib/lithic/models/transaction_monitoring/case_activity_type.rb new file mode 100644 index 00000000..1fe95095 --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/case_activity_type.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + # The case field that changed, or the action that was taken, in an activity entry: + # + # - `STATUS` - The case status changed + # - `TITLE` - The case title changed + # - `ASSIGNED_TO` - The case assignee changed + # - `RESOLUTION_OUTCOME` - The resolution outcome was set or changed + # - `RESOLUTION_NOTES` - The resolution notes were set or changed + # - `TAGS` - The case tags changed + # - `PRIORITY` - The case priority changed + # - `COMMENT` - A comment was added or edited + # - `FILE` - A file was attached to the case + module CaseActivityType + extend Lithic::Internal::Type::Enum + + STATUS = :STATUS + TITLE = :TITLE + ASSIGNED_TO = :ASSIGNED_TO + RESOLUTION_OUTCOME = :RESOLUTION_OUTCOME + RESOLUTION_NOTES = :RESOLUTION_NOTES + TAGS = :TAGS + PRIORITY = :PRIORITY + COMMENT = :COMMENT + FILE = :FILE + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/case_card.rb b/lib/lithic/models/transaction_monitoring/case_card.rb new file mode 100644 index 00000000..40b26633 --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/case_card.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + class CaseCard < Lithic::Internal::Type::BaseModel + # @!attribute account_token + # Token of the account the card belongs to + # + # @return [String] + required :account_token, String + + # @!attribute card_token + # Token of the card + # + # @return [String] + required :card_token, String + + # @!attribute transaction_count + # Number of the card's transactions associated with the case + # + # @return [Integer] + required :transaction_count, Integer + + # @!method initialize(account_token:, card_token:, transaction_count:) + # Summary of a card's involvement in a case, aggregated across the case's + # transactions + # + # @param account_token [String] Token of the account the card belongs to + # + # @param card_token [String] Token of the card + # + # @param transaction_count [Integer] Number of the card's transactions associated with the case + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/case_entity.rb b/lib/lithic/models/transaction_monitoring/case_entity.rb new file mode 100644 index 00000000..c81e36f6 --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/case_entity.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + class CaseEntity < Lithic::Internal::Type::BaseModel + # @!attribute entity_token + # Globally unique identifier for the associated entity + # + # @return [String] + required :entity_token, String + + # @!attribute entity_type + # The type of entity a case is associated with: + # + # - `CARD` - The case is associated with a card + # - `ACCOUNT` - The case is associated with an account + # + # @return [Symbol, Lithic::Models::TransactionMonitoring::CaseEntity::EntityType] + required :entity_type, enum: -> { Lithic::TransactionMonitoring::CaseEntity::EntityType } + + # @!method initialize(entity_token:, entity_type:) + # Some parameter documentations has been truncated, see + # {Lithic::Models::TransactionMonitoring::CaseEntity} for more details. + # + # The entity a case is associated with + # + # @param entity_token [String] Globally unique identifier for the associated entity + # + # @param entity_type [Symbol, Lithic::Models::TransactionMonitoring::CaseEntity::EntityType] The type of entity a case is associated with: + + # The type of entity a case is associated with: + # + # - `CARD` - The case is associated with a card + # - `ACCOUNT` - The case is associated with an account + # + # @see Lithic::Models::TransactionMonitoring::CaseEntity#entity_type + module EntityType + extend Lithic::Internal::Type::Enum + + CARD = :CARD + ACCOUNT = :ACCOUNT + + # @!method self.values + # @return [Array] + end + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/case_list_activity_params.rb b/lib/lithic/models/transaction_monitoring/case_list_activity_params.rb new file mode 100644 index 00000000..8dfbf2a7 --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/case_list_activity_params.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + # @see Lithic::Resources::TransactionMonitoring::Cases#list_activity + class CaseListActivityParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute case_token + # + # @return [String] + required :case_token, String + + # @!attribute ending_before + # A cursor representing an item's token before which a page of results should end. + # Used to retrieve the previous page of results before this item. + # + # @return [String, nil] + optional :ending_before, String + + # @!attribute page_size + # Page size (for pagination). + # + # @return [Integer, nil] + optional :page_size, Integer + + # @!attribute starting_after + # A cursor representing an item's token after which a page of results should + # begin. Used to retrieve the next page of results after this item. + # + # @return [String, nil] + optional :starting_after, String + + # @!method initialize(case_token:, ending_before: nil, page_size: nil, starting_after: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {Lithic::Models::TransactionMonitoring::CaseListActivityParams} for more + # details. + # + # @param case_token [String] + # + # @param ending_before [String] A cursor representing an item's token before which a page of results should end. + # + # @param page_size [Integer] Page size (for pagination). + # + # @param starting_after [String] A cursor representing an item's token after which a page of results should begin + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/case_list_params.rb b/lib/lithic/models/transaction_monitoring/case_list_params.rb new file mode 100644 index 00000000..95045da2 --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/case_list_params.rb @@ -0,0 +1,136 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + # @see Lithic::Resources::TransactionMonitoring::Cases#list + class CaseListParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute account_token + # Only return cases that include transactions on the provided account. + # + # @return [String, nil] + optional :account_token, String + + # @!attribute assignee + # Only return cases assigned to the provided value. Pass an empty string to return + # only unassigned cases. + # + # @return [String, nil] + optional :assignee, String + + # @!attribute begin_ + # Date string in RFC 3339 format. Only entries created after the specified time + # will be included. UTC time zone. + # + # @return [Time, nil] + optional :begin_, Time + + # @!attribute card_token + # Only return cases that include transactions on the provided card. + # + # @return [String, nil] + optional :card_token, String + + # @!attribute end_ + # Date string in RFC 3339 format. Only entries created before the specified time + # will be included. UTC time zone. + # + # @return [Time, nil] + optional :end_, Time + + # @!attribute ending_before + # A cursor representing an item's token before which a page of results should end. + # Used to retrieve the previous page of results before this item. + # + # @return [String, nil] + optional :ending_before, String + + # @!attribute entity_token + # Only return cases associated with the provided entity. + # + # @return [String, nil] + optional :entity_token, String + + # @!attribute page_size + # Page size (for pagination). + # + # @return [Integer, nil] + optional :page_size, Integer + + # @!attribute queue_token + # Only return cases belonging to the provided queue. + # + # @return [String, nil] + optional :queue_token, String + + # @!attribute rule_token + # Only return cases triggered by the provided transaction monitoring rule. + # + # @return [String, nil] + optional :rule_token, String + + # @!attribute sort_by + # Sort order for the returned cases. + # + # @return [Symbol, Lithic::Models::TransactionMonitoring::CaseSortOrder, nil] + optional :sort_by, enum: -> { Lithic::TransactionMonitoring::CaseSortOrder } + + # @!attribute starting_after + # A cursor representing an item's token after which a page of results should + # begin. Used to retrieve the next page of results after this item. + # + # @return [String, nil] + optional :starting_after, String + + # @!attribute status + # Only return cases with the provided status. + # + # @return [Symbol, Lithic::Models::TransactionMonitoring::CaseStatus, nil] + optional :status, enum: -> { Lithic::TransactionMonitoring::CaseStatus } + + # @!attribute transaction_token + # Only return cases that include the provided transaction. + # + # @return [String, nil] + optional :transaction_token, String + + # @!method initialize(account_token: nil, assignee: nil, begin_: nil, card_token: nil, end_: nil, ending_before: nil, entity_token: nil, page_size: nil, queue_token: nil, rule_token: nil, sort_by: nil, starting_after: nil, status: nil, transaction_token: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {Lithic::Models::TransactionMonitoring::CaseListParams} for more details. + # + # @param account_token [String] Only return cases that include transactions on the provided account. + # + # @param assignee [String] Only return cases assigned to the provided value. Pass an empty string to return + # + # @param begin_ [Time] Date string in RFC 3339 format. Only entries created after the specified time wi + # + # @param card_token [String] Only return cases that include transactions on the provided card. + # + # @param end_ [Time] Date string in RFC 3339 format. Only entries created before the specified time w + # + # @param ending_before [String] A cursor representing an item's token before which a page of results should end. + # + # @param entity_token [String] Only return cases associated with the provided entity. + # + # @param page_size [Integer] Page size (for pagination). + # + # @param queue_token [String] Only return cases belonging to the provided queue. + # + # @param rule_token [String] Only return cases triggered by the provided transaction monitoring rule. + # + # @param sort_by [Symbol, Lithic::Models::TransactionMonitoring::CaseSortOrder] Sort order for the returned cases. + # + # @param starting_after [String] A cursor representing an item's token after which a page of results should begin + # + # @param status [Symbol, Lithic::Models::TransactionMonitoring::CaseStatus] Only return cases with the provided status. + # + # @param transaction_token [String] Only return cases that include the provided transaction. + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/case_list_transactions_params.rb b/lib/lithic/models/transaction_monitoring/case_list_transactions_params.rb new file mode 100644 index 00000000..5e5de05d --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/case_list_transactions_params.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + # @see Lithic::Resources::TransactionMonitoring::Cases#list_transactions + class CaseListTransactionsParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute case_token + # + # @return [String] + required :case_token, String + + # @!attribute ending_before + # A cursor representing an item's token before which a page of results should end. + # Used to retrieve the previous page of results before this item. + # + # @return [String, nil] + optional :ending_before, String + + # @!attribute page_size + # Page size (for pagination). + # + # @return [Integer, nil] + optional :page_size, Integer + + # @!attribute starting_after + # A cursor representing an item's token after which a page of results should + # begin. Used to retrieve the next page of results after this item. + # + # @return [String, nil] + optional :starting_after, String + + # @!method initialize(case_token:, ending_before: nil, page_size: nil, starting_after: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {Lithic::Models::TransactionMonitoring::CaseListTransactionsParams} for more + # details. + # + # @param case_token [String] + # + # @param ending_before [String] A cursor representing an item's token before which a page of results should end. + # + # @param page_size [Integer] Page size (for pagination). + # + # @param starting_after [String] A cursor representing an item's token after which a page of results should begin + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/case_priority.rb b/lib/lithic/models/transaction_monitoring/case_priority.rb new file mode 100644 index 00000000..633800c9 --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/case_priority.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + # Priority level of a case, controlling queue ordering and SLA urgency + module CasePriority + extend Lithic::Internal::Type::Enum + + LOW = :LOW + MEDIUM = :MEDIUM + HIGH = :HIGH + CRITICAL = :CRITICAL + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/case_retrieve_cards_params.rb b/lib/lithic/models/transaction_monitoring/case_retrieve_cards_params.rb new file mode 100644 index 00000000..fc13d30f --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/case_retrieve_cards_params.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + # @see Lithic::Resources::TransactionMonitoring::Cases#retrieve_cards + class CaseRetrieveCardsParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute case_token + # + # @return [String] + required :case_token, String + + # @!method initialize(case_token:, request_options: {}) + # @param case_token [String] + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/case_retrieve_cards_response.rb b/lib/lithic/models/transaction_monitoring/case_retrieve_cards_response.rb new file mode 100644 index 00000000..3a476e43 --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/case_retrieve_cards_response.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + # @type [Lithic::Internal::Type::Converter] + CaseRetrieveCardsResponse = + Lithic::Internal::Type::ArrayOf[-> { Lithic::TransactionMonitoring::CaseCard }] + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/case_retrieve_params.rb b/lib/lithic/models/transaction_monitoring/case_retrieve_params.rb new file mode 100644 index 00000000..3fb15f91 --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/case_retrieve_params.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + # @see Lithic::Resources::TransactionMonitoring::Cases#retrieve + class CaseRetrieveParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute case_token + # + # @return [String] + required :case_token, String + + # @!method initialize(case_token:, request_options: {}) + # @param case_token [String] + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/case_sort_order.rb b/lib/lithic/models/transaction_monitoring/case_sort_order.rb new file mode 100644 index 00000000..4021f1fc --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/case_sort_order.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + # Sort order for listing cases. Defaults to `CREATED_DESC` (newest first): + # + # - `CREATED_ASC` - Oldest first + # - `CREATED_DESC` - Newest first + # - `PRIORITY_DESC` - Highest priority first + # - `PRIORITY_ASC` - Lowest priority first + # - `STATUS_DESC` - Furthest workflow stage first + # - `STATUS_ASC` - Earliest workflow stage first + module CaseSortOrder + extend Lithic::Internal::Type::Enum + + CREATED_ASC = :CREATED_ASC + CREATED_DESC = :CREATED_DESC + PRIORITY_DESC = :PRIORITY_DESC + PRIORITY_ASC = :PRIORITY_ASC + STATUS_DESC = :STATUS_DESC + STATUS_ASC = :STATUS_ASC + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/case_status.rb b/lib/lithic/models/transaction_monitoring/case_status.rb new file mode 100644 index 00000000..7b8b89ef --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/case_status.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + # Status of a case as it progresses through the review workflow: + # + # - `OPEN` - The case has been created and is still collecting matching + # transactions + # - `ASSIGNED` - An analyst has been assigned and transaction collection has + # stopped + # - `IN_REVIEW` - The case is actively being investigated + # - `ESCALATED` - The case has been reviewed and requires additional oversight + # - `RESOLVED` - A determination has been made and a resolution recorded + # - `CLOSED` - The case is finalized + module CaseStatus + extend Lithic::Internal::Type::Enum + + OPEN = :OPEN + ASSIGNED = :ASSIGNED + IN_REVIEW = :IN_REVIEW + ESCALATED = :ESCALATED + RESOLVED = :RESOLVED + CLOSED = :CLOSED + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/case_transaction.rb b/lib/lithic/models/transaction_monitoring/case_transaction.rb new file mode 100644 index 00000000..8df5e572 --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/case_transaction.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + # @see Lithic::Resources::TransactionMonitoring::Cases#list_transactions + class CaseTransaction < Lithic::Internal::Type::BaseModel + # @!attribute token + # Globally unique identifier for the transaction + # + # @return [String] + required :token, String + + # @!attribute account_token + # Token of the account the transaction belongs to + # + # @return [String] + required :account_token, String + + # @!attribute added_at + # Date and time at which the transaction was added to the case + # + # @return [Time] + required :added_at, Time + + # @!attribute card_token + # Token of the card the transaction was made on + # + # @return [String] + required :card_token, String + + # @!attribute transaction_created_at + # Date and time at which the transaction was created + # + # @return [Time] + required :transaction_created_at, Time + + # @!method initialize(token:, account_token:, added_at:, card_token:, transaction_created_at:) + # A single transaction associated with a case + # + # @param token [String] Globally unique identifier for the transaction + # + # @param account_token [String] Token of the account the transaction belongs to + # + # @param added_at [Time] Date and time at which the transaction was added to the case + # + # @param card_token [String] Token of the card the transaction was made on + # + # @param transaction_created_at [Time] Date and time at which the transaction was created + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/case_update_params.rb b/lib/lithic/models/transaction_monitoring/case_update_params.rb new file mode 100644 index 00000000..1a9b7317 --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/case_update_params.rb @@ -0,0 +1,116 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + # @see Lithic::Resources::TransactionMonitoring::Cases#update + class CaseUpdateParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute case_token + # + # @return [String] + required :case_token, String + + # @!attribute actor_token + # Optional client-provided identifier for the actor performing this action, + # recorded on the resulting activity entry. This value is supplied by the client + # (for example, your own internal user ID) and is not authenticated by Lithic + # + # @return [String, nil] + optional :actor_token, String + + # @!attribute assignee + # New assignee for the case, or `null` to unassign + # + # @return [String, nil] + optional :assignee, String, nil?: true + + # @!attribute priority + # Priority level of a case, controlling queue ordering and SLA urgency + # + # @return [Symbol, Lithic::Models::TransactionMonitoring::CasePriority, nil] + optional :priority, enum: -> { Lithic::TransactionMonitoring::CasePriority } + + # @!attribute resolution + # Outcome recorded when a case is resolved: + # + # - `CONFIRMED_FRAUD` - The reviewed activity was confirmed to be fraudulent + # - `SUSPICIOUS_ACTIVITY` - The activity is suspicious but not confirmed fraud + # - `FALSE_POSITIVE` - The activity was legitimate and the alert was a false + # positive + # - `NO_ACTION_REQUIRED` - No further action is required + # - `ESCALATED_EXTERNAL` - The case was escalated to an external party + # + # @return [Symbol, Lithic::Models::TransactionMonitoring::ResolutionOutcome, nil] + optional :resolution, enum: -> { Lithic::TransactionMonitoring::ResolutionOutcome } + + # @!attribute resolution_notes + # Notes describing the resolution + # + # @return [String, nil] + optional :resolution_notes, String + + # @!attribute sla_deadline + # New SLA deadline for the case, or `null` to clear it + # + # @return [Time, nil] + optional :sla_deadline, Time, nil?: true + + # @!attribute status + # Status of a case as it progresses through the review workflow: + # + # - `OPEN` - The case has been created and is still collecting matching + # transactions + # - `ASSIGNED` - An analyst has been assigned and transaction collection has + # stopped + # - `IN_REVIEW` - The case is actively being investigated + # - `ESCALATED` - The case has been reviewed and requires additional oversight + # - `RESOLVED` - A determination has been made and a resolution recorded + # - `CLOSED` - The case is finalized + # + # @return [Symbol, Lithic::Models::TransactionMonitoring::CaseStatus, nil] + optional :status, enum: -> { Lithic::TransactionMonitoring::CaseStatus } + + # @!attribute tags + # Arbitrary key-value metadata to set on the case + # + # @return [Hash{Symbol=>String}, nil] + optional :tags, Lithic::Internal::Type::HashOf[String] + + # @!attribute title + # New title for the case, or `null` to clear it + # + # @return [String, nil] + optional :title, String, nil?: true + + # @!method initialize(case_token:, actor_token: nil, assignee: nil, priority: nil, resolution: nil, resolution_notes: nil, sla_deadline: nil, status: nil, tags: nil, title: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {Lithic::Models::TransactionMonitoring::CaseUpdateParams} for more details. + # + # @param case_token [String] + # + # @param actor_token [String] Optional client-provided identifier for the actor performing this action, + # + # @param assignee [String, nil] New assignee for the case, or `null` to unassign + # + # @param priority [Symbol, Lithic::Models::TransactionMonitoring::CasePriority] Priority level of a case, controlling queue ordering and SLA urgency + # + # @param resolution [Symbol, Lithic::Models::TransactionMonitoring::ResolutionOutcome] Outcome recorded when a case is resolved: + # + # @param resolution_notes [String] Notes describing the resolution + # + # @param sla_deadline [Time, nil] New SLA deadline for the case, or `null` to clear it + # + # @param status [Symbol, Lithic::Models::TransactionMonitoring::CaseStatus] Status of a case as it progresses through the review workflow: + # + # @param tags [Hash{Symbol=>String}] Arbitrary key-value metadata to set on the case + # + # @param title [String, nil] New title for the case, or `null` to clear it + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/cases/case_file.rb b/lib/lithic/models/transaction_monitoring/cases/case_file.rb new file mode 100644 index 00000000..7ce58d23 --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/cases/case_file.rb @@ -0,0 +1,141 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + module Cases + # @see Lithic::Resources::TransactionMonitoring::Cases::Files#create + class CaseFile < Lithic::Internal::Type::BaseModel + # @!attribute token + # Globally unique identifier for the file + # + # @return [String] + required :token, String + + # @!attribute created + # Date and time at which the file record was created + # + # @return [Time] + required :created, Time + + # @!attribute download_url + # Presigned URL the client uses to download the file + # + # @return [String, nil] + required :download_url, String, nil?: true + + # @!attribute download_url_expires + # Date and time at which the download URL expires + # + # @return [Time, nil] + required :download_url_expires, Time, nil?: true + + # @!attribute failure_reason + # Reason the file was rejected, when applicable + # + # @return [String, nil] + required :failure_reason, String, nil?: true + + # @!attribute mime_type + # MIME type of the file, available once the file is ready + # + # @return [String, nil] + required :mime_type, String, nil?: true + + # @!attribute name + # Name of the file + # + # @return [String] + required :name, String + + # @!attribute size_bytes + # Size of the file in bytes, available once the file is ready + # + # @return [Integer, nil] + required :size_bytes, Integer, nil?: true + + # @!attribute status + # Lifecycle status of a case file: + # + # - `PENDING` - An upload URL has been issued and the file is awaiting upload + # - `READY` - The file has been uploaded and validated; a download URL is + # available + # - `REJECTED` - File validation failed; see `failure_reason` for details + # + # @return [Symbol, Lithic::Models::TransactionMonitoring::Cases::FileStatus] + required :status, enum: -> { Lithic::TransactionMonitoring::Cases::FileStatus } + + # @!attribute updated + # Date and time at which the file record was last updated + # + # @return [Time] + required :updated, Time + + # @!attribute upload_constraints + # Constraints applied to a file upload, returned alongside the upload URL so + # clients can validate before uploading + # + # @return [Lithic::Models::TransactionMonitoring::Cases::UploadConstraints, nil] + required :upload_constraints, + -> { + Lithic::TransactionMonitoring::Cases::UploadConstraints + }, + nil?: true + + # @!attribute upload_url + # Presigned URL the client uses to upload the file + # + # @return [String, nil] + required :upload_url, String, nil?: true + + # @!attribute upload_url_expires + # Date and time at which the upload URL expires + # + # @return [Time, nil] + required :upload_url_expires, Time, nil?: true + + # @!method initialize(token:, created:, download_url:, download_url_expires:, failure_reason:, mime_type:, name:, size_bytes:, status:, updated:, upload_constraints:, upload_url:, upload_url_expires:) + # Some parameter documentations has been truncated, see + # {Lithic::Models::TransactionMonitoring::Cases::CaseFile} for more details. + # + # A file attached to a case. Status-dependent fields are always present but may be + # `null`: + # + # - `upload_url`, `upload_url_expires`, and `upload_constraints` are populated + # when `status` is `PENDING` or `REJECTED` + # - `download_url` and `download_url_expires` are populated when `status` is + # `READY` + # - `failure_reason` is populated when `status` is `REJECTED` + # + # @param token [String] Globally unique identifier for the file + # + # @param created [Time] Date and time at which the file record was created + # + # @param download_url [String, nil] Presigned URL the client uses to download the file + # + # @param download_url_expires [Time, nil] Date and time at which the download URL expires + # + # @param failure_reason [String, nil] Reason the file was rejected, when applicable + # + # @param mime_type [String, nil] MIME type of the file, available once the file is ready + # + # @param name [String] Name of the file + # + # @param size_bytes [Integer, nil] Size of the file in bytes, available once the file is ready + # + # @param status [Symbol, Lithic::Models::TransactionMonitoring::Cases::FileStatus] Lifecycle status of a case file: + # + # @param updated [Time] Date and time at which the file record was last updated + # + # @param upload_constraints [Lithic::Models::TransactionMonitoring::Cases::UploadConstraints, nil] Constraints applied to a file upload, returned alongside the upload URL so clien + # + # @param upload_url [String, nil] Presigned URL the client uses to upload the file + # + # @param upload_url_expires [Time, nil] Date and time at which the upload URL expires + end + end + + CaseFile = Cases::CaseFile + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/cases/comment_create_params.rb b/lib/lithic/models/transaction_monitoring/cases/comment_create_params.rb new file mode 100644 index 00000000..3b668b21 --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/cases/comment_create_params.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + module Cases + # @see Lithic::Resources::TransactionMonitoring::Cases::Comments#create + class CommentCreateParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute case_token + # + # @return [String] + required :case_token, String + + # @!attribute comment + # Text of the comment + # + # @return [String] + required :comment, String + + # @!attribute actor_token + # Optional client-provided identifier for the actor performing this action, + # recorded on the resulting activity entry. This value is supplied by the client + # (for example, your own internal user ID) and is not authenticated by Lithic + # + # @return [String, nil] + optional :actor_token, String + + # @!method initialize(case_token:, comment:, actor_token: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {Lithic::Models::TransactionMonitoring::Cases::CommentCreateParams} for more + # details. + # + # @param case_token [String] + # + # @param comment [String] Text of the comment + # + # @param actor_token [String] Optional client-provided identifier for the actor performing this action, + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + end + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/cases/comment_delete_params.rb b/lib/lithic/models/transaction_monitoring/cases/comment_delete_params.rb new file mode 100644 index 00000000..f15b1c1a --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/cases/comment_delete_params.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + module Cases + # @see Lithic::Resources::TransactionMonitoring::Cases::Comments#delete + class CommentDeleteParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute case_token + # + # @return [String] + required :case_token, String + + # @!attribute comment_token + # + # @return [String] + required :comment_token, String + + # @!method initialize(case_token:, comment_token:, request_options: {}) + # @param case_token [String] + # @param comment_token [String] + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + end + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/cases/comment_update_params.rb b/lib/lithic/models/transaction_monitoring/cases/comment_update_params.rb new file mode 100644 index 00000000..0c7c3363 --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/cases/comment_update_params.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + module Cases + # @see Lithic::Resources::TransactionMonitoring::Cases::Comments#update + class CommentUpdateParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute case_token + # + # @return [String] + required :case_token, String + + # @!attribute comment_token + # + # @return [String] + required :comment_token, String + + # @!attribute comment + # New text of the comment + # + # @return [String] + required :comment, String + + # @!attribute actor_token + # Optional client-provided identifier for the actor performing this action, + # recorded on the resulting activity entry. This value is supplied by the client + # (for example, your own internal user ID) and is not authenticated by Lithic + # + # @return [String, nil] + optional :actor_token, String + + # @!method initialize(case_token:, comment_token:, comment:, actor_token: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {Lithic::Models::TransactionMonitoring::Cases::CommentUpdateParams} for more + # details. + # + # @param case_token [String] + # + # @param comment_token [String] + # + # @param comment [String] New text of the comment + # + # @param actor_token [String] Optional client-provided identifier for the actor performing this action, + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + end + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/cases/file_create_params.rb b/lib/lithic/models/transaction_monitoring/cases/file_create_params.rb new file mode 100644 index 00000000..9df4acf4 --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/cases/file_create_params.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + module Cases + # @see Lithic::Resources::TransactionMonitoring::Cases::Files#create + class FileCreateParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute case_token + # + # @return [String] + required :case_token, String + + # @!attribute name + # Name of the file to upload + # + # @return [String] + required :name, String + + # @!method initialize(case_token:, name:, request_options: {}) + # @param case_token [String] + # + # @param name [String] Name of the file to upload + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + end + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/cases/file_delete_params.rb b/lib/lithic/models/transaction_monitoring/cases/file_delete_params.rb new file mode 100644 index 00000000..6e7e0178 --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/cases/file_delete_params.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + module Cases + # @see Lithic::Resources::TransactionMonitoring::Cases::Files#delete + class FileDeleteParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute case_token + # + # @return [String] + required :case_token, String + + # @!attribute file_token + # + # @return [String] + required :file_token, String + + # @!method initialize(case_token:, file_token:, request_options: {}) + # @param case_token [String] + # @param file_token [String] + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + end + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/cases/file_list_params.rb b/lib/lithic/models/transaction_monitoring/cases/file_list_params.rb new file mode 100644 index 00000000..cf4b5bb0 --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/cases/file_list_params.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + module Cases + # @see Lithic::Resources::TransactionMonitoring::Cases::Files#list + class FileListParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute case_token + # + # @return [String] + required :case_token, String + + # @!attribute ending_before + # A cursor representing an item's token before which a page of results should end. + # Used to retrieve the previous page of results before this item. + # + # @return [String, nil] + optional :ending_before, String + + # @!attribute page_size + # Page size (for pagination). + # + # @return [Integer, nil] + optional :page_size, Integer + + # @!attribute starting_after + # A cursor representing an item's token after which a page of results should + # begin. Used to retrieve the next page of results after this item. + # + # @return [String, nil] + optional :starting_after, String + + # @!method initialize(case_token:, ending_before: nil, page_size: nil, starting_after: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {Lithic::Models::TransactionMonitoring::Cases::FileListParams} for more details. + # + # @param case_token [String] + # + # @param ending_before [String] A cursor representing an item's token before which a page of results should end. + # + # @param page_size [Integer] Page size (for pagination). + # + # @param starting_after [String] A cursor representing an item's token after which a page of results should begin + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + end + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/cases/file_retrieve_params.rb b/lib/lithic/models/transaction_monitoring/cases/file_retrieve_params.rb new file mode 100644 index 00000000..567163b8 --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/cases/file_retrieve_params.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + module Cases + # @see Lithic::Resources::TransactionMonitoring::Cases::Files#retrieve + class FileRetrieveParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute case_token + # + # @return [String] + required :case_token, String + + # @!attribute file_token + # + # @return [String] + required :file_token, String + + # @!method initialize(case_token:, file_token:, request_options: {}) + # @param case_token [String] + # @param file_token [String] + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + end + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/cases/file_status.rb b/lib/lithic/models/transaction_monitoring/cases/file_status.rb new file mode 100644 index 00000000..4755b6fb --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/cases/file_status.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + module Cases + # Lifecycle status of a case file: + # + # - `PENDING` - An upload URL has been issued and the file is awaiting upload + # - `READY` - The file has been uploaded and validated; a download URL is + # available + # - `REJECTED` - File validation failed; see `failure_reason` for details + module FileStatus + extend Lithic::Internal::Type::Enum + + PENDING = :PENDING + READY = :READY + REJECTED = :REJECTED + + # @!method self.values + # @return [Array] + end + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/cases/upload_constraints.rb b/lib/lithic/models/transaction_monitoring/cases/upload_constraints.rb new file mode 100644 index 00000000..cc4feb83 --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/cases/upload_constraints.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + module Cases + class UploadConstraints < Lithic::Internal::Type::BaseModel + # @!attribute accepted_mime_types + # MIME types accepted for the upload + # + # @return [Array] + required :accepted_mime_types, Lithic::Internal::Type::ArrayOf[String] + + # @!attribute max_size_bytes + # Maximum accepted file size, in bytes + # + # @return [Integer] + required :max_size_bytes, Integer + + # @!method initialize(accepted_mime_types:, max_size_bytes:) + # Constraints applied to a file upload, returned alongside the upload URL so + # clients can validate before uploading + # + # @param accepted_mime_types [Array] MIME types accepted for the upload + # + # @param max_size_bytes [Integer] Maximum accepted file size, in bytes + end + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/entity_type.rb b/lib/lithic/models/transaction_monitoring/entity_type.rb new file mode 100644 index 00000000..2c1bb10a --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/entity_type.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + # The type of entity associated with an account holder + module EntityType + extend Lithic::Internal::Type::Enum + + BENEFICIAL_OWNER_INDIVIDUAL = :BENEFICIAL_OWNER_INDIVIDUAL + CONTROL_PERSON = :CONTROL_PERSON + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/monitoring_case.rb b/lib/lithic/models/transaction_monitoring/monitoring_case.rb new file mode 100644 index 00000000..7f43fb74 --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/monitoring_case.rb @@ -0,0 +1,168 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + # @see Lithic::Resources::TransactionMonitoring::Cases#retrieve + class MonitoringCase < Lithic::Internal::Type::BaseModel + # @!attribute token + # Globally unique identifier for the case + # + # @return [String] + required :token, String + + # @!attribute assignee + # Identifier of the user the case is currently assigned to + # + # @return [String, nil] + required :assignee, String, nil?: true + + # @!attribute collection_stopped + # Date and time at which transaction collection stopped for the case + # + # @return [Time, nil] + required :collection_stopped, Time, nil?: true + + # @!attribute created + # Date and time at which the case was created + # + # @return [Time] + required :created, Time + + # @!attribute entity + # The entity a case is associated with + # + # @return [Lithic::Models::TransactionMonitoring::CaseEntity, nil] + required :entity, -> { Lithic::TransactionMonitoring::CaseEntity }, nil?: true + + # @!attribute pending_transactions + # Whether the case still has transaction scopes pending resolution + # + # @return [Boolean] + required :pending_transactions, Lithic::Internal::Type::Boolean + + # @!attribute priority + # Priority level of a case, controlling queue ordering and SLA urgency + # + # @return [Symbol, Lithic::Models::TransactionMonitoring::CasePriority] + required :priority, enum: -> { Lithic::TransactionMonitoring::CasePriority } + + # @!attribute queue_token + # Token of the queue the case belongs to + # + # @return [String] + required :queue_token, String + + # @!attribute resolution + # Outcome recorded when a case is resolved: + # + # - `CONFIRMED_FRAUD` - The reviewed activity was confirmed to be fraudulent + # - `SUSPICIOUS_ACTIVITY` - The activity is suspicious but not confirmed fraud + # - `FALSE_POSITIVE` - The activity was legitimate and the alert was a false + # positive + # - `NO_ACTION_REQUIRED` - No further action is required + # - `ESCALATED_EXTERNAL` - The case was escalated to an external party + # + # @return [Symbol, Lithic::Models::TransactionMonitoring::ResolutionOutcome, nil] + required :resolution, enum: -> { Lithic::TransactionMonitoring::ResolutionOutcome }, nil?: true + + # @!attribute resolution_notes + # Free-form notes describing the resolution + # + # @return [String, nil] + required :resolution_notes, String, nil?: true + + # @!attribute resolved + # Date and time at which the case was resolved + # + # @return [Time, nil] + required :resolved, Time, nil?: true + + # @!attribute rule_token + # Token of the transaction monitoring rule that triggered the case + # + # @return [String, nil] + required :rule_token, String, nil?: true + + # @!attribute sla_deadline + # Deadline by which the case is expected to be resolved + # + # @return [Time, nil] + required :sla_deadline, Time, nil?: true + + # @!attribute status + # Status of a case as it progresses through the review workflow: + # + # - `OPEN` - The case has been created and is still collecting matching + # transactions + # - `ASSIGNED` - An analyst has been assigned and transaction collection has + # stopped + # - `IN_REVIEW` - The case is actively being investigated + # - `ESCALATED` - The case has been reviewed and requires additional oversight + # - `RESOLVED` - A determination has been made and a resolution recorded + # - `CLOSED` - The case is finalized + # + # @return [Symbol, Lithic::Models::TransactionMonitoring::CaseStatus] + required :status, enum: -> { Lithic::TransactionMonitoring::CaseStatus } + + # @!attribute tags + # Arbitrary key-value metadata associated with the case + # + # @return [Hash{Symbol=>String}] + required :tags, Lithic::Internal::Type::HashOf[String] + + # @!attribute title + # Short, human-readable summary of the case + # + # @return [String, nil] + required :title, String, nil?: true + + # @!attribute updated + # Date and time at which the case was last updated + # + # @return [Time] + required :updated, Time + + # @!method initialize(token:, assignee:, collection_stopped:, created:, entity:, pending_transactions:, priority:, queue_token:, resolution:, resolution_notes:, resolved:, rule_token:, sla_deadline:, status:, tags:, title:, updated:) + # Some parameter documentations has been truncated, see + # {Lithic::Models::TransactionMonitoring::MonitoringCase} for more details. + # + # A transaction monitoring case + # + # @param token [String] Globally unique identifier for the case + # + # @param assignee [String, nil] Identifier of the user the case is currently assigned to + # + # @param collection_stopped [Time, nil] Date and time at which transaction collection stopped for the case + # + # @param created [Time] Date and time at which the case was created + # + # @param entity [Lithic::Models::TransactionMonitoring::CaseEntity, nil] The entity a case is associated with + # + # @param pending_transactions [Boolean] Whether the case still has transaction scopes pending resolution + # + # @param priority [Symbol, Lithic::Models::TransactionMonitoring::CasePriority] Priority level of a case, controlling queue ordering and SLA urgency + # + # @param queue_token [String] Token of the queue the case belongs to + # + # @param resolution [Symbol, Lithic::Models::TransactionMonitoring::ResolutionOutcome, nil] Outcome recorded when a case is resolved: + # + # @param resolution_notes [String, nil] Free-form notes describing the resolution + # + # @param resolved [Time, nil] Date and time at which the case was resolved + # + # @param rule_token [String, nil] Token of the transaction monitoring rule that triggered the case + # + # @param sla_deadline [Time, nil] Deadline by which the case is expected to be resolved + # + # @param status [Symbol, Lithic::Models::TransactionMonitoring::CaseStatus] Status of a case as it progresses through the review workflow: + # + # @param tags [Hash{Symbol=>String}] Arbitrary key-value metadata associated with the case + # + # @param title [String, nil] Short, human-readable summary of the case + # + # @param updated [Time] Date and time at which the case was last updated + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/queue.rb b/lib/lithic/models/transaction_monitoring/queue.rb new file mode 100644 index 00000000..ac563d9e --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/queue.rb @@ -0,0 +1,120 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + # @see Lithic::Resources::TransactionMonitoring::Queues#create + class Queue < Lithic::Internal::Type::BaseModel + # @!attribute token + # Globally unique identifier for the queue + # + # @return [String] + required :token, String + + # @!attribute case_counts + # Number of cases in the queue, broken down by status. A status is omitted when + # the queue has no cases in that status + # + # @return [Lithic::Models::TransactionMonitoring::Queue::CaseCounts] + required :case_counts, -> { Lithic::TransactionMonitoring::Queue::CaseCounts } + + # @!attribute created + # Date and time at which the queue was created + # + # @return [Time] + required :created, Time + + # @!attribute description + # Optional description of the queue + # + # @return [String, nil] + required :description, String, nil?: true + + # @!attribute name + # Human-readable name of the queue + # + # @return [String] + required :name, String + + # @!attribute updated + # Date and time at which the queue was last updated + # + # @return [Time] + required :updated, Time + + # @!method initialize(token:, case_counts:, created:, description:, name:, updated:) + # Some parameter documentations has been truncated, see + # {Lithic::Models::TransactionMonitoring::Queue} for more details. + # + # A queue that groups transaction monitoring cases for review + # + # @param token [String] Globally unique identifier for the queue + # + # @param case_counts [Lithic::Models::TransactionMonitoring::Queue::CaseCounts] Number of cases in the queue, broken down by status. A status is omitted + # + # @param created [Time] Date and time at which the queue was created + # + # @param description [String, nil] Optional description of the queue + # + # @param name [String] Human-readable name of the queue + # + # @param updated [Time] Date and time at which the queue was last updated + + # @see Lithic::Models::TransactionMonitoring::Queue#case_counts + class CaseCounts < Lithic::Internal::Type::BaseModel + # @!attribute assigned + # Number of cases in the queue with status `ASSIGNED` + # + # @return [Integer, nil] + optional :assigned, Integer, api_name: :ASSIGNED + + # @!attribute closed + # Number of cases in the queue with status `CLOSED` + # + # @return [Integer, nil] + optional :closed, Integer, api_name: :CLOSED + + # @!attribute escalated + # Number of cases in the queue with status `ESCALATED` + # + # @return [Integer, nil] + optional :escalated, Integer, api_name: :ESCALATED + + # @!attribute in_review + # Number of cases in the queue with status `IN_REVIEW` + # + # @return [Integer, nil] + optional :in_review, Integer, api_name: :IN_REVIEW + + # @!attribute open_ + # Number of cases in the queue with status `OPEN` + # + # @return [Integer, nil] + optional :open_, Integer, api_name: :OPEN + + # @!attribute resolved + # Number of cases in the queue with status `RESOLVED` + # + # @return [Integer, nil] + optional :resolved, Integer, api_name: :RESOLVED + + # @!method initialize(assigned: nil, closed: nil, escalated: nil, in_review: nil, open_: nil, resolved: nil) + # Number of cases in the queue, broken down by status. A status is omitted when + # the queue has no cases in that status + # + # @param assigned [Integer] Number of cases in the queue with status `ASSIGNED` + # + # @param closed [Integer] Number of cases in the queue with status `CLOSED` + # + # @param escalated [Integer] Number of cases in the queue with status `ESCALATED` + # + # @param in_review [Integer] Number of cases in the queue with status `IN_REVIEW` + # + # @param open_ [Integer] Number of cases in the queue with status `OPEN` + # + # @param resolved [Integer] Number of cases in the queue with status `RESOLVED` + end + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/queue_create_params.rb b/lib/lithic/models/transaction_monitoring/queue_create_params.rb new file mode 100644 index 00000000..594dd9a4 --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/queue_create_params.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + # @see Lithic::Resources::TransactionMonitoring::Queues#create + class QueueCreateParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute name + # Human-readable name of the queue + # + # @return [String] + required :name, String + + # @!attribute description + # Optional description of the queue + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!method initialize(name:, description: nil, request_options: {}) + # @param name [String] Human-readable name of the queue + # + # @param description [String, nil] Optional description of the queue + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/queue_delete_params.rb b/lib/lithic/models/transaction_monitoring/queue_delete_params.rb new file mode 100644 index 00000000..f91d7fd4 --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/queue_delete_params.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + # @see Lithic::Resources::TransactionMonitoring::Queues#delete + class QueueDeleteParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute queue_token + # + # @return [String] + required :queue_token, String + + # @!method initialize(queue_token:, request_options: {}) + # @param queue_token [String] + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/queue_list_params.rb b/lib/lithic/models/transaction_monitoring/queue_list_params.rb new file mode 100644 index 00000000..2474d6d2 --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/queue_list_params.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + # @see Lithic::Resources::TransactionMonitoring::Queues#list + class QueueListParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute ending_before + # A cursor representing an item's token before which a page of results should end. + # Used to retrieve the previous page of results before this item. + # + # @return [String, nil] + optional :ending_before, String + + # @!attribute page_size + # Page size (for pagination). + # + # @return [Integer, nil] + optional :page_size, Integer + + # @!attribute starting_after + # A cursor representing an item's token after which a page of results should + # begin. Used to retrieve the next page of results after this item. + # + # @return [String, nil] + optional :starting_after, String + + # @!method initialize(ending_before: nil, page_size: nil, starting_after: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {Lithic::Models::TransactionMonitoring::QueueListParams} for more details. + # + # @param ending_before [String] A cursor representing an item's token before which a page of results should end. + # + # @param page_size [Integer] Page size (for pagination). + # + # @param starting_after [String] A cursor representing an item's token after which a page of results should begin + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/queue_retrieve_params.rb b/lib/lithic/models/transaction_monitoring/queue_retrieve_params.rb new file mode 100644 index 00000000..c50f3175 --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/queue_retrieve_params.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + # @see Lithic::Resources::TransactionMonitoring::Queues#retrieve + class QueueRetrieveParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute queue_token + # + # @return [String] + required :queue_token, String + + # @!method initialize(queue_token:, request_options: {}) + # @param queue_token [String] + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/queue_update_params.rb b/lib/lithic/models/transaction_monitoring/queue_update_params.rb new file mode 100644 index 00000000..ddae6426 --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/queue_update_params.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + # @see Lithic::Resources::TransactionMonitoring::Queues#update + class QueueUpdateParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute queue_token + # + # @return [String] + required :queue_token, String + + # @!attribute description + # New description for the queue, or `null` to clear it + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!attribute name + # New name for the queue + # + # @return [String, nil] + optional :name, String + + # @!method initialize(queue_token:, description: nil, name: nil, request_options: {}) + # @param queue_token [String] + # + # @param description [String, nil] New description for the queue, or `null` to clear it + # + # @param name [String] New name for the queue + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + end + end + end +end diff --git a/lib/lithic/models/transaction_monitoring/resolution_outcome.rb b/lib/lithic/models/transaction_monitoring/resolution_outcome.rb new file mode 100644 index 00000000..aa1d352a --- /dev/null +++ b/lib/lithic/models/transaction_monitoring/resolution_outcome.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +module Lithic + module Models + module TransactionMonitoring + # Outcome recorded when a case is resolved: + # + # - `CONFIRMED_FRAUD` - The reviewed activity was confirmed to be fraudulent + # - `SUSPICIOUS_ACTIVITY` - The activity is suspicious but not confirmed fraud + # - `FALSE_POSITIVE` - The activity was legitimate and the alert was a false + # positive + # - `NO_ACTION_REQUIRED` - No further action is required + # - `ESCALATED_EXTERNAL` - The case was escalated to an external party + module ResolutionOutcome + extend Lithic::Internal::Type::Enum + + CONFIRMED_FRAUD = :CONFIRMED_FRAUD + SUSPICIOUS_ACTIVITY = :SUSPICIOUS_ACTIVITY + FALSE_POSITIVE = :FALSE_POSITIVE + NO_ACTION_REQUIRED = :NO_ACTION_REQUIRED + ESCALATED_EXTERNAL = :ESCALATED_EXTERNAL + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/lithic/resources/account_holders/entities.rb b/lib/lithic/resources/account_holders/entities.rb index 16f3e879..f127ffec 100644 --- a/lib/lithic/resources/account_holders/entities.rb +++ b/lib/lithic/resources/account_holders/entities.rb @@ -31,7 +31,7 @@ class Entities # # @param phone_number [String] Individual's phone number, entered in E.164 format. # - # @param type [Symbol, Lithic::Models::AccountHolders::EntityCreateParams::Type] The type of entity to create on the account holder + # @param type [Symbol, Lithic::Models::TransactionMonitoring::EntityType] The type of entity to create on the account holder # # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/lithic/resources/transaction_monitoring.rb b/lib/lithic/resources/transaction_monitoring.rb new file mode 100644 index 00000000..6b9e0c2b --- /dev/null +++ b/lib/lithic/resources/transaction_monitoring.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +module Lithic + module Resources + class TransactionMonitoring + # @return [Lithic::Resources::TransactionMonitoring::Cases] + attr_reader :cases + + # @return [Lithic::Resources::TransactionMonitoring::Queues] + attr_reader :queues + + # @api private + # + # @param client [Lithic::Client] + def initialize(client:) + @client = client + @cases = Lithic::Resources::TransactionMonitoring::Cases.new(client: client) + @queues = Lithic::Resources::TransactionMonitoring::Queues.new(client: client) + end + end + end +end diff --git a/lib/lithic/resources/transaction_monitoring/cases.rb b/lib/lithic/resources/transaction_monitoring/cases.rb new file mode 100644 index 00000000..deb32755 --- /dev/null +++ b/lib/lithic/resources/transaction_monitoring/cases.rb @@ -0,0 +1,228 @@ +# frozen_string_literal: true + +module Lithic + module Resources + class TransactionMonitoring + class Cases + # @return [Lithic::Resources::TransactionMonitoring::Cases::Comments] + attr_reader :comments + + # @return [Lithic::Resources::TransactionMonitoring::Cases::Files] + attr_reader :files + + # Retrieves a single transaction monitoring case. + # + # @overload retrieve(case_token, request_options: {}) + # + # @param case_token [String] Globally unique identifier for the case. + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Lithic::Models::TransactionMonitoring::MonitoringCase] + # + # @see Lithic::Models::TransactionMonitoring::CaseRetrieveParams + def retrieve(case_token, params = {}) + @client.request( + method: :get, + path: ["v1/transaction_monitoring/cases/%1$s", case_token], + model: Lithic::TransactionMonitoring::MonitoringCase, + options: params[:request_options] + ) + end + + # Some parameter documentations has been truncated, see + # {Lithic::Models::TransactionMonitoring::CaseUpdateParams} for more details. + # + # Updates a transaction monitoring case. + # + # @overload update(case_token, actor_token: nil, assignee: nil, priority: nil, resolution: nil, resolution_notes: nil, sla_deadline: nil, status: nil, tags: nil, title: nil, request_options: {}) + # + # @param case_token [String] Globally unique identifier for the case. + # + # @param actor_token [String] Optional client-provided identifier for the actor performing this action, + # + # @param assignee [String, nil] New assignee for the case, or `null` to unassign + # + # @param priority [Symbol, Lithic::Models::TransactionMonitoring::CasePriority] Priority level of a case, controlling queue ordering and SLA urgency + # + # @param resolution [Symbol, Lithic::Models::TransactionMonitoring::ResolutionOutcome] Outcome recorded when a case is resolved: + # + # @param resolution_notes [String] Notes describing the resolution + # + # @param sla_deadline [Time, nil] New SLA deadline for the case, or `null` to clear it + # + # @param status [Symbol, Lithic::Models::TransactionMonitoring::CaseStatus] Status of a case as it progresses through the review workflow: + # + # @param tags [Hash{Symbol=>String}] Arbitrary key-value metadata to set on the case + # + # @param title [String, nil] New title for the case, or `null` to clear it + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Lithic::Models::TransactionMonitoring::MonitoringCase] + # + # @see Lithic::Models::TransactionMonitoring::CaseUpdateParams + def update(case_token, params = {}) + parsed, options = Lithic::TransactionMonitoring::CaseUpdateParams.dump_request(params) + @client.request( + method: :patch, + path: ["v1/transaction_monitoring/cases/%1$s", case_token], + body: parsed, + model: Lithic::TransactionMonitoring::MonitoringCase, + options: options + ) + end + + # Some parameter documentations has been truncated, see + # {Lithic::Models::TransactionMonitoring::CaseListParams} for more details. + # + # Lists transaction monitoring cases, optionally filtered. + # + # @overload list(account_token: nil, assignee: nil, begin_: nil, card_token: nil, end_: nil, ending_before: nil, entity_token: nil, page_size: nil, queue_token: nil, rule_token: nil, sort_by: nil, starting_after: nil, status: nil, transaction_token: nil, request_options: {}) + # + # @param account_token [String] Only return cases that include transactions on the provided account. + # + # @param assignee [String] Only return cases assigned to the provided value. Pass an empty string to return + # + # @param begin_ [Time] Date string in RFC 3339 format. Only entries created after the specified time wi + # + # @param card_token [String] Only return cases that include transactions on the provided card. + # + # @param end_ [Time] Date string in RFC 3339 format. Only entries created before the specified time w + # + # @param ending_before [String] A cursor representing an item's token before which a page of results should end. + # + # @param entity_token [String] Only return cases associated with the provided entity. + # + # @param page_size [Integer] Page size (for pagination). + # + # @param queue_token [String] Only return cases belonging to the provided queue. + # + # @param rule_token [String] Only return cases triggered by the provided transaction monitoring rule. + # + # @param sort_by [Symbol, Lithic::Models::TransactionMonitoring::CaseSortOrder] Sort order for the returned cases. + # + # @param starting_after [String] A cursor representing an item's token after which a page of results should begin + # + # @param status [Symbol, Lithic::Models::TransactionMonitoring::CaseStatus] Only return cases with the provided status. + # + # @param transaction_token [String] Only return cases that include the provided transaction. + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Lithic::Internal::CursorPage] + # + # @see Lithic::Models::TransactionMonitoring::CaseListParams + def list(params = {}) + parsed, options = Lithic::TransactionMonitoring::CaseListParams.dump_request(params) + query = Lithic::Internal::Util.encode_query_params(parsed) + @client.request( + method: :get, + path: "v1/transaction_monitoring/cases", + query: query.transform_keys(begin_: "begin", end_: "end"), + page: Lithic::Internal::CursorPage, + model: Lithic::TransactionMonitoring::MonitoringCase, + options: options + ) + end + + # Some parameter documentations has been truncated, see + # {Lithic::Models::TransactionMonitoring::CaseListActivityParams} for more + # details. + # + # Lists the activity feed for a case. + # + # @overload list_activity(case_token, ending_before: nil, page_size: nil, starting_after: nil, request_options: {}) + # + # @param case_token [String] Globally unique identifier for the case. + # + # @param ending_before [String] A cursor representing an item's token before which a page of results should end. + # + # @param page_size [Integer] Page size (for pagination). + # + # @param starting_after [String] A cursor representing an item's token after which a page of results should begin + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Lithic::Internal::CursorPage] + # + # @see Lithic::Models::TransactionMonitoring::CaseListActivityParams + def list_activity(case_token, params = {}) + parsed, options = Lithic::TransactionMonitoring::CaseListActivityParams.dump_request(params) + query = Lithic::Internal::Util.encode_query_params(parsed) + @client.request( + method: :get, + path: ["v1/transaction_monitoring/cases/%1$s/activity", case_token], + query: query, + page: Lithic::Internal::CursorPage, + model: Lithic::TransactionMonitoring::CaseActivityEntry, + options: options + ) + end + + # Some parameter documentations has been truncated, see + # {Lithic::Models::TransactionMonitoring::CaseListTransactionsParams} for more + # details. + # + # Lists the transactions associated with a case. + # + # @overload list_transactions(case_token, ending_before: nil, page_size: nil, starting_after: nil, request_options: {}) + # + # @param case_token [String] Globally unique identifier for the case. + # + # @param ending_before [String] A cursor representing an item's token before which a page of results should end. + # + # @param page_size [Integer] Page size (for pagination). + # + # @param starting_after [String] A cursor representing an item's token after which a page of results should begin + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Lithic::Internal::CursorPage] + # + # @see Lithic::Models::TransactionMonitoring::CaseListTransactionsParams + def list_transactions(case_token, params = {}) + parsed, options = Lithic::TransactionMonitoring::CaseListTransactionsParams.dump_request(params) + query = Lithic::Internal::Util.encode_query_params(parsed) + @client.request( + method: :get, + path: ["v1/transaction_monitoring/cases/%1$s/transactions", case_token], + query: query, + page: Lithic::Internal::CursorPage, + model: Lithic::TransactionMonitoring::CaseTransaction, + options: options + ) + end + + # Lists the cards involved in a case, with per-card transaction counts. + # + # @overload retrieve_cards(case_token, request_options: {}) + # + # @param case_token [String] Globally unique identifier for the case. + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Array] + # + # @see Lithic::Models::TransactionMonitoring::CaseRetrieveCardsParams + def retrieve_cards(case_token, params = {}) + @client.request( + method: :get, + path: ["v1/transaction_monitoring/cases/%1$s/cards", case_token], + model: Lithic::Internal::Type::ArrayOf[Lithic::TransactionMonitoring::CaseCard], + options: params[:request_options] + ) + end + + # @api private + # + # @param client [Lithic::Client] + def initialize(client:) + @client = client + @comments = Lithic::Resources::TransactionMonitoring::Cases::Comments.new(client: client) + @files = Lithic::Resources::TransactionMonitoring::Cases::Files.new(client: client) + end + end + end + end +end diff --git a/lib/lithic/resources/transaction_monitoring/cases/comments.rb b/lib/lithic/resources/transaction_monitoring/cases/comments.rb new file mode 100644 index 00000000..2905c800 --- /dev/null +++ b/lib/lithic/resources/transaction_monitoring/cases/comments.rb @@ -0,0 +1,111 @@ +# frozen_string_literal: true + +module Lithic + module Resources + class TransactionMonitoring + class Cases + class Comments + # Some parameter documentations has been truncated, see + # {Lithic::Models::TransactionMonitoring::Cases::CommentCreateParams} for more + # details. + # + # Adds a comment to a case. + # + # @overload create(case_token, comment:, actor_token: nil, request_options: {}) + # + # @param case_token [String] Globally unique identifier for the case. + # + # @param comment [String] Text of the comment + # + # @param actor_token [String] Optional client-provided identifier for the actor performing this action, + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Lithic::Models::TransactionMonitoring::CaseActivityEntry] + # + # @see Lithic::Models::TransactionMonitoring::Cases::CommentCreateParams + def create(case_token, params) + parsed, options = Lithic::TransactionMonitoring::Cases::CommentCreateParams.dump_request(params) + @client.request( + method: :post, + path: ["v1/transaction_monitoring/cases/%1$s/comments", case_token], + body: parsed, + model: Lithic::TransactionMonitoring::CaseActivityEntry, + options: options + ) + end + + # Some parameter documentations has been truncated, see + # {Lithic::Models::TransactionMonitoring::Cases::CommentUpdateParams} for more + # details. + # + # Edits an existing comment on a case. + # + # @overload update(comment_token, case_token:, comment:, actor_token: nil, request_options: {}) + # + # @param comment_token [String] Path param: Globally unique identifier for the comment. + # + # @param case_token [String] Path param: Globally unique identifier for the case. + # + # @param comment [String] Body param: New text of the comment + # + # @param actor_token [String] Body param: Optional client-provided identifier for the actor performing this ac + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Lithic::Models::TransactionMonitoring::CaseActivityEntry] + # + # @see Lithic::Models::TransactionMonitoring::Cases::CommentUpdateParams + def update(comment_token, params) + parsed, options = Lithic::TransactionMonitoring::Cases::CommentUpdateParams.dump_request(params) + case_token = + parsed.delete(:case_token) do + raise ArgumentError.new("missing required path argument #{_1}") + end + @client.request( + method: :patch, + path: ["v1/transaction_monitoring/cases/%1$s/comments/%2$s", case_token, comment_token], + body: parsed, + model: Lithic::TransactionMonitoring::CaseActivityEntry, + options: options + ) + end + + # Deletes a comment from a case. + # + # @overload delete(comment_token, case_token:, request_options: {}) + # + # @param comment_token [String] Globally unique identifier for the comment. + # + # @param case_token [String] Globally unique identifier for the case. + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [nil] + # + # @see Lithic::Models::TransactionMonitoring::Cases::CommentDeleteParams + def delete(comment_token, params) + parsed, options = Lithic::TransactionMonitoring::Cases::CommentDeleteParams.dump_request(params) + case_token = + parsed.delete(:case_token) do + raise ArgumentError.new("missing required path argument #{_1}") + end + @client.request( + method: :delete, + path: ["v1/transaction_monitoring/cases/%1$s/comments/%2$s", case_token, comment_token], + model: NilClass, + options: options + ) + end + + # @api private + # + # @param client [Lithic::Client] + def initialize(client:) + @client = client + end + end + end + end + end +end diff --git a/lib/lithic/resources/transaction_monitoring/cases/files.rb b/lib/lithic/resources/transaction_monitoring/cases/files.rb new file mode 100644 index 00000000..d249f650 --- /dev/null +++ b/lib/lithic/resources/transaction_monitoring/cases/files.rb @@ -0,0 +1,131 @@ +# frozen_string_literal: true + +module Lithic + module Resources + class TransactionMonitoring + class Cases + class Files + # Creates a file record and returns a presigned URL for uploading the file to the + # case. + # + # @overload create(case_token, name:, request_options: {}) + # + # @param case_token [String] Globally unique identifier for the case. + # + # @param name [String] Name of the file to upload + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Lithic::Models::TransactionMonitoring::Cases::CaseFile] + # + # @see Lithic::Models::TransactionMonitoring::Cases::FileCreateParams + def create(case_token, params) + parsed, options = Lithic::TransactionMonitoring::Cases::FileCreateParams.dump_request(params) + @client.request( + method: :post, + path: ["v1/transaction_monitoring/cases/%1$s/files", case_token], + body: parsed, + model: Lithic::TransactionMonitoring::Cases::CaseFile, + options: options + ) + end + + # Retrieves a single file attached to a case, including a presigned download URL + # when the file is ready. + # + # @overload retrieve(file_token, case_token:, request_options: {}) + # + # @param file_token [String] Globally unique identifier for the file. + # + # @param case_token [String] Globally unique identifier for the case. + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Lithic::Models::TransactionMonitoring::Cases::CaseFile] + # + # @see Lithic::Models::TransactionMonitoring::Cases::FileRetrieveParams + def retrieve(file_token, params) + parsed, options = Lithic::TransactionMonitoring::Cases::FileRetrieveParams.dump_request(params) + case_token = + parsed.delete(:case_token) do + raise ArgumentError.new("missing required path argument #{_1}") + end + @client.request( + method: :get, + path: ["v1/transaction_monitoring/cases/%1$s/files/%2$s", case_token, file_token], + model: Lithic::TransactionMonitoring::Cases::CaseFile, + options: options + ) + end + + # Some parameter documentations has been truncated, see + # {Lithic::Models::TransactionMonitoring::Cases::FileListParams} for more details. + # + # Lists the files attached to a case. + # + # @overload list(case_token, ending_before: nil, page_size: nil, starting_after: nil, request_options: {}) + # + # @param case_token [String] Globally unique identifier for the case. + # + # @param ending_before [String] A cursor representing an item's token before which a page of results should end. + # + # @param page_size [Integer] Page size (for pagination). + # + # @param starting_after [String] A cursor representing an item's token after which a page of results should begin + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Lithic::Internal::CursorPage] + # + # @see Lithic::Models::TransactionMonitoring::Cases::FileListParams + def list(case_token, params = {}) + parsed, options = Lithic::TransactionMonitoring::Cases::FileListParams.dump_request(params) + query = Lithic::Internal::Util.encode_query_params(parsed) + @client.request( + method: :get, + path: ["v1/transaction_monitoring/cases/%1$s/files", case_token], + query: query, + page: Lithic::Internal::CursorPage, + model: Lithic::TransactionMonitoring::Cases::CaseFile, + options: options + ) + end + + # Deletes a file from a case. + # + # @overload delete(file_token, case_token:, request_options: {}) + # + # @param file_token [String] Globally unique identifier for the file. + # + # @param case_token [String] Globally unique identifier for the case. + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [nil] + # + # @see Lithic::Models::TransactionMonitoring::Cases::FileDeleteParams + def delete(file_token, params) + parsed, options = Lithic::TransactionMonitoring::Cases::FileDeleteParams.dump_request(params) + case_token = + parsed.delete(:case_token) do + raise ArgumentError.new("missing required path argument #{_1}") + end + @client.request( + method: :delete, + path: ["v1/transaction_monitoring/cases/%1$s/files/%2$s", case_token, file_token], + model: NilClass, + options: options + ) + end + + # @api private + # + # @param client [Lithic::Client] + def initialize(client:) + @client = client + end + end + end + end + end +end diff --git a/lib/lithic/resources/transaction_monitoring/queues.rb b/lib/lithic/resources/transaction_monitoring/queues.rb new file mode 100644 index 00000000..5b2b2fd9 --- /dev/null +++ b/lib/lithic/resources/transaction_monitoring/queues.rb @@ -0,0 +1,137 @@ +# frozen_string_literal: true + +module Lithic + module Resources + class TransactionMonitoring + class Queues + # Creates a new queue for grouping transaction monitoring cases. + # + # @overload create(name:, description: nil, request_options: {}) + # + # @param name [String] Human-readable name of the queue + # + # @param description [String, nil] Optional description of the queue + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Lithic::Models::TransactionMonitoring::Queue] + # + # @see Lithic::Models::TransactionMonitoring::QueueCreateParams + def create(params) + parsed, options = Lithic::TransactionMonitoring::QueueCreateParams.dump_request(params) + @client.request( + method: :post, + path: "v1/transaction_monitoring/queues", + body: parsed, + model: Lithic::TransactionMonitoring::Queue, + options: options + ) + end + + # Retrieves a single transaction monitoring queue. + # + # @overload retrieve(queue_token, request_options: {}) + # + # @param queue_token [String] Globally unique identifier for the queue. + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Lithic::Models::TransactionMonitoring::Queue] + # + # @see Lithic::Models::TransactionMonitoring::QueueRetrieveParams + def retrieve(queue_token, params = {}) + @client.request( + method: :get, + path: ["v1/transaction_monitoring/queues/%1$s", queue_token], + model: Lithic::TransactionMonitoring::Queue, + options: params[:request_options] + ) + end + + # Updates a transaction monitoring queue. + # + # @overload update(queue_token, description: nil, name: nil, request_options: {}) + # + # @param queue_token [String] Globally unique identifier for the queue. + # + # @param description [String, nil] New description for the queue, or `null` to clear it + # + # @param name [String] New name for the queue + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Lithic::Models::TransactionMonitoring::Queue] + # + # @see Lithic::Models::TransactionMonitoring::QueueUpdateParams + def update(queue_token, params = {}) + parsed, options = Lithic::TransactionMonitoring::QueueUpdateParams.dump_request(params) + @client.request( + method: :patch, + path: ["v1/transaction_monitoring/queues/%1$s", queue_token], + body: parsed, + model: Lithic::TransactionMonitoring::Queue, + options: options + ) + end + + # Some parameter documentations has been truncated, see + # {Lithic::Models::TransactionMonitoring::QueueListParams} for more details. + # + # Lists transaction monitoring queues. + # + # @overload list(ending_before: nil, page_size: nil, starting_after: nil, request_options: {}) + # + # @param ending_before [String] A cursor representing an item's token before which a page of results should end. + # + # @param page_size [Integer] Page size (for pagination). + # + # @param starting_after [String] A cursor representing an item's token after which a page of results should begin + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Lithic::Internal::CursorPage] + # + # @see Lithic::Models::TransactionMonitoring::QueueListParams + def list(params = {}) + parsed, options = Lithic::TransactionMonitoring::QueueListParams.dump_request(params) + query = Lithic::Internal::Util.encode_query_params(parsed) + @client.request( + method: :get, + path: "v1/transaction_monitoring/queues", + query: query, + page: Lithic::Internal::CursorPage, + model: Lithic::TransactionMonitoring::Queue, + options: options + ) + end + + # Deletes a transaction monitoring queue. + # + # @overload delete(queue_token, request_options: {}) + # + # @param queue_token [String] Globally unique identifier for the queue. + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [nil] + # + # @see Lithic::Models::TransactionMonitoring::QueueDeleteParams + def delete(queue_token, params = {}) + @client.request( + method: :delete, + path: ["v1/transaction_monitoring/queues/%1$s", queue_token], + model: NilClass, + options: params[:request_options] + ) + end + + # @api private + # + # @param client [Lithic::Client] + def initialize(client:) + @client = client + end + end + end + end +end diff --git a/rbi/lithic/client.rbi b/rbi/lithic/client.rbi index 88810295..3ec35230 100644 --- a/rbi/lithic/client.rbi +++ b/rbi/lithic/client.rbi @@ -34,6 +34,9 @@ module Lithic sig { returns(Lithic::Resources::AuthRules) } attr_reader :auth_rules + sig { returns(Lithic::Resources::TransactionMonitoring) } + attr_reader :transaction_monitoring + sig { returns(Lithic::Resources::AuthStreamEnrollment) } attr_reader :auth_stream_enrollment diff --git a/rbi/lithic/models.rbi b/rbi/lithic/models.rbi index 41d4390e..d7b94142 100644 --- a/rbi/lithic/models.rbi +++ b/rbi/lithic/models.rbi @@ -602,6 +602,8 @@ module Lithic TransactionListParams = Lithic::Models::TransactionListParams + TransactionMonitoring = Lithic::Models::TransactionMonitoring + TransactionRetrieveParams = Lithic::Models::TransactionRetrieveParams Transactions = Lithic::Models::Transactions diff --git a/rbi/lithic/models/account_holders/account_holder_entity.rbi b/rbi/lithic/models/account_holders/account_holder_entity.rbi index ebdf94a1..5121588e 100644 --- a/rbi/lithic/models/account_holders/account_holder_entity.rbi +++ b/rbi/lithic/models/account_holders/account_holder_entity.rbi @@ -63,11 +63,7 @@ module Lithic attr_accessor :status # The type of entity - sig do - returns( - Lithic::AccountHolders::AccountHolderEntity::Type::TaggedSymbol - ) - end + sig { returns(Lithic::TransactionMonitoring::EntityType::TaggedSymbol) } attr_accessor :type # Information about an entity associated with an account holder @@ -84,7 +80,7 @@ module Lithic phone_number: T.nilable(String), status: Lithic::AccountHolders::AccountHolderEntity::Status::OrSymbol, - type: Lithic::AccountHolders::AccountHolderEntity::Type::OrSymbol + type: Lithic::TransactionMonitoring::EntityType::OrSymbol ).returns(T.attached_class) end def self.new( @@ -124,8 +120,7 @@ module Lithic phone_number: T.nilable(String), status: Lithic::AccountHolders::AccountHolderEntity::Status::TaggedSymbol, - type: - Lithic::AccountHolders::AccountHolderEntity::Type::TaggedSymbol + type: Lithic::TransactionMonitoring::EntityType::TaggedSymbol } ) end @@ -258,38 +253,6 @@ module Lithic def self.values end end - - # The type of entity - module Type - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, Lithic::AccountHolders::AccountHolderEntity::Type) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - BENEFICIAL_OWNER_INDIVIDUAL = - T.let( - :BENEFICIAL_OWNER_INDIVIDUAL, - Lithic::AccountHolders::AccountHolderEntity::Type::TaggedSymbol - ) - CONTROL_PERSON = - T.let( - :CONTROL_PERSON, - Lithic::AccountHolders::AccountHolderEntity::Type::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::AccountHolders::AccountHolderEntity::Type::TaggedSymbol - ] - ) - end - def self.values - end - end end end end diff --git a/rbi/lithic/models/account_holders/entity_create_params.rbi b/rbi/lithic/models/account_holders/entity_create_params.rbi index 4f03a6b4..66ee8ce5 100644 --- a/rbi/lithic/models/account_holders/entity_create_params.rbi +++ b/rbi/lithic/models/account_holders/entity_create_params.rbi @@ -59,9 +59,7 @@ module Lithic attr_accessor :phone_number # The type of entity to create on the account holder - sig do - returns(Lithic::AccountHolders::EntityCreateParams::Type::OrSymbol) - end + sig { returns(Lithic::TransactionMonitoring::EntityType::OrSymbol) } attr_accessor :type sig do @@ -75,7 +73,7 @@ module Lithic government_id: String, last_name: String, phone_number: String, - type: Lithic::AccountHolders::EntityCreateParams::Type::OrSymbol, + type: Lithic::TransactionMonitoring::EntityType::OrSymbol, request_options: Lithic::RequestOptions::OrHash ).returns(T.attached_class) end @@ -117,7 +115,7 @@ module Lithic government_id: String, last_name: String, phone_number: String, - type: Lithic::AccountHolders::EntityCreateParams::Type::OrSymbol, + type: Lithic::TransactionMonitoring::EntityType::OrSymbol, request_options: Lithic::RequestOptions } ) @@ -210,38 +208,6 @@ module Lithic def to_hash end end - - # The type of entity to create on the account holder - module Type - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, Lithic::AccountHolders::EntityCreateParams::Type) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - BENEFICIAL_OWNER_INDIVIDUAL = - T.let( - :BENEFICIAL_OWNER_INDIVIDUAL, - Lithic::AccountHolders::EntityCreateParams::Type::TaggedSymbol - ) - CONTROL_PERSON = - T.let( - :CONTROL_PERSON, - Lithic::AccountHolders::EntityCreateParams::Type::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::AccountHolders::EntityCreateParams::Type::TaggedSymbol - ] - ) - end - def self.values - end - end end end end diff --git a/rbi/lithic/models/transaction_monitoring/case_activity_entry.rbi b/rbi/lithic/models/transaction_monitoring/case_activity_entry.rbi new file mode 100644 index 00000000..2e34edef --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/case_activity_entry.rbi @@ -0,0 +1,107 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + class CaseActivityEntry < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::TransactionMonitoring::CaseActivityEntry, + Lithic::Internal::AnyHash + ) + end + + # Globally unique identifier for the activity entry + sig { returns(String) } + attr_accessor :token + + # Identifier of the actor that produced the activity entry + sig { returns(T.nilable(String)) } + attr_accessor :actor_token + + # Date and time at which the activity entry was created + sig { returns(Time) } + attr_accessor :created + + # The case field that changed, or the action that was taken, in an activity entry: + # + # - `STATUS` - The case status changed + # - `TITLE` - The case title changed + # - `ASSIGNED_TO` - The case assignee changed + # - `RESOLUTION_OUTCOME` - The resolution outcome was set or changed + # - `RESOLUTION_NOTES` - The resolution notes were set or changed + # - `TAGS` - The case tags changed + # - `PRIORITY` - The case priority changed + # - `COMMENT` - A comment was added or edited + # - `FILE` - A file was attached to the case + sig do + returns(Lithic::TransactionMonitoring::CaseActivityType::TaggedSymbol) + end + attr_accessor :entry_type + + # New value of the changed field, when applicable + sig { returns(T.nilable(String)) } + attr_accessor :new_value + + # Previous value of the changed field, when applicable + sig { returns(T.nilable(String)) } + attr_accessor :previous_value + + # A single entry in a case's activity feed + sig do + params( + token: String, + actor_token: T.nilable(String), + created: Time, + entry_type: + Lithic::TransactionMonitoring::CaseActivityType::OrSymbol, + new_value: T.nilable(String), + previous_value: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Globally unique identifier for the activity entry + token:, + # Identifier of the actor that produced the activity entry + actor_token:, + # Date and time at which the activity entry was created + created:, + # The case field that changed, or the action that was taken, in an activity entry: + # + # - `STATUS` - The case status changed + # - `TITLE` - The case title changed + # - `ASSIGNED_TO` - The case assignee changed + # - `RESOLUTION_OUTCOME` - The resolution outcome was set or changed + # - `RESOLUTION_NOTES` - The resolution notes were set or changed + # - `TAGS` - The case tags changed + # - `PRIORITY` - The case priority changed + # - `COMMENT` - A comment was added or edited + # - `FILE` - A file was attached to the case + entry_type:, + # New value of the changed field, when applicable + new_value:, + # Previous value of the changed field, when applicable + previous_value: + ) + end + + sig do + override.returns( + { + token: String, + actor_token: T.nilable(String), + created: Time, + entry_type: + Lithic::TransactionMonitoring::CaseActivityType::TaggedSymbol, + new_value: T.nilable(String), + previous_value: T.nilable(String) + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/case_activity_type.rbi b/rbi/lithic/models/transaction_monitoring/case_activity_type.rbi new file mode 100644 index 00000000..78fa4d42 --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/case_activity_type.rbi @@ -0,0 +1,84 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + # The case field that changed, or the action that was taken, in an activity entry: + # + # - `STATUS` - The case status changed + # - `TITLE` - The case title changed + # - `ASSIGNED_TO` - The case assignee changed + # - `RESOLUTION_OUTCOME` - The resolution outcome was set or changed + # - `RESOLUTION_NOTES` - The resolution notes were set or changed + # - `TAGS` - The case tags changed + # - `PRIORITY` - The case priority changed + # - `COMMENT` - A comment was added or edited + # - `FILE` - A file was attached to the case + module CaseActivityType + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::TransactionMonitoring::CaseActivityType) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + STATUS = + T.let( + :STATUS, + Lithic::TransactionMonitoring::CaseActivityType::TaggedSymbol + ) + TITLE = + T.let( + :TITLE, + Lithic::TransactionMonitoring::CaseActivityType::TaggedSymbol + ) + ASSIGNED_TO = + T.let( + :ASSIGNED_TO, + Lithic::TransactionMonitoring::CaseActivityType::TaggedSymbol + ) + RESOLUTION_OUTCOME = + T.let( + :RESOLUTION_OUTCOME, + Lithic::TransactionMonitoring::CaseActivityType::TaggedSymbol + ) + RESOLUTION_NOTES = + T.let( + :RESOLUTION_NOTES, + Lithic::TransactionMonitoring::CaseActivityType::TaggedSymbol + ) + TAGS = + T.let( + :TAGS, + Lithic::TransactionMonitoring::CaseActivityType::TaggedSymbol + ) + PRIORITY = + T.let( + :PRIORITY, + Lithic::TransactionMonitoring::CaseActivityType::TaggedSymbol + ) + COMMENT = + T.let( + :COMMENT, + Lithic::TransactionMonitoring::CaseActivityType::TaggedSymbol + ) + FILE = + T.let( + :FILE, + Lithic::TransactionMonitoring::CaseActivityType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::TransactionMonitoring::CaseActivityType::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/case_card.rbi b/rbi/lithic/models/transaction_monitoring/case_card.rbi new file mode 100644 index 00000000..df763a25 --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/case_card.rbi @@ -0,0 +1,60 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + class CaseCard < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::TransactionMonitoring::CaseCard, + Lithic::Internal::AnyHash + ) + end + + # Token of the account the card belongs to + sig { returns(String) } + attr_accessor :account_token + + # Token of the card + sig { returns(String) } + attr_accessor :card_token + + # Number of the card's transactions associated with the case + sig { returns(Integer) } + attr_accessor :transaction_count + + # Summary of a card's involvement in a case, aggregated across the case's + # transactions + sig do + params( + account_token: String, + card_token: String, + transaction_count: Integer + ).returns(T.attached_class) + end + def self.new( + # Token of the account the card belongs to + account_token:, + # Token of the card + card_token:, + # Number of the card's transactions associated with the case + transaction_count: + ) + end + + sig do + override.returns( + { + account_token: String, + card_token: String, + transaction_count: Integer + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/case_entity.rbi b/rbi/lithic/models/transaction_monitoring/case_entity.rbi new file mode 100644 index 00000000..0c6f5690 --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/case_entity.rbi @@ -0,0 +1,101 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + class CaseEntity < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::TransactionMonitoring::CaseEntity, + Lithic::Internal::AnyHash + ) + end + + # Globally unique identifier for the associated entity + sig { returns(String) } + attr_accessor :entity_token + + # The type of entity a case is associated with: + # + # - `CARD` - The case is associated with a card + # - `ACCOUNT` - The case is associated with an account + sig do + returns( + Lithic::TransactionMonitoring::CaseEntity::EntityType::TaggedSymbol + ) + end + attr_accessor :entity_type + + # The entity a case is associated with + sig do + params( + entity_token: String, + entity_type: + Lithic::TransactionMonitoring::CaseEntity::EntityType::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # Globally unique identifier for the associated entity + entity_token:, + # The type of entity a case is associated with: + # + # - `CARD` - The case is associated with a card + # - `ACCOUNT` - The case is associated with an account + entity_type: + ) + end + + sig do + override.returns( + { + entity_token: String, + entity_type: + Lithic::TransactionMonitoring::CaseEntity::EntityType::TaggedSymbol + } + ) + end + def to_hash + end + + # The type of entity a case is associated with: + # + # - `CARD` - The case is associated with a card + # - `ACCOUNT` - The case is associated with an account + module EntityType + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::TransactionMonitoring::CaseEntity::EntityType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CARD = + T.let( + :CARD, + Lithic::TransactionMonitoring::CaseEntity::EntityType::TaggedSymbol + ) + ACCOUNT = + T.let( + :ACCOUNT, + Lithic::TransactionMonitoring::CaseEntity::EntityType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::TransactionMonitoring::CaseEntity::EntityType::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/case_list_activity_params.rbi b/rbi/lithic/models/transaction_monitoring/case_list_activity_params.rbi new file mode 100644 index 00000000..2438b2d7 --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/case_list_activity_params.rbi @@ -0,0 +1,83 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + class CaseListActivityParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Lithic::TransactionMonitoring::CaseListActivityParams, + Lithic::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :case_token + + # A cursor representing an item's token before which a page of results should end. + # Used to retrieve the previous page of results before this item. + sig { returns(T.nilable(String)) } + attr_reader :ending_before + + sig { params(ending_before: String).void } + attr_writer :ending_before + + # Page size (for pagination). + sig { returns(T.nilable(Integer)) } + attr_reader :page_size + + sig { params(page_size: Integer).void } + attr_writer :page_size + + # A cursor representing an item's token after which a page of results should + # begin. Used to retrieve the next page of results after this item. + sig { returns(T.nilable(String)) } + attr_reader :starting_after + + sig { params(starting_after: String).void } + attr_writer :starting_after + + sig do + params( + case_token: String, + ending_before: String, + page_size: Integer, + starting_after: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + case_token:, + # A cursor representing an item's token before which a page of results should end. + # Used to retrieve the previous page of results before this item. + ending_before: nil, + # Page size (for pagination). + page_size: nil, + # A cursor representing an item's token after which a page of results should + # begin. Used to retrieve the next page of results after this item. + starting_after: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + case_token: String, + ending_before: String, + page_size: Integer, + starting_after: String, + request_options: Lithic::RequestOptions + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/case_list_params.rbi b/rbi/lithic/models/transaction_monitoring/case_list_params.rbi new file mode 100644 index 00000000..d917f0d9 --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/case_list_params.rbi @@ -0,0 +1,220 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + class CaseListParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Lithic::TransactionMonitoring::CaseListParams, + Lithic::Internal::AnyHash + ) + end + + # Only return cases that include transactions on the provided account. + sig { returns(T.nilable(String)) } + attr_reader :account_token + + sig { params(account_token: String).void } + attr_writer :account_token + + # Only return cases assigned to the provided value. Pass an empty string to return + # only unassigned cases. + sig { returns(T.nilable(String)) } + attr_reader :assignee + + sig { params(assignee: String).void } + attr_writer :assignee + + # Date string in RFC 3339 format. Only entries created after the specified time + # will be included. UTC time zone. + sig { returns(T.nilable(Time)) } + attr_reader :begin_ + + sig { params(begin_: Time).void } + attr_writer :begin_ + + # Only return cases that include transactions on the provided card. + sig { returns(T.nilable(String)) } + attr_reader :card_token + + sig { params(card_token: String).void } + attr_writer :card_token + + # Date string in RFC 3339 format. Only entries created before the specified time + # will be included. UTC time zone. + sig { returns(T.nilable(Time)) } + attr_reader :end_ + + sig { params(end_: Time).void } + attr_writer :end_ + + # A cursor representing an item's token before which a page of results should end. + # Used to retrieve the previous page of results before this item. + sig { returns(T.nilable(String)) } + attr_reader :ending_before + + sig { params(ending_before: String).void } + attr_writer :ending_before + + # Only return cases associated with the provided entity. + sig { returns(T.nilable(String)) } + attr_reader :entity_token + + sig { params(entity_token: String).void } + attr_writer :entity_token + + # Page size (for pagination). + sig { returns(T.nilable(Integer)) } + attr_reader :page_size + + sig { params(page_size: Integer).void } + attr_writer :page_size + + # Only return cases belonging to the provided queue. + sig { returns(T.nilable(String)) } + attr_reader :queue_token + + sig { params(queue_token: String).void } + attr_writer :queue_token + + # Only return cases triggered by the provided transaction monitoring rule. + sig { returns(T.nilable(String)) } + attr_reader :rule_token + + sig { params(rule_token: String).void } + attr_writer :rule_token + + # Sort order for the returned cases. + sig do + returns( + T.nilable(Lithic::TransactionMonitoring::CaseSortOrder::OrSymbol) + ) + end + attr_reader :sort_by + + sig do + params( + sort_by: Lithic::TransactionMonitoring::CaseSortOrder::OrSymbol + ).void + end + attr_writer :sort_by + + # A cursor representing an item's token after which a page of results should + # begin. Used to retrieve the next page of results after this item. + sig { returns(T.nilable(String)) } + attr_reader :starting_after + + sig { params(starting_after: String).void } + attr_writer :starting_after + + # Only return cases with the provided status. + sig do + returns( + T.nilable(Lithic::TransactionMonitoring::CaseStatus::OrSymbol) + ) + end + attr_reader :status + + sig do + params( + status: Lithic::TransactionMonitoring::CaseStatus::OrSymbol + ).void + end + attr_writer :status + + # Only return cases that include the provided transaction. + sig { returns(T.nilable(String)) } + attr_reader :transaction_token + + sig { params(transaction_token: String).void } + attr_writer :transaction_token + + sig do + params( + account_token: String, + assignee: String, + begin_: Time, + card_token: String, + end_: Time, + ending_before: String, + entity_token: String, + page_size: Integer, + queue_token: String, + rule_token: String, + sort_by: Lithic::TransactionMonitoring::CaseSortOrder::OrSymbol, + starting_after: String, + status: Lithic::TransactionMonitoring::CaseStatus::OrSymbol, + transaction_token: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # Only return cases that include transactions on the provided account. + account_token: nil, + # Only return cases assigned to the provided value. Pass an empty string to return + # only unassigned cases. + assignee: nil, + # Date string in RFC 3339 format. Only entries created after the specified time + # will be included. UTC time zone. + begin_: nil, + # Only return cases that include transactions on the provided card. + card_token: nil, + # Date string in RFC 3339 format. Only entries created before the specified time + # will be included. UTC time zone. + end_: nil, + # A cursor representing an item's token before which a page of results should end. + # Used to retrieve the previous page of results before this item. + ending_before: nil, + # Only return cases associated with the provided entity. + entity_token: nil, + # Page size (for pagination). + page_size: nil, + # Only return cases belonging to the provided queue. + queue_token: nil, + # Only return cases triggered by the provided transaction monitoring rule. + rule_token: nil, + # Sort order for the returned cases. + sort_by: nil, + # A cursor representing an item's token after which a page of results should + # begin. Used to retrieve the next page of results after this item. + starting_after: nil, + # Only return cases with the provided status. + status: nil, + # Only return cases that include the provided transaction. + transaction_token: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + account_token: String, + assignee: String, + begin_: Time, + card_token: String, + end_: Time, + ending_before: String, + entity_token: String, + page_size: Integer, + queue_token: String, + rule_token: String, + sort_by: Lithic::TransactionMonitoring::CaseSortOrder::OrSymbol, + starting_after: String, + status: Lithic::TransactionMonitoring::CaseStatus::OrSymbol, + transaction_token: String, + request_options: Lithic::RequestOptions + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/case_list_transactions_params.rbi b/rbi/lithic/models/transaction_monitoring/case_list_transactions_params.rbi new file mode 100644 index 00000000..f7211682 --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/case_list_transactions_params.rbi @@ -0,0 +1,83 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + class CaseListTransactionsParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Lithic::TransactionMonitoring::CaseListTransactionsParams, + Lithic::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :case_token + + # A cursor representing an item's token before which a page of results should end. + # Used to retrieve the previous page of results before this item. + sig { returns(T.nilable(String)) } + attr_reader :ending_before + + sig { params(ending_before: String).void } + attr_writer :ending_before + + # Page size (for pagination). + sig { returns(T.nilable(Integer)) } + attr_reader :page_size + + sig { params(page_size: Integer).void } + attr_writer :page_size + + # A cursor representing an item's token after which a page of results should + # begin. Used to retrieve the next page of results after this item. + sig { returns(T.nilable(String)) } + attr_reader :starting_after + + sig { params(starting_after: String).void } + attr_writer :starting_after + + sig do + params( + case_token: String, + ending_before: String, + page_size: Integer, + starting_after: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + case_token:, + # A cursor representing an item's token before which a page of results should end. + # Used to retrieve the previous page of results before this item. + ending_before: nil, + # Page size (for pagination). + page_size: nil, + # A cursor representing an item's token after which a page of results should + # begin. Used to retrieve the next page of results after this item. + starting_after: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + case_token: String, + ending_before: String, + page_size: Integer, + starting_after: String, + request_options: Lithic::RequestOptions + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/case_priority.rbi b/rbi/lithic/models/transaction_monitoring/case_priority.rbi new file mode 100644 index 00000000..63eb3c0d --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/case_priority.rbi @@ -0,0 +1,44 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + # Priority level of a case, controlling queue ordering and SLA urgency + module CasePriority + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::TransactionMonitoring::CasePriority) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LOW = + T.let(:LOW, Lithic::TransactionMonitoring::CasePriority::TaggedSymbol) + MEDIUM = + T.let( + :MEDIUM, + Lithic::TransactionMonitoring::CasePriority::TaggedSymbol + ) + HIGH = + T.let( + :HIGH, + Lithic::TransactionMonitoring::CasePriority::TaggedSymbol + ) + CRITICAL = + T.let( + :CRITICAL, + Lithic::TransactionMonitoring::CasePriority::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Lithic::TransactionMonitoring::CasePriority::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/case_retrieve_cards_params.rbi b/rbi/lithic/models/transaction_monitoring/case_retrieve_cards_params.rbi new file mode 100644 index 00000000..59b10825 --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/case_retrieve_cards_params.rbi @@ -0,0 +1,40 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + class CaseRetrieveCardsParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Lithic::TransactionMonitoring::CaseRetrieveCardsParams, + Lithic::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :case_token + + sig do + params( + case_token: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(case_token:, request_options: {}) + end + + sig do + override.returns( + { case_token: String, request_options: Lithic::RequestOptions } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/case_retrieve_cards_response.rbi b/rbi/lithic/models/transaction_monitoring/case_retrieve_cards_response.rbi new file mode 100644 index 00000000..748db072 --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/case_retrieve_cards_response.rbi @@ -0,0 +1,15 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + CaseRetrieveCardsResponse = + T.let( + Lithic::Internal::Type::ArrayOf[ + Lithic::TransactionMonitoring::CaseCard + ], + Lithic::Internal::Type::Converter + ) + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/case_retrieve_params.rbi b/rbi/lithic/models/transaction_monitoring/case_retrieve_params.rbi new file mode 100644 index 00000000..a2e832ff --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/case_retrieve_params.rbi @@ -0,0 +1,40 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + class CaseRetrieveParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Lithic::TransactionMonitoring::CaseRetrieveParams, + Lithic::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :case_token + + sig do + params( + case_token: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(case_token:, request_options: {}) + end + + sig do + override.returns( + { case_token: String, request_options: Lithic::RequestOptions } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/case_sort_order.rbi b/rbi/lithic/models/transaction_monitoring/case_sort_order.rbi new file mode 100644 index 00000000..63d51357 --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/case_sort_order.rbi @@ -0,0 +1,64 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + # Sort order for listing cases. Defaults to `CREATED_DESC` (newest first): + # + # - `CREATED_ASC` - Oldest first + # - `CREATED_DESC` - Newest first + # - `PRIORITY_DESC` - Highest priority first + # - `PRIORITY_ASC` - Lowest priority first + # - `STATUS_DESC` - Furthest workflow stage first + # - `STATUS_ASC` - Earliest workflow stage first + module CaseSortOrder + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::TransactionMonitoring::CaseSortOrder) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CREATED_ASC = + T.let( + :CREATED_ASC, + Lithic::TransactionMonitoring::CaseSortOrder::TaggedSymbol + ) + CREATED_DESC = + T.let( + :CREATED_DESC, + Lithic::TransactionMonitoring::CaseSortOrder::TaggedSymbol + ) + PRIORITY_DESC = + T.let( + :PRIORITY_DESC, + Lithic::TransactionMonitoring::CaseSortOrder::TaggedSymbol + ) + PRIORITY_ASC = + T.let( + :PRIORITY_ASC, + Lithic::TransactionMonitoring::CaseSortOrder::TaggedSymbol + ) + STATUS_DESC = + T.let( + :STATUS_DESC, + Lithic::TransactionMonitoring::CaseSortOrder::TaggedSymbol + ) + STATUS_ASC = + T.let( + :STATUS_ASC, + Lithic::TransactionMonitoring::CaseSortOrder::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Lithic::TransactionMonitoring::CaseSortOrder::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/case_status.rbi b/rbi/lithic/models/transaction_monitoring/case_status.rbi new file mode 100644 index 00000000..6e3ee116 --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/case_status.rbi @@ -0,0 +1,63 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + # Status of a case as it progresses through the review workflow: + # + # - `OPEN` - The case has been created and is still collecting matching + # transactions + # - `ASSIGNED` - An analyst has been assigned and transaction collection has + # stopped + # - `IN_REVIEW` - The case is actively being investigated + # - `ESCALATED` - The case has been reviewed and requires additional oversight + # - `RESOLVED` - A determination has been made and a resolution recorded + # - `CLOSED` - The case is finalized + module CaseStatus + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::TransactionMonitoring::CaseStatus) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + OPEN = + T.let(:OPEN, Lithic::TransactionMonitoring::CaseStatus::TaggedSymbol) + ASSIGNED = + T.let( + :ASSIGNED, + Lithic::TransactionMonitoring::CaseStatus::TaggedSymbol + ) + IN_REVIEW = + T.let( + :IN_REVIEW, + Lithic::TransactionMonitoring::CaseStatus::TaggedSymbol + ) + ESCALATED = + T.let( + :ESCALATED, + Lithic::TransactionMonitoring::CaseStatus::TaggedSymbol + ) + RESOLVED = + T.let( + :RESOLVED, + Lithic::TransactionMonitoring::CaseStatus::TaggedSymbol + ) + CLOSED = + T.let( + :CLOSED, + Lithic::TransactionMonitoring::CaseStatus::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Lithic::TransactionMonitoring::CaseStatus::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/case_transaction.rbi b/rbi/lithic/models/transaction_monitoring/case_transaction.rbi new file mode 100644 index 00000000..ef8463e8 --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/case_transaction.rbi @@ -0,0 +1,75 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + class CaseTransaction < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::TransactionMonitoring::CaseTransaction, + Lithic::Internal::AnyHash + ) + end + + # Globally unique identifier for the transaction + sig { returns(String) } + attr_accessor :token + + # Token of the account the transaction belongs to + sig { returns(String) } + attr_accessor :account_token + + # Date and time at which the transaction was added to the case + sig { returns(Time) } + attr_accessor :added_at + + # Token of the card the transaction was made on + sig { returns(String) } + attr_accessor :card_token + + # Date and time at which the transaction was created + sig { returns(Time) } + attr_accessor :transaction_created_at + + # A single transaction associated with a case + sig do + params( + token: String, + account_token: String, + added_at: Time, + card_token: String, + transaction_created_at: Time + ).returns(T.attached_class) + end + def self.new( + # Globally unique identifier for the transaction + token:, + # Token of the account the transaction belongs to + account_token:, + # Date and time at which the transaction was added to the case + added_at:, + # Token of the card the transaction was made on + card_token:, + # Date and time at which the transaction was created + transaction_created_at: + ) + end + + sig do + override.returns( + { + token: String, + account_token: String, + added_at: Time, + card_token: String, + transaction_created_at: Time + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/case_update_params.rbi b/rbi/lithic/models/transaction_monitoring/case_update_params.rbi new file mode 100644 index 00000000..1d2e79aa --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/case_update_params.rbi @@ -0,0 +1,201 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + class CaseUpdateParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Lithic::TransactionMonitoring::CaseUpdateParams, + Lithic::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :case_token + + # Optional client-provided identifier for the actor performing this action, + # recorded on the resulting activity entry. This value is supplied by the client + # (for example, your own internal user ID) and is not authenticated by Lithic + sig { returns(T.nilable(String)) } + attr_reader :actor_token + + sig { params(actor_token: String).void } + attr_writer :actor_token + + # New assignee for the case, or `null` to unassign + sig { returns(T.nilable(String)) } + attr_accessor :assignee + + # Priority level of a case, controlling queue ordering and SLA urgency + sig do + returns( + T.nilable(Lithic::TransactionMonitoring::CasePriority::OrSymbol) + ) + end + attr_reader :priority + + sig do + params( + priority: Lithic::TransactionMonitoring::CasePriority::OrSymbol + ).void + end + attr_writer :priority + + # Outcome recorded when a case is resolved: + # + # - `CONFIRMED_FRAUD` - The reviewed activity was confirmed to be fraudulent + # - `SUSPICIOUS_ACTIVITY` - The activity is suspicious but not confirmed fraud + # - `FALSE_POSITIVE` - The activity was legitimate and the alert was a false + # positive + # - `NO_ACTION_REQUIRED` - No further action is required + # - `ESCALATED_EXTERNAL` - The case was escalated to an external party + sig do + returns( + T.nilable( + Lithic::TransactionMonitoring::ResolutionOutcome::OrSymbol + ) + ) + end + attr_reader :resolution + + sig do + params( + resolution: + Lithic::TransactionMonitoring::ResolutionOutcome::OrSymbol + ).void + end + attr_writer :resolution + + # Notes describing the resolution + sig { returns(T.nilable(String)) } + attr_reader :resolution_notes + + sig { params(resolution_notes: String).void } + attr_writer :resolution_notes + + # New SLA deadline for the case, or `null` to clear it + sig { returns(T.nilable(Time)) } + attr_accessor :sla_deadline + + # Status of a case as it progresses through the review workflow: + # + # - `OPEN` - The case has been created and is still collecting matching + # transactions + # - `ASSIGNED` - An analyst has been assigned and transaction collection has + # stopped + # - `IN_REVIEW` - The case is actively being investigated + # - `ESCALATED` - The case has been reviewed and requires additional oversight + # - `RESOLVED` - A determination has been made and a resolution recorded + # - `CLOSED` - The case is finalized + sig do + returns( + T.nilable(Lithic::TransactionMonitoring::CaseStatus::OrSymbol) + ) + end + attr_reader :status + + sig do + params( + status: Lithic::TransactionMonitoring::CaseStatus::OrSymbol + ).void + end + attr_writer :status + + # Arbitrary key-value metadata to set on the case + sig { returns(T.nilable(T::Hash[Symbol, String])) } + attr_reader :tags + + sig { params(tags: T::Hash[Symbol, String]).void } + attr_writer :tags + + # New title for the case, or `null` to clear it + sig { returns(T.nilable(String)) } + attr_accessor :title + + sig do + params( + case_token: String, + actor_token: String, + assignee: T.nilable(String), + priority: Lithic::TransactionMonitoring::CasePriority::OrSymbol, + resolution: + Lithic::TransactionMonitoring::ResolutionOutcome::OrSymbol, + resolution_notes: String, + sla_deadline: T.nilable(Time), + status: Lithic::TransactionMonitoring::CaseStatus::OrSymbol, + tags: T::Hash[Symbol, String], + title: T.nilable(String), + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + case_token:, + # Optional client-provided identifier for the actor performing this action, + # recorded on the resulting activity entry. This value is supplied by the client + # (for example, your own internal user ID) and is not authenticated by Lithic + actor_token: nil, + # New assignee for the case, or `null` to unassign + assignee: nil, + # Priority level of a case, controlling queue ordering and SLA urgency + priority: nil, + # Outcome recorded when a case is resolved: + # + # - `CONFIRMED_FRAUD` - The reviewed activity was confirmed to be fraudulent + # - `SUSPICIOUS_ACTIVITY` - The activity is suspicious but not confirmed fraud + # - `FALSE_POSITIVE` - The activity was legitimate and the alert was a false + # positive + # - `NO_ACTION_REQUIRED` - No further action is required + # - `ESCALATED_EXTERNAL` - The case was escalated to an external party + resolution: nil, + # Notes describing the resolution + resolution_notes: nil, + # New SLA deadline for the case, or `null` to clear it + sla_deadline: nil, + # Status of a case as it progresses through the review workflow: + # + # - `OPEN` - The case has been created and is still collecting matching + # transactions + # - `ASSIGNED` - An analyst has been assigned and transaction collection has + # stopped + # - `IN_REVIEW` - The case is actively being investigated + # - `ESCALATED` - The case has been reviewed and requires additional oversight + # - `RESOLVED` - A determination has been made and a resolution recorded + # - `CLOSED` - The case is finalized + status: nil, + # Arbitrary key-value metadata to set on the case + tags: nil, + # New title for the case, or `null` to clear it + title: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + case_token: String, + actor_token: String, + assignee: T.nilable(String), + priority: Lithic::TransactionMonitoring::CasePriority::OrSymbol, + resolution: + Lithic::TransactionMonitoring::ResolutionOutcome::OrSymbol, + resolution_notes: String, + sla_deadline: T.nilable(Time), + status: Lithic::TransactionMonitoring::CaseStatus::OrSymbol, + tags: T::Hash[Symbol, String], + title: T.nilable(String), + request_options: Lithic::RequestOptions + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/cases/case_file.rbi b/rbi/lithic/models/transaction_monitoring/cases/case_file.rbi new file mode 100644 index 00000000..f3156b0b --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/cases/case_file.rbi @@ -0,0 +1,188 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + CaseFile = Cases::CaseFile + + module Cases + class CaseFile < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::TransactionMonitoring::Cases::CaseFile, + Lithic::Internal::AnyHash + ) + end + + # Globally unique identifier for the file + sig { returns(String) } + attr_accessor :token + + # Date and time at which the file record was created + sig { returns(Time) } + attr_accessor :created + + # Presigned URL the client uses to download the file + sig { returns(T.nilable(String)) } + attr_accessor :download_url + + # Date and time at which the download URL expires + sig { returns(T.nilable(Time)) } + attr_accessor :download_url_expires + + # Reason the file was rejected, when applicable + sig { returns(T.nilable(String)) } + attr_accessor :failure_reason + + # MIME type of the file, available once the file is ready + sig { returns(T.nilable(String)) } + attr_accessor :mime_type + + # Name of the file + sig { returns(String) } + attr_accessor :name + + # Size of the file in bytes, available once the file is ready + sig { returns(T.nilable(Integer)) } + attr_accessor :size_bytes + + # Lifecycle status of a case file: + # + # - `PENDING` - An upload URL has been issued and the file is awaiting upload + # - `READY` - The file has been uploaded and validated; a download URL is + # available + # - `REJECTED` - File validation failed; see `failure_reason` for details + sig do + returns( + Lithic::TransactionMonitoring::Cases::FileStatus::TaggedSymbol + ) + end + attr_accessor :status + + # Date and time at which the file record was last updated + sig { returns(Time) } + attr_accessor :updated + + # Constraints applied to a file upload, returned alongside the upload URL so + # clients can validate before uploading + sig do + returns( + T.nilable(Lithic::TransactionMonitoring::Cases::UploadConstraints) + ) + end + attr_reader :upload_constraints + + sig do + params( + upload_constraints: + T.nilable( + Lithic::TransactionMonitoring::Cases::UploadConstraints::OrHash + ) + ).void + end + attr_writer :upload_constraints + + # Presigned URL the client uses to upload the file + sig { returns(T.nilable(String)) } + attr_accessor :upload_url + + # Date and time at which the upload URL expires + sig { returns(T.nilable(Time)) } + attr_accessor :upload_url_expires + + # A file attached to a case. Status-dependent fields are always present but may be + # `null`: + # + # - `upload_url`, `upload_url_expires`, and `upload_constraints` are populated + # when `status` is `PENDING` or `REJECTED` + # - `download_url` and `download_url_expires` are populated when `status` is + # `READY` + # - `failure_reason` is populated when `status` is `REJECTED` + sig do + params( + token: String, + created: Time, + download_url: T.nilable(String), + download_url_expires: T.nilable(Time), + failure_reason: T.nilable(String), + mime_type: T.nilable(String), + name: String, + size_bytes: T.nilable(Integer), + status: + Lithic::TransactionMonitoring::Cases::FileStatus::OrSymbol, + updated: Time, + upload_constraints: + T.nilable( + Lithic::TransactionMonitoring::Cases::UploadConstraints::OrHash + ), + upload_url: T.nilable(String), + upload_url_expires: T.nilable(Time) + ).returns(T.attached_class) + end + def self.new( + # Globally unique identifier for the file + token:, + # Date and time at which the file record was created + created:, + # Presigned URL the client uses to download the file + download_url:, + # Date and time at which the download URL expires + download_url_expires:, + # Reason the file was rejected, when applicable + failure_reason:, + # MIME type of the file, available once the file is ready + mime_type:, + # Name of the file + name:, + # Size of the file in bytes, available once the file is ready + size_bytes:, + # Lifecycle status of a case file: + # + # - `PENDING` - An upload URL has been issued and the file is awaiting upload + # - `READY` - The file has been uploaded and validated; a download URL is + # available + # - `REJECTED` - File validation failed; see `failure_reason` for details + status:, + # Date and time at which the file record was last updated + updated:, + # Constraints applied to a file upload, returned alongside the upload URL so + # clients can validate before uploading + upload_constraints:, + # Presigned URL the client uses to upload the file + upload_url:, + # Date and time at which the upload URL expires + upload_url_expires: + ) + end + + sig do + override.returns( + { + token: String, + created: Time, + download_url: T.nilable(String), + download_url_expires: T.nilable(Time), + failure_reason: T.nilable(String), + mime_type: T.nilable(String), + name: String, + size_bytes: T.nilable(Integer), + status: + Lithic::TransactionMonitoring::Cases::FileStatus::TaggedSymbol, + updated: Time, + upload_constraints: + T.nilable( + Lithic::TransactionMonitoring::Cases::UploadConstraints + ), + upload_url: T.nilable(String), + upload_url_expires: T.nilable(Time) + } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/cases/comment_create_params.rbi b/rbi/lithic/models/transaction_monitoring/cases/comment_create_params.rbi new file mode 100644 index 00000000..a1b79144 --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/cases/comment_create_params.rbi @@ -0,0 +1,71 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + module Cases + class CommentCreateParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Lithic::TransactionMonitoring::Cases::CommentCreateParams, + Lithic::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :case_token + + # Text of the comment + sig { returns(String) } + attr_accessor :comment + + # Optional client-provided identifier for the actor performing this action, + # recorded on the resulting activity entry. This value is supplied by the client + # (for example, your own internal user ID) and is not authenticated by Lithic + sig { returns(T.nilable(String)) } + attr_reader :actor_token + + sig { params(actor_token: String).void } + attr_writer :actor_token + + sig do + params( + case_token: String, + comment: String, + actor_token: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + case_token:, + # Text of the comment + comment:, + # Optional client-provided identifier for the actor performing this action, + # recorded on the resulting activity entry. This value is supplied by the client + # (for example, your own internal user ID) and is not authenticated by Lithic + actor_token: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + case_token: String, + comment: String, + actor_token: String, + request_options: Lithic::RequestOptions + } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/cases/comment_delete_params.rbi b/rbi/lithic/models/transaction_monitoring/cases/comment_delete_params.rbi new file mode 100644 index 00000000..d9c5cf59 --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/cases/comment_delete_params.rbi @@ -0,0 +1,50 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + module Cases + class CommentDeleteParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Lithic::TransactionMonitoring::Cases::CommentDeleteParams, + Lithic::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :case_token + + sig { returns(String) } + attr_accessor :comment_token + + sig do + params( + case_token: String, + comment_token: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(case_token:, comment_token:, request_options: {}) + end + + sig do + override.returns( + { + case_token: String, + comment_token: String, + request_options: Lithic::RequestOptions + } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/cases/comment_update_params.rbi b/rbi/lithic/models/transaction_monitoring/cases/comment_update_params.rbi new file mode 100644 index 00000000..7775581d --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/cases/comment_update_params.rbi @@ -0,0 +1,77 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + module Cases + class CommentUpdateParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Lithic::TransactionMonitoring::Cases::CommentUpdateParams, + Lithic::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :case_token + + sig { returns(String) } + attr_accessor :comment_token + + # New text of the comment + sig { returns(String) } + attr_accessor :comment + + # Optional client-provided identifier for the actor performing this action, + # recorded on the resulting activity entry. This value is supplied by the client + # (for example, your own internal user ID) and is not authenticated by Lithic + sig { returns(T.nilable(String)) } + attr_reader :actor_token + + sig { params(actor_token: String).void } + attr_writer :actor_token + + sig do + params( + case_token: String, + comment_token: String, + comment: String, + actor_token: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + case_token:, + comment_token:, + # New text of the comment + comment:, + # Optional client-provided identifier for the actor performing this action, + # recorded on the resulting activity entry. This value is supplied by the client + # (for example, your own internal user ID) and is not authenticated by Lithic + actor_token: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + case_token: String, + comment_token: String, + comment: String, + actor_token: String, + request_options: Lithic::RequestOptions + } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/cases/file_create_params.rbi b/rbi/lithic/models/transaction_monitoring/cases/file_create_params.rbi new file mode 100644 index 00000000..a7efe7a1 --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/cases/file_create_params.rbi @@ -0,0 +1,56 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + module Cases + class FileCreateParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Lithic::TransactionMonitoring::Cases::FileCreateParams, + Lithic::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :case_token + + # Name of the file to upload + sig { returns(String) } + attr_accessor :name + + sig do + params( + case_token: String, + name: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + case_token:, + # Name of the file to upload + name:, + request_options: {} + ) + end + + sig do + override.returns( + { + case_token: String, + name: String, + request_options: Lithic::RequestOptions + } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/cases/file_delete_params.rbi b/rbi/lithic/models/transaction_monitoring/cases/file_delete_params.rbi new file mode 100644 index 00000000..cb06f0c4 --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/cases/file_delete_params.rbi @@ -0,0 +1,50 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + module Cases + class FileDeleteParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Lithic::TransactionMonitoring::Cases::FileDeleteParams, + Lithic::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :case_token + + sig { returns(String) } + attr_accessor :file_token + + sig do + params( + case_token: String, + file_token: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(case_token:, file_token:, request_options: {}) + end + + sig do + override.returns( + { + case_token: String, + file_token: String, + request_options: Lithic::RequestOptions + } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/cases/file_list_params.rbi b/rbi/lithic/models/transaction_monitoring/cases/file_list_params.rbi new file mode 100644 index 00000000..55ab854a --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/cases/file_list_params.rbi @@ -0,0 +1,85 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + module Cases + class FileListParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Lithic::TransactionMonitoring::Cases::FileListParams, + Lithic::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :case_token + + # A cursor representing an item's token before which a page of results should end. + # Used to retrieve the previous page of results before this item. + sig { returns(T.nilable(String)) } + attr_reader :ending_before + + sig { params(ending_before: String).void } + attr_writer :ending_before + + # Page size (for pagination). + sig { returns(T.nilable(Integer)) } + attr_reader :page_size + + sig { params(page_size: Integer).void } + attr_writer :page_size + + # A cursor representing an item's token after which a page of results should + # begin. Used to retrieve the next page of results after this item. + sig { returns(T.nilable(String)) } + attr_reader :starting_after + + sig { params(starting_after: String).void } + attr_writer :starting_after + + sig do + params( + case_token: String, + ending_before: String, + page_size: Integer, + starting_after: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + case_token:, + # A cursor representing an item's token before which a page of results should end. + # Used to retrieve the previous page of results before this item. + ending_before: nil, + # Page size (for pagination). + page_size: nil, + # A cursor representing an item's token after which a page of results should + # begin. Used to retrieve the next page of results after this item. + starting_after: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + case_token: String, + ending_before: String, + page_size: Integer, + starting_after: String, + request_options: Lithic::RequestOptions + } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/cases/file_retrieve_params.rbi b/rbi/lithic/models/transaction_monitoring/cases/file_retrieve_params.rbi new file mode 100644 index 00000000..e26e8a0f --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/cases/file_retrieve_params.rbi @@ -0,0 +1,50 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + module Cases + class FileRetrieveParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Lithic::TransactionMonitoring::Cases::FileRetrieveParams, + Lithic::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :case_token + + sig { returns(String) } + attr_accessor :file_token + + sig do + params( + case_token: String, + file_token: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(case_token:, file_token:, request_options: {}) + end + + sig do + override.returns( + { + case_token: String, + file_token: String, + request_options: Lithic::RequestOptions + } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/cases/file_status.rbi b/rbi/lithic/models/transaction_monitoring/cases/file_status.rbi new file mode 100644 index 00000000..8c2b5a67 --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/cases/file_status.rbi @@ -0,0 +1,51 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + module Cases + # Lifecycle status of a case file: + # + # - `PENDING` - An upload URL has been issued and the file is awaiting upload + # - `READY` - The file has been uploaded and validated; a download URL is + # available + # - `REJECTED` - File validation failed; see `failure_reason` for details + module FileStatus + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::TransactionMonitoring::Cases::FileStatus) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PENDING = + T.let( + :PENDING, + Lithic::TransactionMonitoring::Cases::FileStatus::TaggedSymbol + ) + READY = + T.let( + :READY, + Lithic::TransactionMonitoring::Cases::FileStatus::TaggedSymbol + ) + REJECTED = + T.let( + :REJECTED, + Lithic::TransactionMonitoring::Cases::FileStatus::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::TransactionMonitoring::Cases::FileStatus::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/cases/upload_constraints.rbi b/rbi/lithic/models/transaction_monitoring/cases/upload_constraints.rbi new file mode 100644 index 00000000..8cb78442 --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/cases/upload_constraints.rbi @@ -0,0 +1,51 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + module Cases + class UploadConstraints < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::TransactionMonitoring::Cases::UploadConstraints, + Lithic::Internal::AnyHash + ) + end + + # MIME types accepted for the upload + sig { returns(T::Array[String]) } + attr_accessor :accepted_mime_types + + # Maximum accepted file size, in bytes + sig { returns(Integer) } + attr_accessor :max_size_bytes + + # Constraints applied to a file upload, returned alongside the upload URL so + # clients can validate before uploading + sig do + params( + accepted_mime_types: T::Array[String], + max_size_bytes: Integer + ).returns(T.attached_class) + end + def self.new( + # MIME types accepted for the upload + accepted_mime_types:, + # Maximum accepted file size, in bytes + max_size_bytes: + ) + end + + sig do + override.returns( + { accepted_mime_types: T::Array[String], max_size_bytes: Integer } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/entity_type.rbi b/rbi/lithic/models/transaction_monitoring/entity_type.rbi new file mode 100644 index 00000000..6fe79373 --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/entity_type.rbi @@ -0,0 +1,37 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + # The type of entity associated with an account holder + module EntityType + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::TransactionMonitoring::EntityType) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + BENEFICIAL_OWNER_INDIVIDUAL = + T.let( + :BENEFICIAL_OWNER_INDIVIDUAL, + Lithic::TransactionMonitoring::EntityType::TaggedSymbol + ) + CONTROL_PERSON = + T.let( + :CONTROL_PERSON, + Lithic::TransactionMonitoring::EntityType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Lithic::TransactionMonitoring::EntityType::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/monitoring_case.rbi b/rbi/lithic/models/transaction_monitoring/monitoring_case.rbi new file mode 100644 index 00000000..915da180 --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/monitoring_case.rbi @@ -0,0 +1,226 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + class MonitoringCase < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::TransactionMonitoring::MonitoringCase, + Lithic::Internal::AnyHash + ) + end + + # Globally unique identifier for the case + sig { returns(String) } + attr_accessor :token + + # Identifier of the user the case is currently assigned to + sig { returns(T.nilable(String)) } + attr_accessor :assignee + + # Date and time at which transaction collection stopped for the case + sig { returns(T.nilable(Time)) } + attr_accessor :collection_stopped + + # Date and time at which the case was created + sig { returns(Time) } + attr_accessor :created + + # The entity a case is associated with + sig { returns(T.nilable(Lithic::TransactionMonitoring::CaseEntity)) } + attr_reader :entity + + sig do + params( + entity: T.nilable(Lithic::TransactionMonitoring::CaseEntity::OrHash) + ).void + end + attr_writer :entity + + # Whether the case still has transaction scopes pending resolution + sig { returns(T::Boolean) } + attr_accessor :pending_transactions + + # Priority level of a case, controlling queue ordering and SLA urgency + sig do + returns(Lithic::TransactionMonitoring::CasePriority::TaggedSymbol) + end + attr_accessor :priority + + # Token of the queue the case belongs to + sig { returns(String) } + attr_accessor :queue_token + + # Outcome recorded when a case is resolved: + # + # - `CONFIRMED_FRAUD` - The reviewed activity was confirmed to be fraudulent + # - `SUSPICIOUS_ACTIVITY` - The activity is suspicious but not confirmed fraud + # - `FALSE_POSITIVE` - The activity was legitimate and the alert was a false + # positive + # - `NO_ACTION_REQUIRED` - No further action is required + # - `ESCALATED_EXTERNAL` - The case was escalated to an external party + sig do + returns( + T.nilable( + Lithic::TransactionMonitoring::ResolutionOutcome::TaggedSymbol + ) + ) + end + attr_accessor :resolution + + # Free-form notes describing the resolution + sig { returns(T.nilable(String)) } + attr_accessor :resolution_notes + + # Date and time at which the case was resolved + sig { returns(T.nilable(Time)) } + attr_accessor :resolved + + # Token of the transaction monitoring rule that triggered the case + sig { returns(T.nilable(String)) } + attr_accessor :rule_token + + # Deadline by which the case is expected to be resolved + sig { returns(T.nilable(Time)) } + attr_accessor :sla_deadline + + # Status of a case as it progresses through the review workflow: + # + # - `OPEN` - The case has been created and is still collecting matching + # transactions + # - `ASSIGNED` - An analyst has been assigned and transaction collection has + # stopped + # - `IN_REVIEW` - The case is actively being investigated + # - `ESCALATED` - The case has been reviewed and requires additional oversight + # - `RESOLVED` - A determination has been made and a resolution recorded + # - `CLOSED` - The case is finalized + sig { returns(Lithic::TransactionMonitoring::CaseStatus::TaggedSymbol) } + attr_accessor :status + + # Arbitrary key-value metadata associated with the case + sig { returns(T::Hash[Symbol, String]) } + attr_accessor :tags + + # Short, human-readable summary of the case + sig { returns(T.nilable(String)) } + attr_accessor :title + + # Date and time at which the case was last updated + sig { returns(Time) } + attr_accessor :updated + + # A transaction monitoring case + sig do + params( + token: String, + assignee: T.nilable(String), + collection_stopped: T.nilable(Time), + created: Time, + entity: + T.nilable(Lithic::TransactionMonitoring::CaseEntity::OrHash), + pending_transactions: T::Boolean, + priority: Lithic::TransactionMonitoring::CasePriority::OrSymbol, + queue_token: String, + resolution: + T.nilable( + Lithic::TransactionMonitoring::ResolutionOutcome::OrSymbol + ), + resolution_notes: T.nilable(String), + resolved: T.nilable(Time), + rule_token: T.nilable(String), + sla_deadline: T.nilable(Time), + status: Lithic::TransactionMonitoring::CaseStatus::OrSymbol, + tags: T::Hash[Symbol, String], + title: T.nilable(String), + updated: Time + ).returns(T.attached_class) + end + def self.new( + # Globally unique identifier for the case + token:, + # Identifier of the user the case is currently assigned to + assignee:, + # Date and time at which transaction collection stopped for the case + collection_stopped:, + # Date and time at which the case was created + created:, + # The entity a case is associated with + entity:, + # Whether the case still has transaction scopes pending resolution + pending_transactions:, + # Priority level of a case, controlling queue ordering and SLA urgency + priority:, + # Token of the queue the case belongs to + queue_token:, + # Outcome recorded when a case is resolved: + # + # - `CONFIRMED_FRAUD` - The reviewed activity was confirmed to be fraudulent + # - `SUSPICIOUS_ACTIVITY` - The activity is suspicious but not confirmed fraud + # - `FALSE_POSITIVE` - The activity was legitimate and the alert was a false + # positive + # - `NO_ACTION_REQUIRED` - No further action is required + # - `ESCALATED_EXTERNAL` - The case was escalated to an external party + resolution:, + # Free-form notes describing the resolution + resolution_notes:, + # Date and time at which the case was resolved + resolved:, + # Token of the transaction monitoring rule that triggered the case + rule_token:, + # Deadline by which the case is expected to be resolved + sla_deadline:, + # Status of a case as it progresses through the review workflow: + # + # - `OPEN` - The case has been created and is still collecting matching + # transactions + # - `ASSIGNED` - An analyst has been assigned and transaction collection has + # stopped + # - `IN_REVIEW` - The case is actively being investigated + # - `ESCALATED` - The case has been reviewed and requires additional oversight + # - `RESOLVED` - A determination has been made and a resolution recorded + # - `CLOSED` - The case is finalized + status:, + # Arbitrary key-value metadata associated with the case + tags:, + # Short, human-readable summary of the case + title:, + # Date and time at which the case was last updated + updated: + ) + end + + sig do + override.returns( + { + token: String, + assignee: T.nilable(String), + collection_stopped: T.nilable(Time), + created: Time, + entity: T.nilable(Lithic::TransactionMonitoring::CaseEntity), + pending_transactions: T::Boolean, + priority: + Lithic::TransactionMonitoring::CasePriority::TaggedSymbol, + queue_token: String, + resolution: + T.nilable( + Lithic::TransactionMonitoring::ResolutionOutcome::TaggedSymbol + ), + resolution_notes: T.nilable(String), + resolved: T.nilable(Time), + rule_token: T.nilable(String), + sla_deadline: T.nilable(Time), + status: Lithic::TransactionMonitoring::CaseStatus::TaggedSymbol, + tags: T::Hash[Symbol, String], + title: T.nilable(String), + updated: Time + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/queue.rbi b/rbi/lithic/models/transaction_monitoring/queue.rbi new file mode 100644 index 00000000..6abc7d7a --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/queue.rbi @@ -0,0 +1,189 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + class Queue < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::TransactionMonitoring::Queue, + Lithic::Internal::AnyHash + ) + end + + # Globally unique identifier for the queue + sig { returns(String) } + attr_accessor :token + + # Number of cases in the queue, broken down by status. A status is omitted when + # the queue has no cases in that status + sig { returns(Lithic::TransactionMonitoring::Queue::CaseCounts) } + attr_reader :case_counts + + sig do + params( + case_counts: + Lithic::TransactionMonitoring::Queue::CaseCounts::OrHash + ).void + end + attr_writer :case_counts + + # Date and time at which the queue was created + sig { returns(Time) } + attr_accessor :created + + # Optional description of the queue + sig { returns(T.nilable(String)) } + attr_accessor :description + + # Human-readable name of the queue + sig { returns(String) } + attr_accessor :name + + # Date and time at which the queue was last updated + sig { returns(Time) } + attr_accessor :updated + + # A queue that groups transaction monitoring cases for review + sig do + params( + token: String, + case_counts: + Lithic::TransactionMonitoring::Queue::CaseCounts::OrHash, + created: Time, + description: T.nilable(String), + name: String, + updated: Time + ).returns(T.attached_class) + end + def self.new( + # Globally unique identifier for the queue + token:, + # Number of cases in the queue, broken down by status. A status is omitted when + # the queue has no cases in that status + case_counts:, + # Date and time at which the queue was created + created:, + # Optional description of the queue + description:, + # Human-readable name of the queue + name:, + # Date and time at which the queue was last updated + updated: + ) + end + + sig do + override.returns( + { + token: String, + case_counts: Lithic::TransactionMonitoring::Queue::CaseCounts, + created: Time, + description: T.nilable(String), + name: String, + updated: Time + } + ) + end + def to_hash + end + + class CaseCounts < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::TransactionMonitoring::Queue::CaseCounts, + Lithic::Internal::AnyHash + ) + end + + # Number of cases in the queue with status `ASSIGNED` + sig { returns(T.nilable(Integer)) } + attr_reader :assigned + + sig { params(assigned: Integer).void } + attr_writer :assigned + + # Number of cases in the queue with status `CLOSED` + sig { returns(T.nilable(Integer)) } + attr_reader :closed + + sig { params(closed: Integer).void } + attr_writer :closed + + # Number of cases in the queue with status `ESCALATED` + sig { returns(T.nilable(Integer)) } + attr_reader :escalated + + sig { params(escalated: Integer).void } + attr_writer :escalated + + # Number of cases in the queue with status `IN_REVIEW` + sig { returns(T.nilable(Integer)) } + attr_reader :in_review + + sig { params(in_review: Integer).void } + attr_writer :in_review + + # Number of cases in the queue with status `OPEN` + sig { returns(T.nilable(Integer)) } + attr_reader :open_ + + sig { params(open_: Integer).void } + attr_writer :open_ + + # Number of cases in the queue with status `RESOLVED` + sig { returns(T.nilable(Integer)) } + attr_reader :resolved + + sig { params(resolved: Integer).void } + attr_writer :resolved + + # Number of cases in the queue, broken down by status. A status is omitted when + # the queue has no cases in that status + sig do + params( + assigned: Integer, + closed: Integer, + escalated: Integer, + in_review: Integer, + open_: Integer, + resolved: Integer + ).returns(T.attached_class) + end + def self.new( + # Number of cases in the queue with status `ASSIGNED` + assigned: nil, + # Number of cases in the queue with status `CLOSED` + closed: nil, + # Number of cases in the queue with status `ESCALATED` + escalated: nil, + # Number of cases in the queue with status `IN_REVIEW` + in_review: nil, + # Number of cases in the queue with status `OPEN` + open_: nil, + # Number of cases in the queue with status `RESOLVED` + resolved: nil + ) + end + + sig do + override.returns( + { + assigned: Integer, + closed: Integer, + escalated: Integer, + in_review: Integer, + open_: Integer, + resolved: Integer + } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/queue_create_params.rbi b/rbi/lithic/models/transaction_monitoring/queue_create_params.rbi new file mode 100644 index 00000000..2ef88493 --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/queue_create_params.rbi @@ -0,0 +1,56 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + class QueueCreateParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Lithic::TransactionMonitoring::QueueCreateParams, + Lithic::Internal::AnyHash + ) + end + + # Human-readable name of the queue + sig { returns(String) } + attr_accessor :name + + # Optional description of the queue + sig { returns(T.nilable(String)) } + attr_accessor :description + + sig do + params( + name: String, + description: T.nilable(String), + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # Human-readable name of the queue + name:, + # Optional description of the queue + description: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + name: String, + description: T.nilable(String), + request_options: Lithic::RequestOptions + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/queue_delete_params.rbi b/rbi/lithic/models/transaction_monitoring/queue_delete_params.rbi new file mode 100644 index 00000000..4c693367 --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/queue_delete_params.rbi @@ -0,0 +1,40 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + class QueueDeleteParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Lithic::TransactionMonitoring::QueueDeleteParams, + Lithic::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :queue_token + + sig do + params( + queue_token: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(queue_token:, request_options: {}) + end + + sig do + override.returns( + { queue_token: String, request_options: Lithic::RequestOptions } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/queue_list_params.rbi b/rbi/lithic/models/transaction_monitoring/queue_list_params.rbi new file mode 100644 index 00000000..d11294d2 --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/queue_list_params.rbi @@ -0,0 +1,77 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + class QueueListParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Lithic::TransactionMonitoring::QueueListParams, + Lithic::Internal::AnyHash + ) + end + + # A cursor representing an item's token before which a page of results should end. + # Used to retrieve the previous page of results before this item. + sig { returns(T.nilable(String)) } + attr_reader :ending_before + + sig { params(ending_before: String).void } + attr_writer :ending_before + + # Page size (for pagination). + sig { returns(T.nilable(Integer)) } + attr_reader :page_size + + sig { params(page_size: Integer).void } + attr_writer :page_size + + # A cursor representing an item's token after which a page of results should + # begin. Used to retrieve the next page of results after this item. + sig { returns(T.nilable(String)) } + attr_reader :starting_after + + sig { params(starting_after: String).void } + attr_writer :starting_after + + sig do + params( + ending_before: String, + page_size: Integer, + starting_after: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # A cursor representing an item's token before which a page of results should end. + # Used to retrieve the previous page of results before this item. + ending_before: nil, + # Page size (for pagination). + page_size: nil, + # A cursor representing an item's token after which a page of results should + # begin. Used to retrieve the next page of results after this item. + starting_after: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + ending_before: String, + page_size: Integer, + starting_after: String, + request_options: Lithic::RequestOptions + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/queue_retrieve_params.rbi b/rbi/lithic/models/transaction_monitoring/queue_retrieve_params.rbi new file mode 100644 index 00000000..91601050 --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/queue_retrieve_params.rbi @@ -0,0 +1,40 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + class QueueRetrieveParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Lithic::TransactionMonitoring::QueueRetrieveParams, + Lithic::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :queue_token + + sig do + params( + queue_token: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(queue_token:, request_options: {}) + end + + sig do + override.returns( + { queue_token: String, request_options: Lithic::RequestOptions } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/queue_update_params.rbi b/rbi/lithic/models/transaction_monitoring/queue_update_params.rbi new file mode 100644 index 00000000..6b422b80 --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/queue_update_params.rbi @@ -0,0 +1,65 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + class QueueUpdateParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Lithic::TransactionMonitoring::QueueUpdateParams, + Lithic::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :queue_token + + # New description for the queue, or `null` to clear it + sig { returns(T.nilable(String)) } + attr_accessor :description + + # New name for the queue + sig { returns(T.nilable(String)) } + attr_reader :name + + sig { params(name: String).void } + attr_writer :name + + sig do + params( + queue_token: String, + description: T.nilable(String), + name: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + queue_token:, + # New description for the queue, or `null` to clear it + description: nil, + # New name for the queue + name: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + queue_token: String, + description: T.nilable(String), + name: String, + request_options: Lithic::RequestOptions + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/lithic/models/transaction_monitoring/resolution_outcome.rbi b/rbi/lithic/models/transaction_monitoring/resolution_outcome.rbi new file mode 100644 index 00000000..f614a2e8 --- /dev/null +++ b/rbi/lithic/models/transaction_monitoring/resolution_outcome.rbi @@ -0,0 +1,61 @@ +# typed: strong + +module Lithic + module Models + module TransactionMonitoring + # Outcome recorded when a case is resolved: + # + # - `CONFIRMED_FRAUD` - The reviewed activity was confirmed to be fraudulent + # - `SUSPICIOUS_ACTIVITY` - The activity is suspicious but not confirmed fraud + # - `FALSE_POSITIVE` - The activity was legitimate and the alert was a false + # positive + # - `NO_ACTION_REQUIRED` - No further action is required + # - `ESCALATED_EXTERNAL` - The case was escalated to an external party + module ResolutionOutcome + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::TransactionMonitoring::ResolutionOutcome) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CONFIRMED_FRAUD = + T.let( + :CONFIRMED_FRAUD, + Lithic::TransactionMonitoring::ResolutionOutcome::TaggedSymbol + ) + SUSPICIOUS_ACTIVITY = + T.let( + :SUSPICIOUS_ACTIVITY, + Lithic::TransactionMonitoring::ResolutionOutcome::TaggedSymbol + ) + FALSE_POSITIVE = + T.let( + :FALSE_POSITIVE, + Lithic::TransactionMonitoring::ResolutionOutcome::TaggedSymbol + ) + NO_ACTION_REQUIRED = + T.let( + :NO_ACTION_REQUIRED, + Lithic::TransactionMonitoring::ResolutionOutcome::TaggedSymbol + ) + ESCALATED_EXTERNAL = + T.let( + :ESCALATED_EXTERNAL, + Lithic::TransactionMonitoring::ResolutionOutcome::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::TransactionMonitoring::ResolutionOutcome::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/lithic/resources/account_holders/entities.rbi b/rbi/lithic/resources/account_holders/entities.rbi index d9811ebe..e4bf03ea 100644 --- a/rbi/lithic/resources/account_holders/entities.rbi +++ b/rbi/lithic/resources/account_holders/entities.rbi @@ -20,7 +20,7 @@ module Lithic government_id: String, last_name: String, phone_number: String, - type: Lithic::AccountHolders::EntityCreateParams::Type::OrSymbol, + type: Lithic::TransactionMonitoring::EntityType::OrSymbol, request_options: Lithic::RequestOptions::OrHash ).returns(Lithic::Models::AccountHolders::EntityCreateResponse) end diff --git a/rbi/lithic/resources/transaction_monitoring.rbi b/rbi/lithic/resources/transaction_monitoring.rbi new file mode 100644 index 00000000..43789396 --- /dev/null +++ b/rbi/lithic/resources/transaction_monitoring.rbi @@ -0,0 +1,18 @@ +# typed: strong + +module Lithic + module Resources + class TransactionMonitoring + sig { returns(Lithic::Resources::TransactionMonitoring::Cases) } + attr_reader :cases + + sig { returns(Lithic::Resources::TransactionMonitoring::Queues) } + attr_reader :queues + + # @api private + sig { params(client: Lithic::Client).returns(T.attached_class) } + def self.new(client:) + end + end + end +end diff --git a/rbi/lithic/resources/transaction_monitoring/cases.rbi b/rbi/lithic/resources/transaction_monitoring/cases.rbi new file mode 100644 index 00000000..c341531f --- /dev/null +++ b/rbi/lithic/resources/transaction_monitoring/cases.rbi @@ -0,0 +1,230 @@ +# typed: strong + +module Lithic + module Resources + class TransactionMonitoring + class Cases + sig do + returns(Lithic::Resources::TransactionMonitoring::Cases::Comments) + end + attr_reader :comments + + sig { returns(Lithic::Resources::TransactionMonitoring::Cases::Files) } + attr_reader :files + + # Retrieves a single transaction monitoring case. + sig do + params( + case_token: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(Lithic::TransactionMonitoring::MonitoringCase) + end + def retrieve( + # Globally unique identifier for the case. + case_token, + request_options: {} + ) + end + + # Updates a transaction monitoring case. + sig do + params( + case_token: String, + actor_token: String, + assignee: T.nilable(String), + priority: Lithic::TransactionMonitoring::CasePriority::OrSymbol, + resolution: + Lithic::TransactionMonitoring::ResolutionOutcome::OrSymbol, + resolution_notes: String, + sla_deadline: T.nilable(Time), + status: Lithic::TransactionMonitoring::CaseStatus::OrSymbol, + tags: T::Hash[Symbol, String], + title: T.nilable(String), + request_options: Lithic::RequestOptions::OrHash + ).returns(Lithic::TransactionMonitoring::MonitoringCase) + end + def update( + # Globally unique identifier for the case. + case_token, + # Optional client-provided identifier for the actor performing this action, + # recorded on the resulting activity entry. This value is supplied by the client + # (for example, your own internal user ID) and is not authenticated by Lithic + actor_token: nil, + # New assignee for the case, or `null` to unassign + assignee: nil, + # Priority level of a case, controlling queue ordering and SLA urgency + priority: nil, + # Outcome recorded when a case is resolved: + # + # - `CONFIRMED_FRAUD` - The reviewed activity was confirmed to be fraudulent + # - `SUSPICIOUS_ACTIVITY` - The activity is suspicious but not confirmed fraud + # - `FALSE_POSITIVE` - The activity was legitimate and the alert was a false + # positive + # - `NO_ACTION_REQUIRED` - No further action is required + # - `ESCALATED_EXTERNAL` - The case was escalated to an external party + resolution: nil, + # Notes describing the resolution + resolution_notes: nil, + # New SLA deadline for the case, or `null` to clear it + sla_deadline: nil, + # Status of a case as it progresses through the review workflow: + # + # - `OPEN` - The case has been created and is still collecting matching + # transactions + # - `ASSIGNED` - An analyst has been assigned and transaction collection has + # stopped + # - `IN_REVIEW` - The case is actively being investigated + # - `ESCALATED` - The case has been reviewed and requires additional oversight + # - `RESOLVED` - A determination has been made and a resolution recorded + # - `CLOSED` - The case is finalized + status: nil, + # Arbitrary key-value metadata to set on the case + tags: nil, + # New title for the case, or `null` to clear it + title: nil, + request_options: {} + ) + end + + # Lists transaction monitoring cases, optionally filtered. + sig do + params( + account_token: String, + assignee: String, + begin_: Time, + card_token: String, + end_: Time, + ending_before: String, + entity_token: String, + page_size: Integer, + queue_token: String, + rule_token: String, + sort_by: Lithic::TransactionMonitoring::CaseSortOrder::OrSymbol, + starting_after: String, + status: Lithic::TransactionMonitoring::CaseStatus::OrSymbol, + transaction_token: String, + request_options: Lithic::RequestOptions::OrHash + ).returns( + Lithic::Internal::CursorPage[ + Lithic::TransactionMonitoring::MonitoringCase + ] + ) + end + def list( + # Only return cases that include transactions on the provided account. + account_token: nil, + # Only return cases assigned to the provided value. Pass an empty string to return + # only unassigned cases. + assignee: nil, + # Date string in RFC 3339 format. Only entries created after the specified time + # will be included. UTC time zone. + begin_: nil, + # Only return cases that include transactions on the provided card. + card_token: nil, + # Date string in RFC 3339 format. Only entries created before the specified time + # will be included. UTC time zone. + end_: nil, + # A cursor representing an item's token before which a page of results should end. + # Used to retrieve the previous page of results before this item. + ending_before: nil, + # Only return cases associated with the provided entity. + entity_token: nil, + # Page size (for pagination). + page_size: nil, + # Only return cases belonging to the provided queue. + queue_token: nil, + # Only return cases triggered by the provided transaction monitoring rule. + rule_token: nil, + # Sort order for the returned cases. + sort_by: nil, + # A cursor representing an item's token after which a page of results should + # begin. Used to retrieve the next page of results after this item. + starting_after: nil, + # Only return cases with the provided status. + status: nil, + # Only return cases that include the provided transaction. + transaction_token: nil, + request_options: {} + ) + end + + # Lists the activity feed for a case. + sig do + params( + case_token: String, + ending_before: String, + page_size: Integer, + starting_after: String, + request_options: Lithic::RequestOptions::OrHash + ).returns( + Lithic::Internal::CursorPage[ + Lithic::TransactionMonitoring::CaseActivityEntry + ] + ) + end + def list_activity( + # Globally unique identifier for the case. + case_token, + # A cursor representing an item's token before which a page of results should end. + # Used to retrieve the previous page of results before this item. + ending_before: nil, + # Page size (for pagination). + page_size: nil, + # A cursor representing an item's token after which a page of results should + # begin. Used to retrieve the next page of results after this item. + starting_after: nil, + request_options: {} + ) + end + + # Lists the transactions associated with a case. + sig do + params( + case_token: String, + ending_before: String, + page_size: Integer, + starting_after: String, + request_options: Lithic::RequestOptions::OrHash + ).returns( + Lithic::Internal::CursorPage[ + Lithic::TransactionMonitoring::CaseTransaction + ] + ) + end + def list_transactions( + # Globally unique identifier for the case. + case_token, + # A cursor representing an item's token before which a page of results should end. + # Used to retrieve the previous page of results before this item. + ending_before: nil, + # Page size (for pagination). + page_size: nil, + # A cursor representing an item's token after which a page of results should + # begin. Used to retrieve the next page of results after this item. + starting_after: nil, + request_options: {} + ) + end + + # Lists the cards involved in a case, with per-card transaction counts. + sig do + params( + case_token: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(T::Array[Lithic::TransactionMonitoring::CaseCard]) + end + def retrieve_cards( + # Globally unique identifier for the case. + case_token, + request_options: {} + ) + end + + # @api private + sig { params(client: Lithic::Client).returns(T.attached_class) } + def self.new(client:) + end + end + end + end +end diff --git a/rbi/lithic/resources/transaction_monitoring/cases/comments.rbi b/rbi/lithic/resources/transaction_monitoring/cases/comments.rbi new file mode 100644 index 00000000..379e2cf0 --- /dev/null +++ b/rbi/lithic/resources/transaction_monitoring/cases/comments.rbi @@ -0,0 +1,81 @@ +# typed: strong + +module Lithic + module Resources + class TransactionMonitoring + class Cases + class Comments + # Adds a comment to a case. + sig do + params( + case_token: String, + comment: String, + actor_token: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(Lithic::TransactionMonitoring::CaseActivityEntry) + end + def create( + # Globally unique identifier for the case. + case_token, + # Text of the comment + comment:, + # Optional client-provided identifier for the actor performing this action, + # recorded on the resulting activity entry. This value is supplied by the client + # (for example, your own internal user ID) and is not authenticated by Lithic + actor_token: nil, + request_options: {} + ) + end + + # Edits an existing comment on a case. + sig do + params( + comment_token: String, + case_token: String, + comment: String, + actor_token: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(Lithic::TransactionMonitoring::CaseActivityEntry) + end + def update( + # Path param: Globally unique identifier for the comment. + comment_token, + # Path param: Globally unique identifier for the case. + case_token:, + # Body param: New text of the comment + comment:, + # Body param: Optional client-provided identifier for the actor performing this + # action, recorded on the resulting activity entry. This value is supplied by the + # client (for example, your own internal user ID) and is not authenticated by + # Lithic + actor_token: nil, + request_options: {} + ) + end + + # Deletes a comment from a case. + sig do + params( + comment_token: String, + case_token: String, + request_options: Lithic::RequestOptions::OrHash + ).void + end + def delete( + # Globally unique identifier for the comment. + comment_token, + # Globally unique identifier for the case. + case_token:, + request_options: {} + ) + end + + # @api private + sig { params(client: Lithic::Client).returns(T.attached_class) } + def self.new(client:) + end + end + end + end + end +end diff --git a/rbi/lithic/resources/transaction_monitoring/cases/files.rbi b/rbi/lithic/resources/transaction_monitoring/cases/files.rbi new file mode 100644 index 00000000..682cf42e --- /dev/null +++ b/rbi/lithic/resources/transaction_monitoring/cases/files.rbi @@ -0,0 +1,98 @@ +# typed: strong + +module Lithic + module Resources + class TransactionMonitoring + class Cases + class Files + # Creates a file record and returns a presigned URL for uploading the file to the + # case. + sig do + params( + case_token: String, + name: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(Lithic::TransactionMonitoring::Cases::CaseFile) + end + def create( + # Globally unique identifier for the case. + case_token, + # Name of the file to upload + name:, + request_options: {} + ) + end + + # Retrieves a single file attached to a case, including a presigned download URL + # when the file is ready. + sig do + params( + file_token: String, + case_token: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(Lithic::TransactionMonitoring::Cases::CaseFile) + end + def retrieve( + # Globally unique identifier for the file. + file_token, + # Globally unique identifier for the case. + case_token:, + request_options: {} + ) + end + + # Lists the files attached to a case. + sig do + params( + case_token: String, + ending_before: String, + page_size: Integer, + starting_after: String, + request_options: Lithic::RequestOptions::OrHash + ).returns( + Lithic::Internal::CursorPage[ + Lithic::TransactionMonitoring::Cases::CaseFile + ] + ) + end + def list( + # Globally unique identifier for the case. + case_token, + # A cursor representing an item's token before which a page of results should end. + # Used to retrieve the previous page of results before this item. + ending_before: nil, + # Page size (for pagination). + page_size: nil, + # A cursor representing an item's token after which a page of results should + # begin. Used to retrieve the next page of results after this item. + starting_after: nil, + request_options: {} + ) + end + + # Deletes a file from a case. + sig do + params( + file_token: String, + case_token: String, + request_options: Lithic::RequestOptions::OrHash + ).void + end + def delete( + # Globally unique identifier for the file. + file_token, + # Globally unique identifier for the case. + case_token:, + request_options: {} + ) + end + + # @api private + sig { params(client: Lithic::Client).returns(T.attached_class) } + def self.new(client:) + end + end + end + end + end +end diff --git a/rbi/lithic/resources/transaction_monitoring/queues.rbi b/rbi/lithic/resources/transaction_monitoring/queues.rbi new file mode 100644 index 00000000..6a19689c --- /dev/null +++ b/rbi/lithic/resources/transaction_monitoring/queues.rbi @@ -0,0 +1,103 @@ +# typed: strong + +module Lithic + module Resources + class TransactionMonitoring + class Queues + # Creates a new queue for grouping transaction monitoring cases. + sig do + params( + name: String, + description: T.nilable(String), + request_options: Lithic::RequestOptions::OrHash + ).returns(Lithic::TransactionMonitoring::Queue) + end + def create( + # Human-readable name of the queue + name:, + # Optional description of the queue + description: nil, + request_options: {} + ) + end + + # Retrieves a single transaction monitoring queue. + sig do + params( + queue_token: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(Lithic::TransactionMonitoring::Queue) + end + def retrieve( + # Globally unique identifier for the queue. + queue_token, + request_options: {} + ) + end + + # Updates a transaction monitoring queue. + sig do + params( + queue_token: String, + description: T.nilable(String), + name: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(Lithic::TransactionMonitoring::Queue) + end + def update( + # Globally unique identifier for the queue. + queue_token, + # New description for the queue, or `null` to clear it + description: nil, + # New name for the queue + name: nil, + request_options: {} + ) + end + + # Lists transaction monitoring queues. + sig do + params( + ending_before: String, + page_size: Integer, + starting_after: String, + request_options: Lithic::RequestOptions::OrHash + ).returns( + Lithic::Internal::CursorPage[Lithic::TransactionMonitoring::Queue] + ) + end + def list( + # A cursor representing an item's token before which a page of results should end. + # Used to retrieve the previous page of results before this item. + ending_before: nil, + # Page size (for pagination). + page_size: nil, + # A cursor representing an item's token after which a page of results should + # begin. Used to retrieve the next page of results after this item. + starting_after: nil, + request_options: {} + ) + end + + # Deletes a transaction monitoring queue. + sig do + params( + queue_token: String, + request_options: Lithic::RequestOptions::OrHash + ).void + end + def delete( + # Globally unique identifier for the queue. + queue_token, + request_options: {} + ) + end + + # @api private + sig { params(client: Lithic::Client).returns(T.attached_class) } + def self.new(client:) + end + end + end + end +end diff --git a/sig/lithic/client.rbs b/sig/lithic/client.rbs index 4f8d272f..c419da07 100644 --- a/sig/lithic/client.rbs +++ b/sig/lithic/client.rbs @@ -23,6 +23,8 @@ module Lithic attr_reader auth_rules: Lithic::Resources::AuthRules + attr_reader transaction_monitoring: Lithic::Resources::TransactionMonitoring + attr_reader auth_stream_enrollment: Lithic::Resources::AuthStreamEnrollment attr_reader tokenization_decisioning: Lithic::Resources::TokenizationDecisioning diff --git a/sig/lithic/models.rbs b/sig/lithic/models.rbs index c32024a8..0fc2593f 100644 --- a/sig/lithic/models.rbs +++ b/sig/lithic/models.rbs @@ -521,6 +521,8 @@ module Lithic class TransactionListParams = Lithic::Models::TransactionListParams + module TransactionMonitoring = Lithic::Models::TransactionMonitoring + class TransactionRetrieveParams = Lithic::Models::TransactionRetrieveParams module Transactions = Lithic::Models::Transactions diff --git a/sig/lithic/models/account_holders/account_holder_entity.rbs b/sig/lithic/models/account_holders/account_holder_entity.rbs index 798d5609..d33135d2 100644 --- a/sig/lithic/models/account_holders/account_holder_entity.rbs +++ b/sig/lithic/models/account_holders/account_holder_entity.rbs @@ -14,7 +14,7 @@ module Lithic last_name: String?, phone_number: String?, status: Lithic::Models::AccountHolders::AccountHolderEntity::status, - type: Lithic::Models::AccountHolders::AccountHolderEntity::type_ + type: Lithic::Models::TransactionMonitoring::entity_type } class AccountHolderEntity < Lithic::Internal::Type::BaseModel @@ -36,7 +36,7 @@ module Lithic attr_accessor status: Lithic::Models::AccountHolders::AccountHolderEntity::status - attr_accessor type: Lithic::Models::AccountHolders::AccountHolderEntity::type_ + attr_accessor type: Lithic::Models::TransactionMonitoring::entity_type def initialize: ( token: String, @@ -48,7 +48,7 @@ module Lithic last_name: String?, phone_number: String?, status: Lithic::Models::AccountHolders::AccountHolderEntity::status, - type: Lithic::Models::AccountHolders::AccountHolderEntity::type_ + type: Lithic::Models::TransactionMonitoring::entity_type ) -> void def to_hash: -> { @@ -61,7 +61,7 @@ module Lithic last_name: String?, phone_number: String?, status: Lithic::Models::AccountHolders::AccountHolderEntity::status, - type: Lithic::Models::AccountHolders::AccountHolderEntity::type_ + type: Lithic::Models::TransactionMonitoring::entity_type } type address = @@ -120,17 +120,6 @@ module Lithic def self?.values: -> ::Array[Lithic::Models::AccountHolders::AccountHolderEntity::status] end - - type type_ = :BENEFICIAL_OWNER_INDIVIDUAL | :CONTROL_PERSON - - module Type - extend Lithic::Internal::Type::Enum - - BENEFICIAL_OWNER_INDIVIDUAL: :BENEFICIAL_OWNER_INDIVIDUAL - CONTROL_PERSON: :CONTROL_PERSON - - def self?.values: -> ::Array[Lithic::Models::AccountHolders::AccountHolderEntity::type_] - end end end end diff --git a/sig/lithic/models/account_holders/entity_create_params.rbs b/sig/lithic/models/account_holders/entity_create_params.rbs index c689b40d..31186092 100644 --- a/sig/lithic/models/account_holders/entity_create_params.rbs +++ b/sig/lithic/models/account_holders/entity_create_params.rbs @@ -11,7 +11,7 @@ module Lithic government_id: String, last_name: String, phone_number: String, - type: Lithic::Models::AccountHolders::EntityCreateParams::type_ + type: Lithic::Models::TransactionMonitoring::entity_type } & Lithic::Internal::Type::request_parameters @@ -35,7 +35,7 @@ module Lithic attr_accessor phone_number: String - attr_accessor type: Lithic::Models::AccountHolders::EntityCreateParams::type_ + attr_accessor type: Lithic::Models::TransactionMonitoring::entity_type def initialize: ( account_holder_token: String, @@ -46,7 +46,7 @@ module Lithic government_id: String, last_name: String, phone_number: String, - type: Lithic::Models::AccountHolders::EntityCreateParams::type_, + type: Lithic::Models::TransactionMonitoring::entity_type, ?request_options: Lithic::request_opts ) -> void @@ -59,7 +59,7 @@ module Lithic government_id: String, last_name: String, phone_number: String, - type: Lithic::Models::AccountHolders::EntityCreateParams::type_, + type: Lithic::Models::TransactionMonitoring::entity_type, request_options: Lithic::RequestOptions } @@ -106,17 +106,6 @@ module Lithic :address2 => String } end - - type type_ = :BENEFICIAL_OWNER_INDIVIDUAL | :CONTROL_PERSON - - module Type - extend Lithic::Internal::Type::Enum - - BENEFICIAL_OWNER_INDIVIDUAL: :BENEFICIAL_OWNER_INDIVIDUAL - CONTROL_PERSON: :CONTROL_PERSON - - def self?.values: -> ::Array[Lithic::Models::AccountHolders::EntityCreateParams::type_] - end end end end diff --git a/sig/lithic/models/transaction_monitoring/case_activity_entry.rbs b/sig/lithic/models/transaction_monitoring/case_activity_entry.rbs new file mode 100644 index 00000000..62e2c94f --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/case_activity_entry.rbs @@ -0,0 +1,47 @@ +module Lithic + module Models + module TransactionMonitoring + type case_activity_entry = + { + token: String, + actor_token: String?, + created: Time, + entry_type: Lithic::Models::TransactionMonitoring::case_activity_type, + new_value: String?, + previous_value: String? + } + + class CaseActivityEntry < Lithic::Internal::Type::BaseModel + attr_accessor token: String + + attr_accessor actor_token: String? + + attr_accessor created: Time + + attr_accessor entry_type: Lithic::Models::TransactionMonitoring::case_activity_type + + attr_accessor new_value: String? + + attr_accessor previous_value: String? + + def initialize: ( + token: String, + actor_token: String?, + created: Time, + entry_type: Lithic::Models::TransactionMonitoring::case_activity_type, + new_value: String?, + previous_value: String? + ) -> void + + def to_hash: -> { + token: String, + actor_token: String?, + created: Time, + entry_type: Lithic::Models::TransactionMonitoring::case_activity_type, + new_value: String?, + previous_value: String? + } + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/case_activity_type.rbs b/sig/lithic/models/transaction_monitoring/case_activity_type.rbs new file mode 100644 index 00000000..a6da68a4 --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/case_activity_type.rbs @@ -0,0 +1,32 @@ +module Lithic + module Models + module TransactionMonitoring + type case_activity_type = + :STATUS + | :TITLE + | :ASSIGNED_TO + | :RESOLUTION_OUTCOME + | :RESOLUTION_NOTES + | :TAGS + | :PRIORITY + | :COMMENT + | :FILE + + module CaseActivityType + extend Lithic::Internal::Type::Enum + + STATUS: :STATUS + TITLE: :TITLE + ASSIGNED_TO: :ASSIGNED_TO + RESOLUTION_OUTCOME: :RESOLUTION_OUTCOME + RESOLUTION_NOTES: :RESOLUTION_NOTES + TAGS: :TAGS + PRIORITY: :PRIORITY + COMMENT: :COMMENT + FILE: :FILE + + def self?.values: -> ::Array[Lithic::Models::TransactionMonitoring::case_activity_type] + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/case_card.rbs b/sig/lithic/models/transaction_monitoring/case_card.rbs new file mode 100644 index 00000000..e0ddada3 --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/case_card.rbs @@ -0,0 +1,32 @@ +module Lithic + module Models + module TransactionMonitoring + type case_card = + { + account_token: String, + card_token: String, + transaction_count: Integer + } + + class CaseCard < Lithic::Internal::Type::BaseModel + attr_accessor account_token: String + + attr_accessor card_token: String + + attr_accessor transaction_count: Integer + + def initialize: ( + account_token: String, + card_token: String, + transaction_count: Integer + ) -> void + + def to_hash: -> { + account_token: String, + card_token: String, + transaction_count: Integer + } + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/case_entity.rbs b/sig/lithic/models/transaction_monitoring/case_entity.rbs new file mode 100644 index 00000000..5e13dc88 --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/case_entity.rbs @@ -0,0 +1,38 @@ +module Lithic + module Models + module TransactionMonitoring + type case_entity = + { + entity_token: String, + entity_type: Lithic::Models::TransactionMonitoring::CaseEntity::entity_type + } + + class CaseEntity < Lithic::Internal::Type::BaseModel + attr_accessor entity_token: String + + attr_accessor entity_type: Lithic::Models::TransactionMonitoring::CaseEntity::entity_type + + def initialize: ( + entity_token: String, + entity_type: Lithic::Models::TransactionMonitoring::CaseEntity::entity_type + ) -> void + + def to_hash: -> { + entity_token: String, + entity_type: Lithic::Models::TransactionMonitoring::CaseEntity::entity_type + } + + type entity_type = :CARD | :ACCOUNT + + module EntityType + extend Lithic::Internal::Type::Enum + + CARD: :CARD + ACCOUNT: :ACCOUNT + + def self?.values: -> ::Array[Lithic::Models::TransactionMonitoring::CaseEntity::entity_type] + end + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/case_list_activity_params.rbs b/sig/lithic/models/transaction_monitoring/case_list_activity_params.rbs new file mode 100644 index 00000000..edc5dc96 --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/case_list_activity_params.rbs @@ -0,0 +1,49 @@ +module Lithic + module Models + module TransactionMonitoring + type case_list_activity_params = + { + case_token: String, + ending_before: String, + page_size: Integer, + starting_after: String + } + & Lithic::Internal::Type::request_parameters + + class CaseListActivityParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_accessor case_token: String + + attr_reader ending_before: String? + + def ending_before=: (String) -> String + + attr_reader page_size: Integer? + + def page_size=: (Integer) -> Integer + + attr_reader starting_after: String? + + def starting_after=: (String) -> String + + def initialize: ( + case_token: String, + ?ending_before: String, + ?page_size: Integer, + ?starting_after: String, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + case_token: String, + ending_before: String, + page_size: Integer, + starting_after: String, + request_options: Lithic::RequestOptions + } + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/case_list_params.rbs b/sig/lithic/models/transaction_monitoring/case_list_params.rbs new file mode 100644 index 00000000..a5578dba --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/case_list_params.rbs @@ -0,0 +1,125 @@ +module Lithic + module Models + module TransactionMonitoring + type case_list_params = + { + account_token: String, + assignee: String, + begin_: Time, + card_token: String, + end_: Time, + ending_before: String, + entity_token: String, + page_size: Integer, + queue_token: String, + rule_token: String, + sort_by: Lithic::Models::TransactionMonitoring::case_sort_order, + starting_after: String, + status: Lithic::Models::TransactionMonitoring::case_status, + transaction_token: String + } + & Lithic::Internal::Type::request_parameters + + class CaseListParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_reader account_token: String? + + def account_token=: (String) -> String + + attr_reader assignee: String? + + def assignee=: (String) -> String + + attr_reader begin_: Time? + + def begin_=: (Time) -> Time + + attr_reader card_token: String? + + def card_token=: (String) -> String + + attr_reader end_: Time? + + def end_=: (Time) -> Time + + attr_reader ending_before: String? + + def ending_before=: (String) -> String + + attr_reader entity_token: String? + + def entity_token=: (String) -> String + + attr_reader page_size: Integer? + + def page_size=: (Integer) -> Integer + + attr_reader queue_token: String? + + def queue_token=: (String) -> String + + attr_reader rule_token: String? + + def rule_token=: (String) -> String + + attr_reader sort_by: Lithic::Models::TransactionMonitoring::case_sort_order? + + def sort_by=: ( + Lithic::Models::TransactionMonitoring::case_sort_order + ) -> Lithic::Models::TransactionMonitoring::case_sort_order + + attr_reader starting_after: String? + + def starting_after=: (String) -> String + + attr_reader status: Lithic::Models::TransactionMonitoring::case_status? + + def status=: ( + Lithic::Models::TransactionMonitoring::case_status + ) -> Lithic::Models::TransactionMonitoring::case_status + + attr_reader transaction_token: String? + + def transaction_token=: (String) -> String + + def initialize: ( + ?account_token: String, + ?assignee: String, + ?begin_: Time, + ?card_token: String, + ?end_: Time, + ?ending_before: String, + ?entity_token: String, + ?page_size: Integer, + ?queue_token: String, + ?rule_token: String, + ?sort_by: Lithic::Models::TransactionMonitoring::case_sort_order, + ?starting_after: String, + ?status: Lithic::Models::TransactionMonitoring::case_status, + ?transaction_token: String, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + account_token: String, + assignee: String, + begin_: Time, + card_token: String, + end_: Time, + ending_before: String, + entity_token: String, + page_size: Integer, + queue_token: String, + rule_token: String, + sort_by: Lithic::Models::TransactionMonitoring::case_sort_order, + starting_after: String, + status: Lithic::Models::TransactionMonitoring::case_status, + transaction_token: String, + request_options: Lithic::RequestOptions + } + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/case_list_transactions_params.rbs b/sig/lithic/models/transaction_monitoring/case_list_transactions_params.rbs new file mode 100644 index 00000000..6dc57b8f --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/case_list_transactions_params.rbs @@ -0,0 +1,49 @@ +module Lithic + module Models + module TransactionMonitoring + type case_list_transactions_params = + { + case_token: String, + ending_before: String, + page_size: Integer, + starting_after: String + } + & Lithic::Internal::Type::request_parameters + + class CaseListTransactionsParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_accessor case_token: String + + attr_reader ending_before: String? + + def ending_before=: (String) -> String + + attr_reader page_size: Integer? + + def page_size=: (Integer) -> Integer + + attr_reader starting_after: String? + + def starting_after=: (String) -> String + + def initialize: ( + case_token: String, + ?ending_before: String, + ?page_size: Integer, + ?starting_after: String, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + case_token: String, + ending_before: String, + page_size: Integer, + starting_after: String, + request_options: Lithic::RequestOptions + } + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/case_priority.rbs b/sig/lithic/models/transaction_monitoring/case_priority.rbs new file mode 100644 index 00000000..c401f763 --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/case_priority.rbs @@ -0,0 +1,18 @@ +module Lithic + module Models + module TransactionMonitoring + type case_priority = :LOW | :MEDIUM | :HIGH | :CRITICAL + + module CasePriority + extend Lithic::Internal::Type::Enum + + LOW: :LOW + MEDIUM: :MEDIUM + HIGH: :HIGH + CRITICAL: :CRITICAL + + def self?.values: -> ::Array[Lithic::Models::TransactionMonitoring::case_priority] + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/case_retrieve_cards_params.rbs b/sig/lithic/models/transaction_monitoring/case_retrieve_cards_params.rbs new file mode 100644 index 00000000..82933296 --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/case_retrieve_cards_params.rbs @@ -0,0 +1,25 @@ +module Lithic + module Models + module TransactionMonitoring + type case_retrieve_cards_params = + { case_token: String } & Lithic::Internal::Type::request_parameters + + class CaseRetrieveCardsParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_accessor case_token: String + + def initialize: ( + case_token: String, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + case_token: String, + request_options: Lithic::RequestOptions + } + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/case_retrieve_cards_response.rbs b/sig/lithic/models/transaction_monitoring/case_retrieve_cards_response.rbs new file mode 100644 index 00000000..4fd043ce --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/case_retrieve_cards_response.rbs @@ -0,0 +1,10 @@ +module Lithic + module Models + module TransactionMonitoring + type case_retrieve_cards_response = + ::Array[Lithic::TransactionMonitoring::CaseCard] + + CaseRetrieveCardsResponse: Lithic::Internal::Type::Converter + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/case_retrieve_params.rbs b/sig/lithic/models/transaction_monitoring/case_retrieve_params.rbs new file mode 100644 index 00000000..4c8e445b --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/case_retrieve_params.rbs @@ -0,0 +1,25 @@ +module Lithic + module Models + module TransactionMonitoring + type case_retrieve_params = + { case_token: String } & Lithic::Internal::Type::request_parameters + + class CaseRetrieveParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_accessor case_token: String + + def initialize: ( + case_token: String, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + case_token: String, + request_options: Lithic::RequestOptions + } + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/case_sort_order.rbs b/sig/lithic/models/transaction_monitoring/case_sort_order.rbs new file mode 100644 index 00000000..db95f980 --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/case_sort_order.rbs @@ -0,0 +1,26 @@ +module Lithic + module Models + module TransactionMonitoring + type case_sort_order = + :CREATED_ASC + | :CREATED_DESC + | :PRIORITY_DESC + | :PRIORITY_ASC + | :STATUS_DESC + | :STATUS_ASC + + module CaseSortOrder + extend Lithic::Internal::Type::Enum + + CREATED_ASC: :CREATED_ASC + CREATED_DESC: :CREATED_DESC + PRIORITY_DESC: :PRIORITY_DESC + PRIORITY_ASC: :PRIORITY_ASC + STATUS_DESC: :STATUS_DESC + STATUS_ASC: :STATUS_ASC + + def self?.values: -> ::Array[Lithic::Models::TransactionMonitoring::case_sort_order] + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/case_status.rbs b/sig/lithic/models/transaction_monitoring/case_status.rbs new file mode 100644 index 00000000..599772c1 --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/case_status.rbs @@ -0,0 +1,21 @@ +module Lithic + module Models + module TransactionMonitoring + type case_status = + :OPEN | :ASSIGNED | :IN_REVIEW | :ESCALATED | :RESOLVED | :CLOSED + + module CaseStatus + extend Lithic::Internal::Type::Enum + + OPEN: :OPEN + ASSIGNED: :ASSIGNED + IN_REVIEW: :IN_REVIEW + ESCALATED: :ESCALATED + RESOLVED: :RESOLVED + CLOSED: :CLOSED + + def self?.values: -> ::Array[Lithic::Models::TransactionMonitoring::case_status] + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/case_transaction.rbs b/sig/lithic/models/transaction_monitoring/case_transaction.rbs new file mode 100644 index 00000000..24d2bdb9 --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/case_transaction.rbs @@ -0,0 +1,42 @@ +module Lithic + module Models + module TransactionMonitoring + type case_transaction = + { + token: String, + account_token: String, + added_at: Time, + card_token: String, + transaction_created_at: Time + } + + class CaseTransaction < Lithic::Internal::Type::BaseModel + attr_accessor token: String + + attr_accessor account_token: String + + attr_accessor added_at: Time + + attr_accessor card_token: String + + attr_accessor transaction_created_at: Time + + def initialize: ( + token: String, + account_token: String, + added_at: Time, + card_token: String, + transaction_created_at: Time + ) -> void + + def to_hash: -> { + token: String, + account_token: String, + added_at: Time, + card_token: String, + transaction_created_at: Time + } + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/case_update_params.rbs b/sig/lithic/models/transaction_monitoring/case_update_params.rbs new file mode 100644 index 00000000..715617c2 --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/case_update_params.rbs @@ -0,0 +1,91 @@ +module Lithic + module Models + module TransactionMonitoring + type case_update_params = + { + case_token: String, + actor_token: String, + assignee: String?, + priority: Lithic::Models::TransactionMonitoring::case_priority, + resolution: Lithic::Models::TransactionMonitoring::resolution_outcome, + resolution_notes: String, + sla_deadline: Time?, + status: Lithic::Models::TransactionMonitoring::case_status, + tags: ::Hash[Symbol, String], + title: String? + } + & Lithic::Internal::Type::request_parameters + + class CaseUpdateParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_accessor case_token: String + + attr_reader actor_token: String? + + def actor_token=: (String) -> String + + attr_accessor assignee: String? + + attr_reader priority: Lithic::Models::TransactionMonitoring::case_priority? + + def priority=: ( + Lithic::Models::TransactionMonitoring::case_priority + ) -> Lithic::Models::TransactionMonitoring::case_priority + + attr_reader resolution: Lithic::Models::TransactionMonitoring::resolution_outcome? + + def resolution=: ( + Lithic::Models::TransactionMonitoring::resolution_outcome + ) -> Lithic::Models::TransactionMonitoring::resolution_outcome + + attr_reader resolution_notes: String? + + def resolution_notes=: (String) -> String + + attr_accessor sla_deadline: Time? + + attr_reader status: Lithic::Models::TransactionMonitoring::case_status? + + def status=: ( + Lithic::Models::TransactionMonitoring::case_status + ) -> Lithic::Models::TransactionMonitoring::case_status + + attr_reader tags: ::Hash[Symbol, String]? + + def tags=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String] + + attr_accessor title: String? + + def initialize: ( + case_token: String, + ?actor_token: String, + ?assignee: String?, + ?priority: Lithic::Models::TransactionMonitoring::case_priority, + ?resolution: Lithic::Models::TransactionMonitoring::resolution_outcome, + ?resolution_notes: String, + ?sla_deadline: Time?, + ?status: Lithic::Models::TransactionMonitoring::case_status, + ?tags: ::Hash[Symbol, String], + ?title: String?, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + case_token: String, + actor_token: String, + assignee: String?, + priority: Lithic::Models::TransactionMonitoring::case_priority, + resolution: Lithic::Models::TransactionMonitoring::resolution_outcome, + resolution_notes: String, + sla_deadline: Time?, + status: Lithic::Models::TransactionMonitoring::case_status, + tags: ::Hash[Symbol, String], + title: String?, + request_options: Lithic::RequestOptions + } + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/cases/case_file.rbs b/sig/lithic/models/transaction_monitoring/cases/case_file.rbs new file mode 100644 index 00000000..6a64d623 --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/cases/case_file.rbs @@ -0,0 +1,86 @@ +module Lithic + module Models + module TransactionMonitoring + class CaseFile = Cases::CaseFile + + module Cases + type case_file = + { + token: String, + created: Time, + download_url: String?, + download_url_expires: Time?, + failure_reason: String?, + mime_type: String?, + name: String, + size_bytes: Integer?, + status: Lithic::Models::TransactionMonitoring::Cases::file_status, + updated: Time, + upload_constraints: Lithic::TransactionMonitoring::Cases::UploadConstraints?, + upload_url: String?, + upload_url_expires: Time? + } + + class CaseFile < Lithic::Internal::Type::BaseModel + attr_accessor token: String + + attr_accessor created: Time + + attr_accessor download_url: String? + + attr_accessor download_url_expires: Time? + + attr_accessor failure_reason: String? + + attr_accessor mime_type: String? + + attr_accessor name: String + + attr_accessor size_bytes: Integer? + + attr_accessor status: Lithic::Models::TransactionMonitoring::Cases::file_status + + attr_accessor updated: Time + + attr_accessor upload_constraints: Lithic::TransactionMonitoring::Cases::UploadConstraints? + + attr_accessor upload_url: String? + + attr_accessor upload_url_expires: Time? + + def initialize: ( + token: String, + created: Time, + download_url: String?, + download_url_expires: Time?, + failure_reason: String?, + mime_type: String?, + name: String, + size_bytes: Integer?, + status: Lithic::Models::TransactionMonitoring::Cases::file_status, + updated: Time, + upload_constraints: Lithic::TransactionMonitoring::Cases::UploadConstraints?, + upload_url: String?, + upload_url_expires: Time? + ) -> void + + def to_hash: -> { + token: String, + created: Time, + download_url: String?, + download_url_expires: Time?, + failure_reason: String?, + mime_type: String?, + name: String, + size_bytes: Integer?, + status: Lithic::Models::TransactionMonitoring::Cases::file_status, + updated: Time, + upload_constraints: Lithic::TransactionMonitoring::Cases::UploadConstraints?, + upload_url: String?, + upload_url_expires: Time? + } + end + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/cases/comment_create_params.rbs b/sig/lithic/models/transaction_monitoring/cases/comment_create_params.rbs new file mode 100644 index 00000000..313ff4cf --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/cases/comment_create_params.rbs @@ -0,0 +1,38 @@ +module Lithic + module Models + module TransactionMonitoring + module Cases + type comment_create_params = + { case_token: String, comment: String, actor_token: String } + & Lithic::Internal::Type::request_parameters + + class CommentCreateParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_accessor case_token: String + + attr_accessor comment: String + + attr_reader actor_token: String? + + def actor_token=: (String) -> String + + def initialize: ( + case_token: String, + comment: String, + ?actor_token: String, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + case_token: String, + comment: String, + actor_token: String, + request_options: Lithic::RequestOptions + } + end + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/cases/comment_delete_params.rbs b/sig/lithic/models/transaction_monitoring/cases/comment_delete_params.rbs new file mode 100644 index 00000000..0ee0f8c6 --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/cases/comment_delete_params.rbs @@ -0,0 +1,32 @@ +module Lithic + module Models + module TransactionMonitoring + module Cases + type comment_delete_params = + { case_token: String, comment_token: String } + & Lithic::Internal::Type::request_parameters + + class CommentDeleteParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_accessor case_token: String + + attr_accessor comment_token: String + + def initialize: ( + case_token: String, + comment_token: String, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + case_token: String, + comment_token: String, + request_options: Lithic::RequestOptions + } + end + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/cases/comment_update_params.rbs b/sig/lithic/models/transaction_monitoring/cases/comment_update_params.rbs new file mode 100644 index 00000000..d9b11d51 --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/cases/comment_update_params.rbs @@ -0,0 +1,47 @@ +module Lithic + module Models + module TransactionMonitoring + module Cases + type comment_update_params = + { + case_token: String, + comment_token: String, + comment: String, + actor_token: String + } + & Lithic::Internal::Type::request_parameters + + class CommentUpdateParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_accessor case_token: String + + attr_accessor comment_token: String + + attr_accessor comment: String + + attr_reader actor_token: String? + + def actor_token=: (String) -> String + + def initialize: ( + case_token: String, + comment_token: String, + comment: String, + ?actor_token: String, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + case_token: String, + comment_token: String, + comment: String, + actor_token: String, + request_options: Lithic::RequestOptions + } + end + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/cases/file_create_params.rbs b/sig/lithic/models/transaction_monitoring/cases/file_create_params.rbs new file mode 100644 index 00000000..6db499a0 --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/cases/file_create_params.rbs @@ -0,0 +1,32 @@ +module Lithic + module Models + module TransactionMonitoring + module Cases + type file_create_params = + { case_token: String, name: String } + & Lithic::Internal::Type::request_parameters + + class FileCreateParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_accessor case_token: String + + attr_accessor name: String + + def initialize: ( + case_token: String, + name: String, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + case_token: String, + name: String, + request_options: Lithic::RequestOptions + } + end + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/cases/file_delete_params.rbs b/sig/lithic/models/transaction_monitoring/cases/file_delete_params.rbs new file mode 100644 index 00000000..7ea3aec6 --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/cases/file_delete_params.rbs @@ -0,0 +1,32 @@ +module Lithic + module Models + module TransactionMonitoring + module Cases + type file_delete_params = + { case_token: String, file_token: String } + & Lithic::Internal::Type::request_parameters + + class FileDeleteParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_accessor case_token: String + + attr_accessor file_token: String + + def initialize: ( + case_token: String, + file_token: String, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + case_token: String, + file_token: String, + request_options: Lithic::RequestOptions + } + end + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/cases/file_list_params.rbs b/sig/lithic/models/transaction_monitoring/cases/file_list_params.rbs new file mode 100644 index 00000000..5a9a363e --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/cases/file_list_params.rbs @@ -0,0 +1,51 @@ +module Lithic + module Models + module TransactionMonitoring + module Cases + type file_list_params = + { + case_token: String, + ending_before: String, + page_size: Integer, + starting_after: String + } + & Lithic::Internal::Type::request_parameters + + class FileListParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_accessor case_token: String + + attr_reader ending_before: String? + + def ending_before=: (String) -> String + + attr_reader page_size: Integer? + + def page_size=: (Integer) -> Integer + + attr_reader starting_after: String? + + def starting_after=: (String) -> String + + def initialize: ( + case_token: String, + ?ending_before: String, + ?page_size: Integer, + ?starting_after: String, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + case_token: String, + ending_before: String, + page_size: Integer, + starting_after: String, + request_options: Lithic::RequestOptions + } + end + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/cases/file_retrieve_params.rbs b/sig/lithic/models/transaction_monitoring/cases/file_retrieve_params.rbs new file mode 100644 index 00000000..7cd46373 --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/cases/file_retrieve_params.rbs @@ -0,0 +1,32 @@ +module Lithic + module Models + module TransactionMonitoring + module Cases + type file_retrieve_params = + { case_token: String, file_token: String } + & Lithic::Internal::Type::request_parameters + + class FileRetrieveParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_accessor case_token: String + + attr_accessor file_token: String + + def initialize: ( + case_token: String, + file_token: String, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + case_token: String, + file_token: String, + request_options: Lithic::RequestOptions + } + end + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/cases/file_status.rbs b/sig/lithic/models/transaction_monitoring/cases/file_status.rbs new file mode 100644 index 00000000..b167a7bf --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/cases/file_status.rbs @@ -0,0 +1,19 @@ +module Lithic + module Models + module TransactionMonitoring + module Cases + type file_status = :PENDING | :READY | :REJECTED + + module FileStatus + extend Lithic::Internal::Type::Enum + + PENDING: :PENDING + READY: :READY + REJECTED: :REJECTED + + def self?.values: -> ::Array[Lithic::Models::TransactionMonitoring::Cases::file_status] + end + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/cases/upload_constraints.rbs b/sig/lithic/models/transaction_monitoring/cases/upload_constraints.rbs new file mode 100644 index 00000000..437f6a08 --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/cases/upload_constraints.rbs @@ -0,0 +1,26 @@ +module Lithic + module Models + module TransactionMonitoring + module Cases + 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 +end diff --git a/sig/lithic/models/transaction_monitoring/entity_type.rbs b/sig/lithic/models/transaction_monitoring/entity_type.rbs new file mode 100644 index 00000000..1d33e8e4 --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/entity_type.rbs @@ -0,0 +1,16 @@ +module Lithic + module Models + module TransactionMonitoring + type entity_type = :BENEFICIAL_OWNER_INDIVIDUAL | :CONTROL_PERSON + + module EntityType + extend Lithic::Internal::Type::Enum + + BENEFICIAL_OWNER_INDIVIDUAL: :BENEFICIAL_OWNER_INDIVIDUAL + CONTROL_PERSON: :CONTROL_PERSON + + def self?.values: -> ::Array[Lithic::Models::TransactionMonitoring::entity_type] + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/monitoring_case.rbs b/sig/lithic/models/transaction_monitoring/monitoring_case.rbs new file mode 100644 index 00000000..91a5a3d6 --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/monitoring_case.rbs @@ -0,0 +1,102 @@ +module Lithic + module Models + module TransactionMonitoring + type monitoring_case = + { + token: String, + assignee: String?, + collection_stopped: Time?, + created: Time, + entity: Lithic::TransactionMonitoring::CaseEntity?, + pending_transactions: bool, + priority: Lithic::Models::TransactionMonitoring::case_priority, + queue_token: String, + resolution: Lithic::Models::TransactionMonitoring::resolution_outcome?, + resolution_notes: String?, + resolved: Time?, + rule_token: String?, + sla_deadline: Time?, + status: Lithic::Models::TransactionMonitoring::case_status, + tags: ::Hash[Symbol, String], + title: String?, + updated: Time + } + + class MonitoringCase < Lithic::Internal::Type::BaseModel + attr_accessor token: String + + attr_accessor assignee: String? + + attr_accessor collection_stopped: Time? + + attr_accessor created: Time + + attr_accessor entity: Lithic::TransactionMonitoring::CaseEntity? + + attr_accessor pending_transactions: bool + + attr_accessor priority: Lithic::Models::TransactionMonitoring::case_priority + + attr_accessor queue_token: String + + attr_accessor resolution: Lithic::Models::TransactionMonitoring::resolution_outcome? + + attr_accessor resolution_notes: String? + + attr_accessor resolved: Time? + + attr_accessor rule_token: String? + + attr_accessor sla_deadline: Time? + + attr_accessor status: Lithic::Models::TransactionMonitoring::case_status + + attr_accessor tags: ::Hash[Symbol, String] + + attr_accessor title: String? + + attr_accessor updated: Time + + def initialize: ( + token: String, + assignee: String?, + collection_stopped: Time?, + created: Time, + entity: Lithic::TransactionMonitoring::CaseEntity?, + pending_transactions: bool, + priority: Lithic::Models::TransactionMonitoring::case_priority, + queue_token: String, + resolution: Lithic::Models::TransactionMonitoring::resolution_outcome?, + resolution_notes: String?, + resolved: Time?, + rule_token: String?, + sla_deadline: Time?, + status: Lithic::Models::TransactionMonitoring::case_status, + tags: ::Hash[Symbol, String], + title: String?, + updated: Time + ) -> void + + def to_hash: -> { + token: String, + assignee: String?, + collection_stopped: Time?, + created: Time, + entity: Lithic::TransactionMonitoring::CaseEntity?, + pending_transactions: bool, + priority: Lithic::Models::TransactionMonitoring::case_priority, + queue_token: String, + resolution: Lithic::Models::TransactionMonitoring::resolution_outcome?, + resolution_notes: String?, + resolved: Time?, + rule_token: String?, + sla_deadline: Time?, + status: Lithic::Models::TransactionMonitoring::case_status, + tags: ::Hash[Symbol, String], + title: String?, + updated: Time + } + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/queue.rbs b/sig/lithic/models/transaction_monitoring/queue.rbs new file mode 100644 index 00000000..6d90ac75 --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/queue.rbs @@ -0,0 +1,101 @@ +module Lithic + module Models + module TransactionMonitoring + type queue = + { + token: String, + case_counts: Lithic::TransactionMonitoring::Queue::CaseCounts, + created: Time, + description: String?, + name: String, + updated: Time + } + + class Queue < Lithic::Internal::Type::BaseModel + attr_accessor token: String + + attr_accessor case_counts: Lithic::TransactionMonitoring::Queue::CaseCounts + + attr_accessor created: Time + + attr_accessor description: String? + + attr_accessor name: String + + attr_accessor updated: Time + + def initialize: ( + token: String, + case_counts: Lithic::TransactionMonitoring::Queue::CaseCounts, + created: Time, + description: String?, + name: String, + updated: Time + ) -> void + + def to_hash: -> { + token: String, + case_counts: Lithic::TransactionMonitoring::Queue::CaseCounts, + created: Time, + description: String?, + name: String, + updated: Time + } + + type case_counts = + { + assigned: Integer, + closed: Integer, + escalated: Integer, + in_review: Integer, + open_: Integer, + resolved: Integer + } + + class CaseCounts < Lithic::Internal::Type::BaseModel + attr_reader assigned: Integer? + + def assigned=: (Integer) -> Integer + + attr_reader closed: Integer? + + def closed=: (Integer) -> Integer + + attr_reader escalated: Integer? + + def escalated=: (Integer) -> Integer + + attr_reader in_review: Integer? + + def in_review=: (Integer) -> Integer + + attr_reader open_: Integer? + + def open_=: (Integer) -> Integer + + attr_reader resolved: Integer? + + def resolved=: (Integer) -> Integer + + def initialize: ( + ?assigned: Integer, + ?closed: Integer, + ?escalated: Integer, + ?in_review: Integer, + ?open_: Integer, + ?resolved: Integer + ) -> void + + def to_hash: -> { + assigned: Integer, + closed: Integer, + escalated: Integer, + in_review: Integer, + open_: Integer, + resolved: Integer + } + end + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/queue_create_params.rbs b/sig/lithic/models/transaction_monitoring/queue_create_params.rbs new file mode 100644 index 00000000..6c2c346e --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/queue_create_params.rbs @@ -0,0 +1,30 @@ +module Lithic + module Models + module TransactionMonitoring + type queue_create_params = + { name: String, description: String? } + & Lithic::Internal::Type::request_parameters + + class QueueCreateParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_accessor name: String + + attr_accessor description: String? + + def initialize: ( + name: String, + ?description: String?, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + name: String, + description: String?, + request_options: Lithic::RequestOptions + } + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/queue_delete_params.rbs b/sig/lithic/models/transaction_monitoring/queue_delete_params.rbs new file mode 100644 index 00000000..298838aa --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/queue_delete_params.rbs @@ -0,0 +1,25 @@ +module Lithic + module Models + module TransactionMonitoring + type queue_delete_params = + { queue_token: String } & Lithic::Internal::Type::request_parameters + + class QueueDeleteParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_accessor queue_token: String + + def initialize: ( + queue_token: String, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + queue_token: String, + request_options: Lithic::RequestOptions + } + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/queue_list_params.rbs b/sig/lithic/models/transaction_monitoring/queue_list_params.rbs new file mode 100644 index 00000000..98d39a3a --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/queue_list_params.rbs @@ -0,0 +1,40 @@ +module Lithic + module Models + module TransactionMonitoring + type queue_list_params = + { ending_before: String, page_size: Integer, starting_after: String } + & Lithic::Internal::Type::request_parameters + + class QueueListParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_reader ending_before: String? + + def ending_before=: (String) -> String + + attr_reader page_size: Integer? + + def page_size=: (Integer) -> Integer + + attr_reader starting_after: String? + + def starting_after=: (String) -> String + + def initialize: ( + ?ending_before: String, + ?page_size: Integer, + ?starting_after: String, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + ending_before: String, + page_size: Integer, + starting_after: String, + request_options: Lithic::RequestOptions + } + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/queue_retrieve_params.rbs b/sig/lithic/models/transaction_monitoring/queue_retrieve_params.rbs new file mode 100644 index 00000000..a87089fc --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/queue_retrieve_params.rbs @@ -0,0 +1,25 @@ +module Lithic + module Models + module TransactionMonitoring + type queue_retrieve_params = + { queue_token: String } & Lithic::Internal::Type::request_parameters + + class QueueRetrieveParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_accessor queue_token: String + + def initialize: ( + queue_token: String, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + queue_token: String, + request_options: Lithic::RequestOptions + } + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/queue_update_params.rbs b/sig/lithic/models/transaction_monitoring/queue_update_params.rbs new file mode 100644 index 00000000..6330a791 --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/queue_update_params.rbs @@ -0,0 +1,36 @@ +module Lithic + module Models + module TransactionMonitoring + type queue_update_params = + { queue_token: String, description: String?, name: String } + & Lithic::Internal::Type::request_parameters + + class QueueUpdateParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_accessor queue_token: String + + attr_accessor description: String? + + attr_reader name: String? + + def name=: (String) -> String + + def initialize: ( + queue_token: String, + ?description: String?, + ?name: String, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + queue_token: String, + description: String?, + name: String, + request_options: Lithic::RequestOptions + } + end + end + end +end diff --git a/sig/lithic/models/transaction_monitoring/resolution_outcome.rbs b/sig/lithic/models/transaction_monitoring/resolution_outcome.rbs new file mode 100644 index 00000000..4890b7de --- /dev/null +++ b/sig/lithic/models/transaction_monitoring/resolution_outcome.rbs @@ -0,0 +1,24 @@ +module Lithic + module Models + module TransactionMonitoring + type resolution_outcome = + :CONFIRMED_FRAUD + | :SUSPICIOUS_ACTIVITY + | :FALSE_POSITIVE + | :NO_ACTION_REQUIRED + | :ESCALATED_EXTERNAL + + module ResolutionOutcome + extend Lithic::Internal::Type::Enum + + CONFIRMED_FRAUD: :CONFIRMED_FRAUD + SUSPICIOUS_ACTIVITY: :SUSPICIOUS_ACTIVITY + FALSE_POSITIVE: :FALSE_POSITIVE + NO_ACTION_REQUIRED: :NO_ACTION_REQUIRED + ESCALATED_EXTERNAL: :ESCALATED_EXTERNAL + + def self?.values: -> ::Array[Lithic::Models::TransactionMonitoring::resolution_outcome] + end + end + end +end diff --git a/sig/lithic/resources/account_holders/entities.rbs b/sig/lithic/resources/account_holders/entities.rbs index dcd3c404..d7750b92 100644 --- a/sig/lithic/resources/account_holders/entities.rbs +++ b/sig/lithic/resources/account_holders/entities.rbs @@ -11,7 +11,7 @@ module Lithic government_id: String, last_name: String, phone_number: String, - type: Lithic::Models::AccountHolders::EntityCreateParams::type_, + type: Lithic::Models::TransactionMonitoring::entity_type, ?request_options: Lithic::request_opts ) -> Lithic::Models::AccountHolders::EntityCreateResponse diff --git a/sig/lithic/resources/transaction_monitoring.rbs b/sig/lithic/resources/transaction_monitoring.rbs new file mode 100644 index 00000000..fd57a3d0 --- /dev/null +++ b/sig/lithic/resources/transaction_monitoring.rbs @@ -0,0 +1,11 @@ +module Lithic + module Resources + class TransactionMonitoring + attr_reader cases: Lithic::Resources::TransactionMonitoring::Cases + + attr_reader queues: Lithic::Resources::TransactionMonitoring::Queues + + def initialize: (client: Lithic::Client) -> void + end + end +end diff --git a/sig/lithic/resources/transaction_monitoring/cases.rbs b/sig/lithic/resources/transaction_monitoring/cases.rbs new file mode 100644 index 00000000..2190a299 --- /dev/null +++ b/sig/lithic/resources/transaction_monitoring/cases.rbs @@ -0,0 +1,71 @@ +module Lithic + module Resources + class TransactionMonitoring + class Cases + attr_reader comments: Lithic::Resources::TransactionMonitoring::Cases::Comments + + attr_reader files: Lithic::Resources::TransactionMonitoring::Cases::Files + + def retrieve: ( + String case_token, + ?request_options: Lithic::request_opts + ) -> Lithic::TransactionMonitoring::MonitoringCase + + def update: ( + String case_token, + ?actor_token: String, + ?assignee: String?, + ?priority: Lithic::Models::TransactionMonitoring::case_priority, + ?resolution: Lithic::Models::TransactionMonitoring::resolution_outcome, + ?resolution_notes: String, + ?sla_deadline: Time?, + ?status: Lithic::Models::TransactionMonitoring::case_status, + ?tags: ::Hash[Symbol, String], + ?title: String?, + ?request_options: Lithic::request_opts + ) -> Lithic::TransactionMonitoring::MonitoringCase + + def list: ( + ?account_token: String, + ?assignee: String, + ?begin_: Time, + ?card_token: String, + ?end_: Time, + ?ending_before: String, + ?entity_token: String, + ?page_size: Integer, + ?queue_token: String, + ?rule_token: String, + ?sort_by: Lithic::Models::TransactionMonitoring::case_sort_order, + ?starting_after: String, + ?status: Lithic::Models::TransactionMonitoring::case_status, + ?transaction_token: String, + ?request_options: Lithic::request_opts + ) -> Lithic::Internal::CursorPage[Lithic::TransactionMonitoring::MonitoringCase] + + def list_activity: ( + String case_token, + ?ending_before: String, + ?page_size: Integer, + ?starting_after: String, + ?request_options: Lithic::request_opts + ) -> Lithic::Internal::CursorPage[Lithic::TransactionMonitoring::CaseActivityEntry] + + def list_transactions: ( + String case_token, + ?ending_before: String, + ?page_size: Integer, + ?starting_after: String, + ?request_options: Lithic::request_opts + ) -> Lithic::Internal::CursorPage[Lithic::TransactionMonitoring::CaseTransaction] + + def retrieve_cards: ( + String case_token, + ?request_options: Lithic::request_opts + ) -> Lithic::Models::TransactionMonitoring::case_retrieve_cards_response + + def initialize: (client: Lithic::Client) -> void + end + end + end +end diff --git a/sig/lithic/resources/transaction_monitoring/cases/comments.rbs b/sig/lithic/resources/transaction_monitoring/cases/comments.rbs new file mode 100644 index 00000000..62500f5b --- /dev/null +++ b/sig/lithic/resources/transaction_monitoring/cases/comments.rbs @@ -0,0 +1,32 @@ +module Lithic + module Resources + class TransactionMonitoring + class Cases + class Comments + def create: ( + String case_token, + comment: String, + ?actor_token: String, + ?request_options: Lithic::request_opts + ) -> Lithic::TransactionMonitoring::CaseActivityEntry + + def update: ( + String comment_token, + case_token: String, + comment: String, + ?actor_token: String, + ?request_options: Lithic::request_opts + ) -> Lithic::TransactionMonitoring::CaseActivityEntry + + def delete: ( + String comment_token, + case_token: String, + ?request_options: Lithic::request_opts + ) -> nil + + def initialize: (client: Lithic::Client) -> void + end + end + end + end +end diff --git a/sig/lithic/resources/transaction_monitoring/cases/files.rbs b/sig/lithic/resources/transaction_monitoring/cases/files.rbs new file mode 100644 index 00000000..d9a0b657 --- /dev/null +++ b/sig/lithic/resources/transaction_monitoring/cases/files.rbs @@ -0,0 +1,37 @@ +module Lithic + module Resources + class TransactionMonitoring + class Cases + class Files + def create: ( + String case_token, + name: String, + ?request_options: Lithic::request_opts + ) -> Lithic::TransactionMonitoring::Cases::CaseFile + + def retrieve: ( + String file_token, + case_token: String, + ?request_options: Lithic::request_opts + ) -> Lithic::TransactionMonitoring::Cases::CaseFile + + def list: ( + String case_token, + ?ending_before: String, + ?page_size: Integer, + ?starting_after: String, + ?request_options: Lithic::request_opts + ) -> Lithic::Internal::CursorPage[Lithic::TransactionMonitoring::Cases::CaseFile] + + def delete: ( + String file_token, + case_token: String, + ?request_options: Lithic::request_opts + ) -> nil + + def initialize: (client: Lithic::Client) -> void + end + end + end + end +end diff --git a/sig/lithic/resources/transaction_monitoring/queues.rbs b/sig/lithic/resources/transaction_monitoring/queues.rbs new file mode 100644 index 00000000..090f2eb7 --- /dev/null +++ b/sig/lithic/resources/transaction_monitoring/queues.rbs @@ -0,0 +1,39 @@ +module Lithic + module Resources + class TransactionMonitoring + class Queues + def create: ( + name: String, + ?description: String?, + ?request_options: Lithic::request_opts + ) -> Lithic::TransactionMonitoring::Queue + + def retrieve: ( + String queue_token, + ?request_options: Lithic::request_opts + ) -> Lithic::TransactionMonitoring::Queue + + def update: ( + String queue_token, + ?description: String?, + ?name: String, + ?request_options: Lithic::request_opts + ) -> Lithic::TransactionMonitoring::Queue + + def list: ( + ?ending_before: String, + ?page_size: Integer, + ?starting_after: String, + ?request_options: Lithic::request_opts + ) -> Lithic::Internal::CursorPage[Lithic::TransactionMonitoring::Queue] + + def delete: ( + String queue_token, + ?request_options: Lithic::request_opts + ) -> nil + + def initialize: (client: Lithic::Client) -> void + end + end + end +end diff --git a/test/lithic/resource_namespaces.rb b/test/lithic/resource_namespaces.rb index ae465057..250765f2 100644 --- a/test/lithic/resource_namespaces.rb +++ b/test/lithic/resource_namespaces.rb @@ -14,6 +14,9 @@ module V2 module Cards end + module Cases + end + module CreditProducts end @@ -45,6 +48,11 @@ module Statements module ThreeDS end + module TransactionMonitoring + module Cases + end + end + module Transactions module Events end diff --git a/test/lithic/resources/account_holders/entities_test.rb b/test/lithic/resources/account_holders/entities_test.rb index 1586e271..f944551a 100644 --- a/test/lithic/resources/account_holders/entities_test.rb +++ b/test/lithic/resources/account_holders/entities_test.rb @@ -61,7 +61,7 @@ def test_delete_required_params last_name: String | nil, phone_number: String | nil, status: Lithic::AccountHolders::AccountHolderEntity::Status, - type: Lithic::AccountHolders::AccountHolderEntity::Type + type: Lithic::TransactionMonitoring::EntityType } end end diff --git a/test/lithic/resources/transaction_monitoring/cases/comments_test.rb b/test/lithic/resources/transaction_monitoring/cases/comments_test.rb new file mode 100644 index 00000000..1143351e --- /dev/null +++ b/test/lithic/resources/transaction_monitoring/cases/comments_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +require_relative "../../../test_helper" + +class Lithic::Test::Resources::TransactionMonitoring::Cases::CommentsTest < Lithic::Test::ResourceTest + def test_create_required_params + response = + @lithic.transaction_monitoring.cases.comments.create( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + comment: "comment" + ) + + assert_pattern do + response => Lithic::TransactionMonitoring::CaseActivityEntry + end + + assert_pattern do + response => { + token: String, + actor_token: String | nil, + created: Time, + entry_type: Lithic::TransactionMonitoring::CaseActivityType, + new_value: String | nil, + previous_value: String | nil + } + end + end + + def test_update_required_params + response = + @lithic.transaction_monitoring.cases.comments.update( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + case_token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + comment: "comment" + ) + + assert_pattern do + response => Lithic::TransactionMonitoring::CaseActivityEntry + end + + assert_pattern do + response => { + token: String, + actor_token: String | nil, + created: Time, + entry_type: Lithic::TransactionMonitoring::CaseActivityType, + new_value: String | nil, + previous_value: String | nil + } + end + end + + def test_delete_required_params + response = + @lithic.transaction_monitoring.cases.comments.delete( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + case_token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" + ) + + assert_pattern do + response => nil + end + end +end diff --git a/test/lithic/resources/transaction_monitoring/cases/files_test.rb b/test/lithic/resources/transaction_monitoring/cases/files_test.rb new file mode 100644 index 00000000..09900d9d --- /dev/null +++ b/test/lithic/resources/transaction_monitoring/cases/files_test.rb @@ -0,0 +1,107 @@ +# frozen_string_literal: true + +require_relative "../../../test_helper" + +class Lithic::Test::Resources::TransactionMonitoring::Cases::FilesTest < Lithic::Test::ResourceTest + def test_create_required_params + response = + @lithic.transaction_monitoring.cases.files.create("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", name: "name") + + assert_pattern do + response => Lithic::TransactionMonitoring::Cases::CaseFile + end + + assert_pattern do + response => { + token: String, + created: Time, + download_url: String | nil, + download_url_expires: Time | nil, + failure_reason: String | nil, + mime_type: String | nil, + name: String, + size_bytes: Integer | nil, + status: Lithic::TransactionMonitoring::Cases::FileStatus, + updated: Time, + upload_constraints: Lithic::TransactionMonitoring::Cases::UploadConstraints | nil, + upload_url: String | nil, + upload_url_expires: Time | nil + } + end + end + + def test_retrieve_required_params + response = + @lithic.transaction_monitoring.cases.files.retrieve( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + case_token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" + ) + + assert_pattern do + response => Lithic::TransactionMonitoring::Cases::CaseFile + end + + assert_pattern do + response => { + token: String, + created: Time, + download_url: String | nil, + download_url_expires: Time | nil, + failure_reason: String | nil, + mime_type: String | nil, + name: String, + size_bytes: Integer | nil, + status: Lithic::TransactionMonitoring::Cases::FileStatus, + updated: Time, + upload_constraints: Lithic::TransactionMonitoring::Cases::UploadConstraints | nil, + upload_url: String | nil, + upload_url_expires: Time | nil + } + end + end + + def test_list + response = @lithic.transaction_monitoring.cases.files.list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + + assert_pattern do + response => Lithic::Internal::CursorPage + end + + row = response.to_enum.first + return if row.nil? + + assert_pattern do + row => Lithic::TransactionMonitoring::Cases::CaseFile + end + + assert_pattern do + row => { + token: String, + created: Time, + download_url: String | nil, + download_url_expires: Time | nil, + failure_reason: String | nil, + mime_type: String | nil, + name: String, + size_bytes: Integer | nil, + status: Lithic::TransactionMonitoring::Cases::FileStatus, + updated: Time, + upload_constraints: Lithic::TransactionMonitoring::Cases::UploadConstraints | nil, + upload_url: String | nil, + upload_url_expires: Time | nil + } + end + end + + def test_delete_required_params + response = + @lithic.transaction_monitoring.cases.files.delete( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + case_token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" + ) + + assert_pattern do + response => nil + end + end +end diff --git a/test/lithic/resources/transaction_monitoring/cases_test.rb b/test/lithic/resources/transaction_monitoring/cases_test.rb new file mode 100644 index 00000000..780a9cb4 --- /dev/null +++ b/test/lithic/resources/transaction_monitoring/cases_test.rb @@ -0,0 +1,161 @@ +# frozen_string_literal: true + +require_relative "../../test_helper" + +class Lithic::Test::Resources::TransactionMonitoring::CasesTest < Lithic::Test::ResourceTest + def test_retrieve + response = @lithic.transaction_monitoring.cases.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + + assert_pattern do + response => Lithic::TransactionMonitoring::MonitoringCase + end + + assert_pattern do + response => { + token: String, + assignee: String | nil, + collection_stopped: Time | nil, + created: Time, + entity: Lithic::TransactionMonitoring::CaseEntity | nil, + pending_transactions: Lithic::Internal::Type::Boolean, + priority: Lithic::TransactionMonitoring::CasePriority, + queue_token: String, + resolution: Lithic::TransactionMonitoring::ResolutionOutcome | nil, + resolution_notes: String | nil, + resolved: Time | nil, + rule_token: String | nil, + sla_deadline: Time | nil, + status: Lithic::TransactionMonitoring::CaseStatus, + tags: ^(Lithic::Internal::Type::HashOf[String]), + title: String | nil, + updated: Time + } + end + end + + def test_update + response = @lithic.transaction_monitoring.cases.update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + + assert_pattern do + response => Lithic::TransactionMonitoring::MonitoringCase + end + + assert_pattern do + response => { + token: String, + assignee: String | nil, + collection_stopped: Time | nil, + created: Time, + entity: Lithic::TransactionMonitoring::CaseEntity | nil, + pending_transactions: Lithic::Internal::Type::Boolean, + priority: Lithic::TransactionMonitoring::CasePriority, + queue_token: String, + resolution: Lithic::TransactionMonitoring::ResolutionOutcome | nil, + resolution_notes: String | nil, + resolved: Time | nil, + rule_token: String | nil, + sla_deadline: Time | nil, + status: Lithic::TransactionMonitoring::CaseStatus, + tags: ^(Lithic::Internal::Type::HashOf[String]), + title: String | nil, + updated: Time + } + end + end + + def test_list + response = @lithic.transaction_monitoring.cases.list + + assert_pattern do + response => Lithic::Internal::CursorPage + end + + row = response.to_enum.first + return if row.nil? + + assert_pattern do + row => Lithic::TransactionMonitoring::MonitoringCase + end + + assert_pattern do + row => { + token: String, + assignee: String | nil, + collection_stopped: Time | nil, + created: Time, + entity: Lithic::TransactionMonitoring::CaseEntity | nil, + pending_transactions: Lithic::Internal::Type::Boolean, + priority: Lithic::TransactionMonitoring::CasePriority, + queue_token: String, + resolution: Lithic::TransactionMonitoring::ResolutionOutcome | nil, + resolution_notes: String | nil, + resolved: Time | nil, + rule_token: String | nil, + sla_deadline: Time | nil, + status: Lithic::TransactionMonitoring::CaseStatus, + tags: ^(Lithic::Internal::Type::HashOf[String]), + title: String | nil, + updated: Time + } + end + end + + def test_list_activity + response = @lithic.transaction_monitoring.cases.list_activity("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + + assert_pattern do + response => Lithic::Internal::CursorPage + end + + row = response.to_enum.first + return if row.nil? + + assert_pattern do + row => Lithic::TransactionMonitoring::CaseActivityEntry + end + + assert_pattern do + row => { + token: String, + actor_token: String | nil, + created: Time, + entry_type: Lithic::TransactionMonitoring::CaseActivityType, + new_value: String | nil, + previous_value: String | nil + } + end + end + + def test_list_transactions + response = @lithic.transaction_monitoring.cases.list_transactions("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + + assert_pattern do + response => Lithic::Internal::CursorPage + end + + row = response.to_enum.first + return if row.nil? + + assert_pattern do + row => Lithic::TransactionMonitoring::CaseTransaction + end + + assert_pattern do + row => { + token: String, + account_token: String, + added_at: Time, + card_token: String, + transaction_created_at: Time + } + end + end + + def test_retrieve_cards + response = @lithic.transaction_monitoring.cases.retrieve_cards("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + + assert_pattern do + response => ^(Lithic::Internal::Type::ArrayOf[Lithic::TransactionMonitoring::CaseCard]) + end + end +end diff --git a/test/lithic/resources/transaction_monitoring/queues_test.rb b/test/lithic/resources/transaction_monitoring/queues_test.rb new file mode 100644 index 00000000..782858d0 --- /dev/null +++ b/test/lithic/resources/transaction_monitoring/queues_test.rb @@ -0,0 +1,96 @@ +# frozen_string_literal: true + +require_relative "../../test_helper" + +class Lithic::Test::Resources::TransactionMonitoring::QueuesTest < Lithic::Test::ResourceTest + def test_create_required_params + response = @lithic.transaction_monitoring.queues.create(name: "name") + + assert_pattern do + response => Lithic::TransactionMonitoring::Queue + end + + assert_pattern do + response => { + token: String, + case_counts: Lithic::TransactionMonitoring::Queue::CaseCounts, + created: Time, + description: String | nil, + name: String, + updated: Time + } + end + end + + def test_retrieve + response = @lithic.transaction_monitoring.queues.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + + assert_pattern do + response => Lithic::TransactionMonitoring::Queue + end + + assert_pattern do + response => { + token: String, + case_counts: Lithic::TransactionMonitoring::Queue::CaseCounts, + created: Time, + description: String | nil, + name: String, + updated: Time + } + end + end + + def test_update + response = @lithic.transaction_monitoring.queues.update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + + assert_pattern do + response => Lithic::TransactionMonitoring::Queue + end + + assert_pattern do + response => { + token: String, + case_counts: Lithic::TransactionMonitoring::Queue::CaseCounts, + created: Time, + description: String | nil, + name: String, + updated: Time + } + end + end + + def test_list + response = @lithic.transaction_monitoring.queues.list + + assert_pattern do + response => Lithic::Internal::CursorPage + end + + row = response.to_enum.first + return if row.nil? + + assert_pattern do + row => Lithic::TransactionMonitoring::Queue + end + + assert_pattern do + row => { + token: String, + case_counts: Lithic::TransactionMonitoring::Queue::CaseCounts, + created: Time, + description: String | nil, + name: String, + updated: Time + } + end + end + + def test_delete + response = @lithic.transaction_monitoring.queues.delete("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + + assert_pattern do + response => nil + end + end +end diff --git a/test/lithic/resources/transaction_monitoring_test.rb b/test/lithic/resources/transaction_monitoring_test.rb new file mode 100644 index 00000000..9959f6ca --- /dev/null +++ b/test/lithic/resources/transaction_monitoring_test.rb @@ -0,0 +1,6 @@ +# frozen_string_literal: true + +require_relative "../test_helper" + +class Lithic::Test::Resources::TransactionMonitoringTest < Lithic::Test::ResourceTest +end From df6ea572d30e5d7b2cb166641ebc3e0fcbccad3f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 10 Jun 2026 13:59:14 +0000 Subject: [PATCH 7/7] release: 0.16.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 17 +++++++++++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/lithic/version.rb | 2 +- 5 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 8f3e0a49..b4e9013b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.15.0" + ".": "0.16.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index e01432b6..bae1fd57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## 0.16.0 (2026-06-10) + +Full Changelog: [v0.15.0...v0.16.0](https://github.com/lithic-com/lithic-ruby/compare/v0.15.0...v0.16.0) + +### Features + +* **api:** Add created field to Challenge object ([e442303](https://github.com/lithic-com/lithic-ruby/commit/e44230324af07930c8cc84b3035677df54bc031f)) +* **api:** add day_of_period field to loan_tape ([71ab28b](https://github.com/lithic-com/lithic-ruby/commit/71ab28b5af8e6118b2133bc8ed190520b6be2396)) +* **api:** add hold_adjustment_action variant to auth_rules action parameter ([bae640f](https://github.com/lithic-com/lithic-ruby/commit/bae640faf01eef0b956cb24eaa73f92c40536082)) +* **api:** add NVS name_validation fields to ASA request and response ([5747fda](https://github.com/lithic-com/lithic-ruby/commit/5747fda7c1065d257bc60d03e770f66be8677d48)) +* **api:** add transaction_monitoring with cases/comments/files/queues, refactor entity_type ([37af713](https://github.com/lithic-com/lithic-ruby/commit/37af713a243f3380aea47019af34fe1d698bae35)) + + +### Documentation + +* **api:** update support contact from email to URL in account/card resources ([bd7f679](https://github.com/lithic-com/lithic-ruby/commit/bd7f67927187e7daa99059f5e9190c1df79424c3)) + ## 0.15.0 (2026-05-27) Full Changelog: [v0.14.0...v0.15.0](https://github.com/lithic-com/lithic-ruby/compare/v0.14.0...v0.15.0) diff --git a/Gemfile.lock b/Gemfile.lock index e7eac2d0..45901084 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - lithic (0.15.0) + lithic (0.16.0) cgi connection_pool diff --git a/README.md b/README.md index 15a508f1..4506a0ed 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.15.0" +gem "lithic", "~> 0.16.0" ``` diff --git a/lib/lithic/version.rb b/lib/lithic/version.rb index ae44fd3a..2f7f1028 100644 --- a/lib/lithic/version.rb +++ b/lib/lithic/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Lithic - VERSION = "0.15.0" + VERSION = "0.16.0" end