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: | diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a26ebfc1..54c4d98a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.14.0" + ".": "0.14.1" } \ No newline at end of file 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/CHANGELOG.md b/CHANGELOG.md index 817f72a6..5114f9f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 0.14.1 (2026-05-14) + +Full Changelog: [v0.14.0...v0.14.1](https://github.com/lithic-com/lithic-ruby/compare/v0.14.0...v0.14.1) + +### 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)) + ## 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..6e0b528c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - lithic (0.14.0) + lithic (0.14.1) cgi connection_pool diff --git a/README.md b/README.md index e73f009a..9d44d506 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.14.1" ``` 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/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/lib/lithic/version.rb b/lib/lithic/version.rb index 0d63350b..2fa76f44 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.14.1" end 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 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