From a756fca00674ada2fbab9c19cc0225ff271cb584 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 12 May 2026 19:11:27 +0000 Subject: [PATCH 01/14] ci: pin GitHub Actions to commit SHAs Pin all GitHub Actions referenced in generated workflows (both first-party `actions/*` and third-party) to immutable commit SHAs. Updating pinned actions is now a deliberate codegen-side bump rather than implicit on every workflow run. --- .github/workflows/ci.yml | 14 +++++++------- .github/workflows/publish-gem.yml | 4 ++-- .github/workflows/release-doctor.yml | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b587617..bf256a92 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,9 +26,9 @@ jobs: github.repository == 'stainless-sdks/lithic-ruby' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0 with: bundler-cache: false - run: |- @@ -39,7 +39,7 @@ jobs: github.repository == 'stainless-sdks/lithic-ruby' && !startsWith(github.ref, 'refs/heads/stl/') id: github-oidc - uses: actions/github-script@v8 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 with: script: core.setOutput('github_token', await core.getIDToken()); @@ -60,9 +60,9 @@ jobs: if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0 with: bundler-cache: false - run: |- @@ -76,9 +76,9 @@ jobs: runs-on: ${{ github.repository == 'stainless-sdks/lithic-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0 with: bundler-cache: false - run: |- diff --git a/.github/workflows/publish-gem.yml b/.github/workflows/publish-gem.yml index 7322f05b..d1cdb603 100644 --- a/.github/workflows/publish-gem.yml +++ b/.github/workflows/publish-gem.yml @@ -14,9 +14,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0 with: bundler-cache: false - run: |- diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 4f43d314..cf22eae0 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -12,7 +12,7 @@ jobs: if: github.repository == 'lithic-com/lithic-ruby' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Check release environment run: | From d3a58d57130f65c30e56d39ba380cf8fe04e49da Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 May 2026 15:24:52 +0000 Subject: [PATCH 02/14] fix(client): elide content type header on requests without body --- lib/lithic/internal/transport/base_client.rb | 2 ++ test/lithic/client_test.rb | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/lithic/internal/transport/base_client.rb b/lib/lithic/internal/transport/base_client.rb index 7498daa2..9d05c35c 100644 --- a/lib/lithic/internal/transport/base_client.rb +++ b/lib/lithic/internal/transport/base_client.rb @@ -306,6 +306,8 @@ def initialize( Lithic::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact) end + headers.delete("content-type") if body.nil? + url = Lithic::Internal::Util.join_parsed_uri( @base_url_components, {**req, path: path, query: query} diff --git a/test/lithic/client_test.rb b/test/lithic/client_test.rb index 0344dd8f..51439af4 100644 --- a/test/lithic/client_test.rb +++ b/test/lithic/client_test.rb @@ -213,8 +213,8 @@ def test_client_redirect_307 assert_equal(recorded.method, _1.method) assert_equal(recorded.body, _1.body) assert_equal( - recorded.headers.transform_keys(&:downcase).fetch("content-type"), - _1.headers.transform_keys(&:downcase).fetch("content-type") + recorded.headers.transform_keys(&:downcase)["content-type"], + _1.headers.transform_keys(&:downcase)["content-type"] ) end end @@ -301,8 +301,9 @@ def test_default_headers lithic.cards.create(type: :VIRTUAL) assert_requested(:any, /./) do |req| - headers = req.headers.transform_keys(&:downcase).fetch_values("accept", "content-type") - headers.each { refute_empty(_1) } + headers = req.headers.transform_keys(&:downcase) + expected = req.body.nil? ? ["accept"] : %w[accept content-type] + headers.fetch_values(*expected).each { refute_empty(_1) } end end end From c8a51d0231516251e038f074e3fc364222570f57 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 14 May 2026 20:03:35 +0000 Subject: [PATCH 03/14] fix(types): correct value type from Integer to Float in auth rules --- .stats.yml | 4 +- .../models/auth_rules/auth_rule_condition.rb | 4 +- .../conditional_3ds_action_parameters.rb | 14 +- .../conditional_ach_action_parameters.rb | 8 +- ...itional_authorization_action_parameters.rb | 84 +++++++----- ...rd_transaction_update_action_parameters.rb | 30 +++-- ...ditional_tokenization_action_parameters.rb | 12 +- .../models/auth_rules/conditional_value.rb | 5 +- .../conditional_3ds_action_parameters.rbi | 15 ++- .../conditional_ach_action_parameters.rbi | 6 +- ...tional_authorization_action_parameters.rbi | 120 +++++++++++------- ...d_transaction_update_action_parameters.rbi | 39 +++--- ...itional_tokenization_action_parameters.rbi | 12 +- .../models/auth_rules/conditional_value.rbi | 2 +- .../models/auth_rules/conditional_value.rbs | 2 +- 15 files changed, 204 insertions(+), 153 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9a940850..f2e6324d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-00f07b0edcc0c3c5ef79920ced7f58dac2434df5e4c27ff6041783e8228315f9.yml -openapi_spec_hash: 963688b09480159a06865075c94a2577 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-edd62262c633378b046a4c774cb9a824e2f6bf8f6c0cec613d3fb56e96ba1a29.yml +openapi_spec_hash: e90bfadcd60afbaf9e0c9ebaea4e374e config_hash: 265a2b679964f4ad5706de101ad2a942 diff --git a/lib/lithic/models/auth_rules/auth_rule_condition.rb b/lib/lithic/models/auth_rules/auth_rule_condition.rb index 073cf6df..421d9d61 100644 --- a/lib/lithic/models/auth_rules/auth_rule_condition.rb +++ b/lib/lithic/models/auth_rules/auth_rule_condition.rb @@ -68,7 +68,7 @@ class AuthRuleCondition < Lithic::Internal::Type::BaseModel # @!attribute value # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` # - # @return [String, Integer, Array, Time] + # @return [String, Integer, Float, Array, Time] required :value, union: -> { Lithic::AuthRules::ConditionalValue } # @!method initialize(attribute:, operation:, value:) @@ -79,7 +79,7 @@ class AuthRuleCondition < Lithic::Internal::Type::BaseModel # # @param operation [Symbol, Lithic::Models::AuthRules::ConditionalOperation] The operation to apply to the attribute # - # @param value [String, Integer, Array, Time] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` + # @param value [String, Integer, Float, Array, Time] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` end end diff --git a/lib/lithic/models/auth_rules/conditional_3ds_action_parameters.rb b/lib/lithic/models/auth_rules/conditional_3ds_action_parameters.rb index 38a9ede2..273af606 100644 --- a/lib/lithic/models/auth_rules/conditional_3ds_action_parameters.rb +++ b/lib/lithic/models/auth_rules/conditional_3ds_action_parameters.rb @@ -53,9 +53,10 @@ class Condition < Lithic::Internal::Type::BaseModel # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer # fee field in the settlement/cardholder billing currency. This is the amount # the issuer should authorize against unless the issuer is paying the acquirer - # fee on behalf of the cardholder. + # fee on behalf of the cardholder. Use an integer value. # - `RISK_SCORE`: Mastercard only: Assessment by the network of the authentication - # risk level, with a higher value indicating a higher amount of risk. + # risk level, with a higher value indicating a higher amount of risk. Use an + # integer value. # - `MESSAGE_CATEGORY`: The category of the authentication being processed. # - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address # data with the cardholder KYC data if it exists. Valid values are `MATCH`, @@ -73,7 +74,7 @@ class Condition < Lithic::Internal::Type::BaseModel # @!attribute value # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` # - # @return [String, Integer, Array, Time] + # @return [String, Integer, Float, Array, Time] required :value, union: -> { Lithic::AuthRules::ConditionalValue } # @!method initialize(attribute:, operation:, value:) @@ -85,7 +86,7 @@ class Condition < Lithic::Internal::Type::BaseModel # # @param operation [Symbol, Lithic::Models::AuthRules::ConditionalOperation] The operation to apply to the attribute # - # @param value [String, Integer, Array, Time] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` + # @param value [String, Integer, Float, Array, Time] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` # The attribute to target. # @@ -104,9 +105,10 @@ class Condition < Lithic::Internal::Type::BaseModel # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer # fee field in the settlement/cardholder billing currency. This is the amount # the issuer should authorize against unless the issuer is paying the acquirer - # fee on behalf of the cardholder. + # fee on behalf of the cardholder. Use an integer value. # - `RISK_SCORE`: Mastercard only: Assessment by the network of the authentication - # risk level, with a higher value indicating a higher amount of risk. + # risk level, with a higher value indicating a higher amount of risk. Use an + # integer value. # - `MESSAGE_CATEGORY`: The category of the authentication being processed. # - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address # data with the cardholder KYC data if it exists. Valid values are `MATCH`, 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 fdd66cca..1a19e416 100644 --- a/lib/lithic/models/auth_rules/conditional_ach_action_parameters.rb +++ b/lib/lithic/models/auth_rules/conditional_ach_action_parameters.rb @@ -190,7 +190,7 @@ class Condition < Lithic::Internal::Type::BaseModel # ID) of the entity initiating the ACH transaction. # - `TIMESTAMP`: The timestamp of the ACH transaction in ISO 8601 format. # - `TRANSACTION_AMOUNT`: The amount of the ACH transaction in minor units - # (cents). + # (cents). Use an integer value. # - `SEC_CODE`: Standard Entry Class code indicating the type of ACH transaction. # Valid values include PPD (Prearranged Payment and Deposit Entry), CCD # (Corporate Credit or Debit Entry), WEB (Internet-Initiated/Mobile Entry), TEL @@ -209,7 +209,7 @@ class Condition < Lithic::Internal::Type::BaseModel # @!attribute value # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` # - # @return [String, Integer, Array, Time] + # @return [String, Integer, Float, Array, Time] required :value, union: -> { Lithic::AuthRules::ConditionalValue } # @!method initialize(attribute:, operation:, value:) @@ -221,7 +221,7 @@ class Condition < Lithic::Internal::Type::BaseModel # # @param operation [Symbol, Lithic::Models::AuthRules::ConditionalOperation] The operation to apply to the attribute # - # @param value [String, Integer, Array, Time] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` + # @param value [String, Integer, Float, Array, Time] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` # The attribute to target. # @@ -232,7 +232,7 @@ class Condition < Lithic::Internal::Type::BaseModel # ID) of the entity initiating the ACH transaction. # - `TIMESTAMP`: The timestamp of the ACH transaction in ISO 8601 format. # - `TRANSACTION_AMOUNT`: The amount of the ACH transaction in minor units - # (cents). + # (cents). Use an integer value. # - `SEC_CODE`: Standard Entry Class code indicating the type of ACH transaction. # Valid values include PPD (Prearranged Payment and Deposit Entry), CCD # (Corporate Credit or Debit Entry), WEB (Internet-Initiated/Mobile Entry), TEL diff --git a/lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb b/lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb index 4bd6b39c..7ecfac11 100644 --- a/lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb +++ b/lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb @@ -61,26 +61,27 @@ class Condition < Lithic::Internal::Type::BaseModel # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer # fee field in the settlement/cardholder billing currency. This is the amount # the issuer should authorize against unless the issuer is paying the acquirer - # fee on behalf of the cardholder. + # fee on behalf of the cardholder. Use an integer value. # - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This - # represents the amount of cash being withdrawn or advanced. + # represents the amount of cash being withdrawn or advanced. Use an integer + # value. # - `RISK_SCORE`: Network-provided score assessing risk level associated with a # given authorization. Scores are on a range of 0-999, with 0 representing the # lowest risk and 999 representing the highest risk. For Visa transactions, # where the raw score has a range of 0-99, Lithic will normalize the score by - # multiplying the raw score by 10x. + # multiplying the raw score by 10x. Use an integer value. # - `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the - # trailing 15 minutes before the authorization. + # trailing 15 minutes before the authorization. Use an integer value. # - `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the - # trailing hour up and until the authorization. + # trailing hour up and until the authorization. Use an integer value. # - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the - # trailing 24 hours up and until the authorization. + # trailing 24 hours up and until the authorization. Use an integer value. # - `CARD_DECLINE_COUNT_15M`: The number of declined transactions on the card in - # the trailing 15 minutes before the authorization. + # the trailing 15 minutes before the authorization. Use an integer value. # - `CARD_DECLINE_COUNT_1H`: The number of declined transactions on the card in - # the trailing hour up and until the authorization. + # the trailing hour up and until the authorization. Use an integer value. # - `CARD_DECLINE_COUNT_24H`: The number of declined transactions on the card in - # the trailing 24 hours up and until the authorization. + # the trailing 24 hours up and until the authorization. Use an integer value. # - `CARD_STATE`: The current state of the card associated with the transaction. # Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`, # `PENDING_FULFILLMENT`. @@ -105,18 +106,20 @@ class Condition < Lithic::Internal::Type::BaseModel # data, the service location postal code is used. Otherwise, falls back to the # card acceptor postal code. # - `CARD_AGE`: The age of the card in seconds at the time of the authorization. + # Use an integer value. # - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time - # of the authorization. + # of the authorization. Use an integer value. # - `AMOUNT_Z_SCORE`: The z-score of the transaction amount relative to the # entity's transaction history. Null if fewer than 30 approved transactions in # the specified window. Requires `parameters.scope` and `parameters.interval`. + # Use a decimal value. # - `AVG_TRANSACTION_AMOUNT`: The average approved transaction amount for the # entity over the specified window, in cents. Requires `parameters.scope` and - # `parameters.interval`. + # `parameters.interval`. Use a decimal value. # - `STDEV_TRANSACTION_AMOUNT`: The standard deviation of approved transaction # amounts for the entity over the specified window, in cents. Null if fewer than # 30 approved transactions in the specified window. Requires `parameters.scope` - # and `parameters.interval`. + # and `parameters.interval`. Use a decimal value. # - `IS_NEW_COUNTRY`: Whether the transaction's merchant country has not been seen # in the entity's transaction history. Valid values are `TRUE`, `FALSE`. # Requires `parameters.scope`. @@ -127,26 +130,31 @@ class Condition < Lithic::Internal::Type::BaseModel # Valid values are `TRUE`, `FALSE`. Requires `parameters.scope`. # - `CONSECUTIVE_DECLINES`: The number of consecutive declined transactions for # the entity over the last 30 days (rolling). Requires `parameters.scope`. Not - # supported for `BUSINESS_ACCOUNT` scope. + # supported for `BUSINESS_ACCOUNT` scope. Use an integer value. # - `TIME_SINCE_LAST_TRANSACTION`: The number of days since the last approved - # transaction for the entity. Requires `parameters.scope`. + # transaction for the entity, rounded to the nearest whole day. Requires + # `parameters.scope`. Use an integer value. # - `DISTINCT_COUNTRY_COUNT`: The number of distinct merchant countries seen in - # the entity's transaction history. Requires `parameters.scope`. + # the entity's transaction history. Requires `parameters.scope`. Use an integer + # value. # - `IS_NEW_MERCHANT`: Whether the card acceptor ID has not been seen in the # card's approved transaction history (capped at the 1000 most recently seen # merchants). Valid values are `TRUE`, `FALSE`. Card-scoped only; no # `parameters` required. # - `THREE_DS_SUCCESS_RATE`: The 3DS authentication success rate for the card, as # a percentage from 0.0 to 100.0. Card-scoped only; no `parameters` required. + # Use a decimal value. # - `TRAVEL_SPEED`: The estimated speed of travel derived from the distance # between the postal code centers of the last card-present transaction and the # current transaction, divided by the elapsed time. Null if there is no prior # card-present transaction, if either postal code cannot be geocoded, or if - # elapsed time is zero. Requires `parameters.unit` set to `MPH` or `KPH`. + # elapsed time is zero. Requires `parameters.unit` set to `MPH` or `KPH`. Use a + # decimal value. # - `DISTANCE_FROM_LAST_TRANSACTION`: The estimated distance between the postal # code centers of the last card-present transaction and the current transaction. # Null if there is no prior card-present transaction or if either postal code # cannot be geocoded. Requires `parameters.unit` set to `MILES` or `KILOMETERS`. + # Use a decimal value. # # @return [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute] required :attribute, @@ -161,7 +169,7 @@ class Condition < Lithic::Internal::Type::BaseModel # @!attribute value # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` # - # @return [String, Integer, Array, Time] + # @return [String, Integer, Float, Array, Time] required :value, union: -> { Lithic::AuthRules::ConditionalValue } # @!attribute parameters @@ -185,7 +193,7 @@ class Condition < Lithic::Internal::Type::BaseModel # # @param operation [Symbol, Lithic::Models::AuthRules::ConditionalOperation] The operation to apply to the attribute # - # @param value [String, Integer, Array, Time] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` + # @param value [String, Integer, Float, Array, Time] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` # # @param parameters [Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters::Condition::Parameters] Additional parameters for certain attributes. Required when `attribute` is one o @@ -214,26 +222,27 @@ class Condition < Lithic::Internal::Type::BaseModel # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer # fee field in the settlement/cardholder billing currency. This is the amount # the issuer should authorize against unless the issuer is paying the acquirer - # fee on behalf of the cardholder. + # fee on behalf of the cardholder. Use an integer value. # - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This - # represents the amount of cash being withdrawn or advanced. + # represents the amount of cash being withdrawn or advanced. Use an integer + # value. # - `RISK_SCORE`: Network-provided score assessing risk level associated with a # given authorization. Scores are on a range of 0-999, with 0 representing the # lowest risk and 999 representing the highest risk. For Visa transactions, # where the raw score has a range of 0-99, Lithic will normalize the score by - # multiplying the raw score by 10x. + # multiplying the raw score by 10x. Use an integer value. # - `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the - # trailing 15 minutes before the authorization. + # trailing 15 minutes before the authorization. Use an integer value. # - `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the - # trailing hour up and until the authorization. + # trailing hour up and until the authorization. Use an integer value. # - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the - # trailing 24 hours up and until the authorization. + # trailing 24 hours up and until the authorization. Use an integer value. # - `CARD_DECLINE_COUNT_15M`: The number of declined transactions on the card in - # the trailing 15 minutes before the authorization. + # the trailing 15 minutes before the authorization. Use an integer value. # - `CARD_DECLINE_COUNT_1H`: The number of declined transactions on the card in - # the trailing hour up and until the authorization. + # the trailing hour up and until the authorization. Use an integer value. # - `CARD_DECLINE_COUNT_24H`: The number of declined transactions on the card in - # the trailing 24 hours up and until the authorization. + # the trailing 24 hours up and until the authorization. Use an integer value. # - `CARD_STATE`: The current state of the card associated with the transaction. # Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`, # `PENDING_FULFILLMENT`. @@ -258,18 +267,20 @@ class Condition < Lithic::Internal::Type::BaseModel # data, the service location postal code is used. Otherwise, falls back to the # card acceptor postal code. # - `CARD_AGE`: The age of the card in seconds at the time of the authorization. + # Use an integer value. # - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time - # of the authorization. + # of the authorization. Use an integer value. # - `AMOUNT_Z_SCORE`: The z-score of the transaction amount relative to the # entity's transaction history. Null if fewer than 30 approved transactions in # the specified window. Requires `parameters.scope` and `parameters.interval`. + # Use a decimal value. # - `AVG_TRANSACTION_AMOUNT`: The average approved transaction amount for the # entity over the specified window, in cents. Requires `parameters.scope` and - # `parameters.interval`. + # `parameters.interval`. Use a decimal value. # - `STDEV_TRANSACTION_AMOUNT`: The standard deviation of approved transaction # amounts for the entity over the specified window, in cents. Null if fewer than # 30 approved transactions in the specified window. Requires `parameters.scope` - # and `parameters.interval`. + # and `parameters.interval`. Use a decimal value. # - `IS_NEW_COUNTRY`: Whether the transaction's merchant country has not been seen # in the entity's transaction history. Valid values are `TRUE`, `FALSE`. # Requires `parameters.scope`. @@ -280,26 +291,31 @@ class Condition < Lithic::Internal::Type::BaseModel # Valid values are `TRUE`, `FALSE`. Requires `parameters.scope`. # - `CONSECUTIVE_DECLINES`: The number of consecutive declined transactions for # the entity over the last 30 days (rolling). Requires `parameters.scope`. Not - # supported for `BUSINESS_ACCOUNT` scope. + # supported for `BUSINESS_ACCOUNT` scope. Use an integer value. # - `TIME_SINCE_LAST_TRANSACTION`: The number of days since the last approved - # transaction for the entity. Requires `parameters.scope`. + # transaction for the entity, rounded to the nearest whole day. Requires + # `parameters.scope`. Use an integer value. # - `DISTINCT_COUNTRY_COUNT`: The number of distinct merchant countries seen in - # the entity's transaction history. Requires `parameters.scope`. + # the entity's transaction history. Requires `parameters.scope`. Use an integer + # value. # - `IS_NEW_MERCHANT`: Whether the card acceptor ID has not been seen in the # card's approved transaction history (capped at the 1000 most recently seen # merchants). Valid values are `TRUE`, `FALSE`. Card-scoped only; no # `parameters` required. # - `THREE_DS_SUCCESS_RATE`: The 3DS authentication success rate for the card, as # a percentage from 0.0 to 100.0. Card-scoped only; no `parameters` required. + # Use a decimal value. # - `TRAVEL_SPEED`: The estimated speed of travel derived from the distance # between the postal code centers of the last card-present transaction and the # current transaction, divided by the elapsed time. Null if there is no prior # card-present transaction, if either postal code cannot be geocoded, or if - # elapsed time is zero. Requires `parameters.unit` set to `MPH` or `KPH`. + # elapsed time is zero. Requires `parameters.unit` set to `MPH` or `KPH`. Use a + # decimal value. # - `DISTANCE_FROM_LAST_TRANSACTION`: The estimated distance between the postal # code centers of the last card-present transaction and the current transaction. # Null if there is no prior card-present transaction or if either postal code # cannot be geocoded. Requires `parameters.unit` set to `MILES` or `KILOMETERS`. + # Use a decimal value. # # @see Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters::Condition#attribute module Attribute diff --git a/lib/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rb b/lib/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rb index 0aa09379..2015a57d 100644 --- a/lib/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rb +++ b/lib/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rb @@ -40,12 +40,12 @@ class Condition < Lithic::Internal::Type::BaseModel # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer # fee field in the settlement/cardholder billing currency. This is the amount # the issuer should authorize against unless the issuer is paying the acquirer - # fee on behalf of the cardholder. + # fee on behalf of the cardholder. Use an integer value. # - `RISK_SCORE`: Network-provided score assessing risk level associated with a # given authorization. Scores are on a range of 0-999, with 0 representing the # lowest risk and 999 representing the highest risk. For Visa transactions, # where the raw score has a range of 0-99, Lithic will normalize the score by - # multiplying the raw score by 10x. + # multiplying the raw score by 10x. Use an integer value. # - `TRANSACTION_STATUS`: The status of the transaction. Valid values are # `PENDING`, `VOIDED`, `SETTLING`, `SETTLED`, `BOUNCED`, `RETURNED`, `DECLINED`, # `EXPIRED`. @@ -66,15 +66,16 @@ class Condition < Lithic::Internal::Type::BaseModel # - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the # source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`, # `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. - # - `CARD_AGE`: The age of the card in seconds at the time of the transaction. + # - `CARD_AGE`: The age of the card in seconds at the time of the transaction. Use + # an integer value. # - `ACCOUNT_AGE`: The age of the account in seconds at the time of the - # transaction. + # transaction. Use an integer value. # - `SPEND_VELOCITY_COUNT`: The number of transactions matching the specified # filters within the given period. Requires `parameters` with `scope`, `period`, - # and optional `filters`. + # and optional `filters`. Use an integer value. # - `SPEND_VELOCITY_AMOUNT`: The total spend amount (in cents) of transactions # matching the specified filters within the given period. Requires `parameters` - # with `scope`, `period`, and optional `filters`. + # with `scope`, `period`, and optional `filters`. Use an integer value. # # @return [Symbol, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute] required :attribute, @@ -89,7 +90,7 @@ class Condition < Lithic::Internal::Type::BaseModel # @!attribute value # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` # - # @return [String, Integer, Array, Time] + # @return [String, Integer, Float, Array, Time] required :value, union: -> { Lithic::AuthRules::ConditionalValue } # @!attribute parameters @@ -110,7 +111,7 @@ class Condition < Lithic::Internal::Type::BaseModel # # @param operation [Symbol, Lithic::Models::AuthRules::ConditionalOperation] The operation to apply to the attribute # - # @param value [String, Integer, Array, Time] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` + # @param value [String, Integer, Float, Array, Time] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` # # @param parameters [Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters] Additional parameters for spend velocity attributes. Required when `attribute` i @@ -131,12 +132,12 @@ class Condition < Lithic::Internal::Type::BaseModel # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer # fee field in the settlement/cardholder billing currency. This is the amount # the issuer should authorize against unless the issuer is paying the acquirer - # fee on behalf of the cardholder. + # fee on behalf of the cardholder. Use an integer value. # - `RISK_SCORE`: Network-provided score assessing risk level associated with a # given authorization. Scores are on a range of 0-999, with 0 representing the # lowest risk and 999 representing the highest risk. For Visa transactions, # where the raw score has a range of 0-99, Lithic will normalize the score by - # multiplying the raw score by 10x. + # multiplying the raw score by 10x. Use an integer value. # - `TRANSACTION_STATUS`: The status of the transaction. Valid values are # `PENDING`, `VOIDED`, `SETTLING`, `SETTLED`, `BOUNCED`, `RETURNED`, `DECLINED`, # `EXPIRED`. @@ -157,15 +158,16 @@ class Condition < Lithic::Internal::Type::BaseModel # - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the # source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`, # `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. - # - `CARD_AGE`: The age of the card in seconds at the time of the transaction. + # - `CARD_AGE`: The age of the card in seconds at the time of the transaction. Use + # an integer value. # - `ACCOUNT_AGE`: The age of the account in seconds at the time of the - # transaction. + # transaction. Use an integer value. # - `SPEND_VELOCITY_COUNT`: The number of transactions matching the specified # filters within the given period. Requires `parameters` with `scope`, `period`, - # and optional `filters`. + # and optional `filters`. Use an integer value. # - `SPEND_VELOCITY_AMOUNT`: The total spend amount (in cents) of transactions # matching the specified filters within the given period. Requires `parameters` - # with `scope`, `period`, and optional `filters`. + # with `scope`, `period`, and optional `filters`. Use an integer value. # # @see Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition#attribute module Attribute 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 132ebd31..097ce37f 100644 --- a/lib/lithic/models/auth_rules/conditional_tokenization_action_parameters.rb +++ b/lib/lithic/models/auth_rules/conditional_tokenization_action_parameters.rb @@ -170,10 +170,10 @@ class Condition < Lithic::Internal::Type::BaseModel # `SAMSUNG_PAY`, `UNKNOWN`, `VISA_CHECKOUT`. # - `WALLET_ACCOUNT_SCORE`: Risk score for the account in the digital wallet. # Numeric value where lower numbers indicate higher risk (e.g., 1 = high risk, 2 - # = medium risk). + # = medium risk). Use an integer value. # - `WALLET_DEVICE_SCORE`: Risk score for the device in the digital wallet. # Numeric value where lower numbers indicate higher risk (e.g., 1 = high risk, 2 - # = medium risk). + # = medium risk). Use an integer value. # - `WALLET_RECOMMENDED_DECISION`: The decision recommended by the digital wallet # provider. Valid values include APPROVE, DECLINE, # REQUIRE_ADDITIONAL_AUTHENTICATION. @@ -214,7 +214,7 @@ class Condition < Lithic::Internal::Type::BaseModel # @!attribute value # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` # - # @return [String, Integer, Array, Time] + # @return [String, Integer, Float, Array, Time] required :value, union: -> { Lithic::AuthRules::ConditionalValue } # @!method initialize(attribute:, operation:, value:) @@ -226,7 +226,7 @@ class Condition < Lithic::Internal::Type::BaseModel # # @param operation [Symbol, Lithic::Models::AuthRules::ConditionalOperation] The operation to apply to the attribute # - # @param value [String, Integer, Array, Time] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` + # @param value [String, Integer, Float, Array, Time] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` # The attribute to target. # @@ -245,10 +245,10 @@ class Condition < Lithic::Internal::Type::BaseModel # `SAMSUNG_PAY`, `UNKNOWN`, `VISA_CHECKOUT`. # - `WALLET_ACCOUNT_SCORE`: Risk score for the account in the digital wallet. # Numeric value where lower numbers indicate higher risk (e.g., 1 = high risk, 2 - # = medium risk). + # = medium risk). Use an integer value. # - `WALLET_DEVICE_SCORE`: Risk score for the device in the digital wallet. # Numeric value where lower numbers indicate higher risk (e.g., 1 = high risk, 2 - # = medium risk). + # = medium risk). Use an integer value. # - `WALLET_RECOMMENDED_DECISION`: The decision recommended by the digital wallet # provider. Valid values include APPROVE, DECLINE, # REQUIRE_ADDITIONAL_AUTHENTICATION. diff --git a/lib/lithic/models/auth_rules/conditional_value.rb b/lib/lithic/models/auth_rules/conditional_value.rb index 9668a57b..4d590fc5 100644 --- a/lib/lithic/models/auth_rules/conditional_value.rb +++ b/lib/lithic/models/auth_rules/conditional_value.rb @@ -10,9 +10,10 @@ module ConditionalValue # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` variant String - # A number, to be used with `IS_GREATER_THAN`, `IS_GREATER_THAN_OR_EQUAL_TO`, `IS_LESS_THAN`, `IS_LESS_THAN_OR_EQUAL_TO`, `IS_EQUAL_TO`, or `IS_NOT_EQUAL_TO` variant Integer + variant Float + # An array of strings, to be used with `IS_ONE_OF` or `IS_NOT_ONE_OF` variant -> { Lithic::Models::AuthRules::ConditionalValue::StringArray } @@ -20,7 +21,7 @@ module ConditionalValue variant Time # @!method self.variants - # @return [Array(String, Integer, Array, Time)] + # @return [Array(String, Integer, Float, Array, Time)] # @type [Lithic::Internal::Type::Converter] StringArray = Lithic::Internal::Type::ArrayOf[String] diff --git a/rbi/lithic/models/auth_rules/conditional_3ds_action_parameters.rbi b/rbi/lithic/models/auth_rules/conditional_3ds_action_parameters.rbi index 21567e53..77885bde 100644 --- a/rbi/lithic/models/auth_rules/conditional_3ds_action_parameters.rbi +++ b/rbi/lithic/models/auth_rules/conditional_3ds_action_parameters.rbi @@ -122,9 +122,10 @@ module Lithic # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer # fee field in the settlement/cardholder billing currency. This is the amount # the issuer should authorize against unless the issuer is paying the acquirer - # fee on behalf of the cardholder. + # fee on behalf of the cardholder. Use an integer value. # - `RISK_SCORE`: Mastercard only: Assessment by the network of the authentication - # risk level, with a higher value indicating a higher amount of risk. + # risk level, with a higher value indicating a higher amount of risk. Use an + # integer value. # - `MESSAGE_CATEGORY`: The category of the authentication being processed. # - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address # data with the cardholder KYC data if it exists. Valid values are `MATCH`, @@ -170,9 +171,10 @@ module Lithic # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer # fee field in the settlement/cardholder billing currency. This is the amount # the issuer should authorize against unless the issuer is paying the acquirer - # fee on behalf of the cardholder. + # fee on behalf of the cardholder. Use an integer value. # - `RISK_SCORE`: Mastercard only: Assessment by the network of the authentication - # risk level, with a higher value indicating a higher amount of risk. + # risk level, with a higher value indicating a higher amount of risk. Use an + # integer value. # - `MESSAGE_CATEGORY`: The category of the authentication being processed. # - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address # data with the cardholder KYC data if it exists. Valid values are `MATCH`, @@ -215,9 +217,10 @@ module Lithic # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer # fee field in the settlement/cardholder billing currency. This is the amount # the issuer should authorize against unless the issuer is paying the acquirer - # fee on behalf of the cardholder. + # fee on behalf of the cardholder. Use an integer value. # - `RISK_SCORE`: Mastercard only: Assessment by the network of the authentication - # risk level, with a higher value indicating a higher amount of risk. + # risk level, with a higher value indicating a higher amount of risk. Use an + # integer value. # - `MESSAGE_CATEGORY`: The category of the authentication being processed. # - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address # data with the cardholder KYC data if it exists. Valid values are `MATCH`, 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 3b662401..c51ae8b1 100644 --- a/rbi/lithic/models/auth_rules/conditional_ach_action_parameters.rbi +++ b/rbi/lithic/models/auth_rules/conditional_ach_action_parameters.rbi @@ -648,7 +648,7 @@ module Lithic # ID) of the entity initiating the ACH transaction. # - `TIMESTAMP`: The timestamp of the ACH transaction in ISO 8601 format. # - `TRANSACTION_AMOUNT`: The amount of the ACH transaction in minor units - # (cents). + # (cents). Use an integer value. # - `SEC_CODE`: Standard Entry Class code indicating the type of ACH transaction. # Valid values include PPD (Prearranged Payment and Deposit Entry), CCD # (Corporate Credit or Debit Entry), WEB (Internet-Initiated/Mobile Entry), TEL @@ -687,7 +687,7 @@ module Lithic # ID) of the entity initiating the ACH transaction. # - `TIMESTAMP`: The timestamp of the ACH transaction in ISO 8601 format. # - `TRANSACTION_AMOUNT`: The amount of the ACH transaction in minor units - # (cents). + # (cents). Use an integer value. # - `SEC_CODE`: Standard Entry Class code indicating the type of ACH transaction. # Valid values include PPD (Prearranged Payment and Deposit Entry), CCD # (Corporate Credit or Debit Entry), WEB (Internet-Initiated/Mobile Entry), TEL @@ -723,7 +723,7 @@ module Lithic # ID) of the entity initiating the ACH transaction. # - `TIMESTAMP`: The timestamp of the ACH transaction in ISO 8601 format. # - `TRANSACTION_AMOUNT`: The amount of the ACH transaction in minor units - # (cents). + # (cents). Use an integer value. # - `SEC_CODE`: Standard Entry Class code indicating the type of ACH transaction. # Valid values include PPD (Prearranged Payment and Deposit Entry), CCD # (Corporate Credit or Debit Entry), WEB (Internet-Initiated/Mobile Entry), TEL diff --git a/rbi/lithic/models/auth_rules/conditional_authorization_action_parameters.rbi b/rbi/lithic/models/auth_rules/conditional_authorization_action_parameters.rbi index 9475b196..9f1ca566 100644 --- a/rbi/lithic/models/auth_rules/conditional_authorization_action_parameters.rbi +++ b/rbi/lithic/models/auth_rules/conditional_authorization_action_parameters.rbi @@ -130,26 +130,27 @@ module Lithic # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer # fee field in the settlement/cardholder billing currency. This is the amount # the issuer should authorize against unless the issuer is paying the acquirer - # fee on behalf of the cardholder. + # fee on behalf of the cardholder. Use an integer value. # - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This - # represents the amount of cash being withdrawn or advanced. + # represents the amount of cash being withdrawn or advanced. Use an integer + # value. # - `RISK_SCORE`: Network-provided score assessing risk level associated with a # given authorization. Scores are on a range of 0-999, with 0 representing the # lowest risk and 999 representing the highest risk. For Visa transactions, # where the raw score has a range of 0-99, Lithic will normalize the score by - # multiplying the raw score by 10x. + # multiplying the raw score by 10x. Use an integer value. # - `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the - # trailing 15 minutes before the authorization. + # trailing 15 minutes before the authorization. Use an integer value. # - `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the - # trailing hour up and until the authorization. + # trailing hour up and until the authorization. Use an integer value. # - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the - # trailing 24 hours up and until the authorization. + # trailing 24 hours up and until the authorization. Use an integer value. # - `CARD_DECLINE_COUNT_15M`: The number of declined transactions on the card in - # the trailing 15 minutes before the authorization. + # the trailing 15 minutes before the authorization. Use an integer value. # - `CARD_DECLINE_COUNT_1H`: The number of declined transactions on the card in - # the trailing hour up and until the authorization. + # the trailing hour up and until the authorization. Use an integer value. # - `CARD_DECLINE_COUNT_24H`: The number of declined transactions on the card in - # the trailing 24 hours up and until the authorization. + # the trailing 24 hours up and until the authorization. Use an integer value. # - `CARD_STATE`: The current state of the card associated with the transaction. # Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`, # `PENDING_FULFILLMENT`. @@ -174,18 +175,20 @@ module Lithic # data, the service location postal code is used. Otherwise, falls back to the # card acceptor postal code. # - `CARD_AGE`: The age of the card in seconds at the time of the authorization. + # Use an integer value. # - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time - # of the authorization. + # of the authorization. Use an integer value. # - `AMOUNT_Z_SCORE`: The z-score of the transaction amount relative to the # entity's transaction history. Null if fewer than 30 approved transactions in # the specified window. Requires `parameters.scope` and `parameters.interval`. + # Use a decimal value. # - `AVG_TRANSACTION_AMOUNT`: The average approved transaction amount for the # entity over the specified window, in cents. Requires `parameters.scope` and - # `parameters.interval`. + # `parameters.interval`. Use a decimal value. # - `STDEV_TRANSACTION_AMOUNT`: The standard deviation of approved transaction # amounts for the entity over the specified window, in cents. Null if fewer than # 30 approved transactions in the specified window. Requires `parameters.scope` - # and `parameters.interval`. + # and `parameters.interval`. Use a decimal value. # - `IS_NEW_COUNTRY`: Whether the transaction's merchant country has not been seen # in the entity's transaction history. Valid values are `TRUE`, `FALSE`. # Requires `parameters.scope`. @@ -196,26 +199,31 @@ module Lithic # Valid values are `TRUE`, `FALSE`. Requires `parameters.scope`. # - `CONSECUTIVE_DECLINES`: The number of consecutive declined transactions for # the entity over the last 30 days (rolling). Requires `parameters.scope`. Not - # supported for `BUSINESS_ACCOUNT` scope. + # supported for `BUSINESS_ACCOUNT` scope. Use an integer value. # - `TIME_SINCE_LAST_TRANSACTION`: The number of days since the last approved - # transaction for the entity. Requires `parameters.scope`. + # transaction for the entity, rounded to the nearest whole day. Requires + # `parameters.scope`. Use an integer value. # - `DISTINCT_COUNTRY_COUNT`: The number of distinct merchant countries seen in - # the entity's transaction history. Requires `parameters.scope`. + # the entity's transaction history. Requires `parameters.scope`. Use an integer + # value. # - `IS_NEW_MERCHANT`: Whether the card acceptor ID has not been seen in the # card's approved transaction history (capped at the 1000 most recently seen # merchants). Valid values are `TRUE`, `FALSE`. Card-scoped only; no # `parameters` required. # - `THREE_DS_SUCCESS_RATE`: The 3DS authentication success rate for the card, as # a percentage from 0.0 to 100.0. Card-scoped only; no `parameters` required. + # Use a decimal value. # - `TRAVEL_SPEED`: The estimated speed of travel derived from the distance # between the postal code centers of the last card-present transaction and the # current transaction, divided by the elapsed time. Null if there is no prior # card-present transaction, if either postal code cannot be geocoded, or if - # elapsed time is zero. Requires `parameters.unit` set to `MPH` or `KPH`. + # elapsed time is zero. Requires `parameters.unit` set to `MPH` or `KPH`. Use a + # decimal value. # - `DISTANCE_FROM_LAST_TRANSACTION`: The estimated distance between the postal # code centers of the last card-present transaction and the current transaction. # Null if there is no prior card-present transaction or if either postal code # cannot be geocoded. Requires `parameters.unit` set to `MILES` or `KILOMETERS`. + # Use a decimal value. sig do returns( Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::OrSymbol @@ -290,26 +298,27 @@ module Lithic # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer # fee field in the settlement/cardholder billing currency. This is the amount # the issuer should authorize against unless the issuer is paying the acquirer - # fee on behalf of the cardholder. + # fee on behalf of the cardholder. Use an integer value. # - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This - # represents the amount of cash being withdrawn or advanced. + # represents the amount of cash being withdrawn or advanced. Use an integer + # value. # - `RISK_SCORE`: Network-provided score assessing risk level associated with a # given authorization. Scores are on a range of 0-999, with 0 representing the # lowest risk and 999 representing the highest risk. For Visa transactions, # where the raw score has a range of 0-99, Lithic will normalize the score by - # multiplying the raw score by 10x. + # multiplying the raw score by 10x. Use an integer value. # - `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the - # trailing 15 minutes before the authorization. + # trailing 15 minutes before the authorization. Use an integer value. # - `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the - # trailing hour up and until the authorization. + # trailing hour up and until the authorization. Use an integer value. # - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the - # trailing 24 hours up and until the authorization. + # trailing 24 hours up and until the authorization. Use an integer value. # - `CARD_DECLINE_COUNT_15M`: The number of declined transactions on the card in - # the trailing 15 minutes before the authorization. + # the trailing 15 minutes before the authorization. Use an integer value. # - `CARD_DECLINE_COUNT_1H`: The number of declined transactions on the card in - # the trailing hour up and until the authorization. + # the trailing hour up and until the authorization. Use an integer value. # - `CARD_DECLINE_COUNT_24H`: The number of declined transactions on the card in - # the trailing 24 hours up and until the authorization. + # the trailing 24 hours up and until the authorization. Use an integer value. # - `CARD_STATE`: The current state of the card associated with the transaction. # Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`, # `PENDING_FULFILLMENT`. @@ -334,18 +343,20 @@ module Lithic # data, the service location postal code is used. Otherwise, falls back to the # card acceptor postal code. # - `CARD_AGE`: The age of the card in seconds at the time of the authorization. + # Use an integer value. # - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time - # of the authorization. + # of the authorization. Use an integer value. # - `AMOUNT_Z_SCORE`: The z-score of the transaction amount relative to the # entity's transaction history. Null if fewer than 30 approved transactions in # the specified window. Requires `parameters.scope` and `parameters.interval`. + # Use a decimal value. # - `AVG_TRANSACTION_AMOUNT`: The average approved transaction amount for the # entity over the specified window, in cents. Requires `parameters.scope` and - # `parameters.interval`. + # `parameters.interval`. Use a decimal value. # - `STDEV_TRANSACTION_AMOUNT`: The standard deviation of approved transaction # amounts for the entity over the specified window, in cents. Null if fewer than # 30 approved transactions in the specified window. Requires `parameters.scope` - # and `parameters.interval`. + # and `parameters.interval`. Use a decimal value. # - `IS_NEW_COUNTRY`: Whether the transaction's merchant country has not been seen # in the entity's transaction history. Valid values are `TRUE`, `FALSE`. # Requires `parameters.scope`. @@ -356,26 +367,31 @@ module Lithic # Valid values are `TRUE`, `FALSE`. Requires `parameters.scope`. # - `CONSECUTIVE_DECLINES`: The number of consecutive declined transactions for # the entity over the last 30 days (rolling). Requires `parameters.scope`. Not - # supported for `BUSINESS_ACCOUNT` scope. + # supported for `BUSINESS_ACCOUNT` scope. Use an integer value. # - `TIME_SINCE_LAST_TRANSACTION`: The number of days since the last approved - # transaction for the entity. Requires `parameters.scope`. + # transaction for the entity, rounded to the nearest whole day. Requires + # `parameters.scope`. Use an integer value. # - `DISTINCT_COUNTRY_COUNT`: The number of distinct merchant countries seen in - # the entity's transaction history. Requires `parameters.scope`. + # the entity's transaction history. Requires `parameters.scope`. Use an integer + # value. # - `IS_NEW_MERCHANT`: Whether the card acceptor ID has not been seen in the # card's approved transaction history (capped at the 1000 most recently seen # merchants). Valid values are `TRUE`, `FALSE`. Card-scoped only; no # `parameters` required. # - `THREE_DS_SUCCESS_RATE`: The 3DS authentication success rate for the card, as # a percentage from 0.0 to 100.0. Card-scoped only; no `parameters` required. + # Use a decimal value. # - `TRAVEL_SPEED`: The estimated speed of travel derived from the distance # between the postal code centers of the last card-present transaction and the # current transaction, divided by the elapsed time. Null if there is no prior # card-present transaction, if either postal code cannot be geocoded, or if - # elapsed time is zero. Requires `parameters.unit` set to `MPH` or `KPH`. + # elapsed time is zero. Requires `parameters.unit` set to `MPH` or `KPH`. Use a + # decimal value. # - `DISTANCE_FROM_LAST_TRANSACTION`: The estimated distance between the postal # code centers of the last card-present transaction and the current transaction. # Null if there is no prior card-present transaction or if either postal code # cannot be geocoded. Requires `parameters.unit` set to `MILES` or `KILOMETERS`. + # Use a decimal value. attribute:, # The operation to apply to the attribute operation:, @@ -431,26 +447,27 @@ module Lithic # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer # fee field in the settlement/cardholder billing currency. This is the amount # the issuer should authorize against unless the issuer is paying the acquirer - # fee on behalf of the cardholder. + # fee on behalf of the cardholder. Use an integer value. # - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This - # represents the amount of cash being withdrawn or advanced. + # represents the amount of cash being withdrawn or advanced. Use an integer + # value. # - `RISK_SCORE`: Network-provided score assessing risk level associated with a # given authorization. Scores are on a range of 0-999, with 0 representing the # lowest risk and 999 representing the highest risk. For Visa transactions, # where the raw score has a range of 0-99, Lithic will normalize the score by - # multiplying the raw score by 10x. + # multiplying the raw score by 10x. Use an integer value. # - `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the - # trailing 15 minutes before the authorization. + # trailing 15 minutes before the authorization. Use an integer value. # - `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the - # trailing hour up and until the authorization. + # trailing hour up and until the authorization. Use an integer value. # - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the - # trailing 24 hours up and until the authorization. + # trailing 24 hours up and until the authorization. Use an integer value. # - `CARD_DECLINE_COUNT_15M`: The number of declined transactions on the card in - # the trailing 15 minutes before the authorization. + # the trailing 15 minutes before the authorization. Use an integer value. # - `CARD_DECLINE_COUNT_1H`: The number of declined transactions on the card in - # the trailing hour up and until the authorization. + # the trailing hour up and until the authorization. Use an integer value. # - `CARD_DECLINE_COUNT_24H`: The number of declined transactions on the card in - # the trailing 24 hours up and until the authorization. + # the trailing 24 hours up and until the authorization. Use an integer value. # - `CARD_STATE`: The current state of the card associated with the transaction. # Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`, # `PENDING_FULFILLMENT`. @@ -475,18 +492,20 @@ module Lithic # data, the service location postal code is used. Otherwise, falls back to the # card acceptor postal code. # - `CARD_AGE`: The age of the card in seconds at the time of the authorization. + # Use an integer value. # - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time - # of the authorization. + # of the authorization. Use an integer value. # - `AMOUNT_Z_SCORE`: The z-score of the transaction amount relative to the # entity's transaction history. Null if fewer than 30 approved transactions in # the specified window. Requires `parameters.scope` and `parameters.interval`. + # Use a decimal value. # - `AVG_TRANSACTION_AMOUNT`: The average approved transaction amount for the # entity over the specified window, in cents. Requires `parameters.scope` and - # `parameters.interval`. + # `parameters.interval`. Use a decimal value. # - `STDEV_TRANSACTION_AMOUNT`: The standard deviation of approved transaction # amounts for the entity over the specified window, in cents. Null if fewer than # 30 approved transactions in the specified window. Requires `parameters.scope` - # and `parameters.interval`. + # and `parameters.interval`. Use a decimal value. # - `IS_NEW_COUNTRY`: Whether the transaction's merchant country has not been seen # in the entity's transaction history. Valid values are `TRUE`, `FALSE`. # Requires `parameters.scope`. @@ -497,26 +516,31 @@ module Lithic # Valid values are `TRUE`, `FALSE`. Requires `parameters.scope`. # - `CONSECUTIVE_DECLINES`: The number of consecutive declined transactions for # the entity over the last 30 days (rolling). Requires `parameters.scope`. Not - # supported for `BUSINESS_ACCOUNT` scope. + # supported for `BUSINESS_ACCOUNT` scope. Use an integer value. # - `TIME_SINCE_LAST_TRANSACTION`: The number of days since the last approved - # transaction for the entity. Requires `parameters.scope`. + # transaction for the entity, rounded to the nearest whole day. Requires + # `parameters.scope`. Use an integer value. # - `DISTINCT_COUNTRY_COUNT`: The number of distinct merchant countries seen in - # the entity's transaction history. Requires `parameters.scope`. + # the entity's transaction history. Requires `parameters.scope`. Use an integer + # value. # - `IS_NEW_MERCHANT`: Whether the card acceptor ID has not been seen in the # card's approved transaction history (capped at the 1000 most recently seen # merchants). Valid values are `TRUE`, `FALSE`. Card-scoped only; no # `parameters` required. # - `THREE_DS_SUCCESS_RATE`: The 3DS authentication success rate for the card, as # a percentage from 0.0 to 100.0. Card-scoped only; no `parameters` required. + # Use a decimal value. # - `TRAVEL_SPEED`: The estimated speed of travel derived from the distance # between the postal code centers of the last card-present transaction and the # current transaction, divided by the elapsed time. Null if there is no prior # card-present transaction, if either postal code cannot be geocoded, or if - # elapsed time is zero. Requires `parameters.unit` set to `MPH` or `KPH`. + # elapsed time is zero. Requires `parameters.unit` set to `MPH` or `KPH`. Use a + # decimal value. # - `DISTANCE_FROM_LAST_TRANSACTION`: The estimated distance between the postal # code centers of the last card-present transaction and the current transaction. # Null if there is no prior card-present transaction or if either postal code # cannot be geocoded. Requires `parameters.unit` set to `MILES` or `KILOMETERS`. + # Use a decimal value. module Attribute extend Lithic::Internal::Type::Enum diff --git a/rbi/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rbi b/rbi/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rbi index 3aa0ec7f..9537d7b4 100644 --- a/rbi/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rbi +++ b/rbi/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rbi @@ -96,12 +96,12 @@ module Lithic # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer # fee field in the settlement/cardholder billing currency. This is the amount # the issuer should authorize against unless the issuer is paying the acquirer - # fee on behalf of the cardholder. + # fee on behalf of the cardholder. Use an integer value. # - `RISK_SCORE`: Network-provided score assessing risk level associated with a # given authorization. Scores are on a range of 0-999, with 0 representing the # lowest risk and 999 representing the highest risk. For Visa transactions, # where the raw score has a range of 0-99, Lithic will normalize the score by - # multiplying the raw score by 10x. + # multiplying the raw score by 10x. Use an integer value. # - `TRANSACTION_STATUS`: The status of the transaction. Valid values are # `PENDING`, `VOIDED`, `SETTLING`, `SETTLED`, `BOUNCED`, `RETURNED`, `DECLINED`, # `EXPIRED`. @@ -122,15 +122,16 @@ module Lithic # - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the # source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`, # `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. - # - `CARD_AGE`: The age of the card in seconds at the time of the transaction. + # - `CARD_AGE`: The age of the card in seconds at the time of the transaction. Use + # an integer value. # - `ACCOUNT_AGE`: The age of the account in seconds at the time of the - # transaction. + # transaction. Use an integer value. # - `SPEND_VELOCITY_COUNT`: The number of transactions matching the specified # filters within the given period. Requires `parameters` with `scope`, `period`, - # and optional `filters`. + # and optional `filters`. Use an integer value. # - `SPEND_VELOCITY_AMOUNT`: The total spend amount (in cents) of transactions # matching the specified filters within the given period. Requires `parameters` - # with `scope`, `period`, and optional `filters`. + # with `scope`, `period`, and optional `filters`. Use an integer value. sig do returns( Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::OrSymbol @@ -194,12 +195,12 @@ module Lithic # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer # fee field in the settlement/cardholder billing currency. This is the amount # the issuer should authorize against unless the issuer is paying the acquirer - # fee on behalf of the cardholder. + # fee on behalf of the cardholder. Use an integer value. # - `RISK_SCORE`: Network-provided score assessing risk level associated with a # given authorization. Scores are on a range of 0-999, with 0 representing the # lowest risk and 999 representing the highest risk. For Visa transactions, # where the raw score has a range of 0-99, Lithic will normalize the score by - # multiplying the raw score by 10x. + # multiplying the raw score by 10x. Use an integer value. # - `TRANSACTION_STATUS`: The status of the transaction. Valid values are # `PENDING`, `VOIDED`, `SETTLING`, `SETTLED`, `BOUNCED`, `RETURNED`, `DECLINED`, # `EXPIRED`. @@ -220,15 +221,16 @@ module Lithic # - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the # source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`, # `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. - # - `CARD_AGE`: The age of the card in seconds at the time of the transaction. + # - `CARD_AGE`: The age of the card in seconds at the time of the transaction. Use + # an integer value. # - `ACCOUNT_AGE`: The age of the account in seconds at the time of the - # transaction. + # transaction. Use an integer value. # - `SPEND_VELOCITY_COUNT`: The number of transactions matching the specified # filters within the given period. Requires `parameters` with `scope`, `period`, - # and optional `filters`. + # and optional `filters`. Use an integer value. # - `SPEND_VELOCITY_AMOUNT`: The total spend amount (in cents) of transactions # matching the specified filters within the given period. Requires `parameters` - # with `scope`, `period`, and optional `filters`. + # with `scope`, `period`, and optional `filters`. Use an integer value. attribute:, # The operation to apply to the attribute operation:, @@ -273,12 +275,12 @@ module Lithic # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer # fee field in the settlement/cardholder billing currency. This is the amount # the issuer should authorize against unless the issuer is paying the acquirer - # fee on behalf of the cardholder. + # fee on behalf of the cardholder. Use an integer value. # - `RISK_SCORE`: Network-provided score assessing risk level associated with a # given authorization. Scores are on a range of 0-999, with 0 representing the # lowest risk and 999 representing the highest risk. For Visa transactions, # where the raw score has a range of 0-99, Lithic will normalize the score by - # multiplying the raw score by 10x. + # multiplying the raw score by 10x. Use an integer value. # - `TRANSACTION_STATUS`: The status of the transaction. Valid values are # `PENDING`, `VOIDED`, `SETTLING`, `SETTLED`, `BOUNCED`, `RETURNED`, `DECLINED`, # `EXPIRED`. @@ -299,15 +301,16 @@ module Lithic # - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the # source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`, # `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. - # - `CARD_AGE`: The age of the card in seconds at the time of the transaction. + # - `CARD_AGE`: The age of the card in seconds at the time of the transaction. Use + # an integer value. # - `ACCOUNT_AGE`: The age of the account in seconds at the time of the - # transaction. + # transaction. Use an integer value. # - `SPEND_VELOCITY_COUNT`: The number of transactions matching the specified # filters within the given period. Requires `parameters` with `scope`, `period`, - # and optional `filters`. + # and optional `filters`. Use an integer value. # - `SPEND_VELOCITY_AMOUNT`: The total spend amount (in cents) of transactions # matching the specified filters within the given period. Requires `parameters` - # with `scope`, `period`, and optional `filters`. + # with `scope`, `period`, and optional `filters`. Use an integer value. module Attribute extend Lithic::Internal::Type::Enum 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 a411dc37..79b66623 100644 --- a/rbi/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbi +++ b/rbi/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbi @@ -499,10 +499,10 @@ module Lithic # `SAMSUNG_PAY`, `UNKNOWN`, `VISA_CHECKOUT`. # - `WALLET_ACCOUNT_SCORE`: Risk score for the account in the digital wallet. # Numeric value where lower numbers indicate higher risk (e.g., 1 = high risk, 2 - # = medium risk). + # = medium risk). Use an integer value. # - `WALLET_DEVICE_SCORE`: Risk score for the device in the digital wallet. # Numeric value where lower numbers indicate higher risk (e.g., 1 = high risk, 2 - # = medium risk). + # = medium risk). Use an integer value. # - `WALLET_RECOMMENDED_DECISION`: The decision recommended by the digital wallet # provider. Valid values include APPROVE, DECLINE, # REQUIRE_ADDITIONAL_AUTHENTICATION. @@ -570,10 +570,10 @@ module Lithic # `SAMSUNG_PAY`, `UNKNOWN`, `VISA_CHECKOUT`. # - `WALLET_ACCOUNT_SCORE`: Risk score for the account in the digital wallet. # Numeric value where lower numbers indicate higher risk (e.g., 1 = high risk, 2 - # = medium risk). + # = medium risk). Use an integer value. # - `WALLET_DEVICE_SCORE`: Risk score for the device in the digital wallet. # Numeric value where lower numbers indicate higher risk (e.g., 1 = high risk, 2 - # = medium risk). + # = medium risk). Use an integer value. # - `WALLET_RECOMMENDED_DECISION`: The decision recommended by the digital wallet # provider. Valid values include APPROVE, DECLINE, # REQUIRE_ADDITIONAL_AUTHENTICATION. @@ -638,10 +638,10 @@ module Lithic # `SAMSUNG_PAY`, `UNKNOWN`, `VISA_CHECKOUT`. # - `WALLET_ACCOUNT_SCORE`: Risk score for the account in the digital wallet. # Numeric value where lower numbers indicate higher risk (e.g., 1 = high risk, 2 - # = medium risk). + # = medium risk). Use an integer value. # - `WALLET_DEVICE_SCORE`: Risk score for the device in the digital wallet. # Numeric value where lower numbers indicate higher risk (e.g., 1 = high risk, 2 - # = medium risk). + # = medium risk). Use an integer value. # - `WALLET_RECOMMENDED_DECISION`: The decision recommended by the digital wallet # provider. Valid values include APPROVE, DECLINE, # REQUIRE_ADDITIONAL_AUTHENTICATION. diff --git a/rbi/lithic/models/auth_rules/conditional_value.rbi b/rbi/lithic/models/auth_rules/conditional_value.rbi index dda89c22..a9fbcfb5 100644 --- a/rbi/lithic/models/auth_rules/conditional_value.rbi +++ b/rbi/lithic/models/auth_rules/conditional_value.rbi @@ -8,7 +8,7 @@ module Lithic extend Lithic::Internal::Type::Union Variants = - T.type_alias { T.any(String, Integer, T::Array[String], Time) } + T.type_alias { T.any(String, Integer, Float, T::Array[String], Time) } sig do override.returns( diff --git a/sig/lithic/models/auth_rules/conditional_value.rbs b/sig/lithic/models/auth_rules/conditional_value.rbs index 60485439..ff6319ee 100644 --- a/sig/lithic/models/auth_rules/conditional_value.rbs +++ b/sig/lithic/models/auth_rules/conditional_value.rbs @@ -1,7 +1,7 @@ module Lithic module Models module AuthRules - type conditional_value = String | Integer | ::Array[String] | Time + type conditional_value = String | Integer | Float | ::Array[String] | Time module ConditionalValue extend Lithic::Internal::Type::Union From a270862d8522a456f88111f92d91d7adfe285b96 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 27 May 2026 17:44:51 +0000 Subject: [PATCH 04/14] feat(api): Add authorization challenge response endpoint and webhook --- .stats.yml | 8 +- lib/lithic.rb | 4 + lib/lithic/client.rb | 4 + lib/lithic/models.rb | 6 + lib/lithic/models/card_authorization.rb | 1235 ++++++++ ...rization_approval_request_webhook_event.rb | 1256 +------- ...authorization_challenge_response_params.rb | 40 + ...d_authorization_challenge_webhook_event.rb | 67 + lib/lithic/models/event.rb | 9 + lib/lithic/models/event_list_params.rb | 5 + lib/lithic/models/event_subscription.rb | 5 + .../events/subscription_create_params.rb | 5 + ...scription_send_simulated_example_params.rb | 1 + .../events/subscription_update_params.rb | 5 + lib/lithic/models/parsed_webhook_event.rb | 5 +- lib/lithic/resources/card_authorizations.rb | 45 + lib/lithic/resources/webhooks.rb | 2 +- rbi/lithic/client.rbi | 3 + rbi/lithic/models.rbi | 8 + rbi/lithic/models/card_authorization.rbi | 2475 +++++++++++++++ ...ization_approval_request_webhook_event.rbi | 2763 +---------------- ...uthorization_challenge_response_params.rbi | 93 + ..._authorization_challenge_webhook_event.rbi | 119 + rbi/lithic/models/event.rbi | 17 + rbi/lithic/models/event_list_params.rbi | 9 + rbi/lithic/models/event_subscription.rbi | 9 + .../events/subscription_create_params.rbi | 9 + ...cription_send_simulated_example_params.rbi | 5 + .../events/subscription_update_params.rbi | 9 + rbi/lithic/models/parsed_webhook_event.rbi | 1 + rbi/lithic/resources/card_authorizations.rbi | 35 + rbi/lithic/resources/webhooks.rbi | 5 +- sig/lithic/client.rbs | 2 + sig/lithic/models.rbs | 6 + sig/lithic/models/card_authorization.rbs | 1021 ++++++ ...ization_approval_request_webhook_event.rbs | 1020 +----- ...uthorization_challenge_response_params.rbs | 42 + ..._authorization_challenge_webhook_event.rbs | 53 + sig/lithic/models/event.rbs | 2 + sig/lithic/models/event_list_params.rbs | 2 + sig/lithic/models/event_subscription.rbs | 2 + .../events/subscription_create_params.rbs | 2 + ...cription_send_simulated_example_params.rbs | 2 + .../events/subscription_update_params.rbs | 2 + sig/lithic/models/parsed_webhook_event.rbs | 1 + sig/lithic/resources/card_authorizations.rbs | 13 + sig/lithic/resources/webhooks.rbs | 1 + .../resources/card_authorizations_test.rb | 17 + 48 files changed, 5419 insertions(+), 5031 deletions(-) create mode 100644 lib/lithic/models/card_authorization.rb create mode 100644 lib/lithic/models/card_authorization_challenge_response_params.rb create mode 100644 lib/lithic/models/card_authorization_challenge_webhook_event.rb create mode 100644 lib/lithic/resources/card_authorizations.rb create mode 100644 rbi/lithic/models/card_authorization.rbi create mode 100644 rbi/lithic/models/card_authorization_challenge_response_params.rbi create mode 100644 rbi/lithic/models/card_authorization_challenge_webhook_event.rbi create mode 100644 rbi/lithic/resources/card_authorizations.rbi create mode 100644 sig/lithic/models/card_authorization.rbs create mode 100644 sig/lithic/models/card_authorization_challenge_response_params.rbs create mode 100644 sig/lithic/models/card_authorization_challenge_webhook_event.rbs create mode 100644 sig/lithic/resources/card_authorizations.rbs create mode 100644 test/lithic/resources/card_authorizations_test.rb diff --git a/.stats.yml b/.stats.yml index f2e6324d..b5b02fac 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-edd62262c633378b046a4c774cb9a824e2f6bf8f6c0cec613d3fb56e96ba1a29.yml -openapi_spec_hash: e90bfadcd60afbaf9e0c9ebaea4e374e -config_hash: 265a2b679964f4ad5706de101ad2a942 +configured_endpoints: 194 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-19240135588c2012b39cde86218a05c471b3e7831b57c736704e3fbca109e3a9.yml +openapi_spec_hash: c6a5c719b89e08de52aea005b39fd5a6 +config_hash: 1c5c139a2aa0d1d45c063f953a9bc803 diff --git a/lib/lithic.rb b/lib/lithic.rb index 1137bedd..6b1d53f9 100644 --- a/lib/lithic.rb +++ b/lib/lithic.rb @@ -61,6 +61,7 @@ require_relative "lithic/models/auth_rules/v2/backtest_results" require_relative "lithic/models/book_transfer_response" require_relative "lithic/models/non_pci_card" +require_relative "lithic/models/card_authorization" require_relative "lithic/models/transactions/events/enhanced_data" require_relative "lithic/models/dispute_evidence" require_relative "lithic/models/dispute_v2" @@ -172,7 +173,9 @@ require_relative "lithic/models/book_transfer_transaction_updated_webhook_event" require_relative "lithic/models/card" require_relative "lithic/models/card_authorization_approval_request_webhook_event" +require_relative "lithic/models/card_authorization_challenge_response_params" require_relative "lithic/models/card_authorization_challenge_response_webhook_event" +require_relative "lithic/models/card_authorization_challenge_webhook_event" require_relative "lithic/models/card_bulk_order" require_relative "lithic/models/card_bulk_order_create_params" require_relative "lithic/models/card_bulk_order_list_params" @@ -476,6 +479,7 @@ require_relative "lithic/resources/auth_stream_enrollment" require_relative "lithic/resources/balances" require_relative "lithic/resources/book_transfers" +require_relative "lithic/resources/card_authorizations" require_relative "lithic/resources/card_bulk_orders" require_relative "lithic/resources/card_programs" require_relative "lithic/resources/cards" diff --git a/lib/lithic/client.rb b/lib/lithic/client.rb index 6d9b1b5d..80ec0106 100644 --- a/lib/lithic/client.rb +++ b/lib/lithic/client.rb @@ -47,6 +47,9 @@ class Client < Lithic::Internal::Transport::BaseClient # @return [Lithic::Resources::Cards] attr_reader :cards + # @return [Lithic::Resources::CardAuthorizations] + attr_reader :card_authorizations + # @return [Lithic::Resources::CardBulkOrders] attr_reader :card_bulk_orders @@ -222,6 +225,7 @@ def initialize( @tokenization_decisioning = Lithic::Resources::TokenizationDecisioning.new(client: self) @tokenizations = Lithic::Resources::Tokenizations.new(client: self) @cards = Lithic::Resources::Cards.new(client: self) + @card_authorizations = Lithic::Resources::CardAuthorizations.new(client: self) @card_bulk_orders = Lithic::Resources::CardBulkOrders.new(client: self) @balances = Lithic::Resources::Balances.new(client: self) @disputes = Lithic::Resources::Disputes.new(client: self) diff --git a/lib/lithic/models.rb b/lib/lithic/models.rb index 40841577..081b521c 100644 --- a/lib/lithic/models.rb +++ b/lib/lithic/models.rb @@ -130,12 +130,18 @@ module Lithic Card = Lithic::Models::Card + CardAuthorization = Lithic::Models::CardAuthorization + CardAuthorizationApprovalRequestWebhookEvent = Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent + CardAuthorizationChallengeResponseParams = Lithic::Models::CardAuthorizationChallengeResponseParams + CardAuthorizationChallengeResponseWebhookEvent = Lithic::Models::CardAuthorizationChallengeResponseWebhookEvent + CardAuthorizationChallengeWebhookEvent = Lithic::Models::CardAuthorizationChallengeWebhookEvent + CardBulkOrder = Lithic::Models::CardBulkOrder CardBulkOrderCreateParams = Lithic::Models::CardBulkOrderCreateParams diff --git a/lib/lithic/models/card_authorization.rb b/lib/lithic/models/card_authorization.rb new file mode 100644 index 00000000..de587fda --- /dev/null +++ b/lib/lithic/models/card_authorization.rb @@ -0,0 +1,1235 @@ +# frozen_string_literal: true + +module Lithic + module Models + class CardAuthorization < Lithic::Internal::Type::BaseModel + # @!attribute token + # The provisional transaction group uuid associated with the authorization + # + # @return [String] + required :token, String + + # @!attribute acquirer_fee + # Fee (in cents) assessed by the merchant and paid for by the cardholder. Will be + # zero if no fee is assessed. Rebates may be transmitted as a negative value to + # indicate credited fees. + # + # @return [Integer] + required :acquirer_fee, Integer + + # @!attribute amount + # @deprecated + # + # Deprecated, use `amounts`. Authorization amount of the transaction (in cents), + # including any acquirer fees. The contents of this field are identical to + # `authorization_amount`. + # + # @return [Integer] + required :amount, Integer + + # @!attribute amounts + # Structured amounts for this authorization. The `cardholder` and `merchant` + # amounts reflect the original network authorization values. For programs with + # hold adjustments enabled (e.g., automated fuel dispensers or tipping MCCs), the + # `hold` amount may exceed the `cardholder` and `merchant` amounts to account for + # anticipated final transaction amounts such as tips or fuel fill-ups + # + # @return [Lithic::Models::CardAuthorization::Amounts] + required :amounts, -> { Lithic::CardAuthorization::Amounts } + + # @!attribute authorization_amount + # @deprecated + # + # Deprecated, use `amounts`. The base transaction amount (in cents) plus the + # acquirer fee field. This is the amount the issuer should authorize against + # unless the issuer is paying the acquirer fee on behalf of the cardholder. + # + # @return [Integer] + required :authorization_amount, Integer + + # @!attribute avs + # + # @return [Lithic::Models::CardAuthorization::Avs] + required :avs, -> { Lithic::CardAuthorization::Avs } + + # @!attribute card + # Card object in ASA + # + # @return [Lithic::Models::CardAuthorization::Card] + required :card, -> { Lithic::CardAuthorization::Card } + + # @!attribute cardholder_currency + # @deprecated + # + # Deprecated, use `amounts`. 3-character alphabetic ISO 4217 code for cardholder's + # billing currency. + # + # @return [String] + required :cardholder_currency, String + + # @!attribute cash_amount + # The portion of the transaction requested as cash back by the cardholder, and + # does not include any acquirer fees. The amount field includes the purchase + # amount, the requested cash back amount, and any acquirer fees. + # + # If no cash back was requested, the value of this field will be 0, and the field + # will always be present. + # + # @return [Integer] + required :cash_amount, Integer + + # @!attribute created + # Date and time when the transaction first occurred in UTC. + # + # @return [Time] + required :created, Time + + # @!attribute merchant + # Merchant information including full location details. + # + # @return [Lithic::Models::CardAuthorization::Merchant] + required :merchant, -> { Lithic::CardAuthorization::Merchant } + + # @!attribute merchant_amount + # @deprecated + # + # Deprecated, use `amounts`. The amount that the merchant will receive, + # denominated in `merchant_currency` and in the smallest currency unit. Note the + # amount includes `acquirer_fee`, similar to `authorization_amount`. It will be + # different from `authorization_amount` if the merchant is taking payment in a + # different currency. + # + # @return [Integer] + required :merchant_amount, Integer + + # @!attribute merchant_currency + # @deprecated + # + # 3-character alphabetic ISO 4217 code for the local currency of the transaction. + # + # @return [String] + required :merchant_currency, String + + # @!attribute service_location + # Where the cardholder received the service, when different from the card acceptor + # location. This is populated from network data elements such as Mastercard DE-122 + # SE1 SF9-14 and Visa F34 DS02. + # + # @return [Lithic::Models::CardAuthorization::ServiceLocation, nil] + required :service_location, -> { Lithic::CardAuthorization::ServiceLocation }, nil?: true + + # @!attribute settled_amount + # @deprecated + # + # Deprecated, use `amounts`. Amount (in cents) of the transaction that has been + # settled, including any acquirer fees. + # + # @return [Integer] + required :settled_amount, Integer + + # @!attribute status + # The type of authorization request that this request is for. Note that + # `CREDIT_AUTHORIZATION` and `FINANCIAL_CREDIT_AUTHORIZATION` is only available to + # users with credit decisioning via ASA enabled. + # + # @return [Symbol, Lithic::Models::CardAuthorization::Status] + required :status, enum: -> { Lithic::CardAuthorization::Status } + + # @!attribute transaction_initiator + # The entity that initiated the transaction. + # + # @return [Symbol, Lithic::Models::CardAuthorization::TransactionInitiator] + required :transaction_initiator, enum: -> { Lithic::CardAuthorization::TransactionInitiator } + + # @!attribute account_type + # + # @return [Symbol, Lithic::Models::CardAuthorization::AccountType, nil] + optional :account_type, enum: -> { Lithic::CardAuthorization::AccountType } + + # @!attribute cardholder_authentication + # + # @return [Lithic::Models::CardholderAuthentication, nil] + optional :cardholder_authentication, -> { Lithic::CardholderAuthentication } + + # @!attribute cashback + # Deprecated, use `cash_amount`. + # + # @return [Integer, nil] + optional :cashback, Integer + + # @!attribute conversion_rate + # @deprecated + # + # Deprecated, use `amounts`. If the transaction was requested in a currency other + # than the settlement currency, this field will be populated to indicate the rate + # used to translate the merchant_amount to the amount (i.e., `merchant_amount` x + # `conversion_rate` = `amount`). Note that the `merchant_amount` is in the local + # currency and the amount is in the settlement currency. + # + # @return [Float, nil] + optional :conversion_rate, Float + + # @!attribute event_token + # The event token associated with the authorization. This field is only set for + # programs enrolled into the beta. + # + # @return [String, nil] + optional :event_token, String + + # @!attribute fleet_info + # Optional Object containing information if the Card is a part of a Fleet managed + # program + # + # @return [Lithic::Models::CardAuthorization::FleetInfo, nil] + optional :fleet_info, -> { Lithic::CardAuthorization::FleetInfo }, nil?: true + + # @!attribute latest_challenge + # The latest Authorization Challenge that was issued to the cardholder for this + # merchant. + # + # @return [Lithic::Models::CardAuthorization::LatestChallenge, nil] + optional :latest_challenge, -> { Lithic::CardAuthorization::LatestChallenge } + + # @!attribute network + # Card network of the authorization. + # + # @return [Symbol, Lithic::Models::CardAuthorization::Network, nil] + optional :network, enum: -> { Lithic::CardAuthorization::Network } + + # @!attribute network_risk_score + # Network-provided score assessing risk level associated with a given + # authorization. Scores are on a range of 0-999, with 0 representing the lowest + # risk and 999 representing the highest risk. For Visa transactions, where the raw + # score has a range of 0-99, Lithic will normalize the score by multiplying the + # raw score by 10x. + # + # @return [Integer, nil] + optional :network_risk_score, Integer, nil?: true + + # @!attribute network_specific_data + # Contains raw data provided by the card network, including attributes that + # provide further context about the authorization. If populated by the network, + # data is organized by Lithic and passed through without further modification. + # Please consult the official network documentation for more details about these + # values and how to use them. This object is only available to certain programs- + # contact your Customer Success Manager to discuss enabling access. + # + # @return [Lithic::Models::CardAuthorization::NetworkSpecificData, nil] + optional :network_specific_data, -> { Lithic::CardAuthorization::NetworkSpecificData }, nil?: true + + # @!attribute pos + # + # @return [Lithic::Models::CardAuthorization::Pos, nil] + optional :pos, -> { Lithic::CardAuthorization::Pos } + + # @!attribute token_info + # + # @return [Lithic::Models::TokenInfo, nil] + optional :token_info, -> { Lithic::TokenInfo }, nil?: true + + # @!attribute ttl + # Deprecated: approximate time-to-live for the authorization. + # + # @return [Time, nil] + optional :ttl, Time + + # @!method initialize(token:, acquirer_fee:, amount:, amounts:, authorization_amount:, avs:, card:, cardholder_currency:, cash_amount:, created:, merchant:, merchant_amount:, merchant_currency:, service_location:, settled_amount:, status:, transaction_initiator:, account_type: nil, cardholder_authentication: nil, cashback: nil, conversion_rate: nil, event_token: nil, fleet_info: nil, latest_challenge: nil, network: nil, network_risk_score: nil, network_specific_data: nil, pos: nil, token_info: nil, ttl: nil) + # Some parameter documentations has been truncated, see + # {Lithic::Models::CardAuthorization} for more details. + # + # Card Authorization + # + # @param token [String] The provisional transaction group uuid associated with the authorization + # + # @param acquirer_fee [Integer] Fee (in cents) assessed by the merchant and paid for by the cardholder. Will be + # + # @param amount [Integer] Deprecated, use `amounts`. Authorization amount of the transaction (in cents), i + # + # @param amounts [Lithic::Models::CardAuthorization::Amounts] Structured amounts for this authorization. The `cardholder` and `merchant` amoun + # + # @param authorization_amount [Integer] Deprecated, use `amounts`. The base transaction amount (in cents) plus the acqui + # + # @param avs [Lithic::Models::CardAuthorization::Avs] + # + # @param card [Lithic::Models::CardAuthorization::Card] Card object in ASA + # + # @param cardholder_currency [String] Deprecated, use `amounts`. 3-character alphabetic ISO 4217 code for cardholder's + # + # @param cash_amount [Integer] The portion of the transaction requested as cash back by the cardholder, and doe + # + # @param created [Time] Date and time when the transaction first occurred in UTC. + # + # @param merchant [Lithic::Models::CardAuthorization::Merchant] Merchant information including full location details. + # + # @param merchant_amount [Integer] Deprecated, use `amounts`. The amount that the merchant will receive, denominate + # + # @param merchant_currency [String] 3-character alphabetic ISO 4217 code for the local currency of the transaction. + # + # @param service_location [Lithic::Models::CardAuthorization::ServiceLocation, nil] Where the cardholder received the service, when different from the card acceptor + # + # @param settled_amount [Integer] Deprecated, use `amounts`. Amount (in cents) of the transaction that has been se + # + # @param status [Symbol, Lithic::Models::CardAuthorization::Status] The type of authorization request that this request is for. Note that `CREDIT_AU + # + # @param transaction_initiator [Symbol, Lithic::Models::CardAuthorization::TransactionInitiator] The entity that initiated the transaction. + # + # @param account_type [Symbol, Lithic::Models::CardAuthorization::AccountType] + # + # @param cardholder_authentication [Lithic::Models::CardholderAuthentication] + # + # @param cashback [Integer] Deprecated, use `cash_amount`. + # + # @param conversion_rate [Float] Deprecated, use `amounts`. If the transaction was requested in a currency other + # + # @param event_token [String] The event token associated with the authorization. This field is only set for pr + # + # @param fleet_info [Lithic::Models::CardAuthorization::FleetInfo, nil] Optional Object containing information if the Card is a part of a Fleet managed + # + # @param latest_challenge [Lithic::Models::CardAuthorization::LatestChallenge] The latest Authorization Challenge that was issued to the cardholder for this me + # + # @param network [Symbol, Lithic::Models::CardAuthorization::Network] Card network of the authorization. + # + # @param network_risk_score [Integer, nil] Network-provided score assessing risk level associated with a given authorizatio + # + # @param network_specific_data [Lithic::Models::CardAuthorization::NetworkSpecificData, nil] Contains raw data provided by the card network, including attributes that provid + # + # @param pos [Lithic::Models::CardAuthorization::Pos] + # + # @param token_info [Lithic::Models::TokenInfo, nil] + # + # @param ttl [Time] Deprecated: approximate time-to-live for the authorization. + + # @see Lithic::Models::CardAuthorization#amounts + class Amounts < Lithic::Internal::Type::BaseModel + # @!attribute cardholder + # + # @return [Lithic::Models::CardAuthorization::Amounts::Cardholder] + required :cardholder, -> { Lithic::CardAuthorization::Amounts::Cardholder } + + # @!attribute hold + # + # @return [Lithic::Models::CardAuthorization::Amounts::Hold, nil] + required :hold, -> { Lithic::CardAuthorization::Amounts::Hold }, nil?: true + + # @!attribute merchant + # + # @return [Lithic::Models::CardAuthorization::Amounts::Merchant] + required :merchant, -> { Lithic::CardAuthorization::Amounts::Merchant } + + # @!attribute settlement + # + # @return [Lithic::Models::CardAuthorization::Amounts::Settlement, nil] + required :settlement, -> { Lithic::CardAuthorization::Amounts::Settlement }, nil?: true + + # @!method initialize(cardholder:, hold:, merchant:, settlement:) + # Structured amounts for this authorization. The `cardholder` and `merchant` + # amounts reflect the original network authorization values. For programs with + # hold adjustments enabled (e.g., automated fuel dispensers or tipping MCCs), the + # `hold` amount may exceed the `cardholder` and `merchant` amounts to account for + # anticipated final transaction amounts such as tips or fuel fill-ups + # + # @param cardholder [Lithic::Models::CardAuthorization::Amounts::Cardholder] + # @param hold [Lithic::Models::CardAuthorization::Amounts::Hold, nil] + # @param merchant [Lithic::Models::CardAuthorization::Amounts::Merchant] + # @param settlement [Lithic::Models::CardAuthorization::Amounts::Settlement, nil] + + # @see Lithic::Models::CardAuthorization::Amounts#cardholder + class Cardholder < Lithic::Internal::Type::BaseModel + # @!attribute amount + # Amount in the smallest unit of the applicable currency (e.g., cents) + # + # @return [Integer] + required :amount, Integer + + # @!attribute conversion_rate + # Exchange rate used for currency conversion + # + # @return [String] + required :conversion_rate, String + + # @!attribute currency + # 3-character alphabetic ISO 4217 currency + # + # @return [String] + required :currency, String + + # @!method initialize(amount:, conversion_rate:, currency:) + # @param amount [Integer] Amount in the smallest unit of the applicable currency (e.g., cents) + # + # @param conversion_rate [String] Exchange rate used for currency conversion + # + # @param currency [String] 3-character alphabetic ISO 4217 currency + end + + # @see Lithic::Models::CardAuthorization::Amounts#hold + class Hold < Lithic::Internal::Type::BaseModel + # @!attribute amount + # Amount in the smallest unit of the applicable currency (e.g., cents) + # + # @return [Integer] + required :amount, Integer + + # @!attribute currency + # 3-character alphabetic ISO 4217 currency + # + # @return [String] + required :currency, String + + # @!method initialize(amount:, currency:) + # @param amount [Integer] Amount in the smallest unit of the applicable currency (e.g., cents) + # + # @param currency [String] 3-character alphabetic ISO 4217 currency + end + + # @see Lithic::Models::CardAuthorization::Amounts#merchant + class Merchant < Lithic::Internal::Type::BaseModel + # @!attribute amount + # Amount in the smallest unit of the applicable currency (e.g., cents) + # + # @return [Integer] + required :amount, Integer + + # @!attribute currency + # 3-character alphabetic ISO 4217 currency + # + # @return [String] + required :currency, String + + # @!method initialize(amount:, currency:) + # @param amount [Integer] Amount in the smallest unit of the applicable currency (e.g., cents) + # + # @param currency [String] 3-character alphabetic ISO 4217 currency + end + + # @see Lithic::Models::CardAuthorization::Amounts#settlement + class Settlement < Lithic::Internal::Type::BaseModel + # @!attribute amount + # Amount in the smallest unit of the applicable currency (e.g., cents) + # + # @return [Integer] + required :amount, Integer + + # @!attribute currency + # 3-character alphabetic ISO 4217 currency + # + # @return [String] + required :currency, String + + # @!method initialize(amount:, currency:) + # @param amount [Integer] Amount in the smallest unit of the applicable currency (e.g., cents) + # + # @param currency [String] 3-character alphabetic ISO 4217 currency + end + end + + # @see Lithic::Models::CardAuthorization#avs + class Avs < Lithic::Internal::Type::BaseModel + # @!attribute address + # Cardholder address + # + # @return [String] + required :address, String + + # @!attribute address_on_file_match + # Lithic's evaluation result comparing the transaction's address data with the + # cardholder KYC data if it exists. In the event Lithic does not have any + # Cardholder KYC data, or the transaction does not contain any address data, + # NOT_PRESENT will be returned + # + # @return [Symbol, Lithic::Models::CardAuthorization::Avs::AddressOnFileMatch] + required :address_on_file_match, enum: -> { Lithic::CardAuthorization::Avs::AddressOnFileMatch } + + # @!attribute zipcode + # Cardholder ZIP code + # + # @return [String] + required :zipcode, String + + # @!method initialize(address:, address_on_file_match:, zipcode:) + # Some parameter documentations has been truncated, see + # {Lithic::Models::CardAuthorization::Avs} for more details. + # + # @param address [String] Cardholder address + # + # @param address_on_file_match [Symbol, Lithic::Models::CardAuthorization::Avs::AddressOnFileMatch] Lithic's evaluation result comparing the transaction's address data with the car + # + # @param zipcode [String] Cardholder ZIP code + + # Lithic's evaluation result comparing the transaction's address data with the + # cardholder KYC data if it exists. In the event Lithic does not have any + # Cardholder KYC data, or the transaction does not contain any address data, + # NOT_PRESENT will be returned + # + # @see Lithic::Models::CardAuthorization::Avs#address_on_file_match + module AddressOnFileMatch + extend Lithic::Internal::Type::Enum + + MATCH = :MATCH + MATCH_ADDRESS_ONLY = :MATCH_ADDRESS_ONLY + MATCH_ZIP_ONLY = :MATCH_ZIP_ONLY + MISMATCH = :MISMATCH + NOT_PRESENT = :NOT_PRESENT + + # @!method self.values + # @return [Array] + end + end + + # @see Lithic::Models::CardAuthorization#card + class Card < Lithic::Internal::Type::BaseModel + # @!attribute token + # Globally unique identifier for the card. + # + # @return [String] + required :token, String + + # @!attribute last_four + # Last four digits of the card number + # + # @return [String] + required :last_four, String + + # @!attribute memo + # Customizable name to identify the card + # + # @return [String] + required :memo, String + + # @!attribute spend_limit + # Amount (in cents) to limit approved authorizations. Purchase requests above the + # spend limit will be declined (refunds and credits will be approved). + # + # Note that while spend limits are enforced based on authorized and settled volume + # on a card, they are not recommended to be used for balance or + # reconciliation-level accuracy. Spend limits also cannot block force posted + # charges (i.e., when a merchant sends a clearing message without a prior + # authorization). + # + # @return [Integer] + required :spend_limit, Integer + + # @!attribute spend_limit_duration + # Note that to support recurring monthly payments, which can occur on different + # day every month, the time window we consider for MONTHLY velocity starts 6 days + # after the current calendar date one month prior. + # + # @return [Symbol, Lithic::Models::CardAuthorization::Card::SpendLimitDuration] + required :spend_limit_duration, enum: -> { Lithic::CardAuthorization::Card::SpendLimitDuration } + + # @!attribute state + # + # @return [Symbol, Lithic::Models::CardAuthorization::Card::State] + required :state, enum: -> { Lithic::CardAuthorization::Card::State } + + # @!attribute type + # + # @return [Symbol, Lithic::Models::CardAuthorization::Card::Type] + required :type, enum: -> { Lithic::CardAuthorization::Card::Type } + + # @!method initialize(token:, last_four:, memo:, spend_limit:, spend_limit_duration:, state:, type:) + # Some parameter documentations has been truncated, see + # {Lithic::Models::CardAuthorization::Card} for more details. + # + # Card object in ASA + # + # @param token [String] Globally unique identifier for the card. + # + # @param last_four [String] Last four digits of the card number + # + # @param memo [String] Customizable name to identify the card + # + # @param spend_limit [Integer] Amount (in cents) to limit approved authorizations. Purchase requests above the + # + # @param spend_limit_duration [Symbol, Lithic::Models::CardAuthorization::Card::SpendLimitDuration] Note that to support recurring monthly payments, which can occur on different da + # + # @param state [Symbol, Lithic::Models::CardAuthorization::Card::State] + # + # @param type [Symbol, Lithic::Models::CardAuthorization::Card::Type] + + # Note that to support recurring monthly payments, which can occur on different + # day every month, the time window we consider for MONTHLY velocity starts 6 days + # after the current calendar date one month prior. + # + # @see Lithic::Models::CardAuthorization::Card#spend_limit_duration + module SpendLimitDuration + extend Lithic::Internal::Type::Enum + + ANNUALLY = :ANNUALLY + FOREVER = :FOREVER + MONTHLY = :MONTHLY + TRANSACTION = :TRANSACTION + + # @!method self.values + # @return [Array] + end + + # @see Lithic::Models::CardAuthorization::Card#state + module State + extend Lithic::Internal::Type::Enum + + CLOSED = :CLOSED + OPEN = :OPEN + PAUSED = :PAUSED + PENDING_ACTIVATION = :PENDING_ACTIVATION + PENDING_FULFILLMENT = :PENDING_FULFILLMENT + + # @!method self.values + # @return [Array] + end + + # @see Lithic::Models::CardAuthorization::Card#type + module Type + extend Lithic::Internal::Type::Enum + + SINGLE_USE = :SINGLE_USE + MERCHANT_LOCKED = :MERCHANT_LOCKED + UNLOCKED = :UNLOCKED + PHYSICAL = :PHYSICAL + DIGITAL_WALLET = :DIGITAL_WALLET + VIRTUAL = :VIRTUAL + + # @!method self.values + # @return [Array] + end + end + + # @see Lithic::Models::CardAuthorization#merchant + class Merchant < Lithic::Models::Merchant + # @!attribute phone_number + # Phone number of card acceptor. + # + # @return [String, nil] + required :phone_number, String, nil?: true + + # @!attribute postal_code + # Postal code of card acceptor. + # + # @return [String, nil] + required :postal_code, String, nil?: true + + # @!attribute street_address + # Street address of card acceptor. + # + # @return [String, nil] + required :street_address, String, nil?: true + + # @!method initialize(phone_number:, postal_code:, street_address:) + # Merchant information including full location details. + # + # @param phone_number [String, nil] Phone number of card acceptor. + # + # @param postal_code [String, nil] Postal code of card acceptor. + # + # @param street_address [String, nil] Street address of card acceptor. + end + + # @see Lithic::Models::CardAuthorization#service_location + class ServiceLocation < Lithic::Internal::Type::BaseModel + # @!attribute city + # City of service location. + # + # @return [String, nil] + required :city, String, nil?: true + + # @!attribute country + # Country code of service location, ISO 3166-1 alpha-3. + # + # @return [String, nil] + required :country, String, nil?: true + + # @!attribute postal_code + # Postal code of service location. + # + # @return [String, nil] + required :postal_code, String, nil?: true + + # @!attribute state + # State/province code of service location, ISO 3166-2. + # + # @return [String, nil] + required :state, String, nil?: true + + # @!attribute street_address + # Street address of service location. + # + # @return [String, nil] + required :street_address, String, nil?: true + + # @!method initialize(city:, country:, postal_code:, state:, street_address:) + # Where the cardholder received the service, when different from the card acceptor + # location. This is populated from network data elements such as Mastercard DE-122 + # SE1 SF9-14 and Visa F34 DS02. + # + # @param city [String, nil] City of service location. + # + # @param country [String, nil] Country code of service location, ISO 3166-1 alpha-3. + # + # @param postal_code [String, nil] Postal code of service location. + # + # @param state [String, nil] State/province code of service location, ISO 3166-2. + # + # @param street_address [String, nil] Street address of service location. + end + + # The type of authorization request that this request is for. Note that + # `CREDIT_AUTHORIZATION` and `FINANCIAL_CREDIT_AUTHORIZATION` is only available to + # users with credit decisioning via ASA enabled. + # + # @see Lithic::Models::CardAuthorization#status + module Status + extend Lithic::Internal::Type::Enum + + AUTHORIZATION = :AUTHORIZATION + CREDIT_AUTHORIZATION = :CREDIT_AUTHORIZATION + FINANCIAL_AUTHORIZATION = :FINANCIAL_AUTHORIZATION + FINANCIAL_CREDIT_AUTHORIZATION = :FINANCIAL_CREDIT_AUTHORIZATION + BALANCE_INQUIRY = :BALANCE_INQUIRY + + # @!method self.values + # @return [Array] + end + + # The entity that initiated the transaction. + # + # @see Lithic::Models::CardAuthorization#transaction_initiator + module TransactionInitiator + extend Lithic::Internal::Type::Enum + + CARDHOLDER = :CARDHOLDER + MERCHANT = :MERCHANT + UNKNOWN = :UNKNOWN + + # @!method self.values + # @return [Array] + end + + # @see Lithic::Models::CardAuthorization#account_type + module AccountType + extend Lithic::Internal::Type::Enum + + CHECKING = :CHECKING + SAVINGS = :SAVINGS + + # @!method self.values + # @return [Array] + end + + # @see Lithic::Models::CardAuthorization#fleet_info + class FleetInfo < Lithic::Internal::Type::BaseModel + # @!attribute fleet_prompt_code + # Code indicating what the driver was prompted to enter at time of purchase. This + # is configured at a program level and is a static configuration, and does not + # change on a request to request basis + # + # @return [Symbol, Lithic::Models::CardAuthorization::FleetInfo::FleetPromptCode] + required :fleet_prompt_code, enum: -> { Lithic::CardAuthorization::FleetInfo::FleetPromptCode } + + # @!attribute fleet_restriction_code + # Code indicating which restrictions, if any, there are on purchase. This is + # configured at a program level and is a static configuration, and does not change + # on a request to request basis + # + # @return [Symbol, Lithic::Models::CardAuthorization::FleetInfo::FleetRestrictionCode] + required :fleet_restriction_code, enum: -> { Lithic::CardAuthorization::FleetInfo::FleetRestrictionCode } + + # @!attribute driver_number + # Number representing the driver + # + # @return [String, nil] + optional :driver_number, String, nil?: true + + # @!attribute vehicle_number + # Number associated with the vehicle + # + # @return [String, nil] + optional :vehicle_number, String, nil?: true + + # @!method initialize(fleet_prompt_code:, fleet_restriction_code:, driver_number: nil, vehicle_number: nil) + # Some parameter documentations has been truncated, see + # {Lithic::Models::CardAuthorization::FleetInfo} for more details. + # + # Optional Object containing information if the Card is a part of a Fleet managed + # program + # + # @param fleet_prompt_code [Symbol, Lithic::Models::CardAuthorization::FleetInfo::FleetPromptCode] Code indicating what the driver was prompted to enter at time of purchase. This + # + # @param fleet_restriction_code [Symbol, Lithic::Models::CardAuthorization::FleetInfo::FleetRestrictionCode] Code indicating which restrictions, if any, there are on purchase. This is confi + # + # @param driver_number [String, nil] Number representing the driver + # + # @param vehicle_number [String, nil] Number associated with the vehicle + + # Code indicating what the driver was prompted to enter at time of purchase. This + # is configured at a program level and is a static configuration, and does not + # change on a request to request basis + # + # @see Lithic::Models::CardAuthorization::FleetInfo#fleet_prompt_code + module FleetPromptCode + extend Lithic::Internal::Type::Enum + + NO_PROMPT = :NO_PROMPT + VEHICLE_NUMBER = :VEHICLE_NUMBER + DRIVER_NUMBER = :DRIVER_NUMBER + + # @!method self.values + # @return [Array] + end + + # Code indicating which restrictions, if any, there are on purchase. This is + # configured at a program level and is a static configuration, and does not change + # on a request to request basis + # + # @see Lithic::Models::CardAuthorization::FleetInfo#fleet_restriction_code + module FleetRestrictionCode + extend Lithic::Internal::Type::Enum + + NO_RESTRICTIONS = :NO_RESTRICTIONS + FUEL_ONLY = :FUEL_ONLY + + # @!method self.values + # @return [Array] + end + end + + # @see Lithic::Models::CardAuthorization#latest_challenge + class LatestChallenge < Lithic::Internal::Type::BaseModel + # @!attribute phone_number + # The phone number used for sending Authorization Challenge SMS. + # + # @return [String] + required :phone_number, String + + # @!attribute status + # The status of the Authorization Challenge + # + # - `COMPLETED` - Challenge was successfully completed by the cardholder + # - `PENDING` - Challenge is still open + # - `EXPIRED` - Challenge has expired without being completed + # - `ERROR` - There was an error processing the challenge + # + # @return [Symbol, Lithic::Models::CardAuthorization::LatestChallenge::Status] + required :status, enum: -> { Lithic::CardAuthorization::LatestChallenge::Status } + + # @!attribute completed_at + # The date and time when the Authorization Challenge was completed in UTC. Present + # only if the status is `COMPLETED`. + # + # @return [Time, nil] + optional :completed_at, Time + + # @!method initialize(phone_number:, status:, completed_at: nil) + # Some parameter documentations has been truncated, see + # {Lithic::Models::CardAuthorization::LatestChallenge} for more details. + # + # The latest Authorization Challenge that was issued to the cardholder for this + # merchant. + # + # @param phone_number [String] The phone number used for sending Authorization Challenge SMS. + # + # @param status [Symbol, Lithic::Models::CardAuthorization::LatestChallenge::Status] The status of the Authorization Challenge + # + # @param completed_at [Time] The date and time when the Authorization Challenge was completed in UTC. Present + + # The status of the Authorization Challenge + # + # - `COMPLETED` - Challenge was successfully completed by the cardholder + # - `PENDING` - Challenge is still open + # - `EXPIRED` - Challenge has expired without being completed + # - `ERROR` - There was an error processing the challenge + # + # @see Lithic::Models::CardAuthorization::LatestChallenge#status + module Status + extend Lithic::Internal::Type::Enum + + COMPLETED = :COMPLETED + PENDING = :PENDING + EXPIRED = :EXPIRED + ERROR = :ERROR + + # @!method self.values + # @return [Array] + end + end + + # Card network of the authorization. + # + # @see Lithic::Models::CardAuthorization#network + module Network + extend Lithic::Internal::Type::Enum + + AMEX = :AMEX + INTERLINK = :INTERLINK + MAESTRO = :MAESTRO + MASTERCARD = :MASTERCARD + UNKNOWN = :UNKNOWN + VISA = :VISA + + # @!method self.values + # @return [Array] + end + + # @see Lithic::Models::CardAuthorization#network_specific_data + class NetworkSpecificData < Lithic::Internal::Type::BaseModel + # @!attribute mastercard + # + # @return [Lithic::Models::CardAuthorization::NetworkSpecificData::Mastercard, nil] + optional :mastercard, -> { Lithic::CardAuthorization::NetworkSpecificData::Mastercard }, nil?: true + + # @!attribute visa + # + # @return [Lithic::Models::CardAuthorization::NetworkSpecificData::Visa, nil] + optional :visa, -> { Lithic::CardAuthorization::NetworkSpecificData::Visa }, nil?: true + + # @!method initialize(mastercard: nil, visa: nil) + # Contains raw data provided by the card network, including attributes that + # provide further context about the authorization. If populated by the network, + # data is organized by Lithic and passed through without further modification. + # Please consult the official network documentation for more details about these + # values and how to use them. This object is only available to certain programs- + # contact your Customer Success Manager to discuss enabling access. + # + # @param mastercard [Lithic::Models::CardAuthorization::NetworkSpecificData::Mastercard, nil] + # @param visa [Lithic::Models::CardAuthorization::NetworkSpecificData::Visa, nil] + + # @see Lithic::Models::CardAuthorization::NetworkSpecificData#mastercard + class Mastercard < Lithic::Internal::Type::BaseModel + # @!attribute ecommerce_security_level_indicator + # Indicates the electronic commerce security level and UCAF collection. + # + # @return [String, nil] + optional :ecommerce_security_level_indicator, String, nil?: true + + # @!attribute on_behalf_service_result + # The On-behalf Service performed on the transaction and the results. Contains all + # applicable, on-behalf service results that were performed on a given + # transaction. + # + # @return [Array, nil] + optional :on_behalf_service_result, + -> { + Lithic::Internal::Type::ArrayOf[Lithic::CardAuthorization::NetworkSpecificData::Mastercard::OnBehalfServiceResult] + }, + nil?: true + + # @!attribute transaction_type_identifier + # Indicates the type of additional transaction purpose. + # + # @return [String, nil] + optional :transaction_type_identifier, String, nil?: true + + # @!method initialize(ecommerce_security_level_indicator: nil, on_behalf_service_result: nil, transaction_type_identifier: nil) + # Some parameter documentations has been truncated, see + # {Lithic::Models::CardAuthorization::NetworkSpecificData::Mastercard} for more + # details. + # + # @param ecommerce_security_level_indicator [String, nil] Indicates the electronic commerce security level and UCAF collection. + # + # @param on_behalf_service_result [Array, nil] The On-behalf Service performed on the transaction and the results. Contains all + # + # @param transaction_type_identifier [String, nil] Indicates the type of additional transaction purpose. + + class OnBehalfServiceResult < Lithic::Internal::Type::BaseModel + # @!attribute result_1 + # Indicates the results of the service processing. + # + # @return [String] + required :result_1, String + + # @!attribute result_2 + # Identifies the results of the service processing. + # + # @return [String] + required :result_2, String + + # @!attribute service + # Indicates the service performed on the transaction. + # + # @return [String] + required :service, String + + # @!method initialize(result_1:, result_2:, service:) + # @param result_1 [String] Indicates the results of the service processing. + # + # @param result_2 [String] Identifies the results of the service processing. + # + # @param service [String] Indicates the service performed on the transaction. + end + end + + # @see Lithic::Models::CardAuthorization::NetworkSpecificData#visa + class Visa < Lithic::Internal::Type::BaseModel + # @!attribute business_application_identifier + # Identifies the purpose or category of a transaction, used to classify and + # process transactions according to Visa’s rules. + # + # @return [String, nil] + optional :business_application_identifier, String, nil?: true + + # @!method initialize(business_application_identifier: nil) + # Some parameter documentations has been truncated, see + # {Lithic::Models::CardAuthorization::NetworkSpecificData::Visa} for more details. + # + # @param business_application_identifier [String, nil] Identifies the purpose or category of a transaction, used to classify and proces + end + end + + # @see Lithic::Models::CardAuthorization#pos + class Pos < Lithic::Internal::Type::BaseModel + # @!attribute entry_mode + # POS > Entry Mode object in ASA + # + # @return [Lithic::Models::CardAuthorization::Pos::EntryMode, nil] + optional :entry_mode, -> { Lithic::CardAuthorization::Pos::EntryMode } + + # @!attribute terminal + # + # @return [Lithic::Models::CardAuthorization::Pos::Terminal, nil] + optional :terminal, -> { Lithic::CardAuthorization::Pos::Terminal } + + # @!method initialize(entry_mode: nil, terminal: nil) + # @param entry_mode [Lithic::Models::CardAuthorization::Pos::EntryMode] POS > Entry Mode object in ASA + # + # @param terminal [Lithic::Models::CardAuthorization::Pos::Terminal] + + # @see Lithic::Models::CardAuthorization::Pos#entry_mode + class EntryMode < Lithic::Internal::Type::BaseModel + # @!attribute card + # Card Presence Indicator + # + # @return [Symbol, Lithic::Models::CardAuthorization::Pos::EntryMode::Card, nil] + optional :card, enum: -> { Lithic::CardAuthorization::Pos::EntryMode::Card } + + # @!attribute cardholder + # Cardholder Presence Indicator + # + # @return [Symbol, Lithic::Models::CardAuthorization::Pos::EntryMode::Cardholder, nil] + optional :cardholder, enum: -> { Lithic::CardAuthorization::Pos::EntryMode::Cardholder } + + # @!attribute pan + # Method of entry for the PAN + # + # @return [Symbol, Lithic::Models::CardAuthorization::Pos::EntryMode::Pan, nil] + optional :pan, enum: -> { Lithic::CardAuthorization::Pos::EntryMode::Pan } + + # @!attribute pin_entered + # Indicates whether the cardholder entered the PIN. True if the PIN was entered. + # + # @return [Boolean, nil] + optional :pin_entered, Lithic::Internal::Type::Boolean + + # @!method initialize(card: nil, cardholder: nil, pan: nil, pin_entered: nil) + # POS > Entry Mode object in ASA + # + # @param card [Symbol, Lithic::Models::CardAuthorization::Pos::EntryMode::Card] Card Presence Indicator + # + # @param cardholder [Symbol, Lithic::Models::CardAuthorization::Pos::EntryMode::Cardholder] Cardholder Presence Indicator + # + # @param pan [Symbol, Lithic::Models::CardAuthorization::Pos::EntryMode::Pan] Method of entry for the PAN + # + # @param pin_entered [Boolean] Indicates whether the cardholder entered the PIN. True if the PIN was entered. + + # Card Presence Indicator + # + # @see Lithic::Models::CardAuthorization::Pos::EntryMode#card + module Card + extend Lithic::Internal::Type::Enum + + PRESENT = :PRESENT + NOT_PRESENT = :NOT_PRESENT + UNKNOWN = :UNKNOWN + + # @!method self.values + # @return [Array] + end + + # Cardholder Presence Indicator + # + # @see Lithic::Models::CardAuthorization::Pos::EntryMode#cardholder + module Cardholder + extend Lithic::Internal::Type::Enum + + DEFERRED_BILLING = :DEFERRED_BILLING + ELECTRONIC_ORDER = :ELECTRONIC_ORDER + INSTALLMENT = :INSTALLMENT + MAIL_ORDER = :MAIL_ORDER + NOT_PRESENT = :NOT_PRESENT + PRESENT = :PRESENT + REOCCURRING = :REOCCURRING + TELEPHONE_ORDER = :TELEPHONE_ORDER + UNKNOWN = :UNKNOWN + + # @!method self.values + # @return [Array] + end + + # Method of entry for the PAN + # + # @see Lithic::Models::CardAuthorization::Pos::EntryMode#pan + module Pan + extend Lithic::Internal::Type::Enum + + AUTO_ENTRY = :AUTO_ENTRY + BAR_CODE = :BAR_CODE + CONTACTLESS = :CONTACTLESS + ECOMMERCE = :ECOMMERCE + ERROR_KEYED = :ERROR_KEYED + ERROR_MAGNETIC_STRIPE = :ERROR_MAGNETIC_STRIPE + ICC = :ICC + KEY_ENTERED = :KEY_ENTERED + MAGNETIC_STRIPE = :MAGNETIC_STRIPE + MANUAL = :MANUAL + OCR = :OCR + SECURE_CARDLESS = :SECURE_CARDLESS + UNSPECIFIED = :UNSPECIFIED + UNKNOWN = :UNKNOWN + CREDENTIAL_ON_FILE = :CREDENTIAL_ON_FILE + + # @!method self.values + # @return [Array] + end + end + + # @see Lithic::Models::CardAuthorization::Pos#terminal + class Terminal < Lithic::Internal::Type::BaseModel + # @!attribute attended + # True if a clerk is present at the sale. + # + # @return [Boolean] + required :attended, Lithic::Internal::Type::Boolean + + # @!attribute card_retention_capable + # True if the terminal is capable of retaining the card. + # + # @return [Boolean] + required :card_retention_capable, Lithic::Internal::Type::Boolean + + # @!attribute on_premise + # True if the sale was made at the place of business (vs. mobile). + # + # @return [Boolean] + required :on_premise, Lithic::Internal::Type::Boolean + + # @!attribute operator + # The person that is designated to swipe the card + # + # @return [Symbol, Lithic::Models::CardAuthorization::Pos::Terminal::Operator] + required :operator, enum: -> { Lithic::CardAuthorization::Pos::Terminal::Operator } + + # @!attribute partial_approval_capable + # True if the terminal is capable of partial approval. Partial approval is when + # part of a transaction is approved and another payment must be used for the + # remainder. Example scenario: A $40 transaction is attempted on a prepaid card + # with a $25 balance. If partial approval is enabled, $25 can be authorized, at + # which point the POS will prompt the user for an additional payment of $15. + # + # @return [Boolean] + required :partial_approval_capable, Lithic::Internal::Type::Boolean + + # @!attribute pin_capability + # Status of whether the POS is able to accept PINs + # + # @return [Symbol, Lithic::Models::CardAuthorization::Pos::Terminal::PinCapability] + required :pin_capability, enum: -> { Lithic::CardAuthorization::Pos::Terminal::PinCapability } + + # @!attribute type + # POS Type + # + # @return [Symbol, Lithic::Models::CardAuthorization::Pos::Terminal::Type] + required :type, enum: -> { Lithic::CardAuthorization::Pos::Terminal::Type } + + # @!attribute acceptor_terminal_id + # Uniquely identifies a terminal at the card acceptor location of acquiring + # institutions or merchant POS Systems. Left justified with trailing spaces. + # + # @return [String, nil] + optional :acceptor_terminal_id, String, nil?: true + + # @!method initialize(attended:, card_retention_capable:, on_premise:, operator:, partial_approval_capable:, pin_capability:, type:, acceptor_terminal_id: nil) + # Some parameter documentations has been truncated, see + # {Lithic::Models::CardAuthorization::Pos::Terminal} for more details. + # + # @param attended [Boolean] True if a clerk is present at the sale. + # + # @param card_retention_capable [Boolean] True if the terminal is capable of retaining the card. + # + # @param on_premise [Boolean] True if the sale was made at the place of business (vs. mobile). + # + # @param operator [Symbol, Lithic::Models::CardAuthorization::Pos::Terminal::Operator] The person that is designated to swipe the card + # + # @param partial_approval_capable [Boolean] True if the terminal is capable of partial approval. Partial approval is when pa + # + # @param pin_capability [Symbol, Lithic::Models::CardAuthorization::Pos::Terminal::PinCapability] Status of whether the POS is able to accept PINs + # + # @param type [Symbol, Lithic::Models::CardAuthorization::Pos::Terminal::Type] POS Type + # + # @param acceptor_terminal_id [String, nil] Uniquely identifies a terminal at the card acceptor location of acquiring instit + + # The person that is designated to swipe the card + # + # @see Lithic::Models::CardAuthorization::Pos::Terminal#operator + module Operator + extend Lithic::Internal::Type::Enum + + ADMINISTRATIVE = :ADMINISTRATIVE + CARDHOLDER = :CARDHOLDER + CARD_ACCEPTOR = :CARD_ACCEPTOR + UNKNOWN = :UNKNOWN + + # @!method self.values + # @return [Array] + end + + # Status of whether the POS is able to accept PINs + # + # @see Lithic::Models::CardAuthorization::Pos::Terminal#pin_capability + module PinCapability + extend Lithic::Internal::Type::Enum + + CAPABLE = :CAPABLE + INOPERATIVE = :INOPERATIVE + NOT_CAPABLE = :NOT_CAPABLE + UNSPECIFIED = :UNSPECIFIED + + # @!method self.values + # @return [Array] + end + + # POS Type + # + # @see Lithic::Models::CardAuthorization::Pos::Terminal#type + module Type + extend Lithic::Internal::Type::Enum + + ADMINISTRATIVE = :ADMINISTRATIVE + ATM = :ATM + AUTHORIZATION = :AUTHORIZATION + COUPON_MACHINE = :COUPON_MACHINE + DIAL_TERMINAL = :DIAL_TERMINAL + ECOMMERCE = :ECOMMERCE + ECR = :ECR + FUEL_MACHINE = :FUEL_MACHINE + HOME_TERMINAL = :HOME_TERMINAL + MICR = :MICR + OFF_PREMISE = :OFF_PREMISE + PAYMENT = :PAYMENT + PDA = :PDA + PHONE = :PHONE + POINT = :POINT + POS_TERMINAL = :POS_TERMINAL + PUBLIC_UTILITY = :PUBLIC_UTILITY + SELF_SERVICE = :SELF_SERVICE + TELEVISION = :TELEVISION + TELLER = :TELLER + TRAVELERS_CHECK_MACHINE = :TRAVELERS_CHECK_MACHINE + VENDING = :VENDING + VOICE = :VOICE + UNKNOWN = :UNKNOWN + + # @!method self.values + # @return [Array] + end + end + end + end + end +end diff --git a/lib/lithic/models/card_authorization_approval_request_webhook_event.rb b/lib/lithic/models/card_authorization_approval_request_webhook_event.rb index 331156be..fd63274e 100644 --- a/lib/lithic/models/card_authorization_approval_request_webhook_event.rb +++ b/lib/lithic/models/card_authorization_approval_request_webhook_event.rb @@ -2,1266 +2,16 @@ module Lithic module Models - class CardAuthorizationApprovalRequestWebhookEvent < Lithic::Internal::Type::BaseModel - # @!attribute token - # The provisional transaction group uuid associated with the authorization - # - # @return [String] - required :token, String - - # @!attribute acquirer_fee - # Fee (in cents) assessed by the merchant and paid for by the cardholder. Will be - # zero if no fee is assessed. Rebates may be transmitted as a negative value to - # indicate credited fees. - # - # @return [Integer] - required :acquirer_fee, Integer - - # @!attribute amount - # @deprecated - # - # Deprecated, use `amounts`. Authorization amount of the transaction (in cents), - # including any acquirer fees. The contents of this field are identical to - # `authorization_amount`. - # - # @return [Integer] - required :amount, Integer - - # @!attribute amounts - # Structured amounts for this authorization. The `cardholder` and `merchant` - # amounts reflect the original network authorization values. For programs with - # hold adjustments enabled (e.g., automated fuel dispensers or tipping MCCs), the - # `hold` amount may exceed the `cardholder` and `merchant` amounts to account for - # anticipated final transaction amounts such as tips or fuel fill-ups - # - # @return [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Amounts] - required :amounts, -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts } - - # @!attribute authorization_amount - # @deprecated - # - # Deprecated, use `amounts`. The base transaction amount (in cents) plus the - # acquirer fee field. This is the amount the issuer should authorize against - # unless the issuer is paying the acquirer fee on behalf of the cardholder. - # - # @return [Integer] - required :authorization_amount, Integer - - # @!attribute avs - # - # @return [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Avs] - required :avs, -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs } - - # @!attribute card - # Card object in ASA - # - # @return [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Card] - required :card, -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card } - - # @!attribute cardholder_currency - # @deprecated - # - # Deprecated, use `amounts`. 3-character alphabetic ISO 4217 code for cardholder's - # billing currency. - # - # @return [String] - required :cardholder_currency, String - - # @!attribute cash_amount - # The portion of the transaction requested as cash back by the cardholder, and - # does not include any acquirer fees. The amount field includes the purchase - # amount, the requested cash back amount, and any acquirer fees. - # - # If no cash back was requested, the value of this field will be 0, and the field - # will always be present. - # - # @return [Integer] - required :cash_amount, Integer - - # @!attribute created - # Date and time when the transaction first occurred in UTC. - # - # @return [Time] - required :created, Time - + class CardAuthorizationApprovalRequestWebhookEvent < Lithic::Models::CardAuthorization # @!attribute event_type # # @return [Symbol, :"card_authorization.approval_request"] required :event_type, const: :"card_authorization.approval_request" - # @!attribute merchant - # Merchant information including full location details. - # - # @return [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Merchant] - required :merchant, -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Merchant } - - # @!attribute merchant_amount - # @deprecated - # - # Deprecated, use `amounts`. The amount that the merchant will receive, - # denominated in `merchant_currency` and in the smallest currency unit. Note the - # amount includes `acquirer_fee`, similar to `authorization_amount`. It will be - # different from `authorization_amount` if the merchant is taking payment in a - # different currency. - # - # @return [Integer] - required :merchant_amount, Integer - - # @!attribute merchant_currency - # @deprecated - # - # 3-character alphabetic ISO 4217 code for the local currency of the transaction. - # - # @return [String] - required :merchant_currency, String - - # @!attribute service_location - # Where the cardholder received the service, when different from the card acceptor - # location. This is populated from network data elements such as Mastercard DE-122 - # SE1 SF9-14 and Visa F34 DS02. - # - # @return [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::ServiceLocation, nil] - required :service_location, - -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::ServiceLocation }, - nil?: true - - # @!attribute settled_amount - # @deprecated - # - # Deprecated, use `amounts`. Amount (in cents) of the transaction that has been - # settled, including any acquirer fees. - # - # @return [Integer] - required :settled_amount, Integer - - # @!attribute status - # The type of authorization request that this request is for. Note that - # `CREDIT_AUTHORIZATION` and `FINANCIAL_CREDIT_AUTHORIZATION` is only available to - # users with credit decisioning via ASA enabled. - # - # @return [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Status] - required :status, enum: -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Status } - - # @!attribute transaction_initiator - # The entity that initiated the transaction. - # - # @return [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::TransactionInitiator] - required :transaction_initiator, - enum: -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::TransactionInitiator } - - # @!attribute account_type - # - # @return [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::AccountType, nil] - optional :account_type, enum: -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::AccountType } - - # @!attribute cardholder_authentication - # - # @return [Lithic::Models::CardholderAuthentication, nil] - optional :cardholder_authentication, -> { Lithic::CardholderAuthentication } - - # @!attribute cashback - # Deprecated, use `cash_amount`. - # - # @return [Integer, nil] - optional :cashback, Integer - - # @!attribute conversion_rate - # @deprecated - # - # Deprecated, use `amounts`. If the transaction was requested in a currency other - # than the settlement currency, this field will be populated to indicate the rate - # used to translate the merchant_amount to the amount (i.e., `merchant_amount` x - # `conversion_rate` = `amount`). Note that the `merchant_amount` is in the local - # currency and the amount is in the settlement currency. - # - # @return [Float, nil] - optional :conversion_rate, Float - - # @!attribute event_token - # The event token associated with the authorization. This field is only set for - # programs enrolled into the beta. - # - # @return [String, nil] - optional :event_token, String - - # @!attribute fleet_info - # Optional Object containing information if the Card is a part of a Fleet managed - # program - # - # @return [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo, nil] - optional :fleet_info, -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo }, nil?: true - - # @!attribute latest_challenge - # The latest Authorization Challenge that was issued to the cardholder for this - # merchant. - # - # @return [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge, nil] - optional :latest_challenge, -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge } - - # @!attribute network - # Card network of the authorization. - # - # @return [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Network, nil] - optional :network, enum: -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Network } - - # @!attribute network_risk_score - # Network-provided score assessing risk level associated with a given - # authorization. Scores are on a range of 0-999, with 0 representing the lowest - # risk and 999 representing the highest risk. For Visa transactions, where the raw - # score has a range of 0-99, Lithic will normalize the score by multiplying the - # raw score by 10x. - # - # @return [Integer, nil] - optional :network_risk_score, Integer, nil?: true - - # @!attribute network_specific_data - # Contains raw data provided by the card network, including attributes that - # provide further context about the authorization. If populated by the network, - # data is organized by Lithic and passed through without further modification. - # Please consult the official network documentation for more details about these - # values and how to use them. This object is only available to certain programs- - # contact your Customer Success Manager to discuss enabling access. - # - # @return [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData, nil] - optional :network_specific_data, - -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData }, - nil?: true - - # @!attribute pos - # - # @return [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos, nil] - optional :pos, -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos } - - # @!attribute token_info - # - # @return [Lithic::Models::TokenInfo, nil] - optional :token_info, -> { Lithic::TokenInfo }, nil?: true - - # @!attribute ttl - # Deprecated: approximate time-to-live for the authorization. - # - # @return [Time, nil] - optional :ttl, Time - - # @!method initialize(token:, acquirer_fee:, amount:, amounts:, authorization_amount:, avs:, card:, cardholder_currency:, cash_amount:, created:, merchant:, merchant_amount:, merchant_currency:, service_location:, settled_amount:, status:, transaction_initiator:, account_type: nil, cardholder_authentication: nil, cashback: nil, conversion_rate: nil, event_token: nil, fleet_info: nil, latest_challenge: nil, network: nil, network_risk_score: nil, network_specific_data: nil, pos: nil, token_info: nil, ttl: nil, event_type: :"card_authorization.approval_request") - # Some parameter documentations has been truncated, see - # {Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent} for more details. - # - # @param token [String] The provisional transaction group uuid associated with the authorization - # - # @param acquirer_fee [Integer] Fee (in cents) assessed by the merchant and paid for by the cardholder. Will be - # - # @param amount [Integer] Deprecated, use `amounts`. Authorization amount of the transaction (in cents), i - # - # @param amounts [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Amounts] Structured amounts for this authorization. The `cardholder` and `merchant` amoun - # - # @param authorization_amount [Integer] Deprecated, use `amounts`. The base transaction amount (in cents) plus the acqui - # - # @param avs [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Avs] - # - # @param card [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Card] Card object in ASA - # - # @param cardholder_currency [String] Deprecated, use `amounts`. 3-character alphabetic ISO 4217 code for cardholder's - # - # @param cash_amount [Integer] The portion of the transaction requested as cash back by the cardholder, and doe - # - # @param created [Time] Date and time when the transaction first occurred in UTC. - # - # @param merchant [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Merchant] Merchant information including full location details. - # - # @param merchant_amount [Integer] Deprecated, use `amounts`. The amount that the merchant will receive, denominate - # - # @param merchant_currency [String] 3-character alphabetic ISO 4217 code for the local currency of the transaction. - # - # @param service_location [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::ServiceLocation, nil] Where the cardholder received the service, when different from the card acceptor - # - # @param settled_amount [Integer] Deprecated, use `amounts`. Amount (in cents) of the transaction that has been se - # - # @param status [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Status] The type of authorization request that this request is for. Note that `CREDIT_AU - # - # @param transaction_initiator [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::TransactionInitiator] The entity that initiated the transaction. - # - # @param account_type [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::AccountType] - # - # @param cardholder_authentication [Lithic::Models::CardholderAuthentication] - # - # @param cashback [Integer] Deprecated, use `cash_amount`. - # - # @param conversion_rate [Float] Deprecated, use `amounts`. If the transaction was requested in a currency other - # - # @param event_token [String] The event token associated with the authorization. This field is only set for pr - # - # @param fleet_info [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo, nil] Optional Object containing information if the Card is a part of a Fleet managed - # - # @param latest_challenge [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge] The latest Authorization Challenge that was issued to the cardholder for this me - # - # @param network [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Network] Card network of the authorization. - # - # @param network_risk_score [Integer, nil] Network-provided score assessing risk level associated with a given authorizatio - # - # @param network_specific_data [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData, nil] Contains raw data provided by the card network, including attributes that provid - # - # @param pos [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos] - # - # @param token_info [Lithic::Models::TokenInfo, nil] - # - # @param ttl [Time] Deprecated: approximate time-to-live for the authorization. + # @!method initialize(event_type: :"card_authorization.approval_request") + # The Auth Stream Access request payload that was sent to the ASA responder. # # @param event_type [Symbol, :"card_authorization.approval_request"] - - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent#amounts - class Amounts < Lithic::Internal::Type::BaseModel - # @!attribute cardholder - # - # @return [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder] - required :cardholder, -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder } - - # @!attribute hold - # - # @return [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold, nil] - required :hold, -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold }, nil?: true - - # @!attribute merchant - # - # @return [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant] - required :merchant, -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant } - - # @!attribute settlement - # - # @return [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement, nil] - required :settlement, - -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement }, - nil?: true - - # @!method initialize(cardholder:, hold:, merchant:, settlement:) - # Structured amounts for this authorization. The `cardholder` and `merchant` - # amounts reflect the original network authorization values. For programs with - # hold adjustments enabled (e.g., automated fuel dispensers or tipping MCCs), the - # `hold` amount may exceed the `cardholder` and `merchant` amounts to account for - # anticipated final transaction amounts such as tips or fuel fill-ups - # - # @param cardholder [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder] - # @param hold [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold, nil] - # @param merchant [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant] - # @param settlement [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement, nil] - - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Amounts#cardholder - class Cardholder < Lithic::Internal::Type::BaseModel - # @!attribute amount - # Amount in the smallest unit of the applicable currency (e.g., cents) - # - # @return [Integer] - required :amount, Integer - - # @!attribute conversion_rate - # Exchange rate used for currency conversion - # - # @return [String] - required :conversion_rate, String - - # @!attribute currency - # 3-character alphabetic ISO 4217 currency - # - # @return [String] - required :currency, String - - # @!method initialize(amount:, conversion_rate:, currency:) - # @param amount [Integer] Amount in the smallest unit of the applicable currency (e.g., cents) - # - # @param conversion_rate [String] Exchange rate used for currency conversion - # - # @param currency [String] 3-character alphabetic ISO 4217 currency - end - - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Amounts#hold - class Hold < Lithic::Internal::Type::BaseModel - # @!attribute amount - # Amount in the smallest unit of the applicable currency (e.g., cents) - # - # @return [Integer] - required :amount, Integer - - # @!attribute currency - # 3-character alphabetic ISO 4217 currency - # - # @return [String] - required :currency, String - - # @!method initialize(amount:, currency:) - # @param amount [Integer] Amount in the smallest unit of the applicable currency (e.g., cents) - # - # @param currency [String] 3-character alphabetic ISO 4217 currency - end - - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Amounts#merchant - class Merchant < Lithic::Internal::Type::BaseModel - # @!attribute amount - # Amount in the smallest unit of the applicable currency (e.g., cents) - # - # @return [Integer] - required :amount, Integer - - # @!attribute currency - # 3-character alphabetic ISO 4217 currency - # - # @return [String] - required :currency, String - - # @!method initialize(amount:, currency:) - # @param amount [Integer] Amount in the smallest unit of the applicable currency (e.g., cents) - # - # @param currency [String] 3-character alphabetic ISO 4217 currency - end - - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Amounts#settlement - class Settlement < Lithic::Internal::Type::BaseModel - # @!attribute amount - # Amount in the smallest unit of the applicable currency (e.g., cents) - # - # @return [Integer] - required :amount, Integer - - # @!attribute currency - # 3-character alphabetic ISO 4217 currency - # - # @return [String] - required :currency, String - - # @!method initialize(amount:, currency:) - # @param amount [Integer] Amount in the smallest unit of the applicable currency (e.g., cents) - # - # @param currency [String] 3-character alphabetic ISO 4217 currency - end - end - - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent#avs - class Avs < Lithic::Internal::Type::BaseModel - # @!attribute address - # Cardholder address - # - # @return [String] - required :address, String - - # @!attribute address_on_file_match - # Lithic's evaluation result comparing the transaction's address data with the - # cardholder KYC data if it exists. In the event Lithic does not have any - # Cardholder KYC data, or the transaction does not contain any address data, - # NOT_PRESENT will be returned - # - # @return [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Avs::AddressOnFileMatch] - required :address_on_file_match, - enum: -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs::AddressOnFileMatch } - - # @!attribute zipcode - # Cardholder ZIP code - # - # @return [String] - required :zipcode, String - - # @!method initialize(address:, address_on_file_match:, zipcode:) - # Some parameter documentations has been truncated, see - # {Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Avs} for more - # details. - # - # @param address [String] Cardholder address - # - # @param address_on_file_match [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Avs::AddressOnFileMatch] Lithic's evaluation result comparing the transaction's address data with the car - # - # @param zipcode [String] Cardholder ZIP code - - # Lithic's evaluation result comparing the transaction's address data with the - # cardholder KYC data if it exists. In the event Lithic does not have any - # Cardholder KYC data, or the transaction does not contain any address data, - # NOT_PRESENT will be returned - # - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Avs#address_on_file_match - module AddressOnFileMatch - extend Lithic::Internal::Type::Enum - - MATCH = :MATCH - MATCH_ADDRESS_ONLY = :MATCH_ADDRESS_ONLY - MATCH_ZIP_ONLY = :MATCH_ZIP_ONLY - MISMATCH = :MISMATCH - NOT_PRESENT = :NOT_PRESENT - - # @!method self.values - # @return [Array] - end - end - - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent#card - class Card < Lithic::Internal::Type::BaseModel - # @!attribute token - # Globally unique identifier for the card. - # - # @return [String] - required :token, String - - # @!attribute last_four - # Last four digits of the card number - # - # @return [String] - required :last_four, String - - # @!attribute memo - # Customizable name to identify the card - # - # @return [String] - required :memo, String - - # @!attribute spend_limit - # Amount (in cents) to limit approved authorizations. Purchase requests above the - # spend limit will be declined (refunds and credits will be approved). - # - # Note that while spend limits are enforced based on authorized and settled volume - # on a card, they are not recommended to be used for balance or - # reconciliation-level accuracy. Spend limits also cannot block force posted - # charges (i.e., when a merchant sends a clearing message without a prior - # authorization). - # - # @return [Integer] - required :spend_limit, Integer - - # @!attribute spend_limit_duration - # Note that to support recurring monthly payments, which can occur on different - # day every month, the time window we consider for MONTHLY velocity starts 6 days - # after the current calendar date one month prior. - # - # @return [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Card::SpendLimitDuration] - required :spend_limit_duration, - enum: -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::SpendLimitDuration } - - # @!attribute state - # - # @return [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Card::State] - required :state, enum: -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::State } - - # @!attribute type - # - # @return [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Card::Type] - required :type, enum: -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::Type } - - # @!method initialize(token:, last_four:, memo:, spend_limit:, spend_limit_duration:, state:, type:) - # Some parameter documentations has been truncated, see - # {Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Card} for more - # details. - # - # Card object in ASA - # - # @param token [String] Globally unique identifier for the card. - # - # @param last_four [String] Last four digits of the card number - # - # @param memo [String] Customizable name to identify the card - # - # @param spend_limit [Integer] Amount (in cents) to limit approved authorizations. Purchase requests above the - # - # @param spend_limit_duration [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Card::SpendLimitDuration] Note that to support recurring monthly payments, which can occur on different da - # - # @param state [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Card::State] - # - # @param type [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Card::Type] - - # Note that to support recurring monthly payments, which can occur on different - # day every month, the time window we consider for MONTHLY velocity starts 6 days - # after the current calendar date one month prior. - # - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Card#spend_limit_duration - module SpendLimitDuration - extend Lithic::Internal::Type::Enum - - ANNUALLY = :ANNUALLY - FOREVER = :FOREVER - MONTHLY = :MONTHLY - TRANSACTION = :TRANSACTION - - # @!method self.values - # @return [Array] - end - - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Card#state - module State - extend Lithic::Internal::Type::Enum - - CLOSED = :CLOSED - OPEN = :OPEN - PAUSED = :PAUSED - PENDING_ACTIVATION = :PENDING_ACTIVATION - PENDING_FULFILLMENT = :PENDING_FULFILLMENT - - # @!method self.values - # @return [Array] - end - - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Card#type - module Type - extend Lithic::Internal::Type::Enum - - SINGLE_USE = :SINGLE_USE - MERCHANT_LOCKED = :MERCHANT_LOCKED - UNLOCKED = :UNLOCKED - PHYSICAL = :PHYSICAL - DIGITAL_WALLET = :DIGITAL_WALLET - VIRTUAL = :VIRTUAL - - # @!method self.values - # @return [Array] - end - end - - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent#merchant - class Merchant < Lithic::Models::Merchant - # @!attribute phone_number - # Phone number of card acceptor. - # - # @return [String, nil] - required :phone_number, String, nil?: true - - # @!attribute postal_code - # Postal code of card acceptor. - # - # @return [String, nil] - required :postal_code, String, nil?: true - - # @!attribute street_address - # Street address of card acceptor. - # - # @return [String, nil] - required :street_address, String, nil?: true - - # @!method initialize(phone_number:, postal_code:, street_address:) - # Merchant information including full location details. - # - # @param phone_number [String, nil] Phone number of card acceptor. - # - # @param postal_code [String, nil] Postal code of card acceptor. - # - # @param street_address [String, nil] Street address of card acceptor. - end - - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent#service_location - class ServiceLocation < Lithic::Internal::Type::BaseModel - # @!attribute city - # City of service location. - # - # @return [String, nil] - required :city, String, nil?: true - - # @!attribute country - # Country code of service location, ISO 3166-1 alpha-3. - # - # @return [String, nil] - required :country, String, nil?: true - - # @!attribute postal_code - # Postal code of service location. - # - # @return [String, nil] - required :postal_code, String, nil?: true - - # @!attribute state - # State/province code of service location, ISO 3166-2. - # - # @return [String, nil] - required :state, String, nil?: true - - # @!attribute street_address - # Street address of service location. - # - # @return [String, nil] - required :street_address, String, nil?: true - - # @!method initialize(city:, country:, postal_code:, state:, street_address:) - # Where the cardholder received the service, when different from the card acceptor - # location. This is populated from network data elements such as Mastercard DE-122 - # SE1 SF9-14 and Visa F34 DS02. - # - # @param city [String, nil] City of service location. - # - # @param country [String, nil] Country code of service location, ISO 3166-1 alpha-3. - # - # @param postal_code [String, nil] Postal code of service location. - # - # @param state [String, nil] State/province code of service location, ISO 3166-2. - # - # @param street_address [String, nil] Street address of service location. - end - - # The type of authorization request that this request is for. Note that - # `CREDIT_AUTHORIZATION` and `FINANCIAL_CREDIT_AUTHORIZATION` is only available to - # users with credit decisioning via ASA enabled. - # - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent#status - module Status - extend Lithic::Internal::Type::Enum - - AUTHORIZATION = :AUTHORIZATION - CREDIT_AUTHORIZATION = :CREDIT_AUTHORIZATION - FINANCIAL_AUTHORIZATION = :FINANCIAL_AUTHORIZATION - FINANCIAL_CREDIT_AUTHORIZATION = :FINANCIAL_CREDIT_AUTHORIZATION - BALANCE_INQUIRY = :BALANCE_INQUIRY - - # @!method self.values - # @return [Array] - end - - # The entity that initiated the transaction. - # - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent#transaction_initiator - module TransactionInitiator - extend Lithic::Internal::Type::Enum - - CARDHOLDER = :CARDHOLDER - MERCHANT = :MERCHANT - UNKNOWN = :UNKNOWN - - # @!method self.values - # @return [Array] - end - - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent#account_type - module AccountType - extend Lithic::Internal::Type::Enum - - CHECKING = :CHECKING - SAVINGS = :SAVINGS - - # @!method self.values - # @return [Array] - end - - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent#fleet_info - class FleetInfo < Lithic::Internal::Type::BaseModel - # @!attribute fleet_prompt_code - # Code indicating what the driver was prompted to enter at time of purchase. This - # is configured at a program level and is a static configuration, and does not - # change on a request to request basis - # - # @return [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetPromptCode] - required :fleet_prompt_code, - enum: -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetPromptCode } - - # @!attribute fleet_restriction_code - # Code indicating which restrictions, if any, there are on purchase. This is - # configured at a program level and is a static configuration, and does not change - # on a request to request basis - # - # @return [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetRestrictionCode] - required :fleet_restriction_code, - enum: -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetRestrictionCode } - - # @!attribute driver_number - # Number representing the driver - # - # @return [String, nil] - optional :driver_number, String, nil?: true - - # @!attribute vehicle_number - # Number associated with the vehicle - # - # @return [String, nil] - optional :vehicle_number, String, nil?: true - - # @!method initialize(fleet_prompt_code:, fleet_restriction_code:, driver_number: nil, vehicle_number: nil) - # Some parameter documentations has been truncated, see - # {Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo} for - # more details. - # - # Optional Object containing information if the Card is a part of a Fleet managed - # program - # - # @param fleet_prompt_code [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetPromptCode] Code indicating what the driver was prompted to enter at time of purchase. This - # - # @param fleet_restriction_code [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetRestrictionCode] Code indicating which restrictions, if any, there are on purchase. This is confi - # - # @param driver_number [String, nil] Number representing the driver - # - # @param vehicle_number [String, nil] Number associated with the vehicle - - # Code indicating what the driver was prompted to enter at time of purchase. This - # is configured at a program level and is a static configuration, and does not - # change on a request to request basis - # - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo#fleet_prompt_code - module FleetPromptCode - extend Lithic::Internal::Type::Enum - - NO_PROMPT = :NO_PROMPT - VEHICLE_NUMBER = :VEHICLE_NUMBER - DRIVER_NUMBER = :DRIVER_NUMBER - - # @!method self.values - # @return [Array] - end - - # Code indicating which restrictions, if any, there are on purchase. This is - # configured at a program level and is a static configuration, and does not change - # on a request to request basis - # - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo#fleet_restriction_code - module FleetRestrictionCode - extend Lithic::Internal::Type::Enum - - NO_RESTRICTIONS = :NO_RESTRICTIONS - FUEL_ONLY = :FUEL_ONLY - - # @!method self.values - # @return [Array] - end - end - - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent#latest_challenge - class LatestChallenge < Lithic::Internal::Type::BaseModel - # @!attribute phone_number - # The phone number used for sending Authorization Challenge SMS. - # - # @return [String] - required :phone_number, String - - # @!attribute status - # The status of the Authorization Challenge - # - # - `COMPLETED` - Challenge was successfully completed by the cardholder - # - `PENDING` - Challenge is still open - # - `EXPIRED` - Challenge has expired without being completed - # - `ERROR` - There was an error processing the challenge - # - # @return [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::Status] - required :status, - enum: -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::Status } - - # @!attribute completed_at - # The date and time when the Authorization Challenge was completed in UTC. Present - # only if the status is `COMPLETED`. - # - # @return [Time, nil] - optional :completed_at, Time - - # @!method initialize(phone_number:, status:, completed_at: nil) - # Some parameter documentations has been truncated, see - # {Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge} - # for more details. - # - # The latest Authorization Challenge that was issued to the cardholder for this - # merchant. - # - # @param phone_number [String] The phone number used for sending Authorization Challenge SMS. - # - # @param status [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::Status] The status of the Authorization Challenge - # - # @param completed_at [Time] The date and time when the Authorization Challenge was completed in UTC. Present - - # The status of the Authorization Challenge - # - # - `COMPLETED` - Challenge was successfully completed by the cardholder - # - `PENDING` - Challenge is still open - # - `EXPIRED` - Challenge has expired without being completed - # - `ERROR` - There was an error processing the challenge - # - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge#status - module Status - extend Lithic::Internal::Type::Enum - - COMPLETED = :COMPLETED - PENDING = :PENDING - EXPIRED = :EXPIRED - ERROR = :ERROR - - # @!method self.values - # @return [Array] - end - end - - # Card network of the authorization. - # - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent#network - module Network - extend Lithic::Internal::Type::Enum - - AMEX = :AMEX - INTERLINK = :INTERLINK - MAESTRO = :MAESTRO - MASTERCARD = :MASTERCARD - UNKNOWN = :UNKNOWN - VISA = :VISA - - # @!method self.values - # @return [Array] - end - - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent#network_specific_data - class NetworkSpecificData < Lithic::Internal::Type::BaseModel - # @!attribute mastercard - # - # @return [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard, nil] - optional :mastercard, - -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard }, - nil?: true - - # @!attribute visa - # - # @return [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Visa, nil] - optional :visa, - -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Visa }, - nil?: true - - # @!method initialize(mastercard: nil, visa: nil) - # Contains raw data provided by the card network, including attributes that - # provide further context about the authorization. If populated by the network, - # data is organized by Lithic and passed through without further modification. - # Please consult the official network documentation for more details about these - # values and how to use them. This object is only available to certain programs- - # contact your Customer Success Manager to discuss enabling access. - # - # @param mastercard [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard, nil] - # @param visa [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Visa, nil] - - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData#mastercard - class Mastercard < Lithic::Internal::Type::BaseModel - # @!attribute ecommerce_security_level_indicator - # Indicates the electronic commerce security level and UCAF collection. - # - # @return [String, nil] - optional :ecommerce_security_level_indicator, String, nil?: true - - # @!attribute on_behalf_service_result - # The On-behalf Service performed on the transaction and the results. Contains all - # applicable, on-behalf service results that were performed on a given - # transaction. - # - # @return [Array, nil] - optional :on_behalf_service_result, - -> do - Lithic::Internal::Type::ArrayOf[ - Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard::OnBehalfServiceResult - ] - end, - nil?: true - - # @!attribute transaction_type_identifier - # Indicates the type of additional transaction purpose. - # - # @return [String, nil] - optional :transaction_type_identifier, String, nil?: true - - # @!method initialize(ecommerce_security_level_indicator: nil, on_behalf_service_result: nil, transaction_type_identifier: nil) - # Some parameter documentations has been truncated, see - # {Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard} - # for more details. - # - # @param ecommerce_security_level_indicator [String, nil] Indicates the electronic commerce security level and UCAF collection. - # - # @param on_behalf_service_result [Array, nil] The On-behalf Service performed on the transaction and the results. Contains all - # - # @param transaction_type_identifier [String, nil] Indicates the type of additional transaction purpose. - - class OnBehalfServiceResult < Lithic::Internal::Type::BaseModel - # @!attribute result_1 - # Indicates the results of the service processing. - # - # @return [String] - required :result_1, String - - # @!attribute result_2 - # Identifies the results of the service processing. - # - # @return [String] - required :result_2, String - - # @!attribute service - # Indicates the service performed on the transaction. - # - # @return [String] - required :service, String - - # @!method initialize(result_1:, result_2:, service:) - # @param result_1 [String] Indicates the results of the service processing. - # - # @param result_2 [String] Identifies the results of the service processing. - # - # @param service [String] Indicates the service performed on the transaction. - end - end - - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData#visa - class Visa < Lithic::Internal::Type::BaseModel - # @!attribute business_application_identifier - # Identifies the purpose or category of a transaction, used to classify and - # process transactions according to Visa’s rules. - # - # @return [String, nil] - optional :business_application_identifier, String, nil?: true - - # @!method initialize(business_application_identifier: nil) - # Some parameter documentations has been truncated, see - # {Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Visa} - # for more details. - # - # @param business_application_identifier [String, nil] Identifies the purpose or category of a transaction, used to classify and proces - end - end - - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent#pos - class Pos < Lithic::Internal::Type::BaseModel - # @!attribute entry_mode - # POS > Entry Mode object in ASA - # - # @return [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode, nil] - optional :entry_mode, -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode } - - # @!attribute terminal - # - # @return [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal, nil] - optional :terminal, -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal } - - # @!method initialize(entry_mode: nil, terminal: nil) - # @param entry_mode [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode] POS > Entry Mode object in ASA - # - # @param terminal [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal] - - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos#entry_mode - class EntryMode < Lithic::Internal::Type::BaseModel - # @!attribute card - # Card Presence Indicator - # - # @return [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Card, nil] - optional :card, enum: -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Card } - - # @!attribute cardholder - # Cardholder Presence Indicator - # - # @return [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder, nil] - optional :cardholder, - enum: -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder } - - # @!attribute pan - # Method of entry for the PAN - # - # @return [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan, nil] - optional :pan, enum: -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan } - - # @!attribute pin_entered - # Indicates whether the cardholder entered the PIN. True if the PIN was entered. - # - # @return [Boolean, nil] - optional :pin_entered, Lithic::Internal::Type::Boolean - - # @!method initialize(card: nil, cardholder: nil, pan: nil, pin_entered: nil) - # POS > Entry Mode object in ASA - # - # @param card [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Card] Card Presence Indicator - # - # @param cardholder [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder] Cardholder Presence Indicator - # - # @param pan [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan] Method of entry for the PAN - # - # @param pin_entered [Boolean] Indicates whether the cardholder entered the PIN. True if the PIN was entered. - - # Card Presence Indicator - # - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode#card - module Card - extend Lithic::Internal::Type::Enum - - PRESENT = :PRESENT - NOT_PRESENT = :NOT_PRESENT - UNKNOWN = :UNKNOWN - - # @!method self.values - # @return [Array] - end - - # Cardholder Presence Indicator - # - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode#cardholder - module Cardholder - extend Lithic::Internal::Type::Enum - - DEFERRED_BILLING = :DEFERRED_BILLING - ELECTRONIC_ORDER = :ELECTRONIC_ORDER - INSTALLMENT = :INSTALLMENT - MAIL_ORDER = :MAIL_ORDER - NOT_PRESENT = :NOT_PRESENT - PRESENT = :PRESENT - REOCCURRING = :REOCCURRING - TELEPHONE_ORDER = :TELEPHONE_ORDER - UNKNOWN = :UNKNOWN - - # @!method self.values - # @return [Array] - end - - # Method of entry for the PAN - # - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode#pan - module Pan - extend Lithic::Internal::Type::Enum - - AUTO_ENTRY = :AUTO_ENTRY - BAR_CODE = :BAR_CODE - CONTACTLESS = :CONTACTLESS - ECOMMERCE = :ECOMMERCE - ERROR_KEYED = :ERROR_KEYED - ERROR_MAGNETIC_STRIPE = :ERROR_MAGNETIC_STRIPE - ICC = :ICC - KEY_ENTERED = :KEY_ENTERED - MAGNETIC_STRIPE = :MAGNETIC_STRIPE - MANUAL = :MANUAL - OCR = :OCR - SECURE_CARDLESS = :SECURE_CARDLESS - UNSPECIFIED = :UNSPECIFIED - UNKNOWN = :UNKNOWN - CREDENTIAL_ON_FILE = :CREDENTIAL_ON_FILE - - # @!method self.values - # @return [Array] - end - end - - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos#terminal - class Terminal < Lithic::Internal::Type::BaseModel - # @!attribute attended - # True if a clerk is present at the sale. - # - # @return [Boolean] - required :attended, Lithic::Internal::Type::Boolean - - # @!attribute card_retention_capable - # True if the terminal is capable of retaining the card. - # - # @return [Boolean] - required :card_retention_capable, Lithic::Internal::Type::Boolean - - # @!attribute on_premise - # True if the sale was made at the place of business (vs. mobile). - # - # @return [Boolean] - required :on_premise, Lithic::Internal::Type::Boolean - - # @!attribute operator - # The person that is designated to swipe the card - # - # @return [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Operator] - required :operator, - enum: -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Operator } - - # @!attribute partial_approval_capable - # True if the terminal is capable of partial approval. Partial approval is when - # part of a transaction is approved and another payment must be used for the - # remainder. Example scenario: A $40 transaction is attempted on a prepaid card - # with a $25 balance. If partial approval is enabled, $25 can be authorized, at - # which point the POS will prompt the user for an additional payment of $15. - # - # @return [Boolean] - required :partial_approval_capable, Lithic::Internal::Type::Boolean - - # @!attribute pin_capability - # Status of whether the POS is able to accept PINs - # - # @return [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::PinCapability] - required :pin_capability, - enum: -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::PinCapability } - - # @!attribute type - # POS Type - # - # @return [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type] - required :type, enum: -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type } - - # @!attribute acceptor_terminal_id - # Uniquely identifies a terminal at the card acceptor location of acquiring - # institutions or merchant POS Systems. Left justified with trailing spaces. - # - # @return [String, nil] - optional :acceptor_terminal_id, String, nil?: true - - # @!method initialize(attended:, card_retention_capable:, on_premise:, operator:, partial_approval_capable:, pin_capability:, type:, acceptor_terminal_id: nil) - # Some parameter documentations has been truncated, see - # {Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal} - # for more details. - # - # @param attended [Boolean] True if a clerk is present at the sale. - # - # @param card_retention_capable [Boolean] True if the terminal is capable of retaining the card. - # - # @param on_premise [Boolean] True if the sale was made at the place of business (vs. mobile). - # - # @param operator [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Operator] The person that is designated to swipe the card - # - # @param partial_approval_capable [Boolean] True if the terminal is capable of partial approval. Partial approval is when pa - # - # @param pin_capability [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::PinCapability] Status of whether the POS is able to accept PINs - # - # @param type [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type] POS Type - # - # @param acceptor_terminal_id [String, nil] Uniquely identifies a terminal at the card acceptor location of acquiring instit - - # The person that is designated to swipe the card - # - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal#operator - module Operator - extend Lithic::Internal::Type::Enum - - ADMINISTRATIVE = :ADMINISTRATIVE - CARDHOLDER = :CARDHOLDER - CARD_ACCEPTOR = :CARD_ACCEPTOR - UNKNOWN = :UNKNOWN - - # @!method self.values - # @return [Array] - end - - # Status of whether the POS is able to accept PINs - # - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal#pin_capability - module PinCapability - extend Lithic::Internal::Type::Enum - - CAPABLE = :CAPABLE - INOPERATIVE = :INOPERATIVE - NOT_CAPABLE = :NOT_CAPABLE - UNSPECIFIED = :UNSPECIFIED - - # @!method self.values - # @return [Array] - end - - # POS Type - # - # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal#type - module Type - extend Lithic::Internal::Type::Enum - - ADMINISTRATIVE = :ADMINISTRATIVE - ATM = :ATM - AUTHORIZATION = :AUTHORIZATION - COUPON_MACHINE = :COUPON_MACHINE - DIAL_TERMINAL = :DIAL_TERMINAL - ECOMMERCE = :ECOMMERCE - ECR = :ECR - FUEL_MACHINE = :FUEL_MACHINE - HOME_TERMINAL = :HOME_TERMINAL - MICR = :MICR - OFF_PREMISE = :OFF_PREMISE - PAYMENT = :PAYMENT - PDA = :PDA - PHONE = :PHONE - POINT = :POINT - POS_TERMINAL = :POS_TERMINAL - PUBLIC_UTILITY = :PUBLIC_UTILITY - SELF_SERVICE = :SELF_SERVICE - TELEVISION = :TELEVISION - TELLER = :TELLER - TRAVELERS_CHECK_MACHINE = :TRAVELERS_CHECK_MACHINE - VENDING = :VENDING - VOICE = :VOICE - UNKNOWN = :UNKNOWN - - # @!method self.values - # @return [Array] - end - end - end end end end diff --git a/lib/lithic/models/card_authorization_challenge_response_params.rb b/lib/lithic/models/card_authorization_challenge_response_params.rb new file mode 100644 index 00000000..0b70fcef --- /dev/null +++ b/lib/lithic/models/card_authorization_challenge_response_params.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +module Lithic + module Models + # @see Lithic::Resources::CardAuthorizations#challenge_response + class CardAuthorizationChallengeResponseParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute event_token + # + # @return [String] + required :event_token, String + + # @!attribute response + # Whether the cardholder has approved or declined the issued challenge + # + # @return [Symbol, Lithic::Models::CardAuthorizationChallengeResponseParams::Response] + required :response, enum: -> { Lithic::CardAuthorizationChallengeResponseParams::Response } + + # @!method initialize(event_token:, response:, request_options: {}) + # @param event_token [String] + # + # @param response [Symbol, Lithic::Models::CardAuthorizationChallengeResponseParams::Response] Whether the cardholder has approved or declined the issued challenge + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + + # Whether the cardholder has approved or declined the issued challenge + module Response + extend Lithic::Internal::Type::Enum + + APPROVE = :APPROVE + DECLINE = :DECLINE + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/lithic/models/card_authorization_challenge_webhook_event.rb b/lib/lithic/models/card_authorization_challenge_webhook_event.rb new file mode 100644 index 00000000..48b95d5f --- /dev/null +++ b/lib/lithic/models/card_authorization_challenge_webhook_event.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +module Lithic + module Models + class CardAuthorizationChallengeWebhookEvent < Lithic::Internal::Type::BaseModel + # @!attribute authorization + # The authorization that triggered the challenge + # + # @return [Lithic::Models::CardAuthorization] + required :authorization, -> { Lithic::CardAuthorization } + + # @!attribute challenge + # Details of the Authorization Challenge issued during card authorization + # + # @return [Lithic::Models::CardAuthorizationChallengeWebhookEvent::Challenge] + required :challenge, -> { Lithic::CardAuthorizationChallengeWebhookEvent::Challenge } + + # @!attribute event_type + # The type of event that occurred. + # + # @return [Symbol, :"card_authorization.challenge"] + required :event_type, const: :"card_authorization.challenge" + + # @!method initialize(authorization:, challenge:, event_type: :"card_authorization.challenge") + # @param authorization [Lithic::Models::CardAuthorization] The authorization that triggered the challenge + # + # @param challenge [Lithic::Models::CardAuthorizationChallengeWebhookEvent::Challenge] Details of the Authorization Challenge issued during card authorization + # + # @param event_type [Symbol, :"card_authorization.challenge"] The type of event that occurred. + + # @see Lithic::Models::CardAuthorizationChallengeWebhookEvent#challenge + class Challenge < Lithic::Internal::Type::BaseModel + # @!attribute event_token + # Globally unique identifier for the event that triggered the challenge. Use this + # token when calling the challenge response endpoint + # + # @return [String] + required :event_token, String + + # @!attribute expiry_time + # ISO-8601 time at which the challenge expires + # + # @return [Time] + required :expiry_time, Time + + # @!attribute start_time + # ISO-8601 time at which the challenge was issued + # + # @return [Time] + required :start_time, Time + + # @!method initialize(event_token:, expiry_time:, start_time:) + # Some parameter documentations has been truncated, see + # {Lithic::Models::CardAuthorizationChallengeWebhookEvent::Challenge} for more + # details. + # + # Details of the Authorization Challenge issued during card authorization + # + # @param event_token [String] Globally unique identifier for the event that triggered the challenge. Use this + # + # @param expiry_time [Time] ISO-8601 time at which the challenge expires + # + # @param start_time [Time] ISO-8601 time at which the challenge was issued + end + end + end +end diff --git a/lib/lithic/models/event.rb b/lib/lithic/models/event.rb index 1200cb2e..1b9c3d15 100644 --- a/lib/lithic/models/event.rb +++ b/lib/lithic/models/event.rb @@ -33,6 +33,10 @@ class Event < Lithic::Internal::Type::BaseModel # created. # - book_transfer_transaction.updated: Occurs when a book transfer transaction is # updated. + # - card_authorization.challenge: Occurs when an Out of Band challenge is issued + # during card authorization. The card program should issue its own challenge to + # the cardholder and then respond via + # [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge). # - card_authorization.challenge_response: Occurs when a cardholder responds to an # SMS challenge during card authorization. # - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial @@ -156,6 +160,10 @@ class Event < Lithic::Internal::Type::BaseModel # created. # - book_transfer_transaction.updated: Occurs when a book transfer transaction is # updated. + # - card_authorization.challenge: Occurs when an Out of Band challenge is issued + # during card authorization. The card program should issue its own challenge to + # the cardholder and then respond via + # [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge). # - card_authorization.challenge_response: Occurs when a cardholder responds to an # SMS challenge during card authorization. # - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial @@ -255,6 +263,7 @@ module EventType BALANCE_UPDATED = :"balance.updated" BOOK_TRANSFER_TRANSACTION_CREATED = :"book_transfer_transaction.created" BOOK_TRANSFER_TRANSACTION_UPDATED = :"book_transfer_transaction.updated" + CARD_AUTHORIZATION_CHALLENGE = :"card_authorization.challenge" CARD_AUTHORIZATION_CHALLENGE_RESPONSE = :"card_authorization.challenge_response" CARD_TRANSACTION_ENHANCED_DATA_CREATED = :"card_transaction.enhanced_data.created" CARD_TRANSACTION_ENHANCED_DATA_UPDATED = :"card_transaction.enhanced_data.updated" diff --git a/lib/lithic/models/event_list_params.rb b/lib/lithic/models/event_list_params.rb index 9f0abb9a..d64b8582 100644 --- a/lib/lithic/models/event_list_params.rb +++ b/lib/lithic/models/event_list_params.rb @@ -87,6 +87,10 @@ class EventListParams < Lithic::Internal::Type::BaseModel # created. # - book_transfer_transaction.updated: Occurs when a book transfer transaction is # updated. + # - card_authorization.challenge: Occurs when an Out of Band challenge is issued + # during card authorization. The card program should issue its own challenge to + # the cardholder and then respond via + # [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge). # - card_authorization.challenge_response: Occurs when a cardholder responds to an # SMS challenge during card authorization. # - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial @@ -184,6 +188,7 @@ module EventType BALANCE_UPDATED = :"balance.updated" BOOK_TRANSFER_TRANSACTION_CREATED = :"book_transfer_transaction.created" BOOK_TRANSFER_TRANSACTION_UPDATED = :"book_transfer_transaction.updated" + CARD_AUTHORIZATION_CHALLENGE = :"card_authorization.challenge" CARD_AUTHORIZATION_CHALLENGE_RESPONSE = :"card_authorization.challenge_response" CARD_TRANSACTION_ENHANCED_DATA_CREATED = :"card_transaction.enhanced_data.created" CARD_TRANSACTION_ENHANCED_DATA_UPDATED = :"card_transaction.enhanced_data.updated" diff --git a/lib/lithic/models/event_subscription.rb b/lib/lithic/models/event_subscription.rb index b332a538..fd8c3d66 100644 --- a/lib/lithic/models/event_subscription.rb +++ b/lib/lithic/models/event_subscription.rb @@ -60,6 +60,10 @@ class EventSubscription < Lithic::Internal::Type::BaseModel # created. # - book_transfer_transaction.updated: Occurs when a book transfer transaction is # updated. + # - card_authorization.challenge: Occurs when an Out of Band challenge is issued + # during card authorization. The card program should issue its own challenge to + # the cardholder and then respond via + # [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge). # - card_authorization.challenge_response: Occurs when a cardholder responds to an # SMS challenge during card authorization. # - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial @@ -157,6 +161,7 @@ module EventType BALANCE_UPDATED = :"balance.updated" BOOK_TRANSFER_TRANSACTION_CREATED = :"book_transfer_transaction.created" BOOK_TRANSFER_TRANSACTION_UPDATED = :"book_transfer_transaction.updated" + CARD_AUTHORIZATION_CHALLENGE = :"card_authorization.challenge" CARD_AUTHORIZATION_CHALLENGE_RESPONSE = :"card_authorization.challenge_response" CARD_TRANSACTION_ENHANCED_DATA_CREATED = :"card_transaction.enhanced_data.created" CARD_TRANSACTION_ENHANCED_DATA_UPDATED = :"card_transaction.enhanced_data.updated" diff --git a/lib/lithic/models/events/subscription_create_params.rb b/lib/lithic/models/events/subscription_create_params.rb index 4b91b304..20f8d6fd 100644 --- a/lib/lithic/models/events/subscription_create_params.rb +++ b/lib/lithic/models/events/subscription_create_params.rb @@ -62,6 +62,10 @@ class SubscriptionCreateParams < Lithic::Internal::Type::BaseModel # created. # - book_transfer_transaction.updated: Occurs when a book transfer transaction is # updated. + # - card_authorization.challenge: Occurs when an Out of Band challenge is issued + # during card authorization. The card program should issue its own challenge to + # the cardholder and then respond via + # [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge). # - card_authorization.challenge_response: Occurs when a cardholder responds to an # SMS challenge during card authorization. # - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial @@ -159,6 +163,7 @@ module EventType BALANCE_UPDATED = :"balance.updated" BOOK_TRANSFER_TRANSACTION_CREATED = :"book_transfer_transaction.created" BOOK_TRANSFER_TRANSACTION_UPDATED = :"book_transfer_transaction.updated" + CARD_AUTHORIZATION_CHALLENGE = :"card_authorization.challenge" CARD_AUTHORIZATION_CHALLENGE_RESPONSE = :"card_authorization.challenge_response" CARD_TRANSACTION_ENHANCED_DATA_CREATED = :"card_transaction.enhanced_data.created" CARD_TRANSACTION_ENHANCED_DATA_UPDATED = :"card_transaction.enhanced_data.updated" diff --git a/lib/lithic/models/events/subscription_send_simulated_example_params.rb b/lib/lithic/models/events/subscription_send_simulated_example_params.rb index 203c23df..9219f6c0 100644 --- a/lib/lithic/models/events/subscription_send_simulated_example_params.rb +++ b/lib/lithic/models/events/subscription_send_simulated_example_params.rb @@ -38,6 +38,7 @@ module EventType BALANCE_UPDATED = :"balance.updated" BOOK_TRANSFER_TRANSACTION_CREATED = :"book_transfer_transaction.created" BOOK_TRANSFER_TRANSACTION_UPDATED = :"book_transfer_transaction.updated" + CARD_AUTHORIZATION_CHALLENGE = :"card_authorization.challenge" CARD_AUTHORIZATION_CHALLENGE_RESPONSE = :"card_authorization.challenge_response" CARD_TRANSACTION_ENHANCED_DATA_CREATED = :"card_transaction.enhanced_data.created" CARD_TRANSACTION_ENHANCED_DATA_UPDATED = :"card_transaction.enhanced_data.updated" diff --git a/lib/lithic/models/events/subscription_update_params.rb b/lib/lithic/models/events/subscription_update_params.rb index fb3a1c33..612102e6 100644 --- a/lib/lithic/models/events/subscription_update_params.rb +++ b/lib/lithic/models/events/subscription_update_params.rb @@ -69,6 +69,10 @@ class SubscriptionUpdateParams < Lithic::Internal::Type::BaseModel # created. # - book_transfer_transaction.updated: Occurs when a book transfer transaction is # updated. + # - card_authorization.challenge: Occurs when an Out of Band challenge is issued + # during card authorization. The card program should issue its own challenge to + # the cardholder and then respond via + # [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge). # - card_authorization.challenge_response: Occurs when a cardholder responds to an # SMS challenge during card authorization. # - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial @@ -166,6 +170,7 @@ module EventType BALANCE_UPDATED = :"balance.updated" BOOK_TRANSFER_TRANSACTION_CREATED = :"book_transfer_transaction.created" BOOK_TRANSFER_TRANSACTION_UPDATED = :"book_transfer_transaction.updated" + CARD_AUTHORIZATION_CHALLENGE = :"card_authorization.challenge" CARD_AUTHORIZATION_CHALLENGE_RESPONSE = :"card_authorization.challenge_response" CARD_TRANSACTION_ENHANCED_DATA_CREATED = :"card_transaction.enhanced_data.created" CARD_TRANSACTION_ENHANCED_DATA_UPDATED = :"card_transaction.enhanced_data.updated" diff --git a/lib/lithic/models/parsed_webhook_event.rb b/lib/lithic/models/parsed_webhook_event.rb index 4e78511d..ca1e2301 100644 --- a/lib/lithic/models/parsed_webhook_event.rb +++ b/lib/lithic/models/parsed_webhook_event.rb @@ -21,8 +21,11 @@ module ParsedWebhookEvent variant -> { Lithic::AccountHolderDocumentUpdatedWebhookEvent } + # The Auth Stream Access request payload that was sent to the ASA responder. variant -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent } + variant -> { Lithic::CardAuthorizationChallengeWebhookEvent } + variant -> { Lithic::CardAuthorizationChallengeResponseWebhookEvent } variant -> { Lithic::AuthRulesBacktestReportCreatedWebhookEvent } @@ -813,7 +816,7 @@ module EventType end # @!method self.variants - # @return [Array(Lithic::Models::AccountHolderCreatedWebhookEvent, Lithic::Models::ParsedWebhookEvent::KYBPayload, Lithic::Models::ParsedWebhookEvent::KYCPayload, Lithic::Models::ParsedWebhookEvent::LegacyPayload, Lithic::Models::AccountHolderVerificationWebhookEvent, Lithic::Models::AccountHolderDocumentUpdatedWebhookEvent, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent, Lithic::Models::CardAuthorizationChallengeResponseWebhookEvent, Lithic::Models::AuthRulesBacktestReportCreatedWebhookEvent, Lithic::Models::BalanceUpdatedWebhookEvent, Lithic::Models::BookTransferTransactionCreatedWebhookEvent, Lithic::Models::BookTransferTransactionUpdatedWebhookEvent, Lithic::Models::CardCreatedWebhookEvent, Lithic::Models::CardConvertedWebhookEvent, Lithic::Models::CardRenewedWebhookEvent, Lithic::Models::CardReissuedWebhookEvent, Lithic::Models::CardShippedWebhookEvent, Lithic::Models::CardUpdatedWebhookEvent, Lithic::Models::CardTransactionUpdatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataCreatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataUpdatedWebhookEvent, Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent, Lithic::Models::DigitalWalletTokenizationResultWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::DigitalWalletTokenizationUpdatedWebhookEvent, Lithic::Models::DisputeUpdatedWebhookEvent, Lithic::Models::DisputeEvidenceUploadFailedWebhookEvent, Lithic::Models::ExternalBankAccountCreatedWebhookEvent, Lithic::Models::ExternalBankAccountUpdatedWebhookEvent, Lithic::Models::ExternalPaymentCreatedWebhookEvent, Lithic::Models::ExternalPaymentUpdatedWebhookEvent, Lithic::Models::FinancialAccountCreatedWebhookEvent, Lithic::Models::FinancialAccountUpdatedWebhookEvent, Lithic::Models::FundingEventCreatedWebhookEvent, Lithic::Models::LoanTapeCreatedWebhookEvent, Lithic::Models::LoanTapeUpdatedWebhookEvent, Lithic::Models::ManagementOperationCreatedWebhookEvent, Lithic::Models::ManagementOperationUpdatedWebhookEvent, Lithic::Models::InternalTransactionCreatedWebhookEvent, Lithic::Models::InternalTransactionUpdatedWebhookEvent, Lithic::Models::NetworkTotalCreatedWebhookEvent, Lithic::Models::NetworkTotalUpdatedWebhookEvent, Lithic::Models::PaymentTransactionCreatedWebhookEvent, Lithic::Models::PaymentTransactionUpdatedWebhookEvent, Lithic::Models::SettlementReportUpdatedWebhookEvent, Lithic::Models::StatementsCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationChallengeWebhookEvent, Lithic::Models::TokenizationApprovalRequestWebhookEvent, Lithic::Models::TokenizationResultWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::TokenizationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationApprovalRequestWebhookEvent, Lithic::Models::DisputeTransactionCreatedWebhookEvent, Lithic::Models::DisputeTransactionUpdatedWebhookEvent)] + # @return [Array(Lithic::Models::AccountHolderCreatedWebhookEvent, Lithic::Models::ParsedWebhookEvent::KYBPayload, Lithic::Models::ParsedWebhookEvent::KYCPayload, Lithic::Models::ParsedWebhookEvent::LegacyPayload, Lithic::Models::AccountHolderVerificationWebhookEvent, Lithic::Models::AccountHolderDocumentUpdatedWebhookEvent, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent, Lithic::Models::CardAuthorizationChallengeWebhookEvent, Lithic::Models::CardAuthorizationChallengeResponseWebhookEvent, Lithic::Models::AuthRulesBacktestReportCreatedWebhookEvent, Lithic::Models::BalanceUpdatedWebhookEvent, Lithic::Models::BookTransferTransactionCreatedWebhookEvent, Lithic::Models::BookTransferTransactionUpdatedWebhookEvent, Lithic::Models::CardCreatedWebhookEvent, Lithic::Models::CardConvertedWebhookEvent, Lithic::Models::CardRenewedWebhookEvent, Lithic::Models::CardReissuedWebhookEvent, Lithic::Models::CardShippedWebhookEvent, Lithic::Models::CardUpdatedWebhookEvent, Lithic::Models::CardTransactionUpdatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataCreatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataUpdatedWebhookEvent, Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent, Lithic::Models::DigitalWalletTokenizationResultWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::DigitalWalletTokenizationUpdatedWebhookEvent, Lithic::Models::DisputeUpdatedWebhookEvent, Lithic::Models::DisputeEvidenceUploadFailedWebhookEvent, Lithic::Models::ExternalBankAccountCreatedWebhookEvent, Lithic::Models::ExternalBankAccountUpdatedWebhookEvent, Lithic::Models::ExternalPaymentCreatedWebhookEvent, Lithic::Models::ExternalPaymentUpdatedWebhookEvent, Lithic::Models::FinancialAccountCreatedWebhookEvent, Lithic::Models::FinancialAccountUpdatedWebhookEvent, Lithic::Models::FundingEventCreatedWebhookEvent, Lithic::Models::LoanTapeCreatedWebhookEvent, Lithic::Models::LoanTapeUpdatedWebhookEvent, Lithic::Models::ManagementOperationCreatedWebhookEvent, Lithic::Models::ManagementOperationUpdatedWebhookEvent, Lithic::Models::InternalTransactionCreatedWebhookEvent, Lithic::Models::InternalTransactionUpdatedWebhookEvent, Lithic::Models::NetworkTotalCreatedWebhookEvent, Lithic::Models::NetworkTotalUpdatedWebhookEvent, Lithic::Models::PaymentTransactionCreatedWebhookEvent, Lithic::Models::PaymentTransactionUpdatedWebhookEvent, Lithic::Models::SettlementReportUpdatedWebhookEvent, Lithic::Models::StatementsCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationChallengeWebhookEvent, Lithic::Models::TokenizationApprovalRequestWebhookEvent, Lithic::Models::TokenizationResultWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::TokenizationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationApprovalRequestWebhookEvent, Lithic::Models::DisputeTransactionCreatedWebhookEvent, Lithic::Models::DisputeTransactionUpdatedWebhookEvent)] end end end diff --git a/lib/lithic/resources/card_authorizations.rb b/lib/lithic/resources/card_authorizations.rb new file mode 100644 index 00000000..14d41cf1 --- /dev/null +++ b/lib/lithic/resources/card_authorizations.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +module Lithic + module Resources + class CardAuthorizations + # Some parameter documentations has been truncated, see + # {Lithic::Models::CardAuthorizationChallengeResponseParams} for more details. + # + # Card program's response to Authorization Challenge. Programs that have + # Authorization Challenges configured as Out of Band receive a + # [card_authorization.challenge](https://docs.lithic.com/reference/post_card-authorization-challenge) + # webhook when an authorization attempt triggers a challenge. The card program + # should respond using this endpoint after the cardholder completes the challenge. + # + # @overload challenge_response(event_token, response:, request_options: {}) + # + # @param event_token [String] Globally unique identifier for the authorization event that triggered the challe + # + # @param response [Symbol, Lithic::Models::CardAuthorizationChallengeResponseParams::Response] Whether the cardholder has approved or declined the issued challenge + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [nil] + # + # @see Lithic::Models::CardAuthorizationChallengeResponseParams + def challenge_response(event_token, params) + parsed, options = Lithic::CardAuthorizationChallengeResponseParams.dump_request(params) + @client.request( + method: :post, + path: ["v1/card_authorizations/%1$s/challenge_response", event_token], + body: parsed, + model: NilClass, + options: options + ) + end + + # @api private + # + # @param client [Lithic::Client] + def initialize(client:) + @client = client + end + end + end +end diff --git a/lib/lithic/resources/webhooks.rb b/lib/lithic/resources/webhooks.rb index 4268eaf0..f6a89221 100644 --- a/lib/lithic/resources/webhooks.rb +++ b/lib/lithic/resources/webhooks.rb @@ -9,7 +9,7 @@ class Webhooks # @param headers [Hash{String => String}] The webhook request headers # @param secret [String, nil] The webhook secret. If not provided, reads from LITHIC_WEBHOOK_SECRET environment variable. # - # @return [Lithic::Models::AccountHolderCreatedWebhookEvent, Lithic::Models::ParsedWebhookEvent::KYBPayload, Lithic::Models::ParsedWebhookEvent::KYCPayload, Lithic::Models::ParsedWebhookEvent::LegacyPayload, Lithic::Models::AccountHolderVerificationWebhookEvent, Lithic::Models::AccountHolderDocumentUpdatedWebhookEvent, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent, Lithic::Models::CardAuthorizationChallengeResponseWebhookEvent, Lithic::Models::AuthRulesBacktestReportCreatedWebhookEvent, Lithic::Models::BalanceUpdatedWebhookEvent, Lithic::Models::BookTransferTransactionCreatedWebhookEvent, Lithic::Models::BookTransferTransactionUpdatedWebhookEvent, Lithic::Models::CardCreatedWebhookEvent, Lithic::Models::CardConvertedWebhookEvent, Lithic::Models::CardRenewedWebhookEvent, Lithic::Models::CardReissuedWebhookEvent, Lithic::Models::CardShippedWebhookEvent, Lithic::Models::CardUpdatedWebhookEvent, Lithic::Models::CardTransactionUpdatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataCreatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataUpdatedWebhookEvent, Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent, Lithic::Models::DigitalWalletTokenizationResultWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::DigitalWalletTokenizationUpdatedWebhookEvent, Lithic::Models::DisputeUpdatedWebhookEvent, Lithic::Models::DisputeEvidenceUploadFailedWebhookEvent, Lithic::Models::ExternalBankAccountCreatedWebhookEvent, Lithic::Models::ExternalBankAccountUpdatedWebhookEvent, Lithic::Models::ExternalPaymentCreatedWebhookEvent, Lithic::Models::ExternalPaymentUpdatedWebhookEvent, Lithic::Models::FinancialAccountCreatedWebhookEvent, Lithic::Models::FinancialAccountUpdatedWebhookEvent, Lithic::Models::FundingEventCreatedWebhookEvent, Lithic::Models::LoanTapeCreatedWebhookEvent, Lithic::Models::LoanTapeUpdatedWebhookEvent, Lithic::Models::ManagementOperationCreatedWebhookEvent, Lithic::Models::ManagementOperationUpdatedWebhookEvent, Lithic::Models::InternalTransactionCreatedWebhookEvent, Lithic::Models::InternalTransactionUpdatedWebhookEvent, Lithic::Models::NetworkTotalCreatedWebhookEvent, Lithic::Models::NetworkTotalUpdatedWebhookEvent, Lithic::Models::PaymentTransactionCreatedWebhookEvent, Lithic::Models::PaymentTransactionUpdatedWebhookEvent, Lithic::Models::SettlementReportUpdatedWebhookEvent, Lithic::Models::StatementsCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationChallengeWebhookEvent, Lithic::Models::TokenizationApprovalRequestWebhookEvent, Lithic::Models::TokenizationResultWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::TokenizationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationApprovalRequestWebhookEvent, Lithic::Models::DisputeTransactionCreatedWebhookEvent, Lithic::Models::DisputeTransactionUpdatedWebhookEvent] # + # @return [Lithic::Models::AccountHolderCreatedWebhookEvent, Lithic::Models::ParsedWebhookEvent::KYBPayload, Lithic::Models::ParsedWebhookEvent::KYCPayload, Lithic::Models::ParsedWebhookEvent::LegacyPayload, Lithic::Models::AccountHolderVerificationWebhookEvent, Lithic::Models::AccountHolderDocumentUpdatedWebhookEvent, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent, Lithic::Models::CardAuthorizationChallengeWebhookEvent, Lithic::Models::CardAuthorizationChallengeResponseWebhookEvent, Lithic::Models::AuthRulesBacktestReportCreatedWebhookEvent, Lithic::Models::BalanceUpdatedWebhookEvent, Lithic::Models::BookTransferTransactionCreatedWebhookEvent, Lithic::Models::BookTransferTransactionUpdatedWebhookEvent, Lithic::Models::CardCreatedWebhookEvent, Lithic::Models::CardConvertedWebhookEvent, Lithic::Models::CardRenewedWebhookEvent, Lithic::Models::CardReissuedWebhookEvent, Lithic::Models::CardShippedWebhookEvent, Lithic::Models::CardUpdatedWebhookEvent, Lithic::Models::CardTransactionUpdatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataCreatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataUpdatedWebhookEvent, Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent, Lithic::Models::DigitalWalletTokenizationResultWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::DigitalWalletTokenizationUpdatedWebhookEvent, Lithic::Models::DisputeUpdatedWebhookEvent, Lithic::Models::DisputeEvidenceUploadFailedWebhookEvent, Lithic::Models::ExternalBankAccountCreatedWebhookEvent, Lithic::Models::ExternalBankAccountUpdatedWebhookEvent, Lithic::Models::ExternalPaymentCreatedWebhookEvent, Lithic::Models::ExternalPaymentUpdatedWebhookEvent, Lithic::Models::FinancialAccountCreatedWebhookEvent, Lithic::Models::FinancialAccountUpdatedWebhookEvent, Lithic::Models::FundingEventCreatedWebhookEvent, Lithic::Models::LoanTapeCreatedWebhookEvent, Lithic::Models::LoanTapeUpdatedWebhookEvent, Lithic::Models::ManagementOperationCreatedWebhookEvent, Lithic::Models::ManagementOperationUpdatedWebhookEvent, Lithic::Models::InternalTransactionCreatedWebhookEvent, Lithic::Models::InternalTransactionUpdatedWebhookEvent, Lithic::Models::NetworkTotalCreatedWebhookEvent, Lithic::Models::NetworkTotalUpdatedWebhookEvent, Lithic::Models::PaymentTransactionCreatedWebhookEvent, Lithic::Models::PaymentTransactionUpdatedWebhookEvent, Lithic::Models::SettlementReportUpdatedWebhookEvent, Lithic::Models::StatementsCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationChallengeWebhookEvent, Lithic::Models::TokenizationApprovalRequestWebhookEvent, Lithic::Models::TokenizationResultWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::TokenizationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationApprovalRequestWebhookEvent, Lithic::Models::DisputeTransactionCreatedWebhookEvent, Lithic::Models::DisputeTransactionUpdatedWebhookEvent] # # @raise [ArgumentError] if secret is not provided and LITHIC_WEBHOOK_SECRET env var is not set # @raise [Lithic::Errors::MissingDependencyError] if the standardwebhooks gem is not installed # @raise [StandardWebhooks::WebhookVerificationError] if the signature is invalid diff --git a/rbi/lithic/client.rbi b/rbi/lithic/client.rbi index c8538916..88810295 100644 --- a/rbi/lithic/client.rbi +++ b/rbi/lithic/client.rbi @@ -46,6 +46,9 @@ module Lithic sig { returns(Lithic::Resources::Cards) } attr_reader :cards + sig { returns(Lithic::Resources::CardAuthorizations) } + attr_reader :card_authorizations + sig { returns(Lithic::Resources::CardBulkOrders) } attr_reader :card_bulk_orders diff --git a/rbi/lithic/models.rbi b/rbi/lithic/models.rbi index 9a7bcb63..a5bc3816 100644 --- a/rbi/lithic/models.rbi +++ b/rbi/lithic/models.rbi @@ -107,12 +107,20 @@ module Lithic Card = Lithic::Models::Card + CardAuthorization = Lithic::Models::CardAuthorization + CardAuthorizationApprovalRequestWebhookEvent = Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent + CardAuthorizationChallengeResponseParams = + Lithic::Models::CardAuthorizationChallengeResponseParams + CardAuthorizationChallengeResponseWebhookEvent = Lithic::Models::CardAuthorizationChallengeResponseWebhookEvent + CardAuthorizationChallengeWebhookEvent = + Lithic::Models::CardAuthorizationChallengeWebhookEvent + CardBulkOrder = Lithic::Models::CardBulkOrder CardBulkOrderCreateParams = Lithic::Models::CardBulkOrderCreateParams diff --git a/rbi/lithic/models/card_authorization.rbi b/rbi/lithic/models/card_authorization.rbi new file mode 100644 index 00000000..112d4890 --- /dev/null +++ b/rbi/lithic/models/card_authorization.rbi @@ -0,0 +1,2475 @@ +# typed: strong + +module Lithic + module Models + class CardAuthorization < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(Lithic::CardAuthorization, Lithic::Internal::AnyHash) + end + + # The provisional transaction group uuid associated with the authorization + sig { returns(String) } + attr_accessor :token + + # Fee (in cents) assessed by the merchant and paid for by the cardholder. Will be + # zero if no fee is assessed. Rebates may be transmitted as a negative value to + # indicate credited fees. + sig { returns(Integer) } + attr_accessor :acquirer_fee + + # Deprecated, use `amounts`. Authorization amount of the transaction (in cents), + # including any acquirer fees. The contents of this field are identical to + # `authorization_amount`. + sig { returns(Integer) } + attr_accessor :amount + + # Structured amounts for this authorization. The `cardholder` and `merchant` + # amounts reflect the original network authorization values. For programs with + # hold adjustments enabled (e.g., automated fuel dispensers or tipping MCCs), the + # `hold` amount may exceed the `cardholder` and `merchant` amounts to account for + # anticipated final transaction amounts such as tips or fuel fill-ups + sig { returns(Lithic::CardAuthorization::Amounts) } + attr_reader :amounts + + sig { params(amounts: Lithic::CardAuthorization::Amounts::OrHash).void } + attr_writer :amounts + + # Deprecated, use `amounts`. The base transaction amount (in cents) plus the + # acquirer fee field. This is the amount the issuer should authorize against + # unless the issuer is paying the acquirer fee on behalf of the cardholder. + sig { returns(Integer) } + attr_accessor :authorization_amount + + sig { returns(Lithic::CardAuthorization::Avs) } + attr_reader :avs + + sig { params(avs: Lithic::CardAuthorization::Avs::OrHash).void } + attr_writer :avs + + # Card object in ASA + sig { returns(Lithic::CardAuthorization::Card) } + attr_reader :card + + sig { params(card: Lithic::CardAuthorization::Card::OrHash).void } + attr_writer :card + + # Deprecated, use `amounts`. 3-character alphabetic ISO 4217 code for cardholder's + # billing currency. + sig { returns(String) } + attr_accessor :cardholder_currency + + # The portion of the transaction requested as cash back by the cardholder, and + # does not include any acquirer fees. The amount field includes the purchase + # amount, the requested cash back amount, and any acquirer fees. + # + # If no cash back was requested, the value of this field will be 0, and the field + # will always be present. + sig { returns(Integer) } + attr_accessor :cash_amount + + # Date and time when the transaction first occurred in UTC. + sig { returns(Time) } + attr_accessor :created + + # Merchant information including full location details. + sig { returns(Lithic::CardAuthorization::Merchant) } + attr_reader :merchant + + sig { params(merchant: Lithic::CardAuthorization::Merchant::OrHash).void } + attr_writer :merchant + + # Deprecated, use `amounts`. The amount that the merchant will receive, + # denominated in `merchant_currency` and in the smallest currency unit. Note the + # amount includes `acquirer_fee`, similar to `authorization_amount`. It will be + # different from `authorization_amount` if the merchant is taking payment in a + # different currency. + sig { returns(Integer) } + attr_accessor :merchant_amount + + # 3-character alphabetic ISO 4217 code for the local currency of the transaction. + sig { returns(String) } + attr_accessor :merchant_currency + + # Where the cardholder received the service, when different from the card acceptor + # location. This is populated from network data elements such as Mastercard DE-122 + # SE1 SF9-14 and Visa F34 DS02. + sig { returns(T.nilable(Lithic::CardAuthorization::ServiceLocation)) } + attr_reader :service_location + + sig do + params( + service_location: + T.nilable(Lithic::CardAuthorization::ServiceLocation::OrHash) + ).void + end + attr_writer :service_location + + # Deprecated, use `amounts`. Amount (in cents) of the transaction that has been + # settled, including any acquirer fees. + sig { returns(Integer) } + attr_accessor :settled_amount + + # The type of authorization request that this request is for. Note that + # `CREDIT_AUTHORIZATION` and `FINANCIAL_CREDIT_AUTHORIZATION` is only available to + # users with credit decisioning via ASA enabled. + sig { returns(Lithic::CardAuthorization::Status::TaggedSymbol) } + attr_accessor :status + + # The entity that initiated the transaction. + sig do + returns(Lithic::CardAuthorization::TransactionInitiator::TaggedSymbol) + end + attr_accessor :transaction_initiator + + sig do + returns(T.nilable(Lithic::CardAuthorization::AccountType::TaggedSymbol)) + end + attr_reader :account_type + + sig do + params( + account_type: Lithic::CardAuthorization::AccountType::OrSymbol + ).void + end + attr_writer :account_type + + sig { returns(T.nilable(Lithic::CardholderAuthentication)) } + attr_reader :cardholder_authentication + + sig do + params( + cardholder_authentication: Lithic::CardholderAuthentication::OrHash + ).void + end + attr_writer :cardholder_authentication + + # Deprecated, use `cash_amount`. + sig { returns(T.nilable(Integer)) } + attr_reader :cashback + + sig { params(cashback: Integer).void } + attr_writer :cashback + + # Deprecated, use `amounts`. If the transaction was requested in a currency other + # than the settlement currency, this field will be populated to indicate the rate + # used to translate the merchant_amount to the amount (i.e., `merchant_amount` x + # `conversion_rate` = `amount`). Note that the `merchant_amount` is in the local + # currency and the amount is in the settlement currency. + sig { returns(T.nilable(Float)) } + attr_reader :conversion_rate + + sig { params(conversion_rate: Float).void } + attr_writer :conversion_rate + + # The event token associated with the authorization. This field is only set for + # programs enrolled into the beta. + sig { returns(T.nilable(String)) } + attr_reader :event_token + + sig { params(event_token: String).void } + attr_writer :event_token + + # Optional Object containing information if the Card is a part of a Fleet managed + # program + sig { returns(T.nilable(Lithic::CardAuthorization::FleetInfo)) } + attr_reader :fleet_info + + sig do + params( + fleet_info: T.nilable(Lithic::CardAuthorization::FleetInfo::OrHash) + ).void + end + attr_writer :fleet_info + + # The latest Authorization Challenge that was issued to the cardholder for this + # merchant. + sig { returns(T.nilable(Lithic::CardAuthorization::LatestChallenge)) } + attr_reader :latest_challenge + + sig do + params( + latest_challenge: Lithic::CardAuthorization::LatestChallenge::OrHash + ).void + end + attr_writer :latest_challenge + + # Card network of the authorization. + sig do + returns(T.nilable(Lithic::CardAuthorization::Network::TaggedSymbol)) + end + attr_reader :network + + sig { params(network: Lithic::CardAuthorization::Network::OrSymbol).void } + attr_writer :network + + # Network-provided score assessing risk level associated with a given + # authorization. Scores are on a range of 0-999, with 0 representing the lowest + # risk and 999 representing the highest risk. For Visa transactions, where the raw + # score has a range of 0-99, Lithic will normalize the score by multiplying the + # raw score by 10x. + sig { returns(T.nilable(Integer)) } + attr_accessor :network_risk_score + + # Contains raw data provided by the card network, including attributes that + # provide further context about the authorization. If populated by the network, + # data is organized by Lithic and passed through without further modification. + # Please consult the official network documentation for more details about these + # values and how to use them. This object is only available to certain programs- + # contact your Customer Success Manager to discuss enabling access. + sig { returns(T.nilable(Lithic::CardAuthorization::NetworkSpecificData)) } + attr_reader :network_specific_data + + sig do + params( + network_specific_data: + T.nilable(Lithic::CardAuthorization::NetworkSpecificData::OrHash) + ).void + end + attr_writer :network_specific_data + + sig { returns(T.nilable(Lithic::CardAuthorization::Pos)) } + attr_reader :pos + + sig { params(pos: Lithic::CardAuthorization::Pos::OrHash).void } + attr_writer :pos + + sig { returns(T.nilable(Lithic::TokenInfo)) } + attr_reader :token_info + + sig { params(token_info: T.nilable(Lithic::TokenInfo::OrHash)).void } + attr_writer :token_info + + # Deprecated: approximate time-to-live for the authorization. + sig { returns(T.nilable(Time)) } + attr_reader :ttl + + sig { params(ttl: Time).void } + attr_writer :ttl + + # Card Authorization + sig do + params( + token: String, + acquirer_fee: Integer, + amount: Integer, + amounts: Lithic::CardAuthorization::Amounts::OrHash, + authorization_amount: Integer, + avs: Lithic::CardAuthorization::Avs::OrHash, + card: Lithic::CardAuthorization::Card::OrHash, + cardholder_currency: String, + cash_amount: Integer, + created: Time, + merchant: Lithic::CardAuthorization::Merchant::OrHash, + merchant_amount: Integer, + merchant_currency: String, + service_location: + T.nilable(Lithic::CardAuthorization::ServiceLocation::OrHash), + settled_amount: Integer, + status: Lithic::CardAuthorization::Status::OrSymbol, + transaction_initiator: + Lithic::CardAuthorization::TransactionInitiator::OrSymbol, + account_type: Lithic::CardAuthorization::AccountType::OrSymbol, + cardholder_authentication: Lithic::CardholderAuthentication::OrHash, + cashback: Integer, + conversion_rate: Float, + event_token: String, + fleet_info: T.nilable(Lithic::CardAuthorization::FleetInfo::OrHash), + latest_challenge: Lithic::CardAuthorization::LatestChallenge::OrHash, + network: Lithic::CardAuthorization::Network::OrSymbol, + network_risk_score: T.nilable(Integer), + network_specific_data: + T.nilable(Lithic::CardAuthorization::NetworkSpecificData::OrHash), + pos: Lithic::CardAuthorization::Pos::OrHash, + token_info: T.nilable(Lithic::TokenInfo::OrHash), + ttl: Time + ).returns(T.attached_class) + end + def self.new( + # The provisional transaction group uuid associated with the authorization + token:, + # Fee (in cents) assessed by the merchant and paid for by the cardholder. Will be + # zero if no fee is assessed. Rebates may be transmitted as a negative value to + # indicate credited fees. + acquirer_fee:, + # Deprecated, use `amounts`. Authorization amount of the transaction (in cents), + # including any acquirer fees. The contents of this field are identical to + # `authorization_amount`. + amount:, + # Structured amounts for this authorization. The `cardholder` and `merchant` + # amounts reflect the original network authorization values. For programs with + # hold adjustments enabled (e.g., automated fuel dispensers or tipping MCCs), the + # `hold` amount may exceed the `cardholder` and `merchant` amounts to account for + # anticipated final transaction amounts such as tips or fuel fill-ups + amounts:, + # Deprecated, use `amounts`. The base transaction amount (in cents) plus the + # acquirer fee field. This is the amount the issuer should authorize against + # unless the issuer is paying the acquirer fee on behalf of the cardholder. + authorization_amount:, + avs:, + # Card object in ASA + card:, + # Deprecated, use `amounts`. 3-character alphabetic ISO 4217 code for cardholder's + # billing currency. + cardholder_currency:, + # The portion of the transaction requested as cash back by the cardholder, and + # does not include any acquirer fees. The amount field includes the purchase + # amount, the requested cash back amount, and any acquirer fees. + # + # If no cash back was requested, the value of this field will be 0, and the field + # will always be present. + cash_amount:, + # Date and time when the transaction first occurred in UTC. + created:, + # Merchant information including full location details. + merchant:, + # Deprecated, use `amounts`. The amount that the merchant will receive, + # denominated in `merchant_currency` and in the smallest currency unit. Note the + # amount includes `acquirer_fee`, similar to `authorization_amount`. It will be + # different from `authorization_amount` if the merchant is taking payment in a + # different currency. + merchant_amount:, + # 3-character alphabetic ISO 4217 code for the local currency of the transaction. + merchant_currency:, + # Where the cardholder received the service, when different from the card acceptor + # location. This is populated from network data elements such as Mastercard DE-122 + # SE1 SF9-14 and Visa F34 DS02. + service_location:, + # Deprecated, use `amounts`. Amount (in cents) of the transaction that has been + # settled, including any acquirer fees. + settled_amount:, + # The type of authorization request that this request is for. Note that + # `CREDIT_AUTHORIZATION` and `FINANCIAL_CREDIT_AUTHORIZATION` is only available to + # users with credit decisioning via ASA enabled. + status:, + # The entity that initiated the transaction. + transaction_initiator:, + account_type: nil, + cardholder_authentication: nil, + # Deprecated, use `cash_amount`. + cashback: nil, + # Deprecated, use `amounts`. If the transaction was requested in a currency other + # than the settlement currency, this field will be populated to indicate the rate + # used to translate the merchant_amount to the amount (i.e., `merchant_amount` x + # `conversion_rate` = `amount`). Note that the `merchant_amount` is in the local + # currency and the amount is in the settlement currency. + conversion_rate: nil, + # The event token associated with the authorization. This field is only set for + # programs enrolled into the beta. + event_token: nil, + # Optional Object containing information if the Card is a part of a Fleet managed + # program + fleet_info: nil, + # The latest Authorization Challenge that was issued to the cardholder for this + # merchant. + latest_challenge: nil, + # Card network of the authorization. + network: nil, + # Network-provided score assessing risk level associated with a given + # authorization. Scores are on a range of 0-999, with 0 representing the lowest + # risk and 999 representing the highest risk. For Visa transactions, where the raw + # score has a range of 0-99, Lithic will normalize the score by multiplying the + # raw score by 10x. + network_risk_score: nil, + # Contains raw data provided by the card network, including attributes that + # provide further context about the authorization. If populated by the network, + # data is organized by Lithic and passed through without further modification. + # Please consult the official network documentation for more details about these + # values and how to use them. This object is only available to certain programs- + # contact your Customer Success Manager to discuss enabling access. + network_specific_data: nil, + pos: nil, + token_info: nil, + # Deprecated: approximate time-to-live for the authorization. + ttl: nil + ) + end + + sig do + override.returns( + { + token: String, + acquirer_fee: Integer, + amount: Integer, + amounts: Lithic::CardAuthorization::Amounts, + authorization_amount: Integer, + avs: Lithic::CardAuthorization::Avs, + card: Lithic::CardAuthorization::Card, + cardholder_currency: String, + cash_amount: Integer, + created: Time, + merchant: Lithic::CardAuthorization::Merchant, + merchant_amount: Integer, + merchant_currency: String, + service_location: + T.nilable(Lithic::CardAuthorization::ServiceLocation), + settled_amount: Integer, + status: Lithic::CardAuthorization::Status::TaggedSymbol, + transaction_initiator: + Lithic::CardAuthorization::TransactionInitiator::TaggedSymbol, + account_type: Lithic::CardAuthorization::AccountType::TaggedSymbol, + cardholder_authentication: Lithic::CardholderAuthentication, + cashback: Integer, + conversion_rate: Float, + event_token: String, + fleet_info: T.nilable(Lithic::CardAuthorization::FleetInfo), + latest_challenge: Lithic::CardAuthorization::LatestChallenge, + network: Lithic::CardAuthorization::Network::TaggedSymbol, + network_risk_score: T.nilable(Integer), + network_specific_data: + T.nilable(Lithic::CardAuthorization::NetworkSpecificData), + pos: Lithic::CardAuthorization::Pos, + token_info: T.nilable(Lithic::TokenInfo), + ttl: Time + } + ) + end + def to_hash + end + + class Amounts < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(Lithic::CardAuthorization::Amounts, Lithic::Internal::AnyHash) + end + + sig { returns(Lithic::CardAuthorization::Amounts::Cardholder) } + attr_reader :cardholder + + sig do + params( + cardholder: Lithic::CardAuthorization::Amounts::Cardholder::OrHash + ).void + end + attr_writer :cardholder + + sig { returns(T.nilable(Lithic::CardAuthorization::Amounts::Hold)) } + attr_reader :hold + + sig do + params( + hold: T.nilable(Lithic::CardAuthorization::Amounts::Hold::OrHash) + ).void + end + attr_writer :hold + + sig { returns(Lithic::CardAuthorization::Amounts::Merchant) } + attr_reader :merchant + + sig do + params( + merchant: Lithic::CardAuthorization::Amounts::Merchant::OrHash + ).void + end + attr_writer :merchant + + sig do + returns(T.nilable(Lithic::CardAuthorization::Amounts::Settlement)) + end + attr_reader :settlement + + sig do + params( + settlement: + T.nilable(Lithic::CardAuthorization::Amounts::Settlement::OrHash) + ).void + end + attr_writer :settlement + + # Structured amounts for this authorization. The `cardholder` and `merchant` + # amounts reflect the original network authorization values. For programs with + # hold adjustments enabled (e.g., automated fuel dispensers or tipping MCCs), the + # `hold` amount may exceed the `cardholder` and `merchant` amounts to account for + # anticipated final transaction amounts such as tips or fuel fill-ups + sig do + params( + cardholder: Lithic::CardAuthorization::Amounts::Cardholder::OrHash, + hold: T.nilable(Lithic::CardAuthorization::Amounts::Hold::OrHash), + merchant: Lithic::CardAuthorization::Amounts::Merchant::OrHash, + settlement: + T.nilable(Lithic::CardAuthorization::Amounts::Settlement::OrHash) + ).returns(T.attached_class) + end + def self.new(cardholder:, hold:, merchant:, settlement:) + end + + sig do + override.returns( + { + cardholder: Lithic::CardAuthorization::Amounts::Cardholder, + hold: T.nilable(Lithic::CardAuthorization::Amounts::Hold), + merchant: Lithic::CardAuthorization::Amounts::Merchant, + settlement: + T.nilable(Lithic::CardAuthorization::Amounts::Settlement) + } + ) + end + def to_hash + end + + class Cardholder < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::CardAuthorization::Amounts::Cardholder, + Lithic::Internal::AnyHash + ) + end + + # Amount in the smallest unit of the applicable currency (e.g., cents) + sig { returns(Integer) } + attr_accessor :amount + + # Exchange rate used for currency conversion + sig { returns(String) } + attr_accessor :conversion_rate + + # 3-character alphabetic ISO 4217 currency + sig { returns(String) } + attr_accessor :currency + + sig do + params( + amount: Integer, + conversion_rate: String, + currency: String + ).returns(T.attached_class) + end + def self.new( + # Amount in the smallest unit of the applicable currency (e.g., cents) + amount:, + # Exchange rate used for currency conversion + conversion_rate:, + # 3-character alphabetic ISO 4217 currency + currency: + ) + end + + sig do + override.returns( + { amount: Integer, conversion_rate: String, currency: String } + ) + end + def to_hash + end + end + + class Hold < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::CardAuthorization::Amounts::Hold, + Lithic::Internal::AnyHash + ) + end + + # Amount in the smallest unit of the applicable currency (e.g., cents) + sig { returns(Integer) } + attr_accessor :amount + + # 3-character alphabetic ISO 4217 currency + sig { returns(String) } + attr_accessor :currency + + sig do + params(amount: Integer, currency: String).returns(T.attached_class) + end + def self.new( + # Amount in the smallest unit of the applicable currency (e.g., cents) + amount:, + # 3-character alphabetic ISO 4217 currency + currency: + ) + end + + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end + end + + class Merchant < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::CardAuthorization::Amounts::Merchant, + Lithic::Internal::AnyHash + ) + end + + # Amount in the smallest unit of the applicable currency (e.g., cents) + sig { returns(Integer) } + attr_accessor :amount + + # 3-character alphabetic ISO 4217 currency + sig { returns(String) } + attr_accessor :currency + + sig do + params(amount: Integer, currency: String).returns(T.attached_class) + end + def self.new( + # Amount in the smallest unit of the applicable currency (e.g., cents) + amount:, + # 3-character alphabetic ISO 4217 currency + currency: + ) + end + + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end + end + + class Settlement < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::CardAuthorization::Amounts::Settlement, + Lithic::Internal::AnyHash + ) + end + + # Amount in the smallest unit of the applicable currency (e.g., cents) + sig { returns(Integer) } + attr_accessor :amount + + # 3-character alphabetic ISO 4217 currency + sig { returns(String) } + attr_accessor :currency + + sig do + params(amount: Integer, currency: String).returns(T.attached_class) + end + def self.new( + # Amount in the smallest unit of the applicable currency (e.g., cents) + amount:, + # 3-character alphabetic ISO 4217 currency + currency: + ) + end + + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end + end + end + + class Avs < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(Lithic::CardAuthorization::Avs, Lithic::Internal::AnyHash) + end + + # Cardholder address + sig { returns(String) } + attr_accessor :address + + # Lithic's evaluation result comparing the transaction's address data with the + # cardholder KYC data if it exists. In the event Lithic does not have any + # Cardholder KYC data, or the transaction does not contain any address data, + # NOT_PRESENT will be returned + sig do + returns( + Lithic::CardAuthorization::Avs::AddressOnFileMatch::TaggedSymbol + ) + end + attr_accessor :address_on_file_match + + # Cardholder ZIP code + sig { returns(String) } + attr_accessor :zipcode + + sig do + params( + address: String, + address_on_file_match: + Lithic::CardAuthorization::Avs::AddressOnFileMatch::OrSymbol, + zipcode: String + ).returns(T.attached_class) + end + def self.new( + # Cardholder address + address:, + # Lithic's evaluation result comparing the transaction's address data with the + # cardholder KYC data if it exists. In the event Lithic does not have any + # Cardholder KYC data, or the transaction does not contain any address data, + # NOT_PRESENT will be returned + address_on_file_match:, + # Cardholder ZIP code + zipcode: + ) + end + + sig do + override.returns( + { + address: String, + address_on_file_match: + Lithic::CardAuthorization::Avs::AddressOnFileMatch::TaggedSymbol, + zipcode: String + } + ) + end + def to_hash + end + + # Lithic's evaluation result comparing the transaction's address data with the + # cardholder KYC data if it exists. In the event Lithic does not have any + # Cardholder KYC data, or the transaction does not contain any address data, + # NOT_PRESENT will be returned + module AddressOnFileMatch + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::CardAuthorization::Avs::AddressOnFileMatch) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + MATCH = + T.let( + :MATCH, + Lithic::CardAuthorization::Avs::AddressOnFileMatch::TaggedSymbol + ) + MATCH_ADDRESS_ONLY = + T.let( + :MATCH_ADDRESS_ONLY, + Lithic::CardAuthorization::Avs::AddressOnFileMatch::TaggedSymbol + ) + MATCH_ZIP_ONLY = + T.let( + :MATCH_ZIP_ONLY, + Lithic::CardAuthorization::Avs::AddressOnFileMatch::TaggedSymbol + ) + MISMATCH = + T.let( + :MISMATCH, + Lithic::CardAuthorization::Avs::AddressOnFileMatch::TaggedSymbol + ) + NOT_PRESENT = + T.let( + :NOT_PRESENT, + Lithic::CardAuthorization::Avs::AddressOnFileMatch::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::CardAuthorization::Avs::AddressOnFileMatch::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class Card < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(Lithic::CardAuthorization::Card, Lithic::Internal::AnyHash) + end + + # Globally unique identifier for the card. + sig { returns(String) } + attr_accessor :token + + # Last four digits of the card number + sig { returns(String) } + attr_accessor :last_four + + # Customizable name to identify the card + sig { returns(String) } + attr_accessor :memo + + # Amount (in cents) to limit approved authorizations. Purchase requests above the + # spend limit will be declined (refunds and credits will be approved). + # + # Note that while spend limits are enforced based on authorized and settled volume + # on a card, they are not recommended to be used for balance or + # reconciliation-level accuracy. Spend limits also cannot block force posted + # charges (i.e., when a merchant sends a clearing message without a prior + # authorization). + sig { returns(Integer) } + attr_accessor :spend_limit + + # Note that to support recurring monthly payments, which can occur on different + # day every month, the time window we consider for MONTHLY velocity starts 6 days + # after the current calendar date one month prior. + sig do + returns( + Lithic::CardAuthorization::Card::SpendLimitDuration::TaggedSymbol + ) + end + attr_accessor :spend_limit_duration + + sig { returns(Lithic::CardAuthorization::Card::State::TaggedSymbol) } + attr_accessor :state + + sig { returns(Lithic::CardAuthorization::Card::Type::TaggedSymbol) } + attr_accessor :type + + # Card object in ASA + sig do + params( + token: String, + last_four: String, + memo: String, + spend_limit: Integer, + spend_limit_duration: + Lithic::CardAuthorization::Card::SpendLimitDuration::OrSymbol, + state: Lithic::CardAuthorization::Card::State::OrSymbol, + type: Lithic::CardAuthorization::Card::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # Globally unique identifier for the card. + token:, + # Last four digits of the card number + last_four:, + # Customizable name to identify the card + memo:, + # Amount (in cents) to limit approved authorizations. Purchase requests above the + # spend limit will be declined (refunds and credits will be approved). + # + # Note that while spend limits are enforced based on authorized and settled volume + # on a card, they are not recommended to be used for balance or + # reconciliation-level accuracy. Spend limits also cannot block force posted + # charges (i.e., when a merchant sends a clearing message without a prior + # authorization). + spend_limit:, + # Note that to support recurring monthly payments, which can occur on different + # day every month, the time window we consider for MONTHLY velocity starts 6 days + # after the current calendar date one month prior. + spend_limit_duration:, + state:, + type: + ) + end + + sig do + override.returns( + { + token: String, + last_four: String, + memo: String, + spend_limit: Integer, + spend_limit_duration: + Lithic::CardAuthorization::Card::SpendLimitDuration::TaggedSymbol, + state: Lithic::CardAuthorization::Card::State::TaggedSymbol, + type: Lithic::CardAuthorization::Card::Type::TaggedSymbol + } + ) + end + def to_hash + end + + # Note that to support recurring monthly payments, which can occur on different + # day every month, the time window we consider for MONTHLY velocity starts 6 days + # after the current calendar date one month prior. + module SpendLimitDuration + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::CardAuthorization::Card::SpendLimitDuration) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUALLY = + T.let( + :ANNUALLY, + Lithic::CardAuthorization::Card::SpendLimitDuration::TaggedSymbol + ) + FOREVER = + T.let( + :FOREVER, + Lithic::CardAuthorization::Card::SpendLimitDuration::TaggedSymbol + ) + MONTHLY = + T.let( + :MONTHLY, + Lithic::CardAuthorization::Card::SpendLimitDuration::TaggedSymbol + ) + TRANSACTION = + T.let( + :TRANSACTION, + Lithic::CardAuthorization::Card::SpendLimitDuration::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::CardAuthorization::Card::SpendLimitDuration::TaggedSymbol + ] + ) + end + def self.values + end + end + + module State + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::CardAuthorization::Card::State) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CLOSED = + T.let(:CLOSED, Lithic::CardAuthorization::Card::State::TaggedSymbol) + OPEN = + T.let(:OPEN, Lithic::CardAuthorization::Card::State::TaggedSymbol) + PAUSED = + T.let(:PAUSED, Lithic::CardAuthorization::Card::State::TaggedSymbol) + PENDING_ACTIVATION = + T.let( + :PENDING_ACTIVATION, + Lithic::CardAuthorization::Card::State::TaggedSymbol + ) + PENDING_FULFILLMENT = + T.let( + :PENDING_FULFILLMENT, + Lithic::CardAuthorization::Card::State::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Lithic::CardAuthorization::Card::State::TaggedSymbol] + ) + end + def self.values + end + end + + module Type + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::CardAuthorization::Card::Type) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + SINGLE_USE = + T.let( + :SINGLE_USE, + Lithic::CardAuthorization::Card::Type::TaggedSymbol + ) + MERCHANT_LOCKED = + T.let( + :MERCHANT_LOCKED, + Lithic::CardAuthorization::Card::Type::TaggedSymbol + ) + UNLOCKED = + T.let( + :UNLOCKED, + Lithic::CardAuthorization::Card::Type::TaggedSymbol + ) + PHYSICAL = + T.let( + :PHYSICAL, + Lithic::CardAuthorization::Card::Type::TaggedSymbol + ) + DIGITAL_WALLET = + T.let( + :DIGITAL_WALLET, + Lithic::CardAuthorization::Card::Type::TaggedSymbol + ) + VIRTUAL = + T.let(:VIRTUAL, Lithic::CardAuthorization::Card::Type::TaggedSymbol) + + sig do + override.returns( + T::Array[Lithic::CardAuthorization::Card::Type::TaggedSymbol] + ) + end + def self.values + end + end + end + + class Merchant < Lithic::Models::Merchant + OrHash = + T.type_alias do + T.any( + Lithic::CardAuthorization::Merchant, + Lithic::Internal::AnyHash + ) + end + + # Phone number of card acceptor. + sig { returns(T.nilable(String)) } + attr_accessor :phone_number + + # Postal code of card acceptor. + sig { returns(T.nilable(String)) } + attr_accessor :postal_code + + # Street address of card acceptor. + sig { returns(T.nilable(String)) } + attr_accessor :street_address + + # Merchant information including full location details. + sig do + params( + phone_number: T.nilable(String), + postal_code: T.nilable(String), + street_address: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Phone number of card acceptor. + phone_number:, + # Postal code of card acceptor. + postal_code:, + # Street address of card acceptor. + street_address: + ) + end + + sig do + override.returns( + { + phone_number: T.nilable(String), + postal_code: T.nilable(String), + street_address: T.nilable(String) + } + ) + end + def to_hash + end + end + + class ServiceLocation < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::CardAuthorization::ServiceLocation, + Lithic::Internal::AnyHash + ) + end + + # City of service location. + sig { returns(T.nilable(String)) } + attr_accessor :city + + # Country code of service location, ISO 3166-1 alpha-3. + sig { returns(T.nilable(String)) } + attr_accessor :country + + # Postal code of service location. + sig { returns(T.nilable(String)) } + attr_accessor :postal_code + + # State/province code of service location, ISO 3166-2. + sig { returns(T.nilable(String)) } + attr_accessor :state + + # Street address of service location. + sig { returns(T.nilable(String)) } + attr_accessor :street_address + + # Where the cardholder received the service, when different from the card acceptor + # location. This is populated from network data elements such as Mastercard DE-122 + # SE1 SF9-14 and Visa F34 DS02. + sig do + params( + city: T.nilable(String), + country: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String), + street_address: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # City of service location. + city:, + # Country code of service location, ISO 3166-1 alpha-3. + country:, + # Postal code of service location. + postal_code:, + # State/province code of service location, ISO 3166-2. + state:, + # Street address of service location. + street_address: + ) + end + + sig do + override.returns( + { + city: T.nilable(String), + country: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String), + street_address: T.nilable(String) + } + ) + end + def to_hash + end + end + + # The type of authorization request that this request is for. Note that + # `CREDIT_AUTHORIZATION` and `FINANCIAL_CREDIT_AUTHORIZATION` is only available to + # users with credit decisioning via ASA enabled. + module Status + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, Lithic::CardAuthorization::Status) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AUTHORIZATION = + T.let(:AUTHORIZATION, Lithic::CardAuthorization::Status::TaggedSymbol) + CREDIT_AUTHORIZATION = + T.let( + :CREDIT_AUTHORIZATION, + Lithic::CardAuthorization::Status::TaggedSymbol + ) + FINANCIAL_AUTHORIZATION = + T.let( + :FINANCIAL_AUTHORIZATION, + Lithic::CardAuthorization::Status::TaggedSymbol + ) + FINANCIAL_CREDIT_AUTHORIZATION = + T.let( + :FINANCIAL_CREDIT_AUTHORIZATION, + Lithic::CardAuthorization::Status::TaggedSymbol + ) + BALANCE_INQUIRY = + T.let( + :BALANCE_INQUIRY, + Lithic::CardAuthorization::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Lithic::CardAuthorization::Status::TaggedSymbol] + ) + end + def self.values + end + end + + # The entity that initiated the transaction. + module TransactionInitiator + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::CardAuthorization::TransactionInitiator) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CARDHOLDER = + T.let( + :CARDHOLDER, + Lithic::CardAuthorization::TransactionInitiator::TaggedSymbol + ) + MERCHANT = + T.let( + :MERCHANT, + Lithic::CardAuthorization::TransactionInitiator::TaggedSymbol + ) + UNKNOWN = + T.let( + :UNKNOWN, + Lithic::CardAuthorization::TransactionInitiator::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::CardAuthorization::TransactionInitiator::TaggedSymbol + ] + ) + end + def self.values + end + end + + module AccountType + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, Lithic::CardAuthorization::AccountType) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CHECKING = + T.let(:CHECKING, Lithic::CardAuthorization::AccountType::TaggedSymbol) + SAVINGS = + T.let(:SAVINGS, Lithic::CardAuthorization::AccountType::TaggedSymbol) + + sig do + override.returns( + T::Array[Lithic::CardAuthorization::AccountType::TaggedSymbol] + ) + end + def self.values + end + end + + class FleetInfo < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::CardAuthorization::FleetInfo, + Lithic::Internal::AnyHash + ) + end + + # Code indicating what the driver was prompted to enter at time of purchase. This + # is configured at a program level and is a static configuration, and does not + # change on a request to request basis + sig do + returns( + Lithic::CardAuthorization::FleetInfo::FleetPromptCode::TaggedSymbol + ) + end + attr_accessor :fleet_prompt_code + + # Code indicating which restrictions, if any, there are on purchase. This is + # configured at a program level and is a static configuration, and does not change + # on a request to request basis + sig do + returns( + Lithic::CardAuthorization::FleetInfo::FleetRestrictionCode::TaggedSymbol + ) + end + attr_accessor :fleet_restriction_code + + # Number representing the driver + sig { returns(T.nilable(String)) } + attr_accessor :driver_number + + # Number associated with the vehicle + sig { returns(T.nilable(String)) } + attr_accessor :vehicle_number + + # Optional Object containing information if the Card is a part of a Fleet managed + # program + sig do + params( + fleet_prompt_code: + Lithic::CardAuthorization::FleetInfo::FleetPromptCode::OrSymbol, + fleet_restriction_code: + Lithic::CardAuthorization::FleetInfo::FleetRestrictionCode::OrSymbol, + driver_number: T.nilable(String), + vehicle_number: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Code indicating what the driver was prompted to enter at time of purchase. This + # is configured at a program level and is a static configuration, and does not + # change on a request to request basis + fleet_prompt_code:, + # Code indicating which restrictions, if any, there are on purchase. This is + # configured at a program level and is a static configuration, and does not change + # on a request to request basis + fleet_restriction_code:, + # Number representing the driver + driver_number: nil, + # Number associated with the vehicle + vehicle_number: nil + ) + end + + sig do + override.returns( + { + fleet_prompt_code: + Lithic::CardAuthorization::FleetInfo::FleetPromptCode::TaggedSymbol, + fleet_restriction_code: + Lithic::CardAuthorization::FleetInfo::FleetRestrictionCode::TaggedSymbol, + driver_number: T.nilable(String), + vehicle_number: T.nilable(String) + } + ) + end + def to_hash + end + + # Code indicating what the driver was prompted to enter at time of purchase. This + # is configured at a program level and is a static configuration, and does not + # change on a request to request basis + module FleetPromptCode + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::CardAuthorization::FleetInfo::FleetPromptCode + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + NO_PROMPT = + T.let( + :NO_PROMPT, + Lithic::CardAuthorization::FleetInfo::FleetPromptCode::TaggedSymbol + ) + VEHICLE_NUMBER = + T.let( + :VEHICLE_NUMBER, + Lithic::CardAuthorization::FleetInfo::FleetPromptCode::TaggedSymbol + ) + DRIVER_NUMBER = + T.let( + :DRIVER_NUMBER, + Lithic::CardAuthorization::FleetInfo::FleetPromptCode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::CardAuthorization::FleetInfo::FleetPromptCode::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Code indicating which restrictions, if any, there are on purchase. This is + # configured at a program level and is a static configuration, and does not change + # on a request to request basis + module FleetRestrictionCode + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::CardAuthorization::FleetInfo::FleetRestrictionCode + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + NO_RESTRICTIONS = + T.let( + :NO_RESTRICTIONS, + Lithic::CardAuthorization::FleetInfo::FleetRestrictionCode::TaggedSymbol + ) + FUEL_ONLY = + T.let( + :FUEL_ONLY, + Lithic::CardAuthorization::FleetInfo::FleetRestrictionCode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::CardAuthorization::FleetInfo::FleetRestrictionCode::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class LatestChallenge < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::CardAuthorization::LatestChallenge, + Lithic::Internal::AnyHash + ) + end + + # The phone number used for sending Authorization Challenge SMS. + sig { returns(String) } + attr_accessor :phone_number + + # The status of the Authorization Challenge + # + # - `COMPLETED` - Challenge was successfully completed by the cardholder + # - `PENDING` - Challenge is still open + # - `EXPIRED` - Challenge has expired without being completed + # - `ERROR` - There was an error processing the challenge + sig do + returns( + Lithic::CardAuthorization::LatestChallenge::Status::TaggedSymbol + ) + end + attr_accessor :status + + # The date and time when the Authorization Challenge was completed in UTC. Present + # only if the status is `COMPLETED`. + sig { returns(T.nilable(Time)) } + attr_reader :completed_at + + sig { params(completed_at: Time).void } + attr_writer :completed_at + + # The latest Authorization Challenge that was issued to the cardholder for this + # merchant. + sig do + params( + phone_number: String, + status: + Lithic::CardAuthorization::LatestChallenge::Status::OrSymbol, + completed_at: Time + ).returns(T.attached_class) + end + def self.new( + # The phone number used for sending Authorization Challenge SMS. + phone_number:, + # The status of the Authorization Challenge + # + # - `COMPLETED` - Challenge was successfully completed by the cardholder + # - `PENDING` - Challenge is still open + # - `EXPIRED` - Challenge has expired without being completed + # - `ERROR` - There was an error processing the challenge + status:, + # The date and time when the Authorization Challenge was completed in UTC. Present + # only if the status is `COMPLETED`. + completed_at: nil + ) + end + + sig do + override.returns( + { + phone_number: String, + status: + Lithic::CardAuthorization::LatestChallenge::Status::TaggedSymbol, + completed_at: Time + } + ) + end + def to_hash + end + + # The status of the Authorization Challenge + # + # - `COMPLETED` - Challenge was successfully completed by the cardholder + # - `PENDING` - Challenge is still open + # - `EXPIRED` - Challenge has expired without being completed + # - `ERROR` - There was an error processing the challenge + module Status + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::CardAuthorization::LatestChallenge::Status) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + COMPLETED = + T.let( + :COMPLETED, + Lithic::CardAuthorization::LatestChallenge::Status::TaggedSymbol + ) + PENDING = + T.let( + :PENDING, + Lithic::CardAuthorization::LatestChallenge::Status::TaggedSymbol + ) + EXPIRED = + T.let( + :EXPIRED, + Lithic::CardAuthorization::LatestChallenge::Status::TaggedSymbol + ) + ERROR = + T.let( + :ERROR, + Lithic::CardAuthorization::LatestChallenge::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::CardAuthorization::LatestChallenge::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + # Card network of the authorization. + module Network + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, Lithic::CardAuthorization::Network) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AMEX = T.let(:AMEX, Lithic::CardAuthorization::Network::TaggedSymbol) + INTERLINK = + T.let(:INTERLINK, Lithic::CardAuthorization::Network::TaggedSymbol) + MAESTRO = + T.let(:MAESTRO, Lithic::CardAuthorization::Network::TaggedSymbol) + MASTERCARD = + T.let(:MASTERCARD, Lithic::CardAuthorization::Network::TaggedSymbol) + UNKNOWN = + T.let(:UNKNOWN, Lithic::CardAuthorization::Network::TaggedSymbol) + VISA = T.let(:VISA, Lithic::CardAuthorization::Network::TaggedSymbol) + + sig do + override.returns( + T::Array[Lithic::CardAuthorization::Network::TaggedSymbol] + ) + end + def self.values + end + end + + class NetworkSpecificData < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::CardAuthorization::NetworkSpecificData, + Lithic::Internal::AnyHash + ) + end + + sig do + returns( + T.nilable( + Lithic::CardAuthorization::NetworkSpecificData::Mastercard + ) + ) + end + attr_reader :mastercard + + sig do + params( + mastercard: + T.nilable( + Lithic::CardAuthorization::NetworkSpecificData::Mastercard::OrHash + ) + ).void + end + attr_writer :mastercard + + sig do + returns( + T.nilable(Lithic::CardAuthorization::NetworkSpecificData::Visa) + ) + end + attr_reader :visa + + sig do + params( + visa: + T.nilable( + Lithic::CardAuthorization::NetworkSpecificData::Visa::OrHash + ) + ).void + end + attr_writer :visa + + # Contains raw data provided by the card network, including attributes that + # provide further context about the authorization. If populated by the network, + # data is organized by Lithic and passed through without further modification. + # Please consult the official network documentation for more details about these + # values and how to use them. This object is only available to certain programs- + # contact your Customer Success Manager to discuss enabling access. + sig do + params( + mastercard: + T.nilable( + Lithic::CardAuthorization::NetworkSpecificData::Mastercard::OrHash + ), + visa: + T.nilable( + Lithic::CardAuthorization::NetworkSpecificData::Visa::OrHash + ) + ).returns(T.attached_class) + end + def self.new(mastercard: nil, visa: nil) + end + + sig do + override.returns( + { + mastercard: + T.nilable( + Lithic::CardAuthorization::NetworkSpecificData::Mastercard + ), + visa: + T.nilable(Lithic::CardAuthorization::NetworkSpecificData::Visa) + } + ) + end + def to_hash + end + + class Mastercard < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::CardAuthorization::NetworkSpecificData::Mastercard, + Lithic::Internal::AnyHash + ) + end + + # Indicates the electronic commerce security level and UCAF collection. + sig { returns(T.nilable(String)) } + attr_accessor :ecommerce_security_level_indicator + + # The On-behalf Service performed on the transaction and the results. Contains all + # applicable, on-behalf service results that were performed on a given + # transaction. + sig do + returns( + T.nilable( + T::Array[ + Lithic::CardAuthorization::NetworkSpecificData::Mastercard::OnBehalfServiceResult + ] + ) + ) + end + attr_accessor :on_behalf_service_result + + # Indicates the type of additional transaction purpose. + sig { returns(T.nilable(String)) } + attr_accessor :transaction_type_identifier + + sig do + params( + ecommerce_security_level_indicator: T.nilable(String), + on_behalf_service_result: + T.nilable( + T::Array[ + Lithic::CardAuthorization::NetworkSpecificData::Mastercard::OnBehalfServiceResult::OrHash + ] + ), + transaction_type_identifier: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Indicates the electronic commerce security level and UCAF collection. + ecommerce_security_level_indicator: nil, + # The On-behalf Service performed on the transaction and the results. Contains all + # applicable, on-behalf service results that were performed on a given + # transaction. + on_behalf_service_result: nil, + # Indicates the type of additional transaction purpose. + transaction_type_identifier: nil + ) + end + + sig do + override.returns( + { + ecommerce_security_level_indicator: T.nilable(String), + on_behalf_service_result: + T.nilable( + T::Array[ + Lithic::CardAuthorization::NetworkSpecificData::Mastercard::OnBehalfServiceResult + ] + ), + transaction_type_identifier: T.nilable(String) + } + ) + end + def to_hash + end + + class OnBehalfServiceResult < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::CardAuthorization::NetworkSpecificData::Mastercard::OnBehalfServiceResult, + Lithic::Internal::AnyHash + ) + end + + # Indicates the results of the service processing. + sig { returns(String) } + attr_accessor :result_1 + + # Identifies the results of the service processing. + sig { returns(String) } + attr_accessor :result_2 + + # Indicates the service performed on the transaction. + sig { returns(String) } + attr_accessor :service + + sig do + params( + result_1: String, + result_2: String, + service: String + ).returns(T.attached_class) + end + def self.new( + # Indicates the results of the service processing. + result_1:, + # Identifies the results of the service processing. + result_2:, + # Indicates the service performed on the transaction. + service: + ) + end + + sig do + override.returns( + { result_1: String, result_2: String, service: String } + ) + end + def to_hash + end + end + end + + class Visa < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::CardAuthorization::NetworkSpecificData::Visa, + Lithic::Internal::AnyHash + ) + end + + # Identifies the purpose or category of a transaction, used to classify and + # process transactions according to Visa’s rules. + sig { returns(T.nilable(String)) } + attr_accessor :business_application_identifier + + sig do + params(business_application_identifier: T.nilable(String)).returns( + T.attached_class + ) + end + def self.new( + # Identifies the purpose or category of a transaction, used to classify and + # process transactions according to Visa’s rules. + business_application_identifier: nil + ) + end + + sig do + override.returns( + { business_application_identifier: T.nilable(String) } + ) + end + def to_hash + end + end + end + + class Pos < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(Lithic::CardAuthorization::Pos, Lithic::Internal::AnyHash) + end + + # POS > Entry Mode object in ASA + sig { returns(T.nilable(Lithic::CardAuthorization::Pos::EntryMode)) } + attr_reader :entry_mode + + sig do + params( + entry_mode: Lithic::CardAuthorization::Pos::EntryMode::OrHash + ).void + end + attr_writer :entry_mode + + sig { returns(T.nilable(Lithic::CardAuthorization::Pos::Terminal)) } + attr_reader :terminal + + sig do + params( + terminal: Lithic::CardAuthorization::Pos::Terminal::OrHash + ).void + end + attr_writer :terminal + + sig do + params( + entry_mode: Lithic::CardAuthorization::Pos::EntryMode::OrHash, + terminal: Lithic::CardAuthorization::Pos::Terminal::OrHash + ).returns(T.attached_class) + end + def self.new( + # POS > Entry Mode object in ASA + entry_mode: nil, + terminal: nil + ) + end + + sig do + override.returns( + { + entry_mode: Lithic::CardAuthorization::Pos::EntryMode, + terminal: Lithic::CardAuthorization::Pos::Terminal + } + ) + end + def to_hash + end + + class EntryMode < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::CardAuthorization::Pos::EntryMode, + Lithic::Internal::AnyHash + ) + end + + # Card Presence Indicator + sig do + returns( + T.nilable( + Lithic::CardAuthorization::Pos::EntryMode::Card::TaggedSymbol + ) + ) + end + attr_reader :card + + sig do + params( + card: Lithic::CardAuthorization::Pos::EntryMode::Card::OrSymbol + ).void + end + attr_writer :card + + # Cardholder Presence Indicator + sig do + returns( + T.nilable( + Lithic::CardAuthorization::Pos::EntryMode::Cardholder::TaggedSymbol + ) + ) + end + attr_reader :cardholder + + sig do + params( + cardholder: + Lithic::CardAuthorization::Pos::EntryMode::Cardholder::OrSymbol + ).void + end + attr_writer :cardholder + + # Method of entry for the PAN + sig do + returns( + T.nilable( + Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol + ) + ) + end + attr_reader :pan + + sig do + params( + pan: Lithic::CardAuthorization::Pos::EntryMode::Pan::OrSymbol + ).void + end + attr_writer :pan + + # Indicates whether the cardholder entered the PIN. True if the PIN was entered. + sig { returns(T.nilable(T::Boolean)) } + attr_reader :pin_entered + + sig { params(pin_entered: T::Boolean).void } + attr_writer :pin_entered + + # POS > Entry Mode object in ASA + sig do + params( + card: Lithic::CardAuthorization::Pos::EntryMode::Card::OrSymbol, + cardholder: + Lithic::CardAuthorization::Pos::EntryMode::Cardholder::OrSymbol, + pan: Lithic::CardAuthorization::Pos::EntryMode::Pan::OrSymbol, + pin_entered: T::Boolean + ).returns(T.attached_class) + end + def self.new( + # Card Presence Indicator + card: nil, + # Cardholder Presence Indicator + cardholder: nil, + # Method of entry for the PAN + pan: nil, + # Indicates whether the cardholder entered the PIN. True if the PIN was entered. + pin_entered: nil + ) + end + + sig do + override.returns( + { + card: + Lithic::CardAuthorization::Pos::EntryMode::Card::TaggedSymbol, + cardholder: + Lithic::CardAuthorization::Pos::EntryMode::Cardholder::TaggedSymbol, + pan: + Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol, + pin_entered: T::Boolean + } + ) + end + def to_hash + end + + # Card Presence Indicator + module Card + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::CardAuthorization::Pos::EntryMode::Card) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PRESENT = + T.let( + :PRESENT, + Lithic::CardAuthorization::Pos::EntryMode::Card::TaggedSymbol + ) + NOT_PRESENT = + T.let( + :NOT_PRESENT, + Lithic::CardAuthorization::Pos::EntryMode::Card::TaggedSymbol + ) + UNKNOWN = + T.let( + :UNKNOWN, + Lithic::CardAuthorization::Pos::EntryMode::Card::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::CardAuthorization::Pos::EntryMode::Card::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Cardholder Presence Indicator + module Cardholder + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::CardAuthorization::Pos::EntryMode::Cardholder + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + DEFERRED_BILLING = + T.let( + :DEFERRED_BILLING, + Lithic::CardAuthorization::Pos::EntryMode::Cardholder::TaggedSymbol + ) + ELECTRONIC_ORDER = + T.let( + :ELECTRONIC_ORDER, + Lithic::CardAuthorization::Pos::EntryMode::Cardholder::TaggedSymbol + ) + INSTALLMENT = + T.let( + :INSTALLMENT, + Lithic::CardAuthorization::Pos::EntryMode::Cardholder::TaggedSymbol + ) + MAIL_ORDER = + T.let( + :MAIL_ORDER, + Lithic::CardAuthorization::Pos::EntryMode::Cardholder::TaggedSymbol + ) + NOT_PRESENT = + T.let( + :NOT_PRESENT, + Lithic::CardAuthorization::Pos::EntryMode::Cardholder::TaggedSymbol + ) + PRESENT = + T.let( + :PRESENT, + Lithic::CardAuthorization::Pos::EntryMode::Cardholder::TaggedSymbol + ) + REOCCURRING = + T.let( + :REOCCURRING, + Lithic::CardAuthorization::Pos::EntryMode::Cardholder::TaggedSymbol + ) + TELEPHONE_ORDER = + T.let( + :TELEPHONE_ORDER, + Lithic::CardAuthorization::Pos::EntryMode::Cardholder::TaggedSymbol + ) + UNKNOWN = + T.let( + :UNKNOWN, + Lithic::CardAuthorization::Pos::EntryMode::Cardholder::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::CardAuthorization::Pos::EntryMode::Cardholder::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Method of entry for the PAN + module Pan + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::CardAuthorization::Pos::EntryMode::Pan) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AUTO_ENTRY = + T.let( + :AUTO_ENTRY, + Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol + ) + BAR_CODE = + T.let( + :BAR_CODE, + Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol + ) + CONTACTLESS = + T.let( + :CONTACTLESS, + Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol + ) + ECOMMERCE = + T.let( + :ECOMMERCE, + Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol + ) + ERROR_KEYED = + T.let( + :ERROR_KEYED, + Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol + ) + ERROR_MAGNETIC_STRIPE = + T.let( + :ERROR_MAGNETIC_STRIPE, + Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol + ) + ICC = + T.let( + :ICC, + Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol + ) + KEY_ENTERED = + T.let( + :KEY_ENTERED, + Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol + ) + MAGNETIC_STRIPE = + T.let( + :MAGNETIC_STRIPE, + Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol + ) + MANUAL = + T.let( + :MANUAL, + Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol + ) + OCR = + T.let( + :OCR, + Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol + ) + SECURE_CARDLESS = + T.let( + :SECURE_CARDLESS, + Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol + ) + UNSPECIFIED = + T.let( + :UNSPECIFIED, + Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol + ) + UNKNOWN = + T.let( + :UNKNOWN, + Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol + ) + CREDENTIAL_ON_FILE = + T.let( + :CREDENTIAL_ON_FILE, + Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class Terminal < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::CardAuthorization::Pos::Terminal, + Lithic::Internal::AnyHash + ) + end + + # True if a clerk is present at the sale. + sig { returns(T::Boolean) } + attr_accessor :attended + + # True if the terminal is capable of retaining the card. + sig { returns(T::Boolean) } + attr_accessor :card_retention_capable + + # True if the sale was made at the place of business (vs. mobile). + sig { returns(T::Boolean) } + attr_accessor :on_premise + + # The person that is designated to swipe the card + sig do + returns( + Lithic::CardAuthorization::Pos::Terminal::Operator::TaggedSymbol + ) + end + attr_accessor :operator + + # True if the terminal is capable of partial approval. Partial approval is when + # part of a transaction is approved and another payment must be used for the + # remainder. Example scenario: A $40 transaction is attempted on a prepaid card + # with a $25 balance. If partial approval is enabled, $25 can be authorized, at + # which point the POS will prompt the user for an additional payment of $15. + sig { returns(T::Boolean) } + attr_accessor :partial_approval_capable + + # Status of whether the POS is able to accept PINs + sig do + returns( + Lithic::CardAuthorization::Pos::Terminal::PinCapability::TaggedSymbol + ) + end + attr_accessor :pin_capability + + # POS Type + sig do + returns( + Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol + ) + end + attr_accessor :type + + # Uniquely identifies a terminal at the card acceptor location of acquiring + # institutions or merchant POS Systems. Left justified with trailing spaces. + sig { returns(T.nilable(String)) } + attr_accessor :acceptor_terminal_id + + sig do + params( + attended: T::Boolean, + card_retention_capable: T::Boolean, + on_premise: T::Boolean, + operator: + Lithic::CardAuthorization::Pos::Terminal::Operator::OrSymbol, + partial_approval_capable: T::Boolean, + pin_capability: + Lithic::CardAuthorization::Pos::Terminal::PinCapability::OrSymbol, + type: Lithic::CardAuthorization::Pos::Terminal::Type::OrSymbol, + acceptor_terminal_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # True if a clerk is present at the sale. + attended:, + # True if the terminal is capable of retaining the card. + card_retention_capable:, + # True if the sale was made at the place of business (vs. mobile). + on_premise:, + # The person that is designated to swipe the card + operator:, + # True if the terminal is capable of partial approval. Partial approval is when + # part of a transaction is approved and another payment must be used for the + # remainder. Example scenario: A $40 transaction is attempted on a prepaid card + # with a $25 balance. If partial approval is enabled, $25 can be authorized, at + # which point the POS will prompt the user for an additional payment of $15. + partial_approval_capable:, + # Status of whether the POS is able to accept PINs + pin_capability:, + # POS Type + type:, + # Uniquely identifies a terminal at the card acceptor location of acquiring + # institutions or merchant POS Systems. Left justified with trailing spaces. + acceptor_terminal_id: nil + ) + end + + sig do + override.returns( + { + attended: T::Boolean, + card_retention_capable: T::Boolean, + on_premise: T::Boolean, + operator: + Lithic::CardAuthorization::Pos::Terminal::Operator::TaggedSymbol, + partial_approval_capable: T::Boolean, + pin_capability: + Lithic::CardAuthorization::Pos::Terminal::PinCapability::TaggedSymbol, + type: + Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol, + acceptor_terminal_id: T.nilable(String) + } + ) + end + def to_hash + end + + # The person that is designated to swipe the card + module Operator + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::CardAuthorization::Pos::Terminal::Operator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ADMINISTRATIVE = + T.let( + :ADMINISTRATIVE, + Lithic::CardAuthorization::Pos::Terminal::Operator::TaggedSymbol + ) + CARDHOLDER = + T.let( + :CARDHOLDER, + Lithic::CardAuthorization::Pos::Terminal::Operator::TaggedSymbol + ) + CARD_ACCEPTOR = + T.let( + :CARD_ACCEPTOR, + Lithic::CardAuthorization::Pos::Terminal::Operator::TaggedSymbol + ) + UNKNOWN = + T.let( + :UNKNOWN, + Lithic::CardAuthorization::Pos::Terminal::Operator::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::CardAuthorization::Pos::Terminal::Operator::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Status of whether the POS is able to accept PINs + module PinCapability + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::CardAuthorization::Pos::Terminal::PinCapability + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CAPABLE = + T.let( + :CAPABLE, + Lithic::CardAuthorization::Pos::Terminal::PinCapability::TaggedSymbol + ) + INOPERATIVE = + T.let( + :INOPERATIVE, + Lithic::CardAuthorization::Pos::Terminal::PinCapability::TaggedSymbol + ) + NOT_CAPABLE = + T.let( + :NOT_CAPABLE, + Lithic::CardAuthorization::Pos::Terminal::PinCapability::TaggedSymbol + ) + UNSPECIFIED = + T.let( + :UNSPECIFIED, + Lithic::CardAuthorization::Pos::Terminal::PinCapability::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::CardAuthorization::Pos::Terminal::PinCapability::TaggedSymbol + ] + ) + end + def self.values + end + end + + # POS Type + module Type + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::CardAuthorization::Pos::Terminal::Type) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ADMINISTRATIVE = + T.let( + :ADMINISTRATIVE, + Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol + ) + ATM = + T.let( + :ATM, + Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol + ) + AUTHORIZATION = + T.let( + :AUTHORIZATION, + Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol + ) + COUPON_MACHINE = + T.let( + :COUPON_MACHINE, + Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol + ) + DIAL_TERMINAL = + T.let( + :DIAL_TERMINAL, + Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol + ) + ECOMMERCE = + T.let( + :ECOMMERCE, + Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol + ) + ECR = + T.let( + :ECR, + Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol + ) + FUEL_MACHINE = + T.let( + :FUEL_MACHINE, + Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol + ) + HOME_TERMINAL = + T.let( + :HOME_TERMINAL, + Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol + ) + MICR = + T.let( + :MICR, + Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol + ) + OFF_PREMISE = + T.let( + :OFF_PREMISE, + Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol + ) + PAYMENT = + T.let( + :PAYMENT, + Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol + ) + PDA = + T.let( + :PDA, + Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol + ) + PHONE = + T.let( + :PHONE, + Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol + ) + POINT = + T.let( + :POINT, + Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol + ) + POS_TERMINAL = + T.let( + :POS_TERMINAL, + Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol + ) + PUBLIC_UTILITY = + T.let( + :PUBLIC_UTILITY, + Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol + ) + SELF_SERVICE = + T.let( + :SELF_SERVICE, + Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol + ) + TELEVISION = + T.let( + :TELEVISION, + Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol + ) + TELLER = + T.let( + :TELLER, + Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol + ) + TRAVELERS_CHECK_MACHINE = + T.let( + :TRAVELERS_CHECK_MACHINE, + Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol + ) + VENDING = + T.let( + :VENDING, + Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol + ) + VOICE = + T.let( + :VOICE, + Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol + ) + UNKNOWN = + T.let( + :UNKNOWN, + Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + end + end +end diff --git a/rbi/lithic/models/card_authorization_approval_request_webhook_event.rbi b/rbi/lithic/models/card_authorization_approval_request_webhook_event.rbi index 163690ef..e0f07753 100644 --- a/rbi/lithic/models/card_authorization_approval_request_webhook_event.rbi +++ b/rbi/lithic/models/card_authorization_approval_request_webhook_event.rbi @@ -2,7 +2,7 @@ module Lithic module Models - class CardAuthorizationApprovalRequestWebhookEvent < Lithic::Internal::Type::BaseModel + class CardAuthorizationApprovalRequestWebhookEvent < Lithic::Models::CardAuthorization OrHash = T.type_alias do T.any( @@ -11,2770 +11,17 @@ module Lithic ) end - # The provisional transaction group uuid associated with the authorization - sig { returns(String) } - attr_accessor :token - - # Fee (in cents) assessed by the merchant and paid for by the cardholder. Will be - # zero if no fee is assessed. Rebates may be transmitted as a negative value to - # indicate credited fees. - sig { returns(Integer) } - attr_accessor :acquirer_fee - - # Deprecated, use `amounts`. Authorization amount of the transaction (in cents), - # including any acquirer fees. The contents of this field are identical to - # `authorization_amount`. - sig { returns(Integer) } - attr_accessor :amount - - # Structured amounts for this authorization. The `cardholder` and `merchant` - # amounts reflect the original network authorization values. For programs with - # hold adjustments enabled (e.g., automated fuel dispensers or tipping MCCs), the - # `hold` amount may exceed the `cardholder` and `merchant` amounts to account for - # anticipated final transaction amounts such as tips or fuel fill-ups - sig do - returns(Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts) - end - attr_reader :amounts - - sig do - params( - amounts: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::OrHash - ).void - end - attr_writer :amounts - - # Deprecated, use `amounts`. The base transaction amount (in cents) plus the - # acquirer fee field. This is the amount the issuer should authorize against - # unless the issuer is paying the acquirer fee on behalf of the cardholder. - sig { returns(Integer) } - attr_accessor :authorization_amount - - sig { returns(Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs) } - attr_reader :avs - - sig do - params( - avs: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs::OrHash - ).void - end - attr_writer :avs - - # Card object in ASA - sig do - returns(Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card) - end - attr_reader :card - - sig do - params( - card: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::OrHash - ).void - end - attr_writer :card - - # Deprecated, use `amounts`. 3-character alphabetic ISO 4217 code for cardholder's - # billing currency. - sig { returns(String) } - attr_accessor :cardholder_currency - - # The portion of the transaction requested as cash back by the cardholder, and - # does not include any acquirer fees. The amount field includes the purchase - # amount, the requested cash back amount, and any acquirer fees. - # - # If no cash back was requested, the value of this field will be 0, and the field - # will always be present. - sig { returns(Integer) } - attr_accessor :cash_amount - - # Date and time when the transaction first occurred in UTC. - sig { returns(Time) } - attr_accessor :created - sig { returns(Symbol) } attr_accessor :event_type - # Merchant information including full location details. - sig do - returns(Lithic::CardAuthorizationApprovalRequestWebhookEvent::Merchant) - end - attr_reader :merchant - - sig do - params( - merchant: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Merchant::OrHash - ).void - end - attr_writer :merchant - - # Deprecated, use `amounts`. The amount that the merchant will receive, - # denominated in `merchant_currency` and in the smallest currency unit. Note the - # amount includes `acquirer_fee`, similar to `authorization_amount`. It will be - # different from `authorization_amount` if the merchant is taking payment in a - # different currency. - sig { returns(Integer) } - attr_accessor :merchant_amount - - # 3-character alphabetic ISO 4217 code for the local currency of the transaction. - sig { returns(String) } - attr_accessor :merchant_currency - - # Where the cardholder received the service, when different from the card acceptor - # location. This is populated from network data elements such as Mastercard DE-122 - # SE1 SF9-14 and Visa F34 DS02. - sig do - returns( - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::ServiceLocation - ) - ) - end - attr_reader :service_location - - sig do - params( - service_location: - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::ServiceLocation::OrHash - ) - ).void - end - attr_writer :service_location - - # Deprecated, use `amounts`. Amount (in cents) of the transaction that has been - # settled, including any acquirer fees. - sig { returns(Integer) } - attr_accessor :settled_amount - - # The type of authorization request that this request is for. Note that - # `CREDIT_AUTHORIZATION` and `FINANCIAL_CREDIT_AUTHORIZATION` is only available to - # users with credit decisioning via ASA enabled. - sig do - returns( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Status::TaggedSymbol - ) - end - attr_accessor :status - - # The entity that initiated the transaction. - sig do - returns( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::TransactionInitiator::TaggedSymbol - ) - end - attr_accessor :transaction_initiator - - sig do - returns( - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::AccountType::TaggedSymbol - ) - ) - end - attr_reader :account_type - - sig do - params( - account_type: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::AccountType::OrSymbol - ).void - end - attr_writer :account_type - - sig { returns(T.nilable(Lithic::CardholderAuthentication)) } - attr_reader :cardholder_authentication - - sig do - params( - cardholder_authentication: Lithic::CardholderAuthentication::OrHash - ).void - end - attr_writer :cardholder_authentication - - # Deprecated, use `cash_amount`. - sig { returns(T.nilable(Integer)) } - attr_reader :cashback - - sig { params(cashback: Integer).void } - attr_writer :cashback - - # Deprecated, use `amounts`. If the transaction was requested in a currency other - # than the settlement currency, this field will be populated to indicate the rate - # used to translate the merchant_amount to the amount (i.e., `merchant_amount` x - # `conversion_rate` = `amount`). Note that the `merchant_amount` is in the local - # currency and the amount is in the settlement currency. - sig { returns(T.nilable(Float)) } - attr_reader :conversion_rate - - sig { params(conversion_rate: Float).void } - attr_writer :conversion_rate - - # The event token associated with the authorization. This field is only set for - # programs enrolled into the beta. - sig { returns(T.nilable(String)) } - attr_reader :event_token - - sig { params(event_token: String).void } - attr_writer :event_token - - # Optional Object containing information if the Card is a part of a Fleet managed - # program - sig do - returns( - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo - ) - ) - end - attr_reader :fleet_info - - sig do - params( - fleet_info: - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::OrHash - ) - ).void - end - attr_writer :fleet_info - - # The latest Authorization Challenge that was issued to the cardholder for this - # merchant. - sig do - returns( - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge - ) - ) - end - attr_reader :latest_challenge - - sig do - params( - latest_challenge: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::OrHash - ).void - end - attr_writer :latest_challenge - - # Card network of the authorization. - sig do - returns( - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Network::TaggedSymbol - ) - ) - end - attr_reader :network - - sig do - params( - network: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Network::OrSymbol - ).void - end - attr_writer :network - - # Network-provided score assessing risk level associated with a given - # authorization. Scores are on a range of 0-999, with 0 representing the lowest - # risk and 999 representing the highest risk. For Visa transactions, where the raw - # score has a range of 0-99, Lithic will normalize the score by multiplying the - # raw score by 10x. - sig { returns(T.nilable(Integer)) } - attr_accessor :network_risk_score - - # Contains raw data provided by the card network, including attributes that - # provide further context about the authorization. If populated by the network, - # data is organized by Lithic and passed through without further modification. - # Please consult the official network documentation for more details about these - # values and how to use them. This object is only available to certain programs- - # contact your Customer Success Manager to discuss enabling access. - sig do - returns( - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData - ) - ) - end - attr_reader :network_specific_data - - sig do - params( - network_specific_data: - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::OrHash - ) - ).void + # The Auth Stream Access request payload that was sent to the ASA responder. + sig { params(event_type: Symbol).returns(T.attached_class) } + def self.new(event_type: :"card_authorization.approval_request") end - attr_writer :network_specific_data - sig do - returns( - T.nilable(Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos) - ) - end - attr_reader :pos - - sig do - params( - pos: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::OrHash - ).void - end - attr_writer :pos - - sig { returns(T.nilable(Lithic::TokenInfo)) } - attr_reader :token_info - - sig { params(token_info: T.nilable(Lithic::TokenInfo::OrHash)).void } - attr_writer :token_info - - # Deprecated: approximate time-to-live for the authorization. - sig { returns(T.nilable(Time)) } - attr_reader :ttl - - sig { params(ttl: Time).void } - attr_writer :ttl - - sig do - params( - token: String, - acquirer_fee: Integer, - amount: Integer, - amounts: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::OrHash, - authorization_amount: Integer, - avs: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs::OrHash, - card: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::OrHash, - cardholder_currency: String, - cash_amount: Integer, - created: Time, - merchant: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Merchant::OrHash, - merchant_amount: Integer, - merchant_currency: String, - service_location: - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::ServiceLocation::OrHash - ), - settled_amount: Integer, - status: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Status::OrSymbol, - transaction_initiator: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::TransactionInitiator::OrSymbol, - account_type: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::AccountType::OrSymbol, - cardholder_authentication: Lithic::CardholderAuthentication::OrHash, - cashback: Integer, - conversion_rate: Float, - event_token: String, - fleet_info: - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::OrHash - ), - latest_challenge: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::OrHash, - network: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Network::OrSymbol, - network_risk_score: T.nilable(Integer), - network_specific_data: - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::OrHash - ), - pos: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::OrHash, - token_info: T.nilable(Lithic::TokenInfo::OrHash), - ttl: Time, - event_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The provisional transaction group uuid associated with the authorization - token:, - # Fee (in cents) assessed by the merchant and paid for by the cardholder. Will be - # zero if no fee is assessed. Rebates may be transmitted as a negative value to - # indicate credited fees. - acquirer_fee:, - # Deprecated, use `amounts`. Authorization amount of the transaction (in cents), - # including any acquirer fees. The contents of this field are identical to - # `authorization_amount`. - amount:, - # Structured amounts for this authorization. The `cardholder` and `merchant` - # amounts reflect the original network authorization values. For programs with - # hold adjustments enabled (e.g., automated fuel dispensers or tipping MCCs), the - # `hold` amount may exceed the `cardholder` and `merchant` amounts to account for - # anticipated final transaction amounts such as tips or fuel fill-ups - amounts:, - # Deprecated, use `amounts`. The base transaction amount (in cents) plus the - # acquirer fee field. This is the amount the issuer should authorize against - # unless the issuer is paying the acquirer fee on behalf of the cardholder. - authorization_amount:, - avs:, - # Card object in ASA - card:, - # Deprecated, use `amounts`. 3-character alphabetic ISO 4217 code for cardholder's - # billing currency. - cardholder_currency:, - # The portion of the transaction requested as cash back by the cardholder, and - # does not include any acquirer fees. The amount field includes the purchase - # amount, the requested cash back amount, and any acquirer fees. - # - # If no cash back was requested, the value of this field will be 0, and the field - # will always be present. - cash_amount:, - # Date and time when the transaction first occurred in UTC. - created:, - # Merchant information including full location details. - merchant:, - # Deprecated, use `amounts`. The amount that the merchant will receive, - # denominated in `merchant_currency` and in the smallest currency unit. Note the - # amount includes `acquirer_fee`, similar to `authorization_amount`. It will be - # different from `authorization_amount` if the merchant is taking payment in a - # different currency. - merchant_amount:, - # 3-character alphabetic ISO 4217 code for the local currency of the transaction. - merchant_currency:, - # Where the cardholder received the service, when different from the card acceptor - # location. This is populated from network data elements such as Mastercard DE-122 - # SE1 SF9-14 and Visa F34 DS02. - service_location:, - # Deprecated, use `amounts`. Amount (in cents) of the transaction that has been - # settled, including any acquirer fees. - settled_amount:, - # The type of authorization request that this request is for. Note that - # `CREDIT_AUTHORIZATION` and `FINANCIAL_CREDIT_AUTHORIZATION` is only available to - # users with credit decisioning via ASA enabled. - status:, - # The entity that initiated the transaction. - transaction_initiator:, - account_type: nil, - cardholder_authentication: nil, - # Deprecated, use `cash_amount`. - cashback: nil, - # Deprecated, use `amounts`. If the transaction was requested in a currency other - # than the settlement currency, this field will be populated to indicate the rate - # used to translate the merchant_amount to the amount (i.e., `merchant_amount` x - # `conversion_rate` = `amount`). Note that the `merchant_amount` is in the local - # currency and the amount is in the settlement currency. - conversion_rate: nil, - # The event token associated with the authorization. This field is only set for - # programs enrolled into the beta. - event_token: nil, - # Optional Object containing information if the Card is a part of a Fleet managed - # program - fleet_info: nil, - # The latest Authorization Challenge that was issued to the cardholder for this - # merchant. - latest_challenge: nil, - # Card network of the authorization. - network: nil, - # Network-provided score assessing risk level associated with a given - # authorization. Scores are on a range of 0-999, with 0 representing the lowest - # risk and 999 representing the highest risk. For Visa transactions, where the raw - # score has a range of 0-99, Lithic will normalize the score by multiplying the - # raw score by 10x. - network_risk_score: nil, - # Contains raw data provided by the card network, including attributes that - # provide further context about the authorization. If populated by the network, - # data is organized by Lithic and passed through without further modification. - # Please consult the official network documentation for more details about these - # values and how to use them. This object is only available to certain programs- - # contact your Customer Success Manager to discuss enabling access. - network_specific_data: nil, - pos: nil, - token_info: nil, - # Deprecated: approximate time-to-live for the authorization. - ttl: nil, - event_type: :"card_authorization.approval_request" - ) - end - - sig do - override.returns( - { - token: String, - acquirer_fee: Integer, - amount: Integer, - amounts: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts, - authorization_amount: Integer, - avs: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs, - card: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card, - cardholder_currency: String, - cash_amount: Integer, - created: Time, - event_type: Symbol, - merchant: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Merchant, - merchant_amount: Integer, - merchant_currency: String, - service_location: - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::ServiceLocation - ), - settled_amount: Integer, - status: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Status::TaggedSymbol, - transaction_initiator: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::TransactionInitiator::TaggedSymbol, - account_type: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::AccountType::TaggedSymbol, - cardholder_authentication: Lithic::CardholderAuthentication, - cashback: Integer, - conversion_rate: Float, - event_token: String, - fleet_info: - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo - ), - latest_challenge: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge, - network: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Network::TaggedSymbol, - network_risk_score: T.nilable(Integer), - network_specific_data: - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData - ), - pos: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos, - token_info: T.nilable(Lithic::TokenInfo), - ttl: Time - } - ) - end + sig { override.returns({ event_type: Symbol }) } def to_hash end - - class Amounts < Lithic::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts, - Lithic::Internal::AnyHash - ) - end - - sig do - returns( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder - ) - end - attr_reader :cardholder - - sig do - params( - cardholder: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder::OrHash - ).void - end - attr_writer :cardholder - - sig do - returns( - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold - ) - ) - end - attr_reader :hold - - sig do - params( - hold: - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold::OrHash - ) - ).void - end - attr_writer :hold - - sig do - returns( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant - ) - end - attr_reader :merchant - - sig do - params( - merchant: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant::OrHash - ).void - end - attr_writer :merchant - - sig do - returns( - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement - ) - ) - end - attr_reader :settlement - - sig do - params( - settlement: - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement::OrHash - ) - ).void - end - attr_writer :settlement - - # Structured amounts for this authorization. The `cardholder` and `merchant` - # amounts reflect the original network authorization values. For programs with - # hold adjustments enabled (e.g., automated fuel dispensers or tipping MCCs), the - # `hold` amount may exceed the `cardholder` and `merchant` amounts to account for - # anticipated final transaction amounts such as tips or fuel fill-ups - sig do - params( - cardholder: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder::OrHash, - hold: - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold::OrHash - ), - merchant: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant::OrHash, - settlement: - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement::OrHash - ) - ).returns(T.attached_class) - end - def self.new(cardholder:, hold:, merchant:, settlement:) - end - - sig do - override.returns( - { - cardholder: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder, - hold: - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold - ), - merchant: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant, - settlement: - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement - ) - } - ) - end - def to_hash - end - - class Cardholder < Lithic::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder, - Lithic::Internal::AnyHash - ) - end - - # Amount in the smallest unit of the applicable currency (e.g., cents) - sig { returns(Integer) } - attr_accessor :amount - - # Exchange rate used for currency conversion - sig { returns(String) } - attr_accessor :conversion_rate - - # 3-character alphabetic ISO 4217 currency - sig { returns(String) } - attr_accessor :currency - - sig do - params( - amount: Integer, - conversion_rate: String, - currency: String - ).returns(T.attached_class) - end - def self.new( - # Amount in the smallest unit of the applicable currency (e.g., cents) - amount:, - # Exchange rate used for currency conversion - conversion_rate:, - # 3-character alphabetic ISO 4217 currency - currency: - ) - end - - sig do - override.returns( - { amount: Integer, conversion_rate: String, currency: String } - ) - end - def to_hash - end - end - - class Hold < Lithic::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold, - Lithic::Internal::AnyHash - ) - end - - # Amount in the smallest unit of the applicable currency (e.g., cents) - sig { returns(Integer) } - attr_accessor :amount - - # 3-character alphabetic ISO 4217 currency - sig { returns(String) } - attr_accessor :currency - - sig do - params(amount: Integer, currency: String).returns(T.attached_class) - end - def self.new( - # Amount in the smallest unit of the applicable currency (e.g., cents) - amount:, - # 3-character alphabetic ISO 4217 currency - currency: - ) - end - - sig { override.returns({ amount: Integer, currency: String }) } - def to_hash - end - end - - class Merchant < Lithic::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant, - Lithic::Internal::AnyHash - ) - end - - # Amount in the smallest unit of the applicable currency (e.g., cents) - sig { returns(Integer) } - attr_accessor :amount - - # 3-character alphabetic ISO 4217 currency - sig { returns(String) } - attr_accessor :currency - - sig do - params(amount: Integer, currency: String).returns(T.attached_class) - end - def self.new( - # Amount in the smallest unit of the applicable currency (e.g., cents) - amount:, - # 3-character alphabetic ISO 4217 currency - currency: - ) - end - - sig { override.returns({ amount: Integer, currency: String }) } - def to_hash - end - end - - class Settlement < Lithic::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement, - Lithic::Internal::AnyHash - ) - end - - # Amount in the smallest unit of the applicable currency (e.g., cents) - sig { returns(Integer) } - attr_accessor :amount - - # 3-character alphabetic ISO 4217 currency - sig { returns(String) } - attr_accessor :currency - - sig do - params(amount: Integer, currency: String).returns(T.attached_class) - end - def self.new( - # Amount in the smallest unit of the applicable currency (e.g., cents) - amount:, - # 3-character alphabetic ISO 4217 currency - currency: - ) - end - - sig { override.returns({ amount: Integer, currency: String }) } - def to_hash - end - end - end - - class Avs < Lithic::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs, - Lithic::Internal::AnyHash - ) - end - - # Cardholder address - sig { returns(String) } - attr_accessor :address - - # Lithic's evaluation result comparing the transaction's address data with the - # cardholder KYC data if it exists. In the event Lithic does not have any - # Cardholder KYC data, or the transaction does not contain any address data, - # NOT_PRESENT will be returned - sig do - returns( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs::AddressOnFileMatch::TaggedSymbol - ) - end - attr_accessor :address_on_file_match - - # Cardholder ZIP code - sig { returns(String) } - attr_accessor :zipcode - - sig do - params( - address: String, - address_on_file_match: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs::AddressOnFileMatch::OrSymbol, - zipcode: String - ).returns(T.attached_class) - end - def self.new( - # Cardholder address - address:, - # Lithic's evaluation result comparing the transaction's address data with the - # cardholder KYC data if it exists. In the event Lithic does not have any - # Cardholder KYC data, or the transaction does not contain any address data, - # NOT_PRESENT will be returned - address_on_file_match:, - # Cardholder ZIP code - zipcode: - ) - end - - sig do - override.returns( - { - address: String, - address_on_file_match: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs::AddressOnFileMatch::TaggedSymbol, - zipcode: String - } - ) - end - def to_hash - end - - # Lithic's evaluation result comparing the transaction's address data with the - # cardholder KYC data if it exists. In the event Lithic does not have any - # Cardholder KYC data, or the transaction does not contain any address data, - # NOT_PRESENT will be returned - module AddressOnFileMatch - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs::AddressOnFileMatch - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - MATCH = - T.let( - :MATCH, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs::AddressOnFileMatch::TaggedSymbol - ) - MATCH_ADDRESS_ONLY = - T.let( - :MATCH_ADDRESS_ONLY, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs::AddressOnFileMatch::TaggedSymbol - ) - MATCH_ZIP_ONLY = - T.let( - :MATCH_ZIP_ONLY, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs::AddressOnFileMatch::TaggedSymbol - ) - MISMATCH = - T.let( - :MISMATCH, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs::AddressOnFileMatch::TaggedSymbol - ) - NOT_PRESENT = - T.let( - :NOT_PRESENT, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs::AddressOnFileMatch::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs::AddressOnFileMatch::TaggedSymbol - ] - ) - end - def self.values - end - end - end - - class Card < Lithic::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card, - Lithic::Internal::AnyHash - ) - end - - # Globally unique identifier for the card. - sig { returns(String) } - attr_accessor :token - - # Last four digits of the card number - sig { returns(String) } - attr_accessor :last_four - - # Customizable name to identify the card - sig { returns(String) } - attr_accessor :memo - - # Amount (in cents) to limit approved authorizations. Purchase requests above the - # spend limit will be declined (refunds and credits will be approved). - # - # Note that while spend limits are enforced based on authorized and settled volume - # on a card, they are not recommended to be used for balance or - # reconciliation-level accuracy. Spend limits also cannot block force posted - # charges (i.e., when a merchant sends a clearing message without a prior - # authorization). - sig { returns(Integer) } - attr_accessor :spend_limit - - # Note that to support recurring monthly payments, which can occur on different - # day every month, the time window we consider for MONTHLY velocity starts 6 days - # after the current calendar date one month prior. - sig do - returns( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::SpendLimitDuration::TaggedSymbol - ) - end - attr_accessor :spend_limit_duration - - sig do - returns( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::State::TaggedSymbol - ) - end - attr_accessor :state - - sig do - returns( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::Type::TaggedSymbol - ) - end - attr_accessor :type - - # Card object in ASA - sig do - params( - token: String, - last_four: String, - memo: String, - spend_limit: Integer, - spend_limit_duration: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::SpendLimitDuration::OrSymbol, - state: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::State::OrSymbol, - type: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::Type::OrSymbol - ).returns(T.attached_class) - end - def self.new( - # Globally unique identifier for the card. - token:, - # Last four digits of the card number - last_four:, - # Customizable name to identify the card - memo:, - # Amount (in cents) to limit approved authorizations. Purchase requests above the - # spend limit will be declined (refunds and credits will be approved). - # - # Note that while spend limits are enforced based on authorized and settled volume - # on a card, they are not recommended to be used for balance or - # reconciliation-level accuracy. Spend limits also cannot block force posted - # charges (i.e., when a merchant sends a clearing message without a prior - # authorization). - spend_limit:, - # Note that to support recurring monthly payments, which can occur on different - # day every month, the time window we consider for MONTHLY velocity starts 6 days - # after the current calendar date one month prior. - spend_limit_duration:, - state:, - type: - ) - end - - sig do - override.returns( - { - token: String, - last_four: String, - memo: String, - spend_limit: Integer, - spend_limit_duration: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::SpendLimitDuration::TaggedSymbol, - state: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::State::TaggedSymbol, - type: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::Type::TaggedSymbol - } - ) - end - def to_hash - end - - # Note that to support recurring monthly payments, which can occur on different - # day every month, the time window we consider for MONTHLY velocity starts 6 days - # after the current calendar date one month prior. - module SpendLimitDuration - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::SpendLimitDuration - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUALLY = - T.let( - :ANNUALLY, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::SpendLimitDuration::TaggedSymbol - ) - FOREVER = - T.let( - :FOREVER, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::SpendLimitDuration::TaggedSymbol - ) - MONTHLY = - T.let( - :MONTHLY, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::SpendLimitDuration::TaggedSymbol - ) - TRANSACTION = - T.let( - :TRANSACTION, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::SpendLimitDuration::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::SpendLimitDuration::TaggedSymbol - ] - ) - end - def self.values - end - end - - module State - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::State - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - CLOSED = - T.let( - :CLOSED, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::State::TaggedSymbol - ) - OPEN = - T.let( - :OPEN, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::State::TaggedSymbol - ) - PAUSED = - T.let( - :PAUSED, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::State::TaggedSymbol - ) - PENDING_ACTIVATION = - T.let( - :PENDING_ACTIVATION, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::State::TaggedSymbol - ) - PENDING_FULFILLMENT = - T.let( - :PENDING_FULFILLMENT, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::State::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::State::TaggedSymbol - ] - ) - end - def self.values - end - end - - module Type - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::Type - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - SINGLE_USE = - T.let( - :SINGLE_USE, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::Type::TaggedSymbol - ) - MERCHANT_LOCKED = - T.let( - :MERCHANT_LOCKED, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::Type::TaggedSymbol - ) - UNLOCKED = - T.let( - :UNLOCKED, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::Type::TaggedSymbol - ) - PHYSICAL = - T.let( - :PHYSICAL, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::Type::TaggedSymbol - ) - DIGITAL_WALLET = - T.let( - :DIGITAL_WALLET, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::Type::TaggedSymbol - ) - VIRTUAL = - T.let( - :VIRTUAL, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::Type::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::Type::TaggedSymbol - ] - ) - end - def self.values - end - end - end - - class Merchant < Lithic::Models::Merchant - OrHash = - T.type_alias do - T.any( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Merchant, - Lithic::Internal::AnyHash - ) - end - - # Phone number of card acceptor. - sig { returns(T.nilable(String)) } - attr_accessor :phone_number - - # Postal code of card acceptor. - sig { returns(T.nilable(String)) } - attr_accessor :postal_code - - # Street address of card acceptor. - sig { returns(T.nilable(String)) } - attr_accessor :street_address - - # Merchant information including full location details. - sig do - params( - phone_number: T.nilable(String), - postal_code: T.nilable(String), - street_address: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Phone number of card acceptor. - phone_number:, - # Postal code of card acceptor. - postal_code:, - # Street address of card acceptor. - street_address: - ) - end - - sig do - override.returns( - { - phone_number: T.nilable(String), - postal_code: T.nilable(String), - street_address: T.nilable(String) - } - ) - end - def to_hash - end - end - - class ServiceLocation < Lithic::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::ServiceLocation, - Lithic::Internal::AnyHash - ) - end - - # City of service location. - sig { returns(T.nilable(String)) } - attr_accessor :city - - # Country code of service location, ISO 3166-1 alpha-3. - sig { returns(T.nilable(String)) } - attr_accessor :country - - # Postal code of service location. - sig { returns(T.nilable(String)) } - attr_accessor :postal_code - - # State/province code of service location, ISO 3166-2. - sig { returns(T.nilable(String)) } - attr_accessor :state - - # Street address of service location. - sig { returns(T.nilable(String)) } - attr_accessor :street_address - - # Where the cardholder received the service, when different from the card acceptor - # location. This is populated from network data elements such as Mastercard DE-122 - # SE1 SF9-14 and Visa F34 DS02. - sig do - params( - city: T.nilable(String), - country: T.nilable(String), - postal_code: T.nilable(String), - state: T.nilable(String), - street_address: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # City of service location. - city:, - # Country code of service location, ISO 3166-1 alpha-3. - country:, - # Postal code of service location. - postal_code:, - # State/province code of service location, ISO 3166-2. - state:, - # Street address of service location. - street_address: - ) - end - - sig do - override.returns( - { - city: T.nilable(String), - country: T.nilable(String), - postal_code: T.nilable(String), - state: T.nilable(String), - street_address: T.nilable(String) - } - ) - end - def to_hash - end - end - - # The type of authorization request that this request is for. Note that - # `CREDIT_AUTHORIZATION` and `FINANCIAL_CREDIT_AUTHORIZATION` is only available to - # users with credit decisioning via ASA enabled. - module Status - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Status - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - AUTHORIZATION = - T.let( - :AUTHORIZATION, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Status::TaggedSymbol - ) - CREDIT_AUTHORIZATION = - T.let( - :CREDIT_AUTHORIZATION, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Status::TaggedSymbol - ) - FINANCIAL_AUTHORIZATION = - T.let( - :FINANCIAL_AUTHORIZATION, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Status::TaggedSymbol - ) - FINANCIAL_CREDIT_AUTHORIZATION = - T.let( - :FINANCIAL_CREDIT_AUTHORIZATION, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Status::TaggedSymbol - ) - BALANCE_INQUIRY = - T.let( - :BALANCE_INQUIRY, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Status::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Status::TaggedSymbol - ] - ) - end - def self.values - end - end - - # The entity that initiated the transaction. - module TransactionInitiator - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::TransactionInitiator - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - CARDHOLDER = - T.let( - :CARDHOLDER, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::TransactionInitiator::TaggedSymbol - ) - MERCHANT = - T.let( - :MERCHANT, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::TransactionInitiator::TaggedSymbol - ) - UNKNOWN = - T.let( - :UNKNOWN, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::TransactionInitiator::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::CardAuthorizationApprovalRequestWebhookEvent::TransactionInitiator::TaggedSymbol - ] - ) - end - def self.values - end - end - - module AccountType - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::AccountType - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - CHECKING = - T.let( - :CHECKING, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::AccountType::TaggedSymbol - ) - SAVINGS = - T.let( - :SAVINGS, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::AccountType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::CardAuthorizationApprovalRequestWebhookEvent::AccountType::TaggedSymbol - ] - ) - end - def self.values - end - end - - class FleetInfo < Lithic::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo, - Lithic::Internal::AnyHash - ) - end - - # Code indicating what the driver was prompted to enter at time of purchase. This - # is configured at a program level and is a static configuration, and does not - # change on a request to request basis - sig do - returns( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetPromptCode::TaggedSymbol - ) - end - attr_accessor :fleet_prompt_code - - # Code indicating which restrictions, if any, there are on purchase. This is - # configured at a program level and is a static configuration, and does not change - # on a request to request basis - sig do - returns( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetRestrictionCode::TaggedSymbol - ) - end - attr_accessor :fleet_restriction_code - - # Number representing the driver - sig { returns(T.nilable(String)) } - attr_accessor :driver_number - - # Number associated with the vehicle - sig { returns(T.nilable(String)) } - attr_accessor :vehicle_number - - # Optional Object containing information if the Card is a part of a Fleet managed - # program - sig do - params( - fleet_prompt_code: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetPromptCode::OrSymbol, - fleet_restriction_code: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetRestrictionCode::OrSymbol, - driver_number: T.nilable(String), - vehicle_number: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Code indicating what the driver was prompted to enter at time of purchase. This - # is configured at a program level and is a static configuration, and does not - # change on a request to request basis - fleet_prompt_code:, - # Code indicating which restrictions, if any, there are on purchase. This is - # configured at a program level and is a static configuration, and does not change - # on a request to request basis - fleet_restriction_code:, - # Number representing the driver - driver_number: nil, - # Number associated with the vehicle - vehicle_number: nil - ) - end - - sig do - override.returns( - { - fleet_prompt_code: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetPromptCode::TaggedSymbol, - fleet_restriction_code: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetRestrictionCode::TaggedSymbol, - driver_number: T.nilable(String), - vehicle_number: T.nilable(String) - } - ) - end - def to_hash - end - - # Code indicating what the driver was prompted to enter at time of purchase. This - # is configured at a program level and is a static configuration, and does not - # change on a request to request basis - module FleetPromptCode - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetPromptCode - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - NO_PROMPT = - T.let( - :NO_PROMPT, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetPromptCode::TaggedSymbol - ) - VEHICLE_NUMBER = - T.let( - :VEHICLE_NUMBER, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetPromptCode::TaggedSymbol - ) - DRIVER_NUMBER = - T.let( - :DRIVER_NUMBER, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetPromptCode::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetPromptCode::TaggedSymbol - ] - ) - end - def self.values - end - end - - # Code indicating which restrictions, if any, there are on purchase. This is - # configured at a program level and is a static configuration, and does not change - # on a request to request basis - module FleetRestrictionCode - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetRestrictionCode - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - NO_RESTRICTIONS = - T.let( - :NO_RESTRICTIONS, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetRestrictionCode::TaggedSymbol - ) - FUEL_ONLY = - T.let( - :FUEL_ONLY, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetRestrictionCode::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetRestrictionCode::TaggedSymbol - ] - ) - end - def self.values - end - end - end - - class LatestChallenge < Lithic::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge, - Lithic::Internal::AnyHash - ) - end - - # The phone number used for sending Authorization Challenge SMS. - sig { returns(String) } - attr_accessor :phone_number - - # The status of the Authorization Challenge - # - # - `COMPLETED` - Challenge was successfully completed by the cardholder - # - `PENDING` - Challenge is still open - # - `EXPIRED` - Challenge has expired without being completed - # - `ERROR` - There was an error processing the challenge - sig do - returns( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::Status::TaggedSymbol - ) - end - attr_accessor :status - - # The date and time when the Authorization Challenge was completed in UTC. Present - # only if the status is `COMPLETED`. - sig { returns(T.nilable(Time)) } - attr_reader :completed_at - - sig { params(completed_at: Time).void } - attr_writer :completed_at - - # The latest Authorization Challenge that was issued to the cardholder for this - # merchant. - sig do - params( - phone_number: String, - status: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::Status::OrSymbol, - completed_at: Time - ).returns(T.attached_class) - end - def self.new( - # The phone number used for sending Authorization Challenge SMS. - phone_number:, - # The status of the Authorization Challenge - # - # - `COMPLETED` - Challenge was successfully completed by the cardholder - # - `PENDING` - Challenge is still open - # - `EXPIRED` - Challenge has expired without being completed - # - `ERROR` - There was an error processing the challenge - status:, - # The date and time when the Authorization Challenge was completed in UTC. Present - # only if the status is `COMPLETED`. - completed_at: nil - ) - end - - sig do - override.returns( - { - phone_number: String, - status: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::Status::TaggedSymbol, - completed_at: Time - } - ) - end - def to_hash - end - - # The status of the Authorization Challenge - # - # - `COMPLETED` - Challenge was successfully completed by the cardholder - # - `PENDING` - Challenge is still open - # - `EXPIRED` - Challenge has expired without being completed - # - `ERROR` - There was an error processing the challenge - module Status - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::Status - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - COMPLETED = - T.let( - :COMPLETED, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::Status::TaggedSymbol - ) - PENDING = - T.let( - :PENDING, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::Status::TaggedSymbol - ) - EXPIRED = - T.let( - :EXPIRED, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::Status::TaggedSymbol - ) - ERROR = - T.let( - :ERROR, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::Status::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::Status::TaggedSymbol - ] - ) - end - def self.values - end - end - end - - # Card network of the authorization. - module Network - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Network - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - AMEX = - T.let( - :AMEX, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Network::TaggedSymbol - ) - INTERLINK = - T.let( - :INTERLINK, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Network::TaggedSymbol - ) - MAESTRO = - T.let( - :MAESTRO, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Network::TaggedSymbol - ) - MASTERCARD = - T.let( - :MASTERCARD, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Network::TaggedSymbol - ) - UNKNOWN = - T.let( - :UNKNOWN, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Network::TaggedSymbol - ) - VISA = - T.let( - :VISA, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Network::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Network::TaggedSymbol - ] - ) - end - def self.values - end - end - - class NetworkSpecificData < Lithic::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData, - Lithic::Internal::AnyHash - ) - end - - sig do - returns( - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard - ) - ) - end - attr_reader :mastercard - - sig do - params( - mastercard: - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard::OrHash - ) - ).void - end - attr_writer :mastercard - - sig do - returns( - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Visa - ) - ) - end - attr_reader :visa - - sig do - params( - visa: - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Visa::OrHash - ) - ).void - end - attr_writer :visa - - # Contains raw data provided by the card network, including attributes that - # provide further context about the authorization. If populated by the network, - # data is organized by Lithic and passed through without further modification. - # Please consult the official network documentation for more details about these - # values and how to use them. This object is only available to certain programs- - # contact your Customer Success Manager to discuss enabling access. - sig do - params( - mastercard: - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard::OrHash - ), - visa: - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Visa::OrHash - ) - ).returns(T.attached_class) - end - def self.new(mastercard: nil, visa: nil) - end - - sig do - override.returns( - { - mastercard: - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard - ), - visa: - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Visa - ) - } - ) - end - def to_hash - end - - class Mastercard < Lithic::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard, - Lithic::Internal::AnyHash - ) - end - - # Indicates the electronic commerce security level and UCAF collection. - sig { returns(T.nilable(String)) } - attr_accessor :ecommerce_security_level_indicator - - # The On-behalf Service performed on the transaction and the results. Contains all - # applicable, on-behalf service results that were performed on a given - # transaction. - sig do - returns( - T.nilable( - T::Array[ - Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard::OnBehalfServiceResult - ] - ) - ) - end - attr_accessor :on_behalf_service_result - - # Indicates the type of additional transaction purpose. - sig { returns(T.nilable(String)) } - attr_accessor :transaction_type_identifier - - sig do - params( - ecommerce_security_level_indicator: T.nilable(String), - on_behalf_service_result: - T.nilable( - T::Array[ - Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard::OnBehalfServiceResult::OrHash - ] - ), - transaction_type_identifier: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Indicates the electronic commerce security level and UCAF collection. - ecommerce_security_level_indicator: nil, - # The On-behalf Service performed on the transaction and the results. Contains all - # applicable, on-behalf service results that were performed on a given - # transaction. - on_behalf_service_result: nil, - # Indicates the type of additional transaction purpose. - transaction_type_identifier: nil - ) - end - - sig do - override.returns( - { - ecommerce_security_level_indicator: T.nilable(String), - on_behalf_service_result: - T.nilable( - T::Array[ - Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard::OnBehalfServiceResult - ] - ), - transaction_type_identifier: T.nilable(String) - } - ) - end - def to_hash - end - - class OnBehalfServiceResult < Lithic::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard::OnBehalfServiceResult, - Lithic::Internal::AnyHash - ) - end - - # Indicates the results of the service processing. - sig { returns(String) } - attr_accessor :result_1 - - # Identifies the results of the service processing. - sig { returns(String) } - attr_accessor :result_2 - - # Indicates the service performed on the transaction. - sig { returns(String) } - attr_accessor :service - - sig do - params( - result_1: String, - result_2: String, - service: String - ).returns(T.attached_class) - end - def self.new( - # Indicates the results of the service processing. - result_1:, - # Identifies the results of the service processing. - result_2:, - # Indicates the service performed on the transaction. - service: - ) - end - - sig do - override.returns( - { result_1: String, result_2: String, service: String } - ) - end - def to_hash - end - end - end - - class Visa < Lithic::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Visa, - Lithic::Internal::AnyHash - ) - end - - # Identifies the purpose or category of a transaction, used to classify and - # process transactions according to Visa’s rules. - sig { returns(T.nilable(String)) } - attr_accessor :business_application_identifier - - sig do - params(business_application_identifier: T.nilable(String)).returns( - T.attached_class - ) - end - def self.new( - # Identifies the purpose or category of a transaction, used to classify and - # process transactions according to Visa’s rules. - business_application_identifier: nil - ) - end - - sig do - override.returns( - { business_application_identifier: T.nilable(String) } - ) - end - def to_hash - end - end - end - - class Pos < Lithic::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos, - Lithic::Internal::AnyHash - ) - end - - # POS > Entry Mode object in ASA - sig do - returns( - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode - ) - ) - end - attr_reader :entry_mode - - sig do - params( - entry_mode: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::OrHash - ).void - end - attr_writer :entry_mode - - sig do - returns( - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal - ) - ) - end - attr_reader :terminal - - sig do - params( - terminal: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::OrHash - ).void - end - attr_writer :terminal - - sig do - params( - entry_mode: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::OrHash, - terminal: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::OrHash - ).returns(T.attached_class) - end - def self.new( - # POS > Entry Mode object in ASA - entry_mode: nil, - terminal: nil - ) - end - - sig do - override.returns( - { - entry_mode: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode, - terminal: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal - } - ) - end - def to_hash - end - - class EntryMode < Lithic::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode, - Lithic::Internal::AnyHash - ) - end - - # Card Presence Indicator - sig do - returns( - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Card::TaggedSymbol - ) - ) - end - attr_reader :card - - sig do - params( - card: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Card::OrSymbol - ).void - end - attr_writer :card - - # Cardholder Presence Indicator - sig do - returns( - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder::TaggedSymbol - ) - ) - end - attr_reader :cardholder - - sig do - params( - cardholder: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder::OrSymbol - ).void - end - attr_writer :cardholder - - # Method of entry for the PAN - sig do - returns( - T.nilable( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol - ) - ) - end - attr_reader :pan - - sig do - params( - pan: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::OrSymbol - ).void - end - attr_writer :pan - - # Indicates whether the cardholder entered the PIN. True if the PIN was entered. - sig { returns(T.nilable(T::Boolean)) } - attr_reader :pin_entered - - sig { params(pin_entered: T::Boolean).void } - attr_writer :pin_entered - - # POS > Entry Mode object in ASA - sig do - params( - card: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Card::OrSymbol, - cardholder: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder::OrSymbol, - pan: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::OrSymbol, - pin_entered: T::Boolean - ).returns(T.attached_class) - end - def self.new( - # Card Presence Indicator - card: nil, - # Cardholder Presence Indicator - cardholder: nil, - # Method of entry for the PAN - pan: nil, - # Indicates whether the cardholder entered the PIN. True if the PIN was entered. - pin_entered: nil - ) - end - - sig do - override.returns( - { - card: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Card::TaggedSymbol, - cardholder: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder::TaggedSymbol, - pan: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol, - pin_entered: T::Boolean - } - ) - end - def to_hash - end - - # Card Presence Indicator - module Card - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Card - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - PRESENT = - T.let( - :PRESENT, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Card::TaggedSymbol - ) - NOT_PRESENT = - T.let( - :NOT_PRESENT, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Card::TaggedSymbol - ) - UNKNOWN = - T.let( - :UNKNOWN, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Card::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Card::TaggedSymbol - ] - ) - end - def self.values - end - end - - # Cardholder Presence Indicator - module Cardholder - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - DEFERRED_BILLING = - T.let( - :DEFERRED_BILLING, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder::TaggedSymbol - ) - ELECTRONIC_ORDER = - T.let( - :ELECTRONIC_ORDER, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder::TaggedSymbol - ) - INSTALLMENT = - T.let( - :INSTALLMENT, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder::TaggedSymbol - ) - MAIL_ORDER = - T.let( - :MAIL_ORDER, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder::TaggedSymbol - ) - NOT_PRESENT = - T.let( - :NOT_PRESENT, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder::TaggedSymbol - ) - PRESENT = - T.let( - :PRESENT, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder::TaggedSymbol - ) - REOCCURRING = - T.let( - :REOCCURRING, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder::TaggedSymbol - ) - TELEPHONE_ORDER = - T.let( - :TELEPHONE_ORDER, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder::TaggedSymbol - ) - UNKNOWN = - T.let( - :UNKNOWN, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder::TaggedSymbol - ] - ) - end - def self.values - end - end - - # Method of entry for the PAN - module Pan - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - AUTO_ENTRY = - T.let( - :AUTO_ENTRY, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol - ) - BAR_CODE = - T.let( - :BAR_CODE, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol - ) - CONTACTLESS = - T.let( - :CONTACTLESS, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol - ) - ECOMMERCE = - T.let( - :ECOMMERCE, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol - ) - ERROR_KEYED = - T.let( - :ERROR_KEYED, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol - ) - ERROR_MAGNETIC_STRIPE = - T.let( - :ERROR_MAGNETIC_STRIPE, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol - ) - ICC = - T.let( - :ICC, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol - ) - KEY_ENTERED = - T.let( - :KEY_ENTERED, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol - ) - MAGNETIC_STRIPE = - T.let( - :MAGNETIC_STRIPE, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol - ) - MANUAL = - T.let( - :MANUAL, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol - ) - OCR = - T.let( - :OCR, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol - ) - SECURE_CARDLESS = - T.let( - :SECURE_CARDLESS, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol - ) - UNSPECIFIED = - T.let( - :UNSPECIFIED, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol - ) - UNKNOWN = - T.let( - :UNKNOWN, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol - ) - CREDENTIAL_ON_FILE = - T.let( - :CREDENTIAL_ON_FILE, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol - ] - ) - end - def self.values - end - end - end - - class Terminal < Lithic::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal, - Lithic::Internal::AnyHash - ) - end - - # True if a clerk is present at the sale. - sig { returns(T::Boolean) } - attr_accessor :attended - - # True if the terminal is capable of retaining the card. - sig { returns(T::Boolean) } - attr_accessor :card_retention_capable - - # True if the sale was made at the place of business (vs. mobile). - sig { returns(T::Boolean) } - attr_accessor :on_premise - - # The person that is designated to swipe the card - sig do - returns( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Operator::TaggedSymbol - ) - end - attr_accessor :operator - - # True if the terminal is capable of partial approval. Partial approval is when - # part of a transaction is approved and another payment must be used for the - # remainder. Example scenario: A $40 transaction is attempted on a prepaid card - # with a $25 balance. If partial approval is enabled, $25 can be authorized, at - # which point the POS will prompt the user for an additional payment of $15. - sig { returns(T::Boolean) } - attr_accessor :partial_approval_capable - - # Status of whether the POS is able to accept PINs - sig do - returns( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::PinCapability::TaggedSymbol - ) - end - attr_accessor :pin_capability - - # POS Type - sig do - returns( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol - ) - end - attr_accessor :type - - # Uniquely identifies a terminal at the card acceptor location of acquiring - # institutions or merchant POS Systems. Left justified with trailing spaces. - sig { returns(T.nilable(String)) } - attr_accessor :acceptor_terminal_id - - sig do - params( - attended: T::Boolean, - card_retention_capable: T::Boolean, - on_premise: T::Boolean, - operator: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Operator::OrSymbol, - partial_approval_capable: T::Boolean, - pin_capability: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::PinCapability::OrSymbol, - type: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::OrSymbol, - acceptor_terminal_id: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # True if a clerk is present at the sale. - attended:, - # True if the terminal is capable of retaining the card. - card_retention_capable:, - # True if the sale was made at the place of business (vs. mobile). - on_premise:, - # The person that is designated to swipe the card - operator:, - # True if the terminal is capable of partial approval. Partial approval is when - # part of a transaction is approved and another payment must be used for the - # remainder. Example scenario: A $40 transaction is attempted on a prepaid card - # with a $25 balance. If partial approval is enabled, $25 can be authorized, at - # which point the POS will prompt the user for an additional payment of $15. - partial_approval_capable:, - # Status of whether the POS is able to accept PINs - pin_capability:, - # POS Type - type:, - # Uniquely identifies a terminal at the card acceptor location of acquiring - # institutions or merchant POS Systems. Left justified with trailing spaces. - acceptor_terminal_id: nil - ) - end - - sig do - override.returns( - { - attended: T::Boolean, - card_retention_capable: T::Boolean, - on_premise: T::Boolean, - operator: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Operator::TaggedSymbol, - partial_approval_capable: T::Boolean, - pin_capability: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::PinCapability::TaggedSymbol, - type: - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol, - acceptor_terminal_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The person that is designated to swipe the card - module Operator - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Operator - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ADMINISTRATIVE = - T.let( - :ADMINISTRATIVE, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Operator::TaggedSymbol - ) - CARDHOLDER = - T.let( - :CARDHOLDER, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Operator::TaggedSymbol - ) - CARD_ACCEPTOR = - T.let( - :CARD_ACCEPTOR, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Operator::TaggedSymbol - ) - UNKNOWN = - T.let( - :UNKNOWN, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Operator::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Operator::TaggedSymbol - ] - ) - end - def self.values - end - end - - # Status of whether the POS is able to accept PINs - module PinCapability - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::PinCapability - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - CAPABLE = - T.let( - :CAPABLE, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::PinCapability::TaggedSymbol - ) - INOPERATIVE = - T.let( - :INOPERATIVE, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::PinCapability::TaggedSymbol - ) - NOT_CAPABLE = - T.let( - :NOT_CAPABLE, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::PinCapability::TaggedSymbol - ) - UNSPECIFIED = - T.let( - :UNSPECIFIED, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::PinCapability::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::PinCapability::TaggedSymbol - ] - ) - end - def self.values - end - end - - # POS Type - module Type - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ADMINISTRATIVE = - T.let( - :ADMINISTRATIVE, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol - ) - ATM = - T.let( - :ATM, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol - ) - AUTHORIZATION = - T.let( - :AUTHORIZATION, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol - ) - COUPON_MACHINE = - T.let( - :COUPON_MACHINE, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol - ) - DIAL_TERMINAL = - T.let( - :DIAL_TERMINAL, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol - ) - ECOMMERCE = - T.let( - :ECOMMERCE, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol - ) - ECR = - T.let( - :ECR, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol - ) - FUEL_MACHINE = - T.let( - :FUEL_MACHINE, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol - ) - HOME_TERMINAL = - T.let( - :HOME_TERMINAL, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol - ) - MICR = - T.let( - :MICR, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol - ) - OFF_PREMISE = - T.let( - :OFF_PREMISE, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol - ) - PAYMENT = - T.let( - :PAYMENT, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol - ) - PDA = - T.let( - :PDA, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol - ) - PHONE = - T.let( - :PHONE, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol - ) - POINT = - T.let( - :POINT, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol - ) - POS_TERMINAL = - T.let( - :POS_TERMINAL, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol - ) - PUBLIC_UTILITY = - T.let( - :PUBLIC_UTILITY, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol - ) - SELF_SERVICE = - T.let( - :SELF_SERVICE, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol - ) - TELEVISION = - T.let( - :TELEVISION, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol - ) - TELLER = - T.let( - :TELLER, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol - ) - TRAVELERS_CHECK_MACHINE = - T.let( - :TRAVELERS_CHECK_MACHINE, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol - ) - VENDING = - T.let( - :VENDING, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol - ) - VOICE = - T.let( - :VOICE, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol - ) - UNKNOWN = - T.let( - :UNKNOWN, - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol - ] - ) - end - def self.values - end - end - end - end end end end diff --git a/rbi/lithic/models/card_authorization_challenge_response_params.rbi b/rbi/lithic/models/card_authorization_challenge_response_params.rbi new file mode 100644 index 00000000..b4802090 --- /dev/null +++ b/rbi/lithic/models/card_authorization_challenge_response_params.rbi @@ -0,0 +1,93 @@ +# typed: strong + +module Lithic + module Models + class CardAuthorizationChallengeResponseParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Lithic::CardAuthorizationChallengeResponseParams, + Lithic::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :event_token + + # Whether the cardholder has approved or declined the issued challenge + sig do + returns( + Lithic::CardAuthorizationChallengeResponseParams::Response::OrSymbol + ) + end + attr_accessor :response + + sig do + params( + event_token: String, + response: + Lithic::CardAuthorizationChallengeResponseParams::Response::OrSymbol, + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + event_token:, + # Whether the cardholder has approved or declined the issued challenge + response:, + request_options: {} + ) + end + + sig do + override.returns( + { + event_token: String, + response: + Lithic::CardAuthorizationChallengeResponseParams::Response::OrSymbol, + request_options: Lithic::RequestOptions + } + ) + end + def to_hash + end + + # Whether the cardholder has approved or declined the issued challenge + module Response + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::CardAuthorizationChallengeResponseParams::Response + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + APPROVE = + T.let( + :APPROVE, + Lithic::CardAuthorizationChallengeResponseParams::Response::TaggedSymbol + ) + DECLINE = + T.let( + :DECLINE, + Lithic::CardAuthorizationChallengeResponseParams::Response::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::CardAuthorizationChallengeResponseParams::Response::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/lithic/models/card_authorization_challenge_webhook_event.rbi b/rbi/lithic/models/card_authorization_challenge_webhook_event.rbi new file mode 100644 index 00000000..2f4918b5 --- /dev/null +++ b/rbi/lithic/models/card_authorization_challenge_webhook_event.rbi @@ -0,0 +1,119 @@ +# typed: strong + +module Lithic + module Models + class CardAuthorizationChallengeWebhookEvent < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::CardAuthorizationChallengeWebhookEvent, + Lithic::Internal::AnyHash + ) + end + + # The authorization that triggered the challenge + sig { returns(Lithic::CardAuthorization) } + attr_reader :authorization + + sig { params(authorization: Lithic::CardAuthorization::OrHash).void } + attr_writer :authorization + + # Details of the Authorization Challenge issued during card authorization + sig { returns(Lithic::CardAuthorizationChallengeWebhookEvent::Challenge) } + attr_reader :challenge + + sig do + params( + challenge: + Lithic::CardAuthorizationChallengeWebhookEvent::Challenge::OrHash + ).void + end + attr_writer :challenge + + # The type of event that occurred. + sig { returns(Symbol) } + attr_accessor :event_type + + sig do + params( + authorization: Lithic::CardAuthorization::OrHash, + challenge: + Lithic::CardAuthorizationChallengeWebhookEvent::Challenge::OrHash, + event_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The authorization that triggered the challenge + authorization:, + # Details of the Authorization Challenge issued during card authorization + challenge:, + # The type of event that occurred. + event_type: :"card_authorization.challenge" + ) + end + + sig do + override.returns( + { + authorization: Lithic::CardAuthorization, + challenge: + Lithic::CardAuthorizationChallengeWebhookEvent::Challenge, + event_type: Symbol + } + ) + end + def to_hash + end + + class Challenge < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::CardAuthorizationChallengeWebhookEvent::Challenge, + Lithic::Internal::AnyHash + ) + end + + # Globally unique identifier for the event that triggered the challenge. Use this + # token when calling the challenge response endpoint + sig { returns(String) } + attr_accessor :event_token + + # ISO-8601 time at which the challenge expires + sig { returns(Time) } + attr_accessor :expiry_time + + # ISO-8601 time at which the challenge was issued + sig { returns(Time) } + attr_accessor :start_time + + # Details of the Authorization Challenge issued during card authorization + sig do + params( + event_token: String, + expiry_time: Time, + start_time: Time + ).returns(T.attached_class) + end + def self.new( + # Globally unique identifier for the event that triggered the challenge. Use this + # token when calling the challenge response endpoint + event_token:, + # ISO-8601 time at which the challenge expires + expiry_time:, + # ISO-8601 time at which the challenge was issued + start_time: + ) + end + + sig do + override.returns( + { event_token: String, expiry_time: Time, start_time: Time } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/lithic/models/event.rbi b/rbi/lithic/models/event.rbi index fe497ddb..c0d51519 100644 --- a/rbi/lithic/models/event.rbi +++ b/rbi/lithic/models/event.rbi @@ -29,6 +29,10 @@ module Lithic # created. # - book_transfer_transaction.updated: Occurs when a book transfer transaction is # updated. + # - card_authorization.challenge: Occurs when an Out of Band challenge is issued + # during card authorization. The card program should issue its own challenge to + # the cardholder and then respond via + # [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge). # - card_authorization.challenge_response: Occurs when a cardholder responds to an # SMS challenge during card authorization. # - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial @@ -151,6 +155,10 @@ module Lithic # created. # - book_transfer_transaction.updated: Occurs when a book transfer transaction is # updated. + # - card_authorization.challenge: Occurs when an Out of Band challenge is issued + # during card authorization. The card program should issue its own challenge to + # the cardholder and then respond via + # [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge). # - card_authorization.challenge_response: Occurs when a cardholder responds to an # SMS challenge during card authorization. # - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial @@ -269,6 +277,10 @@ module Lithic # created. # - book_transfer_transaction.updated: Occurs when a book transfer transaction is # updated. + # - card_authorization.challenge: Occurs when an Out of Band challenge is issued + # during card authorization. The card program should issue its own challenge to + # the cardholder and then respond via + # [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge). # - card_authorization.challenge_response: Occurs when a cardholder responds to an # SMS challenge during card authorization. # - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial @@ -398,6 +410,11 @@ module Lithic :"book_transfer_transaction.updated", Lithic::Event::EventType::TaggedSymbol ) + CARD_AUTHORIZATION_CHALLENGE = + T.let( + :"card_authorization.challenge", + Lithic::Event::EventType::TaggedSymbol + ) CARD_AUTHORIZATION_CHALLENGE_RESPONSE = T.let( :"card_authorization.challenge_response", diff --git a/rbi/lithic/models/event_list_params.rbi b/rbi/lithic/models/event_list_params.rbi index 197280c7..62743808 100644 --- a/rbi/lithic/models/event_list_params.rbi +++ b/rbi/lithic/models/event_list_params.rbi @@ -138,6 +138,10 @@ module Lithic # created. # - book_transfer_transaction.updated: Occurs when a book transfer transaction is # updated. + # - card_authorization.challenge: Occurs when an Out of Band challenge is issued + # during card authorization. The card program should issue its own challenge to + # the cardholder and then respond via + # [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge). # - card_authorization.challenge_response: Occurs when a cardholder responds to an # SMS challenge during card authorization. # - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial @@ -271,6 +275,11 @@ module Lithic :"book_transfer_transaction.updated", Lithic::EventListParams::EventType::TaggedSymbol ) + CARD_AUTHORIZATION_CHALLENGE = + T.let( + :"card_authorization.challenge", + Lithic::EventListParams::EventType::TaggedSymbol + ) CARD_AUTHORIZATION_CHALLENGE_RESPONSE = T.let( :"card_authorization.challenge_response", diff --git a/rbi/lithic/models/event_subscription.rbi b/rbi/lithic/models/event_subscription.rbi index 970c46f8..6301977f 100644 --- a/rbi/lithic/models/event_subscription.rbi +++ b/rbi/lithic/models/event_subscription.rbi @@ -86,6 +86,10 @@ module Lithic # created. # - book_transfer_transaction.updated: Occurs when a book transfer transaction is # updated. + # - card_authorization.challenge: Occurs when an Out of Band challenge is issued + # during card authorization. The card program should issue its own challenge to + # the cardholder and then respond via + # [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge). # - card_authorization.challenge_response: Occurs when a cardholder responds to an # SMS challenge during card authorization. # - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial @@ -219,6 +223,11 @@ module Lithic :"book_transfer_transaction.updated", Lithic::EventSubscription::EventType::TaggedSymbol ) + CARD_AUTHORIZATION_CHALLENGE = + T.let( + :"card_authorization.challenge", + Lithic::EventSubscription::EventType::TaggedSymbol + ) CARD_AUTHORIZATION_CHALLENGE_RESPONSE = T.let( :"card_authorization.challenge_response", diff --git a/rbi/lithic/models/events/subscription_create_params.rbi b/rbi/lithic/models/events/subscription_create_params.rbi index 51940009..6f525ac4 100644 --- a/rbi/lithic/models/events/subscription_create_params.rbi +++ b/rbi/lithic/models/events/subscription_create_params.rbi @@ -113,6 +113,10 @@ module Lithic # created. # - book_transfer_transaction.updated: Occurs when a book transfer transaction is # updated. + # - card_authorization.challenge: Occurs when an Out of Band challenge is issued + # during card authorization. The card program should issue its own challenge to + # the cardholder and then respond via + # [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge). # - card_authorization.challenge_response: Occurs when a cardholder responds to an # SMS challenge during card authorization. # - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial @@ -248,6 +252,11 @@ module Lithic :"book_transfer_transaction.updated", Lithic::Events::SubscriptionCreateParams::EventType::TaggedSymbol ) + CARD_AUTHORIZATION_CHALLENGE = + T.let( + :"card_authorization.challenge", + Lithic::Events::SubscriptionCreateParams::EventType::TaggedSymbol + ) CARD_AUTHORIZATION_CHALLENGE_RESPONSE = T.let( :"card_authorization.challenge_response", diff --git a/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi b/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi index 8a9789ef..d7968cfa 100644 --- a/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +++ b/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi @@ -118,6 +118,11 @@ module Lithic :"book_transfer_transaction.updated", Lithic::Events::SubscriptionSendSimulatedExampleParams::EventType::TaggedSymbol ) + CARD_AUTHORIZATION_CHALLENGE = + T.let( + :"card_authorization.challenge", + Lithic::Events::SubscriptionSendSimulatedExampleParams::EventType::TaggedSymbol + ) CARD_AUTHORIZATION_CHALLENGE_RESPONSE = T.let( :"card_authorization.challenge_response", diff --git a/rbi/lithic/models/events/subscription_update_params.rbi b/rbi/lithic/models/events/subscription_update_params.rbi index aa5d8ed7..f13cb95a 100644 --- a/rbi/lithic/models/events/subscription_update_params.rbi +++ b/rbi/lithic/models/events/subscription_update_params.rbi @@ -119,6 +119,10 @@ module Lithic # created. # - book_transfer_transaction.updated: Occurs when a book transfer transaction is # updated. + # - card_authorization.challenge: Occurs when an Out of Band challenge is issued + # during card authorization. The card program should issue its own challenge to + # the cardholder and then respond via + # [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge). # - card_authorization.challenge_response: Occurs when a cardholder responds to an # SMS challenge during card authorization. # - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial @@ -254,6 +258,11 @@ module Lithic :"book_transfer_transaction.updated", Lithic::Events::SubscriptionUpdateParams::EventType::TaggedSymbol ) + CARD_AUTHORIZATION_CHALLENGE = + T.let( + :"card_authorization.challenge", + Lithic::Events::SubscriptionUpdateParams::EventType::TaggedSymbol + ) CARD_AUTHORIZATION_CHALLENGE_RESPONSE = T.let( :"card_authorization.challenge_response", diff --git a/rbi/lithic/models/parsed_webhook_event.rbi b/rbi/lithic/models/parsed_webhook_event.rbi index 61a524d7..907b25f3 100644 --- a/rbi/lithic/models/parsed_webhook_event.rbi +++ b/rbi/lithic/models/parsed_webhook_event.rbi @@ -16,6 +16,7 @@ module Lithic Lithic::AccountHolderVerificationWebhookEvent, Lithic::AccountHolderDocumentUpdatedWebhookEvent, Lithic::CardAuthorizationApprovalRequestWebhookEvent, + Lithic::CardAuthorizationChallengeWebhookEvent, Lithic::CardAuthorizationChallengeResponseWebhookEvent, Lithic::AuthRulesBacktestReportCreatedWebhookEvent, Lithic::BalanceUpdatedWebhookEvent, diff --git a/rbi/lithic/resources/card_authorizations.rbi b/rbi/lithic/resources/card_authorizations.rbi new file mode 100644 index 00000000..1a61b928 --- /dev/null +++ b/rbi/lithic/resources/card_authorizations.rbi @@ -0,0 +1,35 @@ +# typed: strong + +module Lithic + module Resources + class CardAuthorizations + # Card program's response to Authorization Challenge. Programs that have + # Authorization Challenges configured as Out of Band receive a + # [card_authorization.challenge](https://docs.lithic.com/reference/post_card-authorization-challenge) + # webhook when an authorization attempt triggers a challenge. The card program + # should respond using this endpoint after the cardholder completes the challenge. + sig do + params( + event_token: String, + response: + Lithic::CardAuthorizationChallengeResponseParams::Response::OrSymbol, + request_options: Lithic::RequestOptions::OrHash + ).void + end + def challenge_response( + # Globally unique identifier for the authorization event that triggered the + # challenge + event_token, + # Whether the cardholder has approved or declined the issued challenge + response:, + request_options: {} + ) + end + + # @api private + sig { params(client: Lithic::Client).returns(T.attached_class) } + def self.new(client:) + end + end + end +end diff --git a/rbi/lithic/resources/webhooks.rbi b/rbi/lithic/resources/webhooks.rbi index 1f703e54..e424b370 100644 --- a/rbi/lithic/resources/webhooks.rbi +++ b/rbi/lithic/resources/webhooks.rbi @@ -17,6 +17,7 @@ module Lithic Lithic::AccountHolderVerificationWebhookEvent, Lithic::AccountHolderDocumentUpdatedWebhookEvent, Lithic::CardAuthorizationApprovalRequestWebhookEvent, + Lithic::CardAuthorizationChallengeWebhookEvent, Lithic::CardAuthorizationChallengeResponseWebhookEvent, Lithic::AuthRulesBacktestReportCreatedWebhookEvent, Lithic::BalanceUpdatedWebhookEvent, @@ -81,7 +82,9 @@ module Lithic ) end - sig { params(payload: String).returns(Lithic::ParsedWebhookEvent::Variants) } + sig do + params(payload: String).returns(Lithic::ParsedWebhookEvent::Variants) + end def parse_unsafe(payload) end diff --git a/sig/lithic/client.rbs b/sig/lithic/client.rbs index 1f19ded9..4f8d272f 100644 --- a/sig/lithic/client.rbs +++ b/sig/lithic/client.rbs @@ -31,6 +31,8 @@ module Lithic attr_reader cards: Lithic::Resources::Cards + attr_reader card_authorizations: Lithic::Resources::CardAuthorizations + attr_reader card_bulk_orders: Lithic::Resources::CardBulkOrders attr_reader balances: Lithic::Resources::Balances diff --git a/sig/lithic/models.rbs b/sig/lithic/models.rbs index 7965717f..c9e12f6d 100644 --- a/sig/lithic/models.rbs +++ b/sig/lithic/models.rbs @@ -89,10 +89,16 @@ module Lithic class Card = Lithic::Models::Card + class CardAuthorization = Lithic::Models::CardAuthorization + class CardAuthorizationApprovalRequestWebhookEvent = Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent + class CardAuthorizationChallengeResponseParams = Lithic::Models::CardAuthorizationChallengeResponseParams + class CardAuthorizationChallengeResponseWebhookEvent = Lithic::Models::CardAuthorizationChallengeResponseWebhookEvent + class CardAuthorizationChallengeWebhookEvent = Lithic::Models::CardAuthorizationChallengeWebhookEvent + class CardBulkOrder = Lithic::Models::CardBulkOrder class CardBulkOrderCreateParams = Lithic::Models::CardBulkOrderCreateParams diff --git a/sig/lithic/models/card_authorization.rbs b/sig/lithic/models/card_authorization.rbs new file mode 100644 index 00000000..01d09050 --- /dev/null +++ b/sig/lithic/models/card_authorization.rbs @@ -0,0 +1,1021 @@ +module Lithic + module Models + type card_authorization = + { + token: String, + acquirer_fee: Integer, + amount: Integer, + amounts: Lithic::CardAuthorization::Amounts, + authorization_amount: Integer, + avs: Lithic::CardAuthorization::Avs, + card: Lithic::CardAuthorization::Card, + cardholder_currency: String, + cash_amount: Integer, + created: Time, + merchant: Lithic::CardAuthorization::Merchant, + merchant_amount: Integer, + merchant_currency: String, + service_location: Lithic::CardAuthorization::ServiceLocation?, + settled_amount: Integer, + status: Lithic::Models::CardAuthorization::status, + transaction_initiator: Lithic::Models::CardAuthorization::transaction_initiator, + account_type: Lithic::Models::CardAuthorization::account_type, + cardholder_authentication: Lithic::CardholderAuthentication, + cashback: Integer, + conversion_rate: Float, + event_token: String, + fleet_info: Lithic::CardAuthorization::FleetInfo?, + latest_challenge: Lithic::CardAuthorization::LatestChallenge, + network: Lithic::Models::CardAuthorization::network, + network_risk_score: Integer?, + network_specific_data: Lithic::CardAuthorization::NetworkSpecificData?, + pos: Lithic::CardAuthorization::Pos, + token_info: Lithic::TokenInfo?, + ttl: Time + } + + class CardAuthorization < Lithic::Internal::Type::BaseModel + attr_accessor token: String + + attr_accessor acquirer_fee: Integer + + attr_accessor amount: Integer + + attr_accessor amounts: Lithic::CardAuthorization::Amounts + + attr_accessor authorization_amount: Integer + + attr_accessor avs: Lithic::CardAuthorization::Avs + + attr_accessor card: Lithic::CardAuthorization::Card + + attr_accessor cardholder_currency: String + + attr_accessor cash_amount: Integer + + attr_accessor created: Time + + attr_accessor merchant: Lithic::CardAuthorization::Merchant + + attr_accessor merchant_amount: Integer + + attr_accessor merchant_currency: String + + attr_accessor service_location: Lithic::CardAuthorization::ServiceLocation? + + attr_accessor settled_amount: Integer + + attr_accessor status: Lithic::Models::CardAuthorization::status + + attr_accessor transaction_initiator: Lithic::Models::CardAuthorization::transaction_initiator + + attr_reader account_type: Lithic::Models::CardAuthorization::account_type? + + def account_type=: ( + Lithic::Models::CardAuthorization::account_type + ) -> Lithic::Models::CardAuthorization::account_type + + attr_reader cardholder_authentication: Lithic::CardholderAuthentication? + + def cardholder_authentication=: ( + Lithic::CardholderAuthentication + ) -> Lithic::CardholderAuthentication + + attr_reader cashback: Integer? + + def cashback=: (Integer) -> Integer + + attr_reader conversion_rate: Float? + + def conversion_rate=: (Float) -> Float + + attr_reader event_token: String? + + def event_token=: (String) -> String + + attr_accessor fleet_info: Lithic::CardAuthorization::FleetInfo? + + attr_reader latest_challenge: Lithic::CardAuthorization::LatestChallenge? + + def latest_challenge=: ( + Lithic::CardAuthorization::LatestChallenge + ) -> Lithic::CardAuthorization::LatestChallenge + + attr_reader network: Lithic::Models::CardAuthorization::network? + + def network=: ( + Lithic::Models::CardAuthorization::network + ) -> Lithic::Models::CardAuthorization::network + + attr_accessor network_risk_score: Integer? + + attr_accessor network_specific_data: Lithic::CardAuthorization::NetworkSpecificData? + + attr_reader pos: Lithic::CardAuthorization::Pos? + + def pos=: ( + Lithic::CardAuthorization::Pos + ) -> Lithic::CardAuthorization::Pos + + attr_accessor token_info: Lithic::TokenInfo? + + attr_reader ttl: Time? + + def ttl=: (Time) -> Time + + def initialize: ( + token: String, + acquirer_fee: Integer, + amount: Integer, + amounts: Lithic::CardAuthorization::Amounts, + authorization_amount: Integer, + avs: Lithic::CardAuthorization::Avs, + card: Lithic::CardAuthorization::Card, + cardholder_currency: String, + cash_amount: Integer, + created: Time, + merchant: Lithic::CardAuthorization::Merchant, + merchant_amount: Integer, + merchant_currency: String, + service_location: Lithic::CardAuthorization::ServiceLocation?, + settled_amount: Integer, + status: Lithic::Models::CardAuthorization::status, + transaction_initiator: Lithic::Models::CardAuthorization::transaction_initiator, + ?account_type: Lithic::Models::CardAuthorization::account_type, + ?cardholder_authentication: Lithic::CardholderAuthentication, + ?cashback: Integer, + ?conversion_rate: Float, + ?event_token: String, + ?fleet_info: Lithic::CardAuthorization::FleetInfo?, + ?latest_challenge: Lithic::CardAuthorization::LatestChallenge, + ?network: Lithic::Models::CardAuthorization::network, + ?network_risk_score: Integer?, + ?network_specific_data: Lithic::CardAuthorization::NetworkSpecificData?, + ?pos: Lithic::CardAuthorization::Pos, + ?token_info: Lithic::TokenInfo?, + ?ttl: Time + ) -> void + + def to_hash: -> { + token: String, + acquirer_fee: Integer, + amount: Integer, + amounts: Lithic::CardAuthorization::Amounts, + authorization_amount: Integer, + avs: Lithic::CardAuthorization::Avs, + card: Lithic::CardAuthorization::Card, + cardholder_currency: String, + cash_amount: Integer, + created: Time, + merchant: Lithic::CardAuthorization::Merchant, + merchant_amount: Integer, + merchant_currency: String, + service_location: Lithic::CardAuthorization::ServiceLocation?, + settled_amount: Integer, + status: Lithic::Models::CardAuthorization::status, + transaction_initiator: Lithic::Models::CardAuthorization::transaction_initiator, + account_type: Lithic::Models::CardAuthorization::account_type, + cardholder_authentication: Lithic::CardholderAuthentication, + cashback: Integer, + conversion_rate: Float, + event_token: String, + fleet_info: Lithic::CardAuthorization::FleetInfo?, + latest_challenge: Lithic::CardAuthorization::LatestChallenge, + network: Lithic::Models::CardAuthorization::network, + network_risk_score: Integer?, + network_specific_data: Lithic::CardAuthorization::NetworkSpecificData?, + pos: Lithic::CardAuthorization::Pos, + token_info: Lithic::TokenInfo?, + ttl: Time + } + + type amounts = + { + cardholder: Lithic::CardAuthorization::Amounts::Cardholder, + hold: Lithic::CardAuthorization::Amounts::Hold?, + merchant: Lithic::CardAuthorization::Amounts::Merchant, + settlement: Lithic::CardAuthorization::Amounts::Settlement? + } + + class Amounts < Lithic::Internal::Type::BaseModel + attr_accessor cardholder: Lithic::CardAuthorization::Amounts::Cardholder + + attr_accessor hold: Lithic::CardAuthorization::Amounts::Hold? + + attr_accessor merchant: Lithic::CardAuthorization::Amounts::Merchant + + attr_accessor settlement: Lithic::CardAuthorization::Amounts::Settlement? + + def initialize: ( + cardholder: Lithic::CardAuthorization::Amounts::Cardholder, + hold: Lithic::CardAuthorization::Amounts::Hold?, + merchant: Lithic::CardAuthorization::Amounts::Merchant, + settlement: Lithic::CardAuthorization::Amounts::Settlement? + ) -> void + + def to_hash: -> { + cardholder: Lithic::CardAuthorization::Amounts::Cardholder, + hold: Lithic::CardAuthorization::Amounts::Hold?, + merchant: Lithic::CardAuthorization::Amounts::Merchant, + settlement: Lithic::CardAuthorization::Amounts::Settlement? + } + + type cardholder = + { amount: Integer, conversion_rate: String, currency: String } + + class Cardholder < Lithic::Internal::Type::BaseModel + attr_accessor amount: Integer + + attr_accessor conversion_rate: String + + attr_accessor currency: String + + def initialize: ( + amount: Integer, + conversion_rate: String, + currency: String + ) -> void + + def to_hash: -> { + amount: Integer, + conversion_rate: String, + currency: String + } + end + + type hold = { amount: Integer, currency: String } + + class Hold < Lithic::Internal::Type::BaseModel + attr_accessor amount: Integer + + attr_accessor currency: String + + def initialize: (amount: Integer, currency: String) -> void + + def to_hash: -> { amount: Integer, currency: String } + end + + type merchant = { amount: Integer, currency: String } + + class Merchant < Lithic::Internal::Type::BaseModel + attr_accessor amount: Integer + + attr_accessor currency: String + + def initialize: (amount: Integer, currency: String) -> void + + def to_hash: -> { amount: Integer, currency: String } + end + + type settlement = { amount: Integer, currency: String } + + class Settlement < Lithic::Internal::Type::BaseModel + attr_accessor amount: Integer + + attr_accessor currency: String + + def initialize: (amount: Integer, currency: String) -> void + + def to_hash: -> { amount: Integer, currency: String } + end + end + + type avs = + { + address: String, + address_on_file_match: Lithic::Models::CardAuthorization::Avs::address_on_file_match, + zipcode: String + } + + class Avs < Lithic::Internal::Type::BaseModel + attr_accessor address: String + + attr_accessor address_on_file_match: Lithic::Models::CardAuthorization::Avs::address_on_file_match + + attr_accessor zipcode: String + + def initialize: ( + address: String, + address_on_file_match: Lithic::Models::CardAuthorization::Avs::address_on_file_match, + zipcode: String + ) -> void + + def to_hash: -> { + address: String, + address_on_file_match: Lithic::Models::CardAuthorization::Avs::address_on_file_match, + zipcode: String + } + + type address_on_file_match = + :MATCH + | :MATCH_ADDRESS_ONLY + | :MATCH_ZIP_ONLY + | :MISMATCH + | :NOT_PRESENT + + module AddressOnFileMatch + extend Lithic::Internal::Type::Enum + + MATCH: :MATCH + MATCH_ADDRESS_ONLY: :MATCH_ADDRESS_ONLY + MATCH_ZIP_ONLY: :MATCH_ZIP_ONLY + MISMATCH: :MISMATCH + NOT_PRESENT: :NOT_PRESENT + + def self?.values: -> ::Array[Lithic::Models::CardAuthorization::Avs::address_on_file_match] + end + end + + type card = + { + token: String, + last_four: String, + memo: String, + spend_limit: Integer, + spend_limit_duration: Lithic::Models::CardAuthorization::Card::spend_limit_duration, + state: Lithic::Models::CardAuthorization::Card::state, + type: Lithic::Models::CardAuthorization::Card::type_ + } + + class Card < Lithic::Internal::Type::BaseModel + attr_accessor token: String + + attr_accessor last_four: String + + attr_accessor memo: String + + attr_accessor spend_limit: Integer + + attr_accessor spend_limit_duration: Lithic::Models::CardAuthorization::Card::spend_limit_duration + + attr_accessor state: Lithic::Models::CardAuthorization::Card::state + + attr_accessor type: Lithic::Models::CardAuthorization::Card::type_ + + def initialize: ( + token: String, + last_four: String, + memo: String, + spend_limit: Integer, + spend_limit_duration: Lithic::Models::CardAuthorization::Card::spend_limit_duration, + state: Lithic::Models::CardAuthorization::Card::state, + type: Lithic::Models::CardAuthorization::Card::type_ + ) -> void + + def to_hash: -> { + token: String, + last_four: String, + memo: String, + spend_limit: Integer, + spend_limit_duration: Lithic::Models::CardAuthorization::Card::spend_limit_duration, + state: Lithic::Models::CardAuthorization::Card::state, + type: Lithic::Models::CardAuthorization::Card::type_ + } + + type spend_limit_duration = + :ANNUALLY | :FOREVER | :MONTHLY | :TRANSACTION + + module SpendLimitDuration + extend Lithic::Internal::Type::Enum + + ANNUALLY: :ANNUALLY + FOREVER: :FOREVER + MONTHLY: :MONTHLY + TRANSACTION: :TRANSACTION + + def self?.values: -> ::Array[Lithic::Models::CardAuthorization::Card::spend_limit_duration] + end + + type state = + :CLOSED | :OPEN | :PAUSED | :PENDING_ACTIVATION | :PENDING_FULFILLMENT + + module State + extend Lithic::Internal::Type::Enum + + CLOSED: :CLOSED + OPEN: :OPEN + PAUSED: :PAUSED + PENDING_ACTIVATION: :PENDING_ACTIVATION + PENDING_FULFILLMENT: :PENDING_FULFILLMENT + + def self?.values: -> ::Array[Lithic::Models::CardAuthorization::Card::state] + end + + type type_ = + :SINGLE_USE + | :MERCHANT_LOCKED + | :UNLOCKED + | :PHYSICAL + | :DIGITAL_WALLET + | :VIRTUAL + + module Type + extend Lithic::Internal::Type::Enum + + SINGLE_USE: :SINGLE_USE + MERCHANT_LOCKED: :MERCHANT_LOCKED + UNLOCKED: :UNLOCKED + PHYSICAL: :PHYSICAL + DIGITAL_WALLET: :DIGITAL_WALLET + VIRTUAL: :VIRTUAL + + def self?.values: -> ::Array[Lithic::Models::CardAuthorization::Card::type_] + end + end + + type merchant = + { phone_number: String?, postal_code: String?, street_address: String? } + + class Merchant < Lithic::Models::Merchant + def phone_number: -> String? + + def phone_number=: (String? _) -> String? + + def postal_code: -> String? + + def postal_code=: (String? _) -> String? + + def street_address: -> String? + + def street_address=: (String? _) -> String? + + def initialize: ( + phone_number: String?, + postal_code: String?, + street_address: String? + ) -> void + + def to_hash: -> { + phone_number: String?, + postal_code: String?, + street_address: String? + } + end + + type service_location = + { + city: String?, + country: String?, + postal_code: String?, + state: String?, + street_address: String? + } + + class ServiceLocation < Lithic::Internal::Type::BaseModel + attr_accessor city: String? + + attr_accessor country: String? + + attr_accessor postal_code: String? + + attr_accessor state: String? + + attr_accessor street_address: String? + + def initialize: ( + city: String?, + country: String?, + postal_code: String?, + state: String?, + street_address: String? + ) -> void + + def to_hash: -> { + city: String?, + country: String?, + postal_code: String?, + state: String?, + street_address: String? + } + end + + type status = + :AUTHORIZATION + | :CREDIT_AUTHORIZATION + | :FINANCIAL_AUTHORIZATION + | :FINANCIAL_CREDIT_AUTHORIZATION + | :BALANCE_INQUIRY + + module Status + extend Lithic::Internal::Type::Enum + + AUTHORIZATION: :AUTHORIZATION + CREDIT_AUTHORIZATION: :CREDIT_AUTHORIZATION + FINANCIAL_AUTHORIZATION: :FINANCIAL_AUTHORIZATION + FINANCIAL_CREDIT_AUTHORIZATION: :FINANCIAL_CREDIT_AUTHORIZATION + BALANCE_INQUIRY: :BALANCE_INQUIRY + + def self?.values: -> ::Array[Lithic::Models::CardAuthorization::status] + end + + type transaction_initiator = :CARDHOLDER | :MERCHANT | :UNKNOWN + + module TransactionInitiator + extend Lithic::Internal::Type::Enum + + CARDHOLDER: :CARDHOLDER + MERCHANT: :MERCHANT + UNKNOWN: :UNKNOWN + + def self?.values: -> ::Array[Lithic::Models::CardAuthorization::transaction_initiator] + end + + type account_type = :CHECKING | :SAVINGS + + module AccountType + extend Lithic::Internal::Type::Enum + + CHECKING: :CHECKING + SAVINGS: :SAVINGS + + def self?.values: -> ::Array[Lithic::Models::CardAuthorization::account_type] + end + + type fleet_info = + { + fleet_prompt_code: Lithic::Models::CardAuthorization::FleetInfo::fleet_prompt_code, + fleet_restriction_code: Lithic::Models::CardAuthorization::FleetInfo::fleet_restriction_code, + driver_number: String?, + vehicle_number: String? + } + + class FleetInfo < Lithic::Internal::Type::BaseModel + attr_accessor fleet_prompt_code: Lithic::Models::CardAuthorization::FleetInfo::fleet_prompt_code + + attr_accessor fleet_restriction_code: Lithic::Models::CardAuthorization::FleetInfo::fleet_restriction_code + + attr_accessor driver_number: String? + + attr_accessor vehicle_number: String? + + def initialize: ( + fleet_prompt_code: Lithic::Models::CardAuthorization::FleetInfo::fleet_prompt_code, + fleet_restriction_code: Lithic::Models::CardAuthorization::FleetInfo::fleet_restriction_code, + ?driver_number: String?, + ?vehicle_number: String? + ) -> void + + def to_hash: -> { + fleet_prompt_code: Lithic::Models::CardAuthorization::FleetInfo::fleet_prompt_code, + fleet_restriction_code: Lithic::Models::CardAuthorization::FleetInfo::fleet_restriction_code, + driver_number: String?, + vehicle_number: String? + } + + type fleet_prompt_code = :NO_PROMPT | :VEHICLE_NUMBER | :DRIVER_NUMBER + + module FleetPromptCode + extend Lithic::Internal::Type::Enum + + NO_PROMPT: :NO_PROMPT + VEHICLE_NUMBER: :VEHICLE_NUMBER + DRIVER_NUMBER: :DRIVER_NUMBER + + def self?.values: -> ::Array[Lithic::Models::CardAuthorization::FleetInfo::fleet_prompt_code] + end + + type fleet_restriction_code = :NO_RESTRICTIONS | :FUEL_ONLY + + module FleetRestrictionCode + extend Lithic::Internal::Type::Enum + + NO_RESTRICTIONS: :NO_RESTRICTIONS + FUEL_ONLY: :FUEL_ONLY + + def self?.values: -> ::Array[Lithic::Models::CardAuthorization::FleetInfo::fleet_restriction_code] + end + end + + type latest_challenge = + { + phone_number: String, + status: Lithic::Models::CardAuthorization::LatestChallenge::status, + completed_at: Time + } + + class LatestChallenge < Lithic::Internal::Type::BaseModel + attr_accessor phone_number: String + + attr_accessor status: Lithic::Models::CardAuthorization::LatestChallenge::status + + attr_reader completed_at: Time? + + def completed_at=: (Time) -> Time + + def initialize: ( + phone_number: String, + status: Lithic::Models::CardAuthorization::LatestChallenge::status, + ?completed_at: Time + ) -> void + + def to_hash: -> { + phone_number: String, + status: Lithic::Models::CardAuthorization::LatestChallenge::status, + completed_at: Time + } + + type status = :COMPLETED | :PENDING | :EXPIRED | :ERROR + + module Status + extend Lithic::Internal::Type::Enum + + COMPLETED: :COMPLETED + PENDING: :PENDING + EXPIRED: :EXPIRED + ERROR: :ERROR + + def self?.values: -> ::Array[Lithic::Models::CardAuthorization::LatestChallenge::status] + end + end + + type network = + :AMEX | :INTERLINK | :MAESTRO | :MASTERCARD | :UNKNOWN | :VISA + + module Network + extend Lithic::Internal::Type::Enum + + AMEX: :AMEX + INTERLINK: :INTERLINK + MAESTRO: :MAESTRO + MASTERCARD: :MASTERCARD + UNKNOWN: :UNKNOWN + VISA: :VISA + + def self?.values: -> ::Array[Lithic::Models::CardAuthorization::network] + end + + type network_specific_data = + { + mastercard: Lithic::CardAuthorization::NetworkSpecificData::Mastercard?, + visa: Lithic::CardAuthorization::NetworkSpecificData::Visa? + } + + class NetworkSpecificData < Lithic::Internal::Type::BaseModel + attr_accessor mastercard: Lithic::CardAuthorization::NetworkSpecificData::Mastercard? + + attr_accessor visa: Lithic::CardAuthorization::NetworkSpecificData::Visa? + + def initialize: ( + ?mastercard: Lithic::CardAuthorization::NetworkSpecificData::Mastercard?, + ?visa: Lithic::CardAuthorization::NetworkSpecificData::Visa? + ) -> void + + def to_hash: -> { + mastercard: Lithic::CardAuthorization::NetworkSpecificData::Mastercard?, + visa: Lithic::CardAuthorization::NetworkSpecificData::Visa? + } + + type mastercard = + { + ecommerce_security_level_indicator: String?, + on_behalf_service_result: ::Array[Lithic::CardAuthorization::NetworkSpecificData::Mastercard::OnBehalfServiceResult]?, + transaction_type_identifier: String? + } + + class Mastercard < Lithic::Internal::Type::BaseModel + attr_accessor ecommerce_security_level_indicator: String? + + attr_accessor on_behalf_service_result: ::Array[Lithic::CardAuthorization::NetworkSpecificData::Mastercard::OnBehalfServiceResult]? + + attr_accessor transaction_type_identifier: String? + + def initialize: ( + ?ecommerce_security_level_indicator: String?, + ?on_behalf_service_result: ::Array[Lithic::CardAuthorization::NetworkSpecificData::Mastercard::OnBehalfServiceResult]?, + ?transaction_type_identifier: String? + ) -> void + + def to_hash: -> { + ecommerce_security_level_indicator: String?, + on_behalf_service_result: ::Array[Lithic::CardAuthorization::NetworkSpecificData::Mastercard::OnBehalfServiceResult]?, + transaction_type_identifier: String? + } + + type on_behalf_service_result = + { :result_1 => String, :result_2 => String, service: String } + + class OnBehalfServiceResult < Lithic::Internal::Type::BaseModel + attr_accessor result_1: String + + attr_accessor result_2: String + + attr_accessor service: String + + def initialize: ( + result_1: String, + result_2: String, + service: String + ) -> void + + def to_hash: -> { + :result_1 => String, + :result_2 => String, + service: String + } + end + end + + type visa = { business_application_identifier: String? } + + class Visa < Lithic::Internal::Type::BaseModel + attr_accessor business_application_identifier: String? + + def initialize: (?business_application_identifier: String?) -> void + + def to_hash: -> { business_application_identifier: String? } + end + end + + type pos = + { + entry_mode: Lithic::CardAuthorization::Pos::EntryMode, + terminal: Lithic::CardAuthorization::Pos::Terminal + } + + class Pos < Lithic::Internal::Type::BaseModel + attr_reader entry_mode: Lithic::CardAuthorization::Pos::EntryMode? + + def entry_mode=: ( + Lithic::CardAuthorization::Pos::EntryMode + ) -> Lithic::CardAuthorization::Pos::EntryMode + + attr_reader terminal: Lithic::CardAuthorization::Pos::Terminal? + + def terminal=: ( + Lithic::CardAuthorization::Pos::Terminal + ) -> Lithic::CardAuthorization::Pos::Terminal + + def initialize: ( + ?entry_mode: Lithic::CardAuthorization::Pos::EntryMode, + ?terminal: Lithic::CardAuthorization::Pos::Terminal + ) -> void + + def to_hash: -> { + entry_mode: Lithic::CardAuthorization::Pos::EntryMode, + terminal: Lithic::CardAuthorization::Pos::Terminal + } + + type entry_mode = + { + card: Lithic::Models::CardAuthorization::Pos::EntryMode::card, + cardholder: Lithic::Models::CardAuthorization::Pos::EntryMode::cardholder, + pan: Lithic::Models::CardAuthorization::Pos::EntryMode::pan, + pin_entered: bool + } + + class EntryMode < Lithic::Internal::Type::BaseModel + attr_reader card: Lithic::Models::CardAuthorization::Pos::EntryMode::card? + + def card=: ( + Lithic::Models::CardAuthorization::Pos::EntryMode::card + ) -> Lithic::Models::CardAuthorization::Pos::EntryMode::card + + attr_reader cardholder: Lithic::Models::CardAuthorization::Pos::EntryMode::cardholder? + + def cardholder=: ( + Lithic::Models::CardAuthorization::Pos::EntryMode::cardholder + ) -> Lithic::Models::CardAuthorization::Pos::EntryMode::cardholder + + attr_reader pan: Lithic::Models::CardAuthorization::Pos::EntryMode::pan? + + def pan=: ( + Lithic::Models::CardAuthorization::Pos::EntryMode::pan + ) -> Lithic::Models::CardAuthorization::Pos::EntryMode::pan + + attr_reader pin_entered: bool? + + def pin_entered=: (bool) -> bool + + def initialize: ( + ?card: Lithic::Models::CardAuthorization::Pos::EntryMode::card, + ?cardholder: Lithic::Models::CardAuthorization::Pos::EntryMode::cardholder, + ?pan: Lithic::Models::CardAuthorization::Pos::EntryMode::pan, + ?pin_entered: bool + ) -> void + + def to_hash: -> { + card: Lithic::Models::CardAuthorization::Pos::EntryMode::card, + cardholder: Lithic::Models::CardAuthorization::Pos::EntryMode::cardholder, + pan: Lithic::Models::CardAuthorization::Pos::EntryMode::pan, + pin_entered: bool + } + + type card = :PRESENT | :NOT_PRESENT | :UNKNOWN + + module Card + extend Lithic::Internal::Type::Enum + + PRESENT: :PRESENT + NOT_PRESENT: :NOT_PRESENT + UNKNOWN: :UNKNOWN + + def self?.values: -> ::Array[Lithic::Models::CardAuthorization::Pos::EntryMode::card] + end + + type cardholder = + :DEFERRED_BILLING + | :ELECTRONIC_ORDER + | :INSTALLMENT + | :MAIL_ORDER + | :NOT_PRESENT + | :PRESENT + | :REOCCURRING + | :TELEPHONE_ORDER + | :UNKNOWN + + module Cardholder + extend Lithic::Internal::Type::Enum + + DEFERRED_BILLING: :DEFERRED_BILLING + ELECTRONIC_ORDER: :ELECTRONIC_ORDER + INSTALLMENT: :INSTALLMENT + MAIL_ORDER: :MAIL_ORDER + NOT_PRESENT: :NOT_PRESENT + PRESENT: :PRESENT + REOCCURRING: :REOCCURRING + TELEPHONE_ORDER: :TELEPHONE_ORDER + UNKNOWN: :UNKNOWN + + def self?.values: -> ::Array[Lithic::Models::CardAuthorization::Pos::EntryMode::cardholder] + end + + type pan = + :AUTO_ENTRY + | :BAR_CODE + | :CONTACTLESS + | :ECOMMERCE + | :ERROR_KEYED + | :ERROR_MAGNETIC_STRIPE + | :ICC + | :KEY_ENTERED + | :MAGNETIC_STRIPE + | :MANUAL + | :OCR + | :SECURE_CARDLESS + | :UNSPECIFIED + | :UNKNOWN + | :CREDENTIAL_ON_FILE + + module Pan + extend Lithic::Internal::Type::Enum + + AUTO_ENTRY: :AUTO_ENTRY + BAR_CODE: :BAR_CODE + CONTACTLESS: :CONTACTLESS + ECOMMERCE: :ECOMMERCE + ERROR_KEYED: :ERROR_KEYED + ERROR_MAGNETIC_STRIPE: :ERROR_MAGNETIC_STRIPE + ICC: :ICC + KEY_ENTERED: :KEY_ENTERED + MAGNETIC_STRIPE: :MAGNETIC_STRIPE + MANUAL: :MANUAL + OCR: :OCR + SECURE_CARDLESS: :SECURE_CARDLESS + UNSPECIFIED: :UNSPECIFIED + UNKNOWN: :UNKNOWN + CREDENTIAL_ON_FILE: :CREDENTIAL_ON_FILE + + def self?.values: -> ::Array[Lithic::Models::CardAuthorization::Pos::EntryMode::pan] + end + end + + type terminal = + { + attended: bool, + card_retention_capable: bool, + on_premise: bool, + operator: Lithic::Models::CardAuthorization::Pos::Terminal::operator, + partial_approval_capable: bool, + pin_capability: Lithic::Models::CardAuthorization::Pos::Terminal::pin_capability, + type: Lithic::Models::CardAuthorization::Pos::Terminal::type_, + acceptor_terminal_id: String? + } + + class Terminal < Lithic::Internal::Type::BaseModel + attr_accessor attended: bool + + attr_accessor card_retention_capable: bool + + attr_accessor on_premise: bool + + attr_accessor operator: Lithic::Models::CardAuthorization::Pos::Terminal::operator + + attr_accessor partial_approval_capable: bool + + attr_accessor pin_capability: Lithic::Models::CardAuthorization::Pos::Terminal::pin_capability + + attr_accessor type: Lithic::Models::CardAuthorization::Pos::Terminal::type_ + + attr_accessor acceptor_terminal_id: String? + + def initialize: ( + attended: bool, + card_retention_capable: bool, + on_premise: bool, + operator: Lithic::Models::CardAuthorization::Pos::Terminal::operator, + partial_approval_capable: bool, + pin_capability: Lithic::Models::CardAuthorization::Pos::Terminal::pin_capability, + type: Lithic::Models::CardAuthorization::Pos::Terminal::type_, + ?acceptor_terminal_id: String? + ) -> void + + def to_hash: -> { + attended: bool, + card_retention_capable: bool, + on_premise: bool, + operator: Lithic::Models::CardAuthorization::Pos::Terminal::operator, + partial_approval_capable: bool, + pin_capability: Lithic::Models::CardAuthorization::Pos::Terminal::pin_capability, + type: Lithic::Models::CardAuthorization::Pos::Terminal::type_, + acceptor_terminal_id: String? + } + + type operator = + :ADMINISTRATIVE | :CARDHOLDER | :CARD_ACCEPTOR | :UNKNOWN + + module Operator + extend Lithic::Internal::Type::Enum + + ADMINISTRATIVE: :ADMINISTRATIVE + CARDHOLDER: :CARDHOLDER + CARD_ACCEPTOR: :CARD_ACCEPTOR + UNKNOWN: :UNKNOWN + + def self?.values: -> ::Array[Lithic::Models::CardAuthorization::Pos::Terminal::operator] + end + + type pin_capability = + :CAPABLE | :INOPERATIVE | :NOT_CAPABLE | :UNSPECIFIED + + module PinCapability + extend Lithic::Internal::Type::Enum + + CAPABLE: :CAPABLE + INOPERATIVE: :INOPERATIVE + NOT_CAPABLE: :NOT_CAPABLE + UNSPECIFIED: :UNSPECIFIED + + def self?.values: -> ::Array[Lithic::Models::CardAuthorization::Pos::Terminal::pin_capability] + end + + type type_ = + :ADMINISTRATIVE + | :ATM + | :AUTHORIZATION + | :COUPON_MACHINE + | :DIAL_TERMINAL + | :ECOMMERCE + | :ECR + | :FUEL_MACHINE + | :HOME_TERMINAL + | :MICR + | :OFF_PREMISE + | :PAYMENT + | :PDA + | :PHONE + | :POINT + | :POS_TERMINAL + | :PUBLIC_UTILITY + | :SELF_SERVICE + | :TELEVISION + | :TELLER + | :TRAVELERS_CHECK_MACHINE + | :VENDING + | :VOICE + | :UNKNOWN + + module Type + extend Lithic::Internal::Type::Enum + + ADMINISTRATIVE: :ADMINISTRATIVE + ATM: :ATM + AUTHORIZATION: :AUTHORIZATION + COUPON_MACHINE: :COUPON_MACHINE + DIAL_TERMINAL: :DIAL_TERMINAL + ECOMMERCE: :ECOMMERCE + ECR: :ECR + FUEL_MACHINE: :FUEL_MACHINE + HOME_TERMINAL: :HOME_TERMINAL + MICR: :MICR + OFF_PREMISE: :OFF_PREMISE + PAYMENT: :PAYMENT + PDA: :PDA + PHONE: :PHONE + POINT: :POINT + POS_TERMINAL: :POS_TERMINAL + PUBLIC_UTILITY: :PUBLIC_UTILITY + SELF_SERVICE: :SELF_SERVICE + TELEVISION: :TELEVISION + TELLER: :TELLER + TRAVELERS_CHECK_MACHINE: :TRAVELERS_CHECK_MACHINE + VENDING: :VENDING + VOICE: :VOICE + UNKNOWN: :UNKNOWN + + def self?.values: -> ::Array[Lithic::Models::CardAuthorization::Pos::Terminal::type_] + end + end + end + end + end +end diff --git a/sig/lithic/models/card_authorization_approval_request_webhook_event.rbs b/sig/lithic/models/card_authorization_approval_request_webhook_event.rbs index c0ded6e6..24c3206c 100644 --- a/sig/lithic/models/card_authorization_approval_request_webhook_event.rbs +++ b/sig/lithic/models/card_authorization_approval_request_webhook_event.rbs @@ -1,1026 +1,20 @@ module Lithic module Models type card_authorization_approval_request_webhook_event = - { - token: String, - acquirer_fee: Integer, - amount: Integer, - amounts: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts, - authorization_amount: Integer, - avs: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs, - card: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card, - cardholder_currency: String, - cash_amount: Integer, - created: Time, - event_type: :"card_authorization.approval_request", - merchant: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Merchant, - merchant_amount: Integer, - merchant_currency: String, - service_location: Lithic::CardAuthorizationApprovalRequestWebhookEvent::ServiceLocation?, - settled_amount: Integer, - status: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::status, - transaction_initiator: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::transaction_initiator, - account_type: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::account_type, - cardholder_authentication: Lithic::CardholderAuthentication, - cashback: Integer, - conversion_rate: Float, - event_token: String, - fleet_info: Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo?, - latest_challenge: Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge, - network: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::network, - network_risk_score: Integer?, - network_specific_data: Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData?, - pos: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos, - token_info: Lithic::TokenInfo?, - ttl: Time - } + { event_type: :"card_authorization.approval_request" } - class CardAuthorizationApprovalRequestWebhookEvent < Lithic::Internal::Type::BaseModel - attr_accessor token: String + class CardAuthorizationApprovalRequestWebhookEvent < Lithic::Models::CardAuthorization + def event_type: -> :"card_authorization.approval_request" - attr_accessor acquirer_fee: Integer - - attr_accessor amount: Integer - - attr_accessor amounts: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts - - attr_accessor authorization_amount: Integer - - attr_accessor avs: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs - - attr_accessor card: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card - - attr_accessor cardholder_currency: String - - attr_accessor cash_amount: Integer - - attr_accessor created: Time - - attr_accessor event_type: :"card_authorization.approval_request" - - attr_accessor merchant: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Merchant - - attr_accessor merchant_amount: Integer - - attr_accessor merchant_currency: String - - attr_accessor service_location: Lithic::CardAuthorizationApprovalRequestWebhookEvent::ServiceLocation? - - attr_accessor settled_amount: Integer - - attr_accessor status: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::status - - attr_accessor transaction_initiator: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::transaction_initiator - - attr_reader account_type: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::account_type? - - def account_type=: ( - Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::account_type - ) -> Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::account_type - - attr_reader cardholder_authentication: Lithic::CardholderAuthentication? - - def cardholder_authentication=: ( - Lithic::CardholderAuthentication - ) -> Lithic::CardholderAuthentication - - attr_reader cashback: Integer? - - def cashback=: (Integer) -> Integer - - attr_reader conversion_rate: Float? - - def conversion_rate=: (Float) -> Float - - attr_reader event_token: String? - - def event_token=: (String) -> String - - attr_accessor fleet_info: Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo? - - attr_reader latest_challenge: Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge? - - def latest_challenge=: ( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge - ) -> Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge - - attr_reader network: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::network? - - def network=: ( - Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::network - ) -> Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::network - - attr_accessor network_risk_score: Integer? - - attr_accessor network_specific_data: Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData? - - attr_reader pos: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos? - - def pos=: ( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos - ) -> Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos - - attr_accessor token_info: Lithic::TokenInfo? - - attr_reader ttl: Time? - - def ttl=: (Time) -> Time + def event_type=: ( + :"card_authorization.approval_request" _ + ) -> :"card_authorization.approval_request" def initialize: ( - token: String, - acquirer_fee: Integer, - amount: Integer, - amounts: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts, - authorization_amount: Integer, - avs: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs, - card: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card, - cardholder_currency: String, - cash_amount: Integer, - created: Time, - merchant: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Merchant, - merchant_amount: Integer, - merchant_currency: String, - service_location: Lithic::CardAuthorizationApprovalRequestWebhookEvent::ServiceLocation?, - settled_amount: Integer, - status: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::status, - transaction_initiator: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::transaction_initiator, - ?account_type: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::account_type, - ?cardholder_authentication: Lithic::CardholderAuthentication, - ?cashback: Integer, - ?conversion_rate: Float, - ?event_token: String, - ?fleet_info: Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo?, - ?latest_challenge: Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge, - ?network: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::network, - ?network_risk_score: Integer?, - ?network_specific_data: Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData?, - ?pos: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos, - ?token_info: Lithic::TokenInfo?, - ?ttl: Time, ?event_type: :"card_authorization.approval_request" ) -> void - def to_hash: -> { - token: String, - acquirer_fee: Integer, - amount: Integer, - amounts: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts, - authorization_amount: Integer, - avs: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs, - card: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card, - cardholder_currency: String, - cash_amount: Integer, - created: Time, - event_type: :"card_authorization.approval_request", - merchant: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Merchant, - merchant_amount: Integer, - merchant_currency: String, - service_location: Lithic::CardAuthorizationApprovalRequestWebhookEvent::ServiceLocation?, - settled_amount: Integer, - status: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::status, - transaction_initiator: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::transaction_initiator, - account_type: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::account_type, - cardholder_authentication: Lithic::CardholderAuthentication, - cashback: Integer, - conversion_rate: Float, - event_token: String, - fleet_info: Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo?, - latest_challenge: Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge, - network: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::network, - network_risk_score: Integer?, - network_specific_data: Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData?, - pos: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos, - token_info: Lithic::TokenInfo?, - ttl: Time - } - - type amounts = - { - cardholder: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder, - hold: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold?, - merchant: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant, - settlement: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement? - } - - class Amounts < Lithic::Internal::Type::BaseModel - attr_accessor cardholder: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder - - attr_accessor hold: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold? - - attr_accessor merchant: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant - - attr_accessor settlement: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement? - - def initialize: ( - cardholder: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder, - hold: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold?, - merchant: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant, - settlement: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement? - ) -> void - - def to_hash: -> { - cardholder: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder, - hold: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold?, - merchant: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant, - settlement: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement? - } - - type cardholder = - { amount: Integer, conversion_rate: String, currency: String } - - class Cardholder < Lithic::Internal::Type::BaseModel - attr_accessor amount: Integer - - attr_accessor conversion_rate: String - - attr_accessor currency: String - - def initialize: ( - amount: Integer, - conversion_rate: String, - currency: String - ) -> void - - def to_hash: -> { - amount: Integer, - conversion_rate: String, - currency: String - } - end - - type hold = { amount: Integer, currency: String } - - class Hold < Lithic::Internal::Type::BaseModel - attr_accessor amount: Integer - - attr_accessor currency: String - - def initialize: (amount: Integer, currency: String) -> void - - def to_hash: -> { amount: Integer, currency: String } - end - - type merchant = { amount: Integer, currency: String } - - class Merchant < Lithic::Internal::Type::BaseModel - attr_accessor amount: Integer - - attr_accessor currency: String - - def initialize: (amount: Integer, currency: String) -> void - - def to_hash: -> { amount: Integer, currency: String } - end - - type settlement = { amount: Integer, currency: String } - - class Settlement < Lithic::Internal::Type::BaseModel - attr_accessor amount: Integer - - attr_accessor currency: String - - def initialize: (amount: Integer, currency: String) -> void - - def to_hash: -> { amount: Integer, currency: String } - end - end - - type avs = - { - address: String, - address_on_file_match: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Avs::address_on_file_match, - zipcode: String - } - - class Avs < Lithic::Internal::Type::BaseModel - attr_accessor address: String - - attr_accessor address_on_file_match: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Avs::address_on_file_match - - attr_accessor zipcode: String - - def initialize: ( - address: String, - address_on_file_match: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Avs::address_on_file_match, - zipcode: String - ) -> void - - def to_hash: -> { - address: String, - address_on_file_match: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Avs::address_on_file_match, - zipcode: String - } - - type address_on_file_match = - :MATCH - | :MATCH_ADDRESS_ONLY - | :MATCH_ZIP_ONLY - | :MISMATCH - | :NOT_PRESENT - - module AddressOnFileMatch - extend Lithic::Internal::Type::Enum - - MATCH: :MATCH - MATCH_ADDRESS_ONLY: :MATCH_ADDRESS_ONLY - MATCH_ZIP_ONLY: :MATCH_ZIP_ONLY - MISMATCH: :MISMATCH - NOT_PRESENT: :NOT_PRESENT - - def self?.values: -> ::Array[Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Avs::address_on_file_match] - end - end - - type card = - { - token: String, - last_four: String, - memo: String, - spend_limit: Integer, - spend_limit_duration: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Card::spend_limit_duration, - state: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Card::state, - type: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Card::type_ - } - - class Card < Lithic::Internal::Type::BaseModel - attr_accessor token: String - - attr_accessor last_four: String - - attr_accessor memo: String - - attr_accessor spend_limit: Integer - - attr_accessor spend_limit_duration: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Card::spend_limit_duration - - attr_accessor state: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Card::state - - attr_accessor type: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Card::type_ - - def initialize: ( - token: String, - last_four: String, - memo: String, - spend_limit: Integer, - spend_limit_duration: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Card::spend_limit_duration, - state: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Card::state, - type: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Card::type_ - ) -> void - - def to_hash: -> { - token: String, - last_four: String, - memo: String, - spend_limit: Integer, - spend_limit_duration: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Card::spend_limit_duration, - state: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Card::state, - type: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Card::type_ - } - - type spend_limit_duration = - :ANNUALLY | :FOREVER | :MONTHLY | :TRANSACTION - - module SpendLimitDuration - extend Lithic::Internal::Type::Enum - - ANNUALLY: :ANNUALLY - FOREVER: :FOREVER - MONTHLY: :MONTHLY - TRANSACTION: :TRANSACTION - - def self?.values: -> ::Array[Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Card::spend_limit_duration] - end - - type state = - :CLOSED | :OPEN | :PAUSED | :PENDING_ACTIVATION | :PENDING_FULFILLMENT - - module State - extend Lithic::Internal::Type::Enum - - CLOSED: :CLOSED - OPEN: :OPEN - PAUSED: :PAUSED - PENDING_ACTIVATION: :PENDING_ACTIVATION - PENDING_FULFILLMENT: :PENDING_FULFILLMENT - - def self?.values: -> ::Array[Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Card::state] - end - - type type_ = - :SINGLE_USE - | :MERCHANT_LOCKED - | :UNLOCKED - | :PHYSICAL - | :DIGITAL_WALLET - | :VIRTUAL - - module Type - extend Lithic::Internal::Type::Enum - - SINGLE_USE: :SINGLE_USE - MERCHANT_LOCKED: :MERCHANT_LOCKED - UNLOCKED: :UNLOCKED - PHYSICAL: :PHYSICAL - DIGITAL_WALLET: :DIGITAL_WALLET - VIRTUAL: :VIRTUAL - - def self?.values: -> ::Array[Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Card::type_] - end - end - - type merchant = - { phone_number: String?, postal_code: String?, street_address: String? } - - class Merchant < Lithic::Models::Merchant - def phone_number: -> String? - - def phone_number=: (String? _) -> String? - - def postal_code: -> String? - - def postal_code=: (String? _) -> String? - - def street_address: -> String? - - def street_address=: (String? _) -> String? - - def initialize: ( - phone_number: String?, - postal_code: String?, - street_address: String? - ) -> void - - def to_hash: -> { - phone_number: String?, - postal_code: String?, - street_address: String? - } - end - - type service_location = - { - city: String?, - country: String?, - postal_code: String?, - state: String?, - street_address: String? - } - - class ServiceLocation < Lithic::Internal::Type::BaseModel - attr_accessor city: String? - - attr_accessor country: String? - - attr_accessor postal_code: String? - - attr_accessor state: String? - - attr_accessor street_address: String? - - def initialize: ( - city: String?, - country: String?, - postal_code: String?, - state: String?, - street_address: String? - ) -> void - - def to_hash: -> { - city: String?, - country: String?, - postal_code: String?, - state: String?, - street_address: String? - } - end - - type status = - :AUTHORIZATION - | :CREDIT_AUTHORIZATION - | :FINANCIAL_AUTHORIZATION - | :FINANCIAL_CREDIT_AUTHORIZATION - | :BALANCE_INQUIRY - - module Status - extend Lithic::Internal::Type::Enum - - AUTHORIZATION: :AUTHORIZATION - CREDIT_AUTHORIZATION: :CREDIT_AUTHORIZATION - FINANCIAL_AUTHORIZATION: :FINANCIAL_AUTHORIZATION - FINANCIAL_CREDIT_AUTHORIZATION: :FINANCIAL_CREDIT_AUTHORIZATION - BALANCE_INQUIRY: :BALANCE_INQUIRY - - def self?.values: -> ::Array[Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::status] - end - - type transaction_initiator = :CARDHOLDER | :MERCHANT | :UNKNOWN - - module TransactionInitiator - extend Lithic::Internal::Type::Enum - - CARDHOLDER: :CARDHOLDER - MERCHANT: :MERCHANT - UNKNOWN: :UNKNOWN - - def self?.values: -> ::Array[Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::transaction_initiator] - end - - type account_type = :CHECKING | :SAVINGS - - module AccountType - extend Lithic::Internal::Type::Enum - - CHECKING: :CHECKING - SAVINGS: :SAVINGS - - def self?.values: -> ::Array[Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::account_type] - end - - type fleet_info = - { - fleet_prompt_code: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::fleet_prompt_code, - fleet_restriction_code: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::fleet_restriction_code, - driver_number: String?, - vehicle_number: String? - } - - class FleetInfo < Lithic::Internal::Type::BaseModel - attr_accessor fleet_prompt_code: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::fleet_prompt_code - - attr_accessor fleet_restriction_code: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::fleet_restriction_code - - attr_accessor driver_number: String? - - attr_accessor vehicle_number: String? - - def initialize: ( - fleet_prompt_code: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::fleet_prompt_code, - fleet_restriction_code: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::fleet_restriction_code, - ?driver_number: String?, - ?vehicle_number: String? - ) -> void - - def to_hash: -> { - fleet_prompt_code: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::fleet_prompt_code, - fleet_restriction_code: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::fleet_restriction_code, - driver_number: String?, - vehicle_number: String? - } - - type fleet_prompt_code = :NO_PROMPT | :VEHICLE_NUMBER | :DRIVER_NUMBER - - module FleetPromptCode - extend Lithic::Internal::Type::Enum - - NO_PROMPT: :NO_PROMPT - VEHICLE_NUMBER: :VEHICLE_NUMBER - DRIVER_NUMBER: :DRIVER_NUMBER - - def self?.values: -> ::Array[Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::fleet_prompt_code] - end - - type fleet_restriction_code = :NO_RESTRICTIONS | :FUEL_ONLY - - module FleetRestrictionCode - extend Lithic::Internal::Type::Enum - - NO_RESTRICTIONS: :NO_RESTRICTIONS - FUEL_ONLY: :FUEL_ONLY - - def self?.values: -> ::Array[Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::fleet_restriction_code] - end - end - - type latest_challenge = - { - phone_number: String, - status: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::status, - completed_at: Time - } - - class LatestChallenge < Lithic::Internal::Type::BaseModel - attr_accessor phone_number: String - - attr_accessor status: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::status - - attr_reader completed_at: Time? - - def completed_at=: (Time) -> Time - - def initialize: ( - phone_number: String, - status: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::status, - ?completed_at: Time - ) -> void - - def to_hash: -> { - phone_number: String, - status: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::status, - completed_at: Time - } - - type status = :COMPLETED | :PENDING | :EXPIRED | :ERROR - - module Status - extend Lithic::Internal::Type::Enum - - COMPLETED: :COMPLETED - PENDING: :PENDING - EXPIRED: :EXPIRED - ERROR: :ERROR - - def self?.values: -> ::Array[Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::status] - end - end - - type network = - :AMEX | :INTERLINK | :MAESTRO | :MASTERCARD | :UNKNOWN | :VISA - - module Network - extend Lithic::Internal::Type::Enum - - AMEX: :AMEX - INTERLINK: :INTERLINK - MAESTRO: :MAESTRO - MASTERCARD: :MASTERCARD - UNKNOWN: :UNKNOWN - VISA: :VISA - - def self?.values: -> ::Array[Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::network] - end - - type network_specific_data = - { - mastercard: Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard?, - visa: Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Visa? - } - - class NetworkSpecificData < Lithic::Internal::Type::BaseModel - attr_accessor mastercard: Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard? - - attr_accessor visa: Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Visa? - - def initialize: ( - ?mastercard: Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard?, - ?visa: Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Visa? - ) -> void - - def to_hash: -> { - mastercard: Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard?, - visa: Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Visa? - } - - type mastercard = - { - ecommerce_security_level_indicator: String?, - on_behalf_service_result: ::Array[Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard::OnBehalfServiceResult]?, - transaction_type_identifier: String? - } - - class Mastercard < Lithic::Internal::Type::BaseModel - attr_accessor ecommerce_security_level_indicator: String? - - attr_accessor on_behalf_service_result: ::Array[Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard::OnBehalfServiceResult]? - - attr_accessor transaction_type_identifier: String? - - def initialize: ( - ?ecommerce_security_level_indicator: String?, - ?on_behalf_service_result: ::Array[Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard::OnBehalfServiceResult]?, - ?transaction_type_identifier: String? - ) -> void - - def to_hash: -> { - ecommerce_security_level_indicator: String?, - on_behalf_service_result: ::Array[Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard::OnBehalfServiceResult]?, - transaction_type_identifier: String? - } - - type on_behalf_service_result = - { :result_1 => String, :result_2 => String, service: String } - - class OnBehalfServiceResult < Lithic::Internal::Type::BaseModel - attr_accessor result_1: String - - attr_accessor result_2: String - - attr_accessor service: String - - def initialize: ( - result_1: String, - result_2: String, - service: String - ) -> void - - def to_hash: -> { - :result_1 => String, - :result_2 => String, - service: String - } - end - end - - type visa = { business_application_identifier: String? } - - class Visa < Lithic::Internal::Type::BaseModel - attr_accessor business_application_identifier: String? - - def initialize: (?business_application_identifier: String?) -> void - - def to_hash: -> { business_application_identifier: String? } - end - end - - type pos = - { - entry_mode: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode, - terminal: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal - } - - class Pos < Lithic::Internal::Type::BaseModel - attr_reader entry_mode: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode? - - def entry_mode=: ( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode - ) -> Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode - - attr_reader terminal: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal? - - def terminal=: ( - Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal - ) -> Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal - - def initialize: ( - ?entry_mode: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode, - ?terminal: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal - ) -> void - - def to_hash: -> { - entry_mode: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode, - terminal: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal - } - - type entry_mode = - { - card: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::card, - cardholder: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::cardholder, - pan: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::pan, - pin_entered: bool - } - - class EntryMode < Lithic::Internal::Type::BaseModel - attr_reader card: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::card? - - def card=: ( - Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::card - ) -> Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::card - - attr_reader cardholder: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::cardholder? - - def cardholder=: ( - Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::cardholder - ) -> Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::cardholder - - attr_reader pan: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::pan? - - def pan=: ( - Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::pan - ) -> Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::pan - - attr_reader pin_entered: bool? - - def pin_entered=: (bool) -> bool - - def initialize: ( - ?card: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::card, - ?cardholder: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::cardholder, - ?pan: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::pan, - ?pin_entered: bool - ) -> void - - def to_hash: -> { - card: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::card, - cardholder: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::cardholder, - pan: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::pan, - pin_entered: bool - } - - type card = :PRESENT | :NOT_PRESENT | :UNKNOWN - - module Card - extend Lithic::Internal::Type::Enum - - PRESENT: :PRESENT - NOT_PRESENT: :NOT_PRESENT - UNKNOWN: :UNKNOWN - - def self?.values: -> ::Array[Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::card] - end - - type cardholder = - :DEFERRED_BILLING - | :ELECTRONIC_ORDER - | :INSTALLMENT - | :MAIL_ORDER - | :NOT_PRESENT - | :PRESENT - | :REOCCURRING - | :TELEPHONE_ORDER - | :UNKNOWN - - module Cardholder - extend Lithic::Internal::Type::Enum - - DEFERRED_BILLING: :DEFERRED_BILLING - ELECTRONIC_ORDER: :ELECTRONIC_ORDER - INSTALLMENT: :INSTALLMENT - MAIL_ORDER: :MAIL_ORDER - NOT_PRESENT: :NOT_PRESENT - PRESENT: :PRESENT - REOCCURRING: :REOCCURRING - TELEPHONE_ORDER: :TELEPHONE_ORDER - UNKNOWN: :UNKNOWN - - def self?.values: -> ::Array[Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::cardholder] - end - - type pan = - :AUTO_ENTRY - | :BAR_CODE - | :CONTACTLESS - | :ECOMMERCE - | :ERROR_KEYED - | :ERROR_MAGNETIC_STRIPE - | :ICC - | :KEY_ENTERED - | :MAGNETIC_STRIPE - | :MANUAL - | :OCR - | :SECURE_CARDLESS - | :UNSPECIFIED - | :UNKNOWN - | :CREDENTIAL_ON_FILE - - module Pan - extend Lithic::Internal::Type::Enum - - AUTO_ENTRY: :AUTO_ENTRY - BAR_CODE: :BAR_CODE - CONTACTLESS: :CONTACTLESS - ECOMMERCE: :ECOMMERCE - ERROR_KEYED: :ERROR_KEYED - ERROR_MAGNETIC_STRIPE: :ERROR_MAGNETIC_STRIPE - ICC: :ICC - KEY_ENTERED: :KEY_ENTERED - MAGNETIC_STRIPE: :MAGNETIC_STRIPE - MANUAL: :MANUAL - OCR: :OCR - SECURE_CARDLESS: :SECURE_CARDLESS - UNSPECIFIED: :UNSPECIFIED - UNKNOWN: :UNKNOWN - CREDENTIAL_ON_FILE: :CREDENTIAL_ON_FILE - - def self?.values: -> ::Array[Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::pan] - end - end - - type terminal = - { - attended: bool, - card_retention_capable: bool, - on_premise: bool, - operator: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::operator, - partial_approval_capable: bool, - pin_capability: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::pin_capability, - type: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::type_, - acceptor_terminal_id: String? - } - - class Terminal < Lithic::Internal::Type::BaseModel - attr_accessor attended: bool - - attr_accessor card_retention_capable: bool - - attr_accessor on_premise: bool - - attr_accessor operator: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::operator - - attr_accessor partial_approval_capable: bool - - attr_accessor pin_capability: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::pin_capability - - attr_accessor type: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::type_ - - attr_accessor acceptor_terminal_id: String? - - def initialize: ( - attended: bool, - card_retention_capable: bool, - on_premise: bool, - operator: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::operator, - partial_approval_capable: bool, - pin_capability: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::pin_capability, - type: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::type_, - ?acceptor_terminal_id: String? - ) -> void - - def to_hash: -> { - attended: bool, - card_retention_capable: bool, - on_premise: bool, - operator: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::operator, - partial_approval_capable: bool, - pin_capability: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::pin_capability, - type: Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::type_, - acceptor_terminal_id: String? - } - - type operator = - :ADMINISTRATIVE | :CARDHOLDER | :CARD_ACCEPTOR | :UNKNOWN - - module Operator - extend Lithic::Internal::Type::Enum - - ADMINISTRATIVE: :ADMINISTRATIVE - CARDHOLDER: :CARDHOLDER - CARD_ACCEPTOR: :CARD_ACCEPTOR - UNKNOWN: :UNKNOWN - - def self?.values: -> ::Array[Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::operator] - end - - type pin_capability = - :CAPABLE | :INOPERATIVE | :NOT_CAPABLE | :UNSPECIFIED - - module PinCapability - extend Lithic::Internal::Type::Enum - - CAPABLE: :CAPABLE - INOPERATIVE: :INOPERATIVE - NOT_CAPABLE: :NOT_CAPABLE - UNSPECIFIED: :UNSPECIFIED - - def self?.values: -> ::Array[Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::pin_capability] - end - - type type_ = - :ADMINISTRATIVE - | :ATM - | :AUTHORIZATION - | :COUPON_MACHINE - | :DIAL_TERMINAL - | :ECOMMERCE - | :ECR - | :FUEL_MACHINE - | :HOME_TERMINAL - | :MICR - | :OFF_PREMISE - | :PAYMENT - | :PDA - | :PHONE - | :POINT - | :POS_TERMINAL - | :PUBLIC_UTILITY - | :SELF_SERVICE - | :TELEVISION - | :TELLER - | :TRAVELERS_CHECK_MACHINE - | :VENDING - | :VOICE - | :UNKNOWN - - module Type - extend Lithic::Internal::Type::Enum - - ADMINISTRATIVE: :ADMINISTRATIVE - ATM: :ATM - AUTHORIZATION: :AUTHORIZATION - COUPON_MACHINE: :COUPON_MACHINE - DIAL_TERMINAL: :DIAL_TERMINAL - ECOMMERCE: :ECOMMERCE - ECR: :ECR - FUEL_MACHINE: :FUEL_MACHINE - HOME_TERMINAL: :HOME_TERMINAL - MICR: :MICR - OFF_PREMISE: :OFF_PREMISE - PAYMENT: :PAYMENT - PDA: :PDA - PHONE: :PHONE - POINT: :POINT - POS_TERMINAL: :POS_TERMINAL - PUBLIC_UTILITY: :PUBLIC_UTILITY - SELF_SERVICE: :SELF_SERVICE - TELEVISION: :TELEVISION - TELLER: :TELLER - TRAVELERS_CHECK_MACHINE: :TRAVELERS_CHECK_MACHINE - VENDING: :VENDING - VOICE: :VOICE - UNKNOWN: :UNKNOWN - - def self?.values: -> ::Array[Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::type_] - end - end - end + def to_hash: -> { event_type: :"card_authorization.approval_request" } end end end diff --git a/sig/lithic/models/card_authorization_challenge_response_params.rbs b/sig/lithic/models/card_authorization_challenge_response_params.rbs new file mode 100644 index 00000000..deb6c307 --- /dev/null +++ b/sig/lithic/models/card_authorization_challenge_response_params.rbs @@ -0,0 +1,42 @@ +module Lithic + module Models + type card_authorization_challenge_response_params = + { + event_token: String, + response: Lithic::Models::CardAuthorizationChallengeResponseParams::response + } + & Lithic::Internal::Type::request_parameters + + class CardAuthorizationChallengeResponseParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_accessor event_token: String + + attr_accessor response: Lithic::Models::CardAuthorizationChallengeResponseParams::response + + def initialize: ( + event_token: String, + response: Lithic::Models::CardAuthorizationChallengeResponseParams::response, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + event_token: String, + response: Lithic::Models::CardAuthorizationChallengeResponseParams::response, + request_options: Lithic::RequestOptions + } + + type response = :APPROVE | :DECLINE + + module Response + extend Lithic::Internal::Type::Enum + + APPROVE: :APPROVE + DECLINE: :DECLINE + + def self?.values: -> ::Array[Lithic::Models::CardAuthorizationChallengeResponseParams::response] + end + end + end +end diff --git a/sig/lithic/models/card_authorization_challenge_webhook_event.rbs b/sig/lithic/models/card_authorization_challenge_webhook_event.rbs new file mode 100644 index 00000000..add10ecc --- /dev/null +++ b/sig/lithic/models/card_authorization_challenge_webhook_event.rbs @@ -0,0 +1,53 @@ +module Lithic + module Models + type card_authorization_challenge_webhook_event = + { + authorization: Lithic::CardAuthorization, + challenge: Lithic::CardAuthorizationChallengeWebhookEvent::Challenge, + event_type: :"card_authorization.challenge" + } + + class CardAuthorizationChallengeWebhookEvent < Lithic::Internal::Type::BaseModel + attr_accessor authorization: Lithic::CardAuthorization + + attr_accessor challenge: Lithic::CardAuthorizationChallengeWebhookEvent::Challenge + + attr_accessor event_type: :"card_authorization.challenge" + + def initialize: ( + authorization: Lithic::CardAuthorization, + challenge: Lithic::CardAuthorizationChallengeWebhookEvent::Challenge, + ?event_type: :"card_authorization.challenge" + ) -> void + + def to_hash: -> { + authorization: Lithic::CardAuthorization, + challenge: Lithic::CardAuthorizationChallengeWebhookEvent::Challenge, + event_type: :"card_authorization.challenge" + } + + type challenge = + { event_token: String, expiry_time: Time, start_time: Time } + + class Challenge < Lithic::Internal::Type::BaseModel + attr_accessor event_token: String + + attr_accessor expiry_time: Time + + attr_accessor start_time: Time + + def initialize: ( + event_token: String, + expiry_time: Time, + start_time: Time + ) -> void + + def to_hash: -> { + event_token: String, + expiry_time: Time, + start_time: Time + } + end + end + end +end diff --git a/sig/lithic/models/event.rbs b/sig/lithic/models/event.rbs index 11df5b77..5950629b 100644 --- a/sig/lithic/models/event.rbs +++ b/sig/lithic/models/event.rbs @@ -40,6 +40,7 @@ module Lithic | :"balance.updated" | :"book_transfer_transaction.created" | :"book_transfer_transaction.updated" + | :"card_authorization.challenge" | :"card_authorization.challenge_response" | :"card_transaction.enhanced_data.created" | :"card_transaction.enhanced_data.updated" @@ -97,6 +98,7 @@ module Lithic BALANCE_UPDATED: :"balance.updated" BOOK_TRANSFER_TRANSACTION_CREATED: :"book_transfer_transaction.created" BOOK_TRANSFER_TRANSACTION_UPDATED: :"book_transfer_transaction.updated" + CARD_AUTHORIZATION_CHALLENGE: :"card_authorization.challenge" CARD_AUTHORIZATION_CHALLENGE_RESPONSE: :"card_authorization.challenge_response" CARD_TRANSACTION_ENHANCED_DATA_CREATED: :"card_transaction.enhanced_data.created" CARD_TRANSACTION_ENHANCED_DATA_UPDATED: :"card_transaction.enhanced_data.updated" diff --git a/sig/lithic/models/event_list_params.rbs b/sig/lithic/models/event_list_params.rbs index b652a36d..91c0c1e0 100644 --- a/sig/lithic/models/event_list_params.rbs +++ b/sig/lithic/models/event_list_params.rbs @@ -77,6 +77,7 @@ module Lithic | :"balance.updated" | :"book_transfer_transaction.created" | :"book_transfer_transaction.updated" + | :"card_authorization.challenge" | :"card_authorization.challenge_response" | :"card_transaction.enhanced_data.created" | :"card_transaction.enhanced_data.updated" @@ -134,6 +135,7 @@ module Lithic BALANCE_UPDATED: :"balance.updated" BOOK_TRANSFER_TRANSACTION_CREATED: :"book_transfer_transaction.created" BOOK_TRANSFER_TRANSACTION_UPDATED: :"book_transfer_transaction.updated" + CARD_AUTHORIZATION_CHALLENGE: :"card_authorization.challenge" CARD_AUTHORIZATION_CHALLENGE_RESPONSE: :"card_authorization.challenge_response" CARD_TRANSACTION_ENHANCED_DATA_CREATED: :"card_transaction.enhanced_data.created" CARD_TRANSACTION_ENHANCED_DATA_UPDATED: :"card_transaction.enhanced_data.updated" diff --git a/sig/lithic/models/event_subscription.rbs b/sig/lithic/models/event_subscription.rbs index 52bf08bb..377c7fce 100644 --- a/sig/lithic/models/event_subscription.rbs +++ b/sig/lithic/models/event_subscription.rbs @@ -45,6 +45,7 @@ module Lithic | :"balance.updated" | :"book_transfer_transaction.created" | :"book_transfer_transaction.updated" + | :"card_authorization.challenge" | :"card_authorization.challenge_response" | :"card_transaction.enhanced_data.created" | :"card_transaction.enhanced_data.updated" @@ -102,6 +103,7 @@ module Lithic BALANCE_UPDATED: :"balance.updated" BOOK_TRANSFER_TRANSACTION_CREATED: :"book_transfer_transaction.created" BOOK_TRANSFER_TRANSACTION_UPDATED: :"book_transfer_transaction.updated" + CARD_AUTHORIZATION_CHALLENGE: :"card_authorization.challenge" CARD_AUTHORIZATION_CHALLENGE_RESPONSE: :"card_authorization.challenge_response" CARD_TRANSACTION_ENHANCED_DATA_CREATED: :"card_transaction.enhanced_data.created" CARD_TRANSACTION_ENHANCED_DATA_UPDATED: :"card_transaction.enhanced_data.updated" diff --git a/sig/lithic/models/events/subscription_create_params.rbs b/sig/lithic/models/events/subscription_create_params.rbs index fea39c4a..a35263b3 100644 --- a/sig/lithic/models/events/subscription_create_params.rbs +++ b/sig/lithic/models/events/subscription_create_params.rbs @@ -55,6 +55,7 @@ module Lithic | :"balance.updated" | :"book_transfer_transaction.created" | :"book_transfer_transaction.updated" + | :"card_authorization.challenge" | :"card_authorization.challenge_response" | :"card_transaction.enhanced_data.created" | :"card_transaction.enhanced_data.updated" @@ -112,6 +113,7 @@ module Lithic BALANCE_UPDATED: :"balance.updated" BOOK_TRANSFER_TRANSACTION_CREATED: :"book_transfer_transaction.created" BOOK_TRANSFER_TRANSACTION_UPDATED: :"book_transfer_transaction.updated" + CARD_AUTHORIZATION_CHALLENGE: :"card_authorization.challenge" CARD_AUTHORIZATION_CHALLENGE_RESPONSE: :"card_authorization.challenge_response" CARD_TRANSACTION_ENHANCED_DATA_CREATED: :"card_transaction.enhanced_data.created" CARD_TRANSACTION_ENHANCED_DATA_UPDATED: :"card_transaction.enhanced_data.updated" diff --git a/sig/lithic/models/events/subscription_send_simulated_example_params.rbs b/sig/lithic/models/events/subscription_send_simulated_example_params.rbs index 9f56b550..2f5dfbd0 100644 --- a/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +++ b/sig/lithic/models/events/subscription_send_simulated_example_params.rbs @@ -41,6 +41,7 @@ module Lithic | :"balance.updated" | :"book_transfer_transaction.created" | :"book_transfer_transaction.updated" + | :"card_authorization.challenge" | :"card_authorization.challenge_response" | :"card_transaction.enhanced_data.created" | :"card_transaction.enhanced_data.updated" @@ -98,6 +99,7 @@ module Lithic BALANCE_UPDATED: :"balance.updated" BOOK_TRANSFER_TRANSACTION_CREATED: :"book_transfer_transaction.created" BOOK_TRANSFER_TRANSACTION_UPDATED: :"book_transfer_transaction.updated" + CARD_AUTHORIZATION_CHALLENGE: :"card_authorization.challenge" CARD_AUTHORIZATION_CHALLENGE_RESPONSE: :"card_authorization.challenge_response" CARD_TRANSACTION_ENHANCED_DATA_CREATED: :"card_transaction.enhanced_data.created" CARD_TRANSACTION_ENHANCED_DATA_UPDATED: :"card_transaction.enhanced_data.updated" diff --git a/sig/lithic/models/events/subscription_update_params.rbs b/sig/lithic/models/events/subscription_update_params.rbs index 7938039c..ce74dca2 100644 --- a/sig/lithic/models/events/subscription_update_params.rbs +++ b/sig/lithic/models/events/subscription_update_params.rbs @@ -60,6 +60,7 @@ module Lithic | :"balance.updated" | :"book_transfer_transaction.created" | :"book_transfer_transaction.updated" + | :"card_authorization.challenge" | :"card_authorization.challenge_response" | :"card_transaction.enhanced_data.created" | :"card_transaction.enhanced_data.updated" @@ -117,6 +118,7 @@ module Lithic BALANCE_UPDATED: :"balance.updated" BOOK_TRANSFER_TRANSACTION_CREATED: :"book_transfer_transaction.created" BOOK_TRANSFER_TRANSACTION_UPDATED: :"book_transfer_transaction.updated" + CARD_AUTHORIZATION_CHALLENGE: :"card_authorization.challenge" CARD_AUTHORIZATION_CHALLENGE_RESPONSE: :"card_authorization.challenge_response" CARD_TRANSACTION_ENHANCED_DATA_CREATED: :"card_transaction.enhanced_data.created" CARD_TRANSACTION_ENHANCED_DATA_UPDATED: :"card_transaction.enhanced_data.updated" diff --git a/sig/lithic/models/parsed_webhook_event.rbs b/sig/lithic/models/parsed_webhook_event.rbs index dc8f8a81..0698e0f9 100644 --- a/sig/lithic/models/parsed_webhook_event.rbs +++ b/sig/lithic/models/parsed_webhook_event.rbs @@ -8,6 +8,7 @@ module Lithic | Lithic::AccountHolderVerificationWebhookEvent | Lithic::AccountHolderDocumentUpdatedWebhookEvent | Lithic::CardAuthorizationApprovalRequestWebhookEvent + | Lithic::CardAuthorizationChallengeWebhookEvent | Lithic::CardAuthorizationChallengeResponseWebhookEvent | Lithic::AuthRulesBacktestReportCreatedWebhookEvent | Lithic::BalanceUpdatedWebhookEvent diff --git a/sig/lithic/resources/card_authorizations.rbs b/sig/lithic/resources/card_authorizations.rbs new file mode 100644 index 00000000..b7a303cd --- /dev/null +++ b/sig/lithic/resources/card_authorizations.rbs @@ -0,0 +1,13 @@ +module Lithic + module Resources + class CardAuthorizations + def challenge_response: ( + String event_token, + response: Lithic::Models::CardAuthorizationChallengeResponseParams::response, + ?request_options: Lithic::request_opts + ) -> nil + + def initialize: (client: Lithic::Client) -> void + end + end +end diff --git a/sig/lithic/resources/webhooks.rbs b/sig/lithic/resources/webhooks.rbs index 1e83cbc7..1b29cc10 100644 --- a/sig/lithic/resources/webhooks.rbs +++ b/sig/lithic/resources/webhooks.rbs @@ -12,6 +12,7 @@ module Lithic | Lithic::AccountHolderVerificationWebhookEvent | Lithic::AccountHolderDocumentUpdatedWebhookEvent | Lithic::CardAuthorizationApprovalRequestWebhookEvent + | Lithic::CardAuthorizationChallengeWebhookEvent | Lithic::CardAuthorizationChallengeResponseWebhookEvent | Lithic::AuthRulesBacktestReportCreatedWebhookEvent | Lithic::BalanceUpdatedWebhookEvent diff --git a/test/lithic/resources/card_authorizations_test.rb b/test/lithic/resources/card_authorizations_test.rb new file mode 100644 index 00000000..6af39f52 --- /dev/null +++ b/test/lithic/resources/card_authorizations_test.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +require_relative "../test_helper" + +class Lithic::Test::Resources::CardAuthorizationsTest < Lithic::Test::ResourceTest + def test_challenge_response_required_params + response = + @lithic.card_authorizations.challenge_response( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + response: :APPROVE + ) + + assert_pattern do + response => nil + end + end +end From 8b7bfc850151d17038fb50aecc6509aa81196e77 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 15:29:54 +0000 Subject: [PATCH 05/14] docs(api): clarify ACCOUNT_AGE behavior in auth_rules conditional parameters --- .stats.yml | 4 ++-- .../conditional_authorization_action_parameters.rb | 6 ++++-- ...ditional_card_transaction_update_action_parameters.rb | 6 ++++-- .../conditional_authorization_action_parameters.rbi | 9 ++++++--- ...itional_card_transaction_update_action_parameters.rbi | 9 ++++++--- 5 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.stats.yml b/.stats.yml index b5b02fac..82a2939e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 194 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-19240135588c2012b39cde86218a05c471b3e7831b57c736704e3fbca109e3a9.yml -openapi_spec_hash: c6a5c719b89e08de52aea005b39fd5a6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-26d81470c7f745ed62524638a09233f19280a1d386ae1041e41fa0f3f58fc59b.yml +openapi_spec_hash: 8d6111c35fddd5b9e291ecc0f9a4b206 config_hash: 1c5c139a2aa0d1d45c063f953a9bc803 diff --git a/lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb b/lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb index 7ecfac11..70a315e6 100644 --- a/lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb +++ b/lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb @@ -108,7 +108,8 @@ class Condition < Lithic::Internal::Type::BaseModel # - `CARD_AGE`: The age of the card in seconds at the time of the authorization. # Use an integer value. # - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time - # of the authorization. Use an integer value. + # of the authorization. Use an integer value. For programs where Lithic does not + # manage or retain account holder data, this attribute does not evaluate. # - `AMOUNT_Z_SCORE`: The z-score of the transaction amount relative to the # entity's transaction history. Null if fewer than 30 approved transactions in # the specified window. Requires `parameters.scope` and `parameters.interval`. @@ -269,7 +270,8 @@ class Condition < Lithic::Internal::Type::BaseModel # - `CARD_AGE`: The age of the card in seconds at the time of the authorization. # Use an integer value. # - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time - # of the authorization. Use an integer value. + # of the authorization. Use an integer value. For programs where Lithic does not + # manage or retain account holder data, this attribute does not evaluate. # - `AMOUNT_Z_SCORE`: The z-score of the transaction amount relative to the # entity's transaction history. Null if fewer than 30 approved transactions in # the specified window. Requires `parameters.scope` and `parameters.interval`. diff --git a/lib/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rb b/lib/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rb index 2015a57d..5fb1ffad 100644 --- a/lib/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rb +++ b/lib/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rb @@ -69,7 +69,8 @@ class Condition < Lithic::Internal::Type::BaseModel # - `CARD_AGE`: The age of the card in seconds at the time of the transaction. Use # an integer value. # - `ACCOUNT_AGE`: The age of the account in seconds at the time of the - # transaction. Use an integer value. + # transaction. Use an integer value. For programs where Lithic does not manage + # or retain account holder data, this attribute does not evaluate. # - `SPEND_VELOCITY_COUNT`: The number of transactions matching the specified # filters within the given period. Requires `parameters` with `scope`, `period`, # and optional `filters`. Use an integer value. @@ -161,7 +162,8 @@ class Condition < Lithic::Internal::Type::BaseModel # - `CARD_AGE`: The age of the card in seconds at the time of the transaction. Use # an integer value. # - `ACCOUNT_AGE`: The age of the account in seconds at the time of the - # transaction. Use an integer value. + # transaction. Use an integer value. For programs where Lithic does not manage + # or retain account holder data, this attribute does not evaluate. # - `SPEND_VELOCITY_COUNT`: The number of transactions matching the specified # filters within the given period. Requires `parameters` with `scope`, `period`, # and optional `filters`. Use an integer value. diff --git a/rbi/lithic/models/auth_rules/conditional_authorization_action_parameters.rbi b/rbi/lithic/models/auth_rules/conditional_authorization_action_parameters.rbi index 9f1ca566..b6ac7a11 100644 --- a/rbi/lithic/models/auth_rules/conditional_authorization_action_parameters.rbi +++ b/rbi/lithic/models/auth_rules/conditional_authorization_action_parameters.rbi @@ -177,7 +177,8 @@ module Lithic # - `CARD_AGE`: The age of the card in seconds at the time of the authorization. # Use an integer value. # - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time - # of the authorization. Use an integer value. + # of the authorization. Use an integer value. For programs where Lithic does not + # manage or retain account holder data, this attribute does not evaluate. # - `AMOUNT_Z_SCORE`: The z-score of the transaction amount relative to the # entity's transaction history. Null if fewer than 30 approved transactions in # the specified window. Requires `parameters.scope` and `parameters.interval`. @@ -345,7 +346,8 @@ module Lithic # - `CARD_AGE`: The age of the card in seconds at the time of the authorization. # Use an integer value. # - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time - # of the authorization. Use an integer value. + # of the authorization. Use an integer value. For programs where Lithic does not + # manage or retain account holder data, this attribute does not evaluate. # - `AMOUNT_Z_SCORE`: The z-score of the transaction amount relative to the # entity's transaction history. Null if fewer than 30 approved transactions in # the specified window. Requires `parameters.scope` and `parameters.interval`. @@ -494,7 +496,8 @@ module Lithic # - `CARD_AGE`: The age of the card in seconds at the time of the authorization. # Use an integer value. # - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time - # of the authorization. Use an integer value. + # of the authorization. Use an integer value. For programs where Lithic does not + # manage or retain account holder data, this attribute does not evaluate. # - `AMOUNT_Z_SCORE`: The z-score of the transaction amount relative to the # entity's transaction history. Null if fewer than 30 approved transactions in # the specified window. Requires `parameters.scope` and `parameters.interval`. diff --git a/rbi/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rbi b/rbi/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rbi index 9537d7b4..fef5a4a9 100644 --- a/rbi/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rbi +++ b/rbi/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rbi @@ -125,7 +125,8 @@ module Lithic # - `CARD_AGE`: The age of the card in seconds at the time of the transaction. Use # an integer value. # - `ACCOUNT_AGE`: The age of the account in seconds at the time of the - # transaction. Use an integer value. + # transaction. Use an integer value. For programs where Lithic does not manage + # or retain account holder data, this attribute does not evaluate. # - `SPEND_VELOCITY_COUNT`: The number of transactions matching the specified # filters within the given period. Requires `parameters` with `scope`, `period`, # and optional `filters`. Use an integer value. @@ -224,7 +225,8 @@ module Lithic # - `CARD_AGE`: The age of the card in seconds at the time of the transaction. Use # an integer value. # - `ACCOUNT_AGE`: The age of the account in seconds at the time of the - # transaction. Use an integer value. + # transaction. Use an integer value. For programs where Lithic does not manage + # or retain account holder data, this attribute does not evaluate. # - `SPEND_VELOCITY_COUNT`: The number of transactions matching the specified # filters within the given period. Requires `parameters` with `scope`, `period`, # and optional `filters`. Use an integer value. @@ -304,7 +306,8 @@ module Lithic # - `CARD_AGE`: The age of the card in seconds at the time of the transaction. Use # an integer value. # - `ACCOUNT_AGE`: The age of the account in seconds at the time of the - # transaction. Use an integer value. + # transaction. Use an integer value. For programs where Lithic does not manage + # or retain account holder data, this attribute does not evaluate. # - `SPEND_VELOCITY_COUNT`: The number of transactions matching the specified # filters within the given period. Requires `parameters` with `scope`, `period`, # and optional `filters`. Use an integer value. From 8fc02b0c0c9be9d06d9657a7bb65220cd418acf3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 20:13:10 +0000 Subject: [PATCH 06/14] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 82a2939e..ddc91aa1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 194 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-26d81470c7f745ed62524638a09233f19280a1d386ae1041e41fa0f3f58fc59b.yml -openapi_spec_hash: 8d6111c35fddd5b9e291ecc0f9a4b206 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-55d6cdcb852320054c00ae49deb0e42c086bdb82ada1ab7ac1bbbbc7c7cc0eeb.yml +openapi_spec_hash: 71f86153c543bc60978d55b8a2634674 config_hash: 1c5c139a2aa0d1d45c063f953a9bc803 From 1128d8df654667a9a2db5ec75e5a5eb9755c75e2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 18 May 2026 18:36:52 +0000 Subject: [PATCH 07/14] fix(types): make external_id, naics_code nullable in enrollment, parent_company in kyb --- .stats.yml | 4 ++-- ...der_simulate_enrollment_review_response.rb | 8 ++++---- lib/lithic/models/kyb_business_entity.rb | 4 ++-- ...er_simulate_enrollment_review_response.rbi | 18 ++++++----------- rbi/lithic/models/kyb_business_entity.rbi | 9 +++------ ...er_simulate_enrollment_review_response.rbs | 20 ++++++++----------- sig/lithic/models/kyb_business_entity.rbs | 10 ++++------ 7 files changed, 29 insertions(+), 44 deletions(-) diff --git a/.stats.yml b/.stats.yml index ddc91aa1..a20441bf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 194 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-55d6cdcb852320054c00ae49deb0e42c086bdb82ada1ab7ac1bbbbc7c7cc0eeb.yml -openapi_spec_hash: 71f86153c543bc60978d55b8a2634674 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-711671459efe47bdb250c7ac893569af9b9e1b7c60ded53a77627be76e300a02.yml +openapi_spec_hash: 193dc8a880e100bb74b493de7d4703e1 config_hash: 1c5c139a2aa0d1d45c063f953a9bc803 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 fa060fc2..6eaa7131 100644 --- a/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb +++ b/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb @@ -88,7 +88,7 @@ class AccountHolderSimulateEnrollmentReviewResponse < Lithic::Internal::Type::Ba # the Lithic ecosystem. # # @return [String, nil] - optional :external_id, String + optional :external_id, String, nil?: true # @!attribute individual # Only present when user_type == "INDIVIDUAL". Information about the individual @@ -102,7 +102,7 @@ class AccountHolderSimulateEnrollmentReviewResponse < Lithic::Internal::Type::Ba # Classification System (NAICS) code for the business. # # @return [String, nil] - optional :naics_code, String + optional :naics_code, String, nil?: true # @!attribute nature_of_business # Only present when user_type == "BUSINESS". User-submitted description of the @@ -191,11 +191,11 @@ class AccountHolderSimulateEnrollmentReviewResponse < Lithic::Internal::Type::Ba # # @param exemption_type [Symbol, Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ExemptionType, nil] The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account # - # @param external_id [String] Customer-provided token that indicates a relationship with an object outside of + # @param external_id [String, nil] Customer-provided token that indicates a relationship with an object outside of # # @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 naics_code [String, nil] 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 # diff --git a/lib/lithic/models/kyb_business_entity.rb b/lib/lithic/models/kyb_business_entity.rb index d148a2f4..ddefa8df 100644 --- a/lib/lithic/models/kyb_business_entity.rb +++ b/lib/lithic/models/kyb_business_entity.rb @@ -42,7 +42,7 @@ class KYBBusinessEntity < Lithic::Internal::Type::BaseModel # Parent company name (if applicable). # # @return [String, nil] - optional :parent_company, String + optional :parent_company, String, nil?: true # @!method initialize(address:, government_id:, legal_business_name:, phone_numbers:, dba_business_name: nil, parent_company: nil) # Some parameter documentations has been truncated, see @@ -58,7 +58,7 @@ class KYBBusinessEntity < Lithic::Internal::Type::BaseModel # # @param dba_business_name [String] Any name that the business operates under that is not its legal business name (i # - # @param parent_company [String] Parent company name (if applicable). + # @param parent_company [String, nil] Parent company name (if applicable). # @see Lithic::Models::KYBBusinessEntity#address class Address < Lithic::Internal::Type::BaseModel 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 b10b950b..60c3aeda 100644 --- a/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi +++ b/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi @@ -124,10 +124,7 @@ module Lithic # Customer-provided token that indicates a relationship with an object outside of # the Lithic ecosystem. sig { returns(T.nilable(String)) } - attr_reader :external_id - - sig { params(external_id: String).void } - attr_writer :external_id + attr_accessor :external_id # Only present when user_type == "INDIVIDUAL". Information about the individual # for which the account is being opened and KYC is being run. @@ -151,10 +148,7 @@ module Lithic # 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 + attr_accessor :naics_code # Only present when user_type == "BUSINESS". User-submitted description of the # business. @@ -296,10 +290,10 @@ module Lithic T.nilable( Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ExemptionType::OrSymbol ), - external_id: String, + external_id: T.nilable(String), individual: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual::OrHash, - naics_code: String, + naics_code: T.nilable(String), nature_of_business: String, phone_number: String, required_documents: T::Array[Lithic::RequiredDocument::OrHash], @@ -417,10 +411,10 @@ module Lithic T.nilable( Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ExemptionType::TaggedSymbol ), - external_id: String, + external_id: T.nilable(String), individual: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual, - naics_code: String, + naics_code: T.nilable(String), nature_of_business: String, phone_number: String, required_documents: T::Array[Lithic::RequiredDocument], diff --git a/rbi/lithic/models/kyb_business_entity.rbi b/rbi/lithic/models/kyb_business_entity.rbi index e1669215..00c46b39 100644 --- a/rbi/lithic/models/kyb_business_entity.rbi +++ b/rbi/lithic/models/kyb_business_entity.rbi @@ -41,10 +41,7 @@ module Lithic # Parent company name (if applicable). sig { returns(T.nilable(String)) } - attr_reader :parent_company - - sig { params(parent_company: String).void } - attr_writer :parent_company + attr_accessor :parent_company sig do params( @@ -53,7 +50,7 @@ module Lithic legal_business_name: String, phone_numbers: T::Array[String], dba_business_name: String, - parent_company: String + parent_company: T.nilable(String) ).returns(T.attached_class) end def self.new( @@ -85,7 +82,7 @@ module Lithic legal_business_name: String, phone_numbers: T::Array[String], dba_business_name: String, - parent_company: String + parent_company: T.nilable(String) } ) end 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 e7d96465..1eb000a5 100644 --- a/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs +++ b/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs @@ -11,9 +11,9 @@ module Lithic created: Time, email: String, exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type?, - external_id: String, + external_id: String?, individual: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual, - naics_code: String, + naics_code: String?, nature_of_business: String, phone_number: String, required_documents: ::Array[Lithic::RequiredDocument], @@ -63,9 +63,7 @@ module Lithic attr_accessor exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type? - attr_reader external_id: String? - - def external_id=: (String) -> String + attr_accessor external_id: String? attr_reader individual: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual? @@ -73,9 +71,7 @@ module Lithic Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual ) -> Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual - attr_reader naics_code: String? - - def naics_code=: (String) -> String + attr_accessor naics_code: String? attr_reader nature_of_business: String? @@ -129,9 +125,9 @@ module Lithic ?created: Time, ?email: String, ?exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type?, - ?external_id: String, + ?external_id: String?, ?individual: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual, - ?naics_code: String, + ?naics_code: String?, ?nature_of_business: String, ?phone_number: String, ?required_documents: ::Array[Lithic::RequiredDocument], @@ -152,9 +148,9 @@ module Lithic created: Time, email: String, exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type?, - external_id: String, + external_id: String?, individual: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual, - naics_code: String, + naics_code: String?, nature_of_business: String, phone_number: String, required_documents: ::Array[Lithic::RequiredDocument], diff --git a/sig/lithic/models/kyb_business_entity.rbs b/sig/lithic/models/kyb_business_entity.rbs index 9bb8ef83..fecce586 100644 --- a/sig/lithic/models/kyb_business_entity.rbs +++ b/sig/lithic/models/kyb_business_entity.rbs @@ -7,7 +7,7 @@ module Lithic legal_business_name: String, phone_numbers: ::Array[String], dba_business_name: String, - parent_company: String + parent_company: String? } class KYBBusinessEntity < Lithic::Internal::Type::BaseModel @@ -23,9 +23,7 @@ module Lithic def dba_business_name=: (String) -> String - attr_reader parent_company: String? - - def parent_company=: (String) -> String + attr_accessor parent_company: String? def initialize: ( address: Lithic::KYBBusinessEntity::Address, @@ -33,7 +31,7 @@ module Lithic legal_business_name: String, phone_numbers: ::Array[String], ?dba_business_name: String, - ?parent_company: String + ?parent_company: String? ) -> void def to_hash: -> { @@ -42,7 +40,7 @@ module Lithic legal_business_name: String, phone_numbers: ::Array[String], dba_business_name: String, - parent_company: String + parent_company: String? } type address = From 886bb1020fcc81e4862cbceee98fcb8eb7ac9b35 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 19 May 2026 08:14:44 +0000 Subject: [PATCH 08/14] feat(api): Add OUT_OF_BAND challenge method and DECLINED status to Authorization --- .stats.yml | 4 +- lib/lithic/models/card_authorization.rb | 41 ++++++++-- ...zation_challenge_response_webhook_event.rb | 1 + lib/lithic/models/event.rb | 8 +- lib/lithic/models/event_list_params.rb | 4 +- lib/lithic/models/event_subscription.rb | 4 +- .../events/subscription_create_params.rb | 4 +- .../events/subscription_update_params.rb | 4 +- rbi/lithic/models/card_authorization.rbi | 75 +++++++++++++++++-- ...ation_challenge_response_webhook_event.rbi | 5 ++ rbi/lithic/models/event.rbi | 12 +-- rbi/lithic/models/event_list_params.rbi | 4 +- rbi/lithic/models/event_subscription.rbi | 4 +- .../events/subscription_create_params.rbi | 4 +- .../events/subscription_update_params.rbi | 4 +- sig/lithic/models/card_authorization.rbs | 27 +++++-- ...ation_challenge_response_webhook_event.rbs | 3 +- 17 files changed, 164 insertions(+), 44 deletions(-) diff --git a/.stats.yml b/.stats.yml index a20441bf..61f89072 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 194 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-711671459efe47bdb250c7ac893569af9b9e1b7c60ded53a77627be76e300a02.yml -openapi_spec_hash: 193dc8a880e100bb74b493de7d4703e1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-9350b3c0a9a4fc31e1cac88e705f1ac6895108360ba8f7845a8da20db825f82e.yml +openapi_spec_hash: c99714470f6321912e8022434a861897 config_hash: 1c5c139a2aa0d1d45c063f953a9bc803 diff --git a/lib/lithic/models/card_authorization.rb b/lib/lithic/models/card_authorization.rb index de587fda..3f54f069 100644 --- a/lib/lithic/models/card_authorization.rb +++ b/lib/lithic/models/card_authorization.rb @@ -793,16 +793,27 @@ module FleetRestrictionCode # @see Lithic::Models::CardAuthorization#latest_challenge class LatestChallenge < Lithic::Internal::Type::BaseModel + # @!attribute method_ + # The method used to deliver the challenge to the cardholder + # + # - `SMS` - Challenge was delivered via SMS + # - `OUT_OF_BAND` - Challenge was delivered via an out-of-band method + # + # @return [Symbol, Lithic::Models::CardAuthorization::LatestChallenge::Method] + required :method_, enum: -> { Lithic::CardAuthorization::LatestChallenge::Method }, api_name: :method + # @!attribute phone_number - # The phone number used for sending Authorization Challenge SMS. + # The phone number used for sending the Authorization Challenge. Present only when + # the challenge method is `SMS`. # - # @return [String] - required :phone_number, String + # @return [String, nil] + required :phone_number, String, nil?: true # @!attribute status # The status of the Authorization Challenge # # - `COMPLETED` - Challenge was successfully completed by the cardholder + # - `DECLINED` - Challenge was declined by the cardholder # - `PENDING` - Challenge is still open # - `EXPIRED` - Challenge has expired without being completed # - `ERROR` - There was an error processing the challenge @@ -817,22 +828,41 @@ class LatestChallenge < Lithic::Internal::Type::BaseModel # @return [Time, nil] optional :completed_at, Time - # @!method initialize(phone_number:, status:, completed_at: nil) + # @!method initialize(method_:, phone_number:, status:, completed_at: nil) # Some parameter documentations has been truncated, see # {Lithic::Models::CardAuthorization::LatestChallenge} for more details. # # The latest Authorization Challenge that was issued to the cardholder for this # merchant. # - # @param phone_number [String] The phone number used for sending Authorization Challenge SMS. + # @param method_ [Symbol, Lithic::Models::CardAuthorization::LatestChallenge::Method] The method used to deliver the challenge to the cardholder + # + # @param phone_number [String, nil] The phone number used for sending the Authorization Challenge. Present only when # # @param status [Symbol, Lithic::Models::CardAuthorization::LatestChallenge::Status] The status of the Authorization Challenge # # @param completed_at [Time] The date and time when the Authorization Challenge was completed in UTC. Present + # The method used to deliver the challenge to the cardholder + # + # - `SMS` - Challenge was delivered via SMS + # - `OUT_OF_BAND` - Challenge was delivered via an out-of-band method + # + # @see Lithic::Models::CardAuthorization::LatestChallenge#method_ + module Method + extend Lithic::Internal::Type::Enum + + SMS = :SMS + OUT_OF_BAND = :OUT_OF_BAND + + # @!method self.values + # @return [Array] + end + # The status of the Authorization Challenge # # - `COMPLETED` - Challenge was successfully completed by the cardholder + # - `DECLINED` - Challenge was declined by the cardholder # - `PENDING` - Challenge is still open # - `EXPIRED` - Challenge has expired without being completed # - `ERROR` - There was an error processing the challenge @@ -842,6 +872,7 @@ module Status extend Lithic::Internal::Type::Enum COMPLETED = :COMPLETED + DECLINED = :DECLINED PENDING = :PENDING EXPIRED = :EXPIRED ERROR = :ERROR diff --git a/lib/lithic/models/card_authorization_challenge_response_webhook_event.rb b/lib/lithic/models/card_authorization_challenge_response_webhook_event.rb index e02210c7..da5de964 100644 --- a/lib/lithic/models/card_authorization_challenge_response_webhook_event.rb +++ b/lib/lithic/models/card_authorization_challenge_response_webhook_event.rb @@ -81,6 +81,7 @@ module ChallengeMethod extend Lithic::Internal::Type::Enum SMS = :SMS + OUT_OF_BAND = :OUT_OF_BAND # @!method self.values # @return [Array] diff --git a/lib/lithic/models/event.rb b/lib/lithic/models/event.rb index 1b9c3d15..81f4fe74 100644 --- a/lib/lithic/models/event.rb +++ b/lib/lithic/models/event.rb @@ -37,8 +37,8 @@ class Event < Lithic::Internal::Type::BaseModel # during card authorization. The card program should issue its own challenge to # the cardholder and then respond via # [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge). - # - card_authorization.challenge_response: Occurs when a cardholder responds to an - # SMS challenge during card authorization. + # - card_authorization.challenge_response: Occurs when a cardholder responds to a + # challenge during card authorization. # - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial # data is processed for a transaction event. # - card_transaction.enhanced_data.updated: Occurs when L2/L3 enhanced commercial @@ -164,8 +164,8 @@ class Event < Lithic::Internal::Type::BaseModel # during card authorization. The card program should issue its own challenge to # the cardholder and then respond via # [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge). - # - card_authorization.challenge_response: Occurs when a cardholder responds to an - # SMS challenge during card authorization. + # - card_authorization.challenge_response: Occurs when a cardholder responds to a + # challenge during card authorization. # - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial # data is processed for a transaction event. # - card_transaction.enhanced_data.updated: Occurs when L2/L3 enhanced commercial diff --git a/lib/lithic/models/event_list_params.rb b/lib/lithic/models/event_list_params.rb index d64b8582..c7d4136b 100644 --- a/lib/lithic/models/event_list_params.rb +++ b/lib/lithic/models/event_list_params.rb @@ -91,8 +91,8 @@ class EventListParams < Lithic::Internal::Type::BaseModel # during card authorization. The card program should issue its own challenge to # the cardholder and then respond via # [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge). - # - card_authorization.challenge_response: Occurs when a cardholder responds to an - # SMS challenge during card authorization. + # - card_authorization.challenge_response: Occurs when a cardholder responds to a + # challenge during card authorization. # - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial # data is processed for a transaction event. # - card_transaction.enhanced_data.updated: Occurs when L2/L3 enhanced commercial diff --git a/lib/lithic/models/event_subscription.rb b/lib/lithic/models/event_subscription.rb index fd8c3d66..1fa8ace5 100644 --- a/lib/lithic/models/event_subscription.rb +++ b/lib/lithic/models/event_subscription.rb @@ -64,8 +64,8 @@ class EventSubscription < Lithic::Internal::Type::BaseModel # during card authorization. The card program should issue its own challenge to # the cardholder and then respond via # [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge). - # - card_authorization.challenge_response: Occurs when a cardholder responds to an - # SMS challenge during card authorization. + # - card_authorization.challenge_response: Occurs when a cardholder responds to a + # challenge during card authorization. # - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial # data is processed for a transaction event. # - card_transaction.enhanced_data.updated: Occurs when L2/L3 enhanced commercial diff --git a/lib/lithic/models/events/subscription_create_params.rb b/lib/lithic/models/events/subscription_create_params.rb index 20f8d6fd..ca2cb392 100644 --- a/lib/lithic/models/events/subscription_create_params.rb +++ b/lib/lithic/models/events/subscription_create_params.rb @@ -66,8 +66,8 @@ class SubscriptionCreateParams < Lithic::Internal::Type::BaseModel # during card authorization. The card program should issue its own challenge to # the cardholder and then respond via # [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge). - # - card_authorization.challenge_response: Occurs when a cardholder responds to an - # SMS challenge during card authorization. + # - card_authorization.challenge_response: Occurs when a cardholder responds to a + # challenge during card authorization. # - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial # data is processed for a transaction event. # - card_transaction.enhanced_data.updated: Occurs when L2/L3 enhanced commercial diff --git a/lib/lithic/models/events/subscription_update_params.rb b/lib/lithic/models/events/subscription_update_params.rb index 612102e6..99170b15 100644 --- a/lib/lithic/models/events/subscription_update_params.rb +++ b/lib/lithic/models/events/subscription_update_params.rb @@ -73,8 +73,8 @@ class SubscriptionUpdateParams < Lithic::Internal::Type::BaseModel # during card authorization. The card program should issue its own challenge to # the cardholder and then respond via # [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge). - # - card_authorization.challenge_response: Occurs when a cardholder responds to an - # SMS challenge during card authorization. + # - card_authorization.challenge_response: Occurs when a cardholder responds to a + # challenge during card authorization. # - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial # data is processed for a transaction event. # - card_transaction.enhanced_data.updated: Occurs when L2/L3 enhanced commercial diff --git a/rbi/lithic/models/card_authorization.rbi b/rbi/lithic/models/card_authorization.rbi index 112d4890..50830e84 100644 --- a/rbi/lithic/models/card_authorization.rbi +++ b/rbi/lithic/models/card_authorization.rbi @@ -1381,13 +1381,26 @@ module Lithic ) end - # The phone number used for sending Authorization Challenge SMS. - sig { returns(String) } + # The method used to deliver the challenge to the cardholder + # + # - `SMS` - Challenge was delivered via SMS + # - `OUT_OF_BAND` - Challenge was delivered via an out-of-band method + sig do + returns( + Lithic::CardAuthorization::LatestChallenge::Method::TaggedSymbol + ) + end + attr_accessor :method_ + + # The phone number used for sending the Authorization Challenge. Present only when + # the challenge method is `SMS`. + sig { returns(T.nilable(String)) } attr_accessor :phone_number # The status of the Authorization Challenge # # - `COMPLETED` - Challenge was successfully completed by the cardholder + # - `DECLINED` - Challenge was declined by the cardholder # - `PENDING` - Challenge is still open # - `EXPIRED` - Challenge has expired without being completed # - `ERROR` - There was an error processing the challenge @@ -1410,18 +1423,27 @@ module Lithic # merchant. sig do params( - phone_number: String, + method_: + Lithic::CardAuthorization::LatestChallenge::Method::OrSymbol, + phone_number: T.nilable(String), status: Lithic::CardAuthorization::LatestChallenge::Status::OrSymbol, completed_at: Time ).returns(T.attached_class) end def self.new( - # The phone number used for sending Authorization Challenge SMS. + # The method used to deliver the challenge to the cardholder + # + # - `SMS` - Challenge was delivered via SMS + # - `OUT_OF_BAND` - Challenge was delivered via an out-of-band method + method_:, + # The phone number used for sending the Authorization Challenge. Present only when + # the challenge method is `SMS`. phone_number:, # The status of the Authorization Challenge # # - `COMPLETED` - Challenge was successfully completed by the cardholder + # - `DECLINED` - Challenge was declined by the cardholder # - `PENDING` - Challenge is still open # - `EXPIRED` - Challenge has expired without being completed # - `ERROR` - There was an error processing the challenge @@ -1435,7 +1457,9 @@ module Lithic sig do override.returns( { - phone_number: String, + method_: + Lithic::CardAuthorization::LatestChallenge::Method::TaggedSymbol, + phone_number: T.nilable(String), status: Lithic::CardAuthorization::LatestChallenge::Status::TaggedSymbol, completed_at: Time @@ -1445,9 +1469,45 @@ module Lithic def to_hash end + # The method used to deliver the challenge to the cardholder + # + # - `SMS` - Challenge was delivered via SMS + # - `OUT_OF_BAND` - Challenge was delivered via an out-of-band method + module Method + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::CardAuthorization::LatestChallenge::Method) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + SMS = + T.let( + :SMS, + Lithic::CardAuthorization::LatestChallenge::Method::TaggedSymbol + ) + OUT_OF_BAND = + T.let( + :OUT_OF_BAND, + Lithic::CardAuthorization::LatestChallenge::Method::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::CardAuthorization::LatestChallenge::Method::TaggedSymbol + ] + ) + end + def self.values + end + end + # The status of the Authorization Challenge # # - `COMPLETED` - Challenge was successfully completed by the cardholder + # - `DECLINED` - Challenge was declined by the cardholder # - `PENDING` - Challenge is still open # - `EXPIRED` - Challenge has expired without being completed # - `ERROR` - There was an error processing the challenge @@ -1465,6 +1525,11 @@ module Lithic :COMPLETED, Lithic::CardAuthorization::LatestChallenge::Status::TaggedSymbol ) + DECLINED = + T.let( + :DECLINED, + Lithic::CardAuthorization::LatestChallenge::Status::TaggedSymbol + ) PENDING = T.let( :PENDING, diff --git a/rbi/lithic/models/card_authorization_challenge_response_webhook_event.rbi b/rbi/lithic/models/card_authorization_challenge_response_webhook_event.rbi index 7cd5bcd2..9d109077 100644 --- a/rbi/lithic/models/card_authorization_challenge_response_webhook_event.rbi +++ b/rbi/lithic/models/card_authorization_challenge_response_webhook_event.rbi @@ -124,6 +124,11 @@ module Lithic :SMS, Lithic::CardAuthorizationChallengeResponseWebhookEvent::ChallengeMethod::TaggedSymbol ) + OUT_OF_BAND = + T.let( + :OUT_OF_BAND, + Lithic::CardAuthorizationChallengeResponseWebhookEvent::ChallengeMethod::TaggedSymbol + ) sig do override.returns( diff --git a/rbi/lithic/models/event.rbi b/rbi/lithic/models/event.rbi index c0d51519..c203e23a 100644 --- a/rbi/lithic/models/event.rbi +++ b/rbi/lithic/models/event.rbi @@ -33,8 +33,8 @@ module Lithic # during card authorization. The card program should issue its own challenge to # the cardholder and then respond via # [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge). - # - card_authorization.challenge_response: Occurs when a cardholder responds to an - # SMS challenge during card authorization. + # - card_authorization.challenge_response: Occurs when a cardholder responds to a + # challenge during card authorization. # - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial # data is processed for a transaction event. # - card_transaction.enhanced_data.updated: Occurs when L2/L3 enhanced commercial @@ -159,8 +159,8 @@ module Lithic # during card authorization. The card program should issue its own challenge to # the cardholder and then respond via # [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge). - # - card_authorization.challenge_response: Occurs when a cardholder responds to an - # SMS challenge during card authorization. + # - card_authorization.challenge_response: Occurs when a cardholder responds to a + # challenge during card authorization. # - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial # data is processed for a transaction event. # - card_transaction.enhanced_data.updated: Occurs when L2/L3 enhanced commercial @@ -281,8 +281,8 @@ module Lithic # during card authorization. The card program should issue its own challenge to # the cardholder and then respond via # [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge). - # - card_authorization.challenge_response: Occurs when a cardholder responds to an - # SMS challenge during card authorization. + # - card_authorization.challenge_response: Occurs when a cardholder responds to a + # challenge during card authorization. # - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial # data is processed for a transaction event. # - card_transaction.enhanced_data.updated: Occurs when L2/L3 enhanced commercial diff --git a/rbi/lithic/models/event_list_params.rbi b/rbi/lithic/models/event_list_params.rbi index 62743808..17c89e05 100644 --- a/rbi/lithic/models/event_list_params.rbi +++ b/rbi/lithic/models/event_list_params.rbi @@ -142,8 +142,8 @@ module Lithic # during card authorization. The card program should issue its own challenge to # the cardholder and then respond via # [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge). - # - card_authorization.challenge_response: Occurs when a cardholder responds to an - # SMS challenge during card authorization. + # - card_authorization.challenge_response: Occurs when a cardholder responds to a + # challenge during card authorization. # - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial # data is processed for a transaction event. # - card_transaction.enhanced_data.updated: Occurs when L2/L3 enhanced commercial diff --git a/rbi/lithic/models/event_subscription.rbi b/rbi/lithic/models/event_subscription.rbi index 6301977f..dd729079 100644 --- a/rbi/lithic/models/event_subscription.rbi +++ b/rbi/lithic/models/event_subscription.rbi @@ -90,8 +90,8 @@ module Lithic # during card authorization. The card program should issue its own challenge to # the cardholder and then respond via # [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge). - # - card_authorization.challenge_response: Occurs when a cardholder responds to an - # SMS challenge during card authorization. + # - card_authorization.challenge_response: Occurs when a cardholder responds to a + # challenge during card authorization. # - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial # data is processed for a transaction event. # - card_transaction.enhanced_data.updated: Occurs when L2/L3 enhanced commercial diff --git a/rbi/lithic/models/events/subscription_create_params.rbi b/rbi/lithic/models/events/subscription_create_params.rbi index 6f525ac4..c5c4510b 100644 --- a/rbi/lithic/models/events/subscription_create_params.rbi +++ b/rbi/lithic/models/events/subscription_create_params.rbi @@ -117,8 +117,8 @@ module Lithic # during card authorization. The card program should issue its own challenge to # the cardholder and then respond via # [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge). - # - card_authorization.challenge_response: Occurs when a cardholder responds to an - # SMS challenge during card authorization. + # - card_authorization.challenge_response: Occurs when a cardholder responds to a + # challenge during card authorization. # - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial # data is processed for a transaction event. # - card_transaction.enhanced_data.updated: Occurs when L2/L3 enhanced commercial diff --git a/rbi/lithic/models/events/subscription_update_params.rbi b/rbi/lithic/models/events/subscription_update_params.rbi index f13cb95a..f978ae67 100644 --- a/rbi/lithic/models/events/subscription_update_params.rbi +++ b/rbi/lithic/models/events/subscription_update_params.rbi @@ -123,8 +123,8 @@ module Lithic # during card authorization. The card program should issue its own challenge to # the cardholder and then respond via # [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge). - # - card_authorization.challenge_response: Occurs when a cardholder responds to an - # SMS challenge during card authorization. + # - card_authorization.challenge_response: Occurs when a cardholder responds to a + # challenge during card authorization. # - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial # data is processed for a transaction event. # - card_transaction.enhanced_data.updated: Occurs when L2/L3 enhanced commercial diff --git a/sig/lithic/models/card_authorization.rbs b/sig/lithic/models/card_authorization.rbs index 01d09050..948ebba7 100644 --- a/sig/lithic/models/card_authorization.rbs +++ b/sig/lithic/models/card_authorization.rbs @@ -588,13 +588,16 @@ module Lithic type latest_challenge = { - phone_number: String, + method_: Lithic::Models::CardAuthorization::LatestChallenge::method_, + phone_number: String?, status: Lithic::Models::CardAuthorization::LatestChallenge::status, completed_at: Time } class LatestChallenge < Lithic::Internal::Type::BaseModel - attr_accessor phone_number: String + attr_accessor method_: Lithic::Models::CardAuthorization::LatestChallenge::method_ + + attr_accessor phone_number: String? attr_accessor status: Lithic::Models::CardAuthorization::LatestChallenge::status @@ -603,23 +606,37 @@ module Lithic def completed_at=: (Time) -> Time def initialize: ( - phone_number: String, + method_: Lithic::Models::CardAuthorization::LatestChallenge::method_, + phone_number: String?, status: Lithic::Models::CardAuthorization::LatestChallenge::status, ?completed_at: Time ) -> void def to_hash: -> { - phone_number: String, + method_: Lithic::Models::CardAuthorization::LatestChallenge::method_, + phone_number: String?, status: Lithic::Models::CardAuthorization::LatestChallenge::status, completed_at: Time } - type status = :COMPLETED | :PENDING | :EXPIRED | :ERROR + type method_ = :SMS | :OUT_OF_BAND + + module Method + extend Lithic::Internal::Type::Enum + + SMS: :SMS + OUT_OF_BAND: :OUT_OF_BAND + + def self?.values: -> ::Array[Lithic::Models::CardAuthorization::LatestChallenge::method_] + end + + type status = :COMPLETED | :DECLINED | :PENDING | :EXPIRED | :ERROR module Status extend Lithic::Internal::Type::Enum COMPLETED: :COMPLETED + DECLINED: :DECLINED PENDING: :PENDING EXPIRED: :EXPIRED ERROR: :ERROR diff --git a/sig/lithic/models/card_authorization_challenge_response_webhook_event.rbs b/sig/lithic/models/card_authorization_challenge_response_webhook_event.rbs index ab9d91b3..2d43f57a 100644 --- a/sig/lithic/models/card_authorization_challenge_response_webhook_event.rbs +++ b/sig/lithic/models/card_authorization_challenge_response_webhook_event.rbs @@ -51,12 +51,13 @@ module Lithic transaction_token: String? } - type challenge_method = :SMS + type challenge_method = :SMS | :OUT_OF_BAND module ChallengeMethod extend Lithic::Internal::Type::Enum SMS: :SMS + OUT_OF_BAND: :OUT_OF_BAND def self?.values: -> ::Array[Lithic::Models::CardAuthorizationChallengeResponseWebhookEvent::challenge_method] end From 751f176d6bd4a895c00edce99cb22055001c5597 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 20 May 2026 21:03:27 +0000 Subject: [PATCH 09/14] feat(api): add INVALID_PAN value to TokenizationDeclineReason enum --- .stats.yml | 4 ++-- lib/lithic/models/tokenization_decline_reason.rb | 1 + rbi/lithic/models/tokenization_decline_reason.rbi | 2 ++ sig/lithic/models/tokenization_decline_reason.rbs | 2 ++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 61f89072..d040d276 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 194 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-9350b3c0a9a4fc31e1cac88e705f1ac6895108360ba8f7845a8da20db825f82e.yml -openapi_spec_hash: c99714470f6321912e8022434a861897 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-c2235aace63c72401c7a2830da84bf7b5ab4006916595790243e23d9d7aa6727.yml +openapi_spec_hash: 6ba55a7b55799ac4a311043a0f21d7ac config_hash: 1c5c139a2aa0d1d45c063f953a9bc803 diff --git a/lib/lithic/models/tokenization_decline_reason.rb b/lib/lithic/models/tokenization_decline_reason.rb index 301800cd..7382c120 100644 --- a/lib/lithic/models/tokenization_decline_reason.rb +++ b/lib/lithic/models/tokenization_decline_reason.rb @@ -19,6 +19,7 @@ module TokenizationDeclineReason NETWORK_FAILURE = :NETWORK_FAILURE GENERIC_DECLINE = :GENERIC_DECLINE DIGITAL_CARD_ART_REQUIRED = :DIGITAL_CARD_ART_REQUIRED + INVALID_PAN = :INVALID_PAN # @!method self.values # @return [Array] diff --git a/rbi/lithic/models/tokenization_decline_reason.rbi b/rbi/lithic/models/tokenization_decline_reason.rbi index 80735deb..263802b0 100644 --- a/rbi/lithic/models/tokenization_decline_reason.rbi +++ b/rbi/lithic/models/tokenization_decline_reason.rbi @@ -60,6 +60,8 @@ module Lithic :DIGITAL_CARD_ART_REQUIRED, Lithic::TokenizationDeclineReason::TaggedSymbol ) + INVALID_PAN = + T.let(:INVALID_PAN, Lithic::TokenizationDeclineReason::TaggedSymbol) sig do override.returns( diff --git a/sig/lithic/models/tokenization_decline_reason.rbs b/sig/lithic/models/tokenization_decline_reason.rbs index d4f5d7d5..a4fcd594 100644 --- a/sig/lithic/models/tokenization_decline_reason.rbs +++ b/sig/lithic/models/tokenization_decline_reason.rbs @@ -14,6 +14,7 @@ module Lithic | :NETWORK_FAILURE | :GENERIC_DECLINE | :DIGITAL_CARD_ART_REQUIRED + | :INVALID_PAN module TokenizationDeclineReason extend Lithic::Internal::Type::Enum @@ -31,6 +32,7 @@ module Lithic NETWORK_FAILURE: :NETWORK_FAILURE GENERIC_DECLINE: :GENERIC_DECLINE DIGITAL_CARD_ART_REQUIRED: :DIGITAL_CARD_ART_REQUIRED + INVALID_PAN: :INVALID_PAN def self?.values: -> ::Array[Lithic::Models::tokenization_decline_reason] end From 89ded5fe6729b1e0db8cb280e1da402b9a1a01b8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 21 May 2026 21:15:25 +0000 Subject: [PATCH 10/14] fix(types): make cardholder_currency nullable in CardProgram --- .stats.yml | 4 ++-- lib/lithic/models/card_program.rb | 4 ++-- rbi/lithic/models/card_program.rbi | 9 +++------ sig/lithic/models/card_program.rbs | 10 ++++------ 4 files changed, 11 insertions(+), 16 deletions(-) diff --git a/.stats.yml b/.stats.yml index d040d276..56dac323 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 194 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-c2235aace63c72401c7a2830da84bf7b5ab4006916595790243e23d9d7aa6727.yml -openapi_spec_hash: 6ba55a7b55799ac4a311043a0f21d7ac +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-659808bfd15f4eafd418ec0db871b22be857ca94f771c9539792ecda2d2d0dbe.yml +openapi_spec_hash: e870e6403121ac3bbd1667deec6788de config_hash: 1c5c139a2aa0d1d45c063f953a9bc803 diff --git a/lib/lithic/models/card_program.rb b/lib/lithic/models/card_program.rb index df7a8d80..098bebb9 100644 --- a/lib/lithic/models/card_program.rb +++ b/lib/lithic/models/card_program.rb @@ -45,7 +45,7 @@ class CardProgram < Lithic::Internal::Type::BaseModel # 3-character alphabetic ISO 4217 code for the currency of the cardholder. # # @return [String, nil] - optional :cardholder_currency, String + optional :cardholder_currency, String, nil?: true # @!attribute settlement_currencies # List of 3-character alphabetic ISO 4217 codes for the currencies that the card @@ -70,7 +70,7 @@ class CardProgram < Lithic::Internal::Type::BaseModel # # @param pan_range_start [String] The first digits of the card number that this card program starts with. # - # @param cardholder_currency [String] 3-character alphabetic ISO 4217 code for the currency of the cardholder. + # @param cardholder_currency [String, nil] 3-character alphabetic ISO 4217 code for the currency of the cardholder. # # @param settlement_currencies [Array] List of 3-character alphabetic ISO 4217 codes for the currencies that the card p end diff --git a/rbi/lithic/models/card_program.rbi b/rbi/lithic/models/card_program.rbi index 1677631d..32800d73 100644 --- a/rbi/lithic/models/card_program.rbi +++ b/rbi/lithic/models/card_program.rbi @@ -33,10 +33,7 @@ module Lithic # 3-character alphabetic ISO 4217 code for the currency of the cardholder. sig { returns(T.nilable(String)) } - attr_reader :cardholder_currency - - sig { params(cardholder_currency: String).void } - attr_writer :cardholder_currency + attr_accessor :cardholder_currency # List of 3-character alphabetic ISO 4217 codes for the currencies that the card # program supports for settlement. @@ -54,7 +51,7 @@ module Lithic name: String, pan_range_end: String, pan_range_start: String, - cardholder_currency: String, + cardholder_currency: T.nilable(String), settlement_currencies: T::Array[String] ).returns(T.attached_class) end @@ -89,7 +86,7 @@ module Lithic name: String, pan_range_end: String, pan_range_start: String, - cardholder_currency: String, + cardholder_currency: T.nilable(String), settlement_currencies: T::Array[String] } ) diff --git a/sig/lithic/models/card_program.rbs b/sig/lithic/models/card_program.rbs index a61ba1e3..96b832a6 100644 --- a/sig/lithic/models/card_program.rbs +++ b/sig/lithic/models/card_program.rbs @@ -8,7 +8,7 @@ module Lithic name: String, pan_range_end: String, pan_range_start: String, - cardholder_currency: String, + cardholder_currency: String?, settlement_currencies: ::Array[String] } @@ -25,9 +25,7 @@ module Lithic attr_accessor pan_range_start: String - attr_reader cardholder_currency: String? - - def cardholder_currency=: (String) -> String + attr_accessor cardholder_currency: String? attr_reader settlement_currencies: ::Array[String]? @@ -40,7 +38,7 @@ module Lithic name: String, pan_range_end: String, pan_range_start: String, - ?cardholder_currency: String, + ?cardholder_currency: String?, ?settlement_currencies: ::Array[String] ) -> void @@ -51,7 +49,7 @@ module Lithic name: String, pan_range_end: String, pan_range_start: String, - cardholder_currency: String, + cardholder_currency: String?, settlement_currencies: ::Array[String] } end From 6259d4fa0c42b77ce2f7abe4962c64ca9eb53117 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 22 May 2026 15:03:04 +0000 Subject: [PATCH 11/14] fix(types): make fields nullable across balance/statement/settlement/etc, add enum values --- .stats.yml | 4 +- lib/lithic/models/balance.rb | 14 +-- .../models/financial_accounts/statement.rb | 8 +- .../statements/statement_line_items.rb | 5 +- lib/lithic/models/financial_event.rb | 1 + lib/lithic/models/settlement_detail.rb | 28 +++--- lib/lithic/models/statement_totals.rb | 12 +-- lib/lithic/models/transaction.rb | 4 +- lib/lithic/models/transfer_limits_response.rb | 24 ++--- rbi/lithic/models/balance.rbi | 18 ++-- .../models/financial_accounts/statement.rbi | 18 ++-- .../statements/statement_line_items.rbi | 14 +-- rbi/lithic/models/financial_event.rbi | 2 + rbi/lithic/models/settlement_detail.rbi | 30 +++--- rbi/lithic/models/statement_totals.rbi | 27 ++---- rbi/lithic/models/transaction.rbi | 6 +- .../models/transfer_limits_response.rbi | 96 +++++++++---------- sig/lithic/models/balance.rbs | 26 +++-- .../models/financial_accounts/statement.rbs | 20 ++-- .../statements/statement_line_items.rbs | 12 +-- sig/lithic/models/financial_event.rbs | 2 + sig/lithic/models/settlement_detail.rbs | 36 +++---- sig/lithic/models/statement_totals.rbs | 30 +++--- sig/lithic/models/transaction.rbs | 12 +-- .../models/transfer_limits_response.rbs | 60 +++++------- test/lithic/resources/balances_test.rb | 4 +- .../resources/reports/settlement_test.rb | 8 +- 27 files changed, 252 insertions(+), 269 deletions(-) diff --git a/.stats.yml b/.stats.yml index 56dac323..d1b7817f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 194 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-659808bfd15f4eafd418ec0db871b22be857ca94f771c9539792ecda2d2d0dbe.yml -openapi_spec_hash: e870e6403121ac3bbd1667deec6788de +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-89ce5b3ff634397bdfc05a63d3103b9c767726dfc6b042883d220d08d4156c99.yml +openapi_spec_hash: 867ab9ab196ad28740f46ec4e7bf7aba config_hash: 1c5c139a2aa0d1d45c063f953a9bc803 diff --git a/lib/lithic/models/balance.rb b/lib/lithic/models/balance.rb index 1006c9c7..ce561c2c 100644 --- a/lib/lithic/models/balance.rb +++ b/lib/lithic/models/balance.rb @@ -38,15 +38,15 @@ class Balance < Lithic::Internal::Type::BaseModel # Globally unique identifier for the last financial transaction event that # impacted this balance. # - # @return [String] - required :last_transaction_event_token, String + # @return [String, nil] + required :last_transaction_event_token, String, nil?: true # @!attribute last_transaction_token # Globally unique identifier for the last financial transaction that impacted this # balance. # - # @return [String] - required :last_transaction_token, String + # @return [String, nil] + required :last_transaction_token, String, nil?: true # @!attribute pending_amount # Funds not available for spend due to card authorizations or pending ACH release. @@ -84,9 +84,9 @@ class Balance < Lithic::Internal::Type::BaseModel # # @param financial_account_type [Symbol, Lithic::Models::Balance::FinancialAccountType] Type of financial account. # - # @param last_transaction_event_token [String] Globally unique identifier for the last financial transaction event that impacte + # @param last_transaction_event_token [String, nil] Globally unique identifier for the last financial transaction event that impacte # - # @param last_transaction_token [String] Globally unique identifier for the last financial transaction that impacted this + # @param last_transaction_token [String, nil] Globally unique identifier for the last financial transaction that impacted this # # @param pending_amount [Integer] Funds not available for spend due to card authorizations or pending ACH release. # @@ -100,8 +100,10 @@ class Balance < Lithic::Internal::Type::BaseModel module FinancialAccountType extend Lithic::Internal::Type::Enum + CARD = :CARD ISSUING = :ISSUING OPERATING = :OPERATING + PROGRAM_RECEIVABLES = :PROGRAM_RECEIVABLES RESERVE = :RESERVE SECURITY = :SECURITY diff --git a/lib/lithic/models/financial_accounts/statement.rb b/lib/lithic/models/financial_accounts/statement.rb index 36217b63..6f561aba 100644 --- a/lib/lithic/models/financial_accounts/statement.rb +++ b/lib/lithic/models/financial_accounts/statement.rb @@ -118,13 +118,13 @@ class Statement < Lithic::Internal::Type::BaseModel # Date when the next payment is due # # @return [Date, nil] - optional :next_payment_due_date, Date + optional :next_payment_due_date, Date, nil?: true # @!attribute next_statement_end_date # Date when the next billing period will end # # @return [Date, nil] - optional :next_statement_end_date, Date + optional :next_statement_end_date, Date, nil?: true # @!attribute payoff_details # Details on number and size of payments to pay off balance @@ -179,9 +179,9 @@ class Statement < Lithic::Internal::Type::BaseModel # # @param interest_details [Lithic::Models::FinancialAccounts::Statement::InterestDetails, nil] # - # @param next_payment_due_date [Date] Date when the next payment is due + # @param next_payment_due_date [Date, nil] Date when the next payment is due # - # @param next_statement_end_date [Date] Date when the next billing period will end + # @param next_statement_end_date [Date, nil] Date when the next billing period will end # # @param payoff_details [Lithic::Models::FinancialAccounts::Statement::PayoffDetails, nil] Details on number and size of payments to pay off balance # diff --git a/lib/lithic/models/financial_accounts/statements/statement_line_items.rb b/lib/lithic/models/financial_accounts/statements/statement_line_items.rb index c4781667..e41c8987 100644 --- a/lib/lithic/models/financial_accounts/statements/statement_line_items.rb +++ b/lib/lithic/models/financial_accounts/statements/statement_line_items.rb @@ -88,7 +88,7 @@ class Data < Lithic::Internal::Type::BaseModel # Globally unique identifier for a card # # @return [String, nil] - optional :card_token, String + optional :card_token, String, nil?: true # @!attribute descriptor # @@ -132,7 +132,7 @@ class Data < Lithic::Internal::Type::BaseModel # # @param financial_transaction_token [String] Globally unique identifier for a financial transaction # - # @param card_token [String] Globally unique identifier for a card + # @param card_token [String, nil] Globally unique identifier for a card # # @param descriptor [String] # @@ -266,6 +266,7 @@ module EventType QUARTERLY_REVERSAL = :QUARTERLY_REVERSAL MONTHLY = :MONTHLY MONTHLY_REVERSAL = :MONTHLY_REVERSAL + ACCOUNT_TO_ACCOUNT = :ACCOUNT_TO_ACCOUNT # @!method self.values # @return [Array] diff --git a/lib/lithic/models/financial_event.rb b/lib/lithic/models/financial_event.rb index e4f59f05..0e7fc6ab 100644 --- a/lib/lithic/models/financial_event.rb +++ b/lib/lithic/models/financial_event.rb @@ -155,6 +155,7 @@ module Type QUARTERLY_REVERSAL = :QUARTERLY_REVERSAL MONTHLY = :MONTHLY MONTHLY_REVERSAL = :MONTHLY_REVERSAL + ACCOUNT_TO_ACCOUNT = :ACCOUNT_TO_ACCOUNT # @!method self.values # @return [Array] diff --git a/lib/lithic/models/settlement_detail.rb b/lib/lithic/models/settlement_detail.rb index 1d504460..58aebaa6 100644 --- a/lib/lithic/models/settlement_detail.rb +++ b/lib/lithic/models/settlement_detail.rb @@ -13,22 +13,22 @@ class SettlementDetail < Lithic::Internal::Type::BaseModel # Globally unique identifier denoting the account that the associated transaction # occurred on. # - # @return [String] - required :account_token, String + # @return [String, nil] + required :account_token, String, nil?: true # @!attribute card_program_token # Globally unique identifier denoting the card program that the associated # transaction occurred on. # - # @return [String] - required :card_program_token, String + # @return [String, nil] + required :card_program_token, String, nil?: true # @!attribute card_token # Globally unique identifier denoting the card that the associated transaction # occurred on. # - # @return [String] - required :card_token, String + # @return [String, nil] + required :card_token, String, nil?: true # @!attribute created # Date and time when the transaction first occurred. UTC time zone. @@ -108,14 +108,14 @@ class SettlementDetail < Lithic::Internal::Type::BaseModel # @!attribute transaction_token # Globally unique identifier denoting the associated transaction. For settlement - # records with type `CLEARING`, `FINANCIAL`, or `NON-FINANCIAL`, this references a + # records with type `CLEARING`, `FINANCIAL`, or `NON_FINANCIAL`, this references a # card transaction token. For settlement records with type `CHARGEBACK`, # `REPRESENTMENT`, `PREARBITRATION`, `ARBITRATION`, or `COLLABORATION`, this # references the dispute transaction token. May be null for certain settlement # types. # - # @return [String] - required :transaction_token, String + # @return [String, nil] + required :transaction_token, String, nil?: true # @!attribute transactions_gross_amount # The total amount of settlement impacting transactions (excluding interchange, @@ -148,11 +148,11 @@ class SettlementDetail < Lithic::Internal::Type::BaseModel # # @param token [String] Globally unique identifier denoting the Settlement Detail. # - # @param account_token [String] Globally unique identifier denoting the account that the associated transaction + # @param account_token [String, nil] Globally unique identifier denoting the account that the associated transaction # - # @param card_program_token [String] Globally unique identifier denoting the card program that the associated transac + # @param card_program_token [String, nil] Globally unique identifier denoting the card program that the associated transac # - # @param card_token [String] Globally unique identifier denoting the card that the associated transaction occ + # @param card_token [String, nil] Globally unique identifier denoting the card that the associated transaction occ # # @param created [Time] Date and time when the transaction first occurred. UTC time zone. # @@ -178,7 +178,7 @@ class SettlementDetail < Lithic::Internal::Type::BaseModel # # @param settlement_date [String] Date of when money movement is triggered for the transaction. One exception appl # - # @param transaction_token [String] Globally unique identifier denoting the associated transaction. For settlement r + # @param transaction_token [String, nil] Globally unique identifier denoting the associated transaction. For settlement r # # @param transactions_gross_amount [Integer] The total amount of settlement impacting transactions (excluding interchange, fe # @@ -231,7 +231,7 @@ module Type COLLABORATION = :COLLABORATION FEE = :FEE FINANCIAL = :FINANCIAL - NON_FINANCIAL = :"NON-FINANCIAL" + NON_FINANCIAL = :NON_FINANCIAL PREARBITRATION = :PREARBITRATION REPRESENTMENT = :REPRESENTMENT diff --git a/lib/lithic/models/statement_totals.rb b/lib/lithic/models/statement_totals.rb index e53aec64..fdea1618 100644 --- a/lib/lithic/models/statement_totals.rb +++ b/lib/lithic/models/statement_totals.rb @@ -56,19 +56,19 @@ class StatementTotals < Lithic::Internal::Type::BaseModel # Breakdown of credits # # @return [Object, nil] - optional :credit_details, Lithic::Internal::Type::Unknown + optional :credit_details, Lithic::Internal::Type::Unknown, nil?: true # @!attribute debit_details # Breakdown of debits # # @return [Object, nil] - optional :debit_details, Lithic::Internal::Type::Unknown + optional :debit_details, Lithic::Internal::Type::Unknown, nil?: true # @!attribute payment_details # Breakdown of payments # # @return [Object, nil] - optional :payment_details, Lithic::Internal::Type::Unknown + optional :payment_details, Lithic::Internal::Type::Unknown, nil?: true # @!method initialize(balance_transfers:, cash_advances:, credits:, debits:, fees:, interest:, payments:, purchases:, credit_details: nil, debit_details: nil, payment_details: nil) # Some parameter documentations has been truncated, see @@ -90,11 +90,11 @@ class StatementTotals < Lithic::Internal::Type::BaseModel # # @param purchases [Integer] Net card transaction volume less any cash advances in cents # - # @param credit_details [Object] Breakdown of credits + # @param credit_details [Object, nil] Breakdown of credits # - # @param debit_details [Object] Breakdown of debits + # @param debit_details [Object, nil] Breakdown of debits # - # @param payment_details [Object] Breakdown of payments + # @param payment_details [Object, nil] Breakdown of payments end end end diff --git a/lib/lithic/models/transaction.rb b/lib/lithic/models/transaction.rb index cdedd883..428527c0 100644 --- a/lib/lithic/models/transaction.rb +++ b/lib/lithic/models/transaction.rb @@ -874,7 +874,7 @@ class Event < Lithic::Internal::Type::BaseModel # @!attribute network_specific_data # # @return [Lithic::Models::Transaction::Event::NetworkSpecificData, nil] - optional :network_specific_data, -> { Lithic::Transaction::Event::NetworkSpecificData } + optional :network_specific_data, -> { Lithic::Transaction::Event::NetworkSpecificData }, nil?: true # @!method initialize(token:, amount:, amounts:, created:, detailed_results:, effective_polarity:, network_info:, result:, rule_results:, type:, account_type: nil, network_specific_data: nil) # Some parameter documentations has been truncated, see @@ -902,7 +902,7 @@ class Event < Lithic::Internal::Type::BaseModel # # @param account_type [Symbol, Lithic::Models::Transaction::Event::AccountType] # - # @param network_specific_data [Lithic::Models::Transaction::Event::NetworkSpecificData] + # @param network_specific_data [Lithic::Models::Transaction::Event::NetworkSpecificData, nil] # @see Lithic::Models::Transaction::Event#amounts class Amounts < Lithic::Internal::Type::BaseModel diff --git a/lib/lithic/models/transfer_limits_response.rb b/lib/lithic/models/transfer_limits_response.rb index a8899eaf..1bf5ea8e 100644 --- a/lib/lithic/models/transfer_limits_response.rb +++ b/lib/lithic/models/transfer_limits_response.rb @@ -104,14 +104,14 @@ class Credit < Lithic::Internal::Type::BaseModel # Amount originated towards limit # # @return [Integer, nil] - optional :amount_originated, Integer + optional :amount_originated, Integer, nil?: true # @!method initialize(limit:, amount_originated: nil) # Credit limits # # @param limit [Integer] The limit amount # - # @param amount_originated [Integer] Amount originated towards limit + # @param amount_originated [Integer, nil] Amount originated towards limit end # @see Lithic::Models::TransferLimitsResponse::Data::DailyLimit#debit @@ -126,14 +126,14 @@ class Debit < Lithic::Internal::Type::BaseModel # Amount originated towards limit # # @return [Integer, nil] - optional :amount_originated, Integer + optional :amount_originated, Integer, nil?: true # @!method initialize(limit:, amount_originated: nil) # Debit limits # # @param limit [Integer] The limit amount # - # @param amount_originated [Integer] Amount originated towards limit + # @param amount_originated [Integer, nil] Amount originated towards limit end end @@ -170,14 +170,14 @@ class Credit < Lithic::Internal::Type::BaseModel # Amount originated towards limit # # @return [Integer, nil] - optional :amount_originated, Integer + optional :amount_originated, Integer, nil?: true # @!method initialize(limit:, amount_originated: nil) # Credit limits # # @param limit [Integer] The limit amount # - # @param amount_originated [Integer] Amount originated towards limit + # @param amount_originated [Integer, nil] Amount originated towards limit end # @see Lithic::Models::TransferLimitsResponse::Data::MonthlyLimit#debit @@ -192,14 +192,14 @@ class Debit < Lithic::Internal::Type::BaseModel # Amount originated towards limit # # @return [Integer, nil] - optional :amount_originated, Integer + optional :amount_originated, Integer, nil?: true # @!method initialize(limit:, amount_originated: nil) # Debit limits # # @param limit [Integer] The limit amount # - # @param amount_originated [Integer] Amount originated towards limit + # @param amount_originated [Integer, nil] Amount originated towards limit end end @@ -236,14 +236,14 @@ class Credit < Lithic::Internal::Type::BaseModel # Amount originated towards limit # # @return [Integer, nil] - optional :amount_originated, Integer + optional :amount_originated, Integer, nil?: true # @!method initialize(limit:, amount_originated: nil) # Credit limits # # @param limit [Integer] The limit amount # - # @param amount_originated [Integer] Amount originated towards limit + # @param amount_originated [Integer, nil] Amount originated towards limit end # @see Lithic::Models::TransferLimitsResponse::Data::ProgramLimitPerTransaction#debit @@ -258,14 +258,14 @@ class Debit < Lithic::Internal::Type::BaseModel # Amount originated towards limit # # @return [Integer, nil] - optional :amount_originated, Integer + optional :amount_originated, Integer, nil?: true # @!method initialize(limit:, amount_originated: nil) # Debit limits # # @param limit [Integer] The limit amount # - # @param amount_originated [Integer] Amount originated towards limit + # @param amount_originated [Integer, nil] Amount originated towards limit end end end diff --git a/rbi/lithic/models/balance.rbi b/rbi/lithic/models/balance.rbi index 861af648..f444fbc7 100644 --- a/rbi/lithic/models/balance.rbi +++ b/rbi/lithic/models/balance.rbi @@ -28,12 +28,12 @@ module Lithic # Globally unique identifier for the last financial transaction event that # impacted this balance. - sig { returns(String) } + sig { returns(T.nilable(String)) } attr_accessor :last_transaction_event_token # Globally unique identifier for the last financial transaction that impacted this # balance. - sig { returns(String) } + sig { returns(T.nilable(String)) } attr_accessor :last_transaction_token # Funds not available for spend due to card authorizations or pending ACH release. @@ -59,8 +59,8 @@ module Lithic financial_account_token: String, financial_account_type: Lithic::Balance::FinancialAccountType::OrSymbol, - last_transaction_event_token: String, - last_transaction_token: String, + last_transaction_event_token: T.nilable(String), + last_transaction_token: T.nilable(String), pending_amount: Integer, total_amount: Integer, updated: Time @@ -103,8 +103,8 @@ module Lithic financial_account_token: String, financial_account_type: Lithic::Balance::FinancialAccountType::TaggedSymbol, - last_transaction_event_token: String, - last_transaction_token: String, + last_transaction_event_token: T.nilable(String), + last_transaction_token: T.nilable(String), pending_amount: Integer, total_amount: Integer, updated: Time @@ -122,10 +122,16 @@ module Lithic T.type_alias { T.all(Symbol, Lithic::Balance::FinancialAccountType) } OrSymbol = T.type_alias { T.any(Symbol, String) } + CARD = T.let(:CARD, Lithic::Balance::FinancialAccountType::TaggedSymbol) ISSUING = T.let(:ISSUING, Lithic::Balance::FinancialAccountType::TaggedSymbol) OPERATING = T.let(:OPERATING, Lithic::Balance::FinancialAccountType::TaggedSymbol) + PROGRAM_RECEIVABLES = + T.let( + :PROGRAM_RECEIVABLES, + Lithic::Balance::FinancialAccountType::TaggedSymbol + ) RESERVE = T.let(:RESERVE, Lithic::Balance::FinancialAccountType::TaggedSymbol) SECURITY = diff --git a/rbi/lithic/models/financial_accounts/statement.rbi b/rbi/lithic/models/financial_accounts/statement.rbi index 97c7015b..049260ad 100644 --- a/rbi/lithic/models/financial_accounts/statement.rbi +++ b/rbi/lithic/models/financial_accounts/statement.rbi @@ -124,17 +124,11 @@ module Lithic # Date when the next payment is due sig { returns(T.nilable(Date)) } - attr_reader :next_payment_due_date - - sig { params(next_payment_due_date: Date).void } - attr_writer :next_payment_due_date + attr_accessor :next_payment_due_date # Date when the next billing period will end sig { returns(T.nilable(Date)) } - attr_reader :next_statement_end_date - - sig { params(next_statement_end_date: Date).void } - attr_writer :next_statement_end_date + attr_accessor :next_statement_end_date # Details on number and size of payments to pay off balance sig do @@ -186,8 +180,8 @@ module Lithic T.nilable( Lithic::FinancialAccounts::Statement::InterestDetails::OrHash ), - next_payment_due_date: Date, - next_statement_end_date: Date, + next_payment_due_date: T.nilable(Date), + next_statement_end_date: T.nilable(Date), payoff_details: T.nilable( Lithic::FinancialAccounts::Statement::PayoffDetails::OrHash @@ -266,8 +260,8 @@ module Lithic T.nilable( Lithic::FinancialAccounts::Statement::InterestDetails ), - next_payment_due_date: Date, - next_statement_end_date: Date, + next_payment_due_date: T.nilable(Date), + next_statement_end_date: T.nilable(Date), payoff_details: T.nilable(Lithic::FinancialAccounts::Statement::PayoffDetails), statement_totals: Lithic::StatementTotals diff --git a/rbi/lithic/models/financial_accounts/statements/statement_line_items.rbi b/rbi/lithic/models/financial_accounts/statements/statement_line_items.rbi index 353ed223..eedb1ad4 100644 --- a/rbi/lithic/models/financial_accounts/statements/statement_line_items.rbi +++ b/rbi/lithic/models/financial_accounts/statements/statement_line_items.rbi @@ -114,10 +114,7 @@ module Lithic # Globally unique identifier for a card sig { returns(T.nilable(String)) } - attr_reader :card_token - - sig { params(card_token: String).void } - attr_writer :card_token + attr_accessor :card_token sig { returns(T.nilable(String)) } attr_reader :descriptor @@ -147,7 +144,7 @@ module Lithic financial_account_token: String, financial_transaction_event_token: String, financial_transaction_token: String, - card_token: String, + card_token: T.nilable(String), descriptor: String, event_subtype: T.nilable(String), loan_tape_date: T.nilable(Date) @@ -201,7 +198,7 @@ module Lithic financial_account_token: String, financial_transaction_event_token: String, financial_transaction_token: String, - card_token: String, + card_token: T.nilable(String), descriptor: String, event_subtype: T.nilable(String), loan_tape_date: T.nilable(Date) @@ -795,6 +792,11 @@ module Lithic :MONTHLY_REVERSAL, Lithic::FinancialAccounts::Statements::StatementLineItems::Data::EventType::TaggedSymbol ) + ACCOUNT_TO_ACCOUNT = + T.let( + :ACCOUNT_TO_ACCOUNT, + Lithic::FinancialAccounts::Statements::StatementLineItems::Data::EventType::TaggedSymbol + ) sig do override.returns( diff --git a/rbi/lithic/models/financial_event.rbi b/rbi/lithic/models/financial_event.rbi index 5209dd13..8e66532f 100644 --- a/rbi/lithic/models/financial_event.rbi +++ b/rbi/lithic/models/financial_event.rbi @@ -457,6 +457,8 @@ module Lithic MONTHLY = T.let(:MONTHLY, Lithic::FinancialEvent::Type::TaggedSymbol) MONTHLY_REVERSAL = T.let(:MONTHLY_REVERSAL, Lithic::FinancialEvent::Type::TaggedSymbol) + ACCOUNT_TO_ACCOUNT = + T.let(:ACCOUNT_TO_ACCOUNT, Lithic::FinancialEvent::Type::TaggedSymbol) sig do override.returns(T::Array[Lithic::FinancialEvent::Type::TaggedSymbol]) diff --git a/rbi/lithic/models/settlement_detail.rbi b/rbi/lithic/models/settlement_detail.rbi index 1f28c6b4..787d8551 100644 --- a/rbi/lithic/models/settlement_detail.rbi +++ b/rbi/lithic/models/settlement_detail.rbi @@ -14,17 +14,17 @@ module Lithic # Globally unique identifier denoting the account that the associated transaction # occurred on. - sig { returns(String) } + sig { returns(T.nilable(String)) } attr_accessor :account_token # Globally unique identifier denoting the card program that the associated # transaction occurred on. - sig { returns(String) } + sig { returns(T.nilable(String)) } attr_accessor :card_program_token # Globally unique identifier denoting the card that the associated transaction # occurred on. - sig { returns(String) } + sig { returns(T.nilable(String)) } attr_accessor :card_token # Date and time when the transaction first occurred. UTC time zone. @@ -87,12 +87,12 @@ module Lithic attr_accessor :settlement_date # Globally unique identifier denoting the associated transaction. For settlement - # records with type `CLEARING`, `FINANCIAL`, or `NON-FINANCIAL`, this references a + # records with type `CLEARING`, `FINANCIAL`, or `NON_FINANCIAL`, this references a # card transaction token. For settlement records with type `CHARGEBACK`, # `REPRESENTMENT`, `PREARBITRATION`, `ARBITRATION`, or `COLLABORATION`, this # references the dispute transaction token. May be null for certain settlement # types. - sig { returns(String) } + sig { returns(T.nilable(String)) } attr_accessor :transaction_token # The total amount of settlement impacting transactions (excluding interchange, @@ -118,9 +118,9 @@ module Lithic sig do params( token: String, - account_token: String, - card_program_token: String, - card_token: String, + account_token: T.nilable(String), + card_program_token: T.nilable(String), + card_token: T.nilable(String), created: Time, currency: String, disputes_gross_amount: Integer, @@ -134,7 +134,7 @@ module Lithic other_fees_gross_amount: Integer, report_date: String, settlement_date: String, - transaction_token: String, + transaction_token: T.nilable(String), transactions_gross_amount: Integer, type: Lithic::SettlementDetail::Type::OrSymbol, updated: Time, @@ -182,7 +182,7 @@ module Lithic # advisement date, which is distinct from the date of money movement. settlement_date:, # Globally unique identifier denoting the associated transaction. For settlement - # records with type `CLEARING`, `FINANCIAL`, or `NON-FINANCIAL`, this references a + # records with type `CLEARING`, `FINANCIAL`, or `NON_FINANCIAL`, this references a # card transaction token. For settlement records with type `CHARGEBACK`, # `REPRESENTMENT`, `PREARBITRATION`, `ARBITRATION`, or `COLLABORATION`, this # references the dispute transaction token. May be null for certain settlement @@ -204,9 +204,9 @@ module Lithic override.returns( { token: String, - account_token: String, - card_program_token: String, - card_token: String, + account_token: T.nilable(String), + card_program_token: T.nilable(String), + card_token: T.nilable(String), created: Time, currency: String, disputes_gross_amount: Integer, @@ -219,7 +219,7 @@ module Lithic other_fees_gross_amount: Integer, report_date: String, settlement_date: String, - transaction_token: String, + transaction_token: T.nilable(String), transactions_gross_amount: Integer, type: Lithic::SettlementDetail::Type::TaggedSymbol, updated: Time, @@ -305,7 +305,7 @@ module Lithic FINANCIAL = T.let(:FINANCIAL, Lithic::SettlementDetail::Type::TaggedSymbol) NON_FINANCIAL = - T.let(:"NON-FINANCIAL", Lithic::SettlementDetail::Type::TaggedSymbol) + T.let(:NON_FINANCIAL, Lithic::SettlementDetail::Type::TaggedSymbol) PREARBITRATION = T.let(:PREARBITRATION, Lithic::SettlementDetail::Type::TaggedSymbol) REPRESENTMENT = diff --git a/rbi/lithic/models/statement_totals.rbi b/rbi/lithic/models/statement_totals.rbi index a784f027..f722e0cc 100644 --- a/rbi/lithic/models/statement_totals.rbi +++ b/rbi/lithic/models/statement_totals.rbi @@ -43,24 +43,15 @@ module Lithic # Breakdown of credits sig { returns(T.nilable(T.anything)) } - attr_reader :credit_details - - sig { params(credit_details: T.anything).void } - attr_writer :credit_details + attr_accessor :credit_details # Breakdown of debits sig { returns(T.nilable(T.anything)) } - attr_reader :debit_details - - sig { params(debit_details: T.anything).void } - attr_writer :debit_details + attr_accessor :debit_details # Breakdown of payments sig { returns(T.nilable(T.anything)) } - attr_reader :payment_details - - sig { params(payment_details: T.anything).void } - attr_writer :payment_details + attr_accessor :payment_details sig do params( @@ -72,9 +63,9 @@ module Lithic interest: Integer, payments: Integer, purchases: Integer, - credit_details: T.anything, - debit_details: T.anything, - payment_details: T.anything + credit_details: T.nilable(T.anything), + debit_details: T.nilable(T.anything), + payment_details: T.nilable(T.anything) ).returns(T.attached_class) end def self.new( @@ -115,9 +106,9 @@ module Lithic interest: Integer, payments: Integer, purchases: Integer, - credit_details: T.anything, - debit_details: T.anything, - payment_details: T.anything + credit_details: T.nilable(T.anything), + debit_details: T.nilable(T.anything), + payment_details: T.nilable(T.anything) } ) end diff --git a/rbi/lithic/models/transaction.rbi b/rbi/lithic/models/transaction.rbi index 0653cf79..9878c97a 100644 --- a/rbi/lithic/models/transaction.rbi +++ b/rbi/lithic/models/transaction.rbi @@ -1551,7 +1551,7 @@ module Lithic sig do params( network_specific_data: - Lithic::Transaction::Event::NetworkSpecificData::OrHash + T.nilable(Lithic::Transaction::Event::NetworkSpecificData::OrHash) ).void end attr_writer :network_specific_data @@ -1574,7 +1574,7 @@ module Lithic type: Lithic::Transaction::Event::Type::OrSymbol, account_type: Lithic::Transaction::Event::AccountType::OrSymbol, network_specific_data: - Lithic::Transaction::Event::NetworkSpecificData::OrHash + T.nilable(Lithic::Transaction::Event::NetworkSpecificData::OrHash) ).returns(T.attached_class) end def self.new( @@ -1627,7 +1627,7 @@ module Lithic account_type: Lithic::Transaction::Event::AccountType::TaggedSymbol, network_specific_data: - Lithic::Transaction::Event::NetworkSpecificData + T.nilable(Lithic::Transaction::Event::NetworkSpecificData) } ) end diff --git a/rbi/lithic/models/transfer_limits_response.rbi b/rbi/lithic/models/transfer_limits_response.rbi index 53a2d402..871acff0 100644 --- a/rbi/lithic/models/transfer_limits_response.rbi +++ b/rbi/lithic/models/transfer_limits_response.rbi @@ -228,16 +228,14 @@ module Lithic # Amount originated towards limit sig { returns(T.nilable(Integer)) } - attr_reader :amount_originated - - sig { params(amount_originated: Integer).void } - attr_writer :amount_originated + attr_accessor :amount_originated # Credit limits sig do - params(limit: Integer, amount_originated: Integer).returns( - T.attached_class - ) + params( + limit: Integer, + amount_originated: T.nilable(Integer) + ).returns(T.attached_class) end def self.new( # The limit amount @@ -248,7 +246,9 @@ module Lithic end sig do - override.returns({ limit: Integer, amount_originated: Integer }) + override.returns( + { limit: Integer, amount_originated: T.nilable(Integer) } + ) end def to_hash end @@ -269,16 +269,14 @@ module Lithic # Amount originated towards limit sig { returns(T.nilable(Integer)) } - attr_reader :amount_originated - - sig { params(amount_originated: Integer).void } - attr_writer :amount_originated + attr_accessor :amount_originated # Debit limits sig do - params(limit: Integer, amount_originated: Integer).returns( - T.attached_class - ) + params( + limit: Integer, + amount_originated: T.nilable(Integer) + ).returns(T.attached_class) end def self.new( # The limit amount @@ -289,7 +287,9 @@ module Lithic end sig do - override.returns({ limit: Integer, amount_originated: Integer }) + override.returns( + { limit: Integer, amount_originated: T.nilable(Integer) } + ) end def to_hash end @@ -377,16 +377,14 @@ module Lithic # Amount originated towards limit sig { returns(T.nilable(Integer)) } - attr_reader :amount_originated - - sig { params(amount_originated: Integer).void } - attr_writer :amount_originated + attr_accessor :amount_originated # Credit limits sig do - params(limit: Integer, amount_originated: Integer).returns( - T.attached_class - ) + params( + limit: Integer, + amount_originated: T.nilable(Integer) + ).returns(T.attached_class) end def self.new( # The limit amount @@ -397,7 +395,9 @@ module Lithic end sig do - override.returns({ limit: Integer, amount_originated: Integer }) + override.returns( + { limit: Integer, amount_originated: T.nilable(Integer) } + ) end def to_hash end @@ -418,16 +418,14 @@ module Lithic # Amount originated towards limit sig { returns(T.nilable(Integer)) } - attr_reader :amount_originated - - sig { params(amount_originated: Integer).void } - attr_writer :amount_originated + attr_accessor :amount_originated # Debit limits sig do - params(limit: Integer, amount_originated: Integer).returns( - T.attached_class - ) + params( + limit: Integer, + amount_originated: T.nilable(Integer) + ).returns(T.attached_class) end def self.new( # The limit amount @@ -438,7 +436,9 @@ module Lithic end sig do - override.returns({ limit: Integer, amount_originated: Integer }) + override.returns( + { limit: Integer, amount_originated: T.nilable(Integer) } + ) end def to_hash end @@ -531,16 +531,14 @@ module Lithic # Amount originated towards limit sig { returns(T.nilable(Integer)) } - attr_reader :amount_originated - - sig { params(amount_originated: Integer).void } - attr_writer :amount_originated + attr_accessor :amount_originated # Credit limits sig do - params(limit: Integer, amount_originated: Integer).returns( - T.attached_class - ) + params( + limit: Integer, + amount_originated: T.nilable(Integer) + ).returns(T.attached_class) end def self.new( # The limit amount @@ -551,7 +549,9 @@ module Lithic end sig do - override.returns({ limit: Integer, amount_originated: Integer }) + override.returns( + { limit: Integer, amount_originated: T.nilable(Integer) } + ) end def to_hash end @@ -572,16 +572,14 @@ module Lithic # Amount originated towards limit sig { returns(T.nilable(Integer)) } - attr_reader :amount_originated - - sig { params(amount_originated: Integer).void } - attr_writer :amount_originated + attr_accessor :amount_originated # Debit limits sig do - params(limit: Integer, amount_originated: Integer).returns( - T.attached_class - ) + params( + limit: Integer, + amount_originated: T.nilable(Integer) + ).returns(T.attached_class) end def self.new( # The limit amount @@ -592,7 +590,9 @@ module Lithic end sig do - override.returns({ limit: Integer, amount_originated: Integer }) + override.returns( + { limit: Integer, amount_originated: T.nilable(Integer) } + ) end def to_hash end diff --git a/sig/lithic/models/balance.rbs b/sig/lithic/models/balance.rbs index 89c38ca7..c48d0ced 100644 --- a/sig/lithic/models/balance.rbs +++ b/sig/lithic/models/balance.rbs @@ -7,8 +7,8 @@ module Lithic currency: String, financial_account_token: String, financial_account_type: Lithic::Models::Balance::financial_account_type, - last_transaction_event_token: String, - last_transaction_token: String, + last_transaction_event_token: String?, + last_transaction_token: String?, pending_amount: Integer, total_amount: Integer, updated: Time @@ -25,9 +25,9 @@ module Lithic attr_accessor financial_account_type: Lithic::Models::Balance::financial_account_type - attr_accessor last_transaction_event_token: String + attr_accessor last_transaction_event_token: String? - attr_accessor last_transaction_token: String + attr_accessor last_transaction_token: String? attr_accessor pending_amount: Integer @@ -41,8 +41,8 @@ module Lithic currency: String, financial_account_token: String, financial_account_type: Lithic::Models::Balance::financial_account_type, - last_transaction_event_token: String, - last_transaction_token: String, + last_transaction_event_token: String?, + last_transaction_token: String?, pending_amount: Integer, total_amount: Integer, updated: Time @@ -54,20 +54,28 @@ module Lithic currency: String, financial_account_token: String, financial_account_type: Lithic::Models::Balance::financial_account_type, - last_transaction_event_token: String, - last_transaction_token: String, + last_transaction_event_token: String?, + last_transaction_token: String?, pending_amount: Integer, total_amount: Integer, updated: Time } - type financial_account_type = :ISSUING | :OPERATING | :RESERVE | :SECURITY + type financial_account_type = + :CARD + | :ISSUING + | :OPERATING + | :PROGRAM_RECEIVABLES + | :RESERVE + | :SECURITY module FinancialAccountType extend Lithic::Internal::Type::Enum + CARD: :CARD ISSUING: :ISSUING OPERATING: :OPERATING + PROGRAM_RECEIVABLES: :PROGRAM_RECEIVABLES RESERVE: :RESERVE SECURITY: :SECURITY diff --git a/sig/lithic/models/financial_accounts/statement.rbs b/sig/lithic/models/financial_accounts/statement.rbs index 7badd19b..c9376a14 100644 --- a/sig/lithic/models/financial_accounts/statement.rbs +++ b/sig/lithic/models/financial_accounts/statement.rbs @@ -22,8 +22,8 @@ module Lithic updated: Time, ytd_totals: Lithic::StatementTotals, interest_details: Lithic::FinancialAccounts::Statement::InterestDetails?, - next_payment_due_date: Date, - next_statement_end_date: Date, + next_payment_due_date: Date?, + next_statement_end_date: Date?, payoff_details: Lithic::FinancialAccounts::Statement::PayoffDetails?, statement_totals: Lithic::StatementTotals } @@ -67,13 +67,9 @@ module Lithic attr_accessor interest_details: Lithic::FinancialAccounts::Statement::InterestDetails? - attr_reader next_payment_due_date: Date? + attr_accessor next_payment_due_date: Date? - def next_payment_due_date=: (Date) -> Date - - attr_reader next_statement_end_date: Date? - - def next_statement_end_date=: (Date) -> Date + attr_accessor next_statement_end_date: Date? attr_accessor payoff_details: Lithic::FinancialAccounts::Statement::PayoffDetails? @@ -103,8 +99,8 @@ module Lithic updated: Time, ytd_totals: Lithic::StatementTotals, ?interest_details: Lithic::FinancialAccounts::Statement::InterestDetails?, - ?next_payment_due_date: Date, - ?next_statement_end_date: Date, + ?next_payment_due_date: Date?, + ?next_statement_end_date: Date?, ?payoff_details: Lithic::FinancialAccounts::Statement::PayoffDetails?, ?statement_totals: Lithic::StatementTotals ) -> void @@ -129,8 +125,8 @@ module Lithic updated: Time, ytd_totals: Lithic::StatementTotals, interest_details: Lithic::FinancialAccounts::Statement::InterestDetails?, - next_payment_due_date: Date, - next_statement_end_date: Date, + next_payment_due_date: Date?, + next_statement_end_date: Date?, payoff_details: Lithic::FinancialAccounts::Statement::PayoffDetails?, statement_totals: Lithic::StatementTotals } diff --git a/sig/lithic/models/financial_accounts/statements/statement_line_items.rbs b/sig/lithic/models/financial_accounts/statements/statement_line_items.rbs index 0450951a..8364a3ec 100644 --- a/sig/lithic/models/financial_accounts/statements/statement_line_items.rbs +++ b/sig/lithic/models/financial_accounts/statements/statement_line_items.rbs @@ -37,7 +37,7 @@ module Lithic financial_account_token: String, financial_transaction_event_token: String, financial_transaction_token: String, - card_token: String, + card_token: String?, descriptor: String, event_subtype: String?, loan_tape_date: Date? @@ -64,9 +64,7 @@ module Lithic attr_accessor financial_transaction_token: String - attr_reader card_token: String? - - def card_token=: (String) -> String + attr_accessor card_token: String? attr_reader descriptor: String? @@ -87,7 +85,7 @@ module Lithic financial_account_token: String, financial_transaction_event_token: String, financial_transaction_token: String, - ?card_token: String, + ?card_token: String?, ?descriptor: String, ?event_subtype: String?, ?loan_tape_date: Date? @@ -104,7 +102,7 @@ module Lithic financial_account_token: String, financial_transaction_event_token: String, financial_transaction_token: String, - card_token: String, + card_token: String?, descriptor: String, event_subtype: String?, loan_tape_date: Date? @@ -251,6 +249,7 @@ module Lithic | :QUARTERLY_REVERSAL | :MONTHLY | :MONTHLY_REVERSAL + | :ACCOUNT_TO_ACCOUNT module EventType extend Lithic::Internal::Type::Enum @@ -342,6 +341,7 @@ module Lithic QUARTERLY_REVERSAL: :QUARTERLY_REVERSAL MONTHLY: :MONTHLY MONTHLY_REVERSAL: :MONTHLY_REVERSAL + ACCOUNT_TO_ACCOUNT: :ACCOUNT_TO_ACCOUNT def self?.values: -> ::Array[Lithic::Models::FinancialAccounts::Statements::StatementLineItems::Data::event_type] end diff --git a/sig/lithic/models/financial_event.rbs b/sig/lithic/models/financial_event.rbs index cf5379e5..6f01f3bd 100644 --- a/sig/lithic/models/financial_event.rbs +++ b/sig/lithic/models/financial_event.rbs @@ -149,6 +149,7 @@ module Lithic | :QUARTERLY_REVERSAL | :MONTHLY | :MONTHLY_REVERSAL + | :ACCOUNT_TO_ACCOUNT module Type extend Lithic::Internal::Type::Enum @@ -240,6 +241,7 @@ module Lithic QUARTERLY_REVERSAL: :QUARTERLY_REVERSAL MONTHLY: :MONTHLY MONTHLY_REVERSAL: :MONTHLY_REVERSAL + ACCOUNT_TO_ACCOUNT: :ACCOUNT_TO_ACCOUNT def self?.values: -> ::Array[Lithic::Models::FinancialEvent::type_] end diff --git a/sig/lithic/models/settlement_detail.rbs b/sig/lithic/models/settlement_detail.rbs index cda4b410..c90f5d78 100644 --- a/sig/lithic/models/settlement_detail.rbs +++ b/sig/lithic/models/settlement_detail.rbs @@ -3,9 +3,9 @@ module Lithic type settlement_detail = { token: String, - account_token: String, - card_program_token: String, - card_token: String, + account_token: String?, + card_program_token: String?, + card_token: String?, created: Time, currency: String, disputes_gross_amount: Integer, @@ -18,7 +18,7 @@ module Lithic other_fees_gross_amount: Integer, report_date: String, settlement_date: String, - transaction_token: String, + transaction_token: String?, transactions_gross_amount: Integer, type: Lithic::Models::SettlementDetail::type_, updated: Time, @@ -28,11 +28,11 @@ module Lithic class SettlementDetail < Lithic::Internal::Type::BaseModel attr_accessor token: String - attr_accessor account_token: String + attr_accessor account_token: String? - attr_accessor card_program_token: String + attr_accessor card_program_token: String? - attr_accessor card_token: String + attr_accessor card_token: String? attr_accessor created: Time @@ -58,7 +58,7 @@ module Lithic attr_accessor settlement_date: String - attr_accessor transaction_token: String + attr_accessor transaction_token: String? attr_accessor transactions_gross_amount: Integer @@ -72,9 +72,9 @@ module Lithic def initialize: ( token: String, - account_token: String, - card_program_token: String, - card_token: String, + account_token: String?, + card_program_token: String?, + card_token: String?, created: Time, currency: String, disputes_gross_amount: Integer, @@ -87,7 +87,7 @@ module Lithic other_fees_gross_amount: Integer, report_date: String, settlement_date: String, - transaction_token: String, + transaction_token: String?, transactions_gross_amount: Integer, type: Lithic::Models::SettlementDetail::type_, updated: Time, @@ -96,9 +96,9 @@ module Lithic def to_hash: -> { token: String, - account_token: String, - card_program_token: String, - card_token: String, + account_token: String?, + card_program_token: String?, + card_token: String?, created: Time, currency: String, disputes_gross_amount: Integer, @@ -111,7 +111,7 @@ module Lithic other_fees_gross_amount: Integer, report_date: String, settlement_date: String, - transaction_token: String, + transaction_token: String?, transactions_gross_amount: Integer, type: Lithic::Models::SettlementDetail::type_, updated: Time, @@ -154,7 +154,7 @@ module Lithic | :COLLABORATION | :FEE | :FINANCIAL - | :"NON-FINANCIAL" + | :NON_FINANCIAL | :PREARBITRATION | :REPRESENTMENT @@ -168,7 +168,7 @@ module Lithic COLLABORATION: :COLLABORATION FEE: :FEE FINANCIAL: :FINANCIAL - NON_FINANCIAL: :"NON-FINANCIAL" + NON_FINANCIAL: :NON_FINANCIAL PREARBITRATION: :PREARBITRATION REPRESENTMENT: :REPRESENTMENT diff --git a/sig/lithic/models/statement_totals.rbs b/sig/lithic/models/statement_totals.rbs index 61695ffb..bbf915ea 100644 --- a/sig/lithic/models/statement_totals.rbs +++ b/sig/lithic/models/statement_totals.rbs @@ -10,9 +10,9 @@ module Lithic interest: Integer, payments: Integer, purchases: Integer, - credit_details: top, - debit_details: top, - payment_details: top + credit_details: top?, + debit_details: top?, + payment_details: top? } class StatementTotals < Lithic::Internal::Type::BaseModel @@ -32,17 +32,11 @@ module Lithic attr_accessor purchases: Integer - attr_reader credit_details: top? + attr_accessor credit_details: top? - def credit_details=: (top) -> top + attr_accessor debit_details: top? - attr_reader debit_details: top? - - def debit_details=: (top) -> top - - attr_reader payment_details: top? - - def payment_details=: (top) -> top + attr_accessor payment_details: top? def initialize: ( balance_transfers: Integer, @@ -53,9 +47,9 @@ module Lithic interest: Integer, payments: Integer, purchases: Integer, - ?credit_details: top, - ?debit_details: top, - ?payment_details: top + ?credit_details: top?, + ?debit_details: top?, + ?payment_details: top? ) -> void def to_hash: -> { @@ -67,9 +61,9 @@ module Lithic interest: Integer, payments: Integer, purchases: Integer, - credit_details: top, - debit_details: top, - payment_details: top + credit_details: top?, + debit_details: top?, + payment_details: top? } end end diff --git a/sig/lithic/models/transaction.rbs b/sig/lithic/models/transaction.rbs index 732e5ecf..9cbb5dc9 100644 --- a/sig/lithic/models/transaction.rbs +++ b/sig/lithic/models/transaction.rbs @@ -698,7 +698,7 @@ module Lithic rule_results: ::Array[Lithic::Transaction::Event::RuleResult], type: Lithic::Models::Transaction::Event::type_, account_type: Lithic::Models::Transaction::Event::account_type, - network_specific_data: Lithic::Transaction::Event::NetworkSpecificData + network_specific_data: Lithic::Transaction::Event::NetworkSpecificData? } class Event < Lithic::Internal::Type::BaseModel @@ -728,11 +728,7 @@ module Lithic Lithic::Models::Transaction::Event::account_type ) -> Lithic::Models::Transaction::Event::account_type - attr_reader network_specific_data: Lithic::Transaction::Event::NetworkSpecificData? - - def network_specific_data=: ( - Lithic::Transaction::Event::NetworkSpecificData - ) -> Lithic::Transaction::Event::NetworkSpecificData + attr_accessor network_specific_data: Lithic::Transaction::Event::NetworkSpecificData? def initialize: ( token: String, @@ -746,7 +742,7 @@ module Lithic rule_results: ::Array[Lithic::Transaction::Event::RuleResult], type: Lithic::Models::Transaction::Event::type_, ?account_type: Lithic::Models::Transaction::Event::account_type, - ?network_specific_data: Lithic::Transaction::Event::NetworkSpecificData + ?network_specific_data: Lithic::Transaction::Event::NetworkSpecificData? ) -> void def to_hash: -> { @@ -761,7 +757,7 @@ module Lithic rule_results: ::Array[Lithic::Transaction::Event::RuleResult], type: Lithic::Models::Transaction::Event::type_, account_type: Lithic::Models::Transaction::Event::account_type, - network_specific_data: Lithic::Transaction::Event::NetworkSpecificData + network_specific_data: Lithic::Transaction::Event::NetworkSpecificData? } type amounts = diff --git a/sig/lithic/models/transfer_limits_response.rbs b/sig/lithic/models/transfer_limits_response.rbs index 71eaca8c..30742f36 100644 --- a/sig/lithic/models/transfer_limits_response.rbs +++ b/sig/lithic/models/transfer_limits_response.rbs @@ -80,38 +80,34 @@ module Lithic debit: Lithic::TransferLimitsResponse::Data::DailyLimit::Debit } - type credit = { limit: Integer, amount_originated: Integer } + type credit = { limit: Integer, amount_originated: Integer? } class Credit < Lithic::Internal::Type::BaseModel attr_accessor limit: Integer - attr_reader amount_originated: Integer? - - def amount_originated=: (Integer) -> Integer + attr_accessor amount_originated: Integer? def initialize: ( limit: Integer, - ?amount_originated: Integer + ?amount_originated: Integer? ) -> void - def to_hash: -> { limit: Integer, amount_originated: Integer } + def to_hash: -> { limit: Integer, amount_originated: Integer? } end - type debit = { limit: Integer, amount_originated: Integer } + type debit = { limit: Integer, amount_originated: Integer? } class Debit < Lithic::Internal::Type::BaseModel attr_accessor limit: Integer - attr_reader amount_originated: Integer? - - def amount_originated=: (Integer) -> Integer + attr_accessor amount_originated: Integer? def initialize: ( limit: Integer, - ?amount_originated: Integer + ?amount_originated: Integer? ) -> void - def to_hash: -> { limit: Integer, amount_originated: Integer } + def to_hash: -> { limit: Integer, amount_originated: Integer? } end end @@ -136,38 +132,34 @@ module Lithic debit: Lithic::TransferLimitsResponse::Data::MonthlyLimit::Debit } - type credit = { limit: Integer, amount_originated: Integer } + type credit = { limit: Integer, amount_originated: Integer? } class Credit < Lithic::Internal::Type::BaseModel attr_accessor limit: Integer - attr_reader amount_originated: Integer? - - def amount_originated=: (Integer) -> Integer + attr_accessor amount_originated: Integer? def initialize: ( limit: Integer, - ?amount_originated: Integer + ?amount_originated: Integer? ) -> void - def to_hash: -> { limit: Integer, amount_originated: Integer } + def to_hash: -> { limit: Integer, amount_originated: Integer? } end - type debit = { limit: Integer, amount_originated: Integer } + type debit = { limit: Integer, amount_originated: Integer? } class Debit < Lithic::Internal::Type::BaseModel attr_accessor limit: Integer - attr_reader amount_originated: Integer? - - def amount_originated=: (Integer) -> Integer + attr_accessor amount_originated: Integer? def initialize: ( limit: Integer, - ?amount_originated: Integer + ?amount_originated: Integer? ) -> void - def to_hash: -> { limit: Integer, amount_originated: Integer } + def to_hash: -> { limit: Integer, amount_originated: Integer? } end end @@ -192,38 +184,34 @@ module Lithic debit: Lithic::TransferLimitsResponse::Data::ProgramLimitPerTransaction::Debit } - type credit = { limit: Integer, amount_originated: Integer } + type credit = { limit: Integer, amount_originated: Integer? } class Credit < Lithic::Internal::Type::BaseModel attr_accessor limit: Integer - attr_reader amount_originated: Integer? - - def amount_originated=: (Integer) -> Integer + attr_accessor amount_originated: Integer? def initialize: ( limit: Integer, - ?amount_originated: Integer + ?amount_originated: Integer? ) -> void - def to_hash: -> { limit: Integer, amount_originated: Integer } + def to_hash: -> { limit: Integer, amount_originated: Integer? } end - type debit = { limit: Integer, amount_originated: Integer } + type debit = { limit: Integer, amount_originated: Integer? } class Debit < Lithic::Internal::Type::BaseModel attr_accessor limit: Integer - attr_reader amount_originated: Integer? - - def amount_originated=: (Integer) -> Integer + attr_accessor amount_originated: Integer? def initialize: ( limit: Integer, - ?amount_originated: Integer + ?amount_originated: Integer? ) -> void - def to_hash: -> { limit: Integer, amount_originated: Integer } + def to_hash: -> { limit: Integer, amount_originated: Integer? } end end end diff --git a/test/lithic/resources/balances_test.rb b/test/lithic/resources/balances_test.rb index 6836dc9c..0403fa40 100644 --- a/test/lithic/resources/balances_test.rb +++ b/test/lithic/resources/balances_test.rb @@ -24,8 +24,8 @@ def test_list currency: String, financial_account_token: String, financial_account_type: Lithic::Balance::FinancialAccountType, - last_transaction_event_token: String, - last_transaction_token: String, + last_transaction_event_token: String | nil, + last_transaction_token: String | nil, pending_amount: Integer, total_amount: Integer, updated: Time diff --git a/test/lithic/resources/reports/settlement_test.rb b/test/lithic/resources/reports/settlement_test.rb index 3204636a..ca356991 100644 --- a/test/lithic/resources/reports/settlement_test.rb +++ b/test/lithic/resources/reports/settlement_test.rb @@ -20,9 +20,9 @@ def test_list_details assert_pattern do row => { token: String, - account_token: String, - card_program_token: String, - card_token: String, + account_token: String | nil, + card_program_token: String | nil, + card_token: String | nil, created: Time, currency: String, disputes_gross_amount: Integer, @@ -35,7 +35,7 @@ def test_list_details other_fees_gross_amount: Integer, report_date: String, settlement_date: String, - transaction_token: String, + transaction_token: String | nil, transactions_gross_amount: Integer, type: Lithic::SettlementDetail::Type, updated: Time, From 1f9fdd2ba99353edb1560877ca098664e4fbb1a9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 26 May 2026 15:57:38 +0000 Subject: [PATCH 12/14] feat(api): Add pause external bank account endpoint --- .stats.yml | 8 ++-- lib/lithic.rb | 1 + lib/lithic/models.rb | 2 + lib/lithic/models/external_bank_account.rb | 2 +- .../external_bank_account_pause_params.rb | 20 +++++++++ .../resources/external_bank_accounts.rb | 19 +++++++++ rbi/lithic/models.rbi | 3 ++ .../external_bank_account_pause_params.rbi | 41 +++++++++++++++++++ .../resources/external_bank_accounts.rbi | 10 +++++ sig/lithic/models.rbs | 2 + .../external_bank_account_pause_params.rbs | 24 +++++++++++ .../resources/external_bank_accounts.rbs | 5 +++ .../resources/external_bank_accounts_test.rb | 35 ++++++++++++++++ 13 files changed, 167 insertions(+), 5 deletions(-) create mode 100644 lib/lithic/models/external_bank_account_pause_params.rb create mode 100644 rbi/lithic/models/external_bank_account_pause_params.rbi create mode 100644 sig/lithic/models/external_bank_account_pause_params.rbs diff --git a/.stats.yml b/.stats.yml index d1b7817f..a2b18f30 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 194 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-89ce5b3ff634397bdfc05a63d3103b9c767726dfc6b042883d220d08d4156c99.yml -openapi_spec_hash: 867ab9ab196ad28740f46ec4e7bf7aba -config_hash: 1c5c139a2aa0d1d45c063f953a9bc803 +configured_endpoints: 195 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-5ec638035f079f92b3493da7492f7f4f67d76e4172302a83c6808ea4e4c3a3d5.yml +openapi_spec_hash: c776074e0e039540c14b61b533797be4 +config_hash: 5ea7ffb0f27ab810d32bf107ccc56761 diff --git a/lib/lithic.rb b/lib/lithic.rb index 6b1d53f9..6fe5af2b 100644 --- a/lib/lithic.rb +++ b/lib/lithic.rb @@ -272,6 +272,7 @@ require_relative "lithic/models/external_bank_account_create_response" require_relative "lithic/models/external_bank_account_list_params" require_relative "lithic/models/external_bank_account_list_response" +require_relative "lithic/models/external_bank_account_pause_params" require_relative "lithic/models/external_bank_account_retrieve_params" require_relative "lithic/models/external_bank_account_retrieve_response" require_relative "lithic/models/external_bank_account_retry_micro_deposits_params" diff --git a/lib/lithic/models.rb b/lib/lithic/models.rb index 081b521c..c1074113 100644 --- a/lib/lithic/models.rb +++ b/lib/lithic/models.rb @@ -302,6 +302,8 @@ module Lithic ExternalBankAccountListParams = Lithic::Models::ExternalBankAccountListParams + ExternalBankAccountPauseParams = Lithic::Models::ExternalBankAccountPauseParams + ExternalBankAccountRetrieveParams = Lithic::Models::ExternalBankAccountRetrieveParams ExternalBankAccountRetryMicroDepositsParams = Lithic::Models::ExternalBankAccountRetryMicroDepositsParams diff --git a/lib/lithic/models/external_bank_account.rb b/lib/lithic/models/external_bank_account.rb index f7913029..ecbd2c53 100644 --- a/lib/lithic/models/external_bank_account.rb +++ b/lib/lithic/models/external_bank_account.rb @@ -2,7 +2,7 @@ module Lithic module Models - # @see Lithic::Resources::ExternalBankAccounts#retry_prenote + # @see Lithic::Resources::ExternalBankAccounts#pause class ExternalBankAccount < Lithic::Internal::Type::BaseModel # @!attribute token # A globally unique identifier for this record of an external bank account diff --git a/lib/lithic/models/external_bank_account_pause_params.rb b/lib/lithic/models/external_bank_account_pause_params.rb new file mode 100644 index 00000000..c620e1c8 --- /dev/null +++ b/lib/lithic/models/external_bank_account_pause_params.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module Lithic + module Models + # @see Lithic::Resources::ExternalBankAccounts#pause + class ExternalBankAccountPauseParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute external_bank_account_token + # + # @return [String] + required :external_bank_account_token, String + + # @!method initialize(external_bank_account_token:, request_options: {}) + # @param external_bank_account_token [String] + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/lithic/resources/external_bank_accounts.rb b/lib/lithic/resources/external_bank_accounts.rb index fc2da354..fead241b 100644 --- a/lib/lithic/resources/external_bank_accounts.rb +++ b/lib/lithic/resources/external_bank_accounts.rb @@ -132,6 +132,25 @@ def list(params = {}) ) end + # Pause an external bank account + # + # @overload pause(external_bank_account_token, request_options: {}) + # + # @param external_bank_account_token [String] + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Lithic::Models::ExternalBankAccount] + # + # @see Lithic::Models::ExternalBankAccountPauseParams + def pause(external_bank_account_token, params = {}) + @client.request( + method: :post, + path: ["v1/external_bank_accounts/%1$s/pause", external_bank_account_token], + model: Lithic::ExternalBankAccount, + options: params[:request_options] + ) + end + # Retry external bank account micro deposit verification. # # @overload retry_micro_deposits(external_bank_account_token, financial_account_token: nil, request_options: {}) diff --git a/rbi/lithic/models.rbi b/rbi/lithic/models.rbi index a5bc3816..41d4390e 100644 --- a/rbi/lithic/models.rbi +++ b/rbi/lithic/models.rbi @@ -289,6 +289,9 @@ module Lithic ExternalBankAccountListParams = Lithic::Models::ExternalBankAccountListParams + ExternalBankAccountPauseParams = + Lithic::Models::ExternalBankAccountPauseParams + ExternalBankAccountRetrieveParams = Lithic::Models::ExternalBankAccountRetrieveParams diff --git a/rbi/lithic/models/external_bank_account_pause_params.rbi b/rbi/lithic/models/external_bank_account_pause_params.rbi new file mode 100644 index 00000000..3a86e42f --- /dev/null +++ b/rbi/lithic/models/external_bank_account_pause_params.rbi @@ -0,0 +1,41 @@ +# typed: strong + +module Lithic + module Models + class ExternalBankAccountPauseParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Lithic::ExternalBankAccountPauseParams, + Lithic::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :external_bank_account_token + + sig do + params( + external_bank_account_token: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(external_bank_account_token:, request_options: {}) + end + + sig do + override.returns( + { + external_bank_account_token: String, + request_options: Lithic::RequestOptions + } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/lithic/resources/external_bank_accounts.rbi b/rbi/lithic/resources/external_bank_accounts.rbi index c6783ff5..ccdcf0cb 100644 --- a/rbi/lithic/resources/external_bank_accounts.rbi +++ b/rbi/lithic/resources/external_bank_accounts.rbi @@ -116,6 +116,16 @@ module Lithic ) end + # Pause an external bank account + sig do + params( + external_bank_account_token: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(Lithic::ExternalBankAccount) + end + def pause(external_bank_account_token, request_options: {}) + end + # Retry external bank account micro deposit verification. sig do params( diff --git a/sig/lithic/models.rbs b/sig/lithic/models.rbs index c9e12f6d..c32024a8 100644 --- a/sig/lithic/models.rbs +++ b/sig/lithic/models.rbs @@ -253,6 +253,8 @@ module Lithic class ExternalBankAccountListParams = Lithic::Models::ExternalBankAccountListParams + class ExternalBankAccountPauseParams = Lithic::Models::ExternalBankAccountPauseParams + class ExternalBankAccountRetrieveParams = Lithic::Models::ExternalBankAccountRetrieveParams class ExternalBankAccountRetryMicroDepositsParams = Lithic::Models::ExternalBankAccountRetryMicroDepositsParams diff --git a/sig/lithic/models/external_bank_account_pause_params.rbs b/sig/lithic/models/external_bank_account_pause_params.rbs new file mode 100644 index 00000000..69e70bba --- /dev/null +++ b/sig/lithic/models/external_bank_account_pause_params.rbs @@ -0,0 +1,24 @@ +module Lithic + module Models + type external_bank_account_pause_params = + { external_bank_account_token: String } + & Lithic::Internal::Type::request_parameters + + class ExternalBankAccountPauseParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_accessor external_bank_account_token: String + + def initialize: ( + external_bank_account_token: String, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + external_bank_account_token: String, + request_options: Lithic::RequestOptions + } + end + end +end diff --git a/sig/lithic/resources/external_bank_accounts.rbs b/sig/lithic/resources/external_bank_accounts.rbs index 599b4b3a..6794a496 100644 --- a/sig/lithic/resources/external_bank_accounts.rbs +++ b/sig/lithic/resources/external_bank_accounts.rbs @@ -40,6 +40,11 @@ module Lithic ?request_options: Lithic::request_opts ) -> Lithic::Internal::CursorPage[Lithic::Models::ExternalBankAccountListResponse] + def pause: ( + String external_bank_account_token, + ?request_options: Lithic::request_opts + ) -> Lithic::ExternalBankAccount + def retry_micro_deposits: ( String external_bank_account_token, ?financial_account_token: String, diff --git a/test/lithic/resources/external_bank_accounts_test.rb b/test/lithic/resources/external_bank_accounts_test.rb index bc7b677e..c5e3a5d7 100644 --- a/test/lithic/resources/external_bank_accounts_test.rb +++ b/test/lithic/resources/external_bank_accounts_test.rb @@ -163,6 +163,41 @@ def test_list end end + def test_pause + response = @lithic.external_bank_accounts.pause("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + + assert_pattern do + response => Lithic::ExternalBankAccount + end + + assert_pattern do + response => { + token: String, + country: String, + created: Time, + currency: String, + last_four: String, + owner: String, + owner_type: Lithic::OwnerType, + routing_number: String, + state: Lithic::ExternalBankAccount::State, + type: Lithic::ExternalBankAccount::Type, + verification_attempts: Integer, + verification_method: Lithic::VerificationMethod, + verification_state: Lithic::ExternalBankAccount::VerificationState, + account_token: String | nil, + address: Lithic::ExternalBankAccountAddress | nil, + company_id: String | nil, + dob: Date | nil, + doing_business_as: String | nil, + financial_account_token: String | nil, + name: String | nil, + user_defined_id: String | nil, + verification_failed_reason: String | nil + } + end + end + def test_retry_micro_deposits response = @lithic.external_bank_accounts.retry_micro_deposits("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") From 61998a2d54a2eb05f1fe517e34bfbedbe1dbd02c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 26 May 2026 22:05:49 +0000 Subject: [PATCH 13/14] feat(api): Add schemas for authorization adjustment rules --- .stats.yml | 6 +- lib/lithic.rb | 1 + lib/lithic/models/auth_rules/auth_rule.rb | 16 +- .../models/auth_rules/auth_rule_version.rb | 8 +- ...nal_authorization_adjustment_parameters.rb | 533 ++++++++ .../models/auth_rules/v2_create_params.rb | 24 +- .../models/auth_rules/v2_draft_params.rb | 8 +- lib/lithic/resources/auth_rules/v2.rb | 2 +- rbi/lithic/models/auth_rules/auth_rule.rbi | 12 +- .../models/auth_rules/auth_rule_version.rbi | 6 +- ...al_authorization_adjustment_parameters.rbi | 1147 +++++++++++++++++ .../models/auth_rules/v2_create_params.rbi | 36 +- .../models/auth_rules/v2_draft_params.rbi | 12 +- rbi/lithic/resources/auth_rules/v2.rbi | 3 +- sig/lithic/models/auth_rules/auth_rule.rbs | 2 + .../models/auth_rules/auth_rule_version.rbs | 1 + ...al_authorization_adjustment_parameters.rbs | 276 ++++ .../models/auth_rules/v2_create_params.rbs | 3 + .../models/auth_rules/v2_draft_params.rbs | 1 + 19 files changed, 2049 insertions(+), 48 deletions(-) create mode 100644 lib/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rb create mode 100644 rbi/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbi create mode 100644 sig/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbs diff --git a/.stats.yml b/.stats.yml index a2b18f30..29c3961c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-5ec638035f079f92b3493da7492f7f4f67d76e4172302a83c6808ea4e4c3a3d5.yml -openapi_spec_hash: c776074e0e039540c14b61b533797be4 -config_hash: 5ea7ffb0f27ab810d32bf107ccc56761 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-efe780032e44b3cf0f6914407e43bce6aa7176fa50aa6ec018f93c1f28af8490.yml +openapi_spec_hash: fcb4ca53ca59978f23f21d7c74fcc0b0 +config_hash: a0a579b0564a5c18568a78f5ba2b6653 diff --git a/lib/lithic.rb b/lib/lithic.rb index 6fe5af2b..389c2dd4 100644 --- a/lib/lithic.rb +++ b/lib/lithic.rb @@ -126,6 +126,7 @@ require_relative "lithic/models/auth_rules/conditional_ach_action_parameters" require_relative "lithic/models/auth_rules/conditional_attribute" require_relative "lithic/models/auth_rules/conditional_authorization_action_parameters" +require_relative "lithic/models/auth_rules/conditional_authorization_adjustment_parameters" require_relative "lithic/models/auth_rules/conditional_block_parameters" require_relative "lithic/models/auth_rules/conditional_card_transaction_update_action_parameters" require_relative "lithic/models/auth_rules/conditional_operation" diff --git a/lib/lithic/models/auth_rules/auth_rule.rb b/lib/lithic/models/auth_rules/auth_rule.rb index ab012eb7..85bda740 100644 --- a/lib/lithic/models/auth_rules/auth_rule.rb +++ b/lib/lithic/models/auth_rules/auth_rule.rb @@ -146,7 +146,7 @@ class CurrentVersion < Lithic::Internal::Type::BaseModel # @!attribute parameters # Parameters for the Auth Rule # - # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] + # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] required :parameters, union: -> { Lithic::AuthRules::AuthRule::CurrentVersion::Parameters } response_only do @@ -162,7 +162,7 @@ class CurrentVersion < Lithic::Internal::Type::BaseModel # Some parameter documentations has been truncated, see # {Lithic::Models::AuthRules::AuthRule::CurrentVersion} for more details. # - # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] Parameters for the Auth Rule + # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] Parameters for the Auth Rule # # @param version [Integer] The version of the rule, this is incremented whenever the rule's parameters chan @@ -192,8 +192,10 @@ module Parameters # Parameters for defining a TypeScript code rule variant -> { Lithic::AuthRules::TypescriptCodeParameters } + variant -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters } + # @!method self.variants - # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters)] + # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters)] end end @@ -209,7 +211,7 @@ class DraftVersion < Lithic::Internal::Type::BaseModel # @!attribute parameters # Parameters for the Auth Rule # - # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] + # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] required :parameters, union: -> { Lithic::AuthRules::AuthRule::DraftVersion::Parameters } # @!attribute state @@ -242,7 +244,7 @@ class DraftVersion < Lithic::Internal::Type::BaseModel # # @param error [String, nil] An error message if the draft version failed compilation. Populated when `state` # - # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] Parameters for the Auth Rule + # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] Parameters for the Auth Rule # # @param state [Symbol, Lithic::Models::AuthRules::AuthRule::DraftVersion::State] The state of the draft version. Most rules are created synchronously and the sta # @@ -274,8 +276,10 @@ module Parameters # Parameters for defining a TypeScript code rule variant -> { Lithic::AuthRules::TypescriptCodeParameters } + variant -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters } + # @!method self.variants - # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters)] + # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters)] end # The state of the draft version. Most rules are created synchronously and the diff --git a/lib/lithic/models/auth_rules/auth_rule_version.rb b/lib/lithic/models/auth_rules/auth_rule_version.rb index efa11b4e..4bf970ef 100644 --- a/lib/lithic/models/auth_rules/auth_rule_version.rb +++ b/lib/lithic/models/auth_rules/auth_rule_version.rb @@ -13,7 +13,7 @@ class AuthRuleVersion < Lithic::Internal::Type::BaseModel # @!attribute parameters # Parameters for the Auth Rule # - # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] + # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] required :parameters, union: -> { Lithic::AuthRules::AuthRuleVersion::Parameters } # @!attribute state @@ -37,7 +37,7 @@ class AuthRuleVersion < Lithic::Internal::Type::BaseModel # # @param created [Time] Timestamp of when this version was created. # - # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] Parameters for the Auth Rule + # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] Parameters for the Auth Rule # # @param state [Symbol, Lithic::Models::AuthRules::AuthRuleVersion::State] The current state of this version. # @@ -69,8 +69,10 @@ module Parameters # Parameters for defining a TypeScript code rule variant -> { Lithic::AuthRules::TypescriptCodeParameters } + variant -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters } + # @!method self.variants - # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters)] + # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters)] end # The current state of this version. diff --git a/lib/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rb b/lib/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rb new file mode 100644 index 00000000..8b117e49 --- /dev/null +++ b/lib/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rb @@ -0,0 +1,533 @@ +# frozen_string_literal: true + +module Lithic + module Models + module AuthRules + class ConditionalAuthorizationAdjustmentParameters < Lithic::Internal::Type::BaseModel + # @!attribute adjustment + # The hold adjustment to apply if the conditions are met + # + # @return [Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment] + required :adjustment, -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment } + + # @!attribute conditions + # + # @return [Array] + required :conditions, + -> { Lithic::Internal::Type::ArrayOf[Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition] } + + # @!method initialize(adjustment:, conditions:) + # @param adjustment [Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment] The hold adjustment to apply if the conditions are met + # + # @param conditions [Array] + + # @see Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters#adjustment + class Adjustment < Lithic::Internal::Type::BaseModel + # @!attribute mode + # The mode of the hold adjustment, determining how the value is interpreted: + # + # - `REPLACE_WITH_AMOUNT`: The value is the approved hold amount in cents. + # - `ADD_PERCENTAGE`: The value adjusts the hold amount by a percentage. 1000 + # represents a 10% increase, 0 represents no change. + # - `ADD_AMOUNT`: The value is added to the hold amount in cents. + # + # @return [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Mode] + required :mode, + enum: -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Mode } + + # @!attribute type + # The type of adjustment to apply + # + # @return [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Type] + required :type, + enum: -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Type } + + # @!attribute value + # The value used for the hold adjustment, interpreted based on the mode + # + # @return [Integer] + required :value, Integer + + # @!method initialize(mode:, type:, value:) + # Some parameter documentations has been truncated, see + # {Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment} + # for more details. + # + # The hold adjustment to apply if the conditions are met + # + # @param mode [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Mode] The mode of the hold adjustment, determining how the value is interpreted: + # + # @param type [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Type] The type of adjustment to apply + # + # @param value [Integer] The value used for the hold adjustment, interpreted based on the mode + + # The mode of the hold adjustment, determining how the value is interpreted: + # + # - `REPLACE_WITH_AMOUNT`: The value is the approved hold amount in cents. + # - `ADD_PERCENTAGE`: The value adjusts the hold amount by a percentage. 1000 + # represents a 10% increase, 0 represents no change. + # - `ADD_AMOUNT`: The value is added to the hold amount in cents. + # + # @see Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment#mode + module Mode + extend Lithic::Internal::Type::Enum + + REPLACE_WITH_AMOUNT = :REPLACE_WITH_AMOUNT + ADD_PERCENTAGE = :ADD_PERCENTAGE + ADD_AMOUNT = :ADD_AMOUNT + + # @!method self.values + # @return [Array] + end + + # The type of adjustment to apply + # + # @see Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment#type + module Type + extend Lithic::Internal::Type::Enum + + HOLD_ADJUSTMENT = :HOLD_ADJUSTMENT + + # @!method self.values + # @return [Array] + end + end + + class Condition < Lithic::Internal::Type::BaseModel + # @!attribute attribute + # The attribute to target. + # + # The following attributes may be targeted: + # + # - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a + # business by the types of goods or services it provides. + # - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all + # ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for + # Netherlands Antilles. + # - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of + # the transaction. + # - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor + # (merchant). + # - `DESCRIPTOR`: Short description of card acceptor. + # - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer + # applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or + # `TOKEN_AUTHENTICATED`. + # - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number + # (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`, + # `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`, + # `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`, + # `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`. + # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer + # fee field in the settlement/cardholder billing currency. This is the amount + # the issuer should authorize against unless the issuer is paying the acquirer + # fee on behalf of the cardholder. Use an integer value. + # - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This + # represents the amount of cash being withdrawn or advanced. Use an integer + # value. + # - `RISK_SCORE`: Network-provided score assessing risk level associated with a + # given authorization. Scores are on a range of 0-999, with 0 representing the + # lowest risk and 999 representing the highest risk. For Visa transactions, + # where the raw score has a range of 0-99, Lithic will normalize the score by + # multiplying the raw score by 10x. Use an integer value. + # - `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the + # trailing 15 minutes before the authorization. Use an integer value. + # - `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the + # trailing hour up and until the authorization. Use an integer value. + # - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the + # trailing 24 hours up and until the authorization. Use an integer value. + # - `CARD_DECLINE_COUNT_15M`: The number of declined transactions on the card in + # the trailing 15 minutes before the authorization. Use an integer value. + # - `CARD_DECLINE_COUNT_1H`: The number of declined transactions on the card in + # the trailing hour up and until the authorization. Use an integer value. + # - `CARD_DECLINE_COUNT_24H`: The number of declined transactions on the card in + # the trailing 24 hours up and until the authorization. Use an integer value. + # - `CARD_STATE`: The current state of the card associated with the transaction. + # Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`, + # `PENDING_FULFILLMENT`. + # - `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction. + # Valid values are `TRUE`, `FALSE`. + # - `PIN_STATUS`: The current state of card's PIN. Valid values are `NOT_SET`, + # `OK`, `BLOCKED`. + # - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the + # source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`, + # `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. + # - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates + # the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`. + # - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address + # data with the cardholder KYC data if it exists. Valid values are `MATCH`, + # `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`. + # - `SERVICE_LOCATION_STATE`: The state/province code (ISO 3166-2) where the + # cardholder received the service, e.g. "NY". When a service location is present + # in the network data, the service location state is used. Otherwise, falls back + # to the card acceptor state. + # - `SERVICE_LOCATION_POSTAL_CODE`: The postal code where the cardholder received + # the service, e.g. "10001". When a service location is present in the network + # data, the service location postal code is used. Otherwise, falls back to the + # card acceptor postal code. + # - `CARD_AGE`: The age of the card in seconds at the time of the authorization. + # Use an integer value. + # - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time + # of the authorization. Use an integer value. For programs where Lithic does not + # manage or retain account holder data, this attribute does not evaluate. + # - `AMOUNT_Z_SCORE`: The z-score of the transaction amount relative to the + # entity's transaction history. Null if fewer than 30 approved transactions in + # the specified window. Requires `parameters.scope` and `parameters.interval`. + # Use a decimal value. + # - `AVG_TRANSACTION_AMOUNT`: The average approved transaction amount for the + # entity over the specified window, in cents. Requires `parameters.scope` and + # `parameters.interval`. Use a decimal value. + # - `STDEV_TRANSACTION_AMOUNT`: The standard deviation of approved transaction + # amounts for the entity over the specified window, in cents. Null if fewer than + # 30 approved transactions in the specified window. Requires `parameters.scope` + # and `parameters.interval`. Use a decimal value. + # - `IS_NEW_COUNTRY`: Whether the transaction's merchant country has not been seen + # in the entity's transaction history. Valid values are `TRUE`, `FALSE`. + # Requires `parameters.scope`. + # - `IS_NEW_MCC`: Whether the transaction's MCC has not been seen in the entity's + # transaction history. Valid values are `TRUE`, `FALSE`. Requires + # `parameters.scope`. + # - `IS_FIRST_TRANSACTION`: Whether this is the first transaction for the entity. + # Valid values are `TRUE`, `FALSE`. Requires `parameters.scope`. + # - `CONSECUTIVE_DECLINES`: The number of consecutive declined transactions for + # the entity over the last 30 days (rolling). Requires `parameters.scope`. Not + # supported for `BUSINESS_ACCOUNT` scope. Use an integer value. + # - `TIME_SINCE_LAST_TRANSACTION`: The number of days since the last approved + # transaction for the entity, rounded to the nearest whole day. Requires + # `parameters.scope`. Use an integer value. + # - `DISTINCT_COUNTRY_COUNT`: The number of distinct merchant countries seen in + # the entity's transaction history. Requires `parameters.scope`. Use an integer + # value. + # - `IS_NEW_MERCHANT`: Whether the card acceptor ID has not been seen in the + # card's approved transaction history (capped at the 1000 most recently seen + # merchants). Valid values are `TRUE`, `FALSE`. Card-scoped only; no + # `parameters` required. + # - `THREE_DS_SUCCESS_RATE`: The 3DS authentication success rate for the card, as + # a percentage from 0.0 to 100.0. Card-scoped only; no `parameters` required. + # Use a decimal value. + # - `TRAVEL_SPEED`: The estimated speed of travel derived from the distance + # between the postal code centers of the last card-present transaction and the + # current transaction, divided by the elapsed time. Null if there is no prior + # card-present transaction, if either postal code cannot be geocoded, or if + # elapsed time is zero. Requires `parameters.unit` set to `MPH` or `KPH`. Use a + # decimal value. + # - `DISTANCE_FROM_LAST_TRANSACTION`: The estimated distance between the postal + # code centers of the last card-present transaction and the current transaction. + # Null if there is no prior card-present transaction or if either postal code + # cannot be geocoded. Requires `parameters.unit` set to `MILES` or `KILOMETERS`. + # Use a decimal value. + # + # @return [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute] + required :attribute, + enum: -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute } + + # @!attribute operation + # The operation to apply to the attribute + # + # @return [Symbol, Lithic::Models::AuthRules::ConditionalOperation] + required :operation, enum: -> { Lithic::AuthRules::ConditionalOperation } + + # @!attribute value + # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` + # + # @return [String, Integer, Float, Array, Time] + required :value, union: -> { Lithic::AuthRules::ConditionalValue } + + # @!attribute parameters + # Additional parameters for certain attributes. Required when `attribute` is one + # of `AMOUNT_Z_SCORE`, `AVG_TRANSACTION_AMOUNT`, `STDEV_TRANSACTION_AMOUNT`, + # `IS_NEW_COUNTRY`, `IS_NEW_MCC`, `IS_FIRST_TRANSACTION`, `CONSECUTIVE_DECLINES`, + # `TIME_SINCE_LAST_TRANSACTION`, or `DISTINCT_COUNTRY_COUNT` (require `scope`); or + # `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION` (require `unit`). Not used + # for other attributes. + # + # @return [Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters, nil] + optional :parameters, + -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters } + + # @!method initialize(attribute:, operation:, value:, parameters: nil) + # Some parameter documentations has been truncated, see + # {Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition} + # for more details. + # + # @param attribute [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute] The attribute to target. + # + # @param operation [Symbol, Lithic::Models::AuthRules::ConditionalOperation] The operation to apply to the attribute + # + # @param value [String, Integer, Float, Array, Time] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` + # + # @param parameters [Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters] Additional parameters for certain attributes. Required when `attribute` is one o + + # The attribute to target. + # + # The following attributes may be targeted: + # + # - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a + # business by the types of goods or services it provides. + # - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all + # ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for + # Netherlands Antilles. + # - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of + # the transaction. + # - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor + # (merchant). + # - `DESCRIPTOR`: Short description of card acceptor. + # - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer + # applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or + # `TOKEN_AUTHENTICATED`. + # - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number + # (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`, + # `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`, + # `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`, + # `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`. + # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer + # fee field in the settlement/cardholder billing currency. This is the amount + # the issuer should authorize against unless the issuer is paying the acquirer + # fee on behalf of the cardholder. Use an integer value. + # - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This + # represents the amount of cash being withdrawn or advanced. Use an integer + # value. + # - `RISK_SCORE`: Network-provided score assessing risk level associated with a + # given authorization. Scores are on a range of 0-999, with 0 representing the + # lowest risk and 999 representing the highest risk. For Visa transactions, + # where the raw score has a range of 0-99, Lithic will normalize the score by + # multiplying the raw score by 10x. Use an integer value. + # - `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the + # trailing 15 minutes before the authorization. Use an integer value. + # - `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the + # trailing hour up and until the authorization. Use an integer value. + # - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the + # trailing 24 hours up and until the authorization. Use an integer value. + # - `CARD_DECLINE_COUNT_15M`: The number of declined transactions on the card in + # the trailing 15 minutes before the authorization. Use an integer value. + # - `CARD_DECLINE_COUNT_1H`: The number of declined transactions on the card in + # the trailing hour up and until the authorization. Use an integer value. + # - `CARD_DECLINE_COUNT_24H`: The number of declined transactions on the card in + # the trailing 24 hours up and until the authorization. Use an integer value. + # - `CARD_STATE`: The current state of the card associated with the transaction. + # Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`, + # `PENDING_FULFILLMENT`. + # - `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction. + # Valid values are `TRUE`, `FALSE`. + # - `PIN_STATUS`: The current state of card's PIN. Valid values are `NOT_SET`, + # `OK`, `BLOCKED`. + # - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the + # source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`, + # `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. + # - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates + # the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`. + # - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address + # data with the cardholder KYC data if it exists. Valid values are `MATCH`, + # `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`. + # - `SERVICE_LOCATION_STATE`: The state/province code (ISO 3166-2) where the + # cardholder received the service, e.g. "NY". When a service location is present + # in the network data, the service location state is used. Otherwise, falls back + # to the card acceptor state. + # - `SERVICE_LOCATION_POSTAL_CODE`: The postal code where the cardholder received + # the service, e.g. "10001". When a service location is present in the network + # data, the service location postal code is used. Otherwise, falls back to the + # card acceptor postal code. + # - `CARD_AGE`: The age of the card in seconds at the time of the authorization. + # Use an integer value. + # - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time + # of the authorization. Use an integer value. For programs where Lithic does not + # manage or retain account holder data, this attribute does not evaluate. + # - `AMOUNT_Z_SCORE`: The z-score of the transaction amount relative to the + # entity's transaction history. Null if fewer than 30 approved transactions in + # the specified window. Requires `parameters.scope` and `parameters.interval`. + # Use a decimal value. + # - `AVG_TRANSACTION_AMOUNT`: The average approved transaction amount for the + # entity over the specified window, in cents. Requires `parameters.scope` and + # `parameters.interval`. Use a decimal value. + # - `STDEV_TRANSACTION_AMOUNT`: The standard deviation of approved transaction + # amounts for the entity over the specified window, in cents. Null if fewer than + # 30 approved transactions in the specified window. Requires `parameters.scope` + # and `parameters.interval`. Use a decimal value. + # - `IS_NEW_COUNTRY`: Whether the transaction's merchant country has not been seen + # in the entity's transaction history. Valid values are `TRUE`, `FALSE`. + # Requires `parameters.scope`. + # - `IS_NEW_MCC`: Whether the transaction's MCC has not been seen in the entity's + # transaction history. Valid values are `TRUE`, `FALSE`. Requires + # `parameters.scope`. + # - `IS_FIRST_TRANSACTION`: Whether this is the first transaction for the entity. + # Valid values are `TRUE`, `FALSE`. Requires `parameters.scope`. + # - `CONSECUTIVE_DECLINES`: The number of consecutive declined transactions for + # the entity over the last 30 days (rolling). Requires `parameters.scope`. Not + # supported for `BUSINESS_ACCOUNT` scope. Use an integer value. + # - `TIME_SINCE_LAST_TRANSACTION`: The number of days since the last approved + # transaction for the entity, rounded to the nearest whole day. Requires + # `parameters.scope`. Use an integer value. + # - `DISTINCT_COUNTRY_COUNT`: The number of distinct merchant countries seen in + # the entity's transaction history. Requires `parameters.scope`. Use an integer + # value. + # - `IS_NEW_MERCHANT`: Whether the card acceptor ID has not been seen in the + # card's approved transaction history (capped at the 1000 most recently seen + # merchants). Valid values are `TRUE`, `FALSE`. Card-scoped only; no + # `parameters` required. + # - `THREE_DS_SUCCESS_RATE`: The 3DS authentication success rate for the card, as + # a percentage from 0.0 to 100.0. Card-scoped only; no `parameters` required. + # Use a decimal value. + # - `TRAVEL_SPEED`: The estimated speed of travel derived from the distance + # between the postal code centers of the last card-present transaction and the + # current transaction, divided by the elapsed time. Null if there is no prior + # card-present transaction, if either postal code cannot be geocoded, or if + # elapsed time is zero. Requires `parameters.unit` set to `MPH` or `KPH`. Use a + # decimal value. + # - `DISTANCE_FROM_LAST_TRANSACTION`: The estimated distance between the postal + # code centers of the last card-present transaction and the current transaction. + # Null if there is no prior card-present transaction or if either postal code + # cannot be geocoded. Requires `parameters.unit` set to `MILES` or `KILOMETERS`. + # Use a decimal value. + # + # @see Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition#attribute + module Attribute + extend Lithic::Internal::Type::Enum + + MCC = :MCC + COUNTRY = :COUNTRY + CURRENCY = :CURRENCY + MERCHANT_ID = :MERCHANT_ID + DESCRIPTOR = :DESCRIPTOR + LIABILITY_SHIFT = :LIABILITY_SHIFT + PAN_ENTRY_MODE = :PAN_ENTRY_MODE + TRANSACTION_AMOUNT = :TRANSACTION_AMOUNT + CASH_AMOUNT = :CASH_AMOUNT + RISK_SCORE = :RISK_SCORE + CARD_TRANSACTION_COUNT_15_M = :CARD_TRANSACTION_COUNT_15M + CARD_TRANSACTION_COUNT_1_H = :CARD_TRANSACTION_COUNT_1H + CARD_TRANSACTION_COUNT_24_H = :CARD_TRANSACTION_COUNT_24H + CARD_DECLINE_COUNT_15_M = :CARD_DECLINE_COUNT_15M + CARD_DECLINE_COUNT_1_H = :CARD_DECLINE_COUNT_1H + CARD_DECLINE_COUNT_24_H = :CARD_DECLINE_COUNT_24H + CARD_STATE = :CARD_STATE + PIN_ENTERED = :PIN_ENTERED + PIN_STATUS = :PIN_STATUS + WALLET_TYPE = :WALLET_TYPE + TRANSACTION_INITIATOR = :TRANSACTION_INITIATOR + ADDRESS_MATCH = :ADDRESS_MATCH + SERVICE_LOCATION_STATE = :SERVICE_LOCATION_STATE + SERVICE_LOCATION_POSTAL_CODE = :SERVICE_LOCATION_POSTAL_CODE + CARD_AGE = :CARD_AGE + ACCOUNT_AGE = :ACCOUNT_AGE + AMOUNT_Z_SCORE = :AMOUNT_Z_SCORE + AVG_TRANSACTION_AMOUNT = :AVG_TRANSACTION_AMOUNT + STDEV_TRANSACTION_AMOUNT = :STDEV_TRANSACTION_AMOUNT + IS_NEW_COUNTRY = :IS_NEW_COUNTRY + IS_NEW_MCC = :IS_NEW_MCC + IS_FIRST_TRANSACTION = :IS_FIRST_TRANSACTION + CONSECUTIVE_DECLINES = :CONSECUTIVE_DECLINES + TIME_SINCE_LAST_TRANSACTION = :TIME_SINCE_LAST_TRANSACTION + DISTINCT_COUNTRY_COUNT = :DISTINCT_COUNTRY_COUNT + IS_NEW_MERCHANT = :IS_NEW_MERCHANT + THREE_DS_SUCCESS_RATE = :THREE_DS_SUCCESS_RATE + TRAVEL_SPEED = :TRAVEL_SPEED + DISTANCE_FROM_LAST_TRANSACTION = :DISTANCE_FROM_LAST_TRANSACTION + + # @!method self.values + # @return [Array] + end + + # @see Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition#parameters + class Parameters < Lithic::Internal::Type::BaseModel + # @!attribute interval + # The time window for statistical attributes (`AMOUNT_Z_SCORE`, + # `AVG_TRANSACTION_AMOUNT`, `STDEV_TRANSACTION_AMOUNT`). Use `LIFETIME` for + # all-time history or a specific window (`7D`, `30D`, `90D`). + # + # @return [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Interval, nil] + optional :interval, + enum: -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Interval } + + # @!attribute scope + # The entity scope to evaluate the attribute against. + # + # @return [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Scope, nil] + optional :scope, + enum: -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Scope } + + # @!attribute unit + # The unit for impossible travel attributes. Required when `attribute` is + # `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION`. + # + # For `TRAVEL_SPEED`: `MPH` (miles per hour) or `KPH` (kilometers per hour). + # + # For `DISTANCE_FROM_LAST_TRANSACTION`: `MILES` or `KILOMETERS`. + # + # @return [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Unit, nil] + optional :unit, + enum: -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Unit } + + # @!method initialize(interval: nil, scope: nil, unit: nil) + # Some parameter documentations has been truncated, see + # {Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters} + # for more details. + # + # Additional parameters for certain attributes. Required when `attribute` is one + # of `AMOUNT_Z_SCORE`, `AVG_TRANSACTION_AMOUNT`, `STDEV_TRANSACTION_AMOUNT`, + # `IS_NEW_COUNTRY`, `IS_NEW_MCC`, `IS_FIRST_TRANSACTION`, `CONSECUTIVE_DECLINES`, + # `TIME_SINCE_LAST_TRANSACTION`, or `DISTINCT_COUNTRY_COUNT` (require `scope`); or + # `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION` (require `unit`). Not used + # for other attributes. + # + # @param interval [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Interval] The time window for statistical attributes (`AMOUNT_Z_SCORE`, `AVG_TRANSACTION_A + # + # @param scope [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Scope] The entity scope to evaluate the attribute against. + # + # @param unit [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Unit] The unit for impossible travel attributes. Required when `attribute` is + # `TRAVEL\_ + + # The time window for statistical attributes (`AMOUNT_Z_SCORE`, + # `AVG_TRANSACTION_AMOUNT`, `STDEV_TRANSACTION_AMOUNT`). Use `LIFETIME` for + # all-time history or a specific window (`7D`, `30D`, `90D`). + # + # @see Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters#interval + module Interval + extend Lithic::Internal::Type::Enum + + LIFETIME = :LIFETIME + INTERVAL_7_D = :"7D" + INTERVAL_30_D = :"30D" + INTERVAL_90_D = :"90D" + + # @!method self.values + # @return [Array] + end + + # The entity scope to evaluate the attribute against. + # + # @see Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters#scope + module Scope + extend Lithic::Internal::Type::Enum + + CARD = :CARD + ACCOUNT = :ACCOUNT + BUSINESS_ACCOUNT = :BUSINESS_ACCOUNT + + # @!method self.values + # @return [Array] + end + + # The unit for impossible travel attributes. Required when `attribute` is + # `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION`. + # + # For `TRAVEL_SPEED`: `MPH` (miles per hour) or `KPH` (kilometers per hour). + # + # For `DISTANCE_FROM_LAST_TRANSACTION`: `MILES` or `KILOMETERS`. + # + # @see Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters#unit + module Unit + extend Lithic::Internal::Type::Enum + + MPH = :MPH + KPH = :KPH + MILES = :MILES + KILOMETERS = :KILOMETERS + + # @!method self.values + # @return [Array] + end + end + end + end + end + end +end diff --git a/lib/lithic/models/auth_rules/v2_create_params.rb b/lib/lithic/models/auth_rules/v2_create_params.rb index 07a4631f..52c3fd9b 100644 --- a/lib/lithic/models/auth_rules/v2_create_params.rb +++ b/lib/lithic/models/auth_rules/v2_create_params.rb @@ -30,7 +30,7 @@ class AccountLevelRule < Lithic::Internal::Type::BaseModel # @!attribute parameters # Parameters for the Auth Rule # - # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] + # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] required :parameters, union: -> { Lithic::AuthRules::V2CreateParams::Body::AccountLevelRule::Parameters } # @!attribute type @@ -81,7 +81,7 @@ class AccountLevelRule < Lithic::Internal::Type::BaseModel # {Lithic::Models::AuthRules::V2CreateParams::Body::AccountLevelRule} for more # details. # - # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] Parameters for the Auth Rule + # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] Parameters for the Auth Rule # # @param type [Symbol, Lithic::Models::AuthRules::V2CreateParams::Body::AccountLevelRule::Type] The type of Auth Rule. For certain rule types, this determines the event stream # @@ -119,8 +119,10 @@ module Parameters # Parameters for defining a TypeScript code rule variant -> { Lithic::AuthRules::TypescriptCodeParameters } + variant -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters } + # @!method self.variants - # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters)] + # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters)] end # The type of Auth Rule. For certain rule types, this determines the event stream @@ -163,7 +165,7 @@ class CardLevelRule < Lithic::Internal::Type::BaseModel # @!attribute parameters # Parameters for the Auth Rule # - # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] + # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] required :parameters, union: -> { Lithic::AuthRules::V2CreateParams::Body::CardLevelRule::Parameters } # @!attribute type @@ -204,7 +206,7 @@ class CardLevelRule < Lithic::Internal::Type::BaseModel # # @param card_tokens [Array] Card tokens to which the Auth Rule applies. # - # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] Parameters for the Auth Rule + # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] Parameters for the Auth Rule # # @param type [Symbol, Lithic::Models::AuthRules::V2CreateParams::Body::CardLevelRule::Type] The type of Auth Rule. For certain rule types, this determines the event stream # @@ -238,8 +240,10 @@ module Parameters # Parameters for defining a TypeScript code rule variant -> { Lithic::AuthRules::TypescriptCodeParameters } + variant -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters } + # @!method self.variants - # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters)] + # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters)] end # The type of Auth Rule. For certain rule types, this determines the event stream @@ -276,7 +280,7 @@ class ProgramLevelRule < Lithic::Internal::Type::BaseModel # @!attribute parameters # Parameters for the Auth Rule # - # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] + # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] required :parameters, union: -> { Lithic::AuthRules::V2CreateParams::Body::ProgramLevelRule::Parameters } # @!attribute program_level @@ -339,7 +343,7 @@ class ProgramLevelRule < Lithic::Internal::Type::BaseModel # {Lithic::Models::AuthRules::V2CreateParams::Body::ProgramLevelRule} for more # details. # - # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] Parameters for the Auth Rule + # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters] Parameters for the Auth Rule # # @param program_level [Boolean] Whether the Auth Rule applies to all authorizations on the card program. # @@ -381,8 +385,10 @@ module Parameters # Parameters for defining a TypeScript code rule variant -> { Lithic::AuthRules::TypescriptCodeParameters } + variant -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters } + # @!method self.variants - # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters)] + # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters)] end # The type of Auth Rule. For certain rule types, this determines the event stream diff --git a/lib/lithic/models/auth_rules/v2_draft_params.rb b/lib/lithic/models/auth_rules/v2_draft_params.rb index f379d1ec..12ea00a4 100644 --- a/lib/lithic/models/auth_rules/v2_draft_params.rb +++ b/lib/lithic/models/auth_rules/v2_draft_params.rb @@ -16,13 +16,13 @@ class V2DraftParams < Lithic::Internal::Type::BaseModel # @!attribute parameters # Parameters for the Auth Rule # - # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, nil] + # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters, nil] optional :parameters, union: -> { Lithic::AuthRules::V2DraftParams::Parameters }, nil?: true # @!method initialize(auth_rule_token:, parameters: nil, request_options: {}) # @param auth_rule_token [String] # - # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, nil] Parameters for the Auth Rule + # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters, nil] Parameters for the Auth Rule # # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] @@ -50,8 +50,10 @@ module Parameters # Parameters for defining a TypeScript code rule variant -> { Lithic::AuthRules::TypescriptCodeParameters } + variant -> { Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters } + # @!method self.variants - # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters)] + # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters)] end end end diff --git a/lib/lithic/resources/auth_rules/v2.rb b/lib/lithic/resources/auth_rules/v2.rb index 3656122c..c397a1d3 100644 --- a/lib/lithic/resources/auth_rules/v2.rb +++ b/lib/lithic/resources/auth_rules/v2.rb @@ -144,7 +144,7 @@ def delete(auth_rule_token, params = {}) # # @param auth_rule_token [String] # - # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, nil] Parameters for the Auth Rule + # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters, nil] Parameters for the Auth Rule # # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/rbi/lithic/models/auth_rules/auth_rule.rbi b/rbi/lithic/models/auth_rules/auth_rule.rbi index bff611b7..7ed6800c 100644 --- a/rbi/lithic/models/auth_rules/auth_rule.rbi +++ b/rbi/lithic/models/auth_rules/auth_rule.rbi @@ -235,7 +235,8 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters::OrHash, Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash, - Lithic::AuthRules::TypescriptCodeParameters::OrHash + Lithic::AuthRules::TypescriptCodeParameters::OrHash, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::OrHash ), version: Integer ).returns(T.attached_class) @@ -276,7 +277,8 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, - Lithic::AuthRules::TypescriptCodeParameters + Lithic::AuthRules::TypescriptCodeParameters, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ) end @@ -349,7 +351,8 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters::OrHash, Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash, - Lithic::AuthRules::TypescriptCodeParameters::OrHash + Lithic::AuthRules::TypescriptCodeParameters::OrHash, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::OrHash ), state: Lithic::AuthRules::AuthRule::DraftVersion::State::OrSymbol, version: Integer @@ -408,7 +411,8 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, - Lithic::AuthRules::TypescriptCodeParameters + Lithic::AuthRules::TypescriptCodeParameters, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ) end diff --git a/rbi/lithic/models/auth_rules/auth_rule_version.rbi b/rbi/lithic/models/auth_rules/auth_rule_version.rbi index e36a21ac..639cf1e1 100644 --- a/rbi/lithic/models/auth_rules/auth_rule_version.rbi +++ b/rbi/lithic/models/auth_rules/auth_rule_version.rbi @@ -43,7 +43,8 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters::OrHash, Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash, - Lithic::AuthRules::TypescriptCodeParameters::OrHash + Lithic::AuthRules::TypescriptCodeParameters::OrHash, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::OrHash ), state: Lithic::AuthRules::AuthRuleVersion::State::OrSymbol, version: Integer @@ -91,7 +92,8 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, - Lithic::AuthRules::TypescriptCodeParameters + Lithic::AuthRules::TypescriptCodeParameters, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ) end diff --git a/rbi/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbi b/rbi/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbi new file mode 100644 index 00000000..0d98b214 --- /dev/null +++ b/rbi/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbi @@ -0,0 +1,1147 @@ +# typed: strong + +module Lithic + module Models + module AuthRules + class ConditionalAuthorizationAdjustmentParameters < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters, + Lithic::Internal::AnyHash + ) + end + + # The hold adjustment to apply if the conditions are met + sig do + returns( + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment + ) + end + attr_reader :adjustment + + sig do + params( + adjustment: + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::OrHash + ).void + end + attr_writer :adjustment + + sig do + returns( + T::Array[ + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition + ] + ) + end + attr_accessor :conditions + + sig do + params( + adjustment: + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::OrHash, + conditions: + T::Array[ + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # The hold adjustment to apply if the conditions are met + adjustment:, + conditions: + ) + end + + sig do + override.returns( + { + adjustment: + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment, + conditions: + T::Array[ + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition + ] + } + ) + end + def to_hash + end + + class Adjustment < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment, + Lithic::Internal::AnyHash + ) + end + + # The mode of the hold adjustment, determining how the value is interpreted: + # + # - `REPLACE_WITH_AMOUNT`: The value is the approved hold amount in cents. + # - `ADD_PERCENTAGE`: The value adjusts the hold amount by a percentage. 1000 + # represents a 10% increase, 0 represents no change. + # - `ADD_AMOUNT`: The value is added to the hold amount in cents. + sig do + returns( + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Mode::OrSymbol + ) + end + attr_accessor :mode + + # The type of adjustment to apply + sig do + returns( + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Type::OrSymbol + ) + end + attr_accessor :type + + # The value used for the hold adjustment, interpreted based on the mode + sig { returns(Integer) } + attr_accessor :value + + # The hold adjustment to apply if the conditions are met + sig do + params( + mode: + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Mode::OrSymbol, + type: + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Type::OrSymbol, + value: Integer + ).returns(T.attached_class) + end + def self.new( + # The mode of the hold adjustment, determining how the value is interpreted: + # + # - `REPLACE_WITH_AMOUNT`: The value is the approved hold amount in cents. + # - `ADD_PERCENTAGE`: The value adjusts the hold amount by a percentage. 1000 + # represents a 10% increase, 0 represents no change. + # - `ADD_AMOUNT`: The value is added to the hold amount in cents. + mode:, + # The type of adjustment to apply + type:, + # The value used for the hold adjustment, interpreted based on the mode + value: + ) + end + + sig do + override.returns( + { + mode: + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Mode::OrSymbol, + type: + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Type::OrSymbol, + value: Integer + } + ) + end + def to_hash + end + + # The mode of the hold adjustment, determining how the value is interpreted: + # + # - `REPLACE_WITH_AMOUNT`: The value is the approved hold amount in cents. + # - `ADD_PERCENTAGE`: The value adjusts the hold amount by a percentage. 1000 + # represents a 10% increase, 0 represents no change. + # - `ADD_AMOUNT`: The value is added to the hold amount in cents. + module Mode + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Mode + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + REPLACE_WITH_AMOUNT = + T.let( + :REPLACE_WITH_AMOUNT, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Mode::TaggedSymbol + ) + ADD_PERCENTAGE = + T.let( + :ADD_PERCENTAGE, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Mode::TaggedSymbol + ) + ADD_AMOUNT = + T.let( + :ADD_AMOUNT, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Mode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Mode::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The type of adjustment to apply + module Type + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + HOLD_ADJUSTMENT = + T.let( + :HOLD_ADJUSTMENT, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class Condition < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition, + Lithic::Internal::AnyHash + ) + end + + # The attribute to target. + # + # The following attributes may be targeted: + # + # - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a + # business by the types of goods or services it provides. + # - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all + # ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for + # Netherlands Antilles. + # - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of + # the transaction. + # - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor + # (merchant). + # - `DESCRIPTOR`: Short description of card acceptor. + # - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer + # applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or + # `TOKEN_AUTHENTICATED`. + # - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number + # (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`, + # `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`, + # `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`, + # `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`. + # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer + # fee field in the settlement/cardholder billing currency. This is the amount + # the issuer should authorize against unless the issuer is paying the acquirer + # fee on behalf of the cardholder. Use an integer value. + # - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This + # represents the amount of cash being withdrawn or advanced. Use an integer + # value. + # - `RISK_SCORE`: Network-provided score assessing risk level associated with a + # given authorization. Scores are on a range of 0-999, with 0 representing the + # lowest risk and 999 representing the highest risk. For Visa transactions, + # where the raw score has a range of 0-99, Lithic will normalize the score by + # multiplying the raw score by 10x. Use an integer value. + # - `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the + # trailing 15 minutes before the authorization. Use an integer value. + # - `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the + # trailing hour up and until the authorization. Use an integer value. + # - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the + # trailing 24 hours up and until the authorization. Use an integer value. + # - `CARD_DECLINE_COUNT_15M`: The number of declined transactions on the card in + # the trailing 15 minutes before the authorization. Use an integer value. + # - `CARD_DECLINE_COUNT_1H`: The number of declined transactions on the card in + # the trailing hour up and until the authorization. Use an integer value. + # - `CARD_DECLINE_COUNT_24H`: The number of declined transactions on the card in + # the trailing 24 hours up and until the authorization. Use an integer value. + # - `CARD_STATE`: The current state of the card associated with the transaction. + # Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`, + # `PENDING_FULFILLMENT`. + # - `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction. + # Valid values are `TRUE`, `FALSE`. + # - `PIN_STATUS`: The current state of card's PIN. Valid values are `NOT_SET`, + # `OK`, `BLOCKED`. + # - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the + # source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`, + # `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. + # - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates + # the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`. + # - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address + # data with the cardholder KYC data if it exists. Valid values are `MATCH`, + # `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`. + # - `SERVICE_LOCATION_STATE`: The state/province code (ISO 3166-2) where the + # cardholder received the service, e.g. "NY". When a service location is present + # in the network data, the service location state is used. Otherwise, falls back + # to the card acceptor state. + # - `SERVICE_LOCATION_POSTAL_CODE`: The postal code where the cardholder received + # the service, e.g. "10001". When a service location is present in the network + # data, the service location postal code is used. Otherwise, falls back to the + # card acceptor postal code. + # - `CARD_AGE`: The age of the card in seconds at the time of the authorization. + # Use an integer value. + # - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time + # of the authorization. Use an integer value. For programs where Lithic does not + # manage or retain account holder data, this attribute does not evaluate. + # - `AMOUNT_Z_SCORE`: The z-score of the transaction amount relative to the + # entity's transaction history. Null if fewer than 30 approved transactions in + # the specified window. Requires `parameters.scope` and `parameters.interval`. + # Use a decimal value. + # - `AVG_TRANSACTION_AMOUNT`: The average approved transaction amount for the + # entity over the specified window, in cents. Requires `parameters.scope` and + # `parameters.interval`. Use a decimal value. + # - `STDEV_TRANSACTION_AMOUNT`: The standard deviation of approved transaction + # amounts for the entity over the specified window, in cents. Null if fewer than + # 30 approved transactions in the specified window. Requires `parameters.scope` + # and `parameters.interval`. Use a decimal value. + # - `IS_NEW_COUNTRY`: Whether the transaction's merchant country has not been seen + # in the entity's transaction history. Valid values are `TRUE`, `FALSE`. + # Requires `parameters.scope`. + # - `IS_NEW_MCC`: Whether the transaction's MCC has not been seen in the entity's + # transaction history. Valid values are `TRUE`, `FALSE`. Requires + # `parameters.scope`. + # - `IS_FIRST_TRANSACTION`: Whether this is the first transaction for the entity. + # Valid values are `TRUE`, `FALSE`. Requires `parameters.scope`. + # - `CONSECUTIVE_DECLINES`: The number of consecutive declined transactions for + # the entity over the last 30 days (rolling). Requires `parameters.scope`. Not + # supported for `BUSINESS_ACCOUNT` scope. Use an integer value. + # - `TIME_SINCE_LAST_TRANSACTION`: The number of days since the last approved + # transaction for the entity, rounded to the nearest whole day. Requires + # `parameters.scope`. Use an integer value. + # - `DISTINCT_COUNTRY_COUNT`: The number of distinct merchant countries seen in + # the entity's transaction history. Requires `parameters.scope`. Use an integer + # value. + # - `IS_NEW_MERCHANT`: Whether the card acceptor ID has not been seen in the + # card's approved transaction history (capped at the 1000 most recently seen + # merchants). Valid values are `TRUE`, `FALSE`. Card-scoped only; no + # `parameters` required. + # - `THREE_DS_SUCCESS_RATE`: The 3DS authentication success rate for the card, as + # a percentage from 0.0 to 100.0. Card-scoped only; no `parameters` required. + # Use a decimal value. + # - `TRAVEL_SPEED`: The estimated speed of travel derived from the distance + # between the postal code centers of the last card-present transaction and the + # current transaction, divided by the elapsed time. Null if there is no prior + # card-present transaction, if either postal code cannot be geocoded, or if + # elapsed time is zero. Requires `parameters.unit` set to `MPH` or `KPH`. Use a + # decimal value. + # - `DISTANCE_FROM_LAST_TRANSACTION`: The estimated distance between the postal + # code centers of the last card-present transaction and the current transaction. + # Null if there is no prior card-present transaction or if either postal code + # cannot be geocoded. Requires `parameters.unit` set to `MILES` or `KILOMETERS`. + # Use a decimal value. + sig do + returns( + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::OrSymbol + ) + end + attr_accessor :attribute + + # The operation to apply to the attribute + sig { returns(Lithic::AuthRules::ConditionalOperation::OrSymbol) } + attr_accessor :operation + + # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` + sig { returns(Lithic::AuthRules::ConditionalValue::Variants) } + attr_accessor :value + + # Additional parameters for certain attributes. Required when `attribute` is one + # of `AMOUNT_Z_SCORE`, `AVG_TRANSACTION_AMOUNT`, `STDEV_TRANSACTION_AMOUNT`, + # `IS_NEW_COUNTRY`, `IS_NEW_MCC`, `IS_FIRST_TRANSACTION`, `CONSECUTIVE_DECLINES`, + # `TIME_SINCE_LAST_TRANSACTION`, or `DISTINCT_COUNTRY_COUNT` (require `scope`); or + # `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION` (require `unit`). Not used + # for other attributes. + sig do + returns( + T.nilable( + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters + ) + ) + end + attr_reader :parameters + + sig do + params( + parameters: + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::OrHash + ).void + end + attr_writer :parameters + + sig do + params( + attribute: + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::OrSymbol, + operation: Lithic::AuthRules::ConditionalOperation::OrSymbol, + value: Lithic::AuthRules::ConditionalValue::Variants, + parameters: + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::OrHash + ).returns(T.attached_class) + end + def self.new( + # The attribute to target. + # + # The following attributes may be targeted: + # + # - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a + # business by the types of goods or services it provides. + # - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all + # ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for + # Netherlands Antilles. + # - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of + # the transaction. + # - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor + # (merchant). + # - `DESCRIPTOR`: Short description of card acceptor. + # - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer + # applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or + # `TOKEN_AUTHENTICATED`. + # - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number + # (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`, + # `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`, + # `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`, + # `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`. + # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer + # fee field in the settlement/cardholder billing currency. This is the amount + # the issuer should authorize against unless the issuer is paying the acquirer + # fee on behalf of the cardholder. Use an integer value. + # - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This + # represents the amount of cash being withdrawn or advanced. Use an integer + # value. + # - `RISK_SCORE`: Network-provided score assessing risk level associated with a + # given authorization. Scores are on a range of 0-999, with 0 representing the + # lowest risk and 999 representing the highest risk. For Visa transactions, + # where the raw score has a range of 0-99, Lithic will normalize the score by + # multiplying the raw score by 10x. Use an integer value. + # - `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the + # trailing 15 minutes before the authorization. Use an integer value. + # - `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the + # trailing hour up and until the authorization. Use an integer value. + # - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the + # trailing 24 hours up and until the authorization. Use an integer value. + # - `CARD_DECLINE_COUNT_15M`: The number of declined transactions on the card in + # the trailing 15 minutes before the authorization. Use an integer value. + # - `CARD_DECLINE_COUNT_1H`: The number of declined transactions on the card in + # the trailing hour up and until the authorization. Use an integer value. + # - `CARD_DECLINE_COUNT_24H`: The number of declined transactions on the card in + # the trailing 24 hours up and until the authorization. Use an integer value. + # - `CARD_STATE`: The current state of the card associated with the transaction. + # Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`, + # `PENDING_FULFILLMENT`. + # - `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction. + # Valid values are `TRUE`, `FALSE`. + # - `PIN_STATUS`: The current state of card's PIN. Valid values are `NOT_SET`, + # `OK`, `BLOCKED`. + # - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the + # source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`, + # `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. + # - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates + # the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`. + # - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address + # data with the cardholder KYC data if it exists. Valid values are `MATCH`, + # `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`. + # - `SERVICE_LOCATION_STATE`: The state/province code (ISO 3166-2) where the + # cardholder received the service, e.g. "NY". When a service location is present + # in the network data, the service location state is used. Otherwise, falls back + # to the card acceptor state. + # - `SERVICE_LOCATION_POSTAL_CODE`: The postal code where the cardholder received + # the service, e.g. "10001". When a service location is present in the network + # data, the service location postal code is used. Otherwise, falls back to the + # card acceptor postal code. + # - `CARD_AGE`: The age of the card in seconds at the time of the authorization. + # Use an integer value. + # - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time + # of the authorization. Use an integer value. For programs where Lithic does not + # manage or retain account holder data, this attribute does not evaluate. + # - `AMOUNT_Z_SCORE`: The z-score of the transaction amount relative to the + # entity's transaction history. Null if fewer than 30 approved transactions in + # the specified window. Requires `parameters.scope` and `parameters.interval`. + # Use a decimal value. + # - `AVG_TRANSACTION_AMOUNT`: The average approved transaction amount for the + # entity over the specified window, in cents. Requires `parameters.scope` and + # `parameters.interval`. Use a decimal value. + # - `STDEV_TRANSACTION_AMOUNT`: The standard deviation of approved transaction + # amounts for the entity over the specified window, in cents. Null if fewer than + # 30 approved transactions in the specified window. Requires `parameters.scope` + # and `parameters.interval`. Use a decimal value. + # - `IS_NEW_COUNTRY`: Whether the transaction's merchant country has not been seen + # in the entity's transaction history. Valid values are `TRUE`, `FALSE`. + # Requires `parameters.scope`. + # - `IS_NEW_MCC`: Whether the transaction's MCC has not been seen in the entity's + # transaction history. Valid values are `TRUE`, `FALSE`. Requires + # `parameters.scope`. + # - `IS_FIRST_TRANSACTION`: Whether this is the first transaction for the entity. + # Valid values are `TRUE`, `FALSE`. Requires `parameters.scope`. + # - `CONSECUTIVE_DECLINES`: The number of consecutive declined transactions for + # the entity over the last 30 days (rolling). Requires `parameters.scope`. Not + # supported for `BUSINESS_ACCOUNT` scope. Use an integer value. + # - `TIME_SINCE_LAST_TRANSACTION`: The number of days since the last approved + # transaction for the entity, rounded to the nearest whole day. Requires + # `parameters.scope`. Use an integer value. + # - `DISTINCT_COUNTRY_COUNT`: The number of distinct merchant countries seen in + # the entity's transaction history. Requires `parameters.scope`. Use an integer + # value. + # - `IS_NEW_MERCHANT`: Whether the card acceptor ID has not been seen in the + # card's approved transaction history (capped at the 1000 most recently seen + # merchants). Valid values are `TRUE`, `FALSE`. Card-scoped only; no + # `parameters` required. + # - `THREE_DS_SUCCESS_RATE`: The 3DS authentication success rate for the card, as + # a percentage from 0.0 to 100.0. Card-scoped only; no `parameters` required. + # Use a decimal value. + # - `TRAVEL_SPEED`: The estimated speed of travel derived from the distance + # between the postal code centers of the last card-present transaction and the + # current transaction, divided by the elapsed time. Null if there is no prior + # card-present transaction, if either postal code cannot be geocoded, or if + # elapsed time is zero. Requires `parameters.unit` set to `MPH` or `KPH`. Use a + # decimal value. + # - `DISTANCE_FROM_LAST_TRANSACTION`: The estimated distance between the postal + # code centers of the last card-present transaction and the current transaction. + # Null if there is no prior card-present transaction or if either postal code + # cannot be geocoded. Requires `parameters.unit` set to `MILES` or `KILOMETERS`. + # Use a decimal value. + attribute:, + # The operation to apply to the attribute + operation:, + # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` + value:, + # Additional parameters for certain attributes. Required when `attribute` is one + # of `AMOUNT_Z_SCORE`, `AVG_TRANSACTION_AMOUNT`, `STDEV_TRANSACTION_AMOUNT`, + # `IS_NEW_COUNTRY`, `IS_NEW_MCC`, `IS_FIRST_TRANSACTION`, `CONSECUTIVE_DECLINES`, + # `TIME_SINCE_LAST_TRANSACTION`, or `DISTINCT_COUNTRY_COUNT` (require `scope`); or + # `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION` (require `unit`). Not used + # for other attributes. + parameters: nil + ) + end + + sig do + override.returns( + { + attribute: + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::OrSymbol, + operation: Lithic::AuthRules::ConditionalOperation::OrSymbol, + value: Lithic::AuthRules::ConditionalValue::Variants, + parameters: + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters + } + ) + end + def to_hash + end + + # The attribute to target. + # + # The following attributes may be targeted: + # + # - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a + # business by the types of goods or services it provides. + # - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all + # ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for + # Netherlands Antilles. + # - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of + # the transaction. + # - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor + # (merchant). + # - `DESCRIPTOR`: Short description of card acceptor. + # - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer + # applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or + # `TOKEN_AUTHENTICATED`. + # - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number + # (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`, + # `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`, + # `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`, + # `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`. + # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer + # fee field in the settlement/cardholder billing currency. This is the amount + # the issuer should authorize against unless the issuer is paying the acquirer + # fee on behalf of the cardholder. Use an integer value. + # - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This + # represents the amount of cash being withdrawn or advanced. Use an integer + # value. + # - `RISK_SCORE`: Network-provided score assessing risk level associated with a + # given authorization. Scores are on a range of 0-999, with 0 representing the + # lowest risk and 999 representing the highest risk. For Visa transactions, + # where the raw score has a range of 0-99, Lithic will normalize the score by + # multiplying the raw score by 10x. Use an integer value. + # - `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the + # trailing 15 minutes before the authorization. Use an integer value. + # - `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the + # trailing hour up and until the authorization. Use an integer value. + # - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the + # trailing 24 hours up and until the authorization. Use an integer value. + # - `CARD_DECLINE_COUNT_15M`: The number of declined transactions on the card in + # the trailing 15 minutes before the authorization. Use an integer value. + # - `CARD_DECLINE_COUNT_1H`: The number of declined transactions on the card in + # the trailing hour up and until the authorization. Use an integer value. + # - `CARD_DECLINE_COUNT_24H`: The number of declined transactions on the card in + # the trailing 24 hours up and until the authorization. Use an integer value. + # - `CARD_STATE`: The current state of the card associated with the transaction. + # Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`, + # `PENDING_FULFILLMENT`. + # - `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction. + # Valid values are `TRUE`, `FALSE`. + # - `PIN_STATUS`: The current state of card's PIN. Valid values are `NOT_SET`, + # `OK`, `BLOCKED`. + # - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the + # source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`, + # `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. + # - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates + # the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`. + # - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address + # data with the cardholder KYC data if it exists. Valid values are `MATCH`, + # `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`. + # - `SERVICE_LOCATION_STATE`: The state/province code (ISO 3166-2) where the + # cardholder received the service, e.g. "NY". When a service location is present + # in the network data, the service location state is used. Otherwise, falls back + # to the card acceptor state. + # - `SERVICE_LOCATION_POSTAL_CODE`: The postal code where the cardholder received + # the service, e.g. "10001". When a service location is present in the network + # data, the service location postal code is used. Otherwise, falls back to the + # card acceptor postal code. + # - `CARD_AGE`: The age of the card in seconds at the time of the authorization. + # Use an integer value. + # - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time + # of the authorization. Use an integer value. For programs where Lithic does not + # manage or retain account holder data, this attribute does not evaluate. + # - `AMOUNT_Z_SCORE`: The z-score of the transaction amount relative to the + # entity's transaction history. Null if fewer than 30 approved transactions in + # the specified window. Requires `parameters.scope` and `parameters.interval`. + # Use a decimal value. + # - `AVG_TRANSACTION_AMOUNT`: The average approved transaction amount for the + # entity over the specified window, in cents. Requires `parameters.scope` and + # `parameters.interval`. Use a decimal value. + # - `STDEV_TRANSACTION_AMOUNT`: The standard deviation of approved transaction + # amounts for the entity over the specified window, in cents. Null if fewer than + # 30 approved transactions in the specified window. Requires `parameters.scope` + # and `parameters.interval`. Use a decimal value. + # - `IS_NEW_COUNTRY`: Whether the transaction's merchant country has not been seen + # in the entity's transaction history. Valid values are `TRUE`, `FALSE`. + # Requires `parameters.scope`. + # - `IS_NEW_MCC`: Whether the transaction's MCC has not been seen in the entity's + # transaction history. Valid values are `TRUE`, `FALSE`. Requires + # `parameters.scope`. + # - `IS_FIRST_TRANSACTION`: Whether this is the first transaction for the entity. + # Valid values are `TRUE`, `FALSE`. Requires `parameters.scope`. + # - `CONSECUTIVE_DECLINES`: The number of consecutive declined transactions for + # the entity over the last 30 days (rolling). Requires `parameters.scope`. Not + # supported for `BUSINESS_ACCOUNT` scope. Use an integer value. + # - `TIME_SINCE_LAST_TRANSACTION`: The number of days since the last approved + # transaction for the entity, rounded to the nearest whole day. Requires + # `parameters.scope`. Use an integer value. + # - `DISTINCT_COUNTRY_COUNT`: The number of distinct merchant countries seen in + # the entity's transaction history. Requires `parameters.scope`. Use an integer + # value. + # - `IS_NEW_MERCHANT`: Whether the card acceptor ID has not been seen in the + # card's approved transaction history (capped at the 1000 most recently seen + # merchants). Valid values are `TRUE`, `FALSE`. Card-scoped only; no + # `parameters` required. + # - `THREE_DS_SUCCESS_RATE`: The 3DS authentication success rate for the card, as + # a percentage from 0.0 to 100.0. Card-scoped only; no `parameters` required. + # Use a decimal value. + # - `TRAVEL_SPEED`: The estimated speed of travel derived from the distance + # between the postal code centers of the last card-present transaction and the + # current transaction, divided by the elapsed time. Null if there is no prior + # card-present transaction, if either postal code cannot be geocoded, or if + # elapsed time is zero. Requires `parameters.unit` set to `MPH` or `KPH`. Use a + # decimal value. + # - `DISTANCE_FROM_LAST_TRANSACTION`: The estimated distance between the postal + # code centers of the last card-present transaction and the current transaction. + # Null if there is no prior card-present transaction or if either postal code + # cannot be geocoded. Requires `parameters.unit` set to `MILES` or `KILOMETERS`. + # Use a decimal value. + module Attribute + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + MCC = + T.let( + :MCC, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + COUNTRY = + T.let( + :COUNTRY, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + CURRENCY = + T.let( + :CURRENCY, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + MERCHANT_ID = + T.let( + :MERCHANT_ID, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + DESCRIPTOR = + T.let( + :DESCRIPTOR, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + LIABILITY_SHIFT = + T.let( + :LIABILITY_SHIFT, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + PAN_ENTRY_MODE = + T.let( + :PAN_ENTRY_MODE, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + TRANSACTION_AMOUNT = + T.let( + :TRANSACTION_AMOUNT, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + CASH_AMOUNT = + T.let( + :CASH_AMOUNT, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + RISK_SCORE = + T.let( + :RISK_SCORE, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + CARD_TRANSACTION_COUNT_15_M = + T.let( + :CARD_TRANSACTION_COUNT_15M, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + CARD_TRANSACTION_COUNT_1_H = + T.let( + :CARD_TRANSACTION_COUNT_1H, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + CARD_TRANSACTION_COUNT_24_H = + T.let( + :CARD_TRANSACTION_COUNT_24H, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + CARD_DECLINE_COUNT_15_M = + T.let( + :CARD_DECLINE_COUNT_15M, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + CARD_DECLINE_COUNT_1_H = + T.let( + :CARD_DECLINE_COUNT_1H, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + CARD_DECLINE_COUNT_24_H = + T.let( + :CARD_DECLINE_COUNT_24H, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + CARD_STATE = + T.let( + :CARD_STATE, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + PIN_ENTERED = + T.let( + :PIN_ENTERED, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + PIN_STATUS = + T.let( + :PIN_STATUS, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + WALLET_TYPE = + T.let( + :WALLET_TYPE, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + TRANSACTION_INITIATOR = + T.let( + :TRANSACTION_INITIATOR, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + ADDRESS_MATCH = + T.let( + :ADDRESS_MATCH, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + SERVICE_LOCATION_STATE = + T.let( + :SERVICE_LOCATION_STATE, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + SERVICE_LOCATION_POSTAL_CODE = + T.let( + :SERVICE_LOCATION_POSTAL_CODE, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + CARD_AGE = + T.let( + :CARD_AGE, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + ACCOUNT_AGE = + T.let( + :ACCOUNT_AGE, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + AMOUNT_Z_SCORE = + T.let( + :AMOUNT_Z_SCORE, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + AVG_TRANSACTION_AMOUNT = + T.let( + :AVG_TRANSACTION_AMOUNT, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + STDEV_TRANSACTION_AMOUNT = + T.let( + :STDEV_TRANSACTION_AMOUNT, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + IS_NEW_COUNTRY = + T.let( + :IS_NEW_COUNTRY, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + IS_NEW_MCC = + T.let( + :IS_NEW_MCC, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + IS_FIRST_TRANSACTION = + T.let( + :IS_FIRST_TRANSACTION, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + CONSECUTIVE_DECLINES = + T.let( + :CONSECUTIVE_DECLINES, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + TIME_SINCE_LAST_TRANSACTION = + T.let( + :TIME_SINCE_LAST_TRANSACTION, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + DISTINCT_COUNTRY_COUNT = + T.let( + :DISTINCT_COUNTRY_COUNT, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + IS_NEW_MERCHANT = + T.let( + :IS_NEW_MERCHANT, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + THREE_DS_SUCCESS_RATE = + T.let( + :THREE_DS_SUCCESS_RATE, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + TRAVEL_SPEED = + T.let( + :TRAVEL_SPEED, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + DISTANCE_FROM_LAST_TRANSACTION = + T.let( + :DISTANCE_FROM_LAST_TRANSACTION, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Attribute::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Parameters < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters, + Lithic::Internal::AnyHash + ) + end + + # The time window for statistical attributes (`AMOUNT_Z_SCORE`, + # `AVG_TRANSACTION_AMOUNT`, `STDEV_TRANSACTION_AMOUNT`). Use `LIFETIME` for + # all-time history or a specific window (`7D`, `30D`, `90D`). + sig do + returns( + T.nilable( + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Interval::OrSymbol + ) + ) + end + attr_reader :interval + + sig do + params( + interval: + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Interval::OrSymbol + ).void + end + attr_writer :interval + + # The entity scope to evaluate the attribute against. + sig do + returns( + T.nilable( + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Scope::OrSymbol + ) + ) + end + attr_reader :scope + + sig do + params( + scope: + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Scope::OrSymbol + ).void + end + attr_writer :scope + + # The unit for impossible travel attributes. Required when `attribute` is + # `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION`. + # + # For `TRAVEL_SPEED`: `MPH` (miles per hour) or `KPH` (kilometers per hour). + # + # For `DISTANCE_FROM_LAST_TRANSACTION`: `MILES` or `KILOMETERS`. + sig do + returns( + T.nilable( + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Unit::OrSymbol + ) + ) + end + attr_reader :unit + + sig do + params( + unit: + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Unit::OrSymbol + ).void + end + attr_writer :unit + + # Additional parameters for certain attributes. Required when `attribute` is one + # of `AMOUNT_Z_SCORE`, `AVG_TRANSACTION_AMOUNT`, `STDEV_TRANSACTION_AMOUNT`, + # `IS_NEW_COUNTRY`, `IS_NEW_MCC`, `IS_FIRST_TRANSACTION`, `CONSECUTIVE_DECLINES`, + # `TIME_SINCE_LAST_TRANSACTION`, or `DISTINCT_COUNTRY_COUNT` (require `scope`); or + # `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION` (require `unit`). Not used + # for other attributes. + sig do + params( + interval: + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Interval::OrSymbol, + scope: + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Scope::OrSymbol, + unit: + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Unit::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # The time window for statistical attributes (`AMOUNT_Z_SCORE`, + # `AVG_TRANSACTION_AMOUNT`, `STDEV_TRANSACTION_AMOUNT`). Use `LIFETIME` for + # all-time history or a specific window (`7D`, `30D`, `90D`). + interval: nil, + # The entity scope to evaluate the attribute against. + scope: nil, + # The unit for impossible travel attributes. Required when `attribute` is + # `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION`. + # + # For `TRAVEL_SPEED`: `MPH` (miles per hour) or `KPH` (kilometers per hour). + # + # For `DISTANCE_FROM_LAST_TRANSACTION`: `MILES` or `KILOMETERS`. + unit: nil + ) + end + + sig do + override.returns( + { + interval: + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Interval::OrSymbol, + scope: + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Scope::OrSymbol, + unit: + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Unit::OrSymbol + } + ) + end + def to_hash + end + + # The time window for statistical attributes (`AMOUNT_Z_SCORE`, + # `AVG_TRANSACTION_AMOUNT`, `STDEV_TRANSACTION_AMOUNT`). Use `LIFETIME` for + # all-time history or a specific window (`7D`, `30D`, `90D`). + module Interval + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Interval + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LIFETIME = + T.let( + :LIFETIME, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Interval::TaggedSymbol + ) + INTERVAL_7_D = + T.let( + :"7D", + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Interval::TaggedSymbol + ) + INTERVAL_30_D = + T.let( + :"30D", + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Interval::TaggedSymbol + ) + INTERVAL_90_D = + T.let( + :"90D", + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Interval::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Interval::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The entity scope to evaluate the attribute against. + module Scope + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Scope + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CARD = + T.let( + :CARD, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Scope::TaggedSymbol + ) + ACCOUNT = + T.let( + :ACCOUNT, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Scope::TaggedSymbol + ) + BUSINESS_ACCOUNT = + T.let( + :BUSINESS_ACCOUNT, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Scope::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Scope::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The unit for impossible travel attributes. Required when `attribute` is + # `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION`. + # + # For `TRAVEL_SPEED`: `MPH` (miles per hour) or `KPH` (kilometers per hour). + # + # For `DISTANCE_FROM_LAST_TRANSACTION`: `MILES` or `KILOMETERS`. + module Unit + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Unit + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + MPH = + T.let( + :MPH, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Unit::TaggedSymbol + ) + KPH = + T.let( + :KPH, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Unit::TaggedSymbol + ) + MILES = + T.let( + :MILES, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Unit::TaggedSymbol + ) + KILOMETERS = + T.let( + :KILOMETERS, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Unit::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::Unit::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + end + end + end +end diff --git a/rbi/lithic/models/auth_rules/v2_create_params.rbi b/rbi/lithic/models/auth_rules/v2_create_params.rbi index 258e3066..25fc2320 100644 --- a/rbi/lithic/models/auth_rules/v2_create_params.rbi +++ b/rbi/lithic/models/auth_rules/v2_create_params.rbi @@ -86,7 +86,8 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, - Lithic::AuthRules::TypescriptCodeParameters + Lithic::AuthRules::TypescriptCodeParameters, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ) ) end @@ -154,7 +155,8 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters::OrHash, Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash, - Lithic::AuthRules::TypescriptCodeParameters::OrHash + Lithic::AuthRules::TypescriptCodeParameters::OrHash, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::OrHash ), type: Lithic::AuthRules::V2CreateParams::Body::AccountLevelRule::Type::OrSymbol, @@ -206,7 +208,8 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, - Lithic::AuthRules::TypescriptCodeParameters + Lithic::AuthRules::TypescriptCodeParameters, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ), type: Lithic::AuthRules::V2CreateParams::Body::AccountLevelRule::Type::OrSymbol, @@ -235,7 +238,8 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, - Lithic::AuthRules::TypescriptCodeParameters + Lithic::AuthRules::TypescriptCodeParameters, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ) end @@ -339,7 +343,8 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, - Lithic::AuthRules::TypescriptCodeParameters + Lithic::AuthRules::TypescriptCodeParameters, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ) ) end @@ -394,7 +399,8 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters::OrHash, Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash, - Lithic::AuthRules::TypescriptCodeParameters::OrHash + Lithic::AuthRules::TypescriptCodeParameters::OrHash, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::OrHash ), type: Lithic::AuthRules::V2CreateParams::Body::CardLevelRule::Type::OrSymbol, @@ -443,7 +449,8 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, - Lithic::AuthRules::TypescriptCodeParameters + Lithic::AuthRules::TypescriptCodeParameters, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ), type: Lithic::AuthRules::V2CreateParams::Body::CardLevelRule::Type::OrSymbol, @@ -470,7 +477,8 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, - Lithic::AuthRules::TypescriptCodeParameters + Lithic::AuthRules::TypescriptCodeParameters, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ) end @@ -570,7 +578,8 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, - Lithic::AuthRules::TypescriptCodeParameters + Lithic::AuthRules::TypescriptCodeParameters, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ) ) end @@ -651,7 +660,8 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters::OrHash, Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash, - Lithic::AuthRules::TypescriptCodeParameters::OrHash + Lithic::AuthRules::TypescriptCodeParameters::OrHash, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::OrHash ), program_level: T::Boolean, type: @@ -709,7 +719,8 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, - Lithic::AuthRules::TypescriptCodeParameters + Lithic::AuthRules::TypescriptCodeParameters, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ), program_level: T::Boolean, type: @@ -740,7 +751,8 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, - Lithic::AuthRules::TypescriptCodeParameters + Lithic::AuthRules::TypescriptCodeParameters, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ) end diff --git a/rbi/lithic/models/auth_rules/v2_draft_params.rbi b/rbi/lithic/models/auth_rules/v2_draft_params.rbi index 68c08f36..d7988bbd 100644 --- a/rbi/lithic/models/auth_rules/v2_draft_params.rbi +++ b/rbi/lithic/models/auth_rules/v2_draft_params.rbi @@ -28,7 +28,8 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, - Lithic::AuthRules::TypescriptCodeParameters + Lithic::AuthRules::TypescriptCodeParameters, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ) ) ) @@ -49,7 +50,8 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters::OrHash, Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash, - Lithic::AuthRules::TypescriptCodeParameters::OrHash + Lithic::AuthRules::TypescriptCodeParameters::OrHash, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::OrHash ) ), request_options: Lithic::RequestOptions::OrHash @@ -78,7 +80,8 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, - Lithic::AuthRules::TypescriptCodeParameters + Lithic::AuthRules::TypescriptCodeParameters, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ) ), request_options: Lithic::RequestOptions @@ -103,7 +106,8 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, - Lithic::AuthRules::TypescriptCodeParameters + Lithic::AuthRules::TypescriptCodeParameters, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters ) end diff --git a/rbi/lithic/resources/auth_rules/v2.rbi b/rbi/lithic/resources/auth_rules/v2.rbi index 4dd0cb26..e1254643 100644 --- a/rbi/lithic/resources/auth_rules/v2.rbi +++ b/rbi/lithic/resources/auth_rules/v2.rbi @@ -123,7 +123,8 @@ module Lithic Lithic::AuthRules::ConditionalACHActionParameters::OrHash, Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash, - Lithic::AuthRules::TypescriptCodeParameters::OrHash + Lithic::AuthRules::TypescriptCodeParameters::OrHash, + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::OrHash ) ), request_options: Lithic::RequestOptions::OrHash diff --git a/sig/lithic/models/auth_rules/auth_rule.rbs b/sig/lithic/models/auth_rules/auth_rule.rbs index cb228886..51d9757b 100644 --- a/sig/lithic/models/auth_rules/auth_rule.rbs +++ b/sig/lithic/models/auth_rules/auth_rule.rbs @@ -128,6 +128,7 @@ module Lithic | Lithic::AuthRules::ConditionalTokenizationActionParameters | Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters | Lithic::AuthRules::TypescriptCodeParameters + | Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters module Parameters extend Lithic::Internal::Type::Union @@ -177,6 +178,7 @@ module Lithic | Lithic::AuthRules::ConditionalTokenizationActionParameters | Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters | Lithic::AuthRules::TypescriptCodeParameters + | Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters module Parameters extend Lithic::Internal::Type::Union diff --git a/sig/lithic/models/auth_rules/auth_rule_version.rbs b/sig/lithic/models/auth_rules/auth_rule_version.rbs index 15562cf9..0798d789 100644 --- a/sig/lithic/models/auth_rules/auth_rule_version.rbs +++ b/sig/lithic/models/auth_rules/auth_rule_version.rbs @@ -44,6 +44,7 @@ module Lithic | Lithic::AuthRules::ConditionalTokenizationActionParameters | Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters | Lithic::AuthRules::TypescriptCodeParameters + | Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters module Parameters extend Lithic::Internal::Type::Union diff --git a/sig/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbs b/sig/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbs new file mode 100644 index 00000000..78663ca9 --- /dev/null +++ b/sig/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbs @@ -0,0 +1,276 @@ +module Lithic + module Models + module AuthRules + type conditional_authorization_adjustment_parameters = + { + adjustment: Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment, + conditions: ::Array[Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition] + } + + class ConditionalAuthorizationAdjustmentParameters < Lithic::Internal::Type::BaseModel + attr_accessor adjustment: Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment + + attr_accessor conditions: ::Array[Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition] + + def initialize: ( + adjustment: Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment, + conditions: ::Array[Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition] + ) -> void + + def to_hash: -> { + adjustment: Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment, + conditions: ::Array[Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition] + } + + type adjustment = + { + mode: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::mode, + type: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::type_, + value: Integer + } + + class Adjustment < Lithic::Internal::Type::BaseModel + attr_accessor mode: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::mode + + attr_accessor type: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::type_ + + attr_accessor value: Integer + + def initialize: ( + mode: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::mode, + type: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::type_, + value: Integer + ) -> void + + def to_hash: -> { + mode: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::mode, + type: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::type_, + value: Integer + } + + type mode = :REPLACE_WITH_AMOUNT | :ADD_PERCENTAGE | :ADD_AMOUNT + + module Mode + extend Lithic::Internal::Type::Enum + + REPLACE_WITH_AMOUNT: :REPLACE_WITH_AMOUNT + ADD_PERCENTAGE: :ADD_PERCENTAGE + ADD_AMOUNT: :ADD_AMOUNT + + def self?.values: -> ::Array[Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::mode] + end + + type type_ = :HOLD_ADJUSTMENT + + module Type + extend Lithic::Internal::Type::Enum + + HOLD_ADJUSTMENT: :HOLD_ADJUSTMENT + + def self?.values: -> ::Array[Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Adjustment::type_] + end + end + + type condition = + { + attribute: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::attribute, + operation: Lithic::Models::AuthRules::conditional_operation, + value: Lithic::Models::AuthRules::conditional_value, + parameters: Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters + } + + class Condition < Lithic::Internal::Type::BaseModel + attr_accessor attribute: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::attribute + + attr_accessor operation: Lithic::Models::AuthRules::conditional_operation + + attr_accessor value: Lithic::Models::AuthRules::conditional_value + + attr_reader parameters: Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters? + + def parameters=: ( + Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters + ) -> Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters + + def initialize: ( + attribute: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::attribute, + operation: Lithic::Models::AuthRules::conditional_operation, + value: Lithic::Models::AuthRules::conditional_value, + ?parameters: Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters + ) -> void + + def to_hash: -> { + attribute: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::attribute, + operation: Lithic::Models::AuthRules::conditional_operation, + value: Lithic::Models::AuthRules::conditional_value, + parameters: Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters + } + + type attribute = + :MCC + | :COUNTRY + | :CURRENCY + | :MERCHANT_ID + | :DESCRIPTOR + | :LIABILITY_SHIFT + | :PAN_ENTRY_MODE + | :TRANSACTION_AMOUNT + | :CASH_AMOUNT + | :RISK_SCORE + | :CARD_TRANSACTION_COUNT_15M + | :CARD_TRANSACTION_COUNT_1H + | :CARD_TRANSACTION_COUNT_24H + | :CARD_DECLINE_COUNT_15M + | :CARD_DECLINE_COUNT_1H + | :CARD_DECLINE_COUNT_24H + | :CARD_STATE + | :PIN_ENTERED + | :PIN_STATUS + | :WALLET_TYPE + | :TRANSACTION_INITIATOR + | :ADDRESS_MATCH + | :SERVICE_LOCATION_STATE + | :SERVICE_LOCATION_POSTAL_CODE + | :CARD_AGE + | :ACCOUNT_AGE + | :AMOUNT_Z_SCORE + | :AVG_TRANSACTION_AMOUNT + | :STDEV_TRANSACTION_AMOUNT + | :IS_NEW_COUNTRY + | :IS_NEW_MCC + | :IS_FIRST_TRANSACTION + | :CONSECUTIVE_DECLINES + | :TIME_SINCE_LAST_TRANSACTION + | :DISTINCT_COUNTRY_COUNT + | :IS_NEW_MERCHANT + | :THREE_DS_SUCCESS_RATE + | :TRAVEL_SPEED + | :DISTANCE_FROM_LAST_TRANSACTION + + module Attribute + extend Lithic::Internal::Type::Enum + + MCC: :MCC + COUNTRY: :COUNTRY + CURRENCY: :CURRENCY + MERCHANT_ID: :MERCHANT_ID + DESCRIPTOR: :DESCRIPTOR + LIABILITY_SHIFT: :LIABILITY_SHIFT + PAN_ENTRY_MODE: :PAN_ENTRY_MODE + TRANSACTION_AMOUNT: :TRANSACTION_AMOUNT + CASH_AMOUNT: :CASH_AMOUNT + RISK_SCORE: :RISK_SCORE + CARD_TRANSACTION_COUNT_15_M: :CARD_TRANSACTION_COUNT_15M + CARD_TRANSACTION_COUNT_1_H: :CARD_TRANSACTION_COUNT_1H + CARD_TRANSACTION_COUNT_24_H: :CARD_TRANSACTION_COUNT_24H + CARD_DECLINE_COUNT_15_M: :CARD_DECLINE_COUNT_15M + CARD_DECLINE_COUNT_1_H: :CARD_DECLINE_COUNT_1H + CARD_DECLINE_COUNT_24_H: :CARD_DECLINE_COUNT_24H + CARD_STATE: :CARD_STATE + PIN_ENTERED: :PIN_ENTERED + PIN_STATUS: :PIN_STATUS + WALLET_TYPE: :WALLET_TYPE + TRANSACTION_INITIATOR: :TRANSACTION_INITIATOR + ADDRESS_MATCH: :ADDRESS_MATCH + SERVICE_LOCATION_STATE: :SERVICE_LOCATION_STATE + SERVICE_LOCATION_POSTAL_CODE: :SERVICE_LOCATION_POSTAL_CODE + CARD_AGE: :CARD_AGE + ACCOUNT_AGE: :ACCOUNT_AGE + AMOUNT_Z_SCORE: :AMOUNT_Z_SCORE + AVG_TRANSACTION_AMOUNT: :AVG_TRANSACTION_AMOUNT + STDEV_TRANSACTION_AMOUNT: :STDEV_TRANSACTION_AMOUNT + IS_NEW_COUNTRY: :IS_NEW_COUNTRY + IS_NEW_MCC: :IS_NEW_MCC + IS_FIRST_TRANSACTION: :IS_FIRST_TRANSACTION + CONSECUTIVE_DECLINES: :CONSECUTIVE_DECLINES + TIME_SINCE_LAST_TRANSACTION: :TIME_SINCE_LAST_TRANSACTION + DISTINCT_COUNTRY_COUNT: :DISTINCT_COUNTRY_COUNT + IS_NEW_MERCHANT: :IS_NEW_MERCHANT + THREE_DS_SUCCESS_RATE: :THREE_DS_SUCCESS_RATE + TRAVEL_SPEED: :TRAVEL_SPEED + DISTANCE_FROM_LAST_TRANSACTION: :DISTANCE_FROM_LAST_TRANSACTION + + def self?.values: -> ::Array[Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::attribute] + end + + type parameters = + { + interval: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::interval, + scope: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::scope, + unit: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::unit + } + + class Parameters < Lithic::Internal::Type::BaseModel + attr_reader interval: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::interval? + + def interval=: ( + Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::interval + ) -> Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::interval + + attr_reader scope: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::scope? + + def scope=: ( + Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::scope + ) -> Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::scope + + attr_reader unit: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::unit? + + def unit=: ( + Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::unit + ) -> Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::unit + + def initialize: ( + ?interval: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::interval, + ?scope: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::scope, + ?unit: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::unit + ) -> void + + def to_hash: -> { + interval: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::interval, + scope: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::scope, + unit: Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::unit + } + + type interval = :LIFETIME | :"7D" | :"30D" | :"90D" + + module Interval + extend Lithic::Internal::Type::Enum + + LIFETIME: :LIFETIME + INTERVAL_7_D: :"7D" + INTERVAL_30_D: :"30D" + INTERVAL_90_D: :"90D" + + def self?.values: -> ::Array[Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::interval] + end + + type scope = :CARD | :ACCOUNT | :BUSINESS_ACCOUNT + + module Scope + extend Lithic::Internal::Type::Enum + + CARD: :CARD + ACCOUNT: :ACCOUNT + BUSINESS_ACCOUNT: :BUSINESS_ACCOUNT + + def self?.values: -> ::Array[Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::scope] + end + + type unit = :MPH | :KPH | :MILES | :KILOMETERS + + module Unit + extend Lithic::Internal::Type::Enum + + MPH: :MPH + KPH: :KPH + MILES: :MILES + KILOMETERS: :KILOMETERS + + def self?.values: -> ::Array[Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters::Condition::Parameters::unit] + end + end + end + end + end + end +end diff --git a/sig/lithic/models/auth_rules/v2_create_params.rbs b/sig/lithic/models/auth_rules/v2_create_params.rbs index ac85aca8..1a8c1ee4 100644 --- a/sig/lithic/models/auth_rules/v2_create_params.rbs +++ b/sig/lithic/models/auth_rules/v2_create_params.rbs @@ -88,6 +88,7 @@ module Lithic | Lithic::AuthRules::ConditionalTokenizationActionParameters | Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters | Lithic::AuthRules::TypescriptCodeParameters + | Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters module Parameters extend Lithic::Internal::Type::Union @@ -165,6 +166,7 @@ module Lithic | Lithic::AuthRules::ConditionalTokenizationActionParameters | Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters | Lithic::AuthRules::TypescriptCodeParameters + | Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters module Parameters extend Lithic::Internal::Type::Union @@ -265,6 +267,7 @@ module Lithic | Lithic::AuthRules::ConditionalTokenizationActionParameters | Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters | Lithic::AuthRules::TypescriptCodeParameters + | Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters module Parameters extend Lithic::Internal::Type::Union diff --git a/sig/lithic/models/auth_rules/v2_draft_params.rbs b/sig/lithic/models/auth_rules/v2_draft_params.rbs index 7f429771..4398a1bf 100644 --- a/sig/lithic/models/auth_rules/v2_draft_params.rbs +++ b/sig/lithic/models/auth_rules/v2_draft_params.rbs @@ -38,6 +38,7 @@ module Lithic | Lithic::AuthRules::ConditionalTokenizationActionParameters | Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters | Lithic::AuthRules::TypescriptCodeParameters + | Lithic::AuthRules::ConditionalAuthorizationAdjustmentParameters module Parameters extend Lithic::Internal::Type::Union From 22272a2f4fb1a12d82ee2517a74f12c1e0e9bb70 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 27 May 2026 17:46:57 +0000 Subject: [PATCH 14/14] release: 0.15.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 26 ++++++++++++++++++++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/lithic/version.rb | 2 +- 5 files changed, 30 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a26ebfc1..8f3e0a49 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.14.0" + ".": "0.15.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 817f72a6..e01432b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,31 @@ # Changelog +## 0.15.0 (2026-05-27) + +Full Changelog: [v0.14.0...v0.15.0](https://github.com/lithic-com/lithic-ruby/compare/v0.14.0...v0.15.0) + +### Features + +* **api:** Add authorization challenge response endpoint and webhook ([a270862](https://github.com/lithic-com/lithic-ruby/commit/a270862d8522a456f88111f92d91d7adfe285b96)) +* **api:** add INVALID_PAN value to TokenizationDeclineReason enum ([751f176](https://github.com/lithic-com/lithic-ruby/commit/751f176d6bd4a895c00edce99cb22055001c5597)) +* **api:** Add OUT_OF_BAND challenge method and DECLINED status to Authorization ([886bb10](https://github.com/lithic-com/lithic-ruby/commit/886bb1020fcc81e4862cbceee98fcb8eb7ac9b35)) +* **api:** Add pause external bank account endpoint ([1f9fdd2](https://github.com/lithic-com/lithic-ruby/commit/1f9fdd2ba99353edb1560877ca098664e4fbb1a9)) +* **api:** Add schemas for authorization adjustment rules ([61998a2](https://github.com/lithic-com/lithic-ruby/commit/61998a2d54a2eb05f1fe517e34bfbedbe1dbd02c)) + + +### Bug Fixes + +* **client:** elide content type header on requests without body ([d3a58d5](https://github.com/lithic-com/lithic-ruby/commit/d3a58d57130f65c30e56d39ba380cf8fe04e49da)) +* **types:** correct value type from Integer to Float in auth rules ([c8a51d0](https://github.com/lithic-com/lithic-ruby/commit/c8a51d0231516251e038f074e3fc364222570f57)) +* **types:** make cardholder_currency nullable in CardProgram ([89ded5f](https://github.com/lithic-com/lithic-ruby/commit/89ded5fe6729b1e0db8cb280e1da402b9a1a01b8)) +* **types:** make external_id, naics_code nullable in enrollment, parent_company in kyb ([1128d8d](https://github.com/lithic-com/lithic-ruby/commit/1128d8df654667a9a2db5ec75e5a5eb9755c75e2)) +* **types:** make fields nullable across balance/statement/settlement/etc, add enum values ([6259d4f](https://github.com/lithic-com/lithic-ruby/commit/6259d4fa0c42b77ce2f7abe4962c64ca9eb53117)) + + +### Documentation + +* **api:** clarify ACCOUNT_AGE behavior in auth_rules conditional parameters ([8b7bfc8](https://github.com/lithic-com/lithic-ruby/commit/8b7bfc850151d17038fb50aecc6509aa81196e77)) + ## 0.14.0 (2026-05-08) Full Changelog: [v0.13.0...v0.14.0](https://github.com/lithic-com/lithic-ruby/compare/v0.13.0...v0.14.0) diff --git a/Gemfile.lock b/Gemfile.lock index eb19ce5f..e7eac2d0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - lithic (0.14.0) + lithic (0.15.0) cgi connection_pool diff --git a/README.md b/README.md index e73f009a..15a508f1 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.14.0" +gem "lithic", "~> 0.15.0" ``` diff --git a/lib/lithic/version.rb b/lib/lithic/version.rb index 0d63350b..ae44fd3a 100644 --- a/lib/lithic/version.rb +++ b/lib/lithic/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Lithic - VERSION = "0.14.0" + VERSION = "0.15.0" end