diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index d61779f3c..d3dc9f51b 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.114.0"
+ ".": "0.115.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 3f808b063..ddb484b7e 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 176
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-abe6a4f82f696099fa8ecb1cc44f08979e17d56578ae7ea68b0e9182e21df508.yml
-openapi_spec_hash: d2ce51592a9a234c6f34a1168a31f91f
-config_hash: 739714a3fead0b26ee3a3b7bc51081f6
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-4ecc06edca2cfad4eaf11573611e89823fda5f56370bac5cd02a498a6b277d09.yml
+openapi_spec_hash: 8f4a30bec4348cbde85b1e65bef9189a
+config_hash: 9dddee5f7af579864599849cb28a0770
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8d4795f3d..c879280ae 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,34 @@
# Changelog
+## 0.115.0 (2026-01-08)
+
+Full Changelog: [v0.114.0...v0.115.0](https://github.com/lithic-com/lithic-java/compare/v0.114.0...v0.115.0)
+
+### Features
+
+* **api:** Add card state attribute to tokenization rules ([5d8ec28](https://github.com/lithic-com/lithic-java/commit/5d8ec284129e2b4440938ce752c6556701f4b394))
+* **api:** Add event_type to ASA request and 3DS decisioning request ([5d8ec28](https://github.com/lithic-com/lithic-java/commit/5d8ec284129e2b4440938ce752c6556701f4b394))
+* **api:** add external_id to payment_event ([7e8636d](https://github.com/lithic-com/lithic-java/commit/7e8636dfea36aff2e4bebc432f3d89375c2da25e))
+* **api:** add get /v1/transfer_limits endpoint ([7e8636d](https://github.com/lithic-com/lithic-java/commit/7e8636dfea36aff2e4bebc432f3d89375c2da25e))
+* **api:** add post /v1/book_transfers/{book_transfer_token}/retry endpoint ([7e8636d](https://github.com/lithic-com/lithic-java/commit/7e8636dfea36aff2e4bebc432f3d89375c2da25e))
+* **api:** Add user defined status to ledger accounts ([5d8ec28](https://github.com/lithic-com/lithic-java/commit/5d8ec284129e2b4440938ce752c6556701f4b394))
+* **api:** add WIRE_DRAWDOWN_REQUEST transfer type ([7d05a12](https://github.com/lithic-com/lithic-java/commit/7d05a12c19b115f9b3a7f7c410523e04c7a4c3c6))
+* **api:** Expose Payment Allocation Details ([5d8ec28](https://github.com/lithic-com/lithic-java/commit/5d8ec284129e2b4440938ce752c6556701f4b394))
+* **api:** remove unnecessary X-Lithic-Pagination header ([7d05a12](https://github.com/lithic-com/lithic-java/commit/7d05a12c19b115f9b3a7f7c410523e04c7a4c3c6))
+* **api:** remove v1/aggregate_balances and related models ([5af17d0](https://github.com/lithic-com/lithic-java/commit/5af17d0a2f9d70199ff755fffef3b5ef7f23ab41))
+* **client:** add `HttpRequest#url()` method ([fe27f93](https://github.com/lithic-com/lithic-java/commit/fe27f930f542aa2d772821f968923c9a341b081a))
+
+
+### Chores
+
+* update code formatting ([5d8ec28](https://github.com/lithic-com/lithic-java/commit/5d8ec284129e2b4440938ce752c6556701f4b394))
+
+
+### Documentation
+
+* **api:** clarify description of token / retry_token when it serves as idempotency key ([7d05a12](https://github.com/lithic-com/lithic-java/commit/7d05a12c19b115f9b3a7f7c410523e04c7a4c3c6))
+* Update language for Google Web Push Provisioning docs ([5d8ec28](https://github.com/lithic-com/lithic-java/commit/5d8ec284129e2b4440938ce752c6556701f4b394))
+
## 0.114.0 (2025-12-11)
Full Changelog: [v0.113.0...v0.114.0](https://github.com/lithic-com/lithic-java/compare/v0.113.0...v0.114.0)
diff --git a/LICENSE b/LICENSE
index 06eee64e8..9410347b2 100644
--- a/LICENSE
+++ b/LICENSE
@@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
- Copyright 2025 Lithic
+ Copyright 2026 Lithic
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/README.md b/README.md
index 0fa561515..234c6d0f2 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.114.0)
-[](https://javadoc.io/doc/com.lithic.api/lithic-java/0.114.0)
+[](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.115.0)
+[](https://javadoc.io/doc/com.lithic.api/lithic-java/0.115.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.114.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.115.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.114.0")
+implementation("com.lithic.api:lithic-java:0.115.0")
```
### Maven
@@ -33,7 +33,7 @@ implementation("com.lithic.api:lithic-java:0.114.0")
com.lithic.api
lithic-java
- 0.114.0
+ 0.115.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index ec3bd95e1..1c30b48af 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.lithic.api"
- version = "0.114.0" // x-release-please-version
+ version = "0.115.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 eb7b7ff11..5c62db05a 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
@@ -11,7 +11,6 @@ import com.lithic.api.models.ClientApiStatusParams
import com.lithic.api.services.blocking.AccountActivityService
import com.lithic.api.services.blocking.AccountHolderService
import com.lithic.api.services.blocking.AccountService
-import com.lithic.api.services.blocking.AggregateBalanceService
import com.lithic.api.services.blocking.AuthRuleService
import com.lithic.api.services.blocking.AuthStreamEnrollmentService
import com.lithic.api.services.blocking.BalanceService
@@ -39,6 +38,7 @@ import com.lithic.api.services.blocking.ThreeDSService
import com.lithic.api.services.blocking.TokenizationDecisioningService
import com.lithic.api.services.blocking.TokenizationService
import com.lithic.api.services.blocking.TransactionService
+import com.lithic.api.services.blocking.TransferLimitService
import com.lithic.api.services.blocking.TransferService
import com.lithic.api.services.blocking.WebhookService
import java.util.function.Consumer
@@ -97,8 +97,6 @@ interface LithicClient {
fun balances(): BalanceService
- fun aggregateBalances(): AggregateBalanceService
-
fun disputes(): DisputeService
fun disputesV2(): DisputesV2Service
@@ -143,6 +141,8 @@ interface LithicClient {
fun accountActivity(): AccountActivityService
+ fun transferLimits(): TransferLimitService
+
fun webhooks(): WebhookService
/** Status of api */
@@ -203,8 +203,6 @@ interface LithicClient {
fun balances(): BalanceService.WithRawResponse
- fun aggregateBalances(): AggregateBalanceService.WithRawResponse
-
fun disputes(): DisputeService.WithRawResponse
fun disputesV2(): DisputesV2Service.WithRawResponse
@@ -249,6 +247,8 @@ interface LithicClient {
fun accountActivity(): AccountActivityService.WithRawResponse
+ fun transferLimits(): TransferLimitService.WithRawResponse
+
fun webhooks(): WebhookService.WithRawResponse
/**
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 982132d5b..720abfe67 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
@@ -10,7 +10,6 @@ import com.lithic.api.models.ClientApiStatusParams
import com.lithic.api.services.async.AccountActivityServiceAsync
import com.lithic.api.services.async.AccountHolderServiceAsync
import com.lithic.api.services.async.AccountServiceAsync
-import com.lithic.api.services.async.AggregateBalanceServiceAsync
import com.lithic.api.services.async.AuthRuleServiceAsync
import com.lithic.api.services.async.AuthStreamEnrollmentServiceAsync
import com.lithic.api.services.async.BalanceServiceAsync
@@ -38,6 +37,7 @@ import com.lithic.api.services.async.ThreeDSServiceAsync
import com.lithic.api.services.async.TokenizationDecisioningServiceAsync
import com.lithic.api.services.async.TokenizationServiceAsync
import com.lithic.api.services.async.TransactionServiceAsync
+import com.lithic.api.services.async.TransferLimitServiceAsync
import com.lithic.api.services.async.TransferServiceAsync
import com.lithic.api.services.async.WebhookServiceAsync
import java.util.concurrent.CompletableFuture
@@ -97,8 +97,6 @@ interface LithicClientAsync {
fun balances(): BalanceServiceAsync
- fun aggregateBalances(): AggregateBalanceServiceAsync
-
fun disputes(): DisputeServiceAsync
fun disputesV2(): DisputesV2ServiceAsync
@@ -143,6 +141,8 @@ interface LithicClientAsync {
fun accountActivity(): AccountActivityServiceAsync
+ fun transferLimits(): TransferLimitServiceAsync
+
fun webhooks(): WebhookServiceAsync
/** Status of api */
@@ -206,8 +206,6 @@ interface LithicClientAsync {
fun balances(): BalanceServiceAsync.WithRawResponse
- fun aggregateBalances(): AggregateBalanceServiceAsync.WithRawResponse
-
fun disputes(): DisputeServiceAsync.WithRawResponse
fun disputesV2(): DisputesV2ServiceAsync.WithRawResponse
@@ -252,6 +250,8 @@ interface LithicClientAsync {
fun accountActivity(): AccountActivityServiceAsync.WithRawResponse
+ fun transferLimits(): TransferLimitServiceAsync.WithRawResponse
+
fun webhooks(): WebhookServiceAsync.WithRawResponse
/**
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 b757af652..10e87732d 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
@@ -23,8 +23,6 @@ import com.lithic.api.services.async.AccountHolderServiceAsync
import com.lithic.api.services.async.AccountHolderServiceAsyncImpl
import com.lithic.api.services.async.AccountServiceAsync
import com.lithic.api.services.async.AccountServiceAsyncImpl
-import com.lithic.api.services.async.AggregateBalanceServiceAsync
-import com.lithic.api.services.async.AggregateBalanceServiceAsyncImpl
import com.lithic.api.services.async.AuthRuleServiceAsync
import com.lithic.api.services.async.AuthRuleServiceAsyncImpl
import com.lithic.api.services.async.AuthStreamEnrollmentServiceAsync
@@ -79,6 +77,8 @@ import com.lithic.api.services.async.TokenizationServiceAsync
import com.lithic.api.services.async.TokenizationServiceAsyncImpl
import com.lithic.api.services.async.TransactionServiceAsync
import com.lithic.api.services.async.TransactionServiceAsyncImpl
+import com.lithic.api.services.async.TransferLimitServiceAsync
+import com.lithic.api.services.async.TransferLimitServiceAsyncImpl
import com.lithic.api.services.async.TransferServiceAsync
import com.lithic.api.services.async.TransferServiceAsyncImpl
import com.lithic.api.services.async.WebhookServiceAsync
@@ -137,10 +137,6 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
BalanceServiceAsyncImpl(clientOptionsWithUserAgent)
}
- private val aggregateBalances: AggregateBalanceServiceAsync by lazy {
- AggregateBalanceServiceAsyncImpl(clientOptionsWithUserAgent)
- }
-
private val disputes: DisputeServiceAsync by lazy {
DisputeServiceAsyncImpl(clientOptionsWithUserAgent)
}
@@ -229,6 +225,10 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
AccountActivityServiceAsyncImpl(clientOptionsWithUserAgent)
}
+ private val transferLimits: TransferLimitServiceAsync by lazy {
+ TransferLimitServiceAsyncImpl(clientOptionsWithUserAgent)
+ }
+
private val webhooks: WebhookServiceAsync by lazy {
WebhookServiceAsyncImpl(clientOptionsWithUserAgent)
}
@@ -259,8 +259,6 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
override fun balances(): BalanceServiceAsync = balances
- override fun aggregateBalances(): AggregateBalanceServiceAsync = aggregateBalances
-
override fun disputes(): DisputeServiceAsync = disputes
override fun disputesV2(): DisputesV2ServiceAsync = disputesV2
@@ -305,6 +303,8 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
override fun accountActivity(): AccountActivityServiceAsync = accountActivity
+ override fun transferLimits(): TransferLimitServiceAsync = transferLimits
+
override fun webhooks(): WebhookServiceAsync = webhooks
override fun apiStatus(
@@ -359,10 +359,6 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
BalanceServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}
- private val aggregateBalances: AggregateBalanceServiceAsync.WithRawResponse by lazy {
- AggregateBalanceServiceAsyncImpl.WithRawResponseImpl(clientOptions)
- }
-
private val disputes: DisputeServiceAsync.WithRawResponse by lazy {
DisputeServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}
@@ -451,6 +447,10 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
AccountActivityServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}
+ private val transferLimits: TransferLimitServiceAsync.WithRawResponse by lazy {
+ TransferLimitServiceAsyncImpl.WithRawResponseImpl(clientOptions)
+ }
+
private val webhooks: WebhookServiceAsync.WithRawResponse by lazy {
WebhookServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}
@@ -482,9 +482,6 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
override fun balances(): BalanceServiceAsync.WithRawResponse = balances
- override fun aggregateBalances(): AggregateBalanceServiceAsync.WithRawResponse =
- aggregateBalances
-
override fun disputes(): DisputeServiceAsync.WithRawResponse = disputes
override fun disputesV2(): DisputesV2ServiceAsync.WithRawResponse = disputesV2
@@ -536,6 +533,8 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
override fun accountActivity(): AccountActivityServiceAsync.WithRawResponse =
accountActivity
+ override fun transferLimits(): TransferLimitServiceAsync.WithRawResponse = transferLimits
+
override fun webhooks(): WebhookServiceAsync.WithRawResponse = webhooks
private val apiStatusHandler: Handler =
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 eb652dd00..411eeb787 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
@@ -23,8 +23,6 @@ import com.lithic.api.services.blocking.AccountHolderService
import com.lithic.api.services.blocking.AccountHolderServiceImpl
import com.lithic.api.services.blocking.AccountService
import com.lithic.api.services.blocking.AccountServiceImpl
-import com.lithic.api.services.blocking.AggregateBalanceService
-import com.lithic.api.services.blocking.AggregateBalanceServiceImpl
import com.lithic.api.services.blocking.AuthRuleService
import com.lithic.api.services.blocking.AuthRuleServiceImpl
import com.lithic.api.services.blocking.AuthStreamEnrollmentService
@@ -79,6 +77,8 @@ import com.lithic.api.services.blocking.TokenizationService
import com.lithic.api.services.blocking.TokenizationServiceImpl
import com.lithic.api.services.blocking.TransactionService
import com.lithic.api.services.blocking.TransactionServiceImpl
+import com.lithic.api.services.blocking.TransferLimitService
+import com.lithic.api.services.blocking.TransferLimitServiceImpl
import com.lithic.api.services.blocking.TransferService
import com.lithic.api.services.blocking.TransferServiceImpl
import com.lithic.api.services.blocking.WebhookService
@@ -132,10 +132,6 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
private val balances: BalanceService by lazy { BalanceServiceImpl(clientOptionsWithUserAgent) }
- private val aggregateBalances: AggregateBalanceService by lazy {
- AggregateBalanceServiceImpl(clientOptionsWithUserAgent)
- }
-
private val disputes: DisputeService by lazy { DisputeServiceImpl(clientOptionsWithUserAgent) }
private val disputesV2: DisputesV2Service by lazy {
@@ -212,6 +208,10 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
AccountActivityServiceImpl(clientOptionsWithUserAgent)
}
+ private val transferLimits: TransferLimitService by lazy {
+ TransferLimitServiceImpl(clientOptionsWithUserAgent)
+ }
+
private val webhooks: WebhookService by lazy { WebhookServiceImpl(clientOptionsWithUserAgent) }
override fun async(): LithicClientAsync = async
@@ -239,8 +239,6 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
override fun balances(): BalanceService = balances
- override fun aggregateBalances(): AggregateBalanceService = aggregateBalances
-
override fun disputes(): DisputeService = disputes
override fun disputesV2(): DisputesV2Service = disputesV2
@@ -285,6 +283,8 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
override fun accountActivity(): AccountActivityService = accountActivity
+ override fun transferLimits(): TransferLimitService = transferLimits
+
override fun webhooks(): WebhookService = webhooks
override fun apiStatus(
@@ -339,10 +339,6 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
BalanceServiceImpl.WithRawResponseImpl(clientOptions)
}
- private val aggregateBalances: AggregateBalanceService.WithRawResponse by lazy {
- AggregateBalanceServiceImpl.WithRawResponseImpl(clientOptions)
- }
-
private val disputes: DisputeService.WithRawResponse by lazy {
DisputeServiceImpl.WithRawResponseImpl(clientOptions)
}
@@ -431,6 +427,10 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
AccountActivityServiceImpl.WithRawResponseImpl(clientOptions)
}
+ private val transferLimits: TransferLimitService.WithRawResponse by lazy {
+ TransferLimitServiceImpl.WithRawResponseImpl(clientOptions)
+ }
+
private val webhooks: WebhookService.WithRawResponse by lazy {
WebhookServiceImpl.WithRawResponseImpl(clientOptions)
}
@@ -462,9 +462,6 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
override fun balances(): BalanceService.WithRawResponse = balances
- override fun aggregateBalances(): AggregateBalanceService.WithRawResponse =
- aggregateBalances
-
override fun disputes(): DisputeService.WithRawResponse = disputes
override fun disputesV2(): DisputesV2Service.WithRawResponse = disputesV2
@@ -514,6 +511,8 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
override fun accountActivity(): AccountActivityService.WithRawResponse = accountActivity
+ override fun transferLimits(): TransferLimitService.WithRawResponse = transferLimits
+
override fun webhooks(): WebhookService.WithRawResponse = webhooks
private val apiStatusHandler: Handler =
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/core/ClientOptions.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/core/ClientOptions.kt
index f298434c8..0db2163ff 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/core/ClientOptions.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/core/ClientOptions.kt
@@ -475,7 +475,6 @@ private constructor(
headers.put("X-Stainless-Package-Version", getPackageVersion())
headers.put("X-Stainless-Runtime", "JRE")
headers.put("X-Stainless-Runtime-Version", getJavaVersion())
- headers.put("X-Lithic-Pagination", "cursor")
apiKey.let {
if (!it.isEmpty()) {
headers.put("Authorization", it)
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/core/http/HttpRequest.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/core/http/HttpRequest.kt
index c4cab902d..db2552191 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/core/http/HttpRequest.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/core/http/HttpRequest.kt
@@ -2,6 +2,7 @@ package com.lithic.api.core.http
import com.lithic.api.core.checkRequired
import com.lithic.api.core.toImmutable
+import java.net.URLEncoder
class HttpRequest
private constructor(
@@ -13,6 +14,35 @@ private constructor(
@get:JvmName("body") val body: HttpRequestBody?,
) {
+ fun url(): String = buildString {
+ append(baseUrl)
+
+ pathSegments.forEach { segment ->
+ if (!endsWith("/")) {
+ append("/")
+ }
+ append(URLEncoder.encode(segment, "UTF-8"))
+ }
+
+ if (queryParams.isEmpty()) {
+ return@buildString
+ }
+
+ append("?")
+ var isFirst = true
+ queryParams.keys().forEach { key ->
+ queryParams.values(key).forEach { value ->
+ if (!isFirst) {
+ append("&")
+ }
+ append(URLEncoder.encode(key, "UTF-8"))
+ append("=")
+ append(URLEncoder.encode(value, "UTF-8"))
+ isFirst = false
+ }
+ }
+ }
+
fun toBuilder(): Builder = Builder().from(this)
override fun toString(): String =
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalance.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalance.kt
deleted file mode 100644
index 16c545050..000000000
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalance.kt
+++ /dev/null
@@ -1,747 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.lithic.api.models
-
-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.checkRequired
-import com.lithic.api.errors.LithicInvalidDataException
-import java.time.OffsetDateTime
-import java.util.Collections
-import java.util.Objects
-import kotlin.jvm.optionals.getOrNull
-
-/** Aggregate Balance across all end-user accounts */
-class AggregateBalance
-@JsonCreator(mode = JsonCreator.Mode.DISABLED)
-private constructor(
- private val availableAmount: JsonField,
- private val created: JsonField,
- private val currency: JsonField,
- private val financialAccountType: JsonField,
- private val lastFinancialAccountToken: JsonField,
- private val lastTransactionEventToken: JsonField,
- private val lastTransactionToken: JsonField,
- private val pendingAmount: JsonField,
- private val totalAmount: JsonField,
- private val updated: JsonField,
- private val additionalProperties: MutableMap,
-) {
-
- @JsonCreator
- private constructor(
- @JsonProperty("available_amount")
- @ExcludeMissing
- availableAmount: JsonField = JsonMissing.of(),
- @JsonProperty("created")
- @ExcludeMissing
- created: JsonField = JsonMissing.of(),
- @JsonProperty("currency") @ExcludeMissing currency: JsonField = JsonMissing.of(),
- @JsonProperty("financial_account_type")
- @ExcludeMissing
- financialAccountType: JsonField = JsonMissing.of(),
- @JsonProperty("last_financial_account_token")
- @ExcludeMissing
- lastFinancialAccountToken: JsonField = JsonMissing.of(),
- @JsonProperty("last_transaction_event_token")
- @ExcludeMissing
- lastTransactionEventToken: JsonField = JsonMissing.of(),
- @JsonProperty("last_transaction_token")
- @ExcludeMissing
- lastTransactionToken: JsonField = JsonMissing.of(),
- @JsonProperty("pending_amount")
- @ExcludeMissing
- pendingAmount: JsonField = JsonMissing.of(),
- @JsonProperty("total_amount")
- @ExcludeMissing
- totalAmount: JsonField = JsonMissing.of(),
- @JsonProperty("updated")
- @ExcludeMissing
- updated: JsonField = JsonMissing.of(),
- ) : this(
- availableAmount,
- created,
- currency,
- financialAccountType,
- lastFinancialAccountToken,
- lastTransactionEventToken,
- lastTransactionToken,
- pendingAmount,
- totalAmount,
- updated,
- mutableMapOf(),
- )
-
- /**
- * Funds available for spend in the currency's smallest unit (e.g., cents for 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).
- */
- fun availableAmount(): Long = availableAmount.getRequired("available_amount")
-
- /**
- * Date and time for when the balance was first created.
- *
- * @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 created(): OffsetDateTime = created.getRequired("created")
-
- /**
- * 3-character alphabetic ISO 4217 code for the local currency of the balance.
- *
- * @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 currency(): String = currency.getRequired("currency")
-
- /**
- * Type of financial account
- *
- * @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 financialAccountType(): FinancialAccountType =
- financialAccountType.getRequired("financial_account_type")
-
- /**
- * Globally unique identifier for the financial account that had its balance updated most
- * recently
- *
- * @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 lastFinancialAccountToken(): String =
- lastFinancialAccountToken.getRequired("last_financial_account_token")
-
- /**
- * Globally unique identifier for the last transaction event that impacted this balance
- *
- * @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 lastTransactionEventToken(): String =
- lastTransactionEventToken.getRequired("last_transaction_event_token")
-
- /**
- * Globally unique identifier for the last transaction that impacted this balance
- *
- * @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 lastTransactionToken(): String = lastTransactionToken.getRequired("last_transaction_token")
-
- /**
- * Funds not available for spend due to card authorizations or pending ACH release. Shown in the
- * currency's smallest unit (e.g., cents for 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).
- */
- fun pendingAmount(): Long = pendingAmount.getRequired("pending_amount")
-
- /**
- * The sum of available and pending balance in the currency's smallest unit (e.g., cents for
- * 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).
- */
- fun totalAmount(): Long = totalAmount.getRequired("total_amount")
-
- /**
- * Date and time for when the balance was last updated.
- *
- * @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 updated(): OffsetDateTime = updated.getRequired("updated")
-
- /**
- * Returns the raw JSON value of [availableAmount].
- *
- * Unlike [availableAmount], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("available_amount")
- @ExcludeMissing
- fun _availableAmount(): JsonField = availableAmount
-
- /**
- * Returns the raw JSON value of [created].
- *
- * Unlike [created], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("created") @ExcludeMissing fun _created(): JsonField = created
-
- /**
- * Returns the raw JSON value of [currency].
- *
- * Unlike [currency], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("currency") @ExcludeMissing fun _currency(): JsonField = currency
-
- /**
- * Returns the raw JSON value of [financialAccountType].
- *
- * Unlike [financialAccountType], this method doesn't throw if the JSON field has an unexpected
- * type.
- */
- @JsonProperty("financial_account_type")
- @ExcludeMissing
- fun _financialAccountType(): JsonField = financialAccountType
-
- /**
- * Returns the raw JSON value of [lastFinancialAccountToken].
- *
- * Unlike [lastFinancialAccountToken], this method doesn't throw if the JSON field has an
- * unexpected type.
- */
- @JsonProperty("last_financial_account_token")
- @ExcludeMissing
- fun _lastFinancialAccountToken(): JsonField = lastFinancialAccountToken
-
- /**
- * Returns the raw JSON value of [lastTransactionEventToken].
- *
- * Unlike [lastTransactionEventToken], this method doesn't throw if the JSON field has an
- * unexpected type.
- */
- @JsonProperty("last_transaction_event_token")
- @ExcludeMissing
- fun _lastTransactionEventToken(): JsonField = lastTransactionEventToken
-
- /**
- * Returns the raw JSON value of [lastTransactionToken].
- *
- * Unlike [lastTransactionToken], this method doesn't throw if the JSON field has an unexpected
- * type.
- */
- @JsonProperty("last_transaction_token")
- @ExcludeMissing
- fun _lastTransactionToken(): JsonField = lastTransactionToken
-
- /**
- * Returns the raw JSON value of [pendingAmount].
- *
- * Unlike [pendingAmount], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("pending_amount")
- @ExcludeMissing
- fun _pendingAmount(): JsonField = pendingAmount
-
- /**
- * Returns the raw JSON value of [totalAmount].
- *
- * Unlike [totalAmount], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("total_amount") @ExcludeMissing fun _totalAmount(): JsonField = totalAmount
-
- /**
- * Returns the raw JSON value of [updated].
- *
- * Unlike [updated], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("updated") @ExcludeMissing fun _updated(): JsonField = updated
-
- @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 [AggregateBalance].
- *
- * The following fields are required:
- * ```java
- * .availableAmount()
- * .created()
- * .currency()
- * .financialAccountType()
- * .lastFinancialAccountToken()
- * .lastTransactionEventToken()
- * .lastTransactionToken()
- * .pendingAmount()
- * .totalAmount()
- * .updated()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [AggregateBalance]. */
- class Builder internal constructor() {
-
- private var availableAmount: JsonField? = null
- private var created: JsonField? = null
- private var currency: JsonField? = null
- private var financialAccountType: JsonField? = null
- private var lastFinancialAccountToken: JsonField? = null
- private var lastTransactionEventToken: JsonField? = null
- private var lastTransactionToken: JsonField? = null
- private var pendingAmount: JsonField? = null
- private var totalAmount: JsonField? = null
- private var updated: JsonField? = null
- private var additionalProperties: MutableMap = mutableMapOf()
-
- @JvmSynthetic
- internal fun from(aggregateBalance: AggregateBalance) = apply {
- availableAmount = aggregateBalance.availableAmount
- created = aggregateBalance.created
- currency = aggregateBalance.currency
- financialAccountType = aggregateBalance.financialAccountType
- lastFinancialAccountToken = aggregateBalance.lastFinancialAccountToken
- lastTransactionEventToken = aggregateBalance.lastTransactionEventToken
- lastTransactionToken = aggregateBalance.lastTransactionToken
- pendingAmount = aggregateBalance.pendingAmount
- totalAmount = aggregateBalance.totalAmount
- updated = aggregateBalance.updated
- additionalProperties = aggregateBalance.additionalProperties.toMutableMap()
- }
-
- /** Funds available for spend in the currency's smallest unit (e.g., cents for USD) */
- fun availableAmount(availableAmount: Long) = availableAmount(JsonField.of(availableAmount))
-
- /**
- * Sets [Builder.availableAmount] to an arbitrary JSON value.
- *
- * You should usually call [Builder.availableAmount] with a well-typed [Long] value instead.
- * This method is primarily for setting the field to an undocumented or not yet supported
- * value.
- */
- fun availableAmount(availableAmount: JsonField) = apply {
- this.availableAmount = availableAmount
- }
-
- /** Date and time for when the balance was first created. */
- fun created(created: OffsetDateTime) = created(JsonField.of(created))
-
- /**
- * Sets [Builder.created] to an arbitrary JSON value.
- *
- * You should usually call [Builder.created] with a well-typed [OffsetDateTime] value
- * instead. This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- fun created(created: JsonField) = apply { this.created = created }
-
- /** 3-character alphabetic ISO 4217 code for the local currency of the balance. */
- fun currency(currency: String) = currency(JsonField.of(currency))
-
- /**
- * Sets [Builder.currency] to an arbitrary JSON value.
- *
- * You should usually call [Builder.currency] with a well-typed [String] value instead. This
- * method is primarily for setting the field to an undocumented or not yet supported value.
- */
- fun currency(currency: JsonField) = apply { this.currency = currency }
-
- /** Type of financial account */
- fun financialAccountType(financialAccountType: FinancialAccountType) =
- financialAccountType(JsonField.of(financialAccountType))
-
- /**
- * Sets [Builder.financialAccountType] to an arbitrary JSON value.
- *
- * You should usually call [Builder.financialAccountType] with a well-typed
- * [FinancialAccountType] value instead. This method is primarily for setting the field to
- * an undocumented or not yet supported value.
- */
- fun financialAccountType(financialAccountType: JsonField) = apply {
- this.financialAccountType = financialAccountType
- }
-
- /**
- * Globally unique identifier for the financial account that had its balance updated most
- * recently
- */
- fun lastFinancialAccountToken(lastFinancialAccountToken: String) =
- lastFinancialAccountToken(JsonField.of(lastFinancialAccountToken))
-
- /**
- * Sets [Builder.lastFinancialAccountToken] to an arbitrary JSON value.
- *
- * You should usually call [Builder.lastFinancialAccountToken] with a well-typed [String]
- * value instead. This method is primarily for setting the field to an undocumented or not
- * yet supported value.
- */
- fun lastFinancialAccountToken(lastFinancialAccountToken: JsonField) = apply {
- this.lastFinancialAccountToken = lastFinancialAccountToken
- }
-
- /** Globally unique identifier for the last transaction event that impacted this balance */
- fun lastTransactionEventToken(lastTransactionEventToken: String) =
- lastTransactionEventToken(JsonField.of(lastTransactionEventToken))
-
- /**
- * Sets [Builder.lastTransactionEventToken] to an arbitrary JSON value.
- *
- * You should usually call [Builder.lastTransactionEventToken] with a well-typed [String]
- * value instead. This method is primarily for setting the field to an undocumented or not
- * yet supported value.
- */
- fun lastTransactionEventToken(lastTransactionEventToken: JsonField) = apply {
- this.lastTransactionEventToken = lastTransactionEventToken
- }
-
- /** Globally unique identifier for the last transaction that impacted this balance */
- fun lastTransactionToken(lastTransactionToken: String) =
- lastTransactionToken(JsonField.of(lastTransactionToken))
-
- /**
- * Sets [Builder.lastTransactionToken] to an arbitrary JSON value.
- *
- * You should usually call [Builder.lastTransactionToken] with a well-typed [String] value
- * instead. This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- fun lastTransactionToken(lastTransactionToken: JsonField) = apply {
- this.lastTransactionToken = lastTransactionToken
- }
-
- /**
- * Funds not available for spend due to card authorizations or pending ACH release. Shown in
- * the currency's smallest unit (e.g., cents for USD)
- */
- fun pendingAmount(pendingAmount: Long) = pendingAmount(JsonField.of(pendingAmount))
-
- /**
- * Sets [Builder.pendingAmount] to an arbitrary JSON value.
- *
- * You should usually call [Builder.pendingAmount] with a well-typed [Long] value instead.
- * This method is primarily for setting the field to an undocumented or not yet supported
- * value.
- */
- fun pendingAmount(pendingAmount: JsonField) = apply {
- this.pendingAmount = pendingAmount
- }
-
- /**
- * The sum of available and pending balance in the currency's smallest unit (e.g., cents for
- * USD)
- */
- fun totalAmount(totalAmount: Long) = totalAmount(JsonField.of(totalAmount))
-
- /**
- * Sets [Builder.totalAmount] to an arbitrary JSON value.
- *
- * You should usually call [Builder.totalAmount] with a well-typed [Long] value instead.
- * This method is primarily for setting the field to an undocumented or not yet supported
- * value.
- */
- fun totalAmount(totalAmount: JsonField) = apply { this.totalAmount = totalAmount }
-
- /** Date and time for when the balance was last updated. */
- fun updated(updated: OffsetDateTime) = updated(JsonField.of(updated))
-
- /**
- * Sets [Builder.updated] to an arbitrary JSON value.
- *
- * You should usually call [Builder.updated] with a well-typed [OffsetDateTime] value
- * instead. This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- fun updated(updated: JsonField) = apply { this.updated = updated }
-
- 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 [AggregateBalance].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .availableAmount()
- * .created()
- * .currency()
- * .financialAccountType()
- * .lastFinancialAccountToken()
- * .lastTransactionEventToken()
- * .lastTransactionToken()
- * .pendingAmount()
- * .totalAmount()
- * .updated()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): AggregateBalance =
- AggregateBalance(
- checkRequired("availableAmount", availableAmount),
- checkRequired("created", created),
- checkRequired("currency", currency),
- checkRequired("financialAccountType", financialAccountType),
- checkRequired("lastFinancialAccountToken", lastFinancialAccountToken),
- checkRequired("lastTransactionEventToken", lastTransactionEventToken),
- checkRequired("lastTransactionToken", lastTransactionToken),
- checkRequired("pendingAmount", pendingAmount),
- checkRequired("totalAmount", totalAmount),
- checkRequired("updated", updated),
- additionalProperties.toMutableMap(),
- )
- }
-
- private var validated: Boolean = false
-
- fun validate(): AggregateBalance = apply {
- if (validated) {
- return@apply
- }
-
- availableAmount()
- created()
- currency()
- financialAccountType().validate()
- lastFinancialAccountToken()
- lastTransactionEventToken()
- lastTransactionToken()
- pendingAmount()
- totalAmount()
- updated()
- 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 (availableAmount.asKnown().isPresent) 1 else 0) +
- (if (created.asKnown().isPresent) 1 else 0) +
- (if (currency.asKnown().isPresent) 1 else 0) +
- (financialAccountType.asKnown().getOrNull()?.validity() ?: 0) +
- (if (lastFinancialAccountToken.asKnown().isPresent) 1 else 0) +
- (if (lastTransactionEventToken.asKnown().isPresent) 1 else 0) +
- (if (lastTransactionToken.asKnown().isPresent) 1 else 0) +
- (if (pendingAmount.asKnown().isPresent) 1 else 0) +
- (if (totalAmount.asKnown().isPresent) 1 else 0) +
- (if (updated.asKnown().isPresent) 1 else 0)
-
- /** Type of financial account */
- class FinancialAccountType
- @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 ISSUING = of("ISSUING")
-
- @JvmField val OPERATING = of("OPERATING")
-
- @JvmField val RESERVE = of("RESERVE")
-
- @JvmField val SECURITY = of("SECURITY")
-
- @JvmStatic fun of(value: String) = FinancialAccountType(JsonField.of(value))
- }
-
- /** An enum containing [FinancialAccountType]'s known values. */
- enum class Known {
- ISSUING,
- OPERATING,
- RESERVE,
- SECURITY,
- }
-
- /**
- * An enum containing [FinancialAccountType]'s known values, as well as an [_UNKNOWN]
- * member.
- *
- * An instance of [FinancialAccountType] 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 {
- ISSUING,
- OPERATING,
- RESERVE,
- SECURITY,
- /**
- * An enum member indicating that [FinancialAccountType] 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) {
- ISSUING -> Value.ISSUING
- OPERATING -> Value.OPERATING
- RESERVE -> Value.RESERVE
- SECURITY -> Value.SECURITY
- 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) {
- ISSUING -> Known.ISSUING
- OPERATING -> Known.OPERATING
- RESERVE -> Known.RESERVE
- SECURITY -> Known.SECURITY
- else -> throw LithicInvalidDataException("Unknown FinancialAccountType: $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(): FinancialAccountType = 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 other is FinancialAccountType && value == other.value
- }
-
- override fun hashCode() = value.hashCode()
-
- override fun toString() = value.toString()
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is AggregateBalance &&
- availableAmount == other.availableAmount &&
- created == other.created &&
- currency == other.currency &&
- financialAccountType == other.financialAccountType &&
- lastFinancialAccountToken == other.lastFinancialAccountToken &&
- lastTransactionEventToken == other.lastTransactionEventToken &&
- lastTransactionToken == other.lastTransactionToken &&
- pendingAmount == other.pendingAmount &&
- totalAmount == other.totalAmount &&
- updated == other.updated &&
- additionalProperties == other.additionalProperties
- }
-
- private val hashCode: Int by lazy {
- Objects.hash(
- availableAmount,
- created,
- currency,
- financialAccountType,
- lastFinancialAccountToken,
- lastTransactionEventToken,
- lastTransactionToken,
- pendingAmount,
- totalAmount,
- updated,
- additionalProperties,
- )
- }
-
- override fun hashCode(): Int = hashCode
-
- override fun toString() =
- "AggregateBalance{availableAmount=$availableAmount, created=$created, currency=$currency, financialAccountType=$financialAccountType, lastFinancialAccountToken=$lastFinancialAccountToken, lastTransactionEventToken=$lastTransactionEventToken, lastTransactionToken=$lastTransactionToken, pendingAmount=$pendingAmount, totalAmount=$totalAmount, updated=$updated, additionalProperties=$additionalProperties}"
-}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListPageResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListPageResponse.kt
deleted file mode 100644
index be5067244..000000000
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListPageResponse.kt
+++ /dev/null
@@ -1,231 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.lithic.api.models
-
-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.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.util.Collections
-import java.util.Objects
-import kotlin.jvm.optionals.getOrNull
-
-class AggregateBalanceListPageResponse
-@JsonCreator(mode = JsonCreator.Mode.DISABLED)
-private constructor(
- private val data: JsonField>,
- private val hasMore: JsonField,
- private val additionalProperties: MutableMap,
-) {
-
- @JsonCreator
- private constructor(
- @JsonProperty("data")
- @ExcludeMissing
- data: JsonField> = JsonMissing.of(),
- @JsonProperty("has_more") @ExcludeMissing hasMore: JsonField = JsonMissing.of(),
- ) : this(data, hasMore, mutableMapOf())
-
- /**
- * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
- * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
- */
- fun data(): List = data.getRequired("data")
-
- /**
- * More data exists.
- *
- * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
- * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
- */
- fun hasMore(): Boolean = hasMore.getRequired("has_more")
-
- /**
- * Returns the raw JSON value of [data].
- *
- * Unlike [data], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("data") @ExcludeMissing fun _data(): JsonField> = data
-
- /**
- * Returns the raw JSON value of [hasMore].
- *
- * Unlike [hasMore], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("has_more") @ExcludeMissing fun _hasMore(): JsonField = hasMore
-
- @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
- * [AggregateBalanceListPageResponse].
- *
- * The following fields are required:
- * ```java
- * .data()
- * .hasMore()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [AggregateBalanceListPageResponse]. */
- class Builder internal constructor() {
-
- private var data: JsonField>? = null
- private var hasMore: JsonField? = null
- private var additionalProperties: MutableMap = mutableMapOf()
-
- @JvmSynthetic
- internal fun from(aggregateBalanceListPageResponse: AggregateBalanceListPageResponse) =
- apply {
- data = aggregateBalanceListPageResponse.data.map { it.toMutableList() }
- hasMore = aggregateBalanceListPageResponse.hasMore
- additionalProperties =
- aggregateBalanceListPageResponse.additionalProperties.toMutableMap()
- }
-
- fun data(data: List) = data(JsonField.of(data))
-
- /**
- * Sets [Builder.data] to an arbitrary JSON value.
- *
- * You should usually call [Builder.data] with a well-typed `List` value
- * instead. This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- fun data(data: JsonField>) = apply {
- this.data = data.map { it.toMutableList() }
- }
-
- /**
- * Adds a single [AggregateBalance] to [Builder.data].
- *
- * @throws IllegalStateException if the field was previously set to a non-list.
- */
- fun addData(data: AggregateBalance) = apply {
- this.data =
- (this.data ?: JsonField.of(mutableListOf())).also {
- checkKnown("data", it).add(data)
- }
- }
-
- /** More data exists. */
- fun hasMore(hasMore: Boolean) = hasMore(JsonField.of(hasMore))
-
- /**
- * Sets [Builder.hasMore] to an arbitrary JSON value.
- *
- * You should usually call [Builder.hasMore] with a well-typed [Boolean] value instead. This
- * method is primarily for setting the field to an undocumented or not yet supported value.
- */
- fun hasMore(hasMore: JsonField) = apply { this.hasMore = hasMore }
-
- 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 [AggregateBalanceListPageResponse].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .data()
- * .hasMore()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): AggregateBalanceListPageResponse =
- AggregateBalanceListPageResponse(
- checkRequired("data", data).map { it.toImmutable() },
- checkRequired("hasMore", hasMore),
- additionalProperties.toMutableMap(),
- )
- }
-
- private var validated: Boolean = false
-
- fun validate(): AggregateBalanceListPageResponse = apply {
- if (validated) {
- return@apply
- }
-
- data().forEach { it.validate() }
- hasMore()
- 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 =
- (data.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) +
- (if (hasMore.asKnown().isPresent) 1 else 0)
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is AggregateBalanceListPageResponse &&
- data == other.data &&
- hasMore == other.hasMore &&
- additionalProperties == other.additionalProperties
- }
-
- private val hashCode: Int by lazy { Objects.hash(data, hasMore, additionalProperties) }
-
- override fun hashCode(): Int = hashCode
-
- override fun toString() =
- "AggregateBalanceListPageResponse{data=$data, hasMore=$hasMore, additionalProperties=$additionalProperties}"
-}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListParams.kt
deleted file mode 100644
index d477113b3..000000000
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListParams.kt
+++ /dev/null
@@ -1,353 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.lithic.api.models
-
-import com.fasterxml.jackson.annotation.JsonCreator
-import com.lithic.api.core.Enum
-import com.lithic.api.core.JsonField
-import com.lithic.api.core.Params
-import com.lithic.api.core.http.Headers
-import com.lithic.api.core.http.QueryParams
-import com.lithic.api.errors.LithicInvalidDataException
-import java.util.Objects
-import java.util.Optional
-import kotlin.jvm.optionals.getOrNull
-
-/** Get the aggregated balance across all end-user accounts by financial account type */
-class AggregateBalanceListParams
-private constructor(
- private val financialAccountType: FinancialAccountType?,
- private val additionalHeaders: Headers,
- private val additionalQueryParams: QueryParams,
-) : Params {
-
- /** Get the aggregate balance for a given Financial Account type. */
- fun financialAccountType(): Optional =
- Optional.ofNullable(financialAccountType)
-
- /** Additional headers to send with the request. */
- fun _additionalHeaders(): Headers = additionalHeaders
-
- /** Additional query param to send with the request. */
- fun _additionalQueryParams(): QueryParams = additionalQueryParams
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- @JvmStatic fun none(): AggregateBalanceListParams = builder().build()
-
- /**
- * Returns a mutable builder for constructing an instance of [AggregateBalanceListParams].
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [AggregateBalanceListParams]. */
- class Builder internal constructor() {
-
- private var financialAccountType: FinancialAccountType? = null
- private var additionalHeaders: Headers.Builder = Headers.builder()
- private var additionalQueryParams: QueryParams.Builder = QueryParams.builder()
-
- @JvmSynthetic
- internal fun from(aggregateBalanceListParams: AggregateBalanceListParams) = apply {
- financialAccountType = aggregateBalanceListParams.financialAccountType
- additionalHeaders = aggregateBalanceListParams.additionalHeaders.toBuilder()
- additionalQueryParams = aggregateBalanceListParams.additionalQueryParams.toBuilder()
- }
-
- /** Get the aggregate balance for a given Financial Account type. */
- fun financialAccountType(financialAccountType: FinancialAccountType?) = apply {
- this.financialAccountType = financialAccountType
- }
-
- /**
- * Alias for calling [Builder.financialAccountType] with
- * `financialAccountType.orElse(null)`.
- */
- fun financialAccountType(financialAccountType: Optional) =
- financialAccountType(financialAccountType.getOrNull())
-
- 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 [AggregateBalanceListParams].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- */
- fun build(): AggregateBalanceListParams =
- AggregateBalanceListParams(
- financialAccountType,
- additionalHeaders.build(),
- additionalQueryParams.build(),
- )
- }
-
- override fun _headers(): Headers = additionalHeaders
-
- override fun _queryParams(): QueryParams =
- QueryParams.builder()
- .apply {
- financialAccountType?.let { put("financial_account_type", it.toString()) }
- putAll(additionalQueryParams)
- }
- .build()
-
- /** Get the aggregate balance for a given Financial Account type. */
- class FinancialAccountType
- @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 ISSUING = of("ISSUING")
-
- @JvmField val OPERATING = of("OPERATING")
-
- @JvmField val RESERVE = of("RESERVE")
-
- @JvmField val SECURITY = of("SECURITY")
-
- @JvmStatic fun of(value: String) = FinancialAccountType(JsonField.of(value))
- }
-
- /** An enum containing [FinancialAccountType]'s known values. */
- enum class Known {
- ISSUING,
- OPERATING,
- RESERVE,
- SECURITY,
- }
-
- /**
- * An enum containing [FinancialAccountType]'s known values, as well as an [_UNKNOWN]
- * member.
- *
- * An instance of [FinancialAccountType] 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 {
- ISSUING,
- OPERATING,
- RESERVE,
- SECURITY,
- /**
- * An enum member indicating that [FinancialAccountType] 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) {
- ISSUING -> Value.ISSUING
- OPERATING -> Value.OPERATING
- RESERVE -> Value.RESERVE
- SECURITY -> Value.SECURITY
- 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) {
- ISSUING -> Known.ISSUING
- OPERATING -> Known.OPERATING
- RESERVE -> Known.RESERVE
- SECURITY -> Known.SECURITY
- else -> throw LithicInvalidDataException("Unknown FinancialAccountType: $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(): FinancialAccountType = 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 other is FinancialAccountType && value == other.value
- }
-
- override fun hashCode() = value.hashCode()
-
- override fun toString() = value.toString()
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is AggregateBalanceListParams &&
- financialAccountType == other.financialAccountType &&
- additionalHeaders == other.additionalHeaders &&
- additionalQueryParams == other.additionalQueryParams
- }
-
- override fun hashCode(): Int =
- Objects.hash(financialAccountType, additionalHeaders, additionalQueryParams)
-
- override fun toString() =
- "AggregateBalanceListParams{financialAccountType=$financialAccountType, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
-}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListResponse.kt
deleted file mode 100644
index 6fb720c8a..000000000
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListResponse.kt
+++ /dev/null
@@ -1,546 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.lithic.api.models
-
-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.ExcludeMissing
-import com.lithic.api.core.JsonField
-import com.lithic.api.core.JsonMissing
-import com.lithic.api.core.JsonValue
-import com.lithic.api.core.checkRequired
-import com.lithic.api.errors.LithicInvalidDataException
-import java.time.OffsetDateTime
-import java.util.Collections
-import java.util.Objects
-
-/** Card Aggregate Balance across all end-user accounts */
-class AggregateBalanceListResponse
-@JsonCreator(mode = JsonCreator.Mode.DISABLED)
-private constructor(
- private val availableAmount: JsonField,
- private val created: JsonField,
- private val currency: JsonField,
- private val lastCardToken: JsonField,
- private val lastTransactionEventToken: JsonField,
- private val lastTransactionToken: JsonField,
- private val pendingAmount: JsonField,
- private val totalAmount: JsonField,
- private val updated: JsonField,
- private val additionalProperties: MutableMap,
-) {
-
- @JsonCreator
- private constructor(
- @JsonProperty("available_amount")
- @ExcludeMissing
- availableAmount: JsonField = JsonMissing.of(),
- @JsonProperty("created")
- @ExcludeMissing
- created: JsonField = JsonMissing.of(),
- @JsonProperty("currency") @ExcludeMissing currency: JsonField = JsonMissing.of(),
- @JsonProperty("last_card_token")
- @ExcludeMissing
- lastCardToken: JsonField = JsonMissing.of(),
- @JsonProperty("last_transaction_event_token")
- @ExcludeMissing
- lastTransactionEventToken: JsonField = JsonMissing.of(),
- @JsonProperty("last_transaction_token")
- @ExcludeMissing
- lastTransactionToken: JsonField = JsonMissing.of(),
- @JsonProperty("pending_amount")
- @ExcludeMissing
- pendingAmount: JsonField = JsonMissing.of(),
- @JsonProperty("total_amount")
- @ExcludeMissing
- totalAmount: JsonField = JsonMissing.of(),
- @JsonProperty("updated")
- @ExcludeMissing
- updated: JsonField = JsonMissing.of(),
- ) : this(
- availableAmount,
- created,
- currency,
- lastCardToken,
- lastTransactionEventToken,
- lastTransactionToken,
- pendingAmount,
- totalAmount,
- updated,
- mutableMapOf(),
- )
-
- /**
- * Funds available for spend in the currency's smallest unit (e.g., cents for 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).
- */
- fun availableAmount(): Long = availableAmount.getRequired("available_amount")
-
- /**
- * Date and time for when the balance was first created.
- *
- * @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 created(): OffsetDateTime = created.getRequired("created")
-
- /**
- * 3-character alphabetic ISO 4217 code for the local currency of the balance.
- *
- * @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 currency(): String = currency.getRequired("currency")
-
- /**
- * Globally unique identifier for the card that had its balance updated most recently
- *
- * @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 lastCardToken(): String = lastCardToken.getRequired("last_card_token")
-
- /**
- * Globally unique identifier for the last transaction event that impacted this balance
- *
- * @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 lastTransactionEventToken(): String =
- lastTransactionEventToken.getRequired("last_transaction_event_token")
-
- /**
- * Globally unique identifier for the last transaction that impacted this balance
- *
- * @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 lastTransactionToken(): String = lastTransactionToken.getRequired("last_transaction_token")
-
- /**
- * Funds not available for spend due to card authorizations or pending ACH release. Shown in the
- * currency's smallest unit (e.g., cents for 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).
- */
- fun pendingAmount(): Long = pendingAmount.getRequired("pending_amount")
-
- /**
- * The sum of available and pending balance in the currency's smallest unit (e.g., cents for
- * 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).
- */
- fun totalAmount(): Long = totalAmount.getRequired("total_amount")
-
- /**
- * Date and time for when the balance was last updated.
- *
- * @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 updated(): OffsetDateTime = updated.getRequired("updated")
-
- /**
- * Returns the raw JSON value of [availableAmount].
- *
- * Unlike [availableAmount], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("available_amount")
- @ExcludeMissing
- fun _availableAmount(): JsonField = availableAmount
-
- /**
- * Returns the raw JSON value of [created].
- *
- * Unlike [created], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("created") @ExcludeMissing fun _created(): JsonField = created
-
- /**
- * Returns the raw JSON value of [currency].
- *
- * Unlike [currency], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("currency") @ExcludeMissing fun _currency(): JsonField = currency
-
- /**
- * Returns the raw JSON value of [lastCardToken].
- *
- * Unlike [lastCardToken], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("last_card_token")
- @ExcludeMissing
- fun _lastCardToken(): JsonField = lastCardToken
-
- /**
- * Returns the raw JSON value of [lastTransactionEventToken].
- *
- * Unlike [lastTransactionEventToken], this method doesn't throw if the JSON field has an
- * unexpected type.
- */
- @JsonProperty("last_transaction_event_token")
- @ExcludeMissing
- fun _lastTransactionEventToken(): JsonField = lastTransactionEventToken
-
- /**
- * Returns the raw JSON value of [lastTransactionToken].
- *
- * Unlike [lastTransactionToken], this method doesn't throw if the JSON field has an unexpected
- * type.
- */
- @JsonProperty("last_transaction_token")
- @ExcludeMissing
- fun _lastTransactionToken(): JsonField = lastTransactionToken
-
- /**
- * Returns the raw JSON value of [pendingAmount].
- *
- * Unlike [pendingAmount], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("pending_amount")
- @ExcludeMissing
- fun _pendingAmount(): JsonField = pendingAmount
-
- /**
- * Returns the raw JSON value of [totalAmount].
- *
- * Unlike [totalAmount], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("total_amount") @ExcludeMissing fun _totalAmount(): JsonField = totalAmount
-
- /**
- * Returns the raw JSON value of [updated].
- *
- * Unlike [updated], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("updated") @ExcludeMissing fun _updated(): JsonField = updated
-
- @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 [AggregateBalanceListResponse].
- *
- * The following fields are required:
- * ```java
- * .availableAmount()
- * .created()
- * .currency()
- * .lastCardToken()
- * .lastTransactionEventToken()
- * .lastTransactionToken()
- * .pendingAmount()
- * .totalAmount()
- * .updated()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [AggregateBalanceListResponse]. */
- class Builder internal constructor() {
-
- private var availableAmount: JsonField? = null
- private var created: JsonField? = null
- private var currency: JsonField? = null
- private var lastCardToken: JsonField? = null
- private var lastTransactionEventToken: JsonField? = null
- private var lastTransactionToken: JsonField? = null
- private var pendingAmount: JsonField? = null
- private var totalAmount: JsonField? = null
- private var updated: JsonField? = null
- private var additionalProperties: MutableMap = mutableMapOf()
-
- @JvmSynthetic
- internal fun from(aggregateBalanceListResponse: AggregateBalanceListResponse) = apply {
- availableAmount = aggregateBalanceListResponse.availableAmount
- created = aggregateBalanceListResponse.created
- currency = aggregateBalanceListResponse.currency
- lastCardToken = aggregateBalanceListResponse.lastCardToken
- lastTransactionEventToken = aggregateBalanceListResponse.lastTransactionEventToken
- lastTransactionToken = aggregateBalanceListResponse.lastTransactionToken
- pendingAmount = aggregateBalanceListResponse.pendingAmount
- totalAmount = aggregateBalanceListResponse.totalAmount
- updated = aggregateBalanceListResponse.updated
- additionalProperties = aggregateBalanceListResponse.additionalProperties.toMutableMap()
- }
-
- /** Funds available for spend in the currency's smallest unit (e.g., cents for USD) */
- fun availableAmount(availableAmount: Long) = availableAmount(JsonField.of(availableAmount))
-
- /**
- * Sets [Builder.availableAmount] to an arbitrary JSON value.
- *
- * You should usually call [Builder.availableAmount] with a well-typed [Long] value instead.
- * This method is primarily for setting the field to an undocumented or not yet supported
- * value.
- */
- fun availableAmount(availableAmount: JsonField) = apply {
- this.availableAmount = availableAmount
- }
-
- /** Date and time for when the balance was first created. */
- fun created(created: OffsetDateTime) = created(JsonField.of(created))
-
- /**
- * Sets [Builder.created] to an arbitrary JSON value.
- *
- * You should usually call [Builder.created] with a well-typed [OffsetDateTime] value
- * instead. This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- fun created(created: JsonField) = apply { this.created = created }
-
- /** 3-character alphabetic ISO 4217 code for the local currency of the balance. */
- fun currency(currency: String) = currency(JsonField.of(currency))
-
- /**
- * Sets [Builder.currency] to an arbitrary JSON value.
- *
- * You should usually call [Builder.currency] with a well-typed [String] value instead. This
- * method is primarily for setting the field to an undocumented or not yet supported value.
- */
- fun currency(currency: JsonField) = apply { this.currency = currency }
-
- /** Globally unique identifier for the card that had its balance updated most recently */
- fun lastCardToken(lastCardToken: String) = lastCardToken(JsonField.of(lastCardToken))
-
- /**
- * Sets [Builder.lastCardToken] to an arbitrary JSON value.
- *
- * You should usually call [Builder.lastCardToken] with a well-typed [String] value instead.
- * This method is primarily for setting the field to an undocumented or not yet supported
- * value.
- */
- fun lastCardToken(lastCardToken: JsonField) = apply {
- this.lastCardToken = lastCardToken
- }
-
- /** Globally unique identifier for the last transaction event that impacted this balance */
- fun lastTransactionEventToken(lastTransactionEventToken: String) =
- lastTransactionEventToken(JsonField.of(lastTransactionEventToken))
-
- /**
- * Sets [Builder.lastTransactionEventToken] to an arbitrary JSON value.
- *
- * You should usually call [Builder.lastTransactionEventToken] with a well-typed [String]
- * value instead. This method is primarily for setting the field to an undocumented or not
- * yet supported value.
- */
- fun lastTransactionEventToken(lastTransactionEventToken: JsonField) = apply {
- this.lastTransactionEventToken = lastTransactionEventToken
- }
-
- /** Globally unique identifier for the last transaction that impacted this balance */
- fun lastTransactionToken(lastTransactionToken: String) =
- lastTransactionToken(JsonField.of(lastTransactionToken))
-
- /**
- * Sets [Builder.lastTransactionToken] to an arbitrary JSON value.
- *
- * You should usually call [Builder.lastTransactionToken] with a well-typed [String] value
- * instead. This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- fun lastTransactionToken(lastTransactionToken: JsonField) = apply {
- this.lastTransactionToken = lastTransactionToken
- }
-
- /**
- * Funds not available for spend due to card authorizations or pending ACH release. Shown in
- * the currency's smallest unit (e.g., cents for USD)
- */
- fun pendingAmount(pendingAmount: Long) = pendingAmount(JsonField.of(pendingAmount))
-
- /**
- * Sets [Builder.pendingAmount] to an arbitrary JSON value.
- *
- * You should usually call [Builder.pendingAmount] with a well-typed [Long] value instead.
- * This method is primarily for setting the field to an undocumented or not yet supported
- * value.
- */
- fun pendingAmount(pendingAmount: JsonField) = apply {
- this.pendingAmount = pendingAmount
- }
-
- /**
- * The sum of available and pending balance in the currency's smallest unit (e.g., cents for
- * USD)
- */
- fun totalAmount(totalAmount: Long) = totalAmount(JsonField.of(totalAmount))
-
- /**
- * Sets [Builder.totalAmount] to an arbitrary JSON value.
- *
- * You should usually call [Builder.totalAmount] with a well-typed [Long] value instead.
- * This method is primarily for setting the field to an undocumented or not yet supported
- * value.
- */
- fun totalAmount(totalAmount: JsonField) = apply { this.totalAmount = totalAmount }
-
- /** Date and time for when the balance was last updated. */
- fun updated(updated: OffsetDateTime) = updated(JsonField.of(updated))
-
- /**
- * Sets [Builder.updated] to an arbitrary JSON value.
- *
- * You should usually call [Builder.updated] with a well-typed [OffsetDateTime] value
- * instead. This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- fun updated(updated: JsonField) = apply { this.updated = updated }
-
- 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 [AggregateBalanceListResponse].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .availableAmount()
- * .created()
- * .currency()
- * .lastCardToken()
- * .lastTransactionEventToken()
- * .lastTransactionToken()
- * .pendingAmount()
- * .totalAmount()
- * .updated()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): AggregateBalanceListResponse =
- AggregateBalanceListResponse(
- checkRequired("availableAmount", availableAmount),
- checkRequired("created", created),
- checkRequired("currency", currency),
- checkRequired("lastCardToken", lastCardToken),
- checkRequired("lastTransactionEventToken", lastTransactionEventToken),
- checkRequired("lastTransactionToken", lastTransactionToken),
- checkRequired("pendingAmount", pendingAmount),
- checkRequired("totalAmount", totalAmount),
- checkRequired("updated", updated),
- additionalProperties.toMutableMap(),
- )
- }
-
- private var validated: Boolean = false
-
- fun validate(): AggregateBalanceListResponse = apply {
- if (validated) {
- return@apply
- }
-
- availableAmount()
- created()
- currency()
- lastCardToken()
- lastTransactionEventToken()
- lastTransactionToken()
- pendingAmount()
- totalAmount()
- updated()
- 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 (availableAmount.asKnown().isPresent) 1 else 0) +
- (if (created.asKnown().isPresent) 1 else 0) +
- (if (currency.asKnown().isPresent) 1 else 0) +
- (if (lastCardToken.asKnown().isPresent) 1 else 0) +
- (if (lastTransactionEventToken.asKnown().isPresent) 1 else 0) +
- (if (lastTransactionToken.asKnown().isPresent) 1 else 0) +
- (if (pendingAmount.asKnown().isPresent) 1 else 0) +
- (if (totalAmount.asKnown().isPresent) 1 else 0) +
- (if (updated.asKnown().isPresent) 1 else 0)
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is AggregateBalanceListResponse &&
- availableAmount == other.availableAmount &&
- created == other.created &&
- currency == other.currency &&
- lastCardToken == other.lastCardToken &&
- lastTransactionEventToken == other.lastTransactionEventToken &&
- lastTransactionToken == other.lastTransactionToken &&
- pendingAmount == other.pendingAmount &&
- totalAmount == other.totalAmount &&
- updated == other.updated &&
- additionalProperties == other.additionalProperties
- }
-
- private val hashCode: Int by lazy {
- Objects.hash(
- availableAmount,
- created,
- currency,
- lastCardToken,
- lastTransactionEventToken,
- lastTransactionToken,
- pendingAmount,
- totalAmount,
- updated,
- additionalProperties,
- )
- }
-
- override fun hashCode(): Int = hashCode
-
- override fun toString() =
- "AggregateBalanceListResponse{availableAmount=$availableAmount, created=$created, currency=$currency, lastCardToken=$lastCardToken, lastTransactionEventToken=$lastTransactionEventToken, lastTransactionToken=$lastTransactionToken, pendingAmount=$pendingAmount, totalAmount=$totalAmount, updated=$updated, additionalProperties=$additionalProperties}"
-}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferRetryParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferRetryParams.kt
new file mode 100644
index 000000000..193e3c6de
--- /dev/null
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferRetryParams.kt
@@ -0,0 +1,455 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package com.lithic.api.models
+
+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.ExcludeMissing
+import com.lithic.api.core.JsonField
+import com.lithic.api.core.JsonMissing
+import com.lithic.api.core.JsonValue
+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 com.lithic.api.errors.LithicInvalidDataException
+import java.util.Collections
+import java.util.Objects
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+/** Retry a book transfer that has been declined */
+class BookTransferRetryParams
+private constructor(
+ private val bookTransferToken: String?,
+ private val body: RetryBookTransferRequest,
+ private val additionalHeaders: Headers,
+ private val additionalQueryParams: QueryParams,
+) : Params {
+
+ fun bookTransferToken(): Optional = Optional.ofNullable(bookTransferToken)
+
+ /**
+ * Customer-provided token that will serve as an idempotency token. This token will become the
+ * transaction token.
+ *
+ * @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 retryToken(): String = body.retryToken()
+
+ /**
+ * Returns the raw JSON value of [retryToken].
+ *
+ * Unlike [retryToken], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _retryToken(): JsonField = body._retryToken()
+
+ fun _additionalBodyProperties(): Map = body._additionalProperties()
+
+ /** Additional headers to send with the request. */
+ fun _additionalHeaders(): Headers = additionalHeaders
+
+ /** Additional query param to send with the request. */
+ fun _additionalQueryParams(): QueryParams = additionalQueryParams
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of [BookTransferRetryParams].
+ *
+ * The following fields are required:
+ * ```java
+ * .retryToken()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [BookTransferRetryParams]. */
+ class Builder internal constructor() {
+
+ private var bookTransferToken: String? = null
+ private var body: RetryBookTransferRequest.Builder = RetryBookTransferRequest.builder()
+ private var additionalHeaders: Headers.Builder = Headers.builder()
+ private var additionalQueryParams: QueryParams.Builder = QueryParams.builder()
+
+ @JvmSynthetic
+ internal fun from(bookTransferRetryParams: BookTransferRetryParams) = apply {
+ bookTransferToken = bookTransferRetryParams.bookTransferToken
+ body = bookTransferRetryParams.body.toBuilder()
+ additionalHeaders = bookTransferRetryParams.additionalHeaders.toBuilder()
+ additionalQueryParams = bookTransferRetryParams.additionalQueryParams.toBuilder()
+ }
+
+ fun bookTransferToken(bookTransferToken: String?) = apply {
+ this.bookTransferToken = bookTransferToken
+ }
+
+ /** Alias for calling [Builder.bookTransferToken] with `bookTransferToken.orElse(null)`. */
+ fun bookTransferToken(bookTransferToken: Optional) =
+ bookTransferToken(bookTransferToken.getOrNull())
+
+ /**
+ * Sets the entire request body.
+ *
+ * This is generally only useful if you are already constructing the body separately.
+ * Otherwise, it's more convenient to use the top-level setters instead:
+ * - [retryToken]
+ */
+ fun body(body: RetryBookTransferRequest) = apply { this.body = body.toBuilder() }
+
+ /**
+ * Customer-provided token that will serve as an idempotency token. This token will become
+ * the transaction token.
+ */
+ fun retryToken(retryToken: String) = apply { body.retryToken(retryToken) }
+
+ /**
+ * Sets [Builder.retryToken] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.retryToken] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun retryToken(retryToken: JsonField) = apply { body.retryToken(retryToken) }
+
+ fun additionalBodyProperties(additionalBodyProperties: Map) = apply {
+ body.additionalProperties(additionalBodyProperties)
+ }
+
+ fun putAdditionalBodyProperty(key: String, value: JsonValue) = apply {
+ body.putAdditionalProperty(key, value)
+ }
+
+ fun putAllAdditionalBodyProperties(additionalBodyProperties: Map) =
+ apply {
+ body.putAllAdditionalProperties(additionalBodyProperties)
+ }
+
+ fun removeAdditionalBodyProperty(key: String) = apply { body.removeAdditionalProperty(key) }
+
+ fun removeAllAdditionalBodyProperties(keys: Set) = apply {
+ body.removeAllAdditionalProperties(keys)
+ }
+
+ 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 [BookTransferRetryParams].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .retryToken()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): BookTransferRetryParams =
+ BookTransferRetryParams(
+ bookTransferToken,
+ body.build(),
+ additionalHeaders.build(),
+ additionalQueryParams.build(),
+ )
+ }
+
+ fun _body(): RetryBookTransferRequest = body
+
+ fun _pathParam(index: Int): String =
+ when (index) {
+ 0 -> bookTransferToken ?: ""
+ else -> ""
+ }
+
+ override fun _headers(): Headers = additionalHeaders
+
+ override fun _queryParams(): QueryParams = additionalQueryParams
+
+ class RetryBookTransferRequest
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val retryToken: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("retry_token")
+ @ExcludeMissing
+ retryToken: JsonField = JsonMissing.of()
+ ) : this(retryToken, mutableMapOf())
+
+ /**
+ * Customer-provided token that will serve as an idempotency token. This token will become
+ * the transaction token.
+ *
+ * @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 retryToken(): String = retryToken.getRequired("retry_token")
+
+ /**
+ * Returns the raw JSON value of [retryToken].
+ *
+ * Unlike [retryToken], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("retry_token")
+ @ExcludeMissing
+ fun _retryToken(): JsonField = retryToken
+
+ @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 [RetryBookTransferRequest].
+ *
+ * The following fields are required:
+ * ```java
+ * .retryToken()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [RetryBookTransferRequest]. */
+ class Builder internal constructor() {
+
+ private var retryToken: JsonField? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(retryBookTransferRequest: RetryBookTransferRequest) = apply {
+ retryToken = retryBookTransferRequest.retryToken
+ additionalProperties = retryBookTransferRequest.additionalProperties.toMutableMap()
+ }
+
+ /**
+ * Customer-provided token that will serve as an idempotency token. This token will
+ * become the transaction token.
+ */
+ fun retryToken(retryToken: String) = retryToken(JsonField.of(retryToken))
+
+ /**
+ * Sets [Builder.retryToken] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.retryToken] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun retryToken(retryToken: JsonField) = apply { this.retryToken = retryToken }
+
+ 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 [RetryBookTransferRequest].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .retryToken()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): RetryBookTransferRequest =
+ RetryBookTransferRequest(
+ checkRequired("retryToken", retryToken),
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): RetryBookTransferRequest = apply {
+ if (validated) {
+ return@apply
+ }
+
+ retryToken()
+ 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 (retryToken.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is RetryBookTransferRequest &&
+ retryToken == other.retryToken &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy { Objects.hash(retryToken, additionalProperties) }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "RetryBookTransferRequest{retryToken=$retryToken, additionalProperties=$additionalProperties}"
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is BookTransferRetryParams &&
+ bookTransferToken == other.bookTransferToken &&
+ body == other.body &&
+ additionalHeaders == other.additionalHeaders &&
+ additionalQueryParams == other.additionalQueryParams
+ }
+
+ override fun hashCode(): Int =
+ Objects.hash(bookTransferToken, body, additionalHeaders, additionalQueryParams)
+
+ override fun toString() =
+ "BookTransferRetryParams{bookTransferToken=$bookTransferToken, body=$body, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
+}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAggregateBalanceListPage.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAggregateBalanceListPage.kt
deleted file mode 100644
index a8bd2404a..000000000
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAggregateBalanceListPage.kt
+++ /dev/null
@@ -1,131 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.lithic.api.models
-
-import com.lithic.api.core.AutoPager
-import com.lithic.api.core.Page
-import com.lithic.api.core.checkRequired
-import com.lithic.api.services.blocking.cards.AggregateBalanceService
-import java.util.Objects
-import java.util.Optional
-import kotlin.jvm.optionals.getOrNull
-
-/** @see AggregateBalanceService.list */
-class CardAggregateBalanceListPage
-private constructor(
- private val service: AggregateBalanceService,
- private val params: CardAggregateBalanceListParams,
- private val response: CardAggregateBalanceListPageResponse,
-) : Page {
-
- /**
- * Delegates to [CardAggregateBalanceListPageResponse], but gracefully handles missing data.
- *
- * @see CardAggregateBalanceListPageResponse.data
- */
- fun data(): List =
- response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [CardAggregateBalanceListPageResponse], but gracefully handles missing data.
- *
- * @see CardAggregateBalanceListPageResponse.hasMore
- */
- fun hasMore(): Optional = response._hasMore().getOptional("has_more")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = false
-
- fun nextPageParams(): CardAggregateBalanceListParams =
- throw IllegalStateException("Cannot construct next page params")
-
- override fun nextPage(): CardAggregateBalanceListPage = service.list(nextPageParams())
-
- fun autoPager(): AutoPager = AutoPager.from(this)
-
- /** The parameters that were used to request this page. */
- fun params(): CardAggregateBalanceListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): CardAggregateBalanceListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of [CardAggregateBalanceListPage].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [CardAggregateBalanceListPage]. */
- class Builder internal constructor() {
-
- private var service: AggregateBalanceService? = null
- private var params: CardAggregateBalanceListParams? = null
- private var response: CardAggregateBalanceListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(cardAggregateBalanceListPage: CardAggregateBalanceListPage) = apply {
- service = cardAggregateBalanceListPage.service
- params = cardAggregateBalanceListPage.params
- response = cardAggregateBalanceListPage.response
- }
-
- fun service(service: AggregateBalanceService) = apply { this.service = service }
-
- /** The parameters that were used to request this page. */
- fun params(params: CardAggregateBalanceListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: CardAggregateBalanceListPageResponse) = apply {
- this.response = response
- }
-
- /**
- * Returns an immutable instance of [CardAggregateBalanceListPage].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): CardAggregateBalanceListPage =
- CardAggregateBalanceListPage(
- checkRequired("service", service),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is CardAggregateBalanceListPage &&
- service == other.service &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, params, response)
-
- override fun toString() =
- "CardAggregateBalanceListPage{service=$service, params=$params, response=$response}"
-}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAggregateBalanceListPageAsync.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAggregateBalanceListPageAsync.kt
deleted file mode 100644
index c19e55975..000000000
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAggregateBalanceListPageAsync.kt
+++ /dev/null
@@ -1,148 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.lithic.api.models
-
-import com.lithic.api.core.AutoPagerAsync
-import com.lithic.api.core.PageAsync
-import com.lithic.api.core.checkRequired
-import com.lithic.api.services.async.cards.AggregateBalanceServiceAsync
-import java.util.Objects
-import java.util.Optional
-import java.util.concurrent.CompletableFuture
-import java.util.concurrent.Executor
-import kotlin.jvm.optionals.getOrNull
-
-/** @see AggregateBalanceServiceAsync.list */
-class CardAggregateBalanceListPageAsync
-private constructor(
- private val service: AggregateBalanceServiceAsync,
- private val streamHandlerExecutor: Executor,
- private val params: CardAggregateBalanceListParams,
- private val response: CardAggregateBalanceListPageResponse,
-) : PageAsync {
-
- /**
- * Delegates to [CardAggregateBalanceListPageResponse], but gracefully handles missing data.
- *
- * @see CardAggregateBalanceListPageResponse.data
- */
- fun data(): List =
- response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [CardAggregateBalanceListPageResponse], but gracefully handles missing data.
- *
- * @see CardAggregateBalanceListPageResponse.hasMore
- */
- fun hasMore(): Optional = response._hasMore().getOptional("has_more")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = false
-
- fun nextPageParams(): CardAggregateBalanceListParams =
- throw IllegalStateException("Cannot construct next page params")
-
- override fun nextPage(): CompletableFuture =
- service.list(nextPageParams())
-
- fun autoPager(): AutoPagerAsync =
- AutoPagerAsync.from(this, streamHandlerExecutor)
-
- /** The parameters that were used to request this page. */
- fun params(): CardAggregateBalanceListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): CardAggregateBalanceListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of
- * [CardAggregateBalanceListPageAsync].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [CardAggregateBalanceListPageAsync]. */
- class Builder internal constructor() {
-
- private var service: AggregateBalanceServiceAsync? = null
- private var streamHandlerExecutor: Executor? = null
- private var params: CardAggregateBalanceListParams? = null
- private var response: CardAggregateBalanceListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(cardAggregateBalanceListPageAsync: CardAggregateBalanceListPageAsync) =
- apply {
- service = cardAggregateBalanceListPageAsync.service
- streamHandlerExecutor = cardAggregateBalanceListPageAsync.streamHandlerExecutor
- params = cardAggregateBalanceListPageAsync.params
- response = cardAggregateBalanceListPageAsync.response
- }
-
- fun service(service: AggregateBalanceServiceAsync) = apply { this.service = service }
-
- fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply {
- this.streamHandlerExecutor = streamHandlerExecutor
- }
-
- /** The parameters that were used to request this page. */
- fun params(params: CardAggregateBalanceListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: CardAggregateBalanceListPageResponse) = apply {
- this.response = response
- }
-
- /**
- * Returns an immutable instance of [CardAggregateBalanceListPageAsync].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): CardAggregateBalanceListPageAsync =
- CardAggregateBalanceListPageAsync(
- checkRequired("service", service),
- checkRequired("streamHandlerExecutor", streamHandlerExecutor),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is CardAggregateBalanceListPageAsync &&
- service == other.service &&
- streamHandlerExecutor == other.streamHandlerExecutor &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, streamHandlerExecutor, params, response)
-
- override fun toString() =
- "CardAggregateBalanceListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}"
-}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAggregateBalanceListPageResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAggregateBalanceListPageResponse.kt
deleted file mode 100644
index 2761c6ec1..000000000
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAggregateBalanceListPageResponse.kt
+++ /dev/null
@@ -1,234 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.lithic.api.models
-
-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.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.util.Collections
-import java.util.Objects
-import kotlin.jvm.optionals.getOrNull
-
-class CardAggregateBalanceListPageResponse
-@JsonCreator(mode = JsonCreator.Mode.DISABLED)
-private constructor(
- private val data: JsonField>,
- private val hasMore: JsonField,
- private val additionalProperties: MutableMap,
-) {
-
- @JsonCreator
- private constructor(
- @JsonProperty("data")
- @ExcludeMissing
- data: JsonField> = JsonMissing.of(),
- @JsonProperty("has_more") @ExcludeMissing hasMore: JsonField = JsonMissing.of(),
- ) : this(data, hasMore, mutableMapOf())
-
- /**
- * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
- * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
- */
- fun data(): List = data.getRequired("data")
-
- /**
- * More data exists.
- *
- * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
- * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
- */
- fun hasMore(): Boolean = hasMore.getRequired("has_more")
-
- /**
- * Returns the raw JSON value of [data].
- *
- * Unlike [data], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("data")
- @ExcludeMissing
- fun _data(): JsonField> = data
-
- /**
- * Returns the raw JSON value of [hasMore].
- *
- * Unlike [hasMore], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("has_more") @ExcludeMissing fun _hasMore(): JsonField = hasMore
-
- @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
- * [CardAggregateBalanceListPageResponse].
- *
- * The following fields are required:
- * ```java
- * .data()
- * .hasMore()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [CardAggregateBalanceListPageResponse]. */
- class Builder internal constructor() {
-
- private var data: JsonField>? = null
- private var hasMore: JsonField? = null
- private var additionalProperties: MutableMap = mutableMapOf()
-
- @JvmSynthetic
- internal fun from(
- cardAggregateBalanceListPageResponse: CardAggregateBalanceListPageResponse
- ) = apply {
- data = cardAggregateBalanceListPageResponse.data.map { it.toMutableList() }
- hasMore = cardAggregateBalanceListPageResponse.hasMore
- additionalProperties =
- cardAggregateBalanceListPageResponse.additionalProperties.toMutableMap()
- }
-
- fun data(data: List) = data(JsonField.of(data))
-
- /**
- * Sets [Builder.data] to an arbitrary JSON value.
- *
- * You should usually call [Builder.data] with a well-typed
- * `List` value instead. This method is primarily for setting
- * the field to an undocumented or not yet supported value.
- */
- fun data(data: JsonField>) = apply {
- this.data = data.map { it.toMutableList() }
- }
-
- /**
- * Adds a single [AggregateBalanceListResponse] to [Builder.data].
- *
- * @throws IllegalStateException if the field was previously set to a non-list.
- */
- fun addData(data: AggregateBalanceListResponse) = apply {
- this.data =
- (this.data ?: JsonField.of(mutableListOf())).also {
- checkKnown("data", it).add(data)
- }
- }
-
- /** More data exists. */
- fun hasMore(hasMore: Boolean) = hasMore(JsonField.of(hasMore))
-
- /**
- * Sets [Builder.hasMore] to an arbitrary JSON value.
- *
- * You should usually call [Builder.hasMore] with a well-typed [Boolean] value instead. This
- * method is primarily for setting the field to an undocumented or not yet supported value.
- */
- fun hasMore(hasMore: JsonField) = apply { this.hasMore = hasMore }
-
- 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 [CardAggregateBalanceListPageResponse].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .data()
- * .hasMore()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): CardAggregateBalanceListPageResponse =
- CardAggregateBalanceListPageResponse(
- checkRequired("data", data).map { it.toImmutable() },
- checkRequired("hasMore", hasMore),
- additionalProperties.toMutableMap(),
- )
- }
-
- private var validated: Boolean = false
-
- fun validate(): CardAggregateBalanceListPageResponse = apply {
- if (validated) {
- return@apply
- }
-
- data().forEach { it.validate() }
- hasMore()
- 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 =
- (data.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) +
- (if (hasMore.asKnown().isPresent) 1 else 0)
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is CardAggregateBalanceListPageResponse &&
- data == other.data &&
- hasMore == other.hasMore &&
- additionalProperties == other.additionalProperties
- }
-
- private val hashCode: Int by lazy { Objects.hash(data, hasMore, additionalProperties) }
-
- override fun hashCode(): Int = hashCode
-
- override fun toString() =
- "CardAggregateBalanceListPageResponse{data=$data, hasMore=$hasMore, additionalProperties=$additionalProperties}"
-}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AsaRequestWebhookEvent.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAuthorizationApprovalRequestWebhookEvent.kt
similarity index 96%
rename from lithic-java-core/src/main/kotlin/com/lithic/api/models/AsaRequestWebhookEvent.kt
rename to lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAuthorizationApprovalRequestWebhookEvent.kt
index 1aea2ef82..758a8889a 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AsaRequestWebhookEvent.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAuthorizationApprovalRequestWebhookEvent.kt
@@ -21,8 +21,7 @@ import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
-/** The Auth Stream Access request payload that was sent to the ASA responder. */
-class AsaRequestWebhookEvent
+class CardAuthorizationApprovalRequestWebhookEvent
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val token: JsonField,
@@ -34,6 +33,7 @@ private constructor(
private val cardholderCurrency: JsonField,
private val cashAmount: JsonField,
private val created: JsonField,
+ private val eventType: JsonField,
private val merchant: JsonField,
private val merchantAmount: JsonField,
private val merchantCurrency: JsonField,
@@ -75,6 +75,9 @@ private constructor(
@JsonProperty("created")
@ExcludeMissing
created: JsonField = JsonMissing.of(),
+ @JsonProperty("event_type")
+ @ExcludeMissing
+ eventType: JsonField = JsonMissing.of(),
@JsonProperty("merchant") @ExcludeMissing merchant: JsonField = JsonMissing.of(),
@JsonProperty("merchant_amount")
@ExcludeMissing
@@ -132,6 +135,7 @@ private constructor(
cardholderCurrency,
cashAmount,
created,
+ eventType,
merchant,
merchantAmount,
merchantCurrency,
@@ -233,6 +237,12 @@ private constructor(
*/
fun created(): OffsetDateTime = created.getRequired("created")
+ /**
+ * @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 eventType(): EventType = eventType.getRequired("event_type")
+
/**
* @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).
@@ -465,6 +475,13 @@ private constructor(
*/
@JsonProperty("created") @ExcludeMissing fun _created(): JsonField = created
+ /**
+ * Returns the raw JSON value of [eventType].
+ *
+ * Unlike [eventType], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("event_type") @ExcludeMissing fun _eventType(): JsonField = eventType
+
/**
* Returns the raw JSON value of [merchant].
*
@@ -640,7 +657,8 @@ private constructor(
companion object {
/**
- * Returns a mutable builder for constructing an instance of [AsaRequestWebhookEvent].
+ * Returns a mutable builder for constructing an instance of
+ * [CardAuthorizationApprovalRequestWebhookEvent].
*
* The following fields are required:
* ```java
@@ -653,6 +671,7 @@ private constructor(
* .cardholderCurrency()
* .cashAmount()
* .created()
+ * .eventType()
* .merchant()
* .merchantAmount()
* .merchantCurrency()
@@ -664,7 +683,7 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [AsaRequestWebhookEvent]. */
+ /** A builder for [CardAuthorizationApprovalRequestWebhookEvent]. */
class Builder internal constructor() {
private var token: JsonField? = null
@@ -676,6 +695,7 @@ private constructor(
private var cardholderCurrency: JsonField? = null
private var cashAmount: JsonField? = null
private var created: JsonField? = null
+ private var eventType: JsonField? = null
private var merchant: JsonField? = null
private var merchantAmount: JsonField? = null
private var merchantCurrency: JsonField? = null
@@ -698,36 +718,42 @@ private constructor(
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
- internal fun from(asaRequestWebhookEvent: AsaRequestWebhookEvent) = apply {
- token = asaRequestWebhookEvent.token
- acquirerFee = asaRequestWebhookEvent.acquirerFee
- amount = asaRequestWebhookEvent.amount
- authorizationAmount = asaRequestWebhookEvent.authorizationAmount
- avs = asaRequestWebhookEvent.avs
- card = asaRequestWebhookEvent.card
- cardholderCurrency = asaRequestWebhookEvent.cardholderCurrency
- cashAmount = asaRequestWebhookEvent.cashAmount
- created = asaRequestWebhookEvent.created
- merchant = asaRequestWebhookEvent.merchant
- merchantAmount = asaRequestWebhookEvent.merchantAmount
- merchantCurrency = asaRequestWebhookEvent.merchantCurrency
- settledAmount = asaRequestWebhookEvent.settledAmount
- status = asaRequestWebhookEvent.status
- transactionInitiator = asaRequestWebhookEvent.transactionInitiator
- accountType = asaRequestWebhookEvent.accountType
- cardholderAuthentication = asaRequestWebhookEvent.cardholderAuthentication
- cashback = asaRequestWebhookEvent.cashback
- conversionRate = asaRequestWebhookEvent.conversionRate
- eventToken = asaRequestWebhookEvent.eventToken
- fleetInfo = asaRequestWebhookEvent.fleetInfo
- latestChallenge = asaRequestWebhookEvent.latestChallenge
- network = asaRequestWebhookEvent.network
- networkRiskScore = asaRequestWebhookEvent.networkRiskScore
- networkSpecificData = asaRequestWebhookEvent.networkSpecificData
- pos = asaRequestWebhookEvent.pos
- tokenInfo = asaRequestWebhookEvent.tokenInfo
- ttl = asaRequestWebhookEvent.ttl
- additionalProperties = asaRequestWebhookEvent.additionalProperties.toMutableMap()
+ internal fun from(
+ cardAuthorizationApprovalRequestWebhookEvent:
+ CardAuthorizationApprovalRequestWebhookEvent
+ ) = apply {
+ token = cardAuthorizationApprovalRequestWebhookEvent.token
+ acquirerFee = cardAuthorizationApprovalRequestWebhookEvent.acquirerFee
+ amount = cardAuthorizationApprovalRequestWebhookEvent.amount
+ authorizationAmount = cardAuthorizationApprovalRequestWebhookEvent.authorizationAmount
+ avs = cardAuthorizationApprovalRequestWebhookEvent.avs
+ card = cardAuthorizationApprovalRequestWebhookEvent.card
+ cardholderCurrency = cardAuthorizationApprovalRequestWebhookEvent.cardholderCurrency
+ cashAmount = cardAuthorizationApprovalRequestWebhookEvent.cashAmount
+ created = cardAuthorizationApprovalRequestWebhookEvent.created
+ eventType = cardAuthorizationApprovalRequestWebhookEvent.eventType
+ merchant = cardAuthorizationApprovalRequestWebhookEvent.merchant
+ merchantAmount = cardAuthorizationApprovalRequestWebhookEvent.merchantAmount
+ merchantCurrency = cardAuthorizationApprovalRequestWebhookEvent.merchantCurrency
+ settledAmount = cardAuthorizationApprovalRequestWebhookEvent.settledAmount
+ status = cardAuthorizationApprovalRequestWebhookEvent.status
+ transactionInitiator = cardAuthorizationApprovalRequestWebhookEvent.transactionInitiator
+ accountType = cardAuthorizationApprovalRequestWebhookEvent.accountType
+ cardholderAuthentication =
+ cardAuthorizationApprovalRequestWebhookEvent.cardholderAuthentication
+ cashback = cardAuthorizationApprovalRequestWebhookEvent.cashback
+ conversionRate = cardAuthorizationApprovalRequestWebhookEvent.conversionRate
+ eventToken = cardAuthorizationApprovalRequestWebhookEvent.eventToken
+ fleetInfo = cardAuthorizationApprovalRequestWebhookEvent.fleetInfo
+ latestChallenge = cardAuthorizationApprovalRequestWebhookEvent.latestChallenge
+ network = cardAuthorizationApprovalRequestWebhookEvent.network
+ networkRiskScore = cardAuthorizationApprovalRequestWebhookEvent.networkRiskScore
+ networkSpecificData = cardAuthorizationApprovalRequestWebhookEvent.networkSpecificData
+ pos = cardAuthorizationApprovalRequestWebhookEvent.pos
+ tokenInfo = cardAuthorizationApprovalRequestWebhookEvent.tokenInfo
+ ttl = cardAuthorizationApprovalRequestWebhookEvent.ttl
+ additionalProperties =
+ cardAuthorizationApprovalRequestWebhookEvent.additionalProperties.toMutableMap()
}
/** The provisional transaction group uuid associated with the authorization */
@@ -857,6 +883,17 @@ private constructor(
*/
fun created(created: JsonField) = apply { this.created = created }
+ fun eventType(eventType: EventType) = eventType(JsonField.of(eventType))
+
+ /**
+ * Sets [Builder.eventType] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.eventType] with a well-typed [EventType] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun eventType(eventType: JsonField) = apply { this.eventType = eventType }
+
fun merchant(merchant: Merchant) = merchant(JsonField.of(merchant))
/**
@@ -1183,7 +1220,7 @@ private constructor(
}
/**
- * Returns an immutable instance of [AsaRequestWebhookEvent].
+ * Returns an immutable instance of [CardAuthorizationApprovalRequestWebhookEvent].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
@@ -1198,6 +1235,7 @@ private constructor(
* .cardholderCurrency()
* .cashAmount()
* .created()
+ * .eventType()
* .merchant()
* .merchantAmount()
* .merchantCurrency()
@@ -1208,8 +1246,8 @@ private constructor(
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): AsaRequestWebhookEvent =
- AsaRequestWebhookEvent(
+ fun build(): CardAuthorizationApprovalRequestWebhookEvent =
+ CardAuthorizationApprovalRequestWebhookEvent(
checkRequired("token", token),
checkRequired("acquirerFee", acquirerFee),
checkRequired("amount", amount),
@@ -1219,6 +1257,7 @@ private constructor(
checkRequired("cardholderCurrency", cardholderCurrency),
checkRequired("cashAmount", cashAmount),
checkRequired("created", created),
+ checkRequired("eventType", eventType),
checkRequired("merchant", merchant),
checkRequired("merchantAmount", merchantAmount),
checkRequired("merchantCurrency", merchantCurrency),
@@ -1244,7 +1283,7 @@ private constructor(
private var validated: Boolean = false
- fun validate(): AsaRequestWebhookEvent = apply {
+ fun validate(): CardAuthorizationApprovalRequestWebhookEvent = apply {
if (validated) {
return@apply
}
@@ -1258,6 +1297,7 @@ private constructor(
cardholderCurrency()
cashAmount()
created()
+ eventType().validate()
merchant().validate()
merchantAmount()
merchantCurrency()
@@ -1304,6 +1344,7 @@ private constructor(
(if (cardholderCurrency.asKnown().isPresent) 1 else 0) +
(if (cashAmount.asKnown().isPresent) 1 else 0) +
(if (created.asKnown().isPresent) 1 else 0) +
+ (eventType.asKnown().getOrNull()?.validity() ?: 0) +
(merchant.asKnown().getOrNull()?.validity() ?: 0) +
(if (merchantAmount.asKnown().isPresent) 1 else 0) +
(if (merchantCurrency.asKnown().isPresent) 1 else 0) +
@@ -2634,6 +2675,128 @@ private constructor(
"AsaRequestCard{token=$token, hostname=$hostname, lastFour=$lastFour, memo=$memo, spendLimit=$spendLimit, spendLimitDuration=$spendLimitDuration, state=$state, type=$type, additionalProperties=$additionalProperties}"
}
+ class EventType @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 CARD_AUTHORIZATION_APPROVAL_REQUEST = of("card_authorization.approval_request")
+
+ @JvmStatic fun of(value: String) = EventType(JsonField.of(value))
+ }
+
+ /** An enum containing [EventType]'s known values. */
+ enum class Known {
+ CARD_AUTHORIZATION_APPROVAL_REQUEST
+ }
+
+ /**
+ * An enum containing [EventType]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [EventType] 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 {
+ CARD_AUTHORIZATION_APPROVAL_REQUEST,
+ /**
+ * An enum member indicating that [EventType] 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) {
+ CARD_AUTHORIZATION_APPROVAL_REQUEST -> Value.CARD_AUTHORIZATION_APPROVAL_REQUEST
+ 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) {
+ CARD_AUTHORIZATION_APPROVAL_REQUEST -> Known.CARD_AUTHORIZATION_APPROVAL_REQUEST
+ else -> throw LithicInvalidDataException("Unknown EventType: $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(): EventType = 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 other is EventType && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
/**
* The type of authorization request that this request is for. Note that `CREDIT_AUTHORIZATION`
* and `FINANCIAL_CREDIT_AUTHORIZATION` is only available to users with credit decisioning via
@@ -7243,7 +7406,7 @@ private constructor(
return true
}
- return other is AsaRequestWebhookEvent &&
+ return other is CardAuthorizationApprovalRequestWebhookEvent &&
token == other.token &&
acquirerFee == other.acquirerFee &&
amount == other.amount &&
@@ -7253,6 +7416,7 @@ private constructor(
cardholderCurrency == other.cardholderCurrency &&
cashAmount == other.cashAmount &&
created == other.created &&
+ eventType == other.eventType &&
merchant == other.merchant &&
merchantAmount == other.merchantAmount &&
merchantCurrency == other.merchantCurrency &&
@@ -7286,6 +7450,7 @@ private constructor(
cardholderCurrency,
cashAmount,
created,
+ eventType,
merchant,
merchantAmount,
merchantCurrency,
@@ -7312,5 +7477,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "AsaRequestWebhookEvent{token=$token, acquirerFee=$acquirerFee, amount=$amount, authorizationAmount=$authorizationAmount, avs=$avs, card=$card, cardholderCurrency=$cardholderCurrency, cashAmount=$cashAmount, created=$created, merchant=$merchant, merchantAmount=$merchantAmount, merchantCurrency=$merchantCurrency, settledAmount=$settledAmount, status=$status, transactionInitiator=$transactionInitiator, accountType=$accountType, cardholderAuthentication=$cardholderAuthentication, cashback=$cashback, conversionRate=$conversionRate, eventToken=$eventToken, fleetInfo=$fleetInfo, latestChallenge=$latestChallenge, network=$network, networkRiskScore=$networkRiskScore, networkSpecificData=$networkSpecificData, pos=$pos, tokenInfo=$tokenInfo, ttl=$ttl, additionalProperties=$additionalProperties}"
+ "CardAuthorizationApprovalRequestWebhookEvent{token=$token, acquirerFee=$acquirerFee, amount=$amount, authorizationAmount=$authorizationAmount, avs=$avs, card=$card, cardholderCurrency=$cardholderCurrency, cashAmount=$cashAmount, created=$created, eventType=$eventType, merchant=$merchant, merchantAmount=$merchantAmount, merchantCurrency=$merchantCurrency, settledAmount=$settledAmount, status=$status, transactionInitiator=$transactionInitiator, accountType=$accountType, cardholderAuthentication=$cardholderAuthentication, cashback=$cashback, conversionRate=$conversionRate, eventToken=$eventToken, fleetInfo=$fleetInfo, latestChallenge=$latestChallenge, network=$network, networkRiskScore=$networkRiskScore, networkSpecificData=$networkSpecificData, pos=$pos, tokenInfo=$tokenInfo, ttl=$ttl, additionalProperties=$additionalProperties}"
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardWebProvisionParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardWebProvisionParams.kt
index 04df486dc..a3f1273f7 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardWebProvisionParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardWebProvisionParams.kt
@@ -22,7 +22,7 @@ import kotlin.jvm.optionals.getOrNull
/**
* Allow your cardholders to directly add payment cards to the device's digital wallet from a
- * browser on the web. Currently only suported for Apple Pay.
+ * browser on the web.
*
* This requires some additional setup and configuration. Please
* [Contact Us](https://lithic.com/contact) or your Customer Success representative for more
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalTokenizationActionParameters.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalTokenizationActionParameters.kt
index b7753b123..9d9781ec0 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalTokenizationActionParameters.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalTokenizationActionParameters.kt
@@ -1522,6 +1522,8 @@ private constructor(
* `TOO_MANY_RECENT_TOKENS`, `UNABLE_TO_ASSESS`.
* * `TOKEN_REQUESTOR_ID`: Unique identifier for the entity requesting the token.
* * `WALLET_TOKEN_STATUS`: The current status of the wallet token.
+ * * `CARD_STATE`: The state of the card being tokenized. Valid values are `CLOSED`, `OPEN`,
+ * `PAUSED`, `PENDING_ACTIVATION`, `PENDING_FULFILLMENT`.
*
* @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).
@@ -1642,6 +1644,8 @@ private constructor(
* `TOO_MANY_RECENT_ATTEMPTS`, `TOO_MANY_RECENT_TOKENS`, `UNABLE_TO_ASSESS`.
* * `TOKEN_REQUESTOR_ID`: Unique identifier for the entity requesting the token.
* * `WALLET_TOKEN_STATUS`: The current status of the wallet token.
+ * * `CARD_STATE`: The state of the card being tokenized. Valid values are `CLOSED`,
+ * `OPEN`, `PAUSED`, `PENDING_ACTIVATION`, `PENDING_FULFILLMENT`.
*/
fun attribute(attribute: Attribute) = attribute(JsonField.of(attribute))
@@ -1795,6 +1799,8 @@ private constructor(
* `TOO_MANY_RECENT_TOKENS`, `UNABLE_TO_ASSESS`.
* * `TOKEN_REQUESTOR_ID`: Unique identifier for the entity requesting the token.
* * `WALLET_TOKEN_STATUS`: The current status of the wallet token.
+ * * `CARD_STATE`: The state of the card being tokenized. Valid values are `CLOSED`, `OPEN`,
+ * `PAUSED`, `PENDING_ACTIVATION`, `PENDING_FULFILLMENT`.
*/
class Attribute @JsonCreator private constructor(private val value: JsonField) :
Enum {
@@ -1831,6 +1837,8 @@ private constructor(
@JvmField val WALLET_TOKEN_STATUS = of("WALLET_TOKEN_STATUS")
+ @JvmField val CARD_STATE = of("CARD_STATE")
+
@JvmStatic fun of(value: String) = Attribute(JsonField.of(value))
}
@@ -1846,6 +1854,7 @@ private constructor(
WALLET_RECOMMENDATION_REASONS,
TOKEN_REQUESTOR_ID,
WALLET_TOKEN_STATUS,
+ CARD_STATE,
}
/**
@@ -1868,6 +1877,7 @@ private constructor(
WALLET_RECOMMENDATION_REASONS,
TOKEN_REQUESTOR_ID,
WALLET_TOKEN_STATUS,
+ CARD_STATE,
/**
* An enum member indicating that [Attribute] was instantiated with an unknown
* value.
@@ -1894,6 +1904,7 @@ private constructor(
WALLET_RECOMMENDATION_REASONS -> Value.WALLET_RECOMMENDATION_REASONS
TOKEN_REQUESTOR_ID -> Value.TOKEN_REQUESTOR_ID
WALLET_TOKEN_STATUS -> Value.WALLET_TOKEN_STATUS
+ CARD_STATE -> Value.CARD_STATE
else -> Value._UNKNOWN
}
@@ -1918,6 +1929,7 @@ private constructor(
WALLET_RECOMMENDATION_REASONS -> Known.WALLET_RECOMMENDATION_REASONS
TOKEN_REQUESTOR_ID -> Known.TOKEN_REQUESTOR_ID
WALLET_TOKEN_STATUS -> Known.WALLET_TOKEN_STATUS
+ CARD_STATE -> Known.CARD_STATE
else -> throw LithicInvalidDataException("Unknown Attribute: $value")
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentCreateParams.kt
index 71dcbce80..db934b2b7 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentCreateParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentCreateParams.kt
@@ -61,6 +61,9 @@ private constructor(
fun paymentType(): ExternalPaymentDirection = body.paymentType()
/**
+ * Customer-provided token that will serve as an idempotency token. This token will become the
+ * transaction token.
+ *
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
@@ -270,6 +273,10 @@ private constructor(
body.paymentType(paymentType)
}
+ /**
+ * Customer-provided token that will serve as an idempotency token. This token will become
+ * the transaction token.
+ */
fun token(token: String) = apply { body.token(token) }
/**
@@ -548,6 +555,9 @@ private constructor(
fun paymentType(): ExternalPaymentDirection = paymentType.getRequired("payment_type")
/**
+ * Customer-provided token that will serve as an idempotency token. This token will become
+ * the transaction token.
+ *
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
@@ -774,6 +784,10 @@ private constructor(
this.paymentType = paymentType
}
+ /**
+ * Customer-provided token that will serve as an idempotency token. This token will
+ * become the transaction token.
+ */
fun token(token: String) = token(JsonField.of(token))
/**
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccount.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccount.kt
index edbbc859b..9d2201cfd 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccount.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccount.kt
@@ -29,11 +29,12 @@ private constructor(
private val isForBenefitOf: JsonField,
private val nickname: JsonField,
private val status: JsonField,
+ private val substatus: JsonField,
private val type: JsonField,
private val updated: JsonField,
+ private val userDefinedStatus: JsonField,
private val accountNumber: JsonField,
private val routingNumber: JsonField,
- private val substatus: JsonField,
private val additionalProperties: MutableMap,
) {
@@ -56,19 +57,22 @@ private constructor(
@JsonProperty("status")
@ExcludeMissing
status: JsonField = JsonMissing.of(),
+ @JsonProperty("substatus")
+ @ExcludeMissing
+ substatus: JsonField = JsonMissing.of(),
@JsonProperty("type") @ExcludeMissing type: JsonField = JsonMissing.of(),
@JsonProperty("updated")
@ExcludeMissing
updated: JsonField = JsonMissing.of(),
+ @JsonProperty("user_defined_status")
+ @ExcludeMissing
+ userDefinedStatus: JsonField = JsonMissing.of(),
@JsonProperty("account_number")
@ExcludeMissing
accountNumber: JsonField = JsonMissing.of(),
@JsonProperty("routing_number")
@ExcludeMissing
routingNumber: JsonField = JsonMissing.of(),
- @JsonProperty("substatus")
- @ExcludeMissing
- substatus: JsonField = JsonMissing.of(),
) : this(
token,
accountToken,
@@ -77,11 +81,12 @@ private constructor(
isForBenefitOf,
nickname,
status,
+ substatus,
type,
updated,
+ userDefinedStatus,
accountNumber,
routingNumber,
- substatus,
mutableMapOf(),
)
@@ -134,6 +139,14 @@ private constructor(
*/
fun status(): FinancialAccountStatus = status.getRequired("status")
+ /**
+ * Substatus for the financial account
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun substatus(): Optional = substatus.getOptional("substatus")
+
/**
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
@@ -147,24 +160,24 @@ private constructor(
fun updated(): OffsetDateTime = updated.getRequired("updated")
/**
+ * User-defined status for the financial account
+ *
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
- fun accountNumber(): Optional