diff --git a/.github/workflows/publish-sonatype.yml b/.github/workflows/publish-sonatype.yml
index f29849ee6..de66e5945 100644
--- a/.github/workflows/publish-sonatype.yml
+++ b/.github/workflows/publish-sonatype.yml
@@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v4
- name: Set up Java
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
distribution: temurin
java-version: |
@@ -33,7 +33,7 @@ jobs:
export -- GPG_SIGNING_KEY_ID
printenv -- GPG_SIGNING_KEY | gpg --batch --passphrase-fd 3 --import 3<<< "$GPG_SIGNING_PASSWORD"
GPG_SIGNING_KEY_ID="$(gpg --with-colons --list-keys | awk -F : -- '/^pub:/ { getline; print "0x" substr($10, length($10) - 7) }')"
- ./gradlew publishAndReleaseToMavenCentral --stacktrace -PmavenCentralUsername="$SONATYPE_USERNAME" -PmavenCentralPassword="$SONATYPE_PASSWORD" --no-configuration-cache
+ ./gradlew publishAndReleaseToMavenCentral -Dorg.gradle.jvmargs="-Xmx8g" --stacktrace -PmavenCentralUsername="$SONATYPE_USERNAME" -PmavenCentralPassword="$SONATYPE_PASSWORD" --no-configuration-cache
env:
SONATYPE_USERNAME: ${{ secrets.LITHIC_SONATYPE_USERNAME || secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.LITHIC_SONATYPE_PASSWORD || secrets.SONATYPE_PASSWORD }}
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 2292ca706..d486cde74 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.95.0"
+ ".": "0.96.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index b57de73da..c9520d6b7 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 165
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-41b87f6139d55188993492b9c042a6bc1bc0506c166334c387072b57b6c79869.yml
-openapi_spec_hash: 3327246caf3bcbd3504ce99c81062075
-config_hash: b7425db12ddcc27a89a38de7042c4fa2
+configured_endpoints: 167
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-b9c76d077831114f1e4c5c15ff3f1d835ef3e9361b768af8468f8eb07a09ef3e.yml
+openapi_spec_hash: 5f9bcf1afd68f962a870727c35628394
+config_hash: e9a46eb8acb9dc2c236f3e1958a1c4dd
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c5f786210..c76911aaa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,19 @@
# Changelog
+## 0.96.0 (2025-07-15)
+
+Full Changelog: [v0.95.0...v0.96.0](https://github.com/lithic-com/lithic-java/compare/v0.95.0...v0.96.0)
+
+### Features
+
+* **api:** adds Network Programs and Account/Card Sub-statuses ([076028b](https://github.com/lithic-com/lithic-java/commit/076028b56cbab680e6e56fd31578009de54ed394))
+
+
+### Chores
+
+* **ci:** bump `actions/setup-java` to v4 ([c59e95c](https://github.com/lithic-com/lithic-java/commit/c59e95c98f2bfcba62374d39aaf820a6c3d687d2))
+* **ci:** ensure docs generation always succeeds ([1bf367a](https://github.com/lithic-com/lithic-java/commit/1bf367a7cffe53272387316678edaa89035f2330))
+
## 0.95.0 (2025-07-08)
Full Changelog: [v0.94.1...v0.95.0](https://github.com/lithic-com/lithic-java/compare/v0.94.1...v0.95.0)
diff --git a/README.md b/README.md
index f7901d551..53ba3ec55 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.95.0)
-[](https://javadoc.io/doc/com.lithic.api/lithic-java/0.95.0)
+[](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.96.0)
+[](https://javadoc.io/doc/com.lithic.api/lithic-java/0.96.0)
@@ -13,7 +13,7 @@ The Lithic Java SDK is similar to the Lithic Kotlin SDK but with minor differenc
-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.95.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.96.0).
@@ -24,7 +24,7 @@ The REST API documentation can be found on [docs.lithic.com](https://docs.lithic
### Gradle
```kotlin
-implementation("com.lithic.api:lithic-java:0.95.0")
+implementation("com.lithic.api:lithic-java:0.96.0")
```
### Maven
@@ -33,7 +33,7 @@ implementation("com.lithic.api:lithic-java:0.95.0")
com.lithic.api
lithic-java
- 0.95.0
+ 0.96.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index 66686cd44..147075849 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.lithic.api"
- version = "0.95.0" // x-release-please-version
+ version = "0.96.0" // x-release-please-version
}
subprojects {
diff --git a/buildSrc/src/main/kotlin/lithic.publish.gradle.kts b/buildSrc/src/main/kotlin/lithic.publish.gradle.kts
index 961f26ae4..e5ca4e7e8 100644
--- a/buildSrc/src/main/kotlin/lithic.publish.gradle.kts
+++ b/buildSrc/src/main/kotlin/lithic.publish.gradle.kts
@@ -53,3 +53,7 @@ configure {
}
}
}
+
+tasks.withType().configureEach {
+ isZip64 = true
+}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClient.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClient.kt
index 66dbb9a57..1a5d815fa 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClient.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClient.kt
@@ -27,6 +27,7 @@ import com.lithic.api.services.blocking.FinancialAccountService
import com.lithic.api.services.blocking.FraudService
import com.lithic.api.services.blocking.FundingEventService
import com.lithic.api.services.blocking.ManagementOperationService
+import com.lithic.api.services.blocking.NetworkProgramService
import com.lithic.api.services.blocking.PaymentService
import com.lithic.api.services.blocking.ReportService
import com.lithic.api.services.blocking.ResponderEndpointService
@@ -130,6 +131,8 @@ interface LithicClient {
fun fraud(): FraudService
+ fun networkPrograms(): NetworkProgramService
+
/** Status of api */
fun apiStatus(): ApiStatus = apiStatus(ClientApiStatusParams.none())
@@ -224,6 +227,8 @@ interface LithicClient {
fun fraud(): FraudService.WithRawResponse
+ fun networkPrograms(): NetworkProgramService.WithRawResponse
+
/**
* Returns a raw HTTP response for `get /v1/status`, but is otherwise the same as
* [LithicClient.apiStatus].
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsync.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsync.kt
index da1641789..25833f2ec 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsync.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsync.kt
@@ -26,6 +26,7 @@ import com.lithic.api.services.async.FinancialAccountServiceAsync
import com.lithic.api.services.async.FraudServiceAsync
import com.lithic.api.services.async.FundingEventServiceAsync
import com.lithic.api.services.async.ManagementOperationServiceAsync
+import com.lithic.api.services.async.NetworkProgramServiceAsync
import com.lithic.api.services.async.PaymentServiceAsync
import com.lithic.api.services.async.ReportServiceAsync
import com.lithic.api.services.async.ResponderEndpointServiceAsync
@@ -130,6 +131,8 @@ interface LithicClientAsync {
fun fraud(): FraudServiceAsync
+ fun networkPrograms(): NetworkProgramServiceAsync
+
/** Status of api */
fun apiStatus(): CompletableFuture = apiStatus(ClientApiStatusParams.none())
@@ -227,6 +230,8 @@ interface LithicClientAsync {
fun fraud(): FraudServiceAsync.WithRawResponse
+ fun networkPrograms(): NetworkProgramServiceAsync.WithRawResponse
+
/**
* Returns a raw HTTP response for `get /v1/status`, but is otherwise the same as
* [LithicClientAsync.apiStatus].
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsyncImpl.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsyncImpl.kt
index ff705c2f7..8d7d5bb73 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsyncImpl.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsyncImpl.kt
@@ -55,6 +55,8 @@ import com.lithic.api.services.async.FundingEventServiceAsync
import com.lithic.api.services.async.FundingEventServiceAsyncImpl
import com.lithic.api.services.async.ManagementOperationServiceAsync
import com.lithic.api.services.async.ManagementOperationServiceAsyncImpl
+import com.lithic.api.services.async.NetworkProgramServiceAsync
+import com.lithic.api.services.async.NetworkProgramServiceAsyncImpl
import com.lithic.api.services.async.PaymentServiceAsync
import com.lithic.api.services.async.PaymentServiceAsyncImpl
import com.lithic.api.services.async.ReportServiceAsync
@@ -201,6 +203,10 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
FraudServiceAsyncImpl(clientOptionsWithUserAgent)
}
+ private val networkPrograms: NetworkProgramServiceAsync by lazy {
+ NetworkProgramServiceAsyncImpl(clientOptionsWithUserAgent)
+ }
+
override fun sync(): LithicClient = sync
override fun withRawResponse(): LithicClientAsync.WithRawResponse = withRawResponse
@@ -265,6 +271,8 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
override fun fraud(): FraudServiceAsync = fraud
+ override fun networkPrograms(): NetworkProgramServiceAsync = networkPrograms
+
override fun apiStatus(
params: ClientApiStatusParams,
requestOptions: RequestOptions,
@@ -388,6 +396,10 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
FraudServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}
+ private val networkPrograms: NetworkProgramServiceAsync.WithRawResponse by lazy {
+ NetworkProgramServiceAsyncImpl.WithRawResponseImpl(clientOptions)
+ }
+
override fun withOptions(
modifier: Consumer
): LithicClientAsync.WithRawResponse =
@@ -457,6 +469,8 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
override fun fraud(): FraudServiceAsync.WithRawResponse = fraud
+ override fun networkPrograms(): NetworkProgramServiceAsync.WithRawResponse = networkPrograms
+
private val apiStatusHandler: Handler =
jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler)
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientImpl.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientImpl.kt
index 5a216e0b6..859f2f678 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientImpl.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientImpl.kt
@@ -55,6 +55,8 @@ import com.lithic.api.services.blocking.FundingEventService
import com.lithic.api.services.blocking.FundingEventServiceImpl
import com.lithic.api.services.blocking.ManagementOperationService
import com.lithic.api.services.blocking.ManagementOperationServiceImpl
+import com.lithic.api.services.blocking.NetworkProgramService
+import com.lithic.api.services.blocking.NetworkProgramServiceImpl
import com.lithic.api.services.blocking.PaymentService
import com.lithic.api.services.blocking.PaymentServiceImpl
import com.lithic.api.services.blocking.ReportService
@@ -184,6 +186,10 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
private val fraud: FraudService by lazy { FraudServiceImpl(clientOptionsWithUserAgent) }
+ private val networkPrograms: NetworkProgramService by lazy {
+ NetworkProgramServiceImpl(clientOptionsWithUserAgent)
+ }
+
override fun async(): LithicClientAsync = async
override fun withRawResponse(): LithicClient.WithRawResponse = withRawResponse
@@ -247,6 +253,8 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
override fun fraud(): FraudService = fraud
+ override fun networkPrograms(): NetworkProgramService = networkPrograms
+
override fun apiStatus(
params: ClientApiStatusParams,
requestOptions: RequestOptions,
@@ -370,6 +378,10 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
FraudServiceImpl.WithRawResponseImpl(clientOptions)
}
+ private val networkPrograms: NetworkProgramService.WithRawResponse by lazy {
+ NetworkProgramServiceImpl.WithRawResponseImpl(clientOptions)
+ }
+
override fun withOptions(
modifier: Consumer
): LithicClient.WithRawResponse =
@@ -438,6 +450,8 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
override fun fraud(): FraudService.WithRawResponse = fraud
+ override fun networkPrograms(): NetworkProgramService.WithRawResponse = networkPrograms
+
private val apiStatusHandler: Handler =
jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler)
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Account.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Account.kt
index 9c1a94d9a..82242b23b 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Account.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Account.kt
@@ -30,6 +30,8 @@ private constructor(
private val accountHolder: JsonField,
private val authRuleTokens: JsonField>,
private val cardholderCurrency: JsonField,
+ private val comment: JsonField,
+ private val substatus: JsonField,
private val verificationAddress: JsonField,
private val additionalProperties: MutableMap,
) {
@@ -53,6 +55,10 @@ private constructor(
@JsonProperty("cardholder_currency")
@ExcludeMissing
cardholderCurrency: JsonField = JsonMissing.of(),
+ @JsonProperty("comment") @ExcludeMissing comment: JsonField = JsonMissing.of(),
+ @JsonProperty("substatus")
+ @ExcludeMissing
+ substatus: JsonField = JsonMissing.of(),
@JsonProperty("verification_address")
@ExcludeMissing
verificationAddress: JsonField = JsonMissing.of(),
@@ -64,6 +70,8 @@ private constructor(
accountHolder,
authRuleTokens,
cardholderCurrency,
+ comment,
+ substatus,
verificationAddress,
mutableMapOf(),
)
@@ -139,6 +147,45 @@ private constructor(
fun cardholderCurrency(): Optional =
cardholderCurrency.getOptional("cardholder_currency")
+ /**
+ * Additional context or information related to the account.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun comment(): Optional = comment.getOptional("comment")
+
+ /**
+ * Account state substatus values:
+ * - `FRAUD_IDENTIFIED` - The account has been recognized as being created or used with stolen
+ * or fabricated identity information, encompassing both true identity theft and synthetic
+ * identities.
+ * - `SUSPICIOUS_ACTIVITY` - The account has exhibited suspicious behavior, such as unauthorized
+ * access or fraudulent transactions, necessitating further investigation.
+ * - `RISK_VIOLATION` - The account has been involved in deliberate misuse by the legitimate
+ * account holder. Examples include disputing valid transactions without cause, falsely
+ * claiming non-receipt of goods, or engaging in intentional bust-out schemes to exploit
+ * account services.
+ * - `END_USER_REQUEST` - The account holder has voluntarily requested the closure of the
+ * account for personal reasons. This encompasses situations such as bankruptcy, other
+ * financial considerations, or the account holder's death.
+ * - `ISSUER_REQUEST` - The issuer has initiated the closure of the account due to business
+ * strategy, risk management, inactivity, product changes, regulatory concerns, or violations
+ * of terms and conditions.
+ * - `NOT_ACTIVE` - The account has not had any transactions or payment activity within a
+ * specified period. This status applies to accounts that are paused or closed due to
+ * inactivity.
+ * - `INTERNAL_REVIEW` - The account is temporarily paused pending further internal review. In
+ * future implementations, this status may prevent clients from activating the account via
+ * APIs until the review is completed.
+ * - `OTHER` - The reason for the account's current status does not fall into any of the above
+ * categories. A comment should be provided to specify the particular reason.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun substatus(): Optional = substatus.getOptional("substatus")
+
/**
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -206,6 +253,20 @@ private constructor(
@ExcludeMissing
fun _cardholderCurrency(): JsonField = cardholderCurrency
+ /**
+ * Returns the raw JSON value of [comment].
+ *
+ * Unlike [comment], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("comment") @ExcludeMissing fun _comment(): JsonField = comment
+
+ /**
+ * Returns the raw JSON value of [substatus].
+ *
+ * Unlike [substatus], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("substatus") @ExcludeMissing fun _substatus(): JsonField = substatus
+
/**
* Returns the raw JSON value of [verificationAddress].
*
@@ -255,6 +316,8 @@ private constructor(
private var accountHolder: JsonField = JsonMissing.of()
private var authRuleTokens: JsonField>? = null
private var cardholderCurrency: JsonField = JsonMissing.of()
+ private var comment: JsonField = JsonMissing.of()
+ private var substatus: JsonField = JsonMissing.of()
private var verificationAddress: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap = mutableMapOf()
@@ -267,6 +330,8 @@ private constructor(
accountHolder = account.accountHolder
authRuleTokens = account.authRuleTokens.map { it.toMutableList() }
cardholderCurrency = account.cardholderCurrency
+ comment = account.comment
+ substatus = account.substatus
verificationAddress = account.verificationAddress
additionalProperties = account.additionalProperties.toMutableMap()
}
@@ -401,6 +466,54 @@ private constructor(
this.cardholderCurrency = cardholderCurrency
}
+ /** Additional context or information related to the account. */
+ fun comment(comment: String) = comment(JsonField.of(comment))
+
+ /**
+ * Sets [Builder.comment] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.comment] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun comment(comment: JsonField) = apply { this.comment = comment }
+
+ /**
+ * Account state substatus values:
+ * - `FRAUD_IDENTIFIED` - The account has been recognized as being created or used with
+ * stolen or fabricated identity information, encompassing both true identity theft and
+ * synthetic identities.
+ * - `SUSPICIOUS_ACTIVITY` - The account has exhibited suspicious behavior, such as
+ * unauthorized access or fraudulent transactions, necessitating further investigation.
+ * - `RISK_VIOLATION` - The account has been involved in deliberate misuse by the legitimate
+ * account holder. Examples include disputing valid transactions without cause, falsely
+ * claiming non-receipt of goods, or engaging in intentional bust-out schemes to exploit
+ * account services.
+ * - `END_USER_REQUEST` - The account holder has voluntarily requested the closure of the
+ * account for personal reasons. This encompasses situations such as bankruptcy, other
+ * financial considerations, or the account holder's death.
+ * - `ISSUER_REQUEST` - The issuer has initiated the closure of the account due to business
+ * strategy, risk management, inactivity, product changes, regulatory concerns, or
+ * violations of terms and conditions.
+ * - `NOT_ACTIVE` - The account has not had any transactions or payment activity within a
+ * specified period. This status applies to accounts that are paused or closed due to
+ * inactivity.
+ * - `INTERNAL_REVIEW` - The account is temporarily paused pending further internal review.
+ * In future implementations, this status may prevent clients from activating the account
+ * via APIs until the review is completed.
+ * - `OTHER` - The reason for the account's current status does not fall into any of the
+ * above categories. A comment should be provided to specify the particular reason.
+ */
+ fun substatus(substatus: Substatus) = substatus(JsonField.of(substatus))
+
+ /**
+ * Sets [Builder.substatus] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.substatus] with a well-typed [Substatus] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun substatus(substatus: JsonField) = apply { this.substatus = substatus }
+
@Deprecated("deprecated")
fun verificationAddress(verificationAddress: VerificationAddress) =
verificationAddress(JsonField.of(verificationAddress))
@@ -460,6 +573,8 @@ private constructor(
accountHolder,
(authRuleTokens ?: JsonMissing.of()).map { it.toImmutable() },
cardholderCurrency,
+ comment,
+ substatus,
verificationAddress,
additionalProperties.toMutableMap(),
)
@@ -479,6 +594,8 @@ private constructor(
accountHolder().ifPresent { it.validate() }
authRuleTokens()
cardholderCurrency()
+ comment()
+ substatus().ifPresent { it.validate() }
verificationAddress().ifPresent { it.validate() }
validated = true
}
@@ -505,6 +622,8 @@ private constructor(
(accountHolder.asKnown().getOrNull()?.validity() ?: 0) +
(authRuleTokens.asKnown().getOrNull()?.size ?: 0) +
(if (cardholderCurrency.asKnown().isPresent) 1 else 0) +
+ (if (comment.asKnown().isPresent) 1 else 0) +
+ (substatus.asKnown().getOrNull()?.validity() ?: 0) +
(verificationAddress.asKnown().getOrNull()?.validity() ?: 0)
/**
@@ -1176,6 +1295,195 @@ private constructor(
"AccountHolder{token=$token, businessAccountToken=$businessAccountToken, email=$email, phoneNumber=$phoneNumber, additionalProperties=$additionalProperties}"
}
+ /**
+ * Account state substatus values:
+ * - `FRAUD_IDENTIFIED` - The account has been recognized as being created or used with stolen
+ * or fabricated identity information, encompassing both true identity theft and synthetic
+ * identities.
+ * - `SUSPICIOUS_ACTIVITY` - The account has exhibited suspicious behavior, such as unauthorized
+ * access or fraudulent transactions, necessitating further investigation.
+ * - `RISK_VIOLATION` - The account has been involved in deliberate misuse by the legitimate
+ * account holder. Examples include disputing valid transactions without cause, falsely
+ * claiming non-receipt of goods, or engaging in intentional bust-out schemes to exploit
+ * account services.
+ * - `END_USER_REQUEST` - The account holder has voluntarily requested the closure of the
+ * account for personal reasons. This encompasses situations such as bankruptcy, other
+ * financial considerations, or the account holder's death.
+ * - `ISSUER_REQUEST` - The issuer has initiated the closure of the account due to business
+ * strategy, risk management, inactivity, product changes, regulatory concerns, or violations
+ * of terms and conditions.
+ * - `NOT_ACTIVE` - The account has not had any transactions or payment activity within a
+ * specified period. This status applies to accounts that are paused or closed due to
+ * inactivity.
+ * - `INTERNAL_REVIEW` - The account is temporarily paused pending further internal review. In
+ * future implementations, this status may prevent clients from activating the account via
+ * APIs until the review is completed.
+ * - `OTHER` - The reason for the account's current status does not fall into any of the above
+ * categories. A comment should be provided to specify the particular reason.
+ */
+ class Substatus @JsonCreator private constructor(private val value: JsonField) : Enum {
+
+ /**
+ * Returns this class instance's raw value.
+ *
+ * This is usually only useful if this instance was deserialized from data that doesn't
+ * match any known member, and you want to know that value. For example, if the SDK is on an
+ * older version than the API, then the API may respond with new members that the SDK is
+ * unaware of.
+ */
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ companion object {
+
+ @JvmField val FRAUD_IDENTIFIED = of("FRAUD_IDENTIFIED")
+
+ @JvmField val SUSPICIOUS_ACTIVITY = of("SUSPICIOUS_ACTIVITY")
+
+ @JvmField val RISK_VIOLATION = of("RISK_VIOLATION")
+
+ @JvmField val END_USER_REQUEST = of("END_USER_REQUEST")
+
+ @JvmField val ISSUER_REQUEST = of("ISSUER_REQUEST")
+
+ @JvmField val NOT_ACTIVE = of("NOT_ACTIVE")
+
+ @JvmField val INTERNAL_REVIEW = of("INTERNAL_REVIEW")
+
+ @JvmField val OTHER = of("OTHER")
+
+ @JvmStatic fun of(value: String) = Substatus(JsonField.of(value))
+ }
+
+ /** An enum containing [Substatus]'s known values. */
+ enum class Known {
+ FRAUD_IDENTIFIED,
+ SUSPICIOUS_ACTIVITY,
+ RISK_VIOLATION,
+ END_USER_REQUEST,
+ ISSUER_REQUEST,
+ NOT_ACTIVE,
+ INTERNAL_REVIEW,
+ OTHER,
+ }
+
+ /**
+ * An enum containing [Substatus]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [Substatus] can contain an unknown value in a couple of cases:
+ * - It was deserialized from data that doesn't match any known member. For example, if the
+ * SDK is on an older version than the API, then the API may respond with new members that
+ * the SDK is unaware of.
+ * - It was constructed with an arbitrary value using the [of] method.
+ */
+ enum class Value {
+ FRAUD_IDENTIFIED,
+ SUSPICIOUS_ACTIVITY,
+ RISK_VIOLATION,
+ END_USER_REQUEST,
+ ISSUER_REQUEST,
+ NOT_ACTIVE,
+ INTERNAL_REVIEW,
+ OTHER,
+ /**
+ * An enum member indicating that [Substatus] was instantiated with an unknown value.
+ */
+ _UNKNOWN,
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN]
+ * if the class was instantiated with an unknown value.
+ *
+ * Use the [known] method instead if you're certain the value is always known or if you want
+ * to throw for the unknown case.
+ */
+ fun value(): Value =
+ when (this) {
+ FRAUD_IDENTIFIED -> Value.FRAUD_IDENTIFIED
+ SUSPICIOUS_ACTIVITY -> Value.SUSPICIOUS_ACTIVITY
+ RISK_VIOLATION -> Value.RISK_VIOLATION
+ END_USER_REQUEST -> Value.END_USER_REQUEST
+ ISSUER_REQUEST -> Value.ISSUER_REQUEST
+ NOT_ACTIVE -> Value.NOT_ACTIVE
+ INTERNAL_REVIEW -> Value.INTERNAL_REVIEW
+ OTHER -> Value.OTHER
+ else -> Value._UNKNOWN
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value.
+ *
+ * Use the [value] method instead if you're uncertain the value is always known and don't
+ * want to throw for the unknown case.
+ *
+ * @throws LithicInvalidDataException if this class instance's value is a not a known
+ * member.
+ */
+ fun known(): Known =
+ when (this) {
+ FRAUD_IDENTIFIED -> Known.FRAUD_IDENTIFIED
+ SUSPICIOUS_ACTIVITY -> Known.SUSPICIOUS_ACTIVITY
+ RISK_VIOLATION -> Known.RISK_VIOLATION
+ END_USER_REQUEST -> Known.END_USER_REQUEST
+ ISSUER_REQUEST -> Known.ISSUER_REQUEST
+ NOT_ACTIVE -> Known.NOT_ACTIVE
+ INTERNAL_REVIEW -> Known.INTERNAL_REVIEW
+ OTHER -> Known.OTHER
+ else -> throw LithicInvalidDataException("Unknown Substatus: $value")
+ }
+
+ /**
+ * Returns this class instance's primitive wire representation.
+ *
+ * This differs from the [toString] method because that method is primarily for debugging
+ * and generally doesn't throw.
+ *
+ * @throws LithicInvalidDataException if this class instance's value does not have the
+ * expected primitive type.
+ */
+ fun asString(): String =
+ _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") }
+
+ private var validated: Boolean = false
+
+ fun validate(): Substatus = apply {
+ if (validated) {
+ return@apply
+ }
+
+ known()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: LithicInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return /* spotless:off */ other is Substatus && value == other.value /* spotless:on */
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
@Deprecated("deprecated")
class VerificationAddress
private constructor(
@@ -1535,15 +1843,15 @@ private constructor(
return true
}
- return /* spotless:off */ other is Account && token == other.token && created == other.created && spendLimit == other.spendLimit && state == other.state && accountHolder == other.accountHolder && authRuleTokens == other.authRuleTokens && cardholderCurrency == other.cardholderCurrency && verificationAddress == other.verificationAddress && additionalProperties == other.additionalProperties /* spotless:on */
+ return /* spotless:off */ other is Account && token == other.token && created == other.created && spendLimit == other.spendLimit && state == other.state && accountHolder == other.accountHolder && authRuleTokens == other.authRuleTokens && cardholderCurrency == other.cardholderCurrency && comment == other.comment && substatus == other.substatus && verificationAddress == other.verificationAddress && additionalProperties == other.additionalProperties /* spotless:on */
}
/* spotless:off */
- private val hashCode: Int by lazy { Objects.hash(token, created, spendLimit, state, accountHolder, authRuleTokens, cardholderCurrency, verificationAddress, additionalProperties) }
+ private val hashCode: Int by lazy { Objects.hash(token, created, spendLimit, state, accountHolder, authRuleTokens, cardholderCurrency, comment, substatus, verificationAddress, additionalProperties) }
/* spotless:on */
override fun hashCode(): Int = hashCode
override fun toString() =
- "Account{token=$token, created=$created, spendLimit=$spendLimit, state=$state, accountHolder=$accountHolder, authRuleTokens=$authRuleTokens, cardholderCurrency=$cardholderCurrency, verificationAddress=$verificationAddress, additionalProperties=$additionalProperties}"
+ "Account{token=$token, created=$created, spendLimit=$spendLimit, state=$state, accountHolder=$accountHolder, authRuleTokens=$authRuleTokens, cardholderCurrency=$cardholderCurrency, comment=$comment, substatus=$substatus, verificationAddress=$verificationAddress, additionalProperties=$additionalProperties}"
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountUpdateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountUpdateParams.kt
index 49e66c13a..00fb0fc39 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountUpdateParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountUpdateParams.kt
@@ -35,6 +35,14 @@ private constructor(
fun accountToken(): Optional = Optional.ofNullable(accountToken)
+ /**
+ * Additional context or information related to the account.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun comment(): Optional = body.comment()
+
/**
* Amount (in cents) for the account's daily spend limit (e.g. 100000 would be a $1,000 limit).
* By default the daily spend limit is set to $1,250.
@@ -74,6 +82,37 @@ private constructor(
*/
fun state(): Optional = body.state()
+ /**
+ * Account state substatus values:
+ * - `FRAUD_IDENTIFIED` - The account has been recognized as being created or used with stolen
+ * or fabricated identity information, encompassing both true identity theft and synthetic
+ * identities.
+ * - `SUSPICIOUS_ACTIVITY` - The account has exhibited suspicious behavior, such as unauthorized
+ * access or fraudulent transactions, necessitating further investigation.
+ * - `RISK_VIOLATION` - The account has been involved in deliberate misuse by the legitimate
+ * account holder. Examples include disputing valid transactions without cause, falsely
+ * claiming non-receipt of goods, or engaging in intentional bust-out schemes to exploit
+ * account services.
+ * - `END_USER_REQUEST` - The account holder has voluntarily requested the closure of the
+ * account for personal reasons. This encompasses situations such as bankruptcy, other
+ * financial considerations, or the account holder's death.
+ * - `ISSUER_REQUEST` - The issuer has initiated the closure of the account due to business
+ * strategy, risk management, inactivity, product changes, regulatory concerns, or violations
+ * of terms and conditions.
+ * - `NOT_ACTIVE` - The account has not had any transactions or payment activity within a
+ * specified period. This status applies to accounts that are paused or closed due to
+ * inactivity.
+ * - `INTERNAL_REVIEW` - The account is temporarily paused pending further internal review. In
+ * future implementations, this status may prevent clients from activating the account via
+ * APIs until the review is completed.
+ * - `OTHER` - The reason for the account's current status does not fall into any of the above
+ * categories. A comment should be provided to specify the particular reason.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun substatus(): Optional = body.substatus()
+
/**
* Address used during Address Verification Service (AVS) checks during transactions if enabled
* via Auth Rules. This field is deprecated as AVS checks are no longer supported by Auth Rules.
@@ -85,6 +124,13 @@ private constructor(
@Deprecated("deprecated")
fun verificationAddress(): Optional = body.verificationAddress()
+ /**
+ * Returns the raw JSON value of [comment].
+ *
+ * Unlike [comment], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _comment(): JsonField = body._comment()
+
/**
* Returns the raw JSON value of [dailySpendLimit].
*
@@ -115,6 +161,13 @@ private constructor(
*/
fun _state(): JsonField = body._state()
+ /**
+ * Returns the raw JSON value of [substatus].
+ *
+ * Unlike [substatus], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _substatus(): JsonField = body._substatus()
+
/**
* Returns the raw JSON value of [verificationAddress].
*
@@ -166,15 +219,26 @@ private constructor(
*
* This is generally only useful if you are already constructing the body separately.
* Otherwise, it's more convenient to use the top-level setters instead:
+ * - [comment]
* - [dailySpendLimit]
* - [lifetimeSpendLimit]
* - [monthlySpendLimit]
* - [state]
- * - [verificationAddress]
* - etc.
*/
fun body(body: Body) = apply { this.body = body.toBuilder() }
+ /** Additional context or information related to the account. */
+ fun comment(comment: String) = apply { body.comment(comment) }
+
+ /**
+ * Sets [Builder.comment] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.comment] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun comment(comment: JsonField) = apply { body.comment(comment) }
+
/**
* Amount (in cents) for the account's daily spend limit (e.g. 100000 would be a $1,000
* limit). By default the daily spend limit is set to $1,250.
@@ -245,6 +309,43 @@ private constructor(
*/
fun state(state: JsonField) = apply { body.state(state) }
+ /**
+ * Account state substatus values:
+ * - `FRAUD_IDENTIFIED` - The account has been recognized as being created or used with
+ * stolen or fabricated identity information, encompassing both true identity theft and
+ * synthetic identities.
+ * - `SUSPICIOUS_ACTIVITY` - The account has exhibited suspicious behavior, such as
+ * unauthorized access or fraudulent transactions, necessitating further investigation.
+ * - `RISK_VIOLATION` - The account has been involved in deliberate misuse by the legitimate
+ * account holder. Examples include disputing valid transactions without cause, falsely
+ * claiming non-receipt of goods, or engaging in intentional bust-out schemes to exploit
+ * account services.
+ * - `END_USER_REQUEST` - The account holder has voluntarily requested the closure of the
+ * account for personal reasons. This encompasses situations such as bankruptcy, other
+ * financial considerations, or the account holder's death.
+ * - `ISSUER_REQUEST` - The issuer has initiated the closure of the account due to business
+ * strategy, risk management, inactivity, product changes, regulatory concerns, or
+ * violations of terms and conditions.
+ * - `NOT_ACTIVE` - The account has not had any transactions or payment activity within a
+ * specified period. This status applies to accounts that are paused or closed due to
+ * inactivity.
+ * - `INTERNAL_REVIEW` - The account is temporarily paused pending further internal review.
+ * In future implementations, this status may prevent clients from activating the account
+ * via APIs until the review is completed.
+ * - `OTHER` - The reason for the account's current status does not fall into any of the
+ * above categories. A comment should be provided to specify the particular reason.
+ */
+ fun substatus(substatus: Substatus) = apply { body.substatus(substatus) }
+
+ /**
+ * Sets [Builder.substatus] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.substatus] with a well-typed [Substatus] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun substatus(substatus: JsonField) = apply { body.substatus(substatus) }
+
/**
* Address used during Address Verification Service (AVS) checks during transactions if
* enabled via Auth Rules. This field is deprecated as AVS checks are no longer supported by
@@ -412,16 +513,19 @@ private constructor(
class Body
private constructor(
+ private val comment: JsonField,
private val dailySpendLimit: JsonField,
private val lifetimeSpendLimit: JsonField,
private val monthlySpendLimit: JsonField,
private val state: JsonField,
+ private val substatus: JsonField,
private val verificationAddress: JsonField,
private val additionalProperties: MutableMap,
) {
@JsonCreator
private constructor(
+ @JsonProperty("comment") @ExcludeMissing comment: JsonField = JsonMissing.of(),
@JsonProperty("daily_spend_limit")
@ExcludeMissing
dailySpendLimit: JsonField = JsonMissing.of(),
@@ -432,18 +536,31 @@ private constructor(
@ExcludeMissing
monthlySpendLimit: JsonField = JsonMissing.of(),
@JsonProperty("state") @ExcludeMissing state: JsonField = JsonMissing.of(),
+ @JsonProperty("substatus")
+ @ExcludeMissing
+ substatus: JsonField = JsonMissing.of(),
@JsonProperty("verification_address")
@ExcludeMissing
verificationAddress: JsonField = JsonMissing.of(),
) : this(
+ comment,
dailySpendLimit,
lifetimeSpendLimit,
monthlySpendLimit,
state,
+ substatus,
verificationAddress,
mutableMapOf(),
)
+ /**
+ * Additional context or information related to the account.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun comment(): Optional = comment.getOptional("comment")
+
/**
* Amount (in cents) for the account's daily spend limit (e.g. 100000 would be a $1,000
* limit). By default the daily spend limit is set to $1,250.
@@ -485,6 +602,37 @@ private constructor(
*/
fun state(): Optional = state.getOptional("state")
+ /**
+ * Account state substatus values:
+ * - `FRAUD_IDENTIFIED` - The account has been recognized as being created or used with
+ * stolen or fabricated identity information, encompassing both true identity theft and
+ * synthetic identities.
+ * - `SUSPICIOUS_ACTIVITY` - The account has exhibited suspicious behavior, such as
+ * unauthorized access or fraudulent transactions, necessitating further investigation.
+ * - `RISK_VIOLATION` - The account has been involved in deliberate misuse by the legitimate
+ * account holder. Examples include disputing valid transactions without cause, falsely
+ * claiming non-receipt of goods, or engaging in intentional bust-out schemes to exploit
+ * account services.
+ * - `END_USER_REQUEST` - The account holder has voluntarily requested the closure of the
+ * account for personal reasons. This encompasses situations such as bankruptcy, other
+ * financial considerations, or the account holder's death.
+ * - `ISSUER_REQUEST` - The issuer has initiated the closure of the account due to business
+ * strategy, risk management, inactivity, product changes, regulatory concerns, or
+ * violations of terms and conditions.
+ * - `NOT_ACTIVE` - The account has not had any transactions or payment activity within a
+ * specified period. This status applies to accounts that are paused or closed due to
+ * inactivity.
+ * - `INTERNAL_REVIEW` - The account is temporarily paused pending further internal review.
+ * In future implementations, this status may prevent clients from activating the account
+ * via APIs until the review is completed.
+ * - `OTHER` - The reason for the account's current status does not fall into any of the
+ * above categories. A comment should be provided to specify the particular reason.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun substatus(): Optional = substatus.getOptional("substatus")
+
/**
* Address used during Address Verification Service (AVS) checks during transactions if
* enabled via Auth Rules. This field is deprecated as AVS checks are no longer supported by
@@ -497,6 +645,13 @@ private constructor(
fun verificationAddress(): Optional =
verificationAddress.getOptional("verification_address")
+ /**
+ * Returns the raw JSON value of [comment].
+ *
+ * Unlike [comment], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("comment") @ExcludeMissing fun _comment(): JsonField = comment
+
/**
* Returns the raw JSON value of [dailySpendLimit].
*
@@ -534,6 +689,15 @@ private constructor(
*/
@JsonProperty("state") @ExcludeMissing fun _state(): JsonField = state
+ /**
+ * Returns the raw JSON value of [substatus].
+ *
+ * Unlike [substatus], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("substatus")
+ @ExcludeMissing
+ fun _substatus(): JsonField = substatus
+
/**
* Returns the raw JSON value of [verificationAddress].
*
@@ -566,23 +730,39 @@ private constructor(
/** A builder for [Body]. */
class Builder internal constructor() {
+ private var comment: JsonField = JsonMissing.of()
private var dailySpendLimit: JsonField = JsonMissing.of()
private var lifetimeSpendLimit: JsonField = JsonMissing.of()
private var monthlySpendLimit: JsonField = JsonMissing.of()
private var state: JsonField = JsonMissing.of()
+ private var substatus: JsonField = JsonMissing.of()
private var verificationAddress: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
internal fun from(body: Body) = apply {
+ comment = body.comment
dailySpendLimit = body.dailySpendLimit
lifetimeSpendLimit = body.lifetimeSpendLimit
monthlySpendLimit = body.monthlySpendLimit
state = body.state
+ substatus = body.substatus
verificationAddress = body.verificationAddress
additionalProperties = body.additionalProperties.toMutableMap()
}
+ /** Additional context or information related to the account. */
+ fun comment(comment: String) = comment(JsonField.of(comment))
+
+ /**
+ * Sets [Builder.comment] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.comment] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun comment(comment: JsonField) = apply { this.comment = comment }
+
/**
* Amount (in cents) for the account's daily spend limit (e.g. 100000 would be a $1,000
* limit). By default the daily spend limit is set to $1,250.
@@ -654,6 +834,44 @@ private constructor(
*/
fun state(state: JsonField) = apply { this.state = state }
+ /**
+ * Account state substatus values:
+ * - `FRAUD_IDENTIFIED` - The account has been recognized as being created or used with
+ * stolen or fabricated identity information, encompassing both true identity theft
+ * and synthetic identities.
+ * - `SUSPICIOUS_ACTIVITY` - The account has exhibited suspicious behavior, such as
+ * unauthorized access or fraudulent transactions, necessitating further
+ * investigation.
+ * - `RISK_VIOLATION` - The account has been involved in deliberate misuse by the
+ * legitimate account holder. Examples include disputing valid transactions without
+ * cause, falsely claiming non-receipt of goods, or engaging in intentional bust-out
+ * schemes to exploit account services.
+ * - `END_USER_REQUEST` - The account holder has voluntarily requested the closure of
+ * the account for personal reasons. This encompasses situations such as bankruptcy,
+ * other financial considerations, or the account holder's death.
+ * - `ISSUER_REQUEST` - The issuer has initiated the closure of the account due to
+ * business strategy, risk management, inactivity, product changes, regulatory
+ * concerns, or violations of terms and conditions.
+ * - `NOT_ACTIVE` - The account has not had any transactions or payment activity within
+ * a specified period. This status applies to accounts that are paused or closed due
+ * to inactivity.
+ * - `INTERNAL_REVIEW` - The account is temporarily paused pending further internal
+ * review. In future implementations, this status may prevent clients from activating
+ * the account via APIs until the review is completed.
+ * - `OTHER` - The reason for the account's current status does not fall into any of the
+ * above categories. A comment should be provided to specify the particular reason.
+ */
+ fun substatus(substatus: Substatus) = substatus(JsonField.of(substatus))
+
+ /**
+ * Sets [Builder.substatus] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.substatus] with a well-typed [Substatus] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun substatus(substatus: JsonField) = apply { this.substatus = substatus }
+
/**
* Address used during Address Verification Service (AVS) checks during transactions if
* enabled via Auth Rules. This field is deprecated as AVS checks are no longer
@@ -702,10 +920,12 @@ private constructor(
*/
fun build(): Body =
Body(
+ comment,
dailySpendLimit,
lifetimeSpendLimit,
monthlySpendLimit,
state,
+ substatus,
verificationAddress,
additionalProperties.toMutableMap(),
)
@@ -718,10 +938,12 @@ private constructor(
return@apply
}
+ comment()
dailySpendLimit()
lifetimeSpendLimit()
monthlySpendLimit()
state().ifPresent { it.validate() }
+ substatus().ifPresent { it.validate() }
verificationAddress().ifPresent { it.validate() }
validated = true
}
@@ -742,10 +964,12 @@ private constructor(
*/
@JvmSynthetic
internal fun validity(): Int =
- (if (dailySpendLimit.asKnown().isPresent) 1 else 0) +
+ (if (comment.asKnown().isPresent) 1 else 0) +
+ (if (dailySpendLimit.asKnown().isPresent) 1 else 0) +
(if (lifetimeSpendLimit.asKnown().isPresent) 1 else 0) +
(if (monthlySpendLimit.asKnown().isPresent) 1 else 0) +
(state.asKnown().getOrNull()?.validity() ?: 0) +
+ (substatus.asKnown().getOrNull()?.validity() ?: 0) +
(verificationAddress.asKnown().getOrNull()?.validity() ?: 0)
override fun equals(other: Any?): Boolean {
@@ -753,17 +977,17 @@ private constructor(
return true
}
- return /* spotless:off */ other is Body && dailySpendLimit == other.dailySpendLimit && lifetimeSpendLimit == other.lifetimeSpendLimit && monthlySpendLimit == other.monthlySpendLimit && state == other.state && verificationAddress == other.verificationAddress && additionalProperties == other.additionalProperties /* spotless:on */
+ return /* spotless:off */ other is Body && comment == other.comment && dailySpendLimit == other.dailySpendLimit && lifetimeSpendLimit == other.lifetimeSpendLimit && monthlySpendLimit == other.monthlySpendLimit && state == other.state && substatus == other.substatus && verificationAddress == other.verificationAddress && additionalProperties == other.additionalProperties /* spotless:on */
}
/* spotless:off */
- private val hashCode: Int by lazy { Objects.hash(dailySpendLimit, lifetimeSpendLimit, monthlySpendLimit, state, verificationAddress, additionalProperties) }
+ private val hashCode: Int by lazy { Objects.hash(comment, dailySpendLimit, lifetimeSpendLimit, monthlySpendLimit, state, substatus, verificationAddress, additionalProperties) }
/* spotless:on */
override fun hashCode(): Int = hashCode
override fun toString() =
- "Body{dailySpendLimit=$dailySpendLimit, lifetimeSpendLimit=$lifetimeSpendLimit, monthlySpendLimit=$monthlySpendLimit, state=$state, verificationAddress=$verificationAddress, additionalProperties=$additionalProperties}"
+ "Body{comment=$comment, dailySpendLimit=$dailySpendLimit, lifetimeSpendLimit=$lifetimeSpendLimit, monthlySpendLimit=$monthlySpendLimit, state=$state, substatus=$substatus, verificationAddress=$verificationAddress, additionalProperties=$additionalProperties}"
}
/** Account states. */
@@ -898,6 +1122,195 @@ private constructor(
override fun toString() = value.toString()
}
+ /**
+ * Account state substatus values:
+ * - `FRAUD_IDENTIFIED` - The account has been recognized as being created or used with stolen
+ * or fabricated identity information, encompassing both true identity theft and synthetic
+ * identities.
+ * - `SUSPICIOUS_ACTIVITY` - The account has exhibited suspicious behavior, such as unauthorized
+ * access or fraudulent transactions, necessitating further investigation.
+ * - `RISK_VIOLATION` - The account has been involved in deliberate misuse by the legitimate
+ * account holder. Examples include disputing valid transactions without cause, falsely
+ * claiming non-receipt of goods, or engaging in intentional bust-out schemes to exploit
+ * account services.
+ * - `END_USER_REQUEST` - The account holder has voluntarily requested the closure of the
+ * account for personal reasons. This encompasses situations such as bankruptcy, other
+ * financial considerations, or the account holder's death.
+ * - `ISSUER_REQUEST` - The issuer has initiated the closure of the account due to business
+ * strategy, risk management, inactivity, product changes, regulatory concerns, or violations
+ * of terms and conditions.
+ * - `NOT_ACTIVE` - The account has not had any transactions or payment activity within a
+ * specified period. This status applies to accounts that are paused or closed due to
+ * inactivity.
+ * - `INTERNAL_REVIEW` - The account is temporarily paused pending further internal review. In
+ * future implementations, this status may prevent clients from activating the account via
+ * APIs until the review is completed.
+ * - `OTHER` - The reason for the account's current status does not fall into any of the above
+ * categories. A comment should be provided to specify the particular reason.
+ */
+ class Substatus @JsonCreator private constructor(private val value: JsonField) : Enum {
+
+ /**
+ * Returns this class instance's raw value.
+ *
+ * This is usually only useful if this instance was deserialized from data that doesn't
+ * match any known member, and you want to know that value. For example, if the SDK is on an
+ * older version than the API, then the API may respond with new members that the SDK is
+ * unaware of.
+ */
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ companion object {
+
+ @JvmField val FRAUD_IDENTIFIED = of("FRAUD_IDENTIFIED")
+
+ @JvmField val SUSPICIOUS_ACTIVITY = of("SUSPICIOUS_ACTIVITY")
+
+ @JvmField val RISK_VIOLATION = of("RISK_VIOLATION")
+
+ @JvmField val END_USER_REQUEST = of("END_USER_REQUEST")
+
+ @JvmField val ISSUER_REQUEST = of("ISSUER_REQUEST")
+
+ @JvmField val NOT_ACTIVE = of("NOT_ACTIVE")
+
+ @JvmField val INTERNAL_REVIEW = of("INTERNAL_REVIEW")
+
+ @JvmField val OTHER = of("OTHER")
+
+ @JvmStatic fun of(value: String) = Substatus(JsonField.of(value))
+ }
+
+ /** An enum containing [Substatus]'s known values. */
+ enum class Known {
+ FRAUD_IDENTIFIED,
+ SUSPICIOUS_ACTIVITY,
+ RISK_VIOLATION,
+ END_USER_REQUEST,
+ ISSUER_REQUEST,
+ NOT_ACTIVE,
+ INTERNAL_REVIEW,
+ OTHER,
+ }
+
+ /**
+ * An enum containing [Substatus]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [Substatus] can contain an unknown value in a couple of cases:
+ * - It was deserialized from data that doesn't match any known member. For example, if the
+ * SDK is on an older version than the API, then the API may respond with new members that
+ * the SDK is unaware of.
+ * - It was constructed with an arbitrary value using the [of] method.
+ */
+ enum class Value {
+ FRAUD_IDENTIFIED,
+ SUSPICIOUS_ACTIVITY,
+ RISK_VIOLATION,
+ END_USER_REQUEST,
+ ISSUER_REQUEST,
+ NOT_ACTIVE,
+ INTERNAL_REVIEW,
+ OTHER,
+ /**
+ * An enum member indicating that [Substatus] was instantiated with an unknown value.
+ */
+ _UNKNOWN,
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN]
+ * if the class was instantiated with an unknown value.
+ *
+ * Use the [known] method instead if you're certain the value is always known or if you want
+ * to throw for the unknown case.
+ */
+ fun value(): Value =
+ when (this) {
+ FRAUD_IDENTIFIED -> Value.FRAUD_IDENTIFIED
+ SUSPICIOUS_ACTIVITY -> Value.SUSPICIOUS_ACTIVITY
+ RISK_VIOLATION -> Value.RISK_VIOLATION
+ END_USER_REQUEST -> Value.END_USER_REQUEST
+ ISSUER_REQUEST -> Value.ISSUER_REQUEST
+ NOT_ACTIVE -> Value.NOT_ACTIVE
+ INTERNAL_REVIEW -> Value.INTERNAL_REVIEW
+ OTHER -> Value.OTHER
+ else -> Value._UNKNOWN
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value.
+ *
+ * Use the [value] method instead if you're uncertain the value is always known and don't
+ * want to throw for the unknown case.
+ *
+ * @throws LithicInvalidDataException if this class instance's value is a not a known
+ * member.
+ */
+ fun known(): Known =
+ when (this) {
+ FRAUD_IDENTIFIED -> Known.FRAUD_IDENTIFIED
+ SUSPICIOUS_ACTIVITY -> Known.SUSPICIOUS_ACTIVITY
+ RISK_VIOLATION -> Known.RISK_VIOLATION
+ END_USER_REQUEST -> Known.END_USER_REQUEST
+ ISSUER_REQUEST -> Known.ISSUER_REQUEST
+ NOT_ACTIVE -> Known.NOT_ACTIVE
+ INTERNAL_REVIEW -> Known.INTERNAL_REVIEW
+ OTHER -> Known.OTHER
+ else -> throw LithicInvalidDataException("Unknown Substatus: $value")
+ }
+
+ /**
+ * Returns this class instance's primitive wire representation.
+ *
+ * This differs from the [toString] method because that method is primarily for debugging
+ * and generally doesn't throw.
+ *
+ * @throws LithicInvalidDataException if this class instance's value does not have the
+ * expected primitive type.
+ */
+ fun asString(): String =
+ _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") }
+
+ private var validated: Boolean = false
+
+ fun validate(): Substatus = apply {
+ if (validated) {
+ return@apply
+ }
+
+ known()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: LithicInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return /* spotless:off */ other is Substatus && value == other.value /* spotless:on */
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
/**
* Address used during Address Verification Service (AVS) checks during transactions if enabled
* via Auth Rules. This field is deprecated as AVS checks are no longer supported by Auth Rules.
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalance.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalance.kt
index f85700cd8..f3438ffc2 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalance.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalance.kt
@@ -583,6 +583,8 @@ private constructor(
@JvmField val RESERVE = of("RESERVE")
+ @JvmField val SECURITY = of("SECURITY")
+
@JvmStatic fun of(value: String) = FinancialAccountType(JsonField.of(value))
}
@@ -591,6 +593,7 @@ private constructor(
ISSUING,
OPERATING,
RESERVE,
+ SECURITY,
}
/**
@@ -607,6 +610,7 @@ private constructor(
ISSUING,
OPERATING,
RESERVE,
+ SECURITY,
/**
* An enum member indicating that [FinancialAccountType] was instantiated with an
* unknown value.
@@ -626,6 +630,7 @@ private constructor(
ISSUING -> Value.ISSUING
OPERATING -> Value.OPERATING
RESERVE -> Value.RESERVE
+ SECURITY -> Value.SECURITY
else -> Value._UNKNOWN
}
@@ -643,6 +648,7 @@ private constructor(
ISSUING -> Known.ISSUING
OPERATING -> Known.OPERATING
RESERVE -> Known.RESERVE
+ SECURITY -> Known.SECURITY
else -> throw LithicInvalidDataException("Unknown FinancialAccountType: $value")
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListParams.kt
index 939ec157d..b0013c089 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListParams.kt
@@ -211,6 +211,8 @@ private constructor(
@JvmField val RESERVE = of("RESERVE")
+ @JvmField val SECURITY = of("SECURITY")
+
@JvmStatic fun of(value: String) = FinancialAccountType(JsonField.of(value))
}
@@ -219,6 +221,7 @@ private constructor(
ISSUING,
OPERATING,
RESERVE,
+ SECURITY,
}
/**
@@ -235,6 +238,7 @@ private constructor(
ISSUING,
OPERATING,
RESERVE,
+ SECURITY,
/**
* An enum member indicating that [FinancialAccountType] was instantiated with an
* unknown value.
@@ -254,6 +258,7 @@ private constructor(
ISSUING -> Value.ISSUING
OPERATING -> Value.OPERATING
RESERVE -> Value.RESERVE
+ SECURITY -> Value.SECURITY
else -> Value._UNKNOWN
}
@@ -271,6 +276,7 @@ private constructor(
ISSUING -> Known.ISSUING
OPERATING -> Known.OPERATING
RESERVE -> Known.RESERVE
+ SECURITY -> Known.SECURITY
else -> throw LithicInvalidDataException("Unknown FinancialAccountType: $value")
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Balance.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Balance.kt
index 0ffcff6a0..13d1e39f6 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Balance.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Balance.kt
@@ -585,6 +585,8 @@ private constructor(
@JvmField val RESERVE = of("RESERVE")
+ @JvmField val SECURITY = of("SECURITY")
+
@JvmStatic fun of(value: String) = FinancialAccountType(JsonField.of(value))
}
@@ -593,6 +595,7 @@ private constructor(
ISSUING,
OPERATING,
RESERVE,
+ SECURITY,
}
/**
@@ -609,6 +612,7 @@ private constructor(
ISSUING,
OPERATING,
RESERVE,
+ SECURITY,
/**
* An enum member indicating that [FinancialAccountType] was instantiated with an
* unknown value.
@@ -628,6 +632,7 @@ private constructor(
ISSUING -> Value.ISSUING
OPERATING -> Value.OPERATING
RESERVE -> Value.RESERVE
+ SECURITY -> Value.SECURITY
else -> Value._UNKNOWN
}
@@ -645,6 +650,7 @@ private constructor(
ISSUING -> Known.ISSUING
OPERATING -> Known.OPERATING
RESERVE -> Known.RESERVE
+ SECURITY -> Known.SECURITY
else -> throw LithicInvalidDataException("Unknown FinancialAccountType: $value")
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BalanceListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BalanceListParams.kt
index 430b95e66..c90b4adec 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BalanceListParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BalanceListParams.kt
@@ -262,6 +262,8 @@ private constructor(
@JvmField val RESERVE = of("RESERVE")
+ @JvmField val SECURITY = of("SECURITY")
+
@JvmStatic fun of(value: String) = FinancialAccountType(JsonField.of(value))
}
@@ -270,6 +272,7 @@ private constructor(
ISSUING,
OPERATING,
RESERVE,
+ SECURITY,
}
/**
@@ -286,6 +289,7 @@ private constructor(
ISSUING,
OPERATING,
RESERVE,
+ SECURITY,
/**
* An enum member indicating that [FinancialAccountType] was instantiated with an
* unknown value.
@@ -305,6 +309,7 @@ private constructor(
ISSUING -> Value.ISSUING
OPERATING -> Value.OPERATING
RESERVE -> Value.RESERVE
+ SECURITY -> Value.SECURITY
else -> Value._UNKNOWN
}
@@ -322,6 +327,7 @@ private constructor(
ISSUING -> Known.ISSUING
OPERATING -> Known.OPERATING
RESERVE -> Known.RESERVE
+ SECURITY -> Known.SECURITY
else -> throw LithicInvalidDataException("Unknown FinancialAccountType: $value")
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BalanceListResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BalanceListResponse.kt
index b909e51b4..e441cf259 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BalanceListResponse.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BalanceListResponse.kt
@@ -563,6 +563,8 @@ private constructor(
@JvmField val RESERVE = of("RESERVE")
+ @JvmField val SECURITY = of("SECURITY")
+
@JvmStatic fun of(value: String) = Type(JsonField.of(value))
}
@@ -571,6 +573,7 @@ private constructor(
ISSUING,
OPERATING,
RESERVE,
+ SECURITY,
}
/**
@@ -586,6 +589,7 @@ private constructor(
ISSUING,
OPERATING,
RESERVE,
+ SECURITY,
/** An enum member indicating that [Type] was instantiated with an unknown value. */
_UNKNOWN,
}
@@ -602,6 +606,7 @@ private constructor(
ISSUING -> Value.ISSUING
OPERATING -> Value.OPERATING
RESERVE -> Value.RESERVE
+ SECURITY -> Value.SECURITY
else -> Value._UNKNOWN
}
@@ -619,6 +624,7 @@ private constructor(
ISSUING -> Known.ISSUING
OPERATING -> Known.OPERATING
RESERVE -> Known.RESERVE
+ SECURITY -> Known.SECURITY
else -> throw LithicInvalidDataException("Unknown Type: $value")
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Card.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Card.kt
index 5b25db8d6..de2e73d74 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Card.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Card.kt
@@ -36,14 +36,17 @@ private constructor(
private val type: JsonField,
private val authRuleTokens: JsonField>,
private val cardholderCurrency: JsonField,
+ private val comment: JsonField,
private val digitalCardArtToken: JsonField,
private val expMonth: JsonField,
private val expYear: JsonField,
private val hostname: JsonField,
private val memo: JsonField,
+ private val networkProgramToken: JsonField,
private val pendingCommands: JsonField>,
private val productId: JsonField,
private val replacementFor: JsonField,
+ private val substatus: JsonField,
private val cvv: JsonField,
private val pan: JsonField,
private val additionalProperties: MutableMap,
@@ -82,6 +85,7 @@ private constructor(
@JsonProperty("cardholder_currency")
@ExcludeMissing
cardholderCurrency: JsonField = JsonMissing.of(),
+ @JsonProperty("comment") @ExcludeMissing comment: JsonField = JsonMissing.of(),
@JsonProperty("digital_card_art_token")
@ExcludeMissing
digitalCardArtToken: JsonField = JsonMissing.of(),
@@ -89,6 +93,9 @@ private constructor(
@JsonProperty("exp_year") @ExcludeMissing expYear: JsonField = JsonMissing.of(),
@JsonProperty("hostname") @ExcludeMissing hostname: JsonField = JsonMissing.of(),
@JsonProperty("memo") @ExcludeMissing memo: JsonField = JsonMissing.of(),
+ @JsonProperty("network_program_token")
+ @ExcludeMissing
+ networkProgramToken: JsonField = JsonMissing.of(),
@JsonProperty("pending_commands")
@ExcludeMissing
pendingCommands: JsonField> = JsonMissing.of(),
@@ -96,6 +103,9 @@ private constructor(
@JsonProperty("replacement_for")
@ExcludeMissing
replacementFor: JsonField = JsonMissing.of(),
+ @JsonProperty("substatus")
+ @ExcludeMissing
+ substatus: JsonField = JsonMissing.of(),
@JsonProperty("cvv") @ExcludeMissing cvv: JsonField = JsonMissing.of(),
@JsonProperty("pan") @ExcludeMissing pan: JsonField = JsonMissing.of(),
) : this(
@@ -112,14 +122,17 @@ private constructor(
type,
authRuleTokens,
cardholderCurrency,
+ comment,
digitalCardArtToken,
expMonth,
expYear,
hostname,
memo,
+ networkProgramToken,
pendingCommands,
productId,
replacementFor,
+ substatus,
cvv,
pan,
mutableMapOf(),
@@ -140,14 +153,17 @@ private constructor(
.type(type)
.authRuleTokens(authRuleTokens)
.cardholderCurrency(cardholderCurrency)
+ .comment(comment)
.digitalCardArtToken(digitalCardArtToken)
.expMonth(expMonth)
.expYear(expYear)
.hostname(hostname)
.memo(memo)
+ .networkProgramToken(networkProgramToken)
.pendingCommands(pendingCommands)
.productId(productId)
.replacementFor(replacementFor)
+ .substatus(substatus)
.build()
/**
@@ -287,6 +303,14 @@ private constructor(
fun cardholderCurrency(): Optional =
cardholderCurrency.getOptional("cardholder_currency")
+ /**
+ * Additional context or information related to the card.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun comment(): Optional = comment.getOptional("comment")
+
/**
* Specifies the digital card art to be displayed in the user's digital wallet after
* tokenization. This artwork must be approved by Mastercard and configured by Lithic to use.
@@ -329,6 +353,17 @@ private constructor(
*/
fun memo(): Optional = memo.getOptional("memo")
+ /**
+ * Globally unique identifier for the card's network program. Null if the card is not associated
+ * with a network program. Currently applicable to Visa cards participating in Account Level
+ * Management only
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun networkProgramToken(): Optional =
+ networkProgramToken.getOptional("network_program_token")
+
/**
* Indicates if there are offline PIN changes pending card interaction with an offline PIN
* terminal. Possible commands are: CHANGE_PIN, UNBLOCK_PIN. Applicable only to cards issued in
@@ -358,6 +393,30 @@ private constructor(
*/
fun replacementFor(): Optional = replacementFor.getOptional("replacement_for")
+ /**
+ * Card state substatus values: _ `LOST` - The physical card is no longer in the cardholder's
+ * possession due to being lost or never received by the cardholder. _ `COMPROMISED` - Card
+ * information has been exposed, potentially leading to unauthorized access. This may involve
+ * physical card theft, cloning, or online data breaches. _ `DAMAGED` - The physical card is not
+ * functioning properly, such as having chip failures or a demagnetized magnetic stripe. _
+ * `END_USER_REQUEST` - The cardholder requested the closure of the card for reasons unrelated
+ * to fraud or damage, such as switching to a different product or closing the account. _
+ * `ISSUER_REQUEST` - The issuer closed the card for reasons unrelated to fraud or damage, such
+ * as account inactivity, product or policy changes, or technology upgrades. _ `NOT_ACTIVE` -
+ * The card hasn’t had any transaction activity for a specified period, applicable to statuses
+ * like `PAUSED` or `CLOSED`. _ `SUSPICIOUS_ACTIVITY` - The card has one or more suspicious
+ * transactions or activities that require review. This can involve prompting the cardholder to
+ * confirm legitimate use or report confirmed fraud. _ `INTERNAL_REVIEW` - The card is
+ * temporarily paused pending further internal review. _ `EXPIRED` - The card has expired and
+ * has been closed without being reissued. _ `UNDELIVERABLE` - The card cannot be delivered to
+ * the cardholder and has been returned. \* `OTHER` - The reason for the status does not fall
+ * into any of the above categories. A comment can be provided to specify the reason.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun substatus(): Optional = substatus.getOptional("substatus")
+
/**
* Three digit cvv printed on the back of the card.
*
@@ -484,6 +543,13 @@ private constructor(
@ExcludeMissing
fun _cardholderCurrency(): JsonField = cardholderCurrency
+ /**
+ * Returns the raw JSON value of [comment].
+ *
+ * Unlike [comment], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("comment") @ExcludeMissing fun _comment(): JsonField = comment
+
/**
* Returns the raw JSON value of [digitalCardArtToken].
*
@@ -522,6 +588,16 @@ private constructor(
*/
@JsonProperty("memo") @ExcludeMissing fun _memo(): JsonField = memo
+ /**
+ * Returns the raw JSON value of [networkProgramToken].
+ *
+ * Unlike [networkProgramToken], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("network_program_token")
+ @ExcludeMissing
+ fun _networkProgramToken(): JsonField = networkProgramToken
+
/**
* Returns the raw JSON value of [pendingCommands].
*
@@ -547,6 +623,15 @@ private constructor(
@ExcludeMissing
fun _replacementFor(): JsonField = replacementFor
+ /**
+ * Returns the raw JSON value of [substatus].
+ *
+ * Unlike [substatus], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("substatus")
+ @ExcludeMissing
+ fun _substatus(): JsonField = substatus
+
/**
* Returns the raw JSON value of [cvv].
*
@@ -612,14 +697,17 @@ private constructor(
private var type: JsonField? = null
private var authRuleTokens: JsonField>? = null
private var cardholderCurrency: JsonField = JsonMissing.of()
+ private var comment: JsonField = JsonMissing.of()
private var digitalCardArtToken: JsonField = JsonMissing.of()
private var expMonth: JsonField = JsonMissing.of()
private var expYear: JsonField = JsonMissing.of()
private var hostname: JsonField = JsonMissing.of()
private var memo: JsonField = JsonMissing.of()
+ private var networkProgramToken: JsonField = JsonMissing.of()
private var pendingCommands: JsonField>? = null
private var productId: JsonField = JsonMissing.of()
private var replacementFor: JsonField = JsonMissing.of()
+ private var substatus: JsonField = JsonMissing.of()
private var cvv: JsonField = JsonMissing.of()
private var pan: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap = mutableMapOf()
@@ -639,14 +727,17 @@ private constructor(
type = card.type
authRuleTokens = card.authRuleTokens.map { it.toMutableList() }
cardholderCurrency = card.cardholderCurrency
+ comment = card.comment
digitalCardArtToken = card.digitalCardArtToken
expMonth = card.expMonth
expYear = card.expYear
hostname = card.hostname
memo = card.memo
+ networkProgramToken = card.networkProgramToken
pendingCommands = card.pendingCommands.map { it.toMutableList() }
productId = card.productId
replacementFor = card.replacementFor
+ substatus = card.substatus
cvv = card.cvv
pan = card.pan
additionalProperties = card.additionalProperties.toMutableMap()
@@ -884,6 +975,17 @@ private constructor(
this.cardholderCurrency = cardholderCurrency
}
+ /** Additional context or information related to the card. */
+ fun comment(comment: String) = comment(JsonField.of(comment))
+
+ /**
+ * Sets [Builder.comment] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.comment] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun comment(comment: JsonField) = apply { this.comment = comment }
+
/**
* Specifies the digital card art to be displayed in the user's digital wallet after
* tokenization. This artwork must be approved by Mastercard and configured by Lithic to
@@ -947,6 +1049,31 @@ private constructor(
*/
fun memo(memo: JsonField) = apply { this.memo = memo }
+ /**
+ * Globally unique identifier for the card's network program. Null if the card is not
+ * associated with a network program. Currently applicable to Visa cards participating in
+ * Account Level Management only
+ */
+ fun networkProgramToken(networkProgramToken: String?) =
+ networkProgramToken(JsonField.ofNullable(networkProgramToken))
+
+ /**
+ * Alias for calling [Builder.networkProgramToken] with `networkProgramToken.orElse(null)`.
+ */
+ fun networkProgramToken(networkProgramToken: Optional) =
+ networkProgramToken(networkProgramToken.getOrNull())
+
+ /**
+ * Sets [Builder.networkProgramToken] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.networkProgramToken] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun networkProgramToken(networkProgramToken: JsonField) = apply {
+ this.networkProgramToken = networkProgramToken
+ }
+
/**
* Indicates if there are offline PIN changes pending card interaction with an offline PIN
* terminal. Possible commands are: CHANGE_PIN, UNBLOCK_PIN. Applicable only to cards issued
@@ -1016,6 +1143,39 @@ private constructor(
this.replacementFor = replacementFor
}
+ /**
+ * Card state substatus values: _ `LOST` - The physical card is no longer in the
+ * cardholder's possession due to being lost or never received by the cardholder. _
+ * `COMPROMISED` - Card information has been exposed, potentially leading to unauthorized
+ * access. This may involve physical card theft, cloning, or online data breaches. _
+ * `DAMAGED` - The physical card is not functioning properly, such as having chip failures
+ * or a demagnetized magnetic stripe. _ `END_USER_REQUEST` - The cardholder requested the
+ * closure of the card for reasons unrelated to fraud or damage, such as switching to a
+ * different product or closing the account. _ `ISSUER_REQUEST` - The issuer closed the card
+ * for reasons unrelated to fraud or damage, such as account inactivity, product or policy
+ * changes, or technology upgrades. _ `NOT_ACTIVE` - The card hasn’t had any transaction
+ * activity for a specified period, applicable to statuses like `PAUSED` or `CLOSED`. _
+ * `SUSPICIOUS_ACTIVITY` - The card has one or more suspicious transactions or activities
+ * that require review. This can involve prompting the cardholder to confirm legitimate use
+ * or report confirmed fraud. _ `INTERNAL_REVIEW` - The card is temporarily paused pending
+ * further internal review. _ `EXPIRED` - The card has expired and has been closed without
+ * being reissued. _ `UNDELIVERABLE` - The card cannot be delivered to the cardholder and
+ * has been returned. \* `OTHER` - The reason for the status does not fall into any of the
+ * above categories. A comment can be provided to specify the reason.
+ */
+ fun substatus(substatus: NonPciCard.Substatus) = substatus(JsonField.of(substatus))
+
+ /**
+ * Sets [Builder.substatus] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.substatus] with a well-typed [NonPciCard.Substatus]
+ * value instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun substatus(substatus: JsonField) = apply {
+ this.substatus = substatus
+ }
+
/** Three digit cvv printed on the back of the card. */
fun cvv(cvv: String) = cvv(JsonField.of(cvv))
@@ -1098,14 +1258,17 @@ private constructor(
checkRequired("type", type),
(authRuleTokens ?: JsonMissing.of()).map { it.toImmutable() },
cardholderCurrency,
+ comment,
digitalCardArtToken,
expMonth,
expYear,
hostname,
memo,
+ networkProgramToken,
(pendingCommands ?: JsonMissing.of()).map { it.toImmutable() },
productId,
replacementFor,
+ substatus,
cvv,
pan,
additionalProperties.toMutableMap(),
@@ -1132,14 +1295,17 @@ private constructor(
type().validate()
authRuleTokens()
cardholderCurrency()
+ comment()
digitalCardArtToken()
expMonth()
expYear()
hostname()
memo()
+ networkProgramToken()
pendingCommands()
productId()
replacementFor()
+ substatus().ifPresent { it.validate() }
cvv()
pan()
validated = true
@@ -1173,14 +1339,17 @@ private constructor(
(type.asKnown().getOrNull()?.validity() ?: 0) +
(authRuleTokens.asKnown().getOrNull()?.size ?: 0) +
(if (cardholderCurrency.asKnown().isPresent) 1 else 0) +
+ (if (comment.asKnown().isPresent) 1 else 0) +
(if (digitalCardArtToken.asKnown().isPresent) 1 else 0) +
(if (expMonth.asKnown().isPresent) 1 else 0) +
(if (expYear.asKnown().isPresent) 1 else 0) +
(if (hostname.asKnown().isPresent) 1 else 0) +
(if (memo.asKnown().isPresent) 1 else 0) +
+ (if (networkProgramToken.asKnown().isPresent) 1 else 0) +
(pendingCommands.asKnown().getOrNull()?.size ?: 0) +
(if (productId.asKnown().isPresent) 1 else 0) +
(if (replacementFor.asKnown().isPresent) 1 else 0) +
+ (substatus.asKnown().getOrNull()?.validity() ?: 0) +
(if (cvv.asKnown().isPresent) 1 else 0) +
(if (pan.asKnown().isPresent) 1 else 0)
@@ -1189,15 +1358,15 @@ private constructor(
return true
}
- return /* spotless:off */ other is Card && token == other.token && accountToken == other.accountToken && cardProgramToken == other.cardProgramToken && created == other.created && funding == other.funding && lastFour == other.lastFour && pinStatus == other.pinStatus && spendLimit == other.spendLimit && spendLimitDuration == other.spendLimitDuration && state == other.state && type == other.type && authRuleTokens == other.authRuleTokens && cardholderCurrency == other.cardholderCurrency && digitalCardArtToken == other.digitalCardArtToken && expMonth == other.expMonth && expYear == other.expYear && hostname == other.hostname && memo == other.memo && pendingCommands == other.pendingCommands && productId == other.productId && replacementFor == other.replacementFor && cvv == other.cvv && pan == other.pan && additionalProperties == other.additionalProperties /* spotless:on */
+ return /* spotless:off */ other is Card && token == other.token && accountToken == other.accountToken && cardProgramToken == other.cardProgramToken && created == other.created && funding == other.funding && lastFour == other.lastFour && pinStatus == other.pinStatus && spendLimit == other.spendLimit && spendLimitDuration == other.spendLimitDuration && state == other.state && type == other.type && authRuleTokens == other.authRuleTokens && cardholderCurrency == other.cardholderCurrency && comment == other.comment && digitalCardArtToken == other.digitalCardArtToken && expMonth == other.expMonth && expYear == other.expYear && hostname == other.hostname && memo == other.memo && networkProgramToken == other.networkProgramToken && pendingCommands == other.pendingCommands && productId == other.productId && replacementFor == other.replacementFor && substatus == other.substatus && cvv == other.cvv && pan == other.pan && additionalProperties == other.additionalProperties /* spotless:on */
}
/* spotless:off */
- private val hashCode: Int by lazy { Objects.hash(token, accountToken, cardProgramToken, created, funding, lastFour, pinStatus, spendLimit, spendLimitDuration, state, type, authRuleTokens, cardholderCurrency, digitalCardArtToken, expMonth, expYear, hostname, memo, pendingCommands, productId, replacementFor, cvv, pan, additionalProperties) }
+ private val hashCode: Int by lazy { Objects.hash(token, accountToken, cardProgramToken, created, funding, lastFour, pinStatus, spendLimit, spendLimitDuration, state, type, authRuleTokens, cardholderCurrency, comment, digitalCardArtToken, expMonth, expYear, hostname, memo, networkProgramToken, pendingCommands, productId, replacementFor, substatus, cvv, pan, additionalProperties) }
/* spotless:on */
override fun hashCode(): Int = hashCode
override fun toString() =
- "Card{token=$token, accountToken=$accountToken, cardProgramToken=$cardProgramToken, created=$created, funding=$funding, lastFour=$lastFour, pinStatus=$pinStatus, spendLimit=$spendLimit, spendLimitDuration=$spendLimitDuration, state=$state, type=$type, authRuleTokens=$authRuleTokens, cardholderCurrency=$cardholderCurrency, digitalCardArtToken=$digitalCardArtToken, expMonth=$expMonth, expYear=$expYear, hostname=$hostname, memo=$memo, pendingCommands=$pendingCommands, productId=$productId, replacementFor=$replacementFor, cvv=$cvv, pan=$pan, additionalProperties=$additionalProperties}"
+ "Card{token=$token, accountToken=$accountToken, cardProgramToken=$cardProgramToken, created=$created, funding=$funding, lastFour=$lastFour, pinStatus=$pinStatus, spendLimit=$spendLimit, spendLimitDuration=$spendLimitDuration, state=$state, type=$type, authRuleTokens=$authRuleTokens, cardholderCurrency=$cardholderCurrency, comment=$comment, digitalCardArtToken=$digitalCardArtToken, expMonth=$expMonth, expYear=$expYear, hostname=$hostname, memo=$memo, networkProgramToken=$networkProgramToken, pendingCommands=$pendingCommands, productId=$productId, replacementFor=$replacementFor, substatus=$substatus, cvv=$cvv, pan=$pan, additionalProperties=$additionalProperties}"
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardCreateParams.kt
index c3cff84b3..52eb2d79b 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardCreateParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardCreateParams.kt
@@ -148,6 +148,14 @@ private constructor(
*/
fun replacementAccountToken(): Optional = body.replacementAccountToken()
+ /**
+ * Additional context or information related to the card that this card will replace.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun replacementComment(): Optional = body.replacementComment()
+
/**
* Globally unique identifier for the card that this card will replace. If the card type is
* `PHYSICAL` it will be replaced by a `PHYSICAL` card. If the card type is `VIRTUAL` it will be
@@ -158,6 +166,34 @@ private constructor(
*/
fun replacementFor(): Optional = body.replacementFor()
+ /**
+ * Card state substatus values for the card that this card will replace:
+ * - `LOST` - The physical card is no longer in the cardholder's possession due to being lost or
+ * never received by the cardholder.
+ * - `COMPROMISED` - Card information has been exposed, potentially leading to unauthorized
+ * access. This may involve physical card theft, cloning, or online data breaches.
+ * - `DAMAGED` - The physical card is not functioning properly, such as having chip failures or
+ * a demagnetized magnetic stripe.
+ * - `END_USER_REQUEST` - The cardholder requested the closure of the card for reasons unrelated
+ * to fraud or damage, such as switching to a different product or closing the account.
+ * - `ISSUER_REQUEST` - The issuer closed the card for reasons unrelated to fraud or damage,
+ * such as account inactivity, product or policy changes, or technology upgrades.
+ * - `NOT_ACTIVE` - The card hasn’t had any transaction activity for a specified period,
+ * applicable to statuses like `PAUSED` or `CLOSED`.
+ * - `SUSPICIOUS_ACTIVITY` - The card has one or more suspicious transactions or activities that
+ * require review. This can involve prompting the cardholder to confirm legitimate use or
+ * report confirmed fraud.
+ * - `INTERNAL_REVIEW` - The card is temporarily paused pending further internal review.
+ * - `EXPIRED` - The card has expired and has been closed without being reissued.
+ * - `UNDELIVERABLE` - The card cannot be delivered to the cardholder and has been returned.
+ * - `OTHER` - The reason for the status does not fall into any of the above categories. A
+ * comment should be provided to specify the reason.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun replacementSubstatus(): Optional = body.replacementSubstatus()
+
/**
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -298,6 +334,14 @@ private constructor(
*/
fun _replacementAccountToken(): JsonField = body._replacementAccountToken()
+ /**
+ * Returns the raw JSON value of [replacementComment].
+ *
+ * Unlike [replacementComment], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ fun _replacementComment(): JsonField = body._replacementComment()
+
/**
* Returns the raw JSON value of [replacementFor].
*
@@ -305,6 +349,14 @@ private constructor(
*/
fun _replacementFor(): JsonField = body._replacementFor()
+ /**
+ * Returns the raw JSON value of [replacementSubstatus].
+ *
+ * Unlike [replacementSubstatus], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ fun _replacementSubstatus(): JsonField = body._replacementSubstatus()
+
/**
* Returns the raw JSON value of [shippingAddress].
*
@@ -578,6 +630,22 @@ private constructor(
body.replacementAccountToken(replacementAccountToken)
}
+ /** Additional context or information related to the card that this card will replace. */
+ fun replacementComment(replacementComment: String) = apply {
+ body.replacementComment(replacementComment)
+ }
+
+ /**
+ * Sets [Builder.replacementComment] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.replacementComment] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun replacementComment(replacementComment: JsonField) = apply {
+ body.replacementComment(replacementComment)
+ }
+
/**
* Globally unique identifier for the card that this card will replace. If the card type is
* `PHYSICAL` it will be replaced by a `PHYSICAL` card. If the card type is `VIRTUAL` it
@@ -596,6 +664,45 @@ private constructor(
body.replacementFor(replacementFor)
}
+ /**
+ * Card state substatus values for the card that this card will replace:
+ * - `LOST` - The physical card is no longer in the cardholder's possession due to being
+ * lost or never received by the cardholder.
+ * - `COMPROMISED` - Card information has been exposed, potentially leading to unauthorized
+ * access. This may involve physical card theft, cloning, or online data breaches.
+ * - `DAMAGED` - The physical card is not functioning properly, such as having chip failures
+ * or a demagnetized magnetic stripe.
+ * - `END_USER_REQUEST` - The cardholder requested the closure of the card for reasons
+ * unrelated to fraud or damage, such as switching to a different product or closing the
+ * account.
+ * - `ISSUER_REQUEST` - The issuer closed the card for reasons unrelated to fraud or damage,
+ * such as account inactivity, product or policy changes, or technology upgrades.
+ * - `NOT_ACTIVE` - The card hasn’t had any transaction activity for a specified period,
+ * applicable to statuses like `PAUSED` or `CLOSED`.
+ * - `SUSPICIOUS_ACTIVITY` - The card has one or more suspicious transactions or activities
+ * that require review. This can involve prompting the cardholder to confirm legitimate
+ * use or report confirmed fraud.
+ * - `INTERNAL_REVIEW` - The card is temporarily paused pending further internal review.
+ * - `EXPIRED` - The card has expired and has been closed without being reissued.
+ * - `UNDELIVERABLE` - The card cannot be delivered to the cardholder and has been returned.
+ * - `OTHER` - The reason for the status does not fall into any of the above categories. A
+ * comment should be provided to specify the reason.
+ */
+ fun replacementSubstatus(replacementSubstatus: ReplacementSubstatus) = apply {
+ body.replacementSubstatus(replacementSubstatus)
+ }
+
+ /**
+ * Sets [Builder.replacementSubstatus] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.replacementSubstatus] with a well-typed
+ * [ReplacementSubstatus] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun replacementSubstatus(replacementSubstatus: JsonField) = apply {
+ body.replacementSubstatus(replacementSubstatus)
+ }
+
fun shippingAddress(shippingAddress: ShippingAddress) = apply {
body.shippingAddress(shippingAddress)
}
@@ -850,7 +957,9 @@ private constructor(
private val pin: JsonField,
private val productId: JsonField,
private val replacementAccountToken: JsonField,
+ private val replacementComment: JsonField,
private val replacementFor: JsonField,
+ private val replacementSubstatus: JsonField,
private val shippingAddress: JsonField,
private val shippingMethod: JsonField,
private val spendLimit: JsonField,
@@ -884,9 +993,15 @@ private constructor(
@JsonProperty("replacement_account_token")
@ExcludeMissing
replacementAccountToken: JsonField = JsonMissing.of(),
+ @JsonProperty("replacement_comment")
+ @ExcludeMissing
+ replacementComment: JsonField = JsonMissing.of(),
@JsonProperty("replacement_for")
@ExcludeMissing
replacementFor: JsonField = JsonMissing.of(),
+ @JsonProperty("replacement_substatus")
+ @ExcludeMissing
+ replacementSubstatus: JsonField = JsonMissing.of(),
@JsonProperty("shipping_address")
@ExcludeMissing
shippingAddress: JsonField = JsonMissing.of(),
@@ -912,7 +1027,9 @@ private constructor(
pin,
productId,
replacementAccountToken,
+ replacementComment,
replacementFor,
+ replacementSubstatus,
shippingAddress,
shippingMethod,
spendLimit,
@@ -1041,6 +1158,15 @@ private constructor(
fun replacementAccountToken(): Optional =
replacementAccountToken.getOptional("replacement_account_token")
+ /**
+ * Additional context or information related to the card that this card will replace.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun replacementComment(): Optional =
+ replacementComment.getOptional("replacement_comment")
+
/**
* Globally unique identifier for the card that this card will replace. If the card type is
* `PHYSICAL` it will be replaced by a `PHYSICAL` card. If the card type is `VIRTUAL` it
@@ -1051,6 +1177,36 @@ private constructor(
*/
fun replacementFor(): Optional = replacementFor.getOptional("replacement_for")
+ /**
+ * Card state substatus values for the card that this card will replace:
+ * - `LOST` - The physical card is no longer in the cardholder's possession due to being
+ * lost or never received by the cardholder.
+ * - `COMPROMISED` - Card information has been exposed, potentially leading to unauthorized
+ * access. This may involve physical card theft, cloning, or online data breaches.
+ * - `DAMAGED` - The physical card is not functioning properly, such as having chip failures
+ * or a demagnetized magnetic stripe.
+ * - `END_USER_REQUEST` - The cardholder requested the closure of the card for reasons
+ * unrelated to fraud or damage, such as switching to a different product or closing the
+ * account.
+ * - `ISSUER_REQUEST` - The issuer closed the card for reasons unrelated to fraud or damage,
+ * such as account inactivity, product or policy changes, or technology upgrades.
+ * - `NOT_ACTIVE` - The card hasn’t had any transaction activity for a specified period,
+ * applicable to statuses like `PAUSED` or `CLOSED`.
+ * - `SUSPICIOUS_ACTIVITY` - The card has one or more suspicious transactions or activities
+ * that require review. This can involve prompting the cardholder to confirm legitimate
+ * use or report confirmed fraud.
+ * - `INTERNAL_REVIEW` - The card is temporarily paused pending further internal review.
+ * - `EXPIRED` - The card has expired and has been closed without being reissued.
+ * - `UNDELIVERABLE` - The card cannot be delivered to the cardholder and has been returned.
+ * - `OTHER` - The reason for the status does not fall into any of the above categories. A
+ * comment should be provided to specify the reason.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun replacementSubstatus(): Optional =
+ replacementSubstatus.getOptional("replacement_substatus")
+
/**
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -1206,6 +1362,16 @@ private constructor(
@ExcludeMissing
fun _replacementAccountToken(): JsonField = replacementAccountToken
+ /**
+ * Returns the raw JSON value of [replacementComment].
+ *
+ * Unlike [replacementComment], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("replacement_comment")
+ @ExcludeMissing
+ fun _replacementComment(): JsonField = replacementComment
+
/**
* Returns the raw JSON value of [replacementFor].
*
@@ -1216,6 +1382,16 @@ private constructor(
@ExcludeMissing
fun _replacementFor(): JsonField = replacementFor
+ /**
+ * Returns the raw JSON value of [replacementSubstatus].
+ *
+ * Unlike [replacementSubstatus], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("replacement_substatus")
+ @ExcludeMissing
+ fun _replacementSubstatus(): JsonField = replacementSubstatus
+
/**
* Returns the raw JSON value of [shippingAddress].
*
@@ -1299,7 +1475,9 @@ private constructor(
private var pin: JsonField = JsonMissing.of()
private var productId: JsonField = JsonMissing.of()
private var replacementAccountToken: JsonField = JsonMissing.of()
+ private var replacementComment: JsonField = JsonMissing.of()
private var replacementFor: JsonField = JsonMissing.of()
+ private var replacementSubstatus: JsonField = JsonMissing.of()
private var shippingAddress: JsonField = JsonMissing.of()
private var shippingMethod: JsonField = JsonMissing.of()
private var spendLimit: JsonField = JsonMissing.of()
@@ -1320,7 +1498,9 @@ private constructor(
pin = body.pin
productId = body.productId
replacementAccountToken = body.replacementAccountToken
+ replacementComment = body.replacementComment
replacementFor = body.replacementFor
+ replacementSubstatus = body.replacementSubstatus
shippingAddress = body.shippingAddress
shippingMethod = body.shippingMethod
spendLimit = body.spendLimit
@@ -1521,6 +1701,23 @@ private constructor(
this.replacementAccountToken = replacementAccountToken
}
+ /**
+ * Additional context or information related to the card that this card will replace.
+ */
+ fun replacementComment(replacementComment: String) =
+ replacementComment(JsonField.of(replacementComment))
+
+ /**
+ * Sets [Builder.replacementComment] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.replacementComment] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun replacementComment(replacementComment: JsonField) = apply {
+ this.replacementComment = replacementComment
+ }
+
/**
* Globally unique identifier for the card that this card will replace. If the card type
* is `PHYSICAL` it will be replaced by a `PHYSICAL` card. If the card type is `VIRTUAL`
@@ -1540,6 +1737,48 @@ private constructor(
this.replacementFor = replacementFor
}
+ /**
+ * Card state substatus values for the card that this card will replace:
+ * - `LOST` - The physical card is no longer in the cardholder's possession due to being
+ * lost or never received by the cardholder.
+ * - `COMPROMISED` - Card information has been exposed, potentially leading to
+ * unauthorized access. This may involve physical card theft, cloning, or online data
+ * breaches.
+ * - `DAMAGED` - The physical card is not functioning properly, such as having chip
+ * failures or a demagnetized magnetic stripe.
+ * - `END_USER_REQUEST` - The cardholder requested the closure of the card for reasons
+ * unrelated to fraud or damage, such as switching to a different product or closing
+ * the account.
+ * - `ISSUER_REQUEST` - The issuer closed the card for reasons unrelated to fraud or
+ * damage, such as account inactivity, product or policy changes, or technology
+ * upgrades.
+ * - `NOT_ACTIVE` - The card hasn’t had any transaction activity for a specified period,
+ * applicable to statuses like `PAUSED` or `CLOSED`.
+ * - `SUSPICIOUS_ACTIVITY` - The card has one or more suspicious transactions or
+ * activities that require review. This can involve prompting the cardholder to
+ * confirm legitimate use or report confirmed fraud.
+ * - `INTERNAL_REVIEW` - The card is temporarily paused pending further internal review.
+ * - `EXPIRED` - The card has expired and has been closed without being reissued.
+ * - `UNDELIVERABLE` - The card cannot be delivered to the cardholder and has been
+ * returned.
+ * - `OTHER` - The reason for the status does not fall into any of the above categories.
+ * A comment should be provided to specify the reason.
+ */
+ fun replacementSubstatus(replacementSubstatus: ReplacementSubstatus) =
+ replacementSubstatus(JsonField.of(replacementSubstatus))
+
+ /**
+ * Sets [Builder.replacementSubstatus] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.replacementSubstatus] with a well-typed
+ * [ReplacementSubstatus] value instead. This method is primarily for setting the field
+ * to an undocumented or not yet supported value.
+ */
+ fun replacementSubstatus(replacementSubstatus: JsonField) =
+ apply {
+ this.replacementSubstatus = replacementSubstatus
+ }
+
fun shippingAddress(shippingAddress: ShippingAddress) =
shippingAddress(JsonField.of(shippingAddress))
@@ -1688,7 +1927,9 @@ private constructor(
pin,
productId,
replacementAccountToken,
+ replacementComment,
replacementFor,
+ replacementSubstatus,
shippingAddress,
shippingMethod,
spendLimit,
@@ -1716,7 +1957,9 @@ private constructor(
pin()
productId()
replacementAccountToken()
+ replacementComment()
replacementFor()
+ replacementSubstatus().ifPresent { it.validate() }
shippingAddress().ifPresent { it.validate() }
shippingMethod().ifPresent { it.validate() }
spendLimit()
@@ -1752,7 +1995,9 @@ private constructor(
(if (pin.asKnown().isPresent) 1 else 0) +
(if (productId.asKnown().isPresent) 1 else 0) +
(if (replacementAccountToken.asKnown().isPresent) 1 else 0) +
+ (if (replacementComment.asKnown().isPresent) 1 else 0) +
(if (replacementFor.asKnown().isPresent) 1 else 0) +
+ (replacementSubstatus.asKnown().getOrNull()?.validity() ?: 0) +
(shippingAddress.asKnown().getOrNull()?.validity() ?: 0) +
(shippingMethod.asKnown().getOrNull()?.validity() ?: 0) +
(if (spendLimit.asKnown().isPresent) 1 else 0) +
@@ -1764,17 +2009,17 @@ private constructor(
return true
}
- return /* spotless:off */ other is Body && type == other.type && accountToken == other.accountToken && cardProgramToken == other.cardProgramToken && carrier == other.carrier && digitalCardArtToken == other.digitalCardArtToken && expMonth == other.expMonth && expYear == other.expYear && memo == other.memo && pin == other.pin && productId == other.productId && replacementAccountToken == other.replacementAccountToken && replacementFor == other.replacementFor && shippingAddress == other.shippingAddress && shippingMethod == other.shippingMethod && spendLimit == other.spendLimit && spendLimitDuration == other.spendLimitDuration && state == other.state && additionalProperties == other.additionalProperties /* spotless:on */
+ return /* spotless:off */ other is Body && type == other.type && accountToken == other.accountToken && cardProgramToken == other.cardProgramToken && carrier == other.carrier && digitalCardArtToken == other.digitalCardArtToken && expMonth == other.expMonth && expYear == other.expYear && memo == other.memo && pin == other.pin && productId == other.productId && replacementAccountToken == other.replacementAccountToken && replacementComment == other.replacementComment && replacementFor == other.replacementFor && replacementSubstatus == other.replacementSubstatus && shippingAddress == other.shippingAddress && shippingMethod == other.shippingMethod && spendLimit == other.spendLimit && spendLimitDuration == other.spendLimitDuration && state == other.state && additionalProperties == other.additionalProperties /* spotless:on */
}
/* spotless:off */
- private val hashCode: Int by lazy { Objects.hash(type, accountToken, cardProgramToken, carrier, digitalCardArtToken, expMonth, expYear, memo, pin, productId, replacementAccountToken, replacementFor, shippingAddress, shippingMethod, spendLimit, spendLimitDuration, state, additionalProperties) }
+ private val hashCode: Int by lazy { Objects.hash(type, accountToken, cardProgramToken, carrier, digitalCardArtToken, expMonth, expYear, memo, pin, productId, replacementAccountToken, replacementComment, replacementFor, replacementSubstatus, shippingAddress, shippingMethod, spendLimit, spendLimitDuration, state, additionalProperties) }
/* spotless:on */
override fun hashCode(): Int = hashCode
override fun toString() =
- "Body{type=$type, accountToken=$accountToken, cardProgramToken=$cardProgramToken, carrier=$carrier, digitalCardArtToken=$digitalCardArtToken, expMonth=$expMonth, expYear=$expYear, memo=$memo, pin=$pin, productId=$productId, replacementAccountToken=$replacementAccountToken, replacementFor=$replacementFor, shippingAddress=$shippingAddress, shippingMethod=$shippingMethod, spendLimit=$spendLimit, spendLimitDuration=$spendLimitDuration, state=$state, additionalProperties=$additionalProperties}"
+ "Body{type=$type, accountToken=$accountToken, cardProgramToken=$cardProgramToken, carrier=$carrier, digitalCardArtToken=$digitalCardArtToken, expMonth=$expMonth, expYear=$expYear, memo=$memo, pin=$pin, productId=$productId, replacementAccountToken=$replacementAccountToken, replacementComment=$replacementComment, replacementFor=$replacementFor, replacementSubstatus=$replacementSubstatus, shippingAddress=$shippingAddress, shippingMethod=$shippingMethod, spendLimit=$spendLimit, spendLimitDuration=$spendLimitDuration, state=$state, additionalProperties=$additionalProperties}"
}
/**
@@ -1940,6 +2185,214 @@ private constructor(
override fun toString() = value.toString()
}
+ /**
+ * Card state substatus values for the card that this card will replace:
+ * - `LOST` - The physical card is no longer in the cardholder's possession due to being lost or
+ * never received by the cardholder.
+ * - `COMPROMISED` - Card information has been exposed, potentially leading to unauthorized
+ * access. This may involve physical card theft, cloning, or online data breaches.
+ * - `DAMAGED` - The physical card is not functioning properly, such as having chip failures or
+ * a demagnetized magnetic stripe.
+ * - `END_USER_REQUEST` - The cardholder requested the closure of the card for reasons unrelated
+ * to fraud or damage, such as switching to a different product or closing the account.
+ * - `ISSUER_REQUEST` - The issuer closed the card for reasons unrelated to fraud or damage,
+ * such as account inactivity, product or policy changes, or technology upgrades.
+ * - `NOT_ACTIVE` - The card hasn’t had any transaction activity for a specified period,
+ * applicable to statuses like `PAUSED` or `CLOSED`.
+ * - `SUSPICIOUS_ACTIVITY` - The card has one or more suspicious transactions or activities that
+ * require review. This can involve prompting the cardholder to confirm legitimate use or
+ * report confirmed fraud.
+ * - `INTERNAL_REVIEW` - The card is temporarily paused pending further internal review.
+ * - `EXPIRED` - The card has expired and has been closed without being reissued.
+ * - `UNDELIVERABLE` - The card cannot be delivered to the cardholder and has been returned.
+ * - `OTHER` - The reason for the status does not fall into any of the above categories. A
+ * comment should be provided to specify the reason.
+ */
+ class ReplacementSubstatus
+ @JsonCreator
+ private constructor(private val value: JsonField) : Enum {
+
+ /**
+ * Returns this class instance's raw value.
+ *
+ * This is usually only useful if this instance was deserialized from data that doesn't
+ * match any known member, and you want to know that value. For example, if the SDK is on an
+ * older version than the API, then the API may respond with new members that the SDK is
+ * unaware of.
+ */
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ companion object {
+
+ @JvmField val LOST = of("LOST")
+
+ @JvmField val COMPROMISED = of("COMPROMISED")
+
+ @JvmField val DAMAGED = of("DAMAGED")
+
+ @JvmField val END_USER_REQUEST = of("END_USER_REQUEST")
+
+ @JvmField val ISSUER_REQUEST = of("ISSUER_REQUEST")
+
+ @JvmField val NOT_ACTIVE = of("NOT_ACTIVE")
+
+ @JvmField val SUSPICIOUS_ACTIVITY = of("SUSPICIOUS_ACTIVITY")
+
+ @JvmField val INTERNAL_REVIEW = of("INTERNAL_REVIEW")
+
+ @JvmField val EXPIRED = of("EXPIRED")
+
+ @JvmField val UNDELIVERABLE = of("UNDELIVERABLE")
+
+ @JvmField val OTHER = of("OTHER")
+
+ @JvmStatic fun of(value: String) = ReplacementSubstatus(JsonField.of(value))
+ }
+
+ /** An enum containing [ReplacementSubstatus]'s known values. */
+ enum class Known {
+ LOST,
+ COMPROMISED,
+ DAMAGED,
+ END_USER_REQUEST,
+ ISSUER_REQUEST,
+ NOT_ACTIVE,
+ SUSPICIOUS_ACTIVITY,
+ INTERNAL_REVIEW,
+ EXPIRED,
+ UNDELIVERABLE,
+ OTHER,
+ }
+
+ /**
+ * An enum containing [ReplacementSubstatus]'s known values, as well as an [_UNKNOWN]
+ * member.
+ *
+ * An instance of [ReplacementSubstatus] can contain an unknown value in a couple of cases:
+ * - It was deserialized from data that doesn't match any known member. For example, if the
+ * SDK is on an older version than the API, then the API may respond with new members that
+ * the SDK is unaware of.
+ * - It was constructed with an arbitrary value using the [of] method.
+ */
+ enum class Value {
+ LOST,
+ COMPROMISED,
+ DAMAGED,
+ END_USER_REQUEST,
+ ISSUER_REQUEST,
+ NOT_ACTIVE,
+ SUSPICIOUS_ACTIVITY,
+ INTERNAL_REVIEW,
+ EXPIRED,
+ UNDELIVERABLE,
+ OTHER,
+ /**
+ * An enum member indicating that [ReplacementSubstatus] was instantiated with an
+ * unknown value.
+ */
+ _UNKNOWN,
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN]
+ * if the class was instantiated with an unknown value.
+ *
+ * Use the [known] method instead if you're certain the value is always known or if you want
+ * to throw for the unknown case.
+ */
+ fun value(): Value =
+ when (this) {
+ LOST -> Value.LOST
+ COMPROMISED -> Value.COMPROMISED
+ DAMAGED -> Value.DAMAGED
+ END_USER_REQUEST -> Value.END_USER_REQUEST
+ ISSUER_REQUEST -> Value.ISSUER_REQUEST
+ NOT_ACTIVE -> Value.NOT_ACTIVE
+ SUSPICIOUS_ACTIVITY -> Value.SUSPICIOUS_ACTIVITY
+ INTERNAL_REVIEW -> Value.INTERNAL_REVIEW
+ EXPIRED -> Value.EXPIRED
+ UNDELIVERABLE -> Value.UNDELIVERABLE
+ OTHER -> Value.OTHER
+ else -> Value._UNKNOWN
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value.
+ *
+ * Use the [value] method instead if you're uncertain the value is always known and don't
+ * want to throw for the unknown case.
+ *
+ * @throws LithicInvalidDataException if this class instance's value is a not a known
+ * member.
+ */
+ fun known(): Known =
+ when (this) {
+ LOST -> Known.LOST
+ COMPROMISED -> Known.COMPROMISED
+ DAMAGED -> Known.DAMAGED
+ END_USER_REQUEST -> Known.END_USER_REQUEST
+ ISSUER_REQUEST -> Known.ISSUER_REQUEST
+ NOT_ACTIVE -> Known.NOT_ACTIVE
+ SUSPICIOUS_ACTIVITY -> Known.SUSPICIOUS_ACTIVITY
+ INTERNAL_REVIEW -> Known.INTERNAL_REVIEW
+ EXPIRED -> Known.EXPIRED
+ UNDELIVERABLE -> Known.UNDELIVERABLE
+ OTHER -> Known.OTHER
+ else -> throw LithicInvalidDataException("Unknown ReplacementSubstatus: $value")
+ }
+
+ /**
+ * Returns this class instance's primitive wire representation.
+ *
+ * This differs from the [toString] method because that method is primarily for debugging
+ * and generally doesn't throw.
+ *
+ * @throws LithicInvalidDataException if this class instance's value does not have the
+ * expected primitive type.
+ */
+ fun asString(): String =
+ _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") }
+
+ private var validated: Boolean = false
+
+ fun validate(): ReplacementSubstatus = apply {
+ if (validated) {
+ return@apply
+ }
+
+ known()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: LithicInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return /* spotless:off */ other is ReplacementSubstatus && value == other.value /* spotless:on */
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
/**
* Shipping method for the card. Only applies to cards of type PHYSICAL. Use of options besides
* `STANDARD` require additional permissions.
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardProgram.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardProgram.kt
index 7fe71f0b5..41ad2b4dd 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardProgram.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardProgram.kt
@@ -27,6 +27,7 @@ private constructor(
private val name: JsonField,
private val panRangeEnd: JsonField,
private val panRangeStart: JsonField,
+ private val accountLevelManagementEnabled: JsonField,
private val cardholderCurrency: JsonField,
private val settlementCurrencies: JsonField>,
private val additionalProperties: MutableMap,
@@ -45,6 +46,9 @@ private constructor(
@JsonProperty("pan_range_start")
@ExcludeMissing
panRangeStart: JsonField = JsonMissing.of(),
+ @JsonProperty("account_level_management_enabled")
+ @ExcludeMissing
+ accountLevelManagementEnabled: JsonField = JsonMissing.of(),
@JsonProperty("cardholder_currency")
@ExcludeMissing
cardholderCurrency: JsonField = JsonMissing.of(),
@@ -57,6 +61,7 @@ private constructor(
name,
panRangeEnd,
panRangeStart,
+ accountLevelManagementEnabled,
cardholderCurrency,
settlementCurrencies,
mutableMapOf(),
@@ -102,6 +107,16 @@ private constructor(
*/
fun panRangeStart(): String = panRangeStart.getRequired("pan_range_start")
+ /**
+ * Whether the card program is participating in Account Level Management. Currently applicable
+ * to Visa card programs only.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun accountLevelManagementEnabled(): Optional =
+ accountLevelManagementEnabled.getOptional("account_level_management_enabled")
+
/**
* 3-character alphabetic ISO 4217 code for the currency of the cardholder.
*
@@ -160,6 +175,16 @@ private constructor(
@ExcludeMissing
fun _panRangeStart(): JsonField = panRangeStart
+ /**
+ * Returns the raw JSON value of [accountLevelManagementEnabled].
+ *
+ * Unlike [accountLevelManagementEnabled], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("account_level_management_enabled")
+ @ExcludeMissing
+ fun _accountLevelManagementEnabled(): JsonField = accountLevelManagementEnabled
+
/**
* Returns the raw JSON value of [cardholderCurrency].
*
@@ -217,6 +242,7 @@ private constructor(
private var name: JsonField? = null
private var panRangeEnd: JsonField? = null
private var panRangeStart: JsonField? = null
+ private var accountLevelManagementEnabled: JsonField = JsonMissing.of()
private var cardholderCurrency: JsonField = JsonMissing.of()
private var settlementCurrencies: JsonField>? = null
private var additionalProperties: MutableMap = mutableMapOf()
@@ -228,6 +254,7 @@ private constructor(
name = cardProgram.name
panRangeEnd = cardProgram.panRangeEnd
panRangeStart = cardProgram.panRangeStart
+ accountLevelManagementEnabled = cardProgram.accountLevelManagementEnabled
cardholderCurrency = cardProgram.cardholderCurrency
settlementCurrencies = cardProgram.settlementCurrencies.map { it.toMutableList() }
additionalProperties = cardProgram.additionalProperties.toMutableMap()
@@ -293,6 +320,25 @@ private constructor(
this.panRangeStart = panRangeStart
}
+ /**
+ * Whether the card program is participating in Account Level Management. Currently
+ * applicable to Visa card programs only.
+ */
+ fun accountLevelManagementEnabled(accountLevelManagementEnabled: Boolean) =
+ accountLevelManagementEnabled(JsonField.of(accountLevelManagementEnabled))
+
+ /**
+ * Sets [Builder.accountLevelManagementEnabled] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.accountLevelManagementEnabled] with a well-typed
+ * [Boolean] value instead. This method is primarily for setting the field to an
+ * undocumented or not yet supported value.
+ */
+ fun accountLevelManagementEnabled(accountLevelManagementEnabled: JsonField) =
+ apply {
+ this.accountLevelManagementEnabled = accountLevelManagementEnabled
+ }
+
/** 3-character alphabetic ISO 4217 code for the currency of the cardholder. */
fun cardholderCurrency(cardholderCurrency: String) =
cardholderCurrency(JsonField.of(cardholderCurrency))
@@ -380,6 +426,7 @@ private constructor(
checkRequired("name", name),
checkRequired("panRangeEnd", panRangeEnd),
checkRequired("panRangeStart", panRangeStart),
+ accountLevelManagementEnabled,
cardholderCurrency,
(settlementCurrencies ?: JsonMissing.of()).map { it.toImmutable() },
additionalProperties.toMutableMap(),
@@ -398,6 +445,7 @@ private constructor(
name()
panRangeEnd()
panRangeStart()
+ accountLevelManagementEnabled()
cardholderCurrency()
settlementCurrencies()
validated = true
@@ -423,6 +471,7 @@ private constructor(
(if (name.asKnown().isPresent) 1 else 0) +
(if (panRangeEnd.asKnown().isPresent) 1 else 0) +
(if (panRangeStart.asKnown().isPresent) 1 else 0) +
+ (if (accountLevelManagementEnabled.asKnown().isPresent) 1 else 0) +
(if (cardholderCurrency.asKnown().isPresent) 1 else 0) +
(settlementCurrencies.asKnown().getOrNull()?.size ?: 0)
@@ -431,15 +480,15 @@ private constructor(
return true
}
- return /* spotless:off */ other is CardProgram && token == other.token && created == other.created && name == other.name && panRangeEnd == other.panRangeEnd && panRangeStart == other.panRangeStart && cardholderCurrency == other.cardholderCurrency && settlementCurrencies == other.settlementCurrencies && additionalProperties == other.additionalProperties /* spotless:on */
+ return /* spotless:off */ other is CardProgram && token == other.token && created == other.created && name == other.name && panRangeEnd == other.panRangeEnd && panRangeStart == other.panRangeStart && accountLevelManagementEnabled == other.accountLevelManagementEnabled && cardholderCurrency == other.cardholderCurrency && settlementCurrencies == other.settlementCurrencies && additionalProperties == other.additionalProperties /* spotless:on */
}
/* spotless:off */
- private val hashCode: Int by lazy { Objects.hash(token, created, name, panRangeEnd, panRangeStart, cardholderCurrency, settlementCurrencies, additionalProperties) }
+ private val hashCode: Int by lazy { Objects.hash(token, created, name, panRangeEnd, panRangeStart, accountLevelManagementEnabled, cardholderCurrency, settlementCurrencies, additionalProperties) }
/* spotless:on */
override fun hashCode(): Int = hashCode
override fun toString() =
- "CardProgram{token=$token, created=$created, name=$name, panRangeEnd=$panRangeEnd, panRangeStart=$panRangeStart, cardholderCurrency=$cardholderCurrency, settlementCurrencies=$settlementCurrencies, additionalProperties=$additionalProperties}"
+ "CardProgram{token=$token, created=$created, name=$name, panRangeEnd=$panRangeEnd, panRangeStart=$panRangeStart, accountLevelManagementEnabled=$accountLevelManagementEnabled, cardholderCurrency=$cardholderCurrency, settlementCurrencies=$settlementCurrencies, additionalProperties=$additionalProperties}"
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardUpdateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardUpdateParams.kt
index bea496442..60a9306ff 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardUpdateParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardUpdateParams.kt
@@ -35,6 +35,14 @@ private constructor(
fun cardToken(): Optional = Optional.ofNullable(cardToken)
+ /**
+ * Additional context or information related to the card.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun comment(): Optional = body.comment()
+
/**
* Specifies the digital card art to be displayed in the user’s digital wallet after
* tokenization. This artwork must be approved by Mastercard and configured by Lithic to use.
@@ -54,6 +62,15 @@ private constructor(
*/
fun memo(): Optional = body.memo()
+ /**
+ * Globally unique identifier for the card's network program. Currently applicable to Visa cards
+ * participating in Account Level Management only.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun networkProgramToken(): Optional = body.networkProgramToken()
+
/**
* Encrypted PIN block (in base64). Only applies to cards of type `PHYSICAL` and `VIRTUAL`.
* Changing PIN also resets PIN status to `OK`. See
@@ -111,6 +128,41 @@ private constructor(
*/
fun state(): Optional = body.state()
+ /**
+ * Card state substatus values:
+ * - `LOST` - The physical card is no longer in the cardholder's possession due to being lost or
+ * never received by the cardholder.
+ * - `COMPROMISED` - Card information has been exposed, potentially leading to unauthorized
+ * access. This may involve physical card theft, cloning, or online data breaches.
+ * - `DAMAGED` - The physical card is not functioning properly, such as having chip failures or
+ * a demagnetized magnetic stripe.
+ * - `END_USER_REQUEST` - The cardholder requested the closure of the card for reasons unrelated
+ * to fraud or damage, such as switching to a different product or closing the account.
+ * - `ISSUER_REQUEST` - The issuer closed the card for reasons unrelated to fraud or damage,
+ * such as account inactivity, product or policy changes, or technology upgrades.
+ * - `NOT_ACTIVE` - The card hasn’t had any transaction activity for a specified period,
+ * applicable to statuses like `PAUSED` or `CLOSED`.
+ * - `SUSPICIOUS_ACTIVITY` - The card has one or more suspicious transactions or activities that
+ * require review. This can involve prompting the cardholder to confirm legitimate use or
+ * report confirmed fraud.
+ * - `INTERNAL_REVIEW` - The card is temporarily paused pending further internal review.
+ * - `EXPIRED` - The card has expired and has been closed without being reissued.
+ * - `UNDELIVERABLE` - The card cannot be delivered to the cardholder and has been returned.
+ * - `OTHER` - The reason for the status does not fall into any of the above categories. A
+ * comment should be provided to specify the reason.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun substatus(): Optional = body.substatus()
+
+ /**
+ * Returns the raw JSON value of [comment].
+ *
+ * Unlike [comment], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _comment(): JsonField = body._comment()
+
/**
* Returns the raw JSON value of [digitalCardArtToken].
*
@@ -126,6 +178,14 @@ private constructor(
*/
fun _memo(): JsonField = body._memo()
+ /**
+ * Returns the raw JSON value of [networkProgramToken].
+ *
+ * Unlike [networkProgramToken], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ fun _networkProgramToken(): JsonField = body._networkProgramToken()
+
/**
* Returns the raw JSON value of [pin].
*
@@ -162,6 +222,13 @@ private constructor(
*/
fun _state(): JsonField = body._state()
+ /**
+ * Returns the raw JSON value of [substatus].
+ *
+ * Unlike [substatus], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _substatus(): JsonField = body._substatus()
+
fun _additionalBodyProperties(): Map = body._additionalProperties()
fun _additionalHeaders(): Headers = additionalHeaders
@@ -204,15 +271,26 @@ private constructor(
*
* This is generally only useful if you are already constructing the body separately.
* Otherwise, it's more convenient to use the top-level setters instead:
+ * - [comment]
* - [digitalCardArtToken]
* - [memo]
+ * - [networkProgramToken]
* - [pin]
- * - [pinStatus]
- * - [spendLimit]
* - etc.
*/
fun body(body: Body) = apply { this.body = body.toBuilder() }
+ /** Additional context or information related to the card. */
+ fun comment(comment: String) = apply { body.comment(comment) }
+
+ /**
+ * Sets [Builder.comment] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.comment] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun comment(comment: JsonField) = apply { body.comment(comment) }
+
/**
* Specifies the digital card art to be displayed in the user’s digital wallet after
* tokenization. This artwork must be approved by Mastercard and configured by Lithic to
@@ -245,6 +323,25 @@ private constructor(
*/
fun memo(memo: JsonField) = apply { body.memo(memo) }
+ /**
+ * Globally unique identifier for the card's network program. Currently applicable to Visa
+ * cards participating in Account Level Management only.
+ */
+ fun networkProgramToken(networkProgramToken: String) = apply {
+ body.networkProgramToken(networkProgramToken)
+ }
+
+ /**
+ * Sets [Builder.networkProgramToken] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.networkProgramToken] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun networkProgramToken(networkProgramToken: JsonField) = apply {
+ body.networkProgramToken(networkProgramToken)
+ }
+
/**
* Encrypted PIN block (in base64). Only applies to cards of type `PHYSICAL` and `VIRTUAL`.
* Changing PIN also resets PIN status to `OK`. See
@@ -335,6 +432,41 @@ private constructor(
*/
fun state(state: JsonField) = apply { body.state(state) }
+ /**
+ * Card state substatus values:
+ * - `LOST` - The physical card is no longer in the cardholder's possession due to being
+ * lost or never received by the cardholder.
+ * - `COMPROMISED` - Card information has been exposed, potentially leading to unauthorized
+ * access. This may involve physical card theft, cloning, or online data breaches.
+ * - `DAMAGED` - The physical card is not functioning properly, such as having chip failures
+ * or a demagnetized magnetic stripe.
+ * - `END_USER_REQUEST` - The cardholder requested the closure of the card for reasons
+ * unrelated to fraud or damage, such as switching to a different product or closing the
+ * account.
+ * - `ISSUER_REQUEST` - The issuer closed the card for reasons unrelated to fraud or damage,
+ * such as account inactivity, product or policy changes, or technology upgrades.
+ * - `NOT_ACTIVE` - The card hasn’t had any transaction activity for a specified period,
+ * applicable to statuses like `PAUSED` or `CLOSED`.
+ * - `SUSPICIOUS_ACTIVITY` - The card has one or more suspicious transactions or activities
+ * that require review. This can involve prompting the cardholder to confirm legitimate
+ * use or report confirmed fraud.
+ * - `INTERNAL_REVIEW` - The card is temporarily paused pending further internal review.
+ * - `EXPIRED` - The card has expired and has been closed without being reissued.
+ * - `UNDELIVERABLE` - The card cannot be delivered to the cardholder and has been returned.
+ * - `OTHER` - The reason for the status does not fall into any of the above categories. A
+ * comment should be provided to specify the reason.
+ */
+ fun substatus(substatus: Substatus) = apply { body.substatus(substatus) }
+
+ /**
+ * Sets [Builder.substatus] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.substatus] with a well-typed [Substatus] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun substatus(substatus: JsonField) = apply { body.substatus(substatus) }
+
fun additionalBodyProperties(additionalBodyProperties: Map) = apply {
body.additionalProperties(additionalBodyProperties)
}
@@ -480,22 +612,29 @@ private constructor(
class Body
private constructor(
+ private val comment: JsonField,
private val digitalCardArtToken: JsonField,
private val memo: JsonField,
+ private val networkProgramToken: JsonField,
private val pin: JsonField,
private val pinStatus: JsonField,
private val spendLimit: JsonField,
private val spendLimitDuration: JsonField,
private val state: JsonField,
+ private val substatus: JsonField,
private val additionalProperties: MutableMap,
) {
@JsonCreator
private constructor(
+ @JsonProperty("comment") @ExcludeMissing comment: JsonField = JsonMissing.of(),
@JsonProperty("digital_card_art_token")
@ExcludeMissing
digitalCardArtToken: JsonField = JsonMissing.of(),
@JsonProperty("memo") @ExcludeMissing memo: JsonField = JsonMissing.of(),
+ @JsonProperty("network_program_token")
+ @ExcludeMissing
+ networkProgramToken: JsonField = JsonMissing.of(),
@JsonProperty("pin") @ExcludeMissing pin: JsonField = JsonMissing.of(),
@JsonProperty("pin_status")
@ExcludeMissing
@@ -507,17 +646,31 @@ private constructor(
@ExcludeMissing
spendLimitDuration: JsonField = JsonMissing.of(),
@JsonProperty("state") @ExcludeMissing state: JsonField = JsonMissing.of(),
+ @JsonProperty("substatus")
+ @ExcludeMissing
+ substatus: JsonField = JsonMissing.of(),
) : this(
+ comment,
digitalCardArtToken,
memo,
+ networkProgramToken,
pin,
pinStatus,
spendLimit,
spendLimitDuration,
state,
+ substatus,
mutableMapOf(),
)
+ /**
+ * Additional context or information related to the card.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun comment(): Optional = comment.getOptional("comment")
+
/**
* Specifies the digital card art to be displayed in the user’s digital wallet after
* tokenization. This artwork must be approved by Mastercard and configured by Lithic to
@@ -538,6 +691,16 @@ private constructor(
*/
fun memo(): Optional = memo.getOptional("memo")
+ /**
+ * Globally unique identifier for the card's network program. Currently applicable to Visa
+ * cards participating in Account Level Management only.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun networkProgramToken(): Optional =
+ networkProgramToken.getOptional("network_program_token")
+
/**
* Encrypted PIN block (in base64). Only applies to cards of type `PHYSICAL` and `VIRTUAL`.
* Changing PIN also resets PIN status to `OK`. See
@@ -598,6 +761,42 @@ private constructor(
*/
fun state(): Optional = state.getOptional("state")
+ /**
+ * Card state substatus values:
+ * - `LOST` - The physical card is no longer in the cardholder's possession due to being
+ * lost or never received by the cardholder.
+ * - `COMPROMISED` - Card information has been exposed, potentially leading to unauthorized
+ * access. This may involve physical card theft, cloning, or online data breaches.
+ * - `DAMAGED` - The physical card is not functioning properly, such as having chip failures
+ * or a demagnetized magnetic stripe.
+ * - `END_USER_REQUEST` - The cardholder requested the closure of the card for reasons
+ * unrelated to fraud or damage, such as switching to a different product or closing the
+ * account.
+ * - `ISSUER_REQUEST` - The issuer closed the card for reasons unrelated to fraud or damage,
+ * such as account inactivity, product or policy changes, or technology upgrades.
+ * - `NOT_ACTIVE` - The card hasn’t had any transaction activity for a specified period,
+ * applicable to statuses like `PAUSED` or `CLOSED`.
+ * - `SUSPICIOUS_ACTIVITY` - The card has one or more suspicious transactions or activities
+ * that require review. This can involve prompting the cardholder to confirm legitimate
+ * use or report confirmed fraud.
+ * - `INTERNAL_REVIEW` - The card is temporarily paused pending further internal review.
+ * - `EXPIRED` - The card has expired and has been closed without being reissued.
+ * - `UNDELIVERABLE` - The card cannot be delivered to the cardholder and has been returned.
+ * - `OTHER` - The reason for the status does not fall into any of the above categories. A
+ * comment should be provided to specify the reason.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun substatus(): Optional = substatus.getOptional("substatus")
+
+ /**
+ * Returns the raw JSON value of [comment].
+ *
+ * Unlike [comment], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("comment") @ExcludeMissing fun _comment(): JsonField = comment
+
/**
* Returns the raw JSON value of [digitalCardArtToken].
*
@@ -615,6 +814,16 @@ private constructor(
*/
@JsonProperty("memo") @ExcludeMissing fun _memo(): JsonField