diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index c486f6de6..91393ed88 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.93.0"
+ ".": "0.94.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 73802c714..dc05581d2 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 162
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-67859c948e3b903a317f4bd14135c7ee44254d2760068117bab34b7c4058be71.yml
-openapi_spec_hash: 23a4716c6168e96f040ac8575582d075
-config_hash: 227ad54062905d4ae964b24cef0505b0
+configured_endpoints: 165
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-aa684ff2a2af585fe502a6e44520ddd883f5141a1113fc9dbe7830027842aa09.yml
+openapi_spec_hash: b58989fdc04768fc1eb758e180c5f128
+config_hash: 1a83dceb58f6f525b19a5775018db7e8
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 722662e45..9b1769bb7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,24 @@
# Changelog
+## 0.94.0 (2025-06-27)
+
+Full Changelog: [v0.93.0...v0.94.0](https://github.com/lithic-com/lithic-java/compare/v0.93.0...v0.94.0)
+
+### Features
+
+* **api:** introduce dedicated model for SpendLimitDuration ([48444d4](https://github.com/lithic-com/lithic-java/commit/48444d4d52a1f1d963b7a1520886529ffbd80a26))
+* **client:** adds support for on-demand Auth Rule Performance Reports ([66d5cd0](https://github.com/lithic-com/lithic-java/commit/66d5cd0a89266de35f2326d579357cc4190fc20c))
+
+
+### Bug Fixes
+
+* **ci:** release-doctor — report correct token name ([1c7b405](https://github.com/lithic-com/lithic-java/commit/1c7b405338adfb8e8f7cf875ed3d6c8c03274e02))
+
+
+### Chores
+
+* **internal:** manual updates ([806eca4](https://github.com/lithic-com/lithic-java/commit/806eca42328cfaabcb56c1b4040b77f83f882884))
+
## 0.93.0 (2025-06-23)
Full Changelog: [v0.92.0...v0.93.0](https://github.com/lithic-com/lithic-java/compare/v0.92.0...v0.93.0)
diff --git a/README.md b/README.md
index 1bdc2bc43..ee8372ef3 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.93.0)
-[](https://javadoc.io/doc/com.lithic.api/lithic-java/0.93.0)
+[](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.94.0)
+[](https://javadoc.io/doc/com.lithic.api/lithic-java/0.94.0)
@@ -13,7 +13,7 @@ The Lithic Java SDK is similar to the Lithic Kotlin SDK but with minor differenc
-The REST API documentation can be found on [docs.lithic.com](https://docs.lithic.com). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.lithic.api/lithic-java/0.93.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.94.0).
@@ -24,7 +24,7 @@ The REST API documentation can be found on [docs.lithic.com](https://docs.lithic
### Gradle
```kotlin
-implementation("com.lithic.api:lithic-java:0.93.0")
+implementation("com.lithic.api:lithic-java:0.94.0")
```
### Maven
@@ -33,7 +33,7 @@ implementation("com.lithic.api:lithic-java:0.93.0")
com.lithic.api
lithic-java
- 0.93.0
+ 0.94.0
```
diff --git a/bin/check-release-environment b/bin/check-release-environment
index 2effb289f..3a6a7b4ab 100644
--- a/bin/check-release-environment
+++ b/bin/check-release-environment
@@ -3,19 +3,19 @@
errors=()
if [ -z "${SONATYPE_USERNAME}" ]; then
- errors+=("The LITHIC_SONATYPE_USERNAME secret has not been set. Please set it in either this repository's secrets or your organization secrets")
+ errors+=("The SONATYPE_USERNAME secret has not been set. Please set it in either this repository's secrets or your organization secrets")
fi
if [ -z "${SONATYPE_PASSWORD}" ]; then
- errors+=("The LITHIC_SONATYPE_PASSWORD secret has not been set. Please set it in either this repository's secrets or your organization secrets")
+ errors+=("The SONATYPE_PASSWORD secret has not been set. Please set it in either this repository's secrets or your organization secrets")
fi
if [ -z "${GPG_SIGNING_KEY}" ]; then
- errors+=("The LITHIC_SONATYPE_GPG_SIGNING_KEY secret has not been set. Please set it in either this repository's secrets or your organization secrets")
+ errors+=("The GPG_SIGNING_KEY secret has not been set. Please set it in either this repository's secrets or your organization secrets")
fi
if [ -z "${GPG_SIGNING_PASSWORD}" ]; then
- errors+=("The LITHIC_SONATYPE_GPG_SIGNING_PASSWORD secret has not been set. Please set it in either this repository's secrets or your organization secrets")
+ errors+=("The GPG_SIGNING_PASSWORD secret has not been set. Please set it in either this repository's secrets or your organization secrets")
fi
lenErrors=${#errors[@]}
diff --git a/build.gradle.kts b/build.gradle.kts
index 3a41321a5..f88a1bc96 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.lithic.api"
- version = "0.93.0" // x-release-please-version
+ version = "0.94.0" // x-release-please-version
}
subprojects {
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClient.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClient.kt
index 4638a3875..66dbb9a57 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClient.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClient.kt
@@ -24,6 +24,7 @@ import com.lithic.api.services.blocking.EventService
import com.lithic.api.services.blocking.ExternalBankAccountService
import com.lithic.api.services.blocking.ExternalPaymentService
import com.lithic.api.services.blocking.FinancialAccountService
+import com.lithic.api.services.blocking.FraudService
import com.lithic.api.services.blocking.FundingEventService
import com.lithic.api.services.blocking.ManagementOperationService
import com.lithic.api.services.blocking.PaymentService
@@ -127,6 +128,8 @@ interface LithicClient {
fun fundingEvents(): FundingEventService
+ fun fraud(): FraudService
+
/** Status of api */
fun apiStatus(): ApiStatus = apiStatus(ClientApiStatusParams.none())
@@ -219,6 +222,8 @@ interface LithicClient {
fun fundingEvents(): FundingEventService.WithRawResponse
+ fun fraud(): FraudService.WithRawResponse
+
/**
* Returns a raw HTTP response for `get /v1/status`, but is otherwise the same as
* [LithicClient.apiStatus].
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsync.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsync.kt
index 383c317aa..da1641789 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsync.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsync.kt
@@ -23,6 +23,7 @@ import com.lithic.api.services.async.EventServiceAsync
import com.lithic.api.services.async.ExternalBankAccountServiceAsync
import com.lithic.api.services.async.ExternalPaymentServiceAsync
import com.lithic.api.services.async.FinancialAccountServiceAsync
+import com.lithic.api.services.async.FraudServiceAsync
import com.lithic.api.services.async.FundingEventServiceAsync
import com.lithic.api.services.async.ManagementOperationServiceAsync
import com.lithic.api.services.async.PaymentServiceAsync
@@ -127,6 +128,8 @@ interface LithicClientAsync {
fun fundingEvents(): FundingEventServiceAsync
+ fun fraud(): FraudServiceAsync
+
/** Status of api */
fun apiStatus(): CompletableFuture = apiStatus(ClientApiStatusParams.none())
@@ -222,6 +225,8 @@ interface LithicClientAsync {
fun fundingEvents(): FundingEventServiceAsync.WithRawResponse
+ fun fraud(): FraudServiceAsync.WithRawResponse
+
/**
* Returns a raw HTTP response for `get /v1/status`, but is otherwise the same as
* [LithicClientAsync.apiStatus].
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsyncImpl.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsyncImpl.kt
index 88535cdf0..ff705c2f7 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsyncImpl.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsyncImpl.kt
@@ -49,6 +49,8 @@ import com.lithic.api.services.async.ExternalPaymentServiceAsync
import com.lithic.api.services.async.ExternalPaymentServiceAsyncImpl
import com.lithic.api.services.async.FinancialAccountServiceAsync
import com.lithic.api.services.async.FinancialAccountServiceAsyncImpl
+import com.lithic.api.services.async.FraudServiceAsync
+import com.lithic.api.services.async.FraudServiceAsyncImpl
import com.lithic.api.services.async.FundingEventServiceAsync
import com.lithic.api.services.async.FundingEventServiceAsyncImpl
import com.lithic.api.services.async.ManagementOperationServiceAsync
@@ -195,6 +197,10 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
FundingEventServiceAsyncImpl(clientOptionsWithUserAgent)
}
+ private val fraud: FraudServiceAsync by lazy {
+ FraudServiceAsyncImpl(clientOptionsWithUserAgent)
+ }
+
override fun sync(): LithicClient = sync
override fun withRawResponse(): LithicClientAsync.WithRawResponse = withRawResponse
@@ -257,6 +263,8 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
override fun fundingEvents(): FundingEventServiceAsync = fundingEvents
+ override fun fraud(): FraudServiceAsync = fraud
+
override fun apiStatus(
params: ClientApiStatusParams,
requestOptions: RequestOptions,
@@ -376,6 +384,10 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
FundingEventServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}
+ private val fraud: FraudServiceAsync.WithRawResponse by lazy {
+ FraudServiceAsyncImpl.WithRawResponseImpl(clientOptions)
+ }
+
override fun withOptions(
modifier: Consumer
): LithicClientAsync.WithRawResponse =
@@ -443,6 +455,8 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
override fun fundingEvents(): FundingEventServiceAsync.WithRawResponse = fundingEvents
+ override fun fraud(): FraudServiceAsync.WithRawResponse = fraud
+
private val apiStatusHandler: Handler =
jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler)
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientImpl.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientImpl.kt
index 55e408e59..5a216e0b6 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientImpl.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientImpl.kt
@@ -49,6 +49,8 @@ import com.lithic.api.services.blocking.ExternalPaymentService
import com.lithic.api.services.blocking.ExternalPaymentServiceImpl
import com.lithic.api.services.blocking.FinancialAccountService
import com.lithic.api.services.blocking.FinancialAccountServiceImpl
+import com.lithic.api.services.blocking.FraudService
+import com.lithic.api.services.blocking.FraudServiceImpl
import com.lithic.api.services.blocking.FundingEventService
import com.lithic.api.services.blocking.FundingEventServiceImpl
import com.lithic.api.services.blocking.ManagementOperationService
@@ -180,6 +182,8 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
FundingEventServiceImpl(clientOptionsWithUserAgent)
}
+ private val fraud: FraudService by lazy { FraudServiceImpl(clientOptionsWithUserAgent) }
+
override fun async(): LithicClientAsync = async
override fun withRawResponse(): LithicClient.WithRawResponse = withRawResponse
@@ -241,6 +245,8 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
override fun fundingEvents(): FundingEventService = fundingEvents
+ override fun fraud(): FraudService = fraud
+
override fun apiStatus(
params: ClientApiStatusParams,
requestOptions: RequestOptions,
@@ -360,6 +366,10 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
FundingEventServiceImpl.WithRawResponseImpl(clientOptions)
}
+ private val fraud: FraudService.WithRawResponse by lazy {
+ FraudServiceImpl.WithRawResponseImpl(clientOptions)
+ }
+
override fun withOptions(
modifier: Consumer
): LithicClient.WithRawResponse =
@@ -426,6 +436,8 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
override fun fundingEvents(): FundingEventService.WithRawResponse = fundingEvents
+ override fun fraud(): FraudService.WithRawResponse = fraud
+
private val apiStatusHandler: Handler =
jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler)
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2BacktestCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2BacktestCreateParams.kt
index 6b8524a2a..75ec1ad67 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2BacktestCreateParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2BacktestCreateParams.kt
@@ -36,10 +36,10 @@ import kotlin.jvm.optionals.getOrNull
* backtest reports on-demand through the
* `/v2/auth_rules/{auth_rule_token}/backtests/{auth_rule_backtest_token}` endpoint.
*
- * Lithic currently supports backtesting for `CONDITIONAL_BLOCK` rules. Backtesting for
- * `VELOCITY_LIMIT` rules is generally not supported. In specific cases (i.e. where Lithic has
- * pre-calculated the requested velocity metrics for historical transactions), a backtest may be
- * feasible. However, such cases are uncommon and customers should not anticipate support for
+ * Lithic currently supports backtesting for `CONDITIONAL_BLOCK` / `CONDITIONAL_3DS_ACTION` rules.
+ * Backtesting for `VELOCITY_LIMIT` rules is generally not supported. In specific cases (i.e. where
+ * Lithic has pre-calculated the requested velocity metrics for historical transactions), a backtest
+ * may be feasible. However, such cases are uncommon and customers should not anticipate support for
* velocity backtests under most configurations. If a historical transaction does not feature the
* required inputs to evaluate the rule, then it will not be included in the final backtest report.
*/
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ReportParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ReportParams.kt
index df3a9d509..2ae0a9729 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ReportParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ReportParams.kt
@@ -12,10 +12,11 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/**
- * Requests a performance report of an Auth rule to be asynchronously generated. Reports can only be
- * run on rules in draft or active mode and will included approved and declined statistics as well
- * as examples. The generated report will be delivered asynchronously through a webhook with
- * `event_type` = `auth_rules.performance_report.created`. See the docs on setting up
+ * This endpoint is deprecated and will be removed in the future. Requests a performance report of
+ * an Auth rule to be asynchronously generated. Reports can only be run on rules in draft or active
+ * mode and will included approved and declined statistics as well as examples. The generated report
+ * will be delivered asynchronously through a webhook with `event_type` =
+ * `auth_rules.performance_report.created`. See the docs on setting up
* [webhook subscriptions](https://docs.lithic.com/docs/events-api).
*
* Reports are generated based on data collected by Lithic's processing system in the trailing week.
@@ -55,6 +56,7 @@ import kotlin.jvm.optionals.getOrNull
* processing systems have processed the transaction, and when a transaction will be included in the
* report.
*/
+@Deprecated("deprecated")
class AuthRuleV2ReportParams
private constructor(
private val authRuleToken: String?,
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2RetrieveReportParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2RetrieveReportParams.kt
new file mode 100644
index 000000000..19f7faf27
--- /dev/null
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2RetrieveReportParams.kt
@@ -0,0 +1,245 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package com.lithic.api.models
+
+import com.lithic.api.core.Params
+import com.lithic.api.core.checkRequired
+import com.lithic.api.core.http.Headers
+import com.lithic.api.core.http.QueryParams
+import java.time.LocalDate
+import java.util.Objects
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+/**
+ * Retrieves a performance report for an Auth rule containing daily statistics and evaluation
+ * outcomes.
+ *
+ * **Time Range Limitations:**
+ * - Reports are supported for the past 3 months only
+ * - Maximum interval length is 1 month
+ * - Report data is available only through the previous day in UTC (current day data is not
+ * available)
+ *
+ * The report provides daily statistics for both current and draft versions of the Auth rule,
+ * including approval, decline, and challenge counts along with sample events.
+ */
+class AuthRuleV2RetrieveReportParams
+private constructor(
+ private val authRuleToken: String?,
+ private val begin: LocalDate,
+ private val end: LocalDate,
+ private val additionalHeaders: Headers,
+ private val additionalQueryParams: QueryParams,
+) : Params {
+
+ fun authRuleToken(): Optional = Optional.ofNullable(authRuleToken)
+
+ /** Start date for the report */
+ fun begin(): LocalDate = begin
+
+ /** End date for the report */
+ fun end(): LocalDate = end
+
+ fun _additionalHeaders(): Headers = additionalHeaders
+
+ fun _additionalQueryParams(): QueryParams = additionalQueryParams
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of
+ * [AuthRuleV2RetrieveReportParams].
+ *
+ * The following fields are required:
+ * ```java
+ * .begin()
+ * .end()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [AuthRuleV2RetrieveReportParams]. */
+ class Builder internal constructor() {
+
+ private var authRuleToken: String? = null
+ private var begin: LocalDate? = null
+ private var end: LocalDate? = null
+ private var additionalHeaders: Headers.Builder = Headers.builder()
+ private var additionalQueryParams: QueryParams.Builder = QueryParams.builder()
+
+ @JvmSynthetic
+ internal fun from(authRuleV2RetrieveReportParams: AuthRuleV2RetrieveReportParams) = apply {
+ authRuleToken = authRuleV2RetrieveReportParams.authRuleToken
+ begin = authRuleV2RetrieveReportParams.begin
+ end = authRuleV2RetrieveReportParams.end
+ additionalHeaders = authRuleV2RetrieveReportParams.additionalHeaders.toBuilder()
+ additionalQueryParams = authRuleV2RetrieveReportParams.additionalQueryParams.toBuilder()
+ }
+
+ fun authRuleToken(authRuleToken: String?) = apply { this.authRuleToken = authRuleToken }
+
+ /** Alias for calling [Builder.authRuleToken] with `authRuleToken.orElse(null)`. */
+ fun authRuleToken(authRuleToken: Optional) =
+ authRuleToken(authRuleToken.getOrNull())
+
+ /** Start date for the report */
+ fun begin(begin: LocalDate) = apply { this.begin = begin }
+
+ /** End date for the report */
+ fun end(end: LocalDate) = apply { this.end = end }
+
+ fun additionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.clear()
+ putAllAdditionalHeaders(additionalHeaders)
+ }
+
+ fun additionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.clear()
+ putAllAdditionalHeaders(additionalHeaders)
+ }
+
+ fun putAdditionalHeader(name: String, value: String) = apply {
+ additionalHeaders.put(name, value)
+ }
+
+ fun putAdditionalHeaders(name: String, values: Iterable) = apply {
+ additionalHeaders.put(name, values)
+ }
+
+ fun putAllAdditionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.putAll(additionalHeaders)
+ }
+
+ fun putAllAdditionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.putAll(additionalHeaders)
+ }
+
+ fun replaceAdditionalHeaders(name: String, value: String) = apply {
+ additionalHeaders.replace(name, value)
+ }
+
+ fun replaceAdditionalHeaders(name: String, values: Iterable) = apply {
+ additionalHeaders.replace(name, values)
+ }
+
+ fun replaceAllAdditionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.replaceAll(additionalHeaders)
+ }
+
+ fun replaceAllAdditionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.replaceAll(additionalHeaders)
+ }
+
+ fun removeAdditionalHeaders(name: String) = apply { additionalHeaders.remove(name) }
+
+ fun removeAllAdditionalHeaders(names: Set) = apply {
+ additionalHeaders.removeAll(names)
+ }
+
+ fun additionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.clear()
+ putAllAdditionalQueryParams(additionalQueryParams)
+ }
+
+ fun additionalQueryParams(additionalQueryParams: Map>) = apply {
+ this.additionalQueryParams.clear()
+ putAllAdditionalQueryParams(additionalQueryParams)
+ }
+
+ fun putAdditionalQueryParam(key: String, value: String) = apply {
+ additionalQueryParams.put(key, value)
+ }
+
+ fun putAdditionalQueryParams(key: String, values: Iterable) = apply {
+ additionalQueryParams.put(key, values)
+ }
+
+ fun putAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.putAll(additionalQueryParams)
+ }
+
+ fun putAllAdditionalQueryParams(additionalQueryParams: Map>) =
+ apply {
+ this.additionalQueryParams.putAll(additionalQueryParams)
+ }
+
+ fun replaceAdditionalQueryParams(key: String, value: String) = apply {
+ additionalQueryParams.replace(key, value)
+ }
+
+ fun replaceAdditionalQueryParams(key: String, values: Iterable) = apply {
+ additionalQueryParams.replace(key, values)
+ }
+
+ fun replaceAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.replaceAll(additionalQueryParams)
+ }
+
+ fun replaceAllAdditionalQueryParams(additionalQueryParams: Map>) =
+ apply {
+ this.additionalQueryParams.replaceAll(additionalQueryParams)
+ }
+
+ fun removeAdditionalQueryParams(key: String) = apply { additionalQueryParams.remove(key) }
+
+ fun removeAllAdditionalQueryParams(keys: Set) = apply {
+ additionalQueryParams.removeAll(keys)
+ }
+
+ /**
+ * Returns an immutable instance of [AuthRuleV2RetrieveReportParams].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .begin()
+ * .end()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): AuthRuleV2RetrieveReportParams =
+ AuthRuleV2RetrieveReportParams(
+ authRuleToken,
+ checkRequired("begin", begin),
+ checkRequired("end", end),
+ additionalHeaders.build(),
+ additionalQueryParams.build(),
+ )
+ }
+
+ fun _pathParam(index: Int): String =
+ when (index) {
+ 0 -> authRuleToken ?: ""
+ else -> ""
+ }
+
+ override fun _headers(): Headers = additionalHeaders
+
+ override fun _queryParams(): QueryParams =
+ QueryParams.builder()
+ .apply {
+ put("begin", begin.toString())
+ put("end", end.toString())
+ putAll(additionalQueryParams)
+ }
+ .build()
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return /* spotless:off */ other is AuthRuleV2RetrieveReportParams && authRuleToken == other.authRuleToken && begin == other.begin && end == other.end && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams /* spotless:on */
+ }
+
+ override fun hashCode(): Int = /* spotless:off */ Objects.hash(authRuleToken, begin, end, additionalHeaders, additionalQueryParams) /* spotless:on */
+
+ override fun toString() =
+ "AuthRuleV2RetrieveReportParams{authRuleToken=$authRuleToken, begin=$begin, end=$end, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
+}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthenticationRetrieveResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthenticationRetrieveResponse.kt
index aaff7443f..db26ff0d0 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthenticationRetrieveResponse.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthenticationRetrieveResponse.kt
@@ -19,6 +19,7 @@ import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
+/** Represents a 3DS authentication */
class AuthenticationRetrieveResponse
private constructor(
private val token: JsonField,
@@ -120,7 +121,8 @@ private constructor(
)
/**
- * Globally unique identifier for the 3DS authentication.
+ * Globally unique identifier for the 3DS authentication. Permitted values: 36-digit version 4
+ * UUID (including hyphens).
*
* @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).
@@ -156,6 +158,7 @@ private constructor(
/**
* Globally unique identifier for the card on which the 3DS authentication has occurred.
+ * Permitted values: 36-digit version 4 UUID (including hyphens).
*
* @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).
@@ -171,7 +174,7 @@ private constructor(
fun cardholder(): Cardholder = cardholder.getRequired("cardholder")
/**
- * Channel in which the authentication occurs. Maps to EMV 3DS field deviceChannel.
+ * Channel in which the authentication occurs. Maps to EMV 3DS field `deviceChannel`.
*
* @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).
@@ -179,7 +182,8 @@ private constructor(
fun channel(): Channel = channel.getRequired("channel")
/**
- * Date and time when the authentication was created in Lithic's system.
+ * Date and time when the authentication was created in Lithic's system. Permitted values: Date
+ * string in the ISO 8601 format yyyy-MM-dd'T'hh:mm:ssZ.
*
* @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).
@@ -242,7 +246,7 @@ private constructor(
/**
* Type of authentication request - i.e., the type of transaction or interaction is causing the
* merchant to request an authentication. Maps to EMV 3DS field
- * threeDSRequestorAuthenticationInd.
+ * `threeDSRequestorAuthenticationInd`.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -260,7 +264,7 @@ private constructor(
fun browser(): Optional = browser.getOptional("browser")
/**
- * Metadata about the challenge method and delivery.
+ * Metadata about the challenge method and delivery. Only present when a challenge is triggered.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -269,7 +273,8 @@ private constructor(
challengeMetadata.getOptional("challenge_metadata")
/**
- * Entity that orchestrates the challenge.
+ * Entity that orchestrates the challenge. This won't be set for authentications for which a
+ * decision has not yet been made (e.g. in-flight customer decisioning request).
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -278,7 +283,8 @@ private constructor(
challengeOrchestratedBy.getOptional("challenge_orchestrated_by")
/**
- * Entity that made the authentication decision.
+ * Entity that made the authentication decision. This won't be set for authentications for which
+ * a decision has not yet been made (e.g. in-flight customer decisioning request).
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -286,10 +292,10 @@ private constructor(
fun decisionMadeBy(): Optional = decisionMadeBy.getOptional("decision_made_by")
/**
- * Type of 3DS Requestor Initiated (3RI) request i.e., a 3DS authentication that takes place at
- * the initiation of the merchant rather than the cardholder. The most common example of this is
- * where a merchant is authenticating before billing for a recurring transaction such as a pay
- * TV subscription or a utility bill. Maps to EMV 3DS field threeRIInd.
+ * Type of 3DS Requestor Initiated (3RI) request — i.e., a 3DS authentication that takes place
+ * at the initiation of the merchant rather than the cardholder. The most common example of this
+ * is where a merchant is authenticating before billing for a recurring transaction such as a
+ * pay TV subscription or a utility bill. Maps to EMV 3DS field `threeRIInd`.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -571,7 +577,10 @@ private constructor(
authenticationRetrieveResponse.additionalProperties.toMutableMap()
}
- /** Globally unique identifier for the 3DS authentication. */
+ /**
+ * Globally unique identifier for the 3DS authentication. Permitted values: 36-digit version
+ * 4 UUID (including hyphens).
+ */
fun token(token: String) = token(JsonField.of(token))
/**
@@ -635,7 +644,10 @@ private constructor(
this.cardExpiryCheck = cardExpiryCheck
}
- /** Globally unique identifier for the card on which the 3DS authentication has occurred. */
+ /**
+ * Globally unique identifier for the card on which the 3DS authentication has occurred.
+ * Permitted values: 36-digit version 4 UUID (including hyphens).
+ */
fun cardToken(cardToken: String) = cardToken(JsonField.of(cardToken))
/**
@@ -659,7 +671,7 @@ private constructor(
*/
fun cardholder(cardholder: JsonField) = apply { this.cardholder = cardholder }
- /** Channel in which the authentication occurs. Maps to EMV 3DS field deviceChannel. */
+ /** Channel in which the authentication occurs. Maps to EMV 3DS field `deviceChannel`. */
fun channel(channel: Channel) = channel(JsonField.of(channel))
/**
@@ -670,7 +682,10 @@ private constructor(
*/
fun channel(channel: JsonField) = apply { this.channel = channel }
- /** Date and time when the authentication was created in Lithic's system. */
+ /**
+ * Date and time when the authentication was created in Lithic's system. Permitted values:
+ * Date string in the ISO 8601 format yyyy-MM-dd'T'hh:mm:ssZ.
+ */
fun created(created: OffsetDateTime) = created(JsonField.of(created))
/**
@@ -765,7 +780,10 @@ private constructor(
* Object containing data about the app used in the e-commerce transaction. Present if the
* channel is 'APP_BASED'.
*/
- fun app(app: App) = app(JsonField.of(app))
+ fun app(app: App?) = app(JsonField.ofNullable(app))
+
+ /** Alias for calling [Builder.app] with `app.orElse(null)`. */
+ fun app(app: Optional) = app(app.getOrNull())
/**
* Sets [Builder.app] to an arbitrary JSON value.
@@ -778,7 +796,7 @@ private constructor(
/**
* Type of authentication request - i.e., the type of transaction or interaction is causing
* the merchant to request an authentication. Maps to EMV 3DS field
- * threeDSRequestorAuthenticationInd.
+ * `threeDSRequestorAuthenticationInd`.
*/
fun authenticationRequestType(authenticationRequestType: AuthenticationRequestType?) =
authenticationRequestType(JsonField.ofNullable(authenticationRequestType))
@@ -806,7 +824,10 @@ private constructor(
* Object containing data about the browser used in the e-commerce transaction. Present if
* the channel is 'BROWSER'.
*/
- fun browser(browser: Browser) = browser(JsonField.of(browser))
+ fun browser(browser: Browser?) = browser(JsonField.ofNullable(browser))
+
+ /** Alias for calling [Builder.browser] with `browser.orElse(null)`. */
+ fun browser(browser: Optional) = browser(browser.getOrNull())
/**
* Sets [Builder.browser] to an arbitrary JSON value.
@@ -816,7 +837,10 @@ private constructor(
*/
fun browser(browser: JsonField) = apply { this.browser = browser }
- /** Metadata about the challenge method and delivery. */
+ /**
+ * Metadata about the challenge method and delivery. Only present when a challenge is
+ * triggered.
+ */
fun challengeMetadata(challengeMetadata: ChallengeMetadata?) =
challengeMetadata(JsonField.ofNullable(challengeMetadata))
@@ -835,7 +859,10 @@ private constructor(
this.challengeMetadata = challengeMetadata
}
- /** Entity that orchestrates the challenge. */
+ /**
+ * Entity that orchestrates the challenge. This won't be set for authentications for which a
+ * decision has not yet been made (e.g. in-flight customer decisioning request).
+ */
fun challengeOrchestratedBy(challengeOrchestratedBy: ChallengeOrchestratedBy?) =
challengeOrchestratedBy(JsonField.ofNullable(challengeOrchestratedBy))
@@ -858,7 +885,10 @@ private constructor(
this.challengeOrchestratedBy = challengeOrchestratedBy
}
- /** Entity that made the authentication decision. */
+ /**
+ * Entity that made the authentication decision. This won't be set for authentications for
+ * which a decision has not yet been made (e.g. in-flight customer decisioning request).
+ */
fun decisionMadeBy(decisionMadeBy: DecisionMadeBy?) =
decisionMadeBy(JsonField.ofNullable(decisionMadeBy))
@@ -878,10 +908,11 @@ private constructor(
}
/**
- * Type of 3DS Requestor Initiated (3RI) request i.e., a 3DS authentication that takes place
- * at the initiation of the merchant rather than the cardholder. The most common example of
- * this is where a merchant is authenticating before billing for a recurring transaction
- * such as a pay TV subscription or a utility bill. Maps to EMV 3DS field threeRIInd.
+ * Type of 3DS Requestor Initiated (3RI) request — i.e., a 3DS authentication that takes
+ * place at the initiation of the merchant rather than the cardholder. The most common
+ * example of this is where a merchant is authenticating before billing for a recurring
+ * transaction such as a pay TV subscription or a utility bill. Maps to EMV 3DS field
+ * `threeRIInd`.
*/
fun threeRiRequestType(threeRiRequestType: ThreeRiRequestType?) =
threeRiRequestType(JsonField.ofNullable(threeRiRequestType))
@@ -1484,13 +1515,13 @@ private constructor(
class Cardholder
private constructor(
private val addressMatch: JsonField,
- private val billingAddress: JsonField,
+ private val billingAddress: JsonField,
private val email: JsonField,
private val name: JsonField,
private val phoneNumberHome: JsonField,
private val phoneNumberMobile: JsonField,
private val phoneNumberWork: JsonField,
- private val shippingAddress: JsonField,
+ private val shippingAddress: JsonField,
private val additionalProperties: MutableMap,
) {
@@ -1501,7 +1532,7 @@ private constructor(
addressMatch: JsonField = JsonMissing.of(),
@JsonProperty("billing_address")
@ExcludeMissing
- billingAddress: JsonField = JsonMissing.of(),
+ billingAddress: JsonField = JsonMissing.of(),
@JsonProperty("email") @ExcludeMissing email: JsonField = JsonMissing.of(),
@JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(),
@JsonProperty("phone_number_home")
@@ -1515,7 +1546,7 @@ private constructor(
phoneNumberWork: JsonField = JsonMissing.of(),
@JsonProperty("shipping_address")
@ExcludeMissing
- shippingAddress: JsonField = JsonMissing.of(),
+ shippingAddress: JsonField = JsonMissing.of(),
) : this(
addressMatch,
billingAddress,
@@ -1532,7 +1563,7 @@ private constructor(
* Indicates whether the shipping address and billing address provided by the cardholder are
* the same. This value - and assessment of whether the addresses match - is provided
* directly in the 3DS request and is not determined by Lithic. Maps to EMV 3DS field
- * addrMatch.
+ * `addrMatch`.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -1545,12 +1576,12 @@ private constructor(
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
- fun billingAddress(): Optional =
+ fun billingAddress(): Optional =
billingAddress.getOptional("billing_address")
/**
* Email address that is either provided by the cardholder or is on file with the merchant
- * in a 3RI request. Maps to EMV 3DS field email.
+ * in a 3RI request. Maps to EMV 3DS field `email`.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -1558,7 +1589,7 @@ private constructor(
fun email(): Optional = email.getOptional("email")
/**
- * Name of the cardholder. Maps to EMV 3DS field cardholderName.
+ * Name of the cardholder. Maps to EMV 3DS field `cardholderName`.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -1566,8 +1597,8 @@ private constructor(
fun name(): Optional = name.getOptional("name")
/**
- * Home phone number provided by the cardholder. Maps to EMV 3DS fields homePhone.cc and
- * homePhone.subscriber.
+ * Home phone number provided by the cardholder. Maps to EMV 3DS fields `homePhone.cc` and
+ * `homePhone.subscriber`.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -1576,7 +1607,7 @@ private constructor(
/**
* Mobile/cell phone number provided by the cardholder. Maps to EMV 3DS fields
- * mobilePhone.cc and mobilePhone.subscriber.
+ * `mobilePhone.cc` and `mobilePhone.subscriber`.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -1585,8 +1616,8 @@ private constructor(
phoneNumberMobile.getOptional("phone_number_mobile")
/**
- * Work phone number provided by the cardholder. Maps to EMV 3DS fields workPhone.cc and
- * workPhone.subscriber.
+ * Work phone number provided by the cardholder. Maps to EMV 3DS fields `workPhone.cc` and
+ * `workPhone.subscriber`.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -1599,7 +1630,7 @@ private constructor(
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
- fun shippingAddress(): Optional =
+ fun shippingAddress(): Optional =
shippingAddress.getOptional("shipping_address")
/**
@@ -1620,7 +1651,7 @@ private constructor(
*/
@JsonProperty("billing_address")
@ExcludeMissing
- fun _billingAddress(): JsonField = billingAddress
+ fun _billingAddress(): JsonField = billingAddress
/**
* Returns the raw JSON value of [email].
@@ -1674,7 +1705,7 @@ private constructor(
*/
@JsonProperty("shipping_address")
@ExcludeMissing
- fun _shippingAddress(): JsonField = shippingAddress
+ fun _shippingAddress(): JsonField = shippingAddress
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
@@ -1698,13 +1729,13 @@ private constructor(
class Builder internal constructor() {
private var addressMatch: JsonField = JsonMissing.of()
- private var billingAddress: JsonField = JsonMissing.of()
+ private var billingAddress: JsonField = JsonMissing.of()
private var email: JsonField = JsonMissing.of()
private var name: JsonField = JsonMissing.of()
private var phoneNumberHome: JsonField = JsonMissing.of()
private var phoneNumberMobile: JsonField = JsonMissing.of()
private var phoneNumberWork: JsonField = JsonMissing.of()
- private var shippingAddress: JsonField = JsonMissing.of()
+ private var shippingAddress: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
@@ -1724,7 +1755,7 @@ private constructor(
* Indicates whether the shipping address and billing address provided by the cardholder
* are the same. This value - and assessment of whether the addresses match - is
* provided directly in the 3DS request and is not determined by Lithic. Maps to EMV 3DS
- * field addrMatch.
+ * field `addrMatch`.
*/
fun addressMatch(addressMatch: Boolean?) =
addressMatch(JsonField.ofNullable(addressMatch))
@@ -1752,23 +1783,23 @@ private constructor(
}
/** Object containing data on the billing address provided during the transaction. */
- fun billingAddress(billingAddress: ThreeDSAddress) =
+ fun billingAddress(billingAddress: BillingAddress) =
billingAddress(JsonField.of(billingAddress))
/**
* Sets [Builder.billingAddress] to an arbitrary JSON value.
*
- * You should usually call [Builder.billingAddress] with a well-typed [ThreeDSAddress]
+ * You should usually call [Builder.billingAddress] with a well-typed [BillingAddress]
* value instead. This method is primarily for setting the field to an undocumented or
* not yet supported value.
*/
- fun billingAddress(billingAddress: JsonField) = apply {
+ fun billingAddress(billingAddress: JsonField) = apply {
this.billingAddress = billingAddress
}
/**
* Email address that is either provided by the cardholder or is on file with the
- * merchant in a 3RI request. Maps to EMV 3DS field email.
+ * merchant in a 3RI request. Maps to EMV 3DS field `email`.
*/
fun email(email: String?) = email(JsonField.ofNullable(email))
@@ -1784,7 +1815,7 @@ private constructor(
*/
fun email(email: JsonField) = apply { this.email = email }
- /** Name of the cardholder. Maps to EMV 3DS field cardholderName. */
+ /** Name of the cardholder. Maps to EMV 3DS field `cardholderName`. */
fun name(name: String?) = name(JsonField.ofNullable(name))
/** Alias for calling [Builder.name] with `name.orElse(null)`. */
@@ -1800,8 +1831,8 @@ private constructor(
fun name(name: JsonField) = apply { this.name = name }
/**
- * Home phone number provided by the cardholder. Maps to EMV 3DS fields homePhone.cc and
- * homePhone.subscriber.
+ * Home phone number provided by the cardholder. Maps to EMV 3DS fields `homePhone.cc`
+ * and `homePhone.subscriber`.
*/
fun phoneNumberHome(phoneNumberHome: String?) =
phoneNumberHome(JsonField.ofNullable(phoneNumberHome))
@@ -1823,7 +1854,7 @@ private constructor(
/**
* Mobile/cell phone number provided by the cardholder. Maps to EMV 3DS fields
- * mobilePhone.cc and mobilePhone.subscriber.
+ * `mobilePhone.cc` and `mobilePhone.subscriber`.
*/
fun phoneNumberMobile(phoneNumberMobile: String?) =
phoneNumberMobile(JsonField.ofNullable(phoneNumberMobile))
@@ -1846,8 +1877,8 @@ private constructor(
}
/**
- * Work phone number provided by the cardholder. Maps to EMV 3DS fields workPhone.cc and
- * workPhone.subscriber.
+ * Work phone number provided by the cardholder. Maps to EMV 3DS fields `workPhone.cc`
+ * and `workPhone.subscriber`.
*/
fun phoneNumberWork(phoneNumberWork: String?) =
phoneNumberWork(JsonField.ofNullable(phoneNumberWork))
@@ -1868,17 +1899,17 @@ private constructor(
}
/** Object containing data on the shipping address provided during the transaction. */
- fun shippingAddress(shippingAddress: ThreeDSAddress) =
+ fun shippingAddress(shippingAddress: ShippingAddress) =
shippingAddress(JsonField.of(shippingAddress))
/**
* Sets [Builder.shippingAddress] to an arbitrary JSON value.
*
- * You should usually call [Builder.shippingAddress] with a well-typed [ThreeDSAddress]
+ * You should usually call [Builder.shippingAddress] with a well-typed [ShippingAddress]
* value instead. This method is primarily for setting the field to an undocumented or
* not yet supported value.
*/
- fun shippingAddress(shippingAddress: JsonField) = apply {
+ fun shippingAddress(shippingAddress: JsonField) = apply {
this.shippingAddress = shippingAddress
}
@@ -1964,7 +1995,367 @@ private constructor(
(shippingAddress.asKnown().getOrNull()?.validity() ?: 0)
/** Object containing data on the billing address provided during the transaction. */
- class ThreeDSAddress
+ class BillingAddress
+ private constructor(
+ private val address1: JsonField,
+ private val address2: JsonField,
+ private val address3: JsonField,
+ private val city: JsonField,
+ private val country: JsonField,
+ private val postalCode: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("address1")
+ @ExcludeMissing
+ address1: JsonField = JsonMissing.of(),
+ @JsonProperty("address2")
+ @ExcludeMissing
+ address2: JsonField = JsonMissing.of(),
+ @JsonProperty("address3")
+ @ExcludeMissing
+ address3: JsonField = JsonMissing.of(),
+ @JsonProperty("city") @ExcludeMissing city: JsonField = JsonMissing.of(),
+ @JsonProperty("country")
+ @ExcludeMissing
+ country: JsonField = JsonMissing.of(),
+ @JsonProperty("postal_code")
+ @ExcludeMissing
+ postalCode: JsonField = JsonMissing.of(),
+ ) : this(address1, address2, address3, city, country, postalCode, mutableMapOf())
+
+ /**
+ * First line of the street address provided by the cardholder.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun address1(): Optional = address1.getOptional("address1")
+
+ /**
+ * Second line of the street address provided by the cardholder.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun address2(): Optional = address2.getOptional("address2")
+
+ /**
+ * Third line of the street address provided by the cardholder.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun address3(): Optional = address3.getOptional("address3")
+
+ /**
+ * City of the address provided by the cardholder.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun city(): Optional = city.getOptional("city")
+
+ /**
+ * Country of the address provided by the cardholder in ISO 3166-1 alpha-3 format (e.g.
+ * USA)
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun country(): Optional = country.getOptional("country")
+
+ /**
+ * Postal code (e.g., ZIP code) of the address provided by the cardholder
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun postalCode(): Optional = postalCode.getOptional("postal_code")
+
+ /**
+ * Returns the raw JSON value of [address1].
+ *
+ * Unlike [address1], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("address1") @ExcludeMissing fun _address1(): JsonField = address1
+
+ /**
+ * Returns the raw JSON value of [address2].
+ *
+ * Unlike [address2], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("address2") @ExcludeMissing fun _address2(): JsonField = address2
+
+ /**
+ * Returns the raw JSON value of [address3].
+ *
+ * Unlike [address3], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("address3") @ExcludeMissing fun _address3(): JsonField = address3
+
+ /**
+ * Returns the raw JSON value of [city].
+ *
+ * Unlike [city], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("city") @ExcludeMissing fun _city(): JsonField = city
+
+ /**
+ * Returns the raw JSON value of [country].
+ *
+ * Unlike [country], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("country") @ExcludeMissing fun _country(): JsonField = country
+
+ /**
+ * Returns the raw JSON value of [postalCode].
+ *
+ * Unlike [postalCode], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("postal_code")
+ @ExcludeMissing
+ fun _postalCode(): JsonField = postalCode
+
+ @JsonAnySetter
+ private fun putAdditionalProperty(key: String, value: JsonValue) {
+ additionalProperties.put(key, value)
+ }
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map =
+ Collections.unmodifiableMap(additionalProperties)
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /** Returns a mutable builder for constructing an instance of [BillingAddress]. */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [BillingAddress]. */
+ class Builder internal constructor() {
+
+ private var address1: JsonField = JsonMissing.of()
+ private var address2: JsonField = JsonMissing.of()
+ private var address3: JsonField = JsonMissing.of()
+ private var city: JsonField = JsonMissing.of()
+ private var country: JsonField = JsonMissing.of()
+ private var postalCode: JsonField = JsonMissing.of()
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(billingAddress: BillingAddress) = apply {
+ address1 = billingAddress.address1
+ address2 = billingAddress.address2
+ address3 = billingAddress.address3
+ city = billingAddress.city
+ country = billingAddress.country
+ postalCode = billingAddress.postalCode
+ additionalProperties = billingAddress.additionalProperties.toMutableMap()
+ }
+
+ /** First line of the street address provided by the cardholder. */
+ fun address1(address1: String?) = address1(JsonField.ofNullable(address1))
+
+ /** Alias for calling [Builder.address1] with `address1.orElse(null)`. */
+ fun address1(address1: Optional) = address1(address1.getOrNull())
+
+ /**
+ * Sets [Builder.address1] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.address1] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun address1(address1: JsonField) = apply { this.address1 = address1 }
+
+ /** Second line of the street address provided by the cardholder. */
+ fun address2(address2: String?) = address2(JsonField.ofNullable(address2))
+
+ /** Alias for calling [Builder.address2] with `address2.orElse(null)`. */
+ fun address2(address2: Optional) = address2(address2.getOrNull())
+
+ /**
+ * Sets [Builder.address2] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.address2] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun address2(address2: JsonField) = apply { this.address2 = address2 }
+
+ /** Third line of the street address provided by the cardholder. */
+ fun address3(address3: String?) = address3(JsonField.ofNullable(address3))
+
+ /** Alias for calling [Builder.address3] with `address3.orElse(null)`. */
+ fun address3(address3: Optional) = address3(address3.getOrNull())
+
+ /**
+ * Sets [Builder.address3] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.address3] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun address3(address3: JsonField) = apply { this.address3 = address3 }
+
+ /** City of the address provided by the cardholder. */
+ fun city(city: String?) = city(JsonField.ofNullable(city))
+
+ /** Alias for calling [Builder.city] with `city.orElse(null)`. */
+ fun city(city: Optional) = city(city.getOrNull())
+
+ /**
+ * Sets [Builder.city] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.city] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun city(city: JsonField) = apply { this.city = city }
+
+ /**
+ * Country of the address provided by the cardholder in ISO 3166-1 alpha-3 format
+ * (e.g. USA)
+ */
+ fun country(country: String?) = country(JsonField.ofNullable(country))
+
+ /** Alias for calling [Builder.country] with `country.orElse(null)`. */
+ fun country(country: Optional) = country(country.getOrNull())
+
+ /**
+ * Sets [Builder.country] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.country] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun country(country: JsonField) = apply { this.country = country }
+
+ /** Postal code (e.g., ZIP code) of the address provided by the cardholder */
+ fun postalCode(postalCode: String?) = postalCode(JsonField.ofNullable(postalCode))
+
+ /** Alias for calling [Builder.postalCode] with `postalCode.orElse(null)`. */
+ fun postalCode(postalCode: Optional) = postalCode(postalCode.getOrNull())
+
+ /**
+ * Sets [Builder.postalCode] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.postalCode] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun postalCode(postalCode: JsonField) = apply {
+ this.postalCode = postalCode
+ }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ putAllAdditionalProperties(additionalProperties)
+ }
+
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) =
+ apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun removeAdditionalProperty(key: String) = apply {
+ additionalProperties.remove(key)
+ }
+
+ fun removeAllAdditionalProperties(keys: Set) = apply {
+ keys.forEach(::removeAdditionalProperty)
+ }
+
+ /**
+ * Returns an immutable instance of [BillingAddress].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ */
+ fun build(): BillingAddress =
+ BillingAddress(
+ address1,
+ address2,
+ address3,
+ city,
+ country,
+ postalCode,
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): BillingAddress = apply {
+ if (validated) {
+ return@apply
+ }
+
+ address1()
+ address2()
+ address3()
+ city()
+ country()
+ postalCode()
+ 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 (address1.asKnown().isPresent) 1 else 0) +
+ (if (address2.asKnown().isPresent) 1 else 0) +
+ (if (address3.asKnown().isPresent) 1 else 0) +
+ (if (city.asKnown().isPresent) 1 else 0) +
+ (if (country.asKnown().isPresent) 1 else 0) +
+ (if (postalCode.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return /* spotless:off */ other is BillingAddress && address1 == other.address1 && address2 == other.address2 && address3 == other.address3 && city == other.city && country == other.country && postalCode == other.postalCode && additionalProperties == other.additionalProperties /* spotless:on */
+ }
+
+ /* spotless:off */
+ private val hashCode: Int by lazy { Objects.hash(address1, address2, address3, city, country, postalCode, additionalProperties) }
+ /* spotless:on */
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "BillingAddress{address1=$address1, address2=$address2, address3=$address3, city=$city, country=$country, postalCode=$postalCode, additionalProperties=$additionalProperties}"
+ }
+
+ /** Object containing data on the shipping address provided during the transaction. */
+ class ShippingAddress
private constructor(
private val address1: JsonField,
private val address2: JsonField,
@@ -2106,11 +2497,11 @@ private constructor(
companion object {
- /** Returns a mutable builder for constructing an instance of [ThreeDSAddress]. */
+ /** Returns a mutable builder for constructing an instance of [ShippingAddress]. */
@JvmStatic fun builder() = Builder()
}
- /** A builder for [ThreeDSAddress]. */
+ /** A builder for [ShippingAddress]. */
class Builder internal constructor() {
private var address1: JsonField = JsonMissing.of()
@@ -2122,14 +2513,14 @@ private constructor(
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
- internal fun from(threeDSAddress: ThreeDSAddress) = apply {
- address1 = threeDSAddress.address1
- address2 = threeDSAddress.address2
- address3 = threeDSAddress.address3
- city = threeDSAddress.city
- country = threeDSAddress.country
- postalCode = threeDSAddress.postalCode
- additionalProperties = threeDSAddress.additionalProperties.toMutableMap()
+ internal fun from(shippingAddress: ShippingAddress) = apply {
+ address1 = shippingAddress.address1
+ address2 = shippingAddress.address2
+ address3 = shippingAddress.address3
+ city = shippingAddress.city
+ country = shippingAddress.country
+ postalCode = shippingAddress.postalCode
+ additionalProperties = shippingAddress.additionalProperties.toMutableMap()
}
/** First line of the street address provided by the cardholder. */
@@ -2250,12 +2641,12 @@ private constructor(
}
/**
- * Returns an immutable instance of [ThreeDSAddress].
+ * Returns an immutable instance of [ShippingAddress].
*
* Further updates to this [Builder] will not mutate the returned instance.
*/
- fun build(): ThreeDSAddress =
- ThreeDSAddress(
+ fun build(): ShippingAddress =
+ ShippingAddress(
address1,
address2,
address3,
@@ -2268,7 +2659,7 @@ private constructor(
private var validated: Boolean = false
- fun validate(): ThreeDSAddress = apply {
+ fun validate(): ShippingAddress = apply {
if (validated) {
return@apply
}
@@ -2310,7 +2701,7 @@ private constructor(
return true
}
- return /* spotless:off */ other is ThreeDSAddress && address1 == other.address1 && address2 == other.address2 && address3 == other.address3 && city == other.city && country == other.country && postalCode == other.postalCode && additionalProperties == other.additionalProperties /* spotless:on */
+ return /* spotless:off */ other is ShippingAddress && address1 == other.address1 && address2 == other.address2 && address3 == other.address3 && city == other.city && country == other.country && postalCode == other.postalCode && additionalProperties == other.additionalProperties /* spotless:on */
}
/* spotless:off */
@@ -2320,7 +2711,7 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "ThreeDSAddress{address1=$address1, address2=$address2, address3=$address3, city=$city, country=$country, postalCode=$postalCode, additionalProperties=$additionalProperties}"
+ "ShippingAddress{address1=$address1, address2=$address2, address3=$address3, city=$city, country=$country, postalCode=$postalCode, additionalProperties=$additionalProperties}"
}
override fun equals(other: Any?): Boolean {
@@ -2341,7 +2732,7 @@ private constructor(
"Cardholder{addressMatch=$addressMatch, billingAddress=$billingAddress, email=$email, name=$name, phoneNumberHome=$phoneNumberHome, phoneNumberMobile=$phoneNumberMobile, phoneNumberWork=$phoneNumberWork, shippingAddress=$shippingAddress, additionalProperties=$additionalProperties}"
}
- /** Channel in which the authentication occurs. Maps to EMV 3DS field deviceChannel. */
+ /** Channel in which the authentication occurs. Maps to EMV 3DS field `deviceChannel`. */
class Channel @JsonCreator private constructor(private val value: JsonField) : Enum {
/**
@@ -2497,7 +2888,7 @@ private constructor(
/**
* Merchant identifier as assigned by the acquirer. Maps to EMV 3DS field
- * acquirerMerchantId.
+ * `acquirerMerchantId`.
*
* @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).
@@ -2506,7 +2897,7 @@ private constructor(
/**
* Country code of the merchant requesting 3DS authentication. Maps to EMV 3DS field
- * merchantCountryCode.
+ * `merchantCountryCode`. Permitted values: ISO 3166-1 alpha-3 country code (e.g., USA).
*
* @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).
@@ -2515,7 +2906,7 @@ private constructor(
/**
* Merchant category code assigned to the merchant that describes its business activity
- * type. Maps to EMV 3DS field mcc.
+ * type. Maps to EMV 3DS field `mcc`.
*
* @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).
@@ -2523,7 +2914,7 @@ private constructor(
fun mcc(): String = mcc.getRequired("mcc")
/**
- * Name of the merchant. Maps to EMV 3DS field merchantName.
+ * Name of the merchant. Maps to EMV 3DS field `merchantName`.
*
* @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).
@@ -2628,7 +3019,7 @@ private constructor(
/**
* Merchant identifier as assigned by the acquirer. Maps to EMV 3DS field
- * acquirerMerchantId.
+ * `acquirerMerchantId`.
*/
fun id(id: String) = id(JsonField.of(id))
@@ -2643,7 +3034,7 @@ private constructor(
/**
* Country code of the merchant requesting 3DS authentication. Maps to EMV 3DS field
- * merchantCountryCode.
+ * `merchantCountryCode`. Permitted values: ISO 3166-1 alpha-3 country code (e.g., USA).
*/
fun country(country: String) = country(JsonField.of(country))
@@ -2658,7 +3049,7 @@ private constructor(
/**
* Merchant category code assigned to the merchant that describes its business activity
- * type. Maps to EMV 3DS field mcc.
+ * type. Maps to EMV 3DS field `mcc`.
*/
fun mcc(mcc: String) = mcc(JsonField.of(mcc))
@@ -2671,7 +3062,7 @@ private constructor(
*/
fun mcc(mcc: JsonField) = apply { this.mcc = mcc }
- /** Name of the merchant. Maps to EMV 3DS field merchantName. */
+ /** Name of the merchant. Maps to EMV 3DS field `merchantName`. */
fun name(name: String) = name(JsonField.of(name))
/**
@@ -2846,7 +3237,7 @@ private constructor(
/**
* In transactions with electronic delivery, email address to which merchandise is
- * delivered. Maps to EMV 3DS field deliveryEmailAddress.
+ * delivered. Maps to EMV 3DS field `deliveryEmailAddress`.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if
* the server responded with an unexpected value).
@@ -2855,7 +3246,8 @@ private constructor(
deliveryEmailAddress.getOptional("delivery_email_address")
/**
- * The delivery time frame for the merchandise. Maps to EMV 3DS field deliveryTimeframe.
+ * The delivery time frame for the merchandise. Maps to EMV 3DS field
+ * `deliveryTimeframe`.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if
* the server responded with an unexpected value).
@@ -2865,7 +3257,8 @@ private constructor(
/**
* In prepaid or gift card purchase transactions, purchase amount total in major units
- * (e.g., a purchase of USD $205.10 would be 205). Maps to EMV 3DS field giftCardAmount.
+ * (e.g., a purchase of USD $205.10 would be 205). Maps to EMV 3DS field
+ * `giftCardAmount`.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if
* the server responded with an unexpected value).
@@ -2874,7 +3267,7 @@ private constructor(
/**
* In prepaid or gift card purchase transactions, count of individual prepaid or gift
- * cards/codes purchased. Maps to EMV 3DS field giftCardCount.
+ * cards/codes purchased. Maps to EMV 3DS field `giftCardCount`.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if
* the server responded with an unexpected value).
@@ -2883,7 +3276,8 @@ private constructor(
/**
* In prepaid or gift card purchase transactions, currency code of the gift card. Maps
- * to EMV 3DS field giftCardCurr.
+ * to EMV 3DS field `giftCardCurr`. Permitted values: ISO 4217 three-character currency
+ * code (e.g., USD).
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if
* the server responded with an unexpected value).
@@ -2893,7 +3287,7 @@ private constructor(
/**
* Indicates whether the purchase is for merchandise that is available now or at a
- * future date. Maps to EMV 3DS field preOrderPurchaseInd.
+ * future date. Maps to EMV 3DS field `preOrderPurchaseInd`.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if
* the server responded with an unexpected value).
@@ -2903,7 +3297,8 @@ private constructor(
/**
* In pre-order purchase transactions, the expected date that the merchandise will be
- * available. Maps to EMV 3DS field preOrderDate.
+ * available. Maps to EMV 3DS field `preOrderDate`. Permitted values: Date string in the
+ * ISO 8601 format yyyy-MM-dd'T'hh:mm:ssZ
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if
* the server responded with an unexpected value).
@@ -2913,7 +3308,7 @@ private constructor(
/**
* Indicates whether the cardholder is reordering previously purchased merchandise. Maps
- * to EMV 3DS field reorderItemsInd.
+ * to EMV 3DS field `reorderItemsInd`.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if
* the server responded with an unexpected value).
@@ -2924,7 +3319,7 @@ private constructor(
* Shipping method that the cardholder chose for the transaction. If purchase includes
* one or more item, this indicator is used for the physical goods; if the purchase only
* includes digital goods, this indicator is used to describe the most expensive item
- * purchased. Maps to EMV 3DS field shipIndicator.
+ * purchased. Maps to EMV 3DS field `shipIndicator`.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if
* the server responded with an unexpected value).
@@ -3070,7 +3465,7 @@ private constructor(
/**
* In transactions with electronic delivery, email address to which merchandise is
- * delivered. Maps to EMV 3DS field deliveryEmailAddress.
+ * delivered. Maps to EMV 3DS field `deliveryEmailAddress`.
*/
fun deliveryEmailAddress(deliveryEmailAddress: String?) =
deliveryEmailAddress(JsonField.ofNullable(deliveryEmailAddress))
@@ -3095,7 +3490,7 @@ private constructor(
/**
* The delivery time frame for the merchandise. Maps to EMV 3DS field
- * deliveryTimeframe.
+ * `deliveryTimeframe`.
*/
fun deliveryTimeFrame(deliveryTimeFrame: DeliveryTimeFrame?) =
deliveryTimeFrame(JsonField.ofNullable(deliveryTimeFrame))
@@ -3121,7 +3516,7 @@ private constructor(
/**
* In prepaid or gift card purchase transactions, purchase amount total in major
* units (e.g., a purchase of USD $205.10 would be 205). Maps to EMV 3DS field
- * giftCardAmount.
+ * `giftCardAmount`.
*/
fun giftCardAmount(giftCardAmount: Long?) =
giftCardAmount(JsonField.ofNullable(giftCardAmount))
@@ -3152,7 +3547,7 @@ private constructor(
/**
* In prepaid or gift card purchase transactions, count of individual prepaid or
- * gift cards/codes purchased. Maps to EMV 3DS field giftCardCount.
+ * gift cards/codes purchased. Maps to EMV 3DS field `giftCardCount`.
*/
fun giftCardCount(giftCardCount: Long?) =
giftCardCount(JsonField.ofNullable(giftCardCount))
@@ -3181,7 +3576,8 @@ private constructor(
/**
* In prepaid or gift card purchase transactions, currency code of the gift card.
- * Maps to EMV 3DS field giftCardCurr.
+ * Maps to EMV 3DS field `giftCardCurr`. Permitted values: ISO 4217 three-character
+ * currency code (e.g., USD).
*/
fun giftCardCurrency(giftCardCurrency: String?) =
giftCardCurrency(JsonField.ofNullable(giftCardCurrency))
@@ -3206,7 +3602,7 @@ private constructor(
/**
* Indicates whether the purchase is for merchandise that is available now or at a
- * future date. Maps to EMV 3DS field preOrderPurchaseInd.
+ * future date. Maps to EMV 3DS field `preOrderPurchaseInd`.
*/
fun orderAvailability(orderAvailability: OrderAvailability?) =
orderAvailability(JsonField.ofNullable(orderAvailability))
@@ -3231,7 +3627,8 @@ private constructor(
/**
* In pre-order purchase transactions, the expected date that the merchandise will
- * be available. Maps to EMV 3DS field preOrderDate.
+ * be available. Maps to EMV 3DS field `preOrderDate`. Permitted values: Date string
+ * in the ISO 8601 format yyyy-MM-dd'T'hh:mm:ssZ
*/
fun preOrderAvailableDate(preOrderAvailableDate: OffsetDateTime?) =
preOrderAvailableDate(JsonField.ofNullable(preOrderAvailableDate))
@@ -3257,7 +3654,7 @@ private constructor(
/**
* Indicates whether the cardholder is reordering previously purchased merchandise.
- * Maps to EMV 3DS field reorderItemsInd.
+ * Maps to EMV 3DS field `reorderItemsInd`.
*/
fun reorderItems(reorderItems: ReorderItems?) =
reorderItems(JsonField.ofNullable(reorderItems))
@@ -3281,7 +3678,7 @@ private constructor(
* Shipping method that the cardholder chose for the transaction. If purchase
* includes one or more item, this indicator is used for the physical goods; if the
* purchase only includes digital goods, this indicator is used to describe the most
- * expensive item purchased. Maps to EMV 3DS field shipIndicator.
+ * expensive item purchased. Maps to EMV 3DS field `shipIndicator`.
*/
fun shippingMethod(shippingMethod: ShippingMethod?) =
shippingMethod(JsonField.ofNullable(shippingMethod))
@@ -3391,7 +3788,8 @@ private constructor(
(shippingMethod.asKnown().getOrNull()?.validity() ?: 0)
/**
- * The delivery time frame for the merchandise. Maps to EMV 3DS field deliveryTimeframe.
+ * The delivery time frame for the merchandise. Maps to EMV 3DS field
+ * `deliveryTimeframe`.
*/
class DeliveryTimeFrame
@JsonCreator
@@ -3542,7 +3940,7 @@ private constructor(
/**
* Indicates whether the purchase is for merchandise that is available now or at a
- * future date. Maps to EMV 3DS field preOrderPurchaseInd.
+ * future date. Maps to EMV 3DS field `preOrderPurchaseInd`.
*/
class OrderAvailability
@JsonCreator
@@ -3681,7 +4079,7 @@ private constructor(
/**
* Indicates whether the cardholder is reordering previously purchased merchandise. Maps
- * to EMV 3DS field reorderItemsInd.
+ * to EMV 3DS field `reorderItemsInd`.
*/
class ReorderItems
@JsonCreator
@@ -3820,7 +4218,7 @@ private constructor(
* Shipping method that the cardholder chose for the transaction. If purchase includes
* one or more item, this indicator is used for the physical goods; if the purchase only
* includes digital goods, this indicator is used to describe the most expensive item
- * purchased. Maps to EMV 3DS field shipIndicator.
+ * purchased. Maps to EMV 3DS field `shipIndicator`.
*/
class ShippingMethod
@JsonCreator
@@ -4380,7 +4778,8 @@ private constructor(
/**
* Mastercard only: Assessment by the network of the authentication risk level, with a
- * higher value indicating a higher amount of risk.
+ * higher value indicating a higher amount of risk. Permitted values: Integer between 0-950,
+ * in increments of 50.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -4463,7 +4862,8 @@ private constructor(
/**
* Mastercard only: Assessment by the network of the authentication risk level, with a
- * higher value indicating a higher amount of risk.
+ * higher value indicating a higher amount of risk. Permitted values: Integer between
+ * 0-950, in increments of 50.
*/
fun networkRiskScore(networkRiskScore: Long?) =
networkRiskScore(JsonField.ofNullable(networkRiskScore))
@@ -4731,7 +5131,7 @@ private constructor(
/**
* Device information gathered from the cardholder's device - JSON name/value pairs that is
- * Base64url encoded. Maps to EMV 3DS field deviceInfo.
+ * Base64url encoded. Maps to EMV 3DS field `deviceInfo`.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -4740,7 +5140,7 @@ private constructor(
/**
* External IP address used by the app generating the 3DS authentication request. Maps to
- * EMV 3DS field appIp.
+ * EMV 3DS field `appIp`.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -4797,7 +5197,7 @@ private constructor(
/**
* Device information gathered from the cardholder's device - JSON name/value pairs that
- * is Base64url encoded. Maps to EMV 3DS field deviceInfo.
+ * is Base64url encoded. Maps to EMV 3DS field `deviceInfo`.
*/
fun deviceInfo(deviceInfo: String?) = deviceInfo(JsonField.ofNullable(deviceInfo))
@@ -4815,7 +5215,7 @@ private constructor(
/**
* External IP address used by the app generating the 3DS authentication request. Maps
- * to EMV 3DS field appIp.
+ * to EMV 3DS field `appIp`.
*/
fun ip(ip: String) = ip(JsonField.of(ip))
@@ -4906,7 +5306,7 @@ private constructor(
/**
* Type of authentication request - i.e., the type of transaction or interaction is causing the
* merchant to request an authentication. Maps to EMV 3DS field
- * threeDSRequestorAuthenticationInd.
+ * `threeDSRequestorAuthenticationInd`.
*/
class AuthenticationRequestType
@JsonCreator
@@ -5096,6 +5496,7 @@ private constructor(
*/
class Browser
private constructor(
+ private val acceptHeader: JsonField,
private val ip: JsonField,
private val javaEnabled: JsonField,
private val javascriptEnabled: JsonField,
@@ -5107,6 +5508,9 @@ private constructor(
@JsonCreator
private constructor(
+ @JsonProperty("accept_header")
+ @ExcludeMissing
+ acceptHeader: JsonField = JsonMissing.of(),
@JsonProperty("ip") @ExcludeMissing ip: JsonField = JsonMissing.of(),
@JsonProperty("java_enabled")
@ExcludeMissing
@@ -5123,11 +5527,29 @@ private constructor(
@JsonProperty("user_agent")
@ExcludeMissing
userAgent: JsonField = JsonMissing.of(),
- ) : this(ip, javaEnabled, javascriptEnabled, language, timeZone, userAgent, mutableMapOf())
+ ) : this(
+ acceptHeader,
+ ip,
+ javaEnabled,
+ javascriptEnabled,
+ language,
+ timeZone,
+ userAgent,
+ mutableMapOf(),
+ )
+
+ /**
+ * Content of the HTTP accept headers as sent from the cardholder's browser to the 3DS
+ * requestor (e.g., merchant or digital wallet).
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun acceptHeader(): Optional = acceptHeader.getOptional("accept_header")
/**
* IP address of the browser as returned by the HTTP headers to the 3DS requestor (e.g.,
- * merchant or digital wallet). Maps to EMV 3DS field browserIP.
+ * merchant or digital wallet). Maps to EMV 3DS field `browserIP`.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -5136,7 +5558,7 @@ private constructor(
/**
* Indicates whether the cardholder's browser has the ability to execute Java. Maps to EMV
- * 3DS field browserJavaEnabled.
+ * 3DS field `browserJavaEnabled`.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -5145,7 +5567,7 @@ private constructor(
/**
* Indicates whether the cardholder's browser has the ability to execute JavaScript. Maps to
- * EMV 3DS field browserJavascriptEnabled.
+ * EMV 3DS field `browserJavascriptEnabled`.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -5155,7 +5577,7 @@ private constructor(
/**
* Language of the cardholder's browser as defined in IETF BCP47. Maps to EMV 3DS field
- * browserLanguage.
+ * `browserLanguage`.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -5165,7 +5587,7 @@ private constructor(
/**
* Time zone of the cardholder's browser offset in minutes between UTC and the cardholder
* browser's local time. The offset is positive if the local time is behind UTC and negative
- * if it is ahead. Maps to EMV 3DS field browserTz.
+ * if it is ahead. Maps to EMV 3DS field `browserTz`.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -5173,13 +5595,23 @@ private constructor(
fun timeZone(): Optional = timeZone.getOptional("time_zone")
/**
- * Content of the HTTP user-agent header. Maps to EMV 3DS field browserUserAgent.
+ * Content of the HTTP user-agent header. Maps to EMV 3DS field `browserUserAgent`.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
fun userAgent(): Optional = userAgent.getOptional("user_agent")
+ /**
+ * Returns the raw JSON value of [acceptHeader].
+ *
+ * Unlike [acceptHeader], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("accept_header")
+ @ExcludeMissing
+ fun _acceptHeader(): JsonField = acceptHeader
+
/**
* Returns the raw JSON value of [ip].
*
@@ -5248,6 +5680,7 @@ private constructor(
/** A builder for [Browser]. */
class Builder internal constructor() {
+ private var acceptHeader: JsonField = JsonMissing.of()
private var ip: JsonField = JsonMissing.of()
private var javaEnabled: JsonField = JsonMissing.of()
private var javascriptEnabled: JsonField = JsonMissing.of()
@@ -5258,6 +5691,7 @@ private constructor(
@JvmSynthetic
internal fun from(browser: Browser) = apply {
+ acceptHeader = browser.acceptHeader
ip = browser.ip
javaEnabled = browser.javaEnabled
javascriptEnabled = browser.javascriptEnabled
@@ -5267,9 +5701,31 @@ private constructor(
additionalProperties = browser.additionalProperties.toMutableMap()
}
+ /**
+ * Content of the HTTP accept headers as sent from the cardholder's browser to the 3DS
+ * requestor (e.g., merchant or digital wallet).
+ */
+ fun acceptHeader(acceptHeader: String?) =
+ acceptHeader(JsonField.ofNullable(acceptHeader))
+
+ /** Alias for calling [Builder.acceptHeader] with `acceptHeader.orElse(null)`. */
+ fun acceptHeader(acceptHeader: Optional) =
+ acceptHeader(acceptHeader.getOrNull())
+
+ /**
+ * Sets [Builder.acceptHeader] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.acceptHeader] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun acceptHeader(acceptHeader: JsonField) = apply {
+ this.acceptHeader = acceptHeader
+ }
+
/**
* IP address of the browser as returned by the HTTP headers to the 3DS requestor (e.g.,
- * merchant or digital wallet). Maps to EMV 3DS field browserIP.
+ * merchant or digital wallet). Maps to EMV 3DS field `browserIP`.
*/
fun ip(ip: String?) = ip(JsonField.ofNullable(ip))
@@ -5287,7 +5743,7 @@ private constructor(
/**
* Indicates whether the cardholder's browser has the ability to execute Java. Maps to
- * EMV 3DS field browserJavaEnabled.
+ * EMV 3DS field `browserJavaEnabled`.
*/
fun javaEnabled(javaEnabled: Boolean?) = javaEnabled(JsonField.ofNullable(javaEnabled))
@@ -5314,7 +5770,7 @@ private constructor(
/**
* Indicates whether the cardholder's browser has the ability to execute JavaScript.
- * Maps to EMV 3DS field browserJavascriptEnabled.
+ * Maps to EMV 3DS field `browserJavascriptEnabled`.
*/
fun javascriptEnabled(javascriptEnabled: Boolean?) =
javascriptEnabled(JsonField.ofNullable(javascriptEnabled))
@@ -5346,7 +5802,7 @@ private constructor(
/**
* Language of the cardholder's browser as defined in IETF BCP47. Maps to EMV 3DS field
- * browserLanguage.
+ * `browserLanguage`.
*/
fun language(language: String?) = language(JsonField.ofNullable(language))
@@ -5365,7 +5821,7 @@ private constructor(
/**
* Time zone of the cardholder's browser offset in minutes between UTC and the
* cardholder browser's local time. The offset is positive if the local time is behind
- * UTC and negative if it is ahead. Maps to EMV 3DS field browserTz.
+ * UTC and negative if it is ahead. Maps to EMV 3DS field `browserTz`.
*/
fun timeZone(timeZone: String?) = timeZone(JsonField.ofNullable(timeZone))
@@ -5381,7 +5837,7 @@ private constructor(
*/
fun timeZone(timeZone: JsonField) = apply { this.timeZone = timeZone }
- /** Content of the HTTP user-agent header. Maps to EMV 3DS field browserUserAgent. */
+ /** Content of the HTTP user-agent header. Maps to EMV 3DS field `browserUserAgent`. */
fun userAgent(userAgent: String?) = userAgent(JsonField.ofNullable(userAgent))
/** Alias for calling [Builder.userAgent] with `userAgent.orElse(null)`. */
@@ -5422,6 +5878,7 @@ private constructor(
*/
fun build(): Browser =
Browser(
+ acceptHeader,
ip,
javaEnabled,
javascriptEnabled,
@@ -5439,6 +5896,7 @@ private constructor(
return@apply
}
+ acceptHeader()
ip()
javaEnabled()
javascriptEnabled()
@@ -5464,7 +5922,8 @@ private constructor(
*/
@JvmSynthetic
internal fun validity(): Int =
- (if (ip.asKnown().isPresent) 1 else 0) +
+ (if (acceptHeader.asKnown().isPresent) 1 else 0) +
+ (if (ip.asKnown().isPresent) 1 else 0) +
(if (javaEnabled.asKnown().isPresent) 1 else 0) +
(if (javascriptEnabled.asKnown().isPresent) 1 else 0) +
(if (language.asKnown().isPresent) 1 else 0) +
@@ -5476,20 +5935,22 @@ private constructor(
return true
}
- return /* spotless:off */ other is Browser && ip == other.ip && javaEnabled == other.javaEnabled && javascriptEnabled == other.javascriptEnabled && language == other.language && timeZone == other.timeZone && userAgent == other.userAgent && additionalProperties == other.additionalProperties /* spotless:on */
+ return /* spotless:off */ other is Browser && acceptHeader == other.acceptHeader && ip == other.ip && javaEnabled == other.javaEnabled && javascriptEnabled == other.javascriptEnabled && language == other.language && timeZone == other.timeZone && userAgent == other.userAgent && additionalProperties == other.additionalProperties /* spotless:on */
}
/* spotless:off */
- private val hashCode: Int by lazy { Objects.hash(ip, javaEnabled, javascriptEnabled, language, timeZone, userAgent, additionalProperties) }
+ private val hashCode: Int by lazy { Objects.hash(acceptHeader, ip, javaEnabled, javascriptEnabled, language, timeZone, userAgent, additionalProperties) }
/* spotless:on */
override fun hashCode(): Int = hashCode
override fun toString() =
- "Browser{ip=$ip, javaEnabled=$javaEnabled, javascriptEnabled=$javascriptEnabled, language=$language, timeZone=$timeZone, userAgent=$userAgent, additionalProperties=$additionalProperties}"
+ "Browser{acceptHeader=$acceptHeader, ip=$ip, javaEnabled=$javaEnabled, javascriptEnabled=$javascriptEnabled, language=$language, timeZone=$timeZone, userAgent=$userAgent, additionalProperties=$additionalProperties}"
}
- /** Metadata about the challenge method and delivery. */
+ /**
+ * Metadata about the challenge method and delivery. Only present when a challenge is triggered.
+ */
class ChallengeMetadata
private constructor(
private val methodType: JsonField,
@@ -5831,7 +6292,10 @@ private constructor(
"ChallengeMetadata{methodType=$methodType, phoneNumber=$phoneNumber, additionalProperties=$additionalProperties}"
}
- /** Entity that orchestrates the challenge. */
+ /**
+ * Entity that orchestrates the challenge. This won't be set for authentications for which a
+ * decision has not yet been made (e.g. in-flight customer decisioning request).
+ */
class ChallengeOrchestratedBy
@JsonCreator
private constructor(private val value: JsonField) : Enum {
@@ -5970,7 +6434,10 @@ private constructor(
override fun toString() = value.toString()
}
- /** Entity that made the authentication decision. */
+ /**
+ * Entity that made the authentication decision. This won't be set for authentications for which
+ * a decision has not yet been made (e.g. in-flight customer decisioning request).
+ */
class DecisionMadeBy @JsonCreator private constructor(private val value: JsonField) :
Enum {
@@ -5986,11 +6453,13 @@ private constructor(
companion object {
- @JvmField val CUSTOMER_ENDPOINT = of("CUSTOMER_ENDPOINT")
+ @JvmField val LITHIC_RULES = of("LITHIC_RULES")
@JvmField val LITHIC_DEFAULT = of("LITHIC_DEFAULT")
- @JvmField val LITHIC_RULES = of("LITHIC_RULES")
+ @JvmField val CUSTOMER_RULES = of("CUSTOMER_RULES")
+
+ @JvmField val CUSTOMER_ENDPOINT = of("CUSTOMER_ENDPOINT")
@JvmField val NETWORK = of("NETWORK")
@@ -6001,9 +6470,10 @@ private constructor(
/** An enum containing [DecisionMadeBy]'s known values. */
enum class Known {
- CUSTOMER_ENDPOINT,
- LITHIC_DEFAULT,
LITHIC_RULES,
+ LITHIC_DEFAULT,
+ CUSTOMER_RULES,
+ CUSTOMER_ENDPOINT,
NETWORK,
UNKNOWN,
}
@@ -6018,9 +6488,10 @@ private constructor(
* - It was constructed with an arbitrary value using the [of] method.
*/
enum class Value {
- CUSTOMER_ENDPOINT,
- LITHIC_DEFAULT,
LITHIC_RULES,
+ LITHIC_DEFAULT,
+ CUSTOMER_RULES,
+ CUSTOMER_ENDPOINT,
NETWORK,
UNKNOWN,
/**
@@ -6039,9 +6510,10 @@ private constructor(
*/
fun value(): Value =
when (this) {
- CUSTOMER_ENDPOINT -> Value.CUSTOMER_ENDPOINT
- LITHIC_DEFAULT -> Value.LITHIC_DEFAULT
LITHIC_RULES -> Value.LITHIC_RULES
+ LITHIC_DEFAULT -> Value.LITHIC_DEFAULT
+ CUSTOMER_RULES -> Value.CUSTOMER_RULES
+ CUSTOMER_ENDPOINT -> Value.CUSTOMER_ENDPOINT
NETWORK -> Value.NETWORK
UNKNOWN -> Value.UNKNOWN
else -> Value._UNKNOWN
@@ -6058,9 +6530,10 @@ private constructor(
*/
fun known(): Known =
when (this) {
- CUSTOMER_ENDPOINT -> Known.CUSTOMER_ENDPOINT
- LITHIC_DEFAULT -> Known.LITHIC_DEFAULT
LITHIC_RULES -> Known.LITHIC_RULES
+ LITHIC_DEFAULT -> Known.LITHIC_DEFAULT
+ CUSTOMER_RULES -> Known.CUSTOMER_RULES
+ CUSTOMER_ENDPOINT -> Known.CUSTOMER_ENDPOINT
NETWORK -> Known.NETWORK
UNKNOWN -> Known.UNKNOWN
else -> throw LithicInvalidDataException("Unknown DecisionMadeBy: $value")
@@ -6119,10 +6592,10 @@ private constructor(
}
/**
- * Type of 3DS Requestor Initiated (3RI) request i.e., a 3DS authentication that takes place at
- * the initiation of the merchant rather than the cardholder. The most common example of this is
- * where a merchant is authenticating before billing for a recurring transaction such as a pay
- * TV subscription or a utility bill. Maps to EMV 3DS field threeRIInd.
+ * Type of 3DS Requestor Initiated (3RI) request — i.e., a 3DS authentication that takes place
+ * at the initiation of the merchant rather than the cardholder. The most common example of this
+ * is where a merchant is authenticating before billing for a recurring transaction such as a
+ * pay TV subscription or a utility bill. Maps to EMV 3DS field `threeRIInd`.
*/
class ThreeRiRequestType
@JsonCreator
@@ -6381,7 +6854,7 @@ private constructor(
/**
* Amount of the purchase in minor units of currency with all punctuation removed. Maps to
- * EMV 3DS field purchaseAmount.
+ * EMV 3DS field `purchaseAmount`.
*
* @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).
@@ -6398,7 +6871,8 @@ private constructor(
fun cardholderAmount(): Optional = cardholderAmount.getOptional("cardholder_amount")
/**
- * Currency of the purchase. Maps to EMV 3DS field purchaseCurrency.
+ * Currency of the purchase. Maps to EMV 3DS field `purchaseCurrency`. Permitted values: ISO
+ * 4217 three-character currency code (e.g., USD).
*
* @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).
@@ -6407,7 +6881,7 @@ private constructor(
/**
* Minor units of currency, as specified in ISO 4217 currency exponent. Maps to EMV 3DS
- * field purchaseExponent.
+ * field `purchaseExponent`.
*
* @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).
@@ -6416,7 +6890,8 @@ private constructor(
/**
* Date and time when the authentication was generated by the merchant/acquirer's 3DS
- * server. Maps to EMV 3DS field purchaseDate.
+ * server. Maps to EMV 3DS field `purchaseDate`. Permitted values: Date string in the ISO
+ * 8601 format yyyy-MM-dd'T'hh:mm:ssZ.
*
* @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).
@@ -6425,7 +6900,7 @@ private constructor(
/**
* Type of the transaction for which a 3DS authentication request is occurring. Maps to EMV
- * 3DS field transType.
+ * 3DS field `transType`.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -6536,7 +7011,7 @@ private constructor(
/**
* Amount of the purchase in minor units of currency with all punctuation removed. Maps
- * to EMV 3DS field purchaseAmount.
+ * to EMV 3DS field `purchaseAmount`.
*/
fun amount(amount: Double) = amount(JsonField.of(amount))
@@ -6581,7 +7056,10 @@ private constructor(
this.cardholderAmount = cardholderAmount
}
- /** Currency of the purchase. Maps to EMV 3DS field purchaseCurrency. */
+ /**
+ * Currency of the purchase. Maps to EMV 3DS field `purchaseCurrency`. Permitted values:
+ * ISO 4217 three-character currency code (e.g., USD).
+ */
fun currency(currency: String) = currency(JsonField.of(currency))
/**
@@ -6595,7 +7073,7 @@ private constructor(
/**
* Minor units of currency, as specified in ISO 4217 currency exponent. Maps to EMV 3DS
- * field purchaseExponent.
+ * field `purchaseExponent`.
*/
fun currencyExponent(currencyExponent: Double) =
currencyExponent(JsonField.of(currencyExponent))
@@ -6613,7 +7091,8 @@ private constructor(
/**
* Date and time when the authentication was generated by the merchant/acquirer's 3DS
- * server. Maps to EMV 3DS field purchaseDate.
+ * server. Maps to EMV 3DS field `purchaseDate`. Permitted values: Date string in the
+ * ISO 8601 format yyyy-MM-dd'T'hh:mm:ssZ.
*/
fun dateTime(dateTime: OffsetDateTime) = dateTime(JsonField.of(dateTime))
@@ -6628,7 +7107,7 @@ private constructor(
/**
* Type of the transaction for which a 3DS authentication request is occurring. Maps to
- * EMV 3DS field transType.
+ * EMV 3DS field `transType`.
*/
fun type(type: Type?) = type(JsonField.ofNullable(type))
@@ -6733,7 +7212,7 @@ private constructor(
/**
* Type of the transaction for which a 3DS authentication request is occurring. Maps to EMV
- * 3DS field transType.
+ * 3DS field `transType`.
*/
class Type @JsonCreator private constructor(private val value: JsonField) : Enum {
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthenticationSimulateResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthenticationSimulateResponse.kt
index 3189d2e43..3303964ab 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthenticationSimulateResponse.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthenticationSimulateResponse.kt
@@ -27,8 +27,7 @@ private constructor(
) : this(token, mutableMapOf())
/**
- * A unique token to reference this transaction with later calls to void or clear the
- * authorization.
+ * Globally unique identifier for the 3DS authentication.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -76,10 +75,7 @@ private constructor(
authenticationSimulateResponse.additionalProperties.toMutableMap()
}
- /**
- * A unique token to reference this transaction with later calls to void or clear the
- * authorization.
- */
+ /** Globally unique identifier for the 3DS authentication. */
fun token(token: String) = token(JsonField.of(token))
/**
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BacktestResults.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BacktestResults.kt
index 3aec6f495..cd0c2fae2 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BacktestResults.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BacktestResults.kt
@@ -6,14 +6,11 @@ import com.fasterxml.jackson.annotation.JsonAnyGetter
import com.fasterxml.jackson.annotation.JsonAnySetter
import com.fasterxml.jackson.annotation.JsonCreator
import com.fasterxml.jackson.annotation.JsonProperty
-import com.lithic.api.core.Enum
import com.lithic.api.core.ExcludeMissing
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.time.OffsetDateTime
import java.util.Collections
@@ -418,760 +415,6 @@ private constructor(
(currentVersion.asKnown().getOrNull()?.validity() ?: 0) +
(draftVersion.asKnown().getOrNull()?.validity() ?: 0)
- class RuleStats
- private constructor(
- private val approved: JsonField,
- private val challenged: JsonField,
- private val declined: JsonField,
- private val examples: JsonField>,
- private val version: JsonField,
- private val additionalProperties: MutableMap,
- ) {
-
- @JsonCreator
- private constructor(
- @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(),
- @JsonProperty("version") @ExcludeMissing version: JsonField = JsonMissing.of(),
- ) : this(approved, challenged, declined, examples, 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.
- *
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if
- * the server responded with an unexpected value).
- */
- fun approved(): Optional = approved.getOptional("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.
- *
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if
- * the server responded with an unexpected value).
- */
- fun challenged(): Optional = challenged.getOptional("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.
- *
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if
- * the server responded with an unexpected value).
- */
- fun declined(): Optional = declined.getOptional("declined")
-
- /**
- * Example events and their outcomes.
- *
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if
- * the server responded with an unexpected value).
- */
- fun examples(): Optional> = examples.getOptional("examples")
-
- /**
- * The version of the rule, this is incremented whenever the rule's parameters change.
- *
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if
- * the server responded with an unexpected value).
- */
- fun version(): Optional = version.getOptional("version")
-
- /**
- * Returns the raw JSON value of [approved].
- *
- * Unlike [approved], this method doesn't throw if the JSON field has an unexpected
- * type.
- */
- @JsonProperty("approved") @ExcludeMissing fun _approved(): JsonField = approved
-
- /**
- * Returns the raw JSON value of [challenged].
- *
- * Unlike [challenged], this method doesn't throw if the JSON field has an unexpected
- * type.
- */
- @JsonProperty("challenged")
- @ExcludeMissing
- fun _challenged(): JsonField = challenged
-
- /**
- * Returns the raw JSON value of [declined].
- *
- * Unlike [declined], this method doesn't throw if the JSON field has an unexpected
- * type.
- */
- @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
-
- /**
- * Returns the raw JSON value of [version].
- *
- * Unlike [version], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("version") @ExcludeMissing fun _version(): JsonField = version
-
- @JsonAnySetter
- private fun putAdditionalProperty(key: String, value: JsonValue) {
- additionalProperties.put(key, value)
- }
-
- @JsonAnyGetter
- @ExcludeMissing
- fun _additionalProperties(): Map =
- Collections.unmodifiableMap(additionalProperties)
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /** Returns a mutable builder for constructing an instance of [RuleStats]. */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [RuleStats]. */
- class Builder internal constructor() {
-
- private var approved: JsonField = JsonMissing.of()
- private var challenged: JsonField = JsonMissing.of()
- private var declined: JsonField = JsonMissing.of()
- private var examples: JsonField>? = null
- private var version: JsonField = JsonMissing.of()
- private var additionalProperties: MutableMap = mutableMapOf()
-
- @JvmSynthetic
- internal fun from(ruleStats: RuleStats) = apply {
- approved = ruleStats.approved
- challenged = ruleStats.challenged
- declined = ruleStats.declined
- examples = ruleStats.examples.map { it.toMutableList() }
- version = ruleStats.version
- additionalProperties = ruleStats.additionalProperties.toMutableMap()
- }
-
- /**
- * 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.
- */
- 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.
- */
- 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.
- */
- 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.
- */
- 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.
- */
- 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.
- */
- fun declined(declined: JsonField) = apply { this.declined = declined }
-
- /** Example events and their outcomes. */
- fun examples(examples: List) = examples(JsonField.of(examples))
-
- /**
- * Sets [Builder.examples] to an arbitrary JSON value.
- *
- * You should usually call [Builder.examples] with a well-typed `List`
- * value instead. This method is primarily for setting the field to an undocumented
- * or not yet supported value.
- */
- fun examples(examples: JsonField>) = apply {
- this.examples = examples.map { it.toMutableList() }
- }
-
- /**
- * Adds a single [Example] to [examples].
- *
- * @throws IllegalStateException if the field was previously set to a non-list.
- */
- fun addExample(example: Example) = apply {
- examples =
- (examples ?: JsonField.of(mutableListOf())).also {
- checkKnown("examples", it).add(example)
- }
- }
-
- /**
- * The version of the rule, this is incremented whenever the rule's parameters
- * change.
- */
- 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)
- }
-
- fun putAdditionalProperty(key: String, value: JsonValue) = apply {
- additionalProperties.put(key, value)
- }
-
- fun putAllAdditionalProperties(additionalProperties: Map) =
- apply {
- this.additionalProperties.putAll(additionalProperties)
- }
-
- fun removeAdditionalProperty(key: String) = apply {
- additionalProperties.remove(key)
- }
-
- fun removeAllAdditionalProperties(keys: Set) = apply {
- keys.forEach(::removeAdditionalProperty)
- }
-
- /**
- * Returns an immutable instance of [RuleStats].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- */
- fun build(): RuleStats =
- RuleStats(
- approved,
- challenged,
- declined,
- (examples ?: JsonMissing.of()).map { it.toImmutable() },
- version,
- additionalProperties.toMutableMap(),
- )
- }
-
- private var validated: Boolean = false
-
- fun validate(): RuleStats = apply {
- if (validated) {
- return@apply
- }
-
- approved()
- challenged()
- declined()
- examples().ifPresent { it.forEach { it.validate() } }
- version()
- 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 (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) +
- (if (version.asKnown().isPresent) 1 else 0)
-
- class Example
- private constructor(
- private val approved: JsonField,
- private val decision: JsonField,
- private val eventToken: JsonField,
- private val timestamp: JsonField,
- private val additionalProperties: MutableMap,
- ) {
-
- @JsonCreator
- private constructor(
- @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(approved, decision, eventToken, timestamp, mutableMapOf())
-
- /**
- * 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).
- */
- fun approved(): Optional = approved.getOptional("approved")
-
- /**
- * The decision made by the rule for this event.
- *
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g.
- * if the server responded with an unexpected value).
- */
- fun decision(): Optional = decision.getOptional("decision")
-
- /**
- * The event token.
- *
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g.
- * if the server responded with an unexpected value).
- */
- fun eventToken(): Optional = eventToken.getOptional("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).
- */
- fun timestamp(): Optional = timestamp.getOptional("timestamp")
-
- /**
- * Returns the raw JSON value of [approved].
- *
- * Unlike [approved], this method doesn't throw if the JSON field has an unexpected
- * type.
- */
- @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.
- */
- @JsonProperty("decision")
- @ExcludeMissing
- fun _decision(): JsonField = decision
-
- /**
- * Returns the raw JSON value of [eventToken].
- *
- * Unlike [eventToken], this method doesn't throw if the JSON field has an
- * unexpected type.
- */
- @JsonProperty("event_token")
- @ExcludeMissing
- fun _eventToken(): JsonField = eventToken
-
- /**
- * Returns the raw JSON value of [timestamp].
- *
- * Unlike [timestamp], this method doesn't throw if the JSON field has an unexpected
- * type.
- */
- @JsonProperty("timestamp")
- @ExcludeMissing
- fun _timestamp(): JsonField = timestamp
-
- @JsonAnySetter
- private fun putAdditionalProperty(key: String, value: JsonValue) {
- additionalProperties.put(key, value)
- }
-
- @JsonAnyGetter
- @ExcludeMissing
- fun _additionalProperties(): Map =
- Collections.unmodifiableMap(additionalProperties)
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /** Returns a mutable builder for constructing an instance of [Example]. */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [Example]. */
- class Builder internal constructor() {
-
- 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 additionalProperties: MutableMap = mutableMapOf()
-
- @JvmSynthetic
- internal fun from(example: Example) = apply {
- approved = example.approved
- decision = example.decision
- eventToken = example.eventToken
- timestamp = example.timestamp
- additionalProperties = example.additionalProperties.toMutableMap()
- }
-
- /** Whether the rule would have approved the request. */
- 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.
- */
- fun approved(approved: JsonField) = apply { this.approved = approved }
-
- /** The decision made by the rule for this event. */
- 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.
- */
- fun decision(decision: JsonField) = apply { this.decision = decision }
-
- /** The event token. */
- fun eventToken(eventToken: String) = eventToken(JsonField.of(eventToken))
-
- /**
- * Sets [Builder.eventToken] to an arbitrary JSON value.
- *
- * You should usually call [Builder.eventToken] with a well-typed [String] value
- * instead. This method is primarily for setting the field to an undocumented or
- * not yet supported value.
- */
- fun eventToken(eventToken: JsonField) = apply {
- this.eventToken = eventToken
- }
-
- /** The timestamp of the event. */
- fun timestamp(timestamp: OffsetDateTime) = timestamp(JsonField.of(timestamp))
-
- /**
- * Sets [Builder.timestamp] to an arbitrary JSON value.
- *
- * You should usually call [Builder.timestamp] with a well-typed
- * [OffsetDateTime] value instead. This method is primarily for setting the
- * field to an undocumented or not yet supported value.
- */
- fun timestamp(timestamp: JsonField) = apply {
- this.timestamp = timestamp
- }
-
- fun additionalProperties(additionalProperties: Map) = apply {
- this.additionalProperties.clear()
- putAllAdditionalProperties(additionalProperties)
- }
-
- fun putAdditionalProperty(key: String, value: JsonValue) = apply {
- additionalProperties.put(key, value)
- }
-
- fun putAllAdditionalProperties(additionalProperties: Map) =
- apply {
- this.additionalProperties.putAll(additionalProperties)
- }
-
- fun removeAdditionalProperty(key: String) = apply {
- additionalProperties.remove(key)
- }
-
- fun removeAllAdditionalProperties(keys: Set) = apply {
- keys.forEach(::removeAdditionalProperty)
- }
-
- /**
- * Returns an immutable instance of [Example].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- */
- fun build(): Example =
- Example(
- approved,
- decision,
- eventToken,
- timestamp,
- additionalProperties.toMutableMap(),
- )
- }
-
- private var validated: Boolean = false
-
- fun validate(): Example = apply {
- if (validated) {
- return@apply
- }
-
- approved()
- decision().ifPresent { it.validate() }
- eventToken()
- timestamp()
- 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 (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)
-
- /** The decision made by the rule for this event. */
- class Decision
- @JsonCreator
- private constructor(private val value: JsonField) : Enum {
-
- /**
- * Returns this class instance's raw value.
- *
- * This is usually only useful if this instance was deserialized from data that
- * doesn't match any known member, and you want to know that value. For example,
- * if the SDK is on an older version than the API, then the API may respond with
- * new members that the SDK is unaware of.
- */
- @com.fasterxml.jackson.annotation.JsonValue
- fun _value(): JsonField = value
-
- companion object {
-
- @JvmField val APPROVED = of("APPROVED")
-
- @JvmField val DECLINED = of("DECLINED")
-
- @JvmField val CHALLENGED = of("CHALLENGED")
-
- @JvmStatic fun of(value: String) = Decision(JsonField.of(value))
- }
-
- /** An enum containing [Decision]'s known values. */
- enum class Known {
- APPROVED,
- DECLINED,
- CHALLENGED,
- }
-
- /**
- * 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,
- }
-
- /**
- * 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
- }
-
- /**
- * 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")
- }
-
- /**
- * Returns this class instance's primitive wire representation.
- *
- * This differs from the [toString] method because that method is primarily for
- * debugging and generally doesn't throw.
- *
- * @throws LithicInvalidDataException if this class instance's value does not
- * have the expected primitive type.
- */
- fun asString(): String =
- _value().asString().orElseThrow {
- LithicInvalidDataException("Value is not a String")
- }
-
- private var validated: Boolean = false
-
- fun validate(): Decision = apply {
- if (validated) {
- return@apply
- }
-
- known()
- validated = true
- }
-
- fun isValid(): Boolean =
- try {
- validate()
- true
- } catch (e: LithicInvalidDataException) {
- false
- }
-
- /**
- * Returns a score indicating how many valid values are contained in this object
- * recursively.
- *
- * Used for best match union deserialization.
- */
- @JvmSynthetic
- internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return /* spotless:off */ other is Decision && value == other.value /* spotless:on */
- }
-
- override fun hashCode() = value.hashCode()
-
- override fun toString() = value.toString()
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return /* spotless:off */ other is Example && approved == other.approved && decision == other.decision && eventToken == other.eventToken && timestamp == other.timestamp && additionalProperties == other.additionalProperties /* spotless:on */
- }
-
- /* spotless:off */
- private val hashCode: Int by lazy { Objects.hash(approved, decision, eventToken, timestamp, additionalProperties) }
- /* spotless:on */
-
- override fun hashCode(): Int = hashCode
-
- override fun toString() =
- "Example{approved=$approved, decision=$decision, eventToken=$eventToken, timestamp=$timestamp, additionalProperties=$additionalProperties}"
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return /* spotless:off */ other is RuleStats && approved == other.approved && challenged == other.challenged && declined == other.declined && examples == other.examples && version == other.version && additionalProperties == other.additionalProperties /* spotless:on */
- }
-
- /* spotless:off */
- private val hashCode: Int by lazy { Objects.hash(approved, challenged, declined, examples, version, additionalProperties) }
- /* spotless:on */
-
- override fun hashCode(): Int = hashCode
-
- override fun toString() =
- "RuleStats{approved=$approved, challenged=$challenged, declined=$declined, examples=$examples, version=$version, additionalProperties=$additionalProperties}"
- }
-
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Card.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Card.kt
index 256962e99..5b25db8d6 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Card.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Card.kt
@@ -31,7 +31,7 @@ private constructor(
private val lastFour: JsonField,
private val pinStatus: JsonField,
private val spendLimit: JsonField,
- private val spendLimitDuration: JsonField,
+ private val spendLimitDuration: JsonField,
private val state: JsonField,
private val type: JsonField,
private val authRuleTokens: JsonField>,
@@ -71,7 +71,7 @@ private constructor(
@JsonProperty("spend_limit") @ExcludeMissing spendLimit: JsonField = JsonMissing.of(),
@JsonProperty("spend_limit_duration")
@ExcludeMissing
- spendLimitDuration: JsonField = JsonMissing.of(),
+ spendLimitDuration: JsonField = JsonMissing.of(),
@JsonProperty("state")
@ExcludeMissing
state: JsonField = JsonMissing.of(),
@@ -216,12 +216,20 @@ private constructor(
fun spendLimit(): Long = spendLimit.getRequired("spend_limit")
/**
- * Spend limit duration
+ * Spend limit duration values:
+ * - `ANNUALLY` - Card will authorize transactions up to spend limit for the trailing year.
+ * - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime of the card.
+ * - `MONTHLY` - Card will authorize transactions up to spend limit for the trailing month. 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.
+ * - `TRANSACTION` - Card will authorize multiple transactions if each individual transaction is
+ * under the spend limit.
*
* @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(): NonPciCard.SpendLimitDuration =
+ fun spendLimitDuration(): SpendLimitDuration =
spendLimitDuration.getRequired("spend_limit_duration")
/**
@@ -440,7 +448,7 @@ private constructor(
*/
@JsonProperty("spend_limit_duration")
@ExcludeMissing
- fun _spendLimitDuration(): JsonField = spendLimitDuration
+ fun _spendLimitDuration(): JsonField = spendLimitDuration
/**
* Returns the raw JSON value of [state].
@@ -599,7 +607,7 @@ private constructor(
private var lastFour: JsonField? = null
private var pinStatus: JsonField? = null
private var spendLimit: JsonField? = null
- private var spendLimitDuration: JsonField? = null
+ private var spendLimitDuration: JsonField? = null
private var state: JsonField? = null
private var type: JsonField? = null
private var authRuleTokens: JsonField>? = null
@@ -752,21 +760,31 @@ private constructor(
*/
fun spendLimit(spendLimit: JsonField) = apply { this.spendLimit = spendLimit }
- /** Spend limit duration */
- fun spendLimitDuration(spendLimitDuration: NonPciCard.SpendLimitDuration) =
+ /**
+ * Spend limit duration values:
+ * - `ANNUALLY` - Card will authorize transactions up to spend limit for the trailing year.
+ * - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime of the
+ * card.
+ * - `MONTHLY` - Card will authorize transactions up to spend limit for the trailing month.
+ * 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.
+ * - `TRANSACTION` - Card will authorize multiple transactions if each individual
+ * transaction is under the spend limit.
+ */
+ fun spendLimitDuration(spendLimitDuration: SpendLimitDuration) =
spendLimitDuration(JsonField.of(spendLimitDuration))
/**
* Sets [Builder.spendLimitDuration] to an arbitrary JSON value.
*
* You should usually call [Builder.spendLimitDuration] with a well-typed
- * [NonPciCard.SpendLimitDuration] value instead. This method is primarily for setting the
- * field to an undocumented or not yet supported value.
+ * [SpendLimitDuration] value instead. This method is primarily for setting the field to an
+ * undocumented or not yet supported value.
*/
- fun spendLimitDuration(spendLimitDuration: JsonField) =
- apply {
- this.spendLimitDuration = spendLimitDuration
- }
+ fun spendLimitDuration(spendLimitDuration: JsonField) = apply {
+ this.spendLimitDuration = spendLimitDuration
+ }
/**
* Card state values: _ `CLOSED` - Card will no longer approve authorizations. Closing a
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 793858d8a..7b9014c5a 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
@@ -73,9 +73,11 @@ private constructor(
* - `STANDARD` - USPS regular mail or similar international option, with no tracking
* - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with tracking
* - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
- * - `EXPRESS` - FedEx Express, 3-day shipping, with tracking
- * - `2_DAY` - FedEx 2-day shipping, with tracking
- * - `EXPEDITED` - FedEx Standard Overnight or similar international option, with tracking
+ * - `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping, with
+ * tracking
+ * - `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
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -214,9 +216,11 @@ private constructor(
* - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with
* tracking
* - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
- * - `EXPRESS` - FedEx Express, 3-day shipping, with tracking
- * - `2_DAY` - FedEx 2-day shipping, with tracking
- * - `EXPEDITED` - FedEx Standard Overnight or similar international option, with tracking
+ * - `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping, with
+ * tracking
+ * - `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
*/
fun shippingMethod(shippingMethod: ShippingMethod) = apply {
body.shippingMethod(shippingMethod)
@@ -439,9 +443,11 @@ private constructor(
* - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with
* tracking
* - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
- * - `EXPRESS` - FedEx Express, 3-day shipping, with tracking
- * - `2_DAY` - FedEx 2-day shipping, with tracking
- * - `EXPEDITED` - FedEx Standard Overnight or similar international option, with tracking
+ * - `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping, with
+ * tracking
+ * - `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
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -576,10 +582,12 @@ private constructor(
* - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with
* tracking
* - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
- * - `EXPRESS` - FedEx Express, 3-day shipping, with tracking
- * - `2_DAY` - FedEx 2-day shipping, with tracking
- * - `EXPEDITED` - FedEx Standard Overnight or similar international option, with
+ * - `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping,
+ * with tracking
+ * - `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
*/
fun shippingMethod(shippingMethod: ShippingMethod) =
shippingMethod(JsonField.of(shippingMethod))
@@ -695,9 +703,11 @@ private constructor(
* - `STANDARD` - USPS regular mail or similar international option, with no tracking
* - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with tracking
* - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
- * - `EXPRESS` - FedEx Express, 3-day shipping, with tracking
- * - `2_DAY` - FedEx 2-day shipping, with tracking
- * - `EXPEDITED` - FedEx Standard Overnight or similar international option, with tracking
+ * - `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping, with
+ * tracking
+ * - `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
*/
class ShippingMethod @JsonCreator private constructor(private val value: JsonField) :
Enum {
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 e5bad2919..c3cff84b3 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
@@ -170,9 +170,11 @@ private constructor(
* - `STANDARD` - USPS regular mail or similar international option, with no tracking
* - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with tracking
* - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
- * - `EXPRESS` - FedEx Express, 3-day shipping, with tracking
- * - `2_DAY` - FedEx 2-day shipping, with tracking
- * - `EXPEDITED` - FedEx Standard Overnight or similar international option, with tracking
+ * - `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping, with
+ * tracking
+ * - `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
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -616,9 +618,11 @@ private constructor(
* - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with
* tracking
* - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
- * - `EXPRESS` - FedEx Express, 3-day shipping, with tracking
- * - `2_DAY` - FedEx 2-day shipping, with tracking
- * - `EXPEDITED` - FedEx Standard Overnight or similar international option, with tracking
+ * - `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping, with
+ * tracking
+ * - `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
*/
fun shippingMethod(shippingMethod: ShippingMethod) = apply {
body.shippingMethod(shippingMethod)
@@ -1061,9 +1065,11 @@ private constructor(
* - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with
* tracking
* - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
- * - `EXPRESS` - FedEx Express, 3-day shipping, with tracking
- * - `2_DAY` - FedEx 2-day shipping, with tracking
- * - `EXPEDITED` - FedEx Standard Overnight or similar international option, with tracking
+ * - `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping, with
+ * tracking
+ * - `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
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -1555,10 +1561,12 @@ private constructor(
* - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with
* tracking
* - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
- * - `EXPRESS` - FedEx Express, 3-day shipping, with tracking
- * - `2_DAY` - FedEx 2-day shipping, with tracking
- * - `EXPEDITED` - FedEx Standard Overnight or similar international option, with
+ * - `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping,
+ * with tracking
+ * - `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
*/
fun shippingMethod(shippingMethod: ShippingMethod) =
shippingMethod(JsonField.of(shippingMethod))
@@ -1938,9 +1946,11 @@ private constructor(
* - `STANDARD` - USPS regular mail or similar international option, with no tracking
* - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with tracking
* - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
- * - `EXPRESS` - FedEx Express, 3-day shipping, with tracking
- * - `2_DAY` - FedEx 2-day shipping, with tracking
- * - `EXPEDITED` - FedEx Standard Overnight or similar international option, with tracking
+ * - `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping, with
+ * tracking
+ * - `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
*/
class ShippingMethod @JsonCreator private constructor(private val value: JsonField) :
Enum {
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 51fd38d43..cd2235e19 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
@@ -68,9 +68,11 @@ private constructor(
* - `STANDARD` - USPS regular mail or similar international option, with no tracking
* - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with tracking
* - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
- * - `EXPRESS` - FedEx Express, 3-day shipping, with tracking
- * - `2_DAY` - FedEx 2-day shipping, with tracking
- * - `EXPEDITED` - FedEx Standard Overnight or similar international option, with tracking
+ * - `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping, with
+ * tracking
+ * - `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
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -204,9 +206,11 @@ private constructor(
* - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with
* tracking
* - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
- * - `EXPRESS` - FedEx Express, 3-day shipping, with tracking
- * - `2_DAY` - FedEx 2-day shipping, with tracking
- * - `EXPEDITED` - FedEx Standard Overnight or similar international option, with tracking
+ * - `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping, with
+ * tracking
+ * - `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
*/
fun shippingMethod(shippingMethod: ShippingMethod) = apply {
body.shippingMethod(shippingMethod)
@@ -423,9 +427,11 @@ private constructor(
* - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with
* tracking
* - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
- * - `EXPRESS` - FedEx Express, 3-day shipping, with tracking
- * - `2_DAY` - FedEx 2-day shipping, with tracking
- * - `EXPEDITED` - FedEx Standard Overnight or similar international option, with tracking
+ * - `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping, with
+ * tracking
+ * - `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
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -553,10 +559,12 @@ private constructor(
* - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with
* tracking
* - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
- * - `EXPRESS` - FedEx Express, 3-day shipping, with tracking
- * - `2_DAY` - FedEx 2-day shipping, with tracking
- * - `EXPEDITED` - FedEx Standard Overnight or similar international option, with
+ * - `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping,
+ * with tracking
+ * - `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
*/
fun shippingMethod(shippingMethod: ShippingMethod) =
shippingMethod(JsonField.of(shippingMethod))
@@ -665,9 +673,11 @@ private constructor(
* - `STANDARD` - USPS regular mail or similar international option, with no tracking
* - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with tracking
* - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
- * - `EXPRESS` - FedEx Express, 3-day shipping, with tracking
- * - `2_DAY` - FedEx 2-day shipping, with tracking
- * - `EXPEDITED` - FedEx Standard Overnight or similar international option, with tracking
+ * - `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping, with
+ * tracking
+ * - `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
*/
class ShippingMethod @JsonCreator private constructor(private val value: JsonField) :
Enum {
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 977a83588..4c0e23040 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
@@ -90,9 +90,11 @@ private constructor(
* - `STANDARD` - USPS regular mail or similar international option, with no tracking
* - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with tracking
* - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
- * - `EXPRESS` - FedEx Express, 3-day shipping, with tracking
- * - `2_DAY` - FedEx 2-day shipping, with tracking
- * - `EXPEDITED` - FedEx Standard Overnight or similar international option, with tracking
+ * - `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping, with
+ * tracking
+ * - `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
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -275,9 +277,11 @@ private constructor(
* - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with
* tracking
* - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
- * - `EXPRESS` - FedEx Express, 3-day shipping, with tracking
- * - `2_DAY` - FedEx 2-day shipping, with tracking
- * - `EXPEDITED` - FedEx Standard Overnight or similar international option, with tracking
+ * - `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping, with
+ * tracking
+ * - `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
*/
fun shippingMethod(shippingMethod: ShippingMethod) = apply {
body.shippingMethod(shippingMethod)
@@ -532,9 +536,11 @@ private constructor(
* - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with
* tracking
* - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
- * - `EXPRESS` - FedEx Express, 3-day shipping, with tracking
- * - `2_DAY` - FedEx 2-day shipping, with tracking
- * - `EXPEDITED` - FedEx Standard Overnight or similar international option, with tracking
+ * - `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping, with
+ * tracking
+ * - `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
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -717,10 +723,12 @@ private constructor(
* - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with
* tracking
* - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
- * - `EXPRESS` - FedEx Express, 3-day shipping, with tracking
- * - `2_DAY` - FedEx 2-day shipping, with tracking
- * - `EXPEDITED` - FedEx Standard Overnight or similar international option, with
+ * - `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping,
+ * with tracking
+ * - `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
*/
fun shippingMethod(shippingMethod: ShippingMethod) =
shippingMethod(JsonField.of(shippingMethod))
@@ -842,9 +850,11 @@ private constructor(
* - `STANDARD` - USPS regular mail or similar international option, with no tracking
* - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with tracking
* - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
- * - `EXPRESS` - FedEx Express, 3-day shipping, with tracking
- * - `2_DAY` - FedEx 2-day shipping, with tracking
- * - `EXPEDITED` - FedEx Standard Overnight or similar international option, with tracking
+ * - `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping, with
+ * tracking
+ * - `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
*/
class ShippingMethod @JsonCreator private constructor(private val value: JsonField) :
Enum {
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ChallengeResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ChallengeResponse.kt
index bbf58c301..1070a9537 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ChallengeResponse.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ChallengeResponse.kt
@@ -16,6 +16,7 @@ import java.util.Collections
import java.util.Objects
import kotlin.jvm.optionals.getOrNull
+/** Response from Card Program to a 3DS Authentication challenge */
class ChallengeResponse
private constructor(
private val token: JsonField,
@@ -32,9 +33,8 @@ private constructor(
) : this(token, challengeResponse, mutableMapOf())
/**
- * Globally unique identifier for the 3DS authentication. This token is sent as part of the
- * initial 3DS Decisioning Request and as part of the 3DS Challenge Event in the
- * [ThreeDSAuthentication](#/components/schemas/ThreeDSAuthentication) object
+ * Globally unique identifier for 3DS Authentication that resulted in PENDING_CHALLENGE
+ * authentication result.
*
* @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).
@@ -42,7 +42,7 @@ private constructor(
fun token(): String = token.getRequired("token")
/**
- * Whether the Cardholder has Approved or Declined the issued Challenge
+ * Whether the Cardholder has approved or declined the issued Challenge
*
* @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).
@@ -107,9 +107,8 @@ private constructor(
}
/**
- * Globally unique identifier for the 3DS authentication. This token is sent as part of the
- * initial 3DS Decisioning Request and as part of the 3DS Challenge Event in the
- * [ThreeDSAuthentication](#/components/schemas/ThreeDSAuthentication) object
+ * Globally unique identifier for 3DS Authentication that resulted in PENDING_CHALLENGE
+ * authentication result.
*/
fun token(token: String) = token(JsonField.of(token))
@@ -121,7 +120,7 @@ private constructor(
*/
fun token(token: JsonField) = apply { this.token = token }
- /** Whether the Cardholder has Approved or Declined the issued Challenge */
+ /** Whether the Cardholder has approved or declined the issued Challenge */
fun challengeResponse(challengeResponse: ChallengeResult) =
challengeResponse(JsonField.of(challengeResponse))
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ChallengeResult.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ChallengeResult.kt
index fbdce2602..0b719a058 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ChallengeResult.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ChallengeResult.kt
@@ -7,7 +7,7 @@ import com.lithic.api.core.Enum
import com.lithic.api.core.JsonField
import com.lithic.api.errors.LithicInvalidDataException
-/** Whether the Cardholder has Approved or Declined the issued Challenge */
+/** Whether the Cardholder has approved or declined the issued Challenge */
class ChallengeResult @JsonCreator private constructor(private val value: JsonField) :
Enum {
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateParams.kt
index 7808a9f8c..991fefbaf 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateParams.kt
@@ -105,6 +105,10 @@ private constructor(
fun body(externallyVerified: Body.ExternallyVerifiedCreateBankAccountApiRequest) =
body(Body.ofExternallyVerified(externallyVerified))
+ /** Alias for calling [body] with `Body.ofUnverified(unverified)`. */
+ fun body(unverified: Body.UnverifiedCreateBankAccountApiRequest) =
+ body(Body.ofUnverified(unverified))
+
fun additionalHeaders(additionalHeaders: Headers) = apply {
this.additionalHeaders.clear()
putAllAdditionalHeaders(additionalHeaders)
@@ -231,6 +235,7 @@ private constructor(
null,
private val plaidCreateBankAccountApiRequest: PlaidCreateBankAccountApiRequest? = null,
private val externallyVerified: ExternallyVerifiedCreateBankAccountApiRequest? = null,
+ private val unverified: UnverifiedCreateBankAccountApiRequest? = null,
private val _json: JsonValue? = null,
) {
@@ -244,6 +249,9 @@ private constructor(
fun externallyVerified(): Optional