From 522b70bf3467b11b647dc7a1c0962ddb021304dc 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:08 +0000 Subject: [PATCH 1/3] 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 | 20 ++++++++++---------- .github/workflows/publish-sonatype.yml | 6 +++--- .github/workflows/release-doctor.yml | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 906878cbc..dac8da6a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,10 +22,10 @@ jobs: if: (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 Java - uses: actions/setup-java@v5 + uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 with: distribution: temurin java-version: | @@ -34,7 +34,7 @@ jobs: cache: gradle - name: Set up Gradle - uses: gradle/actions/setup-gradle@v4 + uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4.4.3 - name: Run lints run: ./scripts/lint @@ -49,10 +49,10 @@ jobs: if: (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 Java - uses: actions/setup-java@v5 + uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 with: distribution: temurin java-version: | @@ -61,7 +61,7 @@ jobs: cache: gradle - name: Set up Gradle - uses: gradle/actions/setup-gradle@v4 + uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4.4.3 - name: Build SDK run: ./scripts/build @@ -71,7 +71,7 @@ jobs: github.repository == 'stainless-sdks/lithic-java' && !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()); @@ -91,10 +91,10 @@ jobs: runs-on: ${{ github.repository == 'stainless-sdks/lithic-java' && '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 Java - uses: actions/setup-java@v5 + uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 with: distribution: temurin java-version: | @@ -103,7 +103,7 @@ jobs: cache: gradle - name: Set up Gradle - uses: gradle/gradle-build-action@v2 + uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0 - name: Run tests run: ./scripts/test diff --git a/.github/workflows/publish-sonatype.yml b/.github/workflows/publish-sonatype.yml index 68a62dbb2..6d4b3b1d6 100644 --- a/.github/workflows/publish-sonatype.yml +++ b/.github/workflows/publish-sonatype.yml @@ -14,10 +14,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Java - uses: actions/setup-java@v5 + uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 with: distribution: temurin java-version: | @@ -26,7 +26,7 @@ jobs: cache: gradle - name: Set up Gradle - uses: gradle/gradle-build-action@v2 + uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0 - name: Publish to Sonatype run: |- diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 8cee17619..627c25556 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -12,7 +12,7 @@ jobs: if: github.repository == 'lithic-com/lithic-java' && (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 57b5b279f5c23550dbc40946227d483410ca0c14 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:14 +0000 Subject: [PATCH 2/3] fix(types): change number from Long to Double in ConditionalValue and conditional actions --- .stats.yml | 4 +- .../lithic/api/models/AuthRuleCondition.kt | 5 +- .../models/Conditional3dsActionParameters.kt | 18 ++- .../models/ConditionalAchActionParameters.kt | 14 +- ...onditionalAuthorizationActionParameters.kt | 135 ++++++++++-------- ...alCardTransactionUpdateActionParameters.kt | 47 +++--- ...ConditionalTokenizationActionParameters.kt | 21 ++- .../com/lithic/api/models/ConditionalValue.kt | 54 +++---- .../lithic/api/models/ConditionalValueTest.kt | 36 ++++- 9 files changed, 209 insertions(+), 125 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9a9408504..f2e6324d6 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/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleCondition.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleCondition.kt index 24b8c8aba..ef2ed837c 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleCondition.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleCondition.kt @@ -258,8 +258,11 @@ private constructor( /** Alias for calling [value] with `ConditionalValue.ofRegex(regex)`. */ fun value(regex: String) = value(ConditionalValue.ofRegex(regex)) + /** Alias for calling [value] with `ConditionalValue.ofInteger(integer)`. */ + fun value(integer: Long) = value(ConditionalValue.ofInteger(integer)) + /** Alias for calling [value] with `ConditionalValue.ofNumber(number)`. */ - fun value(number: Long) = value(ConditionalValue.ofNumber(number)) + fun value(number: Double) = value(ConditionalValue.ofNumber(number)) /** Alias for calling [value] with `ConditionalValue.ofListOfStrings(listOfStrings)`. */ fun valueOfListOfStrings(listOfStrings: List) = diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Conditional3dsActionParameters.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Conditional3dsActionParameters.kt index 95bb0e4bd..13ede67a2 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Conditional3dsActionParameters.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Conditional3dsActionParameters.kt @@ -406,9 +406,9 @@ private constructor( * * `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. + * 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. + * 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`, `MATCH_ADDRESS_ONLY`, @@ -520,9 +520,10 @@ private constructor( * * `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. + * 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. + * 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`, @@ -568,8 +569,11 @@ private constructor( /** Alias for calling [value] with `ConditionalValue.ofRegex(regex)`. */ fun value(regex: String) = value(ConditionalValue.ofRegex(regex)) + /** Alias for calling [value] with `ConditionalValue.ofInteger(integer)`. */ + fun value(integer: Long) = value(ConditionalValue.ofInteger(integer)) + /** Alias for calling [value] with `ConditionalValue.ofNumber(number)`. */ - fun value(number: Long) = value(ConditionalValue.ofNumber(number)) + fun value(number: Double) = value(ConditionalValue.ofNumber(number)) /** Alias for calling [value] with `ConditionalValue.ofListOfStrings(listOfStrings)`. */ fun valueOfListOfStrings(listOfStrings: List) = @@ -677,9 +681,9 @@ private constructor( * * `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. + * 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. + * 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`, `MATCH_ADDRESS_ONLY`, diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalAchActionParameters.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalAchActionParameters.kt index 1f29b9ce8..7c5ed20d2 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalAchActionParameters.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalAchActionParameters.kt @@ -1701,7 +1701,8 @@ private constructor( * * `COMPANY_ID`: The company ID (also known as Standard Entry Class (SEC) Company 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). + * * `TRANSACTION_AMOUNT`: The amount of the ACH transaction in minor units (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 (Telephone-Initiated Entry), @@ -1805,7 +1806,8 @@ private constructor( * * `COMPANY_ID`: The company ID (also known as Standard Entry Class (SEC) Company 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). + * * `TRANSACTION_AMOUNT`: The amount of the ACH transaction in minor units (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 (Telephone-Initiated @@ -1852,8 +1854,11 @@ private constructor( /** Alias for calling [value] with `ConditionalValue.ofRegex(regex)`. */ fun value(regex: String) = value(ConditionalValue.ofRegex(regex)) + /** Alias for calling [value] with `ConditionalValue.ofInteger(integer)`. */ + fun value(integer: Long) = value(ConditionalValue.ofInteger(integer)) + /** Alias for calling [value] with `ConditionalValue.ofNumber(number)`. */ - fun value(number: Long) = value(ConditionalValue.ofNumber(number)) + fun value(number: Double) = value(ConditionalValue.ofNumber(number)) /** Alias for calling [value] with `ConditionalValue.ofListOfStrings(listOfStrings)`. */ fun valueOfListOfStrings(listOfStrings: List) = @@ -1954,7 +1959,8 @@ private constructor( * * `COMPANY_ID`: The company ID (also known as Standard Entry Class (SEC) Company 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). + * * `TRANSACTION_AMOUNT`: The amount of the ACH transaction in minor units (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 (Telephone-Initiated Entry), diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalAuthorizationActionParameters.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalAuthorizationActionParameters.kt index a6f9f407a..cdcbba7d7 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalAuthorizationActionParameters.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalAuthorizationActionParameters.kt @@ -418,25 +418,26 @@ private constructor( * * `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. + * 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. + * 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. + * 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. + * 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. + * 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. + * 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. + * 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. + * 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 @@ -459,18 +460,20 @@ private constructor( * 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. + * * `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. + * 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`. + * 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`. + * `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`. @@ -480,25 +483,27 @@ private constructor( * 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. + * `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`. + * 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`. + * 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. + * 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`. + * `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`. + * Requires `parameters.unit` set to `MILES` or `KILOMETERS`. Use a decimal value. * * @throws LithicInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -638,26 +643,26 @@ private constructor( * * `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. + * 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. + * 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. + * 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. + * 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. + * 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. + * 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 @@ -680,19 +685,20 @@ private constructor( * 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. + * * `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. + * 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`. + * 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`. + * `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`. @@ -702,25 +708,28 @@ private constructor( * 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. + * 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`. + * 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. + * 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`. + * 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`. + * geocoded. Requires `parameters.unit` set to `MILES` or `KILOMETERS`. Use a decimal + * value. */ fun attribute(attribute: Attribute) = attribute(JsonField.of(attribute)) @@ -762,8 +771,11 @@ private constructor( /** Alias for calling [value] with `ConditionalValue.ofRegex(regex)`. */ fun value(regex: String) = value(ConditionalValue.ofRegex(regex)) + /** Alias for calling [value] with `ConditionalValue.ofInteger(integer)`. */ + fun value(integer: Long) = value(ConditionalValue.ofInteger(integer)) + /** Alias for calling [value] with `ConditionalValue.ofNumber(number)`. */ - fun value(number: Long) = value(ConditionalValue.ofNumber(number)) + fun value(number: Double) = value(ConditionalValue.ofNumber(number)) /** Alias for calling [value] with `ConditionalValue.ofListOfStrings(listOfStrings)`. */ fun valueOfListOfStrings(listOfStrings: List) = @@ -903,25 +915,26 @@ private constructor( * * `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. + * 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. + * 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. + * 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. + * 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. + * 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. + * 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. + * 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. + * 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 @@ -944,18 +957,20 @@ private constructor( * 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. + * * `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. + * 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`. + * 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`. + * `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`. @@ -965,25 +980,27 @@ private constructor( * 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. + * `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`. + * 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`. + * 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. + * 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`. + * `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`. + * Requires `parameters.unit` set to `MILES` or `KILOMETERS`. Use a decimal value. */ class Attribute @JsonCreator private constructor(private val value: JsonField) : Enum { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalCardTransactionUpdateActionParameters.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalCardTransactionUpdateActionParameters.kt index 573d613d5..2db669d00 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalCardTransactionUpdateActionParameters.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalCardTransactionUpdateActionParameters.kt @@ -285,11 +285,12 @@ private constructor( * * `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. + * 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. + * range of 0-99, Lithic will normalize the score by 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`. * * `LAST_EVENT_TYPE`: The type of the most recent event on the transaction. Valid values @@ -308,14 +309,16 @@ private constructor( * * `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. - * * `ACCOUNT_AGE`: The age of the account 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. 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`. + * `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`. + * `period`, and optional `filters`. Use an integer value. * * @throws LithicInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -443,12 +446,12 @@ private constructor( * * `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. + * 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. + * by 10x. Use an integer value. * * `TRANSACTION_STATUS`: The status of the transaction. Valid values are `PENDING`, * `VOIDED`, `SETTLING`, `SETTLED`, `BOUNCED`, `RETURNED`, `DECLINED`, `EXPIRED`. * * `LAST_EVENT_TYPE`: The type of the most recent event on the transaction. Valid @@ -468,14 +471,16 @@ private constructor( * * `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. + * 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`. + * `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`. + * `period`, and optional `filters`. Use an integer value. */ fun attribute(attribute: Attribute) = attribute(JsonField.of(attribute)) @@ -517,8 +522,11 @@ private constructor( /** Alias for calling [value] with `ConditionalValue.ofRegex(regex)`. */ fun value(regex: String) = value(ConditionalValue.ofRegex(regex)) + /** Alias for calling [value] with `ConditionalValue.ofInteger(integer)`. */ + fun value(integer: Long) = value(ConditionalValue.ofInteger(integer)) + /** Alias for calling [value] with `ConditionalValue.ofNumber(number)`. */ - fun value(number: Long) = value(ConditionalValue.ofNumber(number)) + fun value(number: Double) = value(ConditionalValue.ofNumber(number)) /** Alias for calling [value] with `ConditionalValue.ofListOfStrings(listOfStrings)`. */ fun valueOfListOfStrings(listOfStrings: List) = @@ -646,11 +654,12 @@ private constructor( * * `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. + * 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. + * range of 0-99, Lithic will normalize the score by 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`. * * `LAST_EVENT_TYPE`: The type of the most recent event on the transaction. Valid values @@ -669,14 +678,16 @@ private constructor( * * `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. - * * `ACCOUNT_AGE`: The age of the account 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. 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`. + * `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`. + * `period`, and optional `filters`. Use an integer value. */ class Attribute @JsonCreator private constructor(private val value: JsonField) : Enum { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalTokenizationActionParameters.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalTokenizationActionParameters.kt index 3894f58ae..aba9b1522 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalTokenizationActionParameters.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalTokenizationActionParameters.kt @@ -1637,9 +1637,11 @@ private constructor( * `FACEBOOK`, `FITBIT_PAY`, `GARMIN_PAY`, `GOOGLE_PAY`, `GOOGLE_VCN`, `ISSUER_HCE`, * `MICROSOFT_PAY`, `NETFLIX`, `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). + * where lower numbers indicate higher risk (e.g., 1 = high risk, 2 = 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). + * where lower numbers indicate higher risk (e.g., 1 = high risk, 2 = 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. * * `WALLET_RECOMMENDATION_REASONS`: List of reasons provided by the digital wallet @@ -1769,10 +1771,10 @@ private constructor( * `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). + * 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). + * risk). Use an integer value. * * `WALLET_RECOMMENDED_DECISION`: The decision recommended by the digital wallet * provider. Valid values include APPROVE, DECLINE, REQUIRE_ADDITIONAL_AUTHENTICATION. * * `WALLET_RECOMMENDATION_REASONS`: List of reasons provided by the digital wallet @@ -1839,8 +1841,11 @@ private constructor( /** Alias for calling [value] with `ConditionalValue.ofRegex(regex)`. */ fun value(regex: String) = value(ConditionalValue.ofRegex(regex)) + /** Alias for calling [value] with `ConditionalValue.ofInteger(integer)`. */ + fun value(integer: Long) = value(ConditionalValue.ofInteger(integer)) + /** Alias for calling [value] with `ConditionalValue.ofNumber(number)`. */ - fun value(number: Long) = value(ConditionalValue.ofNumber(number)) + fun value(number: Double) = value(ConditionalValue.ofNumber(number)) /** Alias for calling [value] with `ConditionalValue.ofListOfStrings(listOfStrings)`. */ fun valueOfListOfStrings(listOfStrings: List) = @@ -1948,9 +1953,11 @@ private constructor( * `FACEBOOK`, `FITBIT_PAY`, `GARMIN_PAY`, `GOOGLE_PAY`, `GOOGLE_VCN`, `ISSUER_HCE`, * `MICROSOFT_PAY`, `NETFLIX`, `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). + * where lower numbers indicate higher risk (e.g., 1 = high risk, 2 = 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). + * where lower numbers indicate higher risk (e.g., 1 = high risk, 2 = 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. * * `WALLET_RECOMMENDATION_REASONS`: List of reasons provided by the digital wallet diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalValue.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalValue.kt index 00144363e..2513b3668 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalValue.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalValue.kt @@ -26,7 +26,8 @@ import java.util.Optional class ConditionalValue private constructor( private val regex: String? = null, - private val number: Long? = null, + private val integer: Long? = null, + private val number: Double? = null, private val listOfStrings: List? = null, private val timestamp: OffsetDateTime? = null, private val _json: JsonValue? = null, @@ -35,11 +36,9 @@ private constructor( /** A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` */ fun regex(): Optional = Optional.ofNullable(regex) - /** - * 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` - */ - fun number(): Optional = Optional.ofNullable(number) + fun integer(): Optional = Optional.ofNullable(integer) + + fun number(): Optional = Optional.ofNullable(number) /** An array of strings, to be used with `IS_ONE_OF` or `IS_NOT_ONE_OF` */ fun listOfStrings(): Optional> = Optional.ofNullable(listOfStrings) @@ -49,6 +48,8 @@ private constructor( fun isRegex(): Boolean = regex != null + fun isInteger(): Boolean = integer != null + fun isNumber(): Boolean = number != null fun isListOfStrings(): Boolean = listOfStrings != null @@ -58,11 +59,9 @@ private constructor( /** A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` */ fun asRegex(): String = regex.getOrThrow("regex") - /** - * 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` - */ - fun asNumber(): Long = number.getOrThrow("number") + fun asInteger(): Long = integer.getOrThrow("integer") + + fun asNumber(): Double = number.getOrThrow("number") /** An array of strings, to be used with `IS_ONE_OF` or `IS_NOT_ONE_OF` */ fun asListOfStrings(): List = listOfStrings.getOrThrow("listOfStrings") @@ -104,6 +103,7 @@ private constructor( fun accept(visitor: Visitor): T = when { regex != null -> visitor.visitRegex(regex) + integer != null -> visitor.visitInteger(integer) number != null -> visitor.visitNumber(number) listOfStrings != null -> visitor.visitListOfStrings(listOfStrings) timestamp != null -> visitor.visitTimestamp(timestamp) @@ -129,7 +129,9 @@ private constructor( object : Visitor { override fun visitRegex(regex: String) {} - override fun visitNumber(number: Long) {} + override fun visitInteger(integer: Long) {} + + override fun visitNumber(number: Double) {} override fun visitListOfStrings(listOfStrings: List) {} @@ -158,7 +160,9 @@ private constructor( object : Visitor { override fun visitRegex(regex: String) = 1 - override fun visitNumber(number: Long) = 1 + override fun visitInteger(integer: Long) = 1 + + override fun visitNumber(number: Double) = 1 override fun visitListOfStrings(listOfStrings: List) = listOfStrings.size @@ -175,16 +179,18 @@ private constructor( return other is ConditionalValue && regex == other.regex && + integer == other.integer && number == other.number && listOfStrings == other.listOfStrings && timestamp == other.timestamp } - override fun hashCode(): Int = Objects.hash(regex, number, listOfStrings, timestamp) + override fun hashCode(): Int = Objects.hash(regex, integer, number, listOfStrings, timestamp) override fun toString(): String = when { regex != null -> "ConditionalValue{regex=$regex}" + integer != null -> "ConditionalValue{integer=$integer}" number != null -> "ConditionalValue{number=$number}" listOfStrings != null -> "ConditionalValue{listOfStrings=$listOfStrings}" timestamp != null -> "ConditionalValue{timestamp=$timestamp}" @@ -197,11 +203,9 @@ private constructor( /** A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` */ @JvmStatic fun ofRegex(regex: String) = ConditionalValue(regex = regex) - /** - * 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` - */ - @JvmStatic fun ofNumber(number: Long) = ConditionalValue(number = number) + @JvmStatic fun ofInteger(integer: Long) = ConditionalValue(integer = integer) + + @JvmStatic fun ofNumber(number: Double) = ConditionalValue(number = number) /** An array of strings, to be used with `IS_ONE_OF` or `IS_NOT_ONE_OF` */ @JvmStatic @@ -222,11 +226,9 @@ private constructor( /** A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` */ fun visitRegex(regex: String): T - /** - * 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` - */ - fun visitNumber(number: Long): T + fun visitInteger(integer: Long): T + + fun visitNumber(number: Double): T /** An array of strings, to be used with `IS_ONE_OF` or `IS_NOT_ONE_OF` */ fun visitListOfStrings(listOfStrings: List): T @@ -263,6 +265,9 @@ private constructor( ConditionalValue(regex = it, _json = json) }, tryDeserialize(node, jacksonTypeRef())?.let { + ConditionalValue(integer = it, _json = json) + }, + tryDeserialize(node, jacksonTypeRef())?.let { ConditionalValue(number = it, _json = json) }, tryDeserialize(node, jacksonTypeRef>())?.let { @@ -293,6 +298,7 @@ private constructor( ) { when { value.regex != null -> generator.writeObject(value.regex) + value.integer != null -> generator.writeObject(value.integer) value.number != null -> generator.writeObject(value.number) value.listOfStrings != null -> generator.writeObject(value.listOfStrings) value.timestamp != null -> generator.writeObject(value.timestamp) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ConditionalValueTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ConditionalValueTest.kt index 62d660561..03e3fce9c 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ConditionalValueTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ConditionalValueTest.kt @@ -22,6 +22,7 @@ internal class ConditionalValueTest { val conditionalValue = ConditionalValue.ofRegex(regex) assertThat(conditionalValue.regex()).contains(regex) + assertThat(conditionalValue.integer()).isEmpty assertThat(conditionalValue.number()).isEmpty assertThat(conditionalValue.listOfStrings()).isEmpty assertThat(conditionalValue.timestamp()).isEmpty @@ -41,13 +42,41 @@ internal class ConditionalValueTest { assertThat(roundtrippedConditionalValue).isEqualTo(conditionalValue) } + @Test + fun ofInteger() { + val integer = 0L + + val conditionalValue = ConditionalValue.ofInteger(integer) + + assertThat(conditionalValue.regex()).isEmpty + assertThat(conditionalValue.integer()).contains(integer) + assertThat(conditionalValue.number()).isEmpty + assertThat(conditionalValue.listOfStrings()).isEmpty + assertThat(conditionalValue.timestamp()).isEmpty + } + + @Test + fun ofIntegerRoundtrip() { + val jsonMapper = jsonMapper() + val conditionalValue = ConditionalValue.ofInteger(0L) + + val roundtrippedConditionalValue = + jsonMapper.readValue( + jsonMapper.writeValueAsString(conditionalValue), + jacksonTypeRef(), + ) + + assertThat(roundtrippedConditionalValue).isEqualTo(conditionalValue) + } + @Test fun ofNumber() { - val number = 0L + val number = 0.0 val conditionalValue = ConditionalValue.ofNumber(number) assertThat(conditionalValue.regex()).isEmpty + assertThat(conditionalValue.integer()).isEmpty assertThat(conditionalValue.number()).contains(number) assertThat(conditionalValue.listOfStrings()).isEmpty assertThat(conditionalValue.timestamp()).isEmpty @@ -56,7 +85,7 @@ internal class ConditionalValueTest { @Test fun ofNumberRoundtrip() { val jsonMapper = jsonMapper() - val conditionalValue = ConditionalValue.ofNumber(0L) + val conditionalValue = ConditionalValue.ofNumber(0.0) val roundtrippedConditionalValue = jsonMapper.readValue( @@ -74,6 +103,7 @@ internal class ConditionalValueTest { val conditionalValue = ConditionalValue.ofListOfStrings(listOfStrings) assertThat(conditionalValue.regex()).isEmpty + assertThat(conditionalValue.integer()).isEmpty assertThat(conditionalValue.number()).isEmpty assertThat(conditionalValue.listOfStrings()).contains(listOfStrings) assertThat(conditionalValue.timestamp()).isEmpty @@ -100,6 +130,7 @@ internal class ConditionalValueTest { val conditionalValue = ConditionalValue.ofTimestamp(timestamp) assertThat(conditionalValue.regex()).isEmpty + assertThat(conditionalValue.integer()).isEmpty assertThat(conditionalValue.number()).isEmpty assertThat(conditionalValue.listOfStrings()).isEmpty assertThat(conditionalValue.timestamp()).contains(timestamp) @@ -122,7 +153,6 @@ internal class ConditionalValueTest { enum class IncompatibleJsonShapeTestCase(val value: JsonValue) { BOOLEAN(JsonValue.from(false)), - FLOAT(JsonValue.from(3.14)), OBJECT(JsonValue.from(mapOf("invalid" to "object"))), } From d254ad3d222fcd35cc4f3e1aedc3a1b84893a1d6 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:55 +0000 Subject: [PATCH 3/3] release: 0.126.1 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ README.md | 10 +++++----- build.gradle.kts | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f38100a45..096bc1adb 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.126.0" + ".": "0.126.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index e12079966..4f05eb832 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.126.1 (2026-05-14) + +Full Changelog: [v0.126.0...v0.126.1](https://github.com/lithic-com/lithic-java/compare/v0.126.0...v0.126.1) + +### Bug Fixes + +* **types:** change number from Long to Double in ConditionalValue and conditional actions ([57b5b27](https://github.com/lithic-com/lithic-java/commit/57b5b279f5c23550dbc40946227d483410ca0c14)) + ## 0.126.0 (2026-05-08) Full Changelog: [v0.125.0...v0.126.0](https://github.com/lithic-com/lithic-java/compare/v0.125.0...v0.126.0) diff --git a/README.md b/README.md index 251eadd51..d56e09e6b 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ -[![Maven Central](https://img.shields.io/maven-central/v/com.lithic.api/lithic-java)](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.126.0) -[![javadoc](https://javadoc.io/badge2/com.lithic.api/lithic-java/0.126.0/javadoc.svg)](https://javadoc.io/doc/com.lithic.api/lithic-java/0.126.0) +[![Maven Central](https://img.shields.io/maven-central/v/com.lithic.api/lithic-java)](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.126.1) +[![javadoc](https://javadoc.io/badge2/com.lithic.api/lithic-java/0.126.1/javadoc.svg)](https://javadoc.io/doc/com.lithic.api/lithic-java/0.126.1) @@ -22,7 +22,7 @@ Use the Lithic MCP Server to enable AI assistants to interact with this API, all -The REST API documentation can be found on [docs.lithic.com](https://docs.lithic.com). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.lithic.api/lithic-java/0.126.0). +The REST API documentation can be found on [docs.lithic.com](https://docs.lithic.com). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.lithic.api/lithic-java/0.126.1). @@ -33,7 +33,7 @@ The REST API documentation can be found on [docs.lithic.com](https://docs.lithic ### Gradle ```kotlin -implementation("com.lithic.api:lithic-java:0.126.0") +implementation("com.lithic.api:lithic-java:0.126.1") ``` ### Maven @@ -42,7 +42,7 @@ implementation("com.lithic.api:lithic-java:0.126.0") com.lithic.api lithic-java - 0.126.0 + 0.126.1 ``` diff --git a/build.gradle.kts b/build.gradle.kts index 4b8f86ba1..34e293e99 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ repositories { allprojects { group = "com.lithic.api" - version = "0.126.0" // x-release-please-version + version = "0.126.1" // x-release-please-version } subprojects {