From 8192e34c05ef27263d1e3490092035c9e316c986 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 29 Jan 2026 15:19:40 +0000 Subject: [PATCH 01/12] chore: configure new SDK language --- .stats.yml | 2 +- README.md | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 0080147f..6c50cded 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 176 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-ce2adff9b644ed4562b5342a4a43d0b40c98d43b4e063b4626f4ca5d342f1b92.yml openapi_spec_hash: fbc84b866ce96457261ac58b4e75c71d -config_hash: 31d71922d7838f34ae0875c9b8026d99 +config_hash: 03116d920ed711085fce266148733bcc diff --git a/README.md b/README.md index 69d956a4..a366d30a 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,15 @@ The Lithic Ruby library provides convenient access to the Lithic REST API from any Ruby 3.2.0+ application. It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](https://github.com/lithic-com/lithic-ruby#Sorbet) for usage with Sorbet. The standard library's `net/http` is used as the HTTP transport, with connection pooling via the `connection_pool` gem. +## MCP Server + +Use the Lithic MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application. + +[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=lithic-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImxpdGhpYy1tY3AiXSwiZW52Ijp7IkxJVEhJQ19BUElfS0VZIjoiTXkgTGl0aGljIEFQSSBLZXkiLCJMSVRISUNfV0VCSE9PS19TRUNSRVQiOiJNeSBXZWJob29rIFNlY3JldCJ9fQ) +[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22lithic-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22lithic-mcp%22%5D%2C%22env%22%3A%7B%22LITHIC_API_KEY%22%3A%22My%20Lithic%20API%20Key%22%2C%22LITHIC_WEBHOOK_SECRET%22%3A%22My%20Webhook%20Secret%22%7D%7D) + +> Note: You may need to set environment variables in your MCP client. + ## Documentation Documentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/lithic). From 03570d6a7cde12dc24f4a4237ea4d0042d215817 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 29 Jan 2026 15:34:51 +0000 Subject: [PATCH 02/12] chore: Enable stainless MCP in config --- .stats.yml | 2 +- README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6c50cded..5ae1eda0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 176 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-ce2adff9b644ed4562b5342a4a43d0b40c98d43b4e063b4626f4ca5d342f1b92.yml openapi_spec_hash: fbc84b866ce96457261ac58b4e75c71d -config_hash: 03116d920ed711085fce266148733bcc +config_hash: faacaff68ffb3a4d051f0a7b8442e099 diff --git a/README.md b/README.md index a366d30a..47b56441 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ The Lithic Ruby library provides convenient access to the Lithic REST API from a Use the Lithic MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application. -[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=lithic-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImxpdGhpYy1tY3AiXSwiZW52Ijp7IkxJVEhJQ19BUElfS0VZIjoiTXkgTGl0aGljIEFQSSBLZXkiLCJMSVRISUNfV0VCSE9PS19TRUNSRVQiOiJNeSBXZWJob29rIFNlY3JldCJ9fQ) -[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22lithic-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22lithic-mcp%22%5D%2C%22env%22%3A%7B%22LITHIC_API_KEY%22%3A%22My%20Lithic%20API%20Key%22%2C%22LITHIC_WEBHOOK_SECRET%22%3A%22My%20Webhook%20Secret%22%7D%7D) +[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=lithic-mcp&config=eyJuYW1lIjoibGl0aGljLW1jcCIsInRyYW5zcG9ydCI6Imh0dHAiLCJ1cmwiOiJodHRwczovL2xpdGhpYy5zdGxtY3AuY29tIiwiaGVhZGVycyI6eyJ4LWxpdGhpYy1hcGkta2V5IjoiTXkgTGl0aGljIEFQSSBLZXkifX0) +[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22lithic-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Flithic.stlmcp.com%22%2C%22headers%22%3A%7B%22x-lithic-api-key%22%3A%22My%20Lithic%20API%20Key%22%7D%7D) > Note: You may need to set environment variables in your MCP client. From 76b507bf26f50ac5be4cd8210e781435a5d8bd0f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 30 Jan 2026 18:36:12 +0000 Subject: [PATCH 03/12] feat(api): Add naics_code to account holder requests/responses --- .stats.yml | 4 +-- lib/lithic/models/account_holder.rb | 19 ++++++++++---- .../models/account_holder_create_params.rb | 11 +++++++- ...der_simulate_enrollment_review_response.rb | 19 ++++++++++---- .../models/account_holder_update_params.rb | 11 +++++++- .../models/account_holder_update_response.rb | 19 ++++++++++---- .../account_holder_updated_webhook_event.rb | 11 +++++++- lib/lithic/models/kyb.rb | 11 +++++++- lib/lithic/models/parsed_webhook_event.rb | 11 +++++++- lib/lithic/resources/account_holders.rb | 8 ++++-- rbi/lithic/models/account_holder.rbi | 25 ++++++++++++++----- .../models/account_holder_create_params.rbi | 13 ++++++++++ ...er_simulate_enrollment_review_response.rbi | 25 ++++++++++++++----- .../models/account_holder_update_params.rbi | 13 ++++++++++ .../models/account_holder_update_response.rbi | 25 ++++++++++++++----- .../account_holder_updated_webhook_event.rbi | 13 ++++++++++ rbi/lithic/models/kyb.rbi | 13 ++++++++++ rbi/lithic/models/parsed_webhook_event.rbi | 13 ++++++++++ rbi/lithic/resources/account_holders.rbi | 8 ++++++ sig/lithic/models/account_holder.rbs | 7 ++++++ .../models/account_holder_create_params.rbs | 7 ++++++ ...er_simulate_enrollment_review_response.rbs | 7 ++++++ .../models/account_holder_update_params.rbs | 7 ++++++ .../models/account_holder_update_response.rbs | 7 ++++++ .../account_holder_updated_webhook_event.rbs | 7 ++++++ sig/lithic/models/kyb.rbs | 7 ++++++ sig/lithic/models/parsed_webhook_event.rbs | 7 ++++++ sig/lithic/resources/account_holders.rbs | 2 ++ test/lithic/resources/account_holders_test.rb | 3 +++ 29 files changed, 291 insertions(+), 42 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5ae1eda0..2c43cb20 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 176 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-ce2adff9b644ed4562b5342a4a43d0b40c98d43b4e063b4626f4ca5d342f1b92.yml -openapi_spec_hash: fbc84b866ce96457261ac58b4e75c71d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-05d665e9c7e81d85c0d6629bf3898e2eb221268d677b772ef3da3891b25d8346.yml +openapi_spec_hash: fd8900412ab9a393719dba3669d44d3a config_hash: faacaff68ffb3a4d051f0a7b8442e099 diff --git a/lib/lithic/models/account_holder.rb b/lib/lithic/models/account_holder.rb index 3366b646..f3ae2686 100644 --- a/lib/lithic/models/account_holder.rb +++ b/lib/lithic/models/account_holder.rb @@ -97,6 +97,13 @@ class AccountHolder < Lithic::Internal::Type::BaseModel # @return [Lithic::Models::AccountHolder::Individual, nil] optional :individual, -> { Lithic::AccountHolder::Individual } + # @!attribute naics_code + # Only present when user_type == "BUSINESS". 6-digit North American Industry + # Classification System (NAICS) code for the business. + # + # @return [String, nil] + optional :naics_code, String + # @!attribute nature_of_business # Only present when user_type == "BUSINESS". User-submitted description of the # business. @@ -143,8 +150,8 @@ class AccountHolder < Lithic::Internal::Type::BaseModel # @!attribute user_type # The type of Account Holder. If the type is "INDIVIDUAL", the "individual" # attribute will be present. If the type is "BUSINESS" then the "business_entity", - # "control_person", "beneficial_owner_individuals", "nature_of_business", and - # "website_url" attributes will be present. + # "control_person", "beneficial_owner_individuals", "naics_code", + # "nature_of_business", and "website_url" attributes will be present. # # @return [Symbol, Lithic::Models::AccountHolder::UserType, nil] optional :user_type, enum: -> { Lithic::AccountHolder::UserType } @@ -161,7 +168,7 @@ class AccountHolder < Lithic::Internal::Type::BaseModel # @return [String, nil] optional :website_url, String - # @!method initialize(token:, created:, account_token: nil, beneficial_owner_entities: nil, beneficial_owner_individuals: nil, business_account_token: nil, business_entity: nil, control_person: nil, email: nil, exemption_type: nil, external_id: nil, individual: nil, nature_of_business: nil, phone_number: nil, required_documents: nil, status: nil, status_reasons: nil, user_type: nil, verification_application: nil, website_url: nil) + # @!method initialize(token:, created:, account_token: nil, beneficial_owner_entities: nil, beneficial_owner_individuals: nil, business_account_token: nil, business_entity: nil, control_person: nil, email: nil, exemption_type: nil, external_id: nil, individual: nil, naics_code: nil, nature_of_business: nil, phone_number: nil, required_documents: nil, status: nil, status_reasons: nil, user_type: nil, verification_application: nil, website_url: nil) # Some parameter documentations has been truncated, see # {Lithic::Models::AccountHolder} for more details. # @@ -189,6 +196,8 @@ class AccountHolder < Lithic::Internal::Type::BaseModel # # @param individual [Lithic::Models::AccountHolder::Individual] Only present when user_type == "INDIVIDUAL". Information about the individual fo # + # @param naics_code [String] Only present when user_type == "BUSINESS". 6-digit North American Industry Class + # # @param nature_of_business [String] Only present when user_type == "BUSINESS". User-submitted description of the bus # # @param phone_number [String] (Deprecated. Use control_person.phone_number when user_type == "BUSINESS". Use i @@ -592,8 +601,8 @@ module StatusReason # The type of Account Holder. If the type is "INDIVIDUAL", the "individual" # attribute will be present. If the type is "BUSINESS" then the "business_entity", - # "control_person", "beneficial_owner_individuals", "nature_of_business", and - # "website_url" attributes will be present. + # "control_person", "beneficial_owner_individuals", "naics_code", + # "nature_of_business", and "website_url" attributes will be present. # # @see Lithic::Models::AccountHolder#user_type module UserType diff --git a/lib/lithic/models/account_holder_create_params.rb b/lib/lithic/models/account_holder_create_params.rb index f5bf456d..f47f1bb8 100644 --- a/lib/lithic/models/account_holder_create_params.rb +++ b/lib/lithic/models/account_holder_create_params.rb @@ -84,6 +84,13 @@ class AccountHolderCreateParams < Lithic::Internal::Type::BaseModel # @return [String, nil] optional :kyb_passed_timestamp, String + # @!attribute naics_code + # 6-digit North American Industry Classification System (NAICS) code for the + # business. + # + # @return [String, nil] + optional :naics_code, String + # @!attribute website_url # Company website URL. # @@ -151,7 +158,7 @@ class AccountHolderCreateParams < Lithic::Internal::Type::BaseModel # @return [String, nil] optional :business_account_token, String - # @!method initialize(business_entity:, tos_timestamp:, workflow:, individual:, address:, email:, first_name:, kyc_exemption_type:, last_name:, phone_number:, beneficial_owner_individuals: nil, control_person: nil, nature_of_business: nil, beneficial_owner_entities: nil, external_id: nil, kyb_passed_timestamp: nil, website_url: nil, kyc_passed_timestamp: nil, business_account_token: nil, request_options: {}) + # @!method initialize(business_entity:, tos_timestamp:, workflow:, individual:, address:, email:, first_name:, kyc_exemption_type:, last_name:, phone_number:, beneficial_owner_individuals: nil, control_person: nil, nature_of_business: nil, beneficial_owner_entities: nil, external_id: nil, kyb_passed_timestamp: nil, naics_code: nil, website_url: nil, kyc_passed_timestamp: nil, business_account_token: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Lithic::Models::AccountHolderCreateParams} for more details. # @@ -187,6 +194,8 @@ class AccountHolderCreateParams < Lithic::Internal::Type::BaseModel # # @param kyb_passed_timestamp [String] An RFC 3339 timestamp indicating when precomputed KYB was completed on the busin # + # @param naics_code [String] 6-digit North American Industry Classification System (NAICS) code for the busin + # # @param website_url [String] Company website URL. # # @param kyc_passed_timestamp [String] An RFC 3339 timestamp indicating when precomputed KYC was completed on the indiv diff --git a/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb b/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb index 7717a20e..2503f308 100644 --- a/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb +++ b/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb @@ -102,6 +102,13 @@ class AccountHolderSimulateEnrollmentReviewResponse < Lithic::Internal::Type::Ba # @return [Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual, nil] optional :individual, -> { Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual } + # @!attribute naics_code + # Only present when user_type == "BUSINESS". 6-digit North American Industry + # Classification System (NAICS) code for the business. + # + # @return [String, nil] + optional :naics_code, String + # @!attribute nature_of_business # Only present when user_type == "BUSINESS". User-submitted description of the # business. @@ -147,8 +154,8 @@ class AccountHolderSimulateEnrollmentReviewResponse < Lithic::Internal::Type::Ba # attribute will be present. # # If the type is "BUSINESS" then the "business_entity", "control_person", - # "beneficial_owner_individuals", "nature_of_business", and "website_url" - # attributes will be present. + # "beneficial_owner_individuals", "naics_code", "nature_of_business", and + # "website_url" attributes will be present. # # @return [Symbol, Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::UserType, nil] optional :user_type, enum: -> { Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::UserType } @@ -166,7 +173,7 @@ class AccountHolderSimulateEnrollmentReviewResponse < Lithic::Internal::Type::Ba # @return [String, nil] optional :website_url, String - # @!method initialize(token: nil, account_token: nil, beneficial_owner_entities: nil, beneficial_owner_individuals: nil, business_account_token: nil, business_entity: nil, control_person: nil, created: nil, email: nil, exemption_type: nil, external_id: nil, individual: nil, nature_of_business: nil, phone_number: nil, required_documents: nil, status: nil, status_reasons: nil, user_type: nil, verification_application: nil, website_url: nil) + # @!method initialize(token: nil, account_token: nil, beneficial_owner_entities: nil, beneficial_owner_individuals: nil, business_account_token: nil, business_entity: nil, control_person: nil, created: nil, email: nil, exemption_type: nil, external_id: nil, individual: nil, naics_code: nil, nature_of_business: nil, phone_number: nil, required_documents: nil, status: nil, status_reasons: nil, user_type: nil, verification_application: nil, website_url: nil) # Some parameter documentations has been truncated, see # {Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse} for more # details. @@ -195,6 +202,8 @@ class AccountHolderSimulateEnrollmentReviewResponse < Lithic::Internal::Type::Ba # # @param individual [Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual] Only present when user_type == "INDIVIDUAL". Information about the individual fo # + # @param naics_code [String] Only present when user_type == "BUSINESS". 6-digit North American Industry Class + # # @param nature_of_business [String] Only present when user_type == "BUSINESS". User-submitted description of the bus # # @param phone_number [String] (Deprecated. Use control_person.phone_number when user_type == "BUSINESS". @@ -660,8 +669,8 @@ module StatusReason # attribute will be present. # # If the type is "BUSINESS" then the "business_entity", "control_person", - # "beneficial_owner_individuals", "nature_of_business", and "website_url" - # attributes will be present. + # "beneficial_owner_individuals", "naics_code", "nature_of_business", and + # "website_url" attributes will be present. # # @see Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse#user_type module UserType diff --git a/lib/lithic/models/account_holder_update_params.rb b/lib/lithic/models/account_holder_update_params.rb index 4b81019e..6a354fb0 100644 --- a/lib/lithic/models/account_holder_update_params.rb +++ b/lib/lithic/models/account_holder_update_params.rb @@ -55,6 +55,13 @@ class AccountHolderUpdateParams < Lithic::Internal::Type::BaseModel # @return [String, nil] optional :external_id, String + # @!attribute naics_code + # 6-digit North American Industry Classification System (NAICS) code for the + # business. + # + # @return [String, nil] + optional :naics_code, String + # @!attribute nature_of_business # Short description of the company's line of business (i.e., what does the company # do?). @@ -122,7 +129,7 @@ class AccountHolderUpdateParams < Lithic::Internal::Type::BaseModel # @return [String, nil] optional :phone_number, String - # @!method initialize(beneficial_owner_entities: nil, beneficial_owner_individuals: nil, business_entity: nil, control_person: nil, external_id: nil, nature_of_business: nil, website_url: nil, individual: nil, address: nil, business_account_token: nil, email: nil, first_name: nil, last_name: nil, legal_business_name: nil, phone_number: nil, request_options: {}) + # @!method initialize(beneficial_owner_entities: nil, beneficial_owner_individuals: nil, business_entity: nil, control_person: nil, external_id: nil, naics_code: nil, nature_of_business: nil, website_url: nil, individual: nil, address: nil, business_account_token: nil, email: nil, first_name: nil, last_name: nil, legal_business_name: nil, phone_number: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Lithic::Models::AccountHolderUpdateParams} for more details. # @@ -136,6 +143,8 @@ class AccountHolderUpdateParams < Lithic::Internal::Type::BaseModel # # @param external_id [String] A user provided id that can be used to link an account holder with an external s # + # @param naics_code [String] 6-digit North American Industry Classification System (NAICS) code for the busin + # # @param nature_of_business [String] Short description of the company's line of business (i.e., what does the company # # @param website_url [String] Company website URL. diff --git a/lib/lithic/models/account_holder_update_response.rb b/lib/lithic/models/account_holder_update_response.rb index 04b9d1fd..e9b8e8fb 100644 --- a/lib/lithic/models/account_holder_update_response.rb +++ b/lib/lithic/models/account_holder_update_response.rb @@ -109,6 +109,13 @@ class KYBKYCPatchResponse < Lithic::Internal::Type::BaseModel # @return [Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse::Individual, nil] optional :individual, -> { Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse::Individual } + # @!attribute naics_code + # Only present when user_type == "BUSINESS". 6-digit North American Industry + # Classification System (NAICS) code for the business. + # + # @return [String, nil] + optional :naics_code, String + # @!attribute nature_of_business # Only present when user_type == "BUSINESS". User-submitted description of the # business. @@ -154,8 +161,8 @@ class KYBKYCPatchResponse < Lithic::Internal::Type::BaseModel # attribute will be present. # # If the type is "BUSINESS" then the "business_entity", "control_person", - # "beneficial_owner_individuals", "nature_of_business", and "website_url" - # attributes will be present. + # "beneficial_owner_individuals", "naics_code", "nature_of_business", and + # "website_url" attributes will be present. # # @return [Symbol, Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse::UserType, nil] optional :user_type, @@ -174,7 +181,7 @@ class KYBKYCPatchResponse < Lithic::Internal::Type::BaseModel # @return [String, nil] optional :website_url, String - # @!method initialize(token: nil, account_token: nil, beneficial_owner_entities: nil, beneficial_owner_individuals: nil, business_account_token: nil, business_entity: nil, control_person: nil, created: nil, email: nil, exemption_type: nil, external_id: nil, individual: nil, nature_of_business: nil, phone_number: nil, required_documents: nil, status: nil, status_reasons: nil, user_type: nil, verification_application: nil, website_url: nil) + # @!method initialize(token: nil, account_token: nil, beneficial_owner_entities: nil, beneficial_owner_individuals: nil, business_account_token: nil, business_entity: nil, control_person: nil, created: nil, email: nil, exemption_type: nil, external_id: nil, individual: nil, naics_code: nil, nature_of_business: nil, phone_number: nil, required_documents: nil, status: nil, status_reasons: nil, user_type: nil, verification_application: nil, website_url: nil) # Some parameter documentations has been truncated, see # {Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse} for more # details. @@ -203,6 +210,8 @@ class KYBKYCPatchResponse < Lithic::Internal::Type::BaseModel # # @param individual [Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse::Individual] Only present when user_type == "INDIVIDUAL". Information about the individual fo # + # @param naics_code [String] Only present when user_type == "BUSINESS". 6-digit North American Industry Class + # # @param nature_of_business [String] Only present when user_type == "BUSINESS". User-submitted description of the bus # # @param phone_number [String] (Deprecated. Use control_person.phone_number when user_type == "BUSINESS". @@ -668,8 +677,8 @@ module StatusReason # attribute will be present. # # If the type is "BUSINESS" then the "business_entity", "control_person", - # "beneficial_owner_individuals", "nature_of_business", and "website_url" - # attributes will be present. + # "beneficial_owner_individuals", "naics_code", "nature_of_business", and + # "website_url" attributes will be present. # # @see Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse#user_type module UserType diff --git a/lib/lithic/models/account_holder_updated_webhook_event.rb b/lib/lithic/models/account_holder_updated_webhook_event.rb index 70a7ec84..73c8e16a 100644 --- a/lib/lithic/models/account_holder_updated_webhook_event.rb +++ b/lib/lithic/models/account_holder_updated_webhook_event.rb @@ -41,6 +41,13 @@ class KYBPayload < Lithic::Internal::Type::BaseModel # @return [String, nil] optional :external_id, String + # @!attribute naics_code + # 6-digit North American Industry Classification System (NAICS) code for the + # business. Only present if naics_code was included in the update request. + # + # @return [String, nil] + optional :naics_code, String + # @!attribute nature_of_business # Short description of the company's line of business (i.e., what does the company # do?). @@ -54,7 +61,7 @@ class KYBPayload < Lithic::Internal::Type::BaseModel # @return [String, nil] optional :website_url, String - # @!method initialize(token:, update_request:, event_type: nil, external_id: nil, nature_of_business: nil, website_url: nil) + # @!method initialize(token:, update_request:, event_type: nil, external_id: nil, naics_code: nil, nature_of_business: nil, website_url: nil) # Some parameter documentations has been truncated, see # {Lithic::Models::AccountHolderUpdatedWebhookEvent::KYBPayload} for more details. # @@ -68,6 +75,8 @@ class KYBPayload < Lithic::Internal::Type::BaseModel # # @param external_id [String] A user provided id that can be used to link an account holder with an external s # + # @param naics_code [String] 6-digit North American Industry Classification System (NAICS) code for the busin + # # @param nature_of_business [String] Short description of the company's line of business (i.e., what does the company # # @param website_url [String] Company website URL. diff --git a/lib/lithic/models/kyb.rb b/lib/lithic/models/kyb.rb index 1e01db44..1021c701 100644 --- a/lib/lithic/models/kyb.rb +++ b/lib/lithic/models/kyb.rb @@ -81,13 +81,20 @@ class KYB < Lithic::Internal::Type::BaseModel # @return [String, nil] optional :kyb_passed_timestamp, String + # @!attribute naics_code + # 6-digit North American Industry Classification System (NAICS) code for the + # business. + # + # @return [String, nil] + optional :naics_code, String + # @!attribute website_url # Company website URL. # # @return [String, nil] optional :website_url, String - # @!method initialize(beneficial_owner_individuals:, business_entity:, control_person:, nature_of_business:, tos_timestamp:, workflow:, beneficial_owner_entities: nil, external_id: nil, kyb_passed_timestamp: nil, website_url: nil) + # @!method initialize(beneficial_owner_individuals:, business_entity:, control_person:, nature_of_business:, tos_timestamp:, workflow:, beneficial_owner_entities: nil, external_id: nil, kyb_passed_timestamp: nil, naics_code: nil, website_url: nil) # Some parameter documentations has been truncated, see {Lithic::Models::KYB} for # more details. # @@ -109,6 +116,8 @@ class KYB < Lithic::Internal::Type::BaseModel # # @param kyb_passed_timestamp [String] An RFC 3339 timestamp indicating when precomputed KYB was completed on the busin # + # @param naics_code [String] 6-digit North American Industry Classification System (NAICS) code for the busin + # # @param website_url [String] Company website URL. class BeneficialOwnerIndividual < Lithic::Internal::Type::BaseModel diff --git a/lib/lithic/models/parsed_webhook_event.rb b/lib/lithic/models/parsed_webhook_event.rb index b044bcb1..e4731586 100644 --- a/lib/lithic/models/parsed_webhook_event.rb +++ b/lib/lithic/models/parsed_webhook_event.rb @@ -163,6 +163,13 @@ class KYBPayload < Lithic::Internal::Type::BaseModel # @return [String, nil] optional :external_id, String + # @!attribute naics_code + # 6-digit North American Industry Classification System (NAICS) code for the + # business. Only present if naics_code was included in the update request. + # + # @return [String, nil] + optional :naics_code, String + # @!attribute nature_of_business # Short description of the company's line of business (i.e., what does the company # do?). @@ -176,7 +183,7 @@ class KYBPayload < Lithic::Internal::Type::BaseModel # @return [String, nil] optional :website_url, String - # @!method initialize(token:, update_request:, event_type: nil, external_id: nil, nature_of_business: nil, website_url: nil) + # @!method initialize(token:, update_request:, event_type: nil, external_id: nil, naics_code: nil, nature_of_business: nil, website_url: nil) # Some parameter documentations has been truncated, see # {Lithic::Models::ParsedWebhookEvent::KYBPayload} for more details. # @@ -190,6 +197,8 @@ class KYBPayload < Lithic::Internal::Type::BaseModel # # @param external_id [String] A user provided id that can be used to link an account holder with an external s # + # @param naics_code [String] 6-digit North American Industry Classification System (NAICS) code for the busin + # # @param nature_of_business [String] Short description of the company's line of business (i.e., what does the company # # @param website_url [String] Company website URL. diff --git a/lib/lithic/resources/account_holders.rb b/lib/lithic/resources/account_holders.rb index 03dc95f2..2f44d2b4 100644 --- a/lib/lithic/resources/account_holders.rb +++ b/lib/lithic/resources/account_holders.rb @@ -15,7 +15,7 @@ class AccountHolders # process. This endpoint can only be used on accounts that are part of the program # that the calling API key manages. # - # @overload create(business_entity:, tos_timestamp:, workflow:, individual:, address:, email:, first_name:, kyc_exemption_type:, last_name:, phone_number:, beneficial_owner_individuals: nil, control_person: nil, nature_of_business: nil, beneficial_owner_entities: nil, external_id: nil, kyb_passed_timestamp: nil, website_url: nil, kyc_passed_timestamp: nil, business_account_token: nil, request_options: {}) + # @overload create(business_entity:, tos_timestamp:, workflow:, individual:, address:, email:, first_name:, kyc_exemption_type:, last_name:, phone_number:, beneficial_owner_individuals: nil, control_person: nil, nature_of_business: nil, beneficial_owner_entities: nil, external_id: nil, kyb_passed_timestamp: nil, naics_code: nil, website_url: nil, kyc_passed_timestamp: nil, business_account_token: nil, request_options: {}) # # @param business_entity [Lithic::Models::AccountHolderCreateParams::BusinessEntity] Information for business for which the account is being opened. # @@ -49,6 +49,8 @@ class AccountHolders # # @param kyb_passed_timestamp [String] An RFC 3339 timestamp indicating when precomputed KYB was completed on the busin # + # @param naics_code [String] 6-digit North American Industry Classification System (NAICS) code for the busin + # # @param website_url [String] Company website URL. # # @param kyc_passed_timestamp [String] An RFC 3339 timestamp indicating when precomputed KYC was completed on the indiv @@ -106,7 +108,7 @@ def retrieve(account_holder_token, params = {}) # process. This endpoint can only be used on existing accounts that are part of # the program that the calling API key manages. # - # @overload update(account_holder_token, beneficial_owner_entities: nil, beneficial_owner_individuals: nil, business_entity: nil, control_person: nil, external_id: nil, nature_of_business: nil, website_url: nil, individual: nil, address: nil, business_account_token: nil, email: nil, first_name: nil, last_name: nil, legal_business_name: nil, phone_number: nil, request_options: {}) + # @overload update(account_holder_token, beneficial_owner_entities: nil, beneficial_owner_individuals: nil, business_entity: nil, control_person: nil, external_id: nil, naics_code: nil, nature_of_business: nil, website_url: nil, individual: nil, address: nil, business_account_token: nil, email: nil, first_name: nil, last_name: nil, legal_business_name: nil, phone_number: nil, request_options: {}) # # @param account_holder_token [String] Globally unique identifier for the account holder. # @@ -120,6 +122,8 @@ def retrieve(account_holder_token, params = {}) # # @param external_id [String] A user provided id that can be used to link an account holder with an external s # + # @param naics_code [String] 6-digit North American Industry Classification System (NAICS) code for the busin + # # @param nature_of_business [String] Short description of the company's line of business (i.e., what does the company # # @param website_url [String] Company website URL. diff --git a/rbi/lithic/models/account_holder.rbi b/rbi/lithic/models/account_holder.rbi index ce6d7883..00d02f61 100644 --- a/rbi/lithic/models/account_holder.rbi +++ b/rbi/lithic/models/account_holder.rbi @@ -133,6 +133,14 @@ module Lithic sig { params(individual: Lithic::AccountHolder::Individual::OrHash).void } attr_writer :individual + # Only present when user_type == "BUSINESS". 6-digit North American Industry + # Classification System (NAICS) code for the business. + sig { returns(T.nilable(String)) } + attr_reader :naics_code + + sig { params(naics_code: String).void } + attr_writer :naics_code + # Only present when user_type == "BUSINESS". User-submitted description of the # business. sig { returns(T.nilable(String)) } @@ -195,8 +203,8 @@ module Lithic # The type of Account Holder. If the type is "INDIVIDUAL", the "individual" # attribute will be present. If the type is "BUSINESS" then the "business_entity", - # "control_person", "beneficial_owner_individuals", "nature_of_business", and - # "website_url" attributes will be present. + # "control_person", "beneficial_owner_individuals", "naics_code", + # "nature_of_business", and "website_url" attributes will be present. sig { returns(T.nilable(Lithic::AccountHolder::UserType::TaggedSymbol)) } attr_reader :user_type @@ -238,6 +246,7 @@ module Lithic exemption_type: Lithic::AccountHolder::ExemptionType::OrSymbol, external_id: String, individual: Lithic::AccountHolder::Individual::OrHash, + naics_code: String, nature_of_business: String, phone_number: String, required_documents: T::Array[Lithic::RequiredDocument::OrHash], @@ -292,6 +301,9 @@ module Lithic # Only present when user_type == "INDIVIDUAL". Information about the individual # for which the account is being opened and KYC is being run. individual: nil, + # Only present when user_type == "BUSINESS". 6-digit North American Industry + # Classification System (NAICS) code for the business. + naics_code: nil, # Only present when user_type == "BUSINESS". User-submitted description of the # business. nature_of_business: nil, @@ -316,8 +328,8 @@ module Lithic status_reasons: nil, # The type of Account Holder. If the type is "INDIVIDUAL", the "individual" # attribute will be present. If the type is "BUSINESS" then the "business_entity", - # "control_person", "beneficial_owner_individuals", "nature_of_business", and - # "website_url" attributes will be present. + # "control_person", "beneficial_owner_individuals", "naics_code", + # "nature_of_business", and "website_url" attributes will be present. user_type: nil, # Information about the most recent identity verification attempt verification_application: nil, @@ -343,6 +355,7 @@ module Lithic exemption_type: Lithic::AccountHolder::ExemptionType::TaggedSymbol, external_id: String, individual: Lithic::AccountHolder::Individual, + naics_code: String, nature_of_business: String, phone_number: String, required_documents: T::Array[Lithic::RequiredDocument], @@ -959,8 +972,8 @@ module Lithic # The type of Account Holder. If the type is "INDIVIDUAL", the "individual" # attribute will be present. If the type is "BUSINESS" then the "business_entity", - # "control_person", "beneficial_owner_individuals", "nature_of_business", and - # "website_url" attributes will be present. + # "control_person", "beneficial_owner_individuals", "naics_code", + # "nature_of_business", and "website_url" attributes will be present. module UserType extend Lithic::Internal::Type::Enum diff --git a/rbi/lithic/models/account_holder_create_params.rbi b/rbi/lithic/models/account_holder_create_params.rbi index a19dabf5..388db64f 100644 --- a/rbi/lithic/models/account_holder_create_params.rbi +++ b/rbi/lithic/models/account_holder_create_params.rbi @@ -127,6 +127,14 @@ module Lithic sig { params(kyb_passed_timestamp: String).void } attr_writer :kyb_passed_timestamp + # 6-digit North American Industry Classification System (NAICS) code for the + # business. + sig { returns(T.nilable(String)) } + attr_reader :naics_code + + sig { params(naics_code: String).void } + attr_writer :naics_code + # Company website URL. sig { returns(T.nilable(String)) } attr_reader :website_url @@ -222,6 +230,7 @@ module Lithic ], external_id: String, kyb_passed_timestamp: String, + naics_code: String, website_url: String, kyc_passed_timestamp: String, business_account_token: String, @@ -282,6 +291,9 @@ module Lithic # # This field is required only if workflow type is `KYB_BYO`. kyb_passed_timestamp: nil, + # 6-digit North American Industry Classification System (NAICS) code for the + # business. + naics_code: nil, # Company website URL. website_url: nil, # An RFC 3339 timestamp indicating when precomputed KYC was completed on the @@ -315,6 +327,7 @@ module Lithic ], external_id: String, kyb_passed_timestamp: String, + naics_code: String, website_url: String, individual: Lithic::AccountHolderCreateParams::Individual, kyc_passed_timestamp: String, diff --git a/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi b/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi index 0229a2ae..2e06b2fe 100644 --- a/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi +++ b/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi @@ -167,6 +167,14 @@ module Lithic end attr_writer :individual + # Only present when user_type == "BUSINESS". 6-digit North American Industry + # Classification System (NAICS) code for the business. + sig { returns(T.nilable(String)) } + attr_reader :naics_code + + sig { params(naics_code: String).void } + attr_writer :naics_code + # Only present when user_type == "BUSINESS". User-submitted description of the # business. sig { returns(T.nilable(String)) } @@ -245,8 +253,8 @@ module Lithic # attribute will be present. # # If the type is "BUSINESS" then the "business_entity", "control_person", - # "beneficial_owner_individuals", "nature_of_business", and "website_url" - # attributes will be present. + # "beneficial_owner_individuals", "naics_code", "nature_of_business", and + # "website_url" attributes will be present. sig do returns( T.nilable( @@ -310,6 +318,7 @@ module Lithic external_id: String, individual: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual::OrHash, + naics_code: String, nature_of_business: String, phone_number: String, required_documents: T::Array[Lithic::RequiredDocument::OrHash], @@ -374,6 +383,9 @@ module Lithic # Only present when user_type == "INDIVIDUAL". Information about the individual # for which the account is being opened and KYC is being run. individual: nil, + # Only present when user_type == "BUSINESS". 6-digit North American Industry + # Classification System (NAICS) code for the business. + naics_code: nil, # Only present when user_type == "BUSINESS". User-submitted description of the # business. nature_of_business: nil, @@ -397,8 +409,8 @@ module Lithic # attribute will be present. # # If the type is "BUSINESS" then the "business_entity", "control_person", - # "beneficial_owner_individuals", "nature_of_business", and "website_url" - # attributes will be present. + # "beneficial_owner_individuals", "naics_code", "nature_of_business", and + # "website_url" attributes will be present. user_type: nil, # Information about the most recent identity verification attempt verification_application: nil, @@ -428,6 +440,7 @@ module Lithic external_id: String, individual: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual, + naics_code: String, nature_of_business: String, phone_number: String, required_documents: T::Array[Lithic::RequiredDocument], @@ -1286,8 +1299,8 @@ module Lithic # attribute will be present. # # If the type is "BUSINESS" then the "business_entity", "control_person", - # "beneficial_owner_individuals", "nature_of_business", and "website_url" - # attributes will be present. + # "beneficial_owner_individuals", "naics_code", "nature_of_business", and + # "website_url" attributes will be present. module UserType extend Lithic::Internal::Type::Enum diff --git a/rbi/lithic/models/account_holder_update_params.rbi b/rbi/lithic/models/account_holder_update_params.rbi index 3f1bde29..0f63b1c1 100644 --- a/rbi/lithic/models/account_holder_update_params.rbi +++ b/rbi/lithic/models/account_holder_update_params.rbi @@ -102,6 +102,14 @@ module Lithic sig { params(external_id: String).void } attr_writer :external_id + # 6-digit North American Industry Classification System (NAICS) code for the + # business. + sig { returns(T.nilable(String)) } + attr_reader :naics_code + + sig { params(naics_code: String).void } + attr_writer :naics_code + # Short description of the company's line of business (i.e., what does the company # do?). sig { returns(T.nilable(String)) } @@ -198,6 +206,7 @@ module Lithic control_person: Lithic::AccountHolderUpdateParams::ControlPerson::OrHash, external_id: String, + naics_code: String, nature_of_business: String, website_url: String, individual: Lithic::AccountHolderUpdateParams::Individual::OrHash, @@ -236,6 +245,9 @@ module Lithic # A user provided id that can be used to link an account holder with an external # system external_id: nil, + # 6-digit North American Industry Classification System (NAICS) code for the + # business. + naics_code: nil, # Short description of the company's line of business (i.e., what does the company # do?). nature_of_business: nil, @@ -281,6 +293,7 @@ module Lithic business_entity: Lithic::AccountHolderUpdateParams::BusinessEntity, control_person: Lithic::AccountHolderUpdateParams::ControlPerson, external_id: String, + naics_code: String, nature_of_business: String, website_url: String, individual: Lithic::AccountHolderUpdateParams::Individual, diff --git a/rbi/lithic/models/account_holder_update_response.rbi b/rbi/lithic/models/account_holder_update_response.rbi index 3a7b75c9..06b08dca 100644 --- a/rbi/lithic/models/account_holder_update_response.rbi +++ b/rbi/lithic/models/account_holder_update_response.rbi @@ -179,6 +179,14 @@ module Lithic end attr_writer :individual + # Only present when user_type == "BUSINESS". 6-digit North American Industry + # Classification System (NAICS) code for the business. + sig { returns(T.nilable(String)) } + attr_reader :naics_code + + sig { params(naics_code: String).void } + attr_writer :naics_code + # Only present when user_type == "BUSINESS". User-submitted description of the # business. sig { returns(T.nilable(String)) } @@ -257,8 +265,8 @@ module Lithic # attribute will be present. # # If the type is "BUSINESS" then the "business_entity", "control_person", - # "beneficial_owner_individuals", "nature_of_business", and "website_url" - # attributes will be present. + # "beneficial_owner_individuals", "naics_code", "nature_of_business", and + # "website_url" attributes will be present. sig do returns( T.nilable( @@ -322,6 +330,7 @@ module Lithic external_id: String, individual: Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse::Individual::OrHash, + naics_code: String, nature_of_business: String, phone_number: String, required_documents: T::Array[Lithic::RequiredDocument::OrHash], @@ -386,6 +395,9 @@ module Lithic # Only present when user_type == "INDIVIDUAL". Information about the individual # for which the account is being opened and KYC is being run. individual: nil, + # Only present when user_type == "BUSINESS". 6-digit North American Industry + # Classification System (NAICS) code for the business. + naics_code: nil, # Only present when user_type == "BUSINESS". User-submitted description of the # business. nature_of_business: nil, @@ -409,8 +421,8 @@ module Lithic # attribute will be present. # # If the type is "BUSINESS" then the "business_entity", "control_person", - # "beneficial_owner_individuals", "nature_of_business", and "website_url" - # attributes will be present. + # "beneficial_owner_individuals", "naics_code", "nature_of_business", and + # "website_url" attributes will be present. user_type: nil, # Information about the most recent identity verification attempt verification_application: nil, @@ -440,6 +452,7 @@ module Lithic external_id: String, individual: Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse::Individual, + naics_code: String, nature_of_business: String, phone_number: String, required_documents: T::Array[Lithic::RequiredDocument], @@ -1298,8 +1311,8 @@ module Lithic # attribute will be present. # # If the type is "BUSINESS" then the "business_entity", "control_person", - # "beneficial_owner_individuals", "nature_of_business", and "website_url" - # attributes will be present. + # "beneficial_owner_individuals", "naics_code", "nature_of_business", and + # "website_url" attributes will be present. module UserType extend Lithic::Internal::Type::Enum diff --git a/rbi/lithic/models/account_holder_updated_webhook_event.rbi b/rbi/lithic/models/account_holder_updated_webhook_event.rbi index 8e7f9603..15d0a4ce 100644 --- a/rbi/lithic/models/account_holder_updated_webhook_event.rbi +++ b/rbi/lithic/models/account_holder_updated_webhook_event.rbi @@ -70,6 +70,14 @@ module Lithic sig { params(external_id: String).void } attr_writer :external_id + # 6-digit North American Industry Classification System (NAICS) code for the + # business. Only present if naics_code was included in the update request. + sig { returns(T.nilable(String)) } + attr_reader :naics_code + + sig { params(naics_code: String).void } + attr_writer :naics_code + # Short description of the company's line of business (i.e., what does the company # do?). sig { returns(T.nilable(String)) } @@ -94,6 +102,7 @@ module Lithic event_type: Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::EventType::OrSymbol, external_id: String, + naics_code: String, nature_of_business: String, website_url: String ).returns(T.attached_class) @@ -108,6 +117,9 @@ module Lithic # A user provided id that can be used to link an account holder with an external # system external_id: nil, + # 6-digit North American Industry Classification System (NAICS) code for the + # business. Only present if naics_code was included in the update request. + naics_code: nil, # Short description of the company's line of business (i.e., what does the company # do?). nature_of_business: nil, @@ -125,6 +137,7 @@ module Lithic event_type: Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::EventType::TaggedSymbol, external_id: String, + naics_code: String, nature_of_business: String, website_url: String } diff --git a/rbi/lithic/models/kyb.rbi b/rbi/lithic/models/kyb.rbi index be98accf..81060ed8 100644 --- a/rbi/lithic/models/kyb.rbi +++ b/rbi/lithic/models/kyb.rbi @@ -81,6 +81,14 @@ module Lithic sig { params(kyb_passed_timestamp: String).void } attr_writer :kyb_passed_timestamp + # 6-digit North American Industry Classification System (NAICS) code for the + # business. + sig { returns(T.nilable(String)) } + attr_reader :naics_code + + sig { params(naics_code: String).void } + attr_writer :naics_code + # Company website URL. sig { returns(T.nilable(String)) } attr_reader :website_url @@ -101,6 +109,7 @@ module Lithic T::Array[Lithic::KYB::BeneficialOwnerEntity::OrHash], external_id: String, kyb_passed_timestamp: String, + naics_code: String, website_url: String ).returns(T.attached_class) end @@ -143,6 +152,9 @@ module Lithic # # This field is required only if workflow type is `KYB_BYO`. kyb_passed_timestamp: nil, + # 6-digit North American Industry Classification System (NAICS) code for the + # business. + naics_code: nil, # Company website URL. website_url: nil ) @@ -162,6 +174,7 @@ module Lithic T::Array[Lithic::KYB::BeneficialOwnerEntity], external_id: String, kyb_passed_timestamp: String, + naics_code: String, website_url: String } ) diff --git a/rbi/lithic/models/parsed_webhook_event.rbi b/rbi/lithic/models/parsed_webhook_event.rbi index 5265312d..9dbd4c3c 100644 --- a/rbi/lithic/models/parsed_webhook_event.rbi +++ b/rbi/lithic/models/parsed_webhook_event.rbi @@ -121,6 +121,14 @@ module Lithic sig { params(external_id: String).void } attr_writer :external_id + # 6-digit North American Industry Classification System (NAICS) code for the + # business. Only present if naics_code was included in the update request. + sig { returns(T.nilable(String)) } + attr_reader :naics_code + + sig { params(naics_code: String).void } + attr_writer :naics_code + # Short description of the company's line of business (i.e., what does the company # do?). sig { returns(T.nilable(String)) } @@ -145,6 +153,7 @@ module Lithic event_type: Lithic::ParsedWebhookEvent::KYBPayload::EventType::OrSymbol, external_id: String, + naics_code: String, nature_of_business: String, website_url: String ).returns(T.attached_class) @@ -159,6 +168,9 @@ module Lithic # A user provided id that can be used to link an account holder with an external # system external_id: nil, + # 6-digit North American Industry Classification System (NAICS) code for the + # business. Only present if naics_code was included in the update request. + naics_code: nil, # Short description of the company's line of business (i.e., what does the company # do?). nature_of_business: nil, @@ -176,6 +188,7 @@ module Lithic event_type: Lithic::ParsedWebhookEvent::KYBPayload::EventType::TaggedSymbol, external_id: String, + naics_code: String, nature_of_business: String, website_url: String } diff --git a/rbi/lithic/resources/account_holders.rbi b/rbi/lithic/resources/account_holders.rbi index 678325ca..04c8d74c 100644 --- a/rbi/lithic/resources/account_holders.rbi +++ b/rbi/lithic/resources/account_holders.rbi @@ -38,6 +38,7 @@ module Lithic ], external_id: String, kyb_passed_timestamp: String, + naics_code: String, website_url: String, kyc_passed_timestamp: String, business_account_token: String, @@ -98,6 +99,9 @@ module Lithic # # This field is required only if workflow type is `KYB_BYO`. kyb_passed_timestamp: nil, + # 6-digit North American Industry Classification System (NAICS) code for the + # business. + naics_code: nil, # Company website URL. website_url: nil, # An RFC 3339 timestamp indicating when precomputed KYC was completed on the @@ -154,6 +158,7 @@ module Lithic control_person: Lithic::AccountHolderUpdateParams::ControlPerson::OrHash, external_id: String, + naics_code: String, nature_of_business: String, website_url: String, individual: Lithic::AccountHolderUpdateParams::Individual::OrHash, @@ -194,6 +199,9 @@ module Lithic # A user provided id that can be used to link an account holder with an external # system external_id: nil, + # 6-digit North American Industry Classification System (NAICS) code for the + # business. + naics_code: nil, # Short description of the company's line of business (i.e., what does the company # do?). nature_of_business: nil, diff --git a/sig/lithic/models/account_holder.rbs b/sig/lithic/models/account_holder.rbs index 4e4dfd7d..47d6d6d9 100644 --- a/sig/lithic/models/account_holder.rbs +++ b/sig/lithic/models/account_holder.rbs @@ -14,6 +14,7 @@ module Lithic exemption_type: Lithic::Models::AccountHolder::exemption_type, external_id: String, individual: Lithic::AccountHolder::Individual, + naics_code: String, nature_of_business: String, phone_number: String, required_documents: ::Array[Lithic::RequiredDocument], @@ -81,6 +82,10 @@ module Lithic Lithic::AccountHolder::Individual ) -> Lithic::AccountHolder::Individual + attr_reader naics_code: String? + + def naics_code=: (String) -> String + attr_reader nature_of_business: String? def nature_of_business=: (String) -> String @@ -136,6 +141,7 @@ module Lithic ?exemption_type: Lithic::Models::AccountHolder::exemption_type, ?external_id: String, ?individual: Lithic::AccountHolder::Individual, + ?naics_code: String, ?nature_of_business: String, ?phone_number: String, ?required_documents: ::Array[Lithic::RequiredDocument], @@ -159,6 +165,7 @@ module Lithic exemption_type: Lithic::Models::AccountHolder::exemption_type, external_id: String, individual: Lithic::AccountHolder::Individual, + naics_code: String, nature_of_business: String, phone_number: String, required_documents: ::Array[Lithic::RequiredDocument], diff --git a/sig/lithic/models/account_holder_create_params.rbs b/sig/lithic/models/account_holder_create_params.rbs index c6458532..be3a2178 100644 --- a/sig/lithic/models/account_holder_create_params.rbs +++ b/sig/lithic/models/account_holder_create_params.rbs @@ -11,6 +11,7 @@ module Lithic beneficial_owner_entities: ::Array[Lithic::AccountHolderCreateParams::BeneficialOwnerEntity], external_id: String, kyb_passed_timestamp: String, + naics_code: String, website_url: String, individual: Lithic::AccountHolderCreateParams::Individual, kyc_passed_timestamp: String, @@ -64,6 +65,10 @@ module Lithic def kyb_passed_timestamp=: (String) -> String + attr_reader naics_code: String? + + def naics_code=: (String) -> String + attr_reader website_url: String? def website_url=: (String) -> String @@ -107,6 +112,7 @@ module Lithic ?beneficial_owner_entities: ::Array[Lithic::AccountHolderCreateParams::BeneficialOwnerEntity], ?external_id: String, ?kyb_passed_timestamp: String, + ?naics_code: String, ?website_url: String, ?kyc_passed_timestamp: String, ?business_account_token: String, @@ -123,6 +129,7 @@ module Lithic beneficial_owner_entities: ::Array[Lithic::AccountHolderCreateParams::BeneficialOwnerEntity], external_id: String, kyb_passed_timestamp: String, + naics_code: String, website_url: String, individual: Lithic::AccountHolderCreateParams::Individual, kyc_passed_timestamp: String, diff --git a/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs b/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs index ce4c78c3..4bc478ae 100644 --- a/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs +++ b/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs @@ -14,6 +14,7 @@ module Lithic exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type, external_id: String, individual: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual, + naics_code: String, nature_of_business: String, phone_number: String, required_documents: ::Array[Lithic::RequiredDocument], @@ -83,6 +84,10 @@ module Lithic Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual ) -> Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual + attr_reader naics_code: String? + + def naics_code=: (String) -> String + attr_reader nature_of_business: String? def nature_of_business=: (String) -> String @@ -138,6 +143,7 @@ module Lithic ?exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type, ?external_id: String, ?individual: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual, + ?naics_code: String, ?nature_of_business: String, ?phone_number: String, ?required_documents: ::Array[Lithic::RequiredDocument], @@ -161,6 +167,7 @@ module Lithic exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type, external_id: String, individual: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual, + naics_code: String, nature_of_business: String, phone_number: String, required_documents: ::Array[Lithic::RequiredDocument], diff --git a/sig/lithic/models/account_holder_update_params.rbs b/sig/lithic/models/account_holder_update_params.rbs index 2e0f723e..76aff3b8 100644 --- a/sig/lithic/models/account_holder_update_params.rbs +++ b/sig/lithic/models/account_holder_update_params.rbs @@ -7,6 +7,7 @@ module Lithic business_entity: Lithic::AccountHolderUpdateParams::BusinessEntity, control_person: Lithic::AccountHolderUpdateParams::ControlPerson, external_id: String, + naics_code: String, nature_of_business: String, website_url: String, individual: Lithic::AccountHolderUpdateParams::Individual, @@ -52,6 +53,10 @@ module Lithic def external_id=: (String) -> String + attr_reader naics_code: String? + + def naics_code=: (String) -> String + attr_reader nature_of_business: String? def nature_of_business=: (String) -> String @@ -100,6 +105,7 @@ module Lithic ?business_entity: Lithic::AccountHolderUpdateParams::BusinessEntity, ?control_person: Lithic::AccountHolderUpdateParams::ControlPerson, ?external_id: String, + ?naics_code: String, ?nature_of_business: String, ?website_url: String, ?individual: Lithic::AccountHolderUpdateParams::Individual, @@ -119,6 +125,7 @@ module Lithic business_entity: Lithic::AccountHolderUpdateParams::BusinessEntity, control_person: Lithic::AccountHolderUpdateParams::ControlPerson, external_id: String, + naics_code: String, nature_of_business: String, website_url: String, individual: Lithic::AccountHolderUpdateParams::Individual, diff --git a/sig/lithic/models/account_holder_update_response.rbs b/sig/lithic/models/account_holder_update_response.rbs index 5e572197..eaa9554c 100644 --- a/sig/lithic/models/account_holder_update_response.rbs +++ b/sig/lithic/models/account_holder_update_response.rbs @@ -21,6 +21,7 @@ module Lithic exemption_type: Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse::exemption_type, external_id: String, individual: Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse::Individual, + naics_code: String, nature_of_business: String, phone_number: String, required_documents: ::Array[Lithic::RequiredDocument], @@ -90,6 +91,10 @@ module Lithic Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse::Individual ) -> Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse::Individual + attr_reader naics_code: String? + + def naics_code=: (String) -> String + attr_reader nature_of_business: String? def nature_of_business=: (String) -> String @@ -145,6 +150,7 @@ module Lithic ?exemption_type: Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse::exemption_type, ?external_id: String, ?individual: Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse::Individual, + ?naics_code: String, ?nature_of_business: String, ?phone_number: String, ?required_documents: ::Array[Lithic::RequiredDocument], @@ -168,6 +174,7 @@ module Lithic exemption_type: Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse::exemption_type, external_id: String, individual: Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse::Individual, + naics_code: String, nature_of_business: String, phone_number: String, required_documents: ::Array[Lithic::RequiredDocument], diff --git a/sig/lithic/models/account_holder_updated_webhook_event.rbs b/sig/lithic/models/account_holder_updated_webhook_event.rbs index 752443f0..81d30a5c 100644 --- a/sig/lithic/models/account_holder_updated_webhook_event.rbs +++ b/sig/lithic/models/account_holder_updated_webhook_event.rbs @@ -14,6 +14,7 @@ module Lithic update_request: Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::UpdateRequest, event_type: Lithic::Models::AccountHolderUpdatedWebhookEvent::KYBPayload::event_type, external_id: String, + naics_code: String, nature_of_business: String, website_url: String } @@ -33,6 +34,10 @@ module Lithic def external_id=: (String) -> String + attr_reader naics_code: String? + + def naics_code=: (String) -> String + attr_reader nature_of_business: String? def nature_of_business=: (String) -> String @@ -46,6 +51,7 @@ module Lithic update_request: Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::UpdateRequest, ?event_type: Lithic::Models::AccountHolderUpdatedWebhookEvent::KYBPayload::event_type, ?external_id: String, + ?naics_code: String, ?nature_of_business: String, ?website_url: String ) -> void @@ -55,6 +61,7 @@ module Lithic update_request: Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::UpdateRequest, event_type: Lithic::Models::AccountHolderUpdatedWebhookEvent::KYBPayload::event_type, external_id: String, + naics_code: String, nature_of_business: String, website_url: String } diff --git a/sig/lithic/models/kyb.rbs b/sig/lithic/models/kyb.rbs index 4b55c8a6..552e17c8 100644 --- a/sig/lithic/models/kyb.rbs +++ b/sig/lithic/models/kyb.rbs @@ -11,6 +11,7 @@ module Lithic beneficial_owner_entities: ::Array[Lithic::KYB::BeneficialOwnerEntity], external_id: String, kyb_passed_timestamp: String, + naics_code: String, website_url: String } @@ -41,6 +42,10 @@ module Lithic def kyb_passed_timestamp=: (String) -> String + attr_reader naics_code: String? + + def naics_code=: (String) -> String + attr_reader website_url: String? def website_url=: (String) -> String @@ -55,6 +60,7 @@ module Lithic ?beneficial_owner_entities: ::Array[Lithic::KYB::BeneficialOwnerEntity], ?external_id: String, ?kyb_passed_timestamp: String, + ?naics_code: String, ?website_url: String ) -> void @@ -68,6 +74,7 @@ module Lithic beneficial_owner_entities: ::Array[Lithic::KYB::BeneficialOwnerEntity], external_id: String, kyb_passed_timestamp: String, + naics_code: String, website_url: String } diff --git a/sig/lithic/models/parsed_webhook_event.rbs b/sig/lithic/models/parsed_webhook_event.rbs index 6b901f7b..6dc46e21 100644 --- a/sig/lithic/models/parsed_webhook_event.rbs +++ b/sig/lithic/models/parsed_webhook_event.rbs @@ -69,6 +69,7 @@ module Lithic update_request: Lithic::ParsedWebhookEvent::KYBPayload::UpdateRequest, event_type: Lithic::Models::ParsedWebhookEvent::KYBPayload::event_type, external_id: String, + naics_code: String, nature_of_business: String, website_url: String } @@ -88,6 +89,10 @@ module Lithic def external_id=: (String) -> String + attr_reader naics_code: String? + + def naics_code=: (String) -> String + attr_reader nature_of_business: String? def nature_of_business=: (String) -> String @@ -101,6 +106,7 @@ module Lithic update_request: Lithic::ParsedWebhookEvent::KYBPayload::UpdateRequest, ?event_type: Lithic::Models::ParsedWebhookEvent::KYBPayload::event_type, ?external_id: String, + ?naics_code: String, ?nature_of_business: String, ?website_url: String ) -> void @@ -110,6 +116,7 @@ module Lithic update_request: Lithic::ParsedWebhookEvent::KYBPayload::UpdateRequest, event_type: Lithic::Models::ParsedWebhookEvent::KYBPayload::event_type, external_id: String, + naics_code: String, nature_of_business: String, website_url: String } diff --git a/sig/lithic/resources/account_holders.rbs b/sig/lithic/resources/account_holders.rbs index 31133b10..25e1956e 100644 --- a/sig/lithic/resources/account_holders.rbs +++ b/sig/lithic/resources/account_holders.rbs @@ -18,6 +18,7 @@ module Lithic ?beneficial_owner_entities: ::Array[Lithic::AccountHolderCreateParams::BeneficialOwnerEntity], ?external_id: String, ?kyb_passed_timestamp: String, + ?naics_code: String, ?website_url: String, ?kyc_passed_timestamp: String, ?business_account_token: String, @@ -36,6 +37,7 @@ module Lithic ?business_entity: Lithic::AccountHolderUpdateParams::BusinessEntity, ?control_person: Lithic::AccountHolderUpdateParams::ControlPerson, ?external_id: String, + ?naics_code: String, ?nature_of_business: String, ?website_url: String, ?individual: Lithic::AccountHolderUpdateParams::Individual, diff --git a/test/lithic/resources/account_holders_test.rb b/test/lithic/resources/account_holders_test.rb index d973e4f2..5c1cb075 100644 --- a/test/lithic/resources/account_holders_test.rb +++ b/test/lithic/resources/account_holders_test.rb @@ -59,6 +59,7 @@ def test_retrieve exemption_type: Lithic::AccountHolder::ExemptionType | nil, external_id: String | nil, individual: Lithic::AccountHolder::Individual | nil, + naics_code: String | nil, nature_of_business: String | nil, phone_number: String | nil, required_documents: ^(Lithic::Internal::Type::ArrayOf[Lithic::RequiredDocument]) | nil, @@ -114,6 +115,7 @@ def test_list exemption_type: Lithic::AccountHolder::ExemptionType | nil, external_id: String | nil, individual: Lithic::AccountHolder::Individual | nil, + naics_code: String | nil, nature_of_business: String | nil, phone_number: String | nil, required_documents: ^(Lithic::Internal::Type::ArrayOf[Lithic::RequiredDocument]) | nil, @@ -205,6 +207,7 @@ def test_simulate_enrollment_review exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ExemptionType | nil, external_id: String | nil, individual: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual | nil, + naics_code: String | nil, nature_of_business: String | nil, phone_number: String | nil, required_documents: ^(Lithic::Internal::Type::ArrayOf[Lithic::RequiredDocument]) | nil, From dc994133ff0d96a903dab13326254b2b378c06ae Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Feb 2026 14:43:32 +0000 Subject: [PATCH 04/12] fix(client): always add content-length to post body, even when empty --- lib/lithic/internal/transport/pooled_net_requester.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lithic/internal/transport/pooled_net_requester.rb b/lib/lithic/internal/transport/pooled_net_requester.rb index b24863bd..19bac3b9 100644 --- a/lib/lithic/internal/transport/pooled_net_requester.rb +++ b/lib/lithic/internal/transport/pooled_net_requester.rb @@ -75,7 +75,7 @@ def build_request(request, &blk) case body in nil - nil + req["content-length"] ||= 0 unless req["transfer-encoding"] in String req["content-length"] ||= body.bytesize.to_s unless req["transfer-encoding"] req.body_stream = Lithic::Internal::Util::ReadIOAdapter.new(body, &blk) From 5de957671f0c262e663dd787617921e6ade623e0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Feb 2026 17:03:27 +0000 Subject: [PATCH 05/12] docs: Fix documentation of tokenization channel and tokenization source for tokenization rules --- .stats.yml | 4 ++-- ...nditional_tokenization_action_parameters.rb | 12 ++++++++---- ...ditional_tokenization_action_parameters.rbi | 18 ++++++++++++------ 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2c43cb20..3bc0021a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 176 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-05d665e9c7e81d85c0d6629bf3898e2eb221268d677b772ef3da3891b25d8346.yml -openapi_spec_hash: fd8900412ab9a393719dba3669d44d3a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-6f5bac5a5738304da24f077b52afd3c309c0fc4719176d26fb6eddd598e20eb2.yml +openapi_spec_hash: cc4e56e4325643c3342bcd80a082e16e config_hash: faacaff68ffb3a4d051f0a7b8442e099 diff --git a/lib/lithic/models/auth_rules/conditional_tokenization_action_parameters.rb b/lib/lithic/models/auth_rules/conditional_tokenization_action_parameters.rb index 519eccb5..8f96d930 100644 --- a/lib/lithic/models/auth_rules/conditional_tokenization_action_parameters.rb +++ b/lib/lithic/models/auth_rules/conditional_tokenization_action_parameters.rb @@ -159,8 +159,10 @@ class Condition < Lithic::Internal::Type::BaseModel # # - `TIMESTAMP`: The timestamp of the tokenization request in ISO 8601 format. # - `TOKENIZATION_CHANNEL`: The channel through which the tokenization request was - # initiated (e.g., DIGITAL_WALLET, ECOMMERCE). - # - `TOKENIZATION_SOURCE`: The source of the tokenization request. + # initiated. Valid values are `DIGITAL_WALLET`, `MERCHANT`. + # - `TOKENIZATION_SOURCE`: The source of the tokenization request. Valid values + # are `ACCOUNT_ON_FILE`, `MANUAL_PROVISION`, `PUSH_PROVISION`, `CHIP_DIP`, + # `CONTACTLESS_TAP`, `TOKEN`, `UNKNOWN`. # - `TOKEN_REQUESTOR_NAME`: The name of the entity requesting the token. Valid # values are `ALT_ID`, `AMAZON_ONE`, `AMERICAN_EXPRESS_TOKEN_SERVICE`, # `ANDROID_PAY`, `APPLE_PAY`, `FACEBOOK`, `FITBIT_PAY`, `GARMIN_PAY`, @@ -221,8 +223,10 @@ class Condition < Lithic::Internal::Type::BaseModel # # - `TIMESTAMP`: The timestamp of the tokenization request in ISO 8601 format. # - `TOKENIZATION_CHANNEL`: The channel through which the tokenization request was - # initiated (e.g., DIGITAL_WALLET, ECOMMERCE). - # - `TOKENIZATION_SOURCE`: The source of the tokenization request. + # initiated. Valid values are `DIGITAL_WALLET`, `MERCHANT`. + # - `TOKENIZATION_SOURCE`: The source of the tokenization request. Valid values + # are `ACCOUNT_ON_FILE`, `MANUAL_PROVISION`, `PUSH_PROVISION`, `CHIP_DIP`, + # `CONTACTLESS_TAP`, `TOKEN`, `UNKNOWN`. # - `TOKEN_REQUESTOR_NAME`: The name of the entity requesting the token. Valid # values are `ALT_ID`, `AMAZON_ONE`, `AMERICAN_EXPRESS_TOKEN_SERVICE`, # `ANDROID_PAY`, `APPLE_PAY`, `FACEBOOK`, `FITBIT_PAY`, `GARMIN_PAY`, diff --git a/rbi/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbi b/rbi/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbi index 163c17e8..1c19e9eb 100644 --- a/rbi/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbi +++ b/rbi/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbi @@ -488,8 +488,10 @@ module Lithic # # - `TIMESTAMP`: The timestamp of the tokenization request in ISO 8601 format. # - `TOKENIZATION_CHANNEL`: The channel through which the tokenization request was - # initiated (e.g., DIGITAL_WALLET, ECOMMERCE). - # - `TOKENIZATION_SOURCE`: The source of the tokenization request. + # initiated. Valid values are `DIGITAL_WALLET`, `MERCHANT`. + # - `TOKENIZATION_SOURCE`: The source of the tokenization request. Valid values + # are `ACCOUNT_ON_FILE`, `MANUAL_PROVISION`, `PUSH_PROVISION`, `CHIP_DIP`, + # `CONTACTLESS_TAP`, `TOKEN`, `UNKNOWN`. # - `TOKEN_REQUESTOR_NAME`: The name of the entity requesting the token. Valid # values are `ALT_ID`, `AMAZON_ONE`, `AMERICAN_EXPRESS_TOKEN_SERVICE`, # `ANDROID_PAY`, `APPLE_PAY`, `FACEBOOK`, `FITBIT_PAY`, `GARMIN_PAY`, @@ -546,8 +548,10 @@ module Lithic # # - `TIMESTAMP`: The timestamp of the tokenization request in ISO 8601 format. # - `TOKENIZATION_CHANNEL`: The channel through which the tokenization request was - # initiated (e.g., DIGITAL_WALLET, ECOMMERCE). - # - `TOKENIZATION_SOURCE`: The source of the tokenization request. + # initiated. Valid values are `DIGITAL_WALLET`, `MERCHANT`. + # - `TOKENIZATION_SOURCE`: The source of the tokenization request. Valid values + # are `ACCOUNT_ON_FILE`, `MANUAL_PROVISION`, `PUSH_PROVISION`, `CHIP_DIP`, + # `CONTACTLESS_TAP`, `TOKEN`, `UNKNOWN`. # - `TOKEN_REQUESTOR_NAME`: The name of the entity requesting the token. Valid # values are `ALT_ID`, `AMAZON_ONE`, `AMERICAN_EXPRESS_TOKEN_SERVICE`, # `ANDROID_PAY`, `APPLE_PAY`, `FACEBOOK`, `FITBIT_PAY`, `GARMIN_PAY`, @@ -601,8 +605,10 @@ module Lithic # # - `TIMESTAMP`: The timestamp of the tokenization request in ISO 8601 format. # - `TOKENIZATION_CHANNEL`: The channel through which the tokenization request was - # initiated (e.g., DIGITAL_WALLET, ECOMMERCE). - # - `TOKENIZATION_SOURCE`: The source of the tokenization request. + # initiated. Valid values are `DIGITAL_WALLET`, `MERCHANT`. + # - `TOKENIZATION_SOURCE`: The source of the tokenization request. Valid values + # are `ACCOUNT_ON_FILE`, `MANUAL_PROVISION`, `PUSH_PROVISION`, `CHIP_DIP`, + # `CONTACTLESS_TAP`, `TOKEN`, `UNKNOWN`. # - `TOKEN_REQUESTOR_NAME`: The name of the entity requesting the token. Valid # values are `ALT_ID`, `AMAZON_ONE`, `AMERICAN_EXPRESS_TOKEN_SERVICE`, # `ANDROID_PAY`, `APPLE_PAY`, `FACEBOOK`, `FITBIT_PAY`, `GARMIN_PAY`, From cecdec231888818a2ec01dca178d45a741d5326b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 4 Feb 2026 01:23:48 +0000 Subject: [PATCH 06/12] chore(docs): remove www prefix --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 38d43936..601331c5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -43,13 +43,13 @@ If you’d like to use the repository from source, you can either install from g To install via git in your `Gemfile`: ```ruby -gem "lithic", git: "https://www.github.com/lithic-com/lithic-ruby" +gem "lithic", git: "https://github.com/lithic-com/lithic-ruby" ``` Alternatively, reference local copy of the repo: ```bash -$ git clone -- 'https://www.github.com/lithic-com/lithic-ruby' '' +$ git clone -- 'https://github.com/lithic-com/lithic-ruby' '' ``` ```ruby From bdb8ff958556a0cf41ec715b5028d41a2780fc83 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 4 Feb 2026 20:24:35 +0000 Subject: [PATCH 07/12] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3bc0021a..237cf435 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 176 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-6f5bac5a5738304da24f077b52afd3c309c0fc4719176d26fb6eddd598e20eb2.yml -openapi_spec_hash: cc4e56e4325643c3342bcd80a082e16e -config_hash: faacaff68ffb3a4d051f0a7b8442e099 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-fbdac41d84b5679c659e324345bc4101b056b5f5ed4ddefcd6680afe20db41dc.yml +openapi_spec_hash: 37834cd63d604a528d0467c1cfb01919 +config_hash: 61652458521692cd0b88976827c42c25 From a9a41d9cff9dd7f7a1772c76f9c9aae130b1b90a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 6 Feb 2026 17:23:15 +0000 Subject: [PATCH 08/12] fix(client): loosen json header parsing --- lib/lithic/internal/util.rb | 2 +- rbi/lithic/internal/util.rbi | 2 +- test/lithic/internal/util_test.rb | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/lithic/internal/util.rb b/lib/lithic/internal/util.rb index 30350605..c35d2723 100644 --- a/lib/lithic/internal/util.rb +++ b/lib/lithic/internal/util.rb @@ -485,7 +485,7 @@ def writable_enum(&blk) end # @type [Regexp] - JSON_CONTENT = %r{^application/(?:vnd(?:\.[^.]+)*\+)?json(?!l)} + JSON_CONTENT = %r{^application/(?:[a-zA-Z0-9.-]+\+)?json(?!l)} # @type [Regexp] JSONL_CONTENT = %r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)} diff --git a/rbi/lithic/internal/util.rbi b/rbi/lithic/internal/util.rbi index 58216a24..cec0235e 100644 --- a/rbi/lithic/internal/util.rbi +++ b/rbi/lithic/internal/util.rbi @@ -296,7 +296,7 @@ module Lithic end JSON_CONTENT = - T.let(%r{^application/(?:vnd(?:\.[^.]+)*\+)?json(?!l)}, Regexp) + T.let(%r{^application/(?:[a-zA-Z0-9.-]+\+)?json(?!l)}, Regexp) JSONL_CONTENT = T.let(%r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}, Regexp) diff --git a/test/lithic/internal/util_test.rb b/test/lithic/internal/util_test.rb index c4644c3f..6c5fe386 100644 --- a/test/lithic/internal/util_test.rb +++ b/test/lithic/internal/util_test.rb @@ -171,6 +171,8 @@ def test_json_content cases = { "application/json" => true, "application/jsonl" => false, + "application/arbitrary+json" => true, + "application/ARBITRARY+json" => true, "application/vnd.github.v3+json" => true, "application/vnd.api+json" => true } From 638e66d63951f2710eff7865b66b8424ee9df347 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 10 Feb 2026 06:06:26 +0000 Subject: [PATCH 09/12] feat(api): Add /v2/auth_rules/results endpoint for listing rule evaluation data --- .stats.yml | 8 +- lib/lithic.rb | 2 + .../conditional_ach_action_parameters.rb | 6 +- ...ditional_tokenization_action_parameters.rb | 6 +- .../auth_rules/v2_list_results_params.rb | 70 + .../auth_rules/v2_list_results_response.rb | 390 ++++++ lib/lithic/resources/auth_rules/v2.rb | 42 + .../conditional_ach_action_parameters.rbi | 6 +- ...itional_tokenization_action_parameters.rbi | 6 +- .../auth_rules/v2_list_results_params.rbi | 112 ++ .../auth_rules/v2_list_results_response.rbi | 1158 +++++++++++++++++ rbi/lithic/resources/auth_rules/v2.rbi | 42 + .../auth_rules/v2_list_results_params.rbs | 65 + .../auth_rules/v2_list_results_response.rbs | 460 +++++++ sig/lithic/resources/auth_rules/v2.rbs | 10 + test/lithic/resources/auth_rules/v2_test.rb | 28 + 16 files changed, 2395 insertions(+), 16 deletions(-) create mode 100644 lib/lithic/models/auth_rules/v2_list_results_params.rb create mode 100644 lib/lithic/models/auth_rules/v2_list_results_response.rb create mode 100644 rbi/lithic/models/auth_rules/v2_list_results_params.rbi create mode 100644 rbi/lithic/models/auth_rules/v2_list_results_response.rbi create mode 100644 sig/lithic/models/auth_rules/v2_list_results_params.rbs create mode 100644 sig/lithic/models/auth_rules/v2_list_results_response.rbs diff --git a/.stats.yml b/.stats.yml index 237cf435..dc20d41b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 176 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-fbdac41d84b5679c659e324345bc4101b056b5f5ed4ddefcd6680afe20db41dc.yml -openapi_spec_hash: 37834cd63d604a528d0467c1cfb01919 -config_hash: 61652458521692cd0b88976827c42c25 +configured_endpoints: 177 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-32c9a538495a2c820a7ca28c4f09cc1226642b8f7c9422ce1889aebd15e225ca.yml +openapi_spec_hash: b6403689900263b73d4054a548f00285 +config_hash: 693dddc4721eef512d75ab6c60897794 diff --git a/lib/lithic.rb b/lib/lithic.rb index 3924f8a8..992b361c 100644 --- a/lib/lithic.rb +++ b/lib/lithic.rb @@ -127,6 +127,8 @@ require_relative "lithic/models/auth_rules/v2_delete_params" require_relative "lithic/models/auth_rules/v2_draft_params" 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_promote_params" require_relative "lithic/models/auth_rules/v2_retrieve_features_params" require_relative "lithic/models/auth_rules/v2_retrieve_features_response" diff --git a/lib/lithic/models/auth_rules/conditional_ach_action_parameters.rb b/lib/lithic/models/auth_rules/conditional_ach_action_parameters.rb index bfe5104b..50a92d7b 100644 --- a/lib/lithic/models/auth_rules/conditional_ach_action_parameters.rb +++ b/lib/lithic/models/auth_rules/conditional_ach_action_parameters.rb @@ -5,7 +5,7 @@ module Models module AuthRules class ConditionalACHActionParameters < Lithic::Internal::Type::BaseModel # @!attribute action - # The action to take if the conditions are met + # The action to take if the conditions are met. # # @return [Lithic::Models::AuthRules::ConditionalACHActionParameters::Action::ApproveAction, Lithic::Models::AuthRules::ConditionalACHActionParameters::Action::ReturnAction] required :action, union: -> { Lithic::AuthRules::ConditionalACHActionParameters::Action } @@ -17,11 +17,11 @@ class ConditionalACHActionParameters < Lithic::Internal::Type::BaseModel -> { Lithic::Internal::Type::ArrayOf[Lithic::AuthRules::ConditionalACHActionParameters::Condition] } # @!method initialize(action:, conditions:) - # @param action [Lithic::Models::AuthRules::ConditionalACHActionParameters::Action::ApproveAction, Lithic::Models::AuthRules::ConditionalACHActionParameters::Action::ReturnAction] The action to take if the conditions are met + # @param action [Lithic::Models::AuthRules::ConditionalACHActionParameters::Action::ApproveAction, Lithic::Models::AuthRules::ConditionalACHActionParameters::Action::ReturnAction] The action to take if the conditions are met. # # @param conditions [Array] - # The action to take if the conditions are met + # The action to take if the conditions are met. # # @see Lithic::Models::AuthRules::ConditionalACHActionParameters#action module Action diff --git a/lib/lithic/models/auth_rules/conditional_tokenization_action_parameters.rb b/lib/lithic/models/auth_rules/conditional_tokenization_action_parameters.rb index 8f96d930..cd1998d9 100644 --- a/lib/lithic/models/auth_rules/conditional_tokenization_action_parameters.rb +++ b/lib/lithic/models/auth_rules/conditional_tokenization_action_parameters.rb @@ -5,7 +5,7 @@ module Models module AuthRules class ConditionalTokenizationActionParameters < Lithic::Internal::Type::BaseModel # @!attribute action - # The action to take if the conditions are met + # The action to take if the conditions are met. # # @return [Lithic::Models::AuthRules::ConditionalTokenizationActionParameters::Action::DeclineAction, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters::Action::RequireTfaAction] required :action, union: -> { Lithic::AuthRules::ConditionalTokenizationActionParameters::Action } @@ -17,11 +17,11 @@ class ConditionalTokenizationActionParameters < Lithic::Internal::Type::BaseMode -> { Lithic::Internal::Type::ArrayOf[Lithic::AuthRules::ConditionalTokenizationActionParameters::Condition] } # @!method initialize(action:, conditions:) - # @param action [Lithic::Models::AuthRules::ConditionalTokenizationActionParameters::Action::DeclineAction, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters::Action::RequireTfaAction] The action to take if the conditions are met + # @param action [Lithic::Models::AuthRules::ConditionalTokenizationActionParameters::Action::DeclineAction, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters::Action::RequireTfaAction] The action to take if the conditions are met. # # @param conditions [Array] - # The action to take if the conditions are met + # The action to take if the conditions are met. # # @see Lithic::Models::AuthRules::ConditionalTokenizationActionParameters#action module Action diff --git a/lib/lithic/models/auth_rules/v2_list_results_params.rb b/lib/lithic/models/auth_rules/v2_list_results_params.rb new file mode 100644 index 00000000..988601db --- /dev/null +++ b/lib/lithic/models/auth_rules/v2_list_results_params.rb @@ -0,0 +1,70 @@ +# frozen_string_literal: true + +module Lithic + module Models + module AuthRules + # @see Lithic::Resources::AuthRules::V2#list_results + class V2ListResultsParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute auth_rule_token + # Filter by Auth Rule token + # + # @return [String, nil] + optional :auth_rule_token, String + + # @!attribute ending_before + # A cursor representing an item's token before which a page of results should end. + # Used to retrieve the previous page of results before this item. + # + # @return [String, nil] + optional :ending_before, String + + # @!attribute event_uuid + # Filter by event UUID + # + # @return [String, nil] + optional :event_uuid, String + + # @!attribute has_actions + # Filter by whether the rule evaluation produced any actions. When not provided, + # all results are returned. + # + # @return [Boolean, nil] + optional :has_actions, Lithic::Internal::Type::Boolean + + # @!attribute page_size + # Page size (for pagination). + # + # @return [Integer, nil] + optional :page_size, Integer + + # @!attribute starting_after + # A cursor representing an item's token after which a page of results should + # begin. Used to retrieve the next page of results after this item. + # + # @return [String, nil] + optional :starting_after, String + + # @!method initialize(auth_rule_token: nil, ending_before: nil, event_uuid: nil, has_actions: nil, page_size: nil, starting_after: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {Lithic::Models::AuthRules::V2ListResultsParams} for more details. + # + # @param auth_rule_token [String] Filter by Auth Rule token + # + # @param ending_before [String] A cursor representing an item's token before which a page of results should end. + # + # @param event_uuid [String] Filter by event UUID + # + # @param has_actions [Boolean] Filter by whether the rule evaluation produced any actions. When not provided, a + # + # @param page_size [Integer] Page size (for pagination). + # + # @param starting_after [String] A cursor representing an item's token after which a page of results should begin + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + end + end + end +end diff --git a/lib/lithic/models/auth_rules/v2_list_results_response.rb b/lib/lithic/models/auth_rules/v2_list_results_response.rb new file mode 100644 index 00000000..c45663c9 --- /dev/null +++ b/lib/lithic/models/auth_rules/v2_list_results_response.rb @@ -0,0 +1,390 @@ +# frozen_string_literal: true + +module Lithic + module Models + module AuthRules + # @see Lithic::Resources::AuthRules::V2#list_results + class V2ListResultsResponse < Lithic::Internal::Type::BaseModel + # @!attribute token + # Globally unique identifier for the evaluation + # + # @return [String] + required :token, String + + # @!attribute actions + # Actions returned by the rule evaluation + # + # @return [Array] + required :actions, + -> { Lithic::Internal::Type::ArrayOf[union: Lithic::Models::AuthRules::V2ListResultsResponse::Action] } + + # @!attribute auth_rule_token + # The Auth Rule token + # + # @return [String] + required :auth_rule_token, String + + # @!attribute evaluation_time + # Timestamp of the rule evaluation + # + # @return [Time] + required :evaluation_time, Time + + # @!attribute event_stream + # The event stream during which the rule was evaluated + # + # @return [Symbol, Lithic::Models::AuthRules::EventStream] + required :event_stream, enum: -> { Lithic::AuthRules::EventStream } + + # @!attribute event_token + # Token of the event that triggered the evaluation + # + # @return [String] + required :event_token, String + + # @!attribute mode + # The state of the Auth Rule + # + # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Mode] + required :mode, enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::Mode } + + # @!attribute rule_version + # Version of the rule that was evaluated + # + # @return [Integer] + required :rule_version, Integer + + # @!method initialize(token:, actions:, auth_rule_token:, evaluation_time:, event_stream:, event_token:, mode:, rule_version:) + # Result of an Auth Rule evaluation + # + # @param token [String] Globally unique identifier for the evaluation + # + # @param actions [Array] Actions returned by the rule evaluation + # + # @param auth_rule_token [String] The Auth Rule token + # + # @param evaluation_time [Time] Timestamp of the rule evaluation + # + # @param event_stream [Symbol, Lithic::Models::AuthRules::EventStream] The event stream during which the rule was evaluated + # + # @param event_token [String] Token of the event that triggered the evaluation + # + # @param mode [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Mode] The state of the Auth Rule + # + # @param rule_version [Integer] Version of the rule that was evaluated + + module Action + extend Lithic::Internal::Type::Union + + variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::AuthorizationAction } + + variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::ThreeDSAction } + + variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction } + + variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction } + + variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction } + + variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction } + + class AuthorizationAction < Lithic::Internal::Type::BaseModel + # @!attribute explanation + # Optional explanation for why this action was taken + # + # @return [String, nil] + optional :explanation, String + + # @!method initialize(explanation: nil) + # @param explanation [String] Optional explanation for why this action was taken + end + + class ThreeDSAction < Lithic::Internal::Type::BaseModel + # @!attribute explanation + # Optional explanation for why this action was taken + # + # @return [String, nil] + optional :explanation, String + + # @!method initialize(explanation: nil) + # @param explanation [String] Optional explanation for why this action was taken + end + + class DeclineAction < Lithic::Internal::Type::BaseModel + # @!attribute type + # Decline the tokenization request + # + # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Type] + required :type, enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Type } + + # @!attribute reason + # Reason code for declining the tokenization request + # + # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason, nil] + optional :reason, + enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason } + + # @!method initialize(type:, reason: nil) + # @param type [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Type] Decline the tokenization request + # + # @param reason [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason] Reason code for declining the tokenization request + + # Decline the tokenization request + # + # @see Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction#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::V2ListResultsResponse::Action::DeclineAction#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::V2ListResultsResponse::Action::RequireTfaAction::Type] + required :type, + enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Type } + + # @!attribute reason + # Reason code for requiring two-factor authentication + # + # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason, nil] + optional :reason, + enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason } + + # @!method initialize(type:, reason: nil) + # @param type [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Type] Require two-factor authentication for the tokenization request + # + # @param reason [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason] Reason code for requiring two-factor authentication + + # Require two-factor authentication for the tokenization request + # + # @see Lithic::Models::AuthRules::V2ListResultsResponse::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::V2ListResultsResponse::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 ApproveAction < Lithic::Internal::Type::BaseModel + # @!attribute type + # Approve the ACH transaction + # + # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::Type] + required :type, enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::Type } + + # @!method initialize(type:) + # @param type [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::Type] Approve the ACH transaction + + # Approve the ACH transaction + # + # @see Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction#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::V2ListResultsResponse::Action::ReturnAction::Code] + required :code, enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code } + + # @!attribute type + # Return the ACH transaction + # + # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Type] + required :type, enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Type } + + # @!method initialize(code:, type:) + # Some parameter documentations has been truncated, see + # {Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction} for + # more details. + # + # @param code [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code] NACHA return code to use when returning the transaction. Note that the list of a + # + # @param type [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::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::V2ListResultsResponse::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::V2ListResultsResponse::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::V2ListResultsResponse::Action::AuthorizationAction, Lithic::Models::AuthRules::V2ListResultsResponse::Action::ThreeDSAction, Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction, Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction, Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction, Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction)] + end + + # The state of the Auth Rule + # + # @see Lithic::Models::AuthRules::V2ListResultsResponse#mode + module Mode + extend Lithic::Internal::Type::Enum + + ACTIVE = :ACTIVE + INACTIVE = :INACTIVE + + # @!method self.values + # @return [Array] + end + end + end + end +end diff --git a/lib/lithic/resources/auth_rules/v2.rb b/lib/lithic/resources/auth_rules/v2.rb index 3c846b8f..8b6b69f0 100644 --- a/lib/lithic/resources/auth_rules/v2.rb +++ b/lib/lithic/resources/auth_rules/v2.rb @@ -198,6 +198,48 @@ def draft(auth_rule_token, params = {}) ) end + # Some parameter documentations has been truncated, see + # {Lithic::Models::AuthRules::V2ListResultsParams} for more details. + # + # Lists Auth Rule evaluation results. + # + # **Limitations:** + # + # - Results are available for the past 3 months only + # - At least one filter (`event_uuid` or `auth_rule_token`) must be provided + # - When filtering by `event_uuid`, pagination is not supported + # + # @overload list_results(auth_rule_token: nil, ending_before: nil, event_uuid: nil, has_actions: nil, page_size: nil, starting_after: nil, request_options: {}) + # + # @param auth_rule_token [String] Filter by Auth Rule token + # + # @param ending_before [String] A cursor representing an item's token before which a page of results should end. + # + # @param event_uuid [String] Filter by event UUID + # + # @param has_actions [Boolean] Filter by whether the rule evaluation produced any actions. When not provided, a + # + # @param page_size [Integer] Page size (for pagination). + # + # @param starting_after [String] A cursor representing an item's token after which a page of results should begin + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Lithic::Internal::CursorPage] + # + # @see Lithic::Models::AuthRules::V2ListResultsParams + def list_results(params = {}) + parsed, options = Lithic::AuthRules::V2ListResultsParams.dump_request(params) + @client.request( + method: :get, + path: "v2/auth_rules/results", + query: parsed, + page: Lithic::Internal::CursorPage, + model: Lithic::Models::AuthRules::V2ListResultsResponse, + options: 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/rbi/lithic/models/auth_rules/conditional_ach_action_parameters.rbi b/rbi/lithic/models/auth_rules/conditional_ach_action_parameters.rbi index 1f4cebe2..3830a01a 100644 --- a/rbi/lithic/models/auth_rules/conditional_ach_action_parameters.rbi +++ b/rbi/lithic/models/auth_rules/conditional_ach_action_parameters.rbi @@ -12,7 +12,7 @@ module Lithic ) end - # The action to take if the conditions are met + # The action to take if the conditions are met. sig do returns( T.any( @@ -46,7 +46,7 @@ module Lithic ).returns(T.attached_class) end def self.new( - # The action to take if the conditions are met + # The action to take if the conditions are met. action:, conditions: ) @@ -70,7 +70,7 @@ module Lithic def to_hash end - # The action to take if the conditions are met + # The action to take if the conditions are met. module Action extend Lithic::Internal::Type::Union diff --git a/rbi/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbi b/rbi/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbi index 1c19e9eb..390eacfd 100644 --- a/rbi/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbi +++ b/rbi/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbi @@ -12,7 +12,7 @@ module Lithic ) end - # The action to take if the conditions are met + # The action to take if the conditions are met. sig do returns( T.any( @@ -46,7 +46,7 @@ module Lithic ).returns(T.attached_class) end def self.new( - # The action to take if the conditions are met + # The action to take if the conditions are met. action:, conditions: ) @@ -70,7 +70,7 @@ module Lithic def to_hash end - # The action to take if the conditions are met + # The action to take if the conditions are met. module Action extend Lithic::Internal::Type::Union diff --git a/rbi/lithic/models/auth_rules/v2_list_results_params.rbi b/rbi/lithic/models/auth_rules/v2_list_results_params.rbi new file mode 100644 index 00000000..875e3d78 --- /dev/null +++ b/rbi/lithic/models/auth_rules/v2_list_results_params.rbi @@ -0,0 +1,112 @@ +# typed: strong + +module Lithic + module Models + module AuthRules + class V2ListResultsParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::V2ListResultsParams, + Lithic::Internal::AnyHash + ) + end + + # Filter by Auth Rule token + sig { returns(T.nilable(String)) } + attr_reader :auth_rule_token + + sig { params(auth_rule_token: String).void } + attr_writer :auth_rule_token + + # A cursor representing an item's token before which a page of results should end. + # Used to retrieve the previous page of results before this item. + sig { returns(T.nilable(String)) } + attr_reader :ending_before + + sig { params(ending_before: String).void } + attr_writer :ending_before + + # Filter by event UUID + sig { returns(T.nilable(String)) } + attr_reader :event_uuid + + sig { params(event_uuid: String).void } + attr_writer :event_uuid + + # Filter by whether the rule evaluation produced any actions. When not provided, + # all results are returned. + sig { returns(T.nilable(T::Boolean)) } + attr_reader :has_actions + + sig { params(has_actions: T::Boolean).void } + attr_writer :has_actions + + # Page size (for pagination). + sig { returns(T.nilable(Integer)) } + attr_reader :page_size + + sig { params(page_size: Integer).void } + attr_writer :page_size + + # A cursor representing an item's token after which a page of results should + # begin. Used to retrieve the next page of results after this item. + sig { returns(T.nilable(String)) } + attr_reader :starting_after + + sig { params(starting_after: String).void } + attr_writer :starting_after + + sig do + params( + auth_rule_token: String, + ending_before: String, + event_uuid: String, + has_actions: T::Boolean, + page_size: Integer, + starting_after: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # Filter by Auth Rule token + auth_rule_token: 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, + # Filter by event UUID + event_uuid: nil, + # Filter by whether the rule evaluation produced any actions. When not provided, + # all results are returned. + has_actions: nil, + # Page size (for pagination). + page_size: nil, + # A cursor representing an item's token after which a page of results should + # begin. Used to retrieve the next page of results after this item. + starting_after: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + auth_rule_token: String, + ending_before: String, + event_uuid: String, + has_actions: T::Boolean, + page_size: Integer, + starting_after: String, + request_options: Lithic::RequestOptions + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/lithic/models/auth_rules/v2_list_results_response.rbi b/rbi/lithic/models/auth_rules/v2_list_results_response.rbi new file mode 100644 index 00000000..91185d62 --- /dev/null +++ b/rbi/lithic/models/auth_rules/v2_list_results_response.rbi @@ -0,0 +1,1158 @@ +# typed: strong + +module Lithic + module Models + module AuthRules + class V2ListResultsResponse < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse, + Lithic::Internal::AnyHash + ) + end + + # Globally unique identifier for the evaluation + sig { returns(String) } + attr_accessor :token + + # Actions returned by the rule evaluation + sig do + returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::Action::Variants + ] + ) + end + attr_accessor :actions + + # The Auth Rule token + sig { returns(String) } + attr_accessor :auth_rule_token + + # Timestamp of the rule evaluation + sig { returns(Time) } + attr_accessor :evaluation_time + + # The event stream during which the rule was evaluated + sig { returns(Lithic::AuthRules::EventStream::TaggedSymbol) } + attr_accessor :event_stream + + # Token of the event that triggered the evaluation + sig { returns(String) } + attr_accessor :event_token + + # The state of the Auth Rule + sig do + returns( + Lithic::Models::AuthRules::V2ListResultsResponse::Mode::TaggedSymbol + ) + end + attr_accessor :mode + + # Version of the rule that was evaluated + sig { returns(Integer) } + attr_accessor :rule_version + + # Result of an Auth Rule evaluation + sig do + params( + token: String, + actions: + T::Array[ + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse::Action::AuthorizationAction::OrHash, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ThreeDSAction::OrHash, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::OrHash, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::OrHash, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::OrHash, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::OrHash + ) + ], + auth_rule_token: String, + evaluation_time: Time, + event_stream: Lithic::AuthRules::EventStream::OrSymbol, + event_token: String, + mode: + Lithic::Models::AuthRules::V2ListResultsResponse::Mode::OrSymbol, + rule_version: Integer + ).returns(T.attached_class) + end + def self.new( + # Globally unique identifier for the evaluation + token:, + # Actions returned by the rule evaluation + actions:, + # The Auth Rule token + auth_rule_token:, + # Timestamp of the rule evaluation + evaluation_time:, + # The event stream during which the rule was evaluated + event_stream:, + # Token of the event that triggered the evaluation + event_token:, + # The state of the Auth Rule + mode:, + # Version of the rule that was evaluated + rule_version: + ) + end + + sig do + override.returns( + { + token: String, + actions: + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::Action::Variants + ], + auth_rule_token: String, + evaluation_time: Time, + event_stream: Lithic::AuthRules::EventStream::TaggedSymbol, + event_token: String, + mode: + Lithic::Models::AuthRules::V2ListResultsResponse::Mode::TaggedSymbol, + rule_version: Integer + } + ) + end + def to_hash + end + + module Action + extend Lithic::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse::Action::AuthorizationAction, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ThreeDSAction, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction + ) + end + + class AuthorizationAction < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse::Action::AuthorizationAction, + Lithic::Internal::AnyHash + ) + end + + # Optional explanation for why this action was taken + sig { returns(T.nilable(String)) } + attr_reader :explanation + + sig { params(explanation: String).void } + attr_writer :explanation + + sig { params(explanation: String).returns(T.attached_class) } + def self.new( + # Optional explanation for why this action was taken + explanation: nil + ) + end + + sig { override.returns({ explanation: String }) } + def to_hash + end + end + + class ThreeDSAction < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ThreeDSAction, + Lithic::Internal::AnyHash + ) + end + + # Optional explanation for why this action was taken + sig { returns(T.nilable(String)) } + attr_reader :explanation + + sig { params(explanation: String).void } + attr_writer :explanation + + sig { params(explanation: String).returns(T.attached_class) } + def self.new( + # Optional explanation for why this action was taken + explanation: nil + ) + end + + sig { override.returns({ explanation: String }) } + def to_hash + end + end + + class DeclineAction < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction, + Lithic::Internal::AnyHash + ) + end + + # Decline the tokenization request + sig do + returns( + Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Type::TaggedSymbol + ) + end + attr_accessor :type + + # Reason code for declining the tokenization request + sig do + returns( + T.nilable( + Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol + ) + ) + end + attr_reader :reason + + sig do + params( + reason: + Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::OrSymbol + ).void + end + attr_writer :reason + + sig do + params( + type: + Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Type::OrSymbol, + reason: + Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::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::V2ListResultsResponse::Action::DeclineAction::Type::TaggedSymbol, + reason: + Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::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::V2ListResultsResponse::Action::DeclineAction::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + DECLINE = + T.let( + :DECLINE, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::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::V2ListResultsResponse::Action::DeclineAction::Reason + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACCOUNT_SCORE_1 = + T.let( + :ACCOUNT_SCORE_1, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol + ) + DEVICE_SCORE_1 = + T.let( + :DEVICE_SCORE_1, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol + ) + ALL_WALLET_DECLINE_REASONS_PRESENT = + T.let( + :ALL_WALLET_DECLINE_REASONS_PRESENT, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol + ) + WALLET_RECOMMENDED_DECISION_RED = + T.let( + :WALLET_RECOMMENDED_DECISION_RED, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol + ) + CVC_MISMATCH = + T.let( + :CVC_MISMATCH, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol + ) + CARD_EXPIRY_MONTH_MISMATCH = + T.let( + :CARD_EXPIRY_MONTH_MISMATCH, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol + ) + CARD_EXPIRY_YEAR_MISMATCH = + T.let( + :CARD_EXPIRY_YEAR_MISMATCH, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol + ) + CARD_INVALID_STATE = + T.let( + :CARD_INVALID_STATE, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol + ) + CUSTOMER_RED_PATH = + T.let( + :CUSTOMER_RED_PATH, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol + ) + INVALID_CUSTOMER_RESPONSE = + T.let( + :INVALID_CUSTOMER_RESPONSE, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol + ) + NETWORK_FAILURE = + T.let( + :NETWORK_FAILURE, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol + ) + GENERIC_DECLINE = + T.let( + :GENERIC_DECLINE, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol + ) + DIGITAL_CARD_ART_REQUIRED = + T.let( + :DIGITAL_CARD_ART_REQUIRED, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::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::V2ListResultsResponse::Action::RequireTfaAction, + Lithic::Internal::AnyHash + ) + end + + # Require two-factor authentication for the tokenization request + sig do + returns( + Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Type::TaggedSymbol + ) + end + attr_accessor :type + + # Reason code for requiring two-factor authentication + sig do + returns( + T.nilable( + Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol + ) + ) + end + attr_reader :reason + + sig do + params( + reason: + Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::OrSymbol + ).void + end + attr_writer :reason + + sig do + params( + type: + Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Type::OrSymbol, + reason: + Lithic::Models::AuthRules::V2ListResultsResponse::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::V2ListResultsResponse::Action::RequireTfaAction::Type::TaggedSymbol, + reason: + Lithic::Models::AuthRules::V2ListResultsResponse::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::V2ListResultsResponse::Action::RequireTfaAction::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + REQUIRE_TFA = + T.let( + :REQUIRE_TFA, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::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::V2ListResultsResponse::Action::RequireTfaAction::Reason + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + WALLET_RECOMMENDED_TFA = + T.let( + :WALLET_RECOMMENDED_TFA, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol + ) + SUSPICIOUS_ACTIVITY = + T.let( + :SUSPICIOUS_ACTIVITY, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol + ) + DEVICE_RECENTLY_LOST = + T.let( + :DEVICE_RECENTLY_LOST, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol + ) + TOO_MANY_RECENT_ATTEMPTS = + T.let( + :TOO_MANY_RECENT_ATTEMPTS, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol + ) + TOO_MANY_RECENT_TOKENS = + T.let( + :TOO_MANY_RECENT_TOKENS, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol + ) + TOO_MANY_DIFFERENT_CARDHOLDERS = + T.let( + :TOO_MANY_DIFFERENT_CARDHOLDERS, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol + ) + OUTSIDE_HOME_TERRITORY = + T.let( + :OUTSIDE_HOME_TERRITORY, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol + ) + HAS_SUSPENDED_TOKENS = + T.let( + :HAS_SUSPENDED_TOKENS, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol + ) + HIGH_RISK = + T.let( + :HIGH_RISK, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol + ) + ACCOUNT_SCORE_LOW = + T.let( + :ACCOUNT_SCORE_LOW, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol + ) + DEVICE_SCORE_LOW = + T.let( + :DEVICE_SCORE_LOW, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol + ) + CARD_STATE_TFA = + T.let( + :CARD_STATE_TFA, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol + ) + HARDCODED_TFA = + T.let( + :HARDCODED_TFA, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol + ) + CUSTOMER_RULE_TFA = + T.let( + :CUSTOMER_RULE_TFA, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol + ) + DEVICE_HOST_CARD_EMULATION = + T.let( + :DEVICE_HOST_CARD_EMULATION, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class ApproveAction < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction, + Lithic::Internal::AnyHash + ) + end + + # Approve the ACH transaction + sig do + returns( + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::Type::TaggedSymbol + ) + end + attr_accessor :type + + sig do + params( + type: + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # Approve the ACH transaction + type: + ) + end + + sig do + override.returns( + { + type: + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::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::V2ListResultsResponse::Action::ApproveAction::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + APPROVE = + T.let( + :APPROVE, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::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::V2ListResultsResponse::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::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + end + attr_accessor :code + + # Return the ACH transaction + sig do + returns( + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Type::TaggedSymbol + ) + end + attr_accessor :type + + sig do + params( + code: + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::OrSymbol, + type: + Lithic::Models::AuthRules::V2ListResultsResponse::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::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol, + type: + Lithic::Models::AuthRules::V2ListResultsResponse::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::V2ListResultsResponse::Action::ReturnAction::Code + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + R01 = + T.let( + :R01, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R02 = + T.let( + :R02, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R03 = + T.let( + :R03, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R04 = + T.let( + :R04, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R05 = + T.let( + :R05, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R06 = + T.let( + :R06, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R07 = + T.let( + :R07, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R08 = + T.let( + :R08, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R09 = + T.let( + :R09, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R10 = + T.let( + :R10, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R11 = + T.let( + :R11, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R12 = + T.let( + :R12, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R13 = + T.let( + :R13, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R14 = + T.let( + :R14, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R15 = + T.let( + :R15, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R16 = + T.let( + :R16, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R17 = + T.let( + :R17, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R18 = + T.let( + :R18, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R19 = + T.let( + :R19, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R20 = + T.let( + :R20, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R21 = + T.let( + :R21, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R22 = + T.let( + :R22, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R23 = + T.let( + :R23, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R24 = + T.let( + :R24, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R25 = + T.let( + :R25, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R26 = + T.let( + :R26, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R27 = + T.let( + :R27, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R28 = + T.let( + :R28, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R29 = + T.let( + :R29, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R30 = + T.let( + :R30, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R31 = + T.let( + :R31, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R32 = + T.let( + :R32, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R33 = + T.let( + :R33, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R34 = + T.let( + :R34, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R35 = + T.let( + :R35, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R36 = + T.let( + :R36, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R37 = + T.let( + :R37, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R38 = + T.let( + :R38, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R39 = + T.let( + :R39, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R40 = + T.let( + :R40, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R41 = + T.let( + :R41, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R42 = + T.let( + :R42, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R43 = + T.let( + :R43, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R44 = + T.let( + :R44, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R45 = + T.let( + :R45, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R46 = + T.let( + :R46, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R47 = + T.let( + :R47, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R50 = + T.let( + :R50, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R51 = + T.let( + :R51, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R52 = + T.let( + :R52, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R53 = + T.let( + :R53, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R61 = + T.let( + :R61, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R62 = + T.let( + :R62, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R67 = + T.let( + :R67, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R68 = + T.let( + :R68, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R69 = + T.let( + :R69, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R70 = + T.let( + :R70, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R71 = + T.let( + :R71, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R72 = + T.let( + :R72, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R73 = + T.let( + :R73, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R74 = + T.let( + :R74, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R75 = + T.let( + :R75, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R76 = + T.let( + :R76, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R77 = + T.let( + :R77, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R80 = + T.let( + :R80, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R81 = + T.let( + :R81, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R82 = + T.let( + :R82, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R83 = + T.let( + :R83, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R84 = + T.let( + :R84, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + R85 = + T.let( + :R85, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::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::V2ListResultsResponse::Action::ReturnAction::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + RETURN = + T.let( + :RETURN, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::Action::Variants + ] + ) + end + def self.variants + end + end + + # The state of the Auth Rule + module Mode + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::Models::AuthRules::V2ListResultsResponse::Mode + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :ACTIVE, + Lithic::Models::AuthRules::V2ListResultsResponse::Mode::TaggedSymbol + ) + INACTIVE = + T.let( + :INACTIVE, + Lithic::Models::AuthRules::V2ListResultsResponse::Mode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::Mode::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + end +end diff --git a/rbi/lithic/resources/auth_rules/v2.rbi b/rbi/lithic/resources/auth_rules/v2.rbi index 8b03e59c..a2ed3235 100644 --- a/rbi/lithic/resources/auth_rules/v2.rbi +++ b/rbi/lithic/resources/auth_rules/v2.rbi @@ -198,6 +198,48 @@ module Lithic ) end + # Lists Auth Rule evaluation results. + # + # **Limitations:** + # + # - Results are available for the past 3 months only + # - At least one filter (`event_uuid` or `auth_rule_token`) must be provided + # - When filtering by `event_uuid`, pagination is not supported + sig do + params( + auth_rule_token: String, + ending_before: String, + event_uuid: String, + has_actions: T::Boolean, + page_size: Integer, + starting_after: String, + request_options: Lithic::RequestOptions::OrHash + ).returns( + Lithic::Internal::CursorPage[ + Lithic::Models::AuthRules::V2ListResultsResponse + ] + ) + end + def list_results( + # Filter by Auth Rule token + auth_rule_token: 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, + # Filter by event UUID + event_uuid: nil, + # Filter by whether the rule evaluation produced any actions. When not provided, + # all results are returned. + has_actions: nil, + # Page size (for pagination). + page_size: nil, + # A cursor representing an item's token after which a page of results should + # begin. Used to retrieve the next page of results after this item. + starting_after: nil, + request_options: {} + ) + end + # 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/sig/lithic/models/auth_rules/v2_list_results_params.rbs b/sig/lithic/models/auth_rules/v2_list_results_params.rbs new file mode 100644 index 00000000..8e89f4b2 --- /dev/null +++ b/sig/lithic/models/auth_rules/v2_list_results_params.rbs @@ -0,0 +1,65 @@ +module Lithic + module Models + module AuthRules + type v2_list_results_params = + { + auth_rule_token: String, + ending_before: String, + event_uuid: String, + has_actions: bool, + page_size: Integer, + starting_after: String + } + & Lithic::Internal::Type::request_parameters + + class V2ListResultsParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_reader auth_rule_token: String? + + def auth_rule_token=: (String) -> String + + attr_reader ending_before: String? + + def ending_before=: (String) -> String + + attr_reader event_uuid: String? + + def event_uuid=: (String) -> String + + attr_reader has_actions: bool? + + def has_actions=: (bool) -> bool + + attr_reader page_size: Integer? + + def page_size=: (Integer) -> Integer + + attr_reader starting_after: String? + + def starting_after=: (String) -> String + + def initialize: ( + ?auth_rule_token: String, + ?ending_before: String, + ?event_uuid: String, + ?has_actions: bool, + ?page_size: Integer, + ?starting_after: String, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + auth_rule_token: String, + ending_before: String, + event_uuid: String, + has_actions: bool, + page_size: Integer, + starting_after: String, + request_options: Lithic::RequestOptions + } + end + end + end +end diff --git a/sig/lithic/models/auth_rules/v2_list_results_response.rbs b/sig/lithic/models/auth_rules/v2_list_results_response.rbs new file mode 100644 index 00000000..9cb6aff4 --- /dev/null +++ b/sig/lithic/models/auth_rules/v2_list_results_response.rbs @@ -0,0 +1,460 @@ +module Lithic + module Models + module AuthRules + type v2_list_results_response = + { + token: String, + actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::action], + auth_rule_token: String, + evaluation_time: Time, + event_stream: Lithic::Models::AuthRules::event_stream, + event_token: String, + mode: Lithic::Models::AuthRules::V2ListResultsResponse::mode, + rule_version: Integer + } + + class V2ListResultsResponse < Lithic::Internal::Type::BaseModel + attr_accessor token: String + + attr_accessor actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::action] + + attr_accessor auth_rule_token: String + + attr_accessor evaluation_time: Time + + attr_accessor event_stream: Lithic::Models::AuthRules::event_stream + + attr_accessor event_token: String + + attr_accessor mode: Lithic::Models::AuthRules::V2ListResultsResponse::mode + + attr_accessor rule_version: Integer + + def initialize: ( + token: String, + actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::action], + auth_rule_token: String, + evaluation_time: Time, + event_stream: Lithic::Models::AuthRules::event_stream, + event_token: String, + mode: Lithic::Models::AuthRules::V2ListResultsResponse::mode, + rule_version: Integer + ) -> void + + def to_hash: -> { + token: String, + actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::action], + auth_rule_token: String, + evaluation_time: Time, + event_stream: Lithic::Models::AuthRules::event_stream, + event_token: String, + mode: Lithic::Models::AuthRules::V2ListResultsResponse::mode, + rule_version: Integer + } + + type action = + Lithic::Models::AuthRules::V2ListResultsResponse::Action::AuthorizationAction + | Lithic::Models::AuthRules::V2ListResultsResponse::Action::ThreeDSAction + | Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction + | Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction + | Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction + | Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction + + module Action + extend Lithic::Internal::Type::Union + + type authorization_action = { explanation: String } + + class AuthorizationAction < Lithic::Internal::Type::BaseModel + attr_reader explanation: String? + + def explanation=: (String) -> String + + def initialize: (?explanation: String) -> void + + def to_hash: -> { explanation: String } + end + + type three_ds_action = { explanation: String } + + class ThreeDSAction < Lithic::Internal::Type::BaseModel + attr_reader explanation: String? + + def explanation=: (String) -> String + + def initialize: (?explanation: String) -> void + + def to_hash: -> { explanation: String } + end + + type decline_action = + { + type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::type_, + reason: Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::reason + } + + class DeclineAction < Lithic::Internal::Type::BaseModel + attr_accessor type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::type_ + + attr_reader reason: Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::reason? + + def reason=: ( + Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::reason + ) -> Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::reason + + def initialize: ( + type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::type_, + ?reason: Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::reason + ) -> void + + def to_hash: -> { + type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::type_, + reason: Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::reason + } + + type type_ = :DECLINE + + module Type + extend Lithic::Internal::Type::Enum + + DECLINE: :DECLINE + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::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::V2ListResultsResponse::Action::DeclineAction::reason] + end + end + + type require_tfa_action = + { + type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::type_, + reason: Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::reason + } + + class RequireTfaAction < Lithic::Internal::Type::BaseModel + attr_accessor type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::type_ + + attr_reader reason: Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::reason? + + def reason=: ( + Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::reason + ) -> Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::reason + + def initialize: ( + type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::type_, + ?reason: Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::reason + ) -> void + + def to_hash: -> { + type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::type_, + reason: Lithic::Models::AuthRules::V2ListResultsResponse::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::V2ListResultsResponse::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::V2ListResultsResponse::Action::RequireTfaAction::reason] + end + end + + type approve_action = + { + type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::type_ + } + + class ApproveAction < Lithic::Internal::Type::BaseModel + attr_accessor type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::type_ + + def initialize: ( + type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::type_ + ) -> void + + def to_hash: -> { + type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::type_ + } + + type type_ = :APPROVE + + module Type + extend Lithic::Internal::Type::Enum + + APPROVE: :APPROVE + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::type_] + end + end + + type return_action = + { + code: Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::code, + type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::type_ + } + + class ReturnAction < Lithic::Internal::Type::BaseModel + attr_accessor code: Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::code + + attr_accessor type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::type_ + + def initialize: ( + code: Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::code, + type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::type_ + ) -> void + + def to_hash: -> { + code: Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::code, + type: Lithic::Models::AuthRules::V2ListResultsResponse::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::V2ListResultsResponse::Action::ReturnAction::code] + end + + type type_ = :RETURN + + module Type + extend Lithic::Internal::Type::Enum + + RETURN: :RETURN + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::type_] + end + end + + def self?.variants: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::action] + end + + type mode = :ACTIVE | :INACTIVE + + module Mode + extend Lithic::Internal::Type::Enum + + ACTIVE: :ACTIVE + INACTIVE: :INACTIVE + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::mode] + end + end + end + end +end diff --git a/sig/lithic/resources/auth_rules/v2.rbs b/sig/lithic/resources/auth_rules/v2.rbs index 3938a0d1..0d054211 100644 --- a/sig/lithic/resources/auth_rules/v2.rbs +++ b/sig/lithic/resources/auth_rules/v2.rbs @@ -58,6 +58,16 @@ module Lithic ?request_options: Lithic::request_opts ) -> Lithic::AuthRules::AuthRule + def list_results: ( + ?auth_rule_token: String, + ?ending_before: String, + ?event_uuid: String, + ?has_actions: bool, + ?page_size: Integer, + ?starting_after: String, + ?request_options: Lithic::request_opts + ) -> Lithic::Internal::CursorPage[Lithic::Models::AuthRules::V2ListResultsResponse] + def promote: ( String auth_rule_token, ?request_options: Lithic::request_opts diff --git a/test/lithic/resources/auth_rules/v2_test.rb b/test/lithic/resources/auth_rules/v2_test.rb index 2ddb68e3..b45087ae 100644 --- a/test/lithic/resources/auth_rules/v2_test.rb +++ b/test/lithic/resources/auth_rules/v2_test.rb @@ -153,6 +153,34 @@ def test_draft end end + def test_list_results + response = @lithic.auth_rules.v2.list_results + + assert_pattern do + response => Lithic::Internal::CursorPage + end + + row = response.to_enum.first + return if row.nil? + + assert_pattern do + row => Lithic::Models::AuthRules::V2ListResultsResponse + end + + assert_pattern do + row => { + token: String, + actions: ^(Lithic::Internal::Type::ArrayOf[union: Lithic::Models::AuthRules::V2ListResultsResponse::Action]), + auth_rule_token: String, + evaluation_time: Time, + event_stream: Lithic::AuthRules::EventStream, + event_token: String, + mode: Lithic::Models::AuthRules::V2ListResultsResponse::Mode, + rule_version: Integer + } + end + end + def test_promote response = @lithic.auth_rules.v2.promote("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") From 25e39e68e249381a826c6a17811ff69eb882f82d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 10 Feb 2026 08:05:49 +0000 Subject: [PATCH 10/12] fix(api): Update /v2/auth_rules/results endpoint parameter naming and action types --- .stats.yml | 4 ++-- .../models/auth_rules/v2_list_results_params.rb | 10 +++++----- .../auth_rules/v2_list_results_response.rb | 10 +++++----- lib/lithic/resources/auth_rules/v2.rb | 8 ++++---- .../models/auth_rules/v2_list_results_params.rbi | 16 ++++++++-------- .../auth_rules/v2_list_results_response.rbi | 8 ++++---- rbi/lithic/resources/auth_rules/v2.rbi | 10 +++++----- .../models/auth_rules/v2_list_results_params.rbs | 10 +++++----- .../auth_rules/v2_list_results_response.rbs | 6 +++--- sig/lithic/resources/auth_rules/v2.rbs | 2 +- 10 files changed, 42 insertions(+), 42 deletions(-) diff --git a/.stats.yml b/.stats.yml index dc20d41b..811d5e92 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 177 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-32c9a538495a2c820a7ca28c4f09cc1226642b8f7c9422ce1889aebd15e225ca.yml -openapi_spec_hash: b6403689900263b73d4054a548f00285 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-fe39002b6b38eb33ba43532f28e317bdd4dbb5b0efd46fa098178cb6a544d585.yml +openapi_spec_hash: 8ee7b837e77df089ca3359b5502c7525 config_hash: 693dddc4721eef512d75ab6c60897794 diff --git a/lib/lithic/models/auth_rules/v2_list_results_params.rb b/lib/lithic/models/auth_rules/v2_list_results_params.rb index 988601db..ac74769a 100644 --- a/lib/lithic/models/auth_rules/v2_list_results_params.rb +++ b/lib/lithic/models/auth_rules/v2_list_results_params.rb @@ -21,11 +21,11 @@ class V2ListResultsParams < Lithic::Internal::Type::BaseModel # @return [String, nil] optional :ending_before, String - # @!attribute event_uuid - # Filter by event UUID + # @!attribute event_token + # Filter by event token # # @return [String, nil] - optional :event_uuid, String + optional :event_token, String # @!attribute has_actions # Filter by whether the rule evaluation produced any actions. When not provided, @@ -47,7 +47,7 @@ class V2ListResultsParams < Lithic::Internal::Type::BaseModel # @return [String, nil] optional :starting_after, String - # @!method initialize(auth_rule_token: nil, ending_before: nil, event_uuid: nil, has_actions: nil, page_size: nil, starting_after: nil, request_options: {}) + # @!method initialize(auth_rule_token: nil, ending_before: nil, event_token: nil, has_actions: nil, page_size: nil, starting_after: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Lithic::Models::AuthRules::V2ListResultsParams} for more details. # @@ -55,7 +55,7 @@ class V2ListResultsParams < Lithic::Internal::Type::BaseModel # # @param ending_before [String] A cursor representing an item's token before which a page of results should end. # - # @param event_uuid [String] Filter by event UUID + # @param event_token [String] Filter by event token # # @param has_actions [Boolean] Filter by whether the rule evaluation produced any actions. When not provided, a # diff --git a/lib/lithic/models/auth_rules/v2_list_results_response.rb b/lib/lithic/models/auth_rules/v2_list_results_response.rb index c45663c9..b3a1642a 100644 --- a/lib/lithic/models/auth_rules/v2_list_results_response.rb +++ b/lib/lithic/models/auth_rules/v2_list_results_response.rb @@ -14,7 +14,7 @@ class V2ListResultsResponse < Lithic::Internal::Type::BaseModel # @!attribute actions # Actions returned by the rule evaluation # - # @return [Array] + # @return [Array] required :actions, -> { Lithic::Internal::Type::ArrayOf[union: Lithic::Models::AuthRules::V2ListResultsResponse::Action] } @@ -59,7 +59,7 @@ class V2ListResultsResponse < Lithic::Internal::Type::BaseModel # # @param token [String] Globally unique identifier for the evaluation # - # @param actions [Array] Actions returned by the rule evaluation + # @param actions [Array] Actions returned by the rule evaluation # # @param auth_rule_token [String] The Auth Rule token # @@ -78,7 +78,7 @@ module Action variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::AuthorizationAction } - variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::ThreeDSAction } + variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::Authentication3DSAction } variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction } @@ -99,7 +99,7 @@ class AuthorizationAction < Lithic::Internal::Type::BaseModel # @param explanation [String] Optional explanation for why this action was taken end - class ThreeDSAction < Lithic::Internal::Type::BaseModel + class Authentication3DSAction < Lithic::Internal::Type::BaseModel # @!attribute explanation # Optional explanation for why this action was taken # @@ -369,7 +369,7 @@ module Type end # @!method self.variants - # @return [Array(Lithic::Models::AuthRules::V2ListResultsResponse::Action::AuthorizationAction, Lithic::Models::AuthRules::V2ListResultsResponse::Action::ThreeDSAction, Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction, Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction, Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction, Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction)] + # @return [Array(Lithic::Models::AuthRules::V2ListResultsResponse::Action::AuthorizationAction, Lithic::Models::AuthRules::V2ListResultsResponse::Action::Authentication3DSAction, Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction, Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction, Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction, Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction)] end # The state of the Auth Rule diff --git a/lib/lithic/resources/auth_rules/v2.rb b/lib/lithic/resources/auth_rules/v2.rb index 8b6b69f0..151caa26 100644 --- a/lib/lithic/resources/auth_rules/v2.rb +++ b/lib/lithic/resources/auth_rules/v2.rb @@ -206,16 +206,16 @@ def draft(auth_rule_token, params = {}) # **Limitations:** # # - Results are available for the past 3 months only - # - At least one filter (`event_uuid` or `auth_rule_token`) must be provided - # - When filtering by `event_uuid`, pagination is not supported + # - At least one filter (`event_token` or `auth_rule_token`) must be provided + # - When filtering by `event_token`, pagination is not supported # - # @overload list_results(auth_rule_token: nil, ending_before: nil, event_uuid: nil, has_actions: nil, page_size: nil, starting_after: nil, request_options: {}) + # @overload list_results(auth_rule_token: nil, ending_before: nil, event_token: nil, has_actions: nil, page_size: nil, starting_after: nil, request_options: {}) # # @param auth_rule_token [String] Filter by Auth Rule token # # @param ending_before [String] A cursor representing an item's token before which a page of results should end. # - # @param event_uuid [String] Filter by event UUID + # @param event_token [String] Filter by event token # # @param has_actions [Boolean] Filter by whether the rule evaluation produced any actions. When not provided, a # diff --git a/rbi/lithic/models/auth_rules/v2_list_results_params.rbi b/rbi/lithic/models/auth_rules/v2_list_results_params.rbi index 875e3d78..0f20ffb2 100644 --- a/rbi/lithic/models/auth_rules/v2_list_results_params.rbi +++ b/rbi/lithic/models/auth_rules/v2_list_results_params.rbi @@ -30,12 +30,12 @@ module Lithic sig { params(ending_before: String).void } attr_writer :ending_before - # Filter by event UUID + # Filter by event token sig { returns(T.nilable(String)) } - attr_reader :event_uuid + attr_reader :event_token - sig { params(event_uuid: String).void } - attr_writer :event_uuid + sig { params(event_token: String).void } + attr_writer :event_token # Filter by whether the rule evaluation produced any actions. When not provided, # all results are returned. @@ -64,7 +64,7 @@ module Lithic params( auth_rule_token: String, ending_before: String, - event_uuid: String, + event_token: String, has_actions: T::Boolean, page_size: Integer, starting_after: String, @@ -77,8 +77,8 @@ module Lithic # 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, - # Filter by event UUID - event_uuid: nil, + # Filter by event token + event_token: nil, # Filter by whether the rule evaluation produced any actions. When not provided, # all results are returned. has_actions: nil, @@ -96,7 +96,7 @@ module Lithic { auth_rule_token: String, ending_before: String, - event_uuid: String, + event_token: String, has_actions: T::Boolean, page_size: Integer, starting_after: String, diff --git a/rbi/lithic/models/auth_rules/v2_list_results_response.rbi b/rbi/lithic/models/auth_rules/v2_list_results_response.rbi index 91185d62..6f5b6adb 100644 --- a/rbi/lithic/models/auth_rules/v2_list_results_response.rbi +++ b/rbi/lithic/models/auth_rules/v2_list_results_response.rbi @@ -62,7 +62,7 @@ module Lithic T::Array[ T.any( Lithic::Models::AuthRules::V2ListResultsResponse::Action::AuthorizationAction::OrHash, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ThreeDSAction::OrHash, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::Authentication3DSAction::OrHash, Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::OrHash, Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::OrHash, Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::OrHash, @@ -126,7 +126,7 @@ module Lithic T.type_alias do T.any( Lithic::Models::AuthRules::V2ListResultsResponse::Action::AuthorizationAction, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ThreeDSAction, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::Authentication3DSAction, Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction, Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction, Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction, @@ -162,11 +162,11 @@ module Lithic end end - class ThreeDSAction < Lithic::Internal::Type::BaseModel + class Authentication3DSAction < Lithic::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ThreeDSAction, + Lithic::Models::AuthRules::V2ListResultsResponse::Action::Authentication3DSAction, Lithic::Internal::AnyHash ) end diff --git a/rbi/lithic/resources/auth_rules/v2.rbi b/rbi/lithic/resources/auth_rules/v2.rbi index a2ed3235..cb2b94ee 100644 --- a/rbi/lithic/resources/auth_rules/v2.rbi +++ b/rbi/lithic/resources/auth_rules/v2.rbi @@ -203,13 +203,13 @@ module Lithic # **Limitations:** # # - Results are available for the past 3 months only - # - At least one filter (`event_uuid` or `auth_rule_token`) must be provided - # - When filtering by `event_uuid`, pagination is not supported + # - At least one filter (`event_token` or `auth_rule_token`) must be provided + # - When filtering by `event_token`, pagination is not supported sig do params( auth_rule_token: String, ending_before: String, - event_uuid: String, + event_token: String, has_actions: T::Boolean, page_size: Integer, starting_after: String, @@ -226,8 +226,8 @@ module Lithic # 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, - # Filter by event UUID - event_uuid: nil, + # Filter by event token + event_token: nil, # Filter by whether the rule evaluation produced any actions. When not provided, # all results are returned. has_actions: nil, diff --git a/sig/lithic/models/auth_rules/v2_list_results_params.rbs b/sig/lithic/models/auth_rules/v2_list_results_params.rbs index 8e89f4b2..3b8fa094 100644 --- a/sig/lithic/models/auth_rules/v2_list_results_params.rbs +++ b/sig/lithic/models/auth_rules/v2_list_results_params.rbs @@ -5,7 +5,7 @@ module Lithic { auth_rule_token: String, ending_before: String, - event_uuid: String, + event_token: String, has_actions: bool, page_size: Integer, starting_after: String @@ -24,9 +24,9 @@ module Lithic def ending_before=: (String) -> String - attr_reader event_uuid: String? + attr_reader event_token: String? - def event_uuid=: (String) -> String + def event_token=: (String) -> String attr_reader has_actions: bool? @@ -43,7 +43,7 @@ module Lithic def initialize: ( ?auth_rule_token: String, ?ending_before: String, - ?event_uuid: String, + ?event_token: String, ?has_actions: bool, ?page_size: Integer, ?starting_after: String, @@ -53,7 +53,7 @@ module Lithic def to_hash: -> { auth_rule_token: String, ending_before: String, - event_uuid: String, + event_token: String, has_actions: bool, page_size: Integer, starting_after: String, diff --git a/sig/lithic/models/auth_rules/v2_list_results_response.rbs b/sig/lithic/models/auth_rules/v2_list_results_response.rbs index 9cb6aff4..0b1994ff 100644 --- a/sig/lithic/models/auth_rules/v2_list_results_response.rbs +++ b/sig/lithic/models/auth_rules/v2_list_results_response.rbs @@ -54,7 +54,7 @@ module Lithic type action = Lithic::Models::AuthRules::V2ListResultsResponse::Action::AuthorizationAction - | Lithic::Models::AuthRules::V2ListResultsResponse::Action::ThreeDSAction + | Lithic::Models::AuthRules::V2ListResultsResponse::Action::Authentication3DSAction | Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction | Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction | Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction @@ -75,9 +75,9 @@ module Lithic def to_hash: -> { explanation: String } end - type three_ds_action = { explanation: String } + type authentication3_ds_action = { explanation: String } - class ThreeDSAction < Lithic::Internal::Type::BaseModel + class Authentication3DSAction < Lithic::Internal::Type::BaseModel attr_reader explanation: String? def explanation=: (String) -> String diff --git a/sig/lithic/resources/auth_rules/v2.rbs b/sig/lithic/resources/auth_rules/v2.rbs index 0d054211..6228dba8 100644 --- a/sig/lithic/resources/auth_rules/v2.rbs +++ b/sig/lithic/resources/auth_rules/v2.rbs @@ -61,7 +61,7 @@ module Lithic def list_results: ( ?auth_rule_token: String, ?ending_before: String, - ?event_uuid: String, + ?event_token: String, ?has_actions: bool, ?page_size: Integer, ?starting_after: String, From f669cafbb5f8d2f84295b576de01c4e41e1b1789 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 11 Feb 2026 08:12:21 +0000 Subject: [PATCH 11/12] feat(api): Add result schemas for Authorization and Authentication (3DS) actions --- .stats.yml | 4 +- .../auth_rules/v2_list_results_response.rb | 990 ++++--- lib/lithic/resources/auth_rules/v2.rb | 2 +- .../auth_rules/v2_list_results_response.rbi | 2508 +++++++++++------ rbi/lithic/resources/auth_rules/v2.rbi | 2 +- .../auth_rules/v2_list_results_response.rbs | 1050 ++++--- sig/lithic/resources/auth_rules/v2.rbs | 2 +- test/lithic/resources/auth_rules/v2_test.rb | 16 +- 8 files changed, 2940 insertions(+), 1634 deletions(-) diff --git a/.stats.yml b/.stats.yml index 811d5e92..d1ffb6fa 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 177 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-fe39002b6b38eb33ba43532f28e317bdd4dbb5b0efd46fa098178cb6a544d585.yml -openapi_spec_hash: 8ee7b837e77df089ca3359b5502c7525 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-a4803fcc96eac3196b6763e16264cc1b3292394102f3645a986a575c57d0a290.yml +openapi_spec_hash: 8a62dfde46b1749196575f2879f54d77 config_hash: 693dddc4721eef512d75ab6c60897794 diff --git a/lib/lithic/models/auth_rules/v2_list_results_response.rb b/lib/lithic/models/auth_rules/v2_list_results_response.rb index b3a1642a..4031863b 100644 --- a/lib/lithic/models/auth_rules/v2_list_results_response.rb +++ b/lib/lithic/models/auth_rules/v2_list_results_response.rb @@ -3,387 +3,737 @@ module Lithic module Models module AuthRules + # Result of an Auth Rule evaluation + # # @see Lithic::Resources::AuthRules::V2#list_results - class V2ListResultsResponse < Lithic::Internal::Type::BaseModel - # @!attribute token - # Globally unique identifier for the evaluation - # - # @return [String] - required :token, String - - # @!attribute actions - # Actions returned by the rule evaluation - # - # @return [Array] - required :actions, - -> { Lithic::Internal::Type::ArrayOf[union: Lithic::Models::AuthRules::V2ListResultsResponse::Action] } - - # @!attribute auth_rule_token - # The Auth Rule token - # - # @return [String] - required :auth_rule_token, String - - # @!attribute evaluation_time - # Timestamp of the rule evaluation - # - # @return [Time] - required :evaluation_time, Time - - # @!attribute event_stream - # The event stream during which the rule was evaluated - # - # @return [Symbol, Lithic::Models::AuthRules::EventStream] - required :event_stream, enum: -> { Lithic::AuthRules::EventStream } - - # @!attribute event_token - # Token of the event that triggered the evaluation - # - # @return [String] - required :event_token, String - - # @!attribute mode - # The state of the Auth Rule - # - # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Mode] - required :mode, enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::Mode } - - # @!attribute rule_version - # Version of the rule that was evaluated - # - # @return [Integer] - required :rule_version, Integer - - # @!method initialize(token:, actions:, auth_rule_token:, evaluation_time:, event_stream:, event_token:, mode:, rule_version:) - # Result of an Auth Rule evaluation - # - # @param token [String] Globally unique identifier for the evaluation - # - # @param actions [Array] Actions returned by the rule evaluation - # - # @param auth_rule_token [String] The Auth Rule token - # - # @param evaluation_time [Time] Timestamp of the rule evaluation - # - # @param event_stream [Symbol, Lithic::Models::AuthRules::EventStream] The event stream during which the rule was evaluated - # - # @param event_token [String] Token of the event that triggered the evaluation - # - # @param mode [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Mode] The state of the Auth Rule - # - # @param rule_version [Integer] Version of the rule that was evaluated - - module Action - extend Lithic::Internal::Type::Union - - variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::AuthorizationAction } - - variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::Authentication3DSAction } - - variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction } - - variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction } - - variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction } - - variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction } - - class AuthorizationAction < Lithic::Internal::Type::BaseModel - # @!attribute explanation - # Optional explanation for why this action was taken + module V2ListResultsResponse + extend Lithic::Internal::Type::Union + + variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult } + + variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult } + + variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult } + + variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult } + + class AuthorizationResult < Lithic::Internal::Type::BaseModel + # @!attribute token + # Globally unique identifier for the evaluation + # + # @return [String] + required :token, String + + # @!attribute actions + # Actions returned by the rule evaluation + # + # @return [Array] + required :actions, + -> { Lithic::Internal::Type::ArrayOf[Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action] } + + # @!attribute auth_rule_token + # The Auth Rule token + # + # @return [String] + required :auth_rule_token, String + + # @!attribute evaluation_time + # Timestamp of the rule evaluation + # + # @return [Time] + required :evaluation_time, Time + + # @!attribute event_stream + # The event stream during which the rule was evaluated + # + # @return [Symbol, :AUTHORIZATION] + required :event_stream, const: :AUTHORIZATION + + # @!attribute event_token + # Token of the event that triggered the evaluation + # + # @return [String] + required :event_token, String + + # @!attribute mode + # The state of the Auth Rule + # + # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Mode] + required :mode, enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Mode } + + # @!attribute rule_version + # Version of the rule that was evaluated + # + # @return [Integer] + required :rule_version, Integer + + # @!method initialize(token:, actions:, auth_rule_token:, evaluation_time:, event_token:, mode:, rule_version:, event_stream: :AUTHORIZATION) + # @param token [String] Globally unique identifier for the evaluation + # + # @param actions [Array] Actions returned by the rule evaluation + # + # @param auth_rule_token [String] The Auth Rule token + # + # @param evaluation_time [Time] Timestamp of the rule evaluation + # + # @param event_token [String] Token of the event that triggered the evaluation + # + # @param mode [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Mode] The state of the Auth Rule + # + # @param rule_version [Integer] Version of the rule that was evaluated + # + # @param event_stream [Symbol, :AUTHORIZATION] The event stream during which the rule was evaluated + + class Action < Lithic::Internal::Type::BaseModel + # @!attribute type # - # @return [String, nil] - optional :explanation, String - - # @!method initialize(explanation: nil) - # @param explanation [String] Optional explanation for why this action was taken - end + # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action::Type] + required :type, + enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action::Type } - class Authentication3DSAction < Lithic::Internal::Type::BaseModel # @!attribute explanation # Optional explanation for why this action was taken # # @return [String, nil] optional :explanation, String - # @!method initialize(explanation: nil) - # @param explanation [String] Optional explanation for why this action was taken - end - - class DeclineAction < Lithic::Internal::Type::BaseModel - # @!attribute type - # Decline the tokenization request - # - # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Type] - required :type, enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Type } - - # @!attribute reason - # Reason code for declining the tokenization request + # @!method initialize(type:, explanation: nil) + # @param type [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action::Type] # - # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason, nil] - optional :reason, - enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason } - - # @!method initialize(type:, reason: nil) - # @param type [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Type] Decline the tokenization request - # - # @param reason [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason] Reason code for declining the tokenization request + # @param explanation [String] Optional explanation for why this action was taken - # Decline the tokenization request - # - # @see Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction#type + # @see Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action#type module Type extend Lithic::Internal::Type::Enum DECLINE = :DECLINE + CHALLENGE = :CHALLENGE # @!method self.values # @return [Array] end + end - # Reason code for declining the tokenization request - # - # @see Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction#reason - module Reason - extend Lithic::Internal::Type::Enum + # The state of the Auth Rule + # + # @see Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult#mode + module Mode + 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 + ACTIVE = :ACTIVE + INACTIVE = :INACTIVE - # @!method self.values - # @return [Array] - end + # @!method self.values + # @return [Array] end + end - class RequireTfaAction < Lithic::Internal::Type::BaseModel + class Authentication3DSResult < Lithic::Internal::Type::BaseModel + # @!attribute token + # Globally unique identifier for the evaluation + # + # @return [String] + required :token, String + + # @!attribute actions + # Actions returned by the rule evaluation + # + # @return [Array] + required :actions, + -> { Lithic::Internal::Type::ArrayOf[Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action] } + + # @!attribute auth_rule_token + # The Auth Rule token + # + # @return [String] + required :auth_rule_token, String + + # @!attribute evaluation_time + # Timestamp of the rule evaluation + # + # @return [Time] + required :evaluation_time, Time + + # @!attribute event_stream + # The event stream during which the rule was evaluated + # + # @return [Symbol, :THREE_DS_AUTHENTICATION] + required :event_stream, const: :THREE_DS_AUTHENTICATION + + # @!attribute event_token + # Token of the event that triggered the evaluation + # + # @return [String] + required :event_token, String + + # @!attribute mode + # The state of the Auth Rule + # + # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Mode] + required :mode, + enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Mode } + + # @!attribute rule_version + # Version of the rule that was evaluated + # + # @return [Integer] + required :rule_version, Integer + + # @!method initialize(token:, actions:, auth_rule_token:, evaluation_time:, event_token:, mode:, rule_version:, event_stream: :THREE_DS_AUTHENTICATION) + # @param token [String] Globally unique identifier for the evaluation + # + # @param actions [Array] Actions returned by the rule evaluation + # + # @param auth_rule_token [String] The Auth Rule token + # + # @param evaluation_time [Time] Timestamp of the rule evaluation + # + # @param event_token [String] Token of the event that triggered the evaluation + # + # @param mode [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Mode] The state of the Auth Rule + # + # @param rule_version [Integer] Version of the rule that was evaluated + # + # @param event_stream [Symbol, :THREE_DS_AUTHENTICATION] The event stream during which the rule was evaluated + + class Action < Lithic::Internal::Type::BaseModel # @!attribute type - # Require two-factor authentication for the tokenization request # - # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Type] + # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action::Type] required :type, - enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Type } + enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action::Type } - # @!attribute reason - # Reason code for requiring two-factor authentication + # @!attribute explanation + # Optional explanation for why this action was taken # - # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason, nil] - optional :reason, - enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason } + # @return [String, nil] + optional :explanation, String - # @!method initialize(type:, reason: nil) - # @param type [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Type] Require two-factor authentication for the tokenization request + # @!method initialize(type:, explanation: nil) + # @param type [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action::Type] # - # @param reason [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason] Reason code for requiring two-factor authentication + # @param explanation [String] Optional explanation for why this action was taken - # Require two-factor authentication for the tokenization request - # - # @see Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction#type + # @see Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action#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::V2ListResultsResponse::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 + DECLINE = :DECLINE + CHALLENGE = :CHALLENGE # @!method self.values # @return [Array] end end - class ApproveAction < Lithic::Internal::Type::BaseModel - # @!attribute type - # Approve the ACH transaction - # - # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::Type] - required :type, enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::Type } + # The state of the Auth Rule + # + # @see Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult#mode + module Mode + extend Lithic::Internal::Type::Enum - # @!method initialize(type:) - # @param type [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::Type] Approve the ACH transaction + ACTIVE = :ACTIVE + INACTIVE = :INACTIVE - # Approve the ACH transaction - # - # @see Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction#type - module Type - extend Lithic::Internal::Type::Enum + # @!method self.values + # @return [Array] + end + end - APPROVE = :APPROVE + class TokenizationResult < Lithic::Internal::Type::BaseModel + # @!attribute token + # Globally unique identifier for the evaluation + # + # @return [String] + required :token, String + + # @!attribute actions + # Actions returned by the rule evaluation + # + # @return [Array] + required :actions, + -> { Lithic::Internal::Type::ArrayOf[union: Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action] } + + # @!attribute auth_rule_token + # The Auth Rule token + # + # @return [String] + required :auth_rule_token, String + + # @!attribute evaluation_time + # Timestamp of the rule evaluation + # + # @return [Time] + required :evaluation_time, Time + + # @!attribute event_stream + # The event stream during which the rule was evaluated + # + # @return [Symbol, :TOKENIZATION] + required :event_stream, const: :TOKENIZATION + + # @!attribute event_token + # Token of the event that triggered the evaluation + # + # @return [String] + required :event_token, String + + # @!attribute mode + # The state of the Auth Rule + # + # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Mode] + required :mode, enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Mode } + + # @!attribute rule_version + # Version of the rule that was evaluated + # + # @return [Integer] + required :rule_version, Integer + + # @!method initialize(token:, actions:, auth_rule_token:, evaluation_time:, event_token:, mode:, rule_version:, event_stream: :TOKENIZATION) + # @param token [String] Globally unique identifier for the evaluation + # + # @param actions [Array] Actions returned by the rule evaluation + # + # @param auth_rule_token [String] The Auth Rule token + # + # @param evaluation_time [Time] Timestamp of the rule evaluation + # + # @param event_token [String] Token of the event that triggered the evaluation + # + # @param mode [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Mode] The state of the Auth Rule + # + # @param rule_version [Integer] Version of the rule that was evaluated + # + # @param event_stream [Symbol, :TOKENIZATION] The event stream during which the rule was evaluated + + module Action + extend Lithic::Internal::Type::Union + + variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction } + + variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction } + + class DeclineAction < Lithic::Internal::Type::BaseModel + # @!attribute type + # Decline the tokenization request + # + # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Type] + required :type, + enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Type } + + # @!attribute explanation + # Optional explanation for why this action was taken + # + # @return [String, nil] + optional :explanation, String + + # @!attribute reason + # Reason code for declining the tokenization request + # + # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Reason, nil] + optional :reason, + enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Reason } + + # @!method initialize(type:, explanation: nil, reason: nil) + # @param type [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Type] Decline the tokenization request + # + # @param explanation [String] Optional explanation for why this action was taken + # + # @param reason [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Reason] Reason code for declining the tokenization request + + # Decline the tokenization request + # + # @see Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction#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::V2ListResultsResponse::TokenizationResult::Action::DeclineAction#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 - # @!method self.values - # @return [Array] + class RequireTfaAction < Lithic::Internal::Type::BaseModel + # @!attribute type + # Require two-factor authentication for the tokenization request + # + # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Type] + required :type, + enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Type } + + # @!attribute explanation + # Optional explanation for why this action was taken + # + # @return [String, nil] + optional :explanation, String + + # @!attribute reason + # Reason code for requiring two-factor authentication + # + # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Reason, nil] + optional :reason, + enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Reason } + + # @!method initialize(type:, explanation: nil, reason: nil) + # @param type [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Type] Require two-factor authentication for the tokenization request + # + # @param explanation [String] Optional explanation for why this action was taken + # + # @param reason [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Reason] Reason code for requiring two-factor authentication + + # Require two-factor authentication for the tokenization request + # + # @see Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::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::V2ListResultsResponse::TokenizationResult::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 + + # @!method self.variants + # @return [Array(Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction)] 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::V2ListResultsResponse::Action::ReturnAction::Code] - required :code, enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code } + # The state of the Auth Rule + # + # @see Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult#mode + module Mode + extend Lithic::Internal::Type::Enum - # @!attribute type - # Return the ACH transaction - # - # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Type] - required :type, enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Type } - - # @!method initialize(code:, type:) - # Some parameter documentations has been truncated, see - # {Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction} for - # more details. - # - # @param code [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code] NACHA return code to use when returning the transaction. Note that the list of a - # - # @param type [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Type] Return the ACH transaction + ACTIVE = :ACTIVE + INACTIVE = :INACTIVE - # 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::V2ListResultsResponse::Action::ReturnAction#code - module Code - extend Lithic::Internal::Type::Enum + # @!method self.values + # @return [Array] + end + end - 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 + class ACHResult < Lithic::Internal::Type::BaseModel + # @!attribute token + # Globally unique identifier for the evaluation + # + # @return [String] + required :token, String + + # @!attribute actions + # Actions returned by the rule evaluation + # + # @return [Array] + required :actions, + -> { Lithic::Internal::Type::ArrayOf[union: Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action] } + + # @!attribute auth_rule_token + # The Auth Rule token + # + # @return [String] + required :auth_rule_token, String + + # @!attribute evaluation_time + # Timestamp of the rule evaluation + # + # @return [Time] + required :evaluation_time, Time + + # @!attribute event_stream + # The event stream during which the rule was evaluated + # + # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::EventStream] + required :event_stream, + enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::EventStream } + + # @!attribute event_token + # Token of the event that triggered the evaluation + # + # @return [String] + required :event_token, String + + # @!attribute mode + # The state of the Auth Rule + # + # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Mode] + required :mode, enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Mode } + + # @!attribute rule_version + # Version of the rule that was evaluated + # + # @return [Integer] + required :rule_version, Integer + + # @!method initialize(token:, actions:, auth_rule_token:, evaluation_time:, event_stream:, event_token:, mode:, rule_version:) + # @param token [String] Globally unique identifier for the evaluation + # + # @param actions [Array] Actions returned by the rule evaluation + # + # @param auth_rule_token [String] The Auth Rule token + # + # @param evaluation_time [Time] Timestamp of the rule evaluation + # + # @param event_stream [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::EventStream] The event stream during which the rule was evaluated + # + # @param event_token [String] Token of the event that triggered the evaluation + # + # @param mode [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Mode] The state of the Auth Rule + # + # @param rule_version [Integer] Version of the rule that was evaluated + + module Action + extend Lithic::Internal::Type::Union + + variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction } + + variant -> { Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction } + + class ApproveAction < Lithic::Internal::Type::BaseModel + # @!attribute type + # Approve the ACH transaction + # + # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction::Type] + required :type, + enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction::Type } + + # @!attribute explanation + # Optional explanation for why this action was taken + # + # @return [String, nil] + optional :explanation, String + + # @!method initialize(type:, explanation: nil) + # @param type [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction::Type] Approve the ACH transaction + # + # @param explanation [String] Optional explanation for why this action was taken + + # Approve the ACH transaction + # + # @see Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction#type + module Type + extend Lithic::Internal::Type::Enum + + APPROVE = :APPROVE + + # @!method self.values + # @return [Array] + end + end - # @!method self.values - # @return [Array] + 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::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code] + required :code, + enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code } + + # @!attribute type + # Return the ACH transaction + # + # @return [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Type] + required :type, + enum: -> { Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Type } + + # @!attribute explanation + # Optional explanation for why this action was taken + # + # @return [String, nil] + optional :explanation, String + + # @!method initialize(code:, type:, explanation: nil) + # Some parameter documentations has been truncated, see + # {Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction} + # for more details. + # + # @param code [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code] NACHA return code to use when returning the transaction. Note that the list of a + # + # @param type [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Type] Return the ACH transaction + # + # @param explanation [String] Optional explanation for why this action was taken + + # 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::V2ListResultsResponse::ACHResult::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::V2ListResultsResponse::ACHResult::Action::ReturnAction#type + module Type + extend Lithic::Internal::Type::Enum + + RETURN = :RETURN + + # @!method self.values + # @return [Array] + end end - # Return the ACH transaction - # - # @see Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction#type - module Type - extend Lithic::Internal::Type::Enum + # @!method self.variants + # @return [Array(Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction)] + end - RETURN = :RETURN + # The event stream during which the rule was evaluated + # + # @see Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult#event_stream + module EventStream + extend Lithic::Internal::Type::Enum - # @!method self.values - # @return [Array] - end - end + ACH_CREDIT_RECEIPT = :ACH_CREDIT_RECEIPT + ACH_DEBIT_RECEIPT = :ACH_DEBIT_RECEIPT - # @!method self.variants - # @return [Array(Lithic::Models::AuthRules::V2ListResultsResponse::Action::AuthorizationAction, Lithic::Models::AuthRules::V2ListResultsResponse::Action::Authentication3DSAction, Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction, Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction, Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction, Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction)] - end + # @!method self.values + # @return [Array] + end - # The state of the Auth Rule - # - # @see Lithic::Models::AuthRules::V2ListResultsResponse#mode - module Mode - extend Lithic::Internal::Type::Enum + # The state of the Auth Rule + # + # @see Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult#mode + module Mode + extend Lithic::Internal::Type::Enum - ACTIVE = :ACTIVE - INACTIVE = :INACTIVE + ACTIVE = :ACTIVE + INACTIVE = :INACTIVE - # @!method self.values - # @return [Array] + # @!method self.values + # @return [Array] + end end + + # @!method self.variants + # @return [Array(Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult, Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult)] end end end diff --git a/lib/lithic/resources/auth_rules/v2.rb b/lib/lithic/resources/auth_rules/v2.rb index 151caa26..1ea26074 100644 --- a/lib/lithic/resources/auth_rules/v2.rb +++ b/lib/lithic/resources/auth_rules/v2.rb @@ -225,7 +225,7 @@ def draft(auth_rule_token, params = {}) # # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Lithic::Internal::CursorPage] + # @return [Lithic::Internal::CursorPage] # # @see Lithic::Models::AuthRules::V2ListResultsParams def list_results(params = {}) diff --git a/rbi/lithic/models/auth_rules/v2_list_results_response.rbi b/rbi/lithic/models/auth_rules/v2_list_results_response.rbi index 6f5b6adb..ec17e4ee 100644 --- a/rbi/lithic/models/auth_rules/v2_list_results_response.rbi +++ b/rbi/lithic/models/auth_rules/v2_list_results_response.rbi @@ -3,241 +3,162 @@ module Lithic module Models module AuthRules - class V2ListResultsResponse < Lithic::Internal::Type::BaseModel - OrHash = + # Result of an Auth Rule evaluation + module V2ListResultsResponse + extend Lithic::Internal::Type::Union + + Variants = T.type_alias do T.any( - Lithic::Models::AuthRules::V2ListResultsResponse, - Lithic::Internal::AnyHash + Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult, + Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult ) end - # Globally unique identifier for the evaluation - sig { returns(String) } - attr_accessor :token - - # Actions returned by the rule evaluation - sig do - returns( - T::Array[ - Lithic::Models::AuthRules::V2ListResultsResponse::Action::Variants - ] - ) - end - attr_accessor :actions - - # The Auth Rule token - sig { returns(String) } - attr_accessor :auth_rule_token - - # Timestamp of the rule evaluation - sig { returns(Time) } - attr_accessor :evaluation_time - - # The event stream during which the rule was evaluated - sig { returns(Lithic::AuthRules::EventStream::TaggedSymbol) } - attr_accessor :event_stream - - # Token of the event that triggered the evaluation - sig { returns(String) } - attr_accessor :event_token - - # The state of the Auth Rule - sig do - returns( - Lithic::Models::AuthRules::V2ListResultsResponse::Mode::TaggedSymbol - ) - end - attr_accessor :mode - - # Version of the rule that was evaluated - sig { returns(Integer) } - attr_accessor :rule_version + class AuthorizationResult < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult, + Lithic::Internal::AnyHash + ) + end - # Result of an Auth Rule evaluation - sig do - params( - token: String, - actions: - T::Array[ - T.any( - Lithic::Models::AuthRules::V2ListResultsResponse::Action::AuthorizationAction::OrHash, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::Authentication3DSAction::OrHash, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::OrHash, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::OrHash, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::OrHash, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::OrHash - ) - ], - auth_rule_token: String, - evaluation_time: Time, - event_stream: Lithic::AuthRules::EventStream::OrSymbol, - event_token: String, - mode: - Lithic::Models::AuthRules::V2ListResultsResponse::Mode::OrSymbol, - rule_version: Integer - ).returns(T.attached_class) - end - def self.new( # Globally unique identifier for the evaluation - token:, + sig { returns(String) } + attr_accessor :token + # Actions returned by the rule evaluation - actions:, + sig do + returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action + ] + ) + end + attr_accessor :actions + # The Auth Rule token - auth_rule_token:, + sig { returns(String) } + attr_accessor :auth_rule_token + # Timestamp of the rule evaluation - evaluation_time:, + sig { returns(Time) } + attr_accessor :evaluation_time + # The event stream during which the rule was evaluated - event_stream:, + sig { returns(Symbol) } + attr_accessor :event_stream + # Token of the event that triggered the evaluation - event_token:, + sig { returns(String) } + attr_accessor :event_token + # The state of the Auth Rule - mode:, + sig do + returns( + Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Mode::TaggedSymbol + ) + end + attr_accessor :mode + # Version of the rule that was evaluated - rule_version: - ) - end + sig { returns(Integer) } + attr_accessor :rule_version - sig do - override.returns( - { + sig do + params( token: String, actions: T::Array[ - Lithic::Models::AuthRules::V2ListResultsResponse::Action::Variants + Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action::OrHash ], auth_rule_token: String, evaluation_time: Time, - event_stream: Lithic::AuthRules::EventStream::TaggedSymbol, event_token: String, mode: - Lithic::Models::AuthRules::V2ListResultsResponse::Mode::TaggedSymbol, - rule_version: Integer - } + Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Mode::OrSymbol, + rule_version: Integer, + event_stream: Symbol + ).returns(T.attached_class) + end + def self.new( + # Globally unique identifier for the evaluation + token:, + # Actions returned by the rule evaluation + actions:, + # The Auth Rule token + auth_rule_token:, + # Timestamp of the rule evaluation + evaluation_time:, + # Token of the event that triggered the evaluation + event_token:, + # The state of the Auth Rule + mode:, + # Version of the rule that was evaluated + rule_version:, + # The event stream during which the rule was evaluated + event_stream: :AUTHORIZATION ) - end - def to_hash - end - - module Action - extend Lithic::Internal::Type::Union - - Variants = - T.type_alias do - T.any( - Lithic::Models::AuthRules::V2ListResultsResponse::Action::AuthorizationAction, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::Authentication3DSAction, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction - ) - end - - class AuthorizationAction < Lithic::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Lithic::Models::AuthRules::V2ListResultsResponse::Action::AuthorizationAction, - Lithic::Internal::AnyHash - ) - end - - # Optional explanation for why this action was taken - sig { returns(T.nilable(String)) } - attr_reader :explanation - - sig { params(explanation: String).void } - attr_writer :explanation - - sig { params(explanation: String).returns(T.attached_class) } - def self.new( - # Optional explanation for why this action was taken - explanation: nil - ) - end - - sig { override.returns({ explanation: String }) } - def to_hash - end end - class Authentication3DSAction < Lithic::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Lithic::Models::AuthRules::V2ListResultsResponse::Action::Authentication3DSAction, - Lithic::Internal::AnyHash - ) - end - - # Optional explanation for why this action was taken - sig { returns(T.nilable(String)) } - attr_reader :explanation - - sig { params(explanation: String).void } - attr_writer :explanation - - sig { params(explanation: String).returns(T.attached_class) } - def self.new( - # Optional explanation for why this action was taken - explanation: nil + sig do + override.returns( + { + token: String, + actions: + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action + ], + auth_rule_token: String, + evaluation_time: Time, + event_stream: Symbol, + event_token: String, + mode: + Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Mode::TaggedSymbol, + rule_version: Integer + } ) - end - - sig { override.returns({ explanation: String }) } - def to_hash - end + end + def to_hash end - class DeclineAction < Lithic::Internal::Type::BaseModel + class Action < Lithic::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction, + Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action, Lithic::Internal::AnyHash ) end - # Decline the tokenization request sig do returns( - Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Type::TaggedSymbol + Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action::Type::TaggedSymbol ) end attr_accessor :type - # Reason code for declining the tokenization request - sig do - returns( - T.nilable( - Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol - ) - ) - end - attr_reader :reason + # Optional explanation for why this action was taken + sig { returns(T.nilable(String)) } + attr_reader :explanation - sig do - params( - reason: - Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::OrSymbol - ).void - end - attr_writer :reason + sig { params(explanation: String).void } + attr_writer :explanation sig do params( type: - Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Type::OrSymbol, - reason: - Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::OrSymbol + Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action::Type::OrSymbol, + explanation: String ).returns(T.attached_class) end def self.new( - # Decline the tokenization request type:, - # Reason code for declining the tokenization request - reason: nil + # Optional explanation for why this action was taken + explanation: nil ) end @@ -245,16 +166,14 @@ module Lithic override.returns( { type: - Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Type::TaggedSymbol, - reason: - Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol + Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action::Type::TaggedSymbol, + explanation: String } ) end def to_hash end - # Decline the tokenization request module Type extend Lithic::Internal::Type::Enum @@ -262,7 +181,7 @@ module Lithic T.type_alias do T.all( Symbol, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Type + Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action::Type ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -270,159 +189,204 @@ module Lithic DECLINE = T.let( :DECLINE, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Type::TaggedSymbol + Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action::Type::TaggedSymbol + ) + CHALLENGE = + T.let( + :CHALLENGE, + Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action::Type::TaggedSymbol ) sig do override.returns( T::Array[ - Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Type::TaggedSymbol + Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action::Type::TaggedSymbol ] ) end def self.values end 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::V2ListResultsResponse::Action::DeclineAction::Reason - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ACCOUNT_SCORE_1 = - T.let( - :ACCOUNT_SCORE_1, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol - ) - DEVICE_SCORE_1 = - T.let( - :DEVICE_SCORE_1, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol - ) - ALL_WALLET_DECLINE_REASONS_PRESENT = - T.let( - :ALL_WALLET_DECLINE_REASONS_PRESENT, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol - ) - WALLET_RECOMMENDED_DECISION_RED = - T.let( - :WALLET_RECOMMENDED_DECISION_RED, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol - ) - CVC_MISMATCH = - T.let( - :CVC_MISMATCH, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol - ) - CARD_EXPIRY_MONTH_MISMATCH = - T.let( - :CARD_EXPIRY_MONTH_MISMATCH, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol - ) - CARD_EXPIRY_YEAR_MISMATCH = - T.let( - :CARD_EXPIRY_YEAR_MISMATCH, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol - ) - CARD_INVALID_STATE = - T.let( - :CARD_INVALID_STATE, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol - ) - CUSTOMER_RED_PATH = - T.let( - :CUSTOMER_RED_PATH, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol - ) - INVALID_CUSTOMER_RESPONSE = - T.let( - :INVALID_CUSTOMER_RESPONSE, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol - ) - NETWORK_FAILURE = - T.let( - :NETWORK_FAILURE, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol - ) - GENERIC_DECLINE = - T.let( - :GENERIC_DECLINE, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol - ) - DIGITAL_CARD_ART_REQUIRED = - T.let( - :DIGITAL_CARD_ART_REQUIRED, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol - ) + # The state of the Auth Rule + module Mode + extend Lithic::Internal::Type::Enum - sig do - override.returns( - T::Array[ - Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::Reason::TaggedSymbol - ] + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Mode ) end - def self.values - end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :ACTIVE, + Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Mode::TaggedSymbol + ) + INACTIVE = + T.let( + :INACTIVE, + Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Mode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Mode::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class Authentication3DSResult < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult, + Lithic::Internal::AnyHash + ) end + + # Globally unique identifier for the evaluation + sig { returns(String) } + attr_accessor :token + + # Actions returned by the rule evaluation + sig do + returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action + ] + ) + end + attr_accessor :actions + + # The Auth Rule token + sig { returns(String) } + attr_accessor :auth_rule_token + + # Timestamp of the rule evaluation + sig { returns(Time) } + attr_accessor :evaluation_time + + # The event stream during which the rule was evaluated + sig { returns(Symbol) } + attr_accessor :event_stream + + # Token of the event that triggered the evaluation + sig { returns(String) } + attr_accessor :event_token + + # The state of the Auth Rule + sig do + returns( + Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Mode::TaggedSymbol + ) + end + attr_accessor :mode + + # Version of the rule that was evaluated + sig { returns(Integer) } + attr_accessor :rule_version + + sig do + params( + token: String, + actions: + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action::OrHash + ], + auth_rule_token: String, + evaluation_time: Time, + event_token: String, + mode: + Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Mode::OrSymbol, + rule_version: Integer, + event_stream: Symbol + ).returns(T.attached_class) + end + def self.new( + # Globally unique identifier for the evaluation + token:, + # Actions returned by the rule evaluation + actions:, + # The Auth Rule token + auth_rule_token:, + # Timestamp of the rule evaluation + evaluation_time:, + # Token of the event that triggered the evaluation + event_token:, + # The state of the Auth Rule + mode:, + # Version of the rule that was evaluated + rule_version:, + # The event stream during which the rule was evaluated + event_stream: :THREE_DS_AUTHENTICATION + ) + end + + sig do + override.returns( + { + token: String, + actions: + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action + ], + auth_rule_token: String, + evaluation_time: Time, + event_stream: Symbol, + event_token: String, + mode: + Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Mode::TaggedSymbol, + rule_version: Integer + } + ) + end + def to_hash end - class RequireTfaAction < Lithic::Internal::Type::BaseModel + class Action < Lithic::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction, + Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action, Lithic::Internal::AnyHash ) end - # Require two-factor authentication for the tokenization request sig do returns( - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Type::TaggedSymbol + Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action::Type::TaggedSymbol ) end attr_accessor :type - # Reason code for requiring two-factor authentication - sig do - returns( - T.nilable( - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol - ) - ) - end - attr_reader :reason + # Optional explanation for why this action was taken + sig { returns(T.nilable(String)) } + attr_reader :explanation - sig do - params( - reason: - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::OrSymbol - ).void - end - attr_writer :reason + sig { params(explanation: String).void } + attr_writer :explanation sig do params( type: - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Type::OrSymbol, - reason: - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::OrSymbol + Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action::Type::OrSymbol, + explanation: String ).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 + # Optional explanation for why this action was taken + explanation: nil ) end @@ -430,16 +394,14 @@ module Lithic override.returns( { type: - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Type::TaggedSymbol, - reason: - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol + Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action::Type::TaggedSymbol, + explanation: String } ) end def to_hash end - # Require two-factor authentication for the tokenization request module Type extend Lithic::Internal::Type::Enum @@ -447,711 +409,1417 @@ module Lithic T.type_alias do T.all( Symbol, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Type + Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action::Type ) end OrSymbol = T.type_alias { T.any(Symbol, String) } - REQUIRE_TFA = + DECLINE = + T.let( + :DECLINE, + Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action::Type::TaggedSymbol + ) + CHALLENGE = T.let( - :REQUIRE_TFA, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Type::TaggedSymbol + :CHALLENGE, + Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action::Type::TaggedSymbol ) sig do override.returns( T::Array[ - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Type::TaggedSymbol + Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action::Type::TaggedSymbol ] ) end def self.values end end + end - # Reason code for requiring two-factor authentication - module Reason - extend Lithic::Internal::Type::Enum + # The state of the Auth Rule + module Mode + extend Lithic::Internal::Type::Enum - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - WALLET_RECOMMENDED_TFA = - T.let( - :WALLET_RECOMMENDED_TFA, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol - ) - SUSPICIOUS_ACTIVITY = - T.let( - :SUSPICIOUS_ACTIVITY, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol - ) - DEVICE_RECENTLY_LOST = - T.let( - :DEVICE_RECENTLY_LOST, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol - ) - TOO_MANY_RECENT_ATTEMPTS = - T.let( - :TOO_MANY_RECENT_ATTEMPTS, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol - ) - TOO_MANY_RECENT_TOKENS = - T.let( - :TOO_MANY_RECENT_TOKENS, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol - ) - TOO_MANY_DIFFERENT_CARDHOLDERS = - T.let( - :TOO_MANY_DIFFERENT_CARDHOLDERS, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol - ) - OUTSIDE_HOME_TERRITORY = - T.let( - :OUTSIDE_HOME_TERRITORY, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol - ) - HAS_SUSPENDED_TOKENS = - T.let( - :HAS_SUSPENDED_TOKENS, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol - ) - HIGH_RISK = - T.let( - :HIGH_RISK, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol - ) - ACCOUNT_SCORE_LOW = - T.let( - :ACCOUNT_SCORE_LOW, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol - ) - DEVICE_SCORE_LOW = - T.let( - :DEVICE_SCORE_LOW, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol - ) - CARD_STATE_TFA = - T.let( - :CARD_STATE_TFA, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol - ) - HARDCODED_TFA = - T.let( - :HARDCODED_TFA, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol - ) - CUSTOMER_RULE_TFA = - T.let( - :CUSTOMER_RULE_TFA, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol - ) - DEVICE_HOST_CARD_EMULATION = - T.let( - :DEVICE_HOST_CARD_EMULATION, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::Reason::TaggedSymbol - ] - ) - end - def self.values - end - end - end - - class ApproveAction < Lithic::Internal::Type::BaseModel - OrHash = + TaggedSymbol = T.type_alias do - T.any( - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction, - Lithic::Internal::AnyHash + T.all( + Symbol, + Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Mode ) end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # Approve the ACH transaction - sig do - returns( - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::Type::TaggedSymbol + ACTIVE = + T.let( + :ACTIVE, + Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Mode::TaggedSymbol + ) + INACTIVE = + T.let( + :INACTIVE, + Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Mode::TaggedSymbol ) - end - attr_accessor :type sig do - params( - type: - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::Type::OrSymbol - ).returns(T.attached_class) + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Mode::TaggedSymbol + ] + ) end - def self.new( - # Approve the ACH transaction - type: - ) + def self.values end + end + end - sig do - override.returns( - { - type: - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::Type::TaggedSymbol - } + class TokenizationResult < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult, + Lithic::Internal::AnyHash ) end - def to_hash - end - # Approve the ACH transaction - module Type - extend Lithic::Internal::Type::Enum + # Globally unique identifier for the evaluation + sig { returns(String) } + attr_accessor :token - TaggedSymbol = + # Actions returned by the rule evaluation + sig do + returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::Variants + ] + ) + end + attr_accessor :actions + + # The Auth Rule token + sig { returns(String) } + attr_accessor :auth_rule_token + + # Timestamp of the rule evaluation + sig { returns(Time) } + attr_accessor :evaluation_time + + # The event stream during which the rule was evaluated + sig { returns(Symbol) } + attr_accessor :event_stream + + # Token of the event that triggered the evaluation + sig { returns(String) } + attr_accessor :event_token + + # The state of the Auth Rule + sig do + returns( + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Mode::TaggedSymbol + ) + end + attr_accessor :mode + + # Version of the rule that was evaluated + sig { returns(Integer) } + attr_accessor :rule_version + + sig do + params( + token: String, + actions: + T::Array[ + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::OrHash, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::OrHash + ) + ], + auth_rule_token: String, + evaluation_time: Time, + event_token: String, + mode: + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Mode::OrSymbol, + rule_version: Integer, + event_stream: Symbol + ).returns(T.attached_class) + end + def self.new( + # Globally unique identifier for the evaluation + token:, + # Actions returned by the rule evaluation + actions:, + # The Auth Rule token + auth_rule_token:, + # Timestamp of the rule evaluation + evaluation_time:, + # Token of the event that triggered the evaluation + event_token:, + # The state of the Auth Rule + mode:, + # Version of the rule that was evaluated + rule_version:, + # The event stream during which the rule was evaluated + event_stream: :TOKENIZATION + ) + end + + sig do + override.returns( + { + token: String, + actions: + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::Variants + ], + auth_rule_token: String, + evaluation_time: Time, + event_stream: Symbol, + event_token: String, + mode: + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Mode::TaggedSymbol, + rule_version: Integer + } + ) + end + def to_hash + end + + module Action + extend Lithic::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction + ) + end + + class DeclineAction < Lithic::Internal::Type::BaseModel + OrHash = T.type_alias do - T.all( - Symbol, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::Type + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction, + Lithic::Internal::AnyHash ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - APPROVE = - T.let( - :APPROVE, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::Type::TaggedSymbol + # Decline the tokenization request + sig do + returns( + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Type::TaggedSymbol ) + end + attr_accessor :type + + # Optional explanation for why this action was taken + sig { returns(T.nilable(String)) } + attr_reader :explanation + + sig { params(explanation: String).void } + attr_writer :explanation + # Reason code for declining the tokenization request sig do - override.returns( - T::Array[ - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::Type::TaggedSymbol - ] + returns( + T.nilable( + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Reason::TaggedSymbol + ) ) end - def self.values + attr_reader :reason + + sig do + params( + reason: + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Reason::OrSymbol + ).void end - end - end + attr_writer :reason - class ReturnAction < Lithic::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction, - Lithic::Internal::AnyHash + sig do + params( + type: + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Type::OrSymbol, + explanation: String, + reason: + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Reason::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # Decline the tokenization request + type:, + # Optional explanation for why this action was taken + explanation: nil, + # Reason code for declining the tokenization request + reason: nil + ) + end + + sig do + override.returns( + { + type: + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Type::TaggedSymbol, + explanation: String, + reason: + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Reason::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 - sig do - returns( - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - end - attr_accessor :code + # Decline the tokenization request + module Type + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + DECLINE = + T.let( + :DECLINE, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Type::TaggedSymbol + ) - # Return the ACH transaction - sig do - returns( - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Type::TaggedSymbol - ) - end - attr_accessor :type + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Type::TaggedSymbol + ] + ) + end + def self.values + end + end - sig do - params( - code: - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::OrSymbol, - type: - Lithic::Models::AuthRules::V2ListResultsResponse::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 + # 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::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Reason + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACCOUNT_SCORE_1 = + T.let( + :ACCOUNT_SCORE_1, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Reason::TaggedSymbol + ) + DEVICE_SCORE_1 = + T.let( + :DEVICE_SCORE_1, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Reason::TaggedSymbol + ) + ALL_WALLET_DECLINE_REASONS_PRESENT = + T.let( + :ALL_WALLET_DECLINE_REASONS_PRESENT, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Reason::TaggedSymbol + ) + WALLET_RECOMMENDED_DECISION_RED = + T.let( + :WALLET_RECOMMENDED_DECISION_RED, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Reason::TaggedSymbol + ) + CVC_MISMATCH = + T.let( + :CVC_MISMATCH, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Reason::TaggedSymbol + ) + CARD_EXPIRY_MONTH_MISMATCH = + T.let( + :CARD_EXPIRY_MONTH_MISMATCH, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Reason::TaggedSymbol + ) + CARD_EXPIRY_YEAR_MISMATCH = + T.let( + :CARD_EXPIRY_YEAR_MISMATCH, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Reason::TaggedSymbol + ) + CARD_INVALID_STATE = + T.let( + :CARD_INVALID_STATE, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Reason::TaggedSymbol + ) + CUSTOMER_RED_PATH = + T.let( + :CUSTOMER_RED_PATH, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Reason::TaggedSymbol + ) + INVALID_CUSTOMER_RESPONSE = + T.let( + :INVALID_CUSTOMER_RESPONSE, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Reason::TaggedSymbol + ) + NETWORK_FAILURE = + T.let( + :NETWORK_FAILURE, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Reason::TaggedSymbol + ) + GENERIC_DECLINE = + T.let( + :GENERIC_DECLINE, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Reason::TaggedSymbol + ) + DIGITAL_CARD_ART_REQUIRED = + T.let( + :DIGITAL_CARD_ART_REQUIRED, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Reason::TaggedSymbol + ) - sig do - override.returns( - { - code: - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol, - type: - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Type::TaggedSymbol - } - ) - end - def to_hash + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::Reason::TaggedSymbol + ] + ) + end + def self.values + end + end 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 = + class RequireTfaAction < Lithic::Internal::Type::BaseModel + OrHash = T.type_alias do - T.all( - Symbol, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction, + Lithic::Internal::AnyHash ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - R01 = - T.let( - :R01, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R02 = - T.let( - :R02, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R03 = - T.let( - :R03, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R04 = - T.let( - :R04, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R05 = - T.let( - :R05, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + # Require two-factor authentication for the tokenization request + sig do + returns( + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Type::TaggedSymbol ) - R06 = - T.let( - :R06, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + end + attr_accessor :type + + # Optional explanation for why this action was taken + sig { returns(T.nilable(String)) } + attr_reader :explanation + + sig { params(explanation: String).void } + attr_writer :explanation + + # Reason code for requiring two-factor authentication + sig do + returns( + T.nilable( + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Reason::TaggedSymbol + ) ) - R07 = - T.let( - :R07, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + end + attr_reader :reason + + sig do + params( + reason: + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Reason::OrSymbol + ).void + end + attr_writer :reason + + sig do + params( + type: + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Type::OrSymbol, + explanation: String, + reason: + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Reason::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # Require two-factor authentication for the tokenization request + type:, + # Optional explanation for why this action was taken + explanation: nil, + # Reason code for requiring two-factor authentication + reason: nil + ) + end + + sig do + override.returns( + { + type: + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Type::TaggedSymbol, + explanation: String, + reason: + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Reason::TaggedSymbol + } ) - R08 = - T.let( - :R08, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R09 = - T.let( - :R09, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R10 = - T.let( - :R10, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R11 = - T.let( - :R11, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R12 = - T.let( - :R12, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R13 = - T.let( - :R13, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R14 = - T.let( - :R14, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R15 = - T.let( - :R15, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R16 = - T.let( - :R16, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R17 = - T.let( - :R17, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R18 = - T.let( - :R18, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R19 = - T.let( - :R19, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R20 = - T.let( - :R20, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R21 = - T.let( - :R21, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R22 = - T.let( - :R22, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R23 = - T.let( - :R23, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R24 = - T.let( - :R24, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R25 = - T.let( - :R25, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R26 = - T.let( - :R26, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R27 = - T.let( - :R27, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R28 = - T.let( - :R28, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R29 = - T.let( - :R29, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R30 = - T.let( - :R30, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R31 = - T.let( - :R31, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R32 = - T.let( - :R32, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R33 = - T.let( - :R33, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R34 = - T.let( - :R34, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R35 = - T.let( - :R35, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R36 = - T.let( - :R36, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R37 = - T.let( - :R37, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R38 = - T.let( - :R38, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R39 = - T.let( - :R39, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R40 = - T.let( - :R40, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R41 = - T.let( - :R41, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R42 = - T.let( - :R42, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R43 = - T.let( - :R43, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R44 = - T.let( - :R44, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R45 = - T.let( - :R45, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R46 = - T.let( - :R46, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R47 = - T.let( - :R47, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R50 = - T.let( - :R50, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R51 = - T.let( - :R51, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R52 = - T.let( - :R52, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R53 = - T.let( - :R53, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R61 = - T.let( - :R61, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R62 = - T.let( - :R62, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R67 = - T.let( - :R67, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R68 = - T.let( - :R68, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R69 = - T.let( - :R69, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R70 = - T.let( - :R70, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R71 = - T.let( - :R71, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R72 = - T.let( - :R72, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R73 = - T.let( - :R73, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R74 = - T.let( - :R74, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R75 = - T.let( - :R75, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R76 = - T.let( - :R76, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R77 = - T.let( - :R77, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R80 = - T.let( - :R80, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R81 = - T.let( - :R81, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R82 = - T.let( - :R82, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ) - R83 = - T.let( - :R83, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::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::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + REQUIRE_TFA = + T.let( + :REQUIRE_TFA, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::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::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Reason + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + WALLET_RECOMMENDED_TFA = + T.let( + :WALLET_RECOMMENDED_TFA, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Reason::TaggedSymbol + ) + SUSPICIOUS_ACTIVITY = + T.let( + :SUSPICIOUS_ACTIVITY, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Reason::TaggedSymbol + ) + DEVICE_RECENTLY_LOST = + T.let( + :DEVICE_RECENTLY_LOST, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Reason::TaggedSymbol + ) + TOO_MANY_RECENT_ATTEMPTS = + T.let( + :TOO_MANY_RECENT_ATTEMPTS, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Reason::TaggedSymbol + ) + TOO_MANY_RECENT_TOKENS = + T.let( + :TOO_MANY_RECENT_TOKENS, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Reason::TaggedSymbol + ) + TOO_MANY_DIFFERENT_CARDHOLDERS = + T.let( + :TOO_MANY_DIFFERENT_CARDHOLDERS, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Reason::TaggedSymbol + ) + OUTSIDE_HOME_TERRITORY = + T.let( + :OUTSIDE_HOME_TERRITORY, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Reason::TaggedSymbol + ) + HAS_SUSPENDED_TOKENS = + T.let( + :HAS_SUSPENDED_TOKENS, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Reason::TaggedSymbol + ) + HIGH_RISK = + T.let( + :HIGH_RISK, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Reason::TaggedSymbol + ) + ACCOUNT_SCORE_LOW = + T.let( + :ACCOUNT_SCORE_LOW, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Reason::TaggedSymbol + ) + DEVICE_SCORE_LOW = + T.let( + :DEVICE_SCORE_LOW, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Reason::TaggedSymbol + ) + CARD_STATE_TFA = + T.let( + :CARD_STATE_TFA, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Reason::TaggedSymbol + ) + HARDCODED_TFA = + T.let( + :HARDCODED_TFA, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Reason::TaggedSymbol + ) + CUSTOMER_RULE_TFA = + T.let( + :CUSTOMER_RULE_TFA, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Reason::TaggedSymbol + ) + DEVICE_HOST_CARD_EMULATION = + T.let( + :DEVICE_HOST_CARD_EMULATION, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Reason::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::Reason::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::Variants + ] + ) + end + def self.variants + end + end + + # The state of the Auth Rule + module Mode + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Mode ) - R84 = - T.let( - :R84, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :ACTIVE, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Mode::TaggedSymbol + ) + INACTIVE = + T.let( + :INACTIVE, + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Mode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Mode::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class ACHResult < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult, + Lithic::Internal::AnyHash + ) + end + + # Globally unique identifier for the evaluation + sig { returns(String) } + attr_accessor :token + + # Actions returned by the rule evaluation + sig do + returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::Variants + ] + ) + end + attr_accessor :actions + + # The Auth Rule token + sig { returns(String) } + attr_accessor :auth_rule_token + + # Timestamp of the rule evaluation + sig { returns(Time) } + attr_accessor :evaluation_time + + # The event stream during which the rule was evaluated + sig do + returns( + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::EventStream::TaggedSymbol + ) + end + attr_accessor :event_stream + + # Token of the event that triggered the evaluation + sig { returns(String) } + attr_accessor :event_token + + # The state of the Auth Rule + sig do + returns( + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Mode::TaggedSymbol + ) + end + attr_accessor :mode + + # Version of the rule that was evaluated + sig { returns(Integer) } + attr_accessor :rule_version + + sig do + params( + token: String, + actions: + T::Array[ + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction::OrHash, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::OrHash + ) + ], + auth_rule_token: String, + evaluation_time: Time, + event_stream: + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::EventStream::OrSymbol, + event_token: String, + mode: + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Mode::OrSymbol, + rule_version: Integer + ).returns(T.attached_class) + end + def self.new( + # Globally unique identifier for the evaluation + token:, + # Actions returned by the rule evaluation + actions:, + # The Auth Rule token + auth_rule_token:, + # Timestamp of the rule evaluation + evaluation_time:, + # The event stream during which the rule was evaluated + event_stream:, + # Token of the event that triggered the evaluation + event_token:, + # The state of the Auth Rule + mode:, + # Version of the rule that was evaluated + rule_version: + ) + end + + sig do + override.returns( + { + token: String, + actions: + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::Variants + ], + auth_rule_token: String, + evaluation_time: Time, + event_stream: + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::EventStream::TaggedSymbol, + event_token: String, + mode: + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Mode::TaggedSymbol, + rule_version: Integer + } + ) + end + def to_hash + end + + module Action + extend Lithic::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction ) - R85 = - T.let( - :R85, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol + end + + class ApproveAction < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction, + Lithic::Internal::AnyHash + ) + end + + # Approve the ACH transaction + sig do + returns( + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction::Type::TaggedSymbol ) + end + attr_accessor :type + + # Optional explanation for why this action was taken + sig { returns(T.nilable(String)) } + attr_reader :explanation + + sig { params(explanation: String).void } + attr_writer :explanation + + sig do + params( + type: + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction::Type::OrSymbol, + explanation: String + ).returns(T.attached_class) + end + def self.new( + # Approve the ACH transaction + type:, + # Optional explanation for why this action was taken + explanation: nil + ) + end sig do override.returns( - T::Array[ - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Code::TaggedSymbol - ] + { + type: + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction::Type::TaggedSymbol, + explanation: String + } ) end - def self.values + def to_hash end - end - # Return the ACH transaction - module Type - extend Lithic::Internal::Type::Enum + # Approve the ACH transaction + module Type + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + APPROVE = + T.let( + :APPROVE, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction::Type::TaggedSymbol + ) - TaggedSymbol = + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class ReturnAction < Lithic::Internal::Type::BaseModel + OrHash = T.type_alias do - T.all( - Symbol, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Type + T.any( + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction, + Lithic::Internal::AnyHash ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - RETURN = - T.let( - :RETURN, - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Type::TaggedSymbol + # 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::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + end + attr_accessor :code + + # Return the ACH transaction + sig do + returns( + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Type::TaggedSymbol ) + end + attr_accessor :type + + # Optional explanation for why this action was taken + sig { returns(T.nilable(String)) } + attr_reader :explanation + + sig { params(explanation: String).void } + attr_writer :explanation + + sig do + params( + code: + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::OrSymbol, + type: + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Type::OrSymbol, + explanation: String + ).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:, + # Optional explanation for why this action was taken + explanation: nil + ) + end sig do override.returns( - T::Array[ - Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::Type::TaggedSymbol - ] + { + code: + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol, + type: + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Type::TaggedSymbol, + explanation: String + } ) end - def self.values + 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::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + R01 = + T.let( + :R01, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R02 = + T.let( + :R02, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R03 = + T.let( + :R03, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R04 = + T.let( + :R04, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R05 = + T.let( + :R05, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R06 = + T.let( + :R06, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R07 = + T.let( + :R07, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R08 = + T.let( + :R08, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R09 = + T.let( + :R09, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R10 = + T.let( + :R10, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R11 = + T.let( + :R11, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R12 = + T.let( + :R12, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R13 = + T.let( + :R13, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R14 = + T.let( + :R14, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R15 = + T.let( + :R15, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R16 = + T.let( + :R16, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R17 = + T.let( + :R17, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R18 = + T.let( + :R18, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R19 = + T.let( + :R19, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R20 = + T.let( + :R20, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R21 = + T.let( + :R21, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R22 = + T.let( + :R22, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R23 = + T.let( + :R23, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R24 = + T.let( + :R24, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R25 = + T.let( + :R25, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R26 = + T.let( + :R26, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R27 = + T.let( + :R27, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R28 = + T.let( + :R28, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R29 = + T.let( + :R29, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R30 = + T.let( + :R30, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R31 = + T.let( + :R31, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R32 = + T.let( + :R32, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R33 = + T.let( + :R33, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R34 = + T.let( + :R34, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R35 = + T.let( + :R35, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R36 = + T.let( + :R36, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R37 = + T.let( + :R37, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R38 = + T.let( + :R38, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R39 = + T.let( + :R39, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R40 = + T.let( + :R40, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R41 = + T.let( + :R41, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R42 = + T.let( + :R42, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R43 = + T.let( + :R43, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R44 = + T.let( + :R44, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R45 = + T.let( + :R45, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R46 = + T.let( + :R46, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R47 = + T.let( + :R47, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R50 = + T.let( + :R50, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R51 = + T.let( + :R51, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R52 = + T.let( + :R52, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R53 = + T.let( + :R53, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R61 = + T.let( + :R61, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R62 = + T.let( + :R62, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R67 = + T.let( + :R67, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R68 = + T.let( + :R68, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R69 = + T.let( + :R69, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R70 = + T.let( + :R70, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R71 = + T.let( + :R71, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R72 = + T.let( + :R72, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R73 = + T.let( + :R73, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R74 = + T.let( + :R74, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R75 = + T.let( + :R75, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R76 = + T.let( + :R76, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R77 = + T.let( + :R77, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R80 = + T.let( + :R80, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R81 = + T.let( + :R81, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R82 = + T.let( + :R82, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R83 = + T.let( + :R83, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R84 = + T.let( + :R84, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + R85 = + T.let( + :R85, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Code::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::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::V2ListResultsResponse::ACHResult::Action::ReturnAction::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + RETURN = + T.let( + :RETURN, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::Type::TaggedSymbol + ] + ) + end + def self.values + end end end - end - sig do - override.returns( - T::Array[ - Lithic::Models::AuthRules::V2ListResultsResponse::Action::Variants - ] - ) - end - def self.variants + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::Variants + ] + ) + end + def self.variants + end end - end - # The state of the Auth Rule - module Mode - extend Lithic::Internal::Type::Enum + # The event stream during which the rule was evaluated + module EventStream + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::EventStream + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Lithic::Models::AuthRules::V2ListResultsResponse::Mode + ACH_CREDIT_RECEIPT = + T.let( + :ACH_CREDIT_RECEIPT, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::EventStream::TaggedSymbol + ) + ACH_DEBIT_RECEIPT = + T.let( + :ACH_DEBIT_RECEIPT, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::EventStream::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::EventStream::TaggedSymbol + ] ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } + def self.values + end + end - ACTIVE = - T.let( - :ACTIVE, - Lithic::Models::AuthRules::V2ListResultsResponse::Mode::TaggedSymbol - ) - INACTIVE = - T.let( - :INACTIVE, - Lithic::Models::AuthRules::V2ListResultsResponse::Mode::TaggedSymbol - ) + # The state of the Auth Rule + module Mode + extend Lithic::Internal::Type::Enum - sig do - override.returns( - T::Array[ - Lithic::Models::AuthRules::V2ListResultsResponse::Mode::TaggedSymbol - ] - ) - end - def self.values + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Mode + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :ACTIVE, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Mode::TaggedSymbol + ) + INACTIVE = + T.let( + :INACTIVE, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Mode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Mode::TaggedSymbol + ] + ) + end + def self.values + end end end + + sig do + override.returns( + T::Array[Lithic::Models::AuthRules::V2ListResultsResponse::Variants] + ) + end + def self.variants + end end end end diff --git a/rbi/lithic/resources/auth_rules/v2.rbi b/rbi/lithic/resources/auth_rules/v2.rbi index cb2b94ee..47e222a0 100644 --- a/rbi/lithic/resources/auth_rules/v2.rbi +++ b/rbi/lithic/resources/auth_rules/v2.rbi @@ -216,7 +216,7 @@ module Lithic request_options: Lithic::RequestOptions::OrHash ).returns( Lithic::Internal::CursorPage[ - Lithic::Models::AuthRules::V2ListResultsResponse + Lithic::Models::AuthRules::V2ListResultsResponse::Variants ] ) end diff --git a/sig/lithic/models/auth_rules/v2_list_results_response.rbs b/sig/lithic/models/auth_rules/v2_list_results_response.rbs index 0b1994ff..396958e5 100644 --- a/sig/lithic/models/auth_rules/v2_list_results_response.rbs +++ b/sig/lithic/models/auth_rules/v2_list_results_response.rbs @@ -2,458 +2,750 @@ module Lithic module Models module AuthRules type v2_list_results_response = - { - token: String, - actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::action], - auth_rule_token: String, - evaluation_time: Time, - event_stream: Lithic::Models::AuthRules::event_stream, - event_token: String, - mode: Lithic::Models::AuthRules::V2ListResultsResponse::mode, - rule_version: Integer - } - - class V2ListResultsResponse < Lithic::Internal::Type::BaseModel - attr_accessor token: String - - attr_accessor actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::action] - - attr_accessor auth_rule_token: String - - attr_accessor evaluation_time: Time - - attr_accessor event_stream: Lithic::Models::AuthRules::event_stream - - attr_accessor event_token: String - - attr_accessor mode: Lithic::Models::AuthRules::V2ListResultsResponse::mode - - attr_accessor rule_version: Integer - - def initialize: ( - token: String, - actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::action], - auth_rule_token: String, - evaluation_time: Time, - event_stream: Lithic::Models::AuthRules::event_stream, - event_token: String, - mode: Lithic::Models::AuthRules::V2ListResultsResponse::mode, - rule_version: Integer - ) -> void - - def to_hash: -> { - token: String, - actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::action], - auth_rule_token: String, - evaluation_time: Time, - event_stream: Lithic::Models::AuthRules::event_stream, - event_token: String, - mode: Lithic::Models::AuthRules::V2ListResultsResponse::mode, - rule_version: Integer - } - - type action = - Lithic::Models::AuthRules::V2ListResultsResponse::Action::AuthorizationAction - | Lithic::Models::AuthRules::V2ListResultsResponse::Action::Authentication3DSAction - | Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction - | Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction - | Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction - | Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction - - module Action - extend Lithic::Internal::Type::Union - - type authorization_action = { explanation: String } - - class AuthorizationAction < Lithic::Internal::Type::BaseModel + Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult + | Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult + | Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult + | Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult + + module V2ListResultsResponse + extend Lithic::Internal::Type::Union + + type authorization_result = + { + token: String, + actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action], + auth_rule_token: String, + evaluation_time: Time, + event_stream: :AUTHORIZATION, + event_token: String, + mode: Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::mode, + rule_version: Integer + } + + class AuthorizationResult < Lithic::Internal::Type::BaseModel + attr_accessor token: String + + attr_accessor actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action] + + attr_accessor auth_rule_token: String + + attr_accessor evaluation_time: Time + + attr_accessor event_stream: :AUTHORIZATION + + attr_accessor event_token: String + + attr_accessor mode: Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::mode + + attr_accessor rule_version: Integer + + def initialize: ( + token: String, + actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action], + auth_rule_token: String, + evaluation_time: Time, + event_token: String, + mode: Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::mode, + rule_version: Integer, + ?event_stream: :AUTHORIZATION + ) -> void + + def to_hash: -> { + token: String, + actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action], + auth_rule_token: String, + evaluation_time: Time, + event_stream: :AUTHORIZATION, + event_token: String, + mode: Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::mode, + rule_version: Integer + } + + type action = + { + type: Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action::type_, + explanation: String + } + + class Action < Lithic::Internal::Type::BaseModel + attr_accessor type: Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action::type_ + attr_reader explanation: String? def explanation=: (String) -> String - def initialize: (?explanation: String) -> void + def initialize: ( + type: Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action::type_, + ?explanation: String + ) -> void - def to_hash: -> { explanation: String } - end + def to_hash: -> { + type: Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action::type_, + explanation: String + } - type authentication3_ds_action = { explanation: String } + type type_ = :DECLINE | :CHALLENGE - class Authentication3DSAction < Lithic::Internal::Type::BaseModel - attr_reader explanation: String? + module Type + extend Lithic::Internal::Type::Enum - def explanation=: (String) -> String + DECLINE: :DECLINE + CHALLENGE: :CHALLENGE + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action::type_] + end + end + + type mode = :ACTIVE | :INACTIVE + + module Mode + extend Lithic::Internal::Type::Enum - def initialize: (?explanation: String) -> void + ACTIVE: :ACTIVE + INACTIVE: :INACTIVE - def to_hash: -> { explanation: String } + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::mode] end + end - type decline_action = + type authentication3_ds_result = + { + token: String, + actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action], + auth_rule_token: String, + evaluation_time: Time, + event_stream: :THREE_DS_AUTHENTICATION, + event_token: String, + mode: Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::mode, + rule_version: Integer + } + + class Authentication3DSResult < Lithic::Internal::Type::BaseModel + attr_accessor token: String + + attr_accessor actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action] + + attr_accessor auth_rule_token: String + + attr_accessor evaluation_time: Time + + attr_accessor event_stream: :THREE_DS_AUTHENTICATION + + attr_accessor event_token: String + + attr_accessor mode: Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::mode + + attr_accessor rule_version: Integer + + def initialize: ( + token: String, + actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action], + auth_rule_token: String, + evaluation_time: Time, + event_token: String, + mode: Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::mode, + rule_version: Integer, + ?event_stream: :THREE_DS_AUTHENTICATION + ) -> void + + def to_hash: -> { + token: String, + actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action], + auth_rule_token: String, + evaluation_time: Time, + event_stream: :THREE_DS_AUTHENTICATION, + event_token: String, + mode: Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::mode, + rule_version: Integer + } + + type action = { - type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::type_, - reason: Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::reason + type: Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action::type_, + explanation: String } - class DeclineAction < Lithic::Internal::Type::BaseModel - attr_accessor type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::type_ + class Action < Lithic::Internal::Type::BaseModel + attr_accessor type: Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action::type_ - attr_reader reason: Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::reason? + attr_reader explanation: String? - def reason=: ( - Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::reason - ) -> Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::reason + def explanation=: (String) -> String def initialize: ( - type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::type_, - ?reason: Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::reason + type: Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action::type_, + ?explanation: String ) -> void def to_hash: -> { - type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::type_, - reason: Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::reason + type: Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action::type_, + explanation: String } - type type_ = :DECLINE + type type_ = :DECLINE | :CHALLENGE module Type extend Lithic::Internal::Type::Enum DECLINE: :DECLINE + CHALLENGE: :CHALLENGE - def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::Action::DeclineAction::type_] + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action::type_] end + 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 + type mode = :ACTIVE | :INACTIVE - 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::V2ListResultsResponse::Action::DeclineAction::reason] - end + module Mode + extend Lithic::Internal::Type::Enum + + ACTIVE: :ACTIVE + INACTIVE: :INACTIVE + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::mode] end + end - type require_tfa_action = - { - type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::type_, - reason: Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::reason - } + type tokenization_result = + { + token: String, + actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::action], + auth_rule_token: String, + evaluation_time: Time, + event_stream: :TOKENIZATION, + event_token: String, + mode: Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::mode, + rule_version: Integer + } + + class TokenizationResult < Lithic::Internal::Type::BaseModel + attr_accessor token: String + + attr_accessor actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::action] + + attr_accessor auth_rule_token: String + + attr_accessor evaluation_time: Time + + attr_accessor event_stream: :TOKENIZATION + + attr_accessor event_token: String + + attr_accessor mode: Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::mode + + attr_accessor rule_version: Integer + + def initialize: ( + token: String, + actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::action], + auth_rule_token: String, + evaluation_time: Time, + event_token: String, + mode: Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::mode, + rule_version: Integer, + ?event_stream: :TOKENIZATION + ) -> void + + def to_hash: -> { + token: String, + actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::action], + auth_rule_token: String, + evaluation_time: Time, + event_stream: :TOKENIZATION, + event_token: String, + mode: Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::mode, + rule_version: Integer + } + + type action = + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction + | Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction + + module Action + extend Lithic::Internal::Type::Union + + type decline_action = + { + type: Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::type_, + explanation: String, + reason: Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::reason + } + + class DeclineAction < Lithic::Internal::Type::BaseModel + attr_accessor type: Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::type_ + + attr_reader explanation: String? + + def explanation=: (String) -> String + + attr_reader reason: Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::reason? + + def reason=: ( + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::reason + ) -> Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::reason + + def initialize: ( + type: Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::type_, + ?explanation: String, + ?reason: Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::reason + ) -> void + + def to_hash: -> { + type: Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::type_, + explanation: String, + reason: Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::reason + } + + type type_ = :DECLINE + + module Type + extend Lithic::Internal::Type::Enum + + DECLINE: :DECLINE + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::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::V2ListResultsResponse::TokenizationResult::Action::DeclineAction::reason] + end + end - class RequireTfaAction < Lithic::Internal::Type::BaseModel - attr_accessor type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::type_ + type require_tfa_action = + { + type: Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::type_, + explanation: String, + reason: Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::reason + } + + class RequireTfaAction < Lithic::Internal::Type::BaseModel + attr_accessor type: Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::type_ + + attr_reader explanation: String? + + def explanation=: (String) -> String + + attr_reader reason: Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::reason? + + def reason=: ( + Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::reason + ) -> Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::reason + + def initialize: ( + type: Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::type_, + ?explanation: String, + ?reason: Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::reason + ) -> void + + def to_hash: -> { + type: Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::type_, + explanation: String, + reason: Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::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::V2ListResultsResponse::TokenizationResult::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::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction::reason] + end + end - attr_reader reason: Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::reason? + def self?.variants: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::action] + end - def reason=: ( - Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::reason - ) -> Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::reason + type mode = :ACTIVE | :INACTIVE - def initialize: ( - type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::type_, - ?reason: Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::reason - ) -> void + module Mode + extend Lithic::Internal::Type::Enum - def to_hash: -> { - type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::type_, - reason: Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::reason - } + ACTIVE: :ACTIVE + INACTIVE: :INACTIVE - type type_ = :REQUIRE_TFA + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::mode] + end + end - module Type - extend Lithic::Internal::Type::Enum + type ach_result = + { + token: String, + actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::action], + auth_rule_token: String, + evaluation_time: Time, + event_stream: Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::event_stream, + event_token: String, + mode: Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::mode, + rule_version: Integer + } - REQUIRE_TFA: :REQUIRE_TFA + class ACHResult < Lithic::Internal::Type::BaseModel + attr_accessor token: String - def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::Action::RequireTfaAction::type_] - end + attr_accessor actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::action] - 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 + attr_accessor auth_rule_token: String - 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::V2ListResultsResponse::Action::RequireTfaAction::reason] - end - end + attr_accessor evaluation_time: Time - type approve_action = - { - type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::type_ - } + attr_accessor event_stream: Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::event_stream - class ApproveAction < Lithic::Internal::Type::BaseModel - attr_accessor type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::type_ + attr_accessor event_token: String - def initialize: ( - type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::type_ - ) -> void + attr_accessor mode: Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::mode - def to_hash: -> { - type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::type_ - } + attr_accessor rule_version: Integer - type type_ = :APPROVE + def initialize: ( + token: String, + actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::action], + auth_rule_token: String, + evaluation_time: Time, + event_stream: Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::event_stream, + event_token: String, + mode: Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::mode, + rule_version: Integer + ) -> void - module Type - extend Lithic::Internal::Type::Enum + def to_hash: -> { + token: String, + actions: ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::action], + auth_rule_token: String, + evaluation_time: Time, + event_stream: Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::event_stream, + event_token: String, + mode: Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::mode, + rule_version: Integer + } - APPROVE: :APPROVE + type action = + Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction + | Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction - def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::Action::ApproveAction::type_] - end - end + module Action + extend Lithic::Internal::Type::Union - type return_action = - { - code: Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::code, - type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::type_ - } + type approve_action = + { + type: Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction::type_, + explanation: String + } - class ReturnAction < Lithic::Internal::Type::BaseModel - attr_accessor code: Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::code + class ApproveAction < Lithic::Internal::Type::BaseModel + attr_accessor type: Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction::type_ - attr_accessor type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::type_ + attr_reader explanation: String? - def initialize: ( - code: Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::code, - type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::type_ - ) -> void + def explanation=: (String) -> String - def to_hash: -> { - code: Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::code, - type: Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::type_ - } + def initialize: ( + type: Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction::type_, + ?explanation: String + ) -> void - 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 + def to_hash: -> { + type: Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction::type_, + explanation: String + } - 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::V2ListResultsResponse::Action::ReturnAction::code] - end + type type_ = :APPROVE - type type_ = :RETURN + module Type + extend Lithic::Internal::Type::Enum - module Type - extend Lithic::Internal::Type::Enum + APPROVE: :APPROVE - RETURN: :RETURN + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveAction::type_] + end + end - def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::Action::ReturnAction::type_] + type return_action = + { + code: Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::code, + type: Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::type_, + explanation: String + } + + class ReturnAction < Lithic::Internal::Type::BaseModel + attr_accessor code: Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::code + + attr_accessor type: Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::type_ + + attr_reader explanation: String? + + def explanation=: (String) -> String + + def initialize: ( + code: Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::code, + type: Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::type_, + ?explanation: String + ) -> void + + def to_hash: -> { + code: Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::code, + type: Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::type_, + explanation: String + } + + 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::V2ListResultsResponse::ACHResult::Action::ReturnAction::code] + end + + type type_ = :RETURN + + module Type + extend Lithic::Internal::Type::Enum + + RETURN: :RETURN + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction::type_] + end end + + def self?.variants: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::action] end - def self?.variants: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::action] - end + type event_stream = :ACH_CREDIT_RECEIPT | :ACH_DEBIT_RECEIPT - type mode = :ACTIVE | :INACTIVE + module EventStream + extend Lithic::Internal::Type::Enum - module Mode - extend Lithic::Internal::Type::Enum + ACH_CREDIT_RECEIPT: :ACH_CREDIT_RECEIPT + ACH_DEBIT_RECEIPT: :ACH_DEBIT_RECEIPT + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::event_stream] + end - ACTIVE: :ACTIVE - INACTIVE: :INACTIVE + type mode = :ACTIVE | :INACTIVE - def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::mode] + module Mode + extend Lithic::Internal::Type::Enum + + ACTIVE: :ACTIVE + INACTIVE: :INACTIVE + + def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::mode] + end end + + def self?.variants: -> ::Array[Lithic::Models::AuthRules::v2_list_results_response] end end end diff --git a/sig/lithic/resources/auth_rules/v2.rbs b/sig/lithic/resources/auth_rules/v2.rbs index 6228dba8..a4fd3693 100644 --- a/sig/lithic/resources/auth_rules/v2.rbs +++ b/sig/lithic/resources/auth_rules/v2.rbs @@ -66,7 +66,7 @@ module Lithic ?page_size: Integer, ?starting_after: String, ?request_options: Lithic::request_opts - ) -> Lithic::Internal::CursorPage[Lithic::Models::AuthRules::V2ListResultsResponse] + ) -> Lithic::Internal::CursorPage[Lithic::Models::AuthRules::v2_list_results_response] def promote: ( String auth_rule_token, diff --git a/test/lithic/resources/auth_rules/v2_test.rb b/test/lithic/resources/auth_rules/v2_test.rb index b45087ae..2e661d38 100644 --- a/test/lithic/resources/auth_rules/v2_test.rb +++ b/test/lithic/resources/auth_rules/v2_test.rb @@ -168,16 +168,12 @@ def test_list_results end assert_pattern do - row => { - token: String, - actions: ^(Lithic::Internal::Type::ArrayOf[union: Lithic::Models::AuthRules::V2ListResultsResponse::Action]), - auth_rule_token: String, - evaluation_time: Time, - event_stream: Lithic::AuthRules::EventStream, - event_token: String, - mode: Lithic::Models::AuthRules::V2ListResultsResponse::Mode, - rule_version: Integer - } + case row + in Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult + in Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult + in Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult + in Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult + end end end From 100002cdfbae51420fe395670914b57da994cf78 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 11 Feb 2026 08:12:44 +0000 Subject: [PATCH 12/12] release: 0.5.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 29 +++++++++++++++++++++++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/lithic/version.rb | 2 +- 5 files changed, 33 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index da59f99e..2aca35ae 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.4.0" + ".": "0.5.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index a22b615b..120380d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,34 @@ # Changelog +## 0.5.0 (2026-02-11) + +Full Changelog: [v0.4.0...v0.5.0](https://github.com/lithic-com/lithic-ruby/compare/v0.4.0...v0.5.0) + +### Features + +* **api:** Add /v2/auth_rules/results endpoint for listing rule evaluation data ([638e66d](https://github.com/lithic-com/lithic-ruby/commit/638e66d63951f2710eff7865b66b8424ee9df347)) +* **api:** Add naics_code to account holder requests/responses ([76b507b](https://github.com/lithic-com/lithic-ruby/commit/76b507bf26f50ac5be4cd8210e781435a5d8bd0f)) +* **api:** Add result schemas for Authorization and Authentication (3DS) actions ([f669caf](https://github.com/lithic-com/lithic-ruby/commit/f669cafbb5f8d2f84295b576de01c4e41e1b1789)) + + +### Bug Fixes + +* **api:** Update /v2/auth_rules/results endpoint parameter naming and action types ([25e39e6](https://github.com/lithic-com/lithic-ruby/commit/25e39e68e249381a826c6a17811ff69eb882f82d)) +* **client:** always add content-length to post body, even when empty ([dc99413](https://github.com/lithic-com/lithic-ruby/commit/dc994133ff0d96a903dab13326254b2b378c06ae)) +* **client:** loosen json header parsing ([a9a41d9](https://github.com/lithic-com/lithic-ruby/commit/a9a41d9cff9dd7f7a1772c76f9c9aae130b1b90a)) + + +### Chores + +* configure new SDK language ([8192e34](https://github.com/lithic-com/lithic-ruby/commit/8192e34c05ef27263d1e3490092035c9e316c986)) +* **docs:** remove www prefix ([cecdec2](https://github.com/lithic-com/lithic-ruby/commit/cecdec231888818a2ec01dca178d45a741d5326b)) +* Enable stainless MCP in config ([03570d6](https://github.com/lithic-com/lithic-ruby/commit/03570d6a7cde12dc24f4a4237ea4d0042d215817)) + + +### Documentation + +* Fix documentation of tokenization channel and tokenization source for tokenization rules ([5de9576](https://github.com/lithic-com/lithic-ruby/commit/5de957671f0c262e663dd787617921e6ade623e0)) + ## 0.4.0 (2026-01-27) Full Changelog: [v0.3.0...v0.4.0](https://github.com/lithic-com/lithic-ruby/compare/v0.3.0...v0.4.0) diff --git a/Gemfile.lock b/Gemfile.lock index b3ae62c1..5effaf10 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -18,7 +18,7 @@ GIT PATH remote: . specs: - lithic (0.4.0) + lithic (0.5.0) cgi connection_pool diff --git a/README.md b/README.md index 47b56441..1923f494 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.4.0" +gem "lithic", "~> 0.5.0" ``` diff --git a/lib/lithic/version.rb b/lib/lithic/version.rb index 3586eca7..c18bbd02 100644 --- a/lib/lithic/version.rb +++ b/lib/lithic/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Lithic - VERSION = "0.4.0" + VERSION = "0.5.0" end