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..f9404c375 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-854de7cc8f79e150ffe98f038ce9f39367010b2bdfffc9992be2738697dc4880.yml
+openapi_spec_hash: fd471b20f3eda1e00cdebf028cbfe867
+config_hash: 9dddee5f7af579864599849cb28a0770
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8d4795f3d..d7d77e10f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,23 @@
# Changelog
+## 0.115.0 (2025-12-23)
+
+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 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 WIRE_DRAWDOWN_REQUEST transfer type ([7d05a12](https://github.com/lithic-com/lithic-java/commit/7d05a12c19b115f9b3a7f7c410523e04c7a4c3c6))
+* **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))
+
+
+### Documentation
+
+* **api:** clarify description of token / retry_token when it serves as idempotency key ([7d05a12](https://github.com/lithic-com/lithic-java/commit/7d05a12c19b115f9b3a7f7c410523e04c7a4c3c6))
+
## 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/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/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/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/ManagementOperationCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationCreateParams.kt
index 1e8bb83aa..cb3200ded 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationCreateParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationCreateParams.kt
@@ -67,6 +67,9 @@ private constructor(
fun financialAccountToken(): String = body.financialAccountToken()
/**
+ * 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).
*/
@@ -313,6 +316,10 @@ private constructor(
body.financialAccountToken(financialAccountToken)
}
+ /**
+ * 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) }
/**
@@ -617,6 +624,9 @@ private constructor(
financialAccountToken.getRequired("financial_account_token")
/**
+ * 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).
*/
@@ -888,6 +898,10 @@ private constructor(
this.financialAccountToken = financialAccountToken
}
+ /**
+ * 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/Payment.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Payment.kt
index aa49240b6..5927991a5 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Payment.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Payment.kt
@@ -1442,6 +1442,7 @@ private constructor(
private val result: JsonField,
private val type: JsonField,
private val detailedResults: JsonField>,
+ private val externalId: JsonField,
private val additionalProperties: MutableMap,
) {
@@ -1459,7 +1460,10 @@ private constructor(
@JsonProperty("detailed_results")
@ExcludeMissing
detailedResults: JsonField> = JsonMissing.of(),
- ) : this(token, amount, created, result, type, detailedResults, mutableMapOf())
+ @JsonProperty("external_id")
+ @ExcludeMissing
+ externalId: JsonField = JsonMissing.of(),
+ ) : this(token, amount, created, result, type, detailedResults, externalId, mutableMapOf())
/**
* Globally unique identifier.
@@ -1533,6 +1537,14 @@ private constructor(
fun detailedResults(): Optional> =
detailedResults.getOptional("detailed_results")
+ /**
+ * Payment event external ID, for example, ACH trace number.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun externalId(): Optional = externalId.getOptional("external_id")
+
/**
* Returns the raw JSON value of [token].
*
@@ -1578,6 +1590,15 @@ private constructor(
@ExcludeMissing
fun _detailedResults(): JsonField> = detailedResults
+ /**
+ * Returns the raw JSON value of [externalId].
+ *
+ * Unlike [externalId], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("external_id")
+ @ExcludeMissing
+ fun _externalId(): JsonField = externalId
+
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
additionalProperties.put(key, value)
@@ -1616,6 +1637,7 @@ private constructor(
private var result: JsonField? = null
private var type: JsonField? = null
private var detailedResults: JsonField>? = null
+ private var externalId: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
@@ -1626,6 +1648,7 @@ private constructor(
result = paymentEvent.result
type = paymentEvent.type
detailedResults = paymentEvent.detailedResults.map { it.toMutableList() }
+ externalId = paymentEvent.externalId
additionalProperties = paymentEvent.additionalProperties.toMutableMap()
}
@@ -1745,6 +1768,21 @@ private constructor(
}
}
+ /** Payment event external ID, for example, ACH trace number. */
+ fun externalId(externalId: String?) = externalId(JsonField.ofNullable(externalId))
+
+ /** Alias for calling [Builder.externalId] with `externalId.orElse(null)`. */
+ fun externalId(externalId: Optional) = externalId(externalId.getOrNull())
+
+ /**
+ * Sets [Builder.externalId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.externalId] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun externalId(externalId: JsonField) = apply { this.externalId = externalId }
+
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -1788,6 +1826,7 @@ private constructor(
checkRequired("result", result),
checkRequired("type", type),
(detailedResults ?: JsonMissing.of()).map { it.toImmutable() },
+ externalId,
additionalProperties.toMutableMap(),
)
}
@@ -1805,6 +1844,7 @@ private constructor(
result().validate()
type().validate()
detailedResults().ifPresent { it.forEach { it.validate() } }
+ externalId()
validated = true
}
@@ -1829,7 +1869,8 @@ private constructor(
(if (created.asKnown().isPresent) 1 else 0) +
(result.asKnown().getOrNull()?.validity() ?: 0) +
(type.asKnown().getOrNull()?.validity() ?: 0) +
- (detailedResults.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0)
+ (detailedResults.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) +
+ (if (externalId.asKnown().isPresent) 1 else 0)
/**
* APPROVED financial events were successful while DECLINED financial events were declined
@@ -2368,6 +2409,7 @@ private constructor(
result == other.result &&
type == other.type &&
detailedResults == other.detailedResults &&
+ externalId == other.externalId &&
additionalProperties == other.additionalProperties
}
@@ -2379,6 +2421,7 @@ private constructor(
result,
type,
detailedResults,
+ externalId,
additionalProperties,
)
}
@@ -2386,7 +2429,7 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "PaymentEvent{token=$token, amount=$amount, created=$created, result=$result, type=$type, detailedResults=$detailedResults, additionalProperties=$additionalProperties}"
+ "PaymentEvent{token=$token, amount=$amount, created=$created, result=$result, type=$type, detailedResults=$detailedResults, externalId=$externalId, additionalProperties=$additionalProperties}"
}
/** PAYMENT - Payment Transaction */
@@ -4726,6 +4769,8 @@ private constructor(
@JvmField val WIRE_OUTBOUND_ADMIN = of("WIRE_OUTBOUND_ADMIN")
+ @JvmField val WIRE_DRAWDOWN_REQUEST = of("WIRE_DRAWDOWN_REQUEST")
+
@JvmStatic fun of(value: String) = TransferType(JsonField.of(value))
}
@@ -4739,6 +4784,7 @@ private constructor(
WIRE_INBOUND_ADMIN,
WIRE_OUTBOUND_PAYMENT,
WIRE_OUTBOUND_ADMIN,
+ WIRE_DRAWDOWN_REQUEST,
}
/**
@@ -4759,6 +4805,7 @@ private constructor(
WIRE_INBOUND_ADMIN,
WIRE_OUTBOUND_PAYMENT,
WIRE_OUTBOUND_ADMIN,
+ WIRE_DRAWDOWN_REQUEST,
/**
* An enum member indicating that [TransferType] was instantiated with an unknown value.
*/
@@ -4782,6 +4829,7 @@ private constructor(
WIRE_INBOUND_ADMIN -> Value.WIRE_INBOUND_ADMIN
WIRE_OUTBOUND_PAYMENT -> Value.WIRE_OUTBOUND_PAYMENT
WIRE_OUTBOUND_ADMIN -> Value.WIRE_OUTBOUND_ADMIN
+ WIRE_DRAWDOWN_REQUEST -> Value.WIRE_DRAWDOWN_REQUEST
else -> Value._UNKNOWN
}
@@ -4804,6 +4852,7 @@ private constructor(
WIRE_INBOUND_ADMIN -> Known.WIRE_INBOUND_ADMIN
WIRE_OUTBOUND_PAYMENT -> Known.WIRE_OUTBOUND_PAYMENT
WIRE_OUTBOUND_ADMIN -> Known.WIRE_OUTBOUND_ADMIN
+ WIRE_DRAWDOWN_REQUEST -> Known.WIRE_DRAWDOWN_REQUEST
else -> throw LithicInvalidDataException("Unknown TransferType: $value")
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListPage.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransferLimitListPage.kt
similarity index 50%
rename from lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListPage.kt
rename to lithic-java-core/src/main/kotlin/com/lithic/api/models/TransferLimitListPage.kt
index a51b20a72..a93b22981 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListPage.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransferLimitListPage.kt
@@ -5,57 +5,57 @@ 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.AggregateBalanceService
+import com.lithic.api.services.blocking.TransferLimitService
import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
-/** @see AggregateBalanceService.list */
-class AggregateBalanceListPage
+/** @see TransferLimitService.list */
+class TransferLimitListPage
private constructor(
- private val service: AggregateBalanceService,
- private val params: AggregateBalanceListParams,
- private val response: AggregateBalanceListPageResponse,
-) : Page {
+ private val service: TransferLimitService,
+ private val params: TransferLimitListParams,
+ private val response: TransferLimitsResponse,
+) : Page {
/**
- * Delegates to [AggregateBalanceListPageResponse], but gracefully handles missing data.
+ * Delegates to [TransferLimitsResponse], but gracefully handles missing data.
*
- * @see AggregateBalanceListPageResponse.data
+ * @see TransferLimitsResponse.data
*/
- fun data(): List =
+ fun data(): List =
response._data().getOptional("data").getOrNull() ?: emptyList()
/**
- * Delegates to [AggregateBalanceListPageResponse], but gracefully handles missing data.
+ * Delegates to [TransferLimitsResponse], but gracefully handles missing data.
*
- * @see AggregateBalanceListPageResponse.hasMore
+ * @see TransferLimitsResponse.hasMore
*/
fun hasMore(): Optional = response._hasMore().getOptional("has_more")
- override fun items(): List = data()
+ override fun items(): List = data()
override fun hasNextPage(): Boolean = false
- fun nextPageParams(): AggregateBalanceListParams =
+ fun nextPageParams(): TransferLimitListParams =
throw IllegalStateException("Cannot construct next page params")
- override fun nextPage(): AggregateBalanceListPage = service.list(nextPageParams())
+ override fun nextPage(): TransferLimitListPage = service.list(nextPageParams())
- fun autoPager(): AutoPager = AutoPager.from(this)
+ fun autoPager(): AutoPager = AutoPager.from(this)
/** The parameters that were used to request this page. */
- fun params(): AggregateBalanceListParams = params
+ fun params(): TransferLimitListParams = params
/** The response that this page was parsed from. */
- fun response(): AggregateBalanceListPageResponse = response
+ fun response(): TransferLimitsResponse = response
fun toBuilder() = Builder().from(this)
companion object {
/**
- * Returns a mutable builder for constructing an instance of [AggregateBalanceListPage].
+ * Returns a mutable builder for constructing an instance of [TransferLimitListPage].
*
* The following fields are required:
* ```java
@@ -67,32 +67,30 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [AggregateBalanceListPage]. */
+ /** A builder for [TransferLimitListPage]. */
class Builder internal constructor() {
- private var service: AggregateBalanceService? = null
- private var params: AggregateBalanceListParams? = null
- private var response: AggregateBalanceListPageResponse? = null
+ private var service: TransferLimitService? = null
+ private var params: TransferLimitListParams? = null
+ private var response: TransferLimitsResponse? = null
@JvmSynthetic
- internal fun from(aggregateBalanceListPage: AggregateBalanceListPage) = apply {
- service = aggregateBalanceListPage.service
- params = aggregateBalanceListPage.params
- response = aggregateBalanceListPage.response
+ internal fun from(transferLimitListPage: TransferLimitListPage) = apply {
+ service = transferLimitListPage.service
+ params = transferLimitListPage.params
+ response = transferLimitListPage.response
}
- fun service(service: AggregateBalanceService) = apply { this.service = service }
+ fun service(service: TransferLimitService) = apply { this.service = service }
/** The parameters that were used to request this page. */
- fun params(params: AggregateBalanceListParams) = apply { this.params = params }
+ fun params(params: TransferLimitListParams) = apply { this.params = params }
/** The response that this page was parsed from. */
- fun response(response: AggregateBalanceListPageResponse) = apply {
- this.response = response
- }
+ fun response(response: TransferLimitsResponse) = apply { this.response = response }
/**
- * Returns an immutable instance of [AggregateBalanceListPage].
+ * Returns an immutable instance of [TransferLimitListPage].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
@@ -105,8 +103,8 @@ private constructor(
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): AggregateBalanceListPage =
- AggregateBalanceListPage(
+ fun build(): TransferLimitListPage =
+ TransferLimitListPage(
checkRequired("service", service),
checkRequired("params", params),
checkRequired("response", response),
@@ -118,7 +116,7 @@ private constructor(
return true
}
- return other is AggregateBalanceListPage &&
+ return other is TransferLimitListPage &&
service == other.service &&
params == other.params &&
response == other.response
@@ -127,5 +125,5 @@ private constructor(
override fun hashCode(): Int = Objects.hash(service, params, response)
override fun toString() =
- "AggregateBalanceListPage{service=$service, params=$params, response=$response}"
+ "TransferLimitListPage{service=$service, params=$params, response=$response}"
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListPageAsync.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransferLimitListPageAsync.kt
similarity index 54%
rename from lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListPageAsync.kt
rename to lithic-java-core/src/main/kotlin/com/lithic/api/models/TransferLimitListPageAsync.kt
index ab18fd5fc..49c1e08dd 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListPageAsync.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransferLimitListPageAsync.kt
@@ -5,63 +5,62 @@ 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.AggregateBalanceServiceAsync
+import com.lithic.api.services.async.TransferLimitServiceAsync
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 AggregateBalanceListPageAsync
+/** @see TransferLimitServiceAsync.list */
+class TransferLimitListPageAsync
private constructor(
- private val service: AggregateBalanceServiceAsync,
+ private val service: TransferLimitServiceAsync,
private val streamHandlerExecutor: Executor,
- private val params: AggregateBalanceListParams,
- private val response: AggregateBalanceListPageResponse,
-) : PageAsync {
+ private val params: TransferLimitListParams,
+ private val response: TransferLimitsResponse,
+) : PageAsync {
/**
- * Delegates to [AggregateBalanceListPageResponse], but gracefully handles missing data.
+ * Delegates to [TransferLimitsResponse], but gracefully handles missing data.
*
- * @see AggregateBalanceListPageResponse.data
+ * @see TransferLimitsResponse.data
*/
- fun data(): List =
+ fun data(): List =
response._data().getOptional("data").getOrNull() ?: emptyList()
/**
- * Delegates to [AggregateBalanceListPageResponse], but gracefully handles missing data.
+ * Delegates to [TransferLimitsResponse], but gracefully handles missing data.
*
- * @see AggregateBalanceListPageResponse.hasMore
+ * @see TransferLimitsResponse.hasMore
*/
fun hasMore(): Optional = response._hasMore().getOptional("has_more")
- override fun items(): List = data()
+ override fun items(): List = data()
override fun hasNextPage(): Boolean = false
- fun nextPageParams(): AggregateBalanceListParams =
+ fun nextPageParams(): TransferLimitListParams =
throw IllegalStateException("Cannot construct next page params")
- override fun nextPage(): CompletableFuture =
+ override fun nextPage(): CompletableFuture =
service.list(nextPageParams())
- fun autoPager(): AutoPagerAsync =
+ fun autoPager(): AutoPagerAsync =
AutoPagerAsync.from(this, streamHandlerExecutor)
/** The parameters that were used to request this page. */
- fun params(): AggregateBalanceListParams = params
+ fun params(): TransferLimitListParams = params
/** The response that this page was parsed from. */
- fun response(): AggregateBalanceListPageResponse = response
+ fun response(): TransferLimitsResponse = response
fun toBuilder() = Builder().from(this)
companion object {
/**
- * Returns a mutable builder for constructing an instance of
- * [AggregateBalanceListPageAsync].
+ * Returns a mutable builder for constructing an instance of [TransferLimitListPageAsync].
*
* The following fields are required:
* ```java
@@ -74,38 +73,36 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [AggregateBalanceListPageAsync]. */
+ /** A builder for [TransferLimitListPageAsync]. */
class Builder internal constructor() {
- private var service: AggregateBalanceServiceAsync? = null
+ private var service: TransferLimitServiceAsync? = null
private var streamHandlerExecutor: Executor? = null
- private var params: AggregateBalanceListParams? = null
- private var response: AggregateBalanceListPageResponse? = null
+ private var params: TransferLimitListParams? = null
+ private var response: TransferLimitsResponse? = null
@JvmSynthetic
- internal fun from(aggregateBalanceListPageAsync: AggregateBalanceListPageAsync) = apply {
- service = aggregateBalanceListPageAsync.service
- streamHandlerExecutor = aggregateBalanceListPageAsync.streamHandlerExecutor
- params = aggregateBalanceListPageAsync.params
- response = aggregateBalanceListPageAsync.response
+ internal fun from(transferLimitListPageAsync: TransferLimitListPageAsync) = apply {
+ service = transferLimitListPageAsync.service
+ streamHandlerExecutor = transferLimitListPageAsync.streamHandlerExecutor
+ params = transferLimitListPageAsync.params
+ response = transferLimitListPageAsync.response
}
- fun service(service: AggregateBalanceServiceAsync) = apply { this.service = service }
+ fun service(service: TransferLimitServiceAsync) = apply { this.service = service }
fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply {
this.streamHandlerExecutor = streamHandlerExecutor
}
/** The parameters that were used to request this page. */
- fun params(params: AggregateBalanceListParams) = apply { this.params = params }
+ fun params(params: TransferLimitListParams) = apply { this.params = params }
/** The response that this page was parsed from. */
- fun response(response: AggregateBalanceListPageResponse) = apply {
- this.response = response
- }
+ fun response(response: TransferLimitsResponse) = apply { this.response = response }
/**
- * Returns an immutable instance of [AggregateBalanceListPageAsync].
+ * Returns an immutable instance of [TransferLimitListPageAsync].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
@@ -119,8 +116,8 @@ private constructor(
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): AggregateBalanceListPageAsync =
- AggregateBalanceListPageAsync(
+ fun build(): TransferLimitListPageAsync =
+ TransferLimitListPageAsync(
checkRequired("service", service),
checkRequired("streamHandlerExecutor", streamHandlerExecutor),
checkRequired("params", params),
@@ -133,7 +130,7 @@ private constructor(
return true
}
- return other is AggregateBalanceListPageAsync &&
+ return other is TransferLimitListPageAsync &&
service == other.service &&
streamHandlerExecutor == other.streamHandlerExecutor &&
params == other.params &&
@@ -143,5 +140,5 @@ private constructor(
override fun hashCode(): Int = Objects.hash(service, streamHandlerExecutor, params, response)
override fun toString() =
- "AggregateBalanceListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}"
+ "TransferLimitListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}"
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAggregateBalanceListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransferLimitListParams.kt
similarity index 63%
rename from lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAggregateBalanceListParams.kt
rename to lithic-java-core/src/main/kotlin/com/lithic/api/models/TransferLimitListParams.kt
index 8ca1d6388..7d17b95bf 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAggregateBalanceListParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransferLimitListParams.kt
@@ -5,24 +5,21 @@ package com.lithic.api.models
import com.lithic.api.core.Params
import com.lithic.api.core.http.Headers
import com.lithic.api.core.http.QueryParams
+import java.time.LocalDate
import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
-/** Get the aggregated card balance across all end-user accounts. */
-class CardAggregateBalanceListParams
+/** Get transfer limits for a specified date */
+class TransferLimitListParams
private constructor(
- private val accountToken: String?,
- private val businessAccountToken: String?,
+ private val date: LocalDate?,
private val additionalHeaders: Headers,
private val additionalQueryParams: QueryParams,
) : Params {
- /** Cardholder to retrieve aggregate balances for. */
- fun accountToken(): Optional = Optional.ofNullable(accountToken)
-
- /** Business to retrieve aggregate balances for. */
- fun businessAccountToken(): Optional = Optional.ofNullable(businessAccountToken)
+ /** Date for which to retrieve transfer limits (ISO 8601 format) */
+ fun date(): Optional = Optional.ofNullable(date)
/** Additional headers to send with the request. */
fun _additionalHeaders(): Headers = additionalHeaders
@@ -34,48 +31,31 @@ private constructor(
companion object {
- @JvmStatic fun none(): CardAggregateBalanceListParams = builder().build()
+ @JvmStatic fun none(): TransferLimitListParams = builder().build()
- /**
- * Returns a mutable builder for constructing an instance of
- * [CardAggregateBalanceListParams].
- */
+ /** Returns a mutable builder for constructing an instance of [TransferLimitListParams]. */
@JvmStatic fun builder() = Builder()
}
- /** A builder for [CardAggregateBalanceListParams]. */
+ /** A builder for [TransferLimitListParams]. */
class Builder internal constructor() {
- private var accountToken: String? = null
- private var businessAccountToken: String? = null
+ private var date: LocalDate? = null
private var additionalHeaders: Headers.Builder = Headers.builder()
private var additionalQueryParams: QueryParams.Builder = QueryParams.builder()
@JvmSynthetic
- internal fun from(cardAggregateBalanceListParams: CardAggregateBalanceListParams) = apply {
- accountToken = cardAggregateBalanceListParams.accountToken
- businessAccountToken = cardAggregateBalanceListParams.businessAccountToken
- additionalHeaders = cardAggregateBalanceListParams.additionalHeaders.toBuilder()
- additionalQueryParams = cardAggregateBalanceListParams.additionalQueryParams.toBuilder()
+ internal fun from(transferLimitListParams: TransferLimitListParams) = apply {
+ date = transferLimitListParams.date
+ additionalHeaders = transferLimitListParams.additionalHeaders.toBuilder()
+ additionalQueryParams = transferLimitListParams.additionalQueryParams.toBuilder()
}
- /** Cardholder to retrieve aggregate balances for. */
- fun accountToken(accountToken: String?) = apply { this.accountToken = accountToken }
-
- /** Alias for calling [Builder.accountToken] with `accountToken.orElse(null)`. */
- fun accountToken(accountToken: Optional) = accountToken(accountToken.getOrNull())
+ /** Date for which to retrieve transfer limits (ISO 8601 format) */
+ fun date(date: LocalDate?) = apply { this.date = date }
- /** Business to retrieve aggregate balances for. */
- fun businessAccountToken(businessAccountToken: String?) = apply {
- this.businessAccountToken = businessAccountToken
- }
-
- /**
- * Alias for calling [Builder.businessAccountToken] with
- * `businessAccountToken.orElse(null)`.
- */
- fun businessAccountToken(businessAccountToken: Optional) =
- businessAccountToken(businessAccountToken.getOrNull())
+ /** Alias for calling [Builder.date] with `date.orElse(null)`. */
+ fun date(date: Optional) = date(date.getOrNull())
fun additionalHeaders(additionalHeaders: Headers) = apply {
this.additionalHeaders.clear()
@@ -176,17 +156,12 @@ private constructor(
}
/**
- * Returns an immutable instance of [CardAggregateBalanceListParams].
+ * Returns an immutable instance of [TransferLimitListParams].
*
* Further updates to this [Builder] will not mutate the returned instance.
*/
- fun build(): CardAggregateBalanceListParams =
- CardAggregateBalanceListParams(
- accountToken,
- businessAccountToken,
- additionalHeaders.build(),
- additionalQueryParams.build(),
- )
+ fun build(): TransferLimitListParams =
+ TransferLimitListParams(date, additionalHeaders.build(), additionalQueryParams.build())
}
override fun _headers(): Headers = additionalHeaders
@@ -194,8 +169,7 @@ private constructor(
override fun _queryParams(): QueryParams =
QueryParams.builder()
.apply {
- accountToken?.let { put("account_token", it) }
- businessAccountToken?.let { put("business_account_token", it) }
+ date?.let { put("date", it.toString()) }
putAll(additionalQueryParams)
}
.build()
@@ -205,16 +179,14 @@ private constructor(
return true
}
- return other is CardAggregateBalanceListParams &&
- accountToken == other.accountToken &&
- businessAccountToken == other.businessAccountToken &&
+ return other is TransferLimitListParams &&
+ date == other.date &&
additionalHeaders == other.additionalHeaders &&
additionalQueryParams == other.additionalQueryParams
}
- override fun hashCode(): Int =
- Objects.hash(accountToken, businessAccountToken, additionalHeaders, additionalQueryParams)
+ override fun hashCode(): Int = Objects.hash(date, additionalHeaders, additionalQueryParams)
override fun toString() =
- "CardAggregateBalanceListParams{accountToken=$accountToken, businessAccountToken=$businessAccountToken, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
+ "TransferLimitListParams{date=$date, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransferLimitsResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransferLimitsResponse.kt
new file mode 100644
index 000000000..94ec2d979
--- /dev/null
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransferLimitsResponse.kt
@@ -0,0 +1,1050 @@
+// 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.time.LocalDate
+import java.util.Collections
+import java.util.Objects
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+class TransferLimitsResponse
+@JsonCreator(mode = JsonCreator.Mode.DISABLED)
+private constructor(
+ private val data: JsonField>,
+ private val hasMore: JsonField,
+ private val additionalProperties: MutableMap