diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b4e9013b..6db19b95 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.16.0" + ".": "0.17.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index e2068bef..7ecdcfae 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-a4afc884f86f30a87445552888031ac1ca18aed0476d7120da555bf457627e65.yml -openapi_spec_hash: ce8d0830986c702f0c7a693b1c3cc5a2 -config_hash: 4b618a1df59e555cebe6aa13e8c0218f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-8e691d2dedaea1906ebbe28b28c978855d5e4fe5fe595a8d23917df851123400.yml +openapi_spec_hash: c33e82abb4d7c979d05386ca230464d3 +config_hash: 5bb913c05ebeb301ec925b16e75bb251 diff --git a/CHANGELOG.md b/CHANGELOG.md index c41526f0..4058bd6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.17.0 (2026-06-19) + +Full Changelog: [v0.16.0...v0.17.0](https://github.com/lithic-com/lithic-ruby/compare/v0.16.0...v0.17.0) + +### Features + +* **api:** add ach payment update actions/results, card transaction results to auth_rules ([a761a6f](https://github.com/lithic-com/lithic-ruby/commit/a761a6f5fccb557d7fa03d81043b28d685aaec82)) + ## 0.16.0 (2026-06-16) Full Changelog: [v0.15.0...v0.16.0](https://github.com/lithic-com/lithic-ruby/compare/v0.15.0...v0.16.0) diff --git a/Gemfile.lock b/Gemfile.lock index 45901084..c4578b8e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - lithic (0.16.0) + lithic (0.17.0) cgi connection_pool diff --git a/README.md b/README.md index 4506a0ed..f2e9e6de 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.16.0" +gem "lithic", "~> 0.17.0" ``` diff --git a/lib/lithic.rb b/lib/lithic.rb index 6232313d..7e61260c 100644 --- a/lib/lithic.rb +++ b/lib/lithic.rb @@ -117,6 +117,7 @@ require_relative "lithic/models/address" require_relative "lithic/models/address_update" require_relative "lithic/models/api_status" +require_relative "lithic/models/auth_rules/ach_payment_update_action" require_relative "lithic/models/auth_rules/auth_rule" require_relative "lithic/models/auth_rules/auth_rule_condition" require_relative "lithic/models/auth_rules/auth_rule_version" @@ -124,6 +125,7 @@ require_relative "lithic/models/auth_rules/card_transaction_update_action" require_relative "lithic/models/auth_rules/conditional_3ds_action_parameters" require_relative "lithic/models/auth_rules/conditional_ach_action_parameters" +require_relative "lithic/models/auth_rules/conditional_ach_payment_update_action_parameters" require_relative "lithic/models/auth_rules/conditional_attribute" require_relative "lithic/models/auth_rules/conditional_authorization_action_parameters" require_relative "lithic/models/auth_rules/conditional_authorization_adjustment_parameters" diff --git a/lib/lithic/models/auth_rules/ach_payment_update_action.rb b/lib/lithic/models/auth_rules/ach_payment_update_action.rb new file mode 100644 index 00000000..1a8e7528 --- /dev/null +++ b/lib/lithic/models/auth_rules/ach_payment_update_action.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +module Lithic + module Models + module AuthRules + module ACHPaymentUpdateAction + extend Lithic::Internal::Type::Union + + variant -> { Lithic::AuthRules::ACHPaymentUpdateAction::TagAction } + + variant -> { Lithic::AuthRules::ACHPaymentUpdateAction::CreateCaseAction } + + class TagAction < Lithic::Internal::Type::BaseModel + # @!attribute key + # The key of the tag to apply to the payment + # + # @return [String] + required :key, String + + # @!attribute type + # Tag the payment with key-value metadata + # + # @return [Symbol, Lithic::Models::AuthRules::ACHPaymentUpdateAction::TagAction::Type] + required :type, enum: -> { Lithic::AuthRules::ACHPaymentUpdateAction::TagAction::Type } + + # @!attribute value + # The value of the tag to apply to the payment + # + # @return [String] + required :value, String + + # @!method initialize(key:, type:, value:) + # @param key [String] The key of the tag to apply to the payment + # + # @param type [Symbol, Lithic::Models::AuthRules::ACHPaymentUpdateAction::TagAction::Type] Tag the payment with key-value metadata + # + # @param value [String] The value of the tag to apply to the payment + + # Tag the payment with key-value metadata + # + # @see Lithic::Models::AuthRules::ACHPaymentUpdateAction::TagAction#type + module Type + extend Lithic::Internal::Type::Enum + + TAG = :TAG + + # @!method self.values + # @return [Array] + end + end + + class CreateCaseAction < Lithic::Internal::Type::BaseModel + # @!attribute queue_token + # The token of the queue to create the case in + # + # @return [String] + required :queue_token, String + + # @!attribute scope + # The scope of the case to create + # + # @return [Symbol, Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::Scope] + required :scope, enum: -> { Lithic::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::Scope } + + # @!attribute type + # Create a case for the payment + # + # @return [Symbol, Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::Type] + required :type, enum: -> { Lithic::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::Type } + + # @!method initialize(queue_token:, scope:, type:) + # @param queue_token [String] The token of the queue to create the case in + # + # @param scope [Symbol, Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::Scope] The scope of the case to create + # + # @param type [Symbol, Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::Type] Create a case for the payment + + # The scope of the case to create + # + # @see Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction#scope + module Scope + extend Lithic::Internal::Type::Enum + + FINANCIAL_ACCOUNT = :FINANCIAL_ACCOUNT + + # @!method self.values + # @return [Array] + end + + # Create a case for the payment + # + # @see Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction#type + module Type + extend Lithic::Internal::Type::Enum + + CREATE_CASE = :CREATE_CASE + + # @!method self.values + # @return [Array] + end + end + + # @!method self.variants + # @return [Array(Lithic::Models::AuthRules::ACHPaymentUpdateAction::TagAction, Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction)] + end + end + end +end diff --git a/lib/lithic/models/auth_rules/auth_rule.rb b/lib/lithic/models/auth_rules/auth_rule.rb index 9b24fea8..0c894dc8 100644 --- a/lib/lithic/models/auth_rules/auth_rule.rb +++ b/lib/lithic/models/auth_rules/auth_rule.rb @@ -81,11 +81,11 @@ class AuthRule < Lithic::Internal::Type::BaseModel # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. # # @return [Symbol, Lithic::Models::AuthRules::AuthRule::Type] required :type, enum: -> { Lithic::AuthRules::AuthRule::Type } @@ -147,7 +147,7 @@ class CurrentVersion < Lithic::Internal::Type::BaseModel # @!attribute parameters # Parameters for the Auth Rule # - # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] + # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] required :parameters, union: -> { Lithic::AuthRules::AuthRule::CurrentVersion::Parameters } response_only do @@ -163,7 +163,7 @@ class CurrentVersion < Lithic::Internal::Type::BaseModel # Some parameter documentations has been truncated, see # {Lithic::Models::AuthRules::AuthRule::CurrentVersion} for more details. # - # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] Parameters for the Auth Rule + # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] Parameters for the Auth Rule # # @param version [Integer] The version of the rule, this is incremented whenever the rule's parameters chan @@ -190,13 +190,15 @@ module Parameters variant -> { Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters } + variant -> { Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters } + # Parameters for defining a TypeScript code rule variant -> { Lithic::AuthRules::TypescriptCodeParameters } variant -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters } # @!method self.variants - # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters)] + # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters)] end end @@ -212,7 +214,7 @@ class DraftVersion < Lithic::Internal::Type::BaseModel # @!attribute parameters # Parameters for the Auth Rule # - # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] + # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] required :parameters, union: -> { Lithic::AuthRules::AuthRule::DraftVersion::Parameters } # @!attribute state @@ -245,7 +247,7 @@ class DraftVersion < Lithic::Internal::Type::BaseModel # # @param error [String, nil] An error message if the draft version failed compilation. Populated when `state` # - # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] Parameters for the Auth Rule + # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] Parameters for the Auth Rule # # @param state [Symbol, Lithic::Models::AuthRules::AuthRule::DraftVersion::State] The state of the draft version. Most rules are created synchronously and the sta # @@ -274,13 +276,15 @@ module Parameters variant -> { Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters } + variant -> { Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters } + # Parameters for defining a TypeScript code rule variant -> { Lithic::AuthRules::TypescriptCodeParameters } variant -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters } # @!method self.variants - # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters)] + # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters)] end # The state of the draft version. Most rules are created synchronously and the @@ -330,11 +334,11 @@ module State # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. # # @see Lithic::Models::AuthRules::AuthRule#type module Type diff --git a/lib/lithic/models/auth_rules/auth_rule_version.rb b/lib/lithic/models/auth_rules/auth_rule_version.rb index 4bf970ef..1c27e21d 100644 --- a/lib/lithic/models/auth_rules/auth_rule_version.rb +++ b/lib/lithic/models/auth_rules/auth_rule_version.rb @@ -13,7 +13,7 @@ class AuthRuleVersion < Lithic::Internal::Type::BaseModel # @!attribute parameters # Parameters for the Auth Rule # - # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] + # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] required :parameters, union: -> { Lithic::AuthRules::AuthRuleVersion::Parameters } # @!attribute state @@ -37,7 +37,7 @@ class AuthRuleVersion < Lithic::Internal::Type::BaseModel # # @param created [Time] Timestamp of when this version was created. # - # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] Parameters for the Auth Rule + # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] Parameters for the Auth Rule # # @param state [Symbol, Lithic::Models::AuthRules::AuthRuleVersion::State] The current state of this version. # @@ -66,13 +66,15 @@ module Parameters variant -> { Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters } + variant -> { Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters } + # Parameters for defining a TypeScript code rule variant -> { Lithic::AuthRules::TypescriptCodeParameters } variant -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters } # @!method self.variants - # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters)] + # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters)] end # The current state of this version. diff --git a/lib/lithic/models/auth_rules/conditional_ach_payment_update_action_parameters.rb b/lib/lithic/models/auth_rules/conditional_ach_payment_update_action_parameters.rb new file mode 100644 index 00000000..ac6d21e0 --- /dev/null +++ b/lib/lithic/models/auth_rules/conditional_ach_payment_update_action_parameters.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +module Lithic + module Models + module AuthRules + class ConditionalACHPaymentUpdateActionParameters < Lithic::Internal::Type::BaseModel + # @!attribute action + # The action to take if the conditions are met. + # + # @return [Lithic::Models::AuthRules::ACHPaymentUpdateAction::TagAction, Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction] + required :action, union: -> { Lithic::AuthRules::ACHPaymentUpdateAction } + + # @!attribute conditions + # + # @return [Array] + required :conditions, + -> { Lithic::Internal::Type::ArrayOf[Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition] } + + # @!method initialize(action:, conditions:) + # @param action [Lithic::Models::AuthRules::ACHPaymentUpdateAction::TagAction, Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction] The action to take if the conditions are met. + # + # @param conditions [Array] + + class Condition < Lithic::Internal::Type::BaseModel + # @!attribute attribute + # The attribute to target. + # + # The following attributes may be targeted: + # + # - `TRANSACTION_AMOUNT`: The total amount of the ACH payment in minor units + # (cents), calculated as the sum of the settled and pending amounts. Use an + # integer value. + # - `SEC_CODE`: Standard Entry Class code indicating the type of ACH transaction. + # Valid values include PPD (Prearranged Payment and Deposit Entry), CCD + # (Corporate Credit or Debit Entry), WEB (Internet-Initiated/Mobile Entry), TEL + # (Telephone-Initiated Entry), and others. + # - `RETURN_REASON_CODE`: NACHA return reason code associated with the payment + # (for example, `R01`). + # - `ACCOUNT_AGE`: The age of the account in seconds at the time of the payment. + # Use an integer value. For programs where Lithic does not manage or retain + # account holder data, this attribute does not evaluate. + # - `EXTERNAL_BANK_ACCOUNT_AGE`: The age of the external bank account in seconds + # at the time of the payment. Use an integer value. + # - `EXTERNAL_BANK_ACCOUNT_VERIFICATION_METHOD`: The method used to verify the + # external bank account. Valid values are `MANUAL`, `MICRO_DEPOSIT`, `PRENOTE`, + # `EXTERNALLY_VERIFIED`, or `UNVERIFIED`. + # - `EXTERNAL_BANK_ACCOUNT_VERIFICATION_STATE`: The verification state of the + # external bank account. Valid values are `PENDING`, `ENABLED`, + # `FAILED_VERIFICATION`, or `INSUFFICIENT_FUNDS`. + # - `EXTERNAL_BANK_ACCOUNT_OWNER_TYPE`: The owner type of the external bank + # account. Valid values are `INDIVIDUAL` or `BUSINESS`. + # + # @return [Symbol, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition::Attribute] + required :attribute, + enum: -> { Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition::Attribute } + + # @!attribute operation + # The operation to apply to the attribute + # + # @return [Symbol, Lithic::Models::AuthRules::ConditionalOperation] + required :operation, enum: -> { Lithic::AuthRules::ConditionalOperation } + + # @!attribute value + # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` + # + # @return [String, Integer, Float, Array, Time] + required :value, union: -> { Lithic::AuthRules::ConditionalValue } + + # @!method initialize(attribute:, operation:, value:) + # Some parameter documentations has been truncated, see + # {Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition} + # for more details. + # + # @param attribute [Symbol, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition::Attribute] The attribute to target. + # + # @param operation [Symbol, Lithic::Models::AuthRules::ConditionalOperation] The operation to apply to the attribute + # + # @param value [String, Integer, Float, Array, Time] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` + + # The attribute to target. + # + # The following attributes may be targeted: + # + # - `TRANSACTION_AMOUNT`: The total amount of the ACH payment in minor units + # (cents), calculated as the sum of the settled and pending amounts. Use an + # integer value. + # - `SEC_CODE`: Standard Entry Class code indicating the type of ACH transaction. + # Valid values include PPD (Prearranged Payment and Deposit Entry), CCD + # (Corporate Credit or Debit Entry), WEB (Internet-Initiated/Mobile Entry), TEL + # (Telephone-Initiated Entry), and others. + # - `RETURN_REASON_CODE`: NACHA return reason code associated with the payment + # (for example, `R01`). + # - `ACCOUNT_AGE`: The age of the account in seconds at the time of the payment. + # Use an integer value. For programs where Lithic does not manage or retain + # account holder data, this attribute does not evaluate. + # - `EXTERNAL_BANK_ACCOUNT_AGE`: The age of the external bank account in seconds + # at the time of the payment. Use an integer value. + # - `EXTERNAL_BANK_ACCOUNT_VERIFICATION_METHOD`: The method used to verify the + # external bank account. Valid values are `MANUAL`, `MICRO_DEPOSIT`, `PRENOTE`, + # `EXTERNALLY_VERIFIED`, or `UNVERIFIED`. + # - `EXTERNAL_BANK_ACCOUNT_VERIFICATION_STATE`: The verification state of the + # external bank account. Valid values are `PENDING`, `ENABLED`, + # `FAILED_VERIFICATION`, or `INSUFFICIENT_FUNDS`. + # - `EXTERNAL_BANK_ACCOUNT_OWNER_TYPE`: The owner type of the external bank + # account. Valid values are `INDIVIDUAL` or `BUSINESS`. + # + # @see Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition#attribute + module Attribute + extend Lithic::Internal::Type::Enum + + TRANSACTION_AMOUNT = :TRANSACTION_AMOUNT + SEC_CODE = :SEC_CODE + RETURN_REASON_CODE = :RETURN_REASON_CODE + ACCOUNT_AGE = :ACCOUNT_AGE + EXTERNAL_BANK_ACCOUNT_AGE = :EXTERNAL_BANK_ACCOUNT_AGE + EXTERNAL_BANK_ACCOUNT_VERIFICATION_METHOD = :EXTERNAL_BANK_ACCOUNT_VERIFICATION_METHOD + EXTERNAL_BANK_ACCOUNT_VERIFICATION_STATE = :EXTERNAL_BANK_ACCOUNT_VERIFICATION_STATE + EXTERNAL_BANK_ACCOUNT_OWNER_TYPE = :EXTERNAL_BANK_ACCOUNT_OWNER_TYPE + + # @!method self.values + # @return [Array] + end + end + end + end + end +end diff --git a/lib/lithic/models/auth_rules/event_stream.rb b/lib/lithic/models/auth_rules/event_stream.rb index 8b9f023b..08295f0b 100644 --- a/lib/lithic/models/auth_rules/event_stream.rb +++ b/lib/lithic/models/auth_rules/event_stream.rb @@ -13,6 +13,7 @@ module EventStream ACH_CREDIT_RECEIPT = :ACH_CREDIT_RECEIPT ACH_DEBIT_RECEIPT = :ACH_DEBIT_RECEIPT CARD_TRANSACTION_UPDATE = :CARD_TRANSACTION_UPDATE + ACH_PAYMENT_UPDATE = :ACH_PAYMENT_UPDATE # @!method self.values # @return [Array] diff --git a/lib/lithic/models/auth_rules/rule_feature.rb b/lib/lithic/models/auth_rules/rule_feature.rb index c14f90c3..f771481d 100644 --- a/lib/lithic/models/auth_rules/rule_feature.rb +++ b/lib/lithic/models/auth_rules/rule_feature.rb @@ -17,11 +17,13 @@ module AuthRules # ACH_CREDIT_RECEIPT and ACH_DEBIT_RECEIPT event stream rules. # - `CARD_TRANSACTION`: The card transaction being evaluated. Only available for # CARD_TRANSACTION_UPDATE event stream rules. + # - `ACH_PAYMENT`: The ACH payment being evaluated. Only available for + # ACH_PAYMENT_UPDATE event stream rules. # - `CARD`: The card associated with the event. Available for AUTHORIZATION, # THREE_DS_AUTHENTICATION, and CARD_TRANSACTION_UPDATE event stream rules. - # - `ACCOUNT_HOLDER`: The account holder associated with the card. Available for - # AUTHORIZATION, THREE_DS_AUTHENTICATION, and CARD_TRANSACTION_UPDATE event - # stream rules. + # - `ACCOUNT_HOLDER`: The account holder associated with the event. Available for + # AUTHORIZATION, THREE_DS_AUTHENTICATION, CARD_TRANSACTION_UPDATE, and + # ACH_PAYMENT_UPDATE event stream rules. # - `IP_METADATA`: IP address metadata for the request. Available for # THREE_DS_AUTHENTICATION event stream rules. # - `SPEND_VELOCITY`: Spend velocity data for the card or account. Requires @@ -44,6 +46,8 @@ module RuleFeature variant -> { Lithic::AuthRules::RuleFeature::CardTransactionFeature } + variant -> { Lithic::AuthRules::RuleFeature::ACHPaymentFeature } + variant -> { Lithic::AuthRules::RuleFeature::CardFeature } variant -> { Lithic::AuthRules::RuleFeature::AccountHolderFeature } @@ -144,6 +148,24 @@ class CardTransactionFeature < Lithic::Internal::Type::BaseModel # @param type [Symbol, :CARD_TRANSACTION] end + class ACHPaymentFeature < Lithic::Internal::Type::BaseModel + # @!attribute type + # + # @return [Symbol, :ACH_PAYMENT] + required :type, const: :ACH_PAYMENT + + # @!attribute name + # The variable name for this feature in the rule function signature + # + # @return [String, nil] + optional :name, String + + # @!method initialize(name: nil, type: :ACH_PAYMENT) + # @param name [String] The variable name for this feature in the rule function signature + # + # @param type [Symbol, :ACH_PAYMENT] + end + class CardFeature < Lithic::Internal::Type::BaseModel # @!attribute type # @@ -293,7 +315,7 @@ module Scope end # @!method self.variants - # @return [Array(Lithic::Models::AuthRules::RuleFeature::AuthorizationFeature, Lithic::Models::AuthRules::RuleFeature::AuthenticationFeature, Lithic::Models::AuthRules::RuleFeature::TokenizationFeature, Lithic::Models::AuthRules::RuleFeature::ACHReceiptFeature, Lithic::Models::AuthRules::RuleFeature::CardTransactionFeature, Lithic::Models::AuthRules::RuleFeature::CardFeature, Lithic::Models::AuthRules::RuleFeature::AccountHolderFeature, Lithic::Models::AuthRules::RuleFeature::IPMetadataFeature, Lithic::Models::AuthRules::RuleFeature::SpendVelocityFeature, Lithic::Models::AuthRules::RuleFeature::TransactionHistorySignalsFeature)] + # @return [Array(Lithic::Models::AuthRules::RuleFeature::AuthorizationFeature, Lithic::Models::AuthRules::RuleFeature::AuthenticationFeature, Lithic::Models::AuthRules::RuleFeature::TokenizationFeature, Lithic::Models::AuthRules::RuleFeature::ACHReceiptFeature, Lithic::Models::AuthRules::RuleFeature::CardTransactionFeature, Lithic::Models::AuthRules::RuleFeature::ACHPaymentFeature, Lithic::Models::AuthRules::RuleFeature::CardFeature, Lithic::Models::AuthRules::RuleFeature::AccountHolderFeature, Lithic::Models::AuthRules::RuleFeature::IPMetadataFeature, Lithic::Models::AuthRules::RuleFeature::SpendVelocityFeature, Lithic::Models::AuthRules::RuleFeature::TransactionHistorySignalsFeature)] end end end diff --git a/lib/lithic/models/auth_rules/typescript_code_parameters.rb b/lib/lithic/models/auth_rules/typescript_code_parameters.rb index f490923a..f2ea530c 100644 --- a/lib/lithic/models/auth_rules/typescript_code_parameters.rb +++ b/lib/lithic/models/auth_rules/typescript_code_parameters.rb @@ -15,7 +15,7 @@ class TypescriptCodeParameters < Lithic::Internal::Type::BaseModel # @!attribute features # Features available to the TypeScript code at evaluation time # - # @return [Array] + # @return [Array] required :features, -> { Lithic::Internal::Type::ArrayOf[union: Lithic::AuthRules::RuleFeature] } # @!method initialize(code:, features:) @@ -26,7 +26,7 @@ class TypescriptCodeParameters < Lithic::Internal::Type::BaseModel # # @param code [String] The TypeScript source code of the rule. Must define a `rule()` function that acc # - # @param features [Array] Features available to the TypeScript code at evaluation time + # @param features [Array] Features available to the TypeScript code at evaluation time end end end diff --git a/lib/lithic/models/auth_rules/v2_create_params.rb b/lib/lithic/models/auth_rules/v2_create_params.rb index 7486510b..26be59f5 100644 --- a/lib/lithic/models/auth_rules/v2_create_params.rb +++ b/lib/lithic/models/auth_rules/v2_create_params.rb @@ -30,7 +30,7 @@ class AccountLevelRule < Lithic::Internal::Type::BaseModel # @!attribute parameters # Parameters for the Auth Rule # - # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] + # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] required :parameters, union: -> { Lithic::AuthRules::V2CreateParams::Body::AccountLevelRule::Parameters } # @!attribute type @@ -44,11 +44,11 @@ class AccountLevelRule < Lithic::Internal::Type::BaseModel # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. # # @return [Symbol, Lithic::Models::AuthRules::V2CreateParams::Body::AccountLevelRule::Type] required :type, enum: -> { Lithic::AuthRules::V2CreateParams::Body::AccountLevelRule::Type } @@ -82,7 +82,7 @@ class AccountLevelRule < Lithic::Internal::Type::BaseModel # {Lithic::Models::AuthRules::V2CreateParams::Body::AccountLevelRule} for more # details. # - # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] Parameters for the Auth Rule + # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] Parameters for the Auth Rule # # @param type [Symbol, Lithic::Models::AuthRules::V2CreateParams::Body::AccountLevelRule::Type] The type of Auth Rule. For certain rule types, this determines the event stream # @@ -117,13 +117,15 @@ module Parameters variant -> { Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters } + variant -> { Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters } + # Parameters for defining a TypeScript code rule variant -> { Lithic::AuthRules::TypescriptCodeParameters } variant -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters } # @!method self.variants - # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters)] + # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters)] end # The type of Auth Rule. For certain rule types, this determines the event stream @@ -136,11 +138,11 @@ module Parameters # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. # # @see Lithic::Models::AuthRules::V2CreateParams::Body::AccountLevelRule#type module Type @@ -167,7 +169,7 @@ class CardLevelRule < Lithic::Internal::Type::BaseModel # @!attribute parameters # Parameters for the Auth Rule # - # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] + # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] required :parameters, union: -> { Lithic::AuthRules::V2CreateParams::Body::CardLevelRule::Parameters } # @!attribute type @@ -181,11 +183,11 @@ class CardLevelRule < Lithic::Internal::Type::BaseModel # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. # # @return [Symbol, Lithic::Models::AuthRules::V2CreateParams::Body::CardLevelRule::Type] required :type, enum: -> { Lithic::AuthRules::V2CreateParams::Body::CardLevelRule::Type } @@ -209,7 +211,7 @@ class CardLevelRule < Lithic::Internal::Type::BaseModel # # @param card_tokens [Array] Card tokens to which the Auth Rule applies. # - # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] Parameters for the Auth Rule + # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] Parameters for the Auth Rule # # @param type [Symbol, Lithic::Models::AuthRules::V2CreateParams::Body::CardLevelRule::Type] The type of Auth Rule. For certain rule types, this determines the event stream # @@ -240,13 +242,15 @@ module Parameters variant -> { Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters } + variant -> { Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters } + # Parameters for defining a TypeScript code rule variant -> { Lithic::AuthRules::TypescriptCodeParameters } variant -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters } # @!method self.variants - # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters)] + # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters)] end # The type of Auth Rule. For certain rule types, this determines the event stream @@ -259,11 +263,11 @@ module Parameters # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. # # @see Lithic::Models::AuthRules::V2CreateParams::Body::CardLevelRule#type module Type @@ -284,7 +288,7 @@ class ProgramLevelRule < Lithic::Internal::Type::BaseModel # @!attribute parameters # Parameters for the Auth Rule # - # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] + # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] required :parameters, union: -> { Lithic::AuthRules::V2CreateParams::Body::ProgramLevelRule::Parameters } # @!attribute program_level @@ -304,11 +308,11 @@ class ProgramLevelRule < Lithic::Internal::Type::BaseModel # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. # # @return [Symbol, Lithic::Models::AuthRules::V2CreateParams::Body::ProgramLevelRule::Type] required :type, enum: -> { Lithic::AuthRules::V2CreateParams::Body::ProgramLevelRule::Type } @@ -348,7 +352,7 @@ class ProgramLevelRule < Lithic::Internal::Type::BaseModel # {Lithic::Models::AuthRules::V2CreateParams::Body::ProgramLevelRule} for more # details. # - # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] Parameters for the Auth Rule + # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] Parameters for the Auth Rule # # @param program_level [Boolean] Whether the Auth Rule applies to all authorizations on the card program. # @@ -387,13 +391,15 @@ module Parameters variant -> { Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters } + variant -> { Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters } + # Parameters for defining a TypeScript code rule variant -> { Lithic::AuthRules::TypescriptCodeParameters } variant -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters } # @!method self.variants - # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters)] + # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters)] end # The type of Auth Rule. For certain rule types, this determines the event stream @@ -406,11 +412,11 @@ module Parameters # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. # # @see Lithic::Models::AuthRules::V2CreateParams::Body::ProgramLevelRule#type module Type diff --git a/lib/lithic/models/auth_rules/v2_draft_params.rb b/lib/lithic/models/auth_rules/v2_draft_params.rb index 12ea00a4..6cad55ff 100644 --- a/lib/lithic/models/auth_rules/v2_draft_params.rb +++ b/lib/lithic/models/auth_rules/v2_draft_params.rb @@ -16,13 +16,13 @@ class V2DraftParams < Lithic::Internal::Type::BaseModel # @!attribute parameters # Parameters for the Auth Rule # - # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters, nil] + # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters, nil] optional :parameters, union: -> { Lithic::AuthRules::V2DraftParams::Parameters }, nil?: true # @!method initialize(auth_rule_token:, parameters: nil, request_options: {}) # @param auth_rule_token [String] # - # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters, nil] Parameters for the Auth Rule + # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters, nil] Parameters for the Auth Rule # # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] @@ -47,13 +47,15 @@ module Parameters variant -> { Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters } + variant -> { Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters } + # Parameters for defining a TypeScript code rule variant -> { Lithic::AuthRules::TypescriptCodeParameters } variant -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters } # @!method self.variants - # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters)] + # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters)] end end end diff --git a/lib/lithic/models/auth_rules/v2_list_results_response.rb b/lib/lithic/models/auth_rules/v2_list_results_response.rb index 0afce322..7c4bf805 100644 --- a/lib/lithic/models/auth_rules/v2_list_results_response.rb +++ b/lib/lithic/models/auth_rules/v2_list_results_response.rb @@ -17,6 +17,10 @@ module V2ListResultsResponse variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult } + variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult } + + variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult } + class AuthorizationResult < Lithic::Internal::Type::BaseModel # @!attribute token # Globally unique identifier for the evaluation @@ -880,8 +884,429 @@ module Mode end end + class CardTransactionUpdateResult < Lithic::Internal::Type::BaseModel + # @!attribute token + # Globally unique identifier for the evaluation + # + # @return [String] + required :token, String + + # @!attribute actions + # Actions returned by the rule evaluation + # + # @return [Array] + required :actions, + -> { Lithic::Internal::Type::ArrayOf[union: Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action] } + + # @!attribute auth_rule_token + # The Auth Rule token + # + # @return [String] + required :auth_rule_token, String + + # @!attribute evaluation_time + # Timestamp of the rule evaluation + # + # @return [Time] + required :evaluation_time, Time + + # @!attribute event_stream + # The event stream during which the rule was evaluated + # + # @return [Symbol, :CARD_TRANSACTION_UPDATE] + required :event_stream, const: :CARD_TRANSACTION_UPDATE + + # @!attribute event_token + # Token of the event that triggered the evaluation + # + # @return [String] + required :event_token, String + + # @!attribute mode + # The state of the Auth Rule + # + # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Mode] + required :mode, + enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Mode } + + # @!attribute rule_version + # Version of the rule that was evaluated + # + # @return [Integer] + required :rule_version, Integer + + # @!attribute transaction_token + # The token of the transaction that triggered the rule evaluation + # + # @return [String, nil] + required :transaction_token, String, nil?: true + + # @!method initialize(token:, actions:, auth_rule_token:, evaluation_time:, event_token:, mode:, rule_version:, transaction_token:, event_stream: :CARD_TRANSACTION_UPDATE) + # @param token [String] Globally unique identifier for the evaluation + # + # @param actions [Array] Actions returned by the rule evaluation + # + # @param auth_rule_token [String] The Auth Rule token + # + # @param evaluation_time [Time] Timestamp of the rule evaluation + # + # @param event_token [String] Token of the event that triggered the evaluation + # + # @param mode [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Mode] The state of the Auth Rule + # + # @param rule_version [Integer] Version of the rule that was evaluated + # + # @param transaction_token [String, nil] The token of the transaction that triggered the rule evaluation + # + # @param event_stream [Symbol, :CARD_TRANSACTION_UPDATE] The event stream during which the rule was evaluated + + module Action + extend Lithic::Internal::Type::Union + + variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::TagAction } + + variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction } + + class TagAction < Lithic::Internal::Type::BaseModel + # @!attribute key + # The key of the tag to apply to the transaction + # + # @return [String] + required :key, String + + # @!attribute type + # Tag the transaction with key-value metadata + # + # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::TagAction::Type] + required :type, + enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::TagAction::Type } + + # @!attribute value + # The value of the tag to apply to the transaction + # + # @return [String] + required :value, String + + # @!attribute explanation + # Optional explanation for why this action was taken + # + # @return [String, nil] + optional :explanation, String + + # @!method initialize(key:, type:, value:, explanation: nil) + # @param key [String] The key of the tag to apply to the transaction + # + # @param type [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::TagAction::Type] Tag the transaction with key-value metadata + # + # @param value [String] The value of the tag to apply to the transaction + # + # @param explanation [String] Optional explanation for why this action was taken + + # Tag the transaction with key-value metadata + # + # @see Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::TagAction#type + module Type + extend Lithic::Internal::Type::Enum + + TAG = :TAG + + # @!method self.values + # @return [Array] + end + end + + class CreateCaseAction < Lithic::Internal::Type::BaseModel + # @!attribute queue_token + # The token of the queue to create the case in + # + # @return [String] + required :queue_token, String + + # @!attribute scope + # The scope of the case to create + # + # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::Scope] + required :scope, + enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::Scope } + + # @!attribute type + # Create a case for the transaction + # + # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::Type] + required :type, + enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::Type } + + # @!attribute explanation + # Optional explanation for why this action was taken + # + # @return [String, nil] + optional :explanation, String + + # @!method initialize(queue_token:, scope:, type:, explanation: nil) + # @param queue_token [String] The token of the queue to create the case in + # + # @param scope [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::Scope] The scope of the case to create + # + # @param type [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::Type] Create a case for the transaction + # + # @param explanation [String] Optional explanation for why this action was taken + + # The scope of the case to create + # + # @see Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction#scope + module Scope + extend Lithic::Internal::Type::Enum + + CARD = :CARD + ACCOUNT = :ACCOUNT + + # @!method self.values + # @return [Array] + end + + # Create a case for the transaction + # + # @see Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction#type + module Type + extend Lithic::Internal::Type::Enum + + CREATE_CASE = :CREATE_CASE + + # @!method self.values + # @return [Array] + end + end + + # @!method self.variants + # @return [Array(Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::TagAction, Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction)] + end + + # The state of the Auth Rule + # + # @see Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult#mode + module Mode + extend Lithic::Internal::Type::Enum + + ACTIVE = :ACTIVE + INACTIVE = :INACTIVE + + # @!method self.values + # @return [Array] + end + end + + class ACHPaymentUpdateResult < Lithic::Internal::Type::BaseModel + # @!attribute token + # Globally unique identifier for the evaluation + # + # @return [String] + required :token, String + + # @!attribute actions + # Actions returned by the rule evaluation + # + # @return [Array] + required :actions, + -> { Lithic::Internal::Type::ArrayOf[union: Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action] } + + # @!attribute auth_rule_token + # The Auth Rule token + # + # @return [String] + required :auth_rule_token, String + + # @!attribute evaluation_time + # Timestamp of the rule evaluation + # + # @return [Time] + required :evaluation_time, Time + + # @!attribute event_stream + # The event stream during which the rule was evaluated + # + # @return [Symbol, :ACH_PAYMENT_UPDATE] + required :event_stream, const: :ACH_PAYMENT_UPDATE + + # @!attribute event_token + # Token of the event that triggered the evaluation + # + # @return [String] + required :event_token, String + + # @!attribute mode + # The state of the Auth Rule + # + # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Mode] + required :mode, + enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Mode } + + # @!attribute rule_version + # Version of the rule that was evaluated + # + # @return [Integer] + required :rule_version, Integer + + # @!attribute transaction_token + # The token of the transaction that triggered the rule evaluation + # + # @return [String, nil] + required :transaction_token, String, nil?: true + + # @!method initialize(token:, actions:, auth_rule_token:, evaluation_time:, event_token:, mode:, rule_version:, transaction_token:, event_stream: :ACH_PAYMENT_UPDATE) + # @param token [String] Globally unique identifier for the evaluation + # + # @param actions [Array] Actions returned by the rule evaluation + # + # @param auth_rule_token [String] The Auth Rule token + # + # @param evaluation_time [Time] Timestamp of the rule evaluation + # + # @param event_token [String] Token of the event that triggered the evaluation + # + # @param mode [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Mode] The state of the Auth Rule + # + # @param rule_version [Integer] Version of the rule that was evaluated + # + # @param transaction_token [String, nil] The token of the transaction that triggered the rule evaluation + # + # @param event_stream [Symbol, :ACH_PAYMENT_UPDATE] The event stream during which the rule was evaluated + + module Action + extend Lithic::Internal::Type::Union + + variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::TagAction } + + variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction } + + class TagAction < Lithic::Internal::Type::BaseModel + # @!attribute key + # The key of the tag to apply to the payment + # + # @return [String] + required :key, String + + # @!attribute type + # Tag the payment with key-value metadata + # + # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::TagAction::Type] + required :type, + enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::TagAction::Type } + + # @!attribute value + # The value of the tag to apply to the payment + # + # @return [String] + required :value, String + + # @!attribute explanation + # Optional explanation for why this action was taken + # + # @return [String, nil] + optional :explanation, String + + # @!method initialize(key:, type:, value:, explanation: nil) + # @param key [String] The key of the tag to apply to the payment + # + # @param type [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::TagAction::Type] Tag the payment with key-value metadata + # + # @param value [String] The value of the tag to apply to the payment + # + # @param explanation [String] Optional explanation for why this action was taken + + # Tag the payment with key-value metadata + # + # @see Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::TagAction#type + module Type + extend Lithic::Internal::Type::Enum + + TAG = :TAG + + # @!method self.values + # @return [Array] + end + end + + class CreateCaseAction < Lithic::Internal::Type::BaseModel + # @!attribute queue_token + # The token of the queue to create the case in + # + # @return [String] + required :queue_token, String + + # @!attribute scope + # The scope of the case to create + # + # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::Scope] + required :scope, + enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::Scope } + + # @!attribute type + # Create a case for the payment + # + # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::Type] + required :type, + enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::Type } + + # @!attribute explanation + # Optional explanation for why this action was taken + # + # @return [String, nil] + optional :explanation, String + + # @!method initialize(queue_token:, scope:, type:, explanation: nil) + # @param queue_token [String] The token of the queue to create the case in + # + # @param scope [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::Scope] The scope of the case to create + # + # @param type [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::Type] Create a case for the payment + # + # @param explanation [String] Optional explanation for why this action was taken + + # The scope of the case to create + # + # @see Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction#scope + module Scope + extend Lithic::Internal::Type::Enum + + FINANCIAL_ACCOUNT = :FINANCIAL_ACCOUNT + + # @!method self.values + # @return [Array] + end + + # Create a case for the payment + # + # @see Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction#type + module Type + extend Lithic::Internal::Type::Enum + + CREATE_CASE = :CREATE_CASE + + # @!method self.values + # @return [Array] + end + end + + # @!method self.variants + # @return [Array(Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::TagAction, Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction)] + end + + # The state of the Auth Rule + # + # @see Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult#mode + module Mode + extend Lithic::Internal::Type::Enum + + ACTIVE = :ACTIVE + INACTIVE = :INACTIVE + + # @!method self.values + # @return [Array] + end + end + # @!method self.variants - # @return [Array(Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult, Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult)] + # @return [Array(Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult, Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult, Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult, Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult)] end end end diff --git a/lib/lithic/resources/auth_rules/v2.rb b/lib/lithic/resources/auth_rules/v2.rb index c397a1d3..9774c816 100644 --- a/lib/lithic/resources/auth_rules/v2.rb +++ b/lib/lithic/resources/auth_rules/v2.rb @@ -144,7 +144,7 @@ def delete(auth_rule_token, params = {}) # # @param auth_rule_token [String] # - # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters, nil] Parameters for the Auth Rule + # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters, nil] Parameters for the Auth Rule # # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -193,7 +193,7 @@ def draft(auth_rule_token, params = {}) # # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Lithic::Internal::CursorPage] + # @return [Lithic::Internal::CursorPage] # # @see Lithic::Models::AuthRules::V2ListResultsParams def list_results(params = {}) diff --git a/lib/lithic/version.rb b/lib/lithic/version.rb index 2f7f1028..cc48d967 100644 --- a/lib/lithic/version.rb +++ b/lib/lithic/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Lithic - VERSION = "0.16.0" + VERSION = "0.17.0" end diff --git a/rbi/lithic/models/auth_rules/ach_payment_update_action.rbi b/rbi/lithic/models/auth_rules/ach_payment_update_action.rbi new file mode 100644 index 00000000..acb88ec5 --- /dev/null +++ b/rbi/lithic/models/auth_rules/ach_payment_update_action.rbi @@ -0,0 +1,237 @@ +# typed: strong + +module Lithic + module Models + module AuthRules + module ACHPaymentUpdateAction + extend Lithic::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Lithic::AuthRules::ACHPaymentUpdateAction::TagAction, + Lithic::AuthRules::ACHPaymentUpdateAction::CreateCaseAction + ) + end + + class TagAction < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::ACHPaymentUpdateAction::TagAction, + Lithic::Internal::AnyHash + ) + end + + # The key of the tag to apply to the payment + sig { returns(String) } + attr_accessor :key + + # Tag the payment with key-value metadata + sig do + returns( + Lithic::AuthRules::ACHPaymentUpdateAction::TagAction::Type::OrSymbol + ) + end + attr_accessor :type + + # The value of the tag to apply to the payment + sig { returns(String) } + attr_accessor :value + + sig do + params( + key: String, + type: + Lithic::AuthRules::ACHPaymentUpdateAction::TagAction::Type::OrSymbol, + value: String + ).returns(T.attached_class) + end + def self.new( + # The key of the tag to apply to the payment + key:, + # Tag the payment with key-value metadata + type:, + # The value of the tag to apply to the payment + value: + ) + end + + sig do + override.returns( + { + key: String, + type: + Lithic::AuthRules::ACHPaymentUpdateAction::TagAction::Type::OrSymbol, + value: String + } + ) + end + def to_hash + end + + # Tag the payment with key-value metadata + module Type + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::AuthRules::ACHPaymentUpdateAction::TagAction::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TAG = + T.let( + :TAG, + Lithic::AuthRules::ACHPaymentUpdateAction::TagAction::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::AuthRules::ACHPaymentUpdateAction::TagAction::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class CreateCaseAction < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::ACHPaymentUpdateAction::CreateCaseAction, + Lithic::Internal::AnyHash + ) + end + + # The token of the queue to create the case in + sig { returns(String) } + attr_accessor :queue_token + + # The scope of the case to create + sig do + returns( + Lithic::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::Scope::OrSymbol + ) + end + attr_accessor :scope + + # Create a case for the payment + sig do + returns( + Lithic::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::Type::OrSymbol + ) + end + attr_accessor :type + + sig do + params( + queue_token: String, + scope: + Lithic::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::Scope::OrSymbol, + type: + Lithic::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # The token of the queue to create the case in + queue_token:, + # The scope of the case to create + scope:, + # Create a case for the payment + type: + ) + end + + sig do + override.returns( + { + queue_token: String, + scope: + Lithic::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::Scope::OrSymbol, + type: + Lithic::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::Type::OrSymbol + } + ) + end + def to_hash + end + + # The scope of the case to create + module Scope + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::Scope + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + FINANCIAL_ACCOUNT = + T.let( + :FINANCIAL_ACCOUNT, + Lithic::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::Scope::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::Scope::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Create a case for the payment + module Type + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CREATE_CASE = + T.let( + :CREATE_CASE, + Lithic::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + sig do + override.returns( + T::Array[Lithic::AuthRules::ACHPaymentUpdateAction::Variants] + ) + end + def self.variants + end + end + end + end +end diff --git a/rbi/lithic/models/auth_rules/auth_rule.rbi b/rbi/lithic/models/auth_rules/auth_rule.rbi index fe9b330e..c7ec1192 100644 --- a/rbi/lithic/models/auth_rules/auth_rule.rbi +++ b/rbi/lithic/models/auth_rules/auth_rule.rbi @@ -80,11 +80,11 @@ module Lithic # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. sig { returns(Lithic::AuthRules::AuthRule::Type::TaggedSymbol) } attr_accessor :type @@ -162,11 +162,11 @@ module Lithic # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. type:, # Account tokens to which the Auth Rule does not apply. excluded_account_tokens: nil, @@ -237,6 +237,7 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters::OrHash, Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::OrHash, Lithic::AuthRules::TypescriptCodeParameters::OrHash, Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::OrHash ), @@ -279,6 +280,7 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters, Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ) @@ -353,6 +355,7 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters::OrHash, Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::OrHash, Lithic::AuthRules::TypescriptCodeParameters::OrHash, Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::OrHash ), @@ -413,6 +416,7 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters, Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ) @@ -508,11 +512,11 @@ module Lithic # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. module Type extend Lithic::Internal::Type::Enum diff --git a/rbi/lithic/models/auth_rules/auth_rule_version.rbi b/rbi/lithic/models/auth_rules/auth_rule_version.rbi index 639cf1e1..37a6993d 100644 --- a/rbi/lithic/models/auth_rules/auth_rule_version.rbi +++ b/rbi/lithic/models/auth_rules/auth_rule_version.rbi @@ -43,6 +43,7 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters::OrHash, Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::OrHash, Lithic::AuthRules::TypescriptCodeParameters::OrHash, Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::OrHash ), @@ -92,6 +93,7 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters, Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ) diff --git a/rbi/lithic/models/auth_rules/conditional_ach_payment_update_action_parameters.rbi b/rbi/lithic/models/auth_rules/conditional_ach_payment_update_action_parameters.rbi new file mode 100644 index 00000000..38a97114 --- /dev/null +++ b/rbi/lithic/models/auth_rules/conditional_ach_payment_update_action_parameters.rbi @@ -0,0 +1,272 @@ +# typed: strong + +module Lithic + module Models + module AuthRules + class ConditionalACHPaymentUpdateActionParameters < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters, + Lithic::Internal::AnyHash + ) + end + + # The action to take if the conditions are met. + sig do + returns( + T.any( + Lithic::AuthRules::ACHPaymentUpdateAction::TagAction, + Lithic::AuthRules::ACHPaymentUpdateAction::CreateCaseAction + ) + ) + end + attr_accessor :action + + sig do + returns( + T::Array[ + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition + ] + ) + end + attr_accessor :conditions + + sig do + params( + action: + T.any( + Lithic::AuthRules::ACHPaymentUpdateAction::TagAction::OrHash, + Lithic::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::OrHash + ), + conditions: + T::Array[ + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # The action to take if the conditions are met. + action:, + conditions: + ) + end + + sig do + override.returns( + { + action: + T.any( + Lithic::AuthRules::ACHPaymentUpdateAction::TagAction, + Lithic::AuthRules::ACHPaymentUpdateAction::CreateCaseAction + ), + conditions: + T::Array[ + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition + ] + } + ) + end + def to_hash + end + + class Condition < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition, + Lithic::Internal::AnyHash + ) + end + + # The attribute to target. + # + # The following attributes may be targeted: + # + # - `TRANSACTION_AMOUNT`: The total amount of the ACH payment in minor units + # (cents), calculated as the sum of the settled and pending amounts. Use an + # integer value. + # - `SEC_CODE`: Standard Entry Class code indicating the type of ACH transaction. + # Valid values include PPD (Prearranged Payment and Deposit Entry), CCD + # (Corporate Credit or Debit Entry), WEB (Internet-Initiated/Mobile Entry), TEL + # (Telephone-Initiated Entry), and others. + # - `RETURN_REASON_CODE`: NACHA return reason code associated with the payment + # (for example, `R01`). + # - `ACCOUNT_AGE`: The age of the account in seconds at the time of the payment. + # Use an integer value. For programs where Lithic does not manage or retain + # account holder data, this attribute does not evaluate. + # - `EXTERNAL_BANK_ACCOUNT_AGE`: The age of the external bank account in seconds + # at the time of the payment. Use an integer value. + # - `EXTERNAL_BANK_ACCOUNT_VERIFICATION_METHOD`: The method used to verify the + # external bank account. Valid values are `MANUAL`, `MICRO_DEPOSIT`, `PRENOTE`, + # `EXTERNALLY_VERIFIED`, or `UNVERIFIED`. + # - `EXTERNAL_BANK_ACCOUNT_VERIFICATION_STATE`: The verification state of the + # external bank account. Valid values are `PENDING`, `ENABLED`, + # `FAILED_VERIFICATION`, or `INSUFFICIENT_FUNDS`. + # - `EXTERNAL_BANK_ACCOUNT_OWNER_TYPE`: The owner type of the external bank + # account. Valid values are `INDIVIDUAL` or `BUSINESS`. + sig do + returns( + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition::Attribute::OrSymbol + ) + end + attr_accessor :attribute + + # The operation to apply to the attribute + sig { returns(Lithic::AuthRules::ConditionalOperation::OrSymbol) } + attr_accessor :operation + + # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` + sig { returns(Lithic::AuthRules::ConditionalValue::Variants) } + attr_accessor :value + + sig do + params( + attribute: + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition::Attribute::OrSymbol, + operation: Lithic::AuthRules::ConditionalOperation::OrSymbol, + value: Lithic::AuthRules::ConditionalValue::Variants + ).returns(T.attached_class) + end + def self.new( + # The attribute to target. + # + # The following attributes may be targeted: + # + # - `TRANSACTION_AMOUNT`: The total amount of the ACH payment in minor units + # (cents), calculated as the sum of the settled and pending amounts. Use an + # integer value. + # - `SEC_CODE`: Standard Entry Class code indicating the type of ACH transaction. + # Valid values include PPD (Prearranged Payment and Deposit Entry), CCD + # (Corporate Credit or Debit Entry), WEB (Internet-Initiated/Mobile Entry), TEL + # (Telephone-Initiated Entry), and others. + # - `RETURN_REASON_CODE`: NACHA return reason code associated with the payment + # (for example, `R01`). + # - `ACCOUNT_AGE`: The age of the account in seconds at the time of the payment. + # Use an integer value. For programs where Lithic does not manage or retain + # account holder data, this attribute does not evaluate. + # - `EXTERNAL_BANK_ACCOUNT_AGE`: The age of the external bank account in seconds + # at the time of the payment. Use an integer value. + # - `EXTERNAL_BANK_ACCOUNT_VERIFICATION_METHOD`: The method used to verify the + # external bank account. Valid values are `MANUAL`, `MICRO_DEPOSIT`, `PRENOTE`, + # `EXTERNALLY_VERIFIED`, or `UNVERIFIED`. + # - `EXTERNAL_BANK_ACCOUNT_VERIFICATION_STATE`: The verification state of the + # external bank account. Valid values are `PENDING`, `ENABLED`, + # `FAILED_VERIFICATION`, or `INSUFFICIENT_FUNDS`. + # - `EXTERNAL_BANK_ACCOUNT_OWNER_TYPE`: The owner type of the external bank + # account. Valid values are `INDIVIDUAL` or `BUSINESS`. + attribute:, + # The operation to apply to the attribute + operation:, + # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` + value: + ) + end + + sig do + override.returns( + { + attribute: + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition::Attribute::OrSymbol, + operation: Lithic::AuthRules::ConditionalOperation::OrSymbol, + value: Lithic::AuthRules::ConditionalValue::Variants + } + ) + end + def to_hash + end + + # The attribute to target. + # + # The following attributes may be targeted: + # + # - `TRANSACTION_AMOUNT`: The total amount of the ACH payment in minor units + # (cents), calculated as the sum of the settled and pending amounts. Use an + # integer value. + # - `SEC_CODE`: Standard Entry Class code indicating the type of ACH transaction. + # Valid values include PPD (Prearranged Payment and Deposit Entry), CCD + # (Corporate Credit or Debit Entry), WEB (Internet-Initiated/Mobile Entry), TEL + # (Telephone-Initiated Entry), and others. + # - `RETURN_REASON_CODE`: NACHA return reason code associated with the payment + # (for example, `R01`). + # - `ACCOUNT_AGE`: The age of the account in seconds at the time of the payment. + # Use an integer value. For programs where Lithic does not manage or retain + # account holder data, this attribute does not evaluate. + # - `EXTERNAL_BANK_ACCOUNT_AGE`: The age of the external bank account in seconds + # at the time of the payment. Use an integer value. + # - `EXTERNAL_BANK_ACCOUNT_VERIFICATION_METHOD`: The method used to verify the + # external bank account. Valid values are `MANUAL`, `MICRO_DEPOSIT`, `PRENOTE`, + # `EXTERNALLY_VERIFIED`, or `UNVERIFIED`. + # - `EXTERNAL_BANK_ACCOUNT_VERIFICATION_STATE`: The verification state of the + # external bank account. Valid values are `PENDING`, `ENABLED`, + # `FAILED_VERIFICATION`, or `INSUFFICIENT_FUNDS`. + # - `EXTERNAL_BANK_ACCOUNT_OWNER_TYPE`: The owner type of the external bank + # account. Valid values are `INDIVIDUAL` or `BUSINESS`. + module Attribute + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition::Attribute + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TRANSACTION_AMOUNT = + T.let( + :TRANSACTION_AMOUNT, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition::Attribute::TaggedSymbol + ) + SEC_CODE = + T.let( + :SEC_CODE, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition::Attribute::TaggedSymbol + ) + RETURN_REASON_CODE = + T.let( + :RETURN_REASON_CODE, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition::Attribute::TaggedSymbol + ) + ACCOUNT_AGE = + T.let( + :ACCOUNT_AGE, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition::Attribute::TaggedSymbol + ) + EXTERNAL_BANK_ACCOUNT_AGE = + T.let( + :EXTERNAL_BANK_ACCOUNT_AGE, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition::Attribute::TaggedSymbol + ) + EXTERNAL_BANK_ACCOUNT_VERIFICATION_METHOD = + T.let( + :EXTERNAL_BANK_ACCOUNT_VERIFICATION_METHOD, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition::Attribute::TaggedSymbol + ) + EXTERNAL_BANK_ACCOUNT_VERIFICATION_STATE = + T.let( + :EXTERNAL_BANK_ACCOUNT_VERIFICATION_STATE, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition::Attribute::TaggedSymbol + ) + EXTERNAL_BANK_ACCOUNT_OWNER_TYPE = + T.let( + :EXTERNAL_BANK_ACCOUNT_OWNER_TYPE, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition::Attribute::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition::Attribute::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + end + end +end diff --git a/rbi/lithic/models/auth_rules/event_stream.rbi b/rbi/lithic/models/auth_rules/event_stream.rbi index d86de88c..0cea114a 100644 --- a/rbi/lithic/models/auth_rules/event_stream.rbi +++ b/rbi/lithic/models/auth_rules/event_stream.rbi @@ -35,6 +35,11 @@ module Lithic :CARD_TRANSACTION_UPDATE, Lithic::AuthRules::EventStream::TaggedSymbol ) + ACH_PAYMENT_UPDATE = + T.let( + :ACH_PAYMENT_UPDATE, + Lithic::AuthRules::EventStream::TaggedSymbol + ) sig do override.returns( diff --git a/rbi/lithic/models/auth_rules/rule_feature.rbi b/rbi/lithic/models/auth_rules/rule_feature.rbi index 6a405e6f..3ddc0f37 100644 --- a/rbi/lithic/models/auth_rules/rule_feature.rbi +++ b/rbi/lithic/models/auth_rules/rule_feature.rbi @@ -17,11 +17,13 @@ module Lithic # ACH_CREDIT_RECEIPT and ACH_DEBIT_RECEIPT event stream rules. # - `CARD_TRANSACTION`: The card transaction being evaluated. Only available for # CARD_TRANSACTION_UPDATE event stream rules. + # - `ACH_PAYMENT`: The ACH payment being evaluated. Only available for + # ACH_PAYMENT_UPDATE event stream rules. # - `CARD`: The card associated with the event. Available for AUTHORIZATION, # THREE_DS_AUTHENTICATION, and CARD_TRANSACTION_UPDATE event stream rules. - # - `ACCOUNT_HOLDER`: The account holder associated with the card. Available for - # AUTHORIZATION, THREE_DS_AUTHENTICATION, and CARD_TRANSACTION_UPDATE event - # stream rules. + # - `ACCOUNT_HOLDER`: The account holder associated with the event. Available for + # AUTHORIZATION, THREE_DS_AUTHENTICATION, CARD_TRANSACTION_UPDATE, and + # ACH_PAYMENT_UPDATE event stream rules. # - `IP_METADATA`: IP address metadata for the request. Available for # THREE_DS_AUTHENTICATION event stream rules. # - `SPEND_VELOCITY`: Spend velocity data for the card or account. Requires @@ -42,6 +44,7 @@ module Lithic Lithic::AuthRules::RuleFeature::TokenizationFeature, Lithic::AuthRules::RuleFeature::ACHReceiptFeature, Lithic::AuthRules::RuleFeature::CardTransactionFeature, + Lithic::AuthRules::RuleFeature::ACHPaymentFeature, Lithic::AuthRules::RuleFeature::CardFeature, Lithic::AuthRules::RuleFeature::AccountHolderFeature, Lithic::AuthRules::RuleFeature::IPMetadataFeature, @@ -210,6 +213,38 @@ module Lithic end end + class ACHPaymentFeature < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::RuleFeature::ACHPaymentFeature, + Lithic::Internal::AnyHash + ) + end + + sig { returns(Symbol) } + attr_accessor :type + + # The variable name for this feature in the rule function signature + sig { returns(T.nilable(String)) } + attr_reader :name + + sig { params(name: String).void } + attr_writer :name + + sig { params(name: String, type: Symbol).returns(T.attached_class) } + def self.new( + # The variable name for this feature in the rule function signature + name: nil, + type: :ACH_PAYMENT + ) + end + + sig { override.returns({ type: Symbol, name: String }) } + def to_hash + end + end + class CardFeature < Lithic::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/lithic/models/auth_rules/typescript_code_parameters.rbi b/rbi/lithic/models/auth_rules/typescript_code_parameters.rbi index 15c0c6c6..b08b4d5b 100644 --- a/rbi/lithic/models/auth_rules/typescript_code_parameters.rbi +++ b/rbi/lithic/models/auth_rules/typescript_code_parameters.rbi @@ -28,6 +28,7 @@ module Lithic Lithic::AuthRules::RuleFeature::TokenizationFeature, Lithic::AuthRules::RuleFeature::ACHReceiptFeature, Lithic::AuthRules::RuleFeature::CardTransactionFeature, + Lithic::AuthRules::RuleFeature::ACHPaymentFeature, Lithic::AuthRules::RuleFeature::CardFeature, Lithic::AuthRules::RuleFeature::AccountHolderFeature, Lithic::AuthRules::RuleFeature::IPMetadataFeature, @@ -51,6 +52,7 @@ module Lithic Lithic::AuthRules::RuleFeature::TokenizationFeature::OrHash, Lithic::AuthRules::RuleFeature::ACHReceiptFeature::OrHash, Lithic::AuthRules::RuleFeature::CardTransactionFeature::OrHash, + Lithic::AuthRules::RuleFeature::ACHPaymentFeature::OrHash, Lithic::AuthRules::RuleFeature::CardFeature::OrHash, Lithic::AuthRules::RuleFeature::AccountHolderFeature::OrHash, Lithic::AuthRules::RuleFeature::IPMetadataFeature::OrHash, @@ -82,6 +84,7 @@ module Lithic Lithic::AuthRules::RuleFeature::TokenizationFeature, Lithic::AuthRules::RuleFeature::ACHReceiptFeature, Lithic::AuthRules::RuleFeature::CardTransactionFeature, + Lithic::AuthRules::RuleFeature::ACHPaymentFeature, Lithic::AuthRules::RuleFeature::CardFeature, Lithic::AuthRules::RuleFeature::AccountHolderFeature, Lithic::AuthRules::RuleFeature::IPMetadataFeature, diff --git a/rbi/lithic/models/auth_rules/v2_create_params.rbi b/rbi/lithic/models/auth_rules/v2_create_params.rbi index 9cabfae4..8e27fedf 100644 --- a/rbi/lithic/models/auth_rules/v2_create_params.rbi +++ b/rbi/lithic/models/auth_rules/v2_create_params.rbi @@ -86,6 +86,7 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters, Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ) @@ -103,11 +104,11 @@ module Lithic # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. sig do returns( Lithic::AuthRules::V2CreateParams::Body::AccountLevelRule::Type::OrSymbol @@ -156,6 +157,7 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters::OrHash, Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::OrHash, Lithic::AuthRules::TypescriptCodeParameters::OrHash, Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::OrHash ), @@ -180,11 +182,11 @@ module Lithic # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. type:, # Account tokens to which the Auth Rule applies. account_tokens: nil, @@ -210,6 +212,7 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters, Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ), @@ -240,6 +243,7 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters, Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ) @@ -266,11 +270,11 @@ module Lithic # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. module Type extend Lithic::Internal::Type::Enum @@ -346,6 +350,7 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters, Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ) @@ -363,11 +368,11 @@ module Lithic # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. sig do returns( Lithic::AuthRules::V2CreateParams::Body::CardLevelRule::Type::OrSymbol @@ -403,6 +408,7 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters::OrHash, Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::OrHash, Lithic::AuthRules::TypescriptCodeParameters::OrHash, Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::OrHash ), @@ -427,11 +433,11 @@ module Lithic # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. type:, # The event stream during which the rule will be evaluated. event_stream: nil, @@ -454,6 +460,7 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters, Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ), @@ -482,6 +489,7 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters, Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ) @@ -508,11 +516,11 @@ module Lithic # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. module Type extend Lithic::Internal::Type::Enum @@ -584,6 +592,7 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters, Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ) @@ -605,11 +614,11 @@ module Lithic # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. sig do returns( Lithic::AuthRules::V2CreateParams::Body::ProgramLevelRule::Type::OrSymbol @@ -667,6 +676,7 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters::OrHash, Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::OrHash, Lithic::AuthRules::TypescriptCodeParameters::OrHash, Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::OrHash ), @@ -695,11 +705,11 @@ module Lithic # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. type:, # The event stream during which the rule will be evaluated. event_stream: nil, @@ -727,6 +737,7 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters, Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ), @@ -759,6 +770,7 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters, Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ) @@ -785,11 +797,11 @@ module Lithic # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event - # stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or + # ACH_PAYMENT_UPDATE event stream. module Type extend Lithic::Internal::Type::Enum diff --git a/rbi/lithic/models/auth_rules/v2_draft_params.rbi b/rbi/lithic/models/auth_rules/v2_draft_params.rbi index d7988bbd..603b838f 100644 --- a/rbi/lithic/models/auth_rules/v2_draft_params.rbi +++ b/rbi/lithic/models/auth_rules/v2_draft_params.rbi @@ -28,6 +28,7 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters, Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ) @@ -50,6 +51,7 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters::OrHash, Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::OrHash, Lithic::AuthRules::TypescriptCodeParameters::OrHash, Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::OrHash ) @@ -80,6 +82,7 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters, Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ) @@ -106,6 +109,7 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters, Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ) diff --git a/rbi/lithic/models/auth_rules/v2_list_results_response.rbi b/rbi/lithic/models/auth_rules/v2_list_results_response.rbi index 4570d1d5..801431f6 100644 --- a/rbi/lithic/models/auth_rules/v2_list_results_response.rbi +++ b/rbi/lithic/models/auth_rules/v2_list_results_response.rbi @@ -13,7 +13,9 @@ module Lithic Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult, Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult, - Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult, + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult ) end @@ -2268,6 +2270,829 @@ module Lithic end end + class CardTransactionUpdateResult < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult, + Lithic::Internal::AnyHash + ) + end + + # Globally unique identifier for the evaluation + sig { returns(String) } + attr_accessor :token + + # Actions returned by the rule evaluation + sig do + returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::Variants + ] + ) + end + attr_accessor :actions + + # The Auth Rule token + sig { returns(String) } + attr_accessor :auth_rule_token + + # Timestamp of the rule evaluation + sig { returns(Time) } + attr_accessor :evaluation_time + + # The event stream during which the rule was evaluated + sig { returns(Symbol) } + attr_accessor :event_stream + + # Token of the event that triggered the evaluation + sig { returns(String) } + attr_accessor :event_token + + # The state of the Auth Rule + sig do + returns( + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Mode::TaggedSymbol + ) + end + attr_accessor :mode + + # Version of the rule that was evaluated + sig { returns(Integer) } + attr_accessor :rule_version + + # The token of the transaction that triggered the rule evaluation + sig { returns(T.nilable(String)) } + attr_accessor :transaction_token + + sig do + params( + token: String, + actions: + T::Array[ + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::TagAction::OrHash, + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::OrHash + ) + ], + auth_rule_token: String, + evaluation_time: Time, + event_token: String, + mode: + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Mode::OrSymbol, + rule_version: Integer, + transaction_token: T.nilable(String), + event_stream: Symbol + ).returns(T.attached_class) + end + def self.new( + # Globally unique identifier for the evaluation + token:, + # Actions returned by the rule evaluation + actions:, + # The Auth Rule token + auth_rule_token:, + # Timestamp of the rule evaluation + evaluation_time:, + # Token of the event that triggered the evaluation + event_token:, + # The state of the Auth Rule + mode:, + # Version of the rule that was evaluated + rule_version:, + # The token of the transaction that triggered the rule evaluation + transaction_token:, + # The event stream during which the rule was evaluated + event_stream: :CARD_TRANSACTION_UPDATE + ) + end + + sig do + override.returns( + { + token: String, + actions: + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::Variants + ], + auth_rule_token: String, + evaluation_time: Time, + event_stream: Symbol, + event_token: String, + mode: + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Mode::TaggedSymbol, + rule_version: Integer, + transaction_token: T.nilable(String) + } + ) + end + def to_hash + end + + module Action + extend Lithic::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::TagAction, + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction + ) + end + + class TagAction < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::TagAction, + Lithic::Internal::AnyHash + ) + end + + # The key of the tag to apply to the transaction + sig { returns(String) } + attr_accessor :key + + # Tag the transaction with key-value metadata + sig do + returns( + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::TagAction::Type::TaggedSymbol + ) + end + attr_accessor :type + + # The value of the tag to apply to the transaction + sig { returns(String) } + attr_accessor :value + + # Optional explanation for why this action was taken + sig { returns(T.nilable(String)) } + attr_reader :explanation + + sig { params(explanation: String).void } + attr_writer :explanation + + sig do + params( + key: String, + type: + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::TagAction::Type::OrSymbol, + value: String, + explanation: String + ).returns(T.attached_class) + end + def self.new( + # The key of the tag to apply to the transaction + key:, + # Tag the transaction with key-value metadata + type:, + # The value of the tag to apply to the transaction + value:, + # Optional explanation for why this action was taken + explanation: nil + ) + end + + sig do + override.returns( + { + key: String, + type: + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::TagAction::Type::TaggedSymbol, + value: String, + explanation: String + } + ) + end + def to_hash + end + + # Tag the transaction with key-value metadata + module Type + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::TagAction::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TAG = + T.let( + :TAG, + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::TagAction::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::TagAction::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class CreateCaseAction < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction, + Lithic::Internal::AnyHash + ) + end + + # The token of the queue to create the case in + sig { returns(String) } + attr_accessor :queue_token + + # The scope of the case to create + sig do + returns( + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::Scope::TaggedSymbol + ) + end + attr_accessor :scope + + # Create a case for the transaction + sig do + returns( + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::Type::TaggedSymbol + ) + end + attr_accessor :type + + # Optional explanation for why this action was taken + sig { returns(T.nilable(String)) } + attr_reader :explanation + + sig { params(explanation: String).void } + attr_writer :explanation + + sig do + params( + queue_token: String, + scope: + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::Scope::OrSymbol, + type: + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::Type::OrSymbol, + explanation: String + ).returns(T.attached_class) + end + def self.new( + # The token of the queue to create the case in + queue_token:, + # The scope of the case to create + scope:, + # Create a case for the transaction + type:, + # Optional explanation for why this action was taken + explanation: nil + ) + end + + sig do + override.returns( + { + queue_token: String, + scope: + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::Scope::TaggedSymbol, + type: + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::Type::TaggedSymbol, + explanation: String + } + ) + end + def to_hash + end + + # The scope of the case to create + module Scope + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::Scope + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CARD = + T.let( + :CARD, + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::Scope::TaggedSymbol + ) + ACCOUNT = + T.let( + :ACCOUNT, + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::Scope::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::Scope::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Create a case for the transaction + module Type + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CREATE_CASE = + T.let( + :CREATE_CASE, + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::Variants + ] + ) + end + def self.variants + end + end + + # The state of the Auth Rule + module Mode + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Mode + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :ACTIVE, + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Mode::TaggedSymbol + ) + INACTIVE = + T.let( + :INACTIVE, + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Mode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Mode::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class ACHPaymentUpdateResult < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult, + Lithic::Internal::AnyHash + ) + end + + # Globally unique identifier for the evaluation + sig { returns(String) } + attr_accessor :token + + # Actions returned by the rule evaluation + sig do + returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::Variants + ] + ) + end + attr_accessor :actions + + # The Auth Rule token + sig { returns(String) } + attr_accessor :auth_rule_token + + # Timestamp of the rule evaluation + sig { returns(Time) } + attr_accessor :evaluation_time + + # The event stream during which the rule was evaluated + sig { returns(Symbol) } + attr_accessor :event_stream + + # Token of the event that triggered the evaluation + sig { returns(String) } + attr_accessor :event_token + + # The state of the Auth Rule + sig do + returns( + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Mode::TaggedSymbol + ) + end + attr_accessor :mode + + # Version of the rule that was evaluated + sig { returns(Integer) } + attr_accessor :rule_version + + # The token of the transaction that triggered the rule evaluation + sig { returns(T.nilable(String)) } + attr_accessor :transaction_token + + sig do + params( + token: String, + actions: + T::Array[ + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::TagAction::OrHash, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::OrHash + ) + ], + auth_rule_token: String, + evaluation_time: Time, + event_token: String, + mode: + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Mode::OrSymbol, + rule_version: Integer, + transaction_token: T.nilable(String), + event_stream: Symbol + ).returns(T.attached_class) + end + def self.new( + # Globally unique identifier for the evaluation + token:, + # Actions returned by the rule evaluation + actions:, + # The Auth Rule token + auth_rule_token:, + # Timestamp of the rule evaluation + evaluation_time:, + # Token of the event that triggered the evaluation + event_token:, + # The state of the Auth Rule + mode:, + # Version of the rule that was evaluated + rule_version:, + # The token of the transaction that triggered the rule evaluation + transaction_token:, + # The event stream during which the rule was evaluated + event_stream: :ACH_PAYMENT_UPDATE + ) + end + + sig do + override.returns( + { + token: String, + actions: + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::Variants + ], + auth_rule_token: String, + evaluation_time: Time, + event_stream: Symbol, + event_token: String, + mode: + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Mode::TaggedSymbol, + rule_version: Integer, + transaction_token: T.nilable(String) + } + ) + end + def to_hash + end + + module Action + extend Lithic::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::TagAction, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction + ) + end + + class TagAction < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::TagAction, + Lithic::Internal::AnyHash + ) + end + + # The key of the tag to apply to the payment + sig { returns(String) } + attr_accessor :key + + # Tag the payment with key-value metadata + sig do + returns( + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::TagAction::Type::TaggedSymbol + ) + end + attr_accessor :type + + # The value of the tag to apply to the payment + sig { returns(String) } + attr_accessor :value + + # Optional explanation for why this action was taken + sig { returns(T.nilable(String)) } + attr_reader :explanation + + sig { params(explanation: String).void } + attr_writer :explanation + + sig do + params( + key: String, + type: + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::TagAction::Type::OrSymbol, + value: String, + explanation: String + ).returns(T.attached_class) + end + def self.new( + # The key of the tag to apply to the payment + key:, + # Tag the payment with key-value metadata + type:, + # The value of the tag to apply to the payment + value:, + # Optional explanation for why this action was taken + explanation: nil + ) + end + + sig do + override.returns( + { + key: String, + type: + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::TagAction::Type::TaggedSymbol, + value: String, + explanation: String + } + ) + end + def to_hash + end + + # Tag the payment with key-value metadata + module Type + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::TagAction::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TAG = + T.let( + :TAG, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::TagAction::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::TagAction::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class CreateCaseAction < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction, + Lithic::Internal::AnyHash + ) + end + + # The token of the queue to create the case in + sig { returns(String) } + attr_accessor :queue_token + + # The scope of the case to create + sig do + returns( + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::Scope::TaggedSymbol + ) + end + attr_accessor :scope + + # Create a case for the payment + sig do + returns( + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::Type::TaggedSymbol + ) + end + attr_accessor :type + + # Optional explanation for why this action was taken + sig { returns(T.nilable(String)) } + attr_reader :explanation + + sig { params(explanation: String).void } + attr_writer :explanation + + sig do + params( + queue_token: String, + scope: + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::Scope::OrSymbol, + type: + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::Type::OrSymbol, + explanation: String + ).returns(T.attached_class) + end + def self.new( + # The token of the queue to create the case in + queue_token:, + # The scope of the case to create + scope:, + # Create a case for the payment + type:, + # Optional explanation for why this action was taken + explanation: nil + ) + end + + sig do + override.returns( + { + queue_token: String, + scope: + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::Scope::TaggedSymbol, + type: + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::Type::TaggedSymbol, + explanation: String + } + ) + end + def to_hash + end + + # The scope of the case to create + module Scope + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::Scope + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + FINANCIAL_ACCOUNT = + T.let( + :FINANCIAL_ACCOUNT, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::Scope::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::Scope::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Create a case for the payment + module Type + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CREATE_CASE = + T.let( + :CREATE_CASE, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::Variants + ] + ) + end + def self.variants + end + end + + # The state of the Auth Rule + module Mode + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Mode + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :ACTIVE, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Mode::TaggedSymbol + ) + INACTIVE = + T.let( + :INACTIVE, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Mode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Mode::TaggedSymbol + ] + ) + end + def self.values + end + end + end + sig do override.returns( T::Array[Lithic::Models::AuthRules::V2ListResultsResponse::Variants] diff --git a/rbi/lithic/resources/auth_rules/v2.rbi b/rbi/lithic/resources/auth_rules/v2.rbi index e1254643..5ff83ac1 100644 --- a/rbi/lithic/resources/auth_rules/v2.rbi +++ b/rbi/lithic/resources/auth_rules/v2.rbi @@ -123,6 +123,7 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters::OrHash, Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash, + Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::OrHash, Lithic::AuthRules::TypescriptCodeParameters::OrHash, Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::OrHash ) diff --git a/sig/lithic/models/auth_rules/ach_payment_update_action.rbs b/sig/lithic/models/auth_rules/ach_payment_update_action.rbs new file mode 100644 index 00000000..6eb6d71c --- /dev/null +++ b/sig/lithic/models/auth_rules/ach_payment_update_action.rbs @@ -0,0 +1,99 @@ +module Lithic + module Models + module AuthRules + type ach_payment_update_action = + Lithic::AuthRules::ACHPaymentUpdateAction::TagAction + | Lithic::AuthRules::ACHPaymentUpdateAction::CreateCaseAction + + module ACHPaymentUpdateAction + extend Lithic::Internal::Type::Union + + type tag_action = + { + key: String, + type: Lithic::Models::AuthRules::ACHPaymentUpdateAction::TagAction::type_, + value: String + } + + class TagAction < Lithic::Internal::Type::BaseModel + attr_accessor key: String + + attr_accessor type: Lithic::Models::AuthRules::ACHPaymentUpdateAction::TagAction::type_ + + attr_accessor value: String + + def initialize: ( + key: String, + type: Lithic::Models::AuthRules::ACHPaymentUpdateAction::TagAction::type_, + value: String + ) -> void + + def to_hash: -> { + key: String, + type: Lithic::Models::AuthRules::ACHPaymentUpdateAction::TagAction::type_, + value: String + } + + type type_ = :TAG + + module Type + extend Lithic::Internal::Type::Enum + + TAG: :TAG + + def self?.values: -> ::Array[Lithic::Models::AuthRules::ACHPaymentUpdateAction::TagAction::type_] + end + end + + type create_case_action = + { + queue_token: String, + scope: Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::scope, + type: Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::type_ + } + + class CreateCaseAction < Lithic::Internal::Type::BaseModel + attr_accessor queue_token: String + + attr_accessor scope: Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::scope + + attr_accessor type: Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::type_ + + def initialize: ( + queue_token: String, + scope: Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::scope, + type: Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::type_ + ) -> void + + def to_hash: -> { + queue_token: String, + scope: Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::scope, + type: Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::type_ + } + + type scope = :FINANCIAL_ACCOUNT + + module Scope + extend Lithic::Internal::Type::Enum + + FINANCIAL_ACCOUNT: :FINANCIAL_ACCOUNT + + def self?.values: -> ::Array[Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::scope] + end + + type type_ = :CREATE_CASE + + module Type + extend Lithic::Internal::Type::Enum + + CREATE_CASE: :CREATE_CASE + + def self?.values: -> ::Array[Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::type_] + end + end + + def self?.variants: -> ::Array[Lithic::Models::AuthRules::ach_payment_update_action] + end + end + end +end diff --git a/sig/lithic/models/auth_rules/auth_rule.rbs b/sig/lithic/models/auth_rules/auth_rule.rbs index 51d9757b..276741ca 100644 --- a/sig/lithic/models/auth_rules/auth_rule.rbs +++ b/sig/lithic/models/auth_rules/auth_rule.rbs @@ -127,6 +127,7 @@ module Lithic | Lithic::AuthRules::ConditionalACHActionParameters | Lithic::AuthRules::ConditionalTokenizationActionParameters | Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters + | Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters | Lithic::AuthRules::TypescriptCodeParameters | Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters @@ -177,6 +178,7 @@ module Lithic | Lithic::AuthRules::ConditionalACHActionParameters | Lithic::AuthRules::ConditionalTokenizationActionParameters | Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters + | Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters | Lithic::AuthRules::TypescriptCodeParameters | Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters diff --git a/sig/lithic/models/auth_rules/auth_rule_version.rbs b/sig/lithic/models/auth_rules/auth_rule_version.rbs index 0798d789..f82991a6 100644 --- a/sig/lithic/models/auth_rules/auth_rule_version.rbs +++ b/sig/lithic/models/auth_rules/auth_rule_version.rbs @@ -43,6 +43,7 @@ module Lithic | Lithic::AuthRules::ConditionalACHActionParameters | Lithic::AuthRules::ConditionalTokenizationActionParameters | Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters + | Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters | Lithic::AuthRules::TypescriptCodeParameters | Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters diff --git a/sig/lithic/models/auth_rules/conditional_ach_payment_update_action_parameters.rbs b/sig/lithic/models/auth_rules/conditional_ach_payment_update_action_parameters.rbs new file mode 100644 index 00000000..6b4692cf --- /dev/null +++ b/sig/lithic/models/auth_rules/conditional_ach_payment_update_action_parameters.rbs @@ -0,0 +1,79 @@ +module Lithic + module Models + module AuthRules + type conditional_ach_payment_update_action_parameters = + { + action: Lithic::Models::AuthRules::ach_payment_update_action, + conditions: ::Array[Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition] + } + + class ConditionalACHPaymentUpdateActionParameters < Lithic::Internal::Type::BaseModel + attr_accessor action: Lithic::Models::AuthRules::ach_payment_update_action + + attr_accessor conditions: ::Array[Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition] + + def initialize: ( + action: Lithic::Models::AuthRules::ach_payment_update_action, + conditions: ::Array[Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition] + ) -> void + + def to_hash: -> { + action: Lithic::Models::AuthRules::ach_payment_update_action, + conditions: ::Array[Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition] + } + + type condition = + { + attribute: Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition::attribute, + operation: Lithic::Models::AuthRules::conditional_operation, + value: Lithic::Models::AuthRules::conditional_value + } + + class Condition < Lithic::Internal::Type::BaseModel + attr_accessor attribute: Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition::attribute + + attr_accessor operation: Lithic::Models::AuthRules::conditional_operation + + attr_accessor value: Lithic::Models::AuthRules::conditional_value + + def initialize: ( + attribute: Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition::attribute, + operation: Lithic::Models::AuthRules::conditional_operation, + value: Lithic::Models::AuthRules::conditional_value + ) -> void + + def to_hash: -> { + attribute: Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition::attribute, + operation: Lithic::Models::AuthRules::conditional_operation, + value: Lithic::Models::AuthRules::conditional_value + } + + type attribute = + :TRANSACTION_AMOUNT + | :SEC_CODE + | :RETURN_REASON_CODE + | :ACCOUNT_AGE + | :EXTERNAL_BANK_ACCOUNT_AGE + | :EXTERNAL_BANK_ACCOUNT_VERIFICATION_METHOD + | :EXTERNAL_BANK_ACCOUNT_VERIFICATION_STATE + | :EXTERNAL_BANK_ACCOUNT_OWNER_TYPE + + module Attribute + extend Lithic::Internal::Type::Enum + + TRANSACTION_AMOUNT: :TRANSACTION_AMOUNT + SEC_CODE: :SEC_CODE + RETURN_REASON_CODE: :RETURN_REASON_CODE + ACCOUNT_AGE: :ACCOUNT_AGE + EXTERNAL_BANK_ACCOUNT_AGE: :EXTERNAL_BANK_ACCOUNT_AGE + EXTERNAL_BANK_ACCOUNT_VERIFICATION_METHOD: :EXTERNAL_BANK_ACCOUNT_VERIFICATION_METHOD + EXTERNAL_BANK_ACCOUNT_VERIFICATION_STATE: :EXTERNAL_BANK_ACCOUNT_VERIFICATION_STATE + EXTERNAL_BANK_ACCOUNT_OWNER_TYPE: :EXTERNAL_BANK_ACCOUNT_OWNER_TYPE + + def self?.values: -> ::Array[Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters::Condition::attribute] + end + end + end + end + end +end diff --git a/sig/lithic/models/auth_rules/event_stream.rbs b/sig/lithic/models/auth_rules/event_stream.rbs index 60b698c5..21b25f40 100644 --- a/sig/lithic/models/auth_rules/event_stream.rbs +++ b/sig/lithic/models/auth_rules/event_stream.rbs @@ -8,6 +8,7 @@ module Lithic | :ACH_CREDIT_RECEIPT | :ACH_DEBIT_RECEIPT | :CARD_TRANSACTION_UPDATE + | :ACH_PAYMENT_UPDATE module EventStream extend Lithic::Internal::Type::Enum @@ -18,6 +19,7 @@ module Lithic ACH_CREDIT_RECEIPT: :ACH_CREDIT_RECEIPT ACH_DEBIT_RECEIPT: :ACH_DEBIT_RECEIPT CARD_TRANSACTION_UPDATE: :CARD_TRANSACTION_UPDATE + ACH_PAYMENT_UPDATE: :ACH_PAYMENT_UPDATE def self?.values: -> ::Array[Lithic::Models::AuthRules::event_stream] end diff --git a/sig/lithic/models/auth_rules/rule_feature.rbs b/sig/lithic/models/auth_rules/rule_feature.rbs index 84337048..148d67bf 100644 --- a/sig/lithic/models/auth_rules/rule_feature.rbs +++ b/sig/lithic/models/auth_rules/rule_feature.rbs @@ -7,6 +7,7 @@ module Lithic | Lithic::AuthRules::RuleFeature::TokenizationFeature | Lithic::AuthRules::RuleFeature::ACHReceiptFeature | Lithic::AuthRules::RuleFeature::CardTransactionFeature + | Lithic::AuthRules::RuleFeature::ACHPaymentFeature | Lithic::AuthRules::RuleFeature::CardFeature | Lithic::AuthRules::RuleFeature::AccountHolderFeature | Lithic::AuthRules::RuleFeature::IPMetadataFeature @@ -87,6 +88,20 @@ module Lithic def to_hash: -> { type: :CARD_TRANSACTION, name: String } end + type ach_payment_feature = { type: :ACH_PAYMENT, name: String } + + class ACHPaymentFeature < Lithic::Internal::Type::BaseModel + attr_accessor type: :ACH_PAYMENT + + attr_reader name: String? + + def name=: (String) -> String + + def initialize: (?name: String, ?type: :ACH_PAYMENT) -> void + + def to_hash: -> { type: :ACH_PAYMENT, name: String } + end + type card_feature = { type: :CARD, name: String } class CardFeature < Lithic::Internal::Type::BaseModel diff --git a/sig/lithic/models/auth_rules/v2_create_params.rbs b/sig/lithic/models/auth_rules/v2_create_params.rbs index 1a8c1ee4..c31a0584 100644 --- a/sig/lithic/models/auth_rules/v2_create_params.rbs +++ b/sig/lithic/models/auth_rules/v2_create_params.rbs @@ -87,6 +87,7 @@ module Lithic | Lithic::AuthRules::ConditionalACHActionParameters | Lithic::AuthRules::ConditionalTokenizationActionParameters | Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters + | Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters | Lithic::AuthRules::TypescriptCodeParameters | Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters @@ -165,6 +166,7 @@ module Lithic | Lithic::AuthRules::ConditionalACHActionParameters | Lithic::AuthRules::ConditionalTokenizationActionParameters | Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters + | Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters | Lithic::AuthRules::TypescriptCodeParameters | Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters @@ -266,6 +268,7 @@ module Lithic | Lithic::AuthRules::ConditionalACHActionParameters | Lithic::AuthRules::ConditionalTokenizationActionParameters | Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters + | Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters | Lithic::AuthRules::TypescriptCodeParameters | Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters diff --git a/sig/lithic/models/auth_rules/v2_draft_params.rbs b/sig/lithic/models/auth_rules/v2_draft_params.rbs index 4398a1bf..b8e5aa61 100644 --- a/sig/lithic/models/auth_rules/v2_draft_params.rbs +++ b/sig/lithic/models/auth_rules/v2_draft_params.rbs @@ -37,6 +37,7 @@ module Lithic | Lithic::AuthRules::ConditionalACHActionParameters | Lithic::AuthRules::ConditionalTokenizationActionParameters | Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters + | Lithic::AuthRules::ConditionalACHPaymentUpdateActionParameters | Lithic::AuthRules::TypescriptCodeParameters | Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters diff --git a/sig/lithic/models/auth_rules/v2_list_results_response.rbs b/sig/lithic/models/auth_rules/v2_list_results_response.rbs index 7d3a0fd0..c6cee1d6 100644 --- a/sig/lithic/models/auth_rules/v2_list_results_response.rbs +++ b/sig/lithic/models/auth_rules/v2_list_results_response.rbs @@ -6,6 +6,8 @@ module Lithic | Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult | Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult | Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult + | Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult + | Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult module V2ListResultsResponse extend Lithic::Internal::Type::Union @@ -936,6 +938,359 @@ module Lithic end end + type card_transaction_update_result = + { + token: String, + actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::action], + auth_rule_token: String, + evaluation_time: Time, + event_stream: :CARD_TRANSACTION_UPDATE, + event_token: String, + mode: Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::mode, + rule_version: Integer, + transaction_token: String? + } + + class CardTransactionUpdateResult < Lithic::Internal::Type::BaseModel + attr_accessor token: String + + attr_accessor actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::action] + + attr_accessor auth_rule_token: String + + attr_accessor evaluation_time: Time + + attr_accessor event_stream: :CARD_TRANSACTION_UPDATE + + attr_accessor event_token: String + + attr_accessor mode: Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::mode + + attr_accessor rule_version: Integer + + attr_accessor transaction_token: String? + + def initialize: ( + token: String, + actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::action], + auth_rule_token: String, + evaluation_time: Time, + event_token: String, + mode: Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::mode, + rule_version: Integer, + transaction_token: String?, + ?event_stream: :CARD_TRANSACTION_UPDATE + ) -> void + + def to_hash: -> { + token: String, + actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::action], + auth_rule_token: String, + evaluation_time: Time, + event_stream: :CARD_TRANSACTION_UPDATE, + event_token: String, + mode: Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::mode, + rule_version: Integer, + transaction_token: String? + } + + type action = + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::TagAction + | Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction + + module Action + extend Lithic::Internal::Type::Union + + type tag_action = + { + key: String, + type: Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::TagAction::type_, + value: String, + explanation: String + } + + class TagAction < Lithic::Internal::Type::BaseModel + attr_accessor key: String + + attr_accessor type: Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::TagAction::type_ + + attr_accessor value: String + + attr_reader explanation: String? + + def explanation=: (String) -> String + + def initialize: ( + key: String, + type: Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::TagAction::type_, + value: String, + ?explanation: String + ) -> void + + def to_hash: -> { + key: String, + type: Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::TagAction::type_, + value: String, + explanation: String + } + + type type_ = :TAG + + module Type + extend Lithic::Internal::Type::Enum + + TAG: :TAG + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::TagAction::type_] + end + end + + type create_case_action = + { + queue_token: String, + scope: Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::scope, + type: Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::type_, + explanation: String + } + + class CreateCaseAction < Lithic::Internal::Type::BaseModel + attr_accessor queue_token: String + + attr_accessor scope: Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::scope + + attr_accessor type: Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::type_ + + attr_reader explanation: String? + + def explanation=: (String) -> String + + def initialize: ( + queue_token: String, + scope: Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::scope, + type: Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::type_, + ?explanation: String + ) -> void + + def to_hash: -> { + queue_token: String, + scope: Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::scope, + type: Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::type_, + explanation: String + } + + type scope = :CARD | :ACCOUNT + + module Scope + extend Lithic::Internal::Type::Enum + + CARD: :CARD + ACCOUNT: :ACCOUNT + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::scope] + end + + type type_ = :CREATE_CASE + + module Type + extend Lithic::Internal::Type::Enum + + CREATE_CASE: :CREATE_CASE + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::type_] + end + end + + def self?.variants: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::action] + end + + type mode = :ACTIVE | :INACTIVE + + module Mode + extend Lithic::Internal::Type::Enum + + ACTIVE: :ACTIVE + INACTIVE: :INACTIVE + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::mode] + end + end + + type ach_payment_update_result = + { + token: String, + actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::action], + auth_rule_token: String, + evaluation_time: Time, + event_stream: :ACH_PAYMENT_UPDATE, + event_token: String, + mode: Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::mode, + rule_version: Integer, + transaction_token: String? + } + + class ACHPaymentUpdateResult < Lithic::Internal::Type::BaseModel + attr_accessor token: String + + attr_accessor actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::action] + + attr_accessor auth_rule_token: String + + attr_accessor evaluation_time: Time + + attr_accessor event_stream: :ACH_PAYMENT_UPDATE + + attr_accessor event_token: String + + attr_accessor mode: Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::mode + + attr_accessor rule_version: Integer + + attr_accessor transaction_token: String? + + def initialize: ( + token: String, + actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::action], + auth_rule_token: String, + evaluation_time: Time, + event_token: String, + mode: Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::mode, + rule_version: Integer, + transaction_token: String?, + ?event_stream: :ACH_PAYMENT_UPDATE + ) -> void + + def to_hash: -> { + token: String, + actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::action], + auth_rule_token: String, + evaluation_time: Time, + event_stream: :ACH_PAYMENT_UPDATE, + event_token: String, + mode: Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::mode, + rule_version: Integer, + transaction_token: String? + } + + type action = + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::TagAction + | Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction + + module Action + extend Lithic::Internal::Type::Union + + type tag_action = + { + key: String, + type: Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::TagAction::type_, + value: String, + explanation: String + } + + class TagAction < Lithic::Internal::Type::BaseModel + attr_accessor key: String + + attr_accessor type: Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::TagAction::type_ + + attr_accessor value: String + + attr_reader explanation: String? + + def explanation=: (String) -> String + + def initialize: ( + key: String, + type: Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::TagAction::type_, + value: String, + ?explanation: String + ) -> void + + def to_hash: -> { + key: String, + type: Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::TagAction::type_, + value: String, + explanation: String + } + + type type_ = :TAG + + module Type + extend Lithic::Internal::Type::Enum + + TAG: :TAG + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::TagAction::type_] + end + end + + type create_case_action = + { + queue_token: String, + scope: Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::scope, + type: Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::type_, + explanation: String + } + + class CreateCaseAction < Lithic::Internal::Type::BaseModel + attr_accessor queue_token: String + + attr_accessor scope: Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::scope + + attr_accessor type: Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::type_ + + attr_reader explanation: String? + + def explanation=: (String) -> String + + def initialize: ( + queue_token: String, + scope: Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::scope, + type: Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::type_, + ?explanation: String + ) -> void + + def to_hash: -> { + queue_token: String, + scope: Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::scope, + type: Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::type_, + explanation: String + } + + type scope = :FINANCIAL_ACCOUNT + + module Scope + extend Lithic::Internal::Type::Enum + + FINANCIAL_ACCOUNT: :FINANCIAL_ACCOUNT + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::scope] + end + + type type_ = :CREATE_CASE + + module Type + extend Lithic::Internal::Type::Enum + + CREATE_CASE: :CREATE_CASE + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::type_] + end + end + + def self?.variants: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::action] + end + + type mode = :ACTIVE | :INACTIVE + + module Mode + extend Lithic::Internal::Type::Enum + + ACTIVE: :ACTIVE + INACTIVE: :INACTIVE + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::mode] + end + end + def self?.variants: -> ::Array[Lithic::Models::AuthRules::v2_list_results_response] end end diff --git a/test/lithic/resources/auth_rules/v2_test.rb b/test/lithic/resources/auth_rules/v2_test.rb index d06f197a..97bd2517 100644 --- a/test/lithic/resources/auth_rules/v2_test.rb +++ b/test/lithic/resources/auth_rules/v2_test.rb @@ -184,6 +184,8 @@ def test_list_results in Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult in Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult in Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult + in Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult + in Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult end end end