diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 939bb1750..d61779f3c 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.113.0"
+ ".": "0.114.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index d8bf6f020..3f808b063 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 172
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-9791980619fc7ce8afb01f77dfe3c660a540975327378287cb666136ae4b0a99.yml
-openapi_spec_hash: 0752074b2a7b0534329a1e3176c94a62
-config_hash: aab05d0cf41f1f6b9f4d5677273c1600
+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
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0e08861ad..8d4795f3d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,43 @@
# Changelog
+## 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)
+
+### Features
+
+* **api:** add bulk card creation APIs ([713f81e](https://github.com/lithic-com/lithic-java/commit/713f81e8e58763762f07358edda1fe0b97a041dc))
+* **api:** Add event_streams to auth rules APIs ([d0cd057](https://github.com/lithic-com/lithic-java/commit/d0cd05742ef5c0bc6c3ac80b3f94a2ade0be2d24))
+* **api:** add Google WPP to SDKs ([a8c6766](https://github.com/lithic-com/lithic-java/commit/a8c67666f0575c873d3f8c0244c1f7747861ba98))
+* **api:** add IS_AFTER / IS_BEFORE operators to Auth Rule APIs ([a8c6766](https://github.com/lithic-com/lithic-java/commit/a8c67666f0575c873d3f8c0244c1f7747861ba98))
+* **api:** Add new fee types ([d0cd057](https://github.com/lithic-com/lithic-java/commit/d0cd05742ef5c0bc6c3ac80b3f94a2ade0be2d24))
+* **api:** Add optional ach_hold_period ([d0cd057](https://github.com/lithic-com/lithic-java/commit/d0cd05742ef5c0bc6c3ac80b3f94a2ade0be2d24))
+* **api:** add parse/parseUnsafe webhook helpers and event schemas ([3c51183](https://github.com/lithic-com/lithic-java/commit/3c51183f40c0bf1caaf325d6b4a192a8f9417278))
+* **api:** add WALLET_RECOMMENDATION_REASONS attribute for tokenization rules ([7545f9b](https://github.com/lithic-com/lithic-java/commit/7545f9b4a91eff8e057133d099cf5aeb489adf7d))
+* **api:** add webhook schemas to SDKs - add parse and parse_unsafe ([1bac5f3](https://github.com/lithic-com/lithic-java/commit/1bac5f34b5826b4d5e11f601a4347377e0e46722))
+* **api:** provide a unified model for AuthRule ([7545f9b](https://github.com/lithic-com/lithic-java/commit/7545f9b4a91eff8e057133d099cf5aeb489adf7d))
+* **api:** support event_streams in auth_rules list endpoint ([c6cb655](https://github.com/lithic-com/lithic-java/commit/c6cb6550c60fac0c4e412505e86ecd45a5ca6031))
+
+
+### Bug Fixes
+
+* **api:** extract several common types to reduce duplication ([713f81e](https://github.com/lithic-com/lithic-java/commit/713f81e8e58763762f07358edda1fe0b97a041dc))
+* **api:** fix examples in spec that were not fully valid ([7545f9b](https://github.com/lithic-com/lithic-java/commit/7545f9b4a91eff8e057133d099cf5aeb489adf7d))
+* **api:** make certain payoff fields nullable ([7545f9b](https://github.com/lithic-com/lithic-java/commit/7545f9b4a91eff8e057133d099cf5aeb489adf7d))
+* **client:** cancel okhttp call when future cancelled ([99c266a](https://github.com/lithic-com/lithic-java/commit/99c266a62f1b3fcd92ea9cf0ad56c5c5e130fd06))
+* fix auth rule conditional value parsing ([08fd371](https://github.com/lithic-com/lithic-java/commit/08fd3715052ba80f9df989fea7530c28ee55fbaf))
+
+
+### Chores
+
+* replace custom webhook signature verification with standardwebhooks ([1bac5f3](https://github.com/lithic-com/lithic-java/commit/1bac5f34b5826b4d5e11f601a4347377e0e46722))
+
+
+### Documentation
+
+* **api:** clarify error 422 for 3DS challenge response ([a8c6766](https://github.com/lithic-com/lithic-java/commit/a8c67666f0575c873d3f8c0244c1f7747861ba98))
+* remove `$` for better copy-pasteabality ([7c3897e](https://github.com/lithic-com/lithic-java/commit/7c3897e8506a633273f462ddd7964b92ace98d3f))
+
## 0.113.0 (2025-11-20)
Full Changelog: [v0.112.0...v0.113.0](https://github.com/lithic-com/lithic-java/compare/v0.112.0...v0.113.0)
diff --git a/README.md b/README.md
index 9e88223b2..0fa561515 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.113.0)
-[](https://javadoc.io/doc/com.lithic.api/lithic-java/0.113.0)
+[](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)
@@ -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.113.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.114.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.113.0")
+implementation("com.lithic.api:lithic-java:0.114.0")
```
### Maven
@@ -33,7 +33,7 @@ implementation("com.lithic.api:lithic-java:0.113.0")
com.lithic.api
lithic-java
- 0.113.0
+ 0.114.0
```
@@ -345,24 +345,59 @@ The SDK uses the standard [OkHttp logging interceptor](https://github.com/square
Enable logging by setting the `LITHIC_LOG` environment variable to `info`:
```sh
-$ export LITHIC_LOG=info
+export LITHIC_LOG=info
```
Or to `debug` for more verbose logging:
```sh
-$ export LITHIC_LOG=debug
+export LITHIC_LOG=debug
```
-## Webhook Verification
+## Webhooks
-We provide helper methods for verifying that a webhook request came from Lithic, and not a malicious third party.
+Lithic uses webhooks to notify your application when events happen. The SDK provides methods for verifying webhook signatures and parsing event payloads.
-You can use `lithic.webhooks().verifySignature(body, headers, secret?)` or `lithic.webhooks().unwrap(body, headers, secret?)`,
-both of which will raise an error if the signature is invalid.
+### Parsing and verifying webhooks
-Note that the "body" parameter must be the raw JSON string sent from the server (do not parse it first).
-The `.unwrap()` method can parse this JSON for you.
+Use `parse()` to verify the signature and return a typed event:
+
+```java
+import com.lithic.api.core.http.Headers;
+import com.lithic.api.models.ParsedWebhookEvent;
+
+// Convert request headers to Headers object
+Headers headers = Headers.builder().putAll(request.getHeaders()).build();
+
+// Verify signature and parse payload
+// Secret is optional if configured on client or set via LITHIC_WEBHOOK_SECRET env var
+ParsedWebhookEvent event = client.webhooks().parse(requestBody, headers, null);
+
+// Handle based on event type using isXxx() checks
+if (event.isCardCreated()) {
+ System.out.println("Card created: " + event.asCardCreated().cardToken());
+} else if (event.isCardTransactionUpdated()) {
+ String transactionToken = event.asCardTransactionUpdated().token();
+ System.out.println("Transaction updated: " + transactionToken);
+}
+
+```
+
+### Parsing without verification
+You can parse the webhook body without verifying the signature using `parseUnsafe()`. This is not recommended for production use:
+
+```
+// Parse only - skips signature verification (not recommended for production)
+ParsedWebhookEvent event = client.webhooks().parseUnsafe(body);
+```
+
+### Manual signature verification
+To verify the signature without parsing the body, use `verifySignature()`:
+
+```
+// Only verify signature, don't parse. Throws LithicException if signature is invalid
+client.webhooks().verifySignature(body, headers, null);
+```
## ProGuard and R8
@@ -546,6 +581,22 @@ CardCreateParams params = CardCreateParams.builder()
These can be accessed on the built object later using the `_additionalHeaders()`, `_additionalQueryParams()`, and `_additionalBodyProperties()` methods.
+To set undocumented parameters on _nested_ headers, query params, or body classes, call the `putAdditionalProperty` method on the nested class:
+
+```java
+import com.lithic.api.core.JsonValue;
+import com.lithic.api.models.CardCreateParams;
+import com.lithic.api.models.ShippingAddress;
+
+CardCreateParams params = CardCreateParams.builder()
+ .shippingAddress(ShippingAddress.builder()
+ .putAdditionalProperty("secretProperty", JsonValue.from("42"))
+ .build())
+ .build();
+```
+
+These properties can be accessed on the nested built object later using the `_additionalProperties()` method.
+
To set a documented parameter or property to an undocumented or not yet supported _value_, pass a [`JsonValue`](lithic-java-core/src/main/kotlin/com/lithic/api/core/Values.kt) object to its setter:
```java
diff --git a/build.gradle.kts b/build.gradle.kts
index ee8a549d7..ec3bd95e1 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.lithic.api"
- version = "0.113.0" // x-release-please-version
+ version = "0.114.0" // x-release-please-version
}
subprojects {
diff --git a/lithic-java-client-okhttp/build.gradle.kts b/lithic-java-client-okhttp/build.gradle.kts
index 5211494ba..0d61bae34 100644
--- a/lithic-java-client-okhttp/build.gradle.kts
+++ b/lithic-java-client-okhttp/build.gradle.kts
@@ -11,4 +11,5 @@ dependencies {
testImplementation(kotlin("test"))
testImplementation("org.assertj:assertj-core:3.25.3")
+ testImplementation("com.github.tomakehurst:wiremock-jre8:2.35.2")
}
diff --git a/lithic-java-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/OkHttpClient.kt b/lithic-java-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/OkHttpClient.kt
index d4e9564d6..1b37107b8 100644
--- a/lithic-java-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/OkHttpClient.kt
+++ b/lithic-java-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/OkHttpClient.kt
@@ -13,6 +13,7 @@ import java.io.IOException
import java.io.InputStream
import java.net.Proxy
import java.time.Duration
+import java.util.concurrent.CancellationException
import java.util.concurrent.CompletableFuture
import javax.net.ssl.HostnameVerifier
import javax.net.ssl.SSLSocketFactory
@@ -29,8 +30,8 @@ import okhttp3.Response
import okhttp3.logging.HttpLoggingInterceptor
import okio.BufferedSink
-class OkHttpClient private constructor(private val okHttpClient: okhttp3.OkHttpClient) :
- HttpClient {
+class OkHttpClient
+private constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClient) : HttpClient {
override fun execute(request: HttpRequest, requestOptions: RequestOptions): HttpResponse {
val call = newCall(request, requestOptions)
@@ -50,20 +51,25 @@ class OkHttpClient private constructor(private val okHttpClient: okhttp3.OkHttpC
): CompletableFuture {
val future = CompletableFuture()
- request.body?.run { future.whenComplete { _, _ -> close() } }
-
- newCall(request, requestOptions)
- .enqueue(
- object : Callback {
- override fun onResponse(call: Call, response: Response) {
- future.complete(response.toResponse())
- }
+ val call = newCall(request, requestOptions)
+ call.enqueue(
+ object : Callback {
+ override fun onResponse(call: Call, response: Response) {
+ future.complete(response.toResponse())
+ }
- override fun onFailure(call: Call, e: IOException) {
- future.completeExceptionally(LithicIoException("Request failed", e))
- }
+ override fun onFailure(call: Call, e: IOException) {
+ future.completeExceptionally(LithicIoException("Request failed", e))
}
- )
+ }
+ )
+
+ future.whenComplete { _, e ->
+ if (e is CancellationException) {
+ call.cancel()
+ }
+ request.body?.close()
+ }
return future
}
diff --git a/lithic-java-client-okhttp/src/test/kotlin/com/lithic/api/client/okhttp/OkHttpClientTest.kt b/lithic-java-client-okhttp/src/test/kotlin/com/lithic/api/client/okhttp/OkHttpClientTest.kt
new file mode 100644
index 000000000..419166765
--- /dev/null
+++ b/lithic-java-client-okhttp/src/test/kotlin/com/lithic/api/client/okhttp/OkHttpClientTest.kt
@@ -0,0 +1,44 @@
+package com.lithic.api.client.okhttp
+
+import com.github.tomakehurst.wiremock.client.WireMock.*
+import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo
+import com.github.tomakehurst.wiremock.junit5.WireMockTest
+import com.lithic.api.core.http.HttpMethod
+import com.lithic.api.core.http.HttpRequest
+import org.assertj.core.api.Assertions.assertThat
+import org.junit.jupiter.api.BeforeEach
+import org.junit.jupiter.api.Test
+import org.junit.jupiter.api.parallel.ResourceLock
+
+@WireMockTest
+@ResourceLock("https://github.com/wiremock/wiremock/issues/169")
+internal class OkHttpClientTest {
+
+ private lateinit var baseUrl: String
+ private lateinit var httpClient: OkHttpClient
+
+ @BeforeEach
+ fun beforeEach(wmRuntimeInfo: WireMockRuntimeInfo) {
+ baseUrl = wmRuntimeInfo.httpBaseUrl
+ httpClient = OkHttpClient.builder().build()
+ }
+
+ @Test
+ fun executeAsync_whenFutureCancelled_cancelsUnderlyingCall() {
+ stubFor(post(urlPathEqualTo("/something")).willReturn(ok()))
+ val responseFuture =
+ httpClient.executeAsync(
+ HttpRequest.builder()
+ .method(HttpMethod.POST)
+ .baseUrl(baseUrl)
+ .addPathSegment("something")
+ .build()
+ )
+ val call = httpClient.okHttpClient.dispatcher.runningCalls().single()
+
+ responseFuture.cancel(false)
+
+ // Should have cancelled the underlying call
+ assertThat(call.isCanceled()).isTrue()
+ }
+}
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 4d7561aea..eb7b7ff11 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
@@ -16,6 +16,7 @@ import com.lithic.api.services.blocking.AuthRuleService
import com.lithic.api.services.blocking.AuthStreamEnrollmentService
import com.lithic.api.services.blocking.BalanceService
import com.lithic.api.services.blocking.BookTransferService
+import com.lithic.api.services.blocking.CardBulkOrderService
import com.lithic.api.services.blocking.CardProgramService
import com.lithic.api.services.blocking.CardService
import com.lithic.api.services.blocking.CreditProductService
@@ -28,6 +29,7 @@ import com.lithic.api.services.blocking.ExternalPaymentService
import com.lithic.api.services.blocking.FinancialAccountService
import com.lithic.api.services.blocking.FraudService
import com.lithic.api.services.blocking.FundingEventService
+import com.lithic.api.services.blocking.InternalTransactionService
import com.lithic.api.services.blocking.ManagementOperationService
import com.lithic.api.services.blocking.NetworkProgramService
import com.lithic.api.services.blocking.PaymentService
@@ -91,6 +93,8 @@ interface LithicClient {
fun cards(): CardService
+ fun cardBulkOrders(): CardBulkOrderService
+
fun balances(): BalanceService
fun aggregateBalances(): AggregateBalanceService
@@ -109,8 +113,6 @@ interface LithicClient {
fun responderEndpoints(): ResponderEndpointService
- fun webhooks(): WebhookService
-
fun externalBankAccounts(): ExternalBankAccountService
fun payments(): PaymentService
@@ -131,6 +133,8 @@ interface LithicClient {
fun managementOperations(): ManagementOperationService
+ fun internalTransaction(): InternalTransactionService
+
fun fundingEvents(): FundingEventService
fun fraud(): FraudService
@@ -139,6 +143,8 @@ interface LithicClient {
fun accountActivity(): AccountActivityService
+ fun webhooks(): WebhookService
+
/** Status of api */
fun apiStatus(): ApiStatus = apiStatus(ClientApiStatusParams.none())
@@ -193,6 +199,8 @@ interface LithicClient {
fun cards(): CardService.WithRawResponse
+ fun cardBulkOrders(): CardBulkOrderService.WithRawResponse
+
fun balances(): BalanceService.WithRawResponse
fun aggregateBalances(): AggregateBalanceService.WithRawResponse
@@ -231,6 +239,8 @@ interface LithicClient {
fun managementOperations(): ManagementOperationService.WithRawResponse
+ fun internalTransaction(): InternalTransactionService.WithRawResponse
+
fun fundingEvents(): FundingEventService.WithRawResponse
fun fraud(): FraudService.WithRawResponse
@@ -239,6 +249,8 @@ interface LithicClient {
fun accountActivity(): AccountActivityService.WithRawResponse
+ fun webhooks(): WebhookService.WithRawResponse
+
/**
* Returns a raw HTTP response for `get /v1/status`, but is otherwise the same as
* [LithicClient.apiStatus].
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsync.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsync.kt
index e8aa12038..982132d5b 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
@@ -15,6 +15,7 @@ import com.lithic.api.services.async.AuthRuleServiceAsync
import com.lithic.api.services.async.AuthStreamEnrollmentServiceAsync
import com.lithic.api.services.async.BalanceServiceAsync
import com.lithic.api.services.async.BookTransferServiceAsync
+import com.lithic.api.services.async.CardBulkOrderServiceAsync
import com.lithic.api.services.async.CardProgramServiceAsync
import com.lithic.api.services.async.CardServiceAsync
import com.lithic.api.services.async.CreditProductServiceAsync
@@ -27,6 +28,7 @@ import com.lithic.api.services.async.ExternalPaymentServiceAsync
import com.lithic.api.services.async.FinancialAccountServiceAsync
import com.lithic.api.services.async.FraudServiceAsync
import com.lithic.api.services.async.FundingEventServiceAsync
+import com.lithic.api.services.async.InternalTransactionServiceAsync
import com.lithic.api.services.async.ManagementOperationServiceAsync
import com.lithic.api.services.async.NetworkProgramServiceAsync
import com.lithic.api.services.async.PaymentServiceAsync
@@ -91,6 +93,8 @@ interface LithicClientAsync {
fun cards(): CardServiceAsync
+ fun cardBulkOrders(): CardBulkOrderServiceAsync
+
fun balances(): BalanceServiceAsync
fun aggregateBalances(): AggregateBalanceServiceAsync
@@ -109,8 +113,6 @@ interface LithicClientAsync {
fun responderEndpoints(): ResponderEndpointServiceAsync
- fun webhooks(): WebhookServiceAsync
-
fun externalBankAccounts(): ExternalBankAccountServiceAsync
fun payments(): PaymentServiceAsync
@@ -131,6 +133,8 @@ interface LithicClientAsync {
fun managementOperations(): ManagementOperationServiceAsync
+ fun internalTransaction(): InternalTransactionServiceAsync
+
fun fundingEvents(): FundingEventServiceAsync
fun fraud(): FraudServiceAsync
@@ -139,6 +143,8 @@ interface LithicClientAsync {
fun accountActivity(): AccountActivityServiceAsync
+ fun webhooks(): WebhookServiceAsync
+
/** Status of api */
fun apiStatus(): CompletableFuture = apiStatus(ClientApiStatusParams.none())
@@ -196,6 +202,8 @@ interface LithicClientAsync {
fun cards(): CardServiceAsync.WithRawResponse
+ fun cardBulkOrders(): CardBulkOrderServiceAsync.WithRawResponse
+
fun balances(): BalanceServiceAsync.WithRawResponse
fun aggregateBalances(): AggregateBalanceServiceAsync.WithRawResponse
@@ -234,6 +242,8 @@ interface LithicClientAsync {
fun managementOperations(): ManagementOperationServiceAsync.WithRawResponse
+ fun internalTransaction(): InternalTransactionServiceAsync.WithRawResponse
+
fun fundingEvents(): FundingEventServiceAsync.WithRawResponse
fun fraud(): FraudServiceAsync.WithRawResponse
@@ -242,6 +252,8 @@ interface LithicClientAsync {
fun accountActivity(): AccountActivityServiceAsync.WithRawResponse
+ fun webhooks(): WebhookServiceAsync.WithRawResponse
+
/**
* Returns a raw HTTP response for `get /v1/status`, but is otherwise the same as
* [LithicClientAsync.apiStatus].
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsyncImpl.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsyncImpl.kt
index ec4117127..b757af652 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
@@ -33,6 +33,8 @@ import com.lithic.api.services.async.BalanceServiceAsync
import com.lithic.api.services.async.BalanceServiceAsyncImpl
import com.lithic.api.services.async.BookTransferServiceAsync
import com.lithic.api.services.async.BookTransferServiceAsyncImpl
+import com.lithic.api.services.async.CardBulkOrderServiceAsync
+import com.lithic.api.services.async.CardBulkOrderServiceAsyncImpl
import com.lithic.api.services.async.CardProgramServiceAsync
import com.lithic.api.services.async.CardProgramServiceAsyncImpl
import com.lithic.api.services.async.CardServiceAsync
@@ -57,6 +59,8 @@ import com.lithic.api.services.async.FraudServiceAsync
import com.lithic.api.services.async.FraudServiceAsyncImpl
import com.lithic.api.services.async.FundingEventServiceAsync
import com.lithic.api.services.async.FundingEventServiceAsyncImpl
+import com.lithic.api.services.async.InternalTransactionServiceAsync
+import com.lithic.api.services.async.InternalTransactionServiceAsyncImpl
import com.lithic.api.services.async.ManagementOperationServiceAsync
import com.lithic.api.services.async.ManagementOperationServiceAsyncImpl
import com.lithic.api.services.async.NetworkProgramServiceAsync
@@ -125,6 +129,10 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
private val cards: CardServiceAsync by lazy { CardServiceAsyncImpl(clientOptionsWithUserAgent) }
+ private val cardBulkOrders: CardBulkOrderServiceAsync by lazy {
+ CardBulkOrderServiceAsyncImpl(clientOptionsWithUserAgent)
+ }
+
private val balances: BalanceServiceAsync by lazy {
BalanceServiceAsyncImpl(clientOptionsWithUserAgent)
}
@@ -161,8 +169,6 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
ResponderEndpointServiceAsyncImpl(clientOptionsWithUserAgent)
}
- private val webhooks: WebhookServiceAsync by lazy { WebhookServiceAsyncImpl(clientOptions) }
-
private val externalBankAccounts: ExternalBankAccountServiceAsync by lazy {
ExternalBankAccountServiceAsyncImpl(clientOptionsWithUserAgent)
}
@@ -203,6 +209,10 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
ManagementOperationServiceAsyncImpl(clientOptionsWithUserAgent)
}
+ private val internalTransaction: InternalTransactionServiceAsync by lazy {
+ InternalTransactionServiceAsyncImpl(clientOptionsWithUserAgent)
+ }
+
private val fundingEvents: FundingEventServiceAsync by lazy {
FundingEventServiceAsyncImpl(clientOptionsWithUserAgent)
}
@@ -219,6 +229,10 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
AccountActivityServiceAsyncImpl(clientOptionsWithUserAgent)
}
+ private val webhooks: WebhookServiceAsync by lazy {
+ WebhookServiceAsyncImpl(clientOptionsWithUserAgent)
+ }
+
override fun sync(): LithicClient = sync
override fun withRawResponse(): LithicClientAsync.WithRawResponse = withRawResponse
@@ -241,6 +255,8 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
override fun cards(): CardServiceAsync = cards
+ override fun cardBulkOrders(): CardBulkOrderServiceAsync = cardBulkOrders
+
override fun balances(): BalanceServiceAsync = balances
override fun aggregateBalances(): AggregateBalanceServiceAsync = aggregateBalances
@@ -259,8 +275,6 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
override fun responderEndpoints(): ResponderEndpointServiceAsync = responderEndpoints
- override fun webhooks(): WebhookServiceAsync = webhooks
-
override fun externalBankAccounts(): ExternalBankAccountServiceAsync = externalBankAccounts
override fun payments(): PaymentServiceAsync = payments
@@ -281,6 +295,8 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
override fun managementOperations(): ManagementOperationServiceAsync = managementOperations
+ override fun internalTransaction(): InternalTransactionServiceAsync = internalTransaction
+
override fun fundingEvents(): FundingEventServiceAsync = fundingEvents
override fun fraud(): FraudServiceAsync = fraud
@@ -289,6 +305,8 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
override fun accountActivity(): AccountActivityServiceAsync = accountActivity
+ override fun webhooks(): WebhookServiceAsync = webhooks
+
override fun apiStatus(
params: ClientApiStatusParams,
requestOptions: RequestOptions,
@@ -333,6 +351,10 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
CardServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}
+ private val cardBulkOrders: CardBulkOrderServiceAsync.WithRawResponse by lazy {
+ CardBulkOrderServiceAsyncImpl.WithRawResponseImpl(clientOptions)
+ }
+
private val balances: BalanceServiceAsync.WithRawResponse by lazy {
BalanceServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}
@@ -409,6 +431,10 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
ManagementOperationServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}
+ private val internalTransaction: InternalTransactionServiceAsync.WithRawResponse by lazy {
+ InternalTransactionServiceAsyncImpl.WithRawResponseImpl(clientOptions)
+ }
+
private val fundingEvents: FundingEventServiceAsync.WithRawResponse by lazy {
FundingEventServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}
@@ -425,6 +451,10 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
AccountActivityServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}
+ private val webhooks: WebhookServiceAsync.WithRawResponse by lazy {
+ WebhookServiceAsyncImpl.WithRawResponseImpl(clientOptions)
+ }
+
override fun withOptions(
modifier: Consumer
): LithicClientAsync.WithRawResponse =
@@ -448,6 +478,8 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
override fun cards(): CardServiceAsync.WithRawResponse = cards
+ override fun cardBulkOrders(): CardBulkOrderServiceAsync.WithRawResponse = cardBulkOrders
+
override fun balances(): BalanceServiceAsync.WithRawResponse = balances
override fun aggregateBalances(): AggregateBalanceServiceAsync.WithRawResponse =
@@ -492,6 +524,9 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
override fun managementOperations(): ManagementOperationServiceAsync.WithRawResponse =
managementOperations
+ override fun internalTransaction(): InternalTransactionServiceAsync.WithRawResponse =
+ internalTransaction
+
override fun fundingEvents(): FundingEventServiceAsync.WithRawResponse = fundingEvents
override fun fraud(): FraudServiceAsync.WithRawResponse = fraud
@@ -501,6 +536,8 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
override fun accountActivity(): AccountActivityServiceAsync.WithRawResponse =
accountActivity
+ override fun webhooks(): WebhookServiceAsync.WithRawResponse = webhooks
+
private val apiStatusHandler: Handler =
jsonHandler(clientOptions.jsonMapper)
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 f3e4589f0..eb652dd00 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
@@ -33,6 +33,8 @@ import com.lithic.api.services.blocking.BalanceService
import com.lithic.api.services.blocking.BalanceServiceImpl
import com.lithic.api.services.blocking.BookTransferService
import com.lithic.api.services.blocking.BookTransferServiceImpl
+import com.lithic.api.services.blocking.CardBulkOrderService
+import com.lithic.api.services.blocking.CardBulkOrderServiceImpl
import com.lithic.api.services.blocking.CardProgramService
import com.lithic.api.services.blocking.CardProgramServiceImpl
import com.lithic.api.services.blocking.CardService
@@ -57,6 +59,8 @@ import com.lithic.api.services.blocking.FraudService
import com.lithic.api.services.blocking.FraudServiceImpl
import com.lithic.api.services.blocking.FundingEventService
import com.lithic.api.services.blocking.FundingEventServiceImpl
+import com.lithic.api.services.blocking.InternalTransactionService
+import com.lithic.api.services.blocking.InternalTransactionServiceImpl
import com.lithic.api.services.blocking.ManagementOperationService
import com.lithic.api.services.blocking.ManagementOperationServiceImpl
import com.lithic.api.services.blocking.NetworkProgramService
@@ -122,6 +126,10 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
private val cards: CardService by lazy { CardServiceImpl(clientOptionsWithUserAgent) }
+ private val cardBulkOrders: CardBulkOrderService by lazy {
+ CardBulkOrderServiceImpl(clientOptionsWithUserAgent)
+ }
+
private val balances: BalanceService by lazy { BalanceServiceImpl(clientOptionsWithUserAgent) }
private val aggregateBalances: AggregateBalanceService by lazy {
@@ -152,8 +160,6 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
ResponderEndpointServiceImpl(clientOptionsWithUserAgent)
}
- private val webhooks: WebhookService by lazy { WebhookServiceImpl(clientOptions) }
-
private val externalBankAccounts: ExternalBankAccountService by lazy {
ExternalBankAccountServiceImpl(clientOptionsWithUserAgent)
}
@@ -188,6 +194,10 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
ManagementOperationServiceImpl(clientOptionsWithUserAgent)
}
+ private val internalTransaction: InternalTransactionService by lazy {
+ InternalTransactionServiceImpl(clientOptionsWithUserAgent)
+ }
+
private val fundingEvents: FundingEventService by lazy {
FundingEventServiceImpl(clientOptionsWithUserAgent)
}
@@ -202,6 +212,8 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
AccountActivityServiceImpl(clientOptionsWithUserAgent)
}
+ private val webhooks: WebhookService by lazy { WebhookServiceImpl(clientOptionsWithUserAgent) }
+
override fun async(): LithicClientAsync = async
override fun withRawResponse(): LithicClient.WithRawResponse = withRawResponse
@@ -223,6 +235,8 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
override fun cards(): CardService = cards
+ override fun cardBulkOrders(): CardBulkOrderService = cardBulkOrders
+
override fun balances(): BalanceService = balances
override fun aggregateBalances(): AggregateBalanceService = aggregateBalances
@@ -241,8 +255,6 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
override fun responderEndpoints(): ResponderEndpointService = responderEndpoints
- override fun webhooks(): WebhookService = webhooks
-
override fun externalBankAccounts(): ExternalBankAccountService = externalBankAccounts
override fun payments(): PaymentService = payments
@@ -263,6 +275,8 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
override fun managementOperations(): ManagementOperationService = managementOperations
+ override fun internalTransaction(): InternalTransactionService = internalTransaction
+
override fun fundingEvents(): FundingEventService = fundingEvents
override fun fraud(): FraudService = fraud
@@ -271,6 +285,8 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
override fun accountActivity(): AccountActivityService = accountActivity
+ override fun webhooks(): WebhookService = webhooks
+
override fun apiStatus(
params: ClientApiStatusParams,
requestOptions: RequestOptions,
@@ -315,6 +331,10 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
CardServiceImpl.WithRawResponseImpl(clientOptions)
}
+ private val cardBulkOrders: CardBulkOrderService.WithRawResponse by lazy {
+ CardBulkOrderServiceImpl.WithRawResponseImpl(clientOptions)
+ }
+
private val balances: BalanceService.WithRawResponse by lazy {
BalanceServiceImpl.WithRawResponseImpl(clientOptions)
}
@@ -391,6 +411,10 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
ManagementOperationServiceImpl.WithRawResponseImpl(clientOptions)
}
+ private val internalTransaction: InternalTransactionService.WithRawResponse by lazy {
+ InternalTransactionServiceImpl.WithRawResponseImpl(clientOptions)
+ }
+
private val fundingEvents: FundingEventService.WithRawResponse by lazy {
FundingEventServiceImpl.WithRawResponseImpl(clientOptions)
}
@@ -407,6 +431,10 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
AccountActivityServiceImpl.WithRawResponseImpl(clientOptions)
}
+ private val webhooks: WebhookService.WithRawResponse by lazy {
+ WebhookServiceImpl.WithRawResponseImpl(clientOptions)
+ }
+
override fun withOptions(
modifier: Consumer
): LithicClient.WithRawResponse =
@@ -430,6 +458,8 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
override fun cards(): CardService.WithRawResponse = cards
+ override fun cardBulkOrders(): CardBulkOrderService.WithRawResponse = cardBulkOrders
+
override fun balances(): BalanceService.WithRawResponse = balances
override fun aggregateBalances(): AggregateBalanceService.WithRawResponse =
@@ -473,6 +503,9 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
override fun managementOperations(): ManagementOperationService.WithRawResponse =
managementOperations
+ override fun internalTransaction(): InternalTransactionService.WithRawResponse =
+ internalTransaction
+
override fun fundingEvents(): FundingEventService.WithRawResponse = fundingEvents
override fun fraud(): FraudService.WithRawResponse = fraud
@@ -481,6 +514,8 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
override fun accountActivity(): AccountActivityService.WithRawResponse = accountActivity
+ override fun webhooks(): WebhookService.WithRawResponse = webhooks
+
private val apiStatusHandler: Handler =
jsonHandler(clientOptions.jsonMapper)
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListParams.kt
index 94d194022..eb2aa72b3 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListParams.kt
@@ -406,6 +406,10 @@ private constructor(
@JvmField val EXTERNAL_CHECK = of("EXTERNAL_CHECK")
+ @JvmField val EXTERNAL_FEDNOW = of("EXTERNAL_FEDNOW")
+
+ @JvmField val EXTERNAL_RTP = of("EXTERNAL_RTP")
+
@JvmField val EXTERNAL_TRANSFER = of("EXTERNAL_TRANSFER")
@JvmField val EXTERNAL_WIRE = of("EXTERNAL_WIRE")
@@ -437,6 +441,8 @@ private constructor(
CARD,
EXTERNAL_ACH,
EXTERNAL_CHECK,
+ EXTERNAL_FEDNOW,
+ EXTERNAL_RTP,
EXTERNAL_TRANSFER,
EXTERNAL_WIRE,
MANAGEMENT_ADJUSTMENT,
@@ -467,6 +473,8 @@ private constructor(
CARD,
EXTERNAL_ACH,
EXTERNAL_CHECK,
+ EXTERNAL_FEDNOW,
+ EXTERNAL_RTP,
EXTERNAL_TRANSFER,
EXTERNAL_WIRE,
MANAGEMENT_ADJUSTMENT,
@@ -501,6 +509,8 @@ private constructor(
CARD -> Value.CARD
EXTERNAL_ACH -> Value.EXTERNAL_ACH
EXTERNAL_CHECK -> Value.EXTERNAL_CHECK
+ EXTERNAL_FEDNOW -> Value.EXTERNAL_FEDNOW
+ EXTERNAL_RTP -> Value.EXTERNAL_RTP
EXTERNAL_TRANSFER -> Value.EXTERNAL_TRANSFER
EXTERNAL_WIRE -> Value.EXTERNAL_WIRE
MANAGEMENT_ADJUSTMENT -> Value.MANAGEMENT_ADJUSTMENT
@@ -533,6 +543,8 @@ private constructor(
CARD -> Known.CARD
EXTERNAL_ACH -> Known.EXTERNAL_ACH
EXTERNAL_CHECK -> Known.EXTERNAL_CHECK
+ EXTERNAL_FEDNOW -> Known.EXTERNAL_FEDNOW
+ EXTERNAL_RTP -> Known.EXTERNAL_RTP
EXTERNAL_TRANSFER -> Known.EXTERNAL_TRANSFER
EXTERNAL_WIRE -> Known.EXTERNAL_WIRE
MANAGEMENT_ADJUSTMENT -> Known.MANAGEMENT_ADJUSTMENT
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListResponse.kt
index a9f83fd75..24b758684 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListResponse.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListResponse.kt
@@ -1036,6 +1036,10 @@ private constructor(
@JvmField val EXTERNAL_CHECK = of("EXTERNAL_CHECK")
+ @JvmField val EXTERNAL_FEDNOW = of("EXTERNAL_FEDNOW")
+
+ @JvmField val EXTERNAL_RTP = of("EXTERNAL_RTP")
+
@JvmField val EXTERNAL_TRANSFER = of("EXTERNAL_TRANSFER")
@JvmField val EXTERNAL_WIRE = of("EXTERNAL_WIRE")
@@ -1067,6 +1071,8 @@ private constructor(
CARD,
EXTERNAL_ACH,
EXTERNAL_CHECK,
+ EXTERNAL_FEDNOW,
+ EXTERNAL_RTP,
EXTERNAL_TRANSFER,
EXTERNAL_WIRE,
MANAGEMENT_ADJUSTMENT,
@@ -1099,6 +1105,8 @@ private constructor(
CARD,
EXTERNAL_ACH,
EXTERNAL_CHECK,
+ EXTERNAL_FEDNOW,
+ EXTERNAL_RTP,
EXTERNAL_TRANSFER,
EXTERNAL_WIRE,
MANAGEMENT_ADJUSTMENT,
@@ -1133,6 +1141,8 @@ private constructor(
CARD -> Value.CARD
EXTERNAL_ACH -> Value.EXTERNAL_ACH
EXTERNAL_CHECK -> Value.EXTERNAL_CHECK
+ EXTERNAL_FEDNOW -> Value.EXTERNAL_FEDNOW
+ EXTERNAL_RTP -> Value.EXTERNAL_RTP
EXTERNAL_TRANSFER -> Value.EXTERNAL_TRANSFER
EXTERNAL_WIRE -> Value.EXTERNAL_WIRE
MANAGEMENT_ADJUSTMENT -> Value.MANAGEMENT_ADJUSTMENT
@@ -1165,6 +1175,8 @@ private constructor(
CARD -> Known.CARD
EXTERNAL_ACH -> Known.EXTERNAL_ACH
EXTERNAL_CHECK -> Known.EXTERNAL_CHECK
+ EXTERNAL_FEDNOW -> Known.EXTERNAL_FEDNOW
+ EXTERNAL_RTP -> Known.EXTERNAL_RTP
EXTERNAL_TRANSFER -> Known.EXTERNAL_TRANSFER
EXTERNAL_WIRE -> Known.EXTERNAL_WIRE
MANAGEMENT_ADJUSTMENT -> Known.MANAGEMENT_ADJUSTMENT
@@ -1707,7 +1719,7 @@ private constructor(
private val authorizationCode: JsonField,
private val avs: JsonField,
private val cardToken: JsonField,
- private val cardholderAuthentication: JsonField,
+ private val cardholderAuthentication: JsonField,
private val created: JsonField,
private val financialAccountToken: JsonField,
private val merchant: JsonField,
@@ -1720,7 +1732,7 @@ private constructor(
private val result: JsonField,
private val settledAmount: JsonField,
private val status: JsonField,
- private val tokenInfo: JsonField,
+ private val tokenInfo: JsonField,
private val updated: JsonField,
private val events: JsonField>,
private val family: JsonField,
@@ -1755,8 +1767,7 @@ private constructor(
cardToken: JsonField = JsonMissing.of(),
@JsonProperty("cardholder_authentication")
@ExcludeMissing
- cardholderAuthentication: JsonField =
- JsonMissing.of(),
+ cardholderAuthentication: JsonField = JsonMissing.of(),
@JsonProperty("created")
@ExcludeMissing
created: JsonField = JsonMissing.of(),
@@ -1793,7 +1804,7 @@ private constructor(
status: JsonField = JsonMissing.of(),
@JsonProperty("token_info")
@ExcludeMissing
- tokenInfo: JsonField = JsonMissing.of(),
+ tokenInfo: JsonField = JsonMissing.of(),
@JsonProperty("updated")
@ExcludeMissing
updated: JsonField = JsonMissing.of(),
@@ -1954,7 +1965,7 @@ private constructor(
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
- fun cardholderAuthentication(): Optional =
+ fun cardholderAuthentication(): Optional =
cardholderAuthentication.getOptional("cardholder_authentication")
/**
@@ -2059,7 +2070,7 @@ private constructor(
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
- fun tokenInfo(): Optional = tokenInfo.getOptional("token_info")
+ fun tokenInfo(): Optional = tokenInfo.getOptional("token_info")
/**
* Date and time when the transaction last updated. UTC time zone.
@@ -2182,7 +2193,7 @@ private constructor(
*/
@JsonProperty("cardholder_authentication")
@ExcludeMissing
- fun _cardholderAuthentication(): JsonField =
+ fun _cardholderAuthentication(): JsonField =
cardholderAuthentication
/**
@@ -2304,7 +2315,7 @@ private constructor(
*/
@JsonProperty("token_info")
@ExcludeMissing
- fun _tokenInfo(): JsonField = tokenInfo
+ fun _tokenInfo(): JsonField = tokenInfo
/**
* Returns the raw JSON value of [updated].
@@ -2392,8 +2403,7 @@ private constructor(
private var authorizationCode: JsonField? = null
private var avs: JsonField? = null
private var cardToken: JsonField? = null
- private var cardholderAuthentication: JsonField? =
- null
+ private var cardholderAuthentication: JsonField? = null
private var created: JsonField? = null
private var financialAccountToken: JsonField? = null
private var merchant: JsonField? = null
@@ -2406,7 +2416,7 @@ private constructor(
private var result: JsonField? = null
private var settledAmount: JsonField? = null
private var status: JsonField? = null
- private var tokenInfo: JsonField? = null
+ private var tokenInfo: JsonField? = null
private var updated: JsonField? = null
private var events: JsonField>? = null
private var family: JsonField? = null
@@ -2641,27 +2651,26 @@ private constructor(
*/
fun cardToken(cardToken: JsonField) = apply { this.cardToken = cardToken }
- fun cardholderAuthentication(
- cardholderAuthentication: Transaction.CardholderAuthentication?
- ) = cardholderAuthentication(JsonField.ofNullable(cardholderAuthentication))
+ fun cardholderAuthentication(cardholderAuthentication: CardholderAuthentication?) =
+ cardholderAuthentication(JsonField.ofNullable(cardholderAuthentication))
/**
* Alias for calling [Builder.cardholderAuthentication] with
* `cardholderAuthentication.orElse(null)`.
*/
fun cardholderAuthentication(
- cardholderAuthentication: Optional
+ cardholderAuthentication: Optional
) = cardholderAuthentication(cardholderAuthentication.getOrNull())
/**
* Sets [Builder.cardholderAuthentication] to an arbitrary JSON value.
*
* You should usually call [Builder.cardholderAuthentication] with a well-typed
- * [Transaction.CardholderAuthentication] value instead. This method is primarily for
- * setting the field to an undocumented or not yet supported value.
+ * [CardholderAuthentication] value instead. This method is primarily for setting the
+ * field to an undocumented or not yet supported value.
*/
fun cardholderAuthentication(
- cardholderAuthentication: JsonField
+ cardholderAuthentication: JsonField
) = apply { this.cardholderAuthentication = cardholderAuthentication }
/** Date and time when the transaction first occurred. UTC time zone. */
@@ -2893,23 +2902,19 @@ private constructor(
*/
fun status(status: JsonField) = apply { this.status = status }
- fun tokenInfo(tokenInfo: Transaction.TokenInfo?) =
- tokenInfo(JsonField.ofNullable(tokenInfo))
+ fun tokenInfo(tokenInfo: TokenInfo?) = tokenInfo(JsonField.ofNullable(tokenInfo))
/** Alias for calling [Builder.tokenInfo] with `tokenInfo.orElse(null)`. */
- fun tokenInfo(tokenInfo: Optional) =
- tokenInfo(tokenInfo.getOrNull())
+ fun tokenInfo(tokenInfo: Optional) = tokenInfo(tokenInfo.getOrNull())
/**
* Sets [Builder.tokenInfo] to an arbitrary JSON value.
*
- * You should usually call [Builder.tokenInfo] with a well-typed [Transaction.TokenInfo]
- * value instead. This method is primarily for setting the field to an undocumented or
- * not yet supported value.
+ * You should usually call [Builder.tokenInfo] with a well-typed [TokenInfo] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
*/
- fun tokenInfo(tokenInfo: JsonField) = apply {
- this.tokenInfo = tokenInfo
- }
+ fun tokenInfo(tokenInfo: JsonField) = apply { this.tokenInfo = tokenInfo }
/** Date and time when the transaction last updated. UTC time zone. */
fun updated(updated: OffsetDateTime) = updated(JsonField.of(updated))
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityRetrieveTransactionResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityRetrieveTransactionResponse.kt
index 60c072c17..fd6f20446 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityRetrieveTransactionResponse.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityRetrieveTransactionResponse.kt
@@ -1058,6 +1058,10 @@ private constructor(
@JvmField val EXTERNAL_CHECK = of("EXTERNAL_CHECK")
+ @JvmField val EXTERNAL_FEDNOW = of("EXTERNAL_FEDNOW")
+
+ @JvmField val EXTERNAL_RTP = of("EXTERNAL_RTP")
+
@JvmField val EXTERNAL_TRANSFER = of("EXTERNAL_TRANSFER")
@JvmField val EXTERNAL_WIRE = of("EXTERNAL_WIRE")
@@ -1089,6 +1093,8 @@ private constructor(
CARD,
EXTERNAL_ACH,
EXTERNAL_CHECK,
+ EXTERNAL_FEDNOW,
+ EXTERNAL_RTP,
EXTERNAL_TRANSFER,
EXTERNAL_WIRE,
MANAGEMENT_ADJUSTMENT,
@@ -1121,6 +1127,8 @@ private constructor(
CARD,
EXTERNAL_ACH,
EXTERNAL_CHECK,
+ EXTERNAL_FEDNOW,
+ EXTERNAL_RTP,
EXTERNAL_TRANSFER,
EXTERNAL_WIRE,
MANAGEMENT_ADJUSTMENT,
@@ -1155,6 +1163,8 @@ private constructor(
CARD -> Value.CARD
EXTERNAL_ACH -> Value.EXTERNAL_ACH
EXTERNAL_CHECK -> Value.EXTERNAL_CHECK
+ EXTERNAL_FEDNOW -> Value.EXTERNAL_FEDNOW
+ EXTERNAL_RTP -> Value.EXTERNAL_RTP
EXTERNAL_TRANSFER -> Value.EXTERNAL_TRANSFER
EXTERNAL_WIRE -> Value.EXTERNAL_WIRE
MANAGEMENT_ADJUSTMENT -> Value.MANAGEMENT_ADJUSTMENT
@@ -1187,6 +1197,8 @@ private constructor(
CARD -> Known.CARD
EXTERNAL_ACH -> Known.EXTERNAL_ACH
EXTERNAL_CHECK -> Known.EXTERNAL_CHECK
+ EXTERNAL_FEDNOW -> Known.EXTERNAL_FEDNOW
+ EXTERNAL_RTP -> Known.EXTERNAL_RTP
EXTERNAL_TRANSFER -> Known.EXTERNAL_TRANSFER
EXTERNAL_WIRE -> Known.EXTERNAL_WIRE
MANAGEMENT_ADJUSTMENT -> Known.MANAGEMENT_ADJUSTMENT
@@ -1729,7 +1741,7 @@ private constructor(
private val authorizationCode: JsonField,
private val avs: JsonField,
private val cardToken: JsonField,
- private val cardholderAuthentication: JsonField,
+ private val cardholderAuthentication: JsonField,
private val created: JsonField,
private val financialAccountToken: JsonField,
private val merchant: JsonField,
@@ -1742,7 +1754,7 @@ private constructor(
private val result: JsonField,
private val settledAmount: JsonField,
private val status: JsonField,
- private val tokenInfo: JsonField,
+ private val tokenInfo: JsonField,
private val updated: JsonField,
private val events: JsonField>,
private val family: JsonField,
@@ -1777,8 +1789,7 @@ private constructor(
cardToken: JsonField = JsonMissing.of(),
@JsonProperty("cardholder_authentication")
@ExcludeMissing
- cardholderAuthentication: JsonField =
- JsonMissing.of(),
+ cardholderAuthentication: JsonField = JsonMissing.of(),
@JsonProperty("created")
@ExcludeMissing
created: JsonField = JsonMissing.of(),
@@ -1815,7 +1826,7 @@ private constructor(
status: JsonField = JsonMissing.of(),
@JsonProperty("token_info")
@ExcludeMissing
- tokenInfo: JsonField = JsonMissing.of(),
+ tokenInfo: JsonField = JsonMissing.of(),
@JsonProperty("updated")
@ExcludeMissing
updated: JsonField = JsonMissing.of(),
@@ -1976,7 +1987,7 @@ private constructor(
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
- fun cardholderAuthentication(): Optional =
+ fun cardholderAuthentication(): Optional =
cardholderAuthentication.getOptional("cardholder_authentication")
/**
@@ -2081,7 +2092,7 @@ private constructor(
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
- fun tokenInfo(): Optional = tokenInfo.getOptional("token_info")
+ fun tokenInfo(): Optional = tokenInfo.getOptional("token_info")
/**
* Date and time when the transaction last updated. UTC time zone.
@@ -2204,7 +2215,7 @@ private constructor(
*/
@JsonProperty("cardholder_authentication")
@ExcludeMissing
- fun _cardholderAuthentication(): JsonField =
+ fun _cardholderAuthentication(): JsonField =
cardholderAuthentication
/**
@@ -2326,7 +2337,7 @@ private constructor(
*/
@JsonProperty("token_info")
@ExcludeMissing
- fun _tokenInfo(): JsonField = tokenInfo
+ fun _tokenInfo(): JsonField = tokenInfo
/**
* Returns the raw JSON value of [updated].
@@ -2414,8 +2425,7 @@ private constructor(
private var authorizationCode: JsonField? = null
private var avs: JsonField? = null
private var cardToken: JsonField? = null
- private var cardholderAuthentication: JsonField? =
- null
+ private var cardholderAuthentication: JsonField? = null
private var created: JsonField? = null
private var financialAccountToken: JsonField? = null
private var merchant: JsonField? = null
@@ -2428,7 +2438,7 @@ private constructor(
private var result: JsonField? = null
private var settledAmount: JsonField? = null
private var status: JsonField? = null
- private var tokenInfo: JsonField? = null
+ private var tokenInfo: JsonField? = null
private var updated: JsonField? = null
private var events: JsonField>? = null
private var family: JsonField? = null
@@ -2663,27 +2673,26 @@ private constructor(
*/
fun cardToken(cardToken: JsonField) = apply { this.cardToken = cardToken }
- fun cardholderAuthentication(
- cardholderAuthentication: Transaction.CardholderAuthentication?
- ) = cardholderAuthentication(JsonField.ofNullable(cardholderAuthentication))
+ fun cardholderAuthentication(cardholderAuthentication: CardholderAuthentication?) =
+ cardholderAuthentication(JsonField.ofNullable(cardholderAuthentication))
/**
* Alias for calling [Builder.cardholderAuthentication] with
* `cardholderAuthentication.orElse(null)`.
*/
fun cardholderAuthentication(
- cardholderAuthentication: Optional
+ cardholderAuthentication: Optional
) = cardholderAuthentication(cardholderAuthentication.getOrNull())
/**
* Sets [Builder.cardholderAuthentication] to an arbitrary JSON value.
*
* You should usually call [Builder.cardholderAuthentication] with a well-typed
- * [Transaction.CardholderAuthentication] value instead. This method is primarily for
- * setting the field to an undocumented or not yet supported value.
+ * [CardholderAuthentication] value instead. This method is primarily for setting the
+ * field to an undocumented or not yet supported value.
*/
fun cardholderAuthentication(
- cardholderAuthentication: JsonField
+ cardholderAuthentication: JsonField
) = apply { this.cardholderAuthentication = cardholderAuthentication }
/** Date and time when the transaction first occurred. UTC time zone. */
@@ -2915,23 +2924,19 @@ private constructor(
*/
fun status(status: JsonField) = apply { this.status = status }
- fun tokenInfo(tokenInfo: Transaction.TokenInfo?) =
- tokenInfo(JsonField.ofNullable(tokenInfo))
+ fun tokenInfo(tokenInfo: TokenInfo?) = tokenInfo(JsonField.ofNullable(tokenInfo))
/** Alias for calling [Builder.tokenInfo] with `tokenInfo.orElse(null)`. */
- fun tokenInfo(tokenInfo: Optional) =
- tokenInfo(tokenInfo.getOrNull())
+ fun tokenInfo(tokenInfo: Optional) = tokenInfo(tokenInfo.getOrNull())
/**
* Sets [Builder.tokenInfo] to an arbitrary JSON value.
*
- * You should usually call [Builder.tokenInfo] with a well-typed [Transaction.TokenInfo]
- * value instead. This method is primarily for setting the field to an undocumented or
- * not yet supported value.
+ * You should usually call [Builder.tokenInfo] with a well-typed [TokenInfo] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
*/
- fun tokenInfo(tokenInfo: JsonField) = apply {
- this.tokenInfo = tokenInfo
- }
+ fun tokenInfo(tokenInfo: JsonField) = apply { this.tokenInfo = tokenInfo }
/** Date and time when the transaction last updated. UTC time zone. */
fun updated(updated: OffsetDateTime) = updated(JsonField.of(updated))
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderCreatedWebhookEvent.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderCreatedWebhookEvent.kt
new file mode 100644
index 000000000..b36c267e8
--- /dev/null
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderCreatedWebhookEvent.kt
@@ -0,0 +1,706 @@
+// 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.checkKnown
+import com.lithic.api.core.checkRequired
+import com.lithic.api.core.toImmutable
+import com.lithic.api.errors.LithicInvalidDataException
+import java.time.OffsetDateTime
+import java.util.Collections
+import java.util.Objects
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+class AccountHolderCreatedWebhookEvent
+@JsonCreator(mode = JsonCreator.Mode.DISABLED)
+private constructor(
+ private val eventType: JsonField,
+ private val token: JsonField,
+ private val accountToken: JsonField,
+ private val created: JsonField,
+ private val requiredDocuments: JsonField>,
+ private val status: JsonField,
+ private val statusReason: JsonField>,
+ private val additionalProperties: MutableMap,
+) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("event_type")
+ @ExcludeMissing
+ eventType: JsonField = JsonMissing.of(),
+ @JsonProperty("token") @ExcludeMissing token: JsonField = JsonMissing.of(),
+ @JsonProperty("account_token")
+ @ExcludeMissing
+ accountToken: JsonField = JsonMissing.of(),
+ @JsonProperty("created")
+ @ExcludeMissing
+ created: JsonField = JsonMissing.of(),
+ @JsonProperty("required_documents")
+ @ExcludeMissing
+ requiredDocuments: JsonField> = JsonMissing.of(),
+ @JsonProperty("status") @ExcludeMissing status: JsonField = JsonMissing.of(),
+ @JsonProperty("status_reason")
+ @ExcludeMissing
+ statusReason: JsonField> = JsonMissing.of(),
+ ) : this(
+ eventType,
+ token,
+ accountToken,
+ created,
+ requiredDocuments,
+ status,
+ statusReason,
+ mutableMapOf(),
+ )
+
+ /**
+ * The type of event that occurred.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun eventType(): EventType = eventType.getRequired("event_type")
+
+ /**
+ * The token of the account_holder that was created.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun token(): Optional = token.getOptional("token")
+
+ /**
+ * The token of the account that was created.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun accountToken(): Optional = accountToken.getOptional("account_token")
+
+ /**
+ * When the account_holder was created
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun created(): Optional = created.getOptional("created")
+
+ /**
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun requiredDocuments(): Optional> =
+ requiredDocuments.getOptional("required_documents")
+
+ /**
+ * The status of the account_holder that was created.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun status(): Optional = status.getOptional("status")
+
+ /**
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun statusReason(): Optional> = statusReason.getOptional("status_reason")
+
+ /**
+ * Returns the raw JSON value of [eventType].
+ *
+ * Unlike [eventType], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("event_type") @ExcludeMissing fun _eventType(): JsonField = eventType
+
+ /**
+ * Returns the raw JSON value of [token].
+ *
+ * Unlike [token], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("token") @ExcludeMissing fun _token(): JsonField = token
+
+ /**
+ * Returns the raw JSON value of [accountToken].
+ *
+ * Unlike [accountToken], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("account_token")
+ @ExcludeMissing
+ fun _accountToken(): JsonField = accountToken
+
+ /**
+ * 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 [requiredDocuments].
+ *
+ * Unlike [requiredDocuments], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("required_documents")
+ @ExcludeMissing
+ fun _requiredDocuments(): JsonField> = requiredDocuments
+
+ /**
+ * Returns the raw JSON value of [status].
+ *
+ * Unlike [status], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("status") @ExcludeMissing fun _status(): JsonField = status
+
+ /**
+ * Returns the raw JSON value of [statusReason].
+ *
+ * Unlike [statusReason], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("status_reason")
+ @ExcludeMissing
+ fun _statusReason(): JsonField> = statusReason
+
+ @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
+ * [AccountHolderCreatedWebhookEvent].
+ *
+ * The following fields are required:
+ * ```java
+ * .eventType()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [AccountHolderCreatedWebhookEvent]. */
+ class Builder internal constructor() {
+
+ private var eventType: JsonField? = null
+ private var token: JsonField = JsonMissing.of()
+ private var accountToken: JsonField = JsonMissing.of()
+ private var created: JsonField = JsonMissing.of()
+ private var requiredDocuments: JsonField>? = null
+ private var status: JsonField = JsonMissing.of()
+ private var statusReason: JsonField>? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(accountHolderCreatedWebhookEvent: AccountHolderCreatedWebhookEvent) =
+ apply {
+ eventType = accountHolderCreatedWebhookEvent.eventType
+ token = accountHolderCreatedWebhookEvent.token
+ accountToken = accountHolderCreatedWebhookEvent.accountToken
+ created = accountHolderCreatedWebhookEvent.created
+ requiredDocuments =
+ accountHolderCreatedWebhookEvent.requiredDocuments.map { it.toMutableList() }
+ status = accountHolderCreatedWebhookEvent.status
+ statusReason =
+ accountHolderCreatedWebhookEvent.statusReason.map { it.toMutableList() }
+ additionalProperties =
+ accountHolderCreatedWebhookEvent.additionalProperties.toMutableMap()
+ }
+
+ /** The type of event that occurred. */
+ fun eventType(eventType: EventType) = eventType(JsonField.of(eventType))
+
+ /**
+ * Sets [Builder.eventType] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.eventType] with a well-typed [EventType] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun eventType(eventType: JsonField) = apply { this.eventType = eventType }
+
+ /** The token of the account_holder that was created. */
+ fun token(token: String) = token(JsonField.of(token))
+
+ /**
+ * Sets [Builder.token] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.token] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun token(token: JsonField) = apply { this.token = token }
+
+ /** The token of the account that was created. */
+ fun accountToken(accountToken: String) = accountToken(JsonField.of(accountToken))
+
+ /**
+ * Sets [Builder.accountToken] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.accountToken] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun accountToken(accountToken: JsonField) = apply {
+ this.accountToken = accountToken
+ }
+
+ /** When the account_holder was 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 }
+
+ fun requiredDocuments(requiredDocuments: List) =
+ requiredDocuments(JsonField.of(requiredDocuments))
+
+ /**
+ * Sets [Builder.requiredDocuments] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.requiredDocuments] with a well-typed
+ * `List` value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun requiredDocuments(requiredDocuments: JsonField>) = apply {
+ this.requiredDocuments = requiredDocuments.map { it.toMutableList() }
+ }
+
+ /**
+ * Adds a single [RequiredDocument] to [requiredDocuments].
+ *
+ * @throws IllegalStateException if the field was previously set to a non-list.
+ */
+ fun addRequiredDocument(requiredDocument: RequiredDocument) = apply {
+ requiredDocuments =
+ (requiredDocuments ?: JsonField.of(mutableListOf())).also {
+ checkKnown("requiredDocuments", it).add(requiredDocument)
+ }
+ }
+
+ /** The status of the account_holder that was created. */
+ fun status(status: Status) = status(JsonField.of(status))
+
+ /**
+ * Sets [Builder.status] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.status] with a well-typed [Status] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun status(status: JsonField) = apply { this.status = status }
+
+ fun statusReason(statusReason: List) = statusReason(JsonField.of(statusReason))
+
+ /**
+ * Sets [Builder.statusReason] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.statusReason] with a well-typed `List` value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun statusReason(statusReason: JsonField>) = apply {
+ this.statusReason = statusReason.map { it.toMutableList() }
+ }
+
+ /**
+ * Adds a single [String] to [Builder.statusReason].
+ *
+ * @throws IllegalStateException if the field was previously set to a non-list.
+ */
+ fun addStatusReason(statusReason: String) = apply {
+ this.statusReason =
+ (this.statusReason ?: JsonField.of(mutableListOf())).also {
+ checkKnown("statusReason", it).add(statusReason)
+ }
+ }
+
+ 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 [AccountHolderCreatedWebhookEvent].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .eventType()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): AccountHolderCreatedWebhookEvent =
+ AccountHolderCreatedWebhookEvent(
+ checkRequired("eventType", eventType),
+ token,
+ accountToken,
+ created,
+ (requiredDocuments ?: JsonMissing.of()).map { it.toImmutable() },
+ status,
+ (statusReason ?: JsonMissing.of()).map { it.toImmutable() },
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): AccountHolderCreatedWebhookEvent = apply {
+ if (validated) {
+ return@apply
+ }
+
+ eventType().validate()
+ token()
+ accountToken()
+ created()
+ requiredDocuments().ifPresent { it.forEach { it.validate() } }
+ status().ifPresent { it.validate() }
+ statusReason()
+ 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 =
+ (eventType.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (token.asKnown().isPresent) 1 else 0) +
+ (if (accountToken.asKnown().isPresent) 1 else 0) +
+ (if (created.asKnown().isPresent) 1 else 0) +
+ (requiredDocuments.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) +
+ (status.asKnown().getOrNull()?.validity() ?: 0) +
+ (statusReason.asKnown().getOrNull()?.size ?: 0)
+
+ /** The type of event that occurred. */
+ class EventType @JsonCreator private constructor(private val value: JsonField) : Enum {
+
+ /**
+ * Returns this class instance's raw value.
+ *
+ * This is usually only useful if this instance was deserialized from data that doesn't
+ * match any known member, and you want to know that value. For example, if the SDK is on an
+ * older version than the API, then the API may respond with new members that the SDK is
+ * unaware of.
+ */
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ companion object {
+
+ @JvmField val ACCOUNT_HOLDER_CREATED = of("account_holder.created")
+
+ @JvmStatic fun of(value: String) = EventType(JsonField.of(value))
+ }
+
+ /** An enum containing [EventType]'s known values. */
+ enum class Known {
+ ACCOUNT_HOLDER_CREATED
+ }
+
+ /**
+ * An enum containing [EventType]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [EventType] can contain an unknown value in a couple of cases:
+ * - It was deserialized from data that doesn't match any known member. For example, if the
+ * SDK is on an older version than the API, then the API may respond with new members that
+ * the SDK is unaware of.
+ * - It was constructed with an arbitrary value using the [of] method.
+ */
+ enum class Value {
+ ACCOUNT_HOLDER_CREATED,
+ /**
+ * An enum member indicating that [EventType] was instantiated with an unknown value.
+ */
+ _UNKNOWN,
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN]
+ * if the class was instantiated with an unknown value.
+ *
+ * Use the [known] method instead if you're certain the value is always known or if you want
+ * to throw for the unknown case.
+ */
+ fun value(): Value =
+ when (this) {
+ ACCOUNT_HOLDER_CREATED -> Value.ACCOUNT_HOLDER_CREATED
+ 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) {
+ ACCOUNT_HOLDER_CREATED -> Known.ACCOUNT_HOLDER_CREATED
+ else -> throw LithicInvalidDataException("Unknown EventType: $value")
+ }
+
+ /**
+ * Returns this class instance's primitive wire representation.
+ *
+ * This differs from the [toString] method because that method is primarily for debugging
+ * and generally doesn't throw.
+ *
+ * @throws LithicInvalidDataException if this class instance's value does not have the
+ * expected primitive type.
+ */
+ fun asString(): String =
+ _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") }
+
+ private var validated: Boolean = false
+
+ fun validate(): EventType = apply {
+ if (validated) {
+ return@apply
+ }
+
+ known()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: LithicInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is EventType && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ /** The status of the account_holder that was created. */
+ class Status @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 ACCEPTED = of("ACCEPTED")
+
+ @JvmField val PENDING_REVIEW = of("PENDING_REVIEW")
+
+ @JvmStatic fun of(value: String) = Status(JsonField.of(value))
+ }
+
+ /** An enum containing [Status]'s known values. */
+ enum class Known {
+ ACCEPTED,
+ PENDING_REVIEW,
+ }
+
+ /**
+ * An enum containing [Status]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [Status] 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 {
+ ACCEPTED,
+ PENDING_REVIEW,
+ /** An enum member indicating that [Status] 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) {
+ ACCEPTED -> Value.ACCEPTED
+ PENDING_REVIEW -> Value.PENDING_REVIEW
+ 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) {
+ ACCEPTED -> Known.ACCEPTED
+ PENDING_REVIEW -> Known.PENDING_REVIEW
+ else -> throw LithicInvalidDataException("Unknown Status: $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(): Status = 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 Status && 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 AccountHolderCreatedWebhookEvent &&
+ eventType == other.eventType &&
+ token == other.token &&
+ accountToken == other.accountToken &&
+ created == other.created &&
+ requiredDocuments == other.requiredDocuments &&
+ status == other.status &&
+ statusReason == other.statusReason &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(
+ eventType,
+ token,
+ accountToken,
+ created,
+ requiredDocuments,
+ status,
+ statusReason,
+ additionalProperties,
+ )
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "AccountHolderCreatedWebhookEvent{eventType=$eventType, token=$token, accountToken=$accountToken, created=$created, requiredDocuments=$requiredDocuments, status=$status, statusReason=$statusReason, additionalProperties=$additionalProperties}"
+}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderDocumentUpdatedWebhookEvent.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderDocumentUpdatedWebhookEvent.kt
new file mode 100644
index 000000000..cdde246aa
--- /dev/null
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderDocumentUpdatedWebhookEvent.kt
@@ -0,0 +1,1590 @@
+// 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.checkKnown
+import com.lithic.api.core.checkRequired
+import com.lithic.api.core.toImmutable
+import com.lithic.api.errors.LithicInvalidDataException
+import java.time.OffsetDateTime
+import java.util.Collections
+import java.util.Objects
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+class AccountHolderDocumentUpdatedWebhookEvent
+@JsonCreator(mode = JsonCreator.Mode.DISABLED)
+private constructor(
+ private val eventType: JsonField,
+ private val token: JsonField,
+ private val accountHolderToken: JsonField,
+ private val created: JsonField,
+ private val documentType: JsonField,
+ private val entityToken: JsonField,
+ private val requiredDocumentUploads: JsonField>,
+ private val additionalProperties: MutableMap,
+) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("event_type")
+ @ExcludeMissing
+ eventType: JsonField = JsonMissing.of(),
+ @JsonProperty("token") @ExcludeMissing token: JsonField = JsonMissing.of(),
+ @JsonProperty("account_holder_token")
+ @ExcludeMissing
+ accountHolderToken: JsonField = JsonMissing.of(),
+ @JsonProperty("created")
+ @ExcludeMissing
+ created: JsonField = JsonMissing.of(),
+ @JsonProperty("document_type")
+ @ExcludeMissing
+ documentType: JsonField = JsonMissing.of(),
+ @JsonProperty("entity_token")
+ @ExcludeMissing
+ entityToken: JsonField = JsonMissing.of(),
+ @JsonProperty("required_document_uploads")
+ @ExcludeMissing
+ requiredDocumentUploads: JsonField> = JsonMissing.of(),
+ ) : this(
+ eventType,
+ token,
+ accountHolderToken,
+ created,
+ documentType,
+ entityToken,
+ requiredDocumentUploads,
+ mutableMapOf(),
+ )
+
+ /**
+ * The type of event that occurred.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun eventType(): EventType = eventType.getRequired("event_type")
+
+ /**
+ * The token of the account holder document
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun token(): Optional = token.getOptional("token")
+
+ /**
+ * The token of the account_holder that the document belongs to
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun accountHolderToken(): Optional =
+ accountHolderToken.getOptional("account_holder_token")
+
+ /**
+ * When the account_holder was created
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun created(): Optional = created.getOptional("created")
+
+ /**
+ * Type of documentation to be submitted for verification of an account holder
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun documentType(): Optional = documentType.getOptional("document_type")
+
+ /**
+ * The token of the entity that the document belongs to
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun entityToken(): Optional = entityToken.getOptional("entity_token")
+
+ /**
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun requiredDocumentUploads(): Optional> =
+ requiredDocumentUploads.getOptional("required_document_uploads")
+
+ /**
+ * Returns the raw JSON value of [eventType].
+ *
+ * Unlike [eventType], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("event_type") @ExcludeMissing fun _eventType(): JsonField = eventType
+
+ /**
+ * Returns the raw JSON value of [token].
+ *
+ * Unlike [token], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("token") @ExcludeMissing fun _token(): JsonField = token
+
+ /**
+ * Returns the raw JSON value of [accountHolderToken].
+ *
+ * Unlike [accountHolderToken], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("account_holder_token")
+ @ExcludeMissing
+ fun _accountHolderToken(): JsonField = accountHolderToken
+
+ /**
+ * 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 [documentType].
+ *
+ * Unlike [documentType], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("document_type")
+ @ExcludeMissing
+ fun _documentType(): JsonField = documentType
+
+ /**
+ * Returns the raw JSON value of [entityToken].
+ *
+ * Unlike [entityToken], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("entity_token")
+ @ExcludeMissing
+ fun _entityToken(): JsonField = entityToken
+
+ /**
+ * Returns the raw JSON value of [requiredDocumentUploads].
+ *
+ * Unlike [requiredDocumentUploads], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("required_document_uploads")
+ @ExcludeMissing
+ fun _requiredDocumentUploads(): JsonField> =
+ requiredDocumentUploads
+
+ @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
+ * [AccountHolderDocumentUpdatedWebhookEvent].
+ *
+ * The following fields are required:
+ * ```java
+ * .eventType()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [AccountHolderDocumentUpdatedWebhookEvent]. */
+ class Builder internal constructor() {
+
+ private var eventType: JsonField? = null
+ private var token: JsonField = JsonMissing.of()
+ private var accountHolderToken: JsonField = JsonMissing.of()
+ private var created: JsonField = JsonMissing.of()
+ private var documentType: JsonField = JsonMissing.of()
+ private var entityToken: JsonField = JsonMissing.of()
+ private var requiredDocumentUploads: JsonField>? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(
+ accountHolderDocumentUpdatedWebhookEvent: AccountHolderDocumentUpdatedWebhookEvent
+ ) = apply {
+ eventType = accountHolderDocumentUpdatedWebhookEvent.eventType
+ token = accountHolderDocumentUpdatedWebhookEvent.token
+ accountHolderToken = accountHolderDocumentUpdatedWebhookEvent.accountHolderToken
+ created = accountHolderDocumentUpdatedWebhookEvent.created
+ documentType = accountHolderDocumentUpdatedWebhookEvent.documentType
+ entityToken = accountHolderDocumentUpdatedWebhookEvent.entityToken
+ requiredDocumentUploads =
+ accountHolderDocumentUpdatedWebhookEvent.requiredDocumentUploads.map {
+ it.toMutableList()
+ }
+ additionalProperties =
+ accountHolderDocumentUpdatedWebhookEvent.additionalProperties.toMutableMap()
+ }
+
+ /** The type of event that occurred. */
+ fun eventType(eventType: EventType) = eventType(JsonField.of(eventType))
+
+ /**
+ * Sets [Builder.eventType] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.eventType] with a well-typed [EventType] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun eventType(eventType: JsonField) = apply { this.eventType = eventType }
+
+ /** The token of the account holder document */
+ fun token(token: String) = token(JsonField.of(token))
+
+ /**
+ * Sets [Builder.token] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.token] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun token(token: JsonField) = apply { this.token = token }
+
+ /** The token of the account_holder that the document belongs to */
+ fun accountHolderToken(accountHolderToken: String) =
+ accountHolderToken(JsonField.of(accountHolderToken))
+
+ /**
+ * Sets [Builder.accountHolderToken] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.accountHolderToken] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun accountHolderToken(accountHolderToken: JsonField) = apply {
+ this.accountHolderToken = accountHolderToken
+ }
+
+ /** When the account_holder was 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 }
+
+ /** Type of documentation to be submitted for verification of an account holder */
+ fun documentType(documentType: DocumentType) = documentType(JsonField.of(documentType))
+
+ /**
+ * Sets [Builder.documentType] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.documentType] with a well-typed [DocumentType] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun documentType(documentType: JsonField) = apply {
+ this.documentType = documentType
+ }
+
+ /** The token of the entity that the document belongs to */
+ fun entityToken(entityToken: String) = entityToken(JsonField.of(entityToken))
+
+ /**
+ * Sets [Builder.entityToken] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.entityToken] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun entityToken(entityToken: JsonField) = apply { this.entityToken = entityToken }
+
+ fun requiredDocumentUploads(requiredDocumentUploads: List) =
+ requiredDocumentUploads(JsonField.of(requiredDocumentUploads))
+
+ /**
+ * Sets [Builder.requiredDocumentUploads] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.requiredDocumentUploads] with a well-typed
+ * `List` value instead. This method is primarily for setting the
+ * field to an undocumented or not yet supported value.
+ */
+ fun requiredDocumentUploads(
+ requiredDocumentUploads: JsonField>
+ ) = apply {
+ this.requiredDocumentUploads = requiredDocumentUploads.map { it.toMutableList() }
+ }
+
+ /**
+ * Adds a single [RequiredDocumentUpload] to [requiredDocumentUploads].
+ *
+ * @throws IllegalStateException if the field was previously set to a non-list.
+ */
+ fun addRequiredDocumentUpload(requiredDocumentUpload: RequiredDocumentUpload) = apply {
+ requiredDocumentUploads =
+ (requiredDocumentUploads ?: JsonField.of(mutableListOf())).also {
+ checkKnown("requiredDocumentUploads", it).add(requiredDocumentUpload)
+ }
+ }
+
+ 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 [AccountHolderDocumentUpdatedWebhookEvent].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .eventType()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): AccountHolderDocumentUpdatedWebhookEvent =
+ AccountHolderDocumentUpdatedWebhookEvent(
+ checkRequired("eventType", eventType),
+ token,
+ accountHolderToken,
+ created,
+ documentType,
+ entityToken,
+ (requiredDocumentUploads ?: JsonMissing.of()).map { it.toImmutable() },
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): AccountHolderDocumentUpdatedWebhookEvent = apply {
+ if (validated) {
+ return@apply
+ }
+
+ eventType().validate()
+ token()
+ accountHolderToken()
+ created()
+ documentType().ifPresent { it.validate() }
+ entityToken()
+ requiredDocumentUploads().ifPresent { it.forEach { it.validate() } }
+ 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 =
+ (eventType.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (token.asKnown().isPresent) 1 else 0) +
+ (if (accountHolderToken.asKnown().isPresent) 1 else 0) +
+ (if (created.asKnown().isPresent) 1 else 0) +
+ (documentType.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (entityToken.asKnown().isPresent) 1 else 0) +
+ (requiredDocumentUploads.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0)
+
+ /** The type of event that occurred. */
+ class EventType @JsonCreator private constructor(private val value: JsonField) : Enum {
+
+ /**
+ * Returns this class instance's raw value.
+ *
+ * This is usually only useful if this instance was deserialized from data that doesn't
+ * match any known member, and you want to know that value. For example, if the SDK is on an
+ * older version than the API, then the API may respond with new members that the SDK is
+ * unaware of.
+ */
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ companion object {
+
+ @JvmField val ACCOUNT_HOLDER_DOCUMENT_UPDATED = of("account_holder_document.updated")
+
+ @JvmStatic fun of(value: String) = EventType(JsonField.of(value))
+ }
+
+ /** An enum containing [EventType]'s known values. */
+ enum class Known {
+ ACCOUNT_HOLDER_DOCUMENT_UPDATED
+ }
+
+ /**
+ * An enum containing [EventType]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [EventType] can contain an unknown value in a couple of cases:
+ * - It was deserialized from data that doesn't match any known member. For example, if the
+ * SDK is on an older version than the API, then the API may respond with new members that
+ * the SDK is unaware of.
+ * - It was constructed with an arbitrary value using the [of] method.
+ */
+ enum class Value {
+ ACCOUNT_HOLDER_DOCUMENT_UPDATED,
+ /**
+ * An enum member indicating that [EventType] was instantiated with an unknown value.
+ */
+ _UNKNOWN,
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN]
+ * if the class was instantiated with an unknown value.
+ *
+ * Use the [known] method instead if you're certain the value is always known or if you want
+ * to throw for the unknown case.
+ */
+ fun value(): Value =
+ when (this) {
+ ACCOUNT_HOLDER_DOCUMENT_UPDATED -> Value.ACCOUNT_HOLDER_DOCUMENT_UPDATED
+ 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) {
+ ACCOUNT_HOLDER_DOCUMENT_UPDATED -> Known.ACCOUNT_HOLDER_DOCUMENT_UPDATED
+ else -> throw LithicInvalidDataException("Unknown EventType: $value")
+ }
+
+ /**
+ * Returns this class instance's primitive wire representation.
+ *
+ * This differs from the [toString] method because that method is primarily for debugging
+ * and generally doesn't throw.
+ *
+ * @throws LithicInvalidDataException if this class instance's value does not have the
+ * expected primitive type.
+ */
+ fun asString(): String =
+ _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") }
+
+ private var validated: Boolean = false
+
+ fun validate(): EventType = apply {
+ if (validated) {
+ return@apply
+ }
+
+ known()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: LithicInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is EventType && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ /** Type of documentation to be submitted for verification of an account holder */
+ class DocumentType @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 DRIVERS_LICENSE = of("DRIVERS_LICENSE")
+
+ @JvmField val PASSPORT = of("PASSPORT")
+
+ @JvmField val PASSPORT_CARD = of("PASSPORT_CARD")
+
+ @JvmField val EIN_LETTER = of("EIN_LETTER")
+
+ @JvmField val TAX_RETURN = of("TAX_RETURN")
+
+ @JvmField val OPERATING_AGREEMENT = of("OPERATING_AGREEMENT")
+
+ @JvmField val CERTIFICATE_OF_FORMATION = of("CERTIFICATE_OF_FORMATION")
+
+ @JvmField val CERTIFICATE_OF_GOOD_STANDING = of("CERTIFICATE_OF_GOOD_STANDING")
+
+ @JvmField val ARTICLES_OF_INCORPORATION = of("ARTICLES_OF_INCORPORATION")
+
+ @JvmField val ARTICLES_OF_ORGANIZATION = of("ARTICLES_OF_ORGANIZATION")
+
+ @JvmField val BYLAWS = of("BYLAWS")
+
+ @JvmField val GOVERNMENT_BUSINESS_LICENSE = of("GOVERNMENT_BUSINESS_LICENSE")
+
+ @JvmField val PARTNERSHIP_AGREEMENT = of("PARTNERSHIP_AGREEMENT")
+
+ @JvmField val SS4_FORM = of("SS4_FORM")
+
+ @JvmField val BANK_STATEMENT = of("BANK_STATEMENT")
+
+ @JvmField val UTILITY_BILL_STATEMENT = of("UTILITY_BILL_STATEMENT")
+
+ @JvmField val SSN_CARD = of("SSN_CARD")
+
+ @JvmField val ITIN_LETTER = of("ITIN_LETTER")
+
+ @JvmField val FINCEN_BOI_REPORT = of("FINCEN_BOI_REPORT")
+
+ @JvmStatic fun of(value: String) = DocumentType(JsonField.of(value))
+ }
+
+ /** An enum containing [DocumentType]'s known values. */
+ enum class Known {
+ DRIVERS_LICENSE,
+ PASSPORT,
+ PASSPORT_CARD,
+ EIN_LETTER,
+ TAX_RETURN,
+ OPERATING_AGREEMENT,
+ CERTIFICATE_OF_FORMATION,
+ CERTIFICATE_OF_GOOD_STANDING,
+ ARTICLES_OF_INCORPORATION,
+ ARTICLES_OF_ORGANIZATION,
+ BYLAWS,
+ GOVERNMENT_BUSINESS_LICENSE,
+ PARTNERSHIP_AGREEMENT,
+ SS4_FORM,
+ BANK_STATEMENT,
+ UTILITY_BILL_STATEMENT,
+ SSN_CARD,
+ ITIN_LETTER,
+ FINCEN_BOI_REPORT,
+ }
+
+ /**
+ * An enum containing [DocumentType]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [DocumentType] 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 {
+ DRIVERS_LICENSE,
+ PASSPORT,
+ PASSPORT_CARD,
+ EIN_LETTER,
+ TAX_RETURN,
+ OPERATING_AGREEMENT,
+ CERTIFICATE_OF_FORMATION,
+ CERTIFICATE_OF_GOOD_STANDING,
+ ARTICLES_OF_INCORPORATION,
+ ARTICLES_OF_ORGANIZATION,
+ BYLAWS,
+ GOVERNMENT_BUSINESS_LICENSE,
+ PARTNERSHIP_AGREEMENT,
+ SS4_FORM,
+ BANK_STATEMENT,
+ UTILITY_BILL_STATEMENT,
+ SSN_CARD,
+ ITIN_LETTER,
+ FINCEN_BOI_REPORT,
+ /**
+ * An enum member indicating that [DocumentType] 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) {
+ DRIVERS_LICENSE -> Value.DRIVERS_LICENSE
+ PASSPORT -> Value.PASSPORT
+ PASSPORT_CARD -> Value.PASSPORT_CARD
+ EIN_LETTER -> Value.EIN_LETTER
+ TAX_RETURN -> Value.TAX_RETURN
+ OPERATING_AGREEMENT -> Value.OPERATING_AGREEMENT
+ CERTIFICATE_OF_FORMATION -> Value.CERTIFICATE_OF_FORMATION
+ CERTIFICATE_OF_GOOD_STANDING -> Value.CERTIFICATE_OF_GOOD_STANDING
+ ARTICLES_OF_INCORPORATION -> Value.ARTICLES_OF_INCORPORATION
+ ARTICLES_OF_ORGANIZATION -> Value.ARTICLES_OF_ORGANIZATION
+ BYLAWS -> Value.BYLAWS
+ GOVERNMENT_BUSINESS_LICENSE -> Value.GOVERNMENT_BUSINESS_LICENSE
+ PARTNERSHIP_AGREEMENT -> Value.PARTNERSHIP_AGREEMENT
+ SS4_FORM -> Value.SS4_FORM
+ BANK_STATEMENT -> Value.BANK_STATEMENT
+ UTILITY_BILL_STATEMENT -> Value.UTILITY_BILL_STATEMENT
+ SSN_CARD -> Value.SSN_CARD
+ ITIN_LETTER -> Value.ITIN_LETTER
+ FINCEN_BOI_REPORT -> Value.FINCEN_BOI_REPORT
+ 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) {
+ DRIVERS_LICENSE -> Known.DRIVERS_LICENSE
+ PASSPORT -> Known.PASSPORT
+ PASSPORT_CARD -> Known.PASSPORT_CARD
+ EIN_LETTER -> Known.EIN_LETTER
+ TAX_RETURN -> Known.TAX_RETURN
+ OPERATING_AGREEMENT -> Known.OPERATING_AGREEMENT
+ CERTIFICATE_OF_FORMATION -> Known.CERTIFICATE_OF_FORMATION
+ CERTIFICATE_OF_GOOD_STANDING -> Known.CERTIFICATE_OF_GOOD_STANDING
+ ARTICLES_OF_INCORPORATION -> Known.ARTICLES_OF_INCORPORATION
+ ARTICLES_OF_ORGANIZATION -> Known.ARTICLES_OF_ORGANIZATION
+ BYLAWS -> Known.BYLAWS
+ GOVERNMENT_BUSINESS_LICENSE -> Known.GOVERNMENT_BUSINESS_LICENSE
+ PARTNERSHIP_AGREEMENT -> Known.PARTNERSHIP_AGREEMENT
+ SS4_FORM -> Known.SS4_FORM
+ BANK_STATEMENT -> Known.BANK_STATEMENT
+ UTILITY_BILL_STATEMENT -> Known.UTILITY_BILL_STATEMENT
+ SSN_CARD -> Known.SSN_CARD
+ ITIN_LETTER -> Known.ITIN_LETTER
+ FINCEN_BOI_REPORT -> Known.FINCEN_BOI_REPORT
+ else -> throw LithicInvalidDataException("Unknown DocumentType: $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(): DocumentType = 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 DocumentType && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ /** A document upload that belongs to the overall account holder document */
+ class RequiredDocumentUpload
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val token: JsonField,
+ private val acceptedEntityStatusReasons: JsonField>,
+ private val created: JsonField,
+ private val imageType: JsonField,
+ private val rejectedEntityStatusReasons: JsonField>,
+ private val status: JsonField,
+ private val statusReasons: JsonField>,
+ private val updated: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("token") @ExcludeMissing token: JsonField = JsonMissing.of(),
+ @JsonProperty("accepted_entity_status_reasons")
+ @ExcludeMissing
+ acceptedEntityStatusReasons: JsonField> = JsonMissing.of(),
+ @JsonProperty("created")
+ @ExcludeMissing
+ created: JsonField = JsonMissing.of(),
+ @JsonProperty("image_type")
+ @ExcludeMissing
+ imageType: JsonField = JsonMissing.of(),
+ @JsonProperty("rejected_entity_status_reasons")
+ @ExcludeMissing
+ rejectedEntityStatusReasons: JsonField> = JsonMissing.of(),
+ @JsonProperty("status")
+ @ExcludeMissing
+ status: JsonField = JsonMissing.of(),
+ @JsonProperty("status_reasons")
+ @ExcludeMissing
+ statusReasons: JsonField> = JsonMissing.of(),
+ @JsonProperty("updated")
+ @ExcludeMissing
+ updated: JsonField = JsonMissing.of(),
+ ) : this(
+ token,
+ acceptedEntityStatusReasons,
+ created,
+ imageType,
+ rejectedEntityStatusReasons,
+ status,
+ statusReasons,
+ updated,
+ mutableMapOf(),
+ )
+
+ /**
+ * The token of the document upload
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun token(): Optional = token.getOptional("token")
+
+ /**
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun acceptedEntityStatusReasons(): Optional> =
+ acceptedEntityStatusReasons.getOptional("accepted_entity_status_reasons")
+
+ /**
+ * When the document upload was created
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun created(): Optional = created.getOptional("created")
+
+ /**
+ * The type of image that was uploaded
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun imageType(): Optional = imageType.getOptional("image_type")
+
+ /**
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun rejectedEntityStatusReasons(): Optional