diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f996785..f67548bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,14 +33,18 @@ jobs: bundle install - name: Get GitHub OIDC Token - if: github.repository == 'stainless-sdks/lithic-ruby' + if: |- + github.repository == 'stainless-sdks/lithic-ruby' && + !startsWith(github.ref, 'refs/heads/stl/') id: github-oidc uses: actions/github-script@v8 with: script: core.setOutput('github_token', await core.getIDToken()); - name: Build and upload gem artifacts - if: github.repository == 'stainless-sdks/lithic-ruby' + if: |- + github.repository == 'stainless-sdks/lithic-ruby' && + !startsWith(github.ref, 'refs/heads/stl/') env: URL: https://pkg.stainless.com/s AUTH: ${{ steps.github-oidc.outputs.github_token }} diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1b77f506..6538ca91 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.7.0" + ".": "0.8.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 4f6a4f90..6976609b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 185 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-ee8607f0a2cdcaee420935050334a439db8dd097be83023fccdaf1d6f9a7de14.yml -openapi_spec_hash: 0f21c68cdddb7c5bd99f42356d507393 -config_hash: fb5070d41fcabdedbc084b83964b592a +configured_endpoints: 190 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-e88a4837037207e9591d48d534bd61acca57ca6e7c59ec0d4fdcf6e05288cc6d.yml +openapi_spec_hash: fd8bbc173d1b6dafd117fb1a3a3d446c +config_hash: 3005e2502301e77754e5e1455584525b diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c1585b2..69ffbc3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,41 @@ # Changelog +## 0.8.0 (2026-03-16) + +Full Changelog: [v0.7.0...v0.8.0](https://github.com/lithic-com/lithic-ruby/compare/v0.7.0...v0.8.0) + +### Features + +* **api:** add EARLY_DIRECT_DEPOSIT_FLOAT to financial account types ([3e0194f](https://github.com/lithic-com/lithic-ruby/commit/3e0194f79f315f44b8bc95c7e18452c99d91ce81)) +* **api:** Add event_subtype to statement line items ([3e9c63c](https://github.com/lithic-com/lithic-ruby/commit/3e9c63ca2f2c3ddf7cfebef2bbf603646f0c6e7d)) +* **api:** add excluded_account_tokens field to auth_rules ([df3f09b](https://github.com/lithic-com/lithic-ruby/commit/df3f09b0f5fe02307e747af719d5f4ab5a8ebf04)) +* **api:** add loan_tape_date field to statement line items ([9dd0f14](https://github.com/lithic-com/lithic-ruby/commit/9dd0f14b35ebd87561dda0a11da9b440d9a4f1cb)) +* **api:** add penalty_rates parameter to interest_tier_schedule ([d5d3ecb](https://github.com/lithic-com/lithic-ruby/commit/d5d3ecb2d87d8475aead81558b3152fd922cf267)) +* **api:** Add support for early direct deposit ([5b75c2f](https://github.com/lithic-com/lithic-ruby/commit/5b75c2fdb30131890b8ea83befd70c6f7cba804f)) +* **api:** add TypeScript code rules, draft version state tracking to auth_rules ([1dbdb68](https://github.com/lithic-com/lithic-ruby/commit/1dbdb688fffb5909af5c568bb16b2e3f899a6a42)) +* **api:** add versions field to auth_rules daily statistics ([827bf68](https://github.com/lithic-com/lithic-ruby/commit/827bf6825c3dae568720c02beceedb1cc0f357f8)) +* **api:** add WIRE category to account_activity/statements/payment, wire event types, remove field ([a9df6e3](https://github.com/lithic-com/lithic-ruby/commit/a9df6e398525050cf3cb0d7d1166a4fd27d5d182)) +* **client:** add webhook support ([e31938a](https://github.com/lithic-com/lithic-ruby/commit/e31938aed255ccf33ac8cafcde59f0b53334cd52)) + + +### Bug Fixes + +* **api:** [breaking] unify webhook schemas for digital_wallet.tokenization_approval_request webhooks ([46555c1](https://github.com/lithic-com/lithic-ruby/commit/46555c112e45b4aa389e3d8f0a5231a0a7c3ce19)) +* **api:** Disable MCP server to fix TypeScript SDK package publishing ([b977c80](https://github.com/lithic-com/lithic-ruby/commit/b977c80b191364666f305fc9527d161c653a43f7)) +* **types:** require start/end_, remove auth_rule_token in auth_rules v2 backtest ([7307a40](https://github.com/lithic-com/lithic-ruby/commit/7307a40c8d1c7e50bc79ef302b1563da333ccb53)) + + +### Chores + +* **internal:** codegen related update ([489f19b](https://github.com/lithic-com/lithic-ruby/commit/489f19b1c8c76d08aed0a313d45bed73406025b5)) +* **internal:** regenerate SDK with no functional changes ([13a1d1b](https://github.com/lithic-com/lithic-ruby/commit/13a1d1bd178d109ca6d5c8d3f3199f471b643cfa)) + + +### Documentation + +* **api:** update disputes terminology to chargeback request ([94dadbc](https://github.com/lithic-com/lithic-ruby/commit/94dadbcaa0c7f98b6a7e8b66fcdf5bfdc0e8fa5d)) +* **client:** add MCP Server section to README ([fbf0234](https://github.com/lithic-com/lithic-ruby/commit/fbf0234627af6b16c0844a258c3133f2d671613c)) + ## 0.7.0 (2026-03-05) Full Changelog: [v0.6.0...v0.7.0](https://github.com/lithic-com/lithic-ruby/compare/v0.6.0...v0.7.0) diff --git a/Gemfile b/Gemfile index 2cf558a8..abe1df28 100644 --- a/Gemfile +++ b/Gemfile @@ -22,7 +22,7 @@ group :development, :test do gem "minitest-hooks" gem "minitest-proveit" gem "minitest-rg" - gem "standardwebhooks", "~> 1.0", github: "standard-webhooks/standard-webhooks", glob: "libraries/ruby/*.gemspec" + gem "standardwebhooks", "~> 1.0" gem "webmock" end diff --git a/Gemfile.lock b/Gemfile.lock index c8b7721f..ca622871 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,17 +8,10 @@ GIT rbs syntax_tree (>= 2.0.1) -GIT - remote: https://github.com/standard-webhooks/standard-webhooks.git - revision: a173a6c0125ca2b9245bf5ea3f1c61384ccc10a2 - glob: libraries/ruby/*.gemspec - specs: - standardwebhooks (1.0.0) - PATH remote: . specs: - lithic (0.7.0) + lithic (0.8.0) cgi connection_pool @@ -150,6 +143,7 @@ GEM rexml (>= 3.2.6) sorbet-static-and-runtime (>= 0.5.10187) thor (>= 0.19.2) + standardwebhooks (1.0.1) steep (1.10.0) activesupport (>= 5.1) concurrent-ruby (>= 1.1.10) @@ -223,7 +217,7 @@ DEPENDENCIES redcarpet rubocop sorbet - standardwebhooks (~> 1.0)! + standardwebhooks (~> 1.0) steep syntax_tree syntax_tree-rbs! diff --git a/README.md b/README.md index f71bfa9e..61a6642e 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.7.0" +gem "lithic", "~> 0.8.0" ``` @@ -102,10 +102,10 @@ event = lithic.webhooks.parse_unsafe(request.body.read) #### Installing standardwebhooks (optional) -To use signature verification, install from GitHub: +To use signature verification, add the gem to your Gemfile: ```ruby -gem "standardwebhooks", "~> 1.0", github: "standard-webhooks/standard-webhooks", glob: "libraries/ruby/*.gemspec" +gem "standardwebhooks", "~> 1.0" ``` ### Handling errors diff --git a/lib/lithic.rb b/lib/lithic.rb index 271c34ac..7d698a4c 100644 --- a/lib/lithic.rb +++ b/lib/lithic.rb @@ -30,6 +30,7 @@ # Gems. require "connection_pool" +require "standardwebhooks" # Package files. require_relative "lithic/version" @@ -114,6 +115,7 @@ require_relative "lithic/models/api_status" 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" require_relative "lithic/models/auth_rules/backtest_stats" require_relative "lithic/models/auth_rules/conditional_3ds_action_parameters" require_relative "lithic/models/auth_rules/conditional_ach_action_parameters" @@ -126,6 +128,8 @@ require_relative "lithic/models/auth_rules/event_stream" require_relative "lithic/models/auth_rules/merchant_lock_parameters" require_relative "lithic/models/auth_rules/report_stats" +require_relative "lithic/models/auth_rules/rule_feature" +require_relative "lithic/models/auth_rules/typescript_code_parameters" require_relative "lithic/models/auth_rules/v2/backtest_create_params" require_relative "lithic/models/auth_rules/v2/backtest_create_response" require_relative "lithic/models/auth_rules/v2/backtest_retrieve_params" @@ -135,6 +139,8 @@ require_relative "lithic/models/auth_rules/v2_list_params" require_relative "lithic/models/auth_rules/v2_list_results_params" require_relative "lithic/models/auth_rules/v2_list_results_response" +require_relative "lithic/models/auth_rules/v2_list_versions_params" +require_relative "lithic/models/auth_rules/v2_list_versions_response" require_relative "lithic/models/auth_rules/v2_promote_params" require_relative "lithic/models/auth_rules/v2_retrieve_features_params" require_relative "lithic/models/auth_rules/v2_retrieve_features_response" @@ -142,6 +148,7 @@ require_relative "lithic/models/auth_rules/v2_retrieve_report_params" require_relative "lithic/models/auth_rules/v2_retrieve_report_response" require_relative "lithic/models/auth_rules/v2_update_params" +require_relative "lithic/models/auth_rules/velocity_limit_filters" require_relative "lithic/models/auth_rules/velocity_limit_params" require_relative "lithic/models/auth_rules/velocity_limit_period" require_relative "lithic/models/auth_rules_backtest_report_created_webhook_event" @@ -320,6 +327,12 @@ require_relative "lithic/models/funding_event_retrieve_details_params" require_relative "lithic/models/funding_event_retrieve_details_response" require_relative "lithic/models/funding_event_retrieve_params" +require_relative "lithic/models/hold" +require_relative "lithic/models/hold_create_params" +require_relative "lithic/models/hold_event" +require_relative "lithic/models/hold_list_params" +require_relative "lithic/models/hold_retrieve_params" +require_relative "lithic/models/hold_void_params" require_relative "lithic/models/instance_financial_account_type" require_relative "lithic/models/internal_transaction_created_webhook_event" require_relative "lithic/models/internal_transaction_updated_webhook_event" @@ -397,7 +410,6 @@ require_relative "lithic/models/tokenization_activate_params" require_relative "lithic/models/tokenization_approval_request_webhook_event" require_relative "lithic/models/tokenization_deactivate_params" -require_relative "lithic/models/tokenization_decisioning_request_webhook_event" require_relative "lithic/models/tokenization_decisioning_retrieve_secret_params" require_relative "lithic/models/tokenization_decisioning_rotate_secret_params" require_relative "lithic/models/tokenization_decisioning_rotate_secret_response" @@ -485,6 +497,7 @@ require_relative "lithic/resources/fraud" require_relative "lithic/resources/fraud/transactions" require_relative "lithic/resources/funding_events" +require_relative "lithic/resources/holds" require_relative "lithic/resources/internal_transaction" require_relative "lithic/resources/management_operations" require_relative "lithic/resources/network_programs" diff --git a/lib/lithic/client.rb b/lib/lithic/client.rb index 38a4fa92..8b78c197 100644 --- a/lib/lithic/client.rb +++ b/lib/lithic/client.rb @@ -23,6 +23,9 @@ class Client < Lithic::Internal::Transport::BaseClient # @return [String] attr_reader :api_key + # @return [String, nil] + attr_reader :webhook_secret + # @return [Lithic::Resources::Accounts] attr_reader :accounts @@ -113,6 +116,9 @@ class Client < Lithic::Internal::Transport::BaseClient # @return [Lithic::Resources::NetworkPrograms] attr_reader :network_programs + # @return [Lithic::Resources::Holds] + attr_reader :holds + # @return [Lithic::Resources::AccountActivity] attr_reader :account_activity @@ -146,6 +152,8 @@ def api_status(params = {}) # # @param api_key [String, nil] Defaults to `ENV["LITHIC_API_KEY"]` # + # @param webhook_secret [String, nil] Defaults to `ENV["LITHIC_WEBHOOK_SECRET"]` + # # @param environment [:production, :sandbox, nil] Specifies the environment to use for the API. # # Each environment maps to a different base URL: @@ -165,6 +173,7 @@ def api_status(params = {}) # @param max_retry_delay [Float] def initialize( api_key: ENV["LITHIC_API_KEY"], + webhook_secret: ENV["LITHIC_WEBHOOK_SECRET"], environment: nil, base_url: ENV["LITHIC_BASE_URL"], max_retries: self.class::DEFAULT_MAX_RETRIES, @@ -182,6 +191,7 @@ def initialize( end @api_key = api_key.to_s + @webhook_secret = webhook_secret&.to_s super( base_url: base_url, @@ -221,6 +231,7 @@ def initialize( @funding_events = Lithic::Resources::FundingEvents.new(client: self) @fraud = Lithic::Resources::Fraud.new(client: self) @network_programs = Lithic::Resources::NetworkPrograms.new(client: self) + @holds = Lithic::Resources::Holds.new(client: self) @account_activity = Lithic::Resources::AccountActivity.new(client: self) @transfer_limits = Lithic::Resources::TransferLimits.new(client: self) @webhooks = Lithic::Resources::Webhooks.new(client: self) diff --git a/lib/lithic/models.rb b/lib/lithic/models.rb index 3489ad54..e8b01997 100644 --- a/lib/lithic/models.rb +++ b/lib/lithic/models.rb @@ -365,6 +365,18 @@ module Lithic FundingEventRetrieveParams = Lithic::Models::FundingEventRetrieveParams + Hold = Lithic::Models::Hold + + HoldCreateParams = Lithic::Models::HoldCreateParams + + HoldEvent = Lithic::Models::HoldEvent + + HoldListParams = Lithic::Models::HoldListParams + + HoldRetrieveParams = Lithic::Models::HoldRetrieveParams + + HoldVoidParams = Lithic::Models::HoldVoidParams + InstanceFinancialAccountType = Lithic::Models::InstanceFinancialAccountType InternalTransactionAPI = Lithic::Models::InternalTransactionAPI @@ -498,8 +510,6 @@ module Lithic TokenizationDeactivateParams = Lithic::Models::TokenizationDeactivateParams - TokenizationDecisioningRequestWebhookEvent = Lithic::Models::TokenizationDecisioningRequestWebhookEvent - TokenizationDecisioningRetrieveSecretParams = Lithic::Models::TokenizationDecisioningRetrieveSecretParams TokenizationDecisioningRotateSecretParams = Lithic::Models::TokenizationDecisioningRotateSecretParams diff --git a/lib/lithic/models/account_activity_list_params.rb b/lib/lithic/models/account_activity_list_params.rb index 9598c497..266e2537 100644 --- a/lib/lithic/models/account_activity_list_params.rb +++ b/lib/lithic/models/account_activity_list_params.rb @@ -110,6 +110,7 @@ module Category extend Lithic::Internal::Type::Enum ACH = :ACH + WIRE = :WIRE BALANCE_OR_FUNDING = :BALANCE_OR_FUNDING FEE = :FEE REWARD = :REWARD @@ -128,6 +129,7 @@ module Category MANAGEMENT_FEE = :MANAGEMENT_FEE MANAGEMENT_REWARD = :MANAGEMENT_REWARD MANAGEMENT_DISBURSEMENT = :MANAGEMENT_DISBURSEMENT + HOLD = :HOLD PROGRAM_FUNDING = :PROGRAM_FUNDING # @!method self.values diff --git a/lib/lithic/models/account_activity_list_response.rb b/lib/lithic/models/account_activity_list_response.rb index 942e29e9..b78f1541 100644 --- a/lib/lithic/models/account_activity_list_response.rb +++ b/lib/lithic/models/account_activity_list_response.rb @@ -6,7 +6,8 @@ module Models # which transaction type is returned: INTERNAL returns FinancialTransaction, # TRANSFER returns BookTransferTransaction, CARD returns CardTransaction, PAYMENT # returns PaymentTransaction, EXTERNAL_PAYMENT returns ExternalPaymentResponse, - # and MANAGEMENT_OPERATION returns ManagementOperationTransaction + # MANAGEMENT_OPERATION returns ManagementOperationTransaction, and HOLD returns + # HoldTransaction # # @see Lithic::Resources::AccountActivity#list module AccountActivityListResponse @@ -30,6 +31,9 @@ module AccountActivityListResponse variant :MANAGEMENT_OPERATION, -> { Lithic::ManagementOperationTransaction } + # A hold transaction representing reserved funds on a financial account. Holds move funds from available to pending balance in anticipation of future payments. They can be resolved via settlement (linked to payment), manual release, or expiration. + variant :HOLD, -> { Lithic::Hold } + class Internal < Lithic::Internal::Type::BaseModel # @!attribute token # Unique identifier for the transaction @@ -145,6 +149,7 @@ module Category extend Lithic::Internal::Type::Enum ACH = :ACH + WIRE = :WIRE BALANCE_OR_FUNDING = :BALANCE_OR_FUNDING FEE = :FEE REWARD = :REWARD @@ -163,6 +168,7 @@ module Category MANAGEMENT_FEE = :MANAGEMENT_FEE MANAGEMENT_REWARD = :MANAGEMENT_REWARD MANAGEMENT_DISBURSEMENT = :MANAGEMENT_DISBURSEMENT + HOLD = :HOLD PROGRAM_FUNDING = :PROGRAM_FUNDING # @!method self.values @@ -261,7 +267,7 @@ module Status end # @!method self.variants - # @return [Array(Lithic::Models::AccountActivityListResponse::Internal, Lithic::Models::BookTransferResponse, Lithic::Models::AccountActivityListResponse::Card, Lithic::Models::Payment, Lithic::Models::ExternalPayment, Lithic::Models::ManagementOperationTransaction)] + # @return [Array(Lithic::Models::AccountActivityListResponse::Internal, Lithic::Models::BookTransferResponse, Lithic::Models::AccountActivityListResponse::Card, Lithic::Models::Payment, Lithic::Models::ExternalPayment, Lithic::Models::ManagementOperationTransaction, Lithic::Models::Hold)] end end end diff --git a/lib/lithic/models/account_activity_retrieve_transaction_response.rb b/lib/lithic/models/account_activity_retrieve_transaction_response.rb index 6bd65c47..3ce6d9cd 100644 --- a/lib/lithic/models/account_activity_retrieve_transaction_response.rb +++ b/lib/lithic/models/account_activity_retrieve_transaction_response.rb @@ -6,7 +6,8 @@ module Models # which transaction type is returned: INTERNAL returns FinancialTransaction, # TRANSFER returns BookTransferTransaction, CARD returns CardTransaction, PAYMENT # returns PaymentTransaction, EXTERNAL_PAYMENT returns ExternalPaymentResponse, - # and MANAGEMENT_OPERATION returns ManagementOperationTransaction + # MANAGEMENT_OPERATION returns ManagementOperationTransaction, and HOLD returns + # HoldTransaction # # @see Lithic::Resources::AccountActivity#retrieve_transaction module AccountActivityRetrieveTransactionResponse @@ -30,6 +31,9 @@ module AccountActivityRetrieveTransactionResponse variant :MANAGEMENT_OPERATION, -> { Lithic::ManagementOperationTransaction } + # A hold transaction representing reserved funds on a financial account. Holds move funds from available to pending balance in anticipation of future payments. They can be resolved via settlement (linked to payment), manual release, or expiration. + variant :HOLD, -> { Lithic::Hold } + class Internal < Lithic::Internal::Type::BaseModel # @!attribute token # Unique identifier for the transaction @@ -148,6 +152,7 @@ module Category extend Lithic::Internal::Type::Enum ACH = :ACH + WIRE = :WIRE BALANCE_OR_FUNDING = :BALANCE_OR_FUNDING FEE = :FEE REWARD = :REWARD @@ -166,6 +171,7 @@ module Category MANAGEMENT_FEE = :MANAGEMENT_FEE MANAGEMENT_REWARD = :MANAGEMENT_REWARD MANAGEMENT_DISBURSEMENT = :MANAGEMENT_DISBURSEMENT + HOLD = :HOLD PROGRAM_FUNDING = :PROGRAM_FUNDING # @!method self.values @@ -264,7 +270,7 @@ module Status end # @!method self.variants - # @return [Array(Lithic::Models::AccountActivityRetrieveTransactionResponse::Internal, Lithic::Models::BookTransferResponse, Lithic::Models::AccountActivityRetrieveTransactionResponse::Card, Lithic::Models::Payment, Lithic::Models::ExternalPayment, Lithic::Models::ManagementOperationTransaction)] + # @return [Array(Lithic::Models::AccountActivityRetrieveTransactionResponse::Internal, Lithic::Models::BookTransferResponse, Lithic::Models::AccountActivityRetrieveTransactionResponse::Card, Lithic::Models::Payment, Lithic::Models::ExternalPayment, Lithic::Models::ManagementOperationTransaction, Lithic::Models::Hold)] end end end diff --git a/lib/lithic/models/auth_rules/auth_rule.rb b/lib/lithic/models/auth_rules/auth_rule.rb index 845b612d..7dcf0db0 100644 --- a/lib/lithic/models/auth_rules/auth_rule.rb +++ b/lib/lithic/models/auth_rules/auth_rule.rb @@ -82,17 +82,31 @@ class AuthRule < Lithic::Internal::Type::BaseModel # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, + # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. # # @return [Symbol, Lithic::Models::AuthRules::AuthRule::Type] required :type, enum: -> { Lithic::AuthRules::AuthRule::Type } + # @!attribute excluded_account_tokens + # Account tokens to which the Auth Rule does not apply. + # + # @return [Array, nil] + optional :excluded_account_tokens, Lithic::Internal::Type::ArrayOf[String] + + # @!attribute excluded_business_account_tokens + # Business account tokens to which the Auth Rule does not apply. + # + # @return [Array, nil] + optional :excluded_business_account_tokens, Lithic::Internal::Type::ArrayOf[String] + # @!attribute excluded_card_tokens # Card tokens to which the Auth Rule does not apply. # # @return [Array, nil] optional :excluded_card_tokens, Lithic::Internal::Type::ArrayOf[String] - # @!method initialize(token:, account_tokens:, business_account_tokens:, card_tokens:, current_version:, draft_version:, event_stream:, lithic_managed:, name:, program_level:, state:, type:, excluded_card_tokens: nil) + # @!method initialize(token:, account_tokens:, business_account_tokens:, card_tokens:, current_version:, draft_version:, event_stream:, lithic_managed:, name:, program_level:, state:, type:, excluded_account_tokens: nil, excluded_business_account_tokens: nil, excluded_card_tokens: nil) # Some parameter documentations has been truncated, see # {Lithic::Models::AuthRules::AuthRule} for more details. # @@ -120,6 +134,10 @@ class AuthRule < Lithic::Internal::Type::BaseModel # # @param type [Symbol, Lithic::Models::AuthRules::AuthRule::Type] The type of Auth Rule. For certain rule types, this determines the event stream # + # @param excluded_account_tokens [Array] Account tokens to which the Auth Rule does not apply. + # + # @param excluded_business_account_tokens [Array] Business account tokens to which the Auth Rule does not apply. + # # @param excluded_card_tokens [Array] Card tokens to which the Auth Rule does not apply. # @see Lithic::Models::AuthRules::AuthRule#current_version @@ -127,7 +145,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] + # @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::TypescriptCodeParameters] required :parameters, union: -> { Lithic::AuthRules::AuthRule::CurrentVersion::Parameters } response_only do @@ -143,7 +161,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] 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::TypescriptCodeParameters] Parameters for the Auth Rule # # @param version [Integer] The version of the rule, this is incremented whenever the rule's parameters chan @@ -168,19 +186,44 @@ module Parameters variant -> { Lithic::AuthRules::ConditionalTokenizationActionParameters } + # Parameters for defining a TypeScript code rule + variant -> { Lithic::AuthRules::TypescriptCodeParameters } + # @!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)] + # @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::TypescriptCodeParameters)] end end # @see Lithic::Models::AuthRules::AuthRule#draft_version class DraftVersion < Lithic::Internal::Type::BaseModel + # @!attribute error + # An error message if the draft version failed compilation. Populated when `state` + # is `ERROR`, `null` otherwise. + # + # @return [String, nil] + required :error, String, nil?: true + # @!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] + # @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::TypescriptCodeParameters] required :parameters, union: -> { Lithic::AuthRules::AuthRule::DraftVersion::Parameters } + # @!attribute state + # The state of the draft version. Most rules are created synchronously and the + # state is immediately `SHADOWING`. Rules backed by TypeScript code are compiled + # asynchronously — the state starts as `PENDING` and transitions to `SHADOWING` on + # success or `ERROR` on failure. + # + # - `PENDING`: Compilation of the rule is in progress (TypeScript rules only). + # - `SHADOWING`: The draft version is ready and evaluating in shadow mode + # alongside the current active version. It can be promoted to the active + # version. + # - `ERROR`: Compilation of the rule failed. Check the `error` field for details. + # + # @return [Symbol, Lithic::Models::AuthRules::AuthRule::DraftVersion::State] + required :state, enum: -> { Lithic::AuthRules::AuthRule::DraftVersion::State } + response_only do # @!attribute version # The version of the rule, this is incremented whenever the rule's parameters @@ -190,11 +233,15 @@ class DraftVersion < Lithic::Internal::Type::BaseModel required :version, Integer end - # @!method initialize(parameters:, version:) + # @!method initialize(error:, parameters:, state:, version:) # Some parameter documentations has been truncated, see # {Lithic::Models::AuthRules::AuthRule::DraftVersion} 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] Parameters for the Auth Rule + # @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::TypescriptCodeParameters] 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 # # @param version [Integer] The version of the rule, this is incremented whenever the rule's parameters chan @@ -219,8 +266,34 @@ module Parameters variant -> { Lithic::AuthRules::ConditionalTokenizationActionParameters } + # Parameters for defining a TypeScript code rule + variant -> { Lithic::AuthRules::TypescriptCodeParameters } + # @!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)] + # @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::TypescriptCodeParameters)] + end + + # The state of the draft version. Most rules are created synchronously and the + # state is immediately `SHADOWING`. Rules backed by TypeScript code are compiled + # asynchronously — the state starts as `PENDING` and transitions to `SHADOWING` on + # success or `ERROR` on failure. + # + # - `PENDING`: Compilation of the rule is in progress (TypeScript rules only). + # - `SHADOWING`: The draft version is ready and evaluating in shadow mode + # alongside the current active version. It can be promoted to the active + # version. + # - `ERROR`: Compilation of the rule failed. Check the `error` field for details. + # + # @see Lithic::Models::AuthRules::AuthRule::DraftVersion#state + module State + extend Lithic::Internal::Type::Enum + + PENDING = :PENDING + SHADOWING = :SHADOWING + ERROR = :ERROR + + # @!method self.values + # @return [Array] end end @@ -248,6 +321,8 @@ module State # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, + # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. # # @see Lithic::Models::AuthRules::AuthRule#type module Type @@ -257,6 +332,7 @@ module Type VELOCITY_LIMIT = :VELOCITY_LIMIT MERCHANT_LOCK = :MERCHANT_LOCK CONDITIONAL_ACTION = :CONDITIONAL_ACTION + TYPESCRIPT_CODE = :TYPESCRIPT_CODE # @!method self.values # @return [Array] diff --git a/lib/lithic/models/auth_rules/auth_rule_version.rb b/lib/lithic/models/auth_rules/auth_rule_version.rb new file mode 100644 index 00000000..8732239e --- /dev/null +++ b/lib/lithic/models/auth_rules/auth_rule_version.rb @@ -0,0 +1,92 @@ +# frozen_string_literal: true + +module Lithic + module Models + module AuthRules + class AuthRuleVersion < Lithic::Internal::Type::BaseModel + # @!attribute created + # Timestamp of when this version was created. + # + # @return [Time] + required :created, Time + + # @!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::TypescriptCodeParameters] + required :parameters, union: -> { Lithic::AuthRules::AuthRuleVersion::Parameters } + + # @!attribute state + # The current state of this version. + # + # @return [Symbol, Lithic::Models::AuthRules::AuthRuleVersion::State] + required :state, enum: -> { Lithic::AuthRules::AuthRuleVersion::State } + + response_only do + # @!attribute version + # The version of the rule, this is incremented whenever the rule's parameters + # change. + # + # @return [Integer] + required :version, Integer + end + + # @!method initialize(created:, parameters:, state:, version:) + # Some parameter documentations has been truncated, see + # {Lithic::Models::AuthRules::AuthRuleVersion} for more details. + # + # @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::TypescriptCodeParameters] Parameters for the Auth Rule + # + # @param state [Symbol, Lithic::Models::AuthRules::AuthRuleVersion::State] The current state of this version. + # + # @param version [Integer] The version of the rule, this is incremented whenever the rule's parameters chan + + # Parameters for the Auth Rule + # + # @see Lithic::Models::AuthRules::AuthRuleVersion#parameters + module Parameters + extend Lithic::Internal::Type::Union + + # Deprecated: Use CONDITIONAL_ACTION instead. + variant -> { Lithic::AuthRules::ConditionalBlockParameters } + + variant -> { Lithic::AuthRules::VelocityLimitParams } + + variant -> { Lithic::AuthRules::MerchantLockParameters } + + variant -> { Lithic::AuthRules::Conditional3DSActionParameters } + + variant -> { Lithic::AuthRules::ConditionalAuthorizationActionParameters } + + variant -> { Lithic::AuthRules::ConditionalACHActionParameters } + + variant -> { Lithic::AuthRules::ConditionalTokenizationActionParameters } + + # Parameters for defining a TypeScript code rule + variant -> { Lithic::AuthRules::TypescriptCodeParameters } + + # @!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::TypescriptCodeParameters)] + end + + # The current state of this version. + # + # @see Lithic::Models::AuthRules::AuthRuleVersion#state + module State + extend Lithic::Internal::Type::Enum + + ACTIVE = :ACTIVE + SHADOW = :SHADOW + INACTIVE = :INACTIVE + + # @!method self.values + # @return [Array] + end + end + end + + AuthRuleVersion = AuthRules::AuthRuleVersion + end +end diff --git a/lib/lithic/models/auth_rules/rule_feature.rb b/lib/lithic/models/auth_rules/rule_feature.rb new file mode 100644 index 00000000..17fe22de --- /dev/null +++ b/lib/lithic/models/auth_rules/rule_feature.rb @@ -0,0 +1,231 @@ +# frozen_string_literal: true + +module Lithic + module Models + module AuthRules + # A feature made available to the rule. The `name` field is the variable name used + # in the rule function signature. The `type` field determines which data the + # feature provides to the rule at evaluation time. + # + # - `AUTHORIZATION`: The authorization request being evaluated. Only available for + # AUTHORIZATION event stream rules. + # - `AUTHENTICATION`: The 3DS authentication request being evaluated. Only + # available for THREE_DS_AUTHENTICATION event stream rules. + # - `TOKENIZATION`: The tokenization request being evaluated. Only available for + # TOKENIZATION event stream rules. + # - `ACH_RECEIPT`: The ACH receipt being evaluated. Only available for + # ACH_CREDIT_RECEIPT and ACH_DEBIT_RECEIPT event stream rules. + # - `CARD`: The card associated with the event. Available for AUTHORIZATION and + # THREE_DS_AUTHENTICATION event stream rules. + # - `ACCOUNT_HOLDER`: The account holder associated with the card. Available for + # THREE_DS_AUTHENTICATION 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 + # `scope`, `period`, and optionally `filters` to configure the velocity + # calculation. Available for AUTHORIZATION event stream rules. + module RuleFeature + extend Lithic::Internal::Type::Union + + variant -> { Lithic::AuthRules::RuleFeature::AuthorizationFeature } + + variant -> { Lithic::AuthRules::RuleFeature::AuthenticationFeature } + + variant -> { Lithic::AuthRules::RuleFeature::TokenizationFeature } + + variant -> { Lithic::AuthRules::RuleFeature::ACHReceiptFeature } + + variant -> { Lithic::AuthRules::RuleFeature::CardFeature } + + variant -> { Lithic::AuthRules::RuleFeature::AccountHolderFeature } + + variant -> { Lithic::AuthRules::RuleFeature::IPMetadataFeature } + + variant -> { Lithic::AuthRules::RuleFeature::SpendVelocityFeature } + + class AuthorizationFeature < Lithic::Internal::Type::BaseModel + # @!attribute type + # + # @return [Symbol, :AUTHORIZATION] + required :type, const: :AUTHORIZATION + + # @!attribute name + # The variable name for this feature in the rule function signature + # + # @return [String, nil] + optional :name, String + + # @!method initialize(name: nil, type: :AUTHORIZATION) + # @param name [String] The variable name for this feature in the rule function signature + # + # @param type [Symbol, :AUTHORIZATION] + end + + class AuthenticationFeature < Lithic::Internal::Type::BaseModel + # @!attribute type + # + # @return [Symbol, :AUTHENTICATION] + required :type, const: :AUTHENTICATION + + # @!attribute name + # The variable name for this feature in the rule function signature + # + # @return [String, nil] + optional :name, String + + # @!method initialize(name: nil, type: :AUTHENTICATION) + # @param name [String] The variable name for this feature in the rule function signature + # + # @param type [Symbol, :AUTHENTICATION] + end + + class TokenizationFeature < Lithic::Internal::Type::BaseModel + # @!attribute type + # + # @return [Symbol, :TOKENIZATION] + required :type, const: :TOKENIZATION + + # @!attribute name + # The variable name for this feature in the rule function signature + # + # @return [String, nil] + optional :name, String + + # @!method initialize(name: nil, type: :TOKENIZATION) + # @param name [String] The variable name for this feature in the rule function signature + # + # @param type [Symbol, :TOKENIZATION] + end + + class ACHReceiptFeature < Lithic::Internal::Type::BaseModel + # @!attribute type + # + # @return [Symbol, :ACH_RECEIPT] + required :type, const: :ACH_RECEIPT + + # @!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_RECEIPT) + # @param name [String] The variable name for this feature in the rule function signature + # + # @param type [Symbol, :ACH_RECEIPT] + end + + class CardFeature < Lithic::Internal::Type::BaseModel + # @!attribute type + # + # @return [Symbol, :CARD] + required :type, const: :CARD + + # @!attribute name + # The variable name for this feature in the rule function signature + # + # @return [String, nil] + optional :name, String + + # @!method initialize(name: nil, type: :CARD) + # @param name [String] The variable name for this feature in the rule function signature + # + # @param type [Symbol, :CARD] + end + + class AccountHolderFeature < Lithic::Internal::Type::BaseModel + # @!attribute type + # + # @return [Symbol, :ACCOUNT_HOLDER] + required :type, const: :ACCOUNT_HOLDER + + # @!attribute name + # The variable name for this feature in the rule function signature + # + # @return [String, nil] + optional :name, String + + # @!method initialize(name: nil, type: :ACCOUNT_HOLDER) + # @param name [String] The variable name for this feature in the rule function signature + # + # @param type [Symbol, :ACCOUNT_HOLDER] + end + + class IPMetadataFeature < Lithic::Internal::Type::BaseModel + # @!attribute type + # + # @return [Symbol, :IP_METADATA] + required :type, const: :IP_METADATA + + # @!attribute name + # The variable name for this feature in the rule function signature + # + # @return [String, nil] + optional :name, String + + # @!method initialize(name: nil, type: :IP_METADATA) + # @param name [String] The variable name for this feature in the rule function signature + # + # @param type [Symbol, :IP_METADATA] + end + + class SpendVelocityFeature < Lithic::Internal::Type::BaseModel + # @!attribute period + # Velocity over the current day since 00:00 / 12 AM in Eastern Time + # + # @return [Lithic::Models::AuthRules::VelocityLimitPeriod::TrailingWindowObject, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowDay, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowWeek, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowMonth, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowYear] + required :period, union: -> { Lithic::AuthRules::VelocityLimitPeriod } + + # @!attribute scope + # The scope the velocity is calculated for + # + # @return [Symbol, Lithic::Models::AuthRules::RuleFeature::SpendVelocityFeature::Scope] + required :scope, enum: -> { Lithic::AuthRules::RuleFeature::SpendVelocityFeature::Scope } + + # @!attribute type + # + # @return [Symbol, :SPEND_VELOCITY] + required :type, const: :SPEND_VELOCITY + + # @!attribute filters + # + # @return [Lithic::Models::AuthRules::VelocityLimitFilters, nil] + optional :filters, -> { Lithic::AuthRules::VelocityLimitFilters } + + # @!attribute name + # The variable name for this feature in the rule function signature + # + # @return [String, nil] + optional :name, String + + # @!method initialize(period:, scope:, filters: nil, name: nil, type: :SPEND_VELOCITY) + # @param period [Lithic::Models::AuthRules::VelocityLimitPeriod::TrailingWindowObject, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowDay, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowWeek, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowMonth, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowYear] Velocity over the current day since 00:00 / 12 AM in Eastern Time + # + # @param scope [Symbol, Lithic::Models::AuthRules::RuleFeature::SpendVelocityFeature::Scope] The scope the velocity is calculated for + # + # @param filters [Lithic::Models::AuthRules::VelocityLimitFilters] + # + # @param name [String] The variable name for this feature in the rule function signature + # + # @param type [Symbol, :SPEND_VELOCITY] + + # The scope the velocity is calculated for + # + # @see Lithic::Models::AuthRules::RuleFeature::SpendVelocityFeature#scope + module Scope + extend Lithic::Internal::Type::Enum + + CARD = :CARD + ACCOUNT = :ACCOUNT + + # @!method self.values + # @return [Array] + end + end + + # @!method self.variants + # @return [Array(Lithic::Models::AuthRules::RuleFeature::AuthorizationFeature, Lithic::Models::AuthRules::RuleFeature::AuthenticationFeature, Lithic::Models::AuthRules::RuleFeature::TokenizationFeature, Lithic::Models::AuthRules::RuleFeature::ACHReceiptFeature, Lithic::Models::AuthRules::RuleFeature::CardFeature, Lithic::Models::AuthRules::RuleFeature::AccountHolderFeature, Lithic::Models::AuthRules::RuleFeature::IPMetadataFeature, Lithic::Models::AuthRules::RuleFeature::SpendVelocityFeature)] + end + 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 new file mode 100644 index 00000000..0eb2bd6a --- /dev/null +++ b/lib/lithic/models/auth_rules/typescript_code_parameters.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +module Lithic + module Models + module AuthRules + class TypescriptCodeParameters < Lithic::Internal::Type::BaseModel + # @!attribute code + # The TypeScript source code of the rule. Must define a `rule()` function that + # accepts the declared features as positional arguments (in the same order as the + # `features` array) and returns an array of actions. + # + # @return [String] + required :code, String + + # @!attribute features + # Features available to the TypeScript code at evaluation time + # + # @return [Array] + required :features, -> { Lithic::Internal::Type::ArrayOf[union: Lithic::AuthRules::RuleFeature] } + + # @!method initialize(code:, features:) + # Some parameter documentations has been truncated, see + # {Lithic::Models::AuthRules::TypescriptCodeParameters} for more details. + # + # Parameters for defining a TypeScript code rule + # + # @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 + end + end + end +end diff --git a/lib/lithic/models/auth_rules/v2/backtest_results.rb b/lib/lithic/models/auth_rules/v2/backtest_results.rb index 1eadd95f..3b3e50bf 100644 --- a/lib/lithic/models/auth_rules/v2/backtest_results.rb +++ b/lib/lithic/models/auth_rules/v2/backtest_results.rb @@ -48,30 +48,22 @@ class Results < Lithic::Internal::Type::BaseModel # @see Lithic::Models::AuthRules::V2::BacktestResults#simulation_parameters class SimulationParameters < Lithic::Internal::Type::BaseModel - # @!attribute auth_rule_token - # Auth Rule Token - # - # @return [String, nil] - optional :auth_rule_token, String - # @!attribute end_ - # The end time of the simulation. + # The end time of the simulation # - # @return [Time, nil] - optional :end_, Time, api_name: :end + # @return [Time] + required :end_, Time, api_name: :end # @!attribute start - # The start time of the simulation. + # The start time of the simulation # - # @return [Time, nil] - optional :start, Time + # @return [Time] + required :start, Time - # @!method initialize(auth_rule_token: nil, end_: nil, start: nil) - # @param auth_rule_token [String] Auth Rule Token - # - # @param end_ [Time] The end time of the simulation. + # @!method initialize(end_:, start:) + # @param end_ [Time] The end time of the simulation # - # @param start [Time] The start time of the simulation. + # @param start [Time] The start time of the simulation 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 04f18cd5..0c795bf5 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] + # @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::TypescriptCodeParameters] required :parameters, union: -> { Lithic::AuthRules::V2CreateParams::Body::AccountLevelRule::Parameters } # @!attribute type @@ -45,6 +45,8 @@ class AccountLevelRule < Lithic::Internal::Type::BaseModel # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, + # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. # # @return [Symbol, Lithic::Models::AuthRules::V2CreateParams::Body::AccountLevelRule::Type] required :type, enum: -> { Lithic::AuthRules::V2CreateParams::Body::AccountLevelRule::Type } @@ -78,7 +80,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] 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::TypescriptCodeParameters] 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 # @@ -111,8 +113,11 @@ module Parameters variant -> { Lithic::AuthRules::ConditionalTokenizationActionParameters } + # Parameters for defining a TypeScript code rule + variant -> { Lithic::AuthRules::TypescriptCodeParameters } + # @!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)] + # @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::TypescriptCodeParameters)] end # The type of Auth Rule. For certain rule types, this determines the event stream @@ -126,6 +131,8 @@ module Parameters # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, + # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. # # @see Lithic::Models::AuthRules::V2CreateParams::Body::AccountLevelRule#type module Type @@ -135,6 +142,7 @@ module Type VELOCITY_LIMIT = :VELOCITY_LIMIT MERCHANT_LOCK = :MERCHANT_LOCK CONDITIONAL_ACTION = :CONDITIONAL_ACTION + TYPESCRIPT_CODE = :TYPESCRIPT_CODE # @!method self.values # @return [Array] @@ -151,7 +159,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] + # @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::TypescriptCodeParameters] required :parameters, union: -> { Lithic::AuthRules::V2CreateParams::Body::CardLevelRule::Parameters } # @!attribute type @@ -166,6 +174,8 @@ class CardLevelRule < Lithic::Internal::Type::BaseModel # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, + # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. # # @return [Symbol, Lithic::Models::AuthRules::V2CreateParams::Body::CardLevelRule::Type] required :type, enum: -> { Lithic::AuthRules::V2CreateParams::Body::CardLevelRule::Type } @@ -189,7 +199,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] 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::TypescriptCodeParameters] 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 # @@ -218,8 +228,11 @@ module Parameters variant -> { Lithic::AuthRules::ConditionalTokenizationActionParameters } + # Parameters for defining a TypeScript code rule + variant -> { Lithic::AuthRules::TypescriptCodeParameters } + # @!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)] + # @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::TypescriptCodeParameters)] end # The type of Auth Rule. For certain rule types, this determines the event stream @@ -233,6 +246,8 @@ module Parameters # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, + # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. # # @see Lithic::Models::AuthRules::V2CreateParams::Body::CardLevelRule#type module Type @@ -242,6 +257,7 @@ module Type VELOCITY_LIMIT = :VELOCITY_LIMIT MERCHANT_LOCK = :MERCHANT_LOCK CONDITIONAL_ACTION = :CONDITIONAL_ACTION + TYPESCRIPT_CODE = :TYPESCRIPT_CODE # @!method self.values # @return [Array] @@ -252,7 +268,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] + # @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::TypescriptCodeParameters] required :parameters, union: -> { Lithic::AuthRules::V2CreateParams::Body::ProgramLevelRule::Parameters } # @!attribute program_level @@ -273,6 +289,8 @@ class ProgramLevelRule < Lithic::Internal::Type::BaseModel # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, + # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. # # @return [Symbol, Lithic::Models::AuthRules::V2CreateParams::Body::ProgramLevelRule::Type] required :type, enum: -> { Lithic::AuthRules::V2CreateParams::Body::ProgramLevelRule::Type } @@ -283,6 +301,18 @@ class ProgramLevelRule < Lithic::Internal::Type::BaseModel # @return [Symbol, Lithic::Models::AuthRules::EventStream, nil] optional :event_stream, enum: -> { Lithic::AuthRules::EventStream } + # @!attribute excluded_account_tokens + # Account tokens to which the Auth Rule does not apply. + # + # @return [Array, nil] + optional :excluded_account_tokens, Lithic::Internal::Type::ArrayOf[String] + + # @!attribute excluded_business_account_tokens + # Business account tokens to which the Auth Rule does not apply. + # + # @return [Array, nil] + optional :excluded_business_account_tokens, Lithic::Internal::Type::ArrayOf[String] + # @!attribute excluded_card_tokens # Card tokens to which the Auth Rule does not apply. # @@ -295,12 +325,12 @@ class ProgramLevelRule < Lithic::Internal::Type::BaseModel # @return [String, nil] optional :name, String, nil?: true - # @!method initialize(parameters:, program_level:, type:, event_stream: nil, excluded_card_tokens: nil, name: nil) + # @!method initialize(parameters:, program_level:, type:, event_stream: nil, excluded_account_tokens: nil, excluded_business_account_tokens: nil, excluded_card_tokens: nil, name: nil) # Some parameter documentations has been truncated, see # {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] 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::TypescriptCodeParameters] Parameters for the Auth Rule # # @param program_level [Boolean] Whether the Auth Rule applies to all authorizations on the card program. # @@ -308,6 +338,10 @@ class ProgramLevelRule < Lithic::Internal::Type::BaseModel # # @param event_stream [Symbol, Lithic::Models::AuthRules::EventStream] The event stream during which the rule will be evaluated. # + # @param excluded_account_tokens [Array] Account tokens to which the Auth Rule does not apply. + # + # @param excluded_business_account_tokens [Array] Business account tokens to which the Auth Rule does not apply. + # # @param excluded_card_tokens [Array] Card tokens to which the Auth Rule does not apply. # # @param name [String, nil] Auth Rule Name @@ -333,8 +367,11 @@ module Parameters variant -> { Lithic::AuthRules::ConditionalTokenizationActionParameters } + # Parameters for defining a TypeScript code rule + variant -> { Lithic::AuthRules::TypescriptCodeParameters } + # @!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)] + # @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::TypescriptCodeParameters)] end # The type of Auth Rule. For certain rule types, this determines the event stream @@ -348,6 +385,8 @@ module Parameters # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, + # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. # # @see Lithic::Models::AuthRules::V2CreateParams::Body::ProgramLevelRule#type module Type @@ -357,6 +396,7 @@ module Type VELOCITY_LIMIT = :VELOCITY_LIMIT MERCHANT_LOCK = :MERCHANT_LOCK CONDITIONAL_ACTION = :CONDITIONAL_ACTION + TYPESCRIPT_CODE = :TYPESCRIPT_CODE # @!method self.values # @return [Array] diff --git a/lib/lithic/models/auth_rules/v2_draft_params.rb b/lib/lithic/models/auth_rules/v2_draft_params.rb index 5f2da570..022e5927 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, 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::TypescriptCodeParameters, 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, 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::TypescriptCodeParameters, nil] Parameters for the Auth Rule # # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] @@ -45,8 +45,11 @@ module Parameters variant -> { Lithic::AuthRules::ConditionalTokenizationActionParameters } + # Parameters for defining a TypeScript code rule + variant -> { Lithic::AuthRules::TypescriptCodeParameters } + # @!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)] + # @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::TypescriptCodeParameters)] end end end diff --git a/lib/lithic/models/auth_rules/v2_list_versions_params.rb b/lib/lithic/models/auth_rules/v2_list_versions_params.rb new file mode 100644 index 00000000..1047a2f7 --- /dev/null +++ b/lib/lithic/models/auth_rules/v2_list_versions_params.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +module Lithic + module Models + module AuthRules + # @see Lithic::Resources::AuthRules::V2#list_versions + class V2ListVersionsParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute auth_rule_token + # + # @return [String] + required :auth_rule_token, String + + # @!method initialize(auth_rule_token:, request_options: {}) + # @param auth_rule_token [String] + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + end + end + end +end diff --git a/lib/lithic/models/auth_rules/v2_list_versions_response.rb b/lib/lithic/models/auth_rules/v2_list_versions_response.rb new file mode 100644 index 00000000..12deccd7 --- /dev/null +++ b/lib/lithic/models/auth_rules/v2_list_versions_response.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +module Lithic + module Models + module AuthRules + # @see Lithic::Resources::AuthRules::V2#list_versions + class V2ListVersionsResponse < Lithic::Internal::Type::BaseModel + # @!attribute data + # + # @return [Array] + required :data, -> { Lithic::Internal::Type::ArrayOf[Lithic::AuthRules::AuthRuleVersion] } + + # @!method initialize(data:) + # @param data [Array] + end + end + end +end diff --git a/lib/lithic/models/auth_rules/v2_retrieve_features_response.rb b/lib/lithic/models/auth_rules/v2_retrieve_features_response.rb index 6940a8e2..0b651932 100644 --- a/lib/lithic/models/auth_rules/v2_retrieve_features_response.rb +++ b/lib/lithic/models/auth_rules/v2_retrieve_features_response.rb @@ -26,8 +26,8 @@ class V2RetrieveFeaturesResponse < Lithic::Internal::Type::BaseModel class Feature < Lithic::Internal::Type::BaseModel # @!attribute filters # - # @return [Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters] - required :filters, -> { Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters } + # @return [Lithic::Models::AuthRules::VelocityLimitFilters] + required :filters, -> { Lithic::AuthRules::VelocityLimitFilters } # @!attribute period # Velocity over the current day since 00:00 / 12 AM in Eastern Time @@ -47,7 +47,7 @@ class Feature < Lithic::Internal::Type::BaseModel required :value, -> { Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Value } # @!method initialize(filters:, period:, scope:, value:) - # @param filters [Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters] + # @param filters [Lithic::Models::AuthRules::VelocityLimitFilters] # # @param period [Lithic::Models::AuthRules::VelocityLimitPeriod::TrailingWindowObject, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowDay, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowWeek, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowMonth, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowYear] Velocity over the current day since 00:00 / 12 AM in Eastern Time # @@ -55,86 +55,6 @@ class Feature < Lithic::Internal::Type::BaseModel # # @param value [Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Value] - # @see Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature#filters - class Filters < Lithic::Internal::Type::BaseModel - # @!attribute exclude_countries - # ISO-3166-1 alpha-3 Country Codes to exclude from the velocity calculation. - # Transactions matching any of the provided will be excluded from the calculated - # velocity. - # - # @return [Array, nil] - optional :exclude_countries, Lithic::Internal::Type::ArrayOf[String], nil?: true - - # @!attribute exclude_mccs - # Merchant Category Codes to exclude from the velocity calculation. Transactions - # matching this MCC will be excluded from the calculated velocity. - # - # @return [Array, nil] - optional :exclude_mccs, Lithic::Internal::Type::ArrayOf[String], nil?: true - - # @!attribute include_countries - # ISO-3166-1 alpha-3 Country Codes to include in the velocity calculation. - # Transactions not matching any of the provided will not be included in the - # calculated velocity. - # - # @return [Array, nil] - optional :include_countries, Lithic::Internal::Type::ArrayOf[String], nil?: true - - # @!attribute include_mccs - # Merchant Category Codes to include in the velocity calculation. Transactions not - # matching this MCC will not be included in the calculated velocity. - # - # @return [Array, nil] - optional :include_mccs, Lithic::Internal::Type::ArrayOf[String], nil?: true - - # @!attribute include_pan_entry_modes - # PAN entry modes to include in the velocity calculation. Transactions not - # matching any of the provided will not be included in the calculated velocity. - # - # @return [Array, nil] - optional :include_pan_entry_modes, - -> { Lithic::Internal::Type::ArrayOf[enum: Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters::IncludePanEntryMode] }, - nil?: true - - # @!method initialize(exclude_countries: nil, exclude_mccs: nil, include_countries: nil, include_mccs: nil, include_pan_entry_modes: nil) - # Some parameter documentations has been truncated, see - # {Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters} for - # more details. - # - # @param exclude_countries [Array, nil] ISO-3166-1 alpha-3 Country Codes to exclude from the velocity calculation. Trans - # - # @param exclude_mccs [Array, nil] Merchant Category Codes to exclude from the velocity calculation. Transactions m - # - # @param include_countries [Array, nil] ISO-3166-1 alpha-3 Country Codes to include in the velocity calculation. Transac - # - # @param include_mccs [Array, nil] Merchant Category Codes to include in the velocity calculation. Transactions not - # - # @param include_pan_entry_modes [Array, nil] PAN entry modes to include in the velocity calculation. Transactions not matchin - - module IncludePanEntryMode - extend Lithic::Internal::Type::Enum - - AUTO_ENTRY = :AUTO_ENTRY - BAR_CODE = :BAR_CODE - CONTACTLESS = :CONTACTLESS - CREDENTIAL_ON_FILE = :CREDENTIAL_ON_FILE - ECOMMERCE = :ECOMMERCE - ERROR_KEYED = :ERROR_KEYED - ERROR_MAGNETIC_STRIPE = :ERROR_MAGNETIC_STRIPE - ICC = :ICC - KEY_ENTERED = :KEY_ENTERED - MAGNETIC_STRIPE = :MAGNETIC_STRIPE - MANUAL = :MANUAL - OCR = :OCR - SECURE_CARDLESS = :SECURE_CARDLESS - UNSPECIFIED = :UNSPECIFIED - UNKNOWN = :UNKNOWN - - # @!method self.values - # @return [Array] - end - end - # The scope the velocity is calculated for # # @see Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature#scope diff --git a/lib/lithic/models/auth_rules/v2_retrieve_report_response.rb b/lib/lithic/models/auth_rules/v2_retrieve_report_response.rb index 70220e01..61f8e525 100644 --- a/lib/lithic/models/auth_rules/v2_retrieve_report_response.rb +++ b/lib/lithic/models/auth_rules/v2_retrieve_report_response.rb @@ -58,12 +58,536 @@ class DailyStatistic < Lithic::Internal::Type::BaseModel # @return [Lithic::Models::AuthRules::ReportStats, nil] required :draft_version_statistics, -> { Lithic::AuthRules::ReportStats }, nil?: true - # @!method initialize(current_version_statistics:, date:, draft_version_statistics:) + # @!attribute versions + # Statistics for each version of the rule that was evaluated during the reported + # day. + # + # @return [Array] + required :versions, + -> { Lithic::Internal::Type::ArrayOf[Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version] } + + # @!method initialize(current_version_statistics:, date:, draft_version_statistics:, versions:) + # Some parameter documentations has been truncated, see + # {Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic} for more + # details. + # # @param current_version_statistics [Lithic::Models::AuthRules::ReportStats, nil] Detailed statistics for the current version of the rule. # # @param date [Date] The date (UTC) for which the statistics are reported. # # @param draft_version_statistics [Lithic::Models::AuthRules::ReportStats, nil] Detailed statistics for the draft version of the rule. + # + # @param versions [Array] Statistics for each version of the rule that was evaluated during the reported d + + class Version < Lithic::Internal::Type::BaseModel + # @!attribute action_counts + # A mapping of action types to the number of times that action was returned by + # this version during the relevant period. Actions are the possible outcomes of a + # rule evaluation, such as DECLINE, CHALLENGE, REQUIRE_TFA, etc. In case rule + # didn't trigger any action, it's counted under NO_ACTION key. + # + # @return [Hash{Symbol=>Integer}] + required :action_counts, Lithic::Internal::Type::HashOf[Integer] + + # @!attribute examples + # Example events and their outcomes for this version. + # + # @return [Array] + required :examples, + -> { Lithic::Internal::Type::ArrayOf[Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example] } + + # @!attribute state + # The evaluation mode of this version during the reported period. + # + # @return [Symbol, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::State] + required :state, + enum: -> { Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::State } + + # @!attribute version + # The rule version number. + # + # @return [Integer] + required :version, Integer + + # @!method initialize(action_counts:, examples:, state:, version:) + # Some parameter documentations has been truncated, see + # {Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version} + # for more details. + # + # @param action_counts [Hash{Symbol=>Integer}] A mapping of action types to the number of times that action was returned by thi + # + # @param examples [Array] Example events and their outcomes for this version. + # + # @param state [Symbol, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::State] The evaluation mode of this version during the reported period. + # + # @param version [Integer] The rule version number. + + class Example < Lithic::Internal::Type::BaseModel + # @!attribute actions + # The actions taken by this version for this event. + # + # @return [Array] + required :actions, + -> { Lithic::Internal::Type::ArrayOf[union: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action] } + + # @!attribute event_token + # The event token. + # + # @return [String] + required :event_token, String + + # @!attribute timestamp + # The timestamp of the event. + # + # @return [Time] + required :timestamp, Time + + # @!method initialize(actions:, event_token:, timestamp:) + # @param actions [Array] The actions taken by this version for this event. + # + # @param event_token [String] The event token. + # + # @param timestamp [Time] The timestamp of the event. + + module Action + extend Lithic::Internal::Type::Union + + variant -> { Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization } + + variant -> { Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ChallengeActionAuthorization } + + variant -> { Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ResultAuthentication3DSAction } + + variant -> { Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization } + + variant -> { Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction } + + variant -> { Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ApproveActionACH } + + variant -> { Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction } + + class DeclineActionAuthorization < Lithic::Internal::Type::BaseModel + # @!attribute code + # The detailed result code explaining the specific reason for the decline + # + # @return [Symbol, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code] + required :code, + enum: -> { Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code } + + # @!attribute type + # + # @return [Symbol, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Type] + required :type, + enum: -> { Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Type } + + # @!method initialize(code:, type:) + # @param code [Symbol, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code] The detailed result code explaining the specific reason for the decline + # + # @param type [Symbol, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Type] + + # The detailed result code explaining the specific reason for the decline + # + # @see Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization#code + module Code + extend Lithic::Internal::Type::Enum + + ACCOUNT_DAILY_SPEND_LIMIT_EXCEEDED = :ACCOUNT_DAILY_SPEND_LIMIT_EXCEEDED + ACCOUNT_DELINQUENT = :ACCOUNT_DELINQUENT + ACCOUNT_INACTIVE = :ACCOUNT_INACTIVE + ACCOUNT_LIFETIME_SPEND_LIMIT_EXCEEDED = :ACCOUNT_LIFETIME_SPEND_LIMIT_EXCEEDED + ACCOUNT_MONTHLY_SPEND_LIMIT_EXCEEDED = :ACCOUNT_MONTHLY_SPEND_LIMIT_EXCEEDED + ACCOUNT_PAUSED = :ACCOUNT_PAUSED + ACCOUNT_UNDER_REVIEW = :ACCOUNT_UNDER_REVIEW + ADDRESS_INCORRECT = :ADDRESS_INCORRECT + APPROVED = :APPROVED + AUTH_RULE_ALLOWED_COUNTRY = :AUTH_RULE_ALLOWED_COUNTRY + AUTH_RULE_ALLOWED_MCC = :AUTH_RULE_ALLOWED_MCC + AUTH_RULE_BLOCKED_COUNTRY = :AUTH_RULE_BLOCKED_COUNTRY + AUTH_RULE_BLOCKED_MCC = :AUTH_RULE_BLOCKED_MCC + AUTH_RULE = :AUTH_RULE + CARD_CLOSED = :CARD_CLOSED + CARD_CRYPTOGRAM_VALIDATION_FAILURE = :CARD_CRYPTOGRAM_VALIDATION_FAILURE + CARD_EXPIRED = :CARD_EXPIRED + CARD_EXPIRY_DATE_INCORRECT = :CARD_EXPIRY_DATE_INCORRECT + CARD_INVALID = :CARD_INVALID + CARD_NOT_ACTIVATED = :CARD_NOT_ACTIVATED + CARD_PAUSED = :CARD_PAUSED + CARD_PIN_INCORRECT = :CARD_PIN_INCORRECT + CARD_RESTRICTED = :CARD_RESTRICTED + CARD_SECURITY_CODE_INCORRECT = :CARD_SECURITY_CODE_INCORRECT + CARD_SPEND_LIMIT_EXCEEDED = :CARD_SPEND_LIMIT_EXCEEDED + CONTACT_CARD_ISSUER = :CONTACT_CARD_ISSUER + CUSTOMER_ASA_TIMEOUT = :CUSTOMER_ASA_TIMEOUT + CUSTOM_ASA_RESULT = :CUSTOM_ASA_RESULT + DECLINED = :DECLINED + DO_NOT_HONOR = :DO_NOT_HONOR + DRIVER_NUMBER_INVALID = :DRIVER_NUMBER_INVALID + FORMAT_ERROR = :FORMAT_ERROR + INSUFFICIENT_FUNDING_SOURCE_BALANCE = :INSUFFICIENT_FUNDING_SOURCE_BALANCE + INSUFFICIENT_FUNDS = :INSUFFICIENT_FUNDS + LITHIC_SYSTEM_ERROR = :LITHIC_SYSTEM_ERROR + LITHIC_SYSTEM_RATE_LIMIT = :LITHIC_SYSTEM_RATE_LIMIT + MALFORMED_ASA_RESPONSE = :MALFORMED_ASA_RESPONSE + MERCHANT_INVALID = :MERCHANT_INVALID + MERCHANT_LOCKED_CARD_ATTEMPTED_ELSEWHERE = :MERCHANT_LOCKED_CARD_ATTEMPTED_ELSEWHERE + MERCHANT_NOT_PERMITTED = :MERCHANT_NOT_PERMITTED + OVER_REVERSAL_ATTEMPTED = :OVER_REVERSAL_ATTEMPTED + PIN_BLOCKED = :PIN_BLOCKED + PROGRAM_CARD_SPEND_LIMIT_EXCEEDED = :PROGRAM_CARD_SPEND_LIMIT_EXCEEDED + PROGRAM_SUSPENDED = :PROGRAM_SUSPENDED + PROGRAM_USAGE_RESTRICTION = :PROGRAM_USAGE_RESTRICTION + REVERSAL_UNMATCHED = :REVERSAL_UNMATCHED + SECURITY_VIOLATION = :SECURITY_VIOLATION + SINGLE_USE_CARD_REATTEMPTED = :SINGLE_USE_CARD_REATTEMPTED + SUSPECTED_FRAUD = :SUSPECTED_FRAUD + TRANSACTION_INVALID = :TRANSACTION_INVALID + TRANSACTION_NOT_PERMITTED_TO_ACQUIRER_OR_TERMINAL = :TRANSACTION_NOT_PERMITTED_TO_ACQUIRER_OR_TERMINAL + TRANSACTION_NOT_PERMITTED_TO_ISSUER_OR_CARDHOLDER = :TRANSACTION_NOT_PERMITTED_TO_ISSUER_OR_CARDHOLDER + TRANSACTION_PREVIOUSLY_COMPLETED = :TRANSACTION_PREVIOUSLY_COMPLETED + UNAUTHORIZED_MERCHANT = :UNAUTHORIZED_MERCHANT + VEHICLE_NUMBER_INVALID = :VEHICLE_NUMBER_INVALID + CARDHOLDER_CHALLENGED = :CARDHOLDER_CHALLENGED + CARDHOLDER_CHALLENGE_FAILED = :CARDHOLDER_CHALLENGE_FAILED + + # @!method self.values + # @return [Array] + end + + # @see Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization#type + module Type + extend Lithic::Internal::Type::Enum + + DECLINE = :DECLINE + + # @!method self.values + # @return [Array] + end + end + + class ChallengeActionAuthorization < Lithic::Internal::Type::BaseModel + # @!attribute type + # + # @return [Symbol, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ChallengeActionAuthorization::Type] + required :type, + enum: -> { Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ChallengeActionAuthorization::Type } + + # @!method initialize(type:) + # @param type [Symbol, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ChallengeActionAuthorization::Type] + + # @see Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ChallengeActionAuthorization#type + module Type + extend Lithic::Internal::Type::Enum + + CHALLENGE = :CHALLENGE + + # @!method self.values + # @return [Array] + end + end + + class ResultAuthentication3DSAction < Lithic::Internal::Type::BaseModel + # @!attribute type + # + # @return [Symbol, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ResultAuthentication3DSAction::Type] + required :type, + enum: -> { Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ResultAuthentication3DSAction::Type } + + # @!method initialize(type:) + # @param type [Symbol, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ResultAuthentication3DSAction::Type] + + # @see Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ResultAuthentication3DSAction#type + module Type + extend Lithic::Internal::Type::Enum + + DECLINE = :DECLINE + CHALLENGE = :CHALLENGE + + # @!method self.values + # @return [Array] + end + end + + class DeclineActionTokenization < Lithic::Internal::Type::BaseModel + # @!attribute type + # Decline the tokenization request + # + # @return [Symbol, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Type] + required :type, + enum: -> { Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Type } + + # @!attribute reason + # Reason code for declining the tokenization request + # + # @return [Symbol, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Reason, nil] + optional :reason, + enum: -> { Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Reason } + + # @!method initialize(type:, reason: nil) + # @param type [Symbol, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Type] Decline the tokenization request + # + # @param reason [Symbol, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Reason] Reason code for declining the tokenization request + + # Decline the tokenization request + # + # @see Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization#type + module Type + extend Lithic::Internal::Type::Enum + + DECLINE = :DECLINE + + # @!method self.values + # @return [Array] + end + + # Reason code for declining the tokenization request + # + # @see Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization#reason + module Reason + extend Lithic::Internal::Type::Enum + + ACCOUNT_SCORE_1 = :ACCOUNT_SCORE_1 + DEVICE_SCORE_1 = :DEVICE_SCORE_1 + ALL_WALLET_DECLINE_REASONS_PRESENT = :ALL_WALLET_DECLINE_REASONS_PRESENT + WALLET_RECOMMENDED_DECISION_RED = :WALLET_RECOMMENDED_DECISION_RED + CVC_MISMATCH = :CVC_MISMATCH + CARD_EXPIRY_MONTH_MISMATCH = :CARD_EXPIRY_MONTH_MISMATCH + CARD_EXPIRY_YEAR_MISMATCH = :CARD_EXPIRY_YEAR_MISMATCH + CARD_INVALID_STATE = :CARD_INVALID_STATE + CUSTOMER_RED_PATH = :CUSTOMER_RED_PATH + INVALID_CUSTOMER_RESPONSE = :INVALID_CUSTOMER_RESPONSE + NETWORK_FAILURE = :NETWORK_FAILURE + GENERIC_DECLINE = :GENERIC_DECLINE + DIGITAL_CARD_ART_REQUIRED = :DIGITAL_CARD_ART_REQUIRED + + # @!method self.values + # @return [Array] + end + end + + class RequireTfaAction < Lithic::Internal::Type::BaseModel + # @!attribute type + # Require two-factor authentication for the tokenization request + # + # @return [Symbol, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Type] + required :type, + enum: -> { Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Type } + + # @!attribute reason + # Reason code for requiring two-factor authentication + # + # @return [Symbol, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Reason, nil] + optional :reason, + enum: -> { Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Reason } + + # @!method initialize(type:, reason: nil) + # @param type [Symbol, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Type] Require two-factor authentication for the tokenization request + # + # @param reason [Symbol, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Reason] Reason code for requiring two-factor authentication + + # Require two-factor authentication for the tokenization request + # + # @see Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction#type + module Type + extend Lithic::Internal::Type::Enum + + REQUIRE_TFA = :REQUIRE_TFA + + # @!method self.values + # @return [Array] + end + + # Reason code for requiring two-factor authentication + # + # @see Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction#reason + module Reason + extend Lithic::Internal::Type::Enum + + WALLET_RECOMMENDED_TFA = :WALLET_RECOMMENDED_TFA + SUSPICIOUS_ACTIVITY = :SUSPICIOUS_ACTIVITY + DEVICE_RECENTLY_LOST = :DEVICE_RECENTLY_LOST + TOO_MANY_RECENT_ATTEMPTS = :TOO_MANY_RECENT_ATTEMPTS + TOO_MANY_RECENT_TOKENS = :TOO_MANY_RECENT_TOKENS + TOO_MANY_DIFFERENT_CARDHOLDERS = :TOO_MANY_DIFFERENT_CARDHOLDERS + OUTSIDE_HOME_TERRITORY = :OUTSIDE_HOME_TERRITORY + HAS_SUSPENDED_TOKENS = :HAS_SUSPENDED_TOKENS + HIGH_RISK = :HIGH_RISK + ACCOUNT_SCORE_LOW = :ACCOUNT_SCORE_LOW + DEVICE_SCORE_LOW = :DEVICE_SCORE_LOW + CARD_STATE_TFA = :CARD_STATE_TFA + HARDCODED_TFA = :HARDCODED_TFA + CUSTOMER_RULE_TFA = :CUSTOMER_RULE_TFA + DEVICE_HOST_CARD_EMULATION = :DEVICE_HOST_CARD_EMULATION + + # @!method self.values + # @return [Array] + end + end + + class ApproveActionACH < Lithic::Internal::Type::BaseModel + # @!attribute type + # Approve the ACH transaction + # + # @return [Symbol, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ApproveActionACH::Type] + required :type, + enum: -> { Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ApproveActionACH::Type } + + # @!method initialize(type:) + # @param type [Symbol, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ApproveActionACH::Type] Approve the ACH transaction + + # Approve the ACH transaction + # + # @see Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ApproveActionACH#type + module Type + extend Lithic::Internal::Type::Enum + + APPROVE = :APPROVE + + # @!method self.values + # @return [Array] + end + end + + class ReturnAction < Lithic::Internal::Type::BaseModel + # @!attribute code + # NACHA return code to use when returning the transaction. Note that the list of + # available return codes is subject to an allowlist configured at the program + # level + # + # @return [Symbol, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code] + required :code, + enum: -> { Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code } + + # @!attribute type + # Return the ACH transaction + # + # @return [Symbol, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Type] + required :type, + enum: -> { Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Type } + + # @!method initialize(code:, type:) + # Some parameter documentations has been truncated, see + # {Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction} + # for more details. + # + # @param code [Symbol, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code] NACHA return code to use when returning the transaction. Note that the list of a + # + # @param type [Symbol, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Type] Return the ACH transaction + + # NACHA return code to use when returning the transaction. Note that the list of + # available return codes is subject to an allowlist configured at the program + # level + # + # @see Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction#code + module Code + extend Lithic::Internal::Type::Enum + + R01 = :R01 + R02 = :R02 + R03 = :R03 + R04 = :R04 + R05 = :R05 + R06 = :R06 + R07 = :R07 + R08 = :R08 + R09 = :R09 + R10 = :R10 + R11 = :R11 + R12 = :R12 + R13 = :R13 + R14 = :R14 + R15 = :R15 + R16 = :R16 + R17 = :R17 + R18 = :R18 + R19 = :R19 + R20 = :R20 + R21 = :R21 + R22 = :R22 + R23 = :R23 + R24 = :R24 + R25 = :R25 + R26 = :R26 + R27 = :R27 + R28 = :R28 + R29 = :R29 + R30 = :R30 + R31 = :R31 + R32 = :R32 + R33 = :R33 + R34 = :R34 + R35 = :R35 + R36 = :R36 + R37 = :R37 + R38 = :R38 + R39 = :R39 + R40 = :R40 + R41 = :R41 + R42 = :R42 + R43 = :R43 + R44 = :R44 + R45 = :R45 + R46 = :R46 + R47 = :R47 + R50 = :R50 + R51 = :R51 + R52 = :R52 + R53 = :R53 + R61 = :R61 + R62 = :R62 + R67 = :R67 + R68 = :R68 + R69 = :R69 + R70 = :R70 + R71 = :R71 + R72 = :R72 + R73 = :R73 + R74 = :R74 + R75 = :R75 + R76 = :R76 + R77 = :R77 + R80 = :R80 + R81 = :R81 + R82 = :R82 + R83 = :R83 + R84 = :R84 + R85 = :R85 + + # @!method self.values + # @return [Array] + end + + # Return the ACH transaction + # + # @see Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction#type + module Type + extend Lithic::Internal::Type::Enum + + RETURN = :RETURN + + # @!method self.values + # @return [Array] + end + end + + # @!method self.variants + # @return [Array(Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ChallengeActionAuthorization, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ResultAuthentication3DSAction, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ApproveActionACH, Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction)] + end + end + + # The evaluation mode of this version during the reported period. + # + # @see Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version#state + module State + extend Lithic::Internal::Type::Enum + + ACTIVE = :ACTIVE + SHADOW = :SHADOW + INACTIVE = :INACTIVE + + # @!method self.values + # @return [Array] + end + end end end end diff --git a/lib/lithic/models/auth_rules/v2_update_params.rb b/lib/lithic/models/auth_rules/v2_update_params.rb index bfbf81f6..3964f810 100644 --- a/lib/lithic/models/auth_rules/v2_update_params.rb +++ b/lib/lithic/models/auth_rules/v2_update_params.rb @@ -143,6 +143,18 @@ module State end class ProgramLevelRule < Lithic::Internal::Type::BaseModel + # @!attribute excluded_account_tokens + # Account tokens to which the Auth Rule does not apply. + # + # @return [Array, nil] + optional :excluded_account_tokens, Lithic::Internal::Type::ArrayOf[String] + + # @!attribute excluded_business_account_tokens + # Business account tokens to which the Auth Rule does not apply. + # + # @return [Array, nil] + optional :excluded_business_account_tokens, Lithic::Internal::Type::ArrayOf[String] + # @!attribute excluded_card_tokens # Card tokens to which the Auth Rule does not apply. # @@ -171,11 +183,15 @@ class ProgramLevelRule < Lithic::Internal::Type::BaseModel # @return [Symbol, Lithic::Models::AuthRules::V2UpdateParams::Body::ProgramLevelRule::State, nil] optional :state, enum: -> { Lithic::AuthRules::V2UpdateParams::Body::ProgramLevelRule::State } - # @!method initialize(excluded_card_tokens: nil, name: nil, program_level: nil, state: nil) + # @!method initialize(excluded_account_tokens: nil, excluded_business_account_tokens: nil, excluded_card_tokens: nil, name: nil, program_level: nil, state: nil) # Some parameter documentations has been truncated, see # {Lithic::Models::AuthRules::V2UpdateParams::Body::ProgramLevelRule} for more # details. # + # @param excluded_account_tokens [Array] Account tokens to which the Auth Rule does not apply. + # + # @param excluded_business_account_tokens [Array] Business account tokens to which the Auth Rule does not apply. + # # @param excluded_card_tokens [Array] Card tokens to which the Auth Rule does not apply. # # @param name [String, nil] Auth Rule Name diff --git a/lib/lithic/models/auth_rules/velocity_limit_filters.rb b/lib/lithic/models/auth_rules/velocity_limit_filters.rb new file mode 100644 index 00000000..7966a44b --- /dev/null +++ b/lib/lithic/models/auth_rules/velocity_limit_filters.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +module Lithic + module Models + module AuthRules + class VelocityLimitFilters < Lithic::Internal::Type::BaseModel + # @!attribute exclude_countries + # ISO-3166-1 alpha-3 Country Codes to exclude from the velocity calculation. + # Transactions matching any of the provided will be excluded from the calculated + # velocity. + # + # @return [Array, nil] + optional :exclude_countries, Lithic::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute exclude_mccs + # Merchant Category Codes to exclude from the velocity calculation. Transactions + # matching this MCC will be excluded from the calculated velocity. + # + # @return [Array, nil] + optional :exclude_mccs, Lithic::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute include_countries + # ISO-3166-1 alpha-3 Country Codes to include in the velocity calculation. + # Transactions not matching any of the provided will not be included in the + # calculated velocity. + # + # @return [Array, nil] + optional :include_countries, Lithic::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute include_mccs + # Merchant Category Codes to include in the velocity calculation. Transactions not + # matching this MCC will not be included in the calculated velocity. + # + # @return [Array, nil] + optional :include_mccs, Lithic::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute include_pan_entry_modes + # PAN entry modes to include in the velocity calculation. Transactions not + # matching any of the provided will not be included in the calculated velocity. + # + # @return [Array, nil] + optional :include_pan_entry_modes, + -> { + Lithic::Internal::Type::ArrayOf[enum: Lithic::AuthRules::VelocityLimitFilters::IncludePanEntryMode] + }, + nil?: true + + # @!method initialize(exclude_countries: nil, exclude_mccs: nil, include_countries: nil, include_mccs: nil, include_pan_entry_modes: nil) + # Some parameter documentations has been truncated, see + # {Lithic::Models::AuthRules::VelocityLimitFilters} for more details. + # + # @param exclude_countries [Array, nil] ISO-3166-1 alpha-3 Country Codes to exclude from the velocity calculation. Trans + # + # @param exclude_mccs [Array, nil] Merchant Category Codes to exclude from the velocity calculation. Transactions m + # + # @param include_countries [Array, nil] ISO-3166-1 alpha-3 Country Codes to include in the velocity calculation. Transac + # + # @param include_mccs [Array, nil] Merchant Category Codes to include in the velocity calculation. Transactions not + # + # @param include_pan_entry_modes [Array, nil] PAN entry modes to include in the velocity calculation. Transactions not matchin + + module IncludePanEntryMode + extend Lithic::Internal::Type::Enum + + AUTO_ENTRY = :AUTO_ENTRY + BAR_CODE = :BAR_CODE + CONTACTLESS = :CONTACTLESS + CREDENTIAL_ON_FILE = :CREDENTIAL_ON_FILE + ECOMMERCE = :ECOMMERCE + ERROR_KEYED = :ERROR_KEYED + ERROR_MAGNETIC_STRIPE = :ERROR_MAGNETIC_STRIPE + ICC = :ICC + KEY_ENTERED = :KEY_ENTERED + MAGNETIC_STRIPE = :MAGNETIC_STRIPE + MANUAL = :MANUAL + OCR = :OCR + SECURE_CARDLESS = :SECURE_CARDLESS + UNSPECIFIED = :UNSPECIFIED + UNKNOWN = :UNKNOWN + + # @!method self.values + # @return [Array] + end + end + end + end +end diff --git a/lib/lithic/models/auth_rules/velocity_limit_params.rb b/lib/lithic/models/auth_rules/velocity_limit_params.rb index 55b2d7a4..fab01fca 100644 --- a/lib/lithic/models/auth_rules/velocity_limit_params.rb +++ b/lib/lithic/models/auth_rules/velocity_limit_params.rb @@ -18,8 +18,8 @@ class VelocityLimitParams < Lithic::Internal::Type::BaseModel # @!attribute filters # - # @return [Lithic::Models::AuthRules::VelocityLimitParams::Filters, nil] - optional :filters, -> { Lithic::AuthRules::VelocityLimitParams::Filters } + # @return [Lithic::Models::AuthRules::VelocityLimitFilters, nil] + optional :filters, -> { Lithic::AuthRules::VelocityLimitFilters } # @!attribute limit_amount # The maximum amount of spend velocity allowed in the period in minor units (the @@ -47,7 +47,7 @@ class VelocityLimitParams < Lithic::Internal::Type::BaseModel # # @param scope [Symbol, Lithic::Models::AuthRules::VelocityLimitParams::Scope] The scope the velocity is calculated for # - # @param filters [Lithic::Models::AuthRules::VelocityLimitParams::Filters] + # @param filters [Lithic::Models::AuthRules::VelocityLimitFilters] # # @param limit_amount [Integer, nil] The maximum amount of spend velocity allowed in the period in minor units (the s # @@ -65,87 +65,6 @@ module Scope # @!method self.values # @return [Array] end - - # @see Lithic::Models::AuthRules::VelocityLimitParams#filters - class Filters < Lithic::Internal::Type::BaseModel - # @!attribute exclude_countries - # ISO-3166-1 alpha-3 Country Codes to exclude from the velocity calculation. - # Transactions matching any of the provided will be excluded from the calculated - # velocity. - # - # @return [Array, nil] - optional :exclude_countries, Lithic::Internal::Type::ArrayOf[String], nil?: true - - # @!attribute exclude_mccs - # Merchant Category Codes to exclude from the velocity calculation. Transactions - # matching this MCC will be excluded from the calculated velocity. - # - # @return [Array, nil] - optional :exclude_mccs, Lithic::Internal::Type::ArrayOf[String], nil?: true - - # @!attribute include_countries - # ISO-3166-1 alpha-3 Country Codes to include in the velocity calculation. - # Transactions not matching any of the provided will not be included in the - # calculated velocity. - # - # @return [Array, nil] - optional :include_countries, Lithic::Internal::Type::ArrayOf[String], nil?: true - - # @!attribute include_mccs - # Merchant Category Codes to include in the velocity calculation. Transactions not - # matching this MCC will not be included in the calculated velocity. - # - # @return [Array, nil] - optional :include_mccs, Lithic::Internal::Type::ArrayOf[String], nil?: true - - # @!attribute include_pan_entry_modes - # PAN entry modes to include in the velocity calculation. Transactions not - # matching any of the provided will not be included in the calculated velocity. - # - # @return [Array, nil] - optional :include_pan_entry_modes, - -> { - Lithic::Internal::Type::ArrayOf[enum: Lithic::AuthRules::VelocityLimitParams::Filters::IncludePanEntryMode] - }, - nil?: true - - # @!method initialize(exclude_countries: nil, exclude_mccs: nil, include_countries: nil, include_mccs: nil, include_pan_entry_modes: nil) - # Some parameter documentations has been truncated, see - # {Lithic::Models::AuthRules::VelocityLimitParams::Filters} for more details. - # - # @param exclude_countries [Array, nil] ISO-3166-1 alpha-3 Country Codes to exclude from the velocity calculation. Trans - # - # @param exclude_mccs [Array, nil] Merchant Category Codes to exclude from the velocity calculation. Transactions m - # - # @param include_countries [Array, nil] ISO-3166-1 alpha-3 Country Codes to include in the velocity calculation. Transac - # - # @param include_mccs [Array, nil] Merchant Category Codes to include in the velocity calculation. Transactions not - # - # @param include_pan_entry_modes [Array, nil] PAN entry modes to include in the velocity calculation. Transactions not matchin - - module IncludePanEntryMode - extend Lithic::Internal::Type::Enum - - AUTO_ENTRY = :AUTO_ENTRY - BAR_CODE = :BAR_CODE - CONTACTLESS = :CONTACTLESS - CREDENTIAL_ON_FILE = :CREDENTIAL_ON_FILE - ECOMMERCE = :ECOMMERCE - ERROR_KEYED = :ERROR_KEYED - ERROR_MAGNETIC_STRIPE = :ERROR_MAGNETIC_STRIPE - ICC = :ICC - KEY_ENTERED = :KEY_ENTERED - MAGNETIC_STRIPE = :MAGNETIC_STRIPE - MANUAL = :MANUAL - OCR = :OCR - SECURE_CARDLESS = :SECURE_CARDLESS - UNSPECIFIED = :UNSPECIFIED - UNKNOWN = :UNKNOWN - - # @!method self.values - # @return [Array] - end - end end end end diff --git a/lib/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rb b/lib/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rb index 5312f011..cb2b150b 100644 --- a/lib/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rb +++ b/lib/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rb @@ -21,16 +21,6 @@ class DigitalWalletTokenizationApprovalRequestWebhookEvent < Lithic::Internal::T # @return [Time] required :created, Time - # @!attribute customer_tokenization_decision - # Contains the metadata for the customer tokenization decision. - # - # @return [Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent::CustomerTokenizationDecision, nil] - required :customer_tokenization_decision, - -> { - Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::CustomerTokenizationDecision - }, - nil?: true - # @!attribute digital_wallet_token_metadata # Contains the metadata for the digital wallet being tokenized. # @@ -69,19 +59,31 @@ class DigitalWalletTokenizationApprovalRequestWebhookEvent < Lithic::Internal::T # @return [Lithic::Models::WalletDecisioningInfo] required :wallet_decisioning_info, -> { Lithic::WalletDecisioningInfo } + # @!attribute customer_tokenization_decision + # Contains the metadata for the customer tokenization decision. + # + # @return [Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent::CustomerTokenizationDecision, nil] + optional :customer_tokenization_decision, + -> { + Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::CustomerTokenizationDecision + }, + nil?: true + # @!attribute device # # @return [Lithic::Models::Device, nil] optional :device, -> { Lithic::Device } # @!attribute rule_results - # Results from rules that were evaluated for this tokenization + # Results from rules that were evaluated for this tokenization. Only populated in + # webhook events, not in the initial decisioning request # # @return [Array, nil] optional :rule_results, -> { Lithic::Internal::Type::ArrayOf[Lithic::TokenizationRuleResult] } # @!attribute tokenization_decline_reasons - # List of reasons why the tokenization was declined + # List of reasons why the tokenization was declined. Only populated in webhook + # events, not in the initial decisioning request # # @return [Array, nil] optional :tokenization_decline_reasons, @@ -95,25 +97,31 @@ class DigitalWalletTokenizationApprovalRequestWebhookEvent < Lithic::Internal::T enum: -> { Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::TokenizationSource } # @!attribute tokenization_tfa_reasons - # List of reasons why two-factor authentication was required + # List of reasons why two-factor authentication was required. Only populated in + # webhook events, not in the initial decisioning request # # @return [Array, nil] optional :tokenization_tfa_reasons, -> { Lithic::Internal::Type::ArrayOf[enum: Lithic::TokenizationTfaReason] } - # @!method initialize(account_token:, card_token:, created:, customer_tokenization_decision:, digital_wallet_token_metadata:, event_type:, issuer_decision:, tokenization_channel:, tokenization_token:, wallet_decisioning_info:, device: nil, rule_results: nil, tokenization_decline_reasons: nil, tokenization_source: nil, tokenization_tfa_reasons: nil) + # @!method initialize(account_token:, card_token:, created:, digital_wallet_token_metadata:, event_type:, issuer_decision:, tokenization_channel:, tokenization_token:, wallet_decisioning_info:, customer_tokenization_decision: nil, device: nil, rule_results: nil, tokenization_decline_reasons: nil, tokenization_source: nil, tokenization_tfa_reasons: nil) # Some parameter documentations has been truncated, see # {Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent} for more # details. # + # Payload for digital wallet tokenization approval requests. Used for both the + # decisioning responder request (sent to the customer's endpoint for a real-time + # decision) and the subsequent webhook event (sent after the decision is made). + # Fields like customer_tokenization_decision, tokenization_decline_reasons, + # tokenization_tfa_reasons, and rule_results are only populated in the webhook + # event, not in the initial decisioning request. + # # @param account_token [String] Unique identifier for the user tokenizing a card # # @param card_token [String] Unique identifier for the card being tokenized # # @param created [Time] Indicate when the request was received from Mastercard or Visa # - # @param customer_tokenization_decision [Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent::CustomerTokenizationDecision, nil] Contains the metadata for the customer tokenization decision. - # # @param digital_wallet_token_metadata [Lithic::Models::TokenMetadata] Contains the metadata for the digital wallet being tokenized. # # @param event_type [Symbol, Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent::EventType] The name of this event @@ -126,15 +134,57 @@ class DigitalWalletTokenizationApprovalRequestWebhookEvent < Lithic::Internal::T # # @param wallet_decisioning_info [Lithic::Models::WalletDecisioningInfo] # + # @param customer_tokenization_decision [Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent::CustomerTokenizationDecision, nil] Contains the metadata for the customer tokenization decision. + # # @param device [Lithic::Models::Device] # - # @param rule_results [Array] Results from rules that were evaluated for this tokenization + # @param rule_results [Array] Results from rules that were evaluated for this tokenization. Only populated in # - # @param tokenization_decline_reasons [Array] List of reasons why the tokenization was declined + # @param tokenization_decline_reasons [Array] List of reasons why the tokenization was declined. Only populated in webhook eve # # @param tokenization_source [Symbol, Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent::TokenizationSource] The source of the tokenization. # - # @param tokenization_tfa_reasons [Array] List of reasons why two-factor authentication was required + # @param tokenization_tfa_reasons [Array] List of reasons why two-factor authentication was required. Only populated in we + + # The name of this event + # + # @see Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent#event_type + module EventType + extend Lithic::Internal::Type::Enum + + DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = :"digital_wallet.tokenization_approval_request" + + # @!method self.values + # @return [Array] + end + + # Whether Lithic decisioned on the token, and if so, what the decision was. + # APPROVED/VERIFICATION_REQUIRED/DENIED. + # + # @see Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent#issuer_decision + module IssuerDecision + extend Lithic::Internal::Type::Enum + + APPROVED = :APPROVED + DENIED = :DENIED + VERIFICATION_REQUIRED = :VERIFICATION_REQUIRED + + # @!method self.values + # @return [Array] + end + + # The channel through which the tokenization was made. + # + # @see Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent#tokenization_channel + module TokenizationChannel + extend Lithic::Internal::Type::Enum + + DIGITAL_WALLET = :DIGITAL_WALLET + MERCHANT = :MERCHANT + + # @!method self.values + # @return [Array] + end # @see Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent#customer_tokenization_decision class CustomerTokenizationDecision < Lithic::Internal::Type::BaseModel @@ -192,46 +242,6 @@ module Outcome end end - # The name of this event - # - # @see Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent#event_type - module EventType - extend Lithic::Internal::Type::Enum - - DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = :"digital_wallet.tokenization_approval_request" - - # @!method self.values - # @return [Array] - end - - # Whether Lithic decisioned on the token, and if so, what the decision was. - # APPROVED/VERIFICATION_REQUIRED/DENIED. - # - # @see Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent#issuer_decision - module IssuerDecision - extend Lithic::Internal::Type::Enum - - APPROVED = :APPROVED - DENIED = :DENIED - VERIFICATION_REQUIRED = :VERIFICATION_REQUIRED - - # @!method self.values - # @return [Array] - end - - # The channel through which the tokenization was made. - # - # @see Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent#tokenization_channel - module TokenizationChannel - extend Lithic::Internal::Type::Enum - - DIGITAL_WALLET = :DIGITAL_WALLET - MERCHANT = :MERCHANT - - # @!method self.values - # @return [Array] - end - # The source of the tokenization. # # @see Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent#tokenization_source diff --git a/lib/lithic/models/dispute_create_params.rb b/lib/lithic/models/dispute_create_params.rb index 9f0bc2e0..f56fd597 100644 --- a/lib/lithic/models/dispute_create_params.rb +++ b/lib/lithic/models/dispute_create_params.rb @@ -8,49 +8,49 @@ class DisputeCreateParams < Lithic::Internal::Type::BaseModel include Lithic::Internal::Type::RequestParameters # @!attribute amount - # Amount to dispute + # Amount for chargeback # # @return [Integer] required :amount, Integer # @!attribute reason - # Reason for dispute + # Reason for chargeback # # @return [Symbol, Lithic::Models::DisputeCreateParams::Reason] required :reason, enum: -> { Lithic::DisputeCreateParams::Reason } # @!attribute transaction_token - # Transaction to dispute + # Transaction for chargeback # # @return [String] required :transaction_token, String # @!attribute customer_filed_date - # Date the customer filed the dispute + # Date the customer filed the chargeback request # # @return [Time, nil] optional :customer_filed_date, Time # @!attribute customer_note - # Customer description of dispute + # Customer description # # @return [String, nil] optional :customer_note, String # @!method initialize(amount:, reason:, transaction_token:, customer_filed_date: nil, customer_note: nil, request_options: {}) - # @param amount [Integer] Amount to dispute + # @param amount [Integer] Amount for chargeback # - # @param reason [Symbol, Lithic::Models::DisputeCreateParams::Reason] Reason for dispute + # @param reason [Symbol, Lithic::Models::DisputeCreateParams::Reason] Reason for chargeback # - # @param transaction_token [String] Transaction to dispute + # @param transaction_token [String] Transaction for chargeback # - # @param customer_filed_date [Time] Date the customer filed the dispute + # @param customer_filed_date [Time] Date the customer filed the chargeback request # - # @param customer_note [String] Customer description of dispute + # @param customer_note [String] Customer description # # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] - # Reason for dispute + # Reason for chargeback module Reason extend Lithic::Internal::Type::Enum diff --git a/lib/lithic/models/dispute_list_params.rb b/lib/lithic/models/dispute_list_params.rb index 588dbe54..57b4403a 100644 --- a/lib/lithic/models/dispute_list_params.rb +++ b/lib/lithic/models/dispute_list_params.rb @@ -42,7 +42,7 @@ class DisputeListParams < Lithic::Internal::Type::BaseModel optional :starting_after, String # @!attribute status - # List disputes of a specific status. + # Filter by status. # # @return [Symbol, Lithic::Models::DisputeListParams::Status, nil] optional :status, enum: -> { Lithic::DisputeListParams::Status } @@ -67,13 +67,13 @@ class DisputeListParams < Lithic::Internal::Type::BaseModel # # @param starting_after [String] A cursor representing an item's token after which a page of results should begin # - # @param status [Symbol, Lithic::Models::DisputeListParams::Status] List disputes of a specific status. + # @param status [Symbol, Lithic::Models::DisputeListParams::Status] Filter by status. # # @param transaction_tokens [Array] Transaction tokens to filter by. # # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] - # List disputes of a specific status. + # Filter by status. module Status extend Lithic::Internal::Type::Enum diff --git a/lib/lithic/models/dispute_update_params.rb b/lib/lithic/models/dispute_update_params.rb index e6b6b66e..7912db42 100644 --- a/lib/lithic/models/dispute_update_params.rb +++ b/lib/lithic/models/dispute_update_params.rb @@ -13,25 +13,25 @@ class DisputeUpdateParams < Lithic::Internal::Type::BaseModel required :dispute_token, String # @!attribute amount - # Amount to dispute + # Amount for chargeback # # @return [Integer, nil] optional :amount, Integer # @!attribute customer_filed_date - # Date the customer filed the dispute + # Date the customer filed the chargeback request # # @return [Time, nil] optional :customer_filed_date, Time # @!attribute customer_note - # Customer description of dispute + # Customer description # # @return [String, nil] optional :customer_note, String # @!attribute reason - # Reason for dispute + # Reason for chargeback # # @return [Symbol, Lithic::Models::DisputeUpdateParams::Reason, nil] optional :reason, enum: -> { Lithic::DisputeUpdateParams::Reason } @@ -39,17 +39,17 @@ class DisputeUpdateParams < Lithic::Internal::Type::BaseModel # @!method initialize(dispute_token:, amount: nil, customer_filed_date: nil, customer_note: nil, reason: nil, request_options: {}) # @param dispute_token [String] # - # @param amount [Integer] Amount to dispute + # @param amount [Integer] Amount for chargeback # - # @param customer_filed_date [Time] Date the customer filed the dispute + # @param customer_filed_date [Time] Date the customer filed the chargeback request # - # @param customer_note [String] Customer description of dispute + # @param customer_note [String] Customer description # - # @param reason [Symbol, Lithic::Models::DisputeUpdateParams::Reason] Reason for dispute + # @param reason [Symbol, Lithic::Models::DisputeUpdateParams::Reason] Reason for chargeback # # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] - # Reason for dispute + # Reason for chargeback module Reason extend Lithic::Internal::Type::Enum diff --git a/lib/lithic/models/event.rb b/lib/lithic/models/event.rb index e64fa7ee..7e6e3518 100644 --- a/lib/lithic/models/event.rb +++ b/lib/lithic/models/event.rb @@ -45,9 +45,6 @@ class Event < Lithic::Internal::Type::BaseModel # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. # - card.updated: Occurs when a card is updated. - # - digital_wallet.tokenization_approval_request: Occurs when a tokenization - # approval request is made. This event will be deprecated in the future. We - # recommend using `tokenization.approval_request` instead. # - digital_wallet.tokenization_result: Occurs when a tokenization request # succeeded or failed. # @@ -169,9 +166,6 @@ class Event < Lithic::Internal::Type::BaseModel # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. # - card.updated: Occurs when a card is updated. - # - digital_wallet.tokenization_approval_request: Occurs when a tokenization - # approval request is made. This event will be deprecated in the future. We - # recommend using `tokenization.approval_request` instead. # - digital_wallet.tokenization_result: Occurs when a tokenization request # succeeded or failed. # @@ -266,7 +260,6 @@ module EventType CARD_RENEWED = :"card.renewed" CARD_SHIPPED = :"card.shipped" CARD_UPDATED = :"card.updated" - DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = :"digital_wallet.tokenization_approval_request" DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE = :"digital_wallet.tokenization_two_factor_authentication_code" diff --git a/lib/lithic/models/event_list_params.rb b/lib/lithic/models/event_list_params.rb index 31913c4b..401041fe 100644 --- a/lib/lithic/models/event_list_params.rb +++ b/lib/lithic/models/event_list_params.rb @@ -99,9 +99,6 @@ class EventListParams < Lithic::Internal::Type::BaseModel # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. # - card.updated: Occurs when a card is updated. - # - digital_wallet.tokenization_approval_request: Occurs when a tokenization - # approval request is made. This event will be deprecated in the future. We - # recommend using `tokenization.approval_request` instead. # - digital_wallet.tokenization_result: Occurs when a tokenization request # succeeded or failed. # @@ -194,7 +191,6 @@ module EventType CARD_RENEWED = :"card.renewed" CARD_SHIPPED = :"card.shipped" CARD_UPDATED = :"card.updated" - DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = :"digital_wallet.tokenization_approval_request" DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE = :"digital_wallet.tokenization_two_factor_authentication_code" diff --git a/lib/lithic/models/event_subscription.rb b/lib/lithic/models/event_subscription.rb index 95dc392c..3e17e7e0 100644 --- a/lib/lithic/models/event_subscription.rb +++ b/lib/lithic/models/event_subscription.rb @@ -72,9 +72,6 @@ class EventSubscription < Lithic::Internal::Type::BaseModel # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. # - card.updated: Occurs when a card is updated. - # - digital_wallet.tokenization_approval_request: Occurs when a tokenization - # approval request is made. This event will be deprecated in the future. We - # recommend using `tokenization.approval_request` instead. # - digital_wallet.tokenization_result: Occurs when a tokenization request # succeeded or failed. # @@ -167,7 +164,6 @@ module EventType CARD_RENEWED = :"card.renewed" CARD_SHIPPED = :"card.shipped" CARD_UPDATED = :"card.updated" - DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = :"digital_wallet.tokenization_approval_request" DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE = :"digital_wallet.tokenization_two_factor_authentication_code" diff --git a/lib/lithic/models/events/subscription_create_params.rb b/lib/lithic/models/events/subscription_create_params.rb index 8785fb85..d18eb93f 100644 --- a/lib/lithic/models/events/subscription_create_params.rb +++ b/lib/lithic/models/events/subscription_create_params.rb @@ -74,9 +74,6 @@ class SubscriptionCreateParams < Lithic::Internal::Type::BaseModel # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. # - card.updated: Occurs when a card is updated. - # - digital_wallet.tokenization_approval_request: Occurs when a tokenization - # approval request is made. This event will be deprecated in the future. We - # recommend using `tokenization.approval_request` instead. # - digital_wallet.tokenization_result: Occurs when a tokenization request # succeeded or failed. # @@ -169,7 +166,6 @@ module EventType CARD_RENEWED = :"card.renewed" CARD_SHIPPED = :"card.shipped" CARD_UPDATED = :"card.updated" - DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = :"digital_wallet.tokenization_approval_request" DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE = :"digital_wallet.tokenization_two_factor_authentication_code" diff --git a/lib/lithic/models/events/subscription_send_simulated_example_params.rb b/lib/lithic/models/events/subscription_send_simulated_example_params.rb index 2aec2fc5..8570b50a 100644 --- a/lib/lithic/models/events/subscription_send_simulated_example_params.rb +++ b/lib/lithic/models/events/subscription_send_simulated_example_params.rb @@ -47,7 +47,6 @@ module EventType CARD_RENEWED = :"card.renewed" CARD_SHIPPED = :"card.shipped" CARD_UPDATED = :"card.updated" - DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = :"digital_wallet.tokenization_approval_request" DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE = :"digital_wallet.tokenization_two_factor_authentication_code" diff --git a/lib/lithic/models/events/subscription_update_params.rb b/lib/lithic/models/events/subscription_update_params.rb index 0c942d0d..45493a11 100644 --- a/lib/lithic/models/events/subscription_update_params.rb +++ b/lib/lithic/models/events/subscription_update_params.rb @@ -81,9 +81,6 @@ class SubscriptionUpdateParams < Lithic::Internal::Type::BaseModel # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. # - card.updated: Occurs when a card is updated. - # - digital_wallet.tokenization_approval_request: Occurs when a tokenization - # approval request is made. This event will be deprecated in the future. We - # recommend using `tokenization.approval_request` instead. # - digital_wallet.tokenization_result: Occurs when a tokenization request # succeeded or failed. # @@ -176,7 +173,6 @@ module EventType CARD_RENEWED = :"card.renewed" CARD_SHIPPED = :"card.shipped" CARD_UPDATED = :"card.updated" - DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = :"digital_wallet.tokenization_approval_request" DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE = :"digital_wallet.tokenization_two_factor_authentication_code" diff --git a/lib/lithic/models/financial_account.rb b/lib/lithic/models/financial_account.rb index 4a80cec9..5c290dec 100644 --- a/lib/lithic/models/financial_account.rb +++ b/lib/lithic/models/financial_account.rb @@ -202,6 +202,7 @@ module Type PROGRAM_RECEIVABLES = :PROGRAM_RECEIVABLES COLLECTION = :COLLECTION PROGRAM_BANK_ACCOUNTS_PAYABLE = :PROGRAM_BANK_ACCOUNTS_PAYABLE + EARLY_DIRECT_DEPOSIT_FLOAT = :EARLY_DIRECT_DEPOSIT_FLOAT # @!method self.values # @return [Array] diff --git a/lib/lithic/models/financial_account_list_params.rb b/lib/lithic/models/financial_account_list_params.rb index c1ca7eac..7f7b451e 100644 --- a/lib/lithic/models/financial_account_list_params.rb +++ b/lib/lithic/models/financial_account_list_params.rb @@ -42,6 +42,7 @@ module Type OPERATING = :OPERATING RESERVE = :RESERVE SECURITY = :SECURITY + EARLY_DIRECT_DEPOSIT_FLOAT = :EARLY_DIRECT_DEPOSIT_FLOAT # @!method self.values # @return [Array] diff --git a/lib/lithic/models/financial_accounts/interest_tier_schedule.rb b/lib/lithic/models/financial_accounts/interest_tier_schedule.rb index 69afa8cd..e9610b87 100644 --- a/lib/lithic/models/financial_accounts/interest_tier_schedule.rb +++ b/lib/lithic/models/financial_accounts/interest_tier_schedule.rb @@ -17,6 +17,12 @@ class FinancialAccountsInterestTierSchedule < Lithic::Internal::Type::BaseModel # @return [Date] required :effective_date, Date + # @!attribute penalty_rates + # Custom rates per category for penalties + # + # @return [Object, nil] + optional :penalty_rates, Lithic::Internal::Type::Unknown + # @!attribute tier_name # Name of a tier contained in the credit product. Mutually exclusive with # tier_rates @@ -30,7 +36,7 @@ class FinancialAccountsInterestTierSchedule < Lithic::Internal::Type::BaseModel # @return [Object, nil] optional :tier_rates, Lithic::Internal::Type::Unknown - # @!method initialize(credit_product_token:, effective_date:, tier_name: nil, tier_rates: nil) + # @!method initialize(credit_product_token:, effective_date:, penalty_rates: nil, tier_name: nil, tier_rates: nil) # Some parameter documentations has been truncated, see # {Lithic::Models::FinancialAccounts::FinancialAccountsInterestTierSchedule} for # more details. @@ -41,6 +47,8 @@ class FinancialAccountsInterestTierSchedule < Lithic::Internal::Type::BaseModel # # @param effective_date [Date] Date the tier should be effective in YYYY-MM-DD format # + # @param penalty_rates [Object] Custom rates per category for penalties + # # @param tier_name [String] Name of a tier contained in the credit product. Mutually exclusive with tier_rat # # @param tier_rates [Object] Custom rates per category. Mutually exclusive with tier_name diff --git a/lib/lithic/models/financial_accounts/interest_tier_schedule_update_params.rb b/lib/lithic/models/financial_accounts/interest_tier_schedule_update_params.rb index 1e93739d..21e8f5bf 100644 --- a/lib/lithic/models/financial_accounts/interest_tier_schedule_update_params.rb +++ b/lib/lithic/models/financial_accounts/interest_tier_schedule_update_params.rb @@ -18,6 +18,12 @@ class InterestTierScheduleUpdateParams < Lithic::Internal::Type::BaseModel # @return [Date] required :effective_date, Date + # @!attribute penalty_rates + # Custom rates per category for penalties + # + # @return [Object, nil] + optional :penalty_rates, Lithic::Internal::Type::Unknown + # @!attribute tier_name # Name of a tier contained in the credit product. Mutually exclusive with # tier_rates @@ -31,7 +37,7 @@ class InterestTierScheduleUpdateParams < Lithic::Internal::Type::BaseModel # @return [Object, nil] optional :tier_rates, Lithic::Internal::Type::Unknown - # @!method initialize(financial_account_token:, effective_date:, tier_name: nil, tier_rates: nil, request_options: {}) + # @!method initialize(financial_account_token:, effective_date:, penalty_rates: nil, tier_name: nil, tier_rates: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Lithic::Models::FinancialAccounts::InterestTierScheduleUpdateParams} for more # details. @@ -40,6 +46,8 @@ class InterestTierScheduleUpdateParams < Lithic::Internal::Type::BaseModel # # @param effective_date [Date] # + # @param penalty_rates [Object] Custom rates per category for penalties + # # @param tier_name [String] Name of a tier contained in the credit product. Mutually exclusive with tier_rat # # @param tier_rates [Object] Custom rates per category. Mutually exclusive with tier_name diff --git a/lib/lithic/models/financial_accounts/statements/statement_line_items.rb b/lib/lithic/models/financial_accounts/statements/statement_line_items.rb index b7267763..c4781667 100644 --- a/lib/lithic/models/financial_accounts/statements/statement_line_items.rb +++ b/lib/lithic/models/financial_accounts/statements/statement_line_items.rb @@ -34,6 +34,9 @@ class Data < Lithic::Internal::Type::BaseModel required :amount, Integer # @!attribute category + # Note: Inbound wire transfers are coming soon (availability varies by partner + # bank). The WIRE category is a preview. To learn more, contact your customer + # success manager. # # @return [Symbol, Lithic::Models::FinancialAccounts::Statements::StatementLineItems::Data::Category] required :category, enum: -> { Lithic::FinancialAccounts::Statements::StatementLineItems::Data::Category } @@ -92,7 +95,19 @@ class Data < Lithic::Internal::Type::BaseModel # @return [String, nil] optional :descriptor, String - # @!method initialize(token:, amount:, category:, created:, currency:, effective_date:, event_type:, financial_account_token:, financial_transaction_event_token:, financial_transaction_token:, card_token: nil, descriptor: nil) + # @!attribute event_subtype + # Subtype of the event that generated the line items + # + # @return [String, nil] + optional :event_subtype, String, nil?: true + + # @!attribute loan_tape_date + # Date of the loan tape that generated this line item + # + # @return [Date, nil] + optional :loan_tape_date, Date, nil?: true + + # @!method initialize(token:, amount:, category:, created:, currency:, effective_date:, event_type:, financial_account_token:, financial_transaction_event_token:, financial_transaction_token:, card_token: nil, descriptor: nil, event_subtype: nil, loan_tape_date: nil) # Some parameter documentations has been truncated, see # {Lithic::Models::FinancialAccounts::Statements::StatementLineItems::Data} for # more details. @@ -101,7 +116,7 @@ class Data < Lithic::Internal::Type::BaseModel # # @param amount [Integer] Transaction amount in cents # - # @param category [Symbol, Lithic::Models::FinancialAccounts::Statements::StatementLineItems::Data::Category] + # @param category [Symbol, Lithic::Models::FinancialAccounts::Statements::StatementLineItems::Data::Category] Note: Inbound wire transfers are coming soon (availability varies by partner ban # # @param created [Time] Timestamp of when the line item was generated # @@ -120,12 +135,21 @@ class Data < Lithic::Internal::Type::BaseModel # @param card_token [String] Globally unique identifier for a card # # @param descriptor [String] + # + # @param event_subtype [String, nil] Subtype of the event that generated the line items + # + # @param loan_tape_date [Date, nil] Date of the loan tape that generated this line item + # Note: Inbound wire transfers are coming soon (availability varies by partner + # bank). The WIRE category is a preview. To learn more, contact your customer + # success manager. + # # @see Lithic::Models::FinancialAccounts::Statements::StatementLineItems::Data#category module Category extend Lithic::Internal::Type::Enum ACH = :ACH + WIRE = :WIRE BALANCE_OR_FUNDING = :BALANCE_OR_FUNDING FEE = :FEE REWARD = :REWARD @@ -144,6 +168,7 @@ module Category MANAGEMENT_FEE = :MANAGEMENT_FEE MANAGEMENT_REWARD = :MANAGEMENT_REWARD MANAGEMENT_DISBURSEMENT = :MANAGEMENT_DISBURSEMENT + HOLD = :HOLD PROGRAM_FUNDING = :PROGRAM_FUNDING # @!method self.values diff --git a/lib/lithic/models/hold.rb b/lib/lithic/models/hold.rb new file mode 100644 index 00000000..eadd9e29 --- /dev/null +++ b/lib/lithic/models/hold.rb @@ -0,0 +1,147 @@ +# frozen_string_literal: true + +module Lithic + module Models + # @see Lithic::Resources::Holds#create + class Hold < Lithic::Internal::Type::BaseModel + # @!attribute token + # Unique identifier for the transaction + # + # @return [String] + required :token, String + + # @!attribute created + # ISO 8601 timestamp of when the transaction was created + # + # @return [Time] + required :created, Time + + # @!attribute status + # Status of a hold transaction + # + # @return [Symbol, Lithic::Models::Hold::Status] + required :status, enum: -> { Lithic::Hold::Status } + + # @!attribute updated + # ISO 8601 timestamp of when the transaction was last updated + # + # @return [Time] + required :updated, Time + + # @!attribute currency + # + # @return [String, nil] + optional :currency, String + + # @!attribute events + # + # @return [Array, nil] + optional :events, -> { Lithic::Internal::Type::ArrayOf[Lithic::HoldEvent] } + + # @!attribute expiration_datetime + # When the hold will auto-expire if not resolved + # + # @return [Time, nil] + optional :expiration_datetime, Time, nil?: true + + # @!attribute family + # HOLD - Hold Transaction + # + # @return [Symbol, Lithic::Models::Hold::Family, nil] + optional :family, enum: -> { Lithic::Hold::Family } + + # @!attribute financial_account_token + # + # @return [String, nil] + optional :financial_account_token, String + + # @!attribute pending_amount + # Current pending amount (0 when resolved) + # + # @return [Integer, nil] + optional :pending_amount, Integer + + # @!attribute result + # + # @return [Symbol, Lithic::Models::Hold::Result, nil] + optional :result, enum: -> { Lithic::Hold::Result } + + # @!attribute user_defined_id + # + # @return [String, nil] + optional :user_defined_id, String, nil?: true + + # @!method initialize(token:, created:, status:, updated:, currency: nil, events: nil, expiration_datetime: nil, family: nil, financial_account_token: nil, pending_amount: nil, result: nil, user_defined_id: nil) + # A hold transaction representing reserved funds on a financial account. Holds + # move funds from available to pending balance in anticipation of future payments. + # They can be resolved via settlement (linked to payment), manual release, or + # expiration. + # + # @param token [String] Unique identifier for the transaction + # + # @param created [Time] ISO 8601 timestamp of when the transaction was created + # + # @param status [Symbol, Lithic::Models::Hold::Status] Status of a hold transaction + # + # @param updated [Time] ISO 8601 timestamp of when the transaction was last updated + # + # @param currency [String] + # + # @param events [Array] + # + # @param expiration_datetime [Time, nil] When the hold will auto-expire if not resolved + # + # @param family [Symbol, Lithic::Models::Hold::Family] HOLD - Hold Transaction + # + # @param financial_account_token [String] + # + # @param pending_amount [Integer] Current pending amount (0 when resolved) + # + # @param result [Symbol, Lithic::Models::Hold::Result] + # + # @param user_defined_id [String, nil] + + # Status of a hold transaction + # + # @see Lithic::Models::Hold#status + module Status + extend Lithic::Internal::Type::Enum + + PENDING = :PENDING + SETTLED = :SETTLED + EXPIRED = :EXPIRED + VOIDED = :VOIDED + DECLINED = :DECLINED + REVERSED = :REVERSED + CANCELED = :CANCELED + RETURNED = :RETURNED + + # @!method self.values + # @return [Array] + end + + # HOLD - Hold Transaction + # + # @see Lithic::Models::Hold#family + module Family + extend Lithic::Internal::Type::Enum + + HOLD = :HOLD + + # @!method self.values + # @return [Array] + end + + # @see Lithic::Models::Hold#result + module Result + extend Lithic::Internal::Type::Enum + + APPROVED = :APPROVED + DECLINED = :DECLINED + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/lithic/models/hold_create_params.rb b/lib/lithic/models/hold_create_params.rb new file mode 100644 index 00000000..d3bf691a --- /dev/null +++ b/lib/lithic/models/hold_create_params.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true + +module Lithic + module Models + # @see Lithic::Resources::Holds#create + class HoldCreateParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute financial_account_token + # + # @return [String] + required :financial_account_token, String + + # @!attribute amount + # Amount to hold in cents + # + # @return [Integer] + required :amount, Integer + + # @!attribute token + # Customer-provided token for idempotency. Becomes the hold token. + # + # @return [String, nil] + optional :token, String + + # @!attribute expiration_datetime + # When the hold should auto-expire + # + # @return [Time, nil] + optional :expiration_datetime, Time + + # @!attribute memo + # Reason for the hold + # + # @return [String, nil] + optional :memo, String, nil?: true + + # @!attribute user_defined_id + # User-provided identifier for the hold + # + # @return [String, nil] + optional :user_defined_id, String + + # @!method initialize(financial_account_token:, amount:, token: nil, expiration_datetime: nil, memo: nil, user_defined_id: nil, request_options: {}) + # @param financial_account_token [String] + # + # @param amount [Integer] Amount to hold in cents + # + # @param token [String] Customer-provided token for idempotency. Becomes the hold token. + # + # @param expiration_datetime [Time] When the hold should auto-expire + # + # @param memo [String, nil] Reason for the hold + # + # @param user_defined_id [String] User-provided identifier for the hold + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/lithic/models/hold_event.rb b/lib/lithic/models/hold_event.rb new file mode 100644 index 00000000..73fd3d79 --- /dev/null +++ b/lib/lithic/models/hold_event.rb @@ -0,0 +1,110 @@ +# frozen_string_literal: true + +module Lithic + module Models + class HoldEvent < Lithic::Internal::Type::BaseModel + # @!attribute token + # + # @return [String] + required :token, String + + # @!attribute amount + # Amount in cents + # + # @return [Integer] + required :amount, Integer + + # @!attribute created + # + # @return [Time] + required :created, Time + + # @!attribute detailed_results + # + # @return [Array] + required :detailed_results, + -> { Lithic::Internal::Type::ArrayOf[enum: Lithic::HoldEvent::DetailedResult] } + + # @!attribute memo + # + # @return [String, nil] + required :memo, String, nil?: true + + # @!attribute result + # + # @return [Symbol, Lithic::Models::HoldEvent::Result] + required :result, enum: -> { Lithic::HoldEvent::Result } + + # @!attribute settling_transaction_token + # Transaction token of the payment that settled this hold (only populated for + # HOLD_SETTLED events) + # + # @return [String, nil] + required :settling_transaction_token, String, nil?: true + + # @!attribute type + # Type of hold lifecycle event + # + # @return [Symbol, Lithic::Models::HoldEvent::Type] + required :type, enum: -> { Lithic::HoldEvent::Type } + + # @!method initialize(token:, amount:, created:, detailed_results:, memo:, result:, settling_transaction_token:, type:) + # Some parameter documentations has been truncated, see + # {Lithic::Models::HoldEvent} for more details. + # + # Event representing a lifecycle change to a hold + # + # @param token [String] + # + # @param amount [Integer] Amount in cents + # + # @param created [Time] + # + # @param detailed_results [Array] + # + # @param memo [String, nil] + # + # @param result [Symbol, Lithic::Models::HoldEvent::Result] + # + # @param settling_transaction_token [String, nil] Transaction token of the payment that settled this hold (only populated for HOLD + # + # @param type [Symbol, Lithic::Models::HoldEvent::Type] Type of hold lifecycle event + + module DetailedResult + extend Lithic::Internal::Type::Enum + + APPROVED = :APPROVED + INSUFFICIENT_FUNDS = :INSUFFICIENT_FUNDS + + # @!method self.values + # @return [Array] + end + + # @see Lithic::Models::HoldEvent#result + module Result + extend Lithic::Internal::Type::Enum + + APPROVED = :APPROVED + DECLINED = :DECLINED + + # @!method self.values + # @return [Array] + end + + # Type of hold lifecycle event + # + # @see Lithic::Models::HoldEvent#type + module Type + extend Lithic::Internal::Type::Enum + + HOLD_INITIATED = :HOLD_INITIATED + HOLD_VOIDED = :HOLD_VOIDED + HOLD_EXPIRED = :HOLD_EXPIRED + HOLD_SETTLED = :HOLD_SETTLED + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/lithic/models/hold_list_params.rb b/lib/lithic/models/hold_list_params.rb new file mode 100644 index 00000000..07648f85 --- /dev/null +++ b/lib/lithic/models/hold_list_params.rb @@ -0,0 +1,89 @@ +# frozen_string_literal: true + +module Lithic + module Models + # @see Lithic::Resources::Holds#list + class HoldListParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute financial_account_token + # + # @return [String] + required :financial_account_token, String + + # @!attribute begin_ + # Date string in RFC 3339 format. Only entries created after the specified time + # will be included. UTC time zone. + # + # @return [Time, nil] + optional :begin_, Time + + # @!attribute end_ + # Date string in RFC 3339 format. Only entries created before the specified time + # will be included. UTC time zone. + # + # @return [Time, nil] + optional :end_, Time + + # @!attribute ending_before + # A cursor representing an item's token before which a page of results should end. + # Used to retrieve the previous page of results before this item. + # + # @return [String, nil] + optional :ending_before, String + + # @!attribute page_size + # Page size (for pagination). + # + # @return [Integer, nil] + optional :page_size, Integer + + # @!attribute starting_after + # A cursor representing an item's token after which a page of results should + # begin. Used to retrieve the next page of results after this item. + # + # @return [String, nil] + optional :starting_after, String + + # @!attribute status + # Hold status to filter by. + # + # @return [Symbol, Lithic::Models::HoldListParams::Status, nil] + optional :status, enum: -> { Lithic::HoldListParams::Status } + + # @!method initialize(financial_account_token:, begin_: nil, end_: nil, ending_before: nil, page_size: nil, starting_after: nil, status: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {Lithic::Models::HoldListParams} for more details. + # + # @param financial_account_token [String] + # + # @param begin_ [Time] Date string in RFC 3339 format. Only entries created after the specified time wi + # + # @param end_ [Time] Date string in RFC 3339 format. Only entries created before the specified time w + # + # @param ending_before [String] A cursor representing an item's token before which a page of results should end. + # + # @param page_size [Integer] Page size (for pagination). + # + # @param starting_after [String] A cursor representing an item's token after which a page of results should begin + # + # @param status [Symbol, Lithic::Models::HoldListParams::Status] Hold status to filter by. + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + + # Hold status to filter by. + module Status + extend Lithic::Internal::Type::Enum + + PENDING = :PENDING + SETTLED = :SETTLED + EXPIRED = :EXPIRED + VOIDED = :VOIDED + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/lithic/models/hold_retrieve_params.rb b/lib/lithic/models/hold_retrieve_params.rb new file mode 100644 index 00000000..9ad8e397 --- /dev/null +++ b/lib/lithic/models/hold_retrieve_params.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module Lithic + module Models + # @see Lithic::Resources::Holds#retrieve + class HoldRetrieveParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute hold_token + # + # @return [String] + required :hold_token, String + + # @!method initialize(hold_token:, request_options: {}) + # @param hold_token [String] + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/lithic/models/hold_void_params.rb b/lib/lithic/models/hold_void_params.rb new file mode 100644 index 00000000..846a5645 --- /dev/null +++ b/lib/lithic/models/hold_void_params.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +module Lithic + module Models + # @see Lithic::Resources::Holds#void + class HoldVoidParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute hold_token + # + # @return [String] + required :hold_token, String + + # @!attribute memo + # Reason for voiding the hold + # + # @return [String, nil] + optional :memo, String, nil?: true + + # @!method initialize(hold_token:, memo: nil, request_options: {}) + # @param hold_token [String] + # + # @param memo [String, nil] Reason for voiding the hold + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/lithic/models/instance_financial_account_type.rb b/lib/lithic/models/instance_financial_account_type.rb index 75707f8d..5c92c5b4 100644 --- a/lib/lithic/models/instance_financial_account_type.rb +++ b/lib/lithic/models/instance_financial_account_type.rb @@ -16,6 +16,7 @@ module InstanceFinancialAccountType PROGRAM_RECEIVABLES = :PROGRAM_RECEIVABLES COLLECTION = :COLLECTION PROGRAM_BANK_ACCOUNTS_PAYABLE = :PROGRAM_BANK_ACCOUNTS_PAYABLE + EARLY_DIRECT_DEPOSIT_FLOAT = :EARLY_DIRECT_DEPOSIT_FLOAT # @!method self.values # @return [Array] diff --git a/lib/lithic/models/parsed_webhook_event.rb b/lib/lithic/models/parsed_webhook_event.rb index 315edf85..2c9e04c6 100644 --- a/lib/lithic/models/parsed_webhook_event.rb +++ b/lib/lithic/models/parsed_webhook_event.rb @@ -23,9 +23,6 @@ module ParsedWebhookEvent variant -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent } - # A webhook for tokenization decisioning sent to the customer's responder endpoint - variant -> { Lithic::TokenizationDecisioningRequestWebhookEvent } - variant -> { Lithic::AuthRulesBacktestReportCreatedWebhookEvent } variant -> { Lithic::BalanceUpdatedWebhookEvent } @@ -54,6 +51,7 @@ module ParsedWebhookEvent variant -> { Lithic::CardTransactionEnhancedDataUpdatedWebhookEvent } + # Payload for digital wallet tokenization approval requests. Used for both the decisioning responder request (sent to the customer's endpoint for a real-time decision) and the subsequent webhook event (sent after the decision is made). Fields like customer_tokenization_decision, tokenization_decline_reasons, tokenization_tfa_reasons, and rule_results are only populated in the webhook event, not in the initial decisioning request. variant -> { Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent } variant -> { Lithic::DigitalWalletTokenizationResultWebhookEvent } @@ -812,7 +810,7 @@ module EventType end # @!method self.variants - # @return [Array(Lithic::Models::AccountHolderCreatedWebhookEvent, Lithic::Models::ParsedWebhookEvent::KYBPayload, Lithic::Models::ParsedWebhookEvent::KYCPayload, Lithic::Models::ParsedWebhookEvent::LegacyPayload, Lithic::Models::AccountHolderVerificationWebhookEvent, Lithic::Models::AccountHolderDocumentUpdatedWebhookEvent, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent, Lithic::Models::TokenizationDecisioningRequestWebhookEvent, Lithic::Models::AuthRulesBacktestReportCreatedWebhookEvent, Lithic::Models::BalanceUpdatedWebhookEvent, Lithic::Models::BookTransferTransactionCreatedWebhookEvent, Lithic::Models::BookTransferTransactionUpdatedWebhookEvent, Lithic::Models::CardCreatedWebhookEvent, Lithic::Models::CardConvertedWebhookEvent, Lithic::Models::CardRenewedWebhookEvent, Lithic::Models::CardReissuedWebhookEvent, Lithic::Models::CardShippedWebhookEvent, Lithic::Models::CardUpdatedWebhookEvent, Lithic::Models::CardTransactionUpdatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataCreatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataUpdatedWebhookEvent, Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent, Lithic::Models::DigitalWalletTokenizationResultWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::DigitalWalletTokenizationUpdatedWebhookEvent, Lithic::Models::DisputeUpdatedWebhookEvent, Lithic::Models::DisputeEvidenceUploadFailedWebhookEvent, Lithic::Models::ExternalBankAccountCreatedWebhookEvent, Lithic::Models::ExternalBankAccountUpdatedWebhookEvent, Lithic::Models::ExternalPaymentCreatedWebhookEvent, Lithic::Models::ExternalPaymentUpdatedWebhookEvent, Lithic::Models::FinancialAccountCreatedWebhookEvent, Lithic::Models::FinancialAccountUpdatedWebhookEvent, Lithic::Models::FundingEventCreatedWebhookEvent, Lithic::Models::LoanTapeCreatedWebhookEvent, Lithic::Models::LoanTapeUpdatedWebhookEvent, Lithic::Models::ManagementOperationCreatedWebhookEvent, Lithic::Models::ManagementOperationUpdatedWebhookEvent, Lithic::Models::InternalTransactionCreatedWebhookEvent, Lithic::Models::InternalTransactionUpdatedWebhookEvent, Lithic::Models::NetworkTotalCreatedWebhookEvent, Lithic::Models::NetworkTotalUpdatedWebhookEvent, Lithic::Models::PaymentTransactionCreatedWebhookEvent, Lithic::Models::PaymentTransactionUpdatedWebhookEvent, Lithic::Models::SettlementReportUpdatedWebhookEvent, Lithic::Models::StatementsCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationChallengeWebhookEvent, Lithic::Models::TokenizationApprovalRequestWebhookEvent, Lithic::Models::TokenizationResultWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::TokenizationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationApprovalRequestWebhookEvent, Lithic::Models::DisputeTransactionCreatedWebhookEvent, Lithic::Models::DisputeTransactionUpdatedWebhookEvent)] + # @return [Array(Lithic::Models::AccountHolderCreatedWebhookEvent, Lithic::Models::ParsedWebhookEvent::KYBPayload, Lithic::Models::ParsedWebhookEvent::KYCPayload, Lithic::Models::ParsedWebhookEvent::LegacyPayload, Lithic::Models::AccountHolderVerificationWebhookEvent, Lithic::Models::AccountHolderDocumentUpdatedWebhookEvent, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent, Lithic::Models::AuthRulesBacktestReportCreatedWebhookEvent, Lithic::Models::BalanceUpdatedWebhookEvent, Lithic::Models::BookTransferTransactionCreatedWebhookEvent, Lithic::Models::BookTransferTransactionUpdatedWebhookEvent, Lithic::Models::CardCreatedWebhookEvent, Lithic::Models::CardConvertedWebhookEvent, Lithic::Models::CardRenewedWebhookEvent, Lithic::Models::CardReissuedWebhookEvent, Lithic::Models::CardShippedWebhookEvent, Lithic::Models::CardUpdatedWebhookEvent, Lithic::Models::CardTransactionUpdatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataCreatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataUpdatedWebhookEvent, Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent, Lithic::Models::DigitalWalletTokenizationResultWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::DigitalWalletTokenizationUpdatedWebhookEvent, Lithic::Models::DisputeUpdatedWebhookEvent, Lithic::Models::DisputeEvidenceUploadFailedWebhookEvent, Lithic::Models::ExternalBankAccountCreatedWebhookEvent, Lithic::Models::ExternalBankAccountUpdatedWebhookEvent, Lithic::Models::ExternalPaymentCreatedWebhookEvent, Lithic::Models::ExternalPaymentUpdatedWebhookEvent, Lithic::Models::FinancialAccountCreatedWebhookEvent, Lithic::Models::FinancialAccountUpdatedWebhookEvent, Lithic::Models::FundingEventCreatedWebhookEvent, Lithic::Models::LoanTapeCreatedWebhookEvent, Lithic::Models::LoanTapeUpdatedWebhookEvent, Lithic::Models::ManagementOperationCreatedWebhookEvent, Lithic::Models::ManagementOperationUpdatedWebhookEvent, Lithic::Models::InternalTransactionCreatedWebhookEvent, Lithic::Models::InternalTransactionUpdatedWebhookEvent, Lithic::Models::NetworkTotalCreatedWebhookEvent, Lithic::Models::NetworkTotalUpdatedWebhookEvent, Lithic::Models::PaymentTransactionCreatedWebhookEvent, Lithic::Models::PaymentTransactionUpdatedWebhookEvent, Lithic::Models::SettlementReportUpdatedWebhookEvent, Lithic::Models::StatementsCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationChallengeWebhookEvent, Lithic::Models::TokenizationApprovalRequestWebhookEvent, Lithic::Models::TokenizationResultWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::TokenizationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationApprovalRequestWebhookEvent, Lithic::Models::DisputeTransactionCreatedWebhookEvent, Lithic::Models::DisputeTransactionUpdatedWebhookEvent)] end end end diff --git a/lib/lithic/models/payment.rb b/lib/lithic/models/payment.rb index aa25ca3c..0601c958 100644 --- a/lib/lithic/models/payment.rb +++ b/lib/lithic/models/payment.rb @@ -189,6 +189,7 @@ module Category extend Lithic::Internal::Type::Enum ACH = :ACH + WIRE = :WIRE BALANCE_OR_FUNDING = :BALANCE_OR_FUNDING FEE = :FEE REWARD = :REWARD @@ -207,6 +208,7 @@ module Category MANAGEMENT_FEE = :MANAGEMENT_FEE MANAGEMENT_REWARD = :MANAGEMENT_REWARD MANAGEMENT_DISBURSEMENT = :MANAGEMENT_DISBURSEMENT + HOLD = :HOLD PROGRAM_FUNDING = :PROGRAM_FUNDING # @!method self.values @@ -254,8 +256,14 @@ class Event < Lithic::Internal::Type::BaseModel required :result, enum: -> { Lithic::Payment::Event::Result } # @!attribute type + # Note: Inbound wire transfers are coming soon (availability varies by partner + # bank). Wire-related event types below are a preview. To learn more, contact your + # customer success manager. + # # Event types: # + # ACH events: + # # - `ACH_ORIGINATION_INITIATED` - ACH origination received and pending # approval/release from an ACH hold. # - `ACH_ORIGINATION_REVIEWED` - ACH origination has completed the review process. @@ -271,6 +279,8 @@ class Event < Lithic::Internal::Type::BaseModel # - `ACH_RECEIPT_SETTLED` - ACH receipt funds have settled. # - `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available # balance. + # - `ACH_RECEIPT_RELEASED_EARLY` - ACH receipt released early from pending to + # available balance. # - `ACH_RETURN_INITIATED` - ACH initiated return for an ACH receipt. # - `ACH_RETURN_PROCESSED` - ACH receipt returned by the Receiving Depository # Financial Institution. @@ -279,6 +289,26 @@ class Event < Lithic::Internal::Type::BaseModel # - `ACH_RETURN_REJECTED` - ACH return was rejected by the Receiving Depository # Financial Institution. # + # Wire transfer events: + # + # - `WIRE_TRANSFER_INBOUND_RECEIVED` - Inbound wire transfer received from the + # Federal Reserve and pending release to available balance. + # - `WIRE_TRANSFER_INBOUND_SETTLED` - Inbound wire transfer funds released from + # pending to available balance. + # - `WIRE_TRANSFER_INBOUND_BLOCKED` - Inbound wire transfer blocked and funds + # frozen for regulatory review. + # + # Wire return events: + # + # - `WIRE_RETURN_OUTBOUND_INITIATED` - Outbound wire return initiated to return + # funds from an inbound wire transfer. + # - `WIRE_RETURN_OUTBOUND_SENT` - Outbound wire return sent to the Federal Reserve + # and pending acceptance. + # - `WIRE_RETURN_OUTBOUND_SETTLED` - Outbound wire return accepted by the Federal + # Reserve and funds returned to sender. + # - `WIRE_RETURN_OUTBOUND_REJECTED` - Outbound wire return rejected by the Federal + # Reserve. + # # @return [Symbol, Lithic::Models::Payment::Event::Type] required :type, enum: -> { Lithic::Payment::Event::Type } @@ -290,7 +320,9 @@ class Event < Lithic::Internal::Type::BaseModel -> { Lithic::Internal::Type::ArrayOf[enum: Lithic::Payment::Event::DetailedResult] } # @!attribute external_id - # Payment event external ID, for example, ACH trace number. + # Payment event external ID. For ACH transactions, this is the ACH trace number. + # For inbound wire transfers, this is the IMAD (Input Message Accountability + # Data). # # @return [String, nil] optional :external_id, String, nil?: true @@ -299,6 +331,10 @@ class Event < Lithic::Internal::Type::BaseModel # Some parameter documentations has been truncated, see # {Lithic::Models::Payment::Event} for more details. # + # Note: Inbound wire transfers are coming soon (availability varies by partner + # bank). Wire-related fields below are a preview. To learn more, contact your + # customer success manager. + # # Payment Event # # @param token [String] Globally unique identifier. @@ -309,11 +345,11 @@ class Event < Lithic::Internal::Type::BaseModel # # @param result [Symbol, Lithic::Models::Payment::Event::Result] APPROVED financial events were successful while DECLINED financial events were d # - # @param type [Symbol, Lithic::Models::Payment::Event::Type] Event types: + # @param type [Symbol, Lithic::Models::Payment::Event::Type] Note: Inbound wire transfers are coming soon (availability varies by partner ban # # @param detailed_results [Array] More detailed reasons for the event # - # @param external_id [String, nil] Payment event external ID, for example, ACH trace number. + # @param external_id [String, nil] Payment event external ID. For ACH transactions, this is the ACH trace number. # APPROVED financial events were successful while DECLINED financial events were # declined by user, Lithic, or the network. @@ -329,8 +365,14 @@ module Result # @return [Array] end + # Note: Inbound wire transfers are coming soon (availability varies by partner + # bank). Wire-related event types below are a preview. To learn more, contact your + # customer success manager. + # # Event types: # + # ACH events: + # # - `ACH_ORIGINATION_INITIATED` - ACH origination received and pending # approval/release from an ACH hold. # - `ACH_ORIGINATION_REVIEWED` - ACH origination has completed the review process. @@ -346,6 +388,8 @@ module Result # - `ACH_RECEIPT_SETTLED` - ACH receipt funds have settled. # - `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available # balance. + # - `ACH_RECEIPT_RELEASED_EARLY` - ACH receipt released early from pending to + # available balance. # - `ACH_RETURN_INITIATED` - ACH initiated return for an ACH receipt. # - `ACH_RETURN_PROCESSED` - ACH receipt returned by the Receiving Depository # Financial Institution. @@ -354,6 +398,26 @@ module Result # - `ACH_RETURN_REJECTED` - ACH return was rejected by the Receiving Depository # Financial Institution. # + # Wire transfer events: + # + # - `WIRE_TRANSFER_INBOUND_RECEIVED` - Inbound wire transfer received from the + # Federal Reserve and pending release to available balance. + # - `WIRE_TRANSFER_INBOUND_SETTLED` - Inbound wire transfer funds released from + # pending to available balance. + # - `WIRE_TRANSFER_INBOUND_BLOCKED` - Inbound wire transfer blocked and funds + # frozen for regulatory review. + # + # Wire return events: + # + # - `WIRE_RETURN_OUTBOUND_INITIATED` - Outbound wire return initiated to return + # funds from an inbound wire transfer. + # - `WIRE_RETURN_OUTBOUND_SENT` - Outbound wire return sent to the Federal Reserve + # and pending acceptance. + # - `WIRE_RETURN_OUTBOUND_SETTLED` - Outbound wire return accepted by the Federal + # Reserve and funds returned to sender. + # - `WIRE_RETURN_OUTBOUND_REJECTED` - Outbound wire return rejected by the Federal + # Reserve. + # # @see Lithic::Models::Payment::Event#type module Type extend Lithic::Internal::Type::Enum @@ -367,11 +431,19 @@ module Type ACH_ORIGINATION_SETTLED = :ACH_ORIGINATION_SETTLED ACH_RECEIPT_PROCESSED = :ACH_RECEIPT_PROCESSED ACH_RECEIPT_RELEASED = :ACH_RECEIPT_RELEASED + ACH_RECEIPT_RELEASED_EARLY = :ACH_RECEIPT_RELEASED_EARLY ACH_RECEIPT_SETTLED = :ACH_RECEIPT_SETTLED ACH_RETURN_INITIATED = :ACH_RETURN_INITIATED ACH_RETURN_PROCESSED = :ACH_RETURN_PROCESSED ACH_RETURN_REJECTED = :ACH_RETURN_REJECTED ACH_RETURN_SETTLED = :ACH_RETURN_SETTLED + WIRE_TRANSFER_INBOUND_RECEIVED = :WIRE_TRANSFER_INBOUND_RECEIVED + WIRE_TRANSFER_INBOUND_SETTLED = :WIRE_TRANSFER_INBOUND_SETTLED + WIRE_TRANSFER_INBOUND_BLOCKED = :WIRE_TRANSFER_INBOUND_BLOCKED + WIRE_RETURN_OUTBOUND_INITIATED = :WIRE_RETURN_OUTBOUND_INITIATED + WIRE_RETURN_OUTBOUND_SENT = :WIRE_RETURN_OUTBOUND_SENT + WIRE_RETURN_OUTBOUND_SETTLED = :WIRE_RETURN_OUTBOUND_SETTLED + WIRE_RETURN_OUTBOUND_REJECTED = :WIRE_RETURN_OUTBOUND_REJECTED # @!method self.values # @return [Array] @@ -531,13 +603,7 @@ class WireMethodAttributes < Lithic::Internal::Type::BaseModel # @return [String, nil] optional :message_id, String, nil?: true - # @!attribute remittance_information - # Payment details or invoice reference - # - # @return [String, nil] - optional :remittance_information, String, nil?: true - - # @!method initialize(wire_message_type:, wire_network:, creditor: nil, debtor: nil, message_id: nil, remittance_information: nil) + # @!method initialize(wire_message_type:, wire_network:, creditor: nil, debtor: nil, message_id: nil) # Some parameter documentations has been truncated, see # {Lithic::Models::Payment::MethodAttributes::WireMethodAttributes} for more # details. @@ -551,8 +617,6 @@ class WireMethodAttributes < Lithic::Internal::Type::BaseModel # @param debtor [Lithic::Models::WirePartyDetails] # # @param message_id [String, nil] Point to point reference identifier, as assigned by the instructing party, used - # - # @param remittance_information [String, nil] Payment details or invoice reference # Type of wire transfer # diff --git a/lib/lithic/models/payment_simulate_action_params.rb b/lib/lithic/models/payment_simulate_action_params.rb index f5ac57c8..defe97db 100644 --- a/lib/lithic/models/payment_simulate_action_params.rb +++ b/lib/lithic/models/payment_simulate_action_params.rb @@ -67,6 +67,7 @@ module EventType ACH_ORIGINATION_SETTLED = :ACH_ORIGINATION_SETTLED ACH_RECEIPT_SETTLED = :ACH_RECEIPT_SETTLED ACH_RECEIPT_RELEASED = :ACH_RECEIPT_RELEASED + ACH_RECEIPT_RELEASED_EARLY = :ACH_RECEIPT_RELEASED_EARLY ACH_RETURN_INITIATED = :ACH_RETURN_INITIATED ACH_RETURN_PROCESSED = :ACH_RETURN_PROCESSED ACH_RETURN_SETTLED = :ACH_RETURN_SETTLED diff --git a/lib/lithic/models/tokenization_decisioning_request_webhook_event.rb b/lib/lithic/models/tokenization_decisioning_request_webhook_event.rb deleted file mode 100644 index c466c1a8..00000000 --- a/lib/lithic/models/tokenization_decisioning_request_webhook_event.rb +++ /dev/null @@ -1,159 +0,0 @@ -# frozen_string_literal: true - -module Lithic - module Models - class TokenizationDecisioningRequestWebhookEvent < Lithic::Internal::Type::BaseModel - # @!attribute account_token - # Unique identifier for the user tokenizing a card - # - # @return [String] - required :account_token, String - - # @!attribute card_token - # Unique identifier for the card being tokenized - # - # @return [String] - required :card_token, String - - # @!attribute created - # Indicate when the request was received from Mastercard or Visa - # - # @return [Time] - required :created, Time - - # @!attribute digital_wallet_token_metadata - # Contains the metadata for the digital wallet being tokenized. - # - # @return [Lithic::Models::TokenMetadata] - required :digital_wallet_token_metadata, -> { Lithic::TokenMetadata } - - # @!attribute event_type - # The name of this event - # - # @return [Symbol, Lithic::Models::TokenizationDecisioningRequestWebhookEvent::EventType] - required :event_type, enum: -> { Lithic::TokenizationDecisioningRequestWebhookEvent::EventType } - - # @!attribute issuer_decision - # Whether Lithic decisioned on the token, and if so, what the decision was. - # APPROVED/VERIFICATION_REQUIRED/DENIED. - # - # @return [Symbol, Lithic::Models::TokenizationDecisioningRequestWebhookEvent::IssuerDecision] - required :issuer_decision, enum: -> { Lithic::TokenizationDecisioningRequestWebhookEvent::IssuerDecision } - - # @!attribute tokenization_channel - # The channel through which the tokenization was made. - # - # @return [Symbol, Lithic::Models::TokenizationDecisioningRequestWebhookEvent::TokenizationChannel] - required :tokenization_channel, - enum: -> { Lithic::TokenizationDecisioningRequestWebhookEvent::TokenizationChannel } - - # @!attribute tokenization_token - # Unique identifier for the digital wallet token attempt - # - # @return [String] - required :tokenization_token, String - - # @!attribute wallet_decisioning_info - # - # @return [Lithic::Models::WalletDecisioningInfo] - required :wallet_decisioning_info, -> { Lithic::WalletDecisioningInfo } - - # @!attribute device - # - # @return [Lithic::Models::Device, nil] - optional :device, -> { Lithic::Device } - - # @!attribute tokenization_source - # The source of the tokenization. - # - # @return [Symbol, Lithic::Models::TokenizationDecisioningRequestWebhookEvent::TokenizationSource, nil] - optional :tokenization_source, - enum: -> { Lithic::TokenizationDecisioningRequestWebhookEvent::TokenizationSource } - - # @!method initialize(account_token:, card_token:, created:, digital_wallet_token_metadata:, event_type:, issuer_decision:, tokenization_channel:, tokenization_token:, wallet_decisioning_info:, device: nil, tokenization_source: nil) - # Some parameter documentations has been truncated, see - # {Lithic::Models::TokenizationDecisioningRequestWebhookEvent} for more details. - # - # A webhook for tokenization decisioning sent to the customer's responder endpoint - # - # @param account_token [String] Unique identifier for the user tokenizing a card - # - # @param card_token [String] Unique identifier for the card being tokenized - # - # @param created [Time] Indicate when the request was received from Mastercard or Visa - # - # @param digital_wallet_token_metadata [Lithic::Models::TokenMetadata] Contains the metadata for the digital wallet being tokenized. - # - # @param event_type [Symbol, Lithic::Models::TokenizationDecisioningRequestWebhookEvent::EventType] The name of this event - # - # @param issuer_decision [Symbol, Lithic::Models::TokenizationDecisioningRequestWebhookEvent::IssuerDecision] Whether Lithic decisioned on the token, and if so, what the decision was. APPROV - # - # @param tokenization_channel [Symbol, Lithic::Models::TokenizationDecisioningRequestWebhookEvent::TokenizationChannel] The channel through which the tokenization was made. - # - # @param tokenization_token [String] Unique identifier for the digital wallet token attempt - # - # @param wallet_decisioning_info [Lithic::Models::WalletDecisioningInfo] - # - # @param device [Lithic::Models::Device] - # - # @param tokenization_source [Symbol, Lithic::Models::TokenizationDecisioningRequestWebhookEvent::TokenizationSource] The source of the tokenization. - - # The name of this event - # - # @see Lithic::Models::TokenizationDecisioningRequestWebhookEvent#event_type - module EventType - extend Lithic::Internal::Type::Enum - - DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = :"digital_wallet.tokenization_approval_request" - - # @!method self.values - # @return [Array] - end - - # Whether Lithic decisioned on the token, and if so, what the decision was. - # APPROVED/VERIFICATION_REQUIRED/DENIED. - # - # @see Lithic::Models::TokenizationDecisioningRequestWebhookEvent#issuer_decision - module IssuerDecision - extend Lithic::Internal::Type::Enum - - APPROVED = :APPROVED - DENIED = :DENIED - VERIFICATION_REQUIRED = :VERIFICATION_REQUIRED - - # @!method self.values - # @return [Array] - end - - # The channel through which the tokenization was made. - # - # @see Lithic::Models::TokenizationDecisioningRequestWebhookEvent#tokenization_channel - module TokenizationChannel - extend Lithic::Internal::Type::Enum - - DIGITAL_WALLET = :DIGITAL_WALLET - MERCHANT = :MERCHANT - - # @!method self.values - # @return [Array] - end - - # The source of the tokenization. - # - # @see Lithic::Models::TokenizationDecisioningRequestWebhookEvent#tokenization_source - module TokenizationSource - extend Lithic::Internal::Type::Enum - - ACCOUNT_ON_FILE = :ACCOUNT_ON_FILE - CONTACTLESS_TAP = :CONTACTLESS_TAP - MANUAL_PROVISION = :MANUAL_PROVISION - PUSH_PROVISION = :PUSH_PROVISION - TOKEN = :TOKEN - UNKNOWN = :UNKNOWN - - # @!method self.values - # @return [Array] - end - end - end -end diff --git a/lib/lithic/resources/account_activity.rb b/lib/lithic/resources/account_activity.rb index 40e44bc0..c05686af 100644 --- a/lib/lithic/resources/account_activity.rb +++ b/lib/lithic/resources/account_activity.rb @@ -34,7 +34,7 @@ class AccountActivity # # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Lithic::Internal::CursorPage] + # @return [Lithic::Internal::CursorPage] # # @see Lithic::Models::AccountActivityListParams def list(params = {}) @@ -58,7 +58,7 @@ def list(params = {}) # # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Lithic::Models::AccountActivityRetrieveTransactionResponse::Internal, Lithic::Models::BookTransferResponse, Lithic::Models::AccountActivityRetrieveTransactionResponse::Card, Lithic::Models::Payment, Lithic::Models::ExternalPayment, Lithic::Models::ManagementOperationTransaction] + # @return [Lithic::Models::AccountActivityRetrieveTransactionResponse::Internal, Lithic::Models::BookTransferResponse, Lithic::Models::AccountActivityRetrieveTransactionResponse::Card, Lithic::Models::Payment, Lithic::Models::ExternalPayment, Lithic::Models::ManagementOperationTransaction, Lithic::Models::Hold] # # @see Lithic::Models::AccountActivityRetrieveTransactionParams def retrieve_transaction(transaction_token, params = {}) diff --git a/lib/lithic/resources/auth_rules/v2.rb b/lib/lithic/resources/auth_rules/v2.rb index 89116b89..46ca0306 100644 --- a/lib/lithic/resources/auth_rules/v2.rb +++ b/lib/lithic/resources/auth_rules/v2.rb @@ -49,9 +49,9 @@ def retrieve(auth_rule_token, params = {}) # Updates a V2 Auth rule's properties # - # If `account_tokens`, `card_tokens`, `program_level`, or `excluded_card_tokens` - # is provided, this will replace existing associations with the provided list of - # entities. + # If `account_tokens`, `card_tokens`, `program_level`, `excluded_card_tokens`, + # `excluded_account_tokens`, or `excluded_business_account_tokens` is provided, + # this will replace existing associations with the provided list of entities. # # @overload update(auth_rule_token, body:, request_options: {}) # @@ -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, 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::TypescriptCodeParameters, nil] Parameters for the Auth Rule # # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -209,6 +209,26 @@ def list_results(params = {}) ) end + # Returns all versions of an auth rule, sorted by version number descending + # (newest first). + # + # @overload list_versions(auth_rule_token, request_options: {}) + # + # @param auth_rule_token [String] + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Lithic::Models::AuthRules::V2ListVersionsResponse] + # + # @see Lithic::Models::AuthRules::V2ListVersionsParams + def list_versions(auth_rule_token, params = {}) + @client.request( + method: :get, + path: ["v2/auth_rules/%1$s/versions", auth_rule_token], + model: Lithic::Models::AuthRules::V2ListVersionsResponse, + options: params[:request_options] + ) + end + # Promotes the draft version of an Auth rule to the currently active version such # that it is enforced in the respective stream. # diff --git a/lib/lithic/resources/disputes.rb b/lib/lithic/resources/disputes.rb index 047add2e..de31d3ca 100644 --- a/lib/lithic/resources/disputes.rb +++ b/lib/lithic/resources/disputes.rb @@ -3,19 +3,19 @@ module Lithic module Resources class Disputes - # Initiate a dispute. + # Request a chargeback. # # @overload create(amount:, reason:, transaction_token:, customer_filed_date: nil, customer_note: nil, request_options: {}) # - # @param amount [Integer] Amount to dispute + # @param amount [Integer] Amount for chargeback # - # @param reason [Symbol, Lithic::Models::DisputeCreateParams::Reason] Reason for dispute + # @param reason [Symbol, Lithic::Models::DisputeCreateParams::Reason] Reason for chargeback # - # @param transaction_token [String] Transaction to dispute + # @param transaction_token [String] Transaction for chargeback # - # @param customer_filed_date [Time] Date the customer filed the dispute + # @param customer_filed_date [Time] Date the customer filed the chargeback request # - # @param customer_note [String] Customer description of dispute + # @param customer_note [String] Customer description # # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -33,7 +33,7 @@ def create(params) ) end - # Get dispute. + # Get chargeback request. # # @overload retrieve(dispute_token, request_options: {}) # @@ -52,19 +52,19 @@ def retrieve(dispute_token, params = {}) ) end - # Update dispute. Can only be modified if status is `NEW`. + # Update chargeback request. Can only be modified if status is `NEW`. # # @overload update(dispute_token, amount: nil, customer_filed_date: nil, customer_note: nil, reason: nil, request_options: {}) # # @param dispute_token [String] # - # @param amount [Integer] Amount to dispute + # @param amount [Integer] Amount for chargeback # - # @param customer_filed_date [Time] Date the customer filed the dispute + # @param customer_filed_date [Time] Date the customer filed the chargeback request # - # @param customer_note [String] Customer description of dispute + # @param customer_note [String] Customer description # - # @param reason [Symbol, Lithic::Models::DisputeUpdateParams::Reason] Reason for dispute + # @param reason [Symbol, Lithic::Models::DisputeUpdateParams::Reason] Reason for chargeback # # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -85,7 +85,7 @@ def update(dispute_token, params = {}) # Some parameter documentations has been truncated, see # {Lithic::Models::DisputeListParams} for more details. # - # List disputes. + # List chargeback requests. # # @overload list(begin_: nil, end_: nil, ending_before: nil, page_size: nil, starting_after: nil, status: nil, transaction_tokens: nil, request_options: {}) # @@ -99,7 +99,7 @@ def update(dispute_token, params = {}) # # @param starting_after [String] A cursor representing an item's token after which a page of results should begin # - # @param status [Symbol, Lithic::Models::DisputeListParams::Status] List disputes of a specific status. + # @param status [Symbol, Lithic::Models::DisputeListParams::Status] Filter by status. # # @param transaction_tokens [Array] Transaction tokens to filter by. # @@ -121,7 +121,7 @@ def list(params = {}) ) end - # Withdraw dispute. + # Withdraw chargeback request. # # @overload delete(dispute_token, request_options: {}) # @@ -140,8 +140,8 @@ def delete(dispute_token, params = {}) ) end - # Soft delete evidence for a dispute. Evidence will not be reviewed or submitted - # by Lithic after it is withdrawn. + # Soft delete evidence for a chargeback request. Evidence will not be reviewed or + # submitted by Lithic after it is withdrawn. # # @overload delete_evidence(evidence_token, dispute_token:, request_options: {}) # @@ -166,8 +166,8 @@ def delete_evidence(evidence_token, params) ) end - # Use this endpoint to upload evidences for the dispute. It will return a URL to - # upload your documents to. The URL will expire in 30 minutes. + # Use this endpoint to upload evidence for a chargeback request. It will return a + # URL to upload your documents to. The URL will expire in 30 minutes. # # Uploaded documents must either be a `jpg`, `png` or `pdf` file, and each must be # less than 5 GiB. @@ -197,7 +197,7 @@ def initiate_evidence_upload(dispute_token, params = {}) # Some parameter documentations has been truncated, see # {Lithic::Models::DisputeListEvidencesParams} for more details. # - # List evidence metadata for a dispute. + # List evidence for a chargeback request. # # @overload list_evidences(dispute_token, begin_: nil, end_: nil, ending_before: nil, page_size: nil, starting_after: nil, request_options: {}) # @@ -231,7 +231,7 @@ def list_evidences(dispute_token, params = {}) ) end - # Get a dispute's evidence metadata. + # Get evidence for a chargeback request. # # @overload retrieve_evidence(evidence_token, dispute_token:, request_options: {}) # diff --git a/lib/lithic/resources/financial_accounts/interest_tier_schedule.rb b/lib/lithic/resources/financial_accounts/interest_tier_schedule.rb index 75ae2bfc..d02ec074 100644 --- a/lib/lithic/resources/financial_accounts/interest_tier_schedule.rb +++ b/lib/lithic/resources/financial_accounts/interest_tier_schedule.rb @@ -10,7 +10,7 @@ class InterestTierSchedule # # Create a new interest tier schedule entry for a supported financial account # - # @overload create(financial_account_token, credit_product_token:, effective_date:, tier_name: nil, tier_rates: nil, request_options: {}) + # @overload create(financial_account_token, credit_product_token:, effective_date:, penalty_rates: nil, tier_name: nil, tier_rates: nil, request_options: {}) # # @param financial_account_token [String] Globally unique identifier for financial account # @@ -18,6 +18,8 @@ class InterestTierSchedule # # @param effective_date [Date] Date the tier should be effective in YYYY-MM-DD format # + # @param penalty_rates [Object] Custom rates per category for penalties + # # @param tier_name [String] Name of a tier contained in the credit product. Mutually exclusive with tier_rat # # @param tier_rates [Object] Custom rates per category. Mutually exclusive with tier_name @@ -75,12 +77,14 @@ def retrieve(effective_date, params) # # Update an existing interest tier schedule # - # @overload update(effective_date, financial_account_token:, tier_name: nil, tier_rates: nil, request_options: {}) + # @overload update(effective_date, financial_account_token:, penalty_rates: nil, tier_name: nil, tier_rates: nil, request_options: {}) # # @param effective_date [Date] Path param: Effective date in ISO format (YYYY-MM-DD) # # @param financial_account_token [String] Path param: Globally unique identifier for financial account # + # @param penalty_rates [Object] Body param: Custom rates per category for penalties + # # @param tier_name [String] Body param: Name of a tier contained in the credit product. Mutually exclusive w # # @param tier_rates [Object] Body param: Custom rates per category. Mutually exclusive with tier_name diff --git a/lib/lithic/resources/holds.rb b/lib/lithic/resources/holds.rb new file mode 100644 index 00000000..a7e47a1d --- /dev/null +++ b/lib/lithic/resources/holds.rb @@ -0,0 +1,132 @@ +# frozen_string_literal: true + +module Lithic + module Resources + class Holds + # Create a hold on a financial account. Holds reserve funds by moving them from + # available to pending balance. They can be resolved via settlement (linked to a + # payment or book transfer), voiding, or expiration. + # + # @overload create(financial_account_token, amount:, token: nil, expiration_datetime: nil, memo: nil, user_defined_id: nil, request_options: {}) + # + # @param financial_account_token [String] Globally unique identifier for the financial account. + # + # @param amount [Integer] Amount to hold in cents + # + # @param token [String] Customer-provided token for idempotency. Becomes the hold token. + # + # @param expiration_datetime [Time] When the hold should auto-expire + # + # @param memo [String, nil] Reason for the hold + # + # @param user_defined_id [String] User-provided identifier for the hold + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Lithic::Models::Hold] + # + # @see Lithic::Models::HoldCreateParams + def create(financial_account_token, params) + parsed, options = Lithic::HoldCreateParams.dump_request(params) + @client.request( + method: :post, + path: ["v1/financial_accounts/%1$s/holds", financial_account_token], + body: parsed, + model: Lithic::Hold, + options: options + ) + end + + # Get hold by token. + # + # @overload retrieve(hold_token, request_options: {}) + # + # @param hold_token [String] Globally unique identifier for the hold. + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Lithic::Models::Hold] + # + # @see Lithic::Models::HoldRetrieveParams + def retrieve(hold_token, params = {}) + @client.request( + method: :get, + path: ["v1/holds/%1$s", hold_token], + model: Lithic::Hold, + options: params[:request_options] + ) + end + + # Some parameter documentations has been truncated, see + # {Lithic::Models::HoldListParams} for more details. + # + # List holds for a financial account. + # + # @overload list(financial_account_token, begin_: nil, end_: nil, ending_before: nil, page_size: nil, starting_after: nil, status: nil, request_options: {}) + # + # @param financial_account_token [String] Globally unique identifier for the financial account. + # + # @param begin_ [Time] Date string in RFC 3339 format. Only entries created after the specified time wi + # + # @param end_ [Time] Date string in RFC 3339 format. Only entries created before the specified time w + # + # @param ending_before [String] A cursor representing an item's token before which a page of results should end. + # + # @param page_size [Integer] Page size (for pagination). + # + # @param starting_after [String] A cursor representing an item's token after which a page of results should begin + # + # @param status [Symbol, Lithic::Models::HoldListParams::Status] Hold status to filter by. + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Lithic::Internal::CursorPage] + # + # @see Lithic::Models::HoldListParams + def list(financial_account_token, params = {}) + parsed, options = Lithic::HoldListParams.dump_request(params) + query = Lithic::Internal::Util.encode_query_params(parsed) + @client.request( + method: :get, + path: ["v1/financial_accounts/%1$s/holds", financial_account_token], + query: query.transform_keys(begin_: "begin", end_: "end"), + page: Lithic::Internal::CursorPage, + model: Lithic::Hold, + options: options + ) + end + + # Void an active hold. This returns the held funds from pending back to available + # balance. Only holds in PENDING status can be voided. + # + # @overload void(hold_token, memo: nil, request_options: {}) + # + # @param hold_token [String] Globally unique identifier for the hold. + # + # @param memo [String, nil] Reason for voiding the hold + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Lithic::Models::Hold] + # + # @see Lithic::Models::HoldVoidParams + def void(hold_token, params = {}) + parsed, options = Lithic::HoldVoidParams.dump_request(params) + @client.request( + method: :post, + path: ["v1/holds/%1$s/void", hold_token], + body: parsed, + model: Lithic::Hold, + options: options + ) + end + + # @api private + # + # @param client [Lithic::Client] + def initialize(client:) + @client = client + end + end + end +end diff --git a/lib/lithic/resources/webhooks.rb b/lib/lithic/resources/webhooks.rb index c54bf610..0f399bb9 100644 --- a/lib/lithic/resources/webhooks.rb +++ b/lib/lithic/resources/webhooks.rb @@ -9,8 +9,7 @@ class Webhooks # @param headers [Hash{String => String}] The webhook request headers # @param secret [String, nil] The webhook secret. If not provided, reads from LITHIC_WEBHOOK_SECRET environment variable. # - # @return [Lithic::Models::AccountHolderCreatedWebhookEvent, Lithic::Models::ParsedWebhookEvent::KYBPayload, Lithic::Models::ParsedWebhookEvent::KYCPayload, Lithic::Models::ParsedWebhookEvent::LegacyPayload, Lithic::Models::AccountHolderVerificationWebhookEvent, Lithic::Models::AccountHolderDocumentUpdatedWebhookEvent, Lithic::Models::AsaRequestWebhookEvent, Lithic::Models::TokenizationDecisioningRequestWebhookEvent, Lithic::Models::AuthRulesBacktestReportCreatedWebhookEvent, Lithic::Models::BalanceUpdatedWebhookEvent, Lithic::Models::BookTransferTransactionCreatedWebhookEvent, Lithic::Models::BookTransferTransactionUpdatedWebhookEvent, Lithic::Models::CardCreatedWebhookEvent, Lithic::Models::CardConvertedWebhookEvent, Lithic::Models::CardRenewedWebhookEvent, Lithic::Models::CardReissuedWebhookEvent, Lithic::Models::CardShippedWebhookEvent, Lithic::Models::CardTransactionUpdatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataCreatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataUpdatedWebhookEvent, Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent, Lithic::Models::DigitalWalletTokenizationResultWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::DigitalWalletTokenizationUpdatedWebhookEvent, Lithic::Models::DisputeUpdatedWebhookEvent, Lithic::Models::DisputeEvidenceUploadFailedWebhookEvent, Lithic::Models::ExternalBankAccountCreatedWebhookEvent, Lithic::Models::ExternalBankAccountUpdatedWebhookEvent, Lithic::Models::ExternalPaymentCreatedWebhookEvent, Lithic::Models::ExternalPaymentUpdatedWebhookEvent, Lithic::Models::FinancialAccountCreatedWebhookEvent, Lithic::Models::FinancialAccountUpdatedWebhookEvent, Lithic::Models::FundingEventCreatedWebhookEvent, Lithic::Models::LoanTapeCreatedWebhookEvent, Lithic::Models::LoanTapeUpdatedWebhookEvent, Lithic::Models::ManagementOperationCreatedWebhookEvent, Lithic::Models::ManagementOperationUpdatedWebhookEvent, Lithic::Models::InternalTransactionCreatedWebhookEvent, Lithic::Models::InternalTransactionUpdatedWebhookEvent, Lithic::Models::NetworkTotalCreatedWebhookEvent, Lithic::Models::NetworkTotalUpdatedWebhookEvent, Lithic::Models::PaymentTransactionCreatedWebhookEvent, Lithic::Models::PaymentTransactionUpdatedWebhookEvent, Lithic::Models::SettlementReportUpdatedWebhookEvent, Lithic::Models::StatementsCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationChallengeWebhookEvent, Lithic::Models::TokenizationApprovalRequestWebhookEvent, Lithic::Models::TokenizationResultWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::TokenizationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthentication, Lithic::Models::DisputeTransactionCreatedWebhookEvent, Lithic::Models::DisputeTransactionUpdatedWebhookEvent] - # + # @return [Lithic::Models::AccountHolderCreatedWebhookEvent, Lithic::Models::ParsedWebhookEvent::KYBPayload, Lithic::Models::ParsedWebhookEvent::KYCPayload, Lithic::Models::ParsedWebhookEvent::LegacyPayload, Lithic::Models::AccountHolderVerificationWebhookEvent, Lithic::Models::AccountHolderDocumentUpdatedWebhookEvent, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent, Lithic::Models::AuthRulesBacktestReportCreatedWebhookEvent, Lithic::Models::BalanceUpdatedWebhookEvent, Lithic::Models::BookTransferTransactionCreatedWebhookEvent, Lithic::Models::BookTransferTransactionUpdatedWebhookEvent, Lithic::Models::CardCreatedWebhookEvent, Lithic::Models::CardConvertedWebhookEvent, Lithic::Models::CardRenewedWebhookEvent, Lithic::Models::CardReissuedWebhookEvent, Lithic::Models::CardShippedWebhookEvent, Lithic::Models::CardUpdatedWebhookEvent, Lithic::Models::CardTransactionUpdatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataCreatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataUpdatedWebhookEvent, Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent, Lithic::Models::DigitalWalletTokenizationResultWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::DigitalWalletTokenizationUpdatedWebhookEvent, Lithic::Models::DisputeUpdatedWebhookEvent, Lithic::Models::DisputeEvidenceUploadFailedWebhookEvent, Lithic::Models::ExternalBankAccountCreatedWebhookEvent, Lithic::Models::ExternalBankAccountUpdatedWebhookEvent, Lithic::Models::ExternalPaymentCreatedWebhookEvent, Lithic::Models::ExternalPaymentUpdatedWebhookEvent, Lithic::Models::FinancialAccountCreatedWebhookEvent, Lithic::Models::FinancialAccountUpdatedWebhookEvent, Lithic::Models::FundingEventCreatedWebhookEvent, Lithic::Models::LoanTapeCreatedWebhookEvent, Lithic::Models::LoanTapeUpdatedWebhookEvent, Lithic::Models::ManagementOperationCreatedWebhookEvent, Lithic::Models::ManagementOperationUpdatedWebhookEvent, Lithic::Models::InternalTransactionCreatedWebhookEvent, Lithic::Models::InternalTransactionUpdatedWebhookEvent, Lithic::Models::NetworkTotalCreatedWebhookEvent, Lithic::Models::NetworkTotalUpdatedWebhookEvent, Lithic::Models::PaymentTransactionCreatedWebhookEvent, Lithic::Models::PaymentTransactionUpdatedWebhookEvent, Lithic::Models::SettlementReportUpdatedWebhookEvent, Lithic::Models::StatementsCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationChallengeWebhookEvent, Lithic::Models::TokenizationApprovalRequestWebhookEvent, Lithic::Models::TokenizationResultWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::TokenizationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationApprovalRequestWebhookEvent, Lithic::Models::DisputeTransactionCreatedWebhookEvent, Lithic::Models::DisputeTransactionUpdatedWebhookEvent] # # @raise [ArgumentError] if secret is not provided and LITHIC_WEBHOOK_SECRET env var is not set # @raise [Lithic::Errors::MissingDependencyError] if the standardwebhooks gem is not installed # @raise [StandardWebhooks::WebhookVerificationError] if the signature is invalid @@ -32,7 +31,7 @@ def parse(payload, headers:, secret: nil) # # @param payload [String] The raw webhook payload as a string # - # @return [Lithic::Models::AccountHolderCreatedWebhookEvent, Lithic::Models::ParsedWebhookEvent::KYBPayload, Lithic::Models::ParsedWebhookEvent::KYCPayload, Lithic::Models::ParsedWebhookEvent::LegacyPayload, Lithic::Models::AccountHolderVerificationWebhookEvent, Lithic::Models::AccountHolderDocumentUpdatedWebhookEvent, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent, Lithic::Models::TokenizationDecisioningRequestWebhookEvent, Lithic::Models::AuthRulesBacktestReportCreatedWebhookEvent, Lithic::Models::BalanceUpdatedWebhookEvent, Lithic::Models::BookTransferTransactionCreatedWebhookEvent, Lithic::Models::BookTransferTransactionUpdatedWebhookEvent, Lithic::Models::CardCreatedWebhookEvent, Lithic::Models::CardConvertedWebhookEvent, Lithic::Models::CardRenewedWebhookEvent, Lithic::Models::CardReissuedWebhookEvent, Lithic::Models::CardShippedWebhookEvent, Lithic::Models::CardUpdatedWebhookEvent, Lithic::Models::CardTransactionUpdatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataCreatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataUpdatedWebhookEvent, Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent, Lithic::Models::DigitalWalletTokenizationResultWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::DigitalWalletTokenizationUpdatedWebhookEvent, Lithic::Models::DisputeUpdatedWebhookEvent, Lithic::Models::DisputeEvidenceUploadFailedWebhookEvent, Lithic::Models::ExternalBankAccountCreatedWebhookEvent, Lithic::Models::ExternalBankAccountUpdatedWebhookEvent, Lithic::Models::ExternalPaymentCreatedWebhookEvent, Lithic::Models::ExternalPaymentUpdatedWebhookEvent, Lithic::Models::FinancialAccountCreatedWebhookEvent, Lithic::Models::FinancialAccountUpdatedWebhookEvent, Lithic::Models::FundingEventCreatedWebhookEvent, Lithic::Models::LoanTapeCreatedWebhookEvent, Lithic::Models::LoanTapeUpdatedWebhookEvent, Lithic::Models::ManagementOperationCreatedWebhookEvent, Lithic::Models::ManagementOperationUpdatedWebhookEvent, Lithic::Models::InternalTransactionCreatedWebhookEvent, Lithic::Models::InternalTransactionUpdatedWebhookEvent, Lithic::Models::NetworkTotalCreatedWebhookEvent, Lithic::Models::NetworkTotalUpdatedWebhookEvent, Lithic::Models::PaymentTransactionCreatedWebhookEvent, Lithic::Models::PaymentTransactionUpdatedWebhookEvent, Lithic::Models::SettlementReportUpdatedWebhookEvent, Lithic::Models::StatementsCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationChallengeWebhookEvent, Lithic::Models::TokenizationApprovalRequestWebhookEvent, Lithic::Models::TokenizationResultWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::TokenizationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationApprovalRequestWebhookEvent, Lithic::Models::DisputeTransactionCreatedWebhookEvent, Lithic::Models::DisputeTransactionUpdatedWebhookEvent] + # @return [Lithic::ParsedWebhookEvent::Variants] def parse_unsafe(payload) parsed = JSON.parse(payload, symbolize_names: true) Lithic::Internal::Type::Converter.coerce(Lithic::Models::ParsedWebhookEvent, parsed) diff --git a/lib/lithic/version.rb b/lib/lithic/version.rb index bf8544e6..e8c3043e 100644 --- a/lib/lithic/version.rb +++ b/lib/lithic/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Lithic - VERSION = "0.7.0" + VERSION = "0.8.0" end diff --git a/rbi/lithic/client.rbi b/rbi/lithic/client.rbi index 61eb71d1..c8538916 100644 --- a/rbi/lithic/client.rbi +++ b/rbi/lithic/client.rbi @@ -22,6 +22,9 @@ module Lithic sig { returns(String) } attr_reader :api_key + sig { returns(T.nilable(String)) } + attr_reader :webhook_secret + sig { returns(Lithic::Resources::Accounts) } attr_reader :accounts @@ -112,6 +115,9 @@ module Lithic sig { returns(Lithic::Resources::NetworkPrograms) } attr_reader :network_programs + sig { returns(Lithic::Resources::Holds) } + attr_reader :holds + sig { returns(Lithic::Resources::AccountActivity) } attr_reader :account_activity @@ -139,6 +145,7 @@ module Lithic sig do params( api_key: T.nilable(String), + webhook_secret: T.nilable(String), environment: T.nilable(T.any(Symbol, String)), base_url: T.nilable(String), max_retries: Integer, @@ -150,6 +157,8 @@ module Lithic def self.new( # Defaults to `ENV["LITHIC_API_KEY"]` api_key: ENV["LITHIC_API_KEY"], + # Defaults to `ENV["LITHIC_WEBHOOK_SECRET"]` + webhook_secret: ENV["LITHIC_WEBHOOK_SECRET"], # Specifies the environment to use for the API. # # Each environment maps to a different base URL: diff --git a/rbi/lithic/models.rbi b/rbi/lithic/models.rbi index a01624e9..e2280d10 100644 --- a/rbi/lithic/models.rbi +++ b/rbi/lithic/models.rbi @@ -365,6 +365,18 @@ module Lithic FundingEventRetrieveParams = Lithic::Models::FundingEventRetrieveParams + Hold = Lithic::Models::Hold + + HoldCreateParams = Lithic::Models::HoldCreateParams + + HoldEvent = Lithic::Models::HoldEvent + + HoldListParams = Lithic::Models::HoldListParams + + HoldRetrieveParams = Lithic::Models::HoldRetrieveParams + + HoldVoidParams = Lithic::Models::HoldVoidParams + InstanceFinancialAccountType = Lithic::Models::InstanceFinancialAccountType InternalTransactionAPI = Lithic::Models::InternalTransactionAPI @@ -516,9 +528,6 @@ module Lithic TokenizationDeactivateParams = Lithic::Models::TokenizationDeactivateParams - TokenizationDecisioningRequestWebhookEvent = - Lithic::Models::TokenizationDecisioningRequestWebhookEvent - TokenizationDecisioningRetrieveSecretParams = Lithic::Models::TokenizationDecisioningRetrieveSecretParams diff --git a/rbi/lithic/models/account_activity_list_params.rbi b/rbi/lithic/models/account_activity_list_params.rbi index d60e4fb8..6443103a 100644 --- a/rbi/lithic/models/account_activity_list_params.rbi +++ b/rbi/lithic/models/account_activity_list_params.rbi @@ -188,6 +188,11 @@ module Lithic ACH = T.let(:ACH, Lithic::AccountActivityListParams::Category::TaggedSymbol) + WIRE = + T.let( + :WIRE, + Lithic::AccountActivityListParams::Category::TaggedSymbol + ) BALANCE_OR_FUNDING = T.let( :BALANCE_OR_FUNDING, @@ -275,6 +280,11 @@ module Lithic :MANAGEMENT_DISBURSEMENT, Lithic::AccountActivityListParams::Category::TaggedSymbol ) + HOLD = + T.let( + :HOLD, + Lithic::AccountActivityListParams::Category::TaggedSymbol + ) PROGRAM_FUNDING = T.let( :PROGRAM_FUNDING, diff --git a/rbi/lithic/models/account_activity_list_response.rbi b/rbi/lithic/models/account_activity_list_response.rbi index ac3fcda6..a7b9751b 100644 --- a/rbi/lithic/models/account_activity_list_response.rbi +++ b/rbi/lithic/models/account_activity_list_response.rbi @@ -6,7 +6,8 @@ module Lithic # which transaction type is returned: INTERNAL returns FinancialTransaction, # TRANSFER returns BookTransferTransaction, CARD returns CardTransaction, PAYMENT # returns PaymentTransaction, EXTERNAL_PAYMENT returns ExternalPaymentResponse, - # and MANAGEMENT_OPERATION returns ManagementOperationTransaction + # MANAGEMENT_OPERATION returns ManagementOperationTransaction, and HOLD returns + # HoldTransaction module AccountActivityListResponse extend Lithic::Internal::Type::Union @@ -18,7 +19,8 @@ module Lithic Lithic::Models::AccountActivityListResponse::Card, Lithic::Payment, Lithic::ExternalPayment, - Lithic::ManagementOperationTransaction + Lithic::ManagementOperationTransaction, + Lithic::Hold ) end @@ -189,6 +191,11 @@ module Lithic :ACH, Lithic::Models::AccountActivityListResponse::Internal::Category::TaggedSymbol ) + WIRE = + T.let( + :WIRE, + Lithic::Models::AccountActivityListResponse::Internal::Category::TaggedSymbol + ) BALANCE_OR_FUNDING = T.let( :BALANCE_OR_FUNDING, @@ -279,6 +286,11 @@ module Lithic :MANAGEMENT_DISBURSEMENT, Lithic::Models::AccountActivityListResponse::Internal::Category::TaggedSymbol ) + HOLD = + T.let( + :HOLD, + Lithic::Models::AccountActivityListResponse::Internal::Category::TaggedSymbol + ) PROGRAM_FUNDING = T.let( :PROGRAM_FUNDING, diff --git a/rbi/lithic/models/account_activity_retrieve_transaction_response.rbi b/rbi/lithic/models/account_activity_retrieve_transaction_response.rbi index f36e42c4..e1ead582 100644 --- a/rbi/lithic/models/account_activity_retrieve_transaction_response.rbi +++ b/rbi/lithic/models/account_activity_retrieve_transaction_response.rbi @@ -6,7 +6,8 @@ module Lithic # which transaction type is returned: INTERNAL returns FinancialTransaction, # TRANSFER returns BookTransferTransaction, CARD returns CardTransaction, PAYMENT # returns PaymentTransaction, EXTERNAL_PAYMENT returns ExternalPaymentResponse, - # and MANAGEMENT_OPERATION returns ManagementOperationTransaction + # MANAGEMENT_OPERATION returns ManagementOperationTransaction, and HOLD returns + # HoldTransaction module AccountActivityRetrieveTransactionResponse extend Lithic::Internal::Type::Union @@ -18,7 +19,8 @@ module Lithic Lithic::Models::AccountActivityRetrieveTransactionResponse::Card, Lithic::Payment, Lithic::ExternalPayment, - Lithic::ManagementOperationTransaction + Lithic::ManagementOperationTransaction, + Lithic::Hold ) end @@ -189,6 +191,11 @@ module Lithic :ACH, Lithic::Models::AccountActivityRetrieveTransactionResponse::Internal::Category::TaggedSymbol ) + WIRE = + T.let( + :WIRE, + Lithic::Models::AccountActivityRetrieveTransactionResponse::Internal::Category::TaggedSymbol + ) BALANCE_OR_FUNDING = T.let( :BALANCE_OR_FUNDING, @@ -279,6 +286,11 @@ module Lithic :MANAGEMENT_DISBURSEMENT, Lithic::Models::AccountActivityRetrieveTransactionResponse::Internal::Category::TaggedSymbol ) + HOLD = + T.let( + :HOLD, + Lithic::Models::AccountActivityRetrieveTransactionResponse::Internal::Category::TaggedSymbol + ) PROGRAM_FUNDING = T.let( :PROGRAM_FUNDING, diff --git a/rbi/lithic/models/auth_rules/auth_rule.rbi b/rbi/lithic/models/auth_rules/auth_rule.rbi index c3ab200e..302170cc 100644 --- a/rbi/lithic/models/auth_rules/auth_rule.rbi +++ b/rbi/lithic/models/auth_rules/auth_rule.rbi @@ -81,9 +81,25 @@ module Lithic # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, + # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. sig { returns(Lithic::AuthRules::AuthRule::Type::TaggedSymbol) } attr_accessor :type + # Account tokens to which the Auth Rule does not apply. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :excluded_account_tokens + + sig { params(excluded_account_tokens: T::Array[String]).void } + attr_writer :excluded_account_tokens + + # Business account tokens to which the Auth Rule does not apply. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :excluded_business_account_tokens + + sig { params(excluded_business_account_tokens: T::Array[String]).void } + attr_writer :excluded_business_account_tokens + # Card tokens to which the Auth Rule does not apply. sig { returns(T.nilable(T::Array[String])) } attr_reader :excluded_card_tokens @@ -107,6 +123,8 @@ module Lithic program_level: T::Boolean, state: Lithic::AuthRules::AuthRule::State::OrSymbol, type: Lithic::AuthRules::AuthRule::Type::OrSymbol, + excluded_account_tokens: T::Array[String], + excluded_business_account_tokens: T::Array[String], excluded_card_tokens: T::Array[String] ).returns(T.attached_class) end @@ -143,7 +161,13 @@ module Lithic # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, + # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. type:, + # Account tokens to which the Auth Rule does not apply. + excluded_account_tokens: nil, + # Business account tokens to which the Auth Rule does not apply. + excluded_business_account_tokens: nil, # Card tokens to which the Auth Rule does not apply. excluded_card_tokens: nil ) @@ -166,6 +190,8 @@ module Lithic program_level: T::Boolean, state: Lithic::AuthRules::AuthRule::State::TaggedSymbol, type: Lithic::AuthRules::AuthRule::Type::TaggedSymbol, + excluded_account_tokens: T::Array[String], + excluded_business_account_tokens: T::Array[String], excluded_card_tokens: T::Array[String] } ) @@ -205,7 +231,8 @@ module Lithic Lithic::AuthRules::Conditional3DSActionParameters::OrHash, Lithic::AuthRules::ConditionalAuthorizationActionParameters::OrHash, Lithic::AuthRules::ConditionalACHActionParameters::OrHash, - Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash + Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, + Lithic::AuthRules::TypescriptCodeParameters::OrHash ), version: Integer ).returns(T.attached_class) @@ -244,7 +271,8 @@ module Lithic Lithic::AuthRules::Conditional3DSActionParameters, Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, - Lithic::AuthRules::ConditionalTokenizationActionParameters + Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::TypescriptCodeParameters ) end @@ -269,6 +297,11 @@ module Lithic ) end + # An error message if the draft version failed compilation. Populated when `state` + # is `ERROR`, `null` otherwise. + sig { returns(T.nilable(String)) } + attr_accessor :error + # Parameters for the Auth Rule sig do returns( @@ -277,6 +310,23 @@ module Lithic end attr_accessor :parameters + # The state of the draft version. Most rules are created synchronously and the + # state is immediately `SHADOWING`. Rules backed by TypeScript code are compiled + # asynchronously — the state starts as `PENDING` and transitions to `SHADOWING` on + # success or `ERROR` on failure. + # + # - `PENDING`: Compilation of the rule is in progress (TypeScript rules only). + # - `SHADOWING`: The draft version is ready and evaluating in shadow mode + # alongside the current active version. It can be promoted to the active + # version. + # - `ERROR`: Compilation of the rule failed. Check the `error` field for details. + sig do + returns( + Lithic::AuthRules::AuthRule::DraftVersion::State::TaggedSymbol + ) + end + attr_accessor :state + # The version of the rule, this is incremented whenever the rule's parameters # change. sig { returns(Integer) } @@ -284,6 +334,7 @@ module Lithic sig do params( + error: T.nilable(String), parameters: T.any( Lithic::AuthRules::ConditionalBlockParameters::OrHash, @@ -292,14 +343,30 @@ module Lithic Lithic::AuthRules::Conditional3DSActionParameters::OrHash, Lithic::AuthRules::ConditionalAuthorizationActionParameters::OrHash, Lithic::AuthRules::ConditionalACHActionParameters::OrHash, - Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash + Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, + Lithic::AuthRules::TypescriptCodeParameters::OrHash ), + state: Lithic::AuthRules::AuthRule::DraftVersion::State::OrSymbol, version: Integer ).returns(T.attached_class) end def self.new( + # An error message if the draft version failed compilation. Populated when `state` + # is `ERROR`, `null` otherwise. + error:, # Parameters for the Auth Rule parameters:, + # The state of the draft version. Most rules are created synchronously and the + # state is immediately `SHADOWING`. Rules backed by TypeScript code are compiled + # asynchronously — the state starts as `PENDING` and transitions to `SHADOWING` on + # success or `ERROR` on failure. + # + # - `PENDING`: Compilation of the rule is in progress (TypeScript rules only). + # - `SHADOWING`: The draft version is ready and evaluating in shadow mode + # alongside the current active version. It can be promoted to the active + # version. + # - `ERROR`: Compilation of the rule failed. Check the `error` field for details. + state:, # The version of the rule, this is incremented whenever the rule's parameters # change. version: @@ -309,8 +376,11 @@ module Lithic sig do override.returns( { + error: T.nilable(String), parameters: Lithic::AuthRules::AuthRule::DraftVersion::Parameters::Variants, + state: + Lithic::AuthRules::AuthRule::DraftVersion::State::TaggedSymbol, version: Integer } ) @@ -331,7 +401,8 @@ module Lithic Lithic::AuthRules::Conditional3DSActionParameters, Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, - Lithic::AuthRules::ConditionalTokenizationActionParameters + Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::TypescriptCodeParameters ) end @@ -345,6 +416,52 @@ module Lithic def self.variants end end + + # The state of the draft version. Most rules are created synchronously and the + # state is immediately `SHADOWING`. Rules backed by TypeScript code are compiled + # asynchronously — the state starts as `PENDING` and transitions to `SHADOWING` on + # success or `ERROR` on failure. + # + # - `PENDING`: Compilation of the rule is in progress (TypeScript rules only). + # - `SHADOWING`: The draft version is ready and evaluating in shadow mode + # alongside the current active version. It can be promoted to the active + # version. + # - `ERROR`: Compilation of the rule failed. Check the `error` field for details. + module State + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::AuthRules::AuthRule::DraftVersion::State) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PENDING = + T.let( + :PENDING, + Lithic::AuthRules::AuthRule::DraftVersion::State::TaggedSymbol + ) + SHADOWING = + T.let( + :SHADOWING, + Lithic::AuthRules::AuthRule::DraftVersion::State::TaggedSymbol + ) + ERROR = + T.let( + :ERROR, + Lithic::AuthRules::AuthRule::DraftVersion::State::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::AuthRules::AuthRule::DraftVersion::State::TaggedSymbol + ] + ) + end + def self.values + end + end end # The state of the Auth Rule @@ -380,6 +497,8 @@ module Lithic # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, + # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. module Type extend Lithic::Internal::Type::Enum @@ -407,6 +526,11 @@ module Lithic :CONDITIONAL_ACTION, Lithic::AuthRules::AuthRule::Type::TaggedSymbol ) + TYPESCRIPT_CODE = + T.let( + :TYPESCRIPT_CODE, + Lithic::AuthRules::AuthRule::Type::TaggedSymbol + ) sig do override.returns( diff --git a/rbi/lithic/models/auth_rules/auth_rule_version.rbi b/rbi/lithic/models/auth_rules/auth_rule_version.rbi new file mode 100644 index 00000000..e9c48f7d --- /dev/null +++ b/rbi/lithic/models/auth_rules/auth_rule_version.rbi @@ -0,0 +1,142 @@ +# typed: strong + +module Lithic + module Models + AuthRuleVersion = AuthRules::AuthRuleVersion + + module AuthRules + class AuthRuleVersion < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(Lithic::AuthRules::AuthRuleVersion, Lithic::Internal::AnyHash) + end + + # Timestamp of when this version was created. + sig { returns(Time) } + attr_accessor :created + + # Parameters for the Auth Rule + sig do + returns(Lithic::AuthRules::AuthRuleVersion::Parameters::Variants) + end + attr_accessor :parameters + + # The current state of this version. + sig { returns(Lithic::AuthRules::AuthRuleVersion::State::TaggedSymbol) } + attr_accessor :state + + # The version of the rule, this is incremented whenever the rule's parameters + # change. + sig { returns(Integer) } + attr_accessor :version + + sig do + params( + created: Time, + parameters: + T.any( + Lithic::AuthRules::ConditionalBlockParameters::OrHash, + Lithic::AuthRules::VelocityLimitParams::OrHash, + Lithic::AuthRules::MerchantLockParameters::OrHash, + Lithic::AuthRules::Conditional3DSActionParameters::OrHash, + Lithic::AuthRules::ConditionalAuthorizationActionParameters::OrHash, + Lithic::AuthRules::ConditionalACHActionParameters::OrHash, + Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, + Lithic::AuthRules::TypescriptCodeParameters::OrHash + ), + state: Lithic::AuthRules::AuthRuleVersion::State::OrSymbol, + version: Integer + ).returns(T.attached_class) + end + def self.new( + # Timestamp of when this version was created. + created:, + # Parameters for the Auth Rule + parameters:, + # The current state of this version. + state:, + # The version of the rule, this is incremented whenever the rule's parameters + # change. + version: + ) + end + + sig do + override.returns( + { + created: Time, + parameters: + Lithic::AuthRules::AuthRuleVersion::Parameters::Variants, + state: Lithic::AuthRules::AuthRuleVersion::State::TaggedSymbol, + version: Integer + } + ) + end + def to_hash + end + + # Parameters for the Auth Rule + module Parameters + extend Lithic::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Lithic::AuthRules::ConditionalBlockParameters, + Lithic::AuthRules::VelocityLimitParams, + Lithic::AuthRules::MerchantLockParameters, + Lithic::AuthRules::Conditional3DSActionParameters, + Lithic::AuthRules::ConditionalAuthorizationActionParameters, + Lithic::AuthRules::ConditionalACHActionParameters, + Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::TypescriptCodeParameters + ) + end + + sig do + override.returns( + T::Array[Lithic::AuthRules::AuthRuleVersion::Parameters::Variants] + ) + end + def self.variants + end + end + + # The current state of this version. + module State + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::AuthRules::AuthRuleVersion::State) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :ACTIVE, + Lithic::AuthRules::AuthRuleVersion::State::TaggedSymbol + ) + SHADOW = + T.let( + :SHADOW, + Lithic::AuthRules::AuthRuleVersion::State::TaggedSymbol + ) + INACTIVE = + T.let( + :INACTIVE, + Lithic::AuthRules::AuthRuleVersion::State::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Lithic::AuthRules::AuthRuleVersion::State::TaggedSymbol] + ) + end + def self.values + end + end + end + end + end +end diff --git a/rbi/lithic/models/auth_rules/rule_feature.rbi b/rbi/lithic/models/auth_rules/rule_feature.rbi new file mode 100644 index 00000000..695ed9ae --- /dev/null +++ b/rbi/lithic/models/auth_rules/rule_feature.rbi @@ -0,0 +1,414 @@ +# typed: strong + +module Lithic + module Models + module AuthRules + # A feature made available to the rule. The `name` field is the variable name used + # in the rule function signature. The `type` field determines which data the + # feature provides to the rule at evaluation time. + # + # - `AUTHORIZATION`: The authorization request being evaluated. Only available for + # AUTHORIZATION event stream rules. + # - `AUTHENTICATION`: The 3DS authentication request being evaluated. Only + # available for THREE_DS_AUTHENTICATION event stream rules. + # - `TOKENIZATION`: The tokenization request being evaluated. Only available for + # TOKENIZATION event stream rules. + # - `ACH_RECEIPT`: The ACH receipt being evaluated. Only available for + # ACH_CREDIT_RECEIPT and ACH_DEBIT_RECEIPT event stream rules. + # - `CARD`: The card associated with the event. Available for AUTHORIZATION and + # THREE_DS_AUTHENTICATION event stream rules. + # - `ACCOUNT_HOLDER`: The account holder associated with the card. Available for + # THREE_DS_AUTHENTICATION 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 + # `scope`, `period`, and optionally `filters` to configure the velocity + # calculation. Available for AUTHORIZATION event stream rules. + module RuleFeature + extend Lithic::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Lithic::AuthRules::RuleFeature::AuthorizationFeature, + Lithic::AuthRules::RuleFeature::AuthenticationFeature, + Lithic::AuthRules::RuleFeature::TokenizationFeature, + Lithic::AuthRules::RuleFeature::ACHReceiptFeature, + Lithic::AuthRules::RuleFeature::CardFeature, + Lithic::AuthRules::RuleFeature::AccountHolderFeature, + Lithic::AuthRules::RuleFeature::IPMetadataFeature, + Lithic::AuthRules::RuleFeature::SpendVelocityFeature + ) + end + + class AuthorizationFeature < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::RuleFeature::AuthorizationFeature, + 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: :AUTHORIZATION + ) + end + + sig { override.returns({ type: Symbol, name: String }) } + def to_hash + end + end + + class AuthenticationFeature < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::RuleFeature::AuthenticationFeature, + 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: :AUTHENTICATION + ) + end + + sig { override.returns({ type: Symbol, name: String }) } + def to_hash + end + end + + class TokenizationFeature < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::RuleFeature::TokenizationFeature, + 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: :TOKENIZATION + ) + end + + sig { override.returns({ type: Symbol, name: String }) } + def to_hash + end + end + + class ACHReceiptFeature < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::RuleFeature::ACHReceiptFeature, + 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_RECEIPT + ) + end + + sig { override.returns({ type: Symbol, name: String }) } + def to_hash + end + end + + class CardFeature < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::RuleFeature::CardFeature, + 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: :CARD + ) + end + + sig { override.returns({ type: Symbol, name: String }) } + def to_hash + end + end + + class AccountHolderFeature < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::RuleFeature::AccountHolderFeature, + 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: :ACCOUNT_HOLDER + ) + end + + sig { override.returns({ type: Symbol, name: String }) } + def to_hash + end + end + + class IPMetadataFeature < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::RuleFeature::IPMetadataFeature, + 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: :IP_METADATA + ) + end + + sig { override.returns({ type: Symbol, name: String }) } + def to_hash + end + end + + class SpendVelocityFeature < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::RuleFeature::SpendVelocityFeature, + Lithic::Internal::AnyHash + ) + end + + # Velocity over the current day since 00:00 / 12 AM in Eastern Time + sig do + returns( + T.any( + Lithic::AuthRules::VelocityLimitPeriod::TrailingWindowObject, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowDay, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowWeek, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowMonth, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowYear + ) + ) + end + attr_accessor :period + + # The scope the velocity is calculated for + sig do + returns( + Lithic::AuthRules::RuleFeature::SpendVelocityFeature::Scope::OrSymbol + ) + end + attr_accessor :scope + + sig { returns(Symbol) } + attr_accessor :type + + sig { returns(T.nilable(Lithic::AuthRules::VelocityLimitFilters)) } + attr_reader :filters + + sig do + params( + filters: Lithic::AuthRules::VelocityLimitFilters::OrHash + ).void + end + attr_writer :filters + + # The variable name for this feature in the rule function signature + sig { returns(T.nilable(String)) } + attr_reader :name + + sig { params(name: String).void } + attr_writer :name + + sig do + params( + period: + T.any( + Lithic::AuthRules::VelocityLimitPeriod::TrailingWindowObject::OrHash, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowDay::OrHash, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowWeek::OrHash, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowMonth::OrHash, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowYear::OrHash + ), + scope: + Lithic::AuthRules::RuleFeature::SpendVelocityFeature::Scope::OrSymbol, + filters: Lithic::AuthRules::VelocityLimitFilters::OrHash, + name: String, + type: Symbol + ).returns(T.attached_class) + end + def self.new( + # Velocity over the current day since 00:00 / 12 AM in Eastern Time + period:, + # The scope the velocity is calculated for + scope:, + filters: nil, + # The variable name for this feature in the rule function signature + name: nil, + type: :SPEND_VELOCITY + ) + end + + sig do + override.returns( + { + period: + T.any( + Lithic::AuthRules::VelocityLimitPeriod::TrailingWindowObject, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowDay, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowWeek, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowMonth, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowYear + ), + scope: + Lithic::AuthRules::RuleFeature::SpendVelocityFeature::Scope::OrSymbol, + type: Symbol, + filters: Lithic::AuthRules::VelocityLimitFilters, + name: String + } + ) + end + def to_hash + end + + # The scope the velocity is calculated for + module Scope + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::AuthRules::RuleFeature::SpendVelocityFeature::Scope + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CARD = + T.let( + :CARD, + Lithic::AuthRules::RuleFeature::SpendVelocityFeature::Scope::TaggedSymbol + ) + ACCOUNT = + T.let( + :ACCOUNT, + Lithic::AuthRules::RuleFeature::SpendVelocityFeature::Scope::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::AuthRules::RuleFeature::SpendVelocityFeature::Scope::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + sig do + override.returns(T::Array[Lithic::AuthRules::RuleFeature::Variants]) + end + def self.variants + end + end + end + end +end diff --git a/rbi/lithic/models/auth_rules/typescript_code_parameters.rbi b/rbi/lithic/models/auth_rules/typescript_code_parameters.rbi new file mode 100644 index 00000000..909c3759 --- /dev/null +++ b/rbi/lithic/models/auth_rules/typescript_code_parameters.rbi @@ -0,0 +1,94 @@ +# typed: strong + +module Lithic + module Models + module AuthRules + class TypescriptCodeParameters < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::TypescriptCodeParameters, + Lithic::Internal::AnyHash + ) + end + + # The TypeScript source code of the rule. Must define a `rule()` function that + # accepts the declared features as positional arguments (in the same order as the + # `features` array) and returns an array of actions. + sig { returns(String) } + attr_accessor :code + + # Features available to the TypeScript code at evaluation time + sig do + returns( + T::Array[ + T.any( + Lithic::AuthRules::RuleFeature::AuthorizationFeature, + Lithic::AuthRules::RuleFeature::AuthenticationFeature, + Lithic::AuthRules::RuleFeature::TokenizationFeature, + Lithic::AuthRules::RuleFeature::ACHReceiptFeature, + Lithic::AuthRules::RuleFeature::CardFeature, + Lithic::AuthRules::RuleFeature::AccountHolderFeature, + Lithic::AuthRules::RuleFeature::IPMetadataFeature, + Lithic::AuthRules::RuleFeature::SpendVelocityFeature + ) + ] + ) + end + attr_accessor :features + + # Parameters for defining a TypeScript code rule + sig do + params( + code: String, + features: + T::Array[ + T.any( + Lithic::AuthRules::RuleFeature::AuthorizationFeature::OrHash, + Lithic::AuthRules::RuleFeature::AuthenticationFeature::OrHash, + Lithic::AuthRules::RuleFeature::TokenizationFeature::OrHash, + Lithic::AuthRules::RuleFeature::ACHReceiptFeature::OrHash, + Lithic::AuthRules::RuleFeature::CardFeature::OrHash, + Lithic::AuthRules::RuleFeature::AccountHolderFeature::OrHash, + Lithic::AuthRules::RuleFeature::IPMetadataFeature::OrHash, + Lithic::AuthRules::RuleFeature::SpendVelocityFeature::OrHash + ) + ] + ).returns(T.attached_class) + end + def self.new( + # The TypeScript source code of the rule. Must define a `rule()` function that + # accepts the declared features as positional arguments (in the same order as the + # `features` array) and returns an array of actions. + code:, + # Features available to the TypeScript code at evaluation time + features: + ) + end + + sig do + override.returns( + { + code: String, + features: + T::Array[ + T.any( + Lithic::AuthRules::RuleFeature::AuthorizationFeature, + Lithic::AuthRules::RuleFeature::AuthenticationFeature, + Lithic::AuthRules::RuleFeature::TokenizationFeature, + Lithic::AuthRules::RuleFeature::ACHReceiptFeature, + Lithic::AuthRules::RuleFeature::CardFeature, + Lithic::AuthRules::RuleFeature::AccountHolderFeature, + Lithic::AuthRules::RuleFeature::IPMetadataFeature, + Lithic::AuthRules::RuleFeature::SpendVelocityFeature + ) + ] + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/lithic/models/auth_rules/v2/backtest_results.rbi b/rbi/lithic/models/auth_rules/v2/backtest_results.rbi index aa798489..6a4acd03 100644 --- a/rbi/lithic/models/auth_rules/v2/backtest_results.rbi +++ b/rbi/lithic/models/auth_rules/v2/backtest_results.rbi @@ -134,47 +134,24 @@ module Lithic ) end - # Auth Rule Token - sig { returns(T.nilable(String)) } - attr_reader :auth_rule_token + # The end time of the simulation + sig { returns(Time) } + attr_accessor :end_ - sig { params(auth_rule_token: String).void } - attr_writer :auth_rule_token + # The start time of the simulation + sig { returns(Time) } + attr_accessor :start - # The end time of the simulation. - sig { returns(T.nilable(Time)) } - attr_reader :end_ - - sig { params(end_: Time).void } - attr_writer :end_ - - # The start time of the simulation. - sig { returns(T.nilable(Time)) } - attr_reader :start - - sig { params(start: Time).void } - attr_writer :start - - sig do - params(auth_rule_token: String, end_: Time, start: Time).returns( - T.attached_class - ) - end + sig { params(end_: Time, start: Time).returns(T.attached_class) } def self.new( - # Auth Rule Token - auth_rule_token: nil, - # The end time of the simulation. - end_: nil, - # The start time of the simulation. - start: nil + # The end time of the simulation + end_:, + # The start time of the simulation + start: ) end - sig do - override.returns( - { auth_rule_token: String, end_: Time, start: Time } - ) - end + sig { override.returns({ end_: Time, start: Time }) } def to_hash end end diff --git a/rbi/lithic/models/auth_rules/v2_create_params.rbi b/rbi/lithic/models/auth_rules/v2_create_params.rbi index 57803fb8..513ef472 100644 --- a/rbi/lithic/models/auth_rules/v2_create_params.rbi +++ b/rbi/lithic/models/auth_rules/v2_create_params.rbi @@ -84,7 +84,8 @@ module Lithic Lithic::AuthRules::Conditional3DSActionParameters, Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, - Lithic::AuthRules::ConditionalTokenizationActionParameters + Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::TypescriptCodeParameters ) ) end @@ -101,6 +102,8 @@ module Lithic # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, + # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. sig do returns( Lithic::AuthRules::V2CreateParams::Body::AccountLevelRule::Type::OrSymbol @@ -147,7 +150,8 @@ module Lithic Lithic::AuthRules::Conditional3DSActionParameters::OrHash, Lithic::AuthRules::ConditionalAuthorizationActionParameters::OrHash, Lithic::AuthRules::ConditionalACHActionParameters::OrHash, - Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash + Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, + Lithic::AuthRules::TypescriptCodeParameters::OrHash ), type: Lithic::AuthRules::V2CreateParams::Body::AccountLevelRule::Type::OrSymbol, @@ -171,6 +175,8 @@ module Lithic # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, + # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. type:, # Account tokens to which the Auth Rule applies. account_tokens: nil, @@ -194,7 +200,8 @@ module Lithic Lithic::AuthRules::Conditional3DSActionParameters, Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, - Lithic::AuthRules::ConditionalTokenizationActionParameters + Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::TypescriptCodeParameters ), type: Lithic::AuthRules::V2CreateParams::Body::AccountLevelRule::Type::OrSymbol, @@ -221,7 +228,8 @@ module Lithic Lithic::AuthRules::Conditional3DSActionParameters, Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, - Lithic::AuthRules::ConditionalTokenizationActionParameters + Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::TypescriptCodeParameters ) end @@ -247,6 +255,8 @@ module Lithic # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, + # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. module Type extend Lithic::Internal::Type::Enum @@ -279,6 +289,11 @@ module Lithic :CONDITIONAL_ACTION, Lithic::AuthRules::V2CreateParams::Body::AccountLevelRule::Type::TaggedSymbol ) + TYPESCRIPT_CODE = + T.let( + :TYPESCRIPT_CODE, + Lithic::AuthRules::V2CreateParams::Body::AccountLevelRule::Type::TaggedSymbol + ) sig do override.returns( @@ -315,7 +330,8 @@ module Lithic Lithic::AuthRules::Conditional3DSActionParameters, Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, - Lithic::AuthRules::ConditionalTokenizationActionParameters + Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::TypescriptCodeParameters ) ) end @@ -332,6 +348,8 @@ module Lithic # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, + # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. sig do returns( Lithic::AuthRules::V2CreateParams::Body::CardLevelRule::Type::OrSymbol @@ -365,7 +383,8 @@ module Lithic Lithic::AuthRules::Conditional3DSActionParameters::OrHash, Lithic::AuthRules::ConditionalAuthorizationActionParameters::OrHash, Lithic::AuthRules::ConditionalACHActionParameters::OrHash, - Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash + Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, + Lithic::AuthRules::TypescriptCodeParameters::OrHash ), type: Lithic::AuthRules::V2CreateParams::Body::CardLevelRule::Type::OrSymbol, @@ -389,6 +408,8 @@ module Lithic # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, + # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. type:, # The event stream during which the rule will be evaluated. event_stream: nil, @@ -409,7 +430,8 @@ module Lithic Lithic::AuthRules::Conditional3DSActionParameters, Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, - Lithic::AuthRules::ConditionalTokenizationActionParameters + Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::TypescriptCodeParameters ), type: Lithic::AuthRules::V2CreateParams::Body::CardLevelRule::Type::OrSymbol, @@ -434,7 +456,8 @@ module Lithic Lithic::AuthRules::Conditional3DSActionParameters, Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, - Lithic::AuthRules::ConditionalTokenizationActionParameters + Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::TypescriptCodeParameters ) end @@ -460,6 +483,8 @@ module Lithic # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, + # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. module Type extend Lithic::Internal::Type::Enum @@ -492,6 +517,11 @@ module Lithic :CONDITIONAL_ACTION, Lithic::AuthRules::V2CreateParams::Body::CardLevelRule::Type::TaggedSymbol ) + TYPESCRIPT_CODE = + T.let( + :TYPESCRIPT_CODE, + Lithic::AuthRules::V2CreateParams::Body::CardLevelRule::Type::TaggedSymbol + ) sig do override.returns( @@ -524,7 +554,8 @@ module Lithic Lithic::AuthRules::Conditional3DSActionParameters, Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, - Lithic::AuthRules::ConditionalTokenizationActionParameters + Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::TypescriptCodeParameters ) ) end @@ -545,6 +576,8 @@ module Lithic # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, + # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. sig do returns( Lithic::AuthRules::V2CreateParams::Body::ProgramLevelRule::Type::OrSymbol @@ -563,6 +596,22 @@ module Lithic end attr_writer :event_stream + # Account tokens to which the Auth Rule does not apply. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :excluded_account_tokens + + sig { params(excluded_account_tokens: T::Array[String]).void } + attr_writer :excluded_account_tokens + + # Business account tokens to which the Auth Rule does not apply. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :excluded_business_account_tokens + + sig do + params(excluded_business_account_tokens: T::Array[String]).void + end + attr_writer :excluded_business_account_tokens + # Card tokens to which the Auth Rule does not apply. sig { returns(T.nilable(T::Array[String])) } attr_reader :excluded_card_tokens @@ -584,12 +633,15 @@ module Lithic Lithic::AuthRules::Conditional3DSActionParameters::OrHash, Lithic::AuthRules::ConditionalAuthorizationActionParameters::OrHash, Lithic::AuthRules::ConditionalACHActionParameters::OrHash, - Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash + Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, + Lithic::AuthRules::TypescriptCodeParameters::OrHash ), program_level: T::Boolean, type: Lithic::AuthRules::V2CreateParams::Body::ProgramLevelRule::Type::OrSymbol, event_stream: Lithic::AuthRules::EventStream::OrSymbol, + excluded_account_tokens: T::Array[String], + excluded_business_account_tokens: T::Array[String], excluded_card_tokens: T::Array[String], name: T.nilable(String) ).returns(T.attached_class) @@ -610,9 +662,15 @@ module Lithic # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, + # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. type:, # The event stream during which the rule will be evaluated. event_stream: nil, + # Account tokens to which the Auth Rule does not apply. + excluded_account_tokens: nil, + # Business account tokens to which the Auth Rule does not apply. + excluded_business_account_tokens: nil, # Card tokens to which the Auth Rule does not apply. excluded_card_tokens: nil, # Auth Rule Name @@ -631,12 +689,15 @@ module Lithic Lithic::AuthRules::Conditional3DSActionParameters, Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, - Lithic::AuthRules::ConditionalTokenizationActionParameters + Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::TypescriptCodeParameters ), program_level: T::Boolean, type: Lithic::AuthRules::V2CreateParams::Body::ProgramLevelRule::Type::OrSymbol, event_stream: Lithic::AuthRules::EventStream::OrSymbol, + excluded_account_tokens: T::Array[String], + excluded_business_account_tokens: T::Array[String], excluded_card_tokens: T::Array[String], name: T.nilable(String) } @@ -658,7 +719,8 @@ module Lithic Lithic::AuthRules::Conditional3DSActionParameters, Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, - Lithic::AuthRules::ConditionalTokenizationActionParameters + Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::TypescriptCodeParameters ) end @@ -684,6 +746,8 @@ module Lithic # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, + # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. module Type extend Lithic::Internal::Type::Enum @@ -716,6 +780,11 @@ module Lithic :CONDITIONAL_ACTION, Lithic::AuthRules::V2CreateParams::Body::ProgramLevelRule::Type::TaggedSymbol ) + TYPESCRIPT_CODE = + T.let( + :TYPESCRIPT_CODE, + Lithic::AuthRules::V2CreateParams::Body::ProgramLevelRule::Type::TaggedSymbol + ) sig do override.returns( diff --git a/rbi/lithic/models/auth_rules/v2_draft_params.rbi b/rbi/lithic/models/auth_rules/v2_draft_params.rbi index c8a91b9c..7d72e691 100644 --- a/rbi/lithic/models/auth_rules/v2_draft_params.rbi +++ b/rbi/lithic/models/auth_rules/v2_draft_params.rbi @@ -26,7 +26,8 @@ module Lithic Lithic::AuthRules::Conditional3DSActionParameters, Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, - Lithic::AuthRules::ConditionalTokenizationActionParameters + Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::TypescriptCodeParameters ) ) ) @@ -45,7 +46,8 @@ module Lithic Lithic::AuthRules::Conditional3DSActionParameters::OrHash, Lithic::AuthRules::ConditionalAuthorizationActionParameters::OrHash, Lithic::AuthRules::ConditionalACHActionParameters::OrHash, - Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash + Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, + Lithic::AuthRules::TypescriptCodeParameters::OrHash ) ), request_options: Lithic::RequestOptions::OrHash @@ -72,7 +74,8 @@ module Lithic Lithic::AuthRules::Conditional3DSActionParameters, Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, - Lithic::AuthRules::ConditionalTokenizationActionParameters + Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::TypescriptCodeParameters ) ), request_options: Lithic::RequestOptions @@ -95,7 +98,8 @@ module Lithic Lithic::AuthRules::Conditional3DSActionParameters, Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, - Lithic::AuthRules::ConditionalTokenizationActionParameters + Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::TypescriptCodeParameters ) end diff --git a/rbi/lithic/models/auth_rules/v2_list_versions_params.rbi b/rbi/lithic/models/auth_rules/v2_list_versions_params.rbi new file mode 100644 index 00000000..35fd55ae --- /dev/null +++ b/rbi/lithic/models/auth_rules/v2_list_versions_params.rbi @@ -0,0 +1,40 @@ +# typed: strong + +module Lithic + module Models + module AuthRules + class V2ListVersionsParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::V2ListVersionsParams, + Lithic::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :auth_rule_token + + sig do + params( + auth_rule_token: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(auth_rule_token:, request_options: {}) + end + + sig do + override.returns( + { auth_rule_token: String, request_options: Lithic::RequestOptions } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/lithic/models/auth_rules/v2_list_versions_response.rbi b/rbi/lithic/models/auth_rules/v2_list_versions_response.rbi new file mode 100644 index 00000000..ef17a294 --- /dev/null +++ b/rbi/lithic/models/auth_rules/v2_list_versions_response.rbi @@ -0,0 +1,36 @@ +# typed: strong + +module Lithic + module Models + module AuthRules + class V2ListVersionsResponse < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2ListVersionsResponse, + Lithic::Internal::AnyHash + ) + end + + sig { returns(T::Array[Lithic::AuthRules::AuthRuleVersion]) } + attr_accessor :data + + sig do + params( + data: T::Array[Lithic::AuthRules::AuthRuleVersion::OrHash] + ).returns(T.attached_class) + end + def self.new(data:) + end + + sig do + override.returns( + { data: T::Array[Lithic::AuthRules::AuthRuleVersion] } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/lithic/models/auth_rules/v2_retrieve_features_response.rbi b/rbi/lithic/models/auth_rules/v2_retrieve_features_response.rbi index df6f8ec5..9e29a311 100644 --- a/rbi/lithic/models/auth_rules/v2_retrieve_features_response.rbi +++ b/rbi/lithic/models/auth_rules/v2_retrieve_features_response.rbi @@ -66,17 +66,12 @@ module Lithic ) end - sig do - returns( - Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters - ) - end + sig { returns(Lithic::AuthRules::VelocityLimitFilters) } attr_reader :filters sig do params( - filters: - Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters::OrHash + filters: Lithic::AuthRules::VelocityLimitFilters::OrHash ).void end attr_writer :filters @@ -110,8 +105,7 @@ module Lithic sig do params( - filters: - Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters::OrHash, + filters: Lithic::AuthRules::VelocityLimitFilters::OrHash, period: T.any( Lithic::AuthRules::VelocityLimitPeriod::TrailingWindowObject::OrHash, @@ -139,8 +133,7 @@ module Lithic sig do override.returns( { - filters: - Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters, + filters: Lithic::AuthRules::VelocityLimitFilters, period: Lithic::AuthRules::VelocityLimitPeriod::Variants, scope: Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Scope::TaggedSymbol, @@ -152,204 +145,6 @@ module Lithic def to_hash end - class Filters < Lithic::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters, - Lithic::Internal::AnyHash - ) - end - - # ISO-3166-1 alpha-3 Country Codes to exclude from the velocity calculation. - # Transactions matching any of the provided will be excluded from the calculated - # velocity. - sig { returns(T.nilable(T::Array[String])) } - attr_accessor :exclude_countries - - # Merchant Category Codes to exclude from the velocity calculation. Transactions - # matching this MCC will be excluded from the calculated velocity. - sig { returns(T.nilable(T::Array[String])) } - attr_accessor :exclude_mccs - - # ISO-3166-1 alpha-3 Country Codes to include in the velocity calculation. - # Transactions not matching any of the provided will not be included in the - # calculated velocity. - sig { returns(T.nilable(T::Array[String])) } - attr_accessor :include_countries - - # Merchant Category Codes to include in the velocity calculation. Transactions not - # matching this MCC will not be included in the calculated velocity. - sig { returns(T.nilable(T::Array[String])) } - attr_accessor :include_mccs - - # PAN entry modes to include in the velocity calculation. Transactions not - # matching any of the provided will not be included in the calculated velocity. - sig do - returns( - T.nilable( - T::Array[ - Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters::IncludePanEntryMode::TaggedSymbol - ] - ) - ) - end - attr_accessor :include_pan_entry_modes - - sig do - params( - exclude_countries: T.nilable(T::Array[String]), - exclude_mccs: T.nilable(T::Array[String]), - include_countries: T.nilable(T::Array[String]), - include_mccs: T.nilable(T::Array[String]), - include_pan_entry_modes: - T.nilable( - T::Array[ - Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters::IncludePanEntryMode::OrSymbol - ] - ) - ).returns(T.attached_class) - end - def self.new( - # ISO-3166-1 alpha-3 Country Codes to exclude from the velocity calculation. - # Transactions matching any of the provided will be excluded from the calculated - # velocity. - exclude_countries: nil, - # Merchant Category Codes to exclude from the velocity calculation. Transactions - # matching this MCC will be excluded from the calculated velocity. - exclude_mccs: nil, - # ISO-3166-1 alpha-3 Country Codes to include in the velocity calculation. - # Transactions not matching any of the provided will not be included in the - # calculated velocity. - include_countries: nil, - # Merchant Category Codes to include in the velocity calculation. Transactions not - # matching this MCC will not be included in the calculated velocity. - include_mccs: nil, - # PAN entry modes to include in the velocity calculation. Transactions not - # matching any of the provided will not be included in the calculated velocity. - include_pan_entry_modes: nil - ) - end - - sig do - override.returns( - { - exclude_countries: T.nilable(T::Array[String]), - exclude_mccs: T.nilable(T::Array[String]), - include_countries: T.nilable(T::Array[String]), - include_mccs: T.nilable(T::Array[String]), - include_pan_entry_modes: - T.nilable( - T::Array[ - Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters::IncludePanEntryMode::TaggedSymbol - ] - ) - } - ) - end - def to_hash - end - - module IncludePanEntryMode - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters::IncludePanEntryMode - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - AUTO_ENTRY = - T.let( - :AUTO_ENTRY, - Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters::IncludePanEntryMode::TaggedSymbol - ) - BAR_CODE = - T.let( - :BAR_CODE, - Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters::IncludePanEntryMode::TaggedSymbol - ) - CONTACTLESS = - T.let( - :CONTACTLESS, - Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters::IncludePanEntryMode::TaggedSymbol - ) - CREDENTIAL_ON_FILE = - T.let( - :CREDENTIAL_ON_FILE, - Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters::IncludePanEntryMode::TaggedSymbol - ) - ECOMMERCE = - T.let( - :ECOMMERCE, - Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters::IncludePanEntryMode::TaggedSymbol - ) - ERROR_KEYED = - T.let( - :ERROR_KEYED, - Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters::IncludePanEntryMode::TaggedSymbol - ) - ERROR_MAGNETIC_STRIPE = - T.let( - :ERROR_MAGNETIC_STRIPE, - Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters::IncludePanEntryMode::TaggedSymbol - ) - ICC = - T.let( - :ICC, - Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters::IncludePanEntryMode::TaggedSymbol - ) - KEY_ENTERED = - T.let( - :KEY_ENTERED, - Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters::IncludePanEntryMode::TaggedSymbol - ) - MAGNETIC_STRIPE = - T.let( - :MAGNETIC_STRIPE, - Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters::IncludePanEntryMode::TaggedSymbol - ) - MANUAL = - T.let( - :MANUAL, - Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters::IncludePanEntryMode::TaggedSymbol - ) - OCR = - T.let( - :OCR, - Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters::IncludePanEntryMode::TaggedSymbol - ) - SECURE_CARDLESS = - T.let( - :SECURE_CARDLESS, - Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters::IncludePanEntryMode::TaggedSymbol - ) - UNSPECIFIED = - T.let( - :UNSPECIFIED, - Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters::IncludePanEntryMode::TaggedSymbol - ) - UNKNOWN = - T.let( - :UNKNOWN, - Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters::IncludePanEntryMode::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters::IncludePanEntryMode::TaggedSymbol - ] - ) - end - def self.values - end - end - end - # The scope the velocity is calculated for module Scope extend Lithic::Internal::Type::Enum diff --git a/rbi/lithic/models/auth_rules/v2_retrieve_report_response.rbi b/rbi/lithic/models/auth_rules/v2_retrieve_report_response.rbi index 1e1f2041..70d3d5bf 100644 --- a/rbi/lithic/models/auth_rules/v2_retrieve_report_response.rbi +++ b/rbi/lithic/models/auth_rules/v2_retrieve_report_response.rbi @@ -110,13 +110,28 @@ module Lithic end attr_writer :draft_version_statistics + # Statistics for each version of the rule that was evaluated during the reported + # day. + sig do + returns( + T::Array[ + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version + ] + ) + end + attr_accessor :versions + sig do params( current_version_statistics: T.nilable(Lithic::AuthRules::ReportStats::OrHash), date: Date, draft_version_statistics: - T.nilable(Lithic::AuthRules::ReportStats::OrHash) + T.nilable(Lithic::AuthRules::ReportStats::OrHash), + versions: + T::Array[ + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::OrHash + ] ).returns(T.attached_class) end def self.new( @@ -125,7 +140,10 @@ module Lithic # The date (UTC) for which the statistics are reported. date:, # Detailed statistics for the draft version of the rule. - draft_version_statistics: + draft_version_statistics:, + # Statistics for each version of the rule that was evaluated during the reported + # day. + versions: ) end @@ -136,12 +154,1683 @@ module Lithic T.nilable(Lithic::AuthRules::ReportStats), date: Date, draft_version_statistics: - T.nilable(Lithic::AuthRules::ReportStats) + T.nilable(Lithic::AuthRules::ReportStats), + versions: + T::Array[ + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version + ] } ) end def to_hash end + + class Version < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version, + Lithic::Internal::AnyHash + ) + end + + # A mapping of action types to the number of times that action was returned by + # this version during the relevant period. Actions are the possible outcomes of a + # rule evaluation, such as DECLINE, CHALLENGE, REQUIRE_TFA, etc. In case rule + # didn't trigger any action, it's counted under NO_ACTION key. + sig { returns(T::Hash[Symbol, Integer]) } + attr_accessor :action_counts + + # Example events and their outcomes for this version. + sig do + returns( + T::Array[ + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example + ] + ) + end + attr_accessor :examples + + # The evaluation mode of this version during the reported period. + sig do + returns( + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::State::TaggedSymbol + ) + end + attr_accessor :state + + # The rule version number. + sig { returns(Integer) } + attr_accessor :version + + sig do + params( + action_counts: T::Hash[Symbol, Integer], + examples: + T::Array[ + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::OrHash + ], + state: + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::State::OrSymbol, + version: Integer + ).returns(T.attached_class) + end + def self.new( + # A mapping of action types to the number of times that action was returned by + # this version during the relevant period. Actions are the possible outcomes of a + # rule evaluation, such as DECLINE, CHALLENGE, REQUIRE_TFA, etc. In case rule + # didn't trigger any action, it's counted under NO_ACTION key. + action_counts:, + # Example events and their outcomes for this version. + examples:, + # The evaluation mode of this version during the reported period. + state:, + # The rule version number. + version: + ) + end + + sig do + override.returns( + { + action_counts: T::Hash[Symbol, Integer], + examples: + T::Array[ + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example + ], + state: + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::State::TaggedSymbol, + version: Integer + } + ) + end + def to_hash + end + + class Example < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example, + Lithic::Internal::AnyHash + ) + end + + # The actions taken by this version for this event. + sig do + returns( + T::Array[ + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::Variants + ] + ) + end + attr_accessor :actions + + # The event token. + sig { returns(String) } + attr_accessor :event_token + + # The timestamp of the event. + sig { returns(Time) } + attr_accessor :timestamp + + sig do + params( + actions: + T::Array[ + T.any( + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::OrHash, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ChallengeActionAuthorization::OrHash, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ResultAuthentication3DSAction::OrHash, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::OrHash, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::OrHash, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ApproveActionACH::OrHash, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::OrHash + ) + ], + event_token: String, + timestamp: Time + ).returns(T.attached_class) + end + def self.new( + # The actions taken by this version for this event. + actions:, + # The event token. + event_token:, + # The timestamp of the event. + timestamp: + ) + end + + sig do + override.returns( + { + actions: + T::Array[ + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::Variants + ], + event_token: String, + timestamp: Time + } + ) + end + def to_hash + end + + module Action + extend Lithic::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ChallengeActionAuthorization, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ResultAuthentication3DSAction, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ApproveActionACH, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction + ) + end + + class DeclineActionAuthorization < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization, + Lithic::Internal::AnyHash + ) + end + + # The detailed result code explaining the specific reason for the decline + sig do + returns( + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + end + attr_accessor :code + + sig do + returns( + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Type::TaggedSymbol + ) + end + attr_accessor :type + + sig do + params( + code: + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::OrSymbol, + type: + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # The detailed result code explaining the specific reason for the decline + code:, + type: + ) + end + + sig do + override.returns( + { + code: + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol, + type: + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Type::TaggedSymbol + } + ) + end + def to_hash + end + + # The detailed result code explaining the specific reason for the decline + module Code + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACCOUNT_DAILY_SPEND_LIMIT_EXCEEDED = + T.let( + :ACCOUNT_DAILY_SPEND_LIMIT_EXCEEDED, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + ACCOUNT_DELINQUENT = + T.let( + :ACCOUNT_DELINQUENT, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + ACCOUNT_INACTIVE = + T.let( + :ACCOUNT_INACTIVE, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + ACCOUNT_LIFETIME_SPEND_LIMIT_EXCEEDED = + T.let( + :ACCOUNT_LIFETIME_SPEND_LIMIT_EXCEEDED, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + ACCOUNT_MONTHLY_SPEND_LIMIT_EXCEEDED = + T.let( + :ACCOUNT_MONTHLY_SPEND_LIMIT_EXCEEDED, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + ACCOUNT_PAUSED = + T.let( + :ACCOUNT_PAUSED, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + ACCOUNT_UNDER_REVIEW = + T.let( + :ACCOUNT_UNDER_REVIEW, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + ADDRESS_INCORRECT = + T.let( + :ADDRESS_INCORRECT, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + APPROVED = + T.let( + :APPROVED, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + AUTH_RULE_ALLOWED_COUNTRY = + T.let( + :AUTH_RULE_ALLOWED_COUNTRY, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + AUTH_RULE_ALLOWED_MCC = + T.let( + :AUTH_RULE_ALLOWED_MCC, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + AUTH_RULE_BLOCKED_COUNTRY = + T.let( + :AUTH_RULE_BLOCKED_COUNTRY, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + AUTH_RULE_BLOCKED_MCC = + T.let( + :AUTH_RULE_BLOCKED_MCC, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + AUTH_RULE = + T.let( + :AUTH_RULE, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + CARD_CLOSED = + T.let( + :CARD_CLOSED, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + CARD_CRYPTOGRAM_VALIDATION_FAILURE = + T.let( + :CARD_CRYPTOGRAM_VALIDATION_FAILURE, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + CARD_EXPIRED = + T.let( + :CARD_EXPIRED, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + CARD_EXPIRY_DATE_INCORRECT = + T.let( + :CARD_EXPIRY_DATE_INCORRECT, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + CARD_INVALID = + T.let( + :CARD_INVALID, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + CARD_NOT_ACTIVATED = + T.let( + :CARD_NOT_ACTIVATED, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + CARD_PAUSED = + T.let( + :CARD_PAUSED, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + CARD_PIN_INCORRECT = + T.let( + :CARD_PIN_INCORRECT, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + CARD_RESTRICTED = + T.let( + :CARD_RESTRICTED, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + CARD_SECURITY_CODE_INCORRECT = + T.let( + :CARD_SECURITY_CODE_INCORRECT, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + CARD_SPEND_LIMIT_EXCEEDED = + T.let( + :CARD_SPEND_LIMIT_EXCEEDED, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + CONTACT_CARD_ISSUER = + T.let( + :CONTACT_CARD_ISSUER, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + CUSTOMER_ASA_TIMEOUT = + T.let( + :CUSTOMER_ASA_TIMEOUT, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + CUSTOM_ASA_RESULT = + T.let( + :CUSTOM_ASA_RESULT, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + DECLINED = + T.let( + :DECLINED, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + DO_NOT_HONOR = + T.let( + :DO_NOT_HONOR, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + DRIVER_NUMBER_INVALID = + T.let( + :DRIVER_NUMBER_INVALID, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + FORMAT_ERROR = + T.let( + :FORMAT_ERROR, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + INSUFFICIENT_FUNDING_SOURCE_BALANCE = + T.let( + :INSUFFICIENT_FUNDING_SOURCE_BALANCE, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + INSUFFICIENT_FUNDS = + T.let( + :INSUFFICIENT_FUNDS, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + LITHIC_SYSTEM_ERROR = + T.let( + :LITHIC_SYSTEM_ERROR, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + LITHIC_SYSTEM_RATE_LIMIT = + T.let( + :LITHIC_SYSTEM_RATE_LIMIT, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + MALFORMED_ASA_RESPONSE = + T.let( + :MALFORMED_ASA_RESPONSE, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + MERCHANT_INVALID = + T.let( + :MERCHANT_INVALID, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + MERCHANT_LOCKED_CARD_ATTEMPTED_ELSEWHERE = + T.let( + :MERCHANT_LOCKED_CARD_ATTEMPTED_ELSEWHERE, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + MERCHANT_NOT_PERMITTED = + T.let( + :MERCHANT_NOT_PERMITTED, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + OVER_REVERSAL_ATTEMPTED = + T.let( + :OVER_REVERSAL_ATTEMPTED, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + PIN_BLOCKED = + T.let( + :PIN_BLOCKED, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + PROGRAM_CARD_SPEND_LIMIT_EXCEEDED = + T.let( + :PROGRAM_CARD_SPEND_LIMIT_EXCEEDED, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + PROGRAM_SUSPENDED = + T.let( + :PROGRAM_SUSPENDED, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + PROGRAM_USAGE_RESTRICTION = + T.let( + :PROGRAM_USAGE_RESTRICTION, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + REVERSAL_UNMATCHED = + T.let( + :REVERSAL_UNMATCHED, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + SECURITY_VIOLATION = + T.let( + :SECURITY_VIOLATION, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + SINGLE_USE_CARD_REATTEMPTED = + T.let( + :SINGLE_USE_CARD_REATTEMPTED, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + SUSPECTED_FRAUD = + T.let( + :SUSPECTED_FRAUD, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + TRANSACTION_INVALID = + T.let( + :TRANSACTION_INVALID, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + TRANSACTION_NOT_PERMITTED_TO_ACQUIRER_OR_TERMINAL = + T.let( + :TRANSACTION_NOT_PERMITTED_TO_ACQUIRER_OR_TERMINAL, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + TRANSACTION_NOT_PERMITTED_TO_ISSUER_OR_CARDHOLDER = + T.let( + :TRANSACTION_NOT_PERMITTED_TO_ISSUER_OR_CARDHOLDER, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + TRANSACTION_PREVIOUSLY_COMPLETED = + T.let( + :TRANSACTION_PREVIOUSLY_COMPLETED, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + UNAUTHORIZED_MERCHANT = + T.let( + :UNAUTHORIZED_MERCHANT, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + VEHICLE_NUMBER_INVALID = + T.let( + :VEHICLE_NUMBER_INVALID, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + CARDHOLDER_CHALLENGED = + T.let( + :CARDHOLDER_CHALLENGED, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + CARDHOLDER_CHALLENGE_FAILED = + T.let( + :CARDHOLDER_CHALLENGE_FAILED, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Code::TaggedSymbol + ] + ) + end + def self.values + end + end + + module Type + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + DECLINE = + T.let( + :DECLINE, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class ChallengeActionAuthorization < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ChallengeActionAuthorization, + Lithic::Internal::AnyHash + ) + end + + sig do + returns( + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ChallengeActionAuthorization::Type::TaggedSymbol + ) + end + attr_accessor :type + + sig do + params( + type: + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ChallengeActionAuthorization::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new(type:) + end + + sig do + override.returns( + { + type: + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ChallengeActionAuthorization::Type::TaggedSymbol + } + ) + end + def to_hash + end + + module Type + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ChallengeActionAuthorization::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CHALLENGE = + T.let( + :CHALLENGE, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ChallengeActionAuthorization::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ChallengeActionAuthorization::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class ResultAuthentication3DSAction < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ResultAuthentication3DSAction, + Lithic::Internal::AnyHash + ) + end + + sig do + returns( + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ResultAuthentication3DSAction::Type::TaggedSymbol + ) + end + attr_accessor :type + + sig do + params( + type: + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ResultAuthentication3DSAction::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new(type:) + end + + sig do + override.returns( + { + type: + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ResultAuthentication3DSAction::Type::TaggedSymbol + } + ) + end + def to_hash + end + + module Type + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ResultAuthentication3DSAction::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + DECLINE = + T.let( + :DECLINE, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ResultAuthentication3DSAction::Type::TaggedSymbol + ) + CHALLENGE = + T.let( + :CHALLENGE, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ResultAuthentication3DSAction::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ResultAuthentication3DSAction::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class DeclineActionTokenization < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization, + Lithic::Internal::AnyHash + ) + end + + # Decline the tokenization request + sig do + returns( + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Type::TaggedSymbol + ) + end + attr_accessor :type + + # Reason code for declining the tokenization request + sig do + returns( + T.nilable( + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Reason::TaggedSymbol + ) + ) + end + attr_reader :reason + + sig do + params( + reason: + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Reason::OrSymbol + ).void + end + attr_writer :reason + + sig do + params( + type: + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Type::OrSymbol, + reason: + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Reason::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # Decline the tokenization request + type:, + # Reason code for declining the tokenization request + reason: nil + ) + end + + sig do + override.returns( + { + type: + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Type::TaggedSymbol, + reason: + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Reason::TaggedSymbol + } + ) + end + def to_hash + end + + # Decline the tokenization request + module Type + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + DECLINE = + T.let( + :DECLINE, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Reason code for declining the tokenization request + module Reason + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Reason + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACCOUNT_SCORE_1 = + T.let( + :ACCOUNT_SCORE_1, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Reason::TaggedSymbol + ) + DEVICE_SCORE_1 = + T.let( + :DEVICE_SCORE_1, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Reason::TaggedSymbol + ) + ALL_WALLET_DECLINE_REASONS_PRESENT = + T.let( + :ALL_WALLET_DECLINE_REASONS_PRESENT, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Reason::TaggedSymbol + ) + WALLET_RECOMMENDED_DECISION_RED = + T.let( + :WALLET_RECOMMENDED_DECISION_RED, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Reason::TaggedSymbol + ) + CVC_MISMATCH = + T.let( + :CVC_MISMATCH, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Reason::TaggedSymbol + ) + CARD_EXPIRY_MONTH_MISMATCH = + T.let( + :CARD_EXPIRY_MONTH_MISMATCH, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Reason::TaggedSymbol + ) + CARD_EXPIRY_YEAR_MISMATCH = + T.let( + :CARD_EXPIRY_YEAR_MISMATCH, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Reason::TaggedSymbol + ) + CARD_INVALID_STATE = + T.let( + :CARD_INVALID_STATE, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Reason::TaggedSymbol + ) + CUSTOMER_RED_PATH = + T.let( + :CUSTOMER_RED_PATH, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Reason::TaggedSymbol + ) + INVALID_CUSTOMER_RESPONSE = + T.let( + :INVALID_CUSTOMER_RESPONSE, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Reason::TaggedSymbol + ) + NETWORK_FAILURE = + T.let( + :NETWORK_FAILURE, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Reason::TaggedSymbol + ) + GENERIC_DECLINE = + T.let( + :GENERIC_DECLINE, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Reason::TaggedSymbol + ) + DIGITAL_CARD_ART_REQUIRED = + T.let( + :DIGITAL_CARD_ART_REQUIRED, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Reason::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::Reason::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class RequireTfaAction < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction, + Lithic::Internal::AnyHash + ) + end + + # Require two-factor authentication for the tokenization request + sig do + returns( + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Type::TaggedSymbol + ) + end + attr_accessor :type + + # Reason code for requiring two-factor authentication + sig do + returns( + T.nilable( + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Reason::TaggedSymbol + ) + ) + end + attr_reader :reason + + sig do + params( + reason: + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Reason::OrSymbol + ).void + end + attr_writer :reason + + sig do + params( + type: + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Type::OrSymbol, + reason: + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Reason::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # Require two-factor authentication for the tokenization request + type:, + # Reason code for requiring two-factor authentication + reason: nil + ) + end + + sig do + override.returns( + { + type: + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Type::TaggedSymbol, + reason: + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Reason::TaggedSymbol + } + ) + end + def to_hash + end + + # Require two-factor authentication for the tokenization request + module Type + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + REQUIRE_TFA = + T.let( + :REQUIRE_TFA, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Reason code for requiring two-factor authentication + module Reason + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Reason + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + WALLET_RECOMMENDED_TFA = + T.let( + :WALLET_RECOMMENDED_TFA, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Reason::TaggedSymbol + ) + SUSPICIOUS_ACTIVITY = + T.let( + :SUSPICIOUS_ACTIVITY, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Reason::TaggedSymbol + ) + DEVICE_RECENTLY_LOST = + T.let( + :DEVICE_RECENTLY_LOST, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Reason::TaggedSymbol + ) + TOO_MANY_RECENT_ATTEMPTS = + T.let( + :TOO_MANY_RECENT_ATTEMPTS, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Reason::TaggedSymbol + ) + TOO_MANY_RECENT_TOKENS = + T.let( + :TOO_MANY_RECENT_TOKENS, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Reason::TaggedSymbol + ) + TOO_MANY_DIFFERENT_CARDHOLDERS = + T.let( + :TOO_MANY_DIFFERENT_CARDHOLDERS, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Reason::TaggedSymbol + ) + OUTSIDE_HOME_TERRITORY = + T.let( + :OUTSIDE_HOME_TERRITORY, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Reason::TaggedSymbol + ) + HAS_SUSPENDED_TOKENS = + T.let( + :HAS_SUSPENDED_TOKENS, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Reason::TaggedSymbol + ) + HIGH_RISK = + T.let( + :HIGH_RISK, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Reason::TaggedSymbol + ) + ACCOUNT_SCORE_LOW = + T.let( + :ACCOUNT_SCORE_LOW, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Reason::TaggedSymbol + ) + DEVICE_SCORE_LOW = + T.let( + :DEVICE_SCORE_LOW, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Reason::TaggedSymbol + ) + CARD_STATE_TFA = + T.let( + :CARD_STATE_TFA, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Reason::TaggedSymbol + ) + HARDCODED_TFA = + T.let( + :HARDCODED_TFA, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Reason::TaggedSymbol + ) + CUSTOMER_RULE_TFA = + T.let( + :CUSTOMER_RULE_TFA, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Reason::TaggedSymbol + ) + DEVICE_HOST_CARD_EMULATION = + T.let( + :DEVICE_HOST_CARD_EMULATION, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Reason::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::Reason::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class ApproveActionACH < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ApproveActionACH, + Lithic::Internal::AnyHash + ) + end + + # Approve the ACH transaction + sig do + returns( + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ApproveActionACH::Type::TaggedSymbol + ) + end + attr_accessor :type + + sig do + params( + type: + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ApproveActionACH::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # Approve the ACH transaction + type: + ) + end + + sig do + override.returns( + { + type: + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ApproveActionACH::Type::TaggedSymbol + } + ) + end + def to_hash + end + + # Approve the ACH transaction + module Type + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ApproveActionACH::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + APPROVE = + T.let( + :APPROVE, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ApproveActionACH::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ApproveActionACH::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class ReturnAction < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction, + Lithic::Internal::AnyHash + ) + end + + # NACHA return code to use when returning the transaction. Note that the list of + # available return codes is subject to an allowlist configured at the program + # level + sig do + returns( + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + end + attr_accessor :code + + # Return the ACH transaction + sig do + returns( + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Type::TaggedSymbol + ) + end + attr_accessor :type + + sig do + params( + code: + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::OrSymbol, + type: + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # NACHA return code to use when returning the transaction. Note that the list of + # available return codes is subject to an allowlist configured at the program + # level + code:, + # Return the ACH transaction + type: + ) + end + + sig do + override.returns( + { + code: + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol, + type: + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Type::TaggedSymbol + } + ) + end + def to_hash + end + + # NACHA return code to use when returning the transaction. Note that the list of + # available return codes is subject to an allowlist configured at the program + # level + module Code + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + R01 = + T.let( + :R01, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R02 = + T.let( + :R02, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R03 = + T.let( + :R03, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R04 = + T.let( + :R04, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R05 = + T.let( + :R05, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R06 = + T.let( + :R06, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R07 = + T.let( + :R07, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R08 = + T.let( + :R08, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R09 = + T.let( + :R09, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R10 = + T.let( + :R10, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R11 = + T.let( + :R11, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R12 = + T.let( + :R12, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R13 = + T.let( + :R13, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R14 = + T.let( + :R14, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R15 = + T.let( + :R15, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R16 = + T.let( + :R16, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R17 = + T.let( + :R17, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R18 = + T.let( + :R18, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R19 = + T.let( + :R19, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R20 = + T.let( + :R20, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R21 = + T.let( + :R21, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R22 = + T.let( + :R22, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R23 = + T.let( + :R23, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R24 = + T.let( + :R24, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R25 = + T.let( + :R25, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R26 = + T.let( + :R26, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R27 = + T.let( + :R27, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R28 = + T.let( + :R28, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R29 = + T.let( + :R29, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R30 = + T.let( + :R30, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R31 = + T.let( + :R31, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R32 = + T.let( + :R32, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R33 = + T.let( + :R33, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R34 = + T.let( + :R34, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R35 = + T.let( + :R35, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R36 = + T.let( + :R36, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R37 = + T.let( + :R37, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R38 = + T.let( + :R38, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R39 = + T.let( + :R39, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R40 = + T.let( + :R40, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R41 = + T.let( + :R41, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R42 = + T.let( + :R42, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R43 = + T.let( + :R43, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R44 = + T.let( + :R44, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R45 = + T.let( + :R45, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R46 = + T.let( + :R46, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R47 = + T.let( + :R47, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R50 = + T.let( + :R50, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R51 = + T.let( + :R51, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R52 = + T.let( + :R52, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R53 = + T.let( + :R53, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R61 = + T.let( + :R61, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R62 = + T.let( + :R62, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R67 = + T.let( + :R67, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R68 = + T.let( + :R68, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R69 = + T.let( + :R69, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R70 = + T.let( + :R70, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R71 = + T.let( + :R71, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R72 = + T.let( + :R72, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R73 = + T.let( + :R73, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R74 = + T.let( + :R74, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R75 = + T.let( + :R75, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R76 = + T.let( + :R76, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R77 = + T.let( + :R77, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R80 = + T.let( + :R80, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R81 = + T.let( + :R81, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R82 = + T.let( + :R82, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R83 = + T.let( + :R83, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R84 = + T.let( + :R84, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + R85 = + T.let( + :R85, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Code::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Return the ACH transaction + module Type + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + RETURN = + T.let( + :RETURN, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::Variants + ] + ) + end + def self.variants + end + end + end + + # The evaluation mode of this version during the reported period. + module State + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::State + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :ACTIVE, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::State::TaggedSymbol + ) + SHADOW = + T.let( + :SHADOW, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::State::TaggedSymbol + ) + INACTIVE = + T.let( + :INACTIVE, + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::State::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::State::TaggedSymbol + ] + ) + end + def self.values + end + end + end end end end diff --git a/rbi/lithic/models/auth_rules/v2_update_params.rbi b/rbi/lithic/models/auth_rules/v2_update_params.rbi index d30c6611..91390c49 100644 --- a/rbi/lithic/models/auth_rules/v2_update_params.rbi +++ b/rbi/lithic/models/auth_rules/v2_update_params.rbi @@ -314,6 +314,22 @@ module Lithic ) end + # Account tokens to which the Auth Rule does not apply. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :excluded_account_tokens + + sig { params(excluded_account_tokens: T::Array[String]).void } + attr_writer :excluded_account_tokens + + # Business account tokens to which the Auth Rule does not apply. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :excluded_business_account_tokens + + sig do + params(excluded_business_account_tokens: T::Array[String]).void + end + attr_writer :excluded_business_account_tokens + # Card tokens to which the Auth Rule does not apply. sig { returns(T.nilable(T::Array[String])) } attr_reader :excluded_card_tokens @@ -356,6 +372,8 @@ module Lithic sig do params( + excluded_account_tokens: T::Array[String], + excluded_business_account_tokens: T::Array[String], excluded_card_tokens: T::Array[String], name: T.nilable(String), program_level: T::Boolean, @@ -364,6 +382,10 @@ module Lithic ).returns(T.attached_class) end def self.new( + # Account tokens to which the Auth Rule does not apply. + excluded_account_tokens: nil, + # Business account tokens to which the Auth Rule does not apply. + excluded_business_account_tokens: nil, # Card tokens to which the Auth Rule does not apply. excluded_card_tokens: nil, # Auth Rule Name @@ -382,6 +404,8 @@ module Lithic sig do override.returns( { + excluded_account_tokens: T::Array[String], + excluded_business_account_tokens: T::Array[String], excluded_card_tokens: T::Array[String], name: T.nilable(String), program_level: T::Boolean, diff --git a/rbi/lithic/models/auth_rules/velocity_limit_filters.rbi b/rbi/lithic/models/auth_rules/velocity_limit_filters.rbi new file mode 100644 index 00000000..36bdeb7c --- /dev/null +++ b/rbi/lithic/models/auth_rules/velocity_limit_filters.rbi @@ -0,0 +1,205 @@ +# typed: strong + +module Lithic + module Models + module AuthRules + class VelocityLimitFilters < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::VelocityLimitFilters, + Lithic::Internal::AnyHash + ) + end + + # ISO-3166-1 alpha-3 Country Codes to exclude from the velocity calculation. + # Transactions matching any of the provided will be excluded from the calculated + # velocity. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :exclude_countries + + # Merchant Category Codes to exclude from the velocity calculation. Transactions + # matching this MCC will be excluded from the calculated velocity. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :exclude_mccs + + # ISO-3166-1 alpha-3 Country Codes to include in the velocity calculation. + # Transactions not matching any of the provided will not be included in the + # calculated velocity. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :include_countries + + # Merchant Category Codes to include in the velocity calculation. Transactions not + # matching this MCC will not be included in the calculated velocity. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :include_mccs + + # PAN entry modes to include in the velocity calculation. Transactions not + # matching any of the provided will not be included in the calculated velocity. + sig do + returns( + T.nilable( + T::Array[ + Lithic::AuthRules::VelocityLimitFilters::IncludePanEntryMode::OrSymbol + ] + ) + ) + end + attr_accessor :include_pan_entry_modes + + sig do + params( + exclude_countries: T.nilable(T::Array[String]), + exclude_mccs: T.nilable(T::Array[String]), + include_countries: T.nilable(T::Array[String]), + include_mccs: T.nilable(T::Array[String]), + include_pan_entry_modes: + T.nilable( + T::Array[ + Lithic::AuthRules::VelocityLimitFilters::IncludePanEntryMode::OrSymbol + ] + ) + ).returns(T.attached_class) + end + def self.new( + # ISO-3166-1 alpha-3 Country Codes to exclude from the velocity calculation. + # Transactions matching any of the provided will be excluded from the calculated + # velocity. + exclude_countries: nil, + # Merchant Category Codes to exclude from the velocity calculation. Transactions + # matching this MCC will be excluded from the calculated velocity. + exclude_mccs: nil, + # ISO-3166-1 alpha-3 Country Codes to include in the velocity calculation. + # Transactions not matching any of the provided will not be included in the + # calculated velocity. + include_countries: nil, + # Merchant Category Codes to include in the velocity calculation. Transactions not + # matching this MCC will not be included in the calculated velocity. + include_mccs: nil, + # PAN entry modes to include in the velocity calculation. Transactions not + # matching any of the provided will not be included in the calculated velocity. + include_pan_entry_modes: nil + ) + end + + sig do + override.returns( + { + exclude_countries: T.nilable(T::Array[String]), + exclude_mccs: T.nilable(T::Array[String]), + include_countries: T.nilable(T::Array[String]), + include_mccs: T.nilable(T::Array[String]), + include_pan_entry_modes: + T.nilable( + T::Array[ + Lithic::AuthRules::VelocityLimitFilters::IncludePanEntryMode::OrSymbol + ] + ) + } + ) + end + def to_hash + end + + module IncludePanEntryMode + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::AuthRules::VelocityLimitFilters::IncludePanEntryMode + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AUTO_ENTRY = + T.let( + :AUTO_ENTRY, + Lithic::AuthRules::VelocityLimitFilters::IncludePanEntryMode::TaggedSymbol + ) + BAR_CODE = + T.let( + :BAR_CODE, + Lithic::AuthRules::VelocityLimitFilters::IncludePanEntryMode::TaggedSymbol + ) + CONTACTLESS = + T.let( + :CONTACTLESS, + Lithic::AuthRules::VelocityLimitFilters::IncludePanEntryMode::TaggedSymbol + ) + CREDENTIAL_ON_FILE = + T.let( + :CREDENTIAL_ON_FILE, + Lithic::AuthRules::VelocityLimitFilters::IncludePanEntryMode::TaggedSymbol + ) + ECOMMERCE = + T.let( + :ECOMMERCE, + Lithic::AuthRules::VelocityLimitFilters::IncludePanEntryMode::TaggedSymbol + ) + ERROR_KEYED = + T.let( + :ERROR_KEYED, + Lithic::AuthRules::VelocityLimitFilters::IncludePanEntryMode::TaggedSymbol + ) + ERROR_MAGNETIC_STRIPE = + T.let( + :ERROR_MAGNETIC_STRIPE, + Lithic::AuthRules::VelocityLimitFilters::IncludePanEntryMode::TaggedSymbol + ) + ICC = + T.let( + :ICC, + Lithic::AuthRules::VelocityLimitFilters::IncludePanEntryMode::TaggedSymbol + ) + KEY_ENTERED = + T.let( + :KEY_ENTERED, + Lithic::AuthRules::VelocityLimitFilters::IncludePanEntryMode::TaggedSymbol + ) + MAGNETIC_STRIPE = + T.let( + :MAGNETIC_STRIPE, + Lithic::AuthRules::VelocityLimitFilters::IncludePanEntryMode::TaggedSymbol + ) + MANUAL = + T.let( + :MANUAL, + Lithic::AuthRules::VelocityLimitFilters::IncludePanEntryMode::TaggedSymbol + ) + OCR = + T.let( + :OCR, + Lithic::AuthRules::VelocityLimitFilters::IncludePanEntryMode::TaggedSymbol + ) + SECURE_CARDLESS = + T.let( + :SECURE_CARDLESS, + Lithic::AuthRules::VelocityLimitFilters::IncludePanEntryMode::TaggedSymbol + ) + UNSPECIFIED = + T.let( + :UNSPECIFIED, + Lithic::AuthRules::VelocityLimitFilters::IncludePanEntryMode::TaggedSymbol + ) + UNKNOWN = + T.let( + :UNKNOWN, + Lithic::AuthRules::VelocityLimitFilters::IncludePanEntryMode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::AuthRules::VelocityLimitFilters::IncludePanEntryMode::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + end +end diff --git a/rbi/lithic/models/auth_rules/velocity_limit_params.rbi b/rbi/lithic/models/auth_rules/velocity_limit_params.rbi index c9026a50..d050b654 100644 --- a/rbi/lithic/models/auth_rules/velocity_limit_params.rbi +++ b/rbi/lithic/models/auth_rules/velocity_limit_params.rbi @@ -30,15 +30,11 @@ module Lithic sig { returns(Lithic::AuthRules::VelocityLimitParams::Scope::OrSymbol) } attr_accessor :scope - sig do - returns(T.nilable(Lithic::AuthRules::VelocityLimitParams::Filters)) - end + sig { returns(T.nilable(Lithic::AuthRules::VelocityLimitFilters)) } attr_reader :filters sig do - params( - filters: Lithic::AuthRules::VelocityLimitParams::Filters::OrHash - ).void + params(filters: Lithic::AuthRules::VelocityLimitFilters::OrHash).void end attr_writer :filters @@ -67,7 +63,7 @@ module Lithic Lithic::AuthRules::VelocityLimitPeriod::FixedWindowYear::OrHash ), scope: Lithic::AuthRules::VelocityLimitParams::Scope::OrSymbol, - filters: Lithic::AuthRules::VelocityLimitParams::Filters::OrHash, + filters: Lithic::AuthRules::VelocityLimitFilters::OrHash, limit_amount: T.nilable(Integer), limit_count: T.nilable(Integer) ).returns(T.attached_class) @@ -103,7 +99,7 @@ module Lithic Lithic::AuthRules::VelocityLimitPeriod::FixedWindowYear ), scope: Lithic::AuthRules::VelocityLimitParams::Scope::OrSymbol, - filters: Lithic::AuthRules::VelocityLimitParams::Filters, + filters: Lithic::AuthRules::VelocityLimitFilters, limit_amount: T.nilable(Integer), limit_count: T.nilable(Integer) } @@ -143,204 +139,6 @@ module Lithic def self.values end end - - class Filters < Lithic::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Lithic::AuthRules::VelocityLimitParams::Filters, - Lithic::Internal::AnyHash - ) - end - - # ISO-3166-1 alpha-3 Country Codes to exclude from the velocity calculation. - # Transactions matching any of the provided will be excluded from the calculated - # velocity. - sig { returns(T.nilable(T::Array[String])) } - attr_accessor :exclude_countries - - # Merchant Category Codes to exclude from the velocity calculation. Transactions - # matching this MCC will be excluded from the calculated velocity. - sig { returns(T.nilable(T::Array[String])) } - attr_accessor :exclude_mccs - - # ISO-3166-1 alpha-3 Country Codes to include in the velocity calculation. - # Transactions not matching any of the provided will not be included in the - # calculated velocity. - sig { returns(T.nilable(T::Array[String])) } - attr_accessor :include_countries - - # Merchant Category Codes to include in the velocity calculation. Transactions not - # matching this MCC will not be included in the calculated velocity. - sig { returns(T.nilable(T::Array[String])) } - attr_accessor :include_mccs - - # PAN entry modes to include in the velocity calculation. Transactions not - # matching any of the provided will not be included in the calculated velocity. - sig do - returns( - T.nilable( - T::Array[ - Lithic::AuthRules::VelocityLimitParams::Filters::IncludePanEntryMode::OrSymbol - ] - ) - ) - end - attr_accessor :include_pan_entry_modes - - sig do - params( - exclude_countries: T.nilable(T::Array[String]), - exclude_mccs: T.nilable(T::Array[String]), - include_countries: T.nilable(T::Array[String]), - include_mccs: T.nilable(T::Array[String]), - include_pan_entry_modes: - T.nilable( - T::Array[ - Lithic::AuthRules::VelocityLimitParams::Filters::IncludePanEntryMode::OrSymbol - ] - ) - ).returns(T.attached_class) - end - def self.new( - # ISO-3166-1 alpha-3 Country Codes to exclude from the velocity calculation. - # Transactions matching any of the provided will be excluded from the calculated - # velocity. - exclude_countries: nil, - # Merchant Category Codes to exclude from the velocity calculation. Transactions - # matching this MCC will be excluded from the calculated velocity. - exclude_mccs: nil, - # ISO-3166-1 alpha-3 Country Codes to include in the velocity calculation. - # Transactions not matching any of the provided will not be included in the - # calculated velocity. - include_countries: nil, - # Merchant Category Codes to include in the velocity calculation. Transactions not - # matching this MCC will not be included in the calculated velocity. - include_mccs: nil, - # PAN entry modes to include in the velocity calculation. Transactions not - # matching any of the provided will not be included in the calculated velocity. - include_pan_entry_modes: nil - ) - end - - sig do - override.returns( - { - exclude_countries: T.nilable(T::Array[String]), - exclude_mccs: T.nilable(T::Array[String]), - include_countries: T.nilable(T::Array[String]), - include_mccs: T.nilable(T::Array[String]), - include_pan_entry_modes: - T.nilable( - T::Array[ - Lithic::AuthRules::VelocityLimitParams::Filters::IncludePanEntryMode::OrSymbol - ] - ) - } - ) - end - def to_hash - end - - module IncludePanEntryMode - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Lithic::AuthRules::VelocityLimitParams::Filters::IncludePanEntryMode - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - AUTO_ENTRY = - T.let( - :AUTO_ENTRY, - Lithic::AuthRules::VelocityLimitParams::Filters::IncludePanEntryMode::TaggedSymbol - ) - BAR_CODE = - T.let( - :BAR_CODE, - Lithic::AuthRules::VelocityLimitParams::Filters::IncludePanEntryMode::TaggedSymbol - ) - CONTACTLESS = - T.let( - :CONTACTLESS, - Lithic::AuthRules::VelocityLimitParams::Filters::IncludePanEntryMode::TaggedSymbol - ) - CREDENTIAL_ON_FILE = - T.let( - :CREDENTIAL_ON_FILE, - Lithic::AuthRules::VelocityLimitParams::Filters::IncludePanEntryMode::TaggedSymbol - ) - ECOMMERCE = - T.let( - :ECOMMERCE, - Lithic::AuthRules::VelocityLimitParams::Filters::IncludePanEntryMode::TaggedSymbol - ) - ERROR_KEYED = - T.let( - :ERROR_KEYED, - Lithic::AuthRules::VelocityLimitParams::Filters::IncludePanEntryMode::TaggedSymbol - ) - ERROR_MAGNETIC_STRIPE = - T.let( - :ERROR_MAGNETIC_STRIPE, - Lithic::AuthRules::VelocityLimitParams::Filters::IncludePanEntryMode::TaggedSymbol - ) - ICC = - T.let( - :ICC, - Lithic::AuthRules::VelocityLimitParams::Filters::IncludePanEntryMode::TaggedSymbol - ) - KEY_ENTERED = - T.let( - :KEY_ENTERED, - Lithic::AuthRules::VelocityLimitParams::Filters::IncludePanEntryMode::TaggedSymbol - ) - MAGNETIC_STRIPE = - T.let( - :MAGNETIC_STRIPE, - Lithic::AuthRules::VelocityLimitParams::Filters::IncludePanEntryMode::TaggedSymbol - ) - MANUAL = - T.let( - :MANUAL, - Lithic::AuthRules::VelocityLimitParams::Filters::IncludePanEntryMode::TaggedSymbol - ) - OCR = - T.let( - :OCR, - Lithic::AuthRules::VelocityLimitParams::Filters::IncludePanEntryMode::TaggedSymbol - ) - SECURE_CARDLESS = - T.let( - :SECURE_CARDLESS, - Lithic::AuthRules::VelocityLimitParams::Filters::IncludePanEntryMode::TaggedSymbol - ) - UNSPECIFIED = - T.let( - :UNSPECIFIED, - Lithic::AuthRules::VelocityLimitParams::Filters::IncludePanEntryMode::TaggedSymbol - ) - UNKNOWN = - T.let( - :UNKNOWN, - Lithic::AuthRules::VelocityLimitParams::Filters::IncludePanEntryMode::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::AuthRules::VelocityLimitParams::Filters::IncludePanEntryMode::TaggedSymbol - ] - ) - end - def self.values - end - end - end end end end diff --git a/rbi/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rbi b/rbi/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rbi index 38ee1025..476f2037 100644 --- a/rbi/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rbi +++ b/rbi/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rbi @@ -23,26 +23,6 @@ module Lithic sig { returns(Time) } attr_accessor :created - # Contains the metadata for the customer tokenization decision. - sig do - returns( - T.nilable( - Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::CustomerTokenizationDecision - ) - ) - end - attr_reader :customer_tokenization_decision - - sig do - params( - customer_tokenization_decision: - T.nilable( - Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::CustomerTokenizationDecision::OrHash - ) - ).void - end - attr_writer :customer_tokenization_decision - # Contains the metadata for the digital wallet being tokenized. sig { returns(Lithic::TokenMetadata) } attr_reader :digital_wallet_token_metadata @@ -93,13 +73,34 @@ module Lithic end attr_writer :wallet_decisioning_info + # Contains the metadata for the customer tokenization decision. + sig do + returns( + T.nilable( + Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::CustomerTokenizationDecision + ) + ) + end + attr_reader :customer_tokenization_decision + + sig do + params( + customer_tokenization_decision: + T.nilable( + Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::CustomerTokenizationDecision::OrHash + ) + ).void + end + attr_writer :customer_tokenization_decision + sig { returns(T.nilable(Lithic::Device)) } attr_reader :device sig { params(device: Lithic::Device::OrHash).void } attr_writer :device - # Results from rules that were evaluated for this tokenization + # Results from rules that were evaluated for this tokenization. Only populated in + # webhook events, not in the initial decisioning request sig { returns(T.nilable(T::Array[Lithic::TokenizationRuleResult])) } attr_reader :rule_results @@ -110,7 +111,8 @@ module Lithic end attr_writer :rule_results - # List of reasons why the tokenization was declined + # List of reasons why the tokenization was declined. Only populated in webhook + # events, not in the initial decisioning request sig do returns( T.nilable(T::Array[Lithic::TokenizationDeclineReason::TaggedSymbol]) @@ -144,7 +146,8 @@ module Lithic end attr_writer :tokenization_source - # List of reasons why two-factor authentication was required + # List of reasons why two-factor authentication was required. Only populated in + # webhook events, not in the initial decisioning request sig do returns( T.nilable(T::Array[Lithic::TokenizationTfaReason::TaggedSymbol]) @@ -160,15 +163,17 @@ module Lithic end attr_writer :tokenization_tfa_reasons + # Payload for digital wallet tokenization approval requests. Used for both the + # decisioning responder request (sent to the customer's endpoint for a real-time + # decision) and the subsequent webhook event (sent after the decision is made). + # Fields like customer_tokenization_decision, tokenization_decline_reasons, + # tokenization_tfa_reasons, and rule_results are only populated in the webhook + # event, not in the initial decisioning request. sig do params( account_token: String, card_token: String, created: Time, - customer_tokenization_decision: - T.nilable( - Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::CustomerTokenizationDecision::OrHash - ), digital_wallet_token_metadata: Lithic::TokenMetadata::OrHash, event_type: Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::EventType::OrSymbol, @@ -178,6 +183,10 @@ module Lithic Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::TokenizationChannel::OrSymbol, tokenization_token: String, wallet_decisioning_info: Lithic::WalletDecisioningInfo::OrHash, + customer_tokenization_decision: + T.nilable( + Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::CustomerTokenizationDecision::OrHash + ), device: Lithic::Device::OrHash, rule_results: T::Array[Lithic::TokenizationRuleResult::OrHash], tokenization_decline_reasons: @@ -195,8 +204,6 @@ module Lithic card_token:, # Indicate when the request was received from Mastercard or Visa created:, - # Contains the metadata for the customer tokenization decision. - customer_tokenization_decision:, # Contains the metadata for the digital wallet being tokenized. digital_wallet_token_metadata:, # The name of this event @@ -209,14 +216,19 @@ module Lithic # Unique identifier for the digital wallet token attempt tokenization_token:, wallet_decisioning_info:, + # Contains the metadata for the customer tokenization decision. + customer_tokenization_decision: nil, device: nil, - # Results from rules that were evaluated for this tokenization + # Results from rules that were evaluated for this tokenization. Only populated in + # webhook events, not in the initial decisioning request rule_results: nil, - # List of reasons why the tokenization was declined + # List of reasons why the tokenization was declined. Only populated in webhook + # events, not in the initial decisioning request tokenization_decline_reasons: nil, # The source of the tokenization. tokenization_source: nil, - # List of reasons why two-factor authentication was required + # List of reasons why two-factor authentication was required. Only populated in + # webhook events, not in the initial decisioning request tokenization_tfa_reasons: nil ) end @@ -227,10 +239,6 @@ module Lithic account_token: String, card_token: String, created: Time, - customer_tokenization_decision: - T.nilable( - Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::CustomerTokenizationDecision - ), digital_wallet_token_metadata: Lithic::TokenMetadata, event_type: Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::EventType::TaggedSymbol, @@ -240,6 +248,10 @@ module Lithic Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::TokenizationChannel::TaggedSymbol, tokenization_token: String, wallet_decisioning_info: Lithic::WalletDecisioningInfo, + customer_tokenization_decision: + T.nilable( + Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::CustomerTokenizationDecision + ), device: Lithic::Device, rule_results: T::Array[Lithic::TokenizationRuleResult], tokenization_decline_reasons: @@ -254,6 +266,112 @@ module Lithic def to_hash end + # The name of this event + module EventType + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::EventType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = + T.let( + :"digital_wallet.tokenization_approval_request", + Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::EventType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::EventType::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Whether Lithic decisioned on the token, and if so, what the decision was. + # APPROVED/VERIFICATION_REQUIRED/DENIED. + module IssuerDecision + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::IssuerDecision + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + APPROVED = + T.let( + :APPROVED, + Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::IssuerDecision::TaggedSymbol + ) + DENIED = + T.let( + :DENIED, + Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::IssuerDecision::TaggedSymbol + ) + VERIFICATION_REQUIRED = + T.let( + :VERIFICATION_REQUIRED, + Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::IssuerDecision::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::IssuerDecision::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The channel through which the tokenization was made. + module TokenizationChannel + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::TokenizationChannel + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + DIGITAL_WALLET = + T.let( + :DIGITAL_WALLET, + Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::TokenizationChannel::TaggedSymbol + ) + MERCHANT = + T.let( + :MERCHANT, + Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::TokenizationChannel::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::TokenizationChannel::TaggedSymbol + ] + ) + end + def self.values + end + end + class CustomerTokenizationDecision < Lithic::Internal::Type::BaseModel OrHash = T.type_alias do @@ -381,112 +499,6 @@ module Lithic end end - # The name of this event - module EventType - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::EventType - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = - T.let( - :"digital_wallet.tokenization_approval_request", - Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::EventType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::EventType::TaggedSymbol - ] - ) - end - def self.values - end - end - - # Whether Lithic decisioned on the token, and if so, what the decision was. - # APPROVED/VERIFICATION_REQUIRED/DENIED. - module IssuerDecision - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::IssuerDecision - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - APPROVED = - T.let( - :APPROVED, - Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::IssuerDecision::TaggedSymbol - ) - DENIED = - T.let( - :DENIED, - Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::IssuerDecision::TaggedSymbol - ) - VERIFICATION_REQUIRED = - T.let( - :VERIFICATION_REQUIRED, - Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::IssuerDecision::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::IssuerDecision::TaggedSymbol - ] - ) - end - def self.values - end - end - - # The channel through which the tokenization was made. - module TokenizationChannel - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::TokenizationChannel - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - DIGITAL_WALLET = - T.let( - :DIGITAL_WALLET, - Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::TokenizationChannel::TaggedSymbol - ) - MERCHANT = - T.let( - :MERCHANT, - Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::TokenizationChannel::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::TokenizationChannel::TaggedSymbol - ] - ) - end - def self.values - end - end - # The source of the tokenization. module TokenizationSource extend Lithic::Internal::Type::Enum diff --git a/rbi/lithic/models/dispute_create_params.rbi b/rbi/lithic/models/dispute_create_params.rbi index 8d8f88f9..24a4a0e8 100644 --- a/rbi/lithic/models/dispute_create_params.rbi +++ b/rbi/lithic/models/dispute_create_params.rbi @@ -11,26 +11,26 @@ module Lithic T.any(Lithic::DisputeCreateParams, Lithic::Internal::AnyHash) end - # Amount to dispute + # Amount for chargeback sig { returns(Integer) } attr_accessor :amount - # Reason for dispute + # Reason for chargeback sig { returns(Lithic::DisputeCreateParams::Reason::OrSymbol) } attr_accessor :reason - # Transaction to dispute + # Transaction for chargeback sig { returns(String) } attr_accessor :transaction_token - # Date the customer filed the dispute + # Date the customer filed the chargeback request sig { returns(T.nilable(Time)) } attr_reader :customer_filed_date sig { params(customer_filed_date: Time).void } attr_writer :customer_filed_date - # Customer description of dispute + # Customer description sig { returns(T.nilable(String)) } attr_reader :customer_note @@ -48,15 +48,15 @@ module Lithic ).returns(T.attached_class) end def self.new( - # Amount to dispute + # Amount for chargeback amount:, - # Reason for dispute + # Reason for chargeback reason:, - # Transaction to dispute + # Transaction for chargeback transaction_token:, - # Date the customer filed the dispute + # Date the customer filed the chargeback request customer_filed_date: nil, - # Customer description of dispute + # Customer description customer_note: nil, request_options: {} ) @@ -77,7 +77,7 @@ module Lithic def to_hash end - # Reason for dispute + # Reason for chargeback module Reason extend Lithic::Internal::Type::Enum diff --git a/rbi/lithic/models/dispute_list_params.rbi b/rbi/lithic/models/dispute_list_params.rbi index f32dbfa8..eb26ccdb 100644 --- a/rbi/lithic/models/dispute_list_params.rbi +++ b/rbi/lithic/models/dispute_list_params.rbi @@ -50,7 +50,7 @@ module Lithic sig { params(starting_after: String).void } attr_writer :starting_after - # List disputes of a specific status. + # Filter by status. sig { returns(T.nilable(Lithic::DisputeListParams::Status::OrSymbol)) } attr_reader :status @@ -91,7 +91,7 @@ module Lithic # A cursor representing an item's token after which a page of results should # begin. Used to retrieve the next page of results after this item. starting_after: nil, - # List disputes of a specific status. + # Filter by status. status: nil, # Transaction tokens to filter by. transaction_tokens: nil, @@ -116,7 +116,7 @@ module Lithic def to_hash end - # List disputes of a specific status. + # Filter by status. module Status extend Lithic::Internal::Type::Enum diff --git a/rbi/lithic/models/dispute_update_params.rbi b/rbi/lithic/models/dispute_update_params.rbi index 80c7d481..680474fe 100644 --- a/rbi/lithic/models/dispute_update_params.rbi +++ b/rbi/lithic/models/dispute_update_params.rbi @@ -14,28 +14,28 @@ module Lithic sig { returns(String) } attr_accessor :dispute_token - # Amount to dispute + # Amount for chargeback sig { returns(T.nilable(Integer)) } attr_reader :amount sig { params(amount: Integer).void } attr_writer :amount - # Date the customer filed the dispute + # Date the customer filed the chargeback request sig { returns(T.nilable(Time)) } attr_reader :customer_filed_date sig { params(customer_filed_date: Time).void } attr_writer :customer_filed_date - # Customer description of dispute + # Customer description sig { returns(T.nilable(String)) } attr_reader :customer_note sig { params(customer_note: String).void } attr_writer :customer_note - # Reason for dispute + # Reason for chargeback sig { returns(T.nilable(Lithic::DisputeUpdateParams::Reason::OrSymbol)) } attr_reader :reason @@ -54,13 +54,13 @@ module Lithic end def self.new( dispute_token:, - # Amount to dispute + # Amount for chargeback amount: nil, - # Date the customer filed the dispute + # Date the customer filed the chargeback request customer_filed_date: nil, - # Customer description of dispute + # Customer description customer_note: nil, - # Reason for dispute + # Reason for chargeback reason: nil, request_options: {} ) @@ -81,7 +81,7 @@ module Lithic def to_hash end - # Reason for dispute + # Reason for chargeback module Reason extend Lithic::Internal::Type::Enum diff --git a/rbi/lithic/models/event.rbi b/rbi/lithic/models/event.rbi index 6cd21bd3..9185a613 100644 --- a/rbi/lithic/models/event.rbi +++ b/rbi/lithic/models/event.rbi @@ -41,9 +41,6 @@ module Lithic # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. # - card.updated: Occurs when a card is updated. - # - digital_wallet.tokenization_approval_request: Occurs when a tokenization - # approval request is made. This event will be deprecated in the future. We - # recommend using `tokenization.approval_request` instead. # - digital_wallet.tokenization_result: Occurs when a tokenization request # succeeded or failed. # @@ -164,9 +161,6 @@ module Lithic # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. # - card.updated: Occurs when a card is updated. - # - digital_wallet.tokenization_approval_request: Occurs when a tokenization - # approval request is made. This event will be deprecated in the future. We - # recommend using `tokenization.approval_request` instead. # - digital_wallet.tokenization_result: Occurs when a tokenization request # succeeded or failed. # @@ -283,9 +277,6 @@ module Lithic # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. # - card.updated: Occurs when a card is updated. - # - digital_wallet.tokenization_approval_request: Occurs when a tokenization - # approval request is made. This event will be deprecated in the future. We - # recommend using `tokenization.approval_request` instead. # - digital_wallet.tokenization_result: Occurs when a tokenization request # succeeded or failed. # @@ -428,11 +419,6 @@ module Lithic T.let(:"card.shipped", Lithic::Event::EventType::TaggedSymbol) CARD_UPDATED = T.let(:"card.updated", Lithic::Event::EventType::TaggedSymbol) - DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = - T.let( - :"digital_wallet.tokenization_approval_request", - Lithic::Event::EventType::TaggedSymbol - ) DIGITAL_WALLET_TOKENIZATION_RESULT = T.let( :"digital_wallet.tokenization_result", diff --git a/rbi/lithic/models/event_list_params.rbi b/rbi/lithic/models/event_list_params.rbi index e64d0e7e..40512743 100644 --- a/rbi/lithic/models/event_list_params.rbi +++ b/rbi/lithic/models/event_list_params.rbi @@ -150,9 +150,6 @@ module Lithic # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. # - card.updated: Occurs when a card is updated. - # - digital_wallet.tokenization_approval_request: Occurs when a tokenization - # approval request is made. This event will be deprecated in the future. We - # recommend using `tokenization.approval_request` instead. # - digital_wallet.tokenization_result: Occurs when a tokenization request # succeeded or failed. # @@ -317,11 +314,6 @@ module Lithic :"card.updated", Lithic::EventListParams::EventType::TaggedSymbol ) - DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = - T.let( - :"digital_wallet.tokenization_approval_request", - Lithic::EventListParams::EventType::TaggedSymbol - ) DIGITAL_WALLET_TOKENIZATION_RESULT = T.let( :"digital_wallet.tokenization_result", diff --git a/rbi/lithic/models/event_subscription.rbi b/rbi/lithic/models/event_subscription.rbi index 3a80e8bb..4dddc57e 100644 --- a/rbi/lithic/models/event_subscription.rbi +++ b/rbi/lithic/models/event_subscription.rbi @@ -98,9 +98,6 @@ module Lithic # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. # - card.updated: Occurs when a card is updated. - # - digital_wallet.tokenization_approval_request: Occurs when a tokenization - # approval request is made. This event will be deprecated in the future. We - # recommend using `tokenization.approval_request` instead. # - digital_wallet.tokenization_result: Occurs when a tokenization request # succeeded or failed. # @@ -265,11 +262,6 @@ module Lithic :"card.updated", Lithic::EventSubscription::EventType::TaggedSymbol ) - DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = - T.let( - :"digital_wallet.tokenization_approval_request", - Lithic::EventSubscription::EventType::TaggedSymbol - ) DIGITAL_WALLET_TOKENIZATION_RESULT = T.let( :"digital_wallet.tokenization_result", diff --git a/rbi/lithic/models/events/subscription_create_params.rbi b/rbi/lithic/models/events/subscription_create_params.rbi index 3ba86daa..5bc4db9c 100644 --- a/rbi/lithic/models/events/subscription_create_params.rbi +++ b/rbi/lithic/models/events/subscription_create_params.rbi @@ -125,9 +125,6 @@ module Lithic # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. # - card.updated: Occurs when a card is updated. - # - digital_wallet.tokenization_approval_request: Occurs when a tokenization - # approval request is made. This event will be deprecated in the future. We - # recommend using `tokenization.approval_request` instead. # - digital_wallet.tokenization_result: Occurs when a tokenization request # succeeded or failed. # @@ -294,11 +291,6 @@ module Lithic :"card.updated", Lithic::Events::SubscriptionCreateParams::EventType::TaggedSymbol ) - DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = - T.let( - :"digital_wallet.tokenization_approval_request", - Lithic::Events::SubscriptionCreateParams::EventType::TaggedSymbol - ) DIGITAL_WALLET_TOKENIZATION_RESULT = T.let( :"digital_wallet.tokenization_result", diff --git a/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi b/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi index 2331e07a..6bd52287 100644 --- a/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +++ b/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi @@ -163,11 +163,6 @@ module Lithic :"card.updated", Lithic::Events::SubscriptionSendSimulatedExampleParams::EventType::TaggedSymbol ) - DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = - T.let( - :"digital_wallet.tokenization_approval_request", - Lithic::Events::SubscriptionSendSimulatedExampleParams::EventType::TaggedSymbol - ) DIGITAL_WALLET_TOKENIZATION_RESULT = T.let( :"digital_wallet.tokenization_result", diff --git a/rbi/lithic/models/events/subscription_update_params.rbi b/rbi/lithic/models/events/subscription_update_params.rbi index 5bcae1ee..13edc386 100644 --- a/rbi/lithic/models/events/subscription_update_params.rbi +++ b/rbi/lithic/models/events/subscription_update_params.rbi @@ -131,9 +131,6 @@ module Lithic # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. # - card.updated: Occurs when a card is updated. - # - digital_wallet.tokenization_approval_request: Occurs when a tokenization - # approval request is made. This event will be deprecated in the future. We - # recommend using `tokenization.approval_request` instead. # - digital_wallet.tokenization_result: Occurs when a tokenization request # succeeded or failed. # @@ -300,11 +297,6 @@ module Lithic :"card.updated", Lithic::Events::SubscriptionUpdateParams::EventType::TaggedSymbol ) - DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = - T.let( - :"digital_wallet.tokenization_approval_request", - Lithic::Events::SubscriptionUpdateParams::EventType::TaggedSymbol - ) DIGITAL_WALLET_TOKENIZATION_RESULT = T.let( :"digital_wallet.tokenization_result", diff --git a/rbi/lithic/models/financial_account.rbi b/rbi/lithic/models/financial_account.rbi index 2b6211dd..ded0e243 100644 --- a/rbi/lithic/models/financial_account.rbi +++ b/rbi/lithic/models/financial_account.rbi @@ -344,6 +344,11 @@ module Lithic :PROGRAM_BANK_ACCOUNTS_PAYABLE, Lithic::FinancialAccount::Type::TaggedSymbol ) + EARLY_DIRECT_DEPOSIT_FLOAT = + T.let( + :EARLY_DIRECT_DEPOSIT_FLOAT, + Lithic::FinancialAccount::Type::TaggedSymbol + ) sig do override.returns( diff --git a/rbi/lithic/models/financial_account_list_params.rbi b/rbi/lithic/models/financial_account_list_params.rbi index 3171b7e3..cdd7b3af 100644 --- a/rbi/lithic/models/financial_account_list_params.rbi +++ b/rbi/lithic/models/financial_account_list_params.rbi @@ -98,6 +98,11 @@ module Lithic :SECURITY, Lithic::FinancialAccountListParams::Type::TaggedSymbol ) + EARLY_DIRECT_DEPOSIT_FLOAT = + T.let( + :EARLY_DIRECT_DEPOSIT_FLOAT, + Lithic::FinancialAccountListParams::Type::TaggedSymbol + ) sig do override.returns( diff --git a/rbi/lithic/models/financial_accounts/interest_tier_schedule.rbi b/rbi/lithic/models/financial_accounts/interest_tier_schedule.rbi index f9c3d742..59ec251c 100644 --- a/rbi/lithic/models/financial_accounts/interest_tier_schedule.rbi +++ b/rbi/lithic/models/financial_accounts/interest_tier_schedule.rbi @@ -20,6 +20,13 @@ module Lithic sig { returns(Date) } attr_accessor :effective_date + # Custom rates per category for penalties + sig { returns(T.nilable(T.anything)) } + attr_reader :penalty_rates + + sig { params(penalty_rates: T.anything).void } + attr_writer :penalty_rates + # Name of a tier contained in the credit product. Mutually exclusive with # tier_rates sig { returns(T.nilable(String)) } @@ -40,6 +47,7 @@ module Lithic params( credit_product_token: String, effective_date: Date, + penalty_rates: T.anything, tier_name: String, tier_rates: T.anything ).returns(T.attached_class) @@ -49,6 +57,8 @@ module Lithic credit_product_token:, # Date the tier should be effective in YYYY-MM-DD format effective_date:, + # Custom rates per category for penalties + penalty_rates: nil, # Name of a tier contained in the credit product. Mutually exclusive with # tier_rates tier_name: nil, @@ -62,6 +72,7 @@ module Lithic { credit_product_token: String, effective_date: Date, + penalty_rates: T.anything, tier_name: String, tier_rates: T.anything } diff --git a/rbi/lithic/models/financial_accounts/interest_tier_schedule_update_params.rbi b/rbi/lithic/models/financial_accounts/interest_tier_schedule_update_params.rbi index 9e34149c..392f731d 100644 --- a/rbi/lithic/models/financial_accounts/interest_tier_schedule_update_params.rbi +++ b/rbi/lithic/models/financial_accounts/interest_tier_schedule_update_params.rbi @@ -21,6 +21,13 @@ module Lithic sig { returns(Date) } attr_accessor :effective_date + # Custom rates per category for penalties + sig { returns(T.nilable(T.anything)) } + attr_reader :penalty_rates + + sig { params(penalty_rates: T.anything).void } + attr_writer :penalty_rates + # Name of a tier contained in the credit product. Mutually exclusive with # tier_rates sig { returns(T.nilable(String)) } @@ -40,6 +47,7 @@ module Lithic params( financial_account_token: String, effective_date: Date, + penalty_rates: T.anything, tier_name: String, tier_rates: T.anything, request_options: Lithic::RequestOptions::OrHash @@ -48,6 +56,8 @@ module Lithic def self.new( financial_account_token:, effective_date:, + # Custom rates per category for penalties + penalty_rates: nil, # Name of a tier contained in the credit product. Mutually exclusive with # tier_rates tier_name: nil, @@ -62,6 +72,7 @@ module Lithic { financial_account_token: String, effective_date: Date, + penalty_rates: T.anything, tier_name: String, tier_rates: T.anything, request_options: Lithic::RequestOptions diff --git a/rbi/lithic/models/financial_accounts/statements/statement_line_items.rbi b/rbi/lithic/models/financial_accounts/statements/statement_line_items.rbi index 424bd79b..353ed223 100644 --- a/rbi/lithic/models/financial_accounts/statements/statement_line_items.rbi +++ b/rbi/lithic/models/financial_accounts/statements/statement_line_items.rbi @@ -70,6 +70,9 @@ module Lithic sig { returns(Integer) } attr_accessor :amount + # Note: Inbound wire transfers are coming soon (availability varies by partner + # bank). The WIRE category is a preview. To learn more, contact your customer + # success manager. sig do returns( Lithic::FinancialAccounts::Statements::StatementLineItems::Data::Category::TaggedSymbol @@ -122,6 +125,14 @@ module Lithic sig { params(descriptor: String).void } attr_writer :descriptor + # Subtype of the event that generated the line items + sig { returns(T.nilable(String)) } + attr_accessor :event_subtype + + # Date of the loan tape that generated this line item + sig { returns(T.nilable(Date)) } + attr_accessor :loan_tape_date + sig do params( token: String, @@ -137,7 +148,9 @@ module Lithic financial_transaction_event_token: String, financial_transaction_token: String, card_token: String, - descriptor: String + descriptor: String, + event_subtype: T.nilable(String), + loan_tape_date: T.nilable(Date) ).returns(T.attached_class) end def self.new( @@ -145,6 +158,9 @@ module Lithic token:, # Transaction amount in cents amount:, + # Note: Inbound wire transfers are coming soon (availability varies by partner + # bank). The WIRE category is a preview. To learn more, contact your customer + # success manager. category:, # Timestamp of when the line item was generated created:, @@ -162,7 +178,11 @@ module Lithic financial_transaction_token:, # Globally unique identifier for a card card_token: nil, - descriptor: nil + descriptor: nil, + # Subtype of the event that generated the line items + event_subtype: nil, + # Date of the loan tape that generated this line item + loan_tape_date: nil ) end @@ -182,13 +202,18 @@ module Lithic financial_transaction_event_token: String, financial_transaction_token: String, card_token: String, - descriptor: String + descriptor: String, + event_subtype: T.nilable(String), + loan_tape_date: T.nilable(Date) } ) end def to_hash end + # Note: Inbound wire transfers are coming soon (availability varies by partner + # bank). The WIRE category is a preview. To learn more, contact your customer + # success manager. module Category extend Lithic::Internal::Type::Enum @@ -206,6 +231,11 @@ module Lithic :ACH, Lithic::FinancialAccounts::Statements::StatementLineItems::Data::Category::TaggedSymbol ) + WIRE = + T.let( + :WIRE, + Lithic::FinancialAccounts::Statements::StatementLineItems::Data::Category::TaggedSymbol + ) BALANCE_OR_FUNDING = T.let( :BALANCE_OR_FUNDING, @@ -296,6 +326,11 @@ module Lithic :MANAGEMENT_DISBURSEMENT, Lithic::FinancialAccounts::Statements::StatementLineItems::Data::Category::TaggedSymbol ) + HOLD = + T.let( + :HOLD, + Lithic::FinancialAccounts::Statements::StatementLineItems::Data::Category::TaggedSymbol + ) PROGRAM_FUNDING = T.let( :PROGRAM_FUNDING, diff --git a/rbi/lithic/models/hold.rbi b/rbi/lithic/models/hold.rbi new file mode 100644 index 00000000..0a00f0ae --- /dev/null +++ b/rbi/lithic/models/hold.rbi @@ -0,0 +1,183 @@ +# typed: strong + +module Lithic + module Models + class Hold < Lithic::Internal::Type::BaseModel + OrHash = T.type_alias { T.any(Lithic::Hold, Lithic::Internal::AnyHash) } + + # Unique identifier for the transaction + sig { returns(String) } + attr_accessor :token + + # ISO 8601 timestamp of when the transaction was created + sig { returns(Time) } + attr_accessor :created + + # Status of a hold transaction + sig { returns(Lithic::Hold::Status::TaggedSymbol) } + attr_accessor :status + + # ISO 8601 timestamp of when the transaction was last updated + sig { returns(Time) } + attr_accessor :updated + + sig { returns(T.nilable(String)) } + attr_reader :currency + + sig { params(currency: String).void } + attr_writer :currency + + sig { returns(T.nilable(T::Array[Lithic::HoldEvent])) } + attr_reader :events + + sig { params(events: T::Array[Lithic::HoldEvent::OrHash]).void } + attr_writer :events + + # When the hold will auto-expire if not resolved + sig { returns(T.nilable(Time)) } + attr_accessor :expiration_datetime + + # HOLD - Hold Transaction + sig { returns(T.nilable(Lithic::Hold::Family::TaggedSymbol)) } + attr_reader :family + + sig { params(family: Lithic::Hold::Family::OrSymbol).void } + attr_writer :family + + sig { returns(T.nilable(String)) } + attr_reader :financial_account_token + + sig { params(financial_account_token: String).void } + attr_writer :financial_account_token + + # Current pending amount (0 when resolved) + sig { returns(T.nilable(Integer)) } + attr_reader :pending_amount + + sig { params(pending_amount: Integer).void } + attr_writer :pending_amount + + sig { returns(T.nilable(Lithic::Hold::Result::TaggedSymbol)) } + attr_reader :result + + sig { params(result: Lithic::Hold::Result::OrSymbol).void } + attr_writer :result + + sig { returns(T.nilable(String)) } + attr_accessor :user_defined_id + + # A hold transaction representing reserved funds on a financial account. Holds + # move funds from available to pending balance in anticipation of future payments. + # They can be resolved via settlement (linked to payment), manual release, or + # expiration. + sig do + params( + token: String, + created: Time, + status: Lithic::Hold::Status::OrSymbol, + updated: Time, + currency: String, + events: T::Array[Lithic::HoldEvent::OrHash], + expiration_datetime: T.nilable(Time), + family: Lithic::Hold::Family::OrSymbol, + financial_account_token: String, + pending_amount: Integer, + result: Lithic::Hold::Result::OrSymbol, + user_defined_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Unique identifier for the transaction + token:, + # ISO 8601 timestamp of when the transaction was created + created:, + # Status of a hold transaction + status:, + # ISO 8601 timestamp of when the transaction was last updated + updated:, + currency: nil, + events: nil, + # When the hold will auto-expire if not resolved + expiration_datetime: nil, + # HOLD - Hold Transaction + family: nil, + financial_account_token: nil, + # Current pending amount (0 when resolved) + pending_amount: nil, + result: nil, + user_defined_id: nil + ) + end + + sig do + override.returns( + { + token: String, + created: Time, + status: Lithic::Hold::Status::TaggedSymbol, + updated: Time, + currency: String, + events: T::Array[Lithic::HoldEvent], + expiration_datetime: T.nilable(Time), + family: Lithic::Hold::Family::TaggedSymbol, + financial_account_token: String, + pending_amount: Integer, + result: Lithic::Hold::Result::TaggedSymbol, + user_defined_id: T.nilable(String) + } + ) + end + def to_hash + end + + # Status of a hold transaction + module Status + extend Lithic::Internal::Type::Enum + + TaggedSymbol = T.type_alias { T.all(Symbol, Lithic::Hold::Status) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PENDING = T.let(:PENDING, Lithic::Hold::Status::TaggedSymbol) + SETTLED = T.let(:SETTLED, Lithic::Hold::Status::TaggedSymbol) + EXPIRED = T.let(:EXPIRED, Lithic::Hold::Status::TaggedSymbol) + VOIDED = T.let(:VOIDED, Lithic::Hold::Status::TaggedSymbol) + DECLINED = T.let(:DECLINED, Lithic::Hold::Status::TaggedSymbol) + REVERSED = T.let(:REVERSED, Lithic::Hold::Status::TaggedSymbol) + CANCELED = T.let(:CANCELED, Lithic::Hold::Status::TaggedSymbol) + RETURNED = T.let(:RETURNED, Lithic::Hold::Status::TaggedSymbol) + + sig { override.returns(T::Array[Lithic::Hold::Status::TaggedSymbol]) } + def self.values + end + end + + # HOLD - Hold Transaction + module Family + extend Lithic::Internal::Type::Enum + + TaggedSymbol = T.type_alias { T.all(Symbol, Lithic::Hold::Family) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + HOLD = T.let(:HOLD, Lithic::Hold::Family::TaggedSymbol) + + sig { override.returns(T::Array[Lithic::Hold::Family::TaggedSymbol]) } + def self.values + end + end + + module Result + extend Lithic::Internal::Type::Enum + + TaggedSymbol = T.type_alias { T.all(Symbol, Lithic::Hold::Result) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + APPROVED = T.let(:APPROVED, Lithic::Hold::Result::TaggedSymbol) + DECLINED = T.let(:DECLINED, Lithic::Hold::Result::TaggedSymbol) + + sig { override.returns(T::Array[Lithic::Hold::Result::TaggedSymbol]) } + def self.values + end + end + end + end +end diff --git a/rbi/lithic/models/hold_create_params.rbi b/rbi/lithic/models/hold_create_params.rbi new file mode 100644 index 00000000..4a1c6ba4 --- /dev/null +++ b/rbi/lithic/models/hold_create_params.rbi @@ -0,0 +1,90 @@ +# typed: strong + +module Lithic + module Models + class HoldCreateParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(Lithic::HoldCreateParams, Lithic::Internal::AnyHash) + end + + sig { returns(String) } + attr_accessor :financial_account_token + + # Amount to hold in cents + sig { returns(Integer) } + attr_accessor :amount + + # Customer-provided token for idempotency. Becomes the hold token. + sig { returns(T.nilable(String)) } + attr_reader :token + + sig { params(token: String).void } + attr_writer :token + + # When the hold should auto-expire + sig { returns(T.nilable(Time)) } + attr_reader :expiration_datetime + + sig { params(expiration_datetime: Time).void } + attr_writer :expiration_datetime + + # Reason for the hold + sig { returns(T.nilable(String)) } + attr_accessor :memo + + # User-provided identifier for the hold + sig { returns(T.nilable(String)) } + attr_reader :user_defined_id + + sig { params(user_defined_id: String).void } + attr_writer :user_defined_id + + sig do + params( + financial_account_token: String, + amount: Integer, + token: String, + expiration_datetime: Time, + memo: T.nilable(String), + user_defined_id: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + financial_account_token:, + # Amount to hold in cents + amount:, + # Customer-provided token for idempotency. Becomes the hold token. + token: nil, + # When the hold should auto-expire + expiration_datetime: nil, + # Reason for the hold + memo: nil, + # User-provided identifier for the hold + user_defined_id: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + financial_account_token: String, + amount: Integer, + token: String, + expiration_datetime: Time, + memo: T.nilable(String), + user_defined_id: String, + request_options: Lithic::RequestOptions + } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/lithic/models/hold_event.rbi b/rbi/lithic/models/hold_event.rbi new file mode 100644 index 00000000..326279d2 --- /dev/null +++ b/rbi/lithic/models/hold_event.rbi @@ -0,0 +1,148 @@ +# typed: strong + +module Lithic + module Models + class HoldEvent < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias { T.any(Lithic::HoldEvent, Lithic::Internal::AnyHash) } + + sig { returns(String) } + attr_accessor :token + + # Amount in cents + sig { returns(Integer) } + attr_accessor :amount + + sig { returns(Time) } + attr_accessor :created + + sig { returns(T::Array[Lithic::HoldEvent::DetailedResult::TaggedSymbol]) } + attr_accessor :detailed_results + + sig { returns(T.nilable(String)) } + attr_accessor :memo + + sig { returns(Lithic::HoldEvent::Result::TaggedSymbol) } + attr_accessor :result + + # Transaction token of the payment that settled this hold (only populated for + # HOLD_SETTLED events) + sig { returns(T.nilable(String)) } + attr_accessor :settling_transaction_token + + # Type of hold lifecycle event + sig { returns(Lithic::HoldEvent::Type::TaggedSymbol) } + attr_accessor :type + + # Event representing a lifecycle change to a hold + sig do + params( + token: String, + amount: Integer, + created: Time, + detailed_results: + T::Array[Lithic::HoldEvent::DetailedResult::OrSymbol], + memo: T.nilable(String), + result: Lithic::HoldEvent::Result::OrSymbol, + settling_transaction_token: T.nilable(String), + type: Lithic::HoldEvent::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new( + token:, + # Amount in cents + amount:, + created:, + detailed_results:, + memo:, + result:, + # Transaction token of the payment that settled this hold (only populated for + # HOLD_SETTLED events) + settling_transaction_token:, + # Type of hold lifecycle event + type: + ) + end + + sig do + override.returns( + { + token: String, + amount: Integer, + created: Time, + detailed_results: + T::Array[Lithic::HoldEvent::DetailedResult::TaggedSymbol], + memo: T.nilable(String), + result: Lithic::HoldEvent::Result::TaggedSymbol, + settling_transaction_token: T.nilable(String), + type: Lithic::HoldEvent::Type::TaggedSymbol + } + ) + end + def to_hash + end + + module DetailedResult + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, Lithic::HoldEvent::DetailedResult) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + APPROVED = + T.let(:APPROVED, Lithic::HoldEvent::DetailedResult::TaggedSymbol) + INSUFFICIENT_FUNDS = + T.let( + :INSUFFICIENT_FUNDS, + Lithic::HoldEvent::DetailedResult::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Lithic::HoldEvent::DetailedResult::TaggedSymbol] + ) + end + def self.values + end + end + + module Result + extend Lithic::Internal::Type::Enum + + TaggedSymbol = T.type_alias { T.all(Symbol, Lithic::HoldEvent::Result) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + APPROVED = T.let(:APPROVED, Lithic::HoldEvent::Result::TaggedSymbol) + DECLINED = T.let(:DECLINED, Lithic::HoldEvent::Result::TaggedSymbol) + + sig do + override.returns(T::Array[Lithic::HoldEvent::Result::TaggedSymbol]) + end + def self.values + end + end + + # Type of hold lifecycle event + module Type + extend Lithic::Internal::Type::Enum + + TaggedSymbol = T.type_alias { T.all(Symbol, Lithic::HoldEvent::Type) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + HOLD_INITIATED = + T.let(:HOLD_INITIATED, Lithic::HoldEvent::Type::TaggedSymbol) + HOLD_VOIDED = T.let(:HOLD_VOIDED, Lithic::HoldEvent::Type::TaggedSymbol) + HOLD_EXPIRED = + T.let(:HOLD_EXPIRED, Lithic::HoldEvent::Type::TaggedSymbol) + HOLD_SETTLED = + T.let(:HOLD_SETTLED, Lithic::HoldEvent::Type::TaggedSymbol) + + sig do + override.returns(T::Array[Lithic::HoldEvent::Type::TaggedSymbol]) + end + def self.values + end + end + end + end +end diff --git a/rbi/lithic/models/hold_list_params.rbi b/rbi/lithic/models/hold_list_params.rbi new file mode 100644 index 00000000..a4ef08ae --- /dev/null +++ b/rbi/lithic/models/hold_list_params.rbi @@ -0,0 +1,137 @@ +# typed: strong + +module Lithic + module Models + class HoldListParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(Lithic::HoldListParams, Lithic::Internal::AnyHash) + end + + sig { returns(String) } + attr_accessor :financial_account_token + + # Date string in RFC 3339 format. Only entries created after the specified time + # will be included. UTC time zone. + sig { returns(T.nilable(Time)) } + attr_reader :begin_ + + sig { params(begin_: Time).void } + attr_writer :begin_ + + # Date string in RFC 3339 format. Only entries created before the specified time + # will be included. UTC time zone. + sig { returns(T.nilable(Time)) } + attr_reader :end_ + + sig { params(end_: Time).void } + attr_writer :end_ + + # A cursor representing an item's token before which a page of results should end. + # Used to retrieve the previous page of results before this item. + sig { returns(T.nilable(String)) } + attr_reader :ending_before + + sig { params(ending_before: String).void } + attr_writer :ending_before + + # Page size (for pagination). + sig { returns(T.nilable(Integer)) } + attr_reader :page_size + + sig { params(page_size: Integer).void } + attr_writer :page_size + + # A cursor representing an item's token after which a page of results should + # begin. Used to retrieve the next page of results after this item. + sig { returns(T.nilable(String)) } + attr_reader :starting_after + + sig { params(starting_after: String).void } + attr_writer :starting_after + + # Hold status to filter by. + sig { returns(T.nilable(Lithic::HoldListParams::Status::OrSymbol)) } + attr_reader :status + + sig { params(status: Lithic::HoldListParams::Status::OrSymbol).void } + attr_writer :status + + sig do + params( + financial_account_token: String, + begin_: Time, + end_: Time, + ending_before: String, + page_size: Integer, + starting_after: String, + status: Lithic::HoldListParams::Status::OrSymbol, + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + financial_account_token:, + # Date string in RFC 3339 format. Only entries created after the specified time + # will be included. UTC time zone. + begin_: nil, + # Date string in RFC 3339 format. Only entries created before the specified time + # will be included. UTC time zone. + end_: nil, + # A cursor representing an item's token before which a page of results should end. + # Used to retrieve the previous page of results before this item. + ending_before: nil, + # Page size (for pagination). + page_size: nil, + # A cursor representing an item's token after which a page of results should + # begin. Used to retrieve the next page of results after this item. + starting_after: nil, + # Hold status to filter by. + status: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + financial_account_token: String, + begin_: Time, + end_: Time, + ending_before: String, + page_size: Integer, + starting_after: String, + status: Lithic::HoldListParams::Status::OrSymbol, + request_options: Lithic::RequestOptions + } + ) + end + def to_hash + end + + # Hold status to filter by. + module Status + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, Lithic::HoldListParams::Status) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PENDING = T.let(:PENDING, Lithic::HoldListParams::Status::TaggedSymbol) + SETTLED = T.let(:SETTLED, Lithic::HoldListParams::Status::TaggedSymbol) + EXPIRED = T.let(:EXPIRED, Lithic::HoldListParams::Status::TaggedSymbol) + VOIDED = T.let(:VOIDED, Lithic::HoldListParams::Status::TaggedSymbol) + + sig do + override.returns( + T::Array[Lithic::HoldListParams::Status::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/lithic/models/hold_retrieve_params.rbi b/rbi/lithic/models/hold_retrieve_params.rbi new file mode 100644 index 00000000..5f71341b --- /dev/null +++ b/rbi/lithic/models/hold_retrieve_params.rbi @@ -0,0 +1,35 @@ +# typed: strong + +module Lithic + module Models + class HoldRetrieveParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(Lithic::HoldRetrieveParams, Lithic::Internal::AnyHash) + end + + sig { returns(String) } + attr_accessor :hold_token + + sig do + params( + hold_token: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(hold_token:, request_options: {}) + end + + sig do + override.returns( + { hold_token: String, request_options: Lithic::RequestOptions } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/lithic/models/hold_void_params.rbi b/rbi/lithic/models/hold_void_params.rbi new file mode 100644 index 00000000..6a7d0f6a --- /dev/null +++ b/rbi/lithic/models/hold_void_params.rbi @@ -0,0 +1,49 @@ +# typed: strong + +module Lithic + module Models + class HoldVoidParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(Lithic::HoldVoidParams, Lithic::Internal::AnyHash) + end + + sig { returns(String) } + attr_accessor :hold_token + + # Reason for voiding the hold + sig { returns(T.nilable(String)) } + attr_accessor :memo + + sig do + params( + hold_token: String, + memo: T.nilable(String), + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + hold_token:, + # Reason for voiding the hold + memo: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + hold_token: String, + memo: T.nilable(String), + request_options: Lithic::RequestOptions + } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/lithic/models/instance_financial_account_type.rbi b/rbi/lithic/models/instance_financial_account_type.rbi index b79ccf95..ca5a748d 100644 --- a/rbi/lithic/models/instance_financial_account_type.rbi +++ b/rbi/lithic/models/instance_financial_account_type.rbi @@ -45,6 +45,11 @@ module Lithic :PROGRAM_BANK_ACCOUNTS_PAYABLE, Lithic::InstanceFinancialAccountType::TaggedSymbol ) + EARLY_DIRECT_DEPOSIT_FLOAT = + T.let( + :EARLY_DIRECT_DEPOSIT_FLOAT, + Lithic::InstanceFinancialAccountType::TaggedSymbol + ) sig do override.returns( diff --git a/rbi/lithic/models/parsed_webhook_event.rbi b/rbi/lithic/models/parsed_webhook_event.rbi index 1869e891..c8547f65 100644 --- a/rbi/lithic/models/parsed_webhook_event.rbi +++ b/rbi/lithic/models/parsed_webhook_event.rbi @@ -16,7 +16,6 @@ module Lithic Lithic::AccountHolderVerificationWebhookEvent, Lithic::AccountHolderDocumentUpdatedWebhookEvent, Lithic::CardAuthorizationApprovalRequestWebhookEvent, - Lithic::TokenizationDecisioningRequestWebhookEvent, Lithic::AuthRulesBacktestReportCreatedWebhookEvent, Lithic::BalanceUpdatedWebhookEvent, Lithic::BookTransferTransactionCreatedWebhookEvent, diff --git a/rbi/lithic/models/payment.rbi b/rbi/lithic/models/payment.rbi index 28dd76eb..0ae925b1 100644 --- a/rbi/lithic/models/payment.rbi +++ b/rbi/lithic/models/payment.rbi @@ -226,6 +226,7 @@ module Lithic OrSymbol = T.type_alias { T.any(Symbol, String) } ACH = T.let(:ACH, Lithic::Payment::Category::TaggedSymbol) + WIRE = T.let(:WIRE, Lithic::Payment::Category::TaggedSymbol) BALANCE_OR_FUNDING = T.let(:BALANCE_OR_FUNDING, Lithic::Payment::Category::TaggedSymbol) FEE = T.let(:FEE, Lithic::Payment::Category::TaggedSymbol) @@ -260,6 +261,7 @@ module Lithic :MANAGEMENT_DISBURSEMENT, Lithic::Payment::Category::TaggedSymbol ) + HOLD = T.let(:HOLD, Lithic::Payment::Category::TaggedSymbol) PROGRAM_FUNDING = T.let(:PROGRAM_FUNDING, Lithic::Payment::Category::TaggedSymbol) @@ -312,8 +314,14 @@ module Lithic sig { returns(Lithic::Payment::Event::Result::TaggedSymbol) } attr_accessor :result + # Note: Inbound wire transfers are coming soon (availability varies by partner + # bank). Wire-related event types below are a preview. To learn more, contact your + # customer success manager. + # # Event types: # + # ACH events: + # # - `ACH_ORIGINATION_INITIATED` - ACH origination received and pending # approval/release from an ACH hold. # - `ACH_ORIGINATION_REVIEWED` - ACH origination has completed the review process. @@ -329,6 +337,8 @@ module Lithic # - `ACH_RECEIPT_SETTLED` - ACH receipt funds have settled. # - `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available # balance. + # - `ACH_RECEIPT_RELEASED_EARLY` - ACH receipt released early from pending to + # available balance. # - `ACH_RETURN_INITIATED` - ACH initiated return for an ACH receipt. # - `ACH_RETURN_PROCESSED` - ACH receipt returned by the Receiving Depository # Financial Institution. @@ -336,6 +346,26 @@ module Lithic # Financial Institution. # - `ACH_RETURN_REJECTED` - ACH return was rejected by the Receiving Depository # Financial Institution. + # + # Wire transfer events: + # + # - `WIRE_TRANSFER_INBOUND_RECEIVED` - Inbound wire transfer received from the + # Federal Reserve and pending release to available balance. + # - `WIRE_TRANSFER_INBOUND_SETTLED` - Inbound wire transfer funds released from + # pending to available balance. + # - `WIRE_TRANSFER_INBOUND_BLOCKED` - Inbound wire transfer blocked and funds + # frozen for regulatory review. + # + # Wire return events: + # + # - `WIRE_RETURN_OUTBOUND_INITIATED` - Outbound wire return initiated to return + # funds from an inbound wire transfer. + # - `WIRE_RETURN_OUTBOUND_SENT` - Outbound wire return sent to the Federal Reserve + # and pending acceptance. + # - `WIRE_RETURN_OUTBOUND_SETTLED` - Outbound wire return accepted by the Federal + # Reserve and funds returned to sender. + # - `WIRE_RETURN_OUTBOUND_REJECTED` - Outbound wire return rejected by the Federal + # Reserve. sig { returns(Lithic::Payment::Event::Type::TaggedSymbol) } attr_accessor :type @@ -357,10 +387,16 @@ module Lithic end attr_writer :detailed_results - # Payment event external ID, for example, ACH trace number. + # Payment event external ID. For ACH transactions, this is the ACH trace number. + # For inbound wire transfers, this is the IMAD (Input Message Accountability + # Data). sig { returns(T.nilable(String)) } attr_accessor :external_id + # Note: Inbound wire transfers are coming soon (availability varies by partner + # bank). Wire-related fields below are a preview. To learn more, contact your + # customer success manager. + # # Payment Event sig do params( @@ -385,8 +421,14 @@ module Lithic # APPROVED financial events were successful while DECLINED financial events were # declined by user, Lithic, or the network. result:, + # Note: Inbound wire transfers are coming soon (availability varies by partner + # bank). Wire-related event types below are a preview. To learn more, contact your + # customer success manager. + # # Event types: # + # ACH events: + # # - `ACH_ORIGINATION_INITIATED` - ACH origination received and pending # approval/release from an ACH hold. # - `ACH_ORIGINATION_REVIEWED` - ACH origination has completed the review process. @@ -402,6 +444,8 @@ module Lithic # - `ACH_RECEIPT_SETTLED` - ACH receipt funds have settled. # - `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available # balance. + # - `ACH_RECEIPT_RELEASED_EARLY` - ACH receipt released early from pending to + # available balance. # - `ACH_RETURN_INITIATED` - ACH initiated return for an ACH receipt. # - `ACH_RETURN_PROCESSED` - ACH receipt returned by the Receiving Depository # Financial Institution. @@ -409,10 +453,32 @@ module Lithic # Financial Institution. # - `ACH_RETURN_REJECTED` - ACH return was rejected by the Receiving Depository # Financial Institution. + # + # Wire transfer events: + # + # - `WIRE_TRANSFER_INBOUND_RECEIVED` - Inbound wire transfer received from the + # Federal Reserve and pending release to available balance. + # - `WIRE_TRANSFER_INBOUND_SETTLED` - Inbound wire transfer funds released from + # pending to available balance. + # - `WIRE_TRANSFER_INBOUND_BLOCKED` - Inbound wire transfer blocked and funds + # frozen for regulatory review. + # + # Wire return events: + # + # - `WIRE_RETURN_OUTBOUND_INITIATED` - Outbound wire return initiated to return + # funds from an inbound wire transfer. + # - `WIRE_RETURN_OUTBOUND_SENT` - Outbound wire return sent to the Federal Reserve + # and pending acceptance. + # - `WIRE_RETURN_OUTBOUND_SETTLED` - Outbound wire return accepted by the Federal + # Reserve and funds returned to sender. + # - `WIRE_RETURN_OUTBOUND_REJECTED` - Outbound wire return rejected by the Federal + # Reserve. type:, # More detailed reasons for the event detailed_results: nil, - # Payment event external ID, for example, ACH trace number. + # Payment event external ID. For ACH transactions, this is the ACH trace number. + # For inbound wire transfers, this is the IMAD (Input Message Accountability + # Data). external_id: nil ) end @@ -457,8 +523,14 @@ module Lithic end end + # Note: Inbound wire transfers are coming soon (availability varies by partner + # bank). Wire-related event types below are a preview. To learn more, contact your + # customer success manager. + # # Event types: # + # ACH events: + # # - `ACH_ORIGINATION_INITIATED` - ACH origination received and pending # approval/release from an ACH hold. # - `ACH_ORIGINATION_REVIEWED` - ACH origination has completed the review process. @@ -474,6 +546,8 @@ module Lithic # - `ACH_RECEIPT_SETTLED` - ACH receipt funds have settled. # - `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available # balance. + # - `ACH_RECEIPT_RELEASED_EARLY` - ACH receipt released early from pending to + # available balance. # - `ACH_RETURN_INITIATED` - ACH initiated return for an ACH receipt. # - `ACH_RETURN_PROCESSED` - ACH receipt returned by the Receiving Depository # Financial Institution. @@ -481,6 +555,26 @@ module Lithic # Financial Institution. # - `ACH_RETURN_REJECTED` - ACH return was rejected by the Receiving Depository # Financial Institution. + # + # Wire transfer events: + # + # - `WIRE_TRANSFER_INBOUND_RECEIVED` - Inbound wire transfer received from the + # Federal Reserve and pending release to available balance. + # - `WIRE_TRANSFER_INBOUND_SETTLED` - Inbound wire transfer funds released from + # pending to available balance. + # - `WIRE_TRANSFER_INBOUND_BLOCKED` - Inbound wire transfer blocked and funds + # frozen for regulatory review. + # + # Wire return events: + # + # - `WIRE_RETURN_OUTBOUND_INITIATED` - Outbound wire return initiated to return + # funds from an inbound wire transfer. + # - `WIRE_RETURN_OUTBOUND_SENT` - Outbound wire return sent to the Federal Reserve + # and pending acceptance. + # - `WIRE_RETURN_OUTBOUND_SETTLED` - Outbound wire return accepted by the Federal + # Reserve and funds returned to sender. + # - `WIRE_RETURN_OUTBOUND_REJECTED` - Outbound wire return rejected by the Federal + # Reserve. module Type extend Lithic::Internal::Type::Enum @@ -533,6 +627,11 @@ module Lithic :ACH_RECEIPT_RELEASED, Lithic::Payment::Event::Type::TaggedSymbol ) + ACH_RECEIPT_RELEASED_EARLY = + T.let( + :ACH_RECEIPT_RELEASED_EARLY, + Lithic::Payment::Event::Type::TaggedSymbol + ) ACH_RECEIPT_SETTLED = T.let( :ACH_RECEIPT_SETTLED, @@ -558,6 +657,41 @@ module Lithic :ACH_RETURN_SETTLED, Lithic::Payment::Event::Type::TaggedSymbol ) + WIRE_TRANSFER_INBOUND_RECEIVED = + T.let( + :WIRE_TRANSFER_INBOUND_RECEIVED, + Lithic::Payment::Event::Type::TaggedSymbol + ) + WIRE_TRANSFER_INBOUND_SETTLED = + T.let( + :WIRE_TRANSFER_INBOUND_SETTLED, + Lithic::Payment::Event::Type::TaggedSymbol + ) + WIRE_TRANSFER_INBOUND_BLOCKED = + T.let( + :WIRE_TRANSFER_INBOUND_BLOCKED, + Lithic::Payment::Event::Type::TaggedSymbol + ) + WIRE_RETURN_OUTBOUND_INITIATED = + T.let( + :WIRE_RETURN_OUTBOUND_INITIATED, + Lithic::Payment::Event::Type::TaggedSymbol + ) + WIRE_RETURN_OUTBOUND_SENT = + T.let( + :WIRE_RETURN_OUTBOUND_SENT, + Lithic::Payment::Event::Type::TaggedSymbol + ) + WIRE_RETURN_OUTBOUND_SETTLED = + T.let( + :WIRE_RETURN_OUTBOUND_SETTLED, + Lithic::Payment::Event::Type::TaggedSymbol + ) + WIRE_RETURN_OUTBOUND_REJECTED = + T.let( + :WIRE_RETURN_OUTBOUND_REJECTED, + Lithic::Payment::Event::Type::TaggedSymbol + ) sig do override.returns( @@ -848,10 +982,6 @@ module Lithic sig { returns(T.nilable(String)) } attr_accessor :message_id - # Payment details or invoice reference - sig { returns(T.nilable(String)) } - attr_accessor :remittance_information - sig do params( wire_message_type: T.nilable(String), @@ -859,8 +989,7 @@ module Lithic Lithic::Payment::MethodAttributes::WireMethodAttributes::WireNetwork::OrSymbol, creditor: Lithic::WirePartyDetails::OrHash, debtor: Lithic::WirePartyDetails::OrHash, - message_id: T.nilable(String), - remittance_information: T.nilable(String) + message_id: T.nilable(String) ).returns(T.attached_class) end def self.new( @@ -872,9 +1001,7 @@ module Lithic debtor: nil, # Point to point reference identifier, as assigned by the instructing party, used # for tracking the message through the Fedwire system - message_id: nil, - # Payment details or invoice reference - remittance_information: nil + message_id: nil ) end @@ -886,8 +1013,7 @@ module Lithic Lithic::Payment::MethodAttributes::WireMethodAttributes::WireNetwork::TaggedSymbol, creditor: Lithic::WirePartyDetails, debtor: Lithic::WirePartyDetails, - message_id: T.nilable(String), - remittance_information: T.nilable(String) + message_id: T.nilable(String) } ) end diff --git a/rbi/lithic/models/payment_simulate_action_params.rbi b/rbi/lithic/models/payment_simulate_action_params.rbi index 417a70bf..d3790ffc 100644 --- a/rbi/lithic/models/payment_simulate_action_params.rbi +++ b/rbi/lithic/models/payment_simulate_action_params.rbi @@ -143,6 +143,11 @@ module Lithic :ACH_RECEIPT_RELEASED, Lithic::PaymentSimulateActionParams::EventType::TaggedSymbol ) + ACH_RECEIPT_RELEASED_EARLY = + T.let( + :ACH_RECEIPT_RELEASED_EARLY, + Lithic::PaymentSimulateActionParams::EventType::TaggedSymbol + ) ACH_RETURN_INITIATED = T.let( :ACH_RETURN_INITIATED, diff --git a/rbi/lithic/models/tokenization_decisioning_request_webhook_event.rbi b/rbi/lithic/models/tokenization_decisioning_request_webhook_event.rbi deleted file mode 100644 index 0c1ce2f4..00000000 --- a/rbi/lithic/models/tokenization_decisioning_request_webhook_event.rbi +++ /dev/null @@ -1,331 +0,0 @@ -# typed: strong - -module Lithic - module Models - class TokenizationDecisioningRequestWebhookEvent < Lithic::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Lithic::TokenizationDecisioningRequestWebhookEvent, - Lithic::Internal::AnyHash - ) - end - - # Unique identifier for the user tokenizing a card - sig { returns(String) } - attr_accessor :account_token - - # Unique identifier for the card being tokenized - sig { returns(String) } - attr_accessor :card_token - - # Indicate when the request was received from Mastercard or Visa - sig { returns(Time) } - attr_accessor :created - - # Contains the metadata for the digital wallet being tokenized. - sig { returns(Lithic::TokenMetadata) } - attr_reader :digital_wallet_token_metadata - - sig do - params( - digital_wallet_token_metadata: Lithic::TokenMetadata::OrHash - ).void - end - attr_writer :digital_wallet_token_metadata - - # The name of this event - sig do - returns( - Lithic::TokenizationDecisioningRequestWebhookEvent::EventType::TaggedSymbol - ) - end - attr_accessor :event_type - - # Whether Lithic decisioned on the token, and if so, what the decision was. - # APPROVED/VERIFICATION_REQUIRED/DENIED. - sig do - returns( - Lithic::TokenizationDecisioningRequestWebhookEvent::IssuerDecision::TaggedSymbol - ) - end - attr_accessor :issuer_decision - - # The channel through which the tokenization was made. - sig do - returns( - Lithic::TokenizationDecisioningRequestWebhookEvent::TokenizationChannel::TaggedSymbol - ) - end - attr_accessor :tokenization_channel - - # Unique identifier for the digital wallet token attempt - sig { returns(String) } - attr_accessor :tokenization_token - - sig { returns(Lithic::WalletDecisioningInfo) } - attr_reader :wallet_decisioning_info - - sig do - params( - wallet_decisioning_info: Lithic::WalletDecisioningInfo::OrHash - ).void - end - attr_writer :wallet_decisioning_info - - sig { returns(T.nilable(Lithic::Device)) } - attr_reader :device - - sig { params(device: Lithic::Device::OrHash).void } - attr_writer :device - - # The source of the tokenization. - sig do - returns( - T.nilable( - Lithic::TokenizationDecisioningRequestWebhookEvent::TokenizationSource::TaggedSymbol - ) - ) - end - attr_reader :tokenization_source - - sig do - params( - tokenization_source: - Lithic::TokenizationDecisioningRequestWebhookEvent::TokenizationSource::OrSymbol - ).void - end - attr_writer :tokenization_source - - # A webhook for tokenization decisioning sent to the customer's responder endpoint - sig do - params( - account_token: String, - card_token: String, - created: Time, - digital_wallet_token_metadata: Lithic::TokenMetadata::OrHash, - event_type: - Lithic::TokenizationDecisioningRequestWebhookEvent::EventType::OrSymbol, - issuer_decision: - Lithic::TokenizationDecisioningRequestWebhookEvent::IssuerDecision::OrSymbol, - tokenization_channel: - Lithic::TokenizationDecisioningRequestWebhookEvent::TokenizationChannel::OrSymbol, - tokenization_token: String, - wallet_decisioning_info: Lithic::WalletDecisioningInfo::OrHash, - device: Lithic::Device::OrHash, - tokenization_source: - Lithic::TokenizationDecisioningRequestWebhookEvent::TokenizationSource::OrSymbol - ).returns(T.attached_class) - end - def self.new( - # Unique identifier for the user tokenizing a card - account_token:, - # Unique identifier for the card being tokenized - card_token:, - # Indicate when the request was received from Mastercard or Visa - created:, - # Contains the metadata for the digital wallet being tokenized. - digital_wallet_token_metadata:, - # The name of this event - event_type:, - # Whether Lithic decisioned on the token, and if so, what the decision was. - # APPROVED/VERIFICATION_REQUIRED/DENIED. - issuer_decision:, - # The channel through which the tokenization was made. - tokenization_channel:, - # Unique identifier for the digital wallet token attempt - tokenization_token:, - wallet_decisioning_info:, - device: nil, - # The source of the tokenization. - tokenization_source: nil - ) - end - - sig do - override.returns( - { - account_token: String, - card_token: String, - created: Time, - digital_wallet_token_metadata: Lithic::TokenMetadata, - event_type: - Lithic::TokenizationDecisioningRequestWebhookEvent::EventType::TaggedSymbol, - issuer_decision: - Lithic::TokenizationDecisioningRequestWebhookEvent::IssuerDecision::TaggedSymbol, - tokenization_channel: - Lithic::TokenizationDecisioningRequestWebhookEvent::TokenizationChannel::TaggedSymbol, - tokenization_token: String, - wallet_decisioning_info: Lithic::WalletDecisioningInfo, - device: Lithic::Device, - tokenization_source: - Lithic::TokenizationDecisioningRequestWebhookEvent::TokenizationSource::TaggedSymbol - } - ) - end - def to_hash - end - - # The name of this event - module EventType - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Lithic::TokenizationDecisioningRequestWebhookEvent::EventType - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = - T.let( - :"digital_wallet.tokenization_approval_request", - Lithic::TokenizationDecisioningRequestWebhookEvent::EventType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::TokenizationDecisioningRequestWebhookEvent::EventType::TaggedSymbol - ] - ) - end - def self.values - end - end - - # Whether Lithic decisioned on the token, and if so, what the decision was. - # APPROVED/VERIFICATION_REQUIRED/DENIED. - module IssuerDecision - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Lithic::TokenizationDecisioningRequestWebhookEvent::IssuerDecision - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - APPROVED = - T.let( - :APPROVED, - Lithic::TokenizationDecisioningRequestWebhookEvent::IssuerDecision::TaggedSymbol - ) - DENIED = - T.let( - :DENIED, - Lithic::TokenizationDecisioningRequestWebhookEvent::IssuerDecision::TaggedSymbol - ) - VERIFICATION_REQUIRED = - T.let( - :VERIFICATION_REQUIRED, - Lithic::TokenizationDecisioningRequestWebhookEvent::IssuerDecision::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::TokenizationDecisioningRequestWebhookEvent::IssuerDecision::TaggedSymbol - ] - ) - end - def self.values - end - end - - # The channel through which the tokenization was made. - module TokenizationChannel - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Lithic::TokenizationDecisioningRequestWebhookEvent::TokenizationChannel - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - DIGITAL_WALLET = - T.let( - :DIGITAL_WALLET, - Lithic::TokenizationDecisioningRequestWebhookEvent::TokenizationChannel::TaggedSymbol - ) - MERCHANT = - T.let( - :MERCHANT, - Lithic::TokenizationDecisioningRequestWebhookEvent::TokenizationChannel::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::TokenizationDecisioningRequestWebhookEvent::TokenizationChannel::TaggedSymbol - ] - ) - end - def self.values - end - end - - # The source of the tokenization. - module TokenizationSource - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Lithic::TokenizationDecisioningRequestWebhookEvent::TokenizationSource - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ACCOUNT_ON_FILE = - T.let( - :ACCOUNT_ON_FILE, - Lithic::TokenizationDecisioningRequestWebhookEvent::TokenizationSource::TaggedSymbol - ) - CONTACTLESS_TAP = - T.let( - :CONTACTLESS_TAP, - Lithic::TokenizationDecisioningRequestWebhookEvent::TokenizationSource::TaggedSymbol - ) - MANUAL_PROVISION = - T.let( - :MANUAL_PROVISION, - Lithic::TokenizationDecisioningRequestWebhookEvent::TokenizationSource::TaggedSymbol - ) - PUSH_PROVISION = - T.let( - :PUSH_PROVISION, - Lithic::TokenizationDecisioningRequestWebhookEvent::TokenizationSource::TaggedSymbol - ) - TOKEN = - T.let( - :TOKEN, - Lithic::TokenizationDecisioningRequestWebhookEvent::TokenizationSource::TaggedSymbol - ) - UNKNOWN = - T.let( - :UNKNOWN, - Lithic::TokenizationDecisioningRequestWebhookEvent::TokenizationSource::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::TokenizationDecisioningRequestWebhookEvent::TokenizationSource::TaggedSymbol - ] - ) - end - def self.values - end - end - end - end -end diff --git a/rbi/lithic/resources/auth_rules/v2.rbi b/rbi/lithic/resources/auth_rules/v2.rbi index 0f85dc45..dcca7b61 100644 --- a/rbi/lithic/resources/auth_rules/v2.rbi +++ b/rbi/lithic/resources/auth_rules/v2.rbi @@ -34,9 +34,9 @@ module Lithic # Updates a V2 Auth rule's properties # - # If `account_tokens`, `card_tokens`, `program_level`, or `excluded_card_tokens` - # is provided, this will replace existing associations with the provided list of - # entities. + # If `account_tokens`, `card_tokens`, `program_level`, `excluded_card_tokens`, + # `excluded_account_tokens`, or `excluded_business_account_tokens` is provided, + # this will replace existing associations with the provided list of entities. sig do params( auth_rule_token: String, @@ -121,7 +121,8 @@ module Lithic Lithic::AuthRules::Conditional3DSActionParameters::OrHash, Lithic::AuthRules::ConditionalAuthorizationActionParameters::OrHash, Lithic::AuthRules::ConditionalACHActionParameters::OrHash, - Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash + Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, + Lithic::AuthRules::TypescriptCodeParameters::OrHash ) ), request_options: Lithic::RequestOptions::OrHash @@ -185,6 +186,17 @@ module Lithic ) end + # Returns all versions of an auth rule, sorted by version number descending + # (newest first). + sig do + params( + auth_rule_token: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(Lithic::Models::AuthRules::V2ListVersionsResponse) + end + def list_versions(auth_rule_token, request_options: {}) + end + # Promotes the draft version of an Auth rule to the currently active version such # that it is enforced in the respective stream. sig do diff --git a/rbi/lithic/resources/disputes.rbi b/rbi/lithic/resources/disputes.rbi index 3a1df74f..251b33a3 100644 --- a/rbi/lithic/resources/disputes.rbi +++ b/rbi/lithic/resources/disputes.rbi @@ -3,7 +3,7 @@ module Lithic module Resources class Disputes - # Initiate a dispute. + # Request a chargeback. sig do params( amount: Integer, @@ -15,21 +15,21 @@ module Lithic ).returns(Lithic::Dispute) end def create( - # Amount to dispute + # Amount for chargeback amount:, - # Reason for dispute + # Reason for chargeback reason:, - # Transaction to dispute + # Transaction for chargeback transaction_token:, - # Date the customer filed the dispute + # Date the customer filed the chargeback request customer_filed_date: nil, - # Customer description of dispute + # Customer description customer_note: nil, request_options: {} ) end - # Get dispute. + # Get chargeback request. sig do params( dispute_token: String, @@ -39,7 +39,7 @@ module Lithic def retrieve(dispute_token, request_options: {}) end - # Update dispute. Can only be modified if status is `NEW`. + # Update chargeback request. Can only be modified if status is `NEW`. sig do params( dispute_token: String, @@ -52,19 +52,19 @@ module Lithic end def update( dispute_token, - # Amount to dispute + # Amount for chargeback amount: nil, - # Date the customer filed the dispute + # Date the customer filed the chargeback request customer_filed_date: nil, - # Customer description of dispute + # Customer description customer_note: nil, - # Reason for dispute + # Reason for chargeback reason: nil, request_options: {} ) end - # List disputes. + # List chargeback requests. sig do params( begin_: Time, @@ -92,7 +92,7 @@ module Lithic # A cursor representing an item's token after which a page of results should # begin. Used to retrieve the next page of results after this item. starting_after: nil, - # List disputes of a specific status. + # Filter by status. status: nil, # Transaction tokens to filter by. transaction_tokens: nil, @@ -100,7 +100,7 @@ module Lithic ) end - # Withdraw dispute. + # Withdraw chargeback request. sig do params( dispute_token: String, @@ -110,8 +110,8 @@ module Lithic def delete(dispute_token, request_options: {}) end - # Soft delete evidence for a dispute. Evidence will not be reviewed or submitted - # by Lithic after it is withdrawn. + # Soft delete evidence for a chargeback request. Evidence will not be reviewed or + # submitted by Lithic after it is withdrawn. sig do params( evidence_token: String, @@ -122,8 +122,8 @@ module Lithic def delete_evidence(evidence_token, dispute_token:, request_options: {}) end - # Use this endpoint to upload evidences for the dispute. It will return a URL to - # upload your documents to. The URL will expire in 30 minutes. + # Use this endpoint to upload evidence for a chargeback request. It will return a + # URL to upload your documents to. The URL will expire in 30 minutes. # # Uploaded documents must either be a `jpg`, `png` or `pdf` file, and each must be # less than 5 GiB. @@ -142,7 +142,7 @@ module Lithic ) end - # List evidence metadata for a dispute. + # List evidence for a chargeback request. sig do params( dispute_token: String, @@ -174,7 +174,7 @@ module Lithic ) end - # Get a dispute's evidence metadata. + # Get evidence for a chargeback request. sig do params( evidence_token: String, diff --git a/rbi/lithic/resources/financial_accounts/interest_tier_schedule.rbi b/rbi/lithic/resources/financial_accounts/interest_tier_schedule.rbi index 22802042..9ab976b7 100644 --- a/rbi/lithic/resources/financial_accounts/interest_tier_schedule.rbi +++ b/rbi/lithic/resources/financial_accounts/interest_tier_schedule.rbi @@ -10,6 +10,7 @@ module Lithic financial_account_token: String, credit_product_token: String, effective_date: Date, + penalty_rates: T.anything, tier_name: String, tier_rates: T.anything, request_options: Lithic::RequestOptions::OrHash @@ -24,6 +25,8 @@ module Lithic credit_product_token:, # Date the tier should be effective in YYYY-MM-DD format effective_date:, + # Custom rates per category for penalties + penalty_rates: nil, # Name of a tier contained in the credit product. Mutually exclusive with # tier_rates tier_name: nil, @@ -57,6 +60,7 @@ module Lithic params( effective_date: Date, financial_account_token: String, + penalty_rates: T.anything, tier_name: String, tier_rates: T.anything, request_options: Lithic::RequestOptions::OrHash @@ -69,6 +73,8 @@ module Lithic effective_date, # Path param: Globally unique identifier for financial account financial_account_token:, + # Body param: Custom rates per category for penalties + penalty_rates: nil, # Body param: Name of a tier contained in the credit product. Mutually exclusive # with tier_rates tier_name: nil, diff --git a/rbi/lithic/resources/holds.rbi b/rbi/lithic/resources/holds.rbi new file mode 100644 index 00000000..5e0d7556 --- /dev/null +++ b/rbi/lithic/resources/holds.rbi @@ -0,0 +1,111 @@ +# typed: strong + +module Lithic + module Resources + class Holds + # Create a hold on a financial account. Holds reserve funds by moving them from + # available to pending balance. They can be resolved via settlement (linked to a + # payment or book transfer), voiding, or expiration. + sig do + params( + financial_account_token: String, + amount: Integer, + token: String, + expiration_datetime: Time, + memo: T.nilable(String), + user_defined_id: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(Lithic::Hold) + end + def create( + # Globally unique identifier for the financial account. + financial_account_token, + # Amount to hold in cents + amount:, + # Customer-provided token for idempotency. Becomes the hold token. + token: nil, + # When the hold should auto-expire + expiration_datetime: nil, + # Reason for the hold + memo: nil, + # User-provided identifier for the hold + user_defined_id: nil, + request_options: {} + ) + end + + # Get hold by token. + sig do + params( + hold_token: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(Lithic::Hold) + end + def retrieve( + # Globally unique identifier for the hold. + hold_token, + request_options: {} + ) + end + + # List holds for a financial account. + sig do + params( + financial_account_token: String, + begin_: Time, + end_: Time, + ending_before: String, + page_size: Integer, + starting_after: String, + status: Lithic::HoldListParams::Status::OrSymbol, + request_options: Lithic::RequestOptions::OrHash + ).returns(Lithic::Internal::CursorPage[Lithic::Hold]) + end + def list( + # Globally unique identifier for the financial account. + financial_account_token, + # Date string in RFC 3339 format. Only entries created after the specified time + # will be included. UTC time zone. + begin_: nil, + # Date string in RFC 3339 format. Only entries created before the specified time + # will be included. UTC time zone. + end_: nil, + # A cursor representing an item's token before which a page of results should end. + # Used to retrieve the previous page of results before this item. + ending_before: nil, + # Page size (for pagination). + page_size: nil, + # A cursor representing an item's token after which a page of results should + # begin. Used to retrieve the next page of results after this item. + starting_after: nil, + # Hold status to filter by. + status: nil, + request_options: {} + ) + end + + # Void an active hold. This returns the held funds from pending back to available + # balance. Only holds in PENDING status can be voided. + sig do + params( + hold_token: String, + memo: T.nilable(String), + request_options: Lithic::RequestOptions::OrHash + ).returns(Lithic::Hold) + end + def void( + # Globally unique identifier for the hold. + hold_token, + # Reason for voiding the hold + memo: nil, + request_options: {} + ) + end + + # @api private + sig { params(client: Lithic::Client).returns(T.attached_class) } + def self.new(client:) + end + end + end +end diff --git a/rbi/lithic/resources/webhooks.rbi b/rbi/lithic/resources/webhooks.rbi index 61f48021..35783177 100644 --- a/rbi/lithic/resources/webhooks.rbi +++ b/rbi/lithic/resources/webhooks.rbi @@ -17,7 +17,6 @@ module Lithic Lithic::AccountHolderVerificationWebhookEvent, Lithic::AccountHolderDocumentUpdatedWebhookEvent, Lithic::CardAuthorizationApprovalRequestWebhookEvent, - Lithic::TokenizationDecisioningRequestWebhookEvent, Lithic::AuthRulesBacktestReportCreatedWebhookEvent, Lithic::BalanceUpdatedWebhookEvent, Lithic::BookTransferTransactionCreatedWebhookEvent, @@ -71,7 +70,14 @@ module Lithic ) ) end - def parse(payload, headers:, secret: nil) + def parse( + # The raw webhook payload as a string + payload, + # The raw HTTP headers that came with the payload + headers:, + # The webhook signing secret + secret: nil + ) end sig { params(payload: String).returns(Lithic::ParsedWebhookEvent::Variants) } diff --git a/sig/lithic/client.rbs b/sig/lithic/client.rbs index 2f67db75..1f19ded9 100644 --- a/sig/lithic/client.rbs +++ b/sig/lithic/client.rbs @@ -15,6 +15,8 @@ module Lithic attr_reader api_key: String + attr_reader webhook_secret: String? + attr_reader accounts: Lithic::Resources::Accounts attr_reader account_holders: Lithic::Resources::AccountHolders @@ -75,6 +77,8 @@ module Lithic attr_reader network_programs: Lithic::Resources::NetworkPrograms + attr_reader holds: Lithic::Resources::Holds + attr_reader account_activity: Lithic::Resources::AccountActivity attr_reader transfer_limits: Lithic::Resources::TransferLimits @@ -89,6 +93,7 @@ module Lithic def initialize: ( ?api_key: String?, + ?webhook_secret: String?, ?environment: :production | :sandbox | nil, ?base_url: String?, ?max_retries: Integer, diff --git a/sig/lithic/models.rbs b/sig/lithic/models.rbs index e6145869..5783e92f 100644 --- a/sig/lithic/models.rbs +++ b/sig/lithic/models.rbs @@ -317,6 +317,18 @@ module Lithic class FundingEventRetrieveParams = Lithic::Models::FundingEventRetrieveParams + class Hold = Lithic::Models::Hold + + class HoldCreateParams = Lithic::Models::HoldCreateParams + + class HoldEvent = Lithic::Models::HoldEvent + + class HoldListParams = Lithic::Models::HoldListParams + + class HoldRetrieveParams = Lithic::Models::HoldRetrieveParams + + class HoldVoidParams = Lithic::Models::HoldVoidParams + module InstanceFinancialAccountType = Lithic::Models::InstanceFinancialAccountType class InternalTransactionAPI = Lithic::Models::InternalTransactionAPI @@ -449,8 +461,6 @@ module Lithic class TokenizationDeactivateParams = Lithic::Models::TokenizationDeactivateParams - class TokenizationDecisioningRequestWebhookEvent = Lithic::Models::TokenizationDecisioningRequestWebhookEvent - class TokenizationDecisioningRetrieveSecretParams = Lithic::Models::TokenizationDecisioningRetrieveSecretParams class TokenizationDecisioningRotateSecretParams = Lithic::Models::TokenizationDecisioningRotateSecretParams diff --git a/sig/lithic/models/account_activity_list_params.rbs b/sig/lithic/models/account_activity_list_params.rbs index a31eb799..41c09bb8 100644 --- a/sig/lithic/models/account_activity_list_params.rbs +++ b/sig/lithic/models/account_activity_list_params.rbs @@ -102,6 +102,7 @@ module Lithic type category = :ACH + | :WIRE | :BALANCE_OR_FUNDING | :FEE | :REWARD @@ -120,12 +121,14 @@ module Lithic | :MANAGEMENT_FEE | :MANAGEMENT_REWARD | :MANAGEMENT_DISBURSEMENT + | :HOLD | :PROGRAM_FUNDING module Category extend Lithic::Internal::Type::Enum ACH: :ACH + WIRE: :WIRE BALANCE_OR_FUNDING: :BALANCE_OR_FUNDING FEE: :FEE REWARD: :REWARD @@ -144,6 +147,7 @@ module Lithic MANAGEMENT_FEE: :MANAGEMENT_FEE MANAGEMENT_REWARD: :MANAGEMENT_REWARD MANAGEMENT_DISBURSEMENT: :MANAGEMENT_DISBURSEMENT + HOLD: :HOLD PROGRAM_FUNDING: :PROGRAM_FUNDING def self?.values: -> ::Array[Lithic::Models::AccountActivityListParams::category] diff --git a/sig/lithic/models/account_activity_list_response.rbs b/sig/lithic/models/account_activity_list_response.rbs index ecae23ac..42c060ef 100644 --- a/sig/lithic/models/account_activity_list_response.rbs +++ b/sig/lithic/models/account_activity_list_response.rbs @@ -7,6 +7,7 @@ module Lithic | Lithic::Payment | Lithic::ExternalPayment | Lithic::ManagementOperationTransaction + | Lithic::Hold module AccountActivityListResponse extend Lithic::Internal::Type::Union @@ -89,6 +90,7 @@ module Lithic type category = :ACH + | :WIRE | :BALANCE_OR_FUNDING | :FEE | :REWARD @@ -107,12 +109,14 @@ module Lithic | :MANAGEMENT_FEE | :MANAGEMENT_REWARD | :MANAGEMENT_DISBURSEMENT + | :HOLD | :PROGRAM_FUNDING module Category extend Lithic::Internal::Type::Enum ACH: :ACH + WIRE: :WIRE BALANCE_OR_FUNDING: :BALANCE_OR_FUNDING FEE: :FEE REWARD: :REWARD @@ -131,6 +135,7 @@ module Lithic MANAGEMENT_FEE: :MANAGEMENT_FEE MANAGEMENT_REWARD: :MANAGEMENT_REWARD MANAGEMENT_DISBURSEMENT: :MANAGEMENT_DISBURSEMENT + HOLD: :HOLD PROGRAM_FUNDING: :PROGRAM_FUNDING def self?.values: -> ::Array[Lithic::Models::AccountActivityListResponse::Internal::category] diff --git a/sig/lithic/models/account_activity_retrieve_transaction_response.rbs b/sig/lithic/models/account_activity_retrieve_transaction_response.rbs index 2f67c0db..fc82c753 100644 --- a/sig/lithic/models/account_activity_retrieve_transaction_response.rbs +++ b/sig/lithic/models/account_activity_retrieve_transaction_response.rbs @@ -7,6 +7,7 @@ module Lithic | Lithic::Payment | Lithic::ExternalPayment | Lithic::ManagementOperationTransaction + | Lithic::Hold module AccountActivityRetrieveTransactionResponse extend Lithic::Internal::Type::Union @@ -89,6 +90,7 @@ module Lithic type category = :ACH + | :WIRE | :BALANCE_OR_FUNDING | :FEE | :REWARD @@ -107,12 +109,14 @@ module Lithic | :MANAGEMENT_FEE | :MANAGEMENT_REWARD | :MANAGEMENT_DISBURSEMENT + | :HOLD | :PROGRAM_FUNDING module Category extend Lithic::Internal::Type::Enum ACH: :ACH + WIRE: :WIRE BALANCE_OR_FUNDING: :BALANCE_OR_FUNDING FEE: :FEE REWARD: :REWARD @@ -131,6 +135,7 @@ module Lithic MANAGEMENT_FEE: :MANAGEMENT_FEE MANAGEMENT_REWARD: :MANAGEMENT_REWARD MANAGEMENT_DISBURSEMENT: :MANAGEMENT_DISBURSEMENT + HOLD: :HOLD PROGRAM_FUNDING: :PROGRAM_FUNDING def self?.values: -> ::Array[Lithic::Models::AccountActivityRetrieveTransactionResponse::Internal::category] diff --git a/sig/lithic/models/auth_rules/auth_rule.rbs b/sig/lithic/models/auth_rules/auth_rule.rbs index a87603f1..e1b1d8c1 100644 --- a/sig/lithic/models/auth_rules/auth_rule.rbs +++ b/sig/lithic/models/auth_rules/auth_rule.rbs @@ -17,6 +17,8 @@ module Lithic program_level: bool, state: Lithic::Models::AuthRules::AuthRule::state, type: Lithic::Models::AuthRules::AuthRule::type_, + excluded_account_tokens: ::Array[String], + excluded_business_account_tokens: ::Array[String], excluded_card_tokens: ::Array[String] } @@ -45,6 +47,16 @@ module Lithic attr_accessor type: Lithic::Models::AuthRules::AuthRule::type_ + attr_reader excluded_account_tokens: ::Array[String]? + + def excluded_account_tokens=: (::Array[String]) -> ::Array[String] + + attr_reader excluded_business_account_tokens: ::Array[String]? + + def excluded_business_account_tokens=: ( + ::Array[String] + ) -> ::Array[String] + attr_reader excluded_card_tokens: ::Array[String]? def excluded_card_tokens=: (::Array[String]) -> ::Array[String] @@ -62,6 +74,8 @@ module Lithic program_level: bool, state: Lithic::Models::AuthRules::AuthRule::state, type: Lithic::Models::AuthRules::AuthRule::type_, + ?excluded_account_tokens: ::Array[String], + ?excluded_business_account_tokens: ::Array[String], ?excluded_card_tokens: ::Array[String] ) -> void @@ -78,6 +92,8 @@ module Lithic program_level: bool, state: Lithic::Models::AuthRules::AuthRule::state, type: Lithic::Models::AuthRules::AuthRule::type_, + excluded_account_tokens: ::Array[String], + excluded_business_account_tokens: ::Array[String], excluded_card_tokens: ::Array[String] } @@ -110,6 +126,7 @@ module Lithic | Lithic::AuthRules::ConditionalAuthorizationActionParameters | Lithic::AuthRules::ConditionalACHActionParameters | Lithic::AuthRules::ConditionalTokenizationActionParameters + | Lithic::AuthRules::TypescriptCodeParameters module Parameters extend Lithic::Internal::Type::Union @@ -120,22 +137,32 @@ module Lithic type draft_version = { + error: String?, parameters: Lithic::Models::AuthRules::AuthRule::DraftVersion::parameters, + state: Lithic::Models::AuthRules::AuthRule::DraftVersion::state, version: Integer } class DraftVersion < Lithic::Internal::Type::BaseModel + attr_accessor error: String? + attr_accessor parameters: Lithic::Models::AuthRules::AuthRule::DraftVersion::parameters + attr_accessor state: Lithic::Models::AuthRules::AuthRule::DraftVersion::state + attr_accessor version: Integer def initialize: ( + error: String?, parameters: Lithic::Models::AuthRules::AuthRule::DraftVersion::parameters, + state: Lithic::Models::AuthRules::AuthRule::DraftVersion::state, version: Integer ) -> void def to_hash: -> { + error: String?, parameters: Lithic::Models::AuthRules::AuthRule::DraftVersion::parameters, + state: Lithic::Models::AuthRules::AuthRule::DraftVersion::state, version: Integer } @@ -147,12 +174,25 @@ module Lithic | Lithic::AuthRules::ConditionalAuthorizationActionParameters | Lithic::AuthRules::ConditionalACHActionParameters | Lithic::AuthRules::ConditionalTokenizationActionParameters + | Lithic::AuthRules::TypescriptCodeParameters module Parameters extend Lithic::Internal::Type::Union def self?.variants: -> ::Array[Lithic::Models::AuthRules::AuthRule::DraftVersion::parameters] end + + type state = :PENDING | :SHADOWING | :ERROR + + module State + extend Lithic::Internal::Type::Enum + + PENDING: :PENDING + SHADOWING: :SHADOWING + ERROR: :ERROR + + def self?.values: -> ::Array[Lithic::Models::AuthRules::AuthRule::DraftVersion::state] + end end type state = :ACTIVE | :INACTIVE @@ -171,6 +211,7 @@ module Lithic | :VELOCITY_LIMIT | :MERCHANT_LOCK | :CONDITIONAL_ACTION + | :TYPESCRIPT_CODE module Type extend Lithic::Internal::Type::Enum @@ -179,6 +220,7 @@ module Lithic VELOCITY_LIMIT: :VELOCITY_LIMIT MERCHANT_LOCK: :MERCHANT_LOCK CONDITIONAL_ACTION: :CONDITIONAL_ACTION + TYPESCRIPT_CODE: :TYPESCRIPT_CODE def self?.values: -> ::Array[Lithic::Models::AuthRules::AuthRule::type_] end diff --git a/sig/lithic/models/auth_rules/auth_rule_version.rbs b/sig/lithic/models/auth_rules/auth_rule_version.rbs new file mode 100644 index 00000000..bc0aa6f2 --- /dev/null +++ b/sig/lithic/models/auth_rules/auth_rule_version.rbs @@ -0,0 +1,67 @@ +module Lithic + module Models + class AuthRuleVersion = AuthRules::AuthRuleVersion + + module AuthRules + type auth_rule_version = + { + created: Time, + parameters: Lithic::Models::AuthRules::AuthRuleVersion::parameters, + state: Lithic::Models::AuthRules::AuthRuleVersion::state, + version: Integer + } + + class AuthRuleVersion < Lithic::Internal::Type::BaseModel + attr_accessor created: Time + + attr_accessor parameters: Lithic::Models::AuthRules::AuthRuleVersion::parameters + + attr_accessor state: Lithic::Models::AuthRules::AuthRuleVersion::state + + attr_accessor version: Integer + + def initialize: ( + created: Time, + parameters: Lithic::Models::AuthRules::AuthRuleVersion::parameters, + state: Lithic::Models::AuthRules::AuthRuleVersion::state, + version: Integer + ) -> void + + def to_hash: -> { + created: Time, + parameters: Lithic::Models::AuthRules::AuthRuleVersion::parameters, + state: Lithic::Models::AuthRules::AuthRuleVersion::state, + version: Integer + } + + type parameters = + Lithic::AuthRules::ConditionalBlockParameters + | Lithic::AuthRules::VelocityLimitParams + | Lithic::AuthRules::MerchantLockParameters + | Lithic::AuthRules::Conditional3DSActionParameters + | Lithic::AuthRules::ConditionalAuthorizationActionParameters + | Lithic::AuthRules::ConditionalACHActionParameters + | Lithic::AuthRules::ConditionalTokenizationActionParameters + | Lithic::AuthRules::TypescriptCodeParameters + + module Parameters + extend Lithic::Internal::Type::Union + + def self?.variants: -> ::Array[Lithic::Models::AuthRules::AuthRuleVersion::parameters] + end + + type state = :ACTIVE | :SHADOW | :INACTIVE + + module State + extend Lithic::Internal::Type::Enum + + ACTIVE: :ACTIVE + SHADOW: :SHADOW + INACTIVE: :INACTIVE + + def self?.values: -> ::Array[Lithic::Models::AuthRules::AuthRuleVersion::state] + end + end + end + end +end diff --git a/sig/lithic/models/auth_rules/rule_feature.rbs b/sig/lithic/models/auth_rules/rule_feature.rbs new file mode 100644 index 00000000..323d20a1 --- /dev/null +++ b/sig/lithic/models/auth_rules/rule_feature.rbs @@ -0,0 +1,173 @@ +module Lithic + module Models + module AuthRules + type rule_feature = + Lithic::AuthRules::RuleFeature::AuthorizationFeature + | Lithic::AuthRules::RuleFeature::AuthenticationFeature + | Lithic::AuthRules::RuleFeature::TokenizationFeature + | Lithic::AuthRules::RuleFeature::ACHReceiptFeature + | Lithic::AuthRules::RuleFeature::CardFeature + | Lithic::AuthRules::RuleFeature::AccountHolderFeature + | Lithic::AuthRules::RuleFeature::IPMetadataFeature + | Lithic::AuthRules::RuleFeature::SpendVelocityFeature + + module RuleFeature + extend Lithic::Internal::Type::Union + + type authorization_feature = { type: :AUTHORIZATION, name: String } + + class AuthorizationFeature < Lithic::Internal::Type::BaseModel + attr_accessor type: :AUTHORIZATION + + attr_reader name: String? + + def name=: (String) -> String + + def initialize: (?name: String, ?type: :AUTHORIZATION) -> void + + def to_hash: -> { type: :AUTHORIZATION, name: String } + end + + type authentication_feature = { type: :AUTHENTICATION, name: String } + + class AuthenticationFeature < Lithic::Internal::Type::BaseModel + attr_accessor type: :AUTHENTICATION + + attr_reader name: String? + + def name=: (String) -> String + + def initialize: (?name: String, ?type: :AUTHENTICATION) -> void + + def to_hash: -> { type: :AUTHENTICATION, name: String } + end + + type tokenization_feature = { type: :TOKENIZATION, name: String } + + class TokenizationFeature < Lithic::Internal::Type::BaseModel + attr_accessor type: :TOKENIZATION + + attr_reader name: String? + + def name=: (String) -> String + + def initialize: (?name: String, ?type: :TOKENIZATION) -> void + + def to_hash: -> { type: :TOKENIZATION, name: String } + end + + type ach_receipt_feature = { type: :ACH_RECEIPT, name: String } + + class ACHReceiptFeature < Lithic::Internal::Type::BaseModel + attr_accessor type: :ACH_RECEIPT + + attr_reader name: String? + + def name=: (String) -> String + + def initialize: (?name: String, ?type: :ACH_RECEIPT) -> void + + def to_hash: -> { type: :ACH_RECEIPT, name: String } + end + + type card_feature = { type: :CARD, name: String } + + class CardFeature < Lithic::Internal::Type::BaseModel + attr_accessor type: :CARD + + attr_reader name: String? + + def name=: (String) -> String + + def initialize: (?name: String, ?type: :CARD) -> void + + def to_hash: -> { type: :CARD, name: String } + end + + type account_holder_feature = { type: :ACCOUNT_HOLDER, name: String } + + class AccountHolderFeature < Lithic::Internal::Type::BaseModel + attr_accessor type: :ACCOUNT_HOLDER + + attr_reader name: String? + + def name=: (String) -> String + + def initialize: (?name: String, ?type: :ACCOUNT_HOLDER) -> void + + def to_hash: -> { type: :ACCOUNT_HOLDER, name: String } + end + + type ip_metadata_feature = { type: :IP_METADATA, name: String } + + class IPMetadataFeature < Lithic::Internal::Type::BaseModel + attr_accessor type: :IP_METADATA + + attr_reader name: String? + + def name=: (String) -> String + + def initialize: (?name: String, ?type: :IP_METADATA) -> void + + def to_hash: -> { type: :IP_METADATA, name: String } + end + + type spend_velocity_feature = + { + period: Lithic::Models::AuthRules::velocity_limit_period, + scope: Lithic::Models::AuthRules::RuleFeature::SpendVelocityFeature::scope, + type: :SPEND_VELOCITY, + filters: Lithic::AuthRules::VelocityLimitFilters, + name: String + } + + class SpendVelocityFeature < Lithic::Internal::Type::BaseModel + attr_accessor period: Lithic::Models::AuthRules::velocity_limit_period + + attr_accessor scope: Lithic::Models::AuthRules::RuleFeature::SpendVelocityFeature::scope + + attr_accessor type: :SPEND_VELOCITY + + attr_reader filters: Lithic::AuthRules::VelocityLimitFilters? + + def filters=: ( + Lithic::AuthRules::VelocityLimitFilters + ) -> Lithic::AuthRules::VelocityLimitFilters + + attr_reader name: String? + + def name=: (String) -> String + + def initialize: ( + period: Lithic::Models::AuthRules::velocity_limit_period, + scope: Lithic::Models::AuthRules::RuleFeature::SpendVelocityFeature::scope, + ?filters: Lithic::AuthRules::VelocityLimitFilters, + ?name: String, + ?type: :SPEND_VELOCITY + ) -> void + + def to_hash: -> { + period: Lithic::Models::AuthRules::velocity_limit_period, + scope: Lithic::Models::AuthRules::RuleFeature::SpendVelocityFeature::scope, + type: :SPEND_VELOCITY, + filters: Lithic::AuthRules::VelocityLimitFilters, + name: String + } + + type scope = :CARD | :ACCOUNT + + module Scope + extend Lithic::Internal::Type::Enum + + CARD: :CARD + ACCOUNT: :ACCOUNT + + def self?.values: -> ::Array[Lithic::Models::AuthRules::RuleFeature::SpendVelocityFeature::scope] + end + end + + def self?.variants: -> ::Array[Lithic::Models::AuthRules::rule_feature] + end + end + end +end diff --git a/sig/lithic/models/auth_rules/typescript_code_parameters.rbs b/sig/lithic/models/auth_rules/typescript_code_parameters.rbs new file mode 100644 index 00000000..15e19926 --- /dev/null +++ b/sig/lithic/models/auth_rules/typescript_code_parameters.rbs @@ -0,0 +1,27 @@ +module Lithic + module Models + module AuthRules + type typescript_code_parameters = + { + code: String, + features: ::Array[Lithic::Models::AuthRules::rule_feature] + } + + class TypescriptCodeParameters < Lithic::Internal::Type::BaseModel + attr_accessor code: String + + attr_accessor features: ::Array[Lithic::Models::AuthRules::rule_feature] + + def initialize: ( + code: String, + features: ::Array[Lithic::Models::AuthRules::rule_feature] + ) -> void + + def to_hash: -> { + code: String, + features: ::Array[Lithic::Models::AuthRules::rule_feature] + } + end + end + end +end diff --git a/sig/lithic/models/auth_rules/v2/backtest_results.rbs b/sig/lithic/models/auth_rules/v2/backtest_results.rbs index a83b34ea..ac44fcaf 100644 --- a/sig/lithic/models/auth_rules/v2/backtest_results.rbs +++ b/sig/lithic/models/auth_rules/v2/backtest_results.rbs @@ -50,29 +50,16 @@ module Lithic } end - type simulation_parameters = - { auth_rule_token: String, end_: Time, start: Time } + type simulation_parameters = { end_: Time, start: Time } class SimulationParameters < Lithic::Internal::Type::BaseModel - attr_reader auth_rule_token: String? + attr_accessor end_: Time - def auth_rule_token=: (String) -> String + attr_accessor start: Time - attr_reader end_: Time? + def initialize: (end_: Time, start: Time) -> void - def end_=: (Time) -> Time - - attr_reader start: Time? - - def start=: (Time) -> Time - - def initialize: ( - ?auth_rule_token: String, - ?end_: Time, - ?start: Time - ) -> void - - def to_hash: -> { auth_rule_token: String, end_: Time, start: Time } + def to_hash: -> { end_: Time, start: Time } end end end diff --git a/sig/lithic/models/auth_rules/v2_create_params.rbs b/sig/lithic/models/auth_rules/v2_create_params.rbs index fa436f3b..f674471f 100644 --- a/sig/lithic/models/auth_rules/v2_create_params.rbs +++ b/sig/lithic/models/auth_rules/v2_create_params.rbs @@ -86,6 +86,7 @@ module Lithic | Lithic::AuthRules::ConditionalAuthorizationActionParameters | Lithic::AuthRules::ConditionalACHActionParameters | Lithic::AuthRules::ConditionalTokenizationActionParameters + | Lithic::AuthRules::TypescriptCodeParameters module Parameters extend Lithic::Internal::Type::Union @@ -98,6 +99,7 @@ module Lithic | :VELOCITY_LIMIT | :MERCHANT_LOCK | :CONDITIONAL_ACTION + | :TYPESCRIPT_CODE module Type extend Lithic::Internal::Type::Enum @@ -106,6 +108,7 @@ module Lithic VELOCITY_LIMIT: :VELOCITY_LIMIT MERCHANT_LOCK: :MERCHANT_LOCK CONDITIONAL_ACTION: :CONDITIONAL_ACTION + TYPESCRIPT_CODE: :TYPESCRIPT_CODE def self?.values: -> ::Array[Lithic::Models::AuthRules::V2CreateParams::Body::AccountLevelRule::type_] end @@ -159,6 +162,7 @@ module Lithic | Lithic::AuthRules::ConditionalAuthorizationActionParameters | Lithic::AuthRules::ConditionalACHActionParameters | Lithic::AuthRules::ConditionalTokenizationActionParameters + | Lithic::AuthRules::TypescriptCodeParameters module Parameters extend Lithic::Internal::Type::Union @@ -171,6 +175,7 @@ module Lithic | :VELOCITY_LIMIT | :MERCHANT_LOCK | :CONDITIONAL_ACTION + | :TYPESCRIPT_CODE module Type extend Lithic::Internal::Type::Enum @@ -179,6 +184,7 @@ module Lithic VELOCITY_LIMIT: :VELOCITY_LIMIT MERCHANT_LOCK: :MERCHANT_LOCK CONDITIONAL_ACTION: :CONDITIONAL_ACTION + TYPESCRIPT_CODE: :TYPESCRIPT_CODE def self?.values: -> ::Array[Lithic::Models::AuthRules::V2CreateParams::Body::CardLevelRule::type_] end @@ -190,6 +196,8 @@ module Lithic program_level: bool, type: Lithic::Models::AuthRules::V2CreateParams::Body::ProgramLevelRule::type_, event_stream: Lithic::Models::AuthRules::event_stream, + excluded_account_tokens: ::Array[String], + excluded_business_account_tokens: ::Array[String], excluded_card_tokens: ::Array[String], name: String? } @@ -207,6 +215,16 @@ module Lithic Lithic::Models::AuthRules::event_stream ) -> Lithic::Models::AuthRules::event_stream + attr_reader excluded_account_tokens: ::Array[String]? + + def excluded_account_tokens=: (::Array[String]) -> ::Array[String] + + attr_reader excluded_business_account_tokens: ::Array[String]? + + def excluded_business_account_tokens=: ( + ::Array[String] + ) -> ::Array[String] + attr_reader excluded_card_tokens: ::Array[String]? def excluded_card_tokens=: (::Array[String]) -> ::Array[String] @@ -218,6 +236,8 @@ module Lithic program_level: bool, type: Lithic::Models::AuthRules::V2CreateParams::Body::ProgramLevelRule::type_, ?event_stream: Lithic::Models::AuthRules::event_stream, + ?excluded_account_tokens: ::Array[String], + ?excluded_business_account_tokens: ::Array[String], ?excluded_card_tokens: ::Array[String], ?name: String? ) -> void @@ -227,6 +247,8 @@ module Lithic program_level: bool, type: Lithic::Models::AuthRules::V2CreateParams::Body::ProgramLevelRule::type_, event_stream: Lithic::Models::AuthRules::event_stream, + excluded_account_tokens: ::Array[String], + excluded_business_account_tokens: ::Array[String], excluded_card_tokens: ::Array[String], name: String? } @@ -239,6 +261,7 @@ module Lithic | Lithic::AuthRules::ConditionalAuthorizationActionParameters | Lithic::AuthRules::ConditionalACHActionParameters | Lithic::AuthRules::ConditionalTokenizationActionParameters + | Lithic::AuthRules::TypescriptCodeParameters module Parameters extend Lithic::Internal::Type::Union @@ -251,6 +274,7 @@ module Lithic | :VELOCITY_LIMIT | :MERCHANT_LOCK | :CONDITIONAL_ACTION + | :TYPESCRIPT_CODE module Type extend Lithic::Internal::Type::Enum @@ -259,6 +283,7 @@ module Lithic VELOCITY_LIMIT: :VELOCITY_LIMIT MERCHANT_LOCK: :MERCHANT_LOCK CONDITIONAL_ACTION: :CONDITIONAL_ACTION + TYPESCRIPT_CODE: :TYPESCRIPT_CODE def self?.values: -> ::Array[Lithic::Models::AuthRules::V2CreateParams::Body::ProgramLevelRule::type_] end diff --git a/sig/lithic/models/auth_rules/v2_draft_params.rbs b/sig/lithic/models/auth_rules/v2_draft_params.rbs index e212095b..005a0955 100644 --- a/sig/lithic/models/auth_rules/v2_draft_params.rbs +++ b/sig/lithic/models/auth_rules/v2_draft_params.rbs @@ -36,6 +36,7 @@ module Lithic | Lithic::AuthRules::ConditionalAuthorizationActionParameters | Lithic::AuthRules::ConditionalACHActionParameters | Lithic::AuthRules::ConditionalTokenizationActionParameters + | Lithic::AuthRules::TypescriptCodeParameters module Parameters extend Lithic::Internal::Type::Union diff --git a/sig/lithic/models/auth_rules/v2_list_versions_params.rbs b/sig/lithic/models/auth_rules/v2_list_versions_params.rbs new file mode 100644 index 00000000..b561f2a4 --- /dev/null +++ b/sig/lithic/models/auth_rules/v2_list_versions_params.rbs @@ -0,0 +1,25 @@ +module Lithic + module Models + module AuthRules + type v2_list_versions_params = + { auth_rule_token: String } & Lithic::Internal::Type::request_parameters + + class V2ListVersionsParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_accessor auth_rule_token: String + + def initialize: ( + auth_rule_token: String, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + auth_rule_token: String, + request_options: Lithic::RequestOptions + } + end + end + end +end diff --git a/sig/lithic/models/auth_rules/v2_list_versions_response.rbs b/sig/lithic/models/auth_rules/v2_list_versions_response.rbs new file mode 100644 index 00000000..d1cc0bf0 --- /dev/null +++ b/sig/lithic/models/auth_rules/v2_list_versions_response.rbs @@ -0,0 +1,18 @@ +module Lithic + module Models + module AuthRules + type v2_list_versions_response = + { data: ::Array[Lithic::AuthRules::AuthRuleVersion] } + + class V2ListVersionsResponse < Lithic::Internal::Type::BaseModel + attr_accessor data: ::Array[Lithic::AuthRules::AuthRuleVersion] + + def initialize: ( + data: ::Array[Lithic::AuthRules::AuthRuleVersion] + ) -> void + + def to_hash: -> { data: ::Array[Lithic::AuthRules::AuthRuleVersion] } + end + end + end +end diff --git a/sig/lithic/models/auth_rules/v2_retrieve_features_response.rbs b/sig/lithic/models/auth_rules/v2_retrieve_features_response.rbs index b592437e..c6d6c903 100644 --- a/sig/lithic/models/auth_rules/v2_retrieve_features_response.rbs +++ b/sig/lithic/models/auth_rules/v2_retrieve_features_response.rbs @@ -24,14 +24,14 @@ module Lithic type feature = { - filters: Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters, + filters: Lithic::AuthRules::VelocityLimitFilters, period: Lithic::Models::AuthRules::velocity_limit_period, scope: Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::scope, value: Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Value } class Feature < Lithic::Internal::Type::BaseModel - attr_accessor filters: Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters + attr_accessor filters: Lithic::AuthRules::VelocityLimitFilters attr_accessor period: Lithic::Models::AuthRules::velocity_limit_period @@ -40,95 +40,19 @@ module Lithic attr_accessor value: Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Value def initialize: ( - filters: Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters, + filters: Lithic::AuthRules::VelocityLimitFilters, period: Lithic::Models::AuthRules::velocity_limit_period, scope: Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::scope, value: Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Value ) -> void def to_hash: -> { - filters: Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters, + filters: Lithic::AuthRules::VelocityLimitFilters, period: Lithic::Models::AuthRules::velocity_limit_period, scope: Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::scope, value: Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Value } - type filters = - { - exclude_countries: ::Array[String]?, - exclude_mccs: ::Array[String]?, - include_countries: ::Array[String]?, - include_mccs: ::Array[String]?, - include_pan_entry_modes: ::Array[Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters::include_pan_entry_mode]? - } - - class Filters < Lithic::Internal::Type::BaseModel - attr_accessor exclude_countries: ::Array[String]? - - attr_accessor exclude_mccs: ::Array[String]? - - attr_accessor include_countries: ::Array[String]? - - attr_accessor include_mccs: ::Array[String]? - - attr_accessor include_pan_entry_modes: ::Array[Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters::include_pan_entry_mode]? - - def initialize: ( - ?exclude_countries: ::Array[String]?, - ?exclude_mccs: ::Array[String]?, - ?include_countries: ::Array[String]?, - ?include_mccs: ::Array[String]?, - ?include_pan_entry_modes: ::Array[Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters::include_pan_entry_mode]? - ) -> void - - def to_hash: -> { - exclude_countries: ::Array[String]?, - exclude_mccs: ::Array[String]?, - include_countries: ::Array[String]?, - include_mccs: ::Array[String]?, - include_pan_entry_modes: ::Array[Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters::include_pan_entry_mode]? - } - - type include_pan_entry_mode = - :AUTO_ENTRY - | :BAR_CODE - | :CONTACTLESS - | :CREDENTIAL_ON_FILE - | :ECOMMERCE - | :ERROR_KEYED - | :ERROR_MAGNETIC_STRIPE - | :ICC - | :KEY_ENTERED - | :MAGNETIC_STRIPE - | :MANUAL - | :OCR - | :SECURE_CARDLESS - | :UNSPECIFIED - | :UNKNOWN - - module IncludePanEntryMode - extend Lithic::Internal::Type::Enum - - AUTO_ENTRY: :AUTO_ENTRY - BAR_CODE: :BAR_CODE - CONTACTLESS: :CONTACTLESS - CREDENTIAL_ON_FILE: :CREDENTIAL_ON_FILE - ECOMMERCE: :ECOMMERCE - ERROR_KEYED: :ERROR_KEYED - ERROR_MAGNETIC_STRIPE: :ERROR_MAGNETIC_STRIPE - ICC: :ICC - KEY_ENTERED: :KEY_ENTERED - MAGNETIC_STRIPE: :MAGNETIC_STRIPE - MANUAL: :MANUAL - OCR: :OCR - SECURE_CARDLESS: :SECURE_CARDLESS - UNSPECIFIED: :UNSPECIFIED - UNKNOWN: :UNKNOWN - - def self?.values: -> ::Array[Lithic::Models::AuthRules::V2RetrieveFeaturesResponse::Feature::Filters::include_pan_entry_mode] - end - end - type scope = :CARD | :ACCOUNT module Scope diff --git a/sig/lithic/models/auth_rules/v2_retrieve_report_response.rbs b/sig/lithic/models/auth_rules/v2_retrieve_report_response.rbs index 736a1317..d109c27e 100644 --- a/sig/lithic/models/auth_rules/v2_retrieve_report_response.rbs +++ b/sig/lithic/models/auth_rules/v2_retrieve_report_response.rbs @@ -36,7 +36,8 @@ module Lithic { current_version_statistics: Lithic::AuthRules::ReportStats?, date: Date, - draft_version_statistics: Lithic::AuthRules::ReportStats? + draft_version_statistics: Lithic::AuthRules::ReportStats?, + versions: ::Array[Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version] } class DailyStatistic < Lithic::Internal::Type::BaseModel @@ -46,17 +47,671 @@ module Lithic attr_accessor draft_version_statistics: Lithic::AuthRules::ReportStats? + attr_accessor versions: ::Array[Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version] + def initialize: ( current_version_statistics: Lithic::AuthRules::ReportStats?, date: Date, - draft_version_statistics: Lithic::AuthRules::ReportStats? + draft_version_statistics: Lithic::AuthRules::ReportStats?, + versions: ::Array[Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version] ) -> void def to_hash: -> { current_version_statistics: Lithic::AuthRules::ReportStats?, date: Date, - draft_version_statistics: Lithic::AuthRules::ReportStats? + draft_version_statistics: Lithic::AuthRules::ReportStats?, + versions: ::Array[Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version] } + + type version = + { + action_counts: ::Hash[Symbol, Integer], + examples: ::Array[Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example], + state: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::state, + version: Integer + } + + class Version < Lithic::Internal::Type::BaseModel + attr_accessor action_counts: ::Hash[Symbol, Integer] + + attr_accessor examples: ::Array[Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example] + + attr_accessor state: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::state + + attr_accessor version: Integer + + def initialize: ( + action_counts: ::Hash[Symbol, Integer], + examples: ::Array[Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example], + state: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::state, + version: Integer + ) -> void + + def to_hash: -> { + action_counts: ::Hash[Symbol, Integer], + examples: ::Array[Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example], + state: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::state, + version: Integer + } + + type example = + { + actions: ::Array[Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::action], + event_token: String, + timestamp: Time + } + + class Example < Lithic::Internal::Type::BaseModel + attr_accessor actions: ::Array[Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::action] + + attr_accessor event_token: String + + attr_accessor timestamp: Time + + def initialize: ( + actions: ::Array[Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::action], + event_token: String, + timestamp: Time + ) -> void + + def to_hash: -> { + actions: ::Array[Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::action], + event_token: String, + timestamp: Time + } + + type action = + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization + | Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ChallengeActionAuthorization + | Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ResultAuthentication3DSAction + | Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization + | Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction + | Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ApproveActionACH + | Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction + + module Action + extend Lithic::Internal::Type::Union + + type decline_action_authorization = + { + code: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::code, + type: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::type_ + } + + class DeclineActionAuthorization < Lithic::Internal::Type::BaseModel + attr_accessor code: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::code + + attr_accessor type: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::type_ + + def initialize: ( + code: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::code, + type: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::type_ + ) -> void + + def to_hash: -> { + code: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::code, + type: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::type_ + } + + type code = + :ACCOUNT_DAILY_SPEND_LIMIT_EXCEEDED + | :ACCOUNT_DELINQUENT + | :ACCOUNT_INACTIVE + | :ACCOUNT_LIFETIME_SPEND_LIMIT_EXCEEDED + | :ACCOUNT_MONTHLY_SPEND_LIMIT_EXCEEDED + | :ACCOUNT_PAUSED + | :ACCOUNT_UNDER_REVIEW + | :ADDRESS_INCORRECT + | :APPROVED + | :AUTH_RULE_ALLOWED_COUNTRY + | :AUTH_RULE_ALLOWED_MCC + | :AUTH_RULE_BLOCKED_COUNTRY + | :AUTH_RULE_BLOCKED_MCC + | :AUTH_RULE + | :CARD_CLOSED + | :CARD_CRYPTOGRAM_VALIDATION_FAILURE + | :CARD_EXPIRED + | :CARD_EXPIRY_DATE_INCORRECT + | :CARD_INVALID + | :CARD_NOT_ACTIVATED + | :CARD_PAUSED + | :CARD_PIN_INCORRECT + | :CARD_RESTRICTED + | :CARD_SECURITY_CODE_INCORRECT + | :CARD_SPEND_LIMIT_EXCEEDED + | :CONTACT_CARD_ISSUER + | :CUSTOMER_ASA_TIMEOUT + | :CUSTOM_ASA_RESULT + | :DECLINED + | :DO_NOT_HONOR + | :DRIVER_NUMBER_INVALID + | :FORMAT_ERROR + | :INSUFFICIENT_FUNDING_SOURCE_BALANCE + | :INSUFFICIENT_FUNDS + | :LITHIC_SYSTEM_ERROR + | :LITHIC_SYSTEM_RATE_LIMIT + | :MALFORMED_ASA_RESPONSE + | :MERCHANT_INVALID + | :MERCHANT_LOCKED_CARD_ATTEMPTED_ELSEWHERE + | :MERCHANT_NOT_PERMITTED + | :OVER_REVERSAL_ATTEMPTED + | :PIN_BLOCKED + | :PROGRAM_CARD_SPEND_LIMIT_EXCEEDED + | :PROGRAM_SUSPENDED + | :PROGRAM_USAGE_RESTRICTION + | :REVERSAL_UNMATCHED + | :SECURITY_VIOLATION + | :SINGLE_USE_CARD_REATTEMPTED + | :SUSPECTED_FRAUD + | :TRANSACTION_INVALID + | :TRANSACTION_NOT_PERMITTED_TO_ACQUIRER_OR_TERMINAL + | :TRANSACTION_NOT_PERMITTED_TO_ISSUER_OR_CARDHOLDER + | :TRANSACTION_PREVIOUSLY_COMPLETED + | :UNAUTHORIZED_MERCHANT + | :VEHICLE_NUMBER_INVALID + | :CARDHOLDER_CHALLENGED + | :CARDHOLDER_CHALLENGE_FAILED + + module Code + extend Lithic::Internal::Type::Enum + + ACCOUNT_DAILY_SPEND_LIMIT_EXCEEDED: :ACCOUNT_DAILY_SPEND_LIMIT_EXCEEDED + ACCOUNT_DELINQUENT: :ACCOUNT_DELINQUENT + ACCOUNT_INACTIVE: :ACCOUNT_INACTIVE + ACCOUNT_LIFETIME_SPEND_LIMIT_EXCEEDED: :ACCOUNT_LIFETIME_SPEND_LIMIT_EXCEEDED + ACCOUNT_MONTHLY_SPEND_LIMIT_EXCEEDED: :ACCOUNT_MONTHLY_SPEND_LIMIT_EXCEEDED + ACCOUNT_PAUSED: :ACCOUNT_PAUSED + ACCOUNT_UNDER_REVIEW: :ACCOUNT_UNDER_REVIEW + ADDRESS_INCORRECT: :ADDRESS_INCORRECT + APPROVED: :APPROVED + AUTH_RULE_ALLOWED_COUNTRY: :AUTH_RULE_ALLOWED_COUNTRY + AUTH_RULE_ALLOWED_MCC: :AUTH_RULE_ALLOWED_MCC + AUTH_RULE_BLOCKED_COUNTRY: :AUTH_RULE_BLOCKED_COUNTRY + AUTH_RULE_BLOCKED_MCC: :AUTH_RULE_BLOCKED_MCC + AUTH_RULE: :AUTH_RULE + CARD_CLOSED: :CARD_CLOSED + CARD_CRYPTOGRAM_VALIDATION_FAILURE: :CARD_CRYPTOGRAM_VALIDATION_FAILURE + CARD_EXPIRED: :CARD_EXPIRED + CARD_EXPIRY_DATE_INCORRECT: :CARD_EXPIRY_DATE_INCORRECT + CARD_INVALID: :CARD_INVALID + CARD_NOT_ACTIVATED: :CARD_NOT_ACTIVATED + CARD_PAUSED: :CARD_PAUSED + CARD_PIN_INCORRECT: :CARD_PIN_INCORRECT + CARD_RESTRICTED: :CARD_RESTRICTED + CARD_SECURITY_CODE_INCORRECT: :CARD_SECURITY_CODE_INCORRECT + CARD_SPEND_LIMIT_EXCEEDED: :CARD_SPEND_LIMIT_EXCEEDED + CONTACT_CARD_ISSUER: :CONTACT_CARD_ISSUER + CUSTOMER_ASA_TIMEOUT: :CUSTOMER_ASA_TIMEOUT + CUSTOM_ASA_RESULT: :CUSTOM_ASA_RESULT + DECLINED: :DECLINED + DO_NOT_HONOR: :DO_NOT_HONOR + DRIVER_NUMBER_INVALID: :DRIVER_NUMBER_INVALID + FORMAT_ERROR: :FORMAT_ERROR + INSUFFICIENT_FUNDING_SOURCE_BALANCE: :INSUFFICIENT_FUNDING_SOURCE_BALANCE + INSUFFICIENT_FUNDS: :INSUFFICIENT_FUNDS + LITHIC_SYSTEM_ERROR: :LITHIC_SYSTEM_ERROR + LITHIC_SYSTEM_RATE_LIMIT: :LITHIC_SYSTEM_RATE_LIMIT + MALFORMED_ASA_RESPONSE: :MALFORMED_ASA_RESPONSE + MERCHANT_INVALID: :MERCHANT_INVALID + MERCHANT_LOCKED_CARD_ATTEMPTED_ELSEWHERE: :MERCHANT_LOCKED_CARD_ATTEMPTED_ELSEWHERE + MERCHANT_NOT_PERMITTED: :MERCHANT_NOT_PERMITTED + OVER_REVERSAL_ATTEMPTED: :OVER_REVERSAL_ATTEMPTED + PIN_BLOCKED: :PIN_BLOCKED + PROGRAM_CARD_SPEND_LIMIT_EXCEEDED: :PROGRAM_CARD_SPEND_LIMIT_EXCEEDED + PROGRAM_SUSPENDED: :PROGRAM_SUSPENDED + PROGRAM_USAGE_RESTRICTION: :PROGRAM_USAGE_RESTRICTION + REVERSAL_UNMATCHED: :REVERSAL_UNMATCHED + SECURITY_VIOLATION: :SECURITY_VIOLATION + SINGLE_USE_CARD_REATTEMPTED: :SINGLE_USE_CARD_REATTEMPTED + SUSPECTED_FRAUD: :SUSPECTED_FRAUD + TRANSACTION_INVALID: :TRANSACTION_INVALID + TRANSACTION_NOT_PERMITTED_TO_ACQUIRER_OR_TERMINAL: :TRANSACTION_NOT_PERMITTED_TO_ACQUIRER_OR_TERMINAL + TRANSACTION_NOT_PERMITTED_TO_ISSUER_OR_CARDHOLDER: :TRANSACTION_NOT_PERMITTED_TO_ISSUER_OR_CARDHOLDER + TRANSACTION_PREVIOUSLY_COMPLETED: :TRANSACTION_PREVIOUSLY_COMPLETED + UNAUTHORIZED_MERCHANT: :UNAUTHORIZED_MERCHANT + VEHICLE_NUMBER_INVALID: :VEHICLE_NUMBER_INVALID + CARDHOLDER_CHALLENGED: :CARDHOLDER_CHALLENGED + CARDHOLDER_CHALLENGE_FAILED: :CARDHOLDER_CHALLENGE_FAILED + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::code] + end + + type type_ = :DECLINE + + module Type + extend Lithic::Internal::Type::Enum + + DECLINE: :DECLINE + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionAuthorization::type_] + end + end + + type challenge_action_authorization = + { + type: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ChallengeActionAuthorization::type_ + } + + class ChallengeActionAuthorization < Lithic::Internal::Type::BaseModel + attr_accessor type: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ChallengeActionAuthorization::type_ + + def initialize: ( + type: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ChallengeActionAuthorization::type_ + ) -> void + + def to_hash: -> { + type: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ChallengeActionAuthorization::type_ + } + + type type_ = :CHALLENGE + + module Type + extend Lithic::Internal::Type::Enum + + CHALLENGE: :CHALLENGE + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ChallengeActionAuthorization::type_] + end + end + + type result_authentication3_ds_action = + { + type: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ResultAuthentication3DSAction::type_ + } + + class ResultAuthentication3DSAction < Lithic::Internal::Type::BaseModel + attr_accessor type: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ResultAuthentication3DSAction::type_ + + def initialize: ( + type: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ResultAuthentication3DSAction::type_ + ) -> void + + def to_hash: -> { + type: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ResultAuthentication3DSAction::type_ + } + + type type_ = :DECLINE | :CHALLENGE + + module Type + extend Lithic::Internal::Type::Enum + + DECLINE: :DECLINE + CHALLENGE: :CHALLENGE + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ResultAuthentication3DSAction::type_] + end + end + + type decline_action_tokenization = + { + type: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::type_, + reason: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::reason + } + + class DeclineActionTokenization < Lithic::Internal::Type::BaseModel + attr_accessor type: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::type_ + + attr_reader reason: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::reason? + + def reason=: ( + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::reason + ) -> Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::reason + + def initialize: ( + type: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::type_, + ?reason: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::reason + ) -> void + + def to_hash: -> { + type: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::type_, + reason: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::reason + } + + type type_ = :DECLINE + + module Type + extend Lithic::Internal::Type::Enum + + DECLINE: :DECLINE + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::type_] + end + + type reason = + :ACCOUNT_SCORE_1 + | :DEVICE_SCORE_1 + | :ALL_WALLET_DECLINE_REASONS_PRESENT + | :WALLET_RECOMMENDED_DECISION_RED + | :CVC_MISMATCH + | :CARD_EXPIRY_MONTH_MISMATCH + | :CARD_EXPIRY_YEAR_MISMATCH + | :CARD_INVALID_STATE + | :CUSTOMER_RED_PATH + | :INVALID_CUSTOMER_RESPONSE + | :NETWORK_FAILURE + | :GENERIC_DECLINE + | :DIGITAL_CARD_ART_REQUIRED + + module Reason + extend Lithic::Internal::Type::Enum + + ACCOUNT_SCORE_1: :ACCOUNT_SCORE_1 + DEVICE_SCORE_1: :DEVICE_SCORE_1 + ALL_WALLET_DECLINE_REASONS_PRESENT: :ALL_WALLET_DECLINE_REASONS_PRESENT + WALLET_RECOMMENDED_DECISION_RED: :WALLET_RECOMMENDED_DECISION_RED + CVC_MISMATCH: :CVC_MISMATCH + CARD_EXPIRY_MONTH_MISMATCH: :CARD_EXPIRY_MONTH_MISMATCH + CARD_EXPIRY_YEAR_MISMATCH: :CARD_EXPIRY_YEAR_MISMATCH + CARD_INVALID_STATE: :CARD_INVALID_STATE + CUSTOMER_RED_PATH: :CUSTOMER_RED_PATH + INVALID_CUSTOMER_RESPONSE: :INVALID_CUSTOMER_RESPONSE + NETWORK_FAILURE: :NETWORK_FAILURE + GENERIC_DECLINE: :GENERIC_DECLINE + DIGITAL_CARD_ART_REQUIRED: :DIGITAL_CARD_ART_REQUIRED + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::DeclineActionTokenization::reason] + end + end + + type require_tfa_action = + { + type: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::type_, + reason: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::reason + } + + class RequireTfaAction < Lithic::Internal::Type::BaseModel + attr_accessor type: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::type_ + + attr_reader reason: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::reason? + + def reason=: ( + Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::reason + ) -> Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::reason + + def initialize: ( + type: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::type_, + ?reason: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::reason + ) -> void + + def to_hash: -> { + type: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::type_, + reason: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::reason + } + + type type_ = :REQUIRE_TFA + + module Type + extend Lithic::Internal::Type::Enum + + REQUIRE_TFA: :REQUIRE_TFA + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::type_] + end + + type reason = + :WALLET_RECOMMENDED_TFA + | :SUSPICIOUS_ACTIVITY + | :DEVICE_RECENTLY_LOST + | :TOO_MANY_RECENT_ATTEMPTS + | :TOO_MANY_RECENT_TOKENS + | :TOO_MANY_DIFFERENT_CARDHOLDERS + | :OUTSIDE_HOME_TERRITORY + | :HAS_SUSPENDED_TOKENS + | :HIGH_RISK + | :ACCOUNT_SCORE_LOW + | :DEVICE_SCORE_LOW + | :CARD_STATE_TFA + | :HARDCODED_TFA + | :CUSTOMER_RULE_TFA + | :DEVICE_HOST_CARD_EMULATION + + module Reason + extend Lithic::Internal::Type::Enum + + WALLET_RECOMMENDED_TFA: :WALLET_RECOMMENDED_TFA + SUSPICIOUS_ACTIVITY: :SUSPICIOUS_ACTIVITY + DEVICE_RECENTLY_LOST: :DEVICE_RECENTLY_LOST + TOO_MANY_RECENT_ATTEMPTS: :TOO_MANY_RECENT_ATTEMPTS + TOO_MANY_RECENT_TOKENS: :TOO_MANY_RECENT_TOKENS + TOO_MANY_DIFFERENT_CARDHOLDERS: :TOO_MANY_DIFFERENT_CARDHOLDERS + OUTSIDE_HOME_TERRITORY: :OUTSIDE_HOME_TERRITORY + HAS_SUSPENDED_TOKENS: :HAS_SUSPENDED_TOKENS + HIGH_RISK: :HIGH_RISK + ACCOUNT_SCORE_LOW: :ACCOUNT_SCORE_LOW + DEVICE_SCORE_LOW: :DEVICE_SCORE_LOW + CARD_STATE_TFA: :CARD_STATE_TFA + HARDCODED_TFA: :HARDCODED_TFA + CUSTOMER_RULE_TFA: :CUSTOMER_RULE_TFA + DEVICE_HOST_CARD_EMULATION: :DEVICE_HOST_CARD_EMULATION + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::RequireTfaAction::reason] + end + end + + type approve_action_ach = + { + type: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ApproveActionACH::type_ + } + + class ApproveActionACH < Lithic::Internal::Type::BaseModel + attr_accessor type: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ApproveActionACH::type_ + + def initialize: ( + type: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ApproveActionACH::type_ + ) -> void + + def to_hash: -> { + type: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ApproveActionACH::type_ + } + + type type_ = :APPROVE + + module Type + extend Lithic::Internal::Type::Enum + + APPROVE: :APPROVE + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ApproveActionACH::type_] + end + end + + type return_action = + { + code: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::code, + type: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::type_ + } + + class ReturnAction < Lithic::Internal::Type::BaseModel + attr_accessor code: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::code + + attr_accessor type: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::type_ + + def initialize: ( + code: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::code, + type: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::type_ + ) -> void + + def to_hash: -> { + code: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::code, + type: Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::type_ + } + + type code = + :R01 + | :R02 + | :R03 + | :R04 + | :R05 + | :R06 + | :R07 + | :R08 + | :R09 + | :R10 + | :R11 + | :R12 + | :R13 + | :R14 + | :R15 + | :R16 + | :R17 + | :R18 + | :R19 + | :R20 + | :R21 + | :R22 + | :R23 + | :R24 + | :R25 + | :R26 + | :R27 + | :R28 + | :R29 + | :R30 + | :R31 + | :R32 + | :R33 + | :R34 + | :R35 + | :R36 + | :R37 + | :R38 + | :R39 + | :R40 + | :R41 + | :R42 + | :R43 + | :R44 + | :R45 + | :R46 + | :R47 + | :R50 + | :R51 + | :R52 + | :R53 + | :R61 + | :R62 + | :R67 + | :R68 + | :R69 + | :R70 + | :R71 + | :R72 + | :R73 + | :R74 + | :R75 + | :R76 + | :R77 + | :R80 + | :R81 + | :R82 + | :R83 + | :R84 + | :R85 + + module Code + extend Lithic::Internal::Type::Enum + + R01: :R01 + R02: :R02 + R03: :R03 + R04: :R04 + R05: :R05 + R06: :R06 + R07: :R07 + R08: :R08 + R09: :R09 + R10: :R10 + R11: :R11 + R12: :R12 + R13: :R13 + R14: :R14 + R15: :R15 + R16: :R16 + R17: :R17 + R18: :R18 + R19: :R19 + R20: :R20 + R21: :R21 + R22: :R22 + R23: :R23 + R24: :R24 + R25: :R25 + R26: :R26 + R27: :R27 + R28: :R28 + R29: :R29 + R30: :R30 + R31: :R31 + R32: :R32 + R33: :R33 + R34: :R34 + R35: :R35 + R36: :R36 + R37: :R37 + R38: :R38 + R39: :R39 + R40: :R40 + R41: :R41 + R42: :R42 + R43: :R43 + R44: :R44 + R45: :R45 + R46: :R46 + R47: :R47 + R50: :R50 + R51: :R51 + R52: :R52 + R53: :R53 + R61: :R61 + R62: :R62 + R67: :R67 + R68: :R68 + R69: :R69 + R70: :R70 + R71: :R71 + R72: :R72 + R73: :R73 + R74: :R74 + R75: :R75 + R76: :R76 + R77: :R77 + R80: :R80 + R81: :R81 + R82: :R82 + R83: :R83 + R84: :R84 + R85: :R85 + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::code] + end + + type type_ = :RETURN + + module Type + extend Lithic::Internal::Type::Enum + + RETURN: :RETURN + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::Action::ReturnAction::type_] + end + end + + def self?.variants: -> ::Array[Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::Example::action] + end + end + + type state = :ACTIVE | :SHADOW | :INACTIVE + + module State + extend Lithic::Internal::Type::Enum + + ACTIVE: :ACTIVE + SHADOW: :SHADOW + INACTIVE: :INACTIVE + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2RetrieveReportResponse::DailyStatistic::Version::state] + end + end end end end diff --git a/sig/lithic/models/auth_rules/v2_update_params.rbs b/sig/lithic/models/auth_rules/v2_update_params.rbs index ff05de20..55c971a5 100644 --- a/sig/lithic/models/auth_rules/v2_update_params.rbs +++ b/sig/lithic/models/auth_rules/v2_update_params.rbs @@ -131,6 +131,8 @@ module Lithic type program_level_rule = { + excluded_account_tokens: ::Array[String], + excluded_business_account_tokens: ::Array[String], excluded_card_tokens: ::Array[String], name: String?, program_level: bool, @@ -138,6 +140,16 @@ module Lithic } class ProgramLevelRule < Lithic::Internal::Type::BaseModel + attr_reader excluded_account_tokens: ::Array[String]? + + def excluded_account_tokens=: (::Array[String]) -> ::Array[String] + + attr_reader excluded_business_account_tokens: ::Array[String]? + + def excluded_business_account_tokens=: ( + ::Array[String] + ) -> ::Array[String] + attr_reader excluded_card_tokens: ::Array[String]? def excluded_card_tokens=: (::Array[String]) -> ::Array[String] @@ -155,6 +167,8 @@ module Lithic ) -> Lithic::Models::AuthRules::V2UpdateParams::Body::ProgramLevelRule::state def initialize: ( + ?excluded_account_tokens: ::Array[String], + ?excluded_business_account_tokens: ::Array[String], ?excluded_card_tokens: ::Array[String], ?name: String?, ?program_level: bool, @@ -162,6 +176,8 @@ module Lithic ) -> void def to_hash: -> { + excluded_account_tokens: ::Array[String], + excluded_business_account_tokens: ::Array[String], excluded_card_tokens: ::Array[String], name: String?, program_level: bool, diff --git a/sig/lithic/models/auth_rules/velocity_limit_filters.rbs b/sig/lithic/models/auth_rules/velocity_limit_filters.rbs new file mode 100644 index 00000000..844b5d5d --- /dev/null +++ b/sig/lithic/models/auth_rules/velocity_limit_filters.rbs @@ -0,0 +1,81 @@ +module Lithic + module Models + module AuthRules + type velocity_limit_filters = + { + exclude_countries: ::Array[String]?, + exclude_mccs: ::Array[String]?, + include_countries: ::Array[String]?, + include_mccs: ::Array[String]?, + include_pan_entry_modes: ::Array[Lithic::Models::AuthRules::VelocityLimitFilters::include_pan_entry_mode]? + } + + class VelocityLimitFilters < Lithic::Internal::Type::BaseModel + attr_accessor exclude_countries: ::Array[String]? + + attr_accessor exclude_mccs: ::Array[String]? + + attr_accessor include_countries: ::Array[String]? + + attr_accessor include_mccs: ::Array[String]? + + attr_accessor include_pan_entry_modes: ::Array[Lithic::Models::AuthRules::VelocityLimitFilters::include_pan_entry_mode]? + + def initialize: ( + ?exclude_countries: ::Array[String]?, + ?exclude_mccs: ::Array[String]?, + ?include_countries: ::Array[String]?, + ?include_mccs: ::Array[String]?, + ?include_pan_entry_modes: ::Array[Lithic::Models::AuthRules::VelocityLimitFilters::include_pan_entry_mode]? + ) -> void + + def to_hash: -> { + exclude_countries: ::Array[String]?, + exclude_mccs: ::Array[String]?, + include_countries: ::Array[String]?, + include_mccs: ::Array[String]?, + include_pan_entry_modes: ::Array[Lithic::Models::AuthRules::VelocityLimitFilters::include_pan_entry_mode]? + } + + type include_pan_entry_mode = + :AUTO_ENTRY + | :BAR_CODE + | :CONTACTLESS + | :CREDENTIAL_ON_FILE + | :ECOMMERCE + | :ERROR_KEYED + | :ERROR_MAGNETIC_STRIPE + | :ICC + | :KEY_ENTERED + | :MAGNETIC_STRIPE + | :MANUAL + | :OCR + | :SECURE_CARDLESS + | :UNSPECIFIED + | :UNKNOWN + + module IncludePanEntryMode + extend Lithic::Internal::Type::Enum + + AUTO_ENTRY: :AUTO_ENTRY + BAR_CODE: :BAR_CODE + CONTACTLESS: :CONTACTLESS + CREDENTIAL_ON_FILE: :CREDENTIAL_ON_FILE + ECOMMERCE: :ECOMMERCE + ERROR_KEYED: :ERROR_KEYED + ERROR_MAGNETIC_STRIPE: :ERROR_MAGNETIC_STRIPE + ICC: :ICC + KEY_ENTERED: :KEY_ENTERED + MAGNETIC_STRIPE: :MAGNETIC_STRIPE + MANUAL: :MANUAL + OCR: :OCR + SECURE_CARDLESS: :SECURE_CARDLESS + UNSPECIFIED: :UNSPECIFIED + UNKNOWN: :UNKNOWN + + def self?.values: -> ::Array[Lithic::Models::AuthRules::VelocityLimitFilters::include_pan_entry_mode] + end + end + end + end +end diff --git a/sig/lithic/models/auth_rules/velocity_limit_params.rbs b/sig/lithic/models/auth_rules/velocity_limit_params.rbs index d85272ca..cd93489d 100644 --- a/sig/lithic/models/auth_rules/velocity_limit_params.rbs +++ b/sig/lithic/models/auth_rules/velocity_limit_params.rbs @@ -5,7 +5,7 @@ module Lithic { period: Lithic::Models::AuthRules::velocity_limit_period, scope: Lithic::Models::AuthRules::VelocityLimitParams::scope, - filters: Lithic::AuthRules::VelocityLimitParams::Filters, + filters: Lithic::AuthRules::VelocityLimitFilters, limit_amount: Integer?, limit_count: Integer? } @@ -15,11 +15,11 @@ module Lithic attr_accessor scope: Lithic::Models::AuthRules::VelocityLimitParams::scope - attr_reader filters: Lithic::AuthRules::VelocityLimitParams::Filters? + attr_reader filters: Lithic::AuthRules::VelocityLimitFilters? def filters=: ( - Lithic::AuthRules::VelocityLimitParams::Filters - ) -> Lithic::AuthRules::VelocityLimitParams::Filters + Lithic::AuthRules::VelocityLimitFilters + ) -> Lithic::AuthRules::VelocityLimitFilters attr_accessor limit_amount: Integer? @@ -28,7 +28,7 @@ module Lithic def initialize: ( period: Lithic::Models::AuthRules::velocity_limit_period, scope: Lithic::Models::AuthRules::VelocityLimitParams::scope, - ?filters: Lithic::AuthRules::VelocityLimitParams::Filters, + ?filters: Lithic::AuthRules::VelocityLimitFilters, ?limit_amount: Integer?, ?limit_count: Integer? ) -> void @@ -36,7 +36,7 @@ module Lithic def to_hash: -> { period: Lithic::Models::AuthRules::velocity_limit_period, scope: Lithic::Models::AuthRules::VelocityLimitParams::scope, - filters: Lithic::AuthRules::VelocityLimitParams::Filters, + filters: Lithic::AuthRules::VelocityLimitFilters, limit_amount: Integer?, limit_count: Integer? } @@ -51,82 +51,6 @@ module Lithic def self?.values: -> ::Array[Lithic::Models::AuthRules::VelocityLimitParams::scope] end - - type filters = - { - exclude_countries: ::Array[String]?, - exclude_mccs: ::Array[String]?, - include_countries: ::Array[String]?, - include_mccs: ::Array[String]?, - include_pan_entry_modes: ::Array[Lithic::Models::AuthRules::VelocityLimitParams::Filters::include_pan_entry_mode]? - } - - class Filters < Lithic::Internal::Type::BaseModel - attr_accessor exclude_countries: ::Array[String]? - - attr_accessor exclude_mccs: ::Array[String]? - - attr_accessor include_countries: ::Array[String]? - - attr_accessor include_mccs: ::Array[String]? - - attr_accessor include_pan_entry_modes: ::Array[Lithic::Models::AuthRules::VelocityLimitParams::Filters::include_pan_entry_mode]? - - def initialize: ( - ?exclude_countries: ::Array[String]?, - ?exclude_mccs: ::Array[String]?, - ?include_countries: ::Array[String]?, - ?include_mccs: ::Array[String]?, - ?include_pan_entry_modes: ::Array[Lithic::Models::AuthRules::VelocityLimitParams::Filters::include_pan_entry_mode]? - ) -> void - - def to_hash: -> { - exclude_countries: ::Array[String]?, - exclude_mccs: ::Array[String]?, - include_countries: ::Array[String]?, - include_mccs: ::Array[String]?, - include_pan_entry_modes: ::Array[Lithic::Models::AuthRules::VelocityLimitParams::Filters::include_pan_entry_mode]? - } - - type include_pan_entry_mode = - :AUTO_ENTRY - | :BAR_CODE - | :CONTACTLESS - | :CREDENTIAL_ON_FILE - | :ECOMMERCE - | :ERROR_KEYED - | :ERROR_MAGNETIC_STRIPE - | :ICC - | :KEY_ENTERED - | :MAGNETIC_STRIPE - | :MANUAL - | :OCR - | :SECURE_CARDLESS - | :UNSPECIFIED - | :UNKNOWN - - module IncludePanEntryMode - extend Lithic::Internal::Type::Enum - - AUTO_ENTRY: :AUTO_ENTRY - BAR_CODE: :BAR_CODE - CONTACTLESS: :CONTACTLESS - CREDENTIAL_ON_FILE: :CREDENTIAL_ON_FILE - ECOMMERCE: :ECOMMERCE - ERROR_KEYED: :ERROR_KEYED - ERROR_MAGNETIC_STRIPE: :ERROR_MAGNETIC_STRIPE - ICC: :ICC - KEY_ENTERED: :KEY_ENTERED - MAGNETIC_STRIPE: :MAGNETIC_STRIPE - MANUAL: :MANUAL - OCR: :OCR - SECURE_CARDLESS: :SECURE_CARDLESS - UNSPECIFIED: :UNSPECIFIED - UNKNOWN: :UNKNOWN - - def self?.values: -> ::Array[Lithic::Models::AuthRules::VelocityLimitParams::Filters::include_pan_entry_mode] - end - end end end end diff --git a/sig/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rbs b/sig/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rbs index 0e9274ca..95ccc906 100644 --- a/sig/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rbs +++ b/sig/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rbs @@ -5,13 +5,13 @@ module Lithic account_token: String, card_token: String, created: Time, - customer_tokenization_decision: Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::CustomerTokenizationDecision?, digital_wallet_token_metadata: Lithic::TokenMetadata, event_type: Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent::event_type, issuer_decision: Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent::issuer_decision, tokenization_channel: Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent::tokenization_channel, tokenization_token: String, wallet_decisioning_info: Lithic::WalletDecisioningInfo, + customer_tokenization_decision: Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::CustomerTokenizationDecision?, device: Lithic::Device, rule_results: ::Array[Lithic::TokenizationRuleResult], tokenization_decline_reasons: ::Array[Lithic::Models::tokenization_decline_reason], @@ -26,8 +26,6 @@ module Lithic attr_accessor created: Time - attr_accessor customer_tokenization_decision: Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::CustomerTokenizationDecision? - attr_accessor digital_wallet_token_metadata: Lithic::TokenMetadata attr_accessor event_type: Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent::event_type @@ -40,6 +38,8 @@ module Lithic attr_accessor wallet_decisioning_info: Lithic::WalletDecisioningInfo + attr_accessor customer_tokenization_decision: Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::CustomerTokenizationDecision? + attr_reader device: Lithic::Device? def device=: (Lithic::Device) -> Lithic::Device @@ -72,13 +72,13 @@ module Lithic account_token: String, card_token: String, created: Time, - customer_tokenization_decision: Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::CustomerTokenizationDecision?, digital_wallet_token_metadata: Lithic::TokenMetadata, event_type: Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent::event_type, issuer_decision: Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent::issuer_decision, tokenization_channel: Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent::tokenization_channel, tokenization_token: String, wallet_decisioning_info: Lithic::WalletDecisioningInfo, + ?customer_tokenization_decision: Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::CustomerTokenizationDecision?, ?device: Lithic::Device, ?rule_results: ::Array[Lithic::TokenizationRuleResult], ?tokenization_decline_reasons: ::Array[Lithic::Models::tokenization_decline_reason], @@ -90,13 +90,13 @@ module Lithic account_token: String, card_token: String, created: Time, - customer_tokenization_decision: Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::CustomerTokenizationDecision?, digital_wallet_token_metadata: Lithic::TokenMetadata, event_type: Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent::event_type, issuer_decision: Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent::issuer_decision, tokenization_channel: Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent::tokenization_channel, tokenization_token: String, wallet_decisioning_info: Lithic::WalletDecisioningInfo, + customer_tokenization_decision: Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::CustomerTokenizationDecision?, device: Lithic::Device, rule_results: ::Array[Lithic::TokenizationRuleResult], tokenization_decline_reasons: ::Array[Lithic::Models::tokenization_decline_reason], @@ -104,6 +104,39 @@ module Lithic tokenization_tfa_reasons: ::Array[Lithic::Models::tokenization_tfa_reason] } + type event_type = :"digital_wallet.tokenization_approval_request" + + module EventType + extend Lithic::Internal::Type::Enum + + DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST: :"digital_wallet.tokenization_approval_request" + + def self?.values: -> ::Array[Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent::event_type] + end + + type issuer_decision = :APPROVED | :DENIED | :VERIFICATION_REQUIRED + + module IssuerDecision + extend Lithic::Internal::Type::Enum + + APPROVED: :APPROVED + DENIED: :DENIED + VERIFICATION_REQUIRED: :VERIFICATION_REQUIRED + + def self?.values: -> ::Array[Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent::issuer_decision] + end + + type tokenization_channel = :DIGITAL_WALLET | :MERCHANT + + module TokenizationChannel + extend Lithic::Internal::Type::Enum + + DIGITAL_WALLET: :DIGITAL_WALLET + MERCHANT: :MERCHANT + + def self?.values: -> ::Array[Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent::tokenization_channel] + end + type customer_tokenization_decision = { outcome: Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent::CustomerTokenizationDecision::outcome, @@ -161,39 +194,6 @@ module Lithic end end - type event_type = :"digital_wallet.tokenization_approval_request" - - module EventType - extend Lithic::Internal::Type::Enum - - DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST: :"digital_wallet.tokenization_approval_request" - - def self?.values: -> ::Array[Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent::event_type] - end - - type issuer_decision = :APPROVED | :DENIED | :VERIFICATION_REQUIRED - - module IssuerDecision - extend Lithic::Internal::Type::Enum - - APPROVED: :APPROVED - DENIED: :DENIED - VERIFICATION_REQUIRED: :VERIFICATION_REQUIRED - - def self?.values: -> ::Array[Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent::issuer_decision] - end - - type tokenization_channel = :DIGITAL_WALLET | :MERCHANT - - module TokenizationChannel - extend Lithic::Internal::Type::Enum - - DIGITAL_WALLET: :DIGITAL_WALLET - MERCHANT: :MERCHANT - - def self?.values: -> ::Array[Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent::tokenization_channel] - end - type tokenization_source = :ACCOUNT_ON_FILE | :CONTACTLESS_TAP diff --git a/sig/lithic/models/event.rbs b/sig/lithic/models/event.rbs index c2c6ce53..e6821385 100644 --- a/sig/lithic/models/event.rbs +++ b/sig/lithic/models/event.rbs @@ -49,7 +49,6 @@ module Lithic | :"card.renewed" | :"card.shipped" | :"card.updated" - | :"digital_wallet.tokenization_approval_request" | :"digital_wallet.tokenization_result" | :"digital_wallet.tokenization_two_factor_authentication_code" | :"digital_wallet.tokenization_two_factor_authentication_code_sent" @@ -106,7 +105,6 @@ module Lithic CARD_RENEWED: :"card.renewed" CARD_SHIPPED: :"card.shipped" CARD_UPDATED: :"card.updated" - DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST: :"digital_wallet.tokenization_approval_request" DIGITAL_WALLET_TOKENIZATION_RESULT: :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE: :"digital_wallet.tokenization_two_factor_authentication_code" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT: :"digital_wallet.tokenization_two_factor_authentication_code_sent" diff --git a/sig/lithic/models/event_list_params.rbs b/sig/lithic/models/event_list_params.rbs index 35d0111e..e36f292d 100644 --- a/sig/lithic/models/event_list_params.rbs +++ b/sig/lithic/models/event_list_params.rbs @@ -86,7 +86,6 @@ module Lithic | :"card.renewed" | :"card.shipped" | :"card.updated" - | :"digital_wallet.tokenization_approval_request" | :"digital_wallet.tokenization_result" | :"digital_wallet.tokenization_two_factor_authentication_code" | :"digital_wallet.tokenization_two_factor_authentication_code_sent" @@ -143,7 +142,6 @@ module Lithic CARD_RENEWED: :"card.renewed" CARD_SHIPPED: :"card.shipped" CARD_UPDATED: :"card.updated" - DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST: :"digital_wallet.tokenization_approval_request" DIGITAL_WALLET_TOKENIZATION_RESULT: :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE: :"digital_wallet.tokenization_two_factor_authentication_code" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT: :"digital_wallet.tokenization_two_factor_authentication_code_sent" diff --git a/sig/lithic/models/event_subscription.rbs b/sig/lithic/models/event_subscription.rbs index 525f1c37..9eb94d74 100644 --- a/sig/lithic/models/event_subscription.rbs +++ b/sig/lithic/models/event_subscription.rbs @@ -54,7 +54,6 @@ module Lithic | :"card.renewed" | :"card.shipped" | :"card.updated" - | :"digital_wallet.tokenization_approval_request" | :"digital_wallet.tokenization_result" | :"digital_wallet.tokenization_two_factor_authentication_code" | :"digital_wallet.tokenization_two_factor_authentication_code_sent" @@ -111,7 +110,6 @@ module Lithic CARD_RENEWED: :"card.renewed" CARD_SHIPPED: :"card.shipped" CARD_UPDATED: :"card.updated" - DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST: :"digital_wallet.tokenization_approval_request" DIGITAL_WALLET_TOKENIZATION_RESULT: :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE: :"digital_wallet.tokenization_two_factor_authentication_code" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT: :"digital_wallet.tokenization_two_factor_authentication_code_sent" diff --git a/sig/lithic/models/events/subscription_create_params.rbs b/sig/lithic/models/events/subscription_create_params.rbs index f6cc4f03..1b5580c6 100644 --- a/sig/lithic/models/events/subscription_create_params.rbs +++ b/sig/lithic/models/events/subscription_create_params.rbs @@ -64,7 +64,6 @@ module Lithic | :"card.renewed" | :"card.shipped" | :"card.updated" - | :"digital_wallet.tokenization_approval_request" | :"digital_wallet.tokenization_result" | :"digital_wallet.tokenization_two_factor_authentication_code" | :"digital_wallet.tokenization_two_factor_authentication_code_sent" @@ -121,7 +120,6 @@ module Lithic CARD_RENEWED: :"card.renewed" CARD_SHIPPED: :"card.shipped" CARD_UPDATED: :"card.updated" - DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST: :"digital_wallet.tokenization_approval_request" DIGITAL_WALLET_TOKENIZATION_RESULT: :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE: :"digital_wallet.tokenization_two_factor_authentication_code" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT: :"digital_wallet.tokenization_two_factor_authentication_code_sent" diff --git a/sig/lithic/models/events/subscription_send_simulated_example_params.rbs b/sig/lithic/models/events/subscription_send_simulated_example_params.rbs index 4872fff6..7adba661 100644 --- a/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +++ b/sig/lithic/models/events/subscription_send_simulated_example_params.rbs @@ -50,7 +50,6 @@ module Lithic | :"card.renewed" | :"card.shipped" | :"card.updated" - | :"digital_wallet.tokenization_approval_request" | :"digital_wallet.tokenization_result" | :"digital_wallet.tokenization_two_factor_authentication_code" | :"digital_wallet.tokenization_two_factor_authentication_code_sent" @@ -107,7 +106,6 @@ module Lithic CARD_RENEWED: :"card.renewed" CARD_SHIPPED: :"card.shipped" CARD_UPDATED: :"card.updated" - DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST: :"digital_wallet.tokenization_approval_request" DIGITAL_WALLET_TOKENIZATION_RESULT: :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE: :"digital_wallet.tokenization_two_factor_authentication_code" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT: :"digital_wallet.tokenization_two_factor_authentication_code_sent" diff --git a/sig/lithic/models/events/subscription_update_params.rbs b/sig/lithic/models/events/subscription_update_params.rbs index de089fa7..c66fd09a 100644 --- a/sig/lithic/models/events/subscription_update_params.rbs +++ b/sig/lithic/models/events/subscription_update_params.rbs @@ -69,7 +69,6 @@ module Lithic | :"card.renewed" | :"card.shipped" | :"card.updated" - | :"digital_wallet.tokenization_approval_request" | :"digital_wallet.tokenization_result" | :"digital_wallet.tokenization_two_factor_authentication_code" | :"digital_wallet.tokenization_two_factor_authentication_code_sent" @@ -126,7 +125,6 @@ module Lithic CARD_RENEWED: :"card.renewed" CARD_SHIPPED: :"card.shipped" CARD_UPDATED: :"card.updated" - DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST: :"digital_wallet.tokenization_approval_request" DIGITAL_WALLET_TOKENIZATION_RESULT: :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE: :"digital_wallet.tokenization_two_factor_authentication_code" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT: :"digital_wallet.tokenization_two_factor_authentication_code_sent" diff --git a/sig/lithic/models/financial_account.rbs b/sig/lithic/models/financial_account.rbs index c2faa523..45ac5404 100644 --- a/sig/lithic/models/financial_account.rbs +++ b/sig/lithic/models/financial_account.rbs @@ -168,6 +168,7 @@ module Lithic | :PROGRAM_RECEIVABLES | :COLLECTION | :PROGRAM_BANK_ACCOUNTS_PAYABLE + | :EARLY_DIRECT_DEPOSIT_FLOAT module Type extend Lithic::Internal::Type::Enum @@ -182,6 +183,7 @@ module Lithic PROGRAM_RECEIVABLES: :PROGRAM_RECEIVABLES COLLECTION: :COLLECTION PROGRAM_BANK_ACCOUNTS_PAYABLE: :PROGRAM_BANK_ACCOUNTS_PAYABLE + EARLY_DIRECT_DEPOSIT_FLOAT: :EARLY_DIRECT_DEPOSIT_FLOAT def self?.values: -> ::Array[Lithic::Models::FinancialAccount::type_] end diff --git a/sig/lithic/models/financial_account_list_params.rbs b/sig/lithic/models/financial_account_list_params.rbs index 6e8ea1fd..78f75425 100644 --- a/sig/lithic/models/financial_account_list_params.rbs +++ b/sig/lithic/models/financial_account_list_params.rbs @@ -40,7 +40,12 @@ module Lithic request_options: Lithic::RequestOptions } - type type_ = :ISSUING | :OPERATING | :RESERVE | :SECURITY + type type_ = + :ISSUING + | :OPERATING + | :RESERVE + | :SECURITY + | :EARLY_DIRECT_DEPOSIT_FLOAT module Type extend Lithic::Internal::Type::Enum @@ -49,6 +54,7 @@ module Lithic OPERATING: :OPERATING RESERVE: :RESERVE SECURITY: :SECURITY + EARLY_DIRECT_DEPOSIT_FLOAT: :EARLY_DIRECT_DEPOSIT_FLOAT def self?.values: -> ::Array[Lithic::Models::FinancialAccountListParams::type_] end diff --git a/sig/lithic/models/financial_accounts/interest_tier_schedule.rbs b/sig/lithic/models/financial_accounts/interest_tier_schedule.rbs index 51f6b9a2..3e411bd2 100644 --- a/sig/lithic/models/financial_accounts/interest_tier_schedule.rbs +++ b/sig/lithic/models/financial_accounts/interest_tier_schedule.rbs @@ -5,6 +5,7 @@ module Lithic { credit_product_token: String, effective_date: Date, + penalty_rates: top, tier_name: String, tier_rates: top } @@ -14,6 +15,10 @@ module Lithic attr_accessor effective_date: Date + attr_reader penalty_rates: top? + + def penalty_rates=: (top) -> top + attr_reader tier_name: String? def tier_name=: (String) -> String @@ -25,6 +30,7 @@ module Lithic def initialize: ( credit_product_token: String, effective_date: Date, + ?penalty_rates: top, ?tier_name: String, ?tier_rates: top ) -> void @@ -32,6 +38,7 @@ module Lithic def to_hash: -> { credit_product_token: String, effective_date: Date, + penalty_rates: top, tier_name: String, tier_rates: top } diff --git a/sig/lithic/models/financial_accounts/interest_tier_schedule_update_params.rbs b/sig/lithic/models/financial_accounts/interest_tier_schedule_update_params.rbs index 48bd39b1..5eb62670 100644 --- a/sig/lithic/models/financial_accounts/interest_tier_schedule_update_params.rbs +++ b/sig/lithic/models/financial_accounts/interest_tier_schedule_update_params.rbs @@ -5,6 +5,7 @@ module Lithic { financial_account_token: String, effective_date: Date, + penalty_rates: top, tier_name: String, tier_rates: top } @@ -18,6 +19,10 @@ module Lithic attr_accessor effective_date: Date + attr_reader penalty_rates: top? + + def penalty_rates=: (top) -> top + attr_reader tier_name: String? def tier_name=: (String) -> String @@ -29,6 +34,7 @@ module Lithic def initialize: ( financial_account_token: String, effective_date: Date, + ?penalty_rates: top, ?tier_name: String, ?tier_rates: top, ?request_options: Lithic::request_opts @@ -37,6 +43,7 @@ module Lithic def to_hash: -> { financial_account_token: String, effective_date: Date, + penalty_rates: top, tier_name: String, tier_rates: top, request_options: Lithic::RequestOptions diff --git a/sig/lithic/models/financial_accounts/statements/statement_line_items.rbs b/sig/lithic/models/financial_accounts/statements/statement_line_items.rbs index feb7696e..0450951a 100644 --- a/sig/lithic/models/financial_accounts/statements/statement_line_items.rbs +++ b/sig/lithic/models/financial_accounts/statements/statement_line_items.rbs @@ -38,7 +38,9 @@ module Lithic financial_transaction_event_token: String, financial_transaction_token: String, card_token: String, - descriptor: String + descriptor: String, + event_subtype: String?, + loan_tape_date: Date? } class Data < Lithic::Internal::Type::BaseModel @@ -70,6 +72,10 @@ module Lithic def descriptor=: (String) -> String + attr_accessor event_subtype: String? + + attr_accessor loan_tape_date: Date? + def initialize: ( token: String, amount: Integer, @@ -82,7 +88,9 @@ module Lithic financial_transaction_event_token: String, financial_transaction_token: String, ?card_token: String, - ?descriptor: String + ?descriptor: String, + ?event_subtype: String?, + ?loan_tape_date: Date? ) -> void def to_hash: -> { @@ -97,11 +105,14 @@ module Lithic financial_transaction_event_token: String, financial_transaction_token: String, card_token: String, - descriptor: String + descriptor: String, + event_subtype: String?, + loan_tape_date: Date? } type category = :ACH + | :WIRE | :BALANCE_OR_FUNDING | :FEE | :REWARD @@ -120,12 +131,14 @@ module Lithic | :MANAGEMENT_FEE | :MANAGEMENT_REWARD | :MANAGEMENT_DISBURSEMENT + | :HOLD | :PROGRAM_FUNDING module Category extend Lithic::Internal::Type::Enum ACH: :ACH + WIRE: :WIRE BALANCE_OR_FUNDING: :BALANCE_OR_FUNDING FEE: :FEE REWARD: :REWARD @@ -144,6 +157,7 @@ module Lithic MANAGEMENT_FEE: :MANAGEMENT_FEE MANAGEMENT_REWARD: :MANAGEMENT_REWARD MANAGEMENT_DISBURSEMENT: :MANAGEMENT_DISBURSEMENT + HOLD: :HOLD PROGRAM_FUNDING: :PROGRAM_FUNDING def self?.values: -> ::Array[Lithic::Models::FinancialAccounts::Statements::StatementLineItems::Data::category] diff --git a/sig/lithic/models/hold.rbs b/sig/lithic/models/hold.rbs new file mode 100644 index 00000000..6cad69bc --- /dev/null +++ b/sig/lithic/models/hold.rbs @@ -0,0 +1,137 @@ +module Lithic + module Models + type hold = + { + token: String, + created: Time, + status: Lithic::Models::Hold::status, + updated: Time, + currency: String, + events: ::Array[Lithic::HoldEvent], + expiration_datetime: Time?, + family: Lithic::Models::Hold::family, + financial_account_token: String, + pending_amount: Integer, + result: Lithic::Models::Hold::result, + user_defined_id: String? + } + + class Hold < Lithic::Internal::Type::BaseModel + attr_accessor token: String + + attr_accessor created: Time + + attr_accessor status: Lithic::Models::Hold::status + + attr_accessor updated: Time + + attr_reader currency: String? + + def currency=: (String) -> String + + attr_reader events: ::Array[Lithic::HoldEvent]? + + def events=: (::Array[Lithic::HoldEvent]) -> ::Array[Lithic::HoldEvent] + + attr_accessor expiration_datetime: Time? + + attr_reader family: Lithic::Models::Hold::family? + + def family=: ( + Lithic::Models::Hold::family + ) -> Lithic::Models::Hold::family + + attr_reader financial_account_token: String? + + def financial_account_token=: (String) -> String + + attr_reader pending_amount: Integer? + + def pending_amount=: (Integer) -> Integer + + attr_reader result: Lithic::Models::Hold::result? + + def result=: ( + Lithic::Models::Hold::result + ) -> Lithic::Models::Hold::result + + attr_accessor user_defined_id: String? + + def initialize: ( + token: String, + created: Time, + status: Lithic::Models::Hold::status, + updated: Time, + ?currency: String, + ?events: ::Array[Lithic::HoldEvent], + ?expiration_datetime: Time?, + ?family: Lithic::Models::Hold::family, + ?financial_account_token: String, + ?pending_amount: Integer, + ?result: Lithic::Models::Hold::result, + ?user_defined_id: String? + ) -> void + + def to_hash: -> { + token: String, + created: Time, + status: Lithic::Models::Hold::status, + updated: Time, + currency: String, + events: ::Array[Lithic::HoldEvent], + expiration_datetime: Time?, + family: Lithic::Models::Hold::family, + financial_account_token: String, + pending_amount: Integer, + result: Lithic::Models::Hold::result, + user_defined_id: String? + } + + type status = + :PENDING + | :SETTLED + | :EXPIRED + | :VOIDED + | :DECLINED + | :REVERSED + | :CANCELED + | :RETURNED + + module Status + extend Lithic::Internal::Type::Enum + + PENDING: :PENDING + SETTLED: :SETTLED + EXPIRED: :EXPIRED + VOIDED: :VOIDED + DECLINED: :DECLINED + REVERSED: :REVERSED + CANCELED: :CANCELED + RETURNED: :RETURNED + + def self?.values: -> ::Array[Lithic::Models::Hold::status] + end + + type family = :HOLD + + module Family + extend Lithic::Internal::Type::Enum + + HOLD: :HOLD + + def self?.values: -> ::Array[Lithic::Models::Hold::family] + end + + type result = :APPROVED | :DECLINED + + module Result + extend Lithic::Internal::Type::Enum + + APPROVED: :APPROVED + DECLINED: :DECLINED + + def self?.values: -> ::Array[Lithic::Models::Hold::result] + end + end + end +end diff --git a/sig/lithic/models/hold_create_params.rbs b/sig/lithic/models/hold_create_params.rbs new file mode 100644 index 00000000..829d7f61 --- /dev/null +++ b/sig/lithic/models/hold_create_params.rbs @@ -0,0 +1,57 @@ +module Lithic + module Models + type hold_create_params = + { + financial_account_token: String, + amount: Integer, + token: String, + expiration_datetime: Time, + memo: String?, + user_defined_id: String + } + & Lithic::Internal::Type::request_parameters + + class HoldCreateParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_accessor financial_account_token: String + + attr_accessor amount: Integer + + attr_reader token: String? + + def token=: (String) -> String + + attr_reader expiration_datetime: Time? + + def expiration_datetime=: (Time) -> Time + + attr_accessor memo: String? + + attr_reader user_defined_id: String? + + def user_defined_id=: (String) -> String + + def initialize: ( + financial_account_token: String, + amount: Integer, + ?token: String, + ?expiration_datetime: Time, + ?memo: String?, + ?user_defined_id: String, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + financial_account_token: String, + amount: Integer, + token: String, + expiration_datetime: Time, + memo: String?, + user_defined_id: String, + request_options: Lithic::RequestOptions + } + end + end +end diff --git a/sig/lithic/models/hold_event.rbs b/sig/lithic/models/hold_event.rbs new file mode 100644 index 00000000..46a50e0f --- /dev/null +++ b/sig/lithic/models/hold_event.rbs @@ -0,0 +1,91 @@ +module Lithic + module Models + type hold_event = + { + token: String, + amount: Integer, + created: Time, + detailed_results: ::Array[Lithic::Models::HoldEvent::detailed_result], + memo: String?, + result: Lithic::Models::HoldEvent::result, + settling_transaction_token: String?, + type: Lithic::Models::HoldEvent::type_ + } + + class HoldEvent < Lithic::Internal::Type::BaseModel + attr_accessor token: String + + attr_accessor amount: Integer + + attr_accessor created: Time + + attr_accessor detailed_results: ::Array[Lithic::Models::HoldEvent::detailed_result] + + attr_accessor memo: String? + + attr_accessor result: Lithic::Models::HoldEvent::result + + attr_accessor settling_transaction_token: String? + + attr_accessor type: Lithic::Models::HoldEvent::type_ + + def initialize: ( + token: String, + amount: Integer, + created: Time, + detailed_results: ::Array[Lithic::Models::HoldEvent::detailed_result], + memo: String?, + result: Lithic::Models::HoldEvent::result, + settling_transaction_token: String?, + type: Lithic::Models::HoldEvent::type_ + ) -> void + + def to_hash: -> { + token: String, + amount: Integer, + created: Time, + detailed_results: ::Array[Lithic::Models::HoldEvent::detailed_result], + memo: String?, + result: Lithic::Models::HoldEvent::result, + settling_transaction_token: String?, + type: Lithic::Models::HoldEvent::type_ + } + + type detailed_result = :APPROVED | :INSUFFICIENT_FUNDS + + module DetailedResult + extend Lithic::Internal::Type::Enum + + APPROVED: :APPROVED + INSUFFICIENT_FUNDS: :INSUFFICIENT_FUNDS + + def self?.values: -> ::Array[Lithic::Models::HoldEvent::detailed_result] + end + + type result = :APPROVED | :DECLINED + + module Result + extend Lithic::Internal::Type::Enum + + APPROVED: :APPROVED + DECLINED: :DECLINED + + def self?.values: -> ::Array[Lithic::Models::HoldEvent::result] + end + + type type_ = + :HOLD_INITIATED | :HOLD_VOIDED | :HOLD_EXPIRED | :HOLD_SETTLED + + module Type + extend Lithic::Internal::Type::Enum + + HOLD_INITIATED: :HOLD_INITIATED + HOLD_VOIDED: :HOLD_VOIDED + HOLD_EXPIRED: :HOLD_EXPIRED + HOLD_SETTLED: :HOLD_SETTLED + + def self?.values: -> ::Array[Lithic::Models::HoldEvent::type_] + end + end + end +end diff --git a/sig/lithic/models/hold_list_params.rbs b/sig/lithic/models/hold_list_params.rbs new file mode 100644 index 00000000..b8f95641 --- /dev/null +++ b/sig/lithic/models/hold_list_params.rbs @@ -0,0 +1,83 @@ +module Lithic + module Models + type hold_list_params = + { + financial_account_token: String, + begin_: Time, + end_: Time, + ending_before: String, + page_size: Integer, + starting_after: String, + status: Lithic::Models::HoldListParams::status + } + & Lithic::Internal::Type::request_parameters + + class HoldListParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_accessor financial_account_token: String + + attr_reader begin_: Time? + + def begin_=: (Time) -> Time + + attr_reader end_: Time? + + def end_=: (Time) -> Time + + attr_reader ending_before: String? + + def ending_before=: (String) -> String + + attr_reader page_size: Integer? + + def page_size=: (Integer) -> Integer + + attr_reader starting_after: String? + + def starting_after=: (String) -> String + + attr_reader status: Lithic::Models::HoldListParams::status? + + def status=: ( + Lithic::Models::HoldListParams::status + ) -> Lithic::Models::HoldListParams::status + + def initialize: ( + financial_account_token: String, + ?begin_: Time, + ?end_: Time, + ?ending_before: String, + ?page_size: Integer, + ?starting_after: String, + ?status: Lithic::Models::HoldListParams::status, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + financial_account_token: String, + begin_: Time, + end_: Time, + ending_before: String, + page_size: Integer, + starting_after: String, + status: Lithic::Models::HoldListParams::status, + request_options: Lithic::RequestOptions + } + + type status = :PENDING | :SETTLED | :EXPIRED | :VOIDED + + module Status + extend Lithic::Internal::Type::Enum + + PENDING: :PENDING + SETTLED: :SETTLED + EXPIRED: :EXPIRED + VOIDED: :VOIDED + + def self?.values: -> ::Array[Lithic::Models::HoldListParams::status] + end + end + end +end diff --git a/sig/lithic/models/hold_retrieve_params.rbs b/sig/lithic/models/hold_retrieve_params.rbs new file mode 100644 index 00000000..0792505e --- /dev/null +++ b/sig/lithic/models/hold_retrieve_params.rbs @@ -0,0 +1,23 @@ +module Lithic + module Models + type hold_retrieve_params = + { hold_token: String } & Lithic::Internal::Type::request_parameters + + class HoldRetrieveParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_accessor hold_token: String + + def initialize: ( + hold_token: String, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + hold_token: String, + request_options: Lithic::RequestOptions + } + end + end +end diff --git a/sig/lithic/models/hold_void_params.rbs b/sig/lithic/models/hold_void_params.rbs new file mode 100644 index 00000000..c788a86f --- /dev/null +++ b/sig/lithic/models/hold_void_params.rbs @@ -0,0 +1,28 @@ +module Lithic + module Models + type hold_void_params = + { hold_token: String, memo: String? } + & Lithic::Internal::Type::request_parameters + + class HoldVoidParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_accessor hold_token: String + + attr_accessor memo: String? + + def initialize: ( + hold_token: String, + ?memo: String?, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + hold_token: String, + memo: String?, + request_options: Lithic::RequestOptions + } + end + end +end diff --git a/sig/lithic/models/instance_financial_account_type.rbs b/sig/lithic/models/instance_financial_account_type.rbs index 0948a7ed..b1a4a5ca 100644 --- a/sig/lithic/models/instance_financial_account_type.rbs +++ b/sig/lithic/models/instance_financial_account_type.rbs @@ -11,6 +11,7 @@ module Lithic | :PROGRAM_RECEIVABLES | :COLLECTION | :PROGRAM_BANK_ACCOUNTS_PAYABLE + | :EARLY_DIRECT_DEPOSIT_FLOAT module InstanceFinancialAccountType extend Lithic::Internal::Type::Enum @@ -25,6 +26,7 @@ module Lithic PROGRAM_RECEIVABLES: :PROGRAM_RECEIVABLES COLLECTION: :COLLECTION PROGRAM_BANK_ACCOUNTS_PAYABLE: :PROGRAM_BANK_ACCOUNTS_PAYABLE + EARLY_DIRECT_DEPOSIT_FLOAT: :EARLY_DIRECT_DEPOSIT_FLOAT def self?.values: -> ::Array[Lithic::Models::instance_financial_account_type] end diff --git a/sig/lithic/models/parsed_webhook_event.rbs b/sig/lithic/models/parsed_webhook_event.rbs index 46cdda92..70c31c8b 100644 --- a/sig/lithic/models/parsed_webhook_event.rbs +++ b/sig/lithic/models/parsed_webhook_event.rbs @@ -8,7 +8,6 @@ module Lithic | Lithic::AccountHolderVerificationWebhookEvent | Lithic::AccountHolderDocumentUpdatedWebhookEvent | Lithic::CardAuthorizationApprovalRequestWebhookEvent - | Lithic::TokenizationDecisioningRequestWebhookEvent | Lithic::AuthRulesBacktestReportCreatedWebhookEvent | Lithic::BalanceUpdatedWebhookEvent | Lithic::BookTransferTransactionCreatedWebhookEvent diff --git a/sig/lithic/models/payment.rbs b/sig/lithic/models/payment.rbs index e908b268..737668c6 100644 --- a/sig/lithic/models/payment.rbs +++ b/sig/lithic/models/payment.rbs @@ -129,6 +129,7 @@ module Lithic type category = :ACH + | :WIRE | :BALANCE_OR_FUNDING | :FEE | :REWARD @@ -147,12 +148,14 @@ module Lithic | :MANAGEMENT_FEE | :MANAGEMENT_REWARD | :MANAGEMENT_DISBURSEMENT + | :HOLD | :PROGRAM_FUNDING module Category extend Lithic::Internal::Type::Enum ACH: :ACH + WIRE: :WIRE BALANCE_OR_FUNDING: :BALANCE_OR_FUNDING FEE: :FEE REWARD: :REWARD @@ -171,6 +174,7 @@ module Lithic MANAGEMENT_FEE: :MANAGEMENT_FEE MANAGEMENT_REWARD: :MANAGEMENT_REWARD MANAGEMENT_DISBURSEMENT: :MANAGEMENT_DISBURSEMENT + HOLD: :HOLD PROGRAM_FUNDING: :PROGRAM_FUNDING def self?.values: -> ::Array[Lithic::Models::Payment::category] @@ -258,11 +262,19 @@ module Lithic | :ACH_ORIGINATION_SETTLED | :ACH_RECEIPT_PROCESSED | :ACH_RECEIPT_RELEASED + | :ACH_RECEIPT_RELEASED_EARLY | :ACH_RECEIPT_SETTLED | :ACH_RETURN_INITIATED | :ACH_RETURN_PROCESSED | :ACH_RETURN_REJECTED | :ACH_RETURN_SETTLED + | :WIRE_TRANSFER_INBOUND_RECEIVED + | :WIRE_TRANSFER_INBOUND_SETTLED + | :WIRE_TRANSFER_INBOUND_BLOCKED + | :WIRE_RETURN_OUTBOUND_INITIATED + | :WIRE_RETURN_OUTBOUND_SENT + | :WIRE_RETURN_OUTBOUND_SETTLED + | :WIRE_RETURN_OUTBOUND_REJECTED module Type extend Lithic::Internal::Type::Enum @@ -276,11 +288,19 @@ module Lithic ACH_ORIGINATION_SETTLED: :ACH_ORIGINATION_SETTLED ACH_RECEIPT_PROCESSED: :ACH_RECEIPT_PROCESSED ACH_RECEIPT_RELEASED: :ACH_RECEIPT_RELEASED + ACH_RECEIPT_RELEASED_EARLY: :ACH_RECEIPT_RELEASED_EARLY ACH_RECEIPT_SETTLED: :ACH_RECEIPT_SETTLED ACH_RETURN_INITIATED: :ACH_RETURN_INITIATED ACH_RETURN_PROCESSED: :ACH_RETURN_PROCESSED ACH_RETURN_REJECTED: :ACH_RETURN_REJECTED ACH_RETURN_SETTLED: :ACH_RETURN_SETTLED + WIRE_TRANSFER_INBOUND_RECEIVED: :WIRE_TRANSFER_INBOUND_RECEIVED + WIRE_TRANSFER_INBOUND_SETTLED: :WIRE_TRANSFER_INBOUND_SETTLED + WIRE_TRANSFER_INBOUND_BLOCKED: :WIRE_TRANSFER_INBOUND_BLOCKED + WIRE_RETURN_OUTBOUND_INITIATED: :WIRE_RETURN_OUTBOUND_INITIATED + WIRE_RETURN_OUTBOUND_SENT: :WIRE_RETURN_OUTBOUND_SENT + WIRE_RETURN_OUTBOUND_SETTLED: :WIRE_RETURN_OUTBOUND_SETTLED + WIRE_RETURN_OUTBOUND_REJECTED: :WIRE_RETURN_OUTBOUND_REJECTED def self?.values: -> ::Array[Lithic::Models::Payment::Event::type_] end @@ -403,8 +423,7 @@ module Lithic wire_network: Lithic::Models::Payment::MethodAttributes::WireMethodAttributes::wire_network, creditor: Lithic::WirePartyDetails, debtor: Lithic::WirePartyDetails, - message_id: String?, - remittance_information: String? + message_id: String? } class WireMethodAttributes < Lithic::Internal::Type::BaseModel @@ -422,15 +441,12 @@ module Lithic attr_accessor message_id: String? - attr_accessor remittance_information: String? - def initialize: ( wire_message_type: String?, wire_network: Lithic::Models::Payment::MethodAttributes::WireMethodAttributes::wire_network, ?creditor: Lithic::WirePartyDetails, ?debtor: Lithic::WirePartyDetails, - ?message_id: String?, - ?remittance_information: String? + ?message_id: String? ) -> void def to_hash: -> { @@ -438,8 +454,7 @@ module Lithic wire_network: Lithic::Models::Payment::MethodAttributes::WireMethodAttributes::wire_network, creditor: Lithic::WirePartyDetails, debtor: Lithic::WirePartyDetails, - message_id: String?, - remittance_information: String? + message_id: String? } type wire_network = :FEDWIRE | :SWIFT diff --git a/sig/lithic/models/payment_simulate_action_params.rbs b/sig/lithic/models/payment_simulate_action_params.rbs index 62b44d9e..c1823c6d 100644 --- a/sig/lithic/models/payment_simulate_action_params.rbs +++ b/sig/lithic/models/payment_simulate_action_params.rbs @@ -64,6 +64,7 @@ module Lithic | :ACH_ORIGINATION_SETTLED | :ACH_RECEIPT_SETTLED | :ACH_RECEIPT_RELEASED + | :ACH_RECEIPT_RELEASED_EARLY | :ACH_RETURN_INITIATED | :ACH_RETURN_PROCESSED | :ACH_RETURN_SETTLED @@ -77,6 +78,7 @@ module Lithic ACH_ORIGINATION_SETTLED: :ACH_ORIGINATION_SETTLED ACH_RECEIPT_SETTLED: :ACH_RECEIPT_SETTLED ACH_RECEIPT_RELEASED: :ACH_RECEIPT_RELEASED + ACH_RECEIPT_RELEASED_EARLY: :ACH_RECEIPT_RELEASED_EARLY ACH_RETURN_INITIATED: :ACH_RETURN_INITIATED ACH_RETURN_PROCESSED: :ACH_RETURN_PROCESSED ACH_RETURN_SETTLED: :ACH_RETURN_SETTLED diff --git a/sig/lithic/models/tokenization_decisioning_request_webhook_event.rbs b/sig/lithic/models/tokenization_decisioning_request_webhook_event.rbs deleted file mode 100644 index 41fc3d1c..00000000 --- a/sig/lithic/models/tokenization_decisioning_request_webhook_event.rbs +++ /dev/null @@ -1,130 +0,0 @@ -module Lithic - module Models - type tokenization_decisioning_request_webhook_event = - { - account_token: String, - card_token: String, - created: Time, - digital_wallet_token_metadata: Lithic::TokenMetadata, - event_type: Lithic::Models::TokenizationDecisioningRequestWebhookEvent::event_type, - issuer_decision: Lithic::Models::TokenizationDecisioningRequestWebhookEvent::issuer_decision, - tokenization_channel: Lithic::Models::TokenizationDecisioningRequestWebhookEvent::tokenization_channel, - tokenization_token: String, - wallet_decisioning_info: Lithic::WalletDecisioningInfo, - device: Lithic::Device, - tokenization_source: Lithic::Models::TokenizationDecisioningRequestWebhookEvent::tokenization_source - } - - class TokenizationDecisioningRequestWebhookEvent < Lithic::Internal::Type::BaseModel - attr_accessor account_token: String - - attr_accessor card_token: String - - attr_accessor created: Time - - attr_accessor digital_wallet_token_metadata: Lithic::TokenMetadata - - attr_accessor event_type: Lithic::Models::TokenizationDecisioningRequestWebhookEvent::event_type - - attr_accessor issuer_decision: Lithic::Models::TokenizationDecisioningRequestWebhookEvent::issuer_decision - - attr_accessor tokenization_channel: Lithic::Models::TokenizationDecisioningRequestWebhookEvent::tokenization_channel - - attr_accessor tokenization_token: String - - attr_accessor wallet_decisioning_info: Lithic::WalletDecisioningInfo - - attr_reader device: Lithic::Device? - - def device=: (Lithic::Device) -> Lithic::Device - - attr_reader tokenization_source: Lithic::Models::TokenizationDecisioningRequestWebhookEvent::tokenization_source? - - def tokenization_source=: ( - Lithic::Models::TokenizationDecisioningRequestWebhookEvent::tokenization_source - ) -> Lithic::Models::TokenizationDecisioningRequestWebhookEvent::tokenization_source - - def initialize: ( - account_token: String, - card_token: String, - created: Time, - digital_wallet_token_metadata: Lithic::TokenMetadata, - event_type: Lithic::Models::TokenizationDecisioningRequestWebhookEvent::event_type, - issuer_decision: Lithic::Models::TokenizationDecisioningRequestWebhookEvent::issuer_decision, - tokenization_channel: Lithic::Models::TokenizationDecisioningRequestWebhookEvent::tokenization_channel, - tokenization_token: String, - wallet_decisioning_info: Lithic::WalletDecisioningInfo, - ?device: Lithic::Device, - ?tokenization_source: Lithic::Models::TokenizationDecisioningRequestWebhookEvent::tokenization_source - ) -> void - - def to_hash: -> { - account_token: String, - card_token: String, - created: Time, - digital_wallet_token_metadata: Lithic::TokenMetadata, - event_type: Lithic::Models::TokenizationDecisioningRequestWebhookEvent::event_type, - issuer_decision: Lithic::Models::TokenizationDecisioningRequestWebhookEvent::issuer_decision, - tokenization_channel: Lithic::Models::TokenizationDecisioningRequestWebhookEvent::tokenization_channel, - tokenization_token: String, - wallet_decisioning_info: Lithic::WalletDecisioningInfo, - device: Lithic::Device, - tokenization_source: Lithic::Models::TokenizationDecisioningRequestWebhookEvent::tokenization_source - } - - type event_type = :"digital_wallet.tokenization_approval_request" - - module EventType - extend Lithic::Internal::Type::Enum - - DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST: :"digital_wallet.tokenization_approval_request" - - def self?.values: -> ::Array[Lithic::Models::TokenizationDecisioningRequestWebhookEvent::event_type] - end - - type issuer_decision = :APPROVED | :DENIED | :VERIFICATION_REQUIRED - - module IssuerDecision - extend Lithic::Internal::Type::Enum - - APPROVED: :APPROVED - DENIED: :DENIED - VERIFICATION_REQUIRED: :VERIFICATION_REQUIRED - - def self?.values: -> ::Array[Lithic::Models::TokenizationDecisioningRequestWebhookEvent::issuer_decision] - end - - type tokenization_channel = :DIGITAL_WALLET | :MERCHANT - - module TokenizationChannel - extend Lithic::Internal::Type::Enum - - DIGITAL_WALLET: :DIGITAL_WALLET - MERCHANT: :MERCHANT - - def self?.values: -> ::Array[Lithic::Models::TokenizationDecisioningRequestWebhookEvent::tokenization_channel] - end - - type tokenization_source = - :ACCOUNT_ON_FILE - | :CONTACTLESS_TAP - | :MANUAL_PROVISION - | :PUSH_PROVISION - | :TOKEN - | :UNKNOWN - - module TokenizationSource - extend Lithic::Internal::Type::Enum - - ACCOUNT_ON_FILE: :ACCOUNT_ON_FILE - CONTACTLESS_TAP: :CONTACTLESS_TAP - MANUAL_PROVISION: :MANUAL_PROVISION - PUSH_PROVISION: :PUSH_PROVISION - TOKEN: :TOKEN - UNKNOWN: :UNKNOWN - - def self?.values: -> ::Array[Lithic::Models::TokenizationDecisioningRequestWebhookEvent::tokenization_source] - end - end - end -end diff --git a/sig/lithic/resources/auth_rules/v2.rbs b/sig/lithic/resources/auth_rules/v2.rbs index f79a5099..a90b6874 100644 --- a/sig/lithic/resources/auth_rules/v2.rbs +++ b/sig/lithic/resources/auth_rules/v2.rbs @@ -56,6 +56,11 @@ module Lithic ?request_options: Lithic::request_opts ) -> Lithic::Internal::CursorPage[Lithic::Models::AuthRules::v2_list_results_response] + def list_versions: ( + String auth_rule_token, + ?request_options: Lithic::request_opts + ) -> Lithic::Models::AuthRules::V2ListVersionsResponse + def promote: ( String auth_rule_token, ?request_options: Lithic::request_opts diff --git a/sig/lithic/resources/financial_accounts/interest_tier_schedule.rbs b/sig/lithic/resources/financial_accounts/interest_tier_schedule.rbs index a40f3aea..f17fea9a 100644 --- a/sig/lithic/resources/financial_accounts/interest_tier_schedule.rbs +++ b/sig/lithic/resources/financial_accounts/interest_tier_schedule.rbs @@ -6,6 +6,7 @@ module Lithic String financial_account_token, credit_product_token: String, effective_date: Date, + ?penalty_rates: top, ?tier_name: String, ?tier_rates: top, ?request_options: Lithic::request_opts @@ -20,6 +21,7 @@ module Lithic def update: ( Date effective_date, financial_account_token: String, + ?penalty_rates: top, ?tier_name: String, ?tier_rates: top, ?request_options: Lithic::request_opts diff --git a/sig/lithic/resources/holds.rbs b/sig/lithic/resources/holds.rbs new file mode 100644 index 00000000..f4725933 --- /dev/null +++ b/sig/lithic/resources/holds.rbs @@ -0,0 +1,39 @@ +module Lithic + module Resources + class Holds + def create: ( + String financial_account_token, + amount: Integer, + ?token: String, + ?expiration_datetime: Time, + ?memo: String?, + ?user_defined_id: String, + ?request_options: Lithic::request_opts + ) -> Lithic::Hold + + def retrieve: ( + String hold_token, + ?request_options: Lithic::request_opts + ) -> Lithic::Hold + + def list: ( + String financial_account_token, + ?begin_: Time, + ?end_: Time, + ?ending_before: String, + ?page_size: Integer, + ?starting_after: String, + ?status: Lithic::Models::HoldListParams::status, + ?request_options: Lithic::request_opts + ) -> Lithic::Internal::CursorPage[Lithic::Hold] + + def `void`: ( + String hold_token, + ?memo: String?, + ?request_options: Lithic::request_opts + ) -> Lithic::Hold + + def initialize: (client: Lithic::Client) -> void + end + end +end diff --git a/sig/lithic/resources/webhooks.rbs b/sig/lithic/resources/webhooks.rbs index f00a481a..2daf0e85 100644 --- a/sig/lithic/resources/webhooks.rbs +++ b/sig/lithic/resources/webhooks.rbs @@ -12,7 +12,6 @@ module Lithic | Lithic::AccountHolderVerificationWebhookEvent | Lithic::AccountHolderDocumentUpdatedWebhookEvent | Lithic::CardAuthorizationApprovalRequestWebhookEvent - | Lithic::TokenizationDecisioningRequestWebhookEvent | Lithic::AuthRulesBacktestReportCreatedWebhookEvent | Lithic::BalanceUpdatedWebhookEvent | Lithic::BookTransferTransactionCreatedWebhookEvent diff --git a/test/lithic/resources/account_activity_test.rb b/test/lithic/resources/account_activity_test.rb index 44082a21..914ee944 100644 --- a/test/lithic/resources/account_activity_test.rb +++ b/test/lithic/resources/account_activity_test.rb @@ -25,6 +25,7 @@ def test_list in Lithic::Payment in Lithic::ExternalPayment in Lithic::ManagementOperationTransaction + in Lithic::Hold end end @@ -121,6 +122,20 @@ def test_list transaction_series: Lithic::ManagementOperationTransaction::TransactionSeries | nil, user_defined_id: String | nil } + in { + family: :HOLD, + token: String, + created: Time, + status: Lithic::Hold::Status, + updated: Time, + currency: String | nil, + events: ^(Lithic::Internal::Type::ArrayOf[Lithic::HoldEvent]) | nil, + expiration_datetime: Time | nil, + financial_account_token: String | nil, + pending_amount: Integer | nil, + result: Lithic::Hold::Result | nil, + user_defined_id: String | nil + } end end end @@ -140,6 +155,7 @@ def test_retrieve_transaction in Lithic::Payment in Lithic::ExternalPayment in Lithic::ManagementOperationTransaction + in Lithic::Hold end end @@ -236,6 +252,20 @@ def test_retrieve_transaction transaction_series: Lithic::ManagementOperationTransaction::TransactionSeries | nil, user_defined_id: String | nil } + in { + family: :HOLD, + token: String, + created: Time, + status: Lithic::Hold::Status, + updated: Time, + currency: String | nil, + events: ^(Lithic::Internal::Type::ArrayOf[Lithic::HoldEvent]) | nil, + expiration_datetime: Time | nil, + financial_account_token: String | nil, + pending_amount: Integer | nil, + result: Lithic::Hold::Result | nil, + user_defined_id: String | nil + } end end end diff --git a/test/lithic/resources/auth_rules/v2_test.rb b/test/lithic/resources/auth_rules/v2_test.rb index f3e31407..d06f197a 100644 --- a/test/lithic/resources/auth_rules/v2_test.rb +++ b/test/lithic/resources/auth_rules/v2_test.rb @@ -30,6 +30,8 @@ def test_create_required_params program_level: Lithic::Internal::Type::Boolean, state: Lithic::AuthRules::AuthRule::State, type: Lithic::AuthRules::AuthRule::Type, + excluded_account_tokens: ^(Lithic::Internal::Type::ArrayOf[String]) | nil, + excluded_business_account_tokens: ^(Lithic::Internal::Type::ArrayOf[String]) | nil, excluded_card_tokens: ^(Lithic::Internal::Type::ArrayOf[String]) | nil } end @@ -56,6 +58,8 @@ def test_retrieve program_level: Lithic::Internal::Type::Boolean, state: Lithic::AuthRules::AuthRule::State, type: Lithic::AuthRules::AuthRule::Type, + excluded_account_tokens: ^(Lithic::Internal::Type::ArrayOf[String]) | nil, + excluded_business_account_tokens: ^(Lithic::Internal::Type::ArrayOf[String]) | nil, excluded_card_tokens: ^(Lithic::Internal::Type::ArrayOf[String]) | nil } end @@ -82,6 +86,8 @@ def test_update_required_params program_level: Lithic::Internal::Type::Boolean, state: Lithic::AuthRules::AuthRule::State, type: Lithic::AuthRules::AuthRule::Type, + excluded_account_tokens: ^(Lithic::Internal::Type::ArrayOf[String]) | nil, + excluded_business_account_tokens: ^(Lithic::Internal::Type::ArrayOf[String]) | nil, excluded_card_tokens: ^(Lithic::Internal::Type::ArrayOf[String]) | nil } end @@ -115,6 +121,8 @@ def test_list program_level: Lithic::Internal::Type::Boolean, state: Lithic::AuthRules::AuthRule::State, type: Lithic::AuthRules::AuthRule::Type, + excluded_account_tokens: ^(Lithic::Internal::Type::ArrayOf[String]) | nil, + excluded_business_account_tokens: ^(Lithic::Internal::Type::ArrayOf[String]) | nil, excluded_card_tokens: ^(Lithic::Internal::Type::ArrayOf[String]) | nil } end @@ -149,6 +157,8 @@ def test_draft program_level: Lithic::Internal::Type::Boolean, state: Lithic::AuthRules::AuthRule::State, type: Lithic::AuthRules::AuthRule::Type, + excluded_account_tokens: ^(Lithic::Internal::Type::ArrayOf[String]) | nil, + excluded_business_account_tokens: ^(Lithic::Internal::Type::ArrayOf[String]) | nil, excluded_card_tokens: ^(Lithic::Internal::Type::ArrayOf[String]) | nil } end @@ -178,6 +188,20 @@ def test_list_results end end + def test_list_versions + response = @lithic.auth_rules.v2.list_versions("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + + assert_pattern do + response => Lithic::Models::AuthRules::V2ListVersionsResponse + end + + assert_pattern do + response => { + data: ^(Lithic::Internal::Type::ArrayOf[Lithic::AuthRules::AuthRuleVersion]) + } + end + end + def test_promote response = @lithic.auth_rules.v2.promote("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") @@ -199,6 +223,8 @@ def test_promote program_level: Lithic::Internal::Type::Boolean, state: Lithic::AuthRules::AuthRule::State, type: Lithic::AuthRules::AuthRule::Type, + excluded_account_tokens: ^(Lithic::Internal::Type::ArrayOf[String]) | nil, + excluded_business_account_tokens: ^(Lithic::Internal::Type::ArrayOf[String]) | nil, excluded_card_tokens: ^(Lithic::Internal::Type::ArrayOf[String]) | nil } end diff --git a/test/lithic/resources/financial_accounts/interest_tier_schedule_test.rb b/test/lithic/resources/financial_accounts/interest_tier_schedule_test.rb index 5767f495..c38a284c 100644 --- a/test/lithic/resources/financial_accounts/interest_tier_schedule_test.rb +++ b/test/lithic/resources/financial_accounts/interest_tier_schedule_test.rb @@ -19,6 +19,7 @@ def test_create_required_params response => { credit_product_token: String, effective_date: Date, + penalty_rates: Lithic::Internal::Type::Unknown | nil, tier_name: String | nil, tier_rates: Lithic::Internal::Type::Unknown | nil } @@ -40,6 +41,7 @@ def test_retrieve_required_params response => { credit_product_token: String, effective_date: Date, + penalty_rates: Lithic::Internal::Type::Unknown | nil, tier_name: String | nil, tier_rates: Lithic::Internal::Type::Unknown | nil } @@ -61,6 +63,7 @@ def test_update_required_params response => { credit_product_token: String, effective_date: Date, + penalty_rates: Lithic::Internal::Type::Unknown | nil, tier_name: String | nil, tier_rates: Lithic::Internal::Type::Unknown | nil } @@ -85,6 +88,7 @@ def test_list row => { credit_product_token: String, effective_date: Date, + penalty_rates: Lithic::Internal::Type::Unknown | nil, tier_name: String | nil, tier_rates: Lithic::Internal::Type::Unknown | nil } diff --git a/test/lithic/resources/financial_accounts/statements/line_items_test.rb b/test/lithic/resources/financial_accounts/statements/line_items_test.rb index 1f2b44c8..5a74a210 100644 --- a/test/lithic/resources/financial_accounts/statements/line_items_test.rb +++ b/test/lithic/resources/financial_accounts/statements/line_items_test.rb @@ -34,7 +34,9 @@ def test_list_required_params financial_transaction_event_token: String, financial_transaction_token: String, card_token: String | nil, - descriptor: String | nil + descriptor: String | nil, + event_subtype: String | nil, + loan_tape_date: Date | nil } end end diff --git a/test/lithic/resources/holds_test.rb b/test/lithic/resources/holds_test.rb new file mode 100644 index 00000000..eb7932b6 --- /dev/null +++ b/test/lithic/resources/holds_test.rb @@ -0,0 +1,112 @@ +# frozen_string_literal: true + +require_relative "../test_helper" + +class Lithic::Test::Resources::HoldsTest < Lithic::Test::ResourceTest + def test_create_required_params + response = @lithic.holds.create("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", amount: 1) + + assert_pattern do + response => Lithic::Hold + end + + assert_pattern do + response => { + token: String, + created: Time, + status: Lithic::Hold::Status, + updated: Time, + currency: String | nil, + events: ^(Lithic::Internal::Type::ArrayOf[Lithic::HoldEvent]) | nil, + expiration_datetime: Time | nil, + family: Lithic::Hold::Family | nil, + financial_account_token: String | nil, + pending_amount: Integer | nil, + result: Lithic::Hold::Result | nil, + user_defined_id: String | nil + } + end + end + + def test_retrieve + response = @lithic.holds.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + + assert_pattern do + response => Lithic::Hold + end + + assert_pattern do + response => { + token: String, + created: Time, + status: Lithic::Hold::Status, + updated: Time, + currency: String | nil, + events: ^(Lithic::Internal::Type::ArrayOf[Lithic::HoldEvent]) | nil, + expiration_datetime: Time | nil, + family: Lithic::Hold::Family | nil, + financial_account_token: String | nil, + pending_amount: Integer | nil, + result: Lithic::Hold::Result | nil, + user_defined_id: String | nil + } + end + end + + def test_list + response = @lithic.holds.list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + + assert_pattern do + response => Lithic::Internal::CursorPage + end + + row = response.to_enum.first + return if row.nil? + + assert_pattern do + row => Lithic::Hold + end + + assert_pattern do + row => { + token: String, + created: Time, + status: Lithic::Hold::Status, + updated: Time, + currency: String | nil, + events: ^(Lithic::Internal::Type::ArrayOf[Lithic::HoldEvent]) | nil, + expiration_datetime: Time | nil, + family: Lithic::Hold::Family | nil, + financial_account_token: String | nil, + pending_amount: Integer | nil, + result: Lithic::Hold::Result | nil, + user_defined_id: String | nil + } + end + end + + def test_void + response = @lithic.holds.void("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + + assert_pattern do + response => Lithic::Hold + end + + assert_pattern do + response => { + token: String, + created: Time, + status: Lithic::Hold::Status, + updated: Time, + currency: String | nil, + events: ^(Lithic::Internal::Type::ArrayOf[Lithic::HoldEvent]) | nil, + expiration_datetime: Time | nil, + family: Lithic::Hold::Family | nil, + financial_account_token: String | nil, + pending_amount: Integer | nil, + result: Lithic::Hold::Result | nil, + user_defined_id: String | nil + } + end + end +end diff --git a/test/lithic/resources/webhooks_test.rb b/test/lithic/resources/webhooks_test.rb index 175be07c..7a1b099f 100644 --- a/test/lithic/resources/webhooks_test.rb +++ b/test/lithic/resources/webhooks_test.rb @@ -14,7 +14,6 @@ def test_parse_unsafe_webhook_payload }.to_json event = @lithic.webhooks.parse_unsafe(payload) - # Verify the event was parsed successfully assert(event) assert_equal("card.created", event.event_type) end @@ -28,7 +27,6 @@ def test_parse_with_valid_signature payload = '{"event_type":"card.created","card_token":"test_card_token_123"}' timestamp = Time.now.to_i.to_s - # Generate a valid signature wh = StandardWebhooks::Webhook.new(secret) signature = wh.sign("test_msg_id", timestamp, payload) @@ -38,12 +36,10 @@ def test_parse_with_valid_signature "webhook-signature" => signature } - # Should verify and return typed event event = @lithic.webhooks.parse(payload, headers: headers, secret: secret) assert(event) assert_equal(:"card.created", event.event_type) - # Verify we can pattern match on the typed event case event when Lithic::Models::CardCreatedWebhookEvent assert_equal("test_card_token_123", event.card_token) @@ -52,6 +48,36 @@ def test_parse_with_valid_signature end end + def test_parse_with_invalid_signatures + skip("standardwebhooks gem not installed") unless gem_installed?("standardwebhooks") + + require("standardwebhooks") + + secret = "whsec_test_secret" + payload = '{"event_type":"card.created"}' + timestamp = Time.now.to_i.to_s + + wh = StandardWebhooks::Webhook.new(secret) + signature = wh.sign("test_msg_id", timestamp, payload) + + headers = { + "webhook-id" => "test_msg_id", + "webhook-timestamp" => timestamp, + "webhook-signature" => signature + } + + bad_headers = [ + headers.merge("webhook-id" => "bad"), + headers.merge("webhook-timestamp" => "0"), + headers.merge("webhook-signature" => wh.sign("test_msg_id", timestamp, "xxx")) + ] + bad_headers.each do |bad_header| + assert_raises(StandardWebhooks::WebhookVerificationError) do + @lithic.webhooks.parse(payload, headers: bad_header, secret: secret) + end + end + end + def test_parse_with_env_var_secret skip("standardwebhooks gem not installed") unless gem_installed?("standardwebhooks") @@ -61,7 +87,6 @@ def test_parse_with_env_var_secret payload = '{"event_type":"card.created","data":{"token":"test_token"}}' timestamp = Time.now.to_i.to_s - # Generate a valid signature wh = StandardWebhooks::Webhook.new(secret) signature = wh.sign("test_msg_id", timestamp, payload) @@ -71,10 +96,8 @@ def test_parse_with_env_var_secret "webhook-signature" => signature } - # Set env var ENV["LITHIC_WEBHOOK_SECRET"] = secret begin - # Should use env var when secret not provided event = @lithic.webhooks.parse(payload, headers: headers) assert(event) assert_equal("card.created", event.event_type) @@ -93,7 +116,6 @@ def test_parse_raises_when_secret_missing "webhook-signature" => "v1,invalid" } - # Ensure env var is not set ENV.delete("LITHIC_WEBHOOK_SECRET") error = assert_raises(ArgumentError) do @@ -112,7 +134,6 @@ def test_verify_signature_with_valid_signature payload = '{"event_type":"card.created"}' timestamp = Time.now.to_i.to_s - # Generate a valid signature wh = StandardWebhooks::Webhook.new(secret) signature = wh.sign("test_msg_id", timestamp, payload) @@ -122,14 +143,12 @@ def test_verify_signature_with_valid_signature "webhook-signature" => signature } - # Should not raise an error and returns the parsed JSON result = @lithic.webhooks.verify_signature( payload: payload, headers: headers, secret: secret ) - # verify returns the parsed JSON content with symbolized keys assert_equal("card.created", result[:event_type]) end @@ -165,7 +184,6 @@ def test_verify_signature_with_env_var payload = '{"event_type":"card.created"}' timestamp = Time.now.to_i.to_s - # Generate a valid signature wh = StandardWebhooks::Webhook.new(secret) signature = wh.sign("test_msg_id", timestamp, payload) @@ -175,10 +193,8 @@ def test_verify_signature_with_env_var "webhook-signature" => signature } - # Set env var ENV["LITHIC_WEBHOOK_SECRET"] = secret begin - # Should use env var when secret not provided result = @lithic.webhooks.verify_signature(payload: payload, headers: headers) assert_equal("card.created", result[:event_type]) ensure