diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7fef08e1b..a81246476 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.97.1" + ".": "0.98.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index a53b1e2c2..0ae331cd6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 167 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-54e6f7955e86265bc870eaae7f4a9cd716292457a83e032567f22bbb9ce6ad0d.yml -openapi_spec_hash: 6adbff5e5aeda88504047fc2c87e3fa0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-aa089e65735b8884f8cb391b39b9a0b295819e438bf976c98cc6150628ca5488.yml +openapi_spec_hash: 719876533d1496e9192c7a734a78c736 config_hash: e9a46eb8acb9dc2c236f3e1958a1c4dd diff --git a/CHANGELOG.md b/CHANGELOG.md index 492eef95a..990677dc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 0.98.0 (2025-07-28) + +Full Changelog: [v0.97.1...v0.98.0](https://github.com/lithic-com/lithic-java/compare/v0.97.1...v0.98.0) + +### Features + +* **api:** updates Transaction retrieve response to match API ([88464d7](https://github.com/lithic-com/lithic-java/commit/88464d78e371337db7a1c4530866a9d18ba893d4)) + + +### Documentation + +* more code comments ([ceb45ee](https://github.com/lithic-com/lithic-java/commit/ceb45ee1e189449f1097d181d86238b1f535805d)) + ## 0.97.1 (2025-07-24) Full Changelog: [v0.97.0...v0.97.1](https://github.com/lithic-com/lithic-java/compare/v0.97.0...v0.97.1) diff --git a/README.md b/README.md index 24a7c240b..d8a1548f7 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ -[![Maven Central](https://img.shields.io/maven-central/v/com.lithic.api/lithic-java)](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.97.1) -[![javadoc](https://javadoc.io/badge2/com.lithic.api/lithic-java/0.97.1/javadoc.svg)](https://javadoc.io/doc/com.lithic.api/lithic-java/0.97.1) +[![Maven Central](https://img.shields.io/maven-central/v/com.lithic.api/lithic-java)](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.98.0) +[![javadoc](https://javadoc.io/badge2/com.lithic.api/lithic-java/0.98.0/javadoc.svg)](https://javadoc.io/doc/com.lithic.api/lithic-java/0.98.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.97.1). +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.98.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.97.1") +implementation("com.lithic.api:lithic-java:0.98.0") ``` ### Maven @@ -33,7 +33,7 @@ implementation("com.lithic.api:lithic-java:0.97.1") com.lithic.api lithic-java - 0.97.1 + 0.98.0 ``` @@ -377,7 +377,7 @@ If the SDK threw an exception, but you're _certain_ the version is compatible, t ### Retries -The SDK automatically retries 2 times by default, with a short exponential backoff. +The SDK automatically retries 2 times by default, with a short exponential backoff between requests. Only the following error types are retried: @@ -387,7 +387,7 @@ Only the following error types are retried: - 429 Rate Limit - 5xx Internal -The API may also explicitly instruct the SDK to retry or not retry a response. +The API may also explicitly instruct the SDK to retry or not retry a request. To set a custom number of retries, configure the client using the `maxRetries` method: diff --git a/build.gradle.kts b/build.gradle.kts index 88485b384..e99ae9d22 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ repositories { allprojects { group = "com.lithic.api" - version = "0.97.1" // x-release-please-version + version = "0.98.0" // x-release-please-version } subprojects { diff --git a/lithic-java-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClient.kt b/lithic-java-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClient.kt index d9ecc2ef0..8b454be22 100644 --- a/lithic-java-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClient.kt +++ b/lithic-java-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClient.kt @@ -7,7 +7,9 @@ import com.lithic.api.client.LithicClient import com.lithic.api.client.LithicClientImpl import com.lithic.api.core.ClientOptions import com.lithic.api.core.Timeout +import com.lithic.api.core.http.AsyncStreamResponse import com.lithic.api.core.http.Headers +import com.lithic.api.core.http.HttpClient import com.lithic.api.core.http.QueryParams import com.lithic.api.core.jsonMapper import java.net.Proxy @@ -20,13 +22,22 @@ import javax.net.ssl.SSLSocketFactory import javax.net.ssl.X509TrustManager import kotlin.jvm.optionals.getOrNull +/** + * A class that allows building an instance of [LithicClient] with [OkHttpClient] as the underlying + * [HttpClient]. + */ class LithicOkHttpClient private constructor() { companion object { - /** Returns a mutable builder for constructing an instance of [LithicOkHttpClient]. */ + /** Returns a mutable builder for constructing an instance of [LithicClient]. */ @JvmStatic fun builder() = Builder() + /** + * Returns a client configured using system properties and environment variables. + * + * @see ClientOptions.Builder.fromEnv + */ @JvmStatic fun fromEnv(): LithicClient = builder().fromEnv().build() } @@ -103,25 +114,64 @@ class LithicOkHttpClient private constructor() { clientOptions.checkJacksonVersionCompatibility(checkJacksonVersionCompatibility) } + /** + * The Jackson JSON mapper to use for serializing and deserializing JSON. + * + * Defaults to [com.lithic.api.core.jsonMapper]. The default is usually sufficient and + * rarely needs to be overridden. + */ fun jsonMapper(jsonMapper: JsonMapper) = apply { clientOptions.jsonMapper(jsonMapper) } + /** + * The executor to use for running [AsyncStreamResponse.Handler] callbacks. + * + * Defaults to a dedicated cached thread pool. + */ fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { clientOptions.streamHandlerExecutor(streamHandlerExecutor) } + /** + * The clock to use for operations that require timing, like retries. + * + * This is primarily useful for using a fake clock in tests. + * + * Defaults to [Clock.systemUTC]. + */ fun clock(clock: Clock) = apply { clientOptions.clock(clock) } + /** + * The base URL to use for every request. + * + * Defaults to the production environment: `https://api.lithic.com`. + * + * The following other environments, with dedicated builder methods, are available: + * - sandbox: `https://sandbox.lithic.com` + */ fun baseUrl(baseUrl: String?) = apply { clientOptions.baseUrl(baseUrl) } /** Alias for calling [Builder.baseUrl] with `baseUrl.orElse(null)`. */ fun baseUrl(baseUrl: Optional) = baseUrl(baseUrl.getOrNull()) + /** Sets [baseUrl] to `https://sandbox.lithic.com`. */ fun sandbox() = apply { clientOptions.sandbox() } + /** + * Whether to call `validate` on every response before returning it. + * + * Defaults to false, which means the shape of the response will not be validated upfront. + * Instead, validation will only occur for the parts of the response that are accessed. + */ fun responseValidation(responseValidation: Boolean) = apply { clientOptions.responseValidation(responseValidation) } + /** + * Sets the maximum time allowed for various parts of an HTTP call's lifecycle, excluding + * retries. + * + * Defaults to [Timeout.default]. + */ fun timeout(timeout: Timeout) = apply { clientOptions.timeout(timeout) } /** @@ -133,6 +183,21 @@ class LithicOkHttpClient private constructor() { */ fun timeout(timeout: Duration) = apply { clientOptions.timeout(timeout) } + /** + * The maximum number of times to retry failed requests, with a short exponential backoff + * between requests. + * + * Only the following error types are retried: + * - Connection errors (for example, due to a network connectivity problem) + * - 408 Request Timeout + * - 409 Conflict + * - 429 Rate Limit + * - 5xx Internal + * + * The API may also explicitly instruct the SDK to retry or not retry a request. + * + * Defaults to 2. + */ fun maxRetries(maxRetries: Int) = apply { clientOptions.maxRetries(maxRetries) } fun apiKey(apiKey: String) = apply { clientOptions.apiKey(apiKey) } @@ -225,6 +290,11 @@ class LithicOkHttpClient private constructor() { clientOptions.removeAllQueryParams(keys) } + /** + * Updates configuration using system properties and environment variables. + * + * @see ClientOptions.Builder.fromEnv + */ fun fromEnv() = apply { clientOptions.fromEnv() } /** diff --git a/lithic-java-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClientAsync.kt b/lithic-java-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClientAsync.kt index 6fbdea01e..6e2efccdd 100644 --- a/lithic-java-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClientAsync.kt +++ b/lithic-java-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClientAsync.kt @@ -7,7 +7,9 @@ import com.lithic.api.client.LithicClientAsync import com.lithic.api.client.LithicClientAsyncImpl import com.lithic.api.core.ClientOptions import com.lithic.api.core.Timeout +import com.lithic.api.core.http.AsyncStreamResponse import com.lithic.api.core.http.Headers +import com.lithic.api.core.http.HttpClient import com.lithic.api.core.http.QueryParams import com.lithic.api.core.jsonMapper import java.net.Proxy @@ -20,13 +22,22 @@ import javax.net.ssl.SSLSocketFactory import javax.net.ssl.X509TrustManager import kotlin.jvm.optionals.getOrNull +/** + * A class that allows building an instance of [LithicClientAsync] with [OkHttpClient] as the + * underlying [HttpClient]. + */ class LithicOkHttpClientAsync private constructor() { companion object { - /** Returns a mutable builder for constructing an instance of [LithicOkHttpClientAsync]. */ + /** Returns a mutable builder for constructing an instance of [LithicClientAsync]. */ @JvmStatic fun builder() = Builder() + /** + * Returns a client configured using system properties and environment variables. + * + * @see ClientOptions.Builder.fromEnv + */ @JvmStatic fun fromEnv(): LithicClientAsync = builder().fromEnv().build() } @@ -103,25 +114,64 @@ class LithicOkHttpClientAsync private constructor() { clientOptions.checkJacksonVersionCompatibility(checkJacksonVersionCompatibility) } + /** + * The Jackson JSON mapper to use for serializing and deserializing JSON. + * + * Defaults to [com.lithic.api.core.jsonMapper]. The default is usually sufficient and + * rarely needs to be overridden. + */ fun jsonMapper(jsonMapper: JsonMapper) = apply { clientOptions.jsonMapper(jsonMapper) } + /** + * The executor to use for running [AsyncStreamResponse.Handler] callbacks. + * + * Defaults to a dedicated cached thread pool. + */ fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { clientOptions.streamHandlerExecutor(streamHandlerExecutor) } + /** + * The clock to use for operations that require timing, like retries. + * + * This is primarily useful for using a fake clock in tests. + * + * Defaults to [Clock.systemUTC]. + */ fun clock(clock: Clock) = apply { clientOptions.clock(clock) } + /** + * The base URL to use for every request. + * + * Defaults to the production environment: `https://api.lithic.com`. + * + * The following other environments, with dedicated builder methods, are available: + * - sandbox: `https://sandbox.lithic.com` + */ fun baseUrl(baseUrl: String?) = apply { clientOptions.baseUrl(baseUrl) } /** Alias for calling [Builder.baseUrl] with `baseUrl.orElse(null)`. */ fun baseUrl(baseUrl: Optional) = baseUrl(baseUrl.getOrNull()) + /** Sets [baseUrl] to `https://sandbox.lithic.com`. */ fun sandbox() = apply { clientOptions.sandbox() } + /** + * Whether to call `validate` on every response before returning it. + * + * Defaults to false, which means the shape of the response will not be validated upfront. + * Instead, validation will only occur for the parts of the response that are accessed. + */ fun responseValidation(responseValidation: Boolean) = apply { clientOptions.responseValidation(responseValidation) } + /** + * Sets the maximum time allowed for various parts of an HTTP call's lifecycle, excluding + * retries. + * + * Defaults to [Timeout.default]. + */ fun timeout(timeout: Timeout) = apply { clientOptions.timeout(timeout) } /** @@ -133,6 +183,21 @@ class LithicOkHttpClientAsync private constructor() { */ fun timeout(timeout: Duration) = apply { clientOptions.timeout(timeout) } + /** + * The maximum number of times to retry failed requests, with a short exponential backoff + * between requests. + * + * Only the following error types are retried: + * - Connection errors (for example, due to a network connectivity problem) + * - 408 Request Timeout + * - 409 Conflict + * - 429 Rate Limit + * - 5xx Internal + * + * The API may also explicitly instruct the SDK to retry or not retry a request. + * + * Defaults to 2. + */ fun maxRetries(maxRetries: Int) = apply { clientOptions.maxRetries(maxRetries) } fun apiKey(apiKey: String) = apply { clientOptions.apiKey(apiKey) } @@ -225,6 +290,11 @@ class LithicOkHttpClientAsync private constructor() { clientOptions.removeAllQueryParams(keys) } + /** + * Updates configuration using system properties and environment variables. + * + * @see ClientOptions.Builder.fromEnv + */ fun fromEnv() = apply { clientOptions.fromEnv() } /** diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/core/ClientOptions.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/core/ClientOptions.kt index a51671f55..022ff6526 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/core/ClientOptions.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/core/ClientOptions.kt @@ -3,6 +3,7 @@ package com.lithic.api.core import com.fasterxml.jackson.databind.json.JsonMapper +import com.lithic.api.core.http.AsyncStreamResponse import com.lithic.api.core.http.Headers import com.lithic.api.core.http.HttpClient import com.lithic.api.core.http.PhantomReachableClosingHttpClient @@ -17,9 +18,15 @@ import java.util.concurrent.ThreadFactory import java.util.concurrent.atomic.AtomicLong import kotlin.jvm.optionals.getOrNull +/** A class representing the SDK client configuration. */ class ClientOptions private constructor( private val originalHttpClient: HttpClient, + /** + * The HTTP client to use in the SDK. + * + * Use the one published in `lithic-java-client-okhttp` or implement your own. + */ @get:JvmName("httpClient") val httpClient: HttpClient, /** * Whether to throw an exception if any of the Jackson versions detected at runtime are @@ -29,14 +36,61 @@ private constructor( * the SDK will work correctly when using an incompatible Jackson version. */ @get:JvmName("checkJacksonVersionCompatibility") val checkJacksonVersionCompatibility: Boolean, + /** + * The Jackson JSON mapper to use for serializing and deserializing JSON. + * + * Defaults to [com.lithic.api.core.jsonMapper]. The default is usually sufficient and rarely + * needs to be overridden. + */ @get:JvmName("jsonMapper") val jsonMapper: JsonMapper, + /** + * The executor to use for running [AsyncStreamResponse.Handler] callbacks. + * + * Defaults to a dedicated cached thread pool. + */ @get:JvmName("streamHandlerExecutor") val streamHandlerExecutor: Executor, + /** + * The clock to use for operations that require timing, like retries. + * + * This is primarily useful for using a fake clock in tests. + * + * Defaults to [Clock.systemUTC]. + */ @get:JvmName("clock") val clock: Clock, private val baseUrl: String?, + /** Headers to send with the request. */ @get:JvmName("headers") val headers: Headers, + /** Query params to send with the request. */ @get:JvmName("queryParams") val queryParams: QueryParams, + /** + * Whether to call `validate` on every response before returning it. + * + * Defaults to false, which means the shape of the response will not be validated upfront. + * Instead, validation will only occur for the parts of the response that are accessed. + */ @get:JvmName("responseValidation") val responseValidation: Boolean, + /** + * Sets the maximum time allowed for various parts of an HTTP call's lifecycle, excluding + * retries. + * + * Defaults to [Timeout.default]. + */ @get:JvmName("timeout") val timeout: Timeout, + /** + * The maximum number of times to retry failed requests, with a short exponential backoff + * between requests. + * + * Only the following error types are retried: + * - Connection errors (for example, due to a network connectivity problem) + * - 408 Request Timeout + * - 409 Conflict + * - 429 Rate Limit + * - 5xx Internal + * + * The API may also explicitly instruct the SDK to retry or not retry a request. + * + * Defaults to 2. + */ @get:JvmName("maxRetries") val maxRetries: Int, @get:JvmName("apiKey") val apiKey: String, private val webhookSecret: String?, @@ -48,6 +102,14 @@ private constructor( } } + /** + * The base URL to use for every request. + * + * Defaults to the production environment: `https://api.lithic.com`. + * + * The following other environments, with dedicated builder methods, are available: + * - sandbox: `https://sandbox.lithic.com` + */ fun baseUrl(): String = baseUrl ?: PRODUCTION_URL fun webhookSecret(): Optional = Optional.ofNullable(webhookSecret) @@ -71,6 +133,11 @@ private constructor( */ @JvmStatic fun builder() = Builder() + /** + * Returns options configured using system properties and environment variables. + * + * @see Builder.fromEnv + */ @JvmStatic fun fromEnv(): ClientOptions = builder().fromEnv().build() } @@ -108,6 +175,11 @@ private constructor( webhookSecret = clientOptions.webhookSecret } + /** + * The HTTP client to use in the SDK. + * + * Use the one published in `lithic-java-client-okhttp` or implement your own. + */ fun httpClient(httpClient: HttpClient) = apply { this.httpClient = PhantomReachableClosingHttpClient(httpClient) } @@ -123,25 +195,64 @@ private constructor( this.checkJacksonVersionCompatibility = checkJacksonVersionCompatibility } + /** + * The Jackson JSON mapper to use for serializing and deserializing JSON. + * + * Defaults to [com.lithic.api.core.jsonMapper]. The default is usually sufficient and + * rarely needs to be overridden. + */ fun jsonMapper(jsonMapper: JsonMapper) = apply { this.jsonMapper = jsonMapper } + /** + * The executor to use for running [AsyncStreamResponse.Handler] callbacks. + * + * Defaults to a dedicated cached thread pool. + */ fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { this.streamHandlerExecutor = streamHandlerExecutor } + /** + * The clock to use for operations that require timing, like retries. + * + * This is primarily useful for using a fake clock in tests. + * + * Defaults to [Clock.systemUTC]. + */ fun clock(clock: Clock) = apply { this.clock = clock } + /** + * The base URL to use for every request. + * + * Defaults to the production environment: `https://api.lithic.com`. + * + * The following other environments, with dedicated builder methods, are available: + * - sandbox: `https://sandbox.lithic.com` + */ fun baseUrl(baseUrl: String?) = apply { this.baseUrl = baseUrl } /** Alias for calling [Builder.baseUrl] with `baseUrl.orElse(null)`. */ fun baseUrl(baseUrl: Optional) = baseUrl(baseUrl.getOrNull()) + /** Sets [baseUrl] to `https://sandbox.lithic.com`. */ fun sandbox() = baseUrl(SANDBOX_URL) + /** + * Whether to call `validate` on every response before returning it. + * + * Defaults to false, which means the shape of the response will not be validated upfront. + * Instead, validation will only occur for the parts of the response that are accessed. + */ fun responseValidation(responseValidation: Boolean) = apply { this.responseValidation = responseValidation } + /** + * Sets the maximum time allowed for various parts of an HTTP call's lifecycle, excluding + * retries. + * + * Defaults to [Timeout.default]. + */ fun timeout(timeout: Timeout) = apply { this.timeout = timeout } /** @@ -153,6 +264,21 @@ private constructor( */ fun timeout(timeout: Duration) = timeout(Timeout.builder().request(timeout).build()) + /** + * The maximum number of times to retry failed requests, with a short exponential backoff + * between requests. + * + * Only the following error types are retried: + * - Connection errors (for example, due to a network connectivity problem) + * - 408 Request Timeout + * - 409 Conflict + * - 429 Rate Limit + * - 5xx Internal + * + * The API may also explicitly instruct the SDK to retry or not retry a request. + * + * Defaults to 2. + */ fun maxRetries(maxRetries: Int) = apply { this.maxRetries = maxRetries } fun apiKey(apiKey: String) = apply { this.apiKey = apiKey } @@ -245,6 +371,19 @@ private constructor( fun timeout(): Timeout = timeout + /** + * Updates configuration using system properties and environment variables. + * + * See this table for the available options: + * + * |Setter |System property |Environment variable |Required|Default value | + * |---------------|----------------------|-----------------------|--------|--------------------------| + * |`apiKey` |`lithic.apiKey` |`LITHIC_API_KEY` |true |- | + * |`webhookSecret`|`lithic.webhookSecret`|`LITHIC_WEBHOOK_SECRET`|false |- | + * |`baseUrl` |`lithic.baseUrl` |`LITHIC_BASE_URL` |true |`"https://api.lithic.com"`| + * + * System properties take precedence over environment variables. + */ fun fromEnv() = apply { (System.getProperty("lithic.baseUrl") ?: System.getenv("LITHIC_BASE_URL"))?.let { baseUrl(it) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderCreateParams.kt index e145748e2..3a87546ab 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderCreateParams.kt @@ -40,8 +40,10 @@ private constructor( fun body(): Body = body + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderListDocumentsParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderListDocumentsParams.kt index fd73c4df0..0cb763afc 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderListDocumentsParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderListDocumentsParams.kt @@ -33,8 +33,10 @@ private constructor( fun accountHolderToken(): Optional = Optional.ofNullable(accountHolderToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderListParams.kt index 9a1a781af..fb928b8ee 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderListParams.kt @@ -83,8 +83,10 @@ private constructor( */ fun startingAfter(): Optional = Optional.ofNullable(startingAfter) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderRetrieveDocumentParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderRetrieveDocumentParams.kt index 0ee458db4..b6e9dcbc1 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderRetrieveDocumentParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderRetrieveDocumentParams.kt @@ -37,8 +37,10 @@ private constructor( fun documentToken(): Optional = Optional.ofNullable(documentToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderRetrieveParams.kt index 8bc12fe6e..b9892183a 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderRetrieveParams.kt @@ -19,8 +19,10 @@ private constructor( fun accountHolderToken(): Optional = Optional.ofNullable(accountHolderToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentDocumentReviewParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentDocumentReviewParams.kt index 09e81a38c..3ccb5ac6b 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentDocumentReviewParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentDocumentReviewParams.kt @@ -97,8 +97,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentReviewParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentReviewParams.kt index 8b5a39411..e51440e8c 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentReviewParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentReviewParams.kt @@ -82,8 +82,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderUpdateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderUpdateParams.kt index 8e6ef4acc..2fb1c9737 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderUpdateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderUpdateParams.kt @@ -56,8 +56,10 @@ private constructor( /** The KYB request payload for updating a business. */ fun body(): Body = body + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderUploadDocumentParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderUploadDocumentParams.kt index 7b02e8fc1..3a39cd6da 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderUploadDocumentParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderUploadDocumentParams.kt @@ -81,8 +81,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountListParams.kt index 17fa04b8b..c87c0ad7b 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountListParams.kt @@ -50,8 +50,10 @@ private constructor( */ fun startingAfter(): Optional = Optional.ofNullable(startingAfter) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountRetrieveParams.kt index 06c9289ca..132d9a865 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountRetrieveParams.kt @@ -19,8 +19,10 @@ private constructor( fun accountToken(): Optional = Optional.ofNullable(accountToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountRetrieveSpendLimitsParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountRetrieveSpendLimitsParams.kt index 2b4a2603c..a499d0610 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountRetrieveSpendLimitsParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountRetrieveSpendLimitsParams.kt @@ -24,8 +24,10 @@ private constructor( fun accountToken(): Optional = Optional.ofNullable(accountToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountUpdateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountUpdateParams.kt index 00fb0fc39..ed19164d4 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountUpdateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountUpdateParams.kt @@ -179,8 +179,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListParams.kt index b0013c089..4d1fa4163 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListParams.kt @@ -25,8 +25,10 @@ private constructor( fun financialAccountType(): Optional = Optional.ofNullable(financialAccountType) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ApplyParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ApplyParams.kt index 14e07211f..f15996d6d 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ApplyParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ApplyParams.kt @@ -51,8 +51,10 @@ private constructor( fun body(): Body = body + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2BacktestCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2BacktestCreateParams.kt index 75ec1ad67..46c6151bc 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2BacktestCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2BacktestCreateParams.kt @@ -85,8 +85,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2BacktestRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2BacktestRetrieveParams.kt index 527e7e596..b6dfc1ecf 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2BacktestRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2BacktestRetrieveParams.kt @@ -39,8 +39,10 @@ private constructor( fun authRuleBacktestToken(): Optional = Optional.ofNullable(authRuleBacktestToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2CreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2CreateParams.kt index 50e2c94f8..8b8c2249f 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2CreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2CreateParams.kt @@ -44,8 +44,10 @@ private constructor( fun body(): Body = body + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2DeleteParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2DeleteParams.kt index 916c1d433..e7b751de4 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2DeleteParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2DeleteParams.kt @@ -22,10 +22,13 @@ private constructor( fun authRuleToken(): Optional = Optional.ofNullable(authRuleToken) + /** Additional body properties to send with the request. */ fun _additionalBodyProperties(): Map = additionalBodyProperties + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2DraftParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2DraftParams.kt index 8a3fd1a6b..316c92db7 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2DraftParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2DraftParams.kt @@ -63,8 +63,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ListParams.kt index 59f8780c9..b89830034 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ListParams.kt @@ -54,8 +54,10 @@ private constructor( */ fun startingAfter(): Optional = Optional.ofNullable(startingAfter) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2PromoteParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2PromoteParams.kt index d68222e73..7ca444e19 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2PromoteParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2PromoteParams.kt @@ -25,10 +25,13 @@ private constructor( fun authRuleToken(): Optional = Optional.ofNullable(authRuleToken) + /** Additional body properties to send with the request. */ fun _additionalBodyProperties(): Map = additionalBodyProperties + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ReportParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ReportParams.kt index 2ae0a9729..efdc8324e 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ReportParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ReportParams.kt @@ -67,10 +67,13 @@ private constructor( fun authRuleToken(): Optional = Optional.ofNullable(authRuleToken) + /** Additional body properties to send with the request. */ fun _additionalBodyProperties(): Map = additionalBodyProperties + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2RetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2RetrieveParams.kt index 8ceef6bd9..e0ee032db 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2RetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2RetrieveParams.kt @@ -19,8 +19,10 @@ private constructor( fun authRuleToken(): Optional = Optional.ofNullable(authRuleToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2RetrieveReportParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2RetrieveReportParams.kt index 19f7faf27..be1a49ac4 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2RetrieveReportParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2RetrieveReportParams.kt @@ -41,8 +41,10 @@ private constructor( /** End date for the report */ fun end(): LocalDate = end + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2UpdateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2UpdateParams.kt index 2b5d215d6..b9bb37e73 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2UpdateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2UpdateParams.kt @@ -52,8 +52,10 @@ private constructor( fun body(): Body = body + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthStreamEnrollmentRetrieveSecretParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthStreamEnrollmentRetrieveSecretParams.kt index b7dcef038..5d6a2ce95 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthStreamEnrollmentRetrieveSecretParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthStreamEnrollmentRetrieveSecretParams.kt @@ -20,8 +20,10 @@ private constructor( private val additionalQueryParams: QueryParams, ) : Params { + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthStreamEnrollmentRotateSecretParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthStreamEnrollmentRotateSecretParams.kt index 422827a5c..0356998ce 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthStreamEnrollmentRotateSecretParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthStreamEnrollmentRotateSecretParams.kt @@ -23,10 +23,13 @@ private constructor( private val additionalBodyProperties: Map, ) : Params { + /** Additional body properties to send with the request. */ fun _additionalBodyProperties(): Map = additionalBodyProperties + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BalanceListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BalanceListParams.kt index c90b4adec..16d36cd09 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BalanceListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BalanceListParams.kt @@ -39,8 +39,10 @@ private constructor( fun financialAccountType(): Optional = Optional.ofNullable(financialAccountType) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferCreateParams.kt index 4c0d68a67..502ed72ae 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferCreateParams.kt @@ -157,8 +157,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferListParams.kt index be6f0b254..af183e33b 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferListParams.kt @@ -79,8 +79,10 @@ private constructor( /** Book transfer status to be returned. */ fun status(): Optional = Optional.ofNullable(status) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferRetrieveParams.kt index ff02306cf..118f6f323 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferRetrieveParams.kt @@ -19,8 +19,10 @@ private constructor( fun bookTransferToken(): Optional = Optional.ofNullable(bookTransferToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferReverseParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferReverseParams.kt index 0e1232f0e..94260f343 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferReverseParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferReverseParams.kt @@ -47,8 +47,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAggregateBalanceListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAggregateBalanceListParams.kt index 424372fef..d06e78d06 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAggregateBalanceListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardAggregateBalanceListParams.kt @@ -24,8 +24,10 @@ private constructor( /** Business to retrieve aggregate balances for. */ fun businessAccountToken(): Optional = Optional.ofNullable(businessAccountToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBalanceListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBalanceListParams.kt index e41a834bf..60d5f6b7a 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBalanceListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBalanceListParams.kt @@ -33,8 +33,10 @@ private constructor( fun lastTransactionEventToken(): Optional = Optional.ofNullable(lastTransactionEventToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardConvertPhysicalParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardConvertPhysicalParams.kt index 7b9014c5a..2d226d287 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardConvertPhysicalParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardConvertPhysicalParams.kt @@ -114,8 +114,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardCreateParams.kt index 52eb2d79b..3290d9dc4 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardCreateParams.kt @@ -395,8 +395,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardEmbedParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardEmbedParams.kt index 2b3b63f73..d9e503668 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardEmbedParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardEmbedParams.kt @@ -47,8 +47,10 @@ private constructor( /** SHA256 HMAC of the embed_request JSON string with base64 digest. */ fun hmac(): String = hmac + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardFinancialTransactionListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardFinancialTransactionListParams.kt index af4319ea5..cd1ea4fbf 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardFinancialTransactionListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardFinancialTransactionListParams.kt @@ -65,8 +65,10 @@ private constructor( /** Financial Transaction status to be returned. */ fun status(): Optional = Optional.ofNullable(status) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardFinancialTransactionRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardFinancialTransactionRetrieveParams.kt index 619cde299..cca1d191c 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardFinancialTransactionRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardFinancialTransactionRetrieveParams.kt @@ -24,8 +24,10 @@ private constructor( fun financialTransactionToken(): Optional = Optional.ofNullable(financialTransactionToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardListParams.kt index bf3a7d8d8..e9385c330 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardListParams.kt @@ -66,8 +66,10 @@ private constructor( /** Returns cards with the specified state. */ fun state(): Optional = Optional.ofNullable(state) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardProgramListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardProgramListParams.kt index a86d7aa78..6397a895a 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardProgramListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardProgramListParams.kt @@ -34,8 +34,10 @@ private constructor( */ fun startingAfter(): Optional = Optional.ofNullable(startingAfter) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardProgramRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardProgramRetrieveParams.kt index cc161ef07..10e9b47e0 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardProgramRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardProgramRetrieveParams.kt @@ -19,8 +19,10 @@ private constructor( fun cardProgramToken(): Optional = Optional.ofNullable(cardProgramToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardProvisionParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardProvisionParams.kt index 4f835327c..1e6481746 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardProvisionParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardProvisionParams.kt @@ -137,8 +137,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardReissueParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardReissueParams.kt index cd2235e19..f9291f903 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardReissueParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardReissueParams.kt @@ -109,8 +109,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardRenewParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardRenewParams.kt index 4c0e23040..90e98e9a4 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardRenewParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardRenewParams.kt @@ -145,8 +145,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardRetrieveParams.kt index e9c827183..87e17ed9e 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardRetrieveParams.kt @@ -19,8 +19,10 @@ private constructor( fun cardToken(): Optional = Optional.ofNullable(cardToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardRetrieveSpendLimitsParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardRetrieveSpendLimitsParams.kt index bebffd96d..3f903d386 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardRetrieveSpendLimitsParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardRetrieveSpendLimitsParams.kt @@ -24,8 +24,10 @@ private constructor( fun cardToken(): Optional = Optional.ofNullable(cardToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardSearchByPanParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardSearchByPanParams.kt index 58be6f398..c76208df6 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardSearchByPanParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardSearchByPanParams.kt @@ -48,8 +48,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardUpdateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardUpdateParams.kt index 60a9306ff..9a2a5a324 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardUpdateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardUpdateParams.kt @@ -231,8 +231,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardWebProvisionParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardWebProvisionParams.kt index 42007c87b..a0e7a6848 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardWebProvisionParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardWebProvisionParams.kt @@ -55,8 +55,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ClientApiStatusParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ClientApiStatusParams.kt index 7ee9ad105..e5abf0be2 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ClientApiStatusParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ClientApiStatusParams.kt @@ -14,8 +14,10 @@ private constructor( private val additionalQueryParams: QueryParams, ) : Params { + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CreditProductExtendedCreditRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CreditProductExtendedCreditRetrieveParams.kt index 035bf47fb..f74c0cb2e 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CreditProductExtendedCreditRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CreditProductExtendedCreditRetrieveParams.kt @@ -19,8 +19,10 @@ private constructor( fun creditProductToken(): Optional = Optional.ofNullable(creditProductToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CreditProductPrimeRateCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CreditProductPrimeRateCreateParams.kt index 40e626a1a..c92ff8093 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CreditProductPrimeRateCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CreditProductPrimeRateCreateParams.kt @@ -65,8 +65,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CreditProductPrimeRateRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CreditProductPrimeRateRetrieveParams.kt index 535056564..95aa5843a 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CreditProductPrimeRateRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CreditProductPrimeRateRetrieveParams.kt @@ -29,8 +29,10 @@ private constructor( /** The effective date that the prime rate starts after */ fun startingAfter(): Optional = Optional.ofNullable(startingAfter) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DigitalCardArtListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DigitalCardArtListParams.kt index 88a0338fd..87675fa6c 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DigitalCardArtListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DigitalCardArtListParams.kt @@ -34,8 +34,10 @@ private constructor( */ fun startingAfter(): Optional = Optional.ofNullable(startingAfter) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DigitalCardArtRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DigitalCardArtRetrieveParams.kt index 0966c6b44..e33208f06 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DigitalCardArtRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DigitalCardArtRetrieveParams.kt @@ -19,8 +19,10 @@ private constructor( fun digitalCardArtToken(): Optional = Optional.ofNullable(digitalCardArtToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeCreateParams.kt index 0f5b2682f..a21ebe269 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeCreateParams.kt @@ -109,8 +109,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeDeleteEvidenceParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeDeleteEvidenceParams.kt index 43594ec2d..d9bd745a8 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeDeleteEvidenceParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeDeleteEvidenceParams.kt @@ -29,10 +29,13 @@ private constructor( fun evidenceToken(): Optional = Optional.ofNullable(evidenceToken) + /** Additional body properties to send with the request. */ fun _additionalBodyProperties(): Map = additionalBodyProperties + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeDeleteParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeDeleteParams.kt index 04070ceff..0f660af3b 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeDeleteParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeDeleteParams.kt @@ -22,10 +22,13 @@ private constructor( fun disputeToken(): Optional = Optional.ofNullable(disputeToken) + /** Additional body properties to send with the request. */ fun _additionalBodyProperties(): Map = additionalBodyProperties + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeInitiateEvidenceUploadParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeInitiateEvidenceUploadParams.kt index 79b25b67f..c1e6695dc 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeInitiateEvidenceUploadParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeInitiateEvidenceUploadParams.kt @@ -52,8 +52,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeListEvidencesParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeListEvidencesParams.kt index 4a272b745..1dc813fca 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeListEvidencesParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeListEvidencesParams.kt @@ -53,8 +53,10 @@ private constructor( */ fun startingAfter(): Optional = Optional.ofNullable(startingAfter) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeListParams.kt index 7e80a55d4..afa3f25a0 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeListParams.kt @@ -63,8 +63,10 @@ private constructor( /** Transaction tokens to filter by. */ fun transactionTokens(): Optional> = Optional.ofNullable(transactionTokens) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeRetrieveEvidenceParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeRetrieveEvidenceParams.kt index 4fa812c55..4ecc28043 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeRetrieveEvidenceParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeRetrieveEvidenceParams.kt @@ -23,8 +23,10 @@ private constructor( fun evidenceToken(): Optional = Optional.ofNullable(evidenceToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeRetrieveParams.kt index 74df3f665..879445e97 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeRetrieveParams.kt @@ -19,8 +19,10 @@ private constructor( fun disputeToken(): Optional = Optional.ofNullable(disputeToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeUpdateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeUpdateParams.kt index 79ab1f435..04bcf8bf7 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeUpdateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeUpdateParams.kt @@ -95,8 +95,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventEventSubscriptionResendParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventEventSubscriptionResendParams.kt index a4782fe91..22f08a96c 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventEventSubscriptionResendParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventEventSubscriptionResendParams.kt @@ -26,10 +26,13 @@ private constructor( fun eventSubscriptionToken(): Optional = Optional.ofNullable(eventSubscriptionToken) + /** Additional body properties to send with the request. */ fun _additionalBodyProperties(): Map = additionalBodyProperties + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventListAttemptsParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventListAttemptsParams.kt index 028806f06..9392cef48 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventListAttemptsParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventListAttemptsParams.kt @@ -60,8 +60,10 @@ private constructor( fun status(): Optional = Optional.ofNullable(status) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventListParams.kt index 089349a66..dec64d5fd 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventListParams.kt @@ -63,8 +63,10 @@ private constructor( /** Whether to include the event payload content in the response. */ fun withContent(): Optional = Optional.ofNullable(withContent) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventRetrieveParams.kt index 65ceac3a6..8f61720d3 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventRetrieveParams.kt @@ -19,8 +19,10 @@ private constructor( fun eventToken(): Optional = Optional.ofNullable(eventToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionCreateParams.kt index f95808c2d..2bbb61aa3 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionCreateParams.kt @@ -94,8 +94,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionDeleteParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionDeleteParams.kt index e9545c9cd..8744262d2 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionDeleteParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionDeleteParams.kt @@ -22,10 +22,13 @@ private constructor( fun eventSubscriptionToken(): Optional = Optional.ofNullable(eventSubscriptionToken) + /** Additional body properties to send with the request. */ fun _additionalBodyProperties(): Map = additionalBodyProperties + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListAttemptsParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListAttemptsParams.kt index 6d35f3706..68e9d9f5f 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListAttemptsParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListAttemptsParams.kt @@ -60,8 +60,10 @@ private constructor( fun status(): Optional = Optional.ofNullable(status) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListParams.kt index fc63fe158..7a5d8dbe2 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListParams.kt @@ -34,8 +34,10 @@ private constructor( */ fun startingAfter(): Optional = Optional.ofNullable(startingAfter) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRecoverParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRecoverParams.kt index 3e40325e8..36b6983e0 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRecoverParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRecoverParams.kt @@ -38,10 +38,13 @@ private constructor( */ fun end(): Optional = Optional.ofNullable(end) + /** Additional body properties to send with the request. */ fun _additionalBodyProperties(): Map = additionalBodyProperties + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionReplayMissingParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionReplayMissingParams.kt index e8dba119b..b1bbfdb4b 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionReplayMissingParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionReplayMissingParams.kt @@ -43,10 +43,13 @@ private constructor( */ fun end(): Optional = Optional.ofNullable(end) + /** Additional body properties to send with the request. */ fun _additionalBodyProperties(): Map = additionalBodyProperties + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRetrieveParams.kt index aad88a48e..4eda69289 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRetrieveParams.kt @@ -19,8 +19,10 @@ private constructor( fun eventSubscriptionToken(): Optional = Optional.ofNullable(eventSubscriptionToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRetrieveSecretParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRetrieveSecretParams.kt index 58cc48984..38eeadf11 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRetrieveSecretParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRetrieveSecretParams.kt @@ -19,8 +19,10 @@ private constructor( fun eventSubscriptionToken(): Optional = Optional.ofNullable(eventSubscriptionToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRotateSecretParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRotateSecretParams.kt index 47a9bdde4..11c0f2250 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRotateSecretParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRotateSecretParams.kt @@ -25,10 +25,13 @@ private constructor( fun eventSubscriptionToken(): Optional = Optional.ofNullable(eventSubscriptionToken) + /** Additional body properties to send with the request. */ fun _additionalBodyProperties(): Map = additionalBodyProperties + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionSendSimulatedExampleParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionSendSimulatedExampleParams.kt index 26ba59b9d..3f85b03c0 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionSendSimulatedExampleParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionSendSimulatedExampleParams.kt @@ -48,8 +48,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionUpdateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionUpdateParams.kt index 75f4e7432..c3c4cf416 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionUpdateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionUpdateParams.kt @@ -97,8 +97,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateParams.kt index f9f4b5e1a..f477356d0 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateParams.kt @@ -43,8 +43,10 @@ private constructor( fun body(): Optional = Optional.ofNullable(body) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListParams.kt index 0bea16248..26aca8c32 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListParams.kt @@ -58,8 +58,10 @@ private constructor( fun verificationStates(): Optional> = Optional.ofNullable(verificationStates) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountMicroDepositCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountMicroDepositCreateParams.kt index be8f99941..5bcb97245 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountMicroDepositCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountMicroDepositCreateParams.kt @@ -48,8 +48,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveParams.kt index 4db5c8bb9..1867cbd45 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveParams.kt @@ -19,8 +19,10 @@ private constructor( fun externalBankAccountToken(): Optional = Optional.ofNullable(externalBankAccountToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsParams.kt index bc986ba48..a2e41b25c 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsParams.kt @@ -46,8 +46,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryPrenoteParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryPrenoteParams.kt index 0d83281f7..9829e03c1 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryPrenoteParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryPrenoteParams.kt @@ -46,8 +46,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateParams.kt index 8a8859c1f..801c207f8 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateParams.kt @@ -168,8 +168,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPayment.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPayment.kt index 15528a01b..44ba40427 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPayment.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPayment.kt @@ -25,8 +25,11 @@ import kotlin.jvm.optionals.getOrNull class ExternalPayment private constructor( private val token: JsonField, - private val category: JsonField, private val created: JsonField, + private val family: JsonField, + private val status: JsonField, + private val updated: JsonField, + private val category: JsonField, private val currency: JsonField, private val events: JsonField>, private val financialAccountToken: JsonField, @@ -34,8 +37,6 @@ private constructor( private val pendingAmount: JsonField, private val result: JsonField, private val settledAmount: JsonField, - private val status: JsonField, - private val updated: JsonField, private val userDefinedId: JsonField, private val additionalProperties: MutableMap, ) { @@ -43,12 +44,21 @@ private constructor( @JsonCreator private constructor( @JsonProperty("token") @ExcludeMissing token: JsonField = JsonMissing.of(), - @JsonProperty("category") - @ExcludeMissing - category: JsonField = JsonMissing.of(), @JsonProperty("created") @ExcludeMissing created: JsonField = JsonMissing.of(), + @JsonProperty("family") + @ExcludeMissing + family: JsonField = JsonMissing.of(), + @JsonProperty("status") + @ExcludeMissing + status: JsonField = JsonMissing.of(), + @JsonProperty("updated") + @ExcludeMissing + updated: JsonField = JsonMissing.of(), + @JsonProperty("category") + @ExcludeMissing + category: JsonField = JsonMissing.of(), @JsonProperty("currency") @ExcludeMissing currency: JsonField = JsonMissing.of(), @JsonProperty("events") @ExcludeMissing @@ -68,19 +78,16 @@ private constructor( @JsonProperty("settled_amount") @ExcludeMissing settledAmount: JsonField = JsonMissing.of(), - @JsonProperty("status") - @ExcludeMissing - status: JsonField = JsonMissing.of(), - @JsonProperty("updated") - @ExcludeMissing - updated: JsonField = JsonMissing.of(), @JsonProperty("user_defined_id") @ExcludeMissing userDefinedId: JsonField = JsonMissing.of(), ) : this( token, - category, created, + family, + status, + updated, + category, currency, events, financialAccountToken, @@ -88,84 +95,96 @@ private constructor( pendingAmount, result, settledAmount, - status, - updated, userDefinedId, mutableMapOf(), ) /** + * Unique identifier for the transaction + * * @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 token(): String = token.getRequired("token") /** + * ISO 8601 timestamp of when the transaction was created + * * @throws LithicInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). */ - fun category(): ExternalPaymentCategory = category.getRequired("category") + fun created(): OffsetDateTime = created.getRequired("created") /** * @throws LithicInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). */ - fun created(): OffsetDateTime = created.getRequired("created") + fun family(): TransactionFamilyTypes = family.getRequired("family") /** + * The status of the transaction + * * @throws LithicInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). */ - fun currency(): String = currency.getRequired("currency") + fun status(): TransactionStatus = status.getRequired("status") /** + * ISO 8601 timestamp of when the transaction was last updated + * * @throws LithicInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). */ - fun events(): List = events.getRequired("events") + fun updated(): OffsetDateTime = updated.getRequired("updated") /** - * @throws LithicInvalidDataException if the JSON field has an unexpected type or is - * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). */ - fun financialAccountToken(): String = - financialAccountToken.getRequired("financial_account_token") + fun category(): Optional = category.getOptional("category") /** - * @throws LithicInvalidDataException if the JSON field has an unexpected type or is - * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). */ - fun paymentType(): ExternalPaymentDirection = paymentType.getRequired("payment_type") + fun currency(): Optional = currency.getOptional("currency") /** - * @throws LithicInvalidDataException if the JSON field has an unexpected type or is - * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). */ - fun pendingAmount(): Long = pendingAmount.getRequired("pending_amount") + fun events(): Optional> = events.getOptional("events") /** - * @throws LithicInvalidDataException if the JSON field has an unexpected type or is - * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). */ - fun result(): TransactionResult = result.getRequired("result") + fun financialAccountToken(): Optional = + financialAccountToken.getOptional("financial_account_token") /** - * @throws LithicInvalidDataException if the JSON field has an unexpected type or is - * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). */ - fun settledAmount(): Long = settledAmount.getRequired("settled_amount") + fun paymentType(): Optional = paymentType.getOptional("payment_type") /** - * @throws LithicInvalidDataException if the JSON field has an unexpected type or is - * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). */ - fun status(): TransactionStatus = status.getRequired("status") + fun pendingAmount(): Optional = pendingAmount.getOptional("pending_amount") /** - * @throws LithicInvalidDataException if the JSON field has an unexpected type or is - * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). */ - fun updated(): OffsetDateTime = updated.getRequired("updated") + fun result(): Optional = result.getOptional("result") + + /** + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun settledAmount(): Optional = settledAmount.getOptional("settled_amount") /** * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -181,20 +200,43 @@ private constructor( @JsonProperty("token") @ExcludeMissing fun _token(): JsonField = token /** - * Returns the raw JSON value of [category]. + * Returns the raw JSON value of [created]. * - * Unlike [category], this method doesn't throw if the JSON field has an unexpected type. + * Unlike [created], this method doesn't throw if the JSON field has an unexpected type. */ - @JsonProperty("category") + @JsonProperty("created") @ExcludeMissing fun _created(): JsonField = created + + /** + * Returns the raw JSON value of [family]. + * + * Unlike [family], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("family") @ExcludeMissing - fun _category(): JsonField = category + fun _family(): JsonField = family /** - * Returns the raw JSON value of [created]. + * Returns the raw JSON value of [status]. * - * Unlike [created], this method doesn't throw if the JSON field has an unexpected type. + * Unlike [status], this method doesn't throw if the JSON field has an unexpected type. */ - @JsonProperty("created") @ExcludeMissing fun _created(): JsonField = created + @JsonProperty("status") @ExcludeMissing fun _status(): JsonField = status + + /** + * Returns the raw JSON value of [updated]. + * + * Unlike [updated], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("updated") @ExcludeMissing fun _updated(): JsonField = updated + + /** + * Returns the raw JSON value of [category]. + * + * Unlike [category], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("category") + @ExcludeMissing + fun _category(): JsonField = category /** * Returns the raw JSON value of [currency]. @@ -256,20 +298,6 @@ private constructor( @ExcludeMissing fun _settledAmount(): JsonField = settledAmount - /** - * 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 [updated]. - * - * Unlike [updated], this method doesn't throw if the JSON field has an unexpected type. - */ - @JsonProperty("updated") @ExcludeMissing fun _updated(): JsonField = updated - /** * Returns the raw JSON value of [userDefinedId]. * @@ -299,15 +327,8 @@ private constructor( * The following fields are required: * ```java * .token() - * .category() * .created() - * .currency() - * .events() - * .financialAccountToken() - * .paymentType() - * .pendingAmount() - * .result() - * .settledAmount() + * .family() * .status() * .updated() * ``` @@ -319,25 +340,29 @@ private constructor( class Builder internal constructor() { private var token: JsonField? = null - private var category: JsonField? = null private var created: JsonField? = null - private var currency: JsonField? = null - private var events: JsonField>? = null - private var financialAccountToken: JsonField? = null - private var paymentType: JsonField? = null - private var pendingAmount: JsonField? = null - private var result: JsonField? = null - private var settledAmount: JsonField? = null + private var family: JsonField? = null private var status: JsonField? = null private var updated: JsonField? = null + private var category: JsonField = JsonMissing.of() + private var currency: JsonField = JsonMissing.of() + private var events: JsonField>? = null + private var financialAccountToken: JsonField = JsonMissing.of() + private var paymentType: JsonField = JsonMissing.of() + private var pendingAmount: JsonField = JsonMissing.of() + private var result: JsonField = JsonMissing.of() + private var settledAmount: JsonField = JsonMissing.of() private var userDefinedId: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(externalPayment: ExternalPayment) = apply { token = externalPayment.token - category = externalPayment.category created = externalPayment.created + family = externalPayment.family + status = externalPayment.status + updated = externalPayment.updated + category = externalPayment.category currency = externalPayment.currency events = externalPayment.events.map { it.toMutableList() } financialAccountToken = externalPayment.financialAccountToken @@ -345,12 +370,11 @@ private constructor( pendingAmount = externalPayment.pendingAmount result = externalPayment.result settledAmount = externalPayment.settledAmount - status = externalPayment.status - updated = externalPayment.updated userDefinedId = externalPayment.userDefinedId additionalProperties = externalPayment.additionalProperties.toMutableMap() } + /** Unique identifier for the transaction */ fun token(token: String) = token(JsonField.of(token)) /** @@ -361,6 +385,53 @@ private constructor( */ fun token(token: JsonField) = apply { this.token = token } + /** ISO 8601 timestamp of when the transaction 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 family(family: TransactionFamilyTypes) = family(JsonField.of(family)) + + /** + * Sets [Builder.family] to an arbitrary JSON value. + * + * You should usually call [Builder.family] with a well-typed [TransactionFamilyTypes] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun family(family: JsonField) = apply { this.family = family } + + /** The status of the transaction */ + fun status(status: TransactionStatus) = status(JsonField.of(status)) + + /** + * Sets [Builder.status] to an arbitrary JSON value. + * + * You should usually call [Builder.status] with a well-typed [TransactionStatus] 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 } + + /** ISO 8601 timestamp of when the transaction was last updated */ + fun updated(updated: OffsetDateTime) = updated(JsonField.of(updated)) + + /** + * Sets [Builder.updated] to an arbitrary JSON value. + * + * You should usually call [Builder.updated] with a well-typed [OffsetDateTime] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun updated(updated: JsonField) = apply { this.updated = updated } + fun category(category: ExternalPaymentCategory) = category(JsonField.of(category)) /** @@ -374,17 +445,6 @@ private constructor( this.category = category } - 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 currency(currency: String) = currency(JsonField.of(currency)) /** @@ -485,153 +545,431 @@ private constructor( this.settledAmount = settledAmount } - fun status(status: TransactionStatus) = status(JsonField.of(status)) + fun userDefinedId(userDefinedId: String) = userDefinedId(JsonField.of(userDefinedId)) /** - * Sets [Builder.status] to an arbitrary JSON value. + * Sets [Builder.userDefinedId] to an arbitrary JSON value. * - * You should usually call [Builder.status] with a well-typed [TransactionStatus] value - * instead. This method is primarily for setting the field to an undocumented or not yet - * supported value. + * You should usually call [Builder.userDefinedId] with a well-typed [String] 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 userDefinedId(userDefinedId: JsonField) = apply { + this.userDefinedId = userDefinedId + } - fun updated(updated: OffsetDateTime) = updated(JsonField.of(updated)) + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } /** - * Sets [Builder.updated] to an arbitrary JSON value. + * Returns an immutable instance of [ExternalPayment]. * - * You should usually call [Builder.updated] with a well-typed [OffsetDateTime] value - * instead. This method is primarily for setting the field to an undocumented or not yet - * supported value. + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```java + * .token() + * .created() + * .family() + * .status() + * .updated() + * ``` + * + * @throws IllegalStateException if any required field is unset. */ - fun updated(updated: JsonField) = apply { this.updated = updated } + fun build(): ExternalPayment = + ExternalPayment( + checkRequired("token", token), + checkRequired("created", created), + checkRequired("family", family), + checkRequired("status", status), + checkRequired("updated", updated), + category, + currency, + (events ?: JsonMissing.of()).map { it.toImmutable() }, + financialAccountToken, + paymentType, + pendingAmount, + result, + settledAmount, + userDefinedId, + additionalProperties.toMutableMap(), + ) + } - fun userDefinedId(userDefinedId: String) = userDefinedId(JsonField.of(userDefinedId)) + private var validated: Boolean = false + + fun validate(): ExternalPayment = apply { + if (validated) { + return@apply + } + + token() + created() + family().validate() + status().validate() + updated() + category().ifPresent { it.validate() } + currency() + events().ifPresent { it.forEach { it.validate() } } + financialAccountToken() + paymentType().ifPresent { it.validate() } + pendingAmount() + result().ifPresent { it.validate() } + settledAmount() + userDefinedId() + 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 (token.asKnown().isPresent) 1 else 0) + + (if (created.asKnown().isPresent) 1 else 0) + + (family.asKnown().getOrNull()?.validity() ?: 0) + + (status.asKnown().getOrNull()?.validity() ?: 0) + + (if (updated.asKnown().isPresent) 1 else 0) + + (category.asKnown().getOrNull()?.validity() ?: 0) + + (if (currency.asKnown().isPresent) 1 else 0) + + (events.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) + + (if (financialAccountToken.asKnown().isPresent) 1 else 0) + + (paymentType.asKnown().getOrNull()?.validity() ?: 0) + + (if (pendingAmount.asKnown().isPresent) 1 else 0) + + (result.asKnown().getOrNull()?.validity() ?: 0) + + (if (settledAmount.asKnown().isPresent) 1 else 0) + + (if (userDefinedId.asKnown().isPresent) 1 else 0) + + class TransactionFamilyTypes + @JsonCreator + private constructor(private val value: JsonField) : Enum { /** - * Sets [Builder.userDefinedId] to an arbitrary JSON value. + * Returns this class instance's raw value. * - * You should usually call [Builder.userDefinedId] with a well-typed [String] value instead. - * This method is primarily for setting the field to an undocumented or not yet supported - * 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. */ - fun userDefinedId(userDefinedId: JsonField) = apply { - this.userDefinedId = userDefinedId + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val CARD = of("CARD") + + @JvmField val PAYMENT = of("PAYMENT") + + @JvmField val TRANSFER = of("TRANSFER") + + @JvmField val INTERNAL = of("INTERNAL") + + @JvmField val EXTERNAL_PAYMENT = of("EXTERNAL_PAYMENT") + + @JvmField val MANAGEMENT_OPERATION = of("MANAGEMENT_OPERATION") + + @JvmStatic fun of(value: String) = TransactionFamilyTypes(JsonField.of(value)) + } + + /** An enum containing [TransactionFamilyTypes]'s known values. */ + enum class Known { + CARD, + PAYMENT, + TRANSFER, + INTERNAL, + EXTERNAL_PAYMENT, + MANAGEMENT_OPERATION, + } + + /** + * An enum containing [TransactionFamilyTypes]'s known values, as well as an [_UNKNOWN] + * member. + * + * An instance of [TransactionFamilyTypes] can contain an unknown value in a couple of + * cases: + * - It was deserialized from data that doesn't match any known member. For example, if the + * SDK is on an older version than the API, then the API may respond with new members that + * the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + CARD, + PAYMENT, + TRANSFER, + INTERNAL, + EXTERNAL_PAYMENT, + MANAGEMENT_OPERATION, + /** + * An enum member indicating that [TransactionFamilyTypes] was instantiated with an + * unknown value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN] + * if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you want + * to throw for the unknown case. + */ + fun value(): Value = + when (this) { + CARD -> Value.CARD + PAYMENT -> Value.PAYMENT + TRANSFER -> Value.TRANSFER + INTERNAL -> Value.INTERNAL + EXTERNAL_PAYMENT -> Value.EXTERNAL_PAYMENT + MANAGEMENT_OPERATION -> Value.MANAGEMENT_OPERATION + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and don't + * want to throw for the unknown case. + * + * @throws LithicInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + CARD -> Known.CARD + PAYMENT -> Known.PAYMENT + TRANSFER -> Known.TRANSFER + INTERNAL -> Known.INTERNAL + EXTERNAL_PAYMENT -> Known.EXTERNAL_PAYMENT + MANAGEMENT_OPERATION -> Known.MANAGEMENT_OPERATION + else -> throw LithicInvalidDataException("Unknown TransactionFamilyTypes: $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(): TransactionFamilyTypes = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: LithicInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is TransactionFamilyTypes && value == other.value /* spotless:on */ + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + /** The status of the transaction */ + class TransactionStatus @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 PENDING = of("PENDING") + + @JvmField val SETTLED = of("SETTLED") + + @JvmField val DECLINED = of("DECLINED") + + @JvmField val REVERSED = of("REVERSED") + + @JvmField val CANCELED = of("CANCELED") + + @JvmStatic fun of(value: String) = TransactionStatus(JsonField.of(value)) + } + + /** An enum containing [TransactionStatus]'s known values. */ + enum class Known { + PENDING, + SETTLED, + DECLINED, + REVERSED, + CANCELED, } - fun additionalProperties(additionalProperties: Map) = apply { - this.additionalProperties.clear() - putAllAdditionalProperties(additionalProperties) - } + /** + * An enum containing [TransactionStatus]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [TransactionStatus] 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 { + PENDING, + SETTLED, + DECLINED, + REVERSED, + CANCELED, + /** + * An enum member indicating that [TransactionStatus] 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) { + PENDING -> Value.PENDING + SETTLED -> Value.SETTLED + DECLINED -> Value.DECLINED + REVERSED -> Value.REVERSED + CANCELED -> Value.CANCELED + 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) { + PENDING -> Known.PENDING + SETTLED -> Known.SETTLED + DECLINED -> Known.DECLINED + REVERSED -> Known.REVERSED + CANCELED -> Known.CANCELED + else -> throw LithicInvalidDataException("Unknown TransactionStatus: $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 putAdditionalProperty(key: String, value: JsonValue) = apply { - additionalProperties.put(key, value) - } + fun validate(): TransactionStatus = apply { + if (validated) { + return@apply + } - fun putAllAdditionalProperties(additionalProperties: Map) = apply { - this.additionalProperties.putAll(additionalProperties) + known() + validated = true } - fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) } - - fun removeAllAdditionalProperties(keys: Set) = apply { - keys.forEach(::removeAdditionalProperty) - } + fun isValid(): Boolean = + try { + validate() + true + } catch (e: LithicInvalidDataException) { + false + } /** - * Returns an immutable instance of [ExternalPayment]. - * - * Further updates to this [Builder] will not mutate the returned instance. - * - * The following fields are required: - * ```java - * .token() - * .category() - * .created() - * .currency() - * .events() - * .financialAccountToken() - * .paymentType() - * .pendingAmount() - * .result() - * .settledAmount() - * .status() - * .updated() - * ``` + * Returns a score indicating how many valid values are contained in this object + * recursively. * - * @throws IllegalStateException if any required field is unset. + * Used for best match union deserialization. */ - fun build(): ExternalPayment = - ExternalPayment( - checkRequired("token", token), - checkRequired("category", category), - checkRequired("created", created), - checkRequired("currency", currency), - checkRequired("events", events).map { it.toImmutable() }, - checkRequired("financialAccountToken", financialAccountToken), - checkRequired("paymentType", paymentType), - checkRequired("pendingAmount", pendingAmount), - checkRequired("result", result), - checkRequired("settledAmount", settledAmount), - checkRequired("status", status), - checkRequired("updated", updated), - userDefinedId, - additionalProperties.toMutableMap(), - ) - } + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 - private var validated: Boolean = false + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } - fun validate(): ExternalPayment = apply { - if (validated) { - return@apply + return /* spotless:off */ other is TransactionStatus && value == other.value /* spotless:on */ } - token() - category().validate() - created() - currency() - events().forEach { it.validate() } - financialAccountToken() - paymentType().validate() - pendingAmount() - result().validate() - settledAmount() - status().validate() - updated() - userDefinedId() - validated = true - } - - fun isValid(): Boolean = - try { - validate() - true - } catch (e: LithicInvalidDataException) { - false - } + override fun hashCode() = value.hashCode() - /** - * 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 (token.asKnown().isPresent) 1 else 0) + - (category.asKnown().getOrNull()?.validity() ?: 0) + - (if (created.asKnown().isPresent) 1 else 0) + - (if (currency.asKnown().isPresent) 1 else 0) + - (events.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) + - (if (financialAccountToken.asKnown().isPresent) 1 else 0) + - (paymentType.asKnown().getOrNull()?.validity() ?: 0) + - (if (pendingAmount.asKnown().isPresent) 1 else 0) + - (result.asKnown().getOrNull()?.validity() ?: 0) + - (if (settledAmount.asKnown().isPresent) 1 else 0) + - (status.asKnown().getOrNull()?.validity() ?: 0) + - (if (updated.asKnown().isPresent) 1 else 0) + - (if (userDefinedId.asKnown().isPresent) 1 else 0) + override fun toString() = value.toString() + } class ExternalPaymentCategory @JsonCreator @@ -1974,167 +2312,20 @@ private constructor( override fun toString() = value.toString() } - class TransactionStatus @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 PENDING = of("PENDING") - - @JvmField val SETTLED = of("SETTLED") - - @JvmField val DECLINED = of("DECLINED") - - @JvmField val REVERSED = of("REVERSED") - - @JvmField val CANCELED = of("CANCELED") - - @JvmStatic fun of(value: String) = TransactionStatus(JsonField.of(value)) - } - - /** An enum containing [TransactionStatus]'s known values. */ - enum class Known { - PENDING, - SETTLED, - DECLINED, - REVERSED, - CANCELED, - } - - /** - * An enum containing [TransactionStatus]'s known values, as well as an [_UNKNOWN] member. - * - * An instance of [TransactionStatus] 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 { - PENDING, - SETTLED, - DECLINED, - REVERSED, - CANCELED, - /** - * An enum member indicating that [TransactionStatus] 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) { - PENDING -> Value.PENDING - SETTLED -> Value.SETTLED - DECLINED -> Value.DECLINED - REVERSED -> Value.REVERSED - CANCELED -> Value.CANCELED - 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) { - PENDING -> Known.PENDING - SETTLED -> Known.SETTLED - DECLINED -> Known.DECLINED - REVERSED -> Known.REVERSED - CANCELED -> Known.CANCELED - else -> throw LithicInvalidDataException("Unknown TransactionStatus: $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(): TransactionStatus = apply { - if (validated) { - return@apply - } - - known() - validated = true - } - - fun isValid(): Boolean = - try { - validate() - true - } catch (e: LithicInvalidDataException) { - false - } - - /** - * Returns a score indicating how many valid values are contained in this object - * recursively. - * - * Used for best match union deserialization. - */ - @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is TransactionStatus && value == other.value /* spotless:on */ - } - - override fun hashCode() = value.hashCode() - - override fun toString() = value.toString() - } - override fun equals(other: Any?): Boolean { if (this === other) { return true } - return /* spotless:off */ other is ExternalPayment && token == other.token && category == other.category && created == other.created && currency == other.currency && events == other.events && financialAccountToken == other.financialAccountToken && paymentType == other.paymentType && pendingAmount == other.pendingAmount && result == other.result && settledAmount == other.settledAmount && status == other.status && updated == other.updated && userDefinedId == other.userDefinedId && additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is ExternalPayment && token == other.token && created == other.created && family == other.family && status == other.status && updated == other.updated && category == other.category && currency == other.currency && events == other.events && financialAccountToken == other.financialAccountToken && paymentType == other.paymentType && pendingAmount == other.pendingAmount && result == other.result && settledAmount == other.settledAmount && userDefinedId == other.userDefinedId && additionalProperties == other.additionalProperties /* spotless:on */ } /* spotless:off */ - private val hashCode: Int by lazy { Objects.hash(token, category, created, currency, events, financialAccountToken, paymentType, pendingAmount, result, settledAmount, status, updated, userDefinedId, additionalProperties) } + private val hashCode: Int by lazy { Objects.hash(token, created, family, status, updated, category, currency, events, financialAccountToken, paymentType, pendingAmount, result, settledAmount, userDefinedId, additionalProperties) } /* spotless:on */ override fun hashCode(): Int = hashCode override fun toString() = - "ExternalPayment{token=$token, category=$category, created=$created, currency=$currency, events=$events, financialAccountToken=$financialAccountToken, paymentType=$paymentType, pendingAmount=$pendingAmount, result=$result, settledAmount=$settledAmount, status=$status, updated=$updated, userDefinedId=$userDefinedId, additionalProperties=$additionalProperties}" + "ExternalPayment{token=$token, created=$created, family=$family, status=$status, updated=$updated, category=$category, currency=$currency, events=$events, financialAccountToken=$financialAccountToken, paymentType=$paymentType, pendingAmount=$pendingAmount, result=$result, settledAmount=$settledAmount, userDefinedId=$userDefinedId, additionalProperties=$additionalProperties}" } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentCancelParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentCancelParams.kt index 5ec152819..1a9b2f1fe 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentCancelParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentCancelParams.kt @@ -60,8 +60,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentCreateParams.kt index 12b343e24..dc9b192ad 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentCreateParams.kt @@ -150,8 +150,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentListParams.kt index abbef45bc..3631ec513 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentListParams.kt @@ -76,8 +76,10 @@ private constructor( /** Book transfer status to be returned. */ fun status(): Optional = Optional.ofNullable(status) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentReleaseParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentReleaseParams.kt index 54d40051d..5194110c4 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentReleaseParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentReleaseParams.kt @@ -60,8 +60,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentRetrieveParams.kt index 3648cdbb3..91e95a51a 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentRetrieveParams.kt @@ -19,8 +19,10 @@ private constructor( fun externalPaymentToken(): Optional = Optional.ofNullable(externalPaymentToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentReverseParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentReverseParams.kt index 1b0beb6cc..93f28a1d3 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentReverseParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentReverseParams.kt @@ -60,8 +60,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentSettleParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentSettleParams.kt index b4a0dac27..3dca3b1d3 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentSettleParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentSettleParams.kt @@ -74,8 +74,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountBalanceListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountBalanceListParams.kt index 6b0ad3c92..296a852c8 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountBalanceListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountBalanceListParams.kt @@ -33,8 +33,10 @@ private constructor( fun lastTransactionEventToken(): Optional = Optional.ofNullable(lastTransactionEventToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreateParams.kt index 21440a94f..80fce303f 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreateParams.kt @@ -86,8 +86,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreditConfigurationRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreditConfigurationRetrieveParams.kt index c94a5e044..3e588653a 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreditConfigurationRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreditConfigurationRetrieveParams.kt @@ -19,8 +19,10 @@ private constructor( fun financialAccountToken(): Optional = Optional.ofNullable(financialAccountToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreditConfigurationUpdateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreditConfigurationUpdateParams.kt index a6a8f12db..2996ad1bb 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreditConfigurationUpdateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreditConfigurationUpdateParams.kt @@ -90,8 +90,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountListParams.kt index b1e1b42b3..761863782 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountListParams.kt @@ -32,8 +32,10 @@ private constructor( /** List financial accounts of a given type */ fun type(): Optional = Optional.ofNullable(type) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountLoanTapeListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountLoanTapeListParams.kt index fc4f6efa9..5a2f86667 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountLoanTapeListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountLoanTapeListParams.kt @@ -53,8 +53,10 @@ private constructor( */ fun startingAfter(): Optional = Optional.ofNullable(startingAfter) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountLoanTapeRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountLoanTapeRetrieveParams.kt index 22eae0235..4cdcc4ad6 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountLoanTapeRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountLoanTapeRetrieveParams.kt @@ -25,8 +25,10 @@ private constructor( /** Globally unique identifier for loan tape. */ fun loanTapeToken(): Optional = Optional.ofNullable(loanTapeToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountRegisterAccountNumberParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountRegisterAccountNumberParams.kt index 30e55d8a7..e757736d3 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountRegisterAccountNumberParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountRegisterAccountNumberParams.kt @@ -46,8 +46,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountRetrieveParams.kt index e7fa29e8c..5d3c0df21 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountRetrieveParams.kt @@ -19,8 +19,10 @@ private constructor( fun financialAccountToken(): Optional = Optional.ofNullable(financialAccountToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountStatementLineItemListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountStatementLineItemListParams.kt index 7a8a28905..27a6fbc47 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountStatementLineItemListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountStatementLineItemListParams.kt @@ -43,8 +43,10 @@ private constructor( */ fun startingAfter(): Optional = Optional.ofNullable(startingAfter) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountStatementListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountStatementListParams.kt index 66eb22027..8b6c3a47c 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountStatementListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountStatementListParams.kt @@ -58,8 +58,10 @@ private constructor( */ fun startingAfter(): Optional = Optional.ofNullable(startingAfter) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountStatementRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountStatementRetrieveParams.kt index 63eb35c0c..c462de33b 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountStatementRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountStatementRetrieveParams.kt @@ -25,8 +25,10 @@ private constructor( /** Globally unique identifier for statements. */ fun statementToken(): Optional = Optional.ofNullable(statementToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountUpdateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountUpdateParams.kt index a008f28bc..a34a24fae 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountUpdateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountUpdateParams.kt @@ -45,8 +45,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountUpdateStatusParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountUpdateStatusParams.kt index 8cdd9c17c..1aed196b3 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountUpdateStatusParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountUpdateStatusParams.kt @@ -64,8 +64,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialTransactionListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialTransactionListParams.kt index 1e80bc3d2..22a3e4c5e 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialTransactionListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialTransactionListParams.kt @@ -65,8 +65,10 @@ private constructor( /** Financial Transaction status to be returned. */ fun status(): Optional = Optional.ofNullable(status) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialTransactionRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialTransactionRetrieveParams.kt index 8bc7bd651..0758fd0fc 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialTransactionRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialTransactionRetrieveParams.kt @@ -24,8 +24,10 @@ private constructor( fun financialTransactionToken(): Optional = Optional.ofNullable(financialTransactionToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FraudTransactionReportParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FraudTransactionReportParams.kt index b76df63b8..87ddcafa9 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FraudTransactionReportParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FraudTransactionReportParams.kt @@ -107,8 +107,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FraudTransactionRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FraudTransactionRetrieveParams.kt index 35d9b3df3..8ea71cdaf 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FraudTransactionRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FraudTransactionRetrieveParams.kt @@ -21,8 +21,10 @@ private constructor( fun transactionToken(): Optional = Optional.ofNullable(transactionToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FundingEventListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FundingEventListParams.kt index 589e42f20..64a729a92 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FundingEventListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FundingEventListParams.kt @@ -34,8 +34,10 @@ private constructor( */ fun startingAfter(): Optional = Optional.ofNullable(startingAfter) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FundingEventRetrieveDetailsParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FundingEventRetrieveDetailsParams.kt index 97b0b1d61..fd76a8b9d 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FundingEventRetrieveDetailsParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FundingEventRetrieveDetailsParams.kt @@ -19,8 +19,10 @@ private constructor( fun fundingEventToken(): Optional = Optional.ofNullable(fundingEventToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FundingEventRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FundingEventRetrieveParams.kt index c136f7f65..6bd26050d 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FundingEventRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FundingEventRetrieveParams.kt @@ -19,8 +19,10 @@ private constructor( fun fundingEventToken(): Optional = Optional.ofNullable(fundingEventToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationCreateParams.kt index 9c69ce8dd..b15893f97 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationCreateParams.kt @@ -178,8 +178,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationListParams.kt index 808a9b900..c9d39befc 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationListParams.kt @@ -72,8 +72,10 @@ private constructor( /** Management operation status to be returned. */ fun status(): Optional = Optional.ofNullable(status) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationRetrieveParams.kt index af0334121..32cb93870 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationRetrieveParams.kt @@ -19,8 +19,10 @@ private constructor( fun managementOperationToken(): Optional = Optional.ofNullable(managementOperationToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationReverseParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationReverseParams.kt index 7f54badc3..6ff8e24cb 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationReverseParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationReverseParams.kt @@ -60,8 +60,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationTransaction.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationTransaction.kt index 5f343f3c6..8bd873c1e 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationTransaction.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationTransaction.kt @@ -25,19 +25,20 @@ import kotlin.jvm.optionals.getOrNull class ManagementOperationTransaction private constructor( private val token: JsonField, - private val category: JsonField, private val created: JsonField, + private val family: JsonField, + private val status: JsonField, + private val updated: JsonField, + private val category: JsonField, private val currency: JsonField, private val direction: JsonField, private val events: JsonField>, + private val externalResource: JsonField, private val financialAccountToken: JsonField, private val pendingAmount: JsonField, private val result: JsonField, private val settledAmount: JsonField, - private val status: JsonField, private val transactionSeries: JsonField, - private val updated: JsonField, - private val externalResource: JsonField, private val userDefinedId: JsonField, private val additionalProperties: MutableMap, ) { @@ -45,12 +46,21 @@ private constructor( @JsonCreator private constructor( @JsonProperty("token") @ExcludeMissing token: JsonField = JsonMissing.of(), - @JsonProperty("category") - @ExcludeMissing - category: JsonField = JsonMissing.of(), @JsonProperty("created") @ExcludeMissing created: JsonField = JsonMissing.of(), + @JsonProperty("family") + @ExcludeMissing + family: JsonField = JsonMissing.of(), + @JsonProperty("status") + @ExcludeMissing + status: JsonField = JsonMissing.of(), + @JsonProperty("updated") + @ExcludeMissing + updated: JsonField = JsonMissing.of(), + @JsonProperty("category") + @ExcludeMissing + category: JsonField = JsonMissing.of(), @JsonProperty("currency") @ExcludeMissing currency: JsonField = JsonMissing.of(), @JsonProperty("direction") @ExcludeMissing @@ -58,6 +68,9 @@ private constructor( @JsonProperty("events") @ExcludeMissing events: JsonField> = JsonMissing.of(), + @JsonProperty("external_resource") + @ExcludeMissing + externalResource: JsonField = JsonMissing.of(), @JsonProperty("financial_account_token") @ExcludeMissing financialAccountToken: JsonField = JsonMissing.of(), @@ -70,128 +83,134 @@ private constructor( @JsonProperty("settled_amount") @ExcludeMissing settledAmount: JsonField = JsonMissing.of(), - @JsonProperty("status") - @ExcludeMissing - status: JsonField = JsonMissing.of(), @JsonProperty("transaction_series") @ExcludeMissing transactionSeries: JsonField = JsonMissing.of(), - @JsonProperty("updated") - @ExcludeMissing - updated: JsonField = JsonMissing.of(), - @JsonProperty("external_resource") - @ExcludeMissing - externalResource: JsonField = JsonMissing.of(), @JsonProperty("user_defined_id") @ExcludeMissing userDefinedId: JsonField = JsonMissing.of(), ) : this( token, - category, created, + family, + status, + updated, + category, currency, direction, events, + externalResource, financialAccountToken, pendingAmount, result, settledAmount, - status, transactionSeries, - updated, - externalResource, userDefinedId, mutableMapOf(), ) /** + * Unique identifier for the transaction + * * @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 token(): String = token.getRequired("token") /** + * ISO 8601 timestamp of when the transaction was created + * * @throws LithicInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). */ - fun category(): ManagementOperationCategory = category.getRequired("category") + fun created(): OffsetDateTime = created.getRequired("created") /** * @throws LithicInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). */ - fun created(): OffsetDateTime = created.getRequired("created") + fun family(): TransactionFamilyTypes = family.getRequired("family") /** + * The status of the transaction + * * @throws LithicInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). */ - fun currency(): String = currency.getRequired("currency") + fun status(): TransactionStatus = status.getRequired("status") /** + * ISO 8601 timestamp of when the transaction was last updated + * * @throws LithicInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). */ - fun direction(): ManagementOperationDirection = direction.getRequired("direction") + fun updated(): OffsetDateTime = updated.getRequired("updated") /** - * @throws LithicInvalidDataException if the JSON field has an unexpected type or is - * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). */ - fun events(): List = events.getRequired("events") + fun category(): Optional = category.getOptional("category") /** - * @throws LithicInvalidDataException if the JSON field has an unexpected type or is - * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). */ - fun financialAccountToken(): String = - financialAccountToken.getRequired("financial_account_token") + fun currency(): Optional = currency.getOptional("currency") /** - * @throws LithicInvalidDataException if the JSON field has an unexpected type or is - * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). */ - fun pendingAmount(): Long = pendingAmount.getRequired("pending_amount") + fun direction(): Optional = direction.getOptional("direction") /** - * @throws LithicInvalidDataException if the JSON field has an unexpected type or is - * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). */ - fun result(): TransactionResult = result.getRequired("result") + fun events(): Optional> = events.getOptional("events") /** - * @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). + * External resource associated with the management operation + * + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). */ - fun settledAmount(): Long = settledAmount.getRequired("settled_amount") + fun externalResource(): Optional = + externalResource.getOptional("external_resource") /** - * @throws LithicInvalidDataException if the JSON field has an unexpected type or is - * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). */ - fun status(): TransactionStatus = status.getRequired("status") + fun financialAccountToken(): Optional = + financialAccountToken.getOptional("financial_account_token") /** * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). */ - fun transactionSeries(): Optional = - transactionSeries.getOptional("transaction_series") + fun pendingAmount(): Optional = pendingAmount.getOptional("pending_amount") /** - * @throws LithicInvalidDataException if the JSON field has an unexpected type or is - * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). */ - fun updated(): OffsetDateTime = updated.getRequired("updated") + fun result(): Optional = result.getOptional("result") /** - * External resource associated with the management operation - * * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). */ - fun externalResource(): Optional = - externalResource.getOptional("external_resource") + fun settledAmount(): Optional = settledAmount.getOptional("settled_amount") + + /** + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun transactionSeries(): Optional = + transactionSeries.getOptional("transaction_series") /** * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -207,20 +226,43 @@ private constructor( @JsonProperty("token") @ExcludeMissing fun _token(): JsonField = token /** - * Returns the raw JSON value of [category]. + * Returns the raw JSON value of [created]. * - * Unlike [category], this method doesn't throw if the JSON field has an unexpected type. + * Unlike [created], this method doesn't throw if the JSON field has an unexpected type. */ - @JsonProperty("category") + @JsonProperty("created") @ExcludeMissing fun _created(): JsonField = created + + /** + * Returns the raw JSON value of [family]. + * + * Unlike [family], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("family") @ExcludeMissing - fun _category(): JsonField = category + fun _family(): JsonField = family /** - * Returns the raw JSON value of [created]. + * Returns the raw JSON value of [status]. * - * Unlike [created], this method doesn't throw if the JSON field has an unexpected type. + * Unlike [status], this method doesn't throw if the JSON field has an unexpected type. */ - @JsonProperty("created") @ExcludeMissing fun _created(): JsonField = created + @JsonProperty("status") @ExcludeMissing fun _status(): JsonField = status + + /** + * Returns the raw JSON value of [updated]. + * + * Unlike [updated], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("updated") @ExcludeMissing fun _updated(): JsonField = updated + + /** + * Returns the raw JSON value of [category]. + * + * Unlike [category], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("category") + @ExcludeMissing + fun _category(): JsonField = category /** * Returns the raw JSON value of [currency]. @@ -247,6 +289,16 @@ private constructor( @ExcludeMissing fun _events(): JsonField> = events + /** + * Returns the raw JSON value of [externalResource]. + * + * Unlike [externalResource], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("external_resource") + @ExcludeMissing + fun _externalResource(): JsonField = externalResource + /** * Returns the raw JSON value of [financialAccountToken]. * @@ -282,13 +334,6 @@ private constructor( @ExcludeMissing fun _settledAmount(): JsonField = settledAmount - /** - * 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 [transactionSeries]. * @@ -299,23 +344,6 @@ private constructor( @ExcludeMissing fun _transactionSeries(): JsonField = transactionSeries - /** - * Returns the raw JSON value of [updated]. - * - * Unlike [updated], this method doesn't throw if the JSON field has an unexpected type. - */ - @JsonProperty("updated") @ExcludeMissing fun _updated(): JsonField = updated - - /** - * Returns the raw JSON value of [externalResource]. - * - * Unlike [externalResource], this method doesn't throw if the JSON field has an unexpected - * type. - */ - @JsonProperty("external_resource") - @ExcludeMissing - fun _externalResource(): JsonField = externalResource - /** * Returns the raw JSON value of [userDefinedId]. * @@ -346,17 +374,9 @@ private constructor( * The following fields are required: * ```java * .token() - * .category() * .created() - * .currency() - * .direction() - * .events() - * .financialAccountToken() - * .pendingAmount() - * .result() - * .settledAmount() + * .family() * .status() - * .transactionSeries() * .updated() * ``` */ @@ -367,43 +387,46 @@ private constructor( class Builder internal constructor() { private var token: JsonField? = null - private var category: JsonField? = null private var created: JsonField? = null - private var currency: JsonField? = null - private var direction: JsonField? = null - private var events: JsonField>? = null - private var financialAccountToken: JsonField? = null - private var pendingAmount: JsonField? = null - private var result: JsonField? = null - private var settledAmount: JsonField? = null + private var family: JsonField? = null private var status: JsonField? = null - private var transactionSeries: JsonField? = null private var updated: JsonField? = null + private var category: JsonField = JsonMissing.of() + private var currency: JsonField = JsonMissing.of() + private var direction: JsonField = JsonMissing.of() + private var events: JsonField>? = null private var externalResource: JsonField = JsonMissing.of() + private var financialAccountToken: JsonField = JsonMissing.of() + private var pendingAmount: JsonField = JsonMissing.of() + private var result: JsonField = JsonMissing.of() + private var settledAmount: JsonField = JsonMissing.of() + private var transactionSeries: JsonField = JsonMissing.of() private var userDefinedId: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(managementOperationTransaction: ManagementOperationTransaction) = apply { token = managementOperationTransaction.token - category = managementOperationTransaction.category created = managementOperationTransaction.created + family = managementOperationTransaction.family + status = managementOperationTransaction.status + updated = managementOperationTransaction.updated + category = managementOperationTransaction.category currency = managementOperationTransaction.currency direction = managementOperationTransaction.direction events = managementOperationTransaction.events.map { it.toMutableList() } + externalResource = managementOperationTransaction.externalResource financialAccountToken = managementOperationTransaction.financialAccountToken pendingAmount = managementOperationTransaction.pendingAmount result = managementOperationTransaction.result settledAmount = managementOperationTransaction.settledAmount - status = managementOperationTransaction.status transactionSeries = managementOperationTransaction.transactionSeries - updated = managementOperationTransaction.updated - externalResource = managementOperationTransaction.externalResource userDefinedId = managementOperationTransaction.userDefinedId additionalProperties = managementOperationTransaction.additionalProperties.toMutableMap() } + /** Unique identifier for the transaction */ fun token(token: String) = token(JsonField.of(token)) /** @@ -414,6 +437,53 @@ private constructor( */ fun token(token: JsonField) = apply { this.token = token } + /** ISO 8601 timestamp of when the transaction 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 family(family: TransactionFamilyTypes) = family(JsonField.of(family)) + + /** + * Sets [Builder.family] to an arbitrary JSON value. + * + * You should usually call [Builder.family] with a well-typed [TransactionFamilyTypes] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun family(family: JsonField) = apply { this.family = family } + + /** The status of the transaction */ + fun status(status: TransactionStatus) = status(JsonField.of(status)) + + /** + * Sets [Builder.status] to an arbitrary JSON value. + * + * You should usually call [Builder.status] with a well-typed [TransactionStatus] 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 } + + /** ISO 8601 timestamp of when the transaction was last updated */ + fun updated(updated: OffsetDateTime) = updated(JsonField.of(updated)) + + /** + * Sets [Builder.updated] to an arbitrary JSON value. + * + * You should usually call [Builder.updated] with a well-typed [OffsetDateTime] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun updated(updated: JsonField) = apply { this.updated = updated } + fun category(category: ManagementOperationCategory) = category(JsonField.of(category)) /** @@ -427,17 +497,6 @@ private constructor( this.category = category } - 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 currency(currency: String) = currency(JsonField.of(currency)) /** @@ -486,6 +545,25 @@ private constructor( } } + /** External resource associated with the management operation */ + fun externalResource(externalResource: ExternalResource?) = + externalResource(JsonField.ofNullable(externalResource)) + + /** Alias for calling [Builder.externalResource] with `externalResource.orElse(null)`. */ + fun externalResource(externalResource: Optional) = + externalResource(externalResource.getOrNull()) + + /** + * Sets [Builder.externalResource] to an arbitrary JSON value. + * + * You should usually call [Builder.externalResource] with a well-typed [ExternalResource] + * value instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun externalResource(externalResource: JsonField) = apply { + this.externalResource = externalResource + } + fun financialAccountToken(financialAccountToken: String) = financialAccountToken(JsonField.of(financialAccountToken)) @@ -537,17 +615,6 @@ private constructor( this.settledAmount = settledAmount } - fun status(status: TransactionStatus) = status(JsonField.of(status)) - - /** - * Sets [Builder.status] to an arbitrary JSON value. - * - * You should usually call [Builder.status] with a well-typed [TransactionStatus] 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 transactionSeries(transactionSeries: TransactionSeries?) = transactionSeries(JsonField.ofNullable(transactionSeries)) @@ -566,168 +633,437 @@ private constructor( this.transactionSeries = transactionSeries } - fun updated(updated: OffsetDateTime) = updated(JsonField.of(updated)) + fun userDefinedId(userDefinedId: String) = userDefinedId(JsonField.of(userDefinedId)) /** - * Sets [Builder.updated] to an arbitrary JSON value. + * Sets [Builder.userDefinedId] to an arbitrary JSON value. * - * You should usually call [Builder.updated] with a well-typed [OffsetDateTime] value - * instead. This method is primarily for setting the field to an undocumented or not yet - * supported value. + * You should usually call [Builder.userDefinedId] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet supported + * value. */ - fun updated(updated: JsonField) = apply { this.updated = updated } + fun userDefinedId(userDefinedId: JsonField) = apply { + this.userDefinedId = userDefinedId + } - /** External resource associated with the management operation */ - fun externalResource(externalResource: ExternalResource?) = - externalResource(JsonField.ofNullable(externalResource)) + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } - /** Alias for calling [Builder.externalResource] with `externalResource.orElse(null)`. */ - fun externalResource(externalResource: Optional) = - externalResource(externalResource.getOrNull()) + 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) + } /** - * Sets [Builder.externalResource] to an arbitrary JSON value. + * Returns an immutable instance of [ManagementOperationTransaction]. * - * You should usually call [Builder.externalResource] with a well-typed [ExternalResource] - * value instead. This method is primarily for setting the field to an undocumented or not - * yet supported value. + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```java + * .token() + * .created() + * .family() + * .status() + * .updated() + * ``` + * + * @throws IllegalStateException if any required field is unset. */ - fun externalResource(externalResource: JsonField) = apply { - this.externalResource = externalResource + fun build(): ManagementOperationTransaction = + ManagementOperationTransaction( + checkRequired("token", token), + checkRequired("created", created), + checkRequired("family", family), + checkRequired("status", status), + checkRequired("updated", updated), + category, + currency, + direction, + (events ?: JsonMissing.of()).map { it.toImmutable() }, + externalResource, + financialAccountToken, + pendingAmount, + result, + settledAmount, + transactionSeries, + userDefinedId, + additionalProperties.toMutableMap(), + ) + } + + private var validated: Boolean = false + + fun validate(): ManagementOperationTransaction = apply { + if (validated) { + return@apply } - fun userDefinedId(userDefinedId: String) = userDefinedId(JsonField.of(userDefinedId)) + token() + created() + family().validate() + status().validate() + updated() + category().ifPresent { it.validate() } + currency() + direction().ifPresent { it.validate() } + events().ifPresent { it.forEach { it.validate() } } + externalResource().ifPresent { it.validate() } + financialAccountToken() + pendingAmount() + result().ifPresent { it.validate() } + settledAmount() + transactionSeries().ifPresent { it.validate() } + userDefinedId() + 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 (token.asKnown().isPresent) 1 else 0) + + (if (created.asKnown().isPresent) 1 else 0) + + (family.asKnown().getOrNull()?.validity() ?: 0) + + (status.asKnown().getOrNull()?.validity() ?: 0) + + (if (updated.asKnown().isPresent) 1 else 0) + + (category.asKnown().getOrNull()?.validity() ?: 0) + + (if (currency.asKnown().isPresent) 1 else 0) + + (direction.asKnown().getOrNull()?.validity() ?: 0) + + (events.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) + + (externalResource.asKnown().getOrNull()?.validity() ?: 0) + + (if (financialAccountToken.asKnown().isPresent) 1 else 0) + + (if (pendingAmount.asKnown().isPresent) 1 else 0) + + (result.asKnown().getOrNull()?.validity() ?: 0) + + (if (settledAmount.asKnown().isPresent) 1 else 0) + + (transactionSeries.asKnown().getOrNull()?.validity() ?: 0) + + (if (userDefinedId.asKnown().isPresent) 1 else 0) + + class TransactionFamilyTypes + @JsonCreator + private constructor(private val value: JsonField) : Enum { /** - * Sets [Builder.userDefinedId] to an arbitrary JSON value. + * Returns this class instance's raw value. * - * You should usually call [Builder.userDefinedId] with a well-typed [String] value instead. - * This method is primarily for setting the field to an undocumented or not yet supported - * 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. */ - fun userDefinedId(userDefinedId: JsonField) = apply { - this.userDefinedId = userDefinedId + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val CARD = of("CARD") + + @JvmField val PAYMENT = of("PAYMENT") + + @JvmField val TRANSFER = of("TRANSFER") + + @JvmField val INTERNAL = of("INTERNAL") + + @JvmField val EXTERNAL_PAYMENT = of("EXTERNAL_PAYMENT") + + @JvmField val MANAGEMENT_OPERATION = of("MANAGEMENT_OPERATION") + + @JvmStatic fun of(value: String) = TransactionFamilyTypes(JsonField.of(value)) } - fun additionalProperties(additionalProperties: Map) = apply { - this.additionalProperties.clear() - putAllAdditionalProperties(additionalProperties) + /** An enum containing [TransactionFamilyTypes]'s known values. */ + enum class Known { + CARD, + PAYMENT, + TRANSFER, + INTERNAL, + EXTERNAL_PAYMENT, + MANAGEMENT_OPERATION, } - fun putAdditionalProperty(key: String, value: JsonValue) = apply { - additionalProperties.put(key, value) + /** + * An enum containing [TransactionFamilyTypes]'s known values, as well as an [_UNKNOWN] + * member. + * + * An instance of [TransactionFamilyTypes] can contain an unknown value in a couple of + * cases: + * - It was deserialized from data that doesn't match any known member. For example, if the + * SDK is on an older version than the API, then the API may respond with new members that + * the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + CARD, + PAYMENT, + TRANSFER, + INTERNAL, + EXTERNAL_PAYMENT, + MANAGEMENT_OPERATION, + /** + * An enum member indicating that [TransactionFamilyTypes] was instantiated with an + * unknown value. + */ + _UNKNOWN, } - fun putAllAdditionalProperties(additionalProperties: Map) = apply { - this.additionalProperties.putAll(additionalProperties) - } + /** + * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN] + * if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you want + * to throw for the unknown case. + */ + fun value(): Value = + when (this) { + CARD -> Value.CARD + PAYMENT -> Value.PAYMENT + TRANSFER -> Value.TRANSFER + INTERNAL -> Value.INTERNAL + EXTERNAL_PAYMENT -> Value.EXTERNAL_PAYMENT + MANAGEMENT_OPERATION -> Value.MANAGEMENT_OPERATION + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and don't + * want to throw for the unknown case. + * + * @throws LithicInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + CARD -> Known.CARD + PAYMENT -> Known.PAYMENT + TRANSFER -> Known.TRANSFER + INTERNAL -> Known.INTERNAL + EXTERNAL_PAYMENT -> Known.EXTERNAL_PAYMENT + MANAGEMENT_OPERATION -> Known.MANAGEMENT_OPERATION + else -> throw LithicInvalidDataException("Unknown TransactionFamilyTypes: $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(): TransactionFamilyTypes = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: LithicInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is TransactionFamilyTypes && value == other.value /* spotless:on */ + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + /** The status of the transaction */ + class TransactionStatus @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 PENDING = of("PENDING") + + @JvmField val SETTLED = of("SETTLED") + + @JvmField val DECLINED = of("DECLINED") + + @JvmField val REVERSED = of("REVERSED") + + @JvmField val CANCELED = of("CANCELED") + + @JvmStatic fun of(value: String) = TransactionStatus(JsonField.of(value)) + } + + /** An enum containing [TransactionStatus]'s known values. */ + enum class Known { + PENDING, + SETTLED, + DECLINED, + REVERSED, + CANCELED, + } + + /** + * An enum containing [TransactionStatus]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [TransactionStatus] 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 { + PENDING, + SETTLED, + DECLINED, + REVERSED, + CANCELED, + /** + * An enum member indicating that [TransactionStatus] 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) { + PENDING -> Value.PENDING + SETTLED -> Value.SETTLED + DECLINED -> Value.DECLINED + REVERSED -> Value.REVERSED + CANCELED -> Value.CANCELED + 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) { + PENDING -> Known.PENDING + SETTLED -> Known.SETTLED + DECLINED -> Known.DECLINED + REVERSED -> Known.REVERSED + CANCELED -> Known.CANCELED + else -> throw LithicInvalidDataException("Unknown TransactionStatus: $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 removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) } + fun validate(): TransactionStatus = apply { + if (validated) { + return@apply + } - fun removeAllAdditionalProperties(keys: Set) = apply { - keys.forEach(::removeAdditionalProperty) + known() + validated = true } + fun isValid(): Boolean = + try { + validate() + true + } catch (e: LithicInvalidDataException) { + false + } + /** - * Returns an immutable instance of [ManagementOperationTransaction]. - * - * Further updates to this [Builder] will not mutate the returned instance. - * - * The following fields are required: - * ```java - * .token() - * .category() - * .created() - * .currency() - * .direction() - * .events() - * .financialAccountToken() - * .pendingAmount() - * .result() - * .settledAmount() - * .status() - * .transactionSeries() - * .updated() - * ``` + * Returns a score indicating how many valid values are contained in this object + * recursively. * - * @throws IllegalStateException if any required field is unset. + * Used for best match union deserialization. */ - fun build(): ManagementOperationTransaction = - ManagementOperationTransaction( - checkRequired("token", token), - checkRequired("category", category), - checkRequired("created", created), - checkRequired("currency", currency), - checkRequired("direction", direction), - checkRequired("events", events).map { it.toImmutable() }, - checkRequired("financialAccountToken", financialAccountToken), - checkRequired("pendingAmount", pendingAmount), - checkRequired("result", result), - checkRequired("settledAmount", settledAmount), - checkRequired("status", status), - checkRequired("transactionSeries", transactionSeries), - checkRequired("updated", updated), - externalResource, - userDefinedId, - additionalProperties.toMutableMap(), - ) - } + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 - private var validated: Boolean = false + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } - fun validate(): ManagementOperationTransaction = apply { - if (validated) { - return@apply + return /* spotless:off */ other is TransactionStatus && value == other.value /* spotless:on */ } - token() - category().validate() - created() - currency() - direction().validate() - events().forEach { it.validate() } - financialAccountToken() - pendingAmount() - result().validate() - settledAmount() - status().validate() - transactionSeries().ifPresent { it.validate() } - updated() - externalResource().ifPresent { it.validate() } - userDefinedId() - validated = true - } - - fun isValid(): Boolean = - try { - validate() - true - } catch (e: LithicInvalidDataException) { - false - } + override fun hashCode() = value.hashCode() - /** - * 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 (token.asKnown().isPresent) 1 else 0) + - (category.asKnown().getOrNull()?.validity() ?: 0) + - (if (created.asKnown().isPresent) 1 else 0) + - (if (currency.asKnown().isPresent) 1 else 0) + - (direction.asKnown().getOrNull()?.validity() ?: 0) + - (events.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) + - (if (financialAccountToken.asKnown().isPresent) 1 else 0) + - (if (pendingAmount.asKnown().isPresent) 1 else 0) + - (result.asKnown().getOrNull()?.validity() ?: 0) + - (if (settledAmount.asKnown().isPresent) 1 else 0) + - (status.asKnown().getOrNull()?.validity() ?: 0) + - (transactionSeries.asKnown().getOrNull()?.validity() ?: 0) + - (if (updated.asKnown().isPresent) 1 else 0) + - (externalResource.asKnown().getOrNull()?.validity() ?: 0) + - (if (userDefinedId.asKnown().isPresent) 1 else 0) + override fun toString() = value.toString() + } class ManagementOperationCategory @JsonCreator @@ -2107,153 +2443,6 @@ private constructor( override fun toString() = value.toString() } - class TransactionStatus @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 PENDING = of("PENDING") - - @JvmField val SETTLED = of("SETTLED") - - @JvmField val DECLINED = of("DECLINED") - - @JvmField val REVERSED = of("REVERSED") - - @JvmField val CANCELED = of("CANCELED") - - @JvmStatic fun of(value: String) = TransactionStatus(JsonField.of(value)) - } - - /** An enum containing [TransactionStatus]'s known values. */ - enum class Known { - PENDING, - SETTLED, - DECLINED, - REVERSED, - CANCELED, - } - - /** - * An enum containing [TransactionStatus]'s known values, as well as an [_UNKNOWN] member. - * - * An instance of [TransactionStatus] 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 { - PENDING, - SETTLED, - DECLINED, - REVERSED, - CANCELED, - /** - * An enum member indicating that [TransactionStatus] 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) { - PENDING -> Value.PENDING - SETTLED -> Value.SETTLED - DECLINED -> Value.DECLINED - REVERSED -> Value.REVERSED - CANCELED -> Value.CANCELED - 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) { - PENDING -> Known.PENDING - SETTLED -> Known.SETTLED - DECLINED -> Known.DECLINED - REVERSED -> Known.REVERSED - CANCELED -> Known.CANCELED - else -> throw LithicInvalidDataException("Unknown TransactionStatus: $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(): TransactionStatus = apply { - if (validated) { - return@apply - } - - known() - validated = true - } - - fun isValid(): Boolean = - try { - validate() - true - } catch (e: LithicInvalidDataException) { - false - } - - /** - * Returns a score indicating how many valid values are contained in this object - * recursively. - * - * Used for best match union deserialization. - */ - @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is TransactionStatus && value == other.value /* spotless:on */ - } - - override fun hashCode() = value.hashCode() - - override fun toString() = value.toString() - } - class TransactionSeries private constructor( private val relatedTransactionEventToken: JsonField, @@ -2515,15 +2704,15 @@ private constructor( return true } - return /* spotless:off */ other is ManagementOperationTransaction && token == other.token && category == other.category && created == other.created && currency == other.currency && direction == other.direction && events == other.events && financialAccountToken == other.financialAccountToken && pendingAmount == other.pendingAmount && result == other.result && settledAmount == other.settledAmount && status == other.status && transactionSeries == other.transactionSeries && updated == other.updated && externalResource == other.externalResource && userDefinedId == other.userDefinedId && additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is ManagementOperationTransaction && token == other.token && created == other.created && family == other.family && status == other.status && updated == other.updated && category == other.category && currency == other.currency && direction == other.direction && events == other.events && externalResource == other.externalResource && financialAccountToken == other.financialAccountToken && pendingAmount == other.pendingAmount && result == other.result && settledAmount == other.settledAmount && transactionSeries == other.transactionSeries && userDefinedId == other.userDefinedId && additionalProperties == other.additionalProperties /* spotless:on */ } /* spotless:off */ - private val hashCode: Int by lazy { Objects.hash(token, category, created, currency, direction, events, financialAccountToken, pendingAmount, result, settledAmount, status, transactionSeries, updated, externalResource, userDefinedId, additionalProperties) } + private val hashCode: Int by lazy { Objects.hash(token, created, family, status, updated, category, currency, direction, events, externalResource, financialAccountToken, pendingAmount, result, settledAmount, transactionSeries, userDefinedId, additionalProperties) } /* spotless:on */ override fun hashCode(): Int = hashCode override fun toString() = - "ManagementOperationTransaction{token=$token, category=$category, created=$created, currency=$currency, direction=$direction, events=$events, financialAccountToken=$financialAccountToken, pendingAmount=$pendingAmount, result=$result, settledAmount=$settledAmount, status=$status, transactionSeries=$transactionSeries, updated=$updated, externalResource=$externalResource, userDefinedId=$userDefinedId, additionalProperties=$additionalProperties}" + "ManagementOperationTransaction{token=$token, created=$created, family=$family, status=$status, updated=$updated, category=$category, currency=$currency, direction=$direction, events=$events, externalResource=$externalResource, financialAccountToken=$financialAccountToken, pendingAmount=$pendingAmount, result=$result, settledAmount=$settledAmount, transactionSeries=$transactionSeries, userDefinedId=$userDefinedId, additionalProperties=$additionalProperties}" } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/NetworkProgramListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/NetworkProgramListParams.kt index 10e72b19e..417556d65 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/NetworkProgramListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/NetworkProgramListParams.kt @@ -36,8 +36,10 @@ private constructor( /** Page size (for pagination). */ fun pageSize(): Optional = Optional.ofNullable(pageSize) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/NetworkProgramRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/NetworkProgramRetrieveParams.kt index 4734230d4..57bc568bf 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/NetworkProgramRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/NetworkProgramRetrieveParams.kt @@ -19,8 +19,10 @@ private constructor( fun networkProgramToken(): Optional = Optional.ofNullable(networkProgramToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentCreateParams.kt index 62f945dc3..e0c6723b2 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentCreateParams.kt @@ -154,8 +154,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentListParams.kt index 36a66f246..7979a0aa7 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentListParams.kt @@ -72,8 +72,10 @@ private constructor( fun status(): Optional = Optional.ofNullable(status) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentRetrieveParams.kt index f572158fe..fd57aceac 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentRetrieveParams.kt @@ -19,8 +19,10 @@ private constructor( fun paymentToken(): Optional = Optional.ofNullable(paymentToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentRetryParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentRetryParams.kt index 8536d67c6..fcde709e8 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentRetryParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentRetryParams.kt @@ -22,10 +22,13 @@ private constructor( fun paymentToken(): Optional = Optional.ofNullable(paymentToken) + /** Additional body properties to send with the request. */ fun _additionalBodyProperties(): Map = additionalBodyProperties + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateActionParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateActionParams.kt index 98bed8ecd..4357c094a 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateActionParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateActionParams.kt @@ -80,8 +80,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateReceiptParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateReceiptParams.kt index 42cd4b061..06869a372 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateReceiptParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateReceiptParams.kt @@ -107,8 +107,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateReleaseParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateReleaseParams.kt index 6d3eae91c..34f6f299b 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateReleaseParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateReleaseParams.kt @@ -43,8 +43,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateReturnParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateReturnParams.kt index 5a2ac945f..b7e7ff779 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateReturnParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateReturnParams.kt @@ -60,8 +60,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ReportSettlementListDetailsParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ReportSettlementListDetailsParams.kt index e1528f620..810bf086f 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ReportSettlementListDetailsParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ReportSettlementListDetailsParams.kt @@ -38,8 +38,10 @@ private constructor( */ fun startingAfter(): Optional = Optional.ofNullable(startingAfter) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ReportSettlementNetworkTotalListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ReportSettlementNetworkTotalListParams.kt index 73d8727b5..63cac1f09 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ReportSettlementNetworkTotalListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ReportSettlementNetworkTotalListParams.kt @@ -82,8 +82,10 @@ private constructor( */ fun startingAfter(): Optional = Optional.ofNullable(startingAfter) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ReportSettlementNetworkTotalRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ReportSettlementNetworkTotalRetrieveParams.kt index bd09f8b05..b6d16887c 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ReportSettlementNetworkTotalRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ReportSettlementNetworkTotalRetrieveParams.kt @@ -19,8 +19,10 @@ private constructor( fun token(): Optional = Optional.ofNullable(token) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ReportSettlementSummaryParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ReportSettlementSummaryParams.kt index ceb6ba95f..179c58a66 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ReportSettlementSummaryParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ReportSettlementSummaryParams.kt @@ -20,8 +20,10 @@ private constructor( fun reportDate(): Optional = Optional.ofNullable(reportDate) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ResponderEndpointCheckStatusParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ResponderEndpointCheckStatusParams.kt index c5fc67bdd..a79418721 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ResponderEndpointCheckStatusParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ResponderEndpointCheckStatusParams.kt @@ -23,8 +23,10 @@ private constructor( /** The type of the endpoint. */ fun type(): Type = type + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ResponderEndpointCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ResponderEndpointCreateParams.kt index bb7777ce9..2a3fbabfe 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ResponderEndpointCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ResponderEndpointCreateParams.kt @@ -60,8 +60,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ResponderEndpointDeleteParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ResponderEndpointDeleteParams.kt index cad3c24b1..4ac1426bf 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ResponderEndpointDeleteParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ResponderEndpointDeleteParams.kt @@ -27,10 +27,13 @@ private constructor( /** The type of the endpoint. */ fun type(): Type = type + /** Additional body properties to send with the request. */ fun _additionalBodyProperties(): Map = additionalBodyProperties + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSAuthenticationRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSAuthenticationRetrieveParams.kt index aab3e2efd..d7f5ef98c 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSAuthenticationRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSAuthenticationRetrieveParams.kt @@ -20,8 +20,10 @@ private constructor( fun threeDSAuthenticationToken(): Optional = Optional.ofNullable(threeDSAuthenticationToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSAuthenticationSimulateOtpEntryParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSAuthenticationSimulateOtpEntryParams.kt index 08f4efa26..a7c2316fa 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSAuthenticationSimulateOtpEntryParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSAuthenticationSimulateOtpEntryParams.kt @@ -64,8 +64,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSAuthenticationSimulateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSAuthenticationSimulateParams.kt index 1e8ff0738..25f0c04c0 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSAuthenticationSimulateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSAuthenticationSimulateParams.kt @@ -98,8 +98,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSDecisioningChallengeResponseParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSDecisioningChallengeResponseParams.kt index c47af34fb..3fadf4796 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSDecisioningChallengeResponseParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSDecisioningChallengeResponseParams.kt @@ -28,8 +28,10 @@ private constructor( fun _additionalBodyProperties(): Map = challengeResponse._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSDecisioningRetrieveSecretParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSDecisioningRetrieveSecretParams.kt index cb853afee..1829edc28 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSDecisioningRetrieveSecretParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSDecisioningRetrieveSecretParams.kt @@ -20,8 +20,10 @@ private constructor( private val additionalQueryParams: QueryParams, ) : Params { + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSDecisioningRotateSecretParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSDecisioningRotateSecretParams.kt index c59613b34..6a2740803 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSDecisioningRotateSecretParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSDecisioningRotateSecretParams.kt @@ -23,10 +23,13 @@ private constructor( private val additionalBodyProperties: Map, ) : Params { + /** Additional body properties to send with the request. */ fun _additionalBodyProperties(): Map = additionalBodyProperties + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationActivateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationActivateParams.kt index 95ecfd211..b5635e732 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationActivateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationActivateParams.kt @@ -30,10 +30,13 @@ private constructor( fun tokenizationToken(): Optional = Optional.ofNullable(tokenizationToken) + /** Additional body properties to send with the request. */ fun _additionalBodyProperties(): Map = additionalBodyProperties + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationDeactivateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationDeactivateParams.kt index b5d91f5c0..ce992d230 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationDeactivateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationDeactivateParams.kt @@ -30,10 +30,13 @@ private constructor( fun tokenizationToken(): Optional = Optional.ofNullable(tokenizationToken) + /** Additional body properties to send with the request. */ fun _additionalBodyProperties(): Map = additionalBodyProperties + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationDecisioningRetrieveSecretParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationDecisioningRetrieveSecretParams.kt index a8ba2ccce..ad7a1f892 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationDecisioningRetrieveSecretParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationDecisioningRetrieveSecretParams.kt @@ -20,8 +20,10 @@ private constructor( private val additionalQueryParams: QueryParams, ) : Params { + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationDecisioningRotateSecretParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationDecisioningRotateSecretParams.kt index 31e84f62e..27c94dce1 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationDecisioningRotateSecretParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationDecisioningRotateSecretParams.kt @@ -21,10 +21,13 @@ private constructor( private val additionalBodyProperties: Map, ) : Params { + /** Additional body properties to send with the request. */ fun _additionalBodyProperties(): Map = additionalBodyProperties + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationListParams.kt index 1b241b8a4..21f3c3f47 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationListParams.kt @@ -63,8 +63,10 @@ private constructor( fun tokenizationChannel(): Optional = Optional.ofNullable(tokenizationChannel) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationPauseParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationPauseParams.kt index f07f0d9de..93c1c0ae3 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationPauseParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationPauseParams.kt @@ -29,10 +29,13 @@ private constructor( fun tokenizationToken(): Optional = Optional.ofNullable(tokenizationToken) + /** Additional body properties to send with the request. */ fun _additionalBodyProperties(): Map = additionalBodyProperties + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationResendActivationCodeParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationResendActivationCodeParams.kt index 8950ac704..870d9f712 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationResendActivationCodeParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationResendActivationCodeParams.kt @@ -60,8 +60,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationRetrieveParams.kt index 9e2811356..0b6c54a88 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationRetrieveParams.kt @@ -19,8 +19,10 @@ private constructor( fun tokenizationToken(): Optional = Optional.ofNullable(tokenizationToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationRetrieveResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationRetrieveResponse.kt deleted file mode 100644 index 74f2f4472..000000000 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationRetrieveResponse.kt +++ /dev/null @@ -1,156 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.lithic.api.models - -import com.fasterxml.jackson.annotation.JsonAnyGetter -import com.fasterxml.jackson.annotation.JsonAnySetter -import com.fasterxml.jackson.annotation.JsonCreator -import com.fasterxml.jackson.annotation.JsonProperty -import com.lithic.api.core.ExcludeMissing -import com.lithic.api.core.JsonField -import com.lithic.api.core.JsonMissing -import com.lithic.api.core.JsonValue -import com.lithic.api.errors.LithicInvalidDataException -import java.util.Collections -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -class TokenizationRetrieveResponse -private constructor( - private val data: JsonField, - private val additionalProperties: MutableMap, -) { - - @JsonCreator - private constructor( - @JsonProperty("data") @ExcludeMissing data: JsonField = JsonMissing.of() - ) : this(data, mutableMapOf()) - - /** - * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the - * server responded with an unexpected value). - */ - fun data(): Optional = data.getOptional("data") - - /** - * Returns the raw JSON value of [data]. - * - * Unlike [data], this method doesn't throw if the JSON field has an unexpected type. - */ - @JsonProperty("data") @ExcludeMissing fun _data(): JsonField = data - - @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 [TokenizationRetrieveResponse]. - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [TokenizationRetrieveResponse]. */ - class Builder internal constructor() { - - private var data: JsonField = JsonMissing.of() - private var additionalProperties: MutableMap = mutableMapOf() - - @JvmSynthetic - internal fun from(tokenizationRetrieveResponse: TokenizationRetrieveResponse) = apply { - data = tokenizationRetrieveResponse.data - additionalProperties = tokenizationRetrieveResponse.additionalProperties.toMutableMap() - } - - fun data(data: Tokenization) = data(JsonField.of(data)) - - /** - * Sets [Builder.data] to an arbitrary JSON value. - * - * You should usually call [Builder.data] with a well-typed [Tokenization] value instead. - * This method is primarily for setting the field to an undocumented or not yet supported - * value. - */ - fun data(data: JsonField) = apply { this.data = data } - - 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 [TokenizationRetrieveResponse]. - * - * Further updates to this [Builder] will not mutate the returned instance. - */ - fun build(): TokenizationRetrieveResponse = - TokenizationRetrieveResponse(data, additionalProperties.toMutableMap()) - } - - private var validated: Boolean = false - - fun validate(): TokenizationRetrieveResponse = apply { - if (validated) { - return@apply - } - - data().ifPresent { 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 = (data.asKnown().getOrNull()?.validity() ?: 0) - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is TokenizationRetrieveResponse && data == other.data && additionalProperties == other.additionalProperties /* spotless:on */ - } - - /* spotless:off */ - private val hashCode: Int by lazy { Objects.hash(data, additionalProperties) } - /* spotless:on */ - - override fun hashCode(): Int = hashCode - - override fun toString() = - "TokenizationRetrieveResponse{data=$data, additionalProperties=$additionalProperties}" -} diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationSimulateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationSimulateParams.kt index 115e3bf09..fa77a4ccc 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationSimulateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationSimulateParams.kt @@ -161,8 +161,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationUnpauseParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationUnpauseParams.kt index ffc540fe9..c30b7aa5d 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationUnpauseParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationUnpauseParams.kt @@ -29,10 +29,13 @@ private constructor( fun tokenizationToken(): Optional = Optional.ofNullable(tokenizationToken) + /** Additional body properties to send with the request. */ fun _additionalBodyProperties(): Map = additionalBodyProperties + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationUpdateDigitalCardArtParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationUpdateDigitalCardArtParams.kt index 85cf27f52..64cd9a02e 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationUpdateDigitalCardArtParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationUpdateDigitalCardArtParams.kt @@ -59,8 +59,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionEnhancedCommercialDataRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionEnhancedCommercialDataRetrieveParams.kt index c80788f89..adff215ca 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionEnhancedCommercialDataRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionEnhancedCommercialDataRetrieveParams.kt @@ -21,8 +21,10 @@ private constructor( fun transactionToken(): Optional = Optional.ofNullable(transactionToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionEventEnhancedCommercialDataRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionEventEnhancedCommercialDataRetrieveParams.kt index 1c1ae99f1..94a88e6a7 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionEventEnhancedCommercialDataRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionEventEnhancedCommercialDataRetrieveParams.kt @@ -21,8 +21,10 @@ private constructor( fun eventToken(): Optional = Optional.ofNullable(eventToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionExpireAuthorizationParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionExpireAuthorizationParams.kt index 3fba0c5d2..bb4341913 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionExpireAuthorizationParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionExpireAuthorizationParams.kt @@ -22,10 +22,13 @@ private constructor( fun transactionToken(): Optional = Optional.ofNullable(transactionToken) + /** Additional body properties to send with the request. */ fun _additionalBodyProperties(): Map = additionalBodyProperties + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionListParams.kt index 9701ca119..770157c6d 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionListParams.kt @@ -76,8 +76,10 @@ private constructor( /** Filters for transactions using transaction status field. */ fun status(): Optional = Optional.ofNullable(status) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionRetrieveParams.kt index 966250baf..bbd52302b 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionRetrieveParams.kt @@ -22,8 +22,10 @@ private constructor( fun transactionToken(): Optional = Optional.ofNullable(transactionToken) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateAuthorizationAdviceParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateAuthorizationAdviceParams.kt index 55953b6c8..7a38bb166 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateAuthorizationAdviceParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateAuthorizationAdviceParams.kt @@ -62,8 +62,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateAuthorizationParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateAuthorizationParams.kt index dff5c8ed2..803cc579a 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateAuthorizationParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateAuthorizationParams.kt @@ -210,8 +210,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateClearingParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateClearingParams.kt index 1c0e69d2c..1f79a0376 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateClearingParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateClearingParams.kt @@ -72,8 +72,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateCreditAuthorizationParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateCreditAuthorizationParams.kt index 5725cf229..4b4b51996 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateCreditAuthorizationParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateCreditAuthorizationParams.kt @@ -112,8 +112,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateReturnParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateReturnParams.kt index dc4c79e61..3aa6a48d5 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateReturnParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateReturnParams.kt @@ -76,8 +76,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateReturnReversalParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateReturnReversalParams.kt index b128d4b9a..edb16b586 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateReturnReversalParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateReturnReversalParams.kt @@ -46,8 +46,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateVoidParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateVoidParams.kt index c38f94cea..9095b4776 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateVoidParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateVoidParams.kt @@ -84,8 +84,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransferCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransferCreateParams.kt index 17112f810..13c23112a 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransferCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransferCreateParams.kt @@ -109,8 +109,10 @@ private constructor( fun _additionalBodyProperties(): Map = body._additionalProperties() + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders + /** Additional query param to send with the request. */ fun _additionalQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/TokenizationServiceAsync.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/TokenizationServiceAsync.kt index c21662096..6bafb65e9 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/TokenizationServiceAsync.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/TokenizationServiceAsync.kt @@ -6,6 +6,7 @@ import com.lithic.api.core.ClientOptions import com.lithic.api.core.RequestOptions import com.lithic.api.core.http.HttpResponse import com.lithic.api.core.http.HttpResponseFor +import com.lithic.api.models.Tokenization import com.lithic.api.models.TokenizationActivateParams import com.lithic.api.models.TokenizationDeactivateParams import com.lithic.api.models.TokenizationListPageAsync @@ -13,7 +14,6 @@ import com.lithic.api.models.TokenizationListParams import com.lithic.api.models.TokenizationPauseParams import com.lithic.api.models.TokenizationResendActivationCodeParams import com.lithic.api.models.TokenizationRetrieveParams -import com.lithic.api.models.TokenizationRetrieveResponse import com.lithic.api.models.TokenizationSimulateParams import com.lithic.api.models.TokenizationSimulateResponse import com.lithic.api.models.TokenizationUnpauseParams @@ -37,7 +37,7 @@ interface TokenizationServiceAsync { fun withOptions(modifier: Consumer): TokenizationServiceAsync /** Get tokenization */ - fun retrieve(tokenizationToken: String): CompletableFuture = + fun retrieve(tokenizationToken: String): CompletableFuture = retrieve(tokenizationToken, TokenizationRetrieveParams.none()) /** @see retrieve */ @@ -45,32 +45,30 @@ interface TokenizationServiceAsync { tokenizationToken: String, params: TokenizationRetrieveParams = TokenizationRetrieveParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture = + ): CompletableFuture = retrieve(params.toBuilder().tokenizationToken(tokenizationToken).build(), requestOptions) /** @see retrieve */ fun retrieve( tokenizationToken: String, params: TokenizationRetrieveParams = TokenizationRetrieveParams.none(), - ): CompletableFuture = - retrieve(tokenizationToken, params, RequestOptions.none()) + ): CompletableFuture = retrieve(tokenizationToken, params, RequestOptions.none()) /** @see retrieve */ fun retrieve( params: TokenizationRetrieveParams, requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see retrieve */ - fun retrieve( - params: TokenizationRetrieveParams - ): CompletableFuture = retrieve(params, RequestOptions.none()) + fun retrieve(params: TokenizationRetrieveParams): CompletableFuture = + retrieve(params, RequestOptions.none()) /** @see retrieve */ fun retrieve( tokenizationToken: String, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = retrieve(tokenizationToken, TokenizationRetrieveParams.none(), requestOptions) /** List card tokenizations */ @@ -406,9 +404,7 @@ interface TokenizationServiceAsync { * Returns a raw HTTP response for `get /v1/tokenizations/{tokenization_token}`, but is * otherwise the same as [TokenizationServiceAsync.retrieve]. */ - fun retrieve( - tokenizationToken: String - ): CompletableFuture> = + fun retrieve(tokenizationToken: String): CompletableFuture> = retrieve(tokenizationToken, TokenizationRetrieveParams.none()) /** @see retrieve */ @@ -416,7 +412,7 @@ interface TokenizationServiceAsync { tokenizationToken: String, params: TokenizationRetrieveParams = TokenizationRetrieveParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> = + ): CompletableFuture> = retrieve( params.toBuilder().tokenizationToken(tokenizationToken).build(), requestOptions, @@ -426,26 +422,26 @@ interface TokenizationServiceAsync { fun retrieve( tokenizationToken: String, params: TokenizationRetrieveParams = TokenizationRetrieveParams.none(), - ): CompletableFuture> = + ): CompletableFuture> = retrieve(tokenizationToken, params, RequestOptions.none()) /** @see retrieve */ fun retrieve( params: TokenizationRetrieveParams, requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see retrieve */ fun retrieve( params: TokenizationRetrieveParams - ): CompletableFuture> = + ): CompletableFuture> = retrieve(params, RequestOptions.none()) /** @see retrieve */ fun retrieve( tokenizationToken: String, requestOptions: RequestOptions, - ): CompletableFuture> = + ): CompletableFuture> = retrieve(tokenizationToken, TokenizationRetrieveParams.none(), requestOptions) /** diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/TokenizationServiceAsyncImpl.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/TokenizationServiceAsyncImpl.kt index 1d0744cfb..ba7d4b5ae 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/TokenizationServiceAsyncImpl.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/TokenizationServiceAsyncImpl.kt @@ -17,6 +17,7 @@ import com.lithic.api.core.http.HttpResponseFor import com.lithic.api.core.http.json import com.lithic.api.core.http.parseable import com.lithic.api.core.prepareAsync +import com.lithic.api.models.Tokenization import com.lithic.api.models.TokenizationActivateParams import com.lithic.api.models.TokenizationDeactivateParams import com.lithic.api.models.TokenizationListPageAsync @@ -25,7 +26,6 @@ import com.lithic.api.models.TokenizationListParams import com.lithic.api.models.TokenizationPauseParams import com.lithic.api.models.TokenizationResendActivationCodeParams import com.lithic.api.models.TokenizationRetrieveParams -import com.lithic.api.models.TokenizationRetrieveResponse import com.lithic.api.models.TokenizationSimulateParams import com.lithic.api.models.TokenizationSimulateResponse import com.lithic.api.models.TokenizationUnpauseParams @@ -50,7 +50,7 @@ class TokenizationServiceAsyncImpl internal constructor(private val clientOption override fun retrieve( params: TokenizationRetrieveParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /v1/tokenizations/{tokenization_token} withRawResponse().retrieve(params, requestOptions).thenApply { it.parse() } @@ -123,13 +123,13 @@ class TokenizationServiceAsyncImpl internal constructor(private val clientOption clientOptions.toBuilder().apply(modifier::accept).build() ) - private val retrieveHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val retrieveHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun retrieve( params: TokenizationRetrieveParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { // We check here instead of in the params builder because this can be specified // positionally or in the params class. checkRequired("tokenizationToken", params.tokenizationToken().getOrNull()) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/TokenizationService.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/TokenizationService.kt index 9cbacf794..27cfc0a3e 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/TokenizationService.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/TokenizationService.kt @@ -7,6 +7,7 @@ import com.lithic.api.core.ClientOptions import com.lithic.api.core.RequestOptions import com.lithic.api.core.http.HttpResponse import com.lithic.api.core.http.HttpResponseFor +import com.lithic.api.models.Tokenization import com.lithic.api.models.TokenizationActivateParams import com.lithic.api.models.TokenizationDeactivateParams import com.lithic.api.models.TokenizationListPage @@ -14,7 +15,6 @@ import com.lithic.api.models.TokenizationListParams import com.lithic.api.models.TokenizationPauseParams import com.lithic.api.models.TokenizationResendActivationCodeParams import com.lithic.api.models.TokenizationRetrieveParams -import com.lithic.api.models.TokenizationRetrieveResponse import com.lithic.api.models.TokenizationSimulateParams import com.lithic.api.models.TokenizationSimulateResponse import com.lithic.api.models.TokenizationUnpauseParams @@ -37,7 +37,7 @@ interface TokenizationService { fun withOptions(modifier: Consumer): TokenizationService /** Get tokenization */ - fun retrieve(tokenizationToken: String): TokenizationRetrieveResponse = + fun retrieve(tokenizationToken: String): Tokenization = retrieve(tokenizationToken, TokenizationRetrieveParams.none()) /** @see retrieve */ @@ -45,30 +45,27 @@ interface TokenizationService { tokenizationToken: String, params: TokenizationRetrieveParams = TokenizationRetrieveParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): TokenizationRetrieveResponse = + ): Tokenization = retrieve(params.toBuilder().tokenizationToken(tokenizationToken).build(), requestOptions) /** @see retrieve */ fun retrieve( tokenizationToken: String, params: TokenizationRetrieveParams = TokenizationRetrieveParams.none(), - ): TokenizationRetrieveResponse = retrieve(tokenizationToken, params, RequestOptions.none()) + ): Tokenization = retrieve(tokenizationToken, params, RequestOptions.none()) /** @see retrieve */ fun retrieve( params: TokenizationRetrieveParams, requestOptions: RequestOptions = RequestOptions.none(), - ): TokenizationRetrieveResponse + ): Tokenization /** @see retrieve */ - fun retrieve(params: TokenizationRetrieveParams): TokenizationRetrieveResponse = + fun retrieve(params: TokenizationRetrieveParams): Tokenization = retrieve(params, RequestOptions.none()) /** @see retrieve */ - fun retrieve( - tokenizationToken: String, - requestOptions: RequestOptions, - ): TokenizationRetrieveResponse = + fun retrieve(tokenizationToken: String, requestOptions: RequestOptions): Tokenization = retrieve(tokenizationToken, TokenizationRetrieveParams.none(), requestOptions) /** List card tokenizations */ @@ -377,7 +374,7 @@ interface TokenizationService { * otherwise the same as [TokenizationService.retrieve]. */ @MustBeClosed - fun retrieve(tokenizationToken: String): HttpResponseFor = + fun retrieve(tokenizationToken: String): HttpResponseFor = retrieve(tokenizationToken, TokenizationRetrieveParams.none()) /** @see retrieve */ @@ -386,7 +383,7 @@ interface TokenizationService { tokenizationToken: String, params: TokenizationRetrieveParams = TokenizationRetrieveParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor = + ): HttpResponseFor = retrieve( params.toBuilder().tokenizationToken(tokenizationToken).build(), requestOptions, @@ -397,7 +394,7 @@ interface TokenizationService { fun retrieve( tokenizationToken: String, params: TokenizationRetrieveParams = TokenizationRetrieveParams.none(), - ): HttpResponseFor = + ): HttpResponseFor = retrieve(tokenizationToken, params, RequestOptions.none()) /** @see retrieve */ @@ -405,20 +402,19 @@ interface TokenizationService { fun retrieve( params: TokenizationRetrieveParams, requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see retrieve */ @MustBeClosed - fun retrieve( - params: TokenizationRetrieveParams - ): HttpResponseFor = retrieve(params, RequestOptions.none()) + fun retrieve(params: TokenizationRetrieveParams): HttpResponseFor = + retrieve(params, RequestOptions.none()) /** @see retrieve */ @MustBeClosed fun retrieve( tokenizationToken: String, requestOptions: RequestOptions, - ): HttpResponseFor = + ): HttpResponseFor = retrieve(tokenizationToken, TokenizationRetrieveParams.none(), requestOptions) /** diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/TokenizationServiceImpl.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/TokenizationServiceImpl.kt index bc9c44520..02e97eb10 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/TokenizationServiceImpl.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/TokenizationServiceImpl.kt @@ -17,6 +17,7 @@ import com.lithic.api.core.http.HttpResponseFor import com.lithic.api.core.http.json import com.lithic.api.core.http.parseable import com.lithic.api.core.prepare +import com.lithic.api.models.Tokenization import com.lithic.api.models.TokenizationActivateParams import com.lithic.api.models.TokenizationDeactivateParams import com.lithic.api.models.TokenizationListPage @@ -25,7 +26,6 @@ import com.lithic.api.models.TokenizationListParams import com.lithic.api.models.TokenizationPauseParams import com.lithic.api.models.TokenizationResendActivationCodeParams import com.lithic.api.models.TokenizationRetrieveParams -import com.lithic.api.models.TokenizationRetrieveResponse import com.lithic.api.models.TokenizationSimulateParams import com.lithic.api.models.TokenizationSimulateResponse import com.lithic.api.models.TokenizationUnpauseParams @@ -49,7 +49,7 @@ class TokenizationServiceImpl internal constructor(private val clientOptions: Cl override fun retrieve( params: TokenizationRetrieveParams, requestOptions: RequestOptions, - ): TokenizationRetrieveResponse = + ): Tokenization = // get /v1/tokenizations/{tokenization_token} withRawResponse().retrieve(params, requestOptions).parse() @@ -115,13 +115,13 @@ class TokenizationServiceImpl internal constructor(private val clientOptions: Cl clientOptions.toBuilder().apply(modifier::accept).build() ) - private val retrieveHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val retrieveHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun retrieve( params: TokenizationRetrieveParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { // We check here instead of in the params builder because this can be specified // positionally or in the params class. checkRequired("tokenizationToken", params.tokenizationToken().getOrNull()) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalPaymentListPageResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalPaymentListPageResponseTest.kt index 8b3d6aaf7..777abc1d6 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalPaymentListPageResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalPaymentListPageResponseTest.kt @@ -18,8 +18,11 @@ internal class ExternalPaymentListPageResponseTest { .addData( ExternalPayment.builder() .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .category(ExternalPayment.ExternalPaymentCategory.EXTERNAL_WIRE) .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .family(ExternalPayment.TransactionFamilyTypes.CARD) + .status(ExternalPayment.TransactionStatus.PENDING) + .updated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .category(ExternalPayment.ExternalPaymentCategory.EXTERNAL_WIRE) .currency("currency") .addEvent( ExternalPayment.ExternalPaymentEvent.builder() @@ -45,8 +48,6 @@ internal class ExternalPaymentListPageResponseTest { .pendingAmount(0L) .result(ExternalPayment.TransactionResult.APPROVED) .settledAmount(0L) - .status(ExternalPayment.TransactionStatus.PENDING) - .updated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .userDefinedId("user_defined_id") .build() ) @@ -57,8 +58,11 @@ internal class ExternalPaymentListPageResponseTest { .containsExactly( ExternalPayment.builder() .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .category(ExternalPayment.ExternalPaymentCategory.EXTERNAL_WIRE) .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .family(ExternalPayment.TransactionFamilyTypes.CARD) + .status(ExternalPayment.TransactionStatus.PENDING) + .updated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .category(ExternalPayment.ExternalPaymentCategory.EXTERNAL_WIRE) .currency("currency") .addEvent( ExternalPayment.ExternalPaymentEvent.builder() @@ -82,8 +86,6 @@ internal class ExternalPaymentListPageResponseTest { .pendingAmount(0L) .result(ExternalPayment.TransactionResult.APPROVED) .settledAmount(0L) - .status(ExternalPayment.TransactionStatus.PENDING) - .updated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .userDefinedId("user_defined_id") .build() ) @@ -98,8 +100,11 @@ internal class ExternalPaymentListPageResponseTest { .addData( ExternalPayment.builder() .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .category(ExternalPayment.ExternalPaymentCategory.EXTERNAL_WIRE) .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .family(ExternalPayment.TransactionFamilyTypes.CARD) + .status(ExternalPayment.TransactionStatus.PENDING) + .updated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .category(ExternalPayment.ExternalPaymentCategory.EXTERNAL_WIRE) .currency("currency") .addEvent( ExternalPayment.ExternalPaymentEvent.builder() @@ -125,8 +130,6 @@ internal class ExternalPaymentListPageResponseTest { .pendingAmount(0L) .result(ExternalPayment.TransactionResult.APPROVED) .settledAmount(0L) - .status(ExternalPayment.TransactionStatus.PENDING) - .updated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .userDefinedId("user_defined_id") .build() ) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalPaymentTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalPaymentTest.kt index 7643c79fa..70c159d99 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalPaymentTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalPaymentTest.kt @@ -6,6 +6,7 @@ import com.fasterxml.jackson.module.kotlin.jacksonTypeRef import com.lithic.api.core.jsonMapper import java.time.LocalDate import java.time.OffsetDateTime +import kotlin.jvm.optionals.getOrNull import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test @@ -16,8 +17,11 @@ internal class ExternalPaymentTest { val externalPayment = ExternalPayment.builder() .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .category(ExternalPayment.ExternalPaymentCategory.EXTERNAL_WIRE) .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .family(ExternalPayment.TransactionFamilyTypes.CARD) + .status(ExternalPayment.TransactionStatus.PENDING) + .updated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .category(ExternalPayment.ExternalPaymentCategory.EXTERNAL_WIRE) .currency("currency") .addEvent( ExternalPayment.ExternalPaymentEvent.builder() @@ -41,18 +45,20 @@ internal class ExternalPaymentTest { .pendingAmount(0L) .result(ExternalPayment.TransactionResult.APPROVED) .settledAmount(0L) - .status(ExternalPayment.TransactionStatus.PENDING) - .updated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .userDefinedId("user_defined_id") .build() assertThat(externalPayment.token()).isEqualTo("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - assertThat(externalPayment.category()) - .isEqualTo(ExternalPayment.ExternalPaymentCategory.EXTERNAL_WIRE) assertThat(externalPayment.created()) .isEqualTo(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - assertThat(externalPayment.currency()).isEqualTo("currency") - assertThat(externalPayment.events()) + assertThat(externalPayment.family()).isEqualTo(ExternalPayment.TransactionFamilyTypes.CARD) + assertThat(externalPayment.status()).isEqualTo(ExternalPayment.TransactionStatus.PENDING) + assertThat(externalPayment.updated()) + .isEqualTo(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + assertThat(externalPayment.category()) + .contains(ExternalPayment.ExternalPaymentCategory.EXTERNAL_WIRE) + assertThat(externalPayment.currency()).contains("currency") + assertThat(externalPayment.events().getOrNull()) .containsExactly( ExternalPayment.ExternalPaymentEvent.builder() .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") @@ -71,15 +77,12 @@ internal class ExternalPaymentTest { .build() ) assertThat(externalPayment.financialAccountToken()) - .isEqualTo("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + .contains("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") assertThat(externalPayment.paymentType()) - .isEqualTo(ExternalPayment.ExternalPaymentDirection.DEPOSIT) - assertThat(externalPayment.pendingAmount()).isEqualTo(0L) - assertThat(externalPayment.result()).isEqualTo(ExternalPayment.TransactionResult.APPROVED) - assertThat(externalPayment.settledAmount()).isEqualTo(0L) - assertThat(externalPayment.status()).isEqualTo(ExternalPayment.TransactionStatus.PENDING) - assertThat(externalPayment.updated()) - .isEqualTo(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .contains(ExternalPayment.ExternalPaymentDirection.DEPOSIT) + assertThat(externalPayment.pendingAmount()).contains(0L) + assertThat(externalPayment.result()).contains(ExternalPayment.TransactionResult.APPROVED) + assertThat(externalPayment.settledAmount()).contains(0L) assertThat(externalPayment.userDefinedId()).contains("user_defined_id") } @@ -89,8 +92,11 @@ internal class ExternalPaymentTest { val externalPayment = ExternalPayment.builder() .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .category(ExternalPayment.ExternalPaymentCategory.EXTERNAL_WIRE) .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .family(ExternalPayment.TransactionFamilyTypes.CARD) + .status(ExternalPayment.TransactionStatus.PENDING) + .updated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .category(ExternalPayment.ExternalPaymentCategory.EXTERNAL_WIRE) .currency("currency") .addEvent( ExternalPayment.ExternalPaymentEvent.builder() @@ -114,8 +120,6 @@ internal class ExternalPaymentTest { .pendingAmount(0L) .result(ExternalPayment.TransactionResult.APPROVED) .settledAmount(0L) - .status(ExternalPayment.TransactionStatus.PENDING) - .updated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .userDefinedId("user_defined_id") .build() diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ManagementOperationCreateParamsTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ManagementOperationCreateParamsTest.kt index 64ab21ce8..bc934db26 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ManagementOperationCreateParamsTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ManagementOperationCreateParamsTest.kt @@ -11,7 +11,7 @@ internal class ManagementOperationCreateParamsTest { @Test fun create() { ManagementOperationCreateParams.builder() - .amount(0L) + .amount(1L) .category(ManagementOperationCreateParams.ManagementOperationCategory.MANAGEMENT_FEE) .direction(ManagementOperationCreateParams.ManagementOperationDirection.CREDIT) .effectiveDate(LocalDate.parse("2019-12-27")) @@ -29,7 +29,7 @@ internal class ManagementOperationCreateParamsTest { fun body() { val params = ManagementOperationCreateParams.builder() - .amount(0L) + .amount(1L) .category( ManagementOperationCreateParams.ManagementOperationCategory.MANAGEMENT_FEE ) @@ -48,7 +48,7 @@ internal class ManagementOperationCreateParamsTest { val body = params._body() - assertThat(body.amount()).isEqualTo(0L) + assertThat(body.amount()).isEqualTo(1L) assertThat(body.category()) .isEqualTo(ManagementOperationCreateParams.ManagementOperationCategory.MANAGEMENT_FEE) assertThat(body.direction()) @@ -69,7 +69,7 @@ internal class ManagementOperationCreateParamsTest { fun bodyWithoutOptionalFields() { val params = ManagementOperationCreateParams.builder() - .amount(0L) + .amount(1L) .category( ManagementOperationCreateParams.ManagementOperationCategory.MANAGEMENT_FEE ) @@ -83,7 +83,7 @@ internal class ManagementOperationCreateParamsTest { val body = params._body() - assertThat(body.amount()).isEqualTo(0L) + assertThat(body.amount()).isEqualTo(1L) assertThat(body.category()) .isEqualTo(ManagementOperationCreateParams.ManagementOperationCategory.MANAGEMENT_FEE) assertThat(body.direction()) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ManagementOperationListPageResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ManagementOperationListPageResponseTest.kt index 7c1679e7b..13f22a9b9 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ManagementOperationListPageResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ManagementOperationListPageResponseTest.kt @@ -18,11 +18,14 @@ internal class ManagementOperationListPageResponseTest { .addData( ManagementOperationTransaction.builder() .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .family(ManagementOperationTransaction.TransactionFamilyTypes.CARD) + .status(ManagementOperationTransaction.TransactionStatus.PENDING) + .updated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .category( ManagementOperationTransaction.ManagementOperationCategory .MANAGEMENT_FEE ) - .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .currency("currency") .direction( ManagementOperationTransaction.ManagementOperationDirection.CREDIT @@ -52,11 +55,17 @@ internal class ManagementOperationListPageResponseTest { .subtype("subtype") .build() ) + .externalResource( + ExternalResource.builder() + .externalResourceToken("external_resource_token") + .externalResourceType(ExternalResourceType.STATEMENT) + .externalResourceSubToken("external_resource_sub_token") + .build() + ) .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .pendingAmount(0L) .result(ManagementOperationTransaction.TransactionResult.APPROVED) .settledAmount(0L) - .status(ManagementOperationTransaction.TransactionStatus.PENDING) .transactionSeries( ManagementOperationTransaction.TransactionSeries.builder() .relatedTransactionEventToken( @@ -66,14 +75,6 @@ internal class ManagementOperationListPageResponseTest { .type("FEE") .build() ) - .updated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .externalResource( - ExternalResource.builder() - .externalResourceToken("external_resource_token") - .externalResourceType(ExternalResourceType.STATEMENT) - .externalResourceSubToken("external_resource_sub_token") - .build() - ) .userDefinedId("user_defined_id") .build() ) @@ -84,10 +85,13 @@ internal class ManagementOperationListPageResponseTest { .containsExactly( ManagementOperationTransaction.builder() .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .family(ManagementOperationTransaction.TransactionFamilyTypes.CARD) + .status(ManagementOperationTransaction.TransactionStatus.PENDING) + .updated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .category( ManagementOperationTransaction.ManagementOperationCategory.MANAGEMENT_FEE ) - .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .currency("currency") .direction(ManagementOperationTransaction.ManagementOperationDirection.CREDIT) .addEvent( @@ -115,11 +119,17 @@ internal class ManagementOperationListPageResponseTest { .subtype("subtype") .build() ) + .externalResource( + ExternalResource.builder() + .externalResourceToken("external_resource_token") + .externalResourceType(ExternalResourceType.STATEMENT) + .externalResourceSubToken("external_resource_sub_token") + .build() + ) .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .pendingAmount(0L) .result(ManagementOperationTransaction.TransactionResult.APPROVED) .settledAmount(0L) - .status(ManagementOperationTransaction.TransactionStatus.PENDING) .transactionSeries( ManagementOperationTransaction.TransactionSeries.builder() .relatedTransactionEventToken("123e4567-e89b-12d3-a456-426614174000") @@ -127,14 +137,6 @@ internal class ManagementOperationListPageResponseTest { .type("FEE") .build() ) - .updated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .externalResource( - ExternalResource.builder() - .externalResourceToken("external_resource_token") - .externalResourceType(ExternalResourceType.STATEMENT) - .externalResourceSubToken("external_resource_sub_token") - .build() - ) .userDefinedId("user_defined_id") .build() ) @@ -149,11 +151,14 @@ internal class ManagementOperationListPageResponseTest { .addData( ManagementOperationTransaction.builder() .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .family(ManagementOperationTransaction.TransactionFamilyTypes.CARD) + .status(ManagementOperationTransaction.TransactionStatus.PENDING) + .updated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .category( ManagementOperationTransaction.ManagementOperationCategory .MANAGEMENT_FEE ) - .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .currency("currency") .direction( ManagementOperationTransaction.ManagementOperationDirection.CREDIT @@ -183,11 +188,17 @@ internal class ManagementOperationListPageResponseTest { .subtype("subtype") .build() ) + .externalResource( + ExternalResource.builder() + .externalResourceToken("external_resource_token") + .externalResourceType(ExternalResourceType.STATEMENT) + .externalResourceSubToken("external_resource_sub_token") + .build() + ) .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .pendingAmount(0L) .result(ManagementOperationTransaction.TransactionResult.APPROVED) .settledAmount(0L) - .status(ManagementOperationTransaction.TransactionStatus.PENDING) .transactionSeries( ManagementOperationTransaction.TransactionSeries.builder() .relatedTransactionEventToken( @@ -197,14 +208,6 @@ internal class ManagementOperationListPageResponseTest { .type("FEE") .build() ) - .updated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .externalResource( - ExternalResource.builder() - .externalResourceToken("external_resource_token") - .externalResourceType(ExternalResourceType.STATEMENT) - .externalResourceSubToken("external_resource_sub_token") - .build() - ) .userDefinedId("user_defined_id") .build() ) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ManagementOperationTransactionTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ManagementOperationTransactionTest.kt index bc1592f8d..f9510a462 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ManagementOperationTransactionTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ManagementOperationTransactionTest.kt @@ -6,6 +6,7 @@ import com.fasterxml.jackson.module.kotlin.jacksonTypeRef import com.lithic.api.core.jsonMapper import java.time.LocalDate import java.time.OffsetDateTime +import kotlin.jvm.optionals.getOrNull import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test @@ -16,8 +17,11 @@ internal class ManagementOperationTransactionTest { val managementOperationTransaction = ManagementOperationTransaction.builder() .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .category(ManagementOperationTransaction.ManagementOperationCategory.MANAGEMENT_FEE) .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .family(ManagementOperationTransaction.TransactionFamilyTypes.CARD) + .status(ManagementOperationTransaction.TransactionStatus.PENDING) + .updated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .category(ManagementOperationTransaction.ManagementOperationCategory.MANAGEMENT_FEE) .currency("currency") .direction(ManagementOperationTransaction.ManagementOperationDirection.CREDIT) .addEvent( @@ -44,11 +48,17 @@ internal class ManagementOperationTransactionTest { .subtype("subtype") .build() ) + .externalResource( + ExternalResource.builder() + .externalResourceToken("external_resource_token") + .externalResourceType(ExternalResourceType.STATEMENT) + .externalResourceSubToken("external_resource_sub_token") + .build() + ) .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .pendingAmount(0L) .result(ManagementOperationTransaction.TransactionResult.APPROVED) .settledAmount(0L) - .status(ManagementOperationTransaction.TransactionStatus.PENDING) .transactionSeries( ManagementOperationTransaction.TransactionSeries.builder() .relatedTransactionEventToken("123e4567-e89b-12d3-a456-426614174000") @@ -56,27 +66,25 @@ internal class ManagementOperationTransactionTest { .type("FEE") .build() ) - .updated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .externalResource( - ExternalResource.builder() - .externalResourceToken("external_resource_token") - .externalResourceType(ExternalResourceType.STATEMENT) - .externalResourceSubToken("external_resource_sub_token") - .build() - ) .userDefinedId("user_defined_id") .build() assertThat(managementOperationTransaction.token()) .isEqualTo("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - assertThat(managementOperationTransaction.category()) - .isEqualTo(ManagementOperationTransaction.ManagementOperationCategory.MANAGEMENT_FEE) assertThat(managementOperationTransaction.created()) .isEqualTo(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - assertThat(managementOperationTransaction.currency()).isEqualTo("currency") + assertThat(managementOperationTransaction.family()) + .isEqualTo(ManagementOperationTransaction.TransactionFamilyTypes.CARD) + assertThat(managementOperationTransaction.status()) + .isEqualTo(ManagementOperationTransaction.TransactionStatus.PENDING) + assertThat(managementOperationTransaction.updated()) + .isEqualTo(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + assertThat(managementOperationTransaction.category()) + .contains(ManagementOperationTransaction.ManagementOperationCategory.MANAGEMENT_FEE) + assertThat(managementOperationTransaction.currency()).contains("currency") assertThat(managementOperationTransaction.direction()) - .isEqualTo(ManagementOperationTransaction.ManagementOperationDirection.CREDIT) - assertThat(managementOperationTransaction.events()) + .contains(ManagementOperationTransaction.ManagementOperationDirection.CREDIT) + assertThat(managementOperationTransaction.events().getOrNull()) .containsExactly( ManagementOperationTransaction.ManagementOperationEvent.builder() .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") @@ -100,14 +108,20 @@ internal class ManagementOperationTransactionTest { .subtype("subtype") .build() ) + assertThat(managementOperationTransaction.externalResource()) + .contains( + ExternalResource.builder() + .externalResourceToken("external_resource_token") + .externalResourceType(ExternalResourceType.STATEMENT) + .externalResourceSubToken("external_resource_sub_token") + .build() + ) assertThat(managementOperationTransaction.financialAccountToken()) - .isEqualTo("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - assertThat(managementOperationTransaction.pendingAmount()).isEqualTo(0L) + .contains("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + assertThat(managementOperationTransaction.pendingAmount()).contains(0L) assertThat(managementOperationTransaction.result()) - .isEqualTo(ManagementOperationTransaction.TransactionResult.APPROVED) - assertThat(managementOperationTransaction.settledAmount()).isEqualTo(0L) - assertThat(managementOperationTransaction.status()) - .isEqualTo(ManagementOperationTransaction.TransactionStatus.PENDING) + .contains(ManagementOperationTransaction.TransactionResult.APPROVED) + assertThat(managementOperationTransaction.settledAmount()).contains(0L) assertThat(managementOperationTransaction.transactionSeries()) .contains( ManagementOperationTransaction.TransactionSeries.builder() @@ -116,16 +130,6 @@ internal class ManagementOperationTransactionTest { .type("FEE") .build() ) - assertThat(managementOperationTransaction.updated()) - .isEqualTo(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - assertThat(managementOperationTransaction.externalResource()) - .contains( - ExternalResource.builder() - .externalResourceToken("external_resource_token") - .externalResourceType(ExternalResourceType.STATEMENT) - .externalResourceSubToken("external_resource_sub_token") - .build() - ) assertThat(managementOperationTransaction.userDefinedId()).contains("user_defined_id") } @@ -135,8 +139,11 @@ internal class ManagementOperationTransactionTest { val managementOperationTransaction = ManagementOperationTransaction.builder() .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .category(ManagementOperationTransaction.ManagementOperationCategory.MANAGEMENT_FEE) .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .family(ManagementOperationTransaction.TransactionFamilyTypes.CARD) + .status(ManagementOperationTransaction.TransactionStatus.PENDING) + .updated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .category(ManagementOperationTransaction.ManagementOperationCategory.MANAGEMENT_FEE) .currency("currency") .direction(ManagementOperationTransaction.ManagementOperationDirection.CREDIT) .addEvent( @@ -163,11 +170,17 @@ internal class ManagementOperationTransactionTest { .subtype("subtype") .build() ) + .externalResource( + ExternalResource.builder() + .externalResourceToken("external_resource_token") + .externalResourceType(ExternalResourceType.STATEMENT) + .externalResourceSubToken("external_resource_sub_token") + .build() + ) .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .pendingAmount(0L) .result(ManagementOperationTransaction.TransactionResult.APPROVED) .settledAmount(0L) - .status(ManagementOperationTransaction.TransactionStatus.PENDING) .transactionSeries( ManagementOperationTransaction.TransactionSeries.builder() .relatedTransactionEventToken("123e4567-e89b-12d3-a456-426614174000") @@ -175,14 +188,6 @@ internal class ManagementOperationTransactionTest { .type("FEE") .build() ) - .updated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .externalResource( - ExternalResource.builder() - .externalResourceToken("external_resource_token") - .externalResourceType(ExternalResourceType.STATEMENT) - .externalResourceSubToken("external_resource_sub_token") - .build() - ) .userDefinedId("user_defined_id") .build() diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/TokenizationRetrieveResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/TokenizationRetrieveResponseTest.kt deleted file mode 100644 index 95e38e054..000000000 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/TokenizationRetrieveResponseTest.kt +++ /dev/null @@ -1,109 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.lithic.api.models - -import com.fasterxml.jackson.module.kotlin.jacksonTypeRef -import com.lithic.api.core.jsonMapper -import java.time.OffsetDateTime -import org.assertj.core.api.Assertions.assertThat -import org.junit.jupiter.api.Test - -internal class TokenizationRetrieveResponseTest { - - @Test - fun create() { - val tokenizationRetrieveResponse = - TokenizationRetrieveResponse.builder() - .data( - Tokenization.builder() - .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .accountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .cardToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .dpan("dpan") - .status(Tokenization.Status.ACTIVE) - .tokenRequestorName(Tokenization.TokenRequestorName.AMAZON_ONE) - .tokenUniqueReference("token_unique_reference") - .tokenizationChannel(Tokenization.TokenizationChannel.DIGITAL_WALLET) - .updatedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .digitalCardArtToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .addEvent( - Tokenization.TokenizationEvent.builder() - .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .result(Tokenization.TokenizationEvent.Result.APPROVED) - .type(Tokenization.TokenizationEvent.Type.TOKENIZATION_2_FA) - .build() - ) - .paymentAccountReferenceId("payment_account_reference_id") - .build() - ) - .build() - - assertThat(tokenizationRetrieveResponse.data()) - .contains( - Tokenization.builder() - .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .accountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .cardToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .dpan("dpan") - .status(Tokenization.Status.ACTIVE) - .tokenRequestorName(Tokenization.TokenRequestorName.AMAZON_ONE) - .tokenUniqueReference("token_unique_reference") - .tokenizationChannel(Tokenization.TokenizationChannel.DIGITAL_WALLET) - .updatedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .digitalCardArtToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .addEvent( - Tokenization.TokenizationEvent.builder() - .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .result(Tokenization.TokenizationEvent.Result.APPROVED) - .type(Tokenization.TokenizationEvent.Type.TOKENIZATION_2_FA) - .build() - ) - .paymentAccountReferenceId("payment_account_reference_id") - .build() - ) - } - - @Test - fun roundtrip() { - val jsonMapper = jsonMapper() - val tokenizationRetrieveResponse = - TokenizationRetrieveResponse.builder() - .data( - Tokenization.builder() - .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .accountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .cardToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .dpan("dpan") - .status(Tokenization.Status.ACTIVE) - .tokenRequestorName(Tokenization.TokenRequestorName.AMAZON_ONE) - .tokenUniqueReference("token_unique_reference") - .tokenizationChannel(Tokenization.TokenizationChannel.DIGITAL_WALLET) - .updatedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .digitalCardArtToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .addEvent( - Tokenization.TokenizationEvent.builder() - .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .result(Tokenization.TokenizationEvent.Result.APPROVED) - .type(Tokenization.TokenizationEvent.Type.TOKENIZATION_2_FA) - .build() - ) - .paymentAccountReferenceId("payment_account_reference_id") - .build() - ) - .build() - - val roundtrippedTokenizationRetrieveResponse = - jsonMapper.readValue( - jsonMapper.writeValueAsString(tokenizationRetrieveResponse), - jacksonTypeRef(), - ) - - assertThat(roundtrippedTokenizationRetrieveResponse).isEqualTo(tokenizationRetrieveResponse) - } -} diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/services/async/ManagementOperationServiceAsyncTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/services/async/ManagementOperationServiceAsyncTest.kt index 8162008fa..19602b6ea 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/services/async/ManagementOperationServiceAsyncTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/services/async/ManagementOperationServiceAsyncTest.kt @@ -25,7 +25,7 @@ internal class ManagementOperationServiceAsyncTest { val managementOperationTransactionFuture = managementOperationServiceAsync.create( ManagementOperationCreateParams.builder() - .amount(0L) + .amount(1L) .category( ManagementOperationCreateParams.ManagementOperationCategory.MANAGEMENT_FEE ) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/ManagementOperationServiceTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/ManagementOperationServiceTest.kt index 9293d3ecf..356f4c244 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/ManagementOperationServiceTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/ManagementOperationServiceTest.kt @@ -25,7 +25,7 @@ internal class ManagementOperationServiceTest { val managementOperationTransaction = managementOperationService.create( ManagementOperationCreateParams.builder() - .amount(0L) + .amount(1L) .category( ManagementOperationCreateParams.ManagementOperationCategory.MANAGEMENT_FEE )