diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 40ef7f83..906878cb 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -19,7 +19,7 @@ jobs:
timeout-minutes: 15
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/lithic-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
- if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
+ if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- uses: actions/checkout@v6
@@ -46,7 +46,7 @@ jobs:
contents: read
id-token: write
runs-on: ${{ github.repository == 'stainless-sdks/lithic-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
- if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
+ if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- uses: actions/checkout@v6
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index bd115b20..58ebf7f2 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.122.0"
+ ".": "0.123.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 2c9eb4a3..3481820f 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 190
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-17c04dd1b0508b380c21e3acc3d4cd1e86b590f81d14fa26d1973b236f660e38.yml
-openapi_spec_hash: f8ddee07358d2c938450a6889fbf7940
-config_hash: edbdfefeb0d3d927c2f9fe3402793215
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-df28ee30a3bd4fa595befc2048216e1ee1d3845fcfcf179c1c694ba58fd5e4ed.yml
+openapi_spec_hash: 79bfc19d85c7f03754684d794653e333
+config_hash: 5eca052bb23d273fa970eac3127dd919
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 836ebac9..7fbdccd2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,37 @@
# Changelog
+## 0.123.0 (2026-04-10)
+
+Full Changelog: [v0.122.0...v0.123.0](https://github.com/lithic-com/lithic-java/compare/v0.122.0...v0.123.0)
+
+### Features
+
+* **api:** add card decline count values to conditional authorization ([65f1c4b](https://github.com/lithic-com/lithic-java/commit/65f1c4b2a4c28c8a9fbc07a187fb01cf4567461c))
+* **api:** add INTERCHANGE, CHARGEBACK, PROVISIONAL_CREDIT_ACCOUNT to financial account types ([a06a494](https://github.com/lithic-com/lithic-java/commit/a06a49406fc967ebb0047ea96a2e6b2f5405d101))
+* **api:** add override_company_name parameter to payment create ([899a3be](https://github.com/lithic-com/lithic-java/commit/899a3be4a06965cf3a37cf4ddf6f8581fac9351a))
+* **api:** add statement_totals field to Statement/StatementsCreatedWebhookEvent ([44d890e](https://github.com/lithic-com/lithic-java/commit/44d890e17988a1e587124a95afe3984c99a3bca0))
+* **api:** add transaction_token field to BacktestStats/ReportStats examples ([b4209cb](https://github.com/lithic-com/lithic-java/commit/b4209cb157f545e04f1dab41185c7d4e0aae4628))
+* **api:** add transaction_token to authorization/authentication3ds/tokenization/ach results ([5bf85e9](https://github.com/lithic-com/lithic-java/commit/5bf85e90787b46c68077f7107165580991bbec97))
+
+
+### Bug Fixes
+
+* **types:** make creditProductToken optional in Statement ([f655477](https://github.com/lithic-com/lithic-java/commit/f655477b2d6a9bd20d869599f21dd2910ed3f809))
+* **types:** make data and has_more required in AccountActivityListPageResponse ([5feba92](https://github.com/lithic-com/lithic-java/commit/5feba92cc13a3877fb2769d8808e65959b4b12b9))
+* **types:** remove hostname, make fields required in AsaRequestCard ([67cbf7d](https://github.com/lithic-com/lithic-java/commit/67cbf7d5138afeae5b76339972c28fa63fbc3e30))
+* **types:** remove INTERCHANGE and CHARGEBACK from FinancialAccount and InstanceFinancialAccountType ([21b74ec](https://github.com/lithic-com/lithic-java/commit/21b74ec6a8478a4cbe3ea665f3f46496eba09402))
+
+
+### Chores
+
+* **ci:** skip lint on metadata-only changes ([c266aa2](https://github.com/lithic-com/lithic-java/commit/c266aa2a776ae772b05a025dab383477ec5c2d0d))
+* **types:** [breaking] remove deprecated fields from ReportStats and Example models ([634a6e2](https://github.com/lithic-com/lithic-java/commit/634a6e237a00f443864fd8e4b8b26344dc83160d))
+
+
+### Documentation
+
+* **api:** update natureOfBusiness and qrCodeUrl parameter descriptions ([2fe328d](https://github.com/lithic-com/lithic-java/commit/2fe328dff29b7df2d9096274e5725e1bf37df25f))
+
## 0.122.0 (2026-03-23)
Full Changelog: [v0.121.0...v0.122.0](https://github.com/lithic-com/lithic-java/compare/v0.121.0...v0.122.0)
diff --git a/README.md b/README.md
index 3f07769b..b7fe002a 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.122.0)
-[](https://javadoc.io/doc/com.lithic.api/lithic-java/0.122.0)
+[](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.123.0)
+[](https://javadoc.io/doc/com.lithic.api/lithic-java/0.123.0)
@@ -22,7 +22,7 @@ Use the Lithic MCP Server to enable AI assistants to interact with this API, all
-The REST API documentation can be found on [docs.lithic.com](https://docs.lithic.com). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.lithic.api/lithic-java/0.122.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.123.0).
@@ -33,7 +33,7 @@ The REST API documentation can be found on [docs.lithic.com](https://docs.lithic
### Gradle
```kotlin
-implementation("com.lithic.api:lithic-java:0.122.0")
+implementation("com.lithic.api:lithic-java:0.123.0")
```
### Maven
@@ -42,7 +42,7 @@ implementation("com.lithic.api:lithic-java:0.122.0")
com.lithic.api
lithic-java
- 0.122.0
+ 0.123.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index d37f4f1f..97b99941 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.lithic.api"
- version = "0.122.0" // x-release-please-version
+ version = "0.123.0" // x-release-please-version
}
subprojects {
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListPageResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListPageResponse.kt
index ccf10fd8..db504ef4 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListPageResponse.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListPageResponse.kt
@@ -11,11 +11,11 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.checkKnown
+import com.lithic.api.core.checkRequired
import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.util.Collections
import java.util.Objects
-import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** A response containing a list of transactions */
@@ -36,18 +36,18 @@ private constructor(
) : this(data, hasMore, mutableMapOf())
/**
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- fun data(): Optional> = data.getOptional("data")
+ fun data(): List = data.getRequired("data")
/**
* Indicates if there are more transactions available for pagination
*
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- fun hasMore(): Optional = hasMore.getOptional("has_more")
+ fun hasMore(): Boolean = hasMore.getRequired("has_more")
/**
* Returns the raw JSON value of [data].
@@ -82,6 +82,12 @@ private constructor(
/**
* Returns a mutable builder for constructing an instance of
* [AccountActivityListPageResponse].
+ *
+ * The following fields are required:
+ * ```java
+ * .data()
+ * .hasMore()
+ * ```
*/
@JvmStatic fun builder() = Builder()
}
@@ -90,7 +96,7 @@ private constructor(
class Builder internal constructor() {
private var data: JsonField>? = null
- private var hasMore: JsonField = JsonMissing.of()
+ private var hasMore: JsonField? = null
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
@@ -193,11 +199,19 @@ private constructor(
* Returns an immutable instance of [AccountActivityListPageResponse].
*
* Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .data()
+ * .hasMore()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
*/
fun build(): AccountActivityListPageResponse =
AccountActivityListPageResponse(
- (data ?: JsonMissing.of()).map { it.toImmutable() },
- hasMore,
+ checkRequired("data", data).map { it.toImmutable() },
+ checkRequired("hasMore", hasMore),
additionalProperties.toMutableMap(),
)
}
@@ -209,7 +223,7 @@ private constructor(
return@apply
}
- data().ifPresent { it.forEach { it.validate() } }
+ data().forEach { it.validate() }
hasMore()
validated = true
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BacktestStats.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BacktestStats.kt
index 53c43e84..f26fbdc6 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BacktestStats.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BacktestStats.kt
@@ -320,6 +320,7 @@ private constructor(
private val decision: JsonField,
private val eventToken: JsonField,
private val timestamp: JsonField,
+ private val transactionToken: JsonField,
private val additionalProperties: MutableMap,
) {
@@ -334,7 +335,10 @@ private constructor(
@JsonProperty("timestamp")
@ExcludeMissing
timestamp: JsonField = JsonMissing.of(),
- ) : this(decision, eventToken, timestamp, mutableMapOf())
+ @JsonProperty("transaction_token")
+ @ExcludeMissing
+ transactionToken: JsonField = JsonMissing.of(),
+ ) : this(decision, eventToken, timestamp, transactionToken, mutableMapOf())
/**
* The decision made by the rule for this event.
@@ -360,6 +364,14 @@ private constructor(
*/
fun timestamp(): Optional = timestamp.getOptional("timestamp")
+ /**
+ * The token of the transaction associated with the event
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun transactionToken(): Optional = transactionToken.getOptional("transaction_token")
+
/**
* Returns the raw JSON value of [decision].
*
@@ -385,6 +397,16 @@ private constructor(
@ExcludeMissing
fun _timestamp(): JsonField = timestamp
+ /**
+ * Returns the raw JSON value of [transactionToken].
+ *
+ * Unlike [transactionToken], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("transaction_token")
+ @ExcludeMissing
+ fun _transactionToken(): JsonField = transactionToken
+
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
additionalProperties.put(key, value)
@@ -409,6 +431,7 @@ private constructor(
private var decision: JsonField = JsonMissing.of()
private var eventToken: JsonField = JsonMissing.of()
private var timestamp: JsonField = JsonMissing.of()
+ private var transactionToken: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
@@ -416,6 +439,7 @@ private constructor(
decision = example.decision
eventToken = example.eventToken
timestamp = example.timestamp
+ transactionToken = example.transactionToken
additionalProperties = example.additionalProperties.toMutableMap()
}
@@ -457,6 +481,27 @@ private constructor(
this.timestamp = timestamp
}
+ /** The token of the transaction associated with the event */
+ fun transactionToken(transactionToken: String?) =
+ transactionToken(JsonField.ofNullable(transactionToken))
+
+ /**
+ * Alias for calling [Builder.transactionToken] with `transactionToken.orElse(null)`.
+ */
+ fun transactionToken(transactionToken: Optional) =
+ transactionToken(transactionToken.getOrNull())
+
+ /**
+ * Sets [Builder.transactionToken] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.transactionToken] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun transactionToken(transactionToken: JsonField) = apply {
+ this.transactionToken = transactionToken
+ }
+
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -482,7 +527,13 @@ private constructor(
* Further updates to this [Builder] will not mutate the returned instance.
*/
fun build(): Example =
- Example(decision, eventToken, timestamp, additionalProperties.toMutableMap())
+ Example(
+ decision,
+ eventToken,
+ timestamp,
+ transactionToken,
+ additionalProperties.toMutableMap(),
+ )
}
private var validated: Boolean = false
@@ -495,6 +546,7 @@ private constructor(
decision().ifPresent { it.validate() }
eventToken()
timestamp()
+ transactionToken()
validated = true
}
@@ -516,7 +568,8 @@ private constructor(
internal fun validity(): Int =
(decision.asKnown().getOrNull()?.validity() ?: 0) +
(if (eventToken.asKnown().isPresent) 1 else 0) +
- (if (timestamp.asKnown().isPresent) 1 else 0)
+ (if (timestamp.asKnown().isPresent) 1 else 0) +
+ (if (transactionToken.asKnown().isPresent) 1 else 0)
/** The decision made by the rule for this event. */
class Decision @JsonCreator private constructor(private val value: JsonField) :
@@ -664,17 +717,18 @@ private constructor(
decision == other.decision &&
eventToken == other.eventToken &&
timestamp == other.timestamp &&
+ transactionToken == other.transactionToken &&
additionalProperties == other.additionalProperties
}
private val hashCode: Int by lazy {
- Objects.hash(decision, eventToken, timestamp, additionalProperties)
+ Objects.hash(decision, eventToken, timestamp, transactionToken, additionalProperties)
}
override fun hashCode(): Int = hashCode
override fun toString() =
- "Example{decision=$decision, eventToken=$eventToken, timestamp=$timestamp, additionalProperties=$additionalProperties}"
+ "Example{decision=$decision, eventToken=$eventToken, timestamp=$timestamp, transactionToken=$transactionToken, additionalProperties=$additionalProperties}"
}
override fun equals(other: Any?): Boolean {
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAuthorizationApprovalRequestWebhookEvent.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAuthorizationApprovalRequestWebhookEvent.kt
index c611238c..a90b2f51 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAuthorizationApprovalRequestWebhookEvent.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAuthorizationApprovalRequestWebhookEvent.kt
@@ -2673,7 +2673,6 @@ private constructor(
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val token: JsonField,
- private val hostname: JsonField,
private val lastFour: JsonField,
private val memo: JsonField,
private val spendLimit: JsonField,
@@ -2686,9 +2685,6 @@ private constructor(
@JsonCreator
private constructor(
@JsonProperty("token") @ExcludeMissing token: JsonField = JsonMissing.of(),
- @JsonProperty("hostname")
- @ExcludeMissing
- hostname: JsonField = JsonMissing.of(),
@JsonProperty("last_four")
@ExcludeMissing
lastFour: JsonField = JsonMissing.of(),
@@ -2701,50 +2697,31 @@ private constructor(
spendLimitDuration: JsonField = JsonMissing.of(),
@JsonProperty("state") @ExcludeMissing state: JsonField = JsonMissing.of(),
@JsonProperty("type") @ExcludeMissing type: JsonField = JsonMissing.of(),
- ) : this(
- token,
- hostname,
- lastFour,
- memo,
- spendLimit,
- spendLimitDuration,
- state,
- type,
- mutableMapOf(),
- )
+ ) : this(token, lastFour, memo, spendLimit, spendLimitDuration, state, type, mutableMapOf())
/**
* Globally unique identifier for the card.
*
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
- */
- fun token(): Optional = token.getOptional("token")
-
- /**
- * Hostname of card’s locked merchant (will be empty if not applicable)
- *
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- fun hostname(): Optional = hostname.getOptional("hostname")
+ fun token(): String = token.getRequired("token")
/**
* Last four digits of the card number
*
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- fun lastFour(): Optional = lastFour.getOptional("last_four")
+ fun lastFour(): String = lastFour.getRequired("last_four")
/**
- * Customizable name to identify the card. We recommend against using this field to store
- * JSON data as it can cause unexpected behavior.
+ * Customizable name to identify the card
*
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- fun memo(): Optional = memo.getOptional("memo")
+ fun memo(): String = memo.getRequired("memo")
/**
* Amount (in cents) to limit approved authorizations. Purchase requests above the spend
@@ -2755,33 +2732,33 @@ private constructor(
* Spend limits also cannot block force posted charges (i.e., when a merchant sends a
* clearing message without a prior authorization).
*
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- fun spendLimit(): Optional = spendLimit.getOptional("spend_limit")
+ fun spendLimit(): Long = spendLimit.getRequired("spend_limit")
/**
* Note that to support recurring monthly payments, which can occur on different day every
* month, the time window we consider for MONTHLY velocity starts 6 days after the current
* calendar date one month prior.
*
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- fun spendLimitDuration(): Optional =
- spendLimitDuration.getOptional("spend_limit_duration")
+ fun spendLimitDuration(): SpendLimitDuration =
+ spendLimitDuration.getRequired("spend_limit_duration")
/**
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- fun state(): Optional = state.getOptional("state")
+ fun state(): State = state.getRequired("state")
/**
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- fun type(): Optional = type.getOptional("type")
+ fun type(): CardType = type.getRequired("type")
/**
* Returns the raw JSON value of [token].
@@ -2790,13 +2767,6 @@ private constructor(
*/
@JsonProperty("token") @ExcludeMissing fun _token(): JsonField = token
- /**
- * Returns the raw JSON value of [hostname].
- *
- * Unlike [hostname], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("hostname") @ExcludeMissing fun _hostname(): JsonField = hostname
-
/**
* Returns the raw JSON value of [lastFour].
*
@@ -2856,27 +2826,38 @@ private constructor(
companion object {
- /** Returns a mutable builder for constructing an instance of [AsaRequestCard]. */
+ /**
+ * Returns a mutable builder for constructing an instance of [AsaRequestCard].
+ *
+ * The following fields are required:
+ * ```java
+ * .token()
+ * .lastFour()
+ * .memo()
+ * .spendLimit()
+ * .spendLimitDuration()
+ * .state()
+ * .type()
+ * ```
+ */
@JvmStatic fun builder() = Builder()
}
/** A builder for [AsaRequestCard]. */
class Builder internal constructor() {
- private var token: JsonField = JsonMissing.of()
- private var hostname: JsonField = JsonMissing.of()
- private var lastFour: JsonField = JsonMissing.of()
- private var memo: JsonField = JsonMissing.of()
- private var spendLimit: JsonField = JsonMissing.of()
- private var spendLimitDuration: JsonField = JsonMissing.of()
- private var state: JsonField = JsonMissing.of()
- private var type: JsonField = JsonMissing.of()
+ private var token: JsonField? = null
+ private var lastFour: JsonField? = null
+ private var memo: JsonField? = null
+ private var spendLimit: JsonField? = null
+ private var spendLimitDuration: JsonField? = null
+ private var state: JsonField? = null
+ private var type: JsonField? = null
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
internal fun from(asaRequestCard: AsaRequestCard) = apply {
token = asaRequestCard.token
- hostname = asaRequestCard.hostname
lastFour = asaRequestCard.lastFour
memo = asaRequestCard.memo
spendLimit = asaRequestCard.spendLimit
@@ -2898,18 +2879,6 @@ private constructor(
*/
fun token(token: JsonField) = apply { this.token = token }
- /** Hostname of card’s locked merchant (will be empty if not applicable) */
- fun hostname(hostname: String) = hostname(JsonField.of(hostname))
-
- /**
- * Sets [Builder.hostname] to an arbitrary JSON value.
- *
- * You should usually call [Builder.hostname] with a well-typed [String] value instead.
- * This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- fun hostname(hostname: JsonField) = apply { this.hostname = hostname }
-
/** Last four digits of the card number */
fun lastFour(lastFour: String) = lastFour(JsonField.of(lastFour))
@@ -2922,10 +2891,7 @@ private constructor(
*/
fun lastFour(lastFour: JsonField) = apply { this.lastFour = lastFour }
- /**
- * Customizable name to identify the card. We recommend against using this field to
- * store JSON data as it can cause unexpected behavior.
- */
+ /** Customizable name to identify the card */
fun memo(memo: String) = memo(JsonField.of(memo))
/**
@@ -3021,17 +2987,29 @@ private constructor(
* Returns an immutable instance of [AsaRequestCard].
*
* Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .token()
+ * .lastFour()
+ * .memo()
+ * .spendLimit()
+ * .spendLimitDuration()
+ * .state()
+ * .type()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
*/
fun build(): AsaRequestCard =
AsaRequestCard(
- token,
- hostname,
- lastFour,
- memo,
- spendLimit,
- spendLimitDuration,
- state,
- type,
+ checkRequired("token", token),
+ checkRequired("lastFour", lastFour),
+ checkRequired("memo", memo),
+ checkRequired("spendLimit", spendLimit),
+ checkRequired("spendLimitDuration", spendLimitDuration),
+ checkRequired("state", state),
+ checkRequired("type", type),
additionalProperties.toMutableMap(),
)
}
@@ -3044,13 +3022,12 @@ private constructor(
}
token()
- hostname()
lastFour()
memo()
spendLimit()
- spendLimitDuration().ifPresent { it.validate() }
- state().ifPresent { it.validate() }
- type().ifPresent { it.validate() }
+ spendLimitDuration().validate()
+ state().validate()
+ type().validate()
validated = true
}
@@ -3071,7 +3048,6 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(if (token.asKnown().isPresent) 1 else 0) +
- (if (hostname.asKnown().isPresent) 1 else 0) +
(if (lastFour.asKnown().isPresent) 1 else 0) +
(if (memo.asKnown().isPresent) 1 else 0) +
(if (spendLimit.asKnown().isPresent) 1 else 0) +
@@ -3538,7 +3514,6 @@ private constructor(
return other is AsaRequestCard &&
token == other.token &&
- hostname == other.hostname &&
lastFour == other.lastFour &&
memo == other.memo &&
spendLimit == other.spendLimit &&
@@ -3551,7 +3526,6 @@ private constructor(
private val hashCode: Int by lazy {
Objects.hash(
token,
- hostname,
lastFour,
memo,
spendLimit,
@@ -3565,7 +3539,7 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "AsaRequestCard{token=$token, hostname=$hostname, lastFour=$lastFour, memo=$memo, spendLimit=$spendLimit, spendLimitDuration=$spendLimitDuration, state=$state, type=$type, additionalProperties=$additionalProperties}"
+ "AsaRequestCard{token=$token, lastFour=$lastFour, memo=$memo, spendLimit=$spendLimit, spendLimitDuration=$spendLimitDuration, state=$state, type=$type, additionalProperties=$additionalProperties}"
}
class EventType @JsonCreator private constructor(private val value: JsonField) : Enum {
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrder.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrder.kt
index 7de48325..d0a76573 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrder.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrder.kt
@@ -116,7 +116,8 @@ private constructor(
fun _shippingAddress(): JsonValue = shippingAddress
/**
- * Shipping method for all cards in this bulk order
+ * Shipping method for all cards in this bulk order. BULK_PRIORITY, BULK_2_DAY, and BULK_EXPRESS
+ * are only available with Perfect Plastic Printing
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
@@ -330,7 +331,10 @@ private constructor(
this.shippingAddress = shippingAddress
}
- /** Shipping method for all cards in this bulk order */
+ /**
+ * Shipping method for all cards in this bulk order. BULK_PRIORITY, BULK_2_DAY, and
+ * BULK_EXPRESS are only available with Perfect Plastic Printing
+ */
fun shippingMethod(shippingMethod: ShippingMethod) =
shippingMethod(JsonField.of(shippingMethod))
@@ -463,7 +467,10 @@ private constructor(
(status.asKnown().getOrNull()?.validity() ?: 0) +
(if (updated.asKnown().isPresent) 1 else 0)
- /** Shipping method for all cards in this bulk order */
+ /**
+ * Shipping method for all cards in this bulk order. BULK_PRIORITY, BULK_2_DAY, and BULK_EXPRESS
+ * are only available with Perfect Plastic Printing
+ */
class ShippingMethod @JsonCreator private constructor(private val value: JsonField) :
Enum {
@@ -481,12 +488,21 @@ private constructor(
@JvmField val BULK_EXPEDITED = of("BULK_EXPEDITED")
+ @JvmField val BULK_PRIORITY = of("BULK_PRIORITY")
+
+ @JvmField val BULK_2_DAY = of("BULK_2_DAY")
+
+ @JvmField val BULK_EXPRESS = of("BULK_EXPRESS")
+
@JvmStatic fun of(value: String) = ShippingMethod(JsonField.of(value))
}
/** An enum containing [ShippingMethod]'s known values. */
enum class Known {
- BULK_EXPEDITED
+ BULK_EXPEDITED,
+ BULK_PRIORITY,
+ BULK_2_DAY,
+ BULK_EXPRESS,
}
/**
@@ -500,6 +516,9 @@ private constructor(
*/
enum class Value {
BULK_EXPEDITED,
+ BULK_PRIORITY,
+ BULK_2_DAY,
+ BULK_EXPRESS,
/**
* An enum member indicating that [ShippingMethod] was instantiated with an unknown
* value.
@@ -517,6 +536,9 @@ private constructor(
fun value(): Value =
when (this) {
BULK_EXPEDITED -> Value.BULK_EXPEDITED
+ BULK_PRIORITY -> Value.BULK_PRIORITY
+ BULK_2_DAY -> Value.BULK_2_DAY
+ BULK_EXPRESS -> Value.BULK_EXPRESS
else -> Value._UNKNOWN
}
@@ -532,6 +554,9 @@ private constructor(
fun known(): Known =
when (this) {
BULK_EXPEDITED -> Known.BULK_EXPEDITED
+ BULK_PRIORITY -> Known.BULK_PRIORITY
+ BULK_2_DAY -> Known.BULK_2_DAY
+ BULK_EXPRESS -> Known.BULK_EXPRESS
else -> throw LithicInvalidDataException("Unknown ShippingMethod: $value")
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderCreateParams.kt
index 98a6abe3..e230278b 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderCreateParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderCreateParams.kt
@@ -21,8 +21,8 @@ import java.util.Objects
import kotlin.jvm.optionals.getOrNull
/**
- * Create a new bulk order for physical card shipments **[BETA]**. Cards can be added to the order
- * via the POST /v1/cards endpoint by specifying the bulk_order_token. Lock the order via PATCH
+ * Create a new bulk order for physical card shipments. Cards can be added to the order via the POST
+ * /v1/cards endpoint by specifying the bulk_order_token. Lock the order via PATCH
* /v1/card_bulk_orders/{bulk_order_token} to prepare for shipment. Please work with your Customer
* Success Manager and card personalization bureau to ensure bulk shipping is supported for your
* program.
@@ -54,7 +54,8 @@ private constructor(
fun _shippingAddress(): JsonValue = body._shippingAddress()
/**
- * Shipping method for all cards in this bulk order
+ * Shipping method for all cards in this bulk order. BULK_PRIORITY, BULK_2_DAY, and BULK_EXPRESS
+ * are only available with Perfect Plastic Printing
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
@@ -150,7 +151,10 @@ private constructor(
body.shippingAddress(shippingAddress)
}
- /** Shipping method for all cards in this bulk order */
+ /**
+ * Shipping method for all cards in this bulk order. BULK_PRIORITY, BULK_2_DAY, and
+ * BULK_EXPRESS are only available with Perfect Plastic Printing
+ */
fun shippingMethod(shippingMethod: ShippingMethod) = apply {
body.shippingMethod(shippingMethod)
}
@@ -360,7 +364,8 @@ private constructor(
fun _shippingAddress(): JsonValue = shippingAddress
/**
- * Shipping method for all cards in this bulk order
+ * Shipping method for all cards in this bulk order. BULK_PRIORITY, BULK_2_DAY, and
+ * BULK_EXPRESS are only available with Perfect Plastic Printing
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
@@ -453,7 +458,10 @@ private constructor(
this.shippingAddress = shippingAddress
}
- /** Shipping method for all cards in this bulk order */
+ /**
+ * Shipping method for all cards in this bulk order. BULK_PRIORITY, BULK_2_DAY, and
+ * BULK_EXPRESS are only available with Perfect Plastic Printing
+ */
fun shippingMethod(shippingMethod: ShippingMethod) =
shippingMethod(JsonField.of(shippingMethod))
@@ -563,7 +571,10 @@ private constructor(
"CreateBulkOrderRequest{customerProductId=$customerProductId, shippingAddress=$shippingAddress, shippingMethod=$shippingMethod, additionalProperties=$additionalProperties}"
}
- /** Shipping method for all cards in this bulk order */
+ /**
+ * Shipping method for all cards in this bulk order. BULK_PRIORITY, BULK_2_DAY, and BULK_EXPRESS
+ * are only available with Perfect Plastic Printing
+ */
class ShippingMethod @JsonCreator private constructor(private val value: JsonField) :
Enum {
@@ -581,12 +592,21 @@ private constructor(
@JvmField val BULK_EXPEDITED = of("BULK_EXPEDITED")
+ @JvmField val BULK_PRIORITY = of("BULK_PRIORITY")
+
+ @JvmField val BULK_2_DAY = of("BULK_2_DAY")
+
+ @JvmField val BULK_EXPRESS = of("BULK_EXPRESS")
+
@JvmStatic fun of(value: String) = ShippingMethod(JsonField.of(value))
}
/** An enum containing [ShippingMethod]'s known values. */
enum class Known {
- BULK_EXPEDITED
+ BULK_EXPEDITED,
+ BULK_PRIORITY,
+ BULK_2_DAY,
+ BULK_EXPRESS,
}
/**
@@ -600,6 +620,9 @@ private constructor(
*/
enum class Value {
BULK_EXPEDITED,
+ BULK_PRIORITY,
+ BULK_2_DAY,
+ BULK_EXPRESS,
/**
* An enum member indicating that [ShippingMethod] was instantiated with an unknown
* value.
@@ -617,6 +640,9 @@ private constructor(
fun value(): Value =
when (this) {
BULK_EXPEDITED -> Value.BULK_EXPEDITED
+ BULK_PRIORITY -> Value.BULK_PRIORITY
+ BULK_2_DAY -> Value.BULK_2_DAY
+ BULK_EXPRESS -> Value.BULK_EXPRESS
else -> Value._UNKNOWN
}
@@ -632,6 +658,9 @@ private constructor(
fun known(): Known =
when (this) {
BULK_EXPEDITED -> Known.BULK_EXPEDITED
+ BULK_PRIORITY -> Known.BULK_PRIORITY
+ BULK_2_DAY -> Known.BULK_2_DAY
+ BULK_EXPRESS -> Known.BULK_EXPRESS
else -> throw LithicInvalidDataException("Unknown ShippingMethod: $value")
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderListParams.kt
index 48db021e..3f841075 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderListParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderListParams.kt
@@ -11,7 +11,7 @@ import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
-/** List bulk orders for physical card shipments **[BETA]** */
+/** List bulk orders for physical card shipments */
class CardBulkOrderListParams
private constructor(
private val begin: OffsetDateTime?,
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderRetrieveParams.kt
index 554c19d6..bdda850c 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderRetrieveParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderRetrieveParams.kt
@@ -9,7 +9,7 @@ import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
-/** Retrieve a specific bulk order by token **[BETA]** */
+/** Retrieve a specific bulk order by token */
class CardBulkOrderRetrieveParams
private constructor(
private val bulkOrderToken: String?,
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderUpdateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderUpdateParams.kt
index c495aa14..2acbedea 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderUpdateParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderUpdateParams.kt
@@ -22,8 +22,8 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/**
- * Update a bulk order **[BETA]**. Primarily used to lock the order, preventing additional cards
- * from being added
+ * Update a bulk order. Primarily used to lock the order, preventing additional cards from being
+ * added
*/
class CardBulkOrderUpdateParams
private constructor(
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardConvertPhysicalParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardConvertPhysicalParams.kt
index a593b9c2..cf9eef55 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardConvertPhysicalParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardConvertPhysicalParams.kt
@@ -78,7 +78,8 @@ private constructor(
* * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking
* * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or similar
* international option, with tracking
- * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
+ * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method and
+ * timeline are inherited from the parent bulk order.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -224,7 +225,8 @@ private constructor(
* * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking
* * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or
* similar international option, with tracking
- * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
+ * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method
+ * and timeline are inherited from the parent bulk order.
*/
fun shippingMethod(shippingMethod: ShippingMethod) = apply {
body.shippingMethod(shippingMethod)
@@ -453,7 +455,8 @@ private constructor(
* * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking
* * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or
* similar international option, with tracking
- * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
+ * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method
+ * and timeline are inherited from the parent bulk order.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -594,7 +597,8 @@ private constructor(
* tracking
* * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or
* similar international option, with tracking
- * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
+ * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping
+ * method and timeline are inherited from the parent bulk order.
*/
fun shippingMethod(shippingMethod: ShippingMethod) =
shippingMethod(JsonField.of(shippingMethod))
@@ -720,7 +724,8 @@ private constructor(
* * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking
* * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or similar
* international option, with tracking
- * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
+ * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method and
+ * timeline are inherited from the parent bulk order.
*/
class ShippingMethod @JsonCreator private constructor(private val value: JsonField) :
Enum {
@@ -739,7 +744,7 @@ private constructor(
@JvmField val _2_DAY = of("2_DAY")
- @JvmField val BULK_EXPEDITED = of("BULK_EXPEDITED")
+ @JvmField val BULK = of("BULK")
@JvmField val EXPEDITED = of("EXPEDITED")
@@ -757,7 +762,7 @@ private constructor(
/** An enum containing [ShippingMethod]'s known values. */
enum class Known {
_2_DAY,
- BULK_EXPEDITED,
+ BULK,
EXPEDITED,
EXPRESS,
PRIORITY,
@@ -776,7 +781,7 @@ private constructor(
*/
enum class Value {
_2_DAY,
- BULK_EXPEDITED,
+ BULK,
EXPEDITED,
EXPRESS,
PRIORITY,
@@ -799,7 +804,7 @@ private constructor(
fun value(): Value =
when (this) {
_2_DAY -> Value._2_DAY
- BULK_EXPEDITED -> Value.BULK_EXPEDITED
+ BULK -> Value.BULK
EXPEDITED -> Value.EXPEDITED
EXPRESS -> Value.EXPRESS
PRIORITY -> Value.PRIORITY
@@ -820,7 +825,7 @@ private constructor(
fun known(): Known =
when (this) {
_2_DAY -> Known._2_DAY
- BULK_EXPEDITED -> Known.BULK_EXPEDITED
+ BULK -> Known.BULK
EXPEDITED -> Known.EXPEDITED
EXPRESS -> Known.EXPRESS
PRIORITY -> Known.PRIORITY
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 552485e7..efa44b41 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
@@ -224,7 +224,8 @@ private constructor(
* * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking
* * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or similar
* international option, with tracking
- * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
+ * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method and
+ * timeline are inherited from the parent bulk order.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -779,7 +780,8 @@ private constructor(
* * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking
* * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or
* similar international option, with tracking
- * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
+ * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method
+ * and timeline are inherited from the parent bulk order.
*/
fun shippingMethod(shippingMethod: ShippingMethod) = apply {
body.shippingMethod(shippingMethod)
@@ -1303,7 +1305,8 @@ private constructor(
* * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking
* * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or
* similar international option, with tracking
- * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
+ * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method
+ * and timeline are inherited from the parent bulk order.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -1915,7 +1918,8 @@ private constructor(
* tracking
* * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or
* similar international option, with tracking
- * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
+ * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping
+ * method and timeline are inherited from the parent bulk order.
*/
fun shippingMethod(shippingMethod: ShippingMethod) =
shippingMethod(JsonField.of(shippingMethod))
@@ -2560,7 +2564,8 @@ private constructor(
* * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking
* * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or similar
* international option, with tracking
- * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
+ * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method and
+ * timeline are inherited from the parent bulk order.
*/
class ShippingMethod @JsonCreator private constructor(private val value: JsonField) :
Enum {
@@ -2579,7 +2584,7 @@ private constructor(
@JvmField val _2_DAY = of("2_DAY")
- @JvmField val BULK_EXPEDITED = of("BULK_EXPEDITED")
+ @JvmField val BULK = of("BULK")
@JvmField val EXPEDITED = of("EXPEDITED")
@@ -2597,7 +2602,7 @@ private constructor(
/** An enum containing [ShippingMethod]'s known values. */
enum class Known {
_2_DAY,
- BULK_EXPEDITED,
+ BULK,
EXPEDITED,
EXPRESS,
PRIORITY,
@@ -2616,7 +2621,7 @@ private constructor(
*/
enum class Value {
_2_DAY,
- BULK_EXPEDITED,
+ BULK,
EXPEDITED,
EXPRESS,
PRIORITY,
@@ -2639,7 +2644,7 @@ private constructor(
fun value(): Value =
when (this) {
_2_DAY -> Value._2_DAY
- BULK_EXPEDITED -> Value.BULK_EXPEDITED
+ BULK -> Value.BULK
EXPEDITED -> Value.EXPEDITED
EXPRESS -> Value.EXPRESS
PRIORITY -> Value.PRIORITY
@@ -2660,7 +2665,7 @@ private constructor(
fun known(): Known =
when (this) {
_2_DAY -> Known._2_DAY
- BULK_EXPEDITED -> Known.BULK_EXPEDITED
+ BULK -> Known.BULK
EXPEDITED -> Known.EXPEDITED
EXPRESS -> Known.EXPRESS
PRIORITY -> Known.PRIORITY
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardReissueParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardReissueParams.kt
index 9bdc4068..5567f469 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardReissueParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardReissueParams.kt
@@ -73,7 +73,8 @@ private constructor(
* * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking
* * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or similar
* international option, with tracking
- * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
+ * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method and
+ * timeline are inherited from the parent bulk order.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -214,7 +215,8 @@ private constructor(
* * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking
* * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or
* similar international option, with tracking
- * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
+ * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method
+ * and timeline are inherited from the parent bulk order.
*/
fun shippingMethod(shippingMethod: ShippingMethod) = apply {
body.shippingMethod(shippingMethod)
@@ -437,7 +439,8 @@ private constructor(
* * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking
* * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or
* similar international option, with tracking
- * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
+ * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method
+ * and timeline are inherited from the parent bulk order.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -571,7 +574,8 @@ private constructor(
* tracking
* * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or
* similar international option, with tracking
- * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
+ * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping
+ * method and timeline are inherited from the parent bulk order.
*/
fun shippingMethod(shippingMethod: ShippingMethod) =
shippingMethod(JsonField.of(shippingMethod))
@@ -690,7 +694,8 @@ private constructor(
* * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking
* * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or similar
* international option, with tracking
- * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
+ * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method and
+ * timeline are inherited from the parent bulk order.
*/
class ShippingMethod @JsonCreator private constructor(private val value: JsonField) :
Enum {
@@ -709,7 +714,7 @@ private constructor(
@JvmField val _2_DAY = of("2_DAY")
- @JvmField val BULK_EXPEDITED = of("BULK_EXPEDITED")
+ @JvmField val BULK = of("BULK")
@JvmField val EXPEDITED = of("EXPEDITED")
@@ -727,7 +732,7 @@ private constructor(
/** An enum containing [ShippingMethod]'s known values. */
enum class Known {
_2_DAY,
- BULK_EXPEDITED,
+ BULK,
EXPEDITED,
EXPRESS,
PRIORITY,
@@ -746,7 +751,7 @@ private constructor(
*/
enum class Value {
_2_DAY,
- BULK_EXPEDITED,
+ BULK,
EXPEDITED,
EXPRESS,
PRIORITY,
@@ -769,7 +774,7 @@ private constructor(
fun value(): Value =
when (this) {
_2_DAY -> Value._2_DAY
- BULK_EXPEDITED -> Value.BULK_EXPEDITED
+ BULK -> Value.BULK
EXPEDITED -> Value.EXPEDITED
EXPRESS -> Value.EXPRESS
PRIORITY -> Value.PRIORITY
@@ -790,7 +795,7 @@ private constructor(
fun known(): Known =
when (this) {
_2_DAY -> Known._2_DAY
- BULK_EXPEDITED -> Known.BULK_EXPEDITED
+ BULK -> Known.BULK
EXPEDITED -> Known.EXPEDITED
EXPRESS -> Known.EXPRESS
PRIORITY -> Known.PRIORITY
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardRenewParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardRenewParams.kt
index cffea8f5..0f50a0c7 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardRenewParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardRenewParams.kt
@@ -95,7 +95,8 @@ private constructor(
* * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking
* * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or similar
* international option, with tracking
- * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
+ * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method and
+ * timeline are inherited from the parent bulk order.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -285,7 +286,8 @@ private constructor(
* * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking
* * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or
* similar international option, with tracking
- * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
+ * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method
+ * and timeline are inherited from the parent bulk order.
*/
fun shippingMethod(shippingMethod: ShippingMethod) = apply {
body.shippingMethod(shippingMethod)
@@ -546,7 +548,8 @@ private constructor(
* * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking
* * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or
* similar international option, with tracking
- * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
+ * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method
+ * and timeline are inherited from the parent bulk order.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -735,7 +738,8 @@ private constructor(
* tracking
* * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or
* similar international option, with tracking
- * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
+ * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping
+ * method and timeline are inherited from the parent bulk order.
*/
fun shippingMethod(shippingMethod: ShippingMethod) =
shippingMethod(JsonField.of(shippingMethod))
@@ -877,7 +881,8 @@ private constructor(
* * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking
* * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or similar
* international option, with tracking
- * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
+ * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method and
+ * timeline are inherited from the parent bulk order.
*/
class ShippingMethod @JsonCreator private constructor(private val value: JsonField) :
Enum {
@@ -896,7 +901,7 @@ private constructor(
@JvmField val _2_DAY = of("2_DAY")
- @JvmField val BULK_EXPEDITED = of("BULK_EXPEDITED")
+ @JvmField val BULK = of("BULK")
@JvmField val EXPEDITED = of("EXPEDITED")
@@ -914,7 +919,7 @@ private constructor(
/** An enum containing [ShippingMethod]'s known values. */
enum class Known {
_2_DAY,
- BULK_EXPEDITED,
+ BULK,
EXPEDITED,
EXPRESS,
PRIORITY,
@@ -933,7 +938,7 @@ private constructor(
*/
enum class Value {
_2_DAY,
- BULK_EXPEDITED,
+ BULK,
EXPEDITED,
EXPRESS,
PRIORITY,
@@ -956,7 +961,7 @@ private constructor(
fun value(): Value =
when (this) {
_2_DAY -> Value._2_DAY
- BULK_EXPEDITED -> Value.BULK_EXPEDITED
+ BULK -> Value.BULK
EXPEDITED -> Value.EXPEDITED
EXPRESS -> Value.EXPRESS
PRIORITY -> Value.PRIORITY
@@ -977,7 +982,7 @@ private constructor(
fun known(): Known =
when (this) {
_2_DAY -> Known._2_DAY
- BULK_EXPEDITED -> Known.BULK_EXPEDITED
+ BULK -> Known.BULK
EXPEDITED -> Known.EXPEDITED
EXPRESS -> Known.EXPRESS
PRIORITY -> Known.PRIORITY
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalAuthorizationActionParameters.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalAuthorizationActionParameters.kt
index e148e23b..b571582e 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalAuthorizationActionParameters.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalAuthorizationActionParameters.kt
@@ -409,6 +409,12 @@ private constructor(
* hour up and until the authorization.
* * `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the trailing 24
* hours up and until the authorization.
+ * * `CARD_DECLINE_COUNT_15M`: The number of declined transactions on the card in the
+ * trailing 15 minutes before the authorization.
+ * * `CARD_DECLINE_COUNT_1H`: The number of declined transactions on the card in the
+ * trailing hour up and until the authorization.
+ * * `CARD_DECLINE_COUNT_24H`: The number of declined transactions on the card in the
+ * trailing 24 hours up and until the authorization.
* * `CARD_STATE`: The current state of the card associated with the transaction. Valid
* values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`, `PENDING_FULFILLMENT`.
* * `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction. Valid values
@@ -563,6 +569,12 @@ private constructor(
* hour up and until the authorization.
* * `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the
* trailing 24 hours up and until the authorization.
+ * * `CARD_DECLINE_COUNT_15M`: The number of declined transactions on the card in the
+ * trailing 15 minutes before the authorization.
+ * * `CARD_DECLINE_COUNT_1H`: The number of declined transactions on the card in the
+ * trailing hour up and until the authorization.
+ * * `CARD_DECLINE_COUNT_24H`: The number of declined transactions on the card in the
+ * trailing 24 hours up and until the authorization.
* * `CARD_STATE`: The current state of the card associated with the transaction. Valid
* values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`, `PENDING_FULFILLMENT`.
* * `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction. Valid
@@ -750,6 +762,12 @@ private constructor(
* hour up and until the authorization.
* * `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the trailing 24
* hours up and until the authorization.
+ * * `CARD_DECLINE_COUNT_15M`: The number of declined transactions on the card in the
+ * trailing 15 minutes before the authorization.
+ * * `CARD_DECLINE_COUNT_1H`: The number of declined transactions on the card in the
+ * trailing hour up and until the authorization.
+ * * `CARD_DECLINE_COUNT_24H`: The number of declined transactions on the card in the
+ * trailing 24 hours up and until the authorization.
* * `CARD_STATE`: The current state of the card associated with the transaction. Valid
* values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`, `PENDING_FULFILLMENT`.
* * `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction. Valid values
@@ -817,6 +835,12 @@ private constructor(
@JvmField val CARD_TRANSACTION_COUNT_24_H = of("CARD_TRANSACTION_COUNT_24H")
+ @JvmField val CARD_DECLINE_COUNT_15_M = of("CARD_DECLINE_COUNT_15M")
+
+ @JvmField val CARD_DECLINE_COUNT_1_H = of("CARD_DECLINE_COUNT_1H")
+
+ @JvmField val CARD_DECLINE_COUNT_24_H = of("CARD_DECLINE_COUNT_24H")
+
@JvmField val CARD_STATE = of("CARD_STATE")
@JvmField val PIN_ENTERED = of("PIN_ENTERED")
@@ -855,6 +879,9 @@ private constructor(
CARD_TRANSACTION_COUNT_15_M,
CARD_TRANSACTION_COUNT_1_H,
CARD_TRANSACTION_COUNT_24_H,
+ CARD_DECLINE_COUNT_15_M,
+ CARD_DECLINE_COUNT_1_H,
+ CARD_DECLINE_COUNT_24_H,
CARD_STATE,
PIN_ENTERED,
PIN_STATUS,
@@ -890,6 +917,9 @@ private constructor(
CARD_TRANSACTION_COUNT_15_M,
CARD_TRANSACTION_COUNT_1_H,
CARD_TRANSACTION_COUNT_24_H,
+ CARD_DECLINE_COUNT_15_M,
+ CARD_DECLINE_COUNT_1_H,
+ CARD_DECLINE_COUNT_24_H,
CARD_STATE,
PIN_ENTERED,
PIN_STATUS,
@@ -929,6 +959,9 @@ private constructor(
CARD_TRANSACTION_COUNT_15_M -> Value.CARD_TRANSACTION_COUNT_15_M
CARD_TRANSACTION_COUNT_1_H -> Value.CARD_TRANSACTION_COUNT_1_H
CARD_TRANSACTION_COUNT_24_H -> Value.CARD_TRANSACTION_COUNT_24_H
+ CARD_DECLINE_COUNT_15_M -> Value.CARD_DECLINE_COUNT_15_M
+ CARD_DECLINE_COUNT_1_H -> Value.CARD_DECLINE_COUNT_1_H
+ CARD_DECLINE_COUNT_24_H -> Value.CARD_DECLINE_COUNT_24_H
CARD_STATE -> Value.CARD_STATE
PIN_ENTERED -> Value.PIN_ENTERED
PIN_STATUS -> Value.PIN_STATUS
@@ -966,6 +999,9 @@ private constructor(
CARD_TRANSACTION_COUNT_15_M -> Known.CARD_TRANSACTION_COUNT_15_M
CARD_TRANSACTION_COUNT_1_H -> Known.CARD_TRANSACTION_COUNT_1_H
CARD_TRANSACTION_COUNT_24_H -> Known.CARD_TRANSACTION_COUNT_24_H
+ CARD_DECLINE_COUNT_15_M -> Known.CARD_DECLINE_COUNT_15_M
+ CARD_DECLINE_COUNT_1_H -> Known.CARD_DECLINE_COUNT_1_H
+ CARD_DECLINE_COUNT_24_H -> Known.CARD_DECLINE_COUNT_24_H
CARD_STATE -> Known.CARD_STATE
PIN_ENTERED -> Known.PIN_ENTERED
PIN_STATUS -> Known.PIN_STATUS
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccount.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccount.kt
index cc76be9c..ae6f5a5d 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccount.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccount.kt
@@ -1573,6 +1573,8 @@ private constructor(
@JvmField val EARLY_DIRECT_DEPOSIT_FLOAT = of("EARLY_DIRECT_DEPOSIT_FLOAT")
+ @JvmField val PROVISIONAL_CREDIT_ACCOUNT = of("PROVISIONAL_CREDIT_ACCOUNT")
+
@JvmStatic fun of(value: String) = Type(JsonField.of(value))
}
@@ -1589,6 +1591,7 @@ private constructor(
COLLECTION,
PROGRAM_BANK_ACCOUNTS_PAYABLE,
EARLY_DIRECT_DEPOSIT_FLOAT,
+ PROVISIONAL_CREDIT_ACCOUNT,
}
/**
@@ -1612,6 +1615,7 @@ private constructor(
COLLECTION,
PROGRAM_BANK_ACCOUNTS_PAYABLE,
EARLY_DIRECT_DEPOSIT_FLOAT,
+ PROVISIONAL_CREDIT_ACCOUNT,
/** An enum member indicating that [Type] was instantiated with an unknown value. */
_UNKNOWN,
}
@@ -1636,6 +1640,7 @@ private constructor(
COLLECTION -> Value.COLLECTION
PROGRAM_BANK_ACCOUNTS_PAYABLE -> Value.PROGRAM_BANK_ACCOUNTS_PAYABLE
EARLY_DIRECT_DEPOSIT_FLOAT -> Value.EARLY_DIRECT_DEPOSIT_FLOAT
+ PROVISIONAL_CREDIT_ACCOUNT -> Value.PROVISIONAL_CREDIT_ACCOUNT
else -> Value._UNKNOWN
}
@@ -1661,6 +1666,7 @@ private constructor(
COLLECTION -> Known.COLLECTION
PROGRAM_BANK_ACCOUNTS_PAYABLE -> Known.PROGRAM_BANK_ACCOUNTS_PAYABLE
EARLY_DIRECT_DEPOSIT_FLOAT -> Known.EARLY_DIRECT_DEPOSIT_FLOAT
+ PROVISIONAL_CREDIT_ACCOUNT -> Known.PROVISIONAL_CREDIT_ACCOUNT
else -> throw LithicInvalidDataException("Unknown Type: $value")
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/InstanceFinancialAccountType.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/InstanceFinancialAccountType.kt
index 25988529..efaaa124 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/InstanceFinancialAccountType.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/InstanceFinancialAccountType.kt
@@ -45,6 +45,8 @@ private constructor(private val value: JsonField) : Enum {
@JvmField val EARLY_DIRECT_DEPOSIT_FLOAT = of("EARLY_DIRECT_DEPOSIT_FLOAT")
+ @JvmField val PROVISIONAL_CREDIT_ACCOUNT = of("PROVISIONAL_CREDIT_ACCOUNT")
+
@JvmStatic fun of(value: String) = InstanceFinancialAccountType(JsonField.of(value))
}
@@ -61,6 +63,7 @@ private constructor(private val value: JsonField) : Enum {
COLLECTION,
PROGRAM_BANK_ACCOUNTS_PAYABLE,
EARLY_DIRECT_DEPOSIT_FLOAT,
+ PROVISIONAL_CREDIT_ACCOUNT,
}
/**
@@ -86,6 +89,7 @@ private constructor(private val value: JsonField) : Enum {
COLLECTION,
PROGRAM_BANK_ACCOUNTS_PAYABLE,
EARLY_DIRECT_DEPOSIT_FLOAT,
+ PROVISIONAL_CREDIT_ACCOUNT,
/**
* An enum member indicating that [InstanceFinancialAccountType] was instantiated with an
* unknown value.
@@ -113,6 +117,7 @@ private constructor(private val value: JsonField) : Enum {
COLLECTION -> Value.COLLECTION
PROGRAM_BANK_ACCOUNTS_PAYABLE -> Value.PROGRAM_BANK_ACCOUNTS_PAYABLE
EARLY_DIRECT_DEPOSIT_FLOAT -> Value.EARLY_DIRECT_DEPOSIT_FLOAT
+ PROVISIONAL_CREDIT_ACCOUNT -> Value.PROVISIONAL_CREDIT_ACCOUNT
else -> Value._UNKNOWN
}
@@ -137,6 +142,7 @@ private constructor(private val value: JsonField) : Enum {
COLLECTION -> Known.COLLECTION
PROGRAM_BANK_ACCOUNTS_PAYABLE -> Known.PROGRAM_BANK_ACCOUNTS_PAYABLE
EARLY_DIRECT_DEPOSIT_FLOAT -> Known.EARLY_DIRECT_DEPOSIT_FLOAT
+ PROVISIONAL_CREDIT_ACCOUNT -> Known.PROVISIONAL_CREDIT_ACCOUNT
else -> throw LithicInvalidDataException("Unknown InstanceFinancialAccountType: $value")
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentCreateParams.kt
index c23de0e6..70698404 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentCreateParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentCreateParams.kt
@@ -1152,6 +1152,7 @@ private constructor(
private val secCode: JsonField,
private val achHoldPeriod: JsonField,
private val addenda: JsonField,
+ private val overrideCompanyName: JsonField,
private val additionalProperties: MutableMap,
) {
@@ -1164,7 +1165,10 @@ private constructor(
@ExcludeMissing
achHoldPeriod: JsonField = JsonMissing.of(),
@JsonProperty("addenda") @ExcludeMissing addenda: JsonField = JsonMissing.of(),
- ) : this(secCode, achHoldPeriod, addenda, mutableMapOf())
+ @JsonProperty("override_company_name")
+ @ExcludeMissing
+ overrideCompanyName: JsonField = JsonMissing.of(),
+ ) : this(secCode, achHoldPeriod, addenda, overrideCompanyName, mutableMapOf())
/**
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
@@ -1186,6 +1190,16 @@ private constructor(
*/
fun addenda(): Optional = addenda.getOptional("addenda")
+ /**
+ * Value to override the configured company name with. Can only be used if allowed to
+ * override
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun overrideCompanyName(): Optional =
+ overrideCompanyName.getOptional("override_company_name")
+
/**
* Returns the raw JSON value of [secCode].
*
@@ -1210,6 +1224,16 @@ private constructor(
*/
@JsonProperty("addenda") @ExcludeMissing fun _addenda(): JsonField = addenda
+ /**
+ * Returns the raw JSON value of [overrideCompanyName].
+ *
+ * Unlike [overrideCompanyName], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("override_company_name")
+ @ExcludeMissing
+ fun _overrideCompanyName(): JsonField = overrideCompanyName
+
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
additionalProperties.put(key, value)
@@ -1242,6 +1266,7 @@ private constructor(
private var secCode: JsonField? = null
private var achHoldPeriod: JsonField = JsonMissing.of()
private var addenda: JsonField = JsonMissing.of()
+ private var overrideCompanyName: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
@@ -1250,6 +1275,7 @@ private constructor(
secCode = paymentMethodRequestAttributes.secCode
achHoldPeriod = paymentMethodRequestAttributes.achHoldPeriod
addenda = paymentMethodRequestAttributes.addenda
+ overrideCompanyName = paymentMethodRequestAttributes.overrideCompanyName
additionalProperties =
paymentMethodRequestAttributes.additionalProperties.toMutableMap()
}
@@ -1293,6 +1319,31 @@ private constructor(
*/
fun addenda(addenda: JsonField) = apply { this.addenda = addenda }
+ /**
+ * Value to override the configured company name with. Can only be used if allowed to
+ * override
+ */
+ fun overrideCompanyName(overrideCompanyName: String?) =
+ overrideCompanyName(JsonField.ofNullable(overrideCompanyName))
+
+ /**
+ * Alias for calling [Builder.overrideCompanyName] with
+ * `overrideCompanyName.orElse(null)`.
+ */
+ fun overrideCompanyName(overrideCompanyName: Optional) =
+ overrideCompanyName(overrideCompanyName.getOrNull())
+
+ /**
+ * Sets [Builder.overrideCompanyName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.overrideCompanyName] with a well-typed [String]
+ * value instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun overrideCompanyName(overrideCompanyName: JsonField) = apply {
+ this.overrideCompanyName = overrideCompanyName
+ }
+
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -1329,6 +1380,7 @@ private constructor(
checkRequired("secCode", secCode),
achHoldPeriod,
addenda,
+ overrideCompanyName,
additionalProperties.toMutableMap(),
)
}
@@ -1343,6 +1395,7 @@ private constructor(
secCode().validate()
achHoldPeriod()
addenda()
+ overrideCompanyName()
validated = true
}
@@ -1364,7 +1417,8 @@ private constructor(
internal fun validity(): Int =
(secCode.asKnown().getOrNull()?.validity() ?: 0) +
(if (achHoldPeriod.asKnown().isPresent) 1 else 0) +
- (if (addenda.asKnown().isPresent) 1 else 0)
+ (if (addenda.asKnown().isPresent) 1 else 0) +
+ (if (overrideCompanyName.asKnown().isPresent) 1 else 0)
class SecCode @JsonCreator private constructor(private val value: JsonField) :
Enum {
@@ -1511,17 +1565,18 @@ private constructor(
secCode == other.secCode &&
achHoldPeriod == other.achHoldPeriod &&
addenda == other.addenda &&
+ overrideCompanyName == other.overrideCompanyName &&
additionalProperties == other.additionalProperties
}
private val hashCode: Int by lazy {
- Objects.hash(secCode, achHoldPeriod, addenda, additionalProperties)
+ Objects.hash(secCode, achHoldPeriod, addenda, overrideCompanyName, additionalProperties)
}
override fun hashCode(): Int = hashCode
override fun toString() =
- "PaymentMethodRequestAttributes{secCode=$secCode, achHoldPeriod=$achHoldPeriod, addenda=$addenda, additionalProperties=$additionalProperties}"
+ "PaymentMethodRequestAttributes{secCode=$secCode, achHoldPeriod=$achHoldPeriod, addenda=$addenda, overrideCompanyName=$overrideCompanyName, additionalProperties=$additionalProperties}"
}
class Type @JsonCreator private constructor(private val value: JsonField) : Enum {
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ReportStats.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ReportStats.kt
index 9ec9d2f6..f2dabce8 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ReportStats.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ReportStats.kt
@@ -36,10 +36,9 @@ class ReportStats
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val actionCounts: JsonField,
- private val approved: JsonField,
- private val challenged: JsonField,
- private val declined: JsonField,
private val examples: JsonField>,
+ private val state: JsonField,
+ private val version: JsonField,
private val additionalProperties: MutableMap,
) {
@@ -48,63 +47,49 @@ private constructor(
@JsonProperty("action_counts")
@ExcludeMissing
actionCounts: JsonField = JsonMissing.of(),
- @JsonProperty("approved") @ExcludeMissing approved: JsonField = JsonMissing.of(),
- @JsonProperty("challenged") @ExcludeMissing challenged: JsonField = JsonMissing.of(),
- @JsonProperty("declined") @ExcludeMissing declined: JsonField = JsonMissing.of(),
@JsonProperty("examples")
@ExcludeMissing
examples: JsonField> = JsonMissing.of(),
- ) : this(actionCounts, approved, challenged, declined, examples, mutableMapOf())
-
- /**
- * A mapping of action types to the number of times that action was returned by this rule during
- * the relevant period. Actions are the possible outcomes of a rule evaluation, such as DECLINE,
- * CHALLENGE, REQUIRE_TFA, etc. In case rule didn't trigger any action, it's counted under
- * NO_ACTION key.
- *
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
- */
- fun actionCounts(): Optional = actionCounts.getOptional("action_counts")
+ @JsonProperty("state")
+ @ExcludeMissing
+ state: JsonField = JsonMissing.of(),
+ @JsonProperty("version") @ExcludeMissing version: JsonField = JsonMissing.of(),
+ ) : this(actionCounts, examples, state, version, mutableMapOf())
/**
- * The total number of historical transactions approved by this rule during the relevant period,
- * or the number of transactions that would have been approved if the rule was evaluated in
- * shadow mode.
+ * A mapping of action types to the number of times that action was returned by this version
+ * during the relevant period. Actions are the possible outcomes of a rule evaluation, such as
+ * DECLINE, CHALLENGE, REQUIRE_TFA, etc. In case rule didn't trigger any action, it's counted
+ * under NO_ACTION key.
*
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- @Deprecated("deprecated") fun approved(): Optional = approved.getOptional("approved")
+ fun actionCounts(): ActionCounts = actionCounts.getRequired("action_counts")
/**
- * The total number of historical transactions challenged by this rule during the relevant
- * period, or the number of transactions that would have been challenged if the rule was
- * evaluated in shadow mode. Currently applicable only for 3DS Auth Rules.
+ * Example events and their outcomes for this version.
*
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- @Deprecated("deprecated")
- fun challenged(): Optional = challenged.getOptional("challenged")
+ fun examples(): List = examples.getRequired("examples")
/**
- * The total number of historical transactions declined by this rule during the relevant period,
- * or the number of transactions that would have been declined if the rule was evaluated in
- * shadow mode.
+ * The evaluation mode of this version during the reported period.
*
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- @Deprecated("deprecated") fun declined(): Optional = declined.getOptional("declined")
+ fun state(): AuthRuleVersionState = state.getRequired("state")
/**
- * Example events and their outcomes.
+ * The rule version number.
*
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- fun examples(): Optional> = examples.getOptional("examples")
+ fun version(): Long = version.getRequired("version")
/**
* Returns the raw JSON value of [actionCounts].
@@ -116,41 +101,25 @@ private constructor(
fun _actionCounts(): JsonField = actionCounts
/**
- * Returns the raw JSON value of [approved].
+ * Returns the raw JSON value of [examples].
*
- * Unlike [approved], this method doesn't throw if the JSON field has an unexpected type.
+ * Unlike [examples], this method doesn't throw if the JSON field has an unexpected type.
*/
- @Deprecated("deprecated")
- @JsonProperty("approved")
- @ExcludeMissing
- fun _approved(): JsonField = approved
+ @JsonProperty("examples") @ExcludeMissing fun _examples(): JsonField> = examples
/**
- * Returns the raw JSON value of [challenged].
+ * Returns the raw JSON value of [state].
*
- * Unlike [challenged], this method doesn't throw if the JSON field has an unexpected type.
+ * Unlike [state], this method doesn't throw if the JSON field has an unexpected type.
*/
- @Deprecated("deprecated")
- @JsonProperty("challenged")
- @ExcludeMissing
- fun _challenged(): JsonField = challenged
+ @JsonProperty("state") @ExcludeMissing fun _state(): JsonField = state
/**
- * Returns the raw JSON value of [declined].
+ * Returns the raw JSON value of [version].
*
- * Unlike [declined], this method doesn't throw if the JSON field has an unexpected type.
+ * Unlike [version], this method doesn't throw if the JSON field has an unexpected type.
*/
- @Deprecated("deprecated")
- @JsonProperty("declined")
- @ExcludeMissing
- fun _declined(): JsonField = declined
-
- /**
- * Returns the raw JSON value of [examples].
- *
- * Unlike [examples], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("examples") @ExcludeMissing fun _examples(): JsonField> = examples
+ @JsonProperty("version") @ExcludeMissing fun _version(): JsonField = version
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
@@ -166,32 +135,40 @@ private constructor(
companion object {
- /** Returns a mutable builder for constructing an instance of [ReportStats]. */
+ /**
+ * Returns a mutable builder for constructing an instance of [ReportStats].
+ *
+ * The following fields are required:
+ * ```java
+ * .actionCounts()
+ * .examples()
+ * .state()
+ * .version()
+ * ```
+ */
@JvmStatic fun builder() = Builder()
}
/** A builder for [ReportStats]. */
class Builder internal constructor() {
- private var actionCounts: JsonField = JsonMissing.of()
- private var approved: JsonField = JsonMissing.of()
- private var challenged: JsonField = JsonMissing.of()
- private var declined: JsonField = JsonMissing.of()
+ private var actionCounts: JsonField? = null
private var examples: JsonField>? = null
+ private var state: JsonField? = null
+ private var version: JsonField? = null
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
internal fun from(reportStats: ReportStats) = apply {
actionCounts = reportStats.actionCounts
- approved = reportStats.approved
- challenged = reportStats.challenged
- declined = reportStats.declined
examples = reportStats.examples.map { it.toMutableList() }
+ state = reportStats.state
+ version = reportStats.version
additionalProperties = reportStats.additionalProperties.toMutableMap()
}
/**
- * A mapping of action types to the number of times that action was returned by this rule
+ * A mapping of action types to the number of times that action was returned by this version
* during the relevant period. Actions are the possible outcomes of a rule evaluation, such
* as DECLINE, CHALLENGE, REQUIRE_TFA, etc. In case rule didn't trigger any action, it's
* counted under NO_ACTION key.
@@ -209,56 +186,7 @@ private constructor(
this.actionCounts = actionCounts
}
- /**
- * The total number of historical transactions approved by this rule during the relevant
- * period, or the number of transactions that would have been approved if the rule was
- * evaluated in shadow mode.
- */
- @Deprecated("deprecated") fun approved(approved: Long) = approved(JsonField.of(approved))
-
- /**
- * Sets [Builder.approved] to an arbitrary JSON value.
- *
- * You should usually call [Builder.approved] with a well-typed [Long] value instead. This
- * method is primarily for setting the field to an undocumented or not yet supported value.
- */
- @Deprecated("deprecated")
- fun approved(approved: JsonField) = apply { this.approved = approved }
-
- /**
- * The total number of historical transactions challenged by this rule during the relevant
- * period, or the number of transactions that would have been challenged if the rule was
- * evaluated in shadow mode. Currently applicable only for 3DS Auth Rules.
- */
- @Deprecated("deprecated")
- fun challenged(challenged: Long) = challenged(JsonField.of(challenged))
-
- /**
- * Sets [Builder.challenged] to an arbitrary JSON value.
- *
- * You should usually call [Builder.challenged] with a well-typed [Long] value instead. This
- * method is primarily for setting the field to an undocumented or not yet supported value.
- */
- @Deprecated("deprecated")
- fun challenged(challenged: JsonField) = apply { this.challenged = challenged }
-
- /**
- * The total number of historical transactions declined by this rule during the relevant
- * period, or the number of transactions that would have been declined if the rule was
- * evaluated in shadow mode.
- */
- @Deprecated("deprecated") fun declined(declined: Long) = declined(JsonField.of(declined))
-
- /**
- * Sets [Builder.declined] to an arbitrary JSON value.
- *
- * You should usually call [Builder.declined] with a well-typed [Long] value instead. This
- * method is primarily for setting the field to an undocumented or not yet supported value.
- */
- @Deprecated("deprecated")
- fun declined(declined: JsonField) = apply { this.declined = declined }
-
- /** Example events and their outcomes. */
+ /** Example events and their outcomes for this version. */
fun examples(examples: List) = examples(JsonField.of(examples))
/**
@@ -284,6 +212,29 @@ private constructor(
}
}
+ /** The evaluation mode of this version during the reported period. */
+ fun state(state: AuthRuleVersionState) = state(JsonField.of(state))
+
+ /**
+ * Sets [Builder.state] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.state] with a well-typed [AuthRuleVersionState] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun state(state: JsonField) = apply { this.state = state }
+
+ /** The rule version number. */
+ fun version(version: Long) = version(JsonField.of(version))
+
+ /**
+ * Sets [Builder.version] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.version] with a well-typed [Long] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun version(version: JsonField) = apply { this.version = version }
+
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -307,14 +258,23 @@ private constructor(
* Returns an immutable instance of [ReportStats].
*
* Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .actionCounts()
+ * .examples()
+ * .state()
+ * .version()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
*/
fun build(): ReportStats =
ReportStats(
- actionCounts,
- approved,
- challenged,
- declined,
- (examples ?: JsonMissing.of()).map { it.toImmutable() },
+ checkRequired("actionCounts", actionCounts),
+ checkRequired("examples", examples).map { it.toImmutable() },
+ checkRequired("state", state),
+ checkRequired("version", version),
additionalProperties.toMutableMap(),
)
}
@@ -326,11 +286,10 @@ private constructor(
return@apply
}
- actionCounts().ifPresent { it.validate() }
- approved()
- challenged()
- declined()
- examples().ifPresent { it.forEach { it.validate() } }
+ actionCounts().validate()
+ examples().forEach { it.validate() }
+ state().validate()
+ version()
validated = true
}
@@ -350,16 +309,15 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(actionCounts.asKnown().getOrNull()?.validity() ?: 0) +
- (if (approved.asKnown().isPresent) 1 else 0) +
- (if (challenged.asKnown().isPresent) 1 else 0) +
- (if (declined.asKnown().isPresent) 1 else 0) +
- (examples.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0)
+ (examples.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) +
+ (state.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (version.asKnown().isPresent) 1 else 0)
/**
- * A mapping of action types to the number of times that action was returned by this rule during
- * the relevant period. Actions are the possible outcomes of a rule evaluation, such as DECLINE,
- * CHALLENGE, REQUIRE_TFA, etc. In case rule didn't trigger any action, it's counted under
- * NO_ACTION key.
+ * A mapping of action types to the number of times that action was returned by this version
+ * during the relevant period. Actions are the possible outcomes of a rule evaluation, such as
+ * DECLINE, CHALLENGE, REQUIRE_TFA, etc. In case rule didn't trigger any action, it's counted
+ * under NO_ACTION key.
*/
class ActionCounts
@JsonCreator
@@ -464,10 +422,9 @@ private constructor(
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val actions: JsonField>,
- private val approved: JsonField,
- private val decision: JsonField,
private val eventToken: JsonField,
private val timestamp: JsonField,
+ private val transactionToken: JsonField,
private val additionalProperties: MutableMap,
) {
@@ -476,61 +433,48 @@ private constructor(
@JsonProperty("actions")
@ExcludeMissing
actions: JsonField> = JsonMissing.of(),
- @JsonProperty("approved")
- @ExcludeMissing
- approved: JsonField = JsonMissing.of(),
- @JsonProperty("decision")
- @ExcludeMissing
- decision: JsonField = JsonMissing.of(),
@JsonProperty("event_token")
@ExcludeMissing
eventToken: JsonField = JsonMissing.of(),
@JsonProperty("timestamp")
@ExcludeMissing
timestamp: JsonField = JsonMissing.of(),
- ) : this(actions, approved, decision, eventToken, timestamp, mutableMapOf())
+ @JsonProperty("transaction_token")
+ @ExcludeMissing
+ transactionToken: JsonField = JsonMissing.of(),
+ ) : this(actions, eventToken, timestamp, transactionToken, mutableMapOf())
/**
- * The actions taken by the rule for this event.
+ * The actions taken by this version for this event.
*
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- fun actions(): Optional> = actions.getOptional("actions")
+ fun actions(): List = actions.getRequired("actions")
/**
- * Whether the rule would have approved the request.
- *
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
- */
- @Deprecated("deprecated")
- fun approved(): Optional = approved.getOptional("approved")
-
- /**
- * The decision made by the rule for this event.
+ * The event token.
*
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- @Deprecated("deprecated")
- fun decision(): Optional = decision.getOptional("decision")
+ fun eventToken(): String = eventToken.getRequired("event_token")
/**
- * The event token.
+ * The timestamp of the event.
*
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- fun eventToken(): Optional = eventToken.getOptional("event_token")
+ fun timestamp(): OffsetDateTime = timestamp.getRequired("timestamp")
/**
- * The timestamp of the event.
+ * The token of the transaction associated with the event
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
- fun timestamp(): Optional = timestamp.getOptional("timestamp")
+ fun transactionToken(): Optional = transactionToken.getOptional("transaction_token")
/**
* Returns the raw JSON value of [actions].
@@ -539,26 +483,6 @@ private constructor(
*/
@JsonProperty("actions") @ExcludeMissing fun _actions(): JsonField> = actions
- /**
- * Returns the raw JSON value of [approved].
- *
- * Unlike [approved], this method doesn't throw if the JSON field has an unexpected type.
- */
- @Deprecated("deprecated")
- @JsonProperty("approved")
- @ExcludeMissing
- fun _approved(): JsonField = approved
-
- /**
- * Returns the raw JSON value of [decision].
- *
- * Unlike [decision], this method doesn't throw if the JSON field has an unexpected type.
- */
- @Deprecated("deprecated")
- @JsonProperty("decision")
- @ExcludeMissing
- fun _decision(): JsonField = decision
-
/**
* Returns the raw JSON value of [eventToken].
*
@@ -577,6 +501,16 @@ private constructor(
@ExcludeMissing
fun _timestamp(): JsonField = timestamp
+ /**
+ * Returns the raw JSON value of [transactionToken].
+ *
+ * Unlike [transactionToken], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("transaction_token")
+ @ExcludeMissing
+ fun _transactionToken(): JsonField = transactionToken
+
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
additionalProperties.put(key, value)
@@ -591,7 +525,16 @@ private constructor(
companion object {
- /** Returns a mutable builder for constructing an instance of [Example]. */
+ /**
+ * Returns a mutable builder for constructing an instance of [Example].
+ *
+ * The following fields are required:
+ * ```java
+ * .actions()
+ * .eventToken()
+ * .timestamp()
+ * ```
+ */
@JvmStatic fun builder() = Builder()
}
@@ -599,23 +542,21 @@ private constructor(
class Builder internal constructor() {
private var actions: JsonField>? = null
- private var approved: JsonField = JsonMissing.of()
- private var decision: JsonField = JsonMissing.of()
- private var eventToken: JsonField = JsonMissing.of()
- private var timestamp: JsonField = JsonMissing.of()
+ private var eventToken: JsonField? = null
+ private var timestamp: JsonField? = null
+ private var transactionToken: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
internal fun from(example: Example) = apply {
actions = example.actions.map { it.toMutableList() }
- approved = example.approved
- decision = example.decision
eventToken = example.eventToken
timestamp = example.timestamp
+ transactionToken = example.transactionToken
additionalProperties = example.additionalProperties.toMutableMap()
}
- /** The actions taken by the rule for this event. */
+ /** The actions taken by this version for this event. */
fun actions(actions: List) = actions(JsonField.of(actions))
/**
@@ -681,34 +622,6 @@ private constructor(
fun addAction(returnAction: Action.ReturnAction) =
addAction(Action.ofReturnAction(returnAction))
- /** Whether the rule would have approved the request. */
- @Deprecated("deprecated")
- fun approved(approved: Boolean) = approved(JsonField.of(approved))
-
- /**
- * Sets [Builder.approved] to an arbitrary JSON value.
- *
- * You should usually call [Builder.approved] with a well-typed [Boolean] value instead.
- * This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- @Deprecated("deprecated")
- fun approved(approved: JsonField) = apply { this.approved = approved }
-
- /** The decision made by the rule for this event. */
- @Deprecated("deprecated")
- fun decision(decision: Decision) = decision(JsonField.of(decision))
-
- /**
- * Sets [Builder.decision] to an arbitrary JSON value.
- *
- * You should usually call [Builder.decision] with a well-typed [Decision] value
- * instead. This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- @Deprecated("deprecated")
- fun decision(decision: JsonField) = apply { this.decision = decision }
-
/** The event token. */
fun eventToken(eventToken: String) = eventToken(JsonField.of(eventToken))
@@ -735,6 +648,27 @@ private constructor(
this.timestamp = timestamp
}
+ /** The token of the transaction associated with the event */
+ fun transactionToken(transactionToken: String?) =
+ transactionToken(JsonField.ofNullable(transactionToken))
+
+ /**
+ * Alias for calling [Builder.transactionToken] with `transactionToken.orElse(null)`.
+ */
+ fun transactionToken(transactionToken: Optional) =
+ transactionToken(transactionToken.getOrNull())
+
+ /**
+ * Sets [Builder.transactionToken] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.transactionToken] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun transactionToken(transactionToken: JsonField) = apply {
+ this.transactionToken = transactionToken
+ }
+
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -758,14 +692,22 @@ private constructor(
* Returns an immutable instance of [Example].
*
* Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .actions()
+ * .eventToken()
+ * .timestamp()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
*/
fun build(): Example =
Example(
- (actions ?: JsonMissing.of()).map { it.toImmutable() },
- approved,
- decision,
- eventToken,
- timestamp,
+ checkRequired("actions", actions).map { it.toImmutable() },
+ checkRequired("eventToken", eventToken),
+ checkRequired("timestamp", timestamp),
+ transactionToken,
additionalProperties.toMutableMap(),
)
}
@@ -777,11 +719,10 @@ private constructor(
return@apply
}
- actions().ifPresent { it.forEach { it.validate() } }
- approved()
- decision().ifPresent { it.validate() }
+ actions().forEach { it.validate() }
eventToken()
timestamp()
+ transactionToken()
validated = true
}
@@ -802,10 +743,9 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(actions.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) +
- (if (approved.asKnown().isPresent) 1 else 0) +
- (decision.asKnown().getOrNull()?.validity() ?: 0) +
(if (eventToken.asKnown().isPresent) 1 else 0) +
- (if (timestamp.asKnown().isPresent) 1 else 0)
+ (if (timestamp.asKnown().isPresent) 1 else 0) +
+ (if (transactionToken.asKnown().isPresent) 1 else 0)
@JsonDeserialize(using = Action.Deserializer::class)
@JsonSerialize(using = Action.Serializer::class)
@@ -4892,166 +4832,165 @@ private constructor(
}
}
- /** The decision made by the rule for this event. */
- @Deprecated("deprecated")
- class Decision @JsonCreator private constructor(private val value: JsonField) :
- Enum {
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
- /**
- * 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
+ return other is Example &&
+ actions == other.actions &&
+ eventToken == other.eventToken &&
+ timestamp == other.timestamp &&
+ transactionToken == other.transactionToken &&
+ additionalProperties == other.additionalProperties
+ }
- companion object {
+ private val hashCode: Int by lazy {
+ Objects.hash(actions, eventToken, timestamp, transactionToken, additionalProperties)
+ }
- @JvmField val APPROVED = of("APPROVED")
+ override fun hashCode(): Int = hashCode
- @JvmField val DECLINED = of("DECLINED")
+ override fun toString() =
+ "Example{actions=$actions, eventToken=$eventToken, timestamp=$timestamp, transactionToken=$transactionToken, additionalProperties=$additionalProperties}"
+ }
- @JvmField val CHALLENGED = of("CHALLENGED")
+ /** The evaluation mode of this version during the reported period. */
+ class AuthRuleVersionState
+ @JsonCreator
+ private constructor(private val value: JsonField) : Enum {
- @JvmStatic fun of(value: String) = Decision(JsonField.of(value))
- }
+ /**
+ * 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
- /** An enum containing [Decision]'s known values. */
- enum class Known {
- APPROVED,
- DECLINED,
- CHALLENGED,
- }
+ companion object {
- /**
- * An enum containing [Decision]'s known values, as well as an [_UNKNOWN] member.
- *
- * An instance of [Decision] 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 {
- APPROVED,
- DECLINED,
- CHALLENGED,
- /**
- * An enum member indicating that [Decision] was instantiated with an unknown value.
- */
- _UNKNOWN,
- }
+ @JvmField val ACTIVE = of("ACTIVE")
- /**
- * 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) {
- APPROVED -> Value.APPROVED
- DECLINED -> Value.DECLINED
- CHALLENGED -> Value.CHALLENGED
- else -> Value._UNKNOWN
- }
+ @JvmField val SHADOW = of("SHADOW")
- /**
- * 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) {
- APPROVED -> Known.APPROVED
- DECLINED -> Known.DECLINED
- CHALLENGED -> Known.CHALLENGED
- else -> throw LithicInvalidDataException("Unknown Decision: $value")
- }
+ @JvmField val INACTIVE = of("INACTIVE")
- /**
- * 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")
- }
+ @JvmStatic fun of(value: String) = AuthRuleVersionState(JsonField.of(value))
+ }
- private var validated: Boolean = false
+ /** An enum containing [AuthRuleVersionState]'s known values. */
+ enum class Known {
+ ACTIVE,
+ SHADOW,
+ INACTIVE,
+ }
- fun validate(): Decision = apply {
- if (validated) {
- return@apply
- }
+ /**
+ * An enum containing [AuthRuleVersionState]'s known values, as well as an [_UNKNOWN]
+ * member.
+ *
+ * An instance of [AuthRuleVersionState] 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 {
+ ACTIVE,
+ SHADOW,
+ INACTIVE,
+ /**
+ * An enum member indicating that [AuthRuleVersionState] was instantiated with an
+ * unknown value.
+ */
+ _UNKNOWN,
+ }
- known()
- validated = true
+ /**
+ * 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) {
+ ACTIVE -> Value.ACTIVE
+ SHADOW -> Value.SHADOW
+ INACTIVE -> Value.INACTIVE
+ else -> Value._UNKNOWN
}
- fun isValid(): Boolean =
- try {
- validate()
- true
- } catch (e: LithicInvalidDataException) {
- false
- }
+ /**
+ * 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) {
+ ACTIVE -> Known.ACTIVE
+ SHADOW -> Known.SHADOW
+ INACTIVE -> Known.INACTIVE
+ else -> throw LithicInvalidDataException("Unknown AuthRuleVersionState: $value")
+ }
- /**
- * 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
+ /**
+ * 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") }
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
+ private var validated: Boolean = false
- return other is Decision && value == other.value
+ fun validate(): AuthRuleVersionState = apply {
+ if (validated) {
+ return@apply
}
- override fun hashCode() = value.hashCode()
-
- override fun toString() = value.toString()
+ 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 other is Example &&
- actions == other.actions &&
- approved == other.approved &&
- decision == other.decision &&
- eventToken == other.eventToken &&
- timestamp == other.timestamp &&
- additionalProperties == other.additionalProperties
+ return other is AuthRuleVersionState && value == other.value
}
- private val hashCode: Int by lazy {
- Objects.hash(actions, approved, decision, eventToken, timestamp, additionalProperties)
- }
+ override fun hashCode() = value.hashCode()
- override fun hashCode(): Int = hashCode
-
- override fun toString() =
- "Example{actions=$actions, approved=$approved, decision=$decision, eventToken=$eventToken, timestamp=$timestamp, additionalProperties=$additionalProperties}"
+ override fun toString() = value.toString()
}
override fun equals(other: Any?): Boolean {
@@ -5061,19 +5000,18 @@ private constructor(
return other is ReportStats &&
actionCounts == other.actionCounts &&
- approved == other.approved &&
- challenged == other.challenged &&
- declined == other.declined &&
examples == other.examples &&
+ state == other.state &&
+ version == other.version &&
additionalProperties == other.additionalProperties
}
private val hashCode: Int by lazy {
- Objects.hash(actionCounts, approved, challenged, declined, examples, additionalProperties)
+ Objects.hash(actionCounts, examples, state, version, additionalProperties)
}
override fun hashCode(): Int = hashCode
override fun toString() =
- "ReportStats{actionCounts=$actionCounts, approved=$approved, challenged=$challenged, declined=$declined, examples=$examples, additionalProperties=$additionalProperties}"
+ "ReportStats{actionCounts=$actionCounts, examples=$examples, state=$state, version=$version, additionalProperties=$additionalProperties}"
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Statement.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Statement.kt
index c4cc252d..0ff48a04 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Statement.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Statement.kt
@@ -45,6 +45,7 @@ private constructor(
private val nextPaymentDueDate: JsonField,
private val nextStatementEndDate: JsonField,
private val payoffDetails: JsonField,
+ private val statementTotals: JsonField,
private val additionalProperties: MutableMap,
) {
@@ -114,6 +115,9 @@ private constructor(
@JsonProperty("payoff_details")
@ExcludeMissing
payoffDetails: JsonField = JsonMissing.of(),
+ @JsonProperty("statement_totals")
+ @ExcludeMissing
+ statementTotals: JsonField = JsonMissing.of(),
) : this(
token,
accountStanding,
@@ -137,6 +141,7 @@ private constructor(
nextPaymentDueDate,
nextStatementEndDate,
payoffDetails,
+ statementTotals,
mutableMapOf(),
)
@@ -187,10 +192,11 @@ private constructor(
/**
* Globally unique identifier for a credit product
*
- * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
- * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
*/
- fun creditProductToken(): String = creditProductToken.getRequired("credit_product_token")
+ fun creditProductToken(): Optional =
+ creditProductToken.getOptional("credit_product_token")
/**
* Number of days in the billing cycle
@@ -309,6 +315,13 @@ private constructor(
*/
fun payoffDetails(): Optional = payoffDetails.getOptional("payoff_details")
+ /**
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun statementTotals(): Optional =
+ statementTotals.getOptional("statement_totals")
+
/**
* Returns the raw JSON value of [token].
*
@@ -504,6 +517,15 @@ private constructor(
@ExcludeMissing
fun _payoffDetails(): JsonField = payoffDetails
+ /**
+ * Returns the raw JSON value of [statementTotals].
+ *
+ * Unlike [statementTotals], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("statement_totals")
+ @ExcludeMissing
+ fun _statementTotals(): JsonField = statementTotals
+
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
additionalProperties.put(key, value)
@@ -571,6 +593,7 @@ private constructor(
private var nextPaymentDueDate: JsonField = JsonMissing.of()
private var nextStatementEndDate: JsonField = JsonMissing.of()
private var payoffDetails: JsonField = JsonMissing.of()
+ private var statementTotals: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
@@ -597,6 +620,7 @@ private constructor(
nextPaymentDueDate = statement.nextPaymentDueDate
nextStatementEndDate = statement.nextStatementEndDate
payoffDetails = statement.payoffDetails
+ statementTotals = statement.statementTotals
additionalProperties = statement.additionalProperties.toMutableMap()
}
@@ -675,8 +699,14 @@ private constructor(
fun creditLimit(creditLimit: JsonField) = apply { this.creditLimit = creditLimit }
/** Globally unique identifier for a credit product */
- fun creditProductToken(creditProductToken: String) =
- creditProductToken(JsonField.of(creditProductToken))
+ fun creditProductToken(creditProductToken: String?) =
+ creditProductToken(JsonField.ofNullable(creditProductToken))
+
+ /**
+ * Alias for calling [Builder.creditProductToken] with `creditProductToken.orElse(null)`.
+ */
+ fun creditProductToken(creditProductToken: Optional) =
+ creditProductToken(creditProductToken.getOrNull())
/**
* Sets [Builder.creditProductToken] to an arbitrary JSON value.
@@ -915,6 +945,20 @@ private constructor(
this.payoffDetails = payoffDetails
}
+ fun statementTotals(statementTotals: StatementTotals) =
+ statementTotals(JsonField.of(statementTotals))
+
+ /**
+ * Sets [Builder.statementTotals] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.statementTotals] with a well-typed [StatementTotals]
+ * value instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun statementTotals(statementTotals: JsonField) = apply {
+ this.statementTotals = statementTotals
+ }
+
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -987,6 +1031,7 @@ private constructor(
nextPaymentDueDate,
nextStatementEndDate,
payoffDetails,
+ statementTotals,
additionalProperties.toMutableMap(),
)
}
@@ -1020,6 +1065,7 @@ private constructor(
nextPaymentDueDate()
nextStatementEndDate()
payoffDetails().ifPresent { it.validate() }
+ statementTotals().ifPresent { it.validate() }
validated = true
}
@@ -1059,7 +1105,8 @@ private constructor(
(interestDetails.asKnown().getOrNull()?.validity() ?: 0) +
(if (nextPaymentDueDate.asKnown().isPresent) 1 else 0) +
(if (nextStatementEndDate.asKnown().isPresent) 1 else 0) +
- (payoffDetails.asKnown().getOrNull()?.validity() ?: 0)
+ (payoffDetails.asKnown().getOrNull()?.validity() ?: 0) +
+ (statementTotals.asKnown().getOrNull()?.validity() ?: 0)
class AccountStanding
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
@@ -3643,6 +3690,7 @@ private constructor(
nextPaymentDueDate == other.nextPaymentDueDate &&
nextStatementEndDate == other.nextStatementEndDate &&
payoffDetails == other.payoffDetails &&
+ statementTotals == other.statementTotals &&
additionalProperties == other.additionalProperties
}
@@ -3670,6 +3718,7 @@ private constructor(
nextPaymentDueDate,
nextStatementEndDate,
payoffDetails,
+ statementTotals,
additionalProperties,
)
}
@@ -3677,5 +3726,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "Statement{token=$token, accountStanding=$accountStanding, amountDue=$amountDue, availableCredit=$availableCredit, created=$created, creditLimit=$creditLimit, creditProductToken=$creditProductToken, daysInBillingCycle=$daysInBillingCycle, endingBalance=$endingBalance, financialAccountToken=$financialAccountToken, paymentDueDate=$paymentDueDate, periodTotals=$periodTotals, startingBalance=$startingBalance, statementEndDate=$statementEndDate, statementStartDate=$statementStartDate, statementType=$statementType, updated=$updated, ytdTotals=$ytdTotals, interestDetails=$interestDetails, nextPaymentDueDate=$nextPaymentDueDate, nextStatementEndDate=$nextStatementEndDate, payoffDetails=$payoffDetails, additionalProperties=$additionalProperties}"
+ "Statement{token=$token, accountStanding=$accountStanding, amountDue=$amountDue, availableCredit=$availableCredit, created=$created, creditLimit=$creditLimit, creditProductToken=$creditProductToken, daysInBillingCycle=$daysInBillingCycle, endingBalance=$endingBalance, financialAccountToken=$financialAccountToken, paymentDueDate=$paymentDueDate, periodTotals=$periodTotals, startingBalance=$startingBalance, statementEndDate=$statementEndDate, statementStartDate=$statementStartDate, statementType=$statementType, updated=$updated, ytdTotals=$ytdTotals, interestDetails=$interestDetails, nextPaymentDueDate=$nextPaymentDueDate, nextStatementEndDate=$nextStatementEndDate, payoffDetails=$payoffDetails, statementTotals=$statementTotals, additionalProperties=$additionalProperties}"
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/StatementsCreatedWebhookEvent.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/StatementsCreatedWebhookEvent.kt
index 521d74b8..b2c79f01 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/StatementsCreatedWebhookEvent.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/StatementsCreatedWebhookEvent.kt
@@ -45,6 +45,7 @@ private constructor(
private val nextPaymentDueDate: JsonField,
private val nextStatementEndDate: JsonField,
private val payoffDetails: JsonField,
+ private val statementTotals: JsonField,
private val eventType: JsonField,
private val additionalProperties: MutableMap,
) {
@@ -115,6 +116,9 @@ private constructor(
@JsonProperty("payoff_details")
@ExcludeMissing
payoffDetails: JsonField = JsonMissing.of(),
+ @JsonProperty("statement_totals")
+ @ExcludeMissing
+ statementTotals: JsonField = JsonMissing.of(),
@JsonProperty("event_type")
@ExcludeMissing
eventType: JsonField = JsonMissing.of(),
@@ -141,6 +145,7 @@ private constructor(
nextPaymentDueDate,
nextStatementEndDate,
payoffDetails,
+ statementTotals,
eventType,
mutableMapOf(),
)
@@ -169,6 +174,7 @@ private constructor(
.nextPaymentDueDate(nextPaymentDueDate)
.nextStatementEndDate(nextStatementEndDate)
.payoffDetails(payoffDetails)
+ .statementTotals(statementTotals)
.build()
/**
@@ -219,10 +225,11 @@ private constructor(
/**
* Globally unique identifier for a credit product
*
- * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
- * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
*/
- fun creditProductToken(): String = creditProductToken.getRequired("credit_product_token")
+ fun creditProductToken(): Optional =
+ creditProductToken.getOptional("credit_product_token")
/**
* Number of days in the billing cycle
@@ -342,6 +349,13 @@ private constructor(
fun payoffDetails(): Optional =
payoffDetails.getOptional("payoff_details")
+ /**
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun statementTotals(): Optional =
+ statementTotals.getOptional("statement_totals")
+
/**
* The type of event that occurred.
*
@@ -547,6 +561,15 @@ private constructor(
@ExcludeMissing
fun _payoffDetails(): JsonField = payoffDetails
+ /**
+ * Returns the raw JSON value of [statementTotals].
+ *
+ * Unlike [statementTotals], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("statement_totals")
+ @ExcludeMissing
+ fun _statementTotals(): JsonField = statementTotals
+
/**
* Returns the raw JSON value of [eventType].
*
@@ -623,6 +646,7 @@ private constructor(
private var nextPaymentDueDate: JsonField = JsonMissing.of()
private var nextStatementEndDate: JsonField = JsonMissing.of()
private var payoffDetails: JsonField = JsonMissing.of()
+ private var statementTotals: JsonField = JsonMissing.of()
private var eventType: JsonField? = null
private var additionalProperties: MutableMap = mutableMapOf()
@@ -650,6 +674,7 @@ private constructor(
nextPaymentDueDate = statementsCreatedWebhookEvent.nextPaymentDueDate
nextStatementEndDate = statementsCreatedWebhookEvent.nextStatementEndDate
payoffDetails = statementsCreatedWebhookEvent.payoffDetails
+ statementTotals = statementsCreatedWebhookEvent.statementTotals
eventType = statementsCreatedWebhookEvent.eventType
additionalProperties = statementsCreatedWebhookEvent.additionalProperties.toMutableMap()
}
@@ -731,8 +756,14 @@ private constructor(
fun creditLimit(creditLimit: JsonField) = apply { this.creditLimit = creditLimit }
/** Globally unique identifier for a credit product */
- fun creditProductToken(creditProductToken: String) =
- creditProductToken(JsonField.of(creditProductToken))
+ fun creditProductToken(creditProductToken: String?) =
+ creditProductToken(JsonField.ofNullable(creditProductToken))
+
+ /**
+ * Alias for calling [Builder.creditProductToken] with `creditProductToken.orElse(null)`.
+ */
+ fun creditProductToken(creditProductToken: Optional) =
+ creditProductToken(creditProductToken.getOrNull())
/**
* Sets [Builder.creditProductToken] to an arbitrary JSON value.
@@ -972,6 +1003,20 @@ private constructor(
this.payoffDetails = payoffDetails
}
+ fun statementTotals(statementTotals: StatementTotals) =
+ statementTotals(JsonField.of(statementTotals))
+
+ /**
+ * Sets [Builder.statementTotals] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.statementTotals] with a well-typed [StatementTotals]
+ * value instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun statementTotals(statementTotals: JsonField) = apply {
+ this.statementTotals = statementTotals
+ }
+
/** The type of event that occurred. */
fun eventType(eventType: EventType) = eventType(JsonField.of(eventType))
@@ -1057,6 +1102,7 @@ private constructor(
nextPaymentDueDate,
nextStatementEndDate,
payoffDetails,
+ statementTotals,
checkRequired("eventType", eventType),
additionalProperties.toMutableMap(),
)
@@ -1091,6 +1137,7 @@ private constructor(
nextPaymentDueDate()
nextStatementEndDate()
payoffDetails().ifPresent { it.validate() }
+ statementTotals().ifPresent { it.validate() }
eventType().validate()
validated = true
}
@@ -1132,6 +1179,7 @@ private constructor(
(if (nextPaymentDueDate.asKnown().isPresent) 1 else 0) +
(if (nextStatementEndDate.asKnown().isPresent) 1 else 0) +
(payoffDetails.asKnown().getOrNull()?.validity() ?: 0) +
+ (statementTotals.asKnown().getOrNull()?.validity() ?: 0) +
(eventType.asKnown().getOrNull()?.validity() ?: 0)
/** The type of event that occurred. */
@@ -1284,6 +1332,7 @@ private constructor(
nextPaymentDueDate == other.nextPaymentDueDate &&
nextStatementEndDate == other.nextStatementEndDate &&
payoffDetails == other.payoffDetails &&
+ statementTotals == other.statementTotals &&
eventType == other.eventType &&
additionalProperties == other.additionalProperties
}
@@ -1312,6 +1361,7 @@ private constructor(
nextPaymentDueDate,
nextStatementEndDate,
payoffDetails,
+ statementTotals,
eventType,
additionalProperties,
)
@@ -1320,5 +1370,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "StatementsCreatedWebhookEvent{token=$token, accountStanding=$accountStanding, amountDue=$amountDue, availableCredit=$availableCredit, created=$created, creditLimit=$creditLimit, creditProductToken=$creditProductToken, daysInBillingCycle=$daysInBillingCycle, endingBalance=$endingBalance, financialAccountToken=$financialAccountToken, paymentDueDate=$paymentDueDate, periodTotals=$periodTotals, startingBalance=$startingBalance, statementEndDate=$statementEndDate, statementStartDate=$statementStartDate, statementType=$statementType, updated=$updated, ytdTotals=$ytdTotals, interestDetails=$interestDetails, nextPaymentDueDate=$nextPaymentDueDate, nextStatementEndDate=$nextStatementEndDate, payoffDetails=$payoffDetails, eventType=$eventType, additionalProperties=$additionalProperties}"
+ "StatementsCreatedWebhookEvent{token=$token, accountStanding=$accountStanding, amountDue=$amountDue, availableCredit=$availableCredit, created=$created, creditLimit=$creditLimit, creditProductToken=$creditProductToken, daysInBillingCycle=$daysInBillingCycle, endingBalance=$endingBalance, financialAccountToken=$financialAccountToken, paymentDueDate=$paymentDueDate, periodTotals=$periodTotals, startingBalance=$startingBalance, statementEndDate=$statementEndDate, statementStartDate=$statementStartDate, statementType=$statementType, updated=$updated, ytdTotals=$ytdTotals, interestDetails=$interestDetails, nextPaymentDueDate=$nextPaymentDueDate, nextStatementEndDate=$nextStatementEndDate, payoffDetails=$payoffDetails, statementTotals=$statementTotals, eventType=$eventType, additionalProperties=$additionalProperties}"
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2ListResultsResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2ListResultsResponse.kt
index e4db2a28..219b0ba9 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2ListResultsResponse.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2ListResultsResponse.kt
@@ -292,6 +292,7 @@ private constructor(
private val eventToken: JsonField,
private val mode: JsonField,
private val ruleVersion: JsonField,
+ private val transactionToken: JsonField,
private val additionalProperties: MutableMap,
) {
@@ -317,6 +318,9 @@ private constructor(
@JsonProperty("rule_version")
@ExcludeMissing
ruleVersion: JsonField = JsonMissing.of(),
+ @JsonProperty("transaction_token")
+ @ExcludeMissing
+ transactionToken: JsonField = JsonMissing.of(),
) : this(
token,
actions,
@@ -326,6 +330,7 @@ private constructor(
eventToken,
mode,
ruleVersion,
+ transactionToken,
mutableMapOf(),
)
@@ -393,6 +398,14 @@ private constructor(
*/
fun ruleVersion(): Long = ruleVersion.getRequired("rule_version")
+ /**
+ * The token of the transaction that triggered the rule evaluation
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun transactionToken(): Optional = transactionToken.getOptional("transaction_token")
+
/**
* Returns the raw JSON value of [token].
*
@@ -461,6 +474,16 @@ private constructor(
@ExcludeMissing
fun _ruleVersion(): JsonField = ruleVersion
+ /**
+ * Returns the raw JSON value of [transactionToken].
+ *
+ * Unlike [transactionToken], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("transaction_token")
+ @ExcludeMissing
+ fun _transactionToken(): JsonField = transactionToken
+
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
additionalProperties.put(key, value)
@@ -488,6 +511,7 @@ private constructor(
* .eventToken()
* .mode()
* .ruleVersion()
+ * .transactionToken()
* ```
*/
@JvmStatic fun builder() = Builder()
@@ -504,6 +528,7 @@ private constructor(
private var eventToken: JsonField? = null
private var mode: JsonField? = null
private var ruleVersion: JsonField? = null
+ private var transactionToken: JsonField? = null
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
@@ -516,6 +541,7 @@ private constructor(
eventToken = authorizationResult.eventToken
mode = authorizationResult.mode
ruleVersion = authorizationResult.ruleVersion
+ transactionToken = authorizationResult.transactionToken
additionalProperties = authorizationResult.additionalProperties.toMutableMap()
}
@@ -650,6 +676,27 @@ private constructor(
*/
fun ruleVersion(ruleVersion: JsonField) = apply { this.ruleVersion = ruleVersion }
+ /** The token of the transaction that triggered the rule evaluation */
+ fun transactionToken(transactionToken: String?) =
+ transactionToken(JsonField.ofNullable(transactionToken))
+
+ /**
+ * Alias for calling [Builder.transactionToken] with `transactionToken.orElse(null)`.
+ */
+ fun transactionToken(transactionToken: Optional) =
+ transactionToken(transactionToken.getOrNull())
+
+ /**
+ * Sets [Builder.transactionToken] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.transactionToken] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun transactionToken(transactionToken: JsonField) = apply {
+ this.transactionToken = transactionToken
+ }
+
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -684,6 +731,7 @@ private constructor(
* .eventToken()
* .mode()
* .ruleVersion()
+ * .transactionToken()
* ```
*
* @throws IllegalStateException if any required field is unset.
@@ -698,6 +746,7 @@ private constructor(
checkRequired("eventToken", eventToken),
checkRequired("mode", mode),
checkRequired("ruleVersion", ruleVersion),
+ checkRequired("transactionToken", transactionToken),
additionalProperties.toMutableMap(),
)
}
@@ -717,6 +766,7 @@ private constructor(
eventToken()
mode().validate()
ruleVersion()
+ transactionToken()
validated = true
}
@@ -743,7 +793,8 @@ private constructor(
(eventStream.asKnown().getOrNull()?.validity() ?: 0) +
(if (eventToken.asKnown().isPresent) 1 else 0) +
(mode.asKnown().getOrNull()?.validity() ?: 0) +
- (if (ruleVersion.asKnown().isPresent) 1 else 0)
+ (if (ruleVersion.asKnown().isPresent) 1 else 0) +
+ (if (transactionToken.asKnown().isPresent) 1 else 0)
@JsonDeserialize(using = Action.Deserializer::class)
@JsonSerialize(using = Action.Serializer::class)
@@ -2447,6 +2498,7 @@ private constructor(
eventToken == other.eventToken &&
mode == other.mode &&
ruleVersion == other.ruleVersion &&
+ transactionToken == other.transactionToken &&
additionalProperties == other.additionalProperties
}
@@ -2460,6 +2512,7 @@ private constructor(
eventToken,
mode,
ruleVersion,
+ transactionToken,
additionalProperties,
)
}
@@ -2467,7 +2520,7 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "AuthorizationResult{token=$token, actions=$actions, authRuleToken=$authRuleToken, evaluationTime=$evaluationTime, eventStream=$eventStream, eventToken=$eventToken, mode=$mode, ruleVersion=$ruleVersion, additionalProperties=$additionalProperties}"
+ "AuthorizationResult{token=$token, actions=$actions, authRuleToken=$authRuleToken, evaluationTime=$evaluationTime, eventStream=$eventStream, eventToken=$eventToken, mode=$mode, ruleVersion=$ruleVersion, transactionToken=$transactionToken, additionalProperties=$additionalProperties}"
}
class Authentication3dsResult
@@ -2481,6 +2534,7 @@ private constructor(
private val eventToken: JsonField