diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 0b8a7c68..a9d0cc14 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.68.0"
+ ".": "0.69.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 8b01dc8a..5a026d5a 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1 +1 @@
-configured_endpoints: 155
+configured_endpoints: 156
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 81da3bfb..e8c8b99f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,73 @@
# Changelog
+## 0.69.0 (2024-11-01)
+
+Full Changelog: [v0.68.0...v0.69.0](https://github.com/lithic-com/lithic-kotlin/compare/v0.68.0...v0.69.0)
+
+### ⚠ BREAKING CHANGES
+
+* **client:** rename some union classes ([#350](https://github.com/lithic-com/lithic-kotlin/issues/350))
+
+### Features
+
+* **api:** add `interest_details` properties to LoanTapes ([#340](https://github.com/lithic-com/lithic-kotlin/issues/340)) ([8cd61db](https://github.com/lithic-com/lithic-kotlin/commit/8cd61db48bfb30be01dd45a9b6eced94a5876ed8))
+* **api:** removes `transfer_transaction.created` webhook and updates to VerificationApplication ([#332](https://github.com/lithic-com/lithic-kotlin/issues/332)) ([7646708](https://github.com/lithic-com/lithic-kotlin/commit/7646708cdf295bcd06fdd5c6291a724de915518f))
+* **api:** updates ([#347](https://github.com/lithic-com/lithic-kotlin/issues/347)) ([75b8c37](https://github.com/lithic-com/lithic-kotlin/commit/75b8c3791da0494ef9c13c087c4f83fa71dd1ec6))
+* **client:** add `Headers` class ([#358](https://github.com/lithic-com/lithic-kotlin/issues/358)) ([e2755bc](https://github.com/lithic-com/lithic-kotlin/commit/e2755bc95f68121cab9ec0ecff50a9bdf242c85e))
+* **client:** add `User-Agent` header ([#345](https://github.com/lithic-com/lithic-kotlin/issues/345)) ([9f537ed](https://github.com/lithic-com/lithic-kotlin/commit/9f537ed560f4b2361e370c8d8473b1ad397516b6))
+* **client:** clean up resource leaks when the resource becomes phantom reachable ([#348](https://github.com/lithic-com/lithic-kotlin/issues/348)) ([2fd7669](https://github.com/lithic-com/lithic-kotlin/commit/2fd76692053c8e6eb6b88c037eb17a366b577487))
+* **client:** set `X-Stainless-Runtime` header ([#344](https://github.com/lithic-com/lithic-kotlin/issues/344)) ([3865552](https://github.com/lithic-com/lithic-kotlin/commit/3865552aa48f3206c3d2ad9ef80d5270582d286b))
+* **client:** support union discriminators in deserialization ([#328](https://github.com/lithic-com/lithic-kotlin/issues/328)) ([0534fed](https://github.com/lithic-com/lithic-kotlin/commit/0534fed2b24678ea99671e5041f5379ccf096221))
+
+
+### Bug Fixes
+
+* **client:** accidental double-wrapping with `RetryingHttpClient` ([#346](https://github.com/lithic-com/lithic-kotlin/issues/346)) ([2825bb9](https://github.com/lithic-com/lithic-kotlin/commit/2825bb9c6f393758a3b51586ec69bf9ea0a22363))
+* **client:** ensure constructed objects are immutable ([#356](https://github.com/lithic-com/lithic-kotlin/issues/356)) ([8f95fce](https://github.com/lithic-com/lithic-kotlin/commit/8f95fce015416d106ef90d8234129885abc71401))
+* **client:** implement `hashCode` for `IsMissing` ([#341](https://github.com/lithic-com/lithic-kotlin/issues/341)) ([a871c61](https://github.com/lithic-com/lithic-kotlin/commit/a871c61d5932254a415970d3ab6e595059447159))
+* **client:** remove `@JvmStatic` from error ([#354](https://github.com/lithic-com/lithic-kotlin/issues/354)) ([a753c44](https://github.com/lithic-com/lithic-kotlin/commit/a753c4496350d48b211edb872e4db453c5771a70))
+* **internal:** remove unnecessary error handlers ([#327](https://github.com/lithic-com/lithic-kotlin/issues/327)) ([26e72f3](https://github.com/lithic-com/lithic-kotlin/commit/26e72f33e7ccf0b5c8e910a41ebc75729fe6b701))
+* merge conflicts ([#360](https://github.com/lithic-com/lithic-kotlin/issues/360)) ([b9e444a](https://github.com/lithic-com/lithic-kotlin/commit/b9e444a6e687414d7b61713cb0d2eb57284a7de3))
+
+
+### Chores
+
+* **api:** add `PIN_BLOCKED` to `detailed_results` property on Event ([#342](https://github.com/lithic-com/lithic-kotlin/issues/342)) ([5667848](https://github.com/lithic-com/lithic-kotlin/commit/56678481b9b03ceb2f84d0c604c546f45304e1dd))
+* **api:** adds `charge_off` functionality to FinancialAccounts ([#351](https://github.com/lithic-com/lithic-kotlin/issues/351)) ([1bf0ec1](https://github.com/lithic-com/lithic-kotlin/commit/1bf0ec1d1fabb366ed595e8f65eed7798dfafd7f))
+* **api:** adds new result types to Transactions and Events ([#343](https://github.com/lithic-com/lithic-kotlin/issues/343)) ([c3fddaf](https://github.com/lithic-com/lithic-kotlin/commit/c3fddaf87ffd1995f6b616d84454102759834176))
+* **docs:** updates to documentation for V2 AuthRules ([#349](https://github.com/lithic-com/lithic-kotlin/issues/349)) ([0f6a69b](https://github.com/lithic-com/lithic-kotlin/commit/0f6a69b7ea3303a4165fda64cabc625cc97b7143))
+* **internal:** delete unused function ([#353](https://github.com/lithic-com/lithic-kotlin/issues/353)) ([7aaa905](https://github.com/lithic-com/lithic-kotlin/commit/7aaa905895c3cd860b6512e4437b88fa69dc94d3))
+* **internal:** omit unnecessary code ([#326](https://github.com/lithic-com/lithic-kotlin/issues/326)) ([89bb442](https://github.com/lithic-com/lithic-kotlin/commit/89bb44292729794d196571bdf231bee71e9a1308))
+* **internal:** remove empty test files ([#331](https://github.com/lithic-com/lithic-kotlin/issues/331)) ([2d660ab](https://github.com/lithic-com/lithic-kotlin/commit/2d660abbaad2ab01f0eaf2d12b2fd2da8d772497))
+* **internal:** remove unnecessary `[@file](https://github.com/file):Suppress("OVERLOADS_INTERFACE")` ([#334](https://github.com/lithic-com/lithic-kotlin/issues/334)) ([f75a999](https://github.com/lithic-com/lithic-kotlin/commit/f75a999dd8fb409e3ee0ece6669de462146c42aa))
+* **internal:** remove unnecessary `[@file](https://github.com/file):Suppress("OVERLOADS_INTERFACE")` ([#338](https://github.com/lithic-com/lithic-kotlin/issues/338)) ([cb2ccf3](https://github.com/lithic-com/lithic-kotlin/commit/cb2ccf3a0ef83094a987600d79f6095f0dc04577))
+* **internal:** remove useless `[@file](https://github.com/file):JvmSynthetic` ([#337](https://github.com/lithic-com/lithic-kotlin/issues/337)) ([954c80c](https://github.com/lithic-com/lithic-kotlin/commit/954c80c5c29a4be4175c4a58b2b0b469c902272e))
+
+
+### Documentation
+
+* add docstrings ([#355](https://github.com/lithic-com/lithic-kotlin/issues/355)) ([9eeab77](https://github.com/lithic-com/lithic-kotlin/commit/9eeab77d798b6f75b19997a8d8a486afc90c74f0))
+
+
+### Styles
+
+* **client:** make toString methods consistent ([#330](https://github.com/lithic-com/lithic-kotlin/issues/330)) ([d1caec0](https://github.com/lithic-com/lithic-kotlin/commit/d1caec0522b94c273beb53642016d10de3286c02))
+* **client:** rename some union classes ([#350](https://github.com/lithic-com/lithic-kotlin/issues/350)) ([ee5d02e](https://github.com/lithic-com/lithic-kotlin/commit/ee5d02ecc3f29ab6923eb36671314c7184f3f494))
+* **internal:** improve `OkHttpClient` formatting ([#335](https://github.com/lithic-com/lithic-kotlin/issues/335)) ([e77faca](https://github.com/lithic-com/lithic-kotlin/commit/e77faca514850a4a5a780d19554aefec626d1533))
+* **internal:** improve `RetryingHttpClient` formatting ([#339](https://github.com/lithic-com/lithic-kotlin/issues/339)) ([600591d](https://github.com/lithic-com/lithic-kotlin/commit/600591d6eef4c89f01caa7ab4f3e9aaf219aa02a))
+* **internal:** improve terseness of handlers ([#321](https://github.com/lithic-com/lithic-kotlin/issues/321)) ([e69f47b](https://github.com/lithic-com/lithic-kotlin/commit/e69f47b54c20edd80b663b990f8b172c3c6b9384))
+* **internal:** improve terseness of Properties.kt ([#323](https://github.com/lithic-com/lithic-kotlin/issues/323)) ([3cf3952](https://github.com/lithic-com/lithic-kotlin/commit/3cf39525d1d7b34209db1edf4551a05305589e26))
+* **internal:** make `getOrThrow` terse and consistent ([#352](https://github.com/lithic-com/lithic-kotlin/issues/352)) ([e642d4e](https://github.com/lithic-com/lithic-kotlin/commit/e642d4ee487054b09a7b0861fba111ffd0efb6f5))
+* **internal:** move Handlers.kt and HttpRequestBodies.kt to core ([#324](https://github.com/lithic-com/lithic-kotlin/issues/324)) ([e02eea0](https://github.com/lithic-com/lithic-kotlin/commit/e02eea0269df2f72c5af45dc1f9541c149d1f997))
+* **internal:** simplify client build method ([#336](https://github.com/lithic-com/lithic-kotlin/issues/336)) ([92ddfe9](https://github.com/lithic-com/lithic-kotlin/commit/92ddfe90bd7b9506f1fbdad47d1636fa8a5e13c0))
+* **internal:** update comment formatting ([#333](https://github.com/lithic-com/lithic-kotlin/issues/333)) ([2b0e988](https://github.com/lithic-com/lithic-kotlin/commit/2b0e9882faaa0b232446816a02044e657ec4f3d7))
+* **internal:** use `if` and `if-else` instead of `when` idiomatically ([#329](https://github.com/lithic-com/lithic-kotlin/issues/329)) ([44e2586](https://github.com/lithic-com/lithic-kotlin/commit/44e2586f02d4e4716269984afe837909a5e5acb0))
+
+
+### Refactors
+
+* **internal:** polish `ClientOptions` ([#357](https://github.com/lithic-com/lithic-kotlin/issues/357)) ([7cdb62b](https://github.com/lithic-com/lithic-kotlin/commit/7cdb62bf9f5b8530f77f2cba026550d318b8b160))
+
## 0.68.0 (2024-10-11)
Full Changelog: [v0.67.0...v0.68.0](https://github.com/lithic-com/lithic-kotlin/compare/v0.67.0...v0.68.0)
diff --git a/README.md b/README.md
index 3f323a3b..262e77ff 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ The REST API documentation can be found on [docs.lithic.com](https://docs.lithi
```kotlin
-implementation("com.lithic.api:lithic-kotlin:0.68.0")
+implementation("com.lithic.api:lithic-kotlin:0.69.0")
```
#### Maven
@@ -28,7 +28,7 @@ implementation("com.lithic.api:lithic-kotlin:0.68.0")
com.lithic.api
lithic-kotlin
- 0.68.0
+ 0.69.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index 31256392..70e3067a 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -4,7 +4,7 @@ plugins {
allprojects {
group = "com.lithic.api"
- version = "0.68.0" // x-release-please-version
+ version = "0.69.0" // x-release-please-version
}
nexusPublishing {
diff --git a/lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClient.kt b/lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClient.kt
index 3f396706..12a56fd3 100644
--- a/lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClient.kt
+++ b/lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClient.kt
@@ -23,7 +23,7 @@ class LithicOkHttpClient private constructor() {
private var clientOptions: ClientOptions.Builder = ClientOptions.builder()
private var baseUrl: String = ClientOptions.PRODUCTION_URL
- // default timeout for client is 1 minute
+ // The default timeout for the client is 1 minute.
private var timeout: Duration = Duration.ofSeconds(60)
private var proxy: Proxy? = null
@@ -72,8 +72,8 @@ class LithicOkHttpClient private constructor() {
fun fromEnv() = apply { clientOptions.fromEnv() }
- fun build(): LithicClient {
- return LithicClientImpl(
+ fun build(): LithicClient =
+ LithicClientImpl(
clientOptions
.httpClient(
OkHttpClient.builder()
@@ -84,6 +84,5 @@ class LithicOkHttpClient private constructor() {
)
.build()
)
- }
}
}
diff --git a/lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClientAsync.kt b/lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClientAsync.kt
index 7cf7a0df..ab6ef6e9 100644
--- a/lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClientAsync.kt
+++ b/lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClientAsync.kt
@@ -23,7 +23,7 @@ class LithicOkHttpClientAsync private constructor() {
private var clientOptions: ClientOptions.Builder = ClientOptions.builder()
private var baseUrl: String = ClientOptions.PRODUCTION_URL
- // default timeout for client is 1 minute
+ // The default timeout for the client is 1 minute.
private var timeout: Duration = Duration.ofSeconds(60)
private var proxy: Proxy? = null
@@ -72,8 +72,8 @@ class LithicOkHttpClientAsync private constructor() {
fun fromEnv() = apply { clientOptions.fromEnv() }
- fun build(): LithicClientAsync {
- return LithicClientAsyncImpl(
+ fun build(): LithicClientAsync =
+ LithicClientAsyncImpl(
clientOptions
.httpClient(
OkHttpClient.builder()
@@ -84,6 +84,5 @@ class LithicOkHttpClientAsync private constructor() {
)
.build()
)
- }
}
}
diff --git a/lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/OkHttpClient.kt b/lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/OkHttpClient.kt
index abf6a188..03907d3a 100644
--- a/lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/OkHttpClient.kt
+++ b/lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/OkHttpClient.kt
@@ -80,7 +80,7 @@ private constructor(private val okHttpClient: okhttp3.OkHttpClient, private val
private fun HttpRequest.toRequest(): Request {
var body: RequestBody? = body?.toRequestBody()
- // OkHttpClient always requires a request body for PUT and POST methods
+ // OkHttpClient always requires a request body for PUT and POST methods.
if (body == null && (method == HttpMethod.PUT || method == HttpMethod.POST)) {
body = "".toRequestBody()
}
@@ -108,21 +108,13 @@ private constructor(private val okHttpClient: okhttp3.OkHttpClient, private val
val length = contentLength()
return object : RequestBody() {
- override fun contentType(): MediaType? {
- return mediaType
- }
+ override fun contentType(): MediaType? = mediaType
- override fun contentLength(): Long {
- return length
- }
+ override fun contentLength(): Long = length
- override fun isOneShot(): Boolean {
- return !repeatable()
- }
+ override fun isOneShot(): Boolean = !repeatable()
- override fun writeTo(sink: BufferedSink) {
- writeTo(sink.outputStream())
- }
+ override fun writeTo(sink: BufferedSink) = writeTo(sink.outputStream())
}
}
@@ -130,21 +122,13 @@ private constructor(private val okHttpClient: okhttp3.OkHttpClient, private val
val headers = headers.toHeaders()
return object : HttpResponse {
- override fun statusCode(): Int {
- return code
- }
+ override fun statusCode(): Int = code
- override fun headers(): ListMultimap {
- return headers
- }
+ override fun headers(): ListMultimap = headers
- override fun body(): InputStream {
- return body!!.byteStream()
- }
+ override fun body(): InputStream = body!!.byteStream()
- override fun close() {
- body!!.close()
- }
+ override fun close() = body!!.close()
}
}
@@ -153,9 +137,7 @@ private constructor(private val okHttpClient: okhttp3.OkHttpClient, private val
MultimapBuilder.treeKeys(String.CASE_INSENSITIVE_ORDER)
.arrayListValues()
.build()
-
forEach { pair -> headers.put(pair.first, pair.second) }
-
return headers
}
@@ -166,7 +148,7 @@ private constructor(private val okHttpClient: okhttp3.OkHttpClient, private val
class Builder {
private var baseUrl: HttpUrl? = null
- // default timeout is 1 minute
+ // The default timeout is 1 minute.
private var timeout: Duration = Duration.ofSeconds(60)
private var proxy: Proxy? = null
@@ -176,8 +158,8 @@ private constructor(private val okHttpClient: okhttp3.OkHttpClient, private val
fun proxy(proxy: Proxy?) = apply { this.proxy = proxy }
- fun build(): OkHttpClient {
- return OkHttpClient(
+ fun build(): OkHttpClient =
+ OkHttpClient(
okhttp3.OkHttpClient.Builder()
.connectTimeout(timeout)
.readTimeout(timeout)
@@ -187,7 +169,6 @@ private constructor(private val okHttpClient: okhttp3.OkHttpClient, private val
.build(),
checkNotNull(baseUrl) { "`baseUrl` is required but was not set" },
)
- }
}
private suspend fun Call.executeAsync(): Response =
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/client/LithicClient.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/client/LithicClient.kt
index d35e3669..018389f5 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/client/LithicClient.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/client/LithicClient.kt
@@ -1,7 +1,5 @@
// File generated from our OpenAPI spec by Stainless.
-@file:Suppress("OVERLOADS_INTERFACE") // See https://youtrack.jetbrains.com/issue/KT-36102
-
package com.lithic.api.client
import com.lithic.api.core.RequestOptions
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/client/LithicClientAsync.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/client/LithicClientAsync.kt
index fbc9e933..7ca8ea18 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/client/LithicClientAsync.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/client/LithicClientAsync.kt
@@ -1,7 +1,5 @@
// File generated from our OpenAPI spec by Stainless.
-@file:Suppress("OVERLOADS_INTERFACE") // See https://youtrack.jetbrains.com/issue/KT-36102
-
package com.lithic.api.client
import com.lithic.api.core.RequestOptions
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/client/LithicClientAsyncImpl.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/client/LithicClientAsyncImpl.kt
index 2d52498e..1c03cb02 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/client/LithicClientAsyncImpl.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/client/LithicClientAsyncImpl.kt
@@ -4,105 +4,133 @@ package com.lithic.api.client
import com.lithic.api.core.ClientOptions
import com.lithic.api.core.RequestOptions
+import com.lithic.api.core.getPackageVersion
+import com.lithic.api.core.handlers.errorHandler
+import com.lithic.api.core.handlers.jsonHandler
+import com.lithic.api.core.handlers.withErrorHandler
import com.lithic.api.core.http.HttpMethod
import com.lithic.api.core.http.HttpRequest
import com.lithic.api.core.http.HttpResponse.Handler
import com.lithic.api.errors.LithicError
import com.lithic.api.models.*
import com.lithic.api.services.async.*
-import com.lithic.api.services.errorHandler
-import com.lithic.api.services.jsonHandler
-import com.lithic.api.services.withErrorHandler
class LithicClientAsyncImpl
constructor(
private val clientOptions: ClientOptions,
) : LithicClientAsync {
+ private val clientOptionsWithUserAgent =
+ if (clientOptions.headers.containsKey("User-Agent")) clientOptions
+ else
+ clientOptions
+ .toBuilder()
+ .putHeader("User-Agent", "${javaClass.simpleName}/Kotlin ${getPackageVersion()}")
+ .build()
+
private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ // Pass the original clientOptions so that this client sets its own User-Agent.
private val sync: LithicClient by lazy { LithicClientImpl(clientOptions) }
- private val accounts: AccountServiceAsync by lazy { AccountServiceAsyncImpl(clientOptions) }
+ private val accounts: AccountServiceAsync by lazy {
+ AccountServiceAsyncImpl(clientOptionsWithUserAgent)
+ }
private val accountHolders: AccountHolderServiceAsync by lazy {
- AccountHolderServiceAsyncImpl(clientOptions)
+ AccountHolderServiceAsyncImpl(clientOptionsWithUserAgent)
}
- private val authRules: AuthRuleServiceAsync by lazy { AuthRuleServiceAsyncImpl(clientOptions) }
+ private val authRules: AuthRuleServiceAsync by lazy {
+ AuthRuleServiceAsyncImpl(clientOptionsWithUserAgent)
+ }
private val authStreamEnrollment: AuthStreamEnrollmentServiceAsync by lazy {
- AuthStreamEnrollmentServiceAsyncImpl(clientOptions)
+ AuthStreamEnrollmentServiceAsyncImpl(clientOptionsWithUserAgent)
}
private val tokenizationDecisioning: TokenizationDecisioningServiceAsync by lazy {
- TokenizationDecisioningServiceAsyncImpl(clientOptions)
+ TokenizationDecisioningServiceAsyncImpl(clientOptionsWithUserAgent)
}
private val tokenizations: TokenizationServiceAsync by lazy {
- TokenizationServiceAsyncImpl(clientOptions)
+ TokenizationServiceAsyncImpl(clientOptionsWithUserAgent)
}
- private val cards: CardServiceAsync by lazy { CardServiceAsyncImpl(clientOptions) }
+ private val cards: CardServiceAsync by lazy { CardServiceAsyncImpl(clientOptionsWithUserAgent) }
- private val balances: BalanceServiceAsync by lazy { BalanceServiceAsyncImpl(clientOptions) }
+ private val balances: BalanceServiceAsync by lazy {
+ BalanceServiceAsyncImpl(clientOptionsWithUserAgent)
+ }
private val aggregateBalances: AggregateBalanceServiceAsync by lazy {
- AggregateBalanceServiceAsyncImpl(clientOptions)
+ AggregateBalanceServiceAsyncImpl(clientOptionsWithUserAgent)
}
- private val disputes: DisputeServiceAsync by lazy { DisputeServiceAsyncImpl(clientOptions) }
+ private val disputes: DisputeServiceAsync by lazy {
+ DisputeServiceAsyncImpl(clientOptionsWithUserAgent)
+ }
- private val events: EventServiceAsync by lazy { EventServiceAsyncImpl(clientOptions) }
+ private val events: EventServiceAsync by lazy {
+ EventServiceAsyncImpl(clientOptionsWithUserAgent)
+ }
- private val transfers: TransferServiceAsync by lazy { TransferServiceAsyncImpl(clientOptions) }
+ private val transfers: TransferServiceAsync by lazy {
+ TransferServiceAsyncImpl(clientOptionsWithUserAgent)
+ }
private val financialAccounts: FinancialAccountServiceAsync by lazy {
- FinancialAccountServiceAsyncImpl(clientOptions)
+ FinancialAccountServiceAsyncImpl(clientOptionsWithUserAgent)
}
private val transactions: TransactionServiceAsync by lazy {
- TransactionServiceAsyncImpl(clientOptions)
+ TransactionServiceAsyncImpl(clientOptionsWithUserAgent)
}
private val responderEndpoints: ResponderEndpointServiceAsync by lazy {
- ResponderEndpointServiceAsyncImpl(clientOptions)
+ ResponderEndpointServiceAsyncImpl(clientOptionsWithUserAgent)
}
private val webhooks: WebhookServiceAsync by lazy { WebhookServiceAsyncImpl(clientOptions) }
private val externalBankAccounts: ExternalBankAccountServiceAsync by lazy {
- ExternalBankAccountServiceAsyncImpl(clientOptions)
+ ExternalBankAccountServiceAsyncImpl(clientOptionsWithUserAgent)
}
- private val payments: PaymentServiceAsync by lazy { PaymentServiceAsyncImpl(clientOptions) }
+ private val payments: PaymentServiceAsync by lazy {
+ PaymentServiceAsyncImpl(clientOptionsWithUserAgent)
+ }
- private val threeDS: ThreeDSServiceAsync by lazy { ThreeDSServiceAsyncImpl(clientOptions) }
+ private val threeDS: ThreeDSServiceAsync by lazy {
+ ThreeDSServiceAsyncImpl(clientOptionsWithUserAgent)
+ }
- private val reports: ReportServiceAsync by lazy { ReportServiceAsyncImpl(clientOptions) }
+ private val reports: ReportServiceAsync by lazy {
+ ReportServiceAsyncImpl(clientOptionsWithUserAgent)
+ }
private val cardPrograms: CardProgramServiceAsync by lazy {
- CardProgramServiceAsyncImpl(clientOptions)
+ CardProgramServiceAsyncImpl(clientOptionsWithUserAgent)
}
private val digitalCardArt: DigitalCardArtServiceAsync by lazy {
- DigitalCardArtServiceAsyncImpl(clientOptions)
+ DigitalCardArtServiceAsyncImpl(clientOptionsWithUserAgent)
}
private val bookTransfers: BookTransferServiceAsync by lazy {
- BookTransferServiceAsyncImpl(clientOptions)
+ BookTransferServiceAsyncImpl(clientOptionsWithUserAgent)
}
private val creditProducts: CreditProductServiceAsync by lazy {
- CreditProductServiceAsyncImpl(clientOptions)
+ CreditProductServiceAsyncImpl(clientOptionsWithUserAgent)
}
private val externalPayments: ExternalPaymentServiceAsync by lazy {
- ExternalPaymentServiceAsyncImpl(clientOptions)
+ ExternalPaymentServiceAsyncImpl(clientOptionsWithUserAgent)
}
private val managementOperations: ManagementOperationServiceAsync by lazy {
- ManagementOperationServiceAsyncImpl(clientOptions)
+ ManagementOperationServiceAsyncImpl(clientOptionsWithUserAgent)
}
override fun sync(): LithicClient = sync
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/client/LithicClientImpl.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/client/LithicClientImpl.kt
index f4fe7280..bb1f6568 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/client/LithicClientImpl.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/client/LithicClientImpl.kt
@@ -4,101 +4,119 @@ package com.lithic.api.client
import com.lithic.api.core.ClientOptions
import com.lithic.api.core.RequestOptions
+import com.lithic.api.core.getPackageVersion
+import com.lithic.api.core.handlers.errorHandler
+import com.lithic.api.core.handlers.jsonHandler
+import com.lithic.api.core.handlers.withErrorHandler
import com.lithic.api.core.http.HttpMethod
import com.lithic.api.core.http.HttpRequest
import com.lithic.api.core.http.HttpResponse.Handler
import com.lithic.api.errors.LithicError
import com.lithic.api.models.*
import com.lithic.api.services.blocking.*
-import com.lithic.api.services.errorHandler
-import com.lithic.api.services.jsonHandler
-import com.lithic.api.services.withErrorHandler
class LithicClientImpl
constructor(
private val clientOptions: ClientOptions,
) : LithicClient {
+ private val clientOptionsWithUserAgent =
+ if (clientOptions.headers.containsKey("User-Agent")) clientOptions
+ else
+ clientOptions
+ .toBuilder()
+ .putHeader("User-Agent", "${javaClass.simpleName}/Kotlin ${getPackageVersion()}")
+ .build()
+
private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ // Pass the original clientOptions so that this client sets its own User-Agent.
private val async: LithicClientAsync by lazy { LithicClientAsyncImpl(clientOptions) }
- private val accounts: AccountService by lazy { AccountServiceImpl(clientOptions) }
+ private val accounts: AccountService by lazy { AccountServiceImpl(clientOptionsWithUserAgent) }
private val accountHolders: AccountHolderService by lazy {
- AccountHolderServiceImpl(clientOptions)
+ AccountHolderServiceImpl(clientOptionsWithUserAgent)
}
- private val authRules: AuthRuleService by lazy { AuthRuleServiceImpl(clientOptions) }
+ private val authRules: AuthRuleService by lazy {
+ AuthRuleServiceImpl(clientOptionsWithUserAgent)
+ }
private val authStreamEnrollment: AuthStreamEnrollmentService by lazy {
- AuthStreamEnrollmentServiceImpl(clientOptions)
+ AuthStreamEnrollmentServiceImpl(clientOptionsWithUserAgent)
}
private val tokenizationDecisioning: TokenizationDecisioningService by lazy {
- TokenizationDecisioningServiceImpl(clientOptions)
+ TokenizationDecisioningServiceImpl(clientOptionsWithUserAgent)
}
private val tokenizations: TokenizationService by lazy {
- TokenizationServiceImpl(clientOptions)
+ TokenizationServiceImpl(clientOptionsWithUserAgent)
}
- private val cards: CardService by lazy { CardServiceImpl(clientOptions) }
+ private val cards: CardService by lazy { CardServiceImpl(clientOptionsWithUserAgent) }
- private val balances: BalanceService by lazy { BalanceServiceImpl(clientOptions) }
+ private val balances: BalanceService by lazy { BalanceServiceImpl(clientOptionsWithUserAgent) }
private val aggregateBalances: AggregateBalanceService by lazy {
- AggregateBalanceServiceImpl(clientOptions)
+ AggregateBalanceServiceImpl(clientOptionsWithUserAgent)
}
- private val disputes: DisputeService by lazy { DisputeServiceImpl(clientOptions) }
+ private val disputes: DisputeService by lazy { DisputeServiceImpl(clientOptionsWithUserAgent) }
- private val events: EventService by lazy { EventServiceImpl(clientOptions) }
+ private val events: EventService by lazy { EventServiceImpl(clientOptionsWithUserAgent) }
- private val transfers: TransferService by lazy { TransferServiceImpl(clientOptions) }
+ private val transfers: TransferService by lazy {
+ TransferServiceImpl(clientOptionsWithUserAgent)
+ }
private val financialAccounts: FinancialAccountService by lazy {
- FinancialAccountServiceImpl(clientOptions)
+ FinancialAccountServiceImpl(clientOptionsWithUserAgent)
}
- private val transactions: TransactionService by lazy { TransactionServiceImpl(clientOptions) }
+ private val transactions: TransactionService by lazy {
+ TransactionServiceImpl(clientOptionsWithUserAgent)
+ }
private val responderEndpoints: ResponderEndpointService by lazy {
- ResponderEndpointServiceImpl(clientOptions)
+ ResponderEndpointServiceImpl(clientOptionsWithUserAgent)
}
private val webhooks: WebhookService by lazy { WebhookServiceImpl(clientOptions) }
private val externalBankAccounts: ExternalBankAccountService by lazy {
- ExternalBankAccountServiceImpl(clientOptions)
+ ExternalBankAccountServiceImpl(clientOptionsWithUserAgent)
}
- private val payments: PaymentService by lazy { PaymentServiceImpl(clientOptions) }
+ private val payments: PaymentService by lazy { PaymentServiceImpl(clientOptionsWithUserAgent) }
- private val threeDS: ThreeDSService by lazy { ThreeDSServiceImpl(clientOptions) }
+ private val threeDS: ThreeDSService by lazy { ThreeDSServiceImpl(clientOptionsWithUserAgent) }
- private val reports: ReportService by lazy { ReportServiceImpl(clientOptions) }
+ private val reports: ReportService by lazy { ReportServiceImpl(clientOptionsWithUserAgent) }
- private val cardPrograms: CardProgramService by lazy { CardProgramServiceImpl(clientOptions) }
+ private val cardPrograms: CardProgramService by lazy {
+ CardProgramServiceImpl(clientOptionsWithUserAgent)
+ }
private val digitalCardArt: DigitalCardArtService by lazy {
- DigitalCardArtServiceImpl(clientOptions)
+ DigitalCardArtServiceImpl(clientOptionsWithUserAgent)
}
private val bookTransfers: BookTransferService by lazy {
- BookTransferServiceImpl(clientOptions)
+ BookTransferServiceImpl(clientOptionsWithUserAgent)
}
private val creditProducts: CreditProductService by lazy {
- CreditProductServiceImpl(clientOptions)
+ CreditProductServiceImpl(clientOptionsWithUserAgent)
}
private val externalPayments: ExternalPaymentService by lazy {
- ExternalPaymentServiceImpl(clientOptions)
+ ExternalPaymentServiceImpl(clientOptionsWithUserAgent)
}
private val managementOperations: ManagementOperationService by lazy {
- ManagementOperationServiceImpl(clientOptions)
+ ManagementOperationServiceImpl(clientOptionsWithUserAgent)
}
override fun async(): LithicClientAsync = async
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/ClientOptions.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/ClientOptions.kt
index b9d5bda7..022d45f9 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/ClientOptions.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/ClientOptions.kt
@@ -6,22 +6,27 @@ import com.fasterxml.jackson.databind.json.JsonMapper
import com.google.common.collect.ArrayListMultimap
import com.google.common.collect.ListMultimap
import com.lithic.api.core.http.HttpClient
+import com.lithic.api.core.http.PhantomReachableClosingHttpClient
import com.lithic.api.core.http.RetryingHttpClient
import java.time.Clock
class ClientOptions
private constructor(
+ private val originalHttpClient: HttpClient,
val httpClient: HttpClient,
val jsonMapper: JsonMapper,
val clock: Clock,
val baseUrl: String,
- val apiKey: String,
- val webhookSecret: String?,
val headers: ListMultimap,
val queryParams: ListMultimap,
val responseValidation: Boolean,
+ val maxRetries: Int,
+ val apiKey: String,
+ val webhookSecret: String?,
) {
+ fun toBuilder() = Builder().from(this)
+
companion object {
const val PRODUCTION_URL = "https://api.lithic.com"
@@ -36,61 +41,70 @@ private constructor(
class Builder {
private var httpClient: HttpClient? = null
- private var jsonMapper: JsonMapper? = null
+ private var jsonMapper: JsonMapper = jsonMapper()
private var clock: Clock = Clock.systemUTC()
private var baseUrl: String = PRODUCTION_URL
- private var headers: MutableMap> = mutableMapOf()
- private var queryParams: MutableMap> = mutableMapOf()
+ private var headers: ListMultimap = ArrayListMultimap.create()
+ private var queryParams: ListMultimap = ArrayListMultimap.create()
private var responseValidation: Boolean = false
private var maxRetries: Int = 2
private var apiKey: String? = null
private var webhookSecret: String? = null
+ internal fun from(clientOptions: ClientOptions) = apply {
+ httpClient = clientOptions.originalHttpClient
+ jsonMapper = clientOptions.jsonMapper
+ clock = clientOptions.clock
+ baseUrl = clientOptions.baseUrl
+ headers = ArrayListMultimap.create(clientOptions.headers)
+ queryParams = ArrayListMultimap.create(clientOptions.queryParams)
+ responseValidation = clientOptions.responseValidation
+ maxRetries = clientOptions.maxRetries
+ apiKey = clientOptions.apiKey
+ webhookSecret = clientOptions.webhookSecret
+ }
+
fun httpClient(httpClient: HttpClient) = apply { this.httpClient = httpClient }
fun jsonMapper(jsonMapper: JsonMapper) = apply { this.jsonMapper = jsonMapper }
- fun baseUrl(baseUrl: String) = apply { this.baseUrl = baseUrl }
-
fun clock(clock: Clock) = apply { this.clock = clock }
+ fun baseUrl(baseUrl: String) = apply { this.baseUrl = baseUrl }
+
fun headers(headers: Map>) = apply {
this.headers.clear()
putAllHeaders(headers)
}
- fun putHeader(name: String, value: String) = apply {
- this.headers.getOrPut(name) { mutableListOf() }.add(value)
- }
+ fun putHeader(name: String, value: String) = apply { headers.put(name, value) }
fun putHeaders(name: String, values: Iterable) = apply {
- this.headers.getOrPut(name) { mutableListOf() }.addAll(values)
+ headers.putAll(name, values)
}
fun putAllHeaders(headers: Map>) = apply {
- headers.forEach(this::putHeaders)
+ headers.forEach(::putHeaders)
}
- fun removeHeader(name: String) = apply { this.headers.put(name, mutableListOf()) }
+ fun removeHeader(name: String) = apply { headers.removeAll(name) }
fun queryParams(queryParams: Map>) = apply {
this.queryParams.clear()
putAllQueryParams(queryParams)
}
- fun putQueryParam(name: String, value: String) = apply {
- this.queryParams.getOrPut(name) { mutableListOf() }.add(value)
- }
+ fun putQueryParam(name: String, value: String) = apply { queryParams.put(name, value) }
fun putQueryParams(name: String, values: Iterable) = apply {
- this.queryParams.getOrPut(name) { mutableListOf() }.addAll(values)
+ queryParams.putAll(name, values)
}
fun putAllQueryParams(queryParams: Map>) = apply {
- queryParams.forEach(this::putQueryParams)
+ queryParams.forEach(::putQueryParams)
}
- fun removeQueryParam(name: String) = apply { this.queryParams.put(name, mutableListOf()) }
+ fun removeQueryParam(name: String) = apply { queryParams.removeAll(name) }
fun responseValidation(responseValidation: Boolean) = apply {
this.responseValidation = responseValidation
@@ -118,28 +132,33 @@ private constructor(
headers.put("X-Stainless-OS", getOsName())
headers.put("X-Stainless-OS-Version", getOsVersion())
headers.put("X-Stainless-Package-Version", getPackageVersion())
+ headers.put("X-Stainless-Runtime", "JRE")
headers.put("X-Stainless-Runtime-Version", getJavaVersion())
headers.put("X-Lithic-Pagination", "cursor")
if (!apiKey.isNullOrEmpty()) {
headers.put("Authorization", apiKey)
}
- this.headers.forEach(headers::replaceValues)
- this.queryParams.forEach(queryParams::replaceValues)
+ this.headers.asMap().forEach(headers::replaceValues)
+ this.queryParams.asMap().forEach(queryParams::replaceValues)
return ClientOptions(
- RetryingHttpClient.builder()
- .httpClient(httpClient!!)
- .clock(clock)
- .maxRetries(maxRetries)
- .build(),
- jsonMapper ?: jsonMapper(),
+ httpClient!!,
+ PhantomReachableClosingHttpClient(
+ RetryingHttpClient.builder()
+ .httpClient(httpClient!!)
+ .clock(clock)
+ .maxRetries(maxRetries)
+ .build()
+ ),
+ jsonMapper,
clock,
baseUrl,
+ headers.toImmutable(),
+ queryParams.toImmutable(),
+ responseValidation,
+ maxRetries,
apiKey!!,
webhookSecret,
- headers.toUnmodifiable(),
- queryParams.toUnmodifiable(),
- responseValidation,
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/services/HttpRequestBodies.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/HttpRequestBodies.kt
similarity index 96%
rename from lithic-kotlin-core/src/main/kotlin/com/lithic/api/services/HttpRequestBodies.kt
rename to lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/HttpRequestBodies.kt
index 20c52620..6a6fba6c 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/services/HttpRequestBodies.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/HttpRequestBodies.kt
@@ -1,11 +1,8 @@
@file:JvmName("HttpRequestBodies")
-package com.lithic.api.services
+package com.lithic.api.core
import com.fasterxml.jackson.databind.json.JsonMapper
-import com.lithic.api.core.Enum
-import com.lithic.api.core.JsonValue
-import com.lithic.api.core.MultipartFormValue
import com.lithic.api.core.http.HttpRequestBody
import com.lithic.api.errors.LithicException
import java.io.ByteArrayOutputStream
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/PhantomReachable.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/PhantomReachable.kt
new file mode 100644
index 00000000..29ec90e4
--- /dev/null
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/PhantomReachable.kt
@@ -0,0 +1,45 @@
+@file:JvmName("PhantomReachable")
+
+package com.lithic.api.core
+
+import com.lithic.api.errors.LithicException
+import java.lang.reflect.InvocationTargetException
+
+/**
+ * Closes [closeable] when [observed] becomes only phantom reachable.
+ *
+ * This is a wrapper around a Java 9+ [java.lang.ref.Cleaner], or a no-op in older Java versions.
+ */
+internal fun closeWhenPhantomReachable(observed: Any, closeable: AutoCloseable) {
+ check(observed !== closeable) {
+ "`observed` cannot be the same object as `closeable` because it would never become phantom reachable"
+ }
+ closeWhenPhantomReachable?.let { it(observed, closeable::close) }
+}
+
+private val closeWhenPhantomReachable: ((Any, AutoCloseable) -> Unit)? by lazy {
+ try {
+ val cleanerClass = Class.forName("java.lang.ref.Cleaner")
+ val cleanerCreate = cleanerClass.getMethod("create")
+ val cleanerRegister =
+ cleanerClass.getMethod("register", Any::class.java, Runnable::class.java)
+ val cleanerObject = cleanerCreate.invoke(null);
+
+ { observed, closeable ->
+ try {
+ cleanerRegister.invoke(cleanerObject, observed, Runnable { closeable.close() })
+ } catch (e: ReflectiveOperationException) {
+ if (e is InvocationTargetException) {
+ when (val cause = e.cause) {
+ is RuntimeException,
+ is Error -> throw cause
+ }
+ }
+ throw LithicException("Unexpected reflective invocation failure", e)
+ }
+ }
+ } catch (e: ReflectiveOperationException) {
+ // We're running Java 8, which has no Cleaner.
+ null
+ }
+}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/Properties.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/Properties.kt
index ebf89358..b465d235 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/Properties.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/Properties.kt
@@ -34,14 +34,9 @@ fun getOsName(): String {
}
}
-fun getOsVersion(): String {
- return System.getProperty("os.version", "unknown")
-}
+fun getOsVersion(): String = System.getProperty("os.version", "unknown")
-fun getPackageVersion(): String {
- return Properties::class.java.`package`.implementationVersion ?: "unknown"
-}
+fun getPackageVersion(): String =
+ Properties::class.java.`package`.implementationVersion ?: "unknown"
-fun getJavaVersion(): String {
- return System.getProperty("java.version", "unknown")
-}
+fun getJavaVersion(): String = System.getProperty("java.version", "unknown")
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/Utils.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/Utils.kt
index 16d1cbf5..06ce514f 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/Utils.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/Utils.kt
@@ -4,41 +4,25 @@ package com.lithic.api.core
import com.google.common.collect.ImmutableListMultimap
import com.google.common.collect.ListMultimap
-import com.google.common.collect.Multimaps
import com.lithic.api.errors.LithicInvalidDataException
import java.util.Collections
+import java.util.SortedMap
-internal fun T?.getOrThrow(name: String): T {
- if (this == null) {
- throw LithicInvalidDataException("'${name}' is not present")
- }
-
- return this
-}
+internal fun T?.getOrThrow(name: String): T =
+ this ?: throw LithicInvalidDataException("`${name}` is not present")
-internal fun List.toUnmodifiable(): List {
- if (isEmpty()) {
- return Collections.emptyList()
- }
+internal fun List.toImmutable(): List =
+ if (isEmpty()) Collections.emptyList() else Collections.unmodifiableList(toList())
- return Collections.unmodifiableList(this)
-}
+internal fun Map.toImmutable(): Map =
+ if (isEmpty()) Collections.emptyMap() else Collections.unmodifiableMap(toMap())
-internal fun Map.toUnmodifiable(): Map {
- if (isEmpty()) {
- return Collections.emptyMap()
- }
+internal fun , V> SortedMap.toImmutable(): SortedMap =
+ if (isEmpty()) Collections.emptySortedMap()
+ else Collections.unmodifiableSortedMap(toSortedMap(comparator()))
- return Collections.unmodifiableMap(this)
-}
-
-internal fun ListMultimap.toUnmodifiable(): ListMultimap {
- if (isEmpty()) {
- return ImmutableListMultimap.of()
- }
-
- return Multimaps.unmodifiableListMultimap(this)
-}
+internal fun ListMultimap.toImmutable(): ListMultimap =
+ ImmutableListMultimap.copyOf(this)
internal fun ListMultimap.getRequiredHeader(header: String): String {
val value =
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/Values.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/Values.kt
index d1df5c7c..549003b6 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/Values.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/Values.kt
@@ -138,6 +138,8 @@ sealed class JsonField {
// This filter should not be used directly and should instead use the @ExcludeMissing annotation
class IsMissing {
override fun equals(other: Any?): Boolean = other is JsonMissing
+
+ override fun hashCode(): Int = Objects.hash()
}
class Deserializer(private val type: JavaType? = null) :
@@ -383,7 +385,7 @@ private constructor(
override fun toString() = values.toString()
companion object {
- @JsonCreator fun of(values: List) = JsonArray(values.toUnmodifiable())
+ @JsonCreator fun of(values: List) = JsonArray(values.toImmutable())
}
}
@@ -407,7 +409,7 @@ private constructor(
override fun toString() = values.toString()
companion object {
- @JsonCreator fun of(values: Map) = JsonObject(values.toUnmodifiable())
+ @JsonCreator fun of(values: Map) = JsonObject(values.toImmutable())
}
}
@@ -473,9 +475,8 @@ internal constructor(
}
}
- override fun toString(): String {
- return "MultipartFormValue(name='$name', contentType=$contentType, filename=$filename, value=${valueToString()})"
- }
+ override fun toString(): String =
+ "MultipartFormValue{name=$name, contentType=$contentType, filename=$filename, value=${valueToString()}}"
private fun valueToString(): String =
when (value) {
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/handlers/EmptyHandler.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/handlers/EmptyHandler.kt
new file mode 100644
index 00000000..6956b4ab
--- /dev/null
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/handlers/EmptyHandler.kt
@@ -0,0 +1,12 @@
+@file:JvmName("EmptyHandler")
+
+package com.lithic.api.core.handlers
+
+import com.lithic.api.core.http.HttpResponse
+import com.lithic.api.core.http.HttpResponse.Handler
+
+internal fun emptyHandler(): Handler = EmptyHandlerInternal
+
+private object EmptyHandlerInternal : Handler {
+ override fun handle(response: HttpResponse): Void? = null
+}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/services/Handlers.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/handlers/ErrorHandler.kt
similarity index 57%
rename from lithic-kotlin-core/src/main/kotlin/com/lithic/api/services/Handlers.kt
rename to lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/handlers/ErrorHandler.kt
index 74e58fbc..12a29a4c 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/services/Handlers.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/handlers/ErrorHandler.kt
@@ -1,17 +1,14 @@
-@file:JvmName("Handlers")
+@file:JvmName("ErrorHandler")
-package com.lithic.api.services
+package com.lithic.api.core.handlers
import com.fasterxml.jackson.databind.json.JsonMapper
-import com.fasterxml.jackson.module.kotlin.jacksonTypeRef
import com.google.common.collect.ListMultimap
-import com.lithic.api.core.http.BinaryResponseContent
import com.lithic.api.core.http.HttpResponse
import com.lithic.api.core.http.HttpResponse.Handler
import com.lithic.api.errors.BadRequestException
import com.lithic.api.errors.InternalServerException
import com.lithic.api.errors.LithicError
-import com.lithic.api.errors.LithicException
import com.lithic.api.errors.NotFoundException
import com.lithic.api.errors.PermissionDeniedException
import com.lithic.api.errors.RateLimitException
@@ -20,69 +17,22 @@ import com.lithic.api.errors.UnexpectedStatusCodeException
import com.lithic.api.errors.UnprocessableEntityException
import java.io.ByteArrayInputStream
import java.io.InputStream
-import java.io.OutputStream
-
-internal fun emptyHandler(): Handler = EmptyHandler
-
-private object EmptyHandler : Handler {
- override fun handle(response: HttpResponse): Void? = null
-}
-
-internal fun stringHandler(): Handler = StringHandler
-
-internal fun binaryHandler(): Handler = BinaryHandler
-
-private object StringHandler : Handler {
- override fun handle(response: HttpResponse): String {
- return response.body().readBytes().toString(Charsets.UTF_8)
- }
-}
-
-private object BinaryHandler : Handler {
- override fun handle(response: HttpResponse): BinaryResponseContent {
- return object : BinaryResponseContent {
- override fun contentType(): String? =
- response.headers().get("Content-Type").firstOrNull()
-
- override fun body(): InputStream = response.body()
-
- override fun close() = response.close()
-
- override fun writeTo(outputStream: OutputStream) {
- response.body().copyTo(outputStream)
- }
- }
- }
-}
-
-internal inline fun jsonHandler(jsonMapper: JsonMapper): Handler {
- return object : Handler {
- override fun handle(response: HttpResponse): T {
- try {
- return jsonMapper.readValue(response.body(), jacksonTypeRef())
- } catch (e: Exception) {
- throw LithicException("Error reading response", e)
- }
- }
- }
-}
internal fun errorHandler(jsonMapper: JsonMapper): Handler {
val handler = jsonHandler(jsonMapper)
return object : Handler {
- override fun handle(response: HttpResponse): LithicError {
+ override fun handle(response: HttpResponse): LithicError =
try {
- return handler.handle(response)
+ handler.handle(response)
} catch (e: Exception) {
- return LithicError.builder().build()
+ LithicError.builder().build()
}
- }
}
}
-internal fun Handler.withErrorHandler(errorHandler: Handler): Handler {
- return object : Handler {
+internal fun Handler.withErrorHandler(errorHandler: Handler): Handler =
+ object : Handler {
override fun handle(response: HttpResponse): T {
when (val statusCode = response.statusCode()) {
in 200..299 -> {
@@ -92,7 +42,7 @@ internal fun Handler.withErrorHandler(errorHandler: Handler)
val buffered = response.buffered()
throw BadRequestException(
buffered.headers(),
- StringHandler.handle(buffered),
+ stringHandler().handle(buffered),
errorHandler.handle(buffered),
)
}
@@ -100,7 +50,7 @@ internal fun Handler.withErrorHandler(errorHandler: Handler)
val buffered = response.buffered()
throw UnauthorizedException(
buffered.headers(),
- StringHandler.handle(buffered),
+ stringHandler().handle(buffered),
errorHandler.handle(buffered),
)
}
@@ -108,7 +58,7 @@ internal fun Handler.withErrorHandler(errorHandler: Handler)
val buffered = response.buffered()
throw PermissionDeniedException(
buffered.headers(),
- StringHandler.handle(buffered),
+ stringHandler().handle(buffered),
errorHandler.handle(buffered),
)
}
@@ -116,7 +66,7 @@ internal fun Handler.withErrorHandler(errorHandler: Handler)
val buffered = response.buffered()
throw NotFoundException(
buffered.headers(),
- StringHandler.handle(buffered),
+ stringHandler().handle(buffered),
errorHandler.handle(buffered),
)
}
@@ -124,7 +74,7 @@ internal fun Handler.withErrorHandler(errorHandler: Handler)
val buffered = response.buffered()
throw UnprocessableEntityException(
buffered.headers(),
- StringHandler.handle(buffered),
+ stringHandler().handle(buffered),
errorHandler.handle(buffered),
)
}
@@ -132,7 +82,7 @@ internal fun Handler.withErrorHandler(errorHandler: Handler)
val buffered = response.buffered()
throw RateLimitException(
buffered.headers(),
- StringHandler.handle(buffered),
+ stringHandler().handle(buffered),
errorHandler.handle(buffered),
)
}
@@ -141,7 +91,7 @@ internal fun Handler.withErrorHandler(errorHandler: Handler)
throw InternalServerException(
statusCode,
buffered.headers(),
- StringHandler.handle(buffered),
+ stringHandler().handle(buffered),
errorHandler.handle(buffered),
)
}
@@ -150,33 +100,24 @@ internal fun Handler.withErrorHandler(errorHandler: Handler)
throw UnexpectedStatusCodeException(
statusCode,
buffered.headers(),
- StringHandler.handle(buffered),
+ stringHandler().handle(buffered),
errorHandler.handle(buffered),
)
}
}
}
}
-}
private fun HttpResponse.buffered(): HttpResponse {
val body = body().readBytes()
return object : HttpResponse {
- override fun statusCode(): Int {
- return this@buffered.statusCode()
- }
+ override fun statusCode(): Int = this@buffered.statusCode()
- override fun headers(): ListMultimap {
- return this@buffered.headers()
- }
+ override fun headers(): ListMultimap = this@buffered.headers()
- override fun body(): InputStream {
- return ByteArrayInputStream(body)
- }
+ override fun body(): InputStream = ByteArrayInputStream(body)
- override fun close() {
- this@buffered.close()
- }
+ override fun close() = this@buffered.close()
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/handlers/JsonHandler.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/handlers/JsonHandler.kt
new file mode 100644
index 00000000..dd94ead2
--- /dev/null
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/handlers/JsonHandler.kt
@@ -0,0 +1,20 @@
+@file:JvmName("JsonHandler")
+
+package com.lithic.api.core.handlers
+
+import com.fasterxml.jackson.databind.json.JsonMapper
+import com.fasterxml.jackson.module.kotlin.jacksonTypeRef
+import com.lithic.api.core.http.HttpResponse
+import com.lithic.api.core.http.HttpResponse.Handler
+import com.lithic.api.errors.LithicException
+
+internal inline fun jsonHandler(jsonMapper: JsonMapper): Handler =
+ object : Handler {
+ override fun handle(response: HttpResponse): T {
+ try {
+ return jsonMapper.readValue(response.body(), jacksonTypeRef())
+ } catch (e: Exception) {
+ throw LithicException("Error reading response", e)
+ }
+ }
+ }
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/handlers/StringHandler.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/handlers/StringHandler.kt
new file mode 100644
index 00000000..fd4614c5
--- /dev/null
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/handlers/StringHandler.kt
@@ -0,0 +1,13 @@
+@file:JvmName("StringHandler")
+
+package com.lithic.api.core.handlers
+
+import com.lithic.api.core.http.HttpResponse
+import com.lithic.api.core.http.HttpResponse.Handler
+
+internal fun stringHandler(): Handler = StringHandlerInternal
+
+private object StringHandlerInternal : Handler {
+ override fun handle(response: HttpResponse): String =
+ response.body().readBytes().toString(Charsets.UTF_8)
+}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/http/BinaryResponseContent.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/http/BinaryResponseContent.kt
deleted file mode 100644
index 45ed8d05..00000000
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/http/BinaryResponseContent.kt
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.lithic.api.core.http
-
-import java.io.IOException
-import java.io.InputStream
-import java.io.OutputStream
-import java.lang.AutoCloseable
-
-interface BinaryResponseContent : AutoCloseable {
-
- fun contentType(): String?
-
- fun body(): InputStream
-
- @Throws(IOException::class) fun writeTo(outputStream: OutputStream)
-}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/http/Headers.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/http/Headers.kt
new file mode 100644
index 00000000..3c4b372d
--- /dev/null
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/http/Headers.kt
@@ -0,0 +1,88 @@
+package com.lithic.api.core.http
+
+import com.lithic.api.core.toImmutable
+import java.util.TreeMap
+
+class Headers private constructor(private val map: Map>, val size: Int) {
+
+ fun isEmpty(): Boolean = map.isEmpty()
+
+ fun names(): Set = map.keys
+
+ fun values(name: String): List = map[name].orEmpty()
+
+ fun toBuilder(): Builder = Builder().putAll(map)
+
+ companion object {
+
+ fun builder() = Builder()
+ }
+
+ class Builder {
+
+ private val map: MutableMap> =
+ TreeMap(String.CASE_INSENSITIVE_ORDER)
+ private var size: Int = 0
+
+ fun put(name: String, value: String) = apply {
+ map.getOrPut(name) { mutableListOf() }.add(value)
+ size++
+ }
+
+ fun put(name: String, values: Iterable) = apply { values.forEach { put(name, it) } }
+
+ fun putAll(headers: Map>) = apply { headers.forEach(::put) }
+
+ fun putAll(headers: Headers) = apply {
+ headers.names().forEach { put(it, headers.values(it)) }
+ }
+
+ fun replace(name: String, value: String) = apply {
+ remove(name)
+ put(name, value)
+ }
+
+ fun replace(name: String, values: Iterable) = apply {
+ remove(name)
+ put(name, values)
+ }
+
+ fun replaceAll(headers: Map>) = apply {
+ headers.forEach(::replace)
+ }
+
+ fun replaceAll(headers: Headers) = apply {
+ headers.names().forEach { replace(it, headers.values(it)) }
+ }
+
+ fun remove(name: String) = apply { size -= map.remove(name).orEmpty().size }
+
+ fun removeAll(names: Set) = apply { names.forEach(::remove) }
+
+ fun clear() = apply {
+ map.clear()
+ size = 0
+ }
+
+ fun build() =
+ Headers(
+ map.mapValuesTo(TreeMap(String.CASE_INSENSITIVE_ORDER)) { (_, values) ->
+ values.toImmutable()
+ }
+ .toImmutable(),
+ size
+ )
+ }
+
+ override fun hashCode(): Int = map.hashCode()
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is Headers && map == other.map
+ }
+
+ override fun toString(): String = "Headers{map=$map}"
+}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/http/HttpRequest.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/http/HttpRequest.kt
index ad2981c8..f2110f81 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/http/HttpRequest.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/http/HttpRequest.kt
@@ -4,7 +4,7 @@ import com.google.common.collect.ArrayListMultimap
import com.google.common.collect.ListMultimap
import com.google.common.collect.Multimap
import com.google.common.collect.MultimapBuilder
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
class HttpRequest
private constructor(
@@ -17,7 +17,7 @@ private constructor(
) {
override fun toString(): String =
- "HttpRequest {method=$method, pathSegments=$pathSegments, queryParams=$queryParams, headers=$headers, body=$body}"
+ "HttpRequest{method=$method, pathSegments=$pathSegments, queryParams=$queryParams, headers=$headers, body=$body}"
companion object {
fun builder() = Builder()
@@ -83,8 +83,8 @@ private constructor(
HttpRequest(
checkNotNull(method) { "`method` is required but was not set" },
url,
- pathSegments.toUnmodifiable(),
- queryParams.toUnmodifiable(),
+ pathSegments.toImmutable(),
+ queryParams.toImmutable(),
headers,
body,
)
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/http/PhantomReachableClosingHttpClient.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/http/PhantomReachableClosingHttpClient.kt
new file mode 100644
index 00000000..0424ce89
--- /dev/null
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/http/PhantomReachableClosingHttpClient.kt
@@ -0,0 +1,20 @@
+package com.lithic.api.core.http
+
+import com.lithic.api.core.RequestOptions
+import com.lithic.api.core.closeWhenPhantomReachable
+
+internal class PhantomReachableClosingHttpClient(private val httpClient: HttpClient) : HttpClient {
+ init {
+ closeWhenPhantomReachable(this, httpClient)
+ }
+
+ override fun execute(request: HttpRequest, requestOptions: RequestOptions): HttpResponse =
+ httpClient.execute(request, requestOptions)
+
+ override suspend fun executeAsync(
+ request: HttpRequest,
+ requestOptions: RequestOptions
+ ): HttpResponse = httpClient.executeAsync(request, requestOptions)
+
+ override fun close() = httpClient.close()
+}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/http/RetryingHttpClient.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/http/RetryingHttpClient.kt
index 84d05b1a..bc790ede 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/http/RetryingHttpClient.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/http/RetryingHttpClient.kt
@@ -1,5 +1,3 @@
-@file:JvmSynthetic
-
package com.lithic.api.core.http
import com.lithic.api.core.RequestOptions
@@ -109,15 +107,12 @@ private constructor(
}
}
- override fun close() {
- httpClient.close()
- }
+ override fun close() = httpClient.close()
- private fun isRetryable(request: HttpRequest): Boolean {
+ private fun isRetryable(request: HttpRequest): Boolean =
// Some requests, such as when a request body is being streamed, cannot be retried because
// the body data aren't available on subsequent attempts.
- return request.body?.repeatable() ?: true
- }
+ request.body?.repeatable() ?: true
private fun setRetryCountHeader(request: HttpRequest, retries: Int) {
request.headers.removeAll("x-stainless-retry-count")
@@ -155,11 +150,10 @@ private constructor(
}
}
- private fun shouldRetry(throwable: Throwable): Boolean {
+ private fun shouldRetry(throwable: Throwable): Boolean =
// Only retry IOException and LithicIoException, other exceptions are not intended to be
// retried.
- return throwable is IOException || throwable is LithicIoException
- }
+ throwable is IOException || throwable is LithicIoException
private fun getRetryBackoffMillis(retries: Int, response: HttpResponse?): Duration {
// About the Retry-After header:
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/errors/LithicError.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/errors/LithicError.kt
index b06d5389..79732d1e 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/errors/LithicError.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/errors/LithicError.kt
@@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonAnySetter
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import java.util.Objects
@JsonDeserialize(builder = LithicError.Builder::class)
@@ -37,7 +37,7 @@ constructor(
companion object {
- @JvmStatic fun builder() = Builder()
+ fun builder() = Builder()
}
class Builder {
@@ -60,6 +60,6 @@ constructor(
this.additionalProperties.putAll(additionalProperties)
}
- fun build(): LithicError = LithicError(additionalProperties.toUnmodifiable())
+ fun build(): LithicError = LithicError(additionalProperties.toImmutable())
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Account.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Account.kt
index 53089fd1..4be90bb3 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Account.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Account.kt
@@ -13,7 +13,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.time.OffsetDateTime
import java.util.Objects
@@ -323,14 +323,14 @@ private constructor(
fun build(): Account =
Account(
accountHolder,
- authRuleTokens.map { it.toUnmodifiable() },
+ authRuleTokens.map { it.toImmutable() },
cardholderCurrency,
spendLimit,
state,
token,
verificationAddress,
created,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -447,7 +447,7 @@ private constructor(
daily,
lifetime,
monthly,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -685,7 +685,7 @@ private constructor(
email,
phoneNumber,
token,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -900,7 +900,7 @@ private constructor(
country,
postalCode,
state,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolder.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolder.kt
index daa4bae1..dfe10281 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolder.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolder.kt
@@ -13,7 +13,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.time.OffsetDateTime
import java.util.Objects
@@ -699,8 +699,8 @@ private constructor(
fun build(): AccountHolder =
AccountHolder(
accountToken,
- beneficialOwnerEntities.map { it.toUnmodifiable() },
- beneficialOwnerIndividuals.map { it.toUnmodifiable() },
+ beneficialOwnerEntities.map { it.toImmutable() },
+ beneficialOwnerIndividuals.map { it.toImmutable() },
businessAccountToken,
businessEntity,
controlPerson,
@@ -712,13 +712,13 @@ private constructor(
natureOfBusiness,
phoneNumber,
status,
- statusReasons.map { it.toUnmodifiable() },
+ statusReasons.map { it.toImmutable() },
token,
userType,
verificationApplication,
- requiredDocuments.map { it.toUnmodifiable() },
+ requiredDocuments.map { it.toImmutable() },
websiteUrl,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -956,9 +956,9 @@ private constructor(
governmentId,
legalBusinessName,
parentCompany,
- phoneNumbers.map { it.toUnmodifiable() },
+ phoneNumbers.map { it.toImmutable() },
entityToken,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -1175,7 +1175,7 @@ private constructor(
lastName,
phoneNumber,
entityToken,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -1661,9 +1661,9 @@ private constructor(
AccountHolderVerificationApplication(
created,
status,
- statusReasons.map { it.toUnmodifiable() },
+ statusReasons.map { it.toImmutable() },
updated,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderCreateParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderCreateParams.kt
index ac8ea96d..0cef478d 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderCreateParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderCreateParams.kt
@@ -14,7 +14,7 @@ import com.lithic.api.core.BaseSerializer
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
import com.lithic.api.core.getOrThrow
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.util.Objects
@@ -134,6 +134,7 @@ constructor(
override fun ObjectCodec.deserialize(node: JsonNode): AccountHolderCreateBody {
val json = JsonValue.fromJsonNode(node)
+
tryDeserialize(node, jacksonTypeRef())?.let {
return AccountHolderCreateBody(kyb = it, _json = json)
}
@@ -272,8 +273,8 @@ constructor(
kyb,
kyc,
kycExempt,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderCreateResponse.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderCreateResponse.kt
index 98903727..e99771fc 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderCreateResponse.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderCreateResponse.kt
@@ -13,7 +13,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.time.OffsetDateTime
import java.util.Objects
@@ -259,10 +259,10 @@ private constructor(
created,
externalId,
status,
- statusReasons.map { it.toUnmodifiable() },
- requiredDocuments.map { it.toUnmodifiable() },
+ statusReasons.map { it.toImmutable() },
+ requiredDocuments.map { it.toImmutable() },
token,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderListDocumentsParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderListDocumentsParams.kt
index 730a48bc..ab2b4f5e 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderListDocumentsParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderListDocumentsParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -116,8 +116,8 @@ constructor(
checkNotNull(accountHolderToken) {
"`accountHolderToken` is required but was not set"
},
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderListDocumentsResponse.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderListDocumentsResponse.kt
index 1074e82a..4fffb215 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderListDocumentsResponse.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderListDocumentsResponse.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import java.util.Objects
@JsonDeserialize(builder = AccountHolderListDocumentsResponse.Builder::class)
@@ -79,8 +79,8 @@ private constructor(
fun build(): AccountHolderListDocumentsResponse =
AccountHolderListDocumentsResponse(
- data.map { it.toUnmodifiable() },
- additionalProperties.toUnmodifiable()
+ data.map { it.toImmutable() },
+ additionalProperties.toImmutable()
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderListPage.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderListPage.kt
index 2c86bb47..922d0513 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderListPage.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderListPage.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.blocking.AccountHolderService
import java.util.Objects
@@ -155,7 +155,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderListPageAsync.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderListPageAsync.kt
index 7632d372..68218b4f 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderListPageAsync.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderListPageAsync.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.async.AccountHolderServiceAsync
import java.util.Objects
import kotlinx.coroutines.flow.Flow
@@ -157,7 +157,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderListParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderListParams.kt
index 41c0de05..7665298d 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderListParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderListParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.time.OffsetDateTime
import java.time.format.DateTimeFormatter
@@ -66,7 +66,7 @@ constructor(
this.phoneNumber?.let { params.put("phone_number", listOf(it.toString())) }
this.startingAfter?.let { params.put("starting_after", listOf(it.toString())) }
params.putAll(additionalQueryParams)
- return params.toUnmodifiable()
+ return params.toImmutable()
}
internal fun getHeaders(): Map> = additionalHeaders
@@ -241,8 +241,8 @@ constructor(
limit,
phoneNumber,
startingAfter,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderResubmitParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderResubmitParams.kt
index 56fda36b..09be73e4 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderResubmitParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderResubmitParams.kt
@@ -12,7 +12,7 @@ import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.util.Objects
@@ -142,7 +142,7 @@ constructor(
checkNotNull(individual) { "`individual` is required but was not set" },
checkNotNull(tosTimestamp) { "`tosTimestamp` is required but was not set" },
checkNotNull(workflow) { "`workflow` is required but was not set" },
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -296,9 +296,9 @@ constructor(
checkNotNull(individual) { "`individual` is required but was not set" },
checkNotNull(tosTimestamp) { "`tosTimestamp` is required but was not set" },
checkNotNull(workflow) { "`workflow` is required but was not set" },
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
@@ -442,7 +442,7 @@ constructor(
checkNotNull(governmentId) { "`governmentId` is required but was not set" },
checkNotNull(lastName) { "`lastName` is required but was not set" },
checkNotNull(phoneNumber) { "`phoneNumber` is required but was not set" },
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderRetrieveDocumentParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderRetrieveDocumentParams.kt
index 27bfe0e6..bde98996 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderRetrieveDocumentParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderRetrieveDocumentParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -126,8 +126,8 @@ constructor(
"`accountHolderToken` is required but was not set"
},
checkNotNull(documentToken) { "`documentToken` is required but was not set" },
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderRetrieveParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderRetrieveParams.kt
index bf9dcdf1..d96bd384 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderRetrieveParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderRetrieveParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -115,8 +115,8 @@ constructor(
checkNotNull(accountHolderToken) {
"`accountHolderToken` is required but was not set"
},
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentDocumentReviewParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentDocumentReviewParams.kt
index aca3ebe8..ff3e9549 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentDocumentReviewParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentDocumentReviewParams.kt
@@ -12,7 +12,7 @@ import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.util.Objects
@@ -157,9 +157,9 @@ constructor(
"`documentUploadToken` is required but was not set"
},
checkNotNull(status) { "`status` is required but was not set" },
- acceptedEntityStatusReasons?.toUnmodifiable(),
+ acceptedEntityStatusReasons?.toImmutable(),
statusReason,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -332,11 +332,11 @@ constructor(
},
checkNotNull(status) { "`status` is required but was not set" },
if (acceptedEntityStatusReasons.size == 0) null
- else acceptedEntityStatusReasons.toUnmodifiable(),
+ else acceptedEntityStatusReasons.toImmutable(),
statusReason,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentReviewParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentReviewParams.kt
index 87ae1e55..99fdb5f3 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentReviewParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentReviewParams.kt
@@ -12,7 +12,7 @@ import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.util.Objects
@@ -132,8 +132,8 @@ constructor(
AccountHolderSimulateEnrollmentReviewBody(
accountHolderToken,
status,
- statusReasons?.toUnmodifiable(),
- additionalProperties.toUnmodifiable(),
+ statusReasons?.toImmutable(),
+ additionalProperties.toImmutable(),
)
}
@@ -294,10 +294,10 @@ constructor(
AccountHolderSimulateEnrollmentReviewParams(
accountHolderToken,
status,
- if (statusReasons.size == 0) null else statusReasons.toUnmodifiable(),
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ if (statusReasons.size == 0) null else statusReasons.toImmutable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentReviewResponse.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentReviewResponse.kt
index 41899071..aeae20c2 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentReviewResponse.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentReviewResponse.kt
@@ -13,7 +13,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.time.OffsetDateTime
import java.util.Objects
@@ -740,17 +740,17 @@ private constructor(
verificationApplication,
individual,
businessEntity,
- beneficialOwnerEntities.map { it.toUnmodifiable() },
- beneficialOwnerIndividuals.map { it.toUnmodifiable() },
+ beneficialOwnerEntities.map { it.toImmutable() },
+ beneficialOwnerIndividuals.map { it.toImmutable() },
controlPerson,
natureOfBusiness,
websiteUrl,
email,
phoneNumber,
status,
- statusReasons.map { it.toUnmodifiable() },
- requiredDocuments.map { it.toUnmodifiable() },
- additionalProperties.toUnmodifiable(),
+ statusReasons.map { it.toImmutable() },
+ requiredDocuments.map { it.toImmutable() },
+ additionalProperties.toImmutable(),
)
}
@@ -967,8 +967,8 @@ private constructor(
governmentId,
legalBusinessName,
parentCompany,
- phoneNumbers.map { it.toUnmodifiable() },
- additionalProperties.toUnmodifiable(),
+ phoneNumbers.map { it.toImmutable() },
+ additionalProperties.toImmutable(),
)
}
@@ -1179,7 +1179,7 @@ private constructor(
country,
postalCode,
state,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -1456,7 +1456,7 @@ private constructor(
lastName,
phoneNumber,
governmentId,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -1667,7 +1667,7 @@ private constructor(
country,
postalCode,
state,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -2140,7 +2140,7 @@ private constructor(
private var validated: Boolean = false
/** Timestamp of when the application was created. */
- fun created(): OffsetDateTime? = created.getNullable("created")
+ fun created(): OffsetDateTime = created.getRequired("created")
/**
* KYC and KYB evaluation states.
@@ -2148,13 +2148,13 @@ private constructor(
* Note: `PENDING_RESUBMIT` and `PENDING_DOCUMENT` are only applicable for the `ADVANCED`
* workflow.
*/
- fun status(): Status? = status.getNullable("status")
+ fun status(): Status = status.getRequired("status")
/** Reason for the evaluation status. */
- fun statusReasons(): List? = statusReasons.getNullable("status_reasons")
+ fun statusReasons(): List = statusReasons.getRequired("status_reasons")
/** Timestamp of when the application was last updated. */
- fun updated(): OffsetDateTime? = updated.getNullable("updated")
+ fun updated(): OffsetDateTime = updated.getRequired("updated")
/** Timestamp of when the application was created. */
@JsonProperty("created") @ExcludeMissing fun _created() = created
@@ -2273,9 +2273,9 @@ private constructor(
VerificationApplication(
created,
status,
- statusReasons.map { it.toUnmodifiable() },
+ statusReasons.map { it.toImmutable() },
updated,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderUpdateParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderUpdateParams.kt
index a1c2a40c..a33e38c3 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderUpdateParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderUpdateParams.kt
@@ -9,7 +9,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -151,7 +151,7 @@ constructor(
businessAccountToken,
email,
phoneNumber,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -313,9 +313,9 @@ constructor(
businessAccountToken,
email,
phoneNumber,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderUpdateResponse.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderUpdateResponse.kt
index f941e23f..240b14a5 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderUpdateResponse.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderUpdateResponse.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import java.util.Objects
@JsonDeserialize(builder = AccountHolderUpdateResponse.Builder::class)
@@ -161,7 +161,7 @@ private constructor(
email,
phoneNumber,
token,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderUploadDocumentParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderUploadDocumentParams.kt
index 754a3d88..05423f06 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderUploadDocumentParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountHolderUploadDocumentParams.kt
@@ -12,7 +12,7 @@ import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.util.Objects
@@ -119,7 +119,7 @@ constructor(
AccountHolderUploadDocumentBody(
checkNotNull(documentType) { "`documentType` is required but was not set" },
checkNotNull(entityToken) { "`entityToken` is required but was not set" },
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -263,9 +263,9 @@ constructor(
},
checkNotNull(documentType) { "`documentType` is required but was not set" },
checkNotNull(entityToken) { "`entityToken` is required but was not set" },
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountListPage.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountListPage.kt
index 0db738a2..dfb1063c 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountListPage.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountListPage.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.blocking.AccountService
import java.util.Objects
@@ -159,7 +159,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountListPageAsync.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountListPageAsync.kt
index dbf8da93..3171bf85 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountListPageAsync.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountListPageAsync.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.async.AccountServiceAsync
import java.util.Objects
import kotlinx.coroutines.flow.Flow
@@ -165,7 +165,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountListParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountListParams.kt
index 70b84286..0fe06e25 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountListParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountListParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.time.OffsetDateTime
import java.time.format.DateTimeFormatter
@@ -42,7 +42,7 @@ constructor(
this.pageSize?.let { params.put("page_size", listOf(it.toString())) }
this.startingAfter?.let { params.put("starting_after", listOf(it.toString())) }
params.putAll(additionalQueryParams)
- return params.toUnmodifiable()
+ return params.toImmutable()
}
internal fun getHeaders(): Map> = additionalHeaders
@@ -168,8 +168,8 @@ constructor(
endingBefore,
pageSize,
startingAfter,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountRetrieveParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountRetrieveParams.kt
index 0be6e54c..e8fa78ce 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountRetrieveParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountRetrieveParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -111,8 +111,8 @@ constructor(
fun build(): AccountRetrieveParams =
AccountRetrieveParams(
checkNotNull(accountToken) { "`accountToken` is required but was not set" },
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountRetrieveSpendLimitsParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountRetrieveSpendLimitsParams.kt
index 77f18a94..0f275260 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountRetrieveSpendLimitsParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountRetrieveSpendLimitsParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -112,8 +112,8 @@ constructor(
fun build(): AccountRetrieveSpendLimitsParams =
AccountRetrieveSpendLimitsParams(
checkNotNull(accountToken) { "`accountToken` is required but was not set" },
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountSpendLimits.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountSpendLimits.kt
index 7255b49c..e29e758d 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountSpendLimits.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountSpendLimits.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import java.util.Objects
@JsonDeserialize(builder = AccountSpendLimits.Builder::class)
@@ -117,7 +117,7 @@ private constructor(
availableSpendLimit,
spendLimit,
spendVelocity,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -264,7 +264,7 @@ private constructor(
daily,
lifetime,
monthly,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -396,7 +396,7 @@ private constructor(
daily,
lifetime,
monthly,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -564,7 +564,7 @@ private constructor(
daily,
lifetime,
monthly,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountUpdateParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountUpdateParams.kt
index 062bbe9f..817eb15b 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountUpdateParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AccountUpdateParams.kt
@@ -12,7 +12,7 @@ import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.util.Objects
@@ -204,7 +204,7 @@ constructor(
monthlySpendLimit,
state,
verificationAddress,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -386,9 +386,9 @@ constructor(
monthlySpendLimit,
state,
verificationAddress,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
@@ -547,7 +547,7 @@ constructor(
country,
postalCode,
state,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Address.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Address.kt
index d93b0945..dadd164e 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Address.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Address.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import java.util.Objects
@JsonDeserialize(builder = Address.Builder::class)
@@ -218,7 +218,7 @@ private constructor(
country,
postalCode,
state,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AggregateBalance.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AggregateBalance.kt
index febbbcd6..8c3b0304 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AggregateBalance.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AggregateBalance.kt
@@ -13,7 +13,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.time.OffsetDateTime
import java.util.Objects
@@ -322,7 +322,7 @@ private constructor(
pendingAmount,
totalAmount,
updated,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListPage.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListPage.kt
index 2b03d058..aeb2e6c4 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListPage.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListPage.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.blocking.AggregateBalanceService
import java.util.Objects
@@ -155,7 +155,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListPageAsync.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListPageAsync.kt
index 58851ec8..60f5613b 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListPageAsync.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListPageAsync.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.async.AggregateBalanceServiceAsync
import java.util.Objects
import kotlinx.coroutines.flow.Flow
@@ -157,7 +157,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListParams.kt
index ad665ac8..9368da01 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListParams.kt
@@ -7,7 +7,7 @@ import com.lithic.api.core.Enum
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.util.Objects
@@ -27,7 +27,7 @@ constructor(
params.put("financial_account_type", listOf(it.toString()))
}
params.putAll(additionalQueryParams)
- return params.toUnmodifiable()
+ return params.toImmutable()
}
internal fun getHeaders(): Map> = additionalHeaders
@@ -119,8 +119,8 @@ constructor(
fun build(): AggregateBalanceListParams =
AggregateBalanceListParams(
financialAccountType,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListResponse.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListResponse.kt
index b02c7863..66f701e3 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListResponse.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListResponse.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import java.time.OffsetDateTime
import java.util.Objects
@@ -278,7 +278,7 @@ private constructor(
pendingAmount,
totalAmount,
updated,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ApiStatus.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ApiStatus.kt
index 48064626..b41e5414 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ApiStatus.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ApiStatus.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import java.util.Objects
@JsonDeserialize(builder = ApiStatus.Builder::class)
@@ -76,7 +76,7 @@ private constructor(
this.additionalProperties.putAll(additionalProperties)
}
- fun build(): ApiStatus = ApiStatus(message, additionalProperties.toUnmodifiable())
+ fun build(): ApiStatus = ApiStatus(message, additionalProperties.toImmutable())
}
override fun equals(other: Any?): Boolean {
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRule.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRule.kt
index f58d2d60..4b3e0115 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRule.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRule.kt
@@ -13,7 +13,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.util.Objects
@@ -279,16 +279,16 @@ private constructor(
fun build(): AuthRule =
AuthRule(
- accountTokens.map { it.toUnmodifiable() },
- allowedCountries.map { it.toUnmodifiable() },
- allowedMcc.map { it.toUnmodifiable() },
- blockedCountries.map { it.toUnmodifiable() },
- blockedMcc.map { it.toUnmodifiable() },
- cardTokens.map { it.toUnmodifiable() },
+ accountTokens.map { it.toImmutable() },
+ allowedCountries.map { it.toImmutable() },
+ allowedMcc.map { it.toImmutable() },
+ blockedCountries.map { it.toImmutable() },
+ blockedMcc.map { it.toImmutable() },
+ cardTokens.map { it.toImmutable() },
programLevel,
state,
token,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleApplyParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleApplyParams.kt
index abe396c3..eeca98dd 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleApplyParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleApplyParams.kt
@@ -9,7 +9,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -138,10 +138,10 @@ constructor(
fun build(): AuthRuleApplyBody =
AuthRuleApplyBody(
- accountTokens?.toUnmodifiable(),
- cardTokens?.toUnmodifiable(),
+ accountTokens?.toImmutable(),
+ cardTokens?.toImmutable(),
programLevel,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -307,12 +307,12 @@ constructor(
fun build(): AuthRuleApplyParams =
AuthRuleApplyParams(
checkNotNull(authRuleToken) { "`authRuleToken` is required but was not set" },
- if (accountTokens.size == 0) null else accountTokens.toUnmodifiable(),
- if (cardTokens.size == 0) null else cardTokens.toUnmodifiable(),
+ if (accountTokens.size == 0) null else accountTokens.toImmutable(),
+ if (cardTokens.size == 0) null else cardTokens.toImmutable(),
programLevel,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleCreateParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleCreateParams.kt
index c85ebca4..e0c57555 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleCreateParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleCreateParams.kt
@@ -9,7 +9,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -198,14 +198,14 @@ constructor(
fun build(): AuthRuleCreateBody =
AuthRuleCreateBody(
- accountTokens?.toUnmodifiable(),
- allowedCountries?.toUnmodifiable(),
- allowedMcc?.toUnmodifiable(),
- blockedCountries?.toUnmodifiable(),
- blockedMcc?.toUnmodifiable(),
- cardTokens?.toUnmodifiable(),
+ accountTokens?.toImmutable(),
+ allowedCountries?.toImmutable(),
+ allowedMcc?.toImmutable(),
+ blockedCountries?.toImmutable(),
+ blockedMcc?.toImmutable(),
+ cardTokens?.toImmutable(),
programLevel,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -422,16 +422,16 @@ constructor(
fun build(): AuthRuleCreateParams =
AuthRuleCreateParams(
- if (accountTokens.size == 0) null else accountTokens.toUnmodifiable(),
- if (allowedCountries.size == 0) null else allowedCountries.toUnmodifiable(),
- if (allowedMcc.size == 0) null else allowedMcc.toUnmodifiable(),
- if (blockedCountries.size == 0) null else blockedCountries.toUnmodifiable(),
- if (blockedMcc.size == 0) null else blockedMcc.toUnmodifiable(),
- if (cardTokens.size == 0) null else cardTokens.toUnmodifiable(),
+ if (accountTokens.size == 0) null else accountTokens.toImmutable(),
+ if (allowedCountries.size == 0) null else allowedCountries.toImmutable(),
+ if (allowedMcc.size == 0) null else allowedMcc.toImmutable(),
+ if (blockedCountries.size == 0) null else blockedCountries.toImmutable(),
+ if (blockedMcc.size == 0) null else blockedMcc.toImmutable(),
+ if (cardTokens.size == 0) null else cardTokens.toImmutable(),
programLevel,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleListPage.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleListPage.kt
index 3bbaf4be..4dfeb40f 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleListPage.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleListPage.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.blocking.AuthRuleService
import java.util.Objects
@@ -159,7 +159,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleListPageAsync.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleListPageAsync.kt
index 92b52c80..2888216b 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleListPageAsync.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleListPageAsync.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.async.AuthRuleServiceAsync
import java.util.Objects
import kotlinx.coroutines.flow.Flow
@@ -165,7 +165,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleListParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleListParams.kt
index 8ad51c31..9894f6ed 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleListParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleListParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -28,7 +28,7 @@ constructor(
this.pageSize?.let { params.put("page_size", listOf(it.toString())) }
this.startingAfter?.let { params.put("starting_after", listOf(it.toString())) }
params.putAll(additionalQueryParams)
- return params.toUnmodifiable()
+ return params.toImmutable()
}
internal fun getHeaders(): Map> = additionalHeaders
@@ -136,8 +136,8 @@ constructor(
endingBefore,
pageSize,
startingAfter,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleMigrateV1ToV2Params.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleMigrateV1ToV2Params.kt
index a1744671..7745c8ca 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleMigrateV1ToV2Params.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleMigrateV1ToV2Params.kt
@@ -4,7 +4,7 @@ package com.lithic.api.models
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -135,9 +135,9 @@ constructor(
fun build(): AuthRuleMigrateV1ToV2Params =
AuthRuleMigrateV1ToV2Params(
checkNotNull(authRuleToken) { "`authRuleToken` is required but was not set" },
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleRemoveParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleRemoveParams.kt
index d2008883..fdfb0042 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleRemoveParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleRemoveParams.kt
@@ -9,7 +9,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -128,10 +128,10 @@ constructor(
fun build(): AuthRuleRemoveBody =
AuthRuleRemoveBody(
- accountTokens?.toUnmodifiable(),
- cardTokens?.toUnmodifiable(),
+ accountTokens?.toImmutable(),
+ cardTokens?.toImmutable(),
programLevel,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -292,12 +292,12 @@ constructor(
fun build(): AuthRuleRemoveParams =
AuthRuleRemoveParams(
- if (accountTokens.size == 0) null else accountTokens.toUnmodifiable(),
- if (cardTokens.size == 0) null else cardTokens.toUnmodifiable(),
+ if (accountTokens.size == 0) null else accountTokens.toImmutable(),
+ if (cardTokens.size == 0) null else cardTokens.toImmutable(),
programLevel,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleRemoveResponse.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleRemoveResponse.kt
index ebbe6ee2..6dd2250d 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleRemoveResponse.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleRemoveResponse.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import java.util.Objects
@JsonDeserialize(builder = AuthRuleRemoveResponse.Builder::class)
@@ -110,10 +110,10 @@ private constructor(
fun build(): AuthRuleRemoveResponse =
AuthRuleRemoveResponse(
- accountTokens.map { it.toUnmodifiable() },
- cardTokens.map { it.toUnmodifiable() },
+ accountTokens.map { it.toImmutable() },
+ cardTokens.map { it.toImmutable() },
programLevel,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleRetrieveParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleRetrieveParams.kt
index 9d8b7999..1d920fa2 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleRetrieveParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleRetrieveParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -111,8 +111,8 @@ constructor(
fun build(): AuthRuleRetrieveParams =
AuthRuleRetrieveParams(
checkNotNull(authRuleToken) { "`authRuleToken` is required but was not set" },
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleRetrieveResponse.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleRetrieveResponse.kt
index 892155c0..fb209214 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleRetrieveResponse.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleRetrieveResponse.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import java.util.Objects
@JsonDeserialize(builder = AuthRuleRetrieveResponse.Builder::class)
@@ -78,8 +78,8 @@ private constructor(
fun build(): AuthRuleRetrieveResponse =
AuthRuleRetrieveResponse(
- data.map { it.toUnmodifiable() },
- additionalProperties.toUnmodifiable()
+ data.map { it.toImmutable() },
+ additionalProperties.toImmutable()
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleUpdateParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleUpdateParams.kt
index a040664c..82a7821a 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleUpdateParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleUpdateParams.kt
@@ -9,7 +9,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -169,11 +169,11 @@ constructor(
fun build(): AuthRuleUpdateBody =
AuthRuleUpdateBody(
- allowedCountries?.toUnmodifiable(),
- allowedMcc?.toUnmodifiable(),
- blockedCountries?.toUnmodifiable(),
- blockedMcc?.toUnmodifiable(),
- additionalProperties.toUnmodifiable(),
+ allowedCountries?.toImmutable(),
+ allowedMcc?.toImmutable(),
+ blockedCountries?.toImmutable(),
+ blockedMcc?.toImmutable(),
+ additionalProperties.toImmutable(),
)
}
@@ -374,13 +374,13 @@ constructor(
fun build(): AuthRuleUpdateParams =
AuthRuleUpdateParams(
checkNotNull(authRuleToken) { "`authRuleToken` is required but was not set" },
- if (allowedCountries.size == 0) null else allowedCountries.toUnmodifiable(),
- if (allowedMcc.size == 0) null else allowedMcc.toUnmodifiable(),
- if (blockedCountries.size == 0) null else blockedCountries.toUnmodifiable(),
- if (blockedMcc.size == 0) null else blockedMcc.toUnmodifiable(),
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ if (allowedCountries.size == 0) null else allowedCountries.toImmutable(),
+ if (allowedMcc.size == 0) null else allowedMcc.toImmutable(),
+ if (blockedCountries.size == 0) null else blockedCountries.toImmutable(),
+ if (blockedMcc.size == 0) null else blockedMcc.toImmutable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ApplyParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ApplyParams.kt
index ff88f995..b5420fad 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ApplyParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ApplyParams.kt
@@ -18,7 +18,7 @@ import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
import com.lithic.api.core.getOrThrow
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.util.Objects
@@ -183,6 +183,7 @@ constructor(
override fun ObjectCodec.deserialize(node: JsonNode): AuthRuleV2ApplyBody {
val json = JsonValue.fromJsonNode(node)
+
tryDeserialize(node, jacksonTypeRef())?.let {
return AuthRuleV2ApplyBody(applyAuthRuleRequestAccountTokens = it, _json = json)
}
@@ -338,8 +339,8 @@ constructor(
applyAuthRuleRequestAccountTokens,
applyAuthRuleRequestCardTokens,
applyAuthRuleRequestProgramLevel,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
@@ -400,8 +401,8 @@ constructor(
fun build(): ApplyAuthRuleRequestAccountTokens =
ApplyAuthRuleRequestAccountTokens(
checkNotNull(accountTokens) { "`accountTokens` is required but was not set" }
- .toUnmodifiable(),
- additionalProperties.toUnmodifiable()
+ .toImmutable(),
+ additionalProperties.toImmutable()
)
}
@@ -480,8 +481,8 @@ constructor(
fun build(): ApplyAuthRuleRequestCardTokens =
ApplyAuthRuleRequestCardTokens(
checkNotNull(cardTokens) { "`cardTokens` is required but was not set" }
- .toUnmodifiable(),
- additionalProperties.toUnmodifiable()
+ .toImmutable(),
+ additionalProperties.toImmutable()
)
}
@@ -560,7 +561,7 @@ constructor(
fun build(): ApplyAuthRuleRequestProgramLevel =
ApplyAuthRuleRequestProgramLevel(
checkNotNull(programLevel) { "`programLevel` is required but was not set" },
- additionalProperties.toUnmodifiable()
+ additionalProperties.toImmutable()
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2CreateParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2CreateParams.kt
index ffa5810c..3ef43cfd 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2CreateParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2CreateParams.kt
@@ -22,7 +22,7 @@ import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
import com.lithic.api.core.getOrThrow
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.util.Objects
@@ -183,6 +183,7 @@ constructor(
override fun ObjectCodec.deserialize(node: JsonNode): AuthRuleV2CreateBody {
val json = JsonValue.fromJsonNode(node)
+
tryDeserialize(node, jacksonTypeRef())?.let {
return AuthRuleV2CreateBody(
createAuthRuleRequestAccountTokens = it,
@@ -339,8 +340,8 @@ constructor(
createAuthRuleRequestAccountTokens,
createAuthRuleRequestCardTokens,
createAuthRuleRequestProgramLevel,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
@@ -350,7 +351,7 @@ constructor(
private constructor(
private val accountTokens: List?,
private val type: AuthRuleType?,
- private val parameters: AuthRuleParameters?,
+ private val parameters: Parameters?,
private val additionalProperties: Map,
) {
@@ -361,7 +362,7 @@ constructor(
@JsonProperty("type") fun type(): AuthRuleType? = type
/** Parameters for the current version of the Auth Rule */
- @JsonProperty("parameters") fun parameters(): AuthRuleParameters? = parameters
+ @JsonProperty("parameters") fun parameters(): Parameters? = parameters
@JsonAnyGetter
@ExcludeMissing
@@ -378,7 +379,7 @@ constructor(
private var accountTokens: List? = null
private var type: AuthRuleType? = null
- private var parameters: AuthRuleParameters? = null
+ private var parameters: Parameters? = null
private var additionalProperties: MutableMap = mutableMapOf()
internal fun from(
@@ -401,7 +402,7 @@ constructor(
/** Parameters for the current version of the Auth Rule */
@JsonProperty("parameters")
- fun parameters(parameters: AuthRuleParameters) = apply { this.parameters = parameters }
+ fun parameters(parameters: Parameters) = apply { this.parameters = parameters }
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
@@ -420,16 +421,16 @@ constructor(
fun build(): CreateAuthRuleRequestAccountTokens =
CreateAuthRuleRequestAccountTokens(
checkNotNull(accountTokens) { "`accountTokens` is required but was not set" }
- .toUnmodifiable(),
+ .toImmutable(),
type,
parameters,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
- @JsonDeserialize(using = AuthRuleParameters.Deserializer::class)
- @JsonSerialize(using = AuthRuleParameters.Serializer::class)
- class AuthRuleParameters
+ @JsonDeserialize(using = Parameters.Deserializer::class)
+ @JsonSerialize(using = Parameters.Serializer::class)
+ class Parameters
private constructor(
private val conditionalBlockParameters: ConditionalBlockParameters? = null,
private val velocityLimitParams: VelocityLimitParams? = null,
@@ -465,10 +466,10 @@ constructor(
}
}
- fun validate(): AuthRuleParameters = apply {
+ fun validate(): Parameters = apply {
if (!validated) {
if (conditionalBlockParameters == null && velocityLimitParams == null) {
- throw LithicInvalidDataException("Unknown AuthRuleParameters: $_json")
+ throw LithicInvalidDataException("Unknown Parameters: $_json")
}
conditionalBlockParameters?.validate()
velocityLimitParams?.validate()
@@ -481,7 +482,7 @@ constructor(
return true
}
- return /* spotless:off */ other is AuthRuleParameters && this.conditionalBlockParameters == other.conditionalBlockParameters && this.velocityLimitParams == other.velocityLimitParams /* spotless:on */
+ return /* spotless:off */ other is Parameters && this.conditionalBlockParameters == other.conditionalBlockParameters && this.velocityLimitParams == other.velocityLimitParams /* spotless:on */
}
override fun hashCode(): Int {
@@ -491,11 +492,11 @@ constructor(
override fun toString(): String {
return when {
conditionalBlockParameters != null ->
- "AuthRuleParameters{conditionalBlockParameters=$conditionalBlockParameters}"
+ "Parameters{conditionalBlockParameters=$conditionalBlockParameters}"
velocityLimitParams != null ->
- "AuthRuleParameters{velocityLimitParams=$velocityLimitParams}"
- _json != null -> "AuthRuleParameters{_unknown=$_json}"
- else -> throw IllegalStateException("Invalid AuthRuleParameters")
+ "Parameters{velocityLimitParams=$velocityLimitParams}"
+ _json != null -> "Parameters{_unknown=$_json}"
+ else -> throw IllegalStateException("Invalid Parameters")
}
}
@@ -503,10 +504,10 @@ constructor(
fun ofConditionalBlockParameters(
conditionalBlockParameters: ConditionalBlockParameters
- ) = AuthRuleParameters(conditionalBlockParameters = conditionalBlockParameters)
+ ) = Parameters(conditionalBlockParameters = conditionalBlockParameters)
fun ofVelocityLimitParams(velocityLimitParams: VelocityLimitParams) =
- AuthRuleParameters(velocityLimitParams = velocityLimitParams)
+ Parameters(velocityLimitParams = velocityLimitParams)
}
interface Visitor {
@@ -518,33 +519,34 @@ constructor(
fun visitVelocityLimitParams(velocityLimitParams: VelocityLimitParams): T
fun unknown(json: JsonValue?): T {
- throw LithicInvalidDataException("Unknown AuthRuleParameters: $json")
+ throw LithicInvalidDataException("Unknown Parameters: $json")
}
}
- class Deserializer : BaseDeserializer(AuthRuleParameters::class) {
+ class Deserializer : BaseDeserializer(Parameters::class) {
- override fun ObjectCodec.deserialize(node: JsonNode): AuthRuleParameters {
+ override fun ObjectCodec.deserialize(node: JsonNode): Parameters {
val json = JsonValue.fromJsonNode(node)
+
tryDeserialize(node, jacksonTypeRef()) {
it.validate()
}
?.let {
- return AuthRuleParameters(conditionalBlockParameters = it, _json = json)
+ return Parameters(conditionalBlockParameters = it, _json = json)
}
tryDeserialize(node, jacksonTypeRef()) { it.validate() }
?.let {
- return AuthRuleParameters(velocityLimitParams = it, _json = json)
+ return Parameters(velocityLimitParams = it, _json = json)
}
- return AuthRuleParameters(_json = json)
+ return Parameters(_json = json)
}
}
- class Serializer : BaseSerializer(AuthRuleParameters::class) {
+ class Serializer : BaseSerializer(Parameters::class) {
override fun serialize(
- value: AuthRuleParameters,
+ value: Parameters,
generator: JsonGenerator,
provider: SerializerProvider
) {
@@ -554,7 +556,7 @@ constructor(
value.velocityLimitParams != null ->
generator.writeObject(value.velocityLimitParams)
value._json != null -> generator.writeObject(value._json)
- else -> throw IllegalStateException("Invalid AuthRuleParameters")
+ else -> throw IllegalStateException("Invalid Parameters")
}
}
}
@@ -628,8 +630,8 @@ constructor(
fun build(): ConditionalBlockParameters =
ConditionalBlockParameters(
- conditions.map { it.toUnmodifiable() },
- additionalProperties.toUnmodifiable()
+ conditions.map { it.toImmutable() },
+ additionalProperties.toImmutable()
)
}
@@ -645,20 +647,84 @@ constructor(
private var validated: Boolean = false
- /** The attribute to target */
+ /**
+ * The attribute to target.
+ *
+ * The following attributes may be targeted:
+ * - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify
+ * a business by the types of goods or services it provides.
+ * - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
+ * ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
+ * Netherlands Antilles.
+ * - `CURRENCY`: 3-digit alphabetic ISO 4217 code for the merchant currency of
+ * the transaction.
+ * - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
+ * (merchant).
+ * - `DESCRIPTOR`: Short description of card acceptor.
+ * - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the
+ * issuer applies to the transaction. Valid values are `NONE`,
+ * `3DS_AUTHENTICATED`, or `TOKEN_AUTHENTICATED`.
+ * - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account
+ * number (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`,
+ * `CONTACTLESS`, `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`,
+ * `KEY_ENTERED`, `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`,
+ * `UNSPECIFIED`, `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
+ * - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the
+ * acquirer fee field in the settlement/cardholder billing currency. This is
+ * the amount the issuer should authorize against unless the issuer is paying
+ * the acquirer fee on behalf of the cardholder.
+ * - `RISK_SCORE`: Network-provided score assessing risk level associated with a
+ * given authorization. Scores are on a range of 0-999, with 0 representing
+ * the lowest risk and 999 representing the highest risk. For Visa
+ * transactions, where the raw score has a range of 0-99, Lithic will
+ * normalize the score by multiplying the raw score by 10x.
+ */
fun attribute(): Attribute? = attribute.getNullable("attribute")
/** The operation to apply to the attribute */
fun operation(): Operation? = operation.getNullable("operation")
+ /** A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` */
fun value(): Value? = value.getNullable("value")
- /** The attribute to target */
+ /**
+ * The attribute to target.
+ *
+ * The following attributes may be targeted:
+ * - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify
+ * a business by the types of goods or services it provides.
+ * - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
+ * ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
+ * Netherlands Antilles.
+ * - `CURRENCY`: 3-digit alphabetic ISO 4217 code for the merchant currency of
+ * the transaction.
+ * - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
+ * (merchant).
+ * - `DESCRIPTOR`: Short description of card acceptor.
+ * - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the
+ * issuer applies to the transaction. Valid values are `NONE`,
+ * `3DS_AUTHENTICATED`, or `TOKEN_AUTHENTICATED`.
+ * - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account
+ * number (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`,
+ * `CONTACTLESS`, `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`,
+ * `KEY_ENTERED`, `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`,
+ * `UNSPECIFIED`, `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
+ * - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the
+ * acquirer fee field in the settlement/cardholder billing currency. This is
+ * the amount the issuer should authorize against unless the issuer is paying
+ * the acquirer fee on behalf of the cardholder.
+ * - `RISK_SCORE`: Network-provided score assessing risk level associated with a
+ * given authorization. Scores are on a range of 0-999, with 0 representing
+ * the lowest risk and 999 representing the highest risk. For Visa
+ * transactions, where the raw score has a range of 0-99, Lithic will
+ * normalize the score by multiplying the raw score by 10x.
+ */
@JsonProperty("attribute") @ExcludeMissing fun _attribute() = attribute
/** The operation to apply to the attribute */
@JsonProperty("operation") @ExcludeMissing fun _operation() = operation
+ /** A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` */
@JsonProperty("value") @ExcludeMissing fun _value() = value
@JsonAnyGetter
@@ -696,10 +762,74 @@ constructor(
additionalProperties(condition.additionalProperties)
}
- /** The attribute to target */
+ /**
+ * The attribute to target.
+ *
+ * The following attributes may be targeted:
+ * - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to
+ * classify a business by the types of goods or services it provides.
+ * - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1)
+ * all ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT
+ * for Netherlands Antilles.
+ * - `CURRENCY`: 3-digit alphabetic ISO 4217 code for the merchant currency
+ * of the transaction.
+ * - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card
+ * acceptor (merchant).
+ * - `DESCRIPTOR`: Short description of card acceptor.
+ * - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the
+ * issuer applies to the transaction. Valid values are `NONE`,
+ * `3DS_AUTHENTICATED`, or `TOKEN_AUTHENTICATED`.
+ * - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account
+ * number (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`,
+ * `CONTACTLESS`, `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`,
+ * `ICC`, `KEY_ENTERED`, `MAGNETIC_STRIPE`, `MANUAL`, `OCR`,
+ * `SECURE_CARDLESS`, `UNSPECIFIED`, `UNKNOWN`, `CREDENTIAL_ON_FILE`, or
+ * `ECOMMERCE`.
+ * - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the
+ * acquirer fee field in the settlement/cardholder billing currency. This
+ * is the amount the issuer should authorize against unless the issuer is
+ * paying the acquirer fee on behalf of the cardholder.
+ * - `RISK_SCORE`: Network-provided score assessing risk level associated
+ * with a given authorization. Scores are on a range of 0-999, with 0
+ * representing the lowest risk and 999 representing the highest risk. For
+ * Visa transactions, where the raw score has a range of 0-99, Lithic will
+ * normalize the score by multiplying the raw score by 10x.
+ */
fun attribute(attribute: Attribute) = attribute(JsonField.of(attribute))
- /** The attribute to target */
+ /**
+ * The attribute to target.
+ *
+ * The following attributes may be targeted:
+ * - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to
+ * classify a business by the types of goods or services it provides.
+ * - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1)
+ * all ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT
+ * for Netherlands Antilles.
+ * - `CURRENCY`: 3-digit alphabetic ISO 4217 code for the merchant currency
+ * of the transaction.
+ * - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card
+ * acceptor (merchant).
+ * - `DESCRIPTOR`: Short description of card acceptor.
+ * - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the
+ * issuer applies to the transaction. Valid values are `NONE`,
+ * `3DS_AUTHENTICATED`, or `TOKEN_AUTHENTICATED`.
+ * - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account
+ * number (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`,
+ * `CONTACTLESS`, `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`,
+ * `ICC`, `KEY_ENTERED`, `MAGNETIC_STRIPE`, `MANUAL`, `OCR`,
+ * `SECURE_CARDLESS`, `UNSPECIFIED`, `UNKNOWN`, `CREDENTIAL_ON_FILE`, or
+ * `ECOMMERCE`.
+ * - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the
+ * acquirer fee field in the settlement/cardholder billing currency. This
+ * is the amount the issuer should authorize against unless the issuer is
+ * paying the acquirer fee on behalf of the cardholder.
+ * - `RISK_SCORE`: Network-provided score assessing risk level associated
+ * with a given authorization. Scores are on a range of 0-999, with 0
+ * representing the lowest risk and 999 representing the highest risk. For
+ * Visa transactions, where the raw score has a range of 0-99, Lithic will
+ * normalize the score by multiplying the raw score by 10x.
+ */
@JsonProperty("attribute")
@ExcludeMissing
fun attribute(attribute: JsonField) = apply {
@@ -716,8 +846,10 @@ constructor(
this.operation = operation
}
+ /** A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` */
fun value(value: Value) = value(JsonField.of(value))
+ /** A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` */
@JsonProperty("value")
@ExcludeMissing
fun value(value: JsonField) = apply { this.value = value }
@@ -742,7 +874,7 @@ constructor(
attribute,
operation,
value,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -1029,6 +1161,7 @@ constructor(
override fun ObjectCodec.deserialize(node: JsonNode): Value {
val json = JsonValue.fromJsonNode(node)
+
tryDeserialize(node, jacksonTypeRef())?.let {
return Value(string = it, _json = json)
}
@@ -1188,7 +1321,7 @@ constructor(
private constructor(
private val cardTokens: List?,
private val type: AuthRuleType?,
- private val parameters: AuthRuleParameters?,
+ private val parameters: Parameters?,
private val additionalProperties: Map,
) {
@@ -1199,7 +1332,7 @@ constructor(
@JsonProperty("type") fun type(): AuthRuleType? = type
/** Parameters for the current version of the Auth Rule */
- @JsonProperty("parameters") fun parameters(): AuthRuleParameters? = parameters
+ @JsonProperty("parameters") fun parameters(): Parameters? = parameters
@JsonAnyGetter
@ExcludeMissing
@@ -1216,7 +1349,7 @@ constructor(
private var cardTokens: List? = null
private var type: AuthRuleType? = null
- private var parameters: AuthRuleParameters? = null
+ private var parameters: Parameters? = null
private var additionalProperties: MutableMap = mutableMapOf()
internal fun from(createAuthRuleRequestCardTokens: CreateAuthRuleRequestCardTokens) =
@@ -1236,7 +1369,7 @@ constructor(
/** Parameters for the current version of the Auth Rule */
@JsonProperty("parameters")
- fun parameters(parameters: AuthRuleParameters) = apply { this.parameters = parameters }
+ fun parameters(parameters: Parameters) = apply { this.parameters = parameters }
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
@@ -1255,16 +1388,16 @@ constructor(
fun build(): CreateAuthRuleRequestCardTokens =
CreateAuthRuleRequestCardTokens(
checkNotNull(cardTokens) { "`cardTokens` is required but was not set" }
- .toUnmodifiable(),
+ .toImmutable(),
type,
parameters,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
- @JsonDeserialize(using = AuthRuleParameters.Deserializer::class)
- @JsonSerialize(using = AuthRuleParameters.Serializer::class)
- class AuthRuleParameters
+ @JsonDeserialize(using = Parameters.Deserializer::class)
+ @JsonSerialize(using = Parameters.Serializer::class)
+ class Parameters
private constructor(
private val conditionalBlockParameters: ConditionalBlockParameters? = null,
private val velocityLimitParams: VelocityLimitParams? = null,
@@ -1300,10 +1433,10 @@ constructor(
}
}
- fun validate(): AuthRuleParameters = apply {
+ fun validate(): Parameters = apply {
if (!validated) {
if (conditionalBlockParameters == null && velocityLimitParams == null) {
- throw LithicInvalidDataException("Unknown AuthRuleParameters: $_json")
+ throw LithicInvalidDataException("Unknown Parameters: $_json")
}
conditionalBlockParameters?.validate()
velocityLimitParams?.validate()
@@ -1316,7 +1449,7 @@ constructor(
return true
}
- return /* spotless:off */ other is AuthRuleParameters && this.conditionalBlockParameters == other.conditionalBlockParameters && this.velocityLimitParams == other.velocityLimitParams /* spotless:on */
+ return /* spotless:off */ other is Parameters && this.conditionalBlockParameters == other.conditionalBlockParameters && this.velocityLimitParams == other.velocityLimitParams /* spotless:on */
}
override fun hashCode(): Int {
@@ -1326,11 +1459,11 @@ constructor(
override fun toString(): String {
return when {
conditionalBlockParameters != null ->
- "AuthRuleParameters{conditionalBlockParameters=$conditionalBlockParameters}"
+ "Parameters{conditionalBlockParameters=$conditionalBlockParameters}"
velocityLimitParams != null ->
- "AuthRuleParameters{velocityLimitParams=$velocityLimitParams}"
- _json != null -> "AuthRuleParameters{_unknown=$_json}"
- else -> throw IllegalStateException("Invalid AuthRuleParameters")
+ "Parameters{velocityLimitParams=$velocityLimitParams}"
+ _json != null -> "Parameters{_unknown=$_json}"
+ else -> throw IllegalStateException("Invalid Parameters")
}
}
@@ -1338,10 +1471,10 @@ constructor(
fun ofConditionalBlockParameters(
conditionalBlockParameters: ConditionalBlockParameters
- ) = AuthRuleParameters(conditionalBlockParameters = conditionalBlockParameters)
+ ) = Parameters(conditionalBlockParameters = conditionalBlockParameters)
fun ofVelocityLimitParams(velocityLimitParams: VelocityLimitParams) =
- AuthRuleParameters(velocityLimitParams = velocityLimitParams)
+ Parameters(velocityLimitParams = velocityLimitParams)
}
interface Visitor {
@@ -1353,33 +1486,34 @@ constructor(
fun visitVelocityLimitParams(velocityLimitParams: VelocityLimitParams): T
fun unknown(json: JsonValue?): T {
- throw LithicInvalidDataException("Unknown AuthRuleParameters: $json")
+ throw LithicInvalidDataException("Unknown Parameters: $json")
}
}
- class Deserializer : BaseDeserializer(AuthRuleParameters::class) {
+ class Deserializer : BaseDeserializer(Parameters::class) {
- override fun ObjectCodec.deserialize(node: JsonNode): AuthRuleParameters {
+ override fun ObjectCodec.deserialize(node: JsonNode): Parameters {
val json = JsonValue.fromJsonNode(node)
+
tryDeserialize(node, jacksonTypeRef()) {
it.validate()
}
?.let {
- return AuthRuleParameters(conditionalBlockParameters = it, _json = json)
+ return Parameters(conditionalBlockParameters = it, _json = json)
}
tryDeserialize(node, jacksonTypeRef()) { it.validate() }
?.let {
- return AuthRuleParameters(velocityLimitParams = it, _json = json)
+ return Parameters(velocityLimitParams = it, _json = json)
}
- return AuthRuleParameters(_json = json)
+ return Parameters(_json = json)
}
}
- class Serializer : BaseSerializer(AuthRuleParameters::class) {
+ class Serializer : BaseSerializer(Parameters::class) {
override fun serialize(
- value: AuthRuleParameters,
+ value: Parameters,
generator: JsonGenerator,
provider: SerializerProvider
) {
@@ -1389,7 +1523,7 @@ constructor(
value.velocityLimitParams != null ->
generator.writeObject(value.velocityLimitParams)
value._json != null -> generator.writeObject(value._json)
- else -> throw IllegalStateException("Invalid AuthRuleParameters")
+ else -> throw IllegalStateException("Invalid Parameters")
}
}
}
@@ -1463,8 +1597,8 @@ constructor(
fun build(): ConditionalBlockParameters =
ConditionalBlockParameters(
- conditions.map { it.toUnmodifiable() },
- additionalProperties.toUnmodifiable()
+ conditions.map { it.toImmutable() },
+ additionalProperties.toImmutable()
)
}
@@ -1480,20 +1614,84 @@ constructor(
private var validated: Boolean = false
- /** The attribute to target */
+ /**
+ * The attribute to target.
+ *
+ * The following attributes may be targeted:
+ * - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify
+ * a business by the types of goods or services it provides.
+ * - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
+ * ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
+ * Netherlands Antilles.
+ * - `CURRENCY`: 3-digit alphabetic ISO 4217 code for the merchant currency of
+ * the transaction.
+ * - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
+ * (merchant).
+ * - `DESCRIPTOR`: Short description of card acceptor.
+ * - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the
+ * issuer applies to the transaction. Valid values are `NONE`,
+ * `3DS_AUTHENTICATED`, or `TOKEN_AUTHENTICATED`.
+ * - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account
+ * number (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`,
+ * `CONTACTLESS`, `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`,
+ * `KEY_ENTERED`, `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`,
+ * `UNSPECIFIED`, `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
+ * - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the
+ * acquirer fee field in the settlement/cardholder billing currency. This is
+ * the amount the issuer should authorize against unless the issuer is paying
+ * the acquirer fee on behalf of the cardholder.
+ * - `RISK_SCORE`: Network-provided score assessing risk level associated with a
+ * given authorization. Scores are on a range of 0-999, with 0 representing
+ * the lowest risk and 999 representing the highest risk. For Visa
+ * transactions, where the raw score has a range of 0-99, Lithic will
+ * normalize the score by multiplying the raw score by 10x.
+ */
fun attribute(): Attribute? = attribute.getNullable("attribute")
/** The operation to apply to the attribute */
fun operation(): Operation? = operation.getNullable("operation")
+ /** A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` */
fun value(): Value? = value.getNullable("value")
- /** The attribute to target */
+ /**
+ * The attribute to target.
+ *
+ * The following attributes may be targeted:
+ * - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify
+ * a business by the types of goods or services it provides.
+ * - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
+ * ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
+ * Netherlands Antilles.
+ * - `CURRENCY`: 3-digit alphabetic ISO 4217 code for the merchant currency of
+ * the transaction.
+ * - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
+ * (merchant).
+ * - `DESCRIPTOR`: Short description of card acceptor.
+ * - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the
+ * issuer applies to the transaction. Valid values are `NONE`,
+ * `3DS_AUTHENTICATED`, or `TOKEN_AUTHENTICATED`.
+ * - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account
+ * number (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`,
+ * `CONTACTLESS`, `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`,
+ * `KEY_ENTERED`, `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`,
+ * `UNSPECIFIED`, `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
+ * - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the
+ * acquirer fee field in the settlement/cardholder billing currency. This is
+ * the amount the issuer should authorize against unless the issuer is paying
+ * the acquirer fee on behalf of the cardholder.
+ * - `RISK_SCORE`: Network-provided score assessing risk level associated with a
+ * given authorization. Scores are on a range of 0-999, with 0 representing
+ * the lowest risk and 999 representing the highest risk. For Visa
+ * transactions, where the raw score has a range of 0-99, Lithic will
+ * normalize the score by multiplying the raw score by 10x.
+ */
@JsonProperty("attribute") @ExcludeMissing fun _attribute() = attribute
/** The operation to apply to the attribute */
@JsonProperty("operation") @ExcludeMissing fun _operation() = operation
+ /** A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` */
@JsonProperty("value") @ExcludeMissing fun _value() = value
@JsonAnyGetter
@@ -1531,10 +1729,74 @@ constructor(
additionalProperties(condition.additionalProperties)
}
- /** The attribute to target */
+ /**
+ * The attribute to target.
+ *
+ * The following attributes may be targeted:
+ * - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to
+ * classify a business by the types of goods or services it provides.
+ * - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1)
+ * all ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT
+ * for Netherlands Antilles.
+ * - `CURRENCY`: 3-digit alphabetic ISO 4217 code for the merchant currency
+ * of the transaction.
+ * - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card
+ * acceptor (merchant).
+ * - `DESCRIPTOR`: Short description of card acceptor.
+ * - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the
+ * issuer applies to the transaction. Valid values are `NONE`,
+ * `3DS_AUTHENTICATED`, or `TOKEN_AUTHENTICATED`.
+ * - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account
+ * number (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`,
+ * `CONTACTLESS`, `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`,
+ * `ICC`, `KEY_ENTERED`, `MAGNETIC_STRIPE`, `MANUAL`, `OCR`,
+ * `SECURE_CARDLESS`, `UNSPECIFIED`, `UNKNOWN`, `CREDENTIAL_ON_FILE`, or
+ * `ECOMMERCE`.
+ * - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the
+ * acquirer fee field in the settlement/cardholder billing currency. This
+ * is the amount the issuer should authorize against unless the issuer is
+ * paying the acquirer fee on behalf of the cardholder.
+ * - `RISK_SCORE`: Network-provided score assessing risk level associated
+ * with a given authorization. Scores are on a range of 0-999, with 0
+ * representing the lowest risk and 999 representing the highest risk. For
+ * Visa transactions, where the raw score has a range of 0-99, Lithic will
+ * normalize the score by multiplying the raw score by 10x.
+ */
fun attribute(attribute: Attribute) = attribute(JsonField.of(attribute))
- /** The attribute to target */
+ /**
+ * The attribute to target.
+ *
+ * The following attributes may be targeted:
+ * - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to
+ * classify a business by the types of goods or services it provides.
+ * - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1)
+ * all ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT
+ * for Netherlands Antilles.
+ * - `CURRENCY`: 3-digit alphabetic ISO 4217 code for the merchant currency
+ * of the transaction.
+ * - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card
+ * acceptor (merchant).
+ * - `DESCRIPTOR`: Short description of card acceptor.
+ * - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the
+ * issuer applies to the transaction. Valid values are `NONE`,
+ * `3DS_AUTHENTICATED`, or `TOKEN_AUTHENTICATED`.
+ * - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account
+ * number (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`,
+ * `CONTACTLESS`, `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`,
+ * `ICC`, `KEY_ENTERED`, `MAGNETIC_STRIPE`, `MANUAL`, `OCR`,
+ * `SECURE_CARDLESS`, `UNSPECIFIED`, `UNKNOWN`, `CREDENTIAL_ON_FILE`, or
+ * `ECOMMERCE`.
+ * - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the
+ * acquirer fee field in the settlement/cardholder billing currency. This
+ * is the amount the issuer should authorize against unless the issuer is
+ * paying the acquirer fee on behalf of the cardholder.
+ * - `RISK_SCORE`: Network-provided score assessing risk level associated
+ * with a given authorization. Scores are on a range of 0-999, with 0
+ * representing the lowest risk and 999 representing the highest risk. For
+ * Visa transactions, where the raw score has a range of 0-99, Lithic will
+ * normalize the score by multiplying the raw score by 10x.
+ */
@JsonProperty("attribute")
@ExcludeMissing
fun attribute(attribute: JsonField) = apply {
@@ -1551,8 +1813,10 @@ constructor(
this.operation = operation
}
+ /** A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` */
fun value(value: Value) = value(JsonField.of(value))
+ /** A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` */
@JsonProperty("value")
@ExcludeMissing
fun value(value: JsonField) = apply { this.value = value }
@@ -1577,7 +1841,7 @@ constructor(
attribute,
operation,
value,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -1864,6 +2128,7 @@ constructor(
override fun ObjectCodec.deserialize(node: JsonNode): Value {
val json = JsonValue.fromJsonNode(node)
+
tryDeserialize(node, jacksonTypeRef())?.let {
return Value(string = it, _json = json)
}
@@ -2023,7 +2288,7 @@ constructor(
private constructor(
private val programLevel: Boolean?,
private val type: AuthRuleType?,
- private val parameters: AuthRuleParameters?,
+ private val parameters: Parameters?,
private val additionalProperties: Map,
) {
@@ -2034,7 +2299,7 @@ constructor(
@JsonProperty("type") fun type(): AuthRuleType? = type
/** Parameters for the current version of the Auth Rule */
- @JsonProperty("parameters") fun parameters(): AuthRuleParameters? = parameters
+ @JsonProperty("parameters") fun parameters(): Parameters? = parameters
@JsonAnyGetter
@ExcludeMissing
@@ -2051,7 +2316,7 @@ constructor(
private var programLevel: Boolean? = null
private var type: AuthRuleType? = null
- private var parameters: AuthRuleParameters? = null
+ private var parameters: Parameters? = null
private var additionalProperties: MutableMap = mutableMapOf()
internal fun from(
@@ -2072,7 +2337,7 @@ constructor(
/** Parameters for the current version of the Auth Rule */
@JsonProperty("parameters")
- fun parameters(parameters: AuthRuleParameters) = apply { this.parameters = parameters }
+ fun parameters(parameters: Parameters) = apply { this.parameters = parameters }
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
@@ -2093,13 +2358,13 @@ constructor(
checkNotNull(programLevel) { "`programLevel` is required but was not set" },
type,
parameters,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
- @JsonDeserialize(using = AuthRuleParameters.Deserializer::class)
- @JsonSerialize(using = AuthRuleParameters.Serializer::class)
- class AuthRuleParameters
+ @JsonDeserialize(using = Parameters.Deserializer::class)
+ @JsonSerialize(using = Parameters.Serializer::class)
+ class Parameters
private constructor(
private val conditionalBlockParameters: ConditionalBlockParameters? = null,
private val velocityLimitParams: VelocityLimitParams? = null,
@@ -2135,10 +2400,10 @@ constructor(
}
}
- fun validate(): AuthRuleParameters = apply {
+ fun validate(): Parameters = apply {
if (!validated) {
if (conditionalBlockParameters == null && velocityLimitParams == null) {
- throw LithicInvalidDataException("Unknown AuthRuleParameters: $_json")
+ throw LithicInvalidDataException("Unknown Parameters: $_json")
}
conditionalBlockParameters?.validate()
velocityLimitParams?.validate()
@@ -2151,7 +2416,7 @@ constructor(
return true
}
- return /* spotless:off */ other is AuthRuleParameters && this.conditionalBlockParameters == other.conditionalBlockParameters && this.velocityLimitParams == other.velocityLimitParams /* spotless:on */
+ return /* spotless:off */ other is Parameters && this.conditionalBlockParameters == other.conditionalBlockParameters && this.velocityLimitParams == other.velocityLimitParams /* spotless:on */
}
override fun hashCode(): Int {
@@ -2161,11 +2426,11 @@ constructor(
override fun toString(): String {
return when {
conditionalBlockParameters != null ->
- "AuthRuleParameters{conditionalBlockParameters=$conditionalBlockParameters}"
+ "Parameters{conditionalBlockParameters=$conditionalBlockParameters}"
velocityLimitParams != null ->
- "AuthRuleParameters{velocityLimitParams=$velocityLimitParams}"
- _json != null -> "AuthRuleParameters{_unknown=$_json}"
- else -> throw IllegalStateException("Invalid AuthRuleParameters")
+ "Parameters{velocityLimitParams=$velocityLimitParams}"
+ _json != null -> "Parameters{_unknown=$_json}"
+ else -> throw IllegalStateException("Invalid Parameters")
}
}
@@ -2173,10 +2438,10 @@ constructor(
fun ofConditionalBlockParameters(
conditionalBlockParameters: ConditionalBlockParameters
- ) = AuthRuleParameters(conditionalBlockParameters = conditionalBlockParameters)
+ ) = Parameters(conditionalBlockParameters = conditionalBlockParameters)
fun ofVelocityLimitParams(velocityLimitParams: VelocityLimitParams) =
- AuthRuleParameters(velocityLimitParams = velocityLimitParams)
+ Parameters(velocityLimitParams = velocityLimitParams)
}
interface Visitor {
@@ -2188,33 +2453,34 @@ constructor(
fun visitVelocityLimitParams(velocityLimitParams: VelocityLimitParams): T
fun unknown(json: JsonValue?): T {
- throw LithicInvalidDataException("Unknown AuthRuleParameters: $json")
+ throw LithicInvalidDataException("Unknown Parameters: $json")
}
}
- class Deserializer : BaseDeserializer(AuthRuleParameters::class) {
+ class Deserializer : BaseDeserializer(Parameters::class) {
- override fun ObjectCodec.deserialize(node: JsonNode): AuthRuleParameters {
+ override fun ObjectCodec.deserialize(node: JsonNode): Parameters {
val json = JsonValue.fromJsonNode(node)
+
tryDeserialize(node, jacksonTypeRef()) {
it.validate()
}
?.let {
- return AuthRuleParameters(conditionalBlockParameters = it, _json = json)
+ return Parameters(conditionalBlockParameters = it, _json = json)
}
tryDeserialize(node, jacksonTypeRef()) { it.validate() }
?.let {
- return AuthRuleParameters(velocityLimitParams = it, _json = json)
+ return Parameters(velocityLimitParams = it, _json = json)
}
- return AuthRuleParameters(_json = json)
+ return Parameters(_json = json)
}
}
- class Serializer : BaseSerializer(AuthRuleParameters::class) {
+ class Serializer : BaseSerializer(Parameters::class) {
override fun serialize(
- value: AuthRuleParameters,
+ value: Parameters,
generator: JsonGenerator,
provider: SerializerProvider
) {
@@ -2224,7 +2490,7 @@ constructor(
value.velocityLimitParams != null ->
generator.writeObject(value.velocityLimitParams)
value._json != null -> generator.writeObject(value._json)
- else -> throw IllegalStateException("Invalid AuthRuleParameters")
+ else -> throw IllegalStateException("Invalid Parameters")
}
}
}
@@ -2298,8 +2564,8 @@ constructor(
fun build(): ConditionalBlockParameters =
ConditionalBlockParameters(
- conditions.map { it.toUnmodifiable() },
- additionalProperties.toUnmodifiable()
+ conditions.map { it.toImmutable() },
+ additionalProperties.toImmutable()
)
}
@@ -2315,20 +2581,84 @@ constructor(
private var validated: Boolean = false
- /** The attribute to target */
+ /**
+ * The attribute to target.
+ *
+ * The following attributes may be targeted:
+ * - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify
+ * a business by the types of goods or services it provides.
+ * - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
+ * ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
+ * Netherlands Antilles.
+ * - `CURRENCY`: 3-digit alphabetic ISO 4217 code for the merchant currency of
+ * the transaction.
+ * - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
+ * (merchant).
+ * - `DESCRIPTOR`: Short description of card acceptor.
+ * - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the
+ * issuer applies to the transaction. Valid values are `NONE`,
+ * `3DS_AUTHENTICATED`, or `TOKEN_AUTHENTICATED`.
+ * - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account
+ * number (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`,
+ * `CONTACTLESS`, `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`,
+ * `KEY_ENTERED`, `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`,
+ * `UNSPECIFIED`, `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
+ * - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the
+ * acquirer fee field in the settlement/cardholder billing currency. This is
+ * the amount the issuer should authorize against unless the issuer is paying
+ * the acquirer fee on behalf of the cardholder.
+ * - `RISK_SCORE`: Network-provided score assessing risk level associated with a
+ * given authorization. Scores are on a range of 0-999, with 0 representing
+ * the lowest risk and 999 representing the highest risk. For Visa
+ * transactions, where the raw score has a range of 0-99, Lithic will
+ * normalize the score by multiplying the raw score by 10x.
+ */
fun attribute(): Attribute? = attribute.getNullable("attribute")
/** The operation to apply to the attribute */
fun operation(): Operation? = operation.getNullable("operation")
+ /** A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` */
fun value(): Value? = value.getNullable("value")
- /** The attribute to target */
+ /**
+ * The attribute to target.
+ *
+ * The following attributes may be targeted:
+ * - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify
+ * a business by the types of goods or services it provides.
+ * - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
+ * ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
+ * Netherlands Antilles.
+ * - `CURRENCY`: 3-digit alphabetic ISO 4217 code for the merchant currency of
+ * the transaction.
+ * - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
+ * (merchant).
+ * - `DESCRIPTOR`: Short description of card acceptor.
+ * - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the
+ * issuer applies to the transaction. Valid values are `NONE`,
+ * `3DS_AUTHENTICATED`, or `TOKEN_AUTHENTICATED`.
+ * - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account
+ * number (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`,
+ * `CONTACTLESS`, `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`,
+ * `KEY_ENTERED`, `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`,
+ * `UNSPECIFIED`, `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
+ * - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the
+ * acquirer fee field in the settlement/cardholder billing currency. This is
+ * the amount the issuer should authorize against unless the issuer is paying
+ * the acquirer fee on behalf of the cardholder.
+ * - `RISK_SCORE`: Network-provided score assessing risk level associated with a
+ * given authorization. Scores are on a range of 0-999, with 0 representing
+ * the lowest risk and 999 representing the highest risk. For Visa
+ * transactions, where the raw score has a range of 0-99, Lithic will
+ * normalize the score by multiplying the raw score by 10x.
+ */
@JsonProperty("attribute") @ExcludeMissing fun _attribute() = attribute
/** The operation to apply to the attribute */
@JsonProperty("operation") @ExcludeMissing fun _operation() = operation
+ /** A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` */
@JsonProperty("value") @ExcludeMissing fun _value() = value
@JsonAnyGetter
@@ -2366,10 +2696,74 @@ constructor(
additionalProperties(condition.additionalProperties)
}
- /** The attribute to target */
+ /**
+ * The attribute to target.
+ *
+ * The following attributes may be targeted:
+ * - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to
+ * classify a business by the types of goods or services it provides.
+ * - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1)
+ * all ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT
+ * for Netherlands Antilles.
+ * - `CURRENCY`: 3-digit alphabetic ISO 4217 code for the merchant currency
+ * of the transaction.
+ * - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card
+ * acceptor (merchant).
+ * - `DESCRIPTOR`: Short description of card acceptor.
+ * - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the
+ * issuer applies to the transaction. Valid values are `NONE`,
+ * `3DS_AUTHENTICATED`, or `TOKEN_AUTHENTICATED`.
+ * - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account
+ * number (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`,
+ * `CONTACTLESS`, `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`,
+ * `ICC`, `KEY_ENTERED`, `MAGNETIC_STRIPE`, `MANUAL`, `OCR`,
+ * `SECURE_CARDLESS`, `UNSPECIFIED`, `UNKNOWN`, `CREDENTIAL_ON_FILE`, or
+ * `ECOMMERCE`.
+ * - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the
+ * acquirer fee field in the settlement/cardholder billing currency. This
+ * is the amount the issuer should authorize against unless the issuer is
+ * paying the acquirer fee on behalf of the cardholder.
+ * - `RISK_SCORE`: Network-provided score assessing risk level associated
+ * with a given authorization. Scores are on a range of 0-999, with 0
+ * representing the lowest risk and 999 representing the highest risk. For
+ * Visa transactions, where the raw score has a range of 0-99, Lithic will
+ * normalize the score by multiplying the raw score by 10x.
+ */
fun attribute(attribute: Attribute) = attribute(JsonField.of(attribute))
- /** The attribute to target */
+ /**
+ * The attribute to target.
+ *
+ * The following attributes may be targeted:
+ * - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to
+ * classify a business by the types of goods or services it provides.
+ * - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1)
+ * all ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT
+ * for Netherlands Antilles.
+ * - `CURRENCY`: 3-digit alphabetic ISO 4217 code for the merchant currency
+ * of the transaction.
+ * - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card
+ * acceptor (merchant).
+ * - `DESCRIPTOR`: Short description of card acceptor.
+ * - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the
+ * issuer applies to the transaction. Valid values are `NONE`,
+ * `3DS_AUTHENTICATED`, or `TOKEN_AUTHENTICATED`.
+ * - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account
+ * number (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`,
+ * `CONTACTLESS`, `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`,
+ * `ICC`, `KEY_ENTERED`, `MAGNETIC_STRIPE`, `MANUAL`, `OCR`,
+ * `SECURE_CARDLESS`, `UNSPECIFIED`, `UNKNOWN`, `CREDENTIAL_ON_FILE`, or
+ * `ECOMMERCE`.
+ * - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the
+ * acquirer fee field in the settlement/cardholder billing currency. This
+ * is the amount the issuer should authorize against unless the issuer is
+ * paying the acquirer fee on behalf of the cardholder.
+ * - `RISK_SCORE`: Network-provided score assessing risk level associated
+ * with a given authorization. Scores are on a range of 0-999, with 0
+ * representing the lowest risk and 999 representing the highest risk. For
+ * Visa transactions, where the raw score has a range of 0-99, Lithic will
+ * normalize the score by multiplying the raw score by 10x.
+ */
@JsonProperty("attribute")
@ExcludeMissing
fun attribute(attribute: JsonField) = apply {
@@ -2386,8 +2780,10 @@ constructor(
this.operation = operation
}
+ /** A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` */
fun value(value: Value) = value(JsonField.of(value))
+ /** A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` */
@JsonProperty("value")
@ExcludeMissing
fun value(value: JsonField) = apply { this.value = value }
@@ -2412,7 +2808,7 @@ constructor(
attribute,
operation,
value,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -2699,6 +3095,7 @@ constructor(
override fun ObjectCodec.deserialize(node: JsonNode): Value {
val json = JsonValue.fromJsonNode(node)
+
tryDeserialize(node, jacksonTypeRef())?.let {
return Value(string = it, _json = json)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2DraftParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2DraftParams.kt
index c455ac64..3bcf8339 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2DraftParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2DraftParams.kt
@@ -22,7 +22,7 @@ import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
import com.lithic.api.core.getOrThrow
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.util.Objects
@@ -30,7 +30,7 @@ import java.util.Objects
class AuthRuleV2DraftParams
constructor(
private val authRuleToken: String,
- private val parameters: AuthRuleParameters?,
+ private val parameters: Parameters?,
private val additionalQueryParams: Map>,
private val additionalHeaders: Map>,
private val additionalBodyProperties: Map,
@@ -38,7 +38,7 @@ constructor(
fun authRuleToken(): String = authRuleToken
- fun parameters(): AuthRuleParameters? = parameters
+ fun parameters(): Parameters? = parameters
internal fun getBody(): AuthRuleV2DraftBody {
return AuthRuleV2DraftBody(parameters, additionalBodyProperties)
@@ -59,12 +59,12 @@ constructor(
@NoAutoDetect
class AuthRuleV2DraftBody
internal constructor(
- private val parameters: AuthRuleParameters?,
+ private val parameters: Parameters?,
private val additionalProperties: Map,
) {
/** Parameters for the current version of the Auth Rule */
- @JsonProperty("parameters") fun parameters(): AuthRuleParameters? = parameters
+ @JsonProperty("parameters") fun parameters(): Parameters? = parameters
@JsonAnyGetter
@ExcludeMissing
@@ -79,7 +79,7 @@ constructor(
class Builder {
- private var parameters: AuthRuleParameters? = null
+ private var parameters: Parameters? = null
private var additionalProperties: MutableMap = mutableMapOf()
internal fun from(authRuleV2DraftBody: AuthRuleV2DraftBody) = apply {
@@ -89,7 +89,7 @@ constructor(
/** Parameters for the current version of the Auth Rule */
@JsonProperty("parameters")
- fun parameters(parameters: AuthRuleParameters) = apply { this.parameters = parameters }
+ fun parameters(parameters: Parameters) = apply { this.parameters = parameters }
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
@@ -106,7 +106,7 @@ constructor(
}
fun build(): AuthRuleV2DraftBody =
- AuthRuleV2DraftBody(parameters, additionalProperties.toUnmodifiable())
+ AuthRuleV2DraftBody(parameters, additionalProperties.toImmutable())
}
override fun equals(other: Any?): Boolean {
@@ -162,7 +162,7 @@ constructor(
class Builder {
private var authRuleToken: String? = null
- private var parameters: AuthRuleParameters? = null
+ private var parameters: Parameters? = null
private var additionalQueryParams: MutableMap> = mutableMapOf()
private var additionalHeaders: MutableMap> = mutableMapOf()
private var additionalBodyProperties: MutableMap = mutableMapOf()
@@ -178,18 +178,16 @@ constructor(
fun authRuleToken(authRuleToken: String) = apply { this.authRuleToken = authRuleToken }
/** Parameters for the current version of the Auth Rule */
- fun parameters(parameters: AuthRuleParameters) = apply { this.parameters = parameters }
+ fun parameters(parameters: Parameters) = apply { this.parameters = parameters }
/** Parameters for the current version of the Auth Rule */
- fun parameters(conditionalBlockParameters: AuthRuleParameters.ConditionalBlockParameters) =
- apply {
- this.parameters =
- AuthRuleParameters.ofConditionalBlockParameters(conditionalBlockParameters)
- }
+ fun parameters(conditionalBlockParameters: Parameters.ConditionalBlockParameters) = apply {
+ this.parameters = Parameters.ofConditionalBlockParameters(conditionalBlockParameters)
+ }
/** Parameters for the current version of the Auth Rule */
fun parameters(velocityLimitParams: VelocityLimitParams) = apply {
- this.parameters = AuthRuleParameters.ofVelocityLimitParams(velocityLimitParams)
+ this.parameters = Parameters.ofVelocityLimitParams(velocityLimitParams)
}
fun additionalQueryParams(additionalQueryParams: Map>) = apply {
@@ -250,15 +248,15 @@ constructor(
AuthRuleV2DraftParams(
checkNotNull(authRuleToken) { "`authRuleToken` is required but was not set" },
parameters,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
- @JsonDeserialize(using = AuthRuleParameters.Deserializer::class)
- @JsonSerialize(using = AuthRuleParameters.Serializer::class)
- class AuthRuleParameters
+ @JsonDeserialize(using = Parameters.Deserializer::class)
+ @JsonSerialize(using = Parameters.Serializer::class)
+ class Parameters
private constructor(
private val conditionalBlockParameters: ConditionalBlockParameters? = null,
private val velocityLimitParams: VelocityLimitParams? = null,
@@ -292,10 +290,10 @@ constructor(
}
}
- fun validate(): AuthRuleParameters = apply {
+ fun validate(): Parameters = apply {
if (!validated) {
if (conditionalBlockParameters == null && velocityLimitParams == null) {
- throw LithicInvalidDataException("Unknown AuthRuleParameters: $_json")
+ throw LithicInvalidDataException("Unknown Parameters: $_json")
}
conditionalBlockParameters?.validate()
velocityLimitParams?.validate()
@@ -308,7 +306,7 @@ constructor(
return true
}
- return /* spotless:off */ other is AuthRuleParameters && this.conditionalBlockParameters == other.conditionalBlockParameters && this.velocityLimitParams == other.velocityLimitParams /* spotless:on */
+ return /* spotless:off */ other is Parameters && this.conditionalBlockParameters == other.conditionalBlockParameters && this.velocityLimitParams == other.velocityLimitParams /* spotless:on */
}
override fun hashCode(): Int {
@@ -318,11 +316,11 @@ constructor(
override fun toString(): String {
return when {
conditionalBlockParameters != null ->
- "AuthRuleParameters{conditionalBlockParameters=$conditionalBlockParameters}"
+ "Parameters{conditionalBlockParameters=$conditionalBlockParameters}"
velocityLimitParams != null ->
- "AuthRuleParameters{velocityLimitParams=$velocityLimitParams}"
- _json != null -> "AuthRuleParameters{_unknown=$_json}"
- else -> throw IllegalStateException("Invalid AuthRuleParameters")
+ "Parameters{velocityLimitParams=$velocityLimitParams}"
+ _json != null -> "Parameters{_unknown=$_json}"
+ else -> throw IllegalStateException("Invalid Parameters")
}
}
@@ -330,10 +328,10 @@ constructor(
fun ofConditionalBlockParameters(
conditionalBlockParameters: ConditionalBlockParameters
- ) = AuthRuleParameters(conditionalBlockParameters = conditionalBlockParameters)
+ ) = Parameters(conditionalBlockParameters = conditionalBlockParameters)
fun ofVelocityLimitParams(velocityLimitParams: VelocityLimitParams) =
- AuthRuleParameters(velocityLimitParams = velocityLimitParams)
+ Parameters(velocityLimitParams = velocityLimitParams)
}
interface Visitor {
@@ -345,31 +343,32 @@ constructor(
fun visitVelocityLimitParams(velocityLimitParams: VelocityLimitParams): T
fun unknown(json: JsonValue?): T {
- throw LithicInvalidDataException("Unknown AuthRuleParameters: $json")
+ throw LithicInvalidDataException("Unknown Parameters: $json")
}
}
- class Deserializer : BaseDeserializer(AuthRuleParameters::class) {
+ class Deserializer : BaseDeserializer(Parameters::class) {
- override fun ObjectCodec.deserialize(node: JsonNode): AuthRuleParameters {
+ override fun ObjectCodec.deserialize(node: JsonNode): Parameters {
val json = JsonValue.fromJsonNode(node)
+
tryDeserialize(node, jacksonTypeRef()) { it.validate() }
?.let {
- return AuthRuleParameters(conditionalBlockParameters = it, _json = json)
+ return Parameters(conditionalBlockParameters = it, _json = json)
}
tryDeserialize(node, jacksonTypeRef()) { it.validate() }
?.let {
- return AuthRuleParameters(velocityLimitParams = it, _json = json)
+ return Parameters(velocityLimitParams = it, _json = json)
}
- return AuthRuleParameters(_json = json)
+ return Parameters(_json = json)
}
}
- class Serializer : BaseSerializer(AuthRuleParameters::class) {
+ class Serializer : BaseSerializer(Parameters::class) {
override fun serialize(
- value: AuthRuleParameters,
+ value: Parameters,
generator: JsonGenerator,
provider: SerializerProvider
) {
@@ -379,7 +378,7 @@ constructor(
value.velocityLimitParams != null ->
generator.writeObject(value.velocityLimitParams)
value._json != null -> generator.writeObject(value._json)
- else -> throw IllegalStateException("Invalid AuthRuleParameters")
+ else -> throw IllegalStateException("Invalid Parameters")
}
}
}
@@ -451,8 +450,8 @@ constructor(
fun build(): ConditionalBlockParameters =
ConditionalBlockParameters(
- conditions.map { it.toUnmodifiable() },
- additionalProperties.toUnmodifiable()
+ conditions.map { it.toImmutable() },
+ additionalProperties.toImmutable()
)
}
@@ -468,20 +467,84 @@ constructor(
private var validated: Boolean = false
- /** The attribute to target */
+ /**
+ * The attribute to target.
+ *
+ * The following attributes may be targeted:
+ * - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
+ * business by the types of goods or services it provides.
+ * - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all ISO
+ * 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for Netherlands
+ * Antilles.
+ * - `CURRENCY`: 3-digit alphabetic ISO 4217 code for the merchant currency of the
+ * transaction.
+ * - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
+ * (merchant).
+ * - `DESCRIPTOR`: Short description of card acceptor.
+ * - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer
+ * applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or
+ * `TOKEN_AUTHENTICATED`.
+ * - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number
+ * (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`,
+ * `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`,
+ * `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`,
+ * `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
+ * - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
+ * fee field in the settlement/cardholder billing currency. This is the amount the
+ * issuer should authorize against unless the issuer is paying the acquirer fee on
+ * behalf of the cardholder.
+ * - `RISK_SCORE`: Network-provided score assessing risk level associated with a
+ * given authorization. Scores are on a range of 0-999, with 0 representing the
+ * lowest risk and 999 representing the highest risk. For Visa transactions, where
+ * the raw score has a range of 0-99, Lithic will normalize the score by
+ * multiplying the raw score by 10x.
+ */
fun attribute(): Attribute? = attribute.getNullable("attribute")
/** The operation to apply to the attribute */
fun operation(): Operation? = operation.getNullable("operation")
+ /** A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` */
fun value(): Value? = value.getNullable("value")
- /** The attribute to target */
+ /**
+ * The attribute to target.
+ *
+ * The following attributes may be targeted:
+ * - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
+ * business by the types of goods or services it provides.
+ * - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all ISO
+ * 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for Netherlands
+ * Antilles.
+ * - `CURRENCY`: 3-digit alphabetic ISO 4217 code for the merchant currency of the
+ * transaction.
+ * - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
+ * (merchant).
+ * - `DESCRIPTOR`: Short description of card acceptor.
+ * - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer
+ * applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or
+ * `TOKEN_AUTHENTICATED`.
+ * - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number
+ * (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`,
+ * `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`,
+ * `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`,
+ * `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
+ * - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
+ * fee field in the settlement/cardholder billing currency. This is the amount the
+ * issuer should authorize against unless the issuer is paying the acquirer fee on
+ * behalf of the cardholder.
+ * - `RISK_SCORE`: Network-provided score assessing risk level associated with a
+ * given authorization. Scores are on a range of 0-999, with 0 representing the
+ * lowest risk and 999 representing the highest risk. For Visa transactions, where
+ * the raw score has a range of 0-99, Lithic will normalize the score by
+ * multiplying the raw score by 10x.
+ */
@JsonProperty("attribute") @ExcludeMissing fun _attribute() = attribute
/** The operation to apply to the attribute */
@JsonProperty("operation") @ExcludeMissing fun _operation() = operation
+ /** A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` */
@JsonProperty("value") @ExcludeMissing fun _value() = value
@JsonAnyGetter
@@ -518,10 +581,72 @@ constructor(
additionalProperties(condition.additionalProperties)
}
- /** The attribute to target */
+ /**
+ * The attribute to target.
+ *
+ * The following attributes may be targeted:
+ * - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify
+ * a business by the types of goods or services it provides.
+ * - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
+ * ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
+ * Netherlands Antilles.
+ * - `CURRENCY`: 3-digit alphabetic ISO 4217 code for the merchant currency of
+ * the transaction.
+ * - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
+ * (merchant).
+ * - `DESCRIPTOR`: Short description of card acceptor.
+ * - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the
+ * issuer applies to the transaction. Valid values are `NONE`,
+ * `3DS_AUTHENTICATED`, or `TOKEN_AUTHENTICATED`.
+ * - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account
+ * number (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`,
+ * `CONTACTLESS`, `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`,
+ * `KEY_ENTERED`, `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`,
+ * `UNSPECIFIED`, `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
+ * - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the
+ * acquirer fee field in the settlement/cardholder billing currency. This is
+ * the amount the issuer should authorize against unless the issuer is paying
+ * the acquirer fee on behalf of the cardholder.
+ * - `RISK_SCORE`: Network-provided score assessing risk level associated with a
+ * given authorization. Scores are on a range of 0-999, with 0 representing
+ * the lowest risk and 999 representing the highest risk. For Visa
+ * transactions, where the raw score has a range of 0-99, Lithic will
+ * normalize the score by multiplying the raw score by 10x.
+ */
fun attribute(attribute: Attribute) = attribute(JsonField.of(attribute))
- /** The attribute to target */
+ /**
+ * The attribute to target.
+ *
+ * The following attributes may be targeted:
+ * - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify
+ * a business by the types of goods or services it provides.
+ * - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
+ * ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
+ * Netherlands Antilles.
+ * - `CURRENCY`: 3-digit alphabetic ISO 4217 code for the merchant currency of
+ * the transaction.
+ * - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
+ * (merchant).
+ * - `DESCRIPTOR`: Short description of card acceptor.
+ * - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the
+ * issuer applies to the transaction. Valid values are `NONE`,
+ * `3DS_AUTHENTICATED`, or `TOKEN_AUTHENTICATED`.
+ * - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account
+ * number (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`,
+ * `CONTACTLESS`, `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`,
+ * `KEY_ENTERED`, `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`,
+ * `UNSPECIFIED`, `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
+ * - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the
+ * acquirer fee field in the settlement/cardholder billing currency. This is
+ * the amount the issuer should authorize against unless the issuer is paying
+ * the acquirer fee on behalf of the cardholder.
+ * - `RISK_SCORE`: Network-provided score assessing risk level associated with a
+ * given authorization. Scores are on a range of 0-999, with 0 representing
+ * the lowest risk and 999 representing the highest risk. For Visa
+ * transactions, where the raw score has a range of 0-99, Lithic will
+ * normalize the score by multiplying the raw score by 10x.
+ */
@JsonProperty("attribute")
@ExcludeMissing
fun attribute(attribute: JsonField) = apply {
@@ -538,8 +663,10 @@ constructor(
this.operation = operation
}
+ /** A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` */
fun value(value: Value) = value(JsonField.of(value))
+ /** A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` */
@JsonProperty("value")
@ExcludeMissing
fun value(value: JsonField) = apply { this.value = value }
@@ -564,7 +691,7 @@ constructor(
attribute,
operation,
value,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -849,6 +976,7 @@ constructor(
override fun ObjectCodec.deserialize(node: JsonNode): Value {
val json = JsonValue.fromJsonNode(node)
+
tryDeserialize(node, jacksonTypeRef())?.let {
return Value(string = it, _json = json)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ListPage.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ListPage.kt
index be1313f2..1c6ab68b 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ListPage.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ListPage.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.blocking.authRules.V2Service
import java.util.Objects
@@ -159,7 +159,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ListPageAsync.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ListPageAsync.kt
index ef780046..c4c54641 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ListPageAsync.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ListPageAsync.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.async.authRules.V2ServiceAsync
import java.util.Objects
import kotlinx.coroutines.flow.Flow
@@ -161,7 +161,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ListParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ListParams.kt
index c0fbae7c..c96bc93a 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ListParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ListParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -36,7 +36,7 @@ constructor(
this.pageSize?.let { params.put("page_size", listOf(it.toString())) }
this.startingAfter?.let { params.put("starting_after", listOf(it.toString())) }
params.putAll(additionalQueryParams)
- return params.toUnmodifiable()
+ return params.toImmutable()
}
internal fun getHeaders(): Map> = additionalHeaders
@@ -156,8 +156,8 @@ constructor(
endingBefore,
pageSize,
startingAfter,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2PromoteParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2PromoteParams.kt
index d15c4b99..f74c6289 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2PromoteParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2PromoteParams.kt
@@ -4,7 +4,7 @@ package com.lithic.api.models
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -135,9 +135,9 @@ constructor(
fun build(): AuthRuleV2PromoteParams =
AuthRuleV2PromoteParams(
checkNotNull(authRuleToken) { "`authRuleToken` is required but was not set" },
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ReportParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ReportParams.kt
index b2d1adff..5df65f6b 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ReportParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2ReportParams.kt
@@ -4,7 +4,7 @@ package com.lithic.api.models
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -135,9 +135,9 @@ constructor(
fun build(): AuthRuleV2ReportParams =
AuthRuleV2ReportParams(
checkNotNull(authRuleToken) { "`authRuleToken` is required but was not set" },
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2RetrieveParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2RetrieveParams.kt
index 886eb427..9511e72d 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2RetrieveParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2RetrieveParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -111,8 +111,8 @@ constructor(
fun build(): AuthRuleV2RetrieveParams =
AuthRuleV2RetrieveParams(
checkNotNull(authRuleToken) { "`authRuleToken` is required but was not set" },
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2UpdateParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2UpdateParams.kt
index efa3e251..a0e06f94 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2UpdateParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2UpdateParams.kt
@@ -12,7 +12,7 @@ import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.util.Objects
@@ -107,7 +107,7 @@ constructor(
}
fun build(): AuthRuleV2UpdateBody =
- AuthRuleV2UpdateBody(state, additionalProperties.toUnmodifiable())
+ AuthRuleV2UpdateBody(state, additionalProperties.toImmutable())
}
override fun equals(other: Any?): Boolean {
@@ -245,9 +245,9 @@ constructor(
AuthRuleV2UpdateParams(
checkNotNull(authRuleToken) { "`authRuleToken` is required but was not set" },
state,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthStreamEnrollmentRetrieveSecretParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthStreamEnrollmentRetrieveSecretParams.kt
index 74cc08df..c1850e70 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthStreamEnrollmentRetrieveSecretParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthStreamEnrollmentRetrieveSecretParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -98,8 +98,8 @@ constructor(
fun build(): AuthStreamEnrollmentRetrieveSecretParams =
AuthStreamEnrollmentRetrieveSecretParams(
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable()
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable()
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthStreamEnrollmentRotateSecretParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthStreamEnrollmentRotateSecretParams.kt
index b31848fb..6127a8bb 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthStreamEnrollmentRotateSecretParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthStreamEnrollmentRotateSecretParams.kt
@@ -4,7 +4,7 @@ package com.lithic.api.models
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -124,9 +124,9 @@ constructor(
fun build(): AuthStreamEnrollmentRotateSecretParams =
AuthStreamEnrollmentRotateSecretParams(
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthStreamSecret.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthStreamSecret.kt
index be66a655..f29fb232 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthStreamSecret.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthStreamSecret.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import java.util.Objects
@JsonDeserialize(builder = AuthStreamSecret.Builder::class)
@@ -80,8 +80,7 @@ private constructor(
this.additionalProperties.putAll(additionalProperties)
}
- fun build(): AuthStreamSecret =
- AuthStreamSecret(secret, additionalProperties.toUnmodifiable())
+ fun build(): AuthStreamSecret = AuthStreamSecret(secret, additionalProperties.toImmutable())
}
override fun equals(other: Any?): Boolean {
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthenticationRetrieveResponse.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthenticationRetrieveResponse.kt
index a682927c..ec23ca27 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthenticationRetrieveResponse.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthenticationRetrieveResponse.kt
@@ -13,7 +13,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.time.OffsetDateTime
import java.util.Objects
@@ -549,7 +549,7 @@ private constructor(
threeRiRequestType,
token,
transaction,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -1026,7 +1026,7 @@ private constructor(
phoneNumberMobile,
phoneNumberWork,
shippingAddress,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -1210,7 +1210,7 @@ private constructor(
city,
country,
postalCode,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -1591,7 +1591,7 @@ private constructor(
mcc,
name,
riskIndicator,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -1979,7 +1979,7 @@ private constructor(
preOrderAvailableDate,
reorderItems,
shippingMethod,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -2499,7 +2499,7 @@ private constructor(
AdditionalData(
networkDecision,
networkRiskScore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -2697,7 +2697,7 @@ private constructor(
App(
deviceInfo,
ip,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -3070,7 +3070,7 @@ private constructor(
language,
timeZone,
userAgent,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -3442,7 +3442,7 @@ private constructor(
currencyExponent,
dateTime,
type,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthenticationSimulateResponse.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthenticationSimulateResponse.kt
index 53f337e6..d7363963 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthenticationSimulateResponse.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/AuthenticationSimulateResponse.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import java.util.Objects
@JsonDeserialize(builder = AuthenticationSimulateResponse.Builder::class)
@@ -93,7 +93,7 @@ private constructor(
}
fun build(): AuthenticationSimulateResponse =
- AuthenticationSimulateResponse(token, additionalProperties.toUnmodifiable())
+ AuthenticationSimulateResponse(token, additionalProperties.toImmutable())
}
override fun equals(other: Any?): Boolean {
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Balance.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Balance.kt
index 4e5fb0fb..f5d58c83 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Balance.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Balance.kt
@@ -13,7 +13,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.time.OffsetDateTime
import java.util.Objects
@@ -326,7 +326,7 @@ private constructor(
pendingAmount,
totalAmount,
updated,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BalanceListPage.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BalanceListPage.kt
index 1eece3dd..e4cb724e 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BalanceListPage.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BalanceListPage.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.blocking.BalanceService
import java.util.Objects
@@ -151,7 +151,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BalanceListPageAsync.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BalanceListPageAsync.kt
index 81269dfb..2407f8e6 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BalanceListPageAsync.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BalanceListPageAsync.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.async.BalanceServiceAsync
import java.util.Objects
import kotlinx.coroutines.flow.Flow
@@ -157,7 +157,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BalanceListParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BalanceListParams.kt
index 9e590c49..b3a482fd 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BalanceListParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BalanceListParams.kt
@@ -7,7 +7,7 @@ import com.lithic.api.core.Enum
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.time.OffsetDateTime
@@ -39,7 +39,7 @@ constructor(
params.put("financial_account_type", listOf(it.toString()))
}
params.putAll(additionalQueryParams)
- return params.toUnmodifiable()
+ return params.toImmutable()
}
internal fun getHeaders(): Map> = additionalHeaders
@@ -143,8 +143,8 @@ constructor(
accountToken,
balanceDate,
financialAccountType,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BalanceListResponse.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BalanceListResponse.kt
index a17b0f9e..c5078c36 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BalanceListResponse.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BalanceListResponse.kt
@@ -13,7 +13,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.time.OffsetDateTime
import java.util.Objects
@@ -314,7 +314,7 @@ private constructor(
pendingAmount,
totalAmount,
updated,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BookTransferCreateParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BookTransferCreateParams.kt
index b3beeedc..fa5e95db 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BookTransferCreateParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BookTransferCreateParams.kt
@@ -12,7 +12,7 @@ import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.util.Objects
@@ -225,7 +225,7 @@ constructor(
checkNotNull(type) { "`type` is required but was not set" },
token,
memo,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -415,9 +415,9 @@ constructor(
checkNotNull(type) { "`type` is required but was not set" },
token,
memo,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BookTransferListPage.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BookTransferListPage.kt
index d697cc08..523a3f04 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BookTransferListPage.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BookTransferListPage.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.blocking.BookTransferService
import java.util.Objects
@@ -169,7 +169,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BookTransferListPageAsync.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BookTransferListPageAsync.kt
index fdeaca39..b278c2cc 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BookTransferListPageAsync.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BookTransferListPageAsync.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.async.BookTransferServiceAsync
import java.util.Objects
import kotlinx.coroutines.flow.Flow
@@ -171,7 +171,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BookTransferListParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BookTransferListParams.kt
index 3dec6108..851ed61c 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BookTransferListParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BookTransferListParams.kt
@@ -7,7 +7,7 @@ import com.lithic.api.core.Enum
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.time.OffsetDateTime
@@ -75,7 +75,7 @@ constructor(
this.startingAfter?.let { params.put("starting_after", listOf(it.toString())) }
this.status?.let { params.put("status", listOf(it.toString())) }
params.putAll(additionalQueryParams)
- return params.toUnmodifiable()
+ return params.toImmutable()
}
internal fun getHeaders(): Map> = additionalHeaders
@@ -242,8 +242,8 @@ constructor(
result,
startingAfter,
status,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BookTransferResponse.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BookTransferResponse.kt
index 02dba3e9..ab0c9c2a 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BookTransferResponse.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BookTransferResponse.kt
@@ -13,7 +13,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.time.OffsetDateTime
import java.util.Objects
@@ -376,7 +376,7 @@ private constructor(
category,
created,
currency,
- events.map { it.toUnmodifiable() },
+ events.map { it.toImmutable() },
fromFinancialAccountToken,
pendingAmount,
result,
@@ -385,7 +385,7 @@ private constructor(
toFinancialAccountToken,
token,
updated,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -705,8 +705,8 @@ private constructor(
token,
subtype,
memo,
- detailedResults.map { it.toUnmodifiable() },
- additionalProperties.toUnmodifiable(),
+ detailedResults.map { it.toImmutable() },
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BookTransferRetrieveParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BookTransferRetrieveParams.kt
index 9e247f4f..a5f638ab 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BookTransferRetrieveParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BookTransferRetrieveParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -115,8 +115,8 @@ constructor(
checkNotNull(bookTransferToken) {
"`bookTransferToken` is required but was not set"
},
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BookTransferReverseParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BookTransferReverseParams.kt
index 0502ec10..8c44f39a 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BookTransferReverseParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/BookTransferReverseParams.kt
@@ -9,7 +9,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -91,7 +91,7 @@ constructor(
}
fun build(): BookTransferReverseBody =
- BookTransferReverseBody(memo, additionalProperties.toUnmodifiable())
+ BookTransferReverseBody(memo, additionalProperties.toImmutable())
}
override fun equals(other: Any?): Boolean {
@@ -227,9 +227,9 @@ constructor(
"`bookTransferToken` is required but was not set"
},
memo,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Card.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Card.kt
index cbe60665..b970d6c9 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Card.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Card.kt
@@ -13,7 +13,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.time.OffsetDateTime
import java.util.Objects
@@ -750,7 +750,7 @@ private constructor(
fun build(): Card =
Card(
accountToken,
- authRuleTokens.map { it.toUnmodifiable() },
+ authRuleTokens.map { it.toImmutable() },
cardProgramToken,
cardholderCurrency,
created,
@@ -763,7 +763,7 @@ private constructor(
lastFour,
memo,
pan,
- pendingCommands.map { it.toUnmodifiable() },
+ pendingCommands.map { it.toImmutable() },
pinStatus,
productId,
spendLimit,
@@ -771,7 +771,7 @@ private constructor(
state,
token,
type,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -1035,7 +1035,7 @@ private constructor(
state,
token,
type,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardAggregateBalanceListPage.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardAggregateBalanceListPage.kt
index 4f348e3b..2ad07a02 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardAggregateBalanceListPage.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardAggregateBalanceListPage.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.blocking.cards.AggregateBalanceService
import java.util.Objects
@@ -157,7 +157,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardAggregateBalanceListPageAsync.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardAggregateBalanceListPageAsync.kt
index 8d3142dc..6556a1fc 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardAggregateBalanceListPageAsync.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardAggregateBalanceListPageAsync.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.async.cards.AggregateBalanceServiceAsync
import java.util.Objects
import kotlinx.coroutines.flow.Flow
@@ -159,7 +159,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardAggregateBalanceListParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardAggregateBalanceListParams.kt
index 80dec477..a4315199 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardAggregateBalanceListParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardAggregateBalanceListParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -26,7 +26,7 @@ constructor(
params.put("business_account_token", listOf(it.toString()))
}
params.putAll(additionalQueryParams)
- return params.toUnmodifiable()
+ return params.toImmutable()
}
internal fun getHeaders(): Map> = additionalHeaders
@@ -124,8 +124,8 @@ constructor(
CardAggregateBalanceListParams(
accountToken,
businessAccountToken,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardBalanceListPage.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardBalanceListPage.kt
index f8ffc7cc..6252fc7b 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardBalanceListPage.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardBalanceListPage.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.blocking.cards.BalanceService
import java.util.Objects
@@ -151,7 +151,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardBalanceListPageAsync.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardBalanceListPageAsync.kt
index a3d79131..c313e5b1 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardBalanceListPageAsync.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardBalanceListPageAsync.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.async.cards.BalanceServiceAsync
import java.util.Objects
import kotlinx.coroutines.flow.Flow
@@ -157,7 +157,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardBalanceListParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardBalanceListParams.kt
index 054b6cc6..1013d398 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardBalanceListParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardBalanceListParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.time.OffsetDateTime
import java.time.format.DateTimeFormatter
@@ -33,7 +33,7 @@ constructor(
params.put("last_transaction_event_token", listOf(it.toString()))
}
params.putAll(additionalQueryParams)
- return params.toUnmodifiable()
+ return params.toImmutable()
}
internal fun getHeaders(): Map> = additionalHeaders
@@ -146,8 +146,8 @@ constructor(
checkNotNull(cardToken) { "`cardToken` is required but was not set" },
balanceDate,
lastTransactionEventToken,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardCreateParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardCreateParams.kt
index 85d457a9..59ba8d27 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardCreateParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardCreateParams.kt
@@ -12,7 +12,7 @@ import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.util.Objects
@@ -471,7 +471,7 @@ constructor(
spendLimit,
spendLimitDuration,
state,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -769,9 +769,9 @@ constructor(
spendLimit,
spendLimitDuration,
state,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardEmbedParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardEmbedParams.kt
index a7f79c06..4cd3e153 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardEmbedParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardEmbedParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -24,7 +24,7 @@ constructor(
this.embedRequest.let { params.put("embed_request", listOf(it.toString())) }
this.hmac.let { params.put("hmac", listOf(it.toString())) }
params.putAll(additionalQueryParams)
- return params.toUnmodifiable()
+ return params.toImmutable()
}
internal fun getHeaders(): Map> = additionalHeaders
@@ -120,8 +120,8 @@ constructor(
CardEmbedParams(
checkNotNull(embedRequest) { "`embedRequest` is required but was not set" },
checkNotNull(hmac) { "`hmac` is required but was not set" },
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardFinancialTransactionListPage.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardFinancialTransactionListPage.kt
index b1b0a1c6..21ea3a89 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardFinancialTransactionListPage.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardFinancialTransactionListPage.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.blocking.cards.FinancialTransactionService
import java.util.Objects
@@ -155,7 +155,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardFinancialTransactionListPageAsync.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardFinancialTransactionListPageAsync.kt
index bc428658..2e4b3a75 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardFinancialTransactionListPageAsync.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardFinancialTransactionListPageAsync.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.async.cards.FinancialTransactionServiceAsync
import java.util.Objects
import kotlinx.coroutines.flow.Flow
@@ -157,7 +157,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardFinancialTransactionListParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardFinancialTransactionListParams.kt
index 992b52c4..ff00f5f0 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardFinancialTransactionListParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardFinancialTransactionListParams.kt
@@ -7,7 +7,7 @@ import com.lithic.api.core.Enum
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.time.OffsetDateTime
@@ -58,7 +58,7 @@ constructor(
this.startingAfter?.let { params.put("starting_after", listOf(it.toString())) }
this.status?.let { params.put("status", listOf(it.toString())) }
params.putAll(additionalQueryParams)
- return params.toUnmodifiable()
+ return params.toImmutable()
}
internal fun getHeaders(): Map> = additionalHeaders
@@ -209,8 +209,8 @@ constructor(
result,
startingAfter,
status,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardFinancialTransactionRetrieveParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardFinancialTransactionRetrieveParams.kt
index f4625ae5..4b5e1e60 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardFinancialTransactionRetrieveParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardFinancialTransactionRetrieveParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -127,8 +127,8 @@ constructor(
checkNotNull(financialTransactionToken) {
"`financialTransactionToken` is required but was not set"
},
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardGetEmbedHtmlParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardGetEmbedHtmlParams.kt
index a40cc168..32fa5ae2 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardGetEmbedHtmlParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardGetEmbedHtmlParams.kt
@@ -9,7 +9,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.time.OffsetDateTime
import java.util.Objects
@@ -199,7 +199,7 @@ constructor(
css,
expiration,
targetOrigin,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
@@ -358,9 +358,9 @@ constructor(
css,
expiration,
targetOrigin,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardGetEmbedUrlParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardGetEmbedUrlParams.kt
index e6b9720e..b706f201 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardGetEmbedUrlParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardGetEmbedUrlParams.kt
@@ -9,7 +9,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.time.OffsetDateTime
import java.util.Objects
@@ -199,7 +199,7 @@ constructor(
css,
expiration,
targetOrigin,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
@@ -358,9 +358,9 @@ constructor(
css,
expiration,
targetOrigin,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardListPage.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardListPage.kt
index 7b6560fa..2c19c7b0 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardListPage.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardListPage.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.blocking.CardService
import java.util.Objects
@@ -158,7 +158,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardListPageAsync.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardListPageAsync.kt
index f35bda61..60611bb9 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardListPageAsync.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardListPageAsync.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.async.CardServiceAsync
import java.util.Objects
import kotlinx.coroutines.flow.Flow
@@ -160,7 +160,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardListParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardListParams.kt
index aef1aa55..6f474102 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardListParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardListParams.kt
@@ -7,7 +7,7 @@ import com.lithic.api.core.Enum
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.time.OffsetDateTime
@@ -55,7 +55,7 @@ constructor(
this.startingAfter?.let { params.put("starting_after", listOf(it.toString())) }
this.state?.let { params.put("state", listOf(it.toString())) }
params.putAll(additionalQueryParams)
- return params.toUnmodifiable()
+ return params.toImmutable()
}
internal fun getHeaders(): Map> = additionalHeaders
@@ -193,8 +193,8 @@ constructor(
pageSize,
startingAfter,
state,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardProgram.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardProgram.kt
index 3b165705..198a5592 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardProgram.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardProgram.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import java.time.OffsetDateTime
import java.util.Objects
@@ -221,9 +221,9 @@ private constructor(
name,
panRangeEnd,
panRangeStart,
- settlementCurrencies.map { it.toUnmodifiable() },
+ settlementCurrencies.map { it.toImmutable() },
token,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardProgramListPage.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardProgramListPage.kt
index c35b7667..3d74094f 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardProgramListPage.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardProgramListPage.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.blocking.CardProgramService
import java.util.Objects
@@ -169,7 +169,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardProgramListPageAsync.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardProgramListPageAsync.kt
index f128e691..254e8248 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardProgramListPageAsync.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardProgramListPageAsync.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.async.CardProgramServiceAsync
import java.util.Objects
import kotlinx.coroutines.flow.Flow
@@ -171,7 +171,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardProgramListParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardProgramListParams.kt
index 6fe22432..bf3cb9cf 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardProgramListParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardProgramListParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -28,7 +28,7 @@ constructor(
this.pageSize?.let { params.put("page_size", listOf(it.toString())) }
this.startingAfter?.let { params.put("starting_after", listOf(it.toString())) }
params.putAll(additionalQueryParams)
- return params.toUnmodifiable()
+ return params.toImmutable()
}
internal fun getHeaders(): Map> = additionalHeaders
@@ -136,8 +136,8 @@ constructor(
endingBefore,
pageSize,
startingAfter,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardProgramRetrieveParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardProgramRetrieveParams.kt
index 89b762d5..2754395c 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardProgramRetrieveParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardProgramRetrieveParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -113,8 +113,8 @@ constructor(
fun build(): CardProgramRetrieveParams =
CardProgramRetrieveParams(
checkNotNull(cardProgramToken) { "`cardProgramToken` is required but was not set" },
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardProvisionParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardProvisionParams.kt
index 4e3e3a94..98dda8bf 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardProvisionParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardProvisionParams.kt
@@ -12,7 +12,7 @@ import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.util.Objects
@@ -220,7 +220,7 @@ constructor(
digitalWallet,
nonce,
nonceSignature,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -404,9 +404,9 @@ constructor(
digitalWallet,
nonce,
nonceSignature,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardProvisionResponse.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardProvisionResponse.kt
index 332c38d3..2b89b5bc 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardProvisionResponse.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardProvisionResponse.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import java.util.Objects
@JsonDeserialize(builder = CardProvisionResponse.Builder::class)
@@ -82,7 +82,7 @@ private constructor(
}
fun build(): CardProvisionResponse =
- CardProvisionResponse(provisioningPayload, additionalProperties.toUnmodifiable())
+ CardProvisionResponse(provisioningPayload, additionalProperties.toImmutable())
}
override fun equals(other: Any?): Boolean {
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardReissueParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardReissueParams.kt
index 7d2ba789..2621fc5e 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardReissueParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardReissueParams.kt
@@ -12,7 +12,7 @@ import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.util.Objects
@@ -179,7 +179,7 @@ constructor(
productId,
shippingAddress,
shippingMethod,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -348,9 +348,9 @@ constructor(
productId,
shippingAddress,
shippingMethod,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardRenewParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardRenewParams.kt
index 38c30a6c..cded5dd4 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardRenewParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardRenewParams.kt
@@ -12,7 +12,7 @@ import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.util.Objects
@@ -223,7 +223,7 @@ constructor(
expYear,
productId,
shippingMethod,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -410,9 +410,9 @@ constructor(
expYear,
productId,
shippingMethod,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardRetrieveParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardRetrieveParams.kt
index c3a3d0a0..daa2e6ee 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardRetrieveParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardRetrieveParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -111,8 +111,8 @@ constructor(
fun build(): CardRetrieveParams =
CardRetrieveParams(
checkNotNull(cardToken) { "`cardToken` is required but was not set" },
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardRetrieveSpendLimitsParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardRetrieveSpendLimitsParams.kt
index 1b37dcbf..325e41a0 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardRetrieveSpendLimitsParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardRetrieveSpendLimitsParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -111,8 +111,8 @@ constructor(
fun build(): CardRetrieveSpendLimitsParams =
CardRetrieveSpendLimitsParams(
checkNotNull(cardToken) { "`cardToken` is required but was not set" },
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardSearchByPanParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardSearchByPanParams.kt
index 0d02a36a..f3fe197c 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardSearchByPanParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardSearchByPanParams.kt
@@ -9,7 +9,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -83,7 +83,7 @@ constructor(
fun build(): CardSearchByPanBody =
CardSearchByPanBody(
checkNotNull(pan) { "`pan` is required but was not set" },
- additionalProperties.toUnmodifiable()
+ additionalProperties.toImmutable()
)
}
@@ -211,9 +211,9 @@ constructor(
fun build(): CardSearchByPanParams =
CardSearchByPanParams(
checkNotNull(pan) { "`pan` is required but was not set" },
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardSpendLimits.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardSpendLimits.kt
index 505eb5af..cd823eb1 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardSpendLimits.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardSpendLimits.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import java.util.Objects
@JsonDeserialize(builder = CardSpendLimits.Builder::class)
@@ -117,7 +117,7 @@ private constructor(
availableSpendLimit,
spendLimit,
spendVelocity,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -262,7 +262,7 @@ private constructor(
annually,
forever,
monthly,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -394,7 +394,7 @@ private constructor(
annually,
forever,
monthly,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -562,7 +562,7 @@ private constructor(
annually,
forever,
monthly,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardUpdateParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardUpdateParams.kt
index d0ecc35b..5890d662 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardUpdateParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CardUpdateParams.kt
@@ -12,7 +12,7 @@ import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.util.Objects
@@ -263,7 +263,7 @@ constructor(
spendLimit,
spendLimitDuration,
state,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -469,9 +469,9 @@ constructor(
spendLimit,
spendLimitDuration,
state,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Carrier.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Carrier.kt
index 052cf4be..86dd67b7 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Carrier.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Carrier.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import java.util.Objects
@JsonDeserialize(builder = Carrier.Builder::class)
@@ -80,7 +80,7 @@ private constructor(
this.additionalProperties.putAll(additionalProperties)
}
- fun build(): Carrier = Carrier(qrCodeUrl, additionalProperties.toUnmodifiable())
+ fun build(): Carrier = Carrier(qrCodeUrl, additionalProperties.toImmutable())
}
override fun equals(other: Any?): Boolean {
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ChallengeResponse.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ChallengeResponse.kt
index ad52c294..d4f32fcd 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ChallengeResponse.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ChallengeResponse.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import java.util.Objects
@JsonDeserialize(builder = ChallengeResponse.Builder::class)
@@ -121,7 +121,7 @@ private constructor(
ChallengeResponse(
token,
challengeResponse,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ClientApiStatusParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ClientApiStatusParams.kt
index 8658ef05..5e3fae99 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ClientApiStatusParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ClientApiStatusParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -96,8 +96,8 @@ constructor(
fun build(): ClientApiStatusParams =
ClientApiStatusParams(
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable()
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable()
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CreditProductExtendedCreditRetrieveParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CreditProductExtendedCreditRetrieveParams.kt
index ea0d4414..a221d8e0 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CreditProductExtendedCreditRetrieveParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/CreditProductExtendedCreditRetrieveParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -115,8 +115,8 @@ constructor(
fun build(): CreditProductExtendedCreditRetrieveParams =
CreditProductExtendedCreditRetrieveParams(
checkNotNull(creditProductId) { "`creditProductId` is required but was not set" },
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DecisioningRetrieveSecretResponse.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DecisioningRetrieveSecretResponse.kt
index 2c271735..0d608c1c 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DecisioningRetrieveSecretResponse.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DecisioningRetrieveSecretResponse.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import java.util.Objects
@JsonDeserialize(builder = DecisioningRetrieveSecretResponse.Builder::class)
@@ -82,7 +82,7 @@ private constructor(
}
fun build(): DecisioningRetrieveSecretResponse =
- DecisioningRetrieveSecretResponse(secret, additionalProperties.toUnmodifiable())
+ DecisioningRetrieveSecretResponse(secret, additionalProperties.toImmutable())
}
override fun equals(other: Any?): Boolean {
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DecisioningSimulateChallengeResponse.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DecisioningSimulateChallengeResponse.kt
index 1db1fa48..15005ca9 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DecisioningSimulateChallengeResponse.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DecisioningSimulateChallengeResponse.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import java.util.Objects
@JsonDeserialize(builder = DecisioningSimulateChallengeResponse.Builder::class)
@@ -99,7 +99,7 @@ private constructor(
}
fun build(): DecisioningSimulateChallengeResponse =
- DecisioningSimulateChallengeResponse(token, additionalProperties.toUnmodifiable())
+ DecisioningSimulateChallengeResponse(token, additionalProperties.toImmutable())
}
override fun equals(other: Any?): Boolean {
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DigitalCardArt.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DigitalCardArt.kt
index 035b7f3e..af88e673 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DigitalCardArt.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DigitalCardArt.kt
@@ -13,7 +13,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.time.OffsetDateTime
import java.util.Objects
@@ -210,7 +210,7 @@ private constructor(
isEnabled,
network,
token,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DigitalCardArtListPage.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DigitalCardArtListPage.kt
index 8b9c4d47..e90cf48d 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DigitalCardArtListPage.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DigitalCardArtListPage.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.blocking.DigitalCardArtService
import java.util.Objects
@@ -169,7 +169,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DigitalCardArtListPageAsync.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DigitalCardArtListPageAsync.kt
index d1d99f04..579f9e6d 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DigitalCardArtListPageAsync.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DigitalCardArtListPageAsync.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.async.DigitalCardArtServiceAsync
import java.util.Objects
import kotlinx.coroutines.flow.Flow
@@ -171,7 +171,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DigitalCardArtListParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DigitalCardArtListParams.kt
index 3d7c08d7..3fe2ced4 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DigitalCardArtListParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DigitalCardArtListParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -28,7 +28,7 @@ constructor(
this.pageSize?.let { params.put("page_size", listOf(it.toString())) }
this.startingAfter?.let { params.put("starting_after", listOf(it.toString())) }
params.putAll(additionalQueryParams)
- return params.toUnmodifiable()
+ return params.toImmutable()
}
internal fun getHeaders(): Map> = additionalHeaders
@@ -136,8 +136,8 @@ constructor(
endingBefore,
pageSize,
startingAfter,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DigitalCardArtRetrieveParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DigitalCardArtRetrieveParams.kt
index 9044ce5b..de9ffe2b 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DigitalCardArtRetrieveParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DigitalCardArtRetrieveParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -115,8 +115,8 @@ constructor(
checkNotNull(digitalCardArtToken) {
"`digitalCardArtToken` is required but was not set"
},
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Dispute.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Dispute.kt
index 235e8709..a3faef1d 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Dispute.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Dispute.kt
@@ -13,7 +13,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.time.OffsetDateTime
import java.util.Objects
@@ -668,7 +668,7 @@ private constructor(
created,
customerFiledDate,
customerNote,
- networkClaimIds.map { it.toUnmodifiable() },
+ networkClaimIds.map { it.toImmutable() },
networkFiledDate,
networkReasonCode,
prearbitrationDate,
@@ -682,7 +682,7 @@ private constructor(
status,
token,
transactionToken,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeCreateParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeCreateParams.kt
index 16fd4ada..fbb680b4 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeCreateParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeCreateParams.kt
@@ -12,7 +12,7 @@ import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.time.OffsetDateTime
@@ -157,7 +157,7 @@ constructor(
},
customerFiledDate,
customerNote,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -313,9 +313,9 @@ constructor(
checkNotNull(transactionToken) { "`transactionToken` is required but was not set" },
customerFiledDate,
customerNote,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeDeleteEvidenceParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeDeleteEvidenceParams.kt
index 1e9d1ea3..2f6db55e 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeDeleteEvidenceParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeDeleteEvidenceParams.kt
@@ -4,7 +4,7 @@ package com.lithic.api.models
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -144,9 +144,9 @@ constructor(
DisputeDeleteEvidenceParams(
checkNotNull(disputeToken) { "`disputeToken` is required but was not set" },
checkNotNull(evidenceToken) { "`evidenceToken` is required but was not set" },
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeDeleteParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeDeleteParams.kt
index ecde6663..0b685270 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeDeleteParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeDeleteParams.kt
@@ -4,7 +4,7 @@ package com.lithic.api.models
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -135,9 +135,9 @@ constructor(
fun build(): DisputeDeleteParams =
DisputeDeleteParams(
checkNotNull(disputeToken) { "`disputeToken` is required but was not set" },
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeEvidence.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeEvidence.kt
index f86c10a3..7546e20f 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeEvidence.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeEvidence.kt
@@ -13,7 +13,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.time.OffsetDateTime
import java.util.Objects
@@ -244,7 +244,7 @@ private constructor(
token,
uploadStatus,
uploadUrl,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeInitiateEvidenceUploadParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeInitiateEvidenceUploadParams.kt
index 201edd7b..2ac02a8a 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeInitiateEvidenceUploadParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeInitiateEvidenceUploadParams.kt
@@ -9,7 +9,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -94,7 +94,7 @@ constructor(
}
fun build(): DisputeInitiateEvidenceUploadBody =
- DisputeInitiateEvidenceUploadBody(filename, additionalProperties.toUnmodifiable())
+ DisputeInitiateEvidenceUploadBody(filename, additionalProperties.toImmutable())
}
override fun equals(other: Any?): Boolean {
@@ -228,9 +228,9 @@ constructor(
DisputeInitiateEvidenceUploadParams(
checkNotNull(disputeToken) { "`disputeToken` is required but was not set" },
filename,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeListEvidencesPage.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeListEvidencesPage.kt
index 00e0eb2e..7fadc6b7 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeListEvidencesPage.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeListEvidencesPage.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.blocking.DisputeService
import java.util.Objects
@@ -169,7 +169,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeListEvidencesPageAsync.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeListEvidencesPageAsync.kt
index b575cb8e..c7cf8cc9 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeListEvidencesPageAsync.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeListEvidencesPageAsync.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.async.DisputeServiceAsync
import java.util.Objects
import kotlinx.coroutines.flow.Flow
@@ -171,7 +171,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeListEvidencesParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeListEvidencesParams.kt
index 80501802..42e90c27 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeListEvidencesParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeListEvidencesParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.time.OffsetDateTime
import java.time.format.DateTimeFormatter
@@ -45,7 +45,7 @@ constructor(
this.pageSize?.let { params.put("page_size", listOf(it.toString())) }
this.startingAfter?.let { params.put("starting_after", listOf(it.toString())) }
params.putAll(additionalQueryParams)
- return params.toUnmodifiable()
+ return params.toImmutable()
}
internal fun getHeaders(): Map> = additionalHeaders
@@ -183,8 +183,8 @@ constructor(
endingBefore,
pageSize,
startingAfter,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeListPage.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeListPage.kt
index abb66c54..4e30ae4e 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeListPage.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeListPage.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.blocking.DisputeService
import java.util.Objects
@@ -159,7 +159,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeListPageAsync.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeListPageAsync.kt
index a75d7265..29e0820a 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeListPageAsync.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeListPageAsync.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.async.DisputeServiceAsync
import java.util.Objects
import kotlinx.coroutines.flow.Flow
@@ -165,7 +165,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeListParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeListParams.kt
index 49df980f..90559d95 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeListParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeListParams.kt
@@ -7,7 +7,7 @@ import com.lithic.api.core.Enum
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.time.OffsetDateTime
@@ -57,7 +57,7 @@ constructor(
params.put("transaction_tokens", listOf(it.joinToString(separator = ",")))
}
params.putAll(additionalQueryParams)
- return params.toUnmodifiable()
+ return params.toImmutable()
}
internal fun getHeaders(): Map> = additionalHeaders
@@ -202,9 +202,9 @@ constructor(
pageSize,
startingAfter,
status,
- if (transactionTokens.size == 0) null else transactionTokens.toUnmodifiable(),
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ if (transactionTokens.size == 0) null else transactionTokens.toImmutable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeRetrieveEvidenceParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeRetrieveEvidenceParams.kt
index 05b119c1..bb03b00c 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeRetrieveEvidenceParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeRetrieveEvidenceParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -120,8 +120,8 @@ constructor(
DisputeRetrieveEvidenceParams(
checkNotNull(disputeToken) { "`disputeToken` is required but was not set" },
checkNotNull(evidenceToken) { "`evidenceToken` is required but was not set" },
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeRetrieveParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeRetrieveParams.kt
index da7eb6ad..74191d11 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeRetrieveParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeRetrieveParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -111,8 +111,8 @@ constructor(
fun build(): DisputeRetrieveParams =
DisputeRetrieveParams(
checkNotNull(disputeToken) { "`disputeToken` is required but was not set" },
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeUpdateParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeUpdateParams.kt
index 8502c590..435897cd 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeUpdateParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/DisputeUpdateParams.kt
@@ -12,7 +12,7 @@ import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.time.OffsetDateTime
@@ -148,7 +148,7 @@ constructor(
customerFiledDate,
customerNote,
reason,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -301,9 +301,9 @@ constructor(
customerFiledDate,
customerNote,
reason,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Document.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Document.kt
index eb05ce80..d4e66fe3 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Document.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Document.kt
@@ -13,7 +13,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.time.OffsetDateTime
import java.util.Objects
@@ -177,8 +177,8 @@ private constructor(
accountHolderToken,
documentType,
entityToken,
- requiredDocumentUploads.map { it.toUnmodifiable() },
- additionalProperties.toUnmodifiable(),
+ requiredDocumentUploads.map { it.toImmutable() },
+ additionalProperties.toImmutable(),
)
}
@@ -621,14 +621,14 @@ private constructor(
RequiredDocumentUpload(
imageType,
status,
- statusReasons.map { it.toUnmodifiable() },
+ statusReasons.map { it.toImmutable() },
uploadUrl,
token,
- acceptedEntityStatusReasons.map { it.toUnmodifiable() },
- rejectedEntityStatusReasons.map { it.toUnmodifiable() },
+ acceptedEntityStatusReasons.map { it.toImmutable() },
+ rejectedEntityStatusReasons.map { it.toImmutable() },
created,
updated,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EnhancedCommercialDataRetrieveResponse.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EnhancedCommercialDataRetrieveResponse.kt
index 8171e737..740ae7e6 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EnhancedCommercialDataRetrieveResponse.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EnhancedCommercialDataRetrieveResponse.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import java.util.Objects
@JsonDeserialize(builder = EnhancedCommercialDataRetrieveResponse.Builder::class)
@@ -80,8 +80,8 @@ private constructor(
fun build(): EnhancedCommercialDataRetrieveResponse =
EnhancedCommercialDataRetrieveResponse(
- data.map { it.toUnmodifiable() },
- additionalProperties.toUnmodifiable()
+ data.map { it.toImmutable() },
+ additionalProperties.toImmutable()
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EnhancedData.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EnhancedData.kt
index 54b48374..2ca27696 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EnhancedData.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EnhancedData.kt
@@ -13,7 +13,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.time.LocalDate
import java.util.Objects
@@ -157,8 +157,8 @@ private constructor(
transactionToken,
eventToken,
common,
- fleet.map { it.toUnmodifiable() },
- additionalProperties.toUnmodifiable(),
+ fleet.map { it.toImmutable() },
+ additionalProperties.toImmutable(),
)
}
@@ -312,8 +312,8 @@ private constructor(
merchantReferenceNumber,
orderDate,
tax,
- lineItems.map { it.toUnmodifiable() },
- additionalProperties.toUnmodifiable(),
+ lineItems.map { it.toImmutable() },
+ additionalProperties.toImmutable(),
)
}
@@ -449,7 +449,7 @@ private constructor(
description,
quantity,
amount,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -585,7 +585,7 @@ private constructor(
amount,
exempt,
merchantTaxId,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -883,7 +883,7 @@ private constructor(
driverNumber,
fuel,
amountTotals,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -995,7 +995,7 @@ private constructor(
grossSale,
discount,
netSale,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -1150,7 +1150,7 @@ private constructor(
quantity,
unitPrice,
unitOfMeasure,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Event.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Event.kt
index ca667435..c24f6977 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Event.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Event.kt
@@ -13,7 +13,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.time.OffsetDateTime
import java.util.Objects
@@ -263,7 +263,7 @@ private constructor(
eventType,
payload,
token,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -372,9 +372,6 @@ private constructor(
val THREE_DS_AUTHENTICATION_CREATED =
EventType(JsonField.of("three_ds_authentication.created"))
- val TRANSFER_TRANSACTION_CREATED =
- EventType(JsonField.of("transfer_transaction.created"))
-
val TOKENIZATION_APPROVAL_REQUEST =
EventType(JsonField.of("tokenization.approval_request"))
@@ -425,7 +422,6 @@ private constructor(
SETTLEMENT_REPORT_UPDATED,
STATEMENTS_CREATED,
THREE_DS_AUTHENTICATION_CREATED,
- TRANSFER_TRANSACTION_CREATED,
TOKENIZATION_APPROVAL_REQUEST,
TOKENIZATION_RESULT,
TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE,
@@ -467,7 +463,6 @@ private constructor(
SETTLEMENT_REPORT_UPDATED,
STATEMENTS_CREATED,
THREE_DS_AUTHENTICATION_CREATED,
- TRANSFER_TRANSACTION_CREATED,
TOKENIZATION_APPROVAL_REQUEST,
TOKENIZATION_RESULT,
TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE,
@@ -514,7 +509,6 @@ private constructor(
SETTLEMENT_REPORT_UPDATED -> Value.SETTLEMENT_REPORT_UPDATED
STATEMENTS_CREATED -> Value.STATEMENTS_CREATED
THREE_DS_AUTHENTICATION_CREATED -> Value.THREE_DS_AUTHENTICATION_CREATED
- TRANSFER_TRANSACTION_CREATED -> Value.TRANSFER_TRANSACTION_CREATED
TOKENIZATION_APPROVAL_REQUEST -> Value.TOKENIZATION_APPROVAL_REQUEST
TOKENIZATION_RESULT -> Value.TOKENIZATION_RESULT
TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE ->
@@ -563,7 +557,6 @@ private constructor(
SETTLEMENT_REPORT_UPDATED -> Known.SETTLEMENT_REPORT_UPDATED
STATEMENTS_CREATED -> Known.STATEMENTS_CREATED
THREE_DS_AUTHENTICATION_CREATED -> Known.THREE_DS_AUTHENTICATION_CREATED
- TRANSFER_TRANSACTION_CREATED -> Known.TRANSFER_TRANSACTION_CREATED
TOKENIZATION_APPROVAL_REQUEST -> Known.TOKENIZATION_APPROVAL_REQUEST
TOKENIZATION_RESULT -> Known.TOKENIZATION_RESULT
TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE ->
@@ -625,7 +618,7 @@ private constructor(
this.additionalProperties.putAll(additionalProperties)
}
- fun build(): Payload = Payload(additionalProperties.toUnmodifiable())
+ fun build(): Payload = Payload(additionalProperties.toImmutable())
}
override fun equals(other: Any?): Boolean {
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventListAttemptsPage.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventListAttemptsPage.kt
index 7d891242..55d03a68 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventListAttemptsPage.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventListAttemptsPage.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.blocking.EventService
import java.util.Objects
@@ -165,7 +165,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventListAttemptsPageAsync.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventListAttemptsPageAsync.kt
index 54d9a18a..f019037e 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventListAttemptsPageAsync.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventListAttemptsPageAsync.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.async.EventServiceAsync
import java.util.Objects
import kotlinx.coroutines.flow.Flow
@@ -171,7 +171,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventListAttemptsParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventListAttemptsParams.kt
index 1af2a6ad..7ada415e 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventListAttemptsParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventListAttemptsParams.kt
@@ -7,7 +7,7 @@ import com.lithic.api.core.Enum
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.time.OffsetDateTime
@@ -54,7 +54,7 @@ constructor(
this.startingAfter?.let { params.put("starting_after", listOf(it.toString())) }
this.status?.let { params.put("status", listOf(it.toString())) }
params.putAll(additionalQueryParams)
- return params.toUnmodifiable()
+ return params.toImmutable()
}
internal fun getHeaders(): Map> = additionalHeaders
@@ -197,8 +197,8 @@ constructor(
pageSize,
startingAfter,
status,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventListPage.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventListPage.kt
index 0ab3d965..14e56b46 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventListPage.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventListPage.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.blocking.EventService
import java.util.Objects
@@ -159,7 +159,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventListPageAsync.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventListPageAsync.kt
index 4548c9be..920b2e65 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventListPageAsync.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventListPageAsync.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.async.EventServiceAsync
import java.util.Objects
import kotlinx.coroutines.flow.Flow
@@ -161,7 +161,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventListParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventListParams.kt
index fe6bc829..0f18c656 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventListParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventListParams.kt
@@ -7,7 +7,7 @@ import com.lithic.api.core.Enum
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.time.OffsetDateTime
@@ -55,7 +55,7 @@ constructor(
this.startingAfter?.let { params.put("starting_after", listOf(it.toString())) }
this.withContent?.let { params.put("with_content", listOf(it.toString())) }
params.putAll(additionalQueryParams)
- return params.toUnmodifiable()
+ return params.toImmutable()
}
internal fun getHeaders(): Map> = additionalHeaders
@@ -195,12 +195,12 @@ constructor(
begin,
end,
endingBefore,
- if (eventTypes.size == 0) null else eventTypes.toUnmodifiable(),
+ if (eventTypes.size == 0) null else eventTypes.toImmutable(),
pageSize,
startingAfter,
withContent,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
@@ -309,9 +309,6 @@ constructor(
val THREE_DS_AUTHENTICATION_CREATED =
EventType(JsonField.of("three_ds_authentication.created"))
- val TRANSFER_TRANSACTION_CREATED =
- EventType(JsonField.of("transfer_transaction.created"))
-
val TOKENIZATION_APPROVAL_REQUEST =
EventType(JsonField.of("tokenization.approval_request"))
@@ -362,7 +359,6 @@ constructor(
SETTLEMENT_REPORT_UPDATED,
STATEMENTS_CREATED,
THREE_DS_AUTHENTICATION_CREATED,
- TRANSFER_TRANSACTION_CREATED,
TOKENIZATION_APPROVAL_REQUEST,
TOKENIZATION_RESULT,
TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE,
@@ -404,7 +400,6 @@ constructor(
SETTLEMENT_REPORT_UPDATED,
STATEMENTS_CREATED,
THREE_DS_AUTHENTICATION_CREATED,
- TRANSFER_TRANSACTION_CREATED,
TOKENIZATION_APPROVAL_REQUEST,
TOKENIZATION_RESULT,
TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE,
@@ -451,7 +446,6 @@ constructor(
SETTLEMENT_REPORT_UPDATED -> Value.SETTLEMENT_REPORT_UPDATED
STATEMENTS_CREATED -> Value.STATEMENTS_CREATED
THREE_DS_AUTHENTICATION_CREATED -> Value.THREE_DS_AUTHENTICATION_CREATED
- TRANSFER_TRANSACTION_CREATED -> Value.TRANSFER_TRANSACTION_CREATED
TOKENIZATION_APPROVAL_REQUEST -> Value.TOKENIZATION_APPROVAL_REQUEST
TOKENIZATION_RESULT -> Value.TOKENIZATION_RESULT
TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE ->
@@ -500,7 +494,6 @@ constructor(
SETTLEMENT_REPORT_UPDATED -> Known.SETTLEMENT_REPORT_UPDATED
STATEMENTS_CREATED -> Known.STATEMENTS_CREATED
THREE_DS_AUTHENTICATION_CREATED -> Known.THREE_DS_AUTHENTICATION_CREATED
- TRANSFER_TRANSACTION_CREATED -> Known.TRANSFER_TRANSACTION_CREATED
TOKENIZATION_APPROVAL_REQUEST -> Known.TOKENIZATION_APPROVAL_REQUEST
TOKENIZATION_RESULT -> Known.TOKENIZATION_RESULT
TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE ->
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventRetrieveParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventRetrieveParams.kt
index fb20aaad..2bcbbbbb 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventRetrieveParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventRetrieveParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -111,8 +111,8 @@ constructor(
fun build(): EventRetrieveParams =
EventRetrieveParams(
checkNotNull(eventToken) { "`eventToken` is required but was not set" },
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscription.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscription.kt
index 9cf0265a..49e2d277 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscription.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscription.kt
@@ -13,7 +13,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.util.Objects
@@ -154,10 +154,10 @@ private constructor(
EventSubscription(
description,
disabled,
- eventTypes.map { it.toUnmodifiable() },
+ eventTypes.map { it.toImmutable() },
token,
url,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -266,9 +266,6 @@ private constructor(
val THREE_DS_AUTHENTICATION_CREATED =
EventType(JsonField.of("three_ds_authentication.created"))
- val TRANSFER_TRANSACTION_CREATED =
- EventType(JsonField.of("transfer_transaction.created"))
-
val TOKENIZATION_APPROVAL_REQUEST =
EventType(JsonField.of("tokenization.approval_request"))
@@ -319,7 +316,6 @@ private constructor(
SETTLEMENT_REPORT_UPDATED,
STATEMENTS_CREATED,
THREE_DS_AUTHENTICATION_CREATED,
- TRANSFER_TRANSACTION_CREATED,
TOKENIZATION_APPROVAL_REQUEST,
TOKENIZATION_RESULT,
TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE,
@@ -361,7 +357,6 @@ private constructor(
SETTLEMENT_REPORT_UPDATED,
STATEMENTS_CREATED,
THREE_DS_AUTHENTICATION_CREATED,
- TRANSFER_TRANSACTION_CREATED,
TOKENIZATION_APPROVAL_REQUEST,
TOKENIZATION_RESULT,
TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE,
@@ -408,7 +403,6 @@ private constructor(
SETTLEMENT_REPORT_UPDATED -> Value.SETTLEMENT_REPORT_UPDATED
STATEMENTS_CREATED -> Value.STATEMENTS_CREATED
THREE_DS_AUTHENTICATION_CREATED -> Value.THREE_DS_AUTHENTICATION_CREATED
- TRANSFER_TRANSACTION_CREATED -> Value.TRANSFER_TRANSACTION_CREATED
TOKENIZATION_APPROVAL_REQUEST -> Value.TOKENIZATION_APPROVAL_REQUEST
TOKENIZATION_RESULT -> Value.TOKENIZATION_RESULT
TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE ->
@@ -457,7 +451,6 @@ private constructor(
SETTLEMENT_REPORT_UPDATED -> Known.SETTLEMENT_REPORT_UPDATED
STATEMENTS_CREATED -> Known.STATEMENTS_CREATED
THREE_DS_AUTHENTICATION_CREATED -> Known.THREE_DS_AUTHENTICATION_CREATED
- TRANSFER_TRANSACTION_CREATED -> Known.TRANSFER_TRANSACTION_CREATED
TOKENIZATION_APPROVAL_REQUEST -> Known.TOKENIZATION_APPROVAL_REQUEST
TOKENIZATION_RESULT -> Known.TOKENIZATION_RESULT
TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE ->
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionCreateParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionCreateParams.kt
index ca7d14c7..096ff939 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionCreateParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionCreateParams.kt
@@ -12,7 +12,7 @@ import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.util.Objects
@@ -140,8 +140,8 @@ constructor(
checkNotNull(url) { "`url` is required but was not set" },
description,
disabled,
- eventTypes?.toUnmodifiable(),
- additionalProperties.toUnmodifiable(),
+ eventTypes?.toImmutable(),
+ additionalProperties.toImmutable(),
)
}
@@ -298,10 +298,10 @@ constructor(
checkNotNull(url) { "`url` is required but was not set" },
description,
disabled,
- if (eventTypes.size == 0) null else eventTypes.toUnmodifiable(),
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ if (eventTypes.size == 0) null else eventTypes.toImmutable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
@@ -410,9 +410,6 @@ constructor(
val THREE_DS_AUTHENTICATION_CREATED =
EventType(JsonField.of("three_ds_authentication.created"))
- val TRANSFER_TRANSACTION_CREATED =
- EventType(JsonField.of("transfer_transaction.created"))
-
val TOKENIZATION_APPROVAL_REQUEST =
EventType(JsonField.of("tokenization.approval_request"))
@@ -463,7 +460,6 @@ constructor(
SETTLEMENT_REPORT_UPDATED,
STATEMENTS_CREATED,
THREE_DS_AUTHENTICATION_CREATED,
- TRANSFER_TRANSACTION_CREATED,
TOKENIZATION_APPROVAL_REQUEST,
TOKENIZATION_RESULT,
TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE,
@@ -505,7 +501,6 @@ constructor(
SETTLEMENT_REPORT_UPDATED,
STATEMENTS_CREATED,
THREE_DS_AUTHENTICATION_CREATED,
- TRANSFER_TRANSACTION_CREATED,
TOKENIZATION_APPROVAL_REQUEST,
TOKENIZATION_RESULT,
TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE,
@@ -552,7 +547,6 @@ constructor(
SETTLEMENT_REPORT_UPDATED -> Value.SETTLEMENT_REPORT_UPDATED
STATEMENTS_CREATED -> Value.STATEMENTS_CREATED
THREE_DS_AUTHENTICATION_CREATED -> Value.THREE_DS_AUTHENTICATION_CREATED
- TRANSFER_TRANSACTION_CREATED -> Value.TRANSFER_TRANSACTION_CREATED
TOKENIZATION_APPROVAL_REQUEST -> Value.TOKENIZATION_APPROVAL_REQUEST
TOKENIZATION_RESULT -> Value.TOKENIZATION_RESULT
TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE ->
@@ -601,7 +595,6 @@ constructor(
SETTLEMENT_REPORT_UPDATED -> Known.SETTLEMENT_REPORT_UPDATED
STATEMENTS_CREATED -> Known.STATEMENTS_CREATED
THREE_DS_AUTHENTICATION_CREATED -> Known.THREE_DS_AUTHENTICATION_CREATED
- TRANSFER_TRANSACTION_CREATED -> Known.TRANSFER_TRANSACTION_CREATED
TOKENIZATION_APPROVAL_REQUEST -> Known.TOKENIZATION_APPROVAL_REQUEST
TOKENIZATION_RESULT -> Known.TOKENIZATION_RESULT
TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE ->
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionDeleteParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionDeleteParams.kt
index 924b5137..b9663762 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionDeleteParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionDeleteParams.kt
@@ -4,7 +4,7 @@ package com.lithic.api.models
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -139,9 +139,9 @@ constructor(
checkNotNull(eventSubscriptionToken) {
"`eventSubscriptionToken` is required but was not set"
},
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListAttemptsPage.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListAttemptsPage.kt
index 249122a1..f55e16cd 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListAttemptsPage.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListAttemptsPage.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.blocking.events.SubscriptionService
import java.util.Objects
@@ -169,7 +169,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListAttemptsPageAsync.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListAttemptsPageAsync.kt
index 58481ba6..06d45807 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListAttemptsPageAsync.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListAttemptsPageAsync.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.async.events.SubscriptionServiceAsync
import java.util.Objects
import kotlinx.coroutines.flow.Flow
@@ -171,7 +171,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListAttemptsParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListAttemptsParams.kt
index 907c01c2..d009ec37 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListAttemptsParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListAttemptsParams.kt
@@ -7,7 +7,7 @@ import com.lithic.api.core.Enum
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.time.OffsetDateTime
@@ -54,7 +54,7 @@ constructor(
this.startingAfter?.let { params.put("starting_after", listOf(it.toString())) }
this.status?.let { params.put("status", listOf(it.toString())) }
params.putAll(additionalQueryParams)
- return params.toUnmodifiable()
+ return params.toImmutable()
}
internal fun getHeaders(): Map> = additionalHeaders
@@ -203,8 +203,8 @@ constructor(
pageSize,
startingAfter,
status,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListPage.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListPage.kt
index 1370331f..4ff0ccff 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListPage.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListPage.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.blocking.events.SubscriptionService
import java.util.Objects
@@ -169,7 +169,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListPageAsync.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListPageAsync.kt
index 76c8e19e..c852d3bc 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListPageAsync.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListPageAsync.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.async.events.SubscriptionServiceAsync
import java.util.Objects
import kotlinx.coroutines.flow.Flow
@@ -171,7 +171,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListParams.kt
index 9dba7de9..06f3e6c1 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -28,7 +28,7 @@ constructor(
this.pageSize?.let { params.put("page_size", listOf(it.toString())) }
this.startingAfter?.let { params.put("starting_after", listOf(it.toString())) }
params.putAll(additionalQueryParams)
- return params.toUnmodifiable()
+ return params.toImmutable()
}
internal fun getHeaders(): Map> = additionalHeaders
@@ -136,8 +136,8 @@ constructor(
endingBefore,
pageSize,
startingAfter,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRecoverParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRecoverParams.kt
index 44c1df48..f7b772a0 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRecoverParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRecoverParams.kt
@@ -4,7 +4,7 @@ package com.lithic.api.models
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.time.OffsetDateTime
import java.time.format.DateTimeFormatter
@@ -39,7 +39,7 @@ constructor(
params.put("end", listOf(DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(it)))
}
params.putAll(additionalQueryParams)
- return params.toUnmodifiable()
+ return params.toImmutable()
}
internal fun getHeaders(): Map> = additionalHeaders
@@ -175,9 +175,9 @@ constructor(
},
begin,
end,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionReplayMissingParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionReplayMissingParams.kt
index a146b81b..2f6c4afd 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionReplayMissingParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionReplayMissingParams.kt
@@ -4,7 +4,7 @@ package com.lithic.api.models
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.time.OffsetDateTime
import java.time.format.DateTimeFormatter
@@ -39,7 +39,7 @@ constructor(
params.put("end", listOf(DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(it)))
}
params.putAll(additionalQueryParams)
- return params.toUnmodifiable()
+ return params.toImmutable()
}
internal fun getHeaders(): Map> = additionalHeaders
@@ -178,9 +178,9 @@ constructor(
},
begin,
end,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRetrieveParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRetrieveParams.kt
index 7bfd6fde..d6d14c49 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRetrieveParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRetrieveParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -116,8 +116,8 @@ constructor(
checkNotNull(eventSubscriptionToken) {
"`eventSubscriptionToken` is required but was not set"
},
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRetrieveSecretParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRetrieveSecretParams.kt
index c85bbaf3..37b8d504 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRetrieveSecretParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRetrieveSecretParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -118,8 +118,8 @@ constructor(
checkNotNull(eventSubscriptionToken) {
"`eventSubscriptionToken` is required but was not set"
},
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRotateSecretParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRotateSecretParams.kt
index 1f876f9c..8c921383 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRotateSecretParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionRotateSecretParams.kt
@@ -4,7 +4,7 @@ package com.lithic.api.models
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -141,9 +141,9 @@ constructor(
checkNotNull(eventSubscriptionToken) {
"`eventSubscriptionToken` is required but was not set"
},
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionSendSimulatedExampleParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionSendSimulatedExampleParams.kt
index 37b7107f..b5e203e7 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionSendSimulatedExampleParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionSendSimulatedExampleParams.kt
@@ -12,7 +12,7 @@ import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.util.Objects
@@ -100,7 +100,7 @@ constructor(
fun build(): EventSubscriptionSendSimulatedExampleBody =
EventSubscriptionSendSimulatedExampleBody(
eventType,
- additionalProperties.toUnmodifiable()
+ additionalProperties.toImmutable()
)
}
@@ -242,9 +242,9 @@ constructor(
"`eventSubscriptionToken` is required but was not set"
},
eventType,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
@@ -353,9 +353,6 @@ constructor(
val THREE_DS_AUTHENTICATION_CREATED =
EventType(JsonField.of("three_ds_authentication.created"))
- val TRANSFER_TRANSACTION_CREATED =
- EventType(JsonField.of("transfer_transaction.created"))
-
val TOKENIZATION_APPROVAL_REQUEST =
EventType(JsonField.of("tokenization.approval_request"))
@@ -406,7 +403,6 @@ constructor(
SETTLEMENT_REPORT_UPDATED,
STATEMENTS_CREATED,
THREE_DS_AUTHENTICATION_CREATED,
- TRANSFER_TRANSACTION_CREATED,
TOKENIZATION_APPROVAL_REQUEST,
TOKENIZATION_RESULT,
TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE,
@@ -448,7 +444,6 @@ constructor(
SETTLEMENT_REPORT_UPDATED,
STATEMENTS_CREATED,
THREE_DS_AUTHENTICATION_CREATED,
- TRANSFER_TRANSACTION_CREATED,
TOKENIZATION_APPROVAL_REQUEST,
TOKENIZATION_RESULT,
TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE,
@@ -495,7 +490,6 @@ constructor(
SETTLEMENT_REPORT_UPDATED -> Value.SETTLEMENT_REPORT_UPDATED
STATEMENTS_CREATED -> Value.STATEMENTS_CREATED
THREE_DS_AUTHENTICATION_CREATED -> Value.THREE_DS_AUTHENTICATION_CREATED
- TRANSFER_TRANSACTION_CREATED -> Value.TRANSFER_TRANSACTION_CREATED
TOKENIZATION_APPROVAL_REQUEST -> Value.TOKENIZATION_APPROVAL_REQUEST
TOKENIZATION_RESULT -> Value.TOKENIZATION_RESULT
TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE ->
@@ -544,7 +538,6 @@ constructor(
SETTLEMENT_REPORT_UPDATED -> Known.SETTLEMENT_REPORT_UPDATED
STATEMENTS_CREATED -> Known.STATEMENTS_CREATED
THREE_DS_AUTHENTICATION_CREATED -> Known.THREE_DS_AUTHENTICATION_CREATED
- TRANSFER_TRANSACTION_CREATED -> Known.TRANSFER_TRANSACTION_CREATED
TOKENIZATION_APPROVAL_REQUEST -> Known.TOKENIZATION_APPROVAL_REQUEST
TOKENIZATION_RESULT -> Known.TOKENIZATION_RESULT
TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE ->
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionUpdateParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionUpdateParams.kt
index c53f5119..33700ba4 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionUpdateParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionUpdateParams.kt
@@ -12,7 +12,7 @@ import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.util.Objects
@@ -150,8 +150,8 @@ constructor(
checkNotNull(url) { "`url` is required but was not set" },
description,
disabled,
- eventTypes?.toUnmodifiable(),
- additionalProperties.toUnmodifiable(),
+ eventTypes?.toImmutable(),
+ additionalProperties.toImmutable(),
)
}
@@ -317,10 +317,10 @@ constructor(
checkNotNull(url) { "`url` is required but was not set" },
description,
disabled,
- if (eventTypes.size == 0) null else eventTypes.toUnmodifiable(),
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ if (eventTypes.size == 0) null else eventTypes.toImmutable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
@@ -429,9 +429,6 @@ constructor(
val THREE_DS_AUTHENTICATION_CREATED =
EventType(JsonField.of("three_ds_authentication.created"))
- val TRANSFER_TRANSACTION_CREATED =
- EventType(JsonField.of("transfer_transaction.created"))
-
val TOKENIZATION_APPROVAL_REQUEST =
EventType(JsonField.of("tokenization.approval_request"))
@@ -482,7 +479,6 @@ constructor(
SETTLEMENT_REPORT_UPDATED,
STATEMENTS_CREATED,
THREE_DS_AUTHENTICATION_CREATED,
- TRANSFER_TRANSACTION_CREATED,
TOKENIZATION_APPROVAL_REQUEST,
TOKENIZATION_RESULT,
TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE,
@@ -524,7 +520,6 @@ constructor(
SETTLEMENT_REPORT_UPDATED,
STATEMENTS_CREATED,
THREE_DS_AUTHENTICATION_CREATED,
- TRANSFER_TRANSACTION_CREATED,
TOKENIZATION_APPROVAL_REQUEST,
TOKENIZATION_RESULT,
TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE,
@@ -571,7 +566,6 @@ constructor(
SETTLEMENT_REPORT_UPDATED -> Value.SETTLEMENT_REPORT_UPDATED
STATEMENTS_CREATED -> Value.STATEMENTS_CREATED
THREE_DS_AUTHENTICATION_CREATED -> Value.THREE_DS_AUTHENTICATION_CREATED
- TRANSFER_TRANSACTION_CREATED -> Value.TRANSFER_TRANSACTION_CREATED
TOKENIZATION_APPROVAL_REQUEST -> Value.TOKENIZATION_APPROVAL_REQUEST
TOKENIZATION_RESULT -> Value.TOKENIZATION_RESULT
TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE ->
@@ -620,7 +614,6 @@ constructor(
SETTLEMENT_REPORT_UPDATED -> Known.SETTLEMENT_REPORT_UPDATED
STATEMENTS_CREATED -> Known.STATEMENTS_CREATED
THREE_DS_AUTHENTICATION_CREATED -> Known.THREE_DS_AUTHENTICATION_CREATED
- TRANSFER_TRANSACTION_CREATED -> Known.TRANSFER_TRANSACTION_CREATED
TOKENIZATION_APPROVAL_REQUEST -> Known.TOKENIZATION_APPROVAL_REQUEST
TOKENIZATION_RESULT -> Known.TOKENIZATION_RESULT
TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE ->
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExtendedCredit.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExtendedCredit.kt
index c76e2da9..f4350ad2 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExtendedCredit.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExtendedCredit.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import java.util.Objects
@JsonDeserialize(builder = ExtendedCredit.Builder::class)
@@ -79,7 +79,7 @@ private constructor(
}
fun build(): ExtendedCredit =
- ExtendedCredit(creditExtended, additionalProperties.toUnmodifiable())
+ ExtendedCredit(creditExtended, additionalProperties.toImmutable())
}
override fun equals(other: Any?): Boolean {
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountAddress.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountAddress.kt
index bc4df52b..ceae112e 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountAddress.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountAddress.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import java.util.Objects
@JsonDeserialize(builder = ExternalBankAccountAddress.Builder::class)
@@ -154,7 +154,7 @@ private constructor(
state,
postalCode,
country,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateParams.kt
index 144fcd85..ea822184 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateParams.kt
@@ -21,7 +21,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
import com.lithic.api.core.getOrThrow
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.time.LocalDate
@@ -200,6 +200,21 @@ constructor(
override fun ObjectCodec.deserialize(node: JsonNode): ExternalBankAccountCreateBody {
val json = JsonValue.fromJsonNode(node)
+ val verificationMethod = json.asObject()?.get("verification_method")?.asString()
+
+ if (verificationMethod == "EXTERNALLY_VERIFIED") {
+ tryDeserialize(
+ node,
+ jacksonTypeRef()
+ )
+ ?.let {
+ return ExternalBankAccountCreateBody(
+ externallyVerifiedCreateBankAccountApiRequest = it,
+ _json = json
+ )
+ }
+ }
+
tryDeserialize(node, jacksonTypeRef())
?.let {
return ExternalBankAccountCreateBody(
@@ -213,16 +228,6 @@ constructor(
_json = json
)
}
- tryDeserialize(
- node,
- jacksonTypeRef()
- )
- ?.let {
- return ExternalBankAccountCreateBody(
- externallyVerifiedCreateBankAccountApiRequest = it,
- _json = json
- )
- }
return ExternalBankAccountCreateBody(_json = json)
}
@@ -372,8 +377,8 @@ constructor(
bankVerifiedCreateBankAccountApiRequest,
plaidCreateBankAccountApiRequest,
externallyVerifiedCreateBankAccountApiRequest,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
@@ -637,7 +642,7 @@ constructor(
checkNotNull(financialAccountToken) {
"`financialAccountToken` is required but was not set"
},
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -879,7 +884,7 @@ constructor(
dob,
userDefinedId,
checkNotNull(processorToken) { "`processorToken` is required but was not set" },
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -1139,7 +1144,7 @@ constructor(
checkNotNull(country) { "`country` is required but was not set" },
checkNotNull(currency) { "`currency` is required but was not set" },
address,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponse.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponse.kt
index 68ebd264..f1d214e8 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponse.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponse.kt
@@ -13,7 +13,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.time.LocalDate
import java.time.OffsetDateTime
@@ -602,7 +602,7 @@ private constructor(
state,
verificationState,
address,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListPage.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListPage.kt
index dcaaa153..e55dc151 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListPage.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListPage.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.blocking.ExternalBankAccountService
import java.util.Objects
@@ -171,7 +171,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListPageAsync.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListPageAsync.kt
index 05d55617..1979010b 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListPageAsync.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListPageAsync.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.async.ExternalBankAccountServiceAsync
import java.util.Objects
import kotlinx.coroutines.flow.Flow
@@ -173,7 +173,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListParams.kt
index d0be5a0c..fc217bde 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListParams.kt
@@ -7,7 +7,7 @@ import com.lithic.api.core.Enum
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.util.Objects
@@ -61,7 +61,7 @@ constructor(
params.put("verification_states", listOf(it.joinToString(separator = ",")))
}
params.putAll(additionalQueryParams)
- return params.toUnmodifiable()
+ return params.toImmutable()
}
internal fun getHeaders(): Map> = additionalHeaders
@@ -218,16 +218,16 @@ constructor(
fun build(): ExternalBankAccountListParams =
ExternalBankAccountListParams(
accountToken,
- if (accountTypes.size == 0) null else accountTypes.toUnmodifiable(),
- if (countries.size == 0) null else countries.toUnmodifiable(),
+ if (accountTypes.size == 0) null else accountTypes.toImmutable(),
+ if (countries.size == 0) null else countries.toImmutable(),
endingBefore,
- if (ownerTypes.size == 0) null else ownerTypes.toUnmodifiable(),
+ if (ownerTypes.size == 0) null else ownerTypes.toImmutable(),
pageSize,
startingAfter,
- if (states.size == 0) null else states.toUnmodifiable(),
- if (verificationStates.size == 0) null else verificationStates.toUnmodifiable(),
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ if (states.size == 0) null else states.toImmutable(),
+ if (verificationStates.size == 0) null else verificationStates.toImmutable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListResponse.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListResponse.kt
index 587b34ba..b103c352 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListResponse.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListResponse.kt
@@ -13,7 +13,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.time.LocalDate
import java.time.OffsetDateTime
@@ -602,7 +602,7 @@ private constructor(
state,
verificationState,
address,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountMicroDepositCreateParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountMicroDepositCreateParams.kt
index 2af640d6..ab8b628c 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountMicroDepositCreateParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountMicroDepositCreateParams.kt
@@ -9,7 +9,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -96,8 +96,8 @@ constructor(
fun build(): ExternalBankAccountMicroDepositCreateBody =
ExternalBankAccountMicroDepositCreateBody(
checkNotNull(microDeposits) { "`microDeposits` is required but was not set" }
- .toUnmodifiable(),
- additionalProperties.toUnmodifiable()
+ .toImmutable(),
+ additionalProperties.toImmutable()
)
}
@@ -243,10 +243,10 @@ constructor(
"`externalBankAccountToken` is required but was not set"
},
checkNotNull(microDeposits) { "`microDeposits` is required but was not set" }
- .toUnmodifiable(),
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ .toImmutable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveParams.kt
index b1d666f5..31b500a5 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -117,8 +117,8 @@ constructor(
checkNotNull(externalBankAccountToken) {
"`externalBankAccountToken` is required but was not set"
},
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponse.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponse.kt
index 9dd8d6e8..f2e447a7 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponse.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponse.kt
@@ -13,7 +13,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.time.LocalDate
import java.time.OffsetDateTime
@@ -603,7 +603,7 @@ private constructor(
state,
verificationState,
address,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsParams.kt
index 301e48fa..91223fbf 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsParams.kt
@@ -9,7 +9,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -101,7 +101,7 @@ constructor(
fun build(): ExternalBankAccountRetryMicroDepositsBody =
ExternalBankAccountRetryMicroDepositsBody(
financialAccountToken,
- additionalProperties.toUnmodifiable()
+ additionalProperties.toImmutable()
)
}
@@ -245,9 +245,9 @@ constructor(
"`externalBankAccountToken` is required but was not set"
},
financialAccountToken,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsResponse.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsResponse.kt
index aded1c38..e0f003a9 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsResponse.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsResponse.kt
@@ -13,7 +13,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.time.LocalDate
import java.time.OffsetDateTime
@@ -607,7 +607,7 @@ private constructor(
state,
verificationState,
address,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryPrenoteParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryPrenoteParams.kt
index 33ad1504..dcdc0187 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryPrenoteParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryPrenoteParams.kt
@@ -9,7 +9,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -98,7 +98,7 @@ constructor(
fun build(): ExternalBankAccountRetryPrenoteBody =
ExternalBankAccountRetryPrenoteBody(
financialAccountToken,
- additionalProperties.toUnmodifiable()
+ additionalProperties.toImmutable()
)
}
@@ -239,9 +239,9 @@ constructor(
"`externalBankAccountToken` is required but was not set"
},
financialAccountToken,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryPrenoteResponse.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryPrenoteResponse.kt
index c2ac1797..3de61a3e 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryPrenoteResponse.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryPrenoteResponse.kt
@@ -13,7 +13,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.time.LocalDate
import java.time.OffsetDateTime
@@ -604,7 +604,7 @@ private constructor(
state,
verificationState,
address,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateParams.kt
index 52cbcfa9..bfbf0d32 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateParams.kt
@@ -9,7 +9,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.time.LocalDate
import java.util.Objects
@@ -209,7 +209,7 @@ constructor(
owner,
ownerType,
userDefinedId,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -395,9 +395,9 @@ constructor(
owner,
ownerType,
userDefinedId,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponse.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponse.kt
index cb400e60..4f622d08 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponse.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponse.kt
@@ -13,7 +13,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.time.LocalDate
import java.time.OffsetDateTime
@@ -602,7 +602,7 @@ private constructor(
state,
verificationState,
address,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPayment.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPayment.kt
index 79978a85..45dd4054 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPayment.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPayment.kt
@@ -13,7 +13,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.time.LocalDate
import java.time.OffsetDateTime
@@ -275,13 +275,13 @@ private constructor(
settledAmount,
pendingAmount,
currency,
- events.map { it.toUnmodifiable() },
+ events.map { it.toImmutable() },
created,
updated,
userDefinedId,
financialAccountToken,
paymentType,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -525,12 +525,12 @@ private constructor(
amount,
type,
result,
- detailedResults.map { it.toUnmodifiable() },
+ detailedResults.map { it.toImmutable() },
created,
token,
memo,
effectiveDate,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentCancelParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentCancelParams.kt
index 52d2d516..bc38ce4b 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentCancelParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentCancelParams.kt
@@ -9,7 +9,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.time.LocalDate
import java.util.Objects
@@ -110,7 +110,7 @@ constructor(
ExternalPaymentCancelBody(
checkNotNull(effectiveDate) { "`effectiveDate` is required but was not set" },
memo,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -251,9 +251,9 @@ constructor(
},
checkNotNull(effectiveDate) { "`effectiveDate` is required but was not set" },
memo,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentCreateParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentCreateParams.kt
index 4715e5bc..1b95c5d4 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentCreateParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentCreateParams.kt
@@ -12,7 +12,7 @@ import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.time.LocalDate
@@ -202,7 +202,7 @@ constructor(
memo,
progressTo,
userDefinedId,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -377,9 +377,9 @@ constructor(
memo,
progressTo,
userDefinedId,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentListPage.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentListPage.kt
index b150a594..f145aa86 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentListPage.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentListPage.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.blocking.ExternalPaymentService
import java.util.Objects
@@ -169,7 +169,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentListPageAsync.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentListPageAsync.kt
index f44dfdb9..f317d9eb 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentListPageAsync.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentListPageAsync.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.async.ExternalPaymentServiceAsync
import java.util.Objects
import kotlinx.coroutines.flow.Flow
@@ -171,7 +171,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentListParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentListParams.kt
index 48d894d1..1f56ede1 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentListParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentListParams.kt
@@ -7,7 +7,7 @@ import com.lithic.api.core.Enum
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.time.OffsetDateTime
@@ -71,7 +71,7 @@ constructor(
this.startingAfter?.let { params.put("starting_after", listOf(it.toString())) }
this.status?.let { params.put("status", listOf(it.toString())) }
params.putAll(additionalQueryParams)
- return params.toUnmodifiable()
+ return params.toImmutable()
}
internal fun getHeaders(): Map> = additionalHeaders
@@ -233,8 +233,8 @@ constructor(
result,
startingAfter,
status,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentReleaseParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentReleaseParams.kt
index 424d104e..a9fc7b9f 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentReleaseParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentReleaseParams.kt
@@ -9,7 +9,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.time.LocalDate
import java.util.Objects
@@ -110,7 +110,7 @@ constructor(
ExternalPaymentReleaseBody(
checkNotNull(effectiveDate) { "`effectiveDate` is required but was not set" },
memo,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -251,9 +251,9 @@ constructor(
},
checkNotNull(effectiveDate) { "`effectiveDate` is required but was not set" },
memo,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentRetrieveParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentRetrieveParams.kt
index 608fddf1..feab1435 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentRetrieveParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentRetrieveParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.util.Objects
@@ -115,8 +115,8 @@ constructor(
checkNotNull(externalPaymentToken) {
"`externalPaymentToken` is required but was not set"
},
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentReverseParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentReverseParams.kt
index fe29fc55..5347da57 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentReverseParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentReverseParams.kt
@@ -9,7 +9,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.time.LocalDate
import java.util.Objects
@@ -110,7 +110,7 @@ constructor(
ExternalPaymentReverseBody(
checkNotNull(effectiveDate) { "`effectiveDate` is required but was not set" },
memo,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -251,9 +251,9 @@ constructor(
},
checkNotNull(effectiveDate) { "`effectiveDate` is required but was not set" },
memo,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentSettleParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentSettleParams.kt
index ef08220d..22595af2 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentSettleParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentSettleParams.kt
@@ -12,7 +12,7 @@ import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.time.LocalDate
@@ -129,7 +129,7 @@ constructor(
checkNotNull(effectiveDate) { "`effectiveDate` is required but was not set" },
memo,
progressTo,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -277,9 +277,9 @@ constructor(
checkNotNull(effectiveDate) { "`effectiveDate` is required but was not set" },
memo,
progressTo,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccount.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccount.kt
index 1ea59307..ac80fa40 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccount.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccount.kt
@@ -13,7 +13,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.time.OffsetDateTime
import java.util.Objects
@@ -241,7 +241,7 @@ private constructor(
accountToken,
isForBenefitOf,
creditConfiguration,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -253,7 +253,9 @@ private constructor(
private val externalBankAccountToken: JsonField,
private val creditProductToken: JsonField,
private val tier: JsonField,
+ private val isSpendBlocked: JsonField,
private val financialAccountState: JsonField,
+ private val chargedOffReason: JsonField,
private val additionalProperties: Map,
) {
@@ -270,10 +272,16 @@ private constructor(
/** Tier assigned to the financial account */
fun tier(): String? = tier.getNullable("tier")
+ fun isSpendBlocked(): Boolean = isSpendBlocked.getRequired("is_spend_blocked")
+
/** State of the financial account */
fun financialAccountState(): FinancialAccountState? =
financialAccountState.getNullable("financial_account_state")
+ /** Reason for the financial account being marked as Charged Off */
+ fun chargedOffReason(): ChargedOffReason? =
+ chargedOffReason.getNullable("charged_off_reason")
+
@JsonProperty("credit_limit") @ExcludeMissing fun _creditLimit() = creditLimit
@JsonProperty("external_bank_account_token")
@@ -288,11 +296,18 @@ private constructor(
/** Tier assigned to the financial account */
@JsonProperty("tier") @ExcludeMissing fun _tier() = tier
+ @JsonProperty("is_spend_blocked") @ExcludeMissing fun _isSpendBlocked() = isSpendBlocked
+
/** State of the financial account */
@JsonProperty("financial_account_state")
@ExcludeMissing
fun _financialAccountState() = financialAccountState
+ /** Reason for the financial account being marked as Charged Off */
+ @JsonProperty("charged_off_reason")
+ @ExcludeMissing
+ fun _chargedOffReason() = chargedOffReason
+
@JsonAnyGetter
@ExcludeMissing
fun _additionalProperties(): Map = additionalProperties
@@ -303,7 +318,9 @@ private constructor(
externalBankAccountToken()
creditProductToken()
tier()
+ isSpendBlocked()
financialAccountState()
+ chargedOffReason()
validated = true
}
}
@@ -321,7 +338,9 @@ private constructor(
private var externalBankAccountToken: JsonField = JsonMissing.of()
private var creditProductToken: JsonField = JsonMissing.of()
private var tier: JsonField = JsonMissing.of()
+ private var isSpendBlocked: JsonField = JsonMissing.of()
private var financialAccountState: JsonField = JsonMissing.of()
+ private var chargedOffReason: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap = mutableMapOf()
internal fun from(financialAccountCreditConfig: FinancialAccountCreditConfig) = apply {
@@ -330,7 +349,9 @@ private constructor(
financialAccountCreditConfig.externalBankAccountToken
this.creditProductToken = financialAccountCreditConfig.creditProductToken
this.tier = financialAccountCreditConfig.tier
+ this.isSpendBlocked = financialAccountCreditConfig.isSpendBlocked
this.financialAccountState = financialAccountCreditConfig.financialAccountState
+ this.chargedOffReason = financialAccountCreditConfig.chargedOffReason
additionalProperties(financialAccountCreditConfig.additionalProperties)
}
@@ -368,6 +389,15 @@ private constructor(
@ExcludeMissing
fun tier(tier: JsonField) = apply { this.tier = tier }
+ fun isSpendBlocked(isSpendBlocked: Boolean) =
+ isSpendBlocked(JsonField.of(isSpendBlocked))
+
+ @JsonProperty("is_spend_blocked")
+ @ExcludeMissing
+ fun isSpendBlocked(isSpendBlocked: JsonField) = apply {
+ this.isSpendBlocked = isSpendBlocked
+ }
+
/** State of the financial account */
fun financialAccountState(financialAccountState: FinancialAccountState) =
financialAccountState(JsonField.of(financialAccountState))
@@ -380,6 +410,17 @@ private constructor(
this.financialAccountState = financialAccountState
}
+ /** Reason for the financial account being marked as Charged Off */
+ fun chargedOffReason(chargedOffReason: ChargedOffReason) =
+ chargedOffReason(JsonField.of(chargedOffReason))
+
+ /** Reason for the financial account being marked as Charged Off */
+ @JsonProperty("charged_off_reason")
+ @ExcludeMissing
+ fun chargedOffReason(chargedOffReason: JsonField) = apply {
+ this.chargedOffReason = chargedOffReason
+ }
+
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
this.additionalProperties.putAll(additionalProperties)
@@ -400,11 +441,70 @@ private constructor(
externalBankAccountToken,
creditProductToken,
tier,
+ isSpendBlocked,
financialAccountState,
- additionalProperties.toUnmodifiable(),
+ chargedOffReason,
+ additionalProperties.toImmutable(),
)
}
+ class ChargedOffReason
+ @JsonCreator
+ private constructor(
+ private val value: JsonField,
+ ) : Enum {
+
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return /* spotless:off */ other is ChargedOffReason && this.value == other.value /* spotless:on */
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+
+ companion object {
+
+ val DELINQUENT = ChargedOffReason(JsonField.of("DELINQUENT"))
+
+ val FRAUD = ChargedOffReason(JsonField.of("FRAUD"))
+
+ fun of(value: String) = ChargedOffReason(JsonField.of(value))
+ }
+
+ enum class Known {
+ DELINQUENT,
+ FRAUD,
+ }
+
+ enum class Value {
+ DELINQUENT,
+ FRAUD,
+ _UNKNOWN,
+ }
+
+ fun value(): Value =
+ when (this) {
+ DELINQUENT -> Value.DELINQUENT
+ FRAUD -> Value.FRAUD
+ else -> Value._UNKNOWN
+ }
+
+ fun known(): Known =
+ when (this) {
+ DELINQUENT -> Known.DELINQUENT
+ FRAUD -> Known.FRAUD
+ else -> throw LithicInvalidDataException("Unknown ChargedOffReason: $value")
+ }
+
+ fun asString(): String = _value().asStringOrThrow()
+ }
+
class FinancialAccountState
@JsonCreator
private constructor(
@@ -433,6 +533,8 @@ private constructor(
val DELINQUENT = FinancialAccountState(JsonField.of("DELINQUENT"))
+ val CHARGED_OFF = FinancialAccountState(JsonField.of("CHARGED_OFF"))
+
fun of(value: String) = FinancialAccountState(JsonField.of(value))
}
@@ -440,12 +542,14 @@ private constructor(
PENDING,
CURRENT,
DELINQUENT,
+ CHARGED_OFF,
}
enum class Value {
PENDING,
CURRENT,
DELINQUENT,
+ CHARGED_OFF,
_UNKNOWN,
}
@@ -454,6 +558,7 @@ private constructor(
PENDING -> Value.PENDING
CURRENT -> Value.CURRENT
DELINQUENT -> Value.DELINQUENT
+ CHARGED_OFF -> Value.CHARGED_OFF
else -> Value._UNKNOWN
}
@@ -462,6 +567,7 @@ private constructor(
PENDING -> Known.PENDING
CURRENT -> Known.CURRENT
DELINQUENT -> Known.DELINQUENT
+ CHARGED_OFF -> Known.CHARGED_OFF
else ->
throw LithicInvalidDataException("Unknown FinancialAccountState: $value")
}
@@ -474,20 +580,20 @@ private constructor(
return true
}
- return /* spotless:off */ other is FinancialAccountCreditConfig && this.creditLimit == other.creditLimit && this.externalBankAccountToken == other.externalBankAccountToken && this.creditProductToken == other.creditProductToken && this.tier == other.tier && this.financialAccountState == other.financialAccountState && this.additionalProperties == other.additionalProperties /* spotless:on */
+ return /* spotless:off */ other is FinancialAccountCreditConfig && this.creditLimit == other.creditLimit && this.externalBankAccountToken == other.externalBankAccountToken && this.creditProductToken == other.creditProductToken && this.tier == other.tier && this.isSpendBlocked == other.isSpendBlocked && this.financialAccountState == other.financialAccountState && this.chargedOffReason == other.chargedOffReason && this.additionalProperties == other.additionalProperties /* spotless:on */
}
private var hashCode: Int = 0
override fun hashCode(): Int {
if (hashCode == 0) {
- hashCode = /* spotless:off */ Objects.hash(creditLimit, externalBankAccountToken, creditProductToken, tier, financialAccountState, additionalProperties) /* spotless:on */
+ hashCode = /* spotless:off */ Objects.hash(creditLimit, externalBankAccountToken, creditProductToken, tier, isSpendBlocked, financialAccountState, chargedOffReason, additionalProperties) /* spotless:on */
}
return hashCode
}
override fun toString() =
- "FinancialAccountCreditConfig{creditLimit=$creditLimit, externalBankAccountToken=$externalBankAccountToken, creditProductToken=$creditProductToken, tier=$tier, financialAccountState=$financialAccountState, additionalProperties=$additionalProperties}"
+ "FinancialAccountCreditConfig{creditLimit=$creditLimit, externalBankAccountToken=$externalBankAccountToken, creditProductToken=$creditProductToken, tier=$tier, isSpendBlocked=$isSpendBlocked, financialAccountState=$financialAccountState, chargedOffReason=$chargedOffReason, additionalProperties=$additionalProperties}"
}
class Type
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccountBalanceListPage.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccountBalanceListPage.kt
index b4c5cfff..de4afcd1 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccountBalanceListPage.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccountBalanceListPage.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.blocking.financialAccounts.BalanceService
import java.util.Objects
@@ -155,7 +155,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccountBalanceListPageAsync.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccountBalanceListPageAsync.kt
index 8925ce8c..691f6958 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccountBalanceListPageAsync.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccountBalanceListPageAsync.kt
@@ -11,7 +11,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.services.async.financialAccounts.BalanceServiceAsync
import java.util.Objects
import kotlinx.coroutines.flow.Flow
@@ -157,7 +157,7 @@ private constructor(
Response(
data,
hasMore,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccountBalanceListParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccountBalanceListParams.kt
index 2bd07505..dcf9b899 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccountBalanceListParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccountBalanceListParams.kt
@@ -3,7 +3,7 @@
package com.lithic.api.models
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.models.*
import java.time.OffsetDateTime
import java.time.format.DateTimeFormatter
@@ -33,7 +33,7 @@ constructor(
params.put("last_transaction_event_token", listOf(it.toString()))
}
params.putAll(additionalQueryParams)
- return params.toUnmodifiable()
+ return params.toImmutable()
}
internal fun getHeaders(): Map> = additionalHeaders
@@ -152,8 +152,8 @@ constructor(
},
balanceDate,
lastTransactionEventToken,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
)
}
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccountChargeOffParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccountChargeOffParams.kt
new file mode 100644
index 00000000..7258ba37
--- /dev/null
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccountChargeOffParams.kt
@@ -0,0 +1,302 @@
+// 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.fasterxml.jackson.databind.annotation.JsonDeserialize
+import com.lithic.api.core.Enum
+import com.lithic.api.core.ExcludeMissing
+import com.lithic.api.core.JsonField
+import com.lithic.api.core.JsonValue
+import com.lithic.api.core.NoAutoDetect
+import com.lithic.api.core.toImmutable
+import com.lithic.api.errors.LithicInvalidDataException
+import com.lithic.api.models.*
+import java.util.Objects
+
+class FinancialAccountChargeOffParams
+constructor(
+ private val financialAccountToken: String,
+ private val reason: ChargedOffReason,
+ private val additionalQueryParams: Map>,
+ private val additionalHeaders: Map>,
+ private val additionalBodyProperties: Map,
+) {
+
+ fun financialAccountToken(): String = financialAccountToken
+
+ fun reason(): ChargedOffReason = reason
+
+ internal fun getBody(): FinancialAccountChargeOffBody {
+ return FinancialAccountChargeOffBody(reason, additionalBodyProperties)
+ }
+
+ internal fun getQueryParams(): Map> = additionalQueryParams
+
+ internal fun getHeaders(): Map> = additionalHeaders
+
+ fun getPathParam(index: Int): String {
+ return when (index) {
+ 0 -> financialAccountToken
+ else -> ""
+ }
+ }
+
+ @JsonDeserialize(builder = FinancialAccountChargeOffBody.Builder::class)
+ @NoAutoDetect
+ class FinancialAccountChargeOffBody
+ internal constructor(
+ private val reason: ChargedOffReason?,
+ private val additionalProperties: Map,
+ ) {
+
+ /** Reason for the financial account being marked as Charged Off */
+ @JsonProperty("reason") fun reason(): ChargedOffReason? = reason
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map = additionalProperties
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ fun builder() = Builder()
+ }
+
+ class Builder {
+
+ private var reason: ChargedOffReason? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ internal fun from(financialAccountChargeOffBody: FinancialAccountChargeOffBody) =
+ apply {
+ this.reason = financialAccountChargeOffBody.reason
+ additionalProperties(financialAccountChargeOffBody.additionalProperties)
+ }
+
+ /** Reason for the financial account being marked as Charged Off */
+ @JsonProperty("reason")
+ fun reason(reason: ChargedOffReason) = apply { this.reason = reason }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ @JsonAnySetter
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ this.additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun build(): FinancialAccountChargeOffBody =
+ FinancialAccountChargeOffBody(
+ checkNotNull(reason) { "`reason` is required but was not set" },
+ additionalProperties.toImmutable()
+ )
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return /* spotless:off */ other is FinancialAccountChargeOffBody && this.reason == other.reason && this.additionalProperties == other.additionalProperties /* spotless:on */
+ }
+
+ private var hashCode: Int = 0
+
+ override fun hashCode(): Int {
+ if (hashCode == 0) {
+ hashCode = /* spotless:off */ Objects.hash(reason, additionalProperties) /* spotless:on */
+ }
+ return hashCode
+ }
+
+ override fun toString() =
+ "FinancialAccountChargeOffBody{reason=$reason, additionalProperties=$additionalProperties}"
+ }
+
+ fun _additionalQueryParams(): Map> = additionalQueryParams
+
+ fun _additionalHeaders(): Map> = additionalHeaders
+
+ fun _additionalBodyProperties(): Map = additionalBodyProperties
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return /* spotless:off */ other is FinancialAccountChargeOffParams && this.financialAccountToken == other.financialAccountToken && this.reason == other.reason && this.additionalQueryParams == other.additionalQueryParams && this.additionalHeaders == other.additionalHeaders && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */
+ }
+
+ override fun hashCode(): Int {
+ return /* spotless:off */ Objects.hash(financialAccountToken, reason, additionalQueryParams, additionalHeaders, additionalBodyProperties) /* spotless:on */
+ }
+
+ override fun toString() =
+ "FinancialAccountChargeOffParams{financialAccountToken=$financialAccountToken, reason=$reason, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}"
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ fun builder() = Builder()
+ }
+
+ @NoAutoDetect
+ class Builder {
+
+ private var financialAccountToken: String? = null
+ private var reason: ChargedOffReason? = null
+ private var additionalQueryParams: MutableMap> = mutableMapOf()
+ private var additionalHeaders: MutableMap> = mutableMapOf()
+ private var additionalBodyProperties: MutableMap = mutableMapOf()
+
+ internal fun from(financialAccountChargeOffParams: FinancialAccountChargeOffParams) =
+ apply {
+ this.financialAccountToken = financialAccountChargeOffParams.financialAccountToken
+ this.reason = financialAccountChargeOffParams.reason
+ additionalQueryParams(financialAccountChargeOffParams.additionalQueryParams)
+ additionalHeaders(financialAccountChargeOffParams.additionalHeaders)
+ additionalBodyProperties(financialAccountChargeOffParams.additionalBodyProperties)
+ }
+
+ fun financialAccountToken(financialAccountToken: String) = apply {
+ this.financialAccountToken = financialAccountToken
+ }
+
+ /** Reason for the financial account being marked as Charged Off */
+ fun reason(reason: ChargedOffReason) = apply { this.reason = reason }
+
+ fun additionalQueryParams(additionalQueryParams: Map>) = apply {
+ this.additionalQueryParams.clear()
+ putAllQueryParams(additionalQueryParams)
+ }
+
+ fun putQueryParam(name: String, value: String) = apply {
+ this.additionalQueryParams.getOrPut(name) { mutableListOf() }.add(value)
+ }
+
+ fun putQueryParams(name: String, values: Iterable) = apply {
+ this.additionalQueryParams.getOrPut(name) { mutableListOf() }.addAll(values)
+ }
+
+ fun putAllQueryParams(additionalQueryParams: Map>) = apply {
+ additionalQueryParams.forEach(this::putQueryParams)
+ }
+
+ fun removeQueryParam(name: String) = apply {
+ this.additionalQueryParams.put(name, mutableListOf())
+ }
+
+ fun additionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.clear()
+ putAllHeaders(additionalHeaders)
+ }
+
+ fun putHeader(name: String, value: String) = apply {
+ this.additionalHeaders.getOrPut(name) { mutableListOf() }.add(value)
+ }
+
+ fun putHeaders(name: String, values: Iterable) = apply {
+ this.additionalHeaders.getOrPut(name) { mutableListOf() }.addAll(values)
+ }
+
+ fun putAllHeaders(additionalHeaders: Map>) = apply {
+ additionalHeaders.forEach(this::putHeaders)
+ }
+
+ fun removeHeader(name: String) = apply { this.additionalHeaders.put(name, mutableListOf()) }
+
+ fun additionalBodyProperties(additionalBodyProperties: Map) = apply {
+ this.additionalBodyProperties.clear()
+ this.additionalBodyProperties.putAll(additionalBodyProperties)
+ }
+
+ fun putAdditionalBodyProperty(key: String, value: JsonValue) = apply {
+ this.additionalBodyProperties.put(key, value)
+ }
+
+ fun putAllAdditionalBodyProperties(additionalBodyProperties: Map) =
+ apply {
+ this.additionalBodyProperties.putAll(additionalBodyProperties)
+ }
+
+ fun build(): FinancialAccountChargeOffParams =
+ FinancialAccountChargeOffParams(
+ checkNotNull(financialAccountToken) {
+ "`financialAccountToken` is required but was not set"
+ },
+ checkNotNull(reason) { "`reason` is required but was not set" },
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
+ )
+ }
+
+ class ChargedOffReason
+ @JsonCreator
+ private constructor(
+ private val value: JsonField,
+ ) : Enum {
+
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return /* spotless:off */ other is ChargedOffReason && this.value == other.value /* spotless:on */
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+
+ companion object {
+
+ val DELINQUENT = ChargedOffReason(JsonField.of("DELINQUENT"))
+
+ val FRAUD = ChargedOffReason(JsonField.of("FRAUD"))
+
+ fun of(value: String) = ChargedOffReason(JsonField.of(value))
+ }
+
+ enum class Known {
+ DELINQUENT,
+ FRAUD,
+ }
+
+ enum class Value {
+ DELINQUENT,
+ FRAUD,
+ _UNKNOWN,
+ }
+
+ fun value(): Value =
+ when (this) {
+ DELINQUENT -> Value.DELINQUENT
+ FRAUD -> Value.FRAUD
+ else -> Value._UNKNOWN
+ }
+
+ fun known(): Known =
+ when (this) {
+ DELINQUENT -> Known.DELINQUENT
+ FRAUD -> Known.FRAUD
+ else -> throw LithicInvalidDataException("Unknown ChargedOffReason: $value")
+ }
+
+ fun asString(): String = _value().asStringOrThrow()
+ }
+}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreateParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreateParams.kt
index c5d91bb7..543f6a0d 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreateParams.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreateParams.kt
@@ -12,7 +12,7 @@ import com.lithic.api.core.ExcludeMissing
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import com.lithic.api.models.*
import java.util.Objects
@@ -129,7 +129,7 @@ constructor(
checkNotNull(type) { "`type` is required but was not set" },
accountToken,
isForBenefitOf,
- additionalProperties.toUnmodifiable(),
+ additionalProperties.toImmutable(),
)
}
@@ -271,9 +271,9 @@ constructor(
checkNotNull(type) { "`type` is required but was not set" },
accountToken,
isForBenefitOf,
- additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
- additionalBodyProperties.toUnmodifiable(),
+ additionalQueryParams.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalHeaders.mapValues { it.value.toImmutable() }.toImmutable(),
+ additionalBodyProperties.toImmutable(),
)
}
diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreditConfig.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreditConfig.kt
index 5acc7827..c905d657 100644
--- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreditConfig.kt
+++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreditConfig.kt
@@ -13,7 +13,7 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.NoAutoDetect
-import com.lithic.api.core.toUnmodifiable
+import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.util.Objects
@@ -28,6 +28,7 @@ private constructor(
private val tier: JsonField,
private val financialAccountState: JsonField