diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 1bb2c3312..02bfb399e 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.394.0"
+ ".": "0.395.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 6f42a9fee..af0e17b5e 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 227
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-0281c1d774b1853b7b09bbce88b8d6e0301179b68d53627c5940edd7d2f8b180.yml
-openapi_spec_hash: e22a9d6a4f0f32976d0ac9dd7e6d7dd0
-config_hash: ca52ca9a2968f330339fd50c1a386e05
+configured_endpoints: 232
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7a47821c7d33caac95ba05890682dde6da257dbe86033e4f119aa626c11ae387.yml
+openapi_spec_hash: 0ccabc90834936bc2fcdeeee01e77a64
+config_hash: 8a9bb9e2d5dd0ccc3e78ad59f924fd3c
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1a12b3f93..5f3be5af3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 0.395.0 (2026-01-08)
+
+Full Changelog: [v0.394.0...v0.395.0](https://github.com/Increase/increase-java/compare/v0.394.0...v0.395.0)
+
+### Features
+
+* **api:** api update ([ec66695](https://github.com/Increase/increase-java/commit/ec6669584ccc894314cf256a01e1ae78652c8aa6))
+
## 0.394.0 (2026-01-07)
Full Changelog: [v0.393.0...v0.394.0](https://github.com/Increase/increase-java/compare/v0.393.0...v0.394.0)
diff --git a/README.md b/README.md
index 5a190ccee..bb2fa23ab 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.394.0)
-[](https://javadoc.io/doc/com.increase.api/increase-java/0.394.0)
+[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.395.0)
+[](https://javadoc.io/doc/com.increase.api/increase-java/0.395.0)
@@ -13,7 +13,7 @@ The Increase Java SDK is similar to the Increase Kotlin SDK but with minor diffe
-The REST API documentation can be found on [increase.com](https://increase.com/documentation). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.increase.api/increase-java/0.394.0).
+The REST API documentation can be found on [increase.com](https://increase.com/documentation). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.increase.api/increase-java/0.395.0).
@@ -24,7 +24,7 @@ The REST API documentation can be found on [increase.com](https://increase.com/d
### Gradle
```kotlin
-implementation("com.increase.api:increase-java:0.394.0")
+implementation("com.increase.api:increase-java:0.395.0")
```
### Maven
@@ -33,7 +33,7 @@ implementation("com.increase.api:increase-java:0.394.0")
com.increase.api
increase-java
- 0.394.0
+ 0.395.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index 2f890226f..c7fd06b53 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.increase.api"
- version = "0.394.0" // x-release-please-version
+ version = "0.395.0" // x-release-please-version
}
subprojects {
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClient.kt b/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClient.kt
index e3f11a5cb..45a95b6a6 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClient.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClient.kt
@@ -56,6 +56,7 @@ import com.increase.api.services.blocking.RealTimePaymentsTransferService
import com.increase.api.services.blocking.RoutingNumberService
import com.increase.api.services.blocking.SimulationService
import com.increase.api.services.blocking.SupplementalDocumentService
+import com.increase.api.services.blocking.SwiftTransferService
import com.increase.api.services.blocking.TransactionService
import com.increase.api.services.blocking.WebhookService
import com.increase.api.services.blocking.WireDrawdownRequestService
@@ -152,6 +153,8 @@ interface IncreaseClient {
fun inboundFednowTransfers(): InboundFednowTransferService
+ fun swiftTransfers(): SwiftTransferService
+
fun checkDeposits(): CheckDepositService
fun lockboxes(): LockboxService
@@ -290,6 +293,8 @@ interface IncreaseClient {
fun inboundFednowTransfers(): InboundFednowTransferService.WithRawResponse
+ fun swiftTransfers(): SwiftTransferService.WithRawResponse
+
fun checkDeposits(): CheckDepositService.WithRawResponse
fun lockboxes(): LockboxService.WithRawResponse
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientAsync.kt
index 5f2257a8f..869f37b2a 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientAsync.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientAsync.kt
@@ -56,6 +56,7 @@ import com.increase.api.services.async.RealTimePaymentsTransferServiceAsync
import com.increase.api.services.async.RoutingNumberServiceAsync
import com.increase.api.services.async.SimulationServiceAsync
import com.increase.api.services.async.SupplementalDocumentServiceAsync
+import com.increase.api.services.async.SwiftTransferServiceAsync
import com.increase.api.services.async.TransactionServiceAsync
import com.increase.api.services.async.WebhookServiceAsync
import com.increase.api.services.async.WireDrawdownRequestServiceAsync
@@ -152,6 +153,8 @@ interface IncreaseClientAsync {
fun inboundFednowTransfers(): InboundFednowTransferServiceAsync
+ fun swiftTransfers(): SwiftTransferServiceAsync
+
fun checkDeposits(): CheckDepositServiceAsync
fun lockboxes(): LockboxServiceAsync
@@ -294,6 +297,8 @@ interface IncreaseClientAsync {
fun inboundFednowTransfers(): InboundFednowTransferServiceAsync.WithRawResponse
+ fun swiftTransfers(): SwiftTransferServiceAsync.WithRawResponse
+
fun checkDeposits(): CheckDepositServiceAsync.WithRawResponse
fun lockboxes(): LockboxServiceAsync.WithRawResponse
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientAsyncImpl.kt
index ffd99e1dd..6691e016c 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientAsyncImpl.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientAsyncImpl.kt
@@ -110,6 +110,8 @@ import com.increase.api.services.async.SimulationServiceAsync
import com.increase.api.services.async.SimulationServiceAsyncImpl
import com.increase.api.services.async.SupplementalDocumentServiceAsync
import com.increase.api.services.async.SupplementalDocumentServiceAsyncImpl
+import com.increase.api.services.async.SwiftTransferServiceAsync
+import com.increase.api.services.async.SwiftTransferServiceAsyncImpl
import com.increase.api.services.async.TransactionServiceAsync
import com.increase.api.services.async.TransactionServiceAsyncImpl
import com.increase.api.services.async.WebhookServiceAsync
@@ -244,6 +246,10 @@ class IncreaseClientAsyncImpl(private val clientOptions: ClientOptions) : Increa
InboundFednowTransferServiceAsyncImpl(clientOptionsWithUserAgent)
}
+ private val swiftTransfers: SwiftTransferServiceAsync by lazy {
+ SwiftTransferServiceAsyncImpl(clientOptionsWithUserAgent)
+ }
+
private val checkDeposits: CheckDepositServiceAsync by lazy {
CheckDepositServiceAsyncImpl(clientOptionsWithUserAgent)
}
@@ -426,6 +432,8 @@ class IncreaseClientAsyncImpl(private val clientOptions: ClientOptions) : Increa
override fun inboundFednowTransfers(): InboundFednowTransferServiceAsync =
inboundFednowTransfers
+ override fun swiftTransfers(): SwiftTransferServiceAsync = swiftTransfers
+
override fun checkDeposits(): CheckDepositServiceAsync = checkDeposits
override fun lockboxes(): LockboxServiceAsync = lockboxes
@@ -605,6 +613,10 @@ class IncreaseClientAsyncImpl(private val clientOptions: ClientOptions) : Increa
InboundFednowTransferServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}
+ private val swiftTransfers: SwiftTransferServiceAsync.WithRawResponse by lazy {
+ SwiftTransferServiceAsyncImpl.WithRawResponseImpl(clientOptions)
+ }
+
private val checkDeposits: CheckDepositServiceAsync.WithRawResponse by lazy {
CheckDepositServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}
@@ -801,6 +813,8 @@ class IncreaseClientAsyncImpl(private val clientOptions: ClientOptions) : Increa
override fun inboundFednowTransfers(): InboundFednowTransferServiceAsync.WithRawResponse =
inboundFednowTransfers
+ override fun swiftTransfers(): SwiftTransferServiceAsync.WithRawResponse = swiftTransfers
+
override fun checkDeposits(): CheckDepositServiceAsync.WithRawResponse = checkDeposits
override fun lockboxes(): LockboxServiceAsync.WithRawResponse = lockboxes
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientImpl.kt
index 411587c38..9d3e2f55f 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientImpl.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientImpl.kt
@@ -110,6 +110,8 @@ import com.increase.api.services.blocking.SimulationService
import com.increase.api.services.blocking.SimulationServiceImpl
import com.increase.api.services.blocking.SupplementalDocumentService
import com.increase.api.services.blocking.SupplementalDocumentServiceImpl
+import com.increase.api.services.blocking.SwiftTransferService
+import com.increase.api.services.blocking.SwiftTransferServiceImpl
import com.increase.api.services.blocking.TransactionService
import com.increase.api.services.blocking.TransactionServiceImpl
import com.increase.api.services.blocking.WebhookService
@@ -241,6 +243,10 @@ class IncreaseClientImpl(private val clientOptions: ClientOptions) : IncreaseCli
InboundFednowTransferServiceImpl(clientOptionsWithUserAgent)
}
+ private val swiftTransfers: SwiftTransferService by lazy {
+ SwiftTransferServiceImpl(clientOptionsWithUserAgent)
+ }
+
private val checkDeposits: CheckDepositService by lazy {
CheckDepositServiceImpl(clientOptionsWithUserAgent)
}
@@ -409,6 +415,8 @@ class IncreaseClientImpl(private val clientOptions: ClientOptions) : IncreaseCli
override fun inboundFednowTransfers(): InboundFednowTransferService = inboundFednowTransfers
+ override fun swiftTransfers(): SwiftTransferService = swiftTransfers
+
override fun checkDeposits(): CheckDepositService = checkDeposits
override fun lockboxes(): LockboxService = lockboxes
@@ -586,6 +594,10 @@ class IncreaseClientImpl(private val clientOptions: ClientOptions) : IncreaseCli
InboundFednowTransferServiceImpl.WithRawResponseImpl(clientOptions)
}
+ private val swiftTransfers: SwiftTransferService.WithRawResponse by lazy {
+ SwiftTransferServiceImpl.WithRawResponseImpl(clientOptions)
+ }
+
private val checkDeposits: CheckDepositService.WithRawResponse by lazy {
CheckDepositServiceImpl.WithRawResponseImpl(clientOptions)
}
@@ -780,6 +792,8 @@ class IncreaseClientImpl(private val clientOptions: ClientOptions) : IncreaseCli
override fun inboundFednowTransfers(): InboundFednowTransferService.WithRawResponse =
inboundFednowTransfers
+ override fun swiftTransfers(): SwiftTransferService.WithRawResponse = swiftTransfers
+
override fun checkDeposits(): CheckDepositService.WithRawResponse = checkDeposits
override fun lockboxes(): LockboxService.WithRawResponse = lockboxes
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/swifttransfers/SwiftTransfer.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/swifttransfers/SwiftTransfer.kt
new file mode 100644
index 000000000..2029132e6
--- /dev/null
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/swifttransfers/SwiftTransfer.kt
@@ -0,0 +1,3315 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package com.increase.api.models.swifttransfers
+
+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.increase.api.core.Enum
+import com.increase.api.core.ExcludeMissing
+import com.increase.api.core.JsonField
+import com.increase.api.core.JsonMissing
+import com.increase.api.core.JsonValue
+import com.increase.api.core.checkRequired
+import com.increase.api.errors.IncreaseInvalidDataException
+import java.time.OffsetDateTime
+import java.util.Collections
+import java.util.Objects
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+/** Swift Transfers send funds internationally. */
+class SwiftTransfer
+@JsonCreator(mode = JsonCreator.Mode.DISABLED)
+private constructor(
+ private val id: JsonField,
+ private val accountId: JsonField,
+ private val accountNumber: JsonField,
+ private val amount: JsonField,
+ private val bankIdentificationCode: JsonField,
+ private val createdAt: JsonField,
+ private val createdBy: JsonField,
+ private val creditorAddress: JsonField,
+ private val creditorName: JsonField,
+ private val debtorAddress: JsonField,
+ private val debtorName: JsonField,
+ private val idempotencyKey: JsonField,
+ private val instructedAmount: JsonField,
+ private val instructedCurrency: JsonField,
+ private val pendingTransactionId: JsonField,
+ private val routingNumber: JsonField,
+ private val sourceAccountNumberId: JsonField,
+ private val status: JsonField,
+ private val transactionId: JsonField,
+ private val type: JsonField,
+ private val uniqueEndToEndTransactionReference: JsonField,
+ private val unstructuredRemittanceInformation: JsonField,
+ private val additionalProperties: MutableMap,
+) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("id") @ExcludeMissing id: JsonField = JsonMissing.of(),
+ @JsonProperty("account_id") @ExcludeMissing accountId: JsonField = JsonMissing.of(),
+ @JsonProperty("account_number")
+ @ExcludeMissing
+ accountNumber: JsonField = JsonMissing.of(),
+ @JsonProperty("amount") @ExcludeMissing amount: JsonField = JsonMissing.of(),
+ @JsonProperty("bank_identification_code")
+ @ExcludeMissing
+ bankIdentificationCode: JsonField = JsonMissing.of(),
+ @JsonProperty("created_at")
+ @ExcludeMissing
+ createdAt: JsonField = JsonMissing.of(),
+ @JsonProperty("created_by")
+ @ExcludeMissing
+ createdBy: JsonField = JsonMissing.of(),
+ @JsonProperty("creditor_address")
+ @ExcludeMissing
+ creditorAddress: JsonField = JsonMissing.of(),
+ @JsonProperty("creditor_name")
+ @ExcludeMissing
+ creditorName: JsonField = JsonMissing.of(),
+ @JsonProperty("debtor_address")
+ @ExcludeMissing
+ debtorAddress: JsonField = JsonMissing.of(),
+ @JsonProperty("debtor_name")
+ @ExcludeMissing
+ debtorName: JsonField = JsonMissing.of(),
+ @JsonProperty("idempotency_key")
+ @ExcludeMissing
+ idempotencyKey: JsonField = JsonMissing.of(),
+ @JsonProperty("instructed_amount")
+ @ExcludeMissing
+ instructedAmount: JsonField = JsonMissing.of(),
+ @JsonProperty("instructed_currency")
+ @ExcludeMissing
+ instructedCurrency: JsonField = JsonMissing.of(),
+ @JsonProperty("pending_transaction_id")
+ @ExcludeMissing
+ pendingTransactionId: JsonField = JsonMissing.of(),
+ @JsonProperty("routing_number")
+ @ExcludeMissing
+ routingNumber: JsonField = JsonMissing.of(),
+ @JsonProperty("source_account_number_id")
+ @ExcludeMissing
+ sourceAccountNumberId: JsonField = JsonMissing.of(),
+ @JsonProperty("status") @ExcludeMissing status: JsonField = JsonMissing.of(),
+ @JsonProperty("transaction_id")
+ @ExcludeMissing
+ transactionId: JsonField = JsonMissing.of(),
+ @JsonProperty("type") @ExcludeMissing type: JsonField = JsonMissing.of(),
+ @JsonProperty("unique_end_to_end_transaction_reference")
+ @ExcludeMissing
+ uniqueEndToEndTransactionReference: JsonField = JsonMissing.of(),
+ @JsonProperty("unstructured_remittance_information")
+ @ExcludeMissing
+ unstructuredRemittanceInformation: JsonField = JsonMissing.of(),
+ ) : this(
+ id,
+ accountId,
+ accountNumber,
+ amount,
+ bankIdentificationCode,
+ createdAt,
+ createdBy,
+ creditorAddress,
+ creditorName,
+ debtorAddress,
+ debtorName,
+ idempotencyKey,
+ instructedAmount,
+ instructedCurrency,
+ pendingTransactionId,
+ routingNumber,
+ sourceAccountNumberId,
+ status,
+ transactionId,
+ type,
+ uniqueEndToEndTransactionReference,
+ unstructuredRemittanceInformation,
+ mutableMapOf(),
+ )
+
+ /**
+ * The Swift transfer's identifier.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun id(): String = id.getRequired("id")
+
+ /**
+ * The Account to which the transfer belongs.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun accountId(): String = accountId.getRequired("account_id")
+
+ /**
+ * The creditor's account number.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun accountNumber(): String = accountNumber.getRequired("account_number")
+
+ /**
+ * The transfer amount in USD cents.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun amount(): Long = amount.getRequired("amount")
+
+ /**
+ * The bank identification code (BIC) of the creditor.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun bankIdentificationCode(): String =
+ bankIdentificationCode.getRequired("bank_identification_code")
+
+ /**
+ * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the transfer
+ * was created.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun createdAt(): OffsetDateTime = createdAt.getRequired("created_at")
+
+ /**
+ * What object created the transfer, either via the API or the dashboard.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun createdBy(): CreatedBy = createdBy.getRequired("created_by")
+
+ /**
+ * The creditor's address.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun creditorAddress(): CreditorAddress = creditorAddress.getRequired("creditor_address")
+
+ /**
+ * The creditor's name.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun creditorName(): String = creditorName.getRequired("creditor_name")
+
+ /**
+ * The debtor's address.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun debtorAddress(): DebtorAddress = debtorAddress.getRequired("debtor_address")
+
+ /**
+ * The debtor's name.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun debtorName(): String = debtorName.getRequired("debtor_name")
+
+ /**
+ * The idempotency key you chose for this object. This value is unique across Increase and is
+ * used to ensure that a request is only processed once. Learn more about
+ * [idempotency](https://increase.com/documentation/idempotency-keys).
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun idempotencyKey(): Optional = idempotencyKey.getOptional("idempotency_key")
+
+ /**
+ * The amount that was instructed to be transferred in minor units of the `instructed_currency`.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun instructedAmount(): Long = instructedAmount.getRequired("instructed_amount")
+
+ /**
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code of the instructed
+ * amount.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun instructedCurrency(): InstructedCurrency =
+ instructedCurrency.getRequired("instructed_currency")
+
+ /**
+ * The ID for the pending transaction representing the transfer.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun pendingTransactionId(): Optional =
+ pendingTransactionId.getOptional("pending_transaction_id")
+
+ /**
+ * The creditor's bank account routing or transit number. Required in certain countries.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun routingNumber(): Optional = routingNumber.getOptional("routing_number")
+
+ /**
+ * The Account Number included in the transfer as the debtor's account number.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun sourceAccountNumberId(): String =
+ sourceAccountNumberId.getRequired("source_account_number_id")
+
+ /**
+ * The lifecycle status of the transfer.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun status(): Status = status.getRequired("status")
+
+ /**
+ * The ID for the transaction funding the transfer. This will be populated after the transfer is
+ * initiated.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun transactionId(): Optional = transactionId.getOptional("transaction_id")
+
+ /**
+ * A constant representing the object's type. For this resource it will always be
+ * `swift_transfer`.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun type(): Type = type.getRequired("type")
+
+ /**
+ * The Unique End-to-end Transaction Reference
+ * ([UETR](https://www.swift.com/payments/what-unique-end-end-transaction-reference-uetr)) for
+ * the transfer.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun uniqueEndToEndTransactionReference(): String =
+ uniqueEndToEndTransactionReference.getRequired("unique_end_to_end_transaction_reference")
+
+ /**
+ * The unstructured remittance information that was included with the transfer.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun unstructuredRemittanceInformation(): String =
+ unstructuredRemittanceInformation.getRequired("unstructured_remittance_information")
+
+ /**
+ * Returns the raw JSON value of [id].
+ *
+ * Unlike [id], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("id") @ExcludeMissing fun _id(): JsonField = id
+
+ /**
+ * Returns the raw JSON value of [accountId].
+ *
+ * Unlike [accountId], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("account_id") @ExcludeMissing fun _accountId(): JsonField = accountId
+
+ /**
+ * Returns the raw JSON value of [accountNumber].
+ *
+ * Unlike [accountNumber], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("account_number")
+ @ExcludeMissing
+ fun _accountNumber(): JsonField = accountNumber
+
+ /**
+ * Returns the raw JSON value of [amount].
+ *
+ * Unlike [amount], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("amount") @ExcludeMissing fun _amount(): JsonField = amount
+
+ /**
+ * Returns the raw JSON value of [bankIdentificationCode].
+ *
+ * Unlike [bankIdentificationCode], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("bank_identification_code")
+ @ExcludeMissing
+ fun _bankIdentificationCode(): JsonField = bankIdentificationCode
+
+ /**
+ * Returns the raw JSON value of [createdAt].
+ *
+ * Unlike [createdAt], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("created_at")
+ @ExcludeMissing
+ fun _createdAt(): JsonField = createdAt
+
+ /**
+ * Returns the raw JSON value of [createdBy].
+ *
+ * Unlike [createdBy], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("created_by") @ExcludeMissing fun _createdBy(): JsonField = createdBy
+
+ /**
+ * Returns the raw JSON value of [creditorAddress].
+ *
+ * Unlike [creditorAddress], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("creditor_address")
+ @ExcludeMissing
+ fun _creditorAddress(): JsonField = creditorAddress
+
+ /**
+ * Returns the raw JSON value of [creditorName].
+ *
+ * Unlike [creditorName], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("creditor_name")
+ @ExcludeMissing
+ fun _creditorName(): JsonField = creditorName
+
+ /**
+ * Returns the raw JSON value of [debtorAddress].
+ *
+ * Unlike [debtorAddress], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("debtor_address")
+ @ExcludeMissing
+ fun _debtorAddress(): JsonField = debtorAddress
+
+ /**
+ * Returns the raw JSON value of [debtorName].
+ *
+ * Unlike [debtorName], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("debtor_name") @ExcludeMissing fun _debtorName(): JsonField = debtorName
+
+ /**
+ * Returns the raw JSON value of [idempotencyKey].
+ *
+ * Unlike [idempotencyKey], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("idempotency_key")
+ @ExcludeMissing
+ fun _idempotencyKey(): JsonField = idempotencyKey
+
+ /**
+ * Returns the raw JSON value of [instructedAmount].
+ *
+ * Unlike [instructedAmount], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("instructed_amount")
+ @ExcludeMissing
+ fun _instructedAmount(): JsonField = instructedAmount
+
+ /**
+ * Returns the raw JSON value of [instructedCurrency].
+ *
+ * Unlike [instructedCurrency], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("instructed_currency")
+ @ExcludeMissing
+ fun _instructedCurrency(): JsonField = instructedCurrency
+
+ /**
+ * Returns the raw JSON value of [pendingTransactionId].
+ *
+ * Unlike [pendingTransactionId], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("pending_transaction_id")
+ @ExcludeMissing
+ fun _pendingTransactionId(): JsonField = pendingTransactionId
+
+ /**
+ * Returns the raw JSON value of [routingNumber].
+ *
+ * Unlike [routingNumber], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("routing_number")
+ @ExcludeMissing
+ fun _routingNumber(): JsonField = routingNumber
+
+ /**
+ * Returns the raw JSON value of [sourceAccountNumberId].
+ *
+ * Unlike [sourceAccountNumberId], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("source_account_number_id")
+ @ExcludeMissing
+ fun _sourceAccountNumberId(): JsonField = sourceAccountNumberId
+
+ /**
+ * Returns the raw JSON value of [status].
+ *
+ * Unlike [status], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("status") @ExcludeMissing fun _status(): JsonField = status
+
+ /**
+ * Returns the raw JSON value of [transactionId].
+ *
+ * Unlike [transactionId], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("transaction_id")
+ @ExcludeMissing
+ fun _transactionId(): JsonField = transactionId
+
+ /**
+ * Returns the raw JSON value of [type].
+ *
+ * Unlike [type], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("type") @ExcludeMissing fun _type(): JsonField = type
+
+ /**
+ * Returns the raw JSON value of [uniqueEndToEndTransactionReference].
+ *
+ * Unlike [uniqueEndToEndTransactionReference], this method doesn't throw if the JSON field has
+ * an unexpected type.
+ */
+ @JsonProperty("unique_end_to_end_transaction_reference")
+ @ExcludeMissing
+ fun _uniqueEndToEndTransactionReference(): JsonField =
+ uniqueEndToEndTransactionReference
+
+ /**
+ * Returns the raw JSON value of [unstructuredRemittanceInformation].
+ *
+ * Unlike [unstructuredRemittanceInformation], this method doesn't throw if the JSON field has
+ * an unexpected type.
+ */
+ @JsonProperty("unstructured_remittance_information")
+ @ExcludeMissing
+ fun _unstructuredRemittanceInformation(): JsonField = unstructuredRemittanceInformation
+
+ @JsonAnySetter
+ private fun putAdditionalProperty(key: String, value: JsonValue) {
+ additionalProperties.put(key, value)
+ }
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map =
+ Collections.unmodifiableMap(additionalProperties)
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of [SwiftTransfer].
+ *
+ * The following fields are required:
+ * ```java
+ * .id()
+ * .accountId()
+ * .accountNumber()
+ * .amount()
+ * .bankIdentificationCode()
+ * .createdAt()
+ * .createdBy()
+ * .creditorAddress()
+ * .creditorName()
+ * .debtorAddress()
+ * .debtorName()
+ * .idempotencyKey()
+ * .instructedAmount()
+ * .instructedCurrency()
+ * .pendingTransactionId()
+ * .routingNumber()
+ * .sourceAccountNumberId()
+ * .status()
+ * .transactionId()
+ * .type()
+ * .uniqueEndToEndTransactionReference()
+ * .unstructuredRemittanceInformation()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [SwiftTransfer]. */
+ class Builder internal constructor() {
+
+ private var id: JsonField? = null
+ private var accountId: JsonField? = null
+ private var accountNumber: JsonField? = null
+ private var amount: JsonField? = null
+ private var bankIdentificationCode: JsonField? = null
+ private var createdAt: JsonField? = null
+ private var createdBy: JsonField? = null
+ private var creditorAddress: JsonField? = null
+ private var creditorName: JsonField? = null
+ private var debtorAddress: JsonField? = null
+ private var debtorName: JsonField? = null
+ private var idempotencyKey: JsonField? = null
+ private var instructedAmount: JsonField? = null
+ private var instructedCurrency: JsonField? = null
+ private var pendingTransactionId: JsonField? = null
+ private var routingNumber: JsonField? = null
+ private var sourceAccountNumberId: JsonField? = null
+ private var status: JsonField? = null
+ private var transactionId: JsonField? = null
+ private var type: JsonField? = null
+ private var uniqueEndToEndTransactionReference: JsonField? = null
+ private var unstructuredRemittanceInformation: JsonField? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(swiftTransfer: SwiftTransfer) = apply {
+ id = swiftTransfer.id
+ accountId = swiftTransfer.accountId
+ accountNumber = swiftTransfer.accountNumber
+ amount = swiftTransfer.amount
+ bankIdentificationCode = swiftTransfer.bankIdentificationCode
+ createdAt = swiftTransfer.createdAt
+ createdBy = swiftTransfer.createdBy
+ creditorAddress = swiftTransfer.creditorAddress
+ creditorName = swiftTransfer.creditorName
+ debtorAddress = swiftTransfer.debtorAddress
+ debtorName = swiftTransfer.debtorName
+ idempotencyKey = swiftTransfer.idempotencyKey
+ instructedAmount = swiftTransfer.instructedAmount
+ instructedCurrency = swiftTransfer.instructedCurrency
+ pendingTransactionId = swiftTransfer.pendingTransactionId
+ routingNumber = swiftTransfer.routingNumber
+ sourceAccountNumberId = swiftTransfer.sourceAccountNumberId
+ status = swiftTransfer.status
+ transactionId = swiftTransfer.transactionId
+ type = swiftTransfer.type
+ uniqueEndToEndTransactionReference = swiftTransfer.uniqueEndToEndTransactionReference
+ unstructuredRemittanceInformation = swiftTransfer.unstructuredRemittanceInformation
+ additionalProperties = swiftTransfer.additionalProperties.toMutableMap()
+ }
+
+ /** The Swift transfer's identifier. */
+ fun id(id: String) = id(JsonField.of(id))
+
+ /**
+ * Sets [Builder.id] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.id] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun id(id: JsonField) = apply { this.id = id }
+
+ /** The Account to which the transfer belongs. */
+ fun accountId(accountId: String) = accountId(JsonField.of(accountId))
+
+ /**
+ * Sets [Builder.accountId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.accountId] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun accountId(accountId: JsonField) = apply { this.accountId = accountId }
+
+ /** The creditor's account number. */
+ fun accountNumber(accountNumber: String) = accountNumber(JsonField.of(accountNumber))
+
+ /**
+ * Sets [Builder.accountNumber] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.accountNumber] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun accountNumber(accountNumber: JsonField) = apply {
+ this.accountNumber = accountNumber
+ }
+
+ /** The transfer amount in USD cents. */
+ fun amount(amount: Long) = amount(JsonField.of(amount))
+
+ /**
+ * Sets [Builder.amount] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.amount] with a well-typed [Long] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun amount(amount: JsonField) = apply { this.amount = amount }
+
+ /** The bank identification code (BIC) of the creditor. */
+ fun bankIdentificationCode(bankIdentificationCode: String) =
+ bankIdentificationCode(JsonField.of(bankIdentificationCode))
+
+ /**
+ * Sets [Builder.bankIdentificationCode] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.bankIdentificationCode] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun bankIdentificationCode(bankIdentificationCode: JsonField) = apply {
+ this.bankIdentificationCode = bankIdentificationCode
+ }
+
+ /**
+ * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the
+ * transfer was created.
+ */
+ fun createdAt(createdAt: OffsetDateTime) = createdAt(JsonField.of(createdAt))
+
+ /**
+ * Sets [Builder.createdAt] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.createdAt] with a well-typed [OffsetDateTime] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun createdAt(createdAt: JsonField) = apply { this.createdAt = createdAt }
+
+ /** What object created the transfer, either via the API or the dashboard. */
+ fun createdBy(createdBy: CreatedBy) = createdBy(JsonField.of(createdBy))
+
+ /**
+ * Sets [Builder.createdBy] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.createdBy] with a well-typed [CreatedBy] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun createdBy(createdBy: JsonField) = apply { this.createdBy = createdBy }
+
+ /** The creditor's address. */
+ fun creditorAddress(creditorAddress: CreditorAddress) =
+ creditorAddress(JsonField.of(creditorAddress))
+
+ /**
+ * Sets [Builder.creditorAddress] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.creditorAddress] with a well-typed [CreditorAddress]
+ * value instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun creditorAddress(creditorAddress: JsonField) = apply {
+ this.creditorAddress = creditorAddress
+ }
+
+ /** The creditor's name. */
+ fun creditorName(creditorName: String) = creditorName(JsonField.of(creditorName))
+
+ /**
+ * Sets [Builder.creditorName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.creditorName] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun creditorName(creditorName: JsonField) = apply {
+ this.creditorName = creditorName
+ }
+
+ /** The debtor's address. */
+ fun debtorAddress(debtorAddress: DebtorAddress) = debtorAddress(JsonField.of(debtorAddress))
+
+ /**
+ * Sets [Builder.debtorAddress] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.debtorAddress] with a well-typed [DebtorAddress] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun debtorAddress(debtorAddress: JsonField) = apply {
+ this.debtorAddress = debtorAddress
+ }
+
+ /** The debtor's name. */
+ fun debtorName(debtorName: String) = debtorName(JsonField.of(debtorName))
+
+ /**
+ * Sets [Builder.debtorName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.debtorName] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun debtorName(debtorName: JsonField) = apply { this.debtorName = debtorName }
+
+ /**
+ * The idempotency key you chose for this object. This value is unique across Increase and
+ * is used to ensure that a request is only processed once. Learn more about
+ * [idempotency](https://increase.com/documentation/idempotency-keys).
+ */
+ fun idempotencyKey(idempotencyKey: String?) =
+ idempotencyKey(JsonField.ofNullable(idempotencyKey))
+
+ /** Alias for calling [Builder.idempotencyKey] with `idempotencyKey.orElse(null)`. */
+ fun idempotencyKey(idempotencyKey: Optional) =
+ idempotencyKey(idempotencyKey.getOrNull())
+
+ /**
+ * Sets [Builder.idempotencyKey] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.idempotencyKey] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun idempotencyKey(idempotencyKey: JsonField) = apply {
+ this.idempotencyKey = idempotencyKey
+ }
+
+ /**
+ * The amount that was instructed to be transferred in minor units of the
+ * `instructed_currency`.
+ */
+ fun instructedAmount(instructedAmount: Long) =
+ instructedAmount(JsonField.of(instructedAmount))
+
+ /**
+ * Sets [Builder.instructedAmount] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.instructedAmount] with a well-typed [Long] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun instructedAmount(instructedAmount: JsonField) = apply {
+ this.instructedAmount = instructedAmount
+ }
+
+ /**
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code of the instructed
+ * amount.
+ */
+ fun instructedCurrency(instructedCurrency: InstructedCurrency) =
+ instructedCurrency(JsonField.of(instructedCurrency))
+
+ /**
+ * Sets [Builder.instructedCurrency] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.instructedCurrency] with a well-typed
+ * [InstructedCurrency] value instead. This method is primarily for setting the field to an
+ * undocumented or not yet supported value.
+ */
+ fun instructedCurrency(instructedCurrency: JsonField) = apply {
+ this.instructedCurrency = instructedCurrency
+ }
+
+ /** The ID for the pending transaction representing the transfer. */
+ fun pendingTransactionId(pendingTransactionId: String?) =
+ pendingTransactionId(JsonField.ofNullable(pendingTransactionId))
+
+ /**
+ * Alias for calling [Builder.pendingTransactionId] with
+ * `pendingTransactionId.orElse(null)`.
+ */
+ fun pendingTransactionId(pendingTransactionId: Optional) =
+ pendingTransactionId(pendingTransactionId.getOrNull())
+
+ /**
+ * Sets [Builder.pendingTransactionId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.pendingTransactionId] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun pendingTransactionId(pendingTransactionId: JsonField) = apply {
+ this.pendingTransactionId = pendingTransactionId
+ }
+
+ /** The creditor's bank account routing or transit number. Required in certain countries. */
+ fun routingNumber(routingNumber: String?) =
+ routingNumber(JsonField.ofNullable(routingNumber))
+
+ /** Alias for calling [Builder.routingNumber] with `routingNumber.orElse(null)`. */
+ fun routingNumber(routingNumber: Optional) =
+ routingNumber(routingNumber.getOrNull())
+
+ /**
+ * Sets [Builder.routingNumber] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.routingNumber] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun routingNumber(routingNumber: JsonField) = apply {
+ this.routingNumber = routingNumber
+ }
+
+ /** The Account Number included in the transfer as the debtor's account number. */
+ fun sourceAccountNumberId(sourceAccountNumberId: String) =
+ sourceAccountNumberId(JsonField.of(sourceAccountNumberId))
+
+ /**
+ * Sets [Builder.sourceAccountNumberId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.sourceAccountNumberId] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun sourceAccountNumberId(sourceAccountNumberId: JsonField) = apply {
+ this.sourceAccountNumberId = sourceAccountNumberId
+ }
+
+ /** The lifecycle status of the transfer. */
+ fun status(status: Status) = status(JsonField.of(status))
+
+ /**
+ * Sets [Builder.status] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.status] with a well-typed [Status] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun status(status: JsonField) = apply { this.status = status }
+
+ /**
+ * The ID for the transaction funding the transfer. This will be populated after the
+ * transfer is initiated.
+ */
+ fun transactionId(transactionId: String?) =
+ transactionId(JsonField.ofNullable(transactionId))
+
+ /** Alias for calling [Builder.transactionId] with `transactionId.orElse(null)`. */
+ fun transactionId(transactionId: Optional) =
+ transactionId(transactionId.getOrNull())
+
+ /**
+ * Sets [Builder.transactionId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.transactionId] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun transactionId(transactionId: JsonField) = apply {
+ this.transactionId = transactionId
+ }
+
+ /**
+ * A constant representing the object's type. For this resource it will always be
+ * `swift_transfer`.
+ */
+ fun type(type: Type) = type(JsonField.of(type))
+
+ /**
+ * Sets [Builder.type] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.type] with a well-typed [Type] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun type(type: JsonField) = apply { this.type = type }
+
+ /**
+ * The Unique End-to-end Transaction Reference
+ * ([UETR](https://www.swift.com/payments/what-unique-end-end-transaction-reference-uetr))
+ * for the transfer.
+ */
+ fun uniqueEndToEndTransactionReference(uniqueEndToEndTransactionReference: String) =
+ uniqueEndToEndTransactionReference(JsonField.of(uniqueEndToEndTransactionReference))
+
+ /**
+ * Sets [Builder.uniqueEndToEndTransactionReference] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.uniqueEndToEndTransactionReference] with a well-typed
+ * [String] value instead. This method is primarily for setting the field to an undocumented
+ * or not yet supported value.
+ */
+ fun uniqueEndToEndTransactionReference(
+ uniqueEndToEndTransactionReference: JsonField
+ ) = apply { this.uniqueEndToEndTransactionReference = uniqueEndToEndTransactionReference }
+
+ /** The unstructured remittance information that was included with the transfer. */
+ fun unstructuredRemittanceInformation(unstructuredRemittanceInformation: String) =
+ unstructuredRemittanceInformation(JsonField.of(unstructuredRemittanceInformation))
+
+ /**
+ * Sets [Builder.unstructuredRemittanceInformation] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.unstructuredRemittanceInformation] with a well-typed
+ * [String] value instead. This method is primarily for setting the field to an undocumented
+ * or not yet supported value.
+ */
+ fun unstructuredRemittanceInformation(
+ unstructuredRemittanceInformation: JsonField
+ ) = apply { this.unstructuredRemittanceInformation = unstructuredRemittanceInformation }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ putAllAdditionalProperties(additionalProperties)
+ }
+
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) }
+
+ fun removeAllAdditionalProperties(keys: Set) = apply {
+ keys.forEach(::removeAdditionalProperty)
+ }
+
+ /**
+ * Returns an immutable instance of [SwiftTransfer].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .id()
+ * .accountId()
+ * .accountNumber()
+ * .amount()
+ * .bankIdentificationCode()
+ * .createdAt()
+ * .createdBy()
+ * .creditorAddress()
+ * .creditorName()
+ * .debtorAddress()
+ * .debtorName()
+ * .idempotencyKey()
+ * .instructedAmount()
+ * .instructedCurrency()
+ * .pendingTransactionId()
+ * .routingNumber()
+ * .sourceAccountNumberId()
+ * .status()
+ * .transactionId()
+ * .type()
+ * .uniqueEndToEndTransactionReference()
+ * .unstructuredRemittanceInformation()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): SwiftTransfer =
+ SwiftTransfer(
+ checkRequired("id", id),
+ checkRequired("accountId", accountId),
+ checkRequired("accountNumber", accountNumber),
+ checkRequired("amount", amount),
+ checkRequired("bankIdentificationCode", bankIdentificationCode),
+ checkRequired("createdAt", createdAt),
+ checkRequired("createdBy", createdBy),
+ checkRequired("creditorAddress", creditorAddress),
+ checkRequired("creditorName", creditorName),
+ checkRequired("debtorAddress", debtorAddress),
+ checkRequired("debtorName", debtorName),
+ checkRequired("idempotencyKey", idempotencyKey),
+ checkRequired("instructedAmount", instructedAmount),
+ checkRequired("instructedCurrency", instructedCurrency),
+ checkRequired("pendingTransactionId", pendingTransactionId),
+ checkRequired("routingNumber", routingNumber),
+ checkRequired("sourceAccountNumberId", sourceAccountNumberId),
+ checkRequired("status", status),
+ checkRequired("transactionId", transactionId),
+ checkRequired("type", type),
+ checkRequired(
+ "uniqueEndToEndTransactionReference",
+ uniqueEndToEndTransactionReference,
+ ),
+ checkRequired(
+ "unstructuredRemittanceInformation",
+ unstructuredRemittanceInformation,
+ ),
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): SwiftTransfer = apply {
+ if (validated) {
+ return@apply
+ }
+
+ id()
+ accountId()
+ accountNumber()
+ amount()
+ bankIdentificationCode()
+ createdAt()
+ createdBy().validate()
+ creditorAddress().validate()
+ creditorName()
+ debtorAddress().validate()
+ debtorName()
+ idempotencyKey()
+ instructedAmount()
+ instructedCurrency().validate()
+ pendingTransactionId()
+ routingNumber()
+ sourceAccountNumberId()
+ status().validate()
+ transactionId()
+ type().validate()
+ uniqueEndToEndTransactionReference()
+ unstructuredRemittanceInformation()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: IncreaseInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic
+ internal fun validity(): Int =
+ (if (id.asKnown().isPresent) 1 else 0) +
+ (if (accountId.asKnown().isPresent) 1 else 0) +
+ (if (accountNumber.asKnown().isPresent) 1 else 0) +
+ (if (amount.asKnown().isPresent) 1 else 0) +
+ (if (bankIdentificationCode.asKnown().isPresent) 1 else 0) +
+ (if (createdAt.asKnown().isPresent) 1 else 0) +
+ (createdBy.asKnown().getOrNull()?.validity() ?: 0) +
+ (creditorAddress.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (creditorName.asKnown().isPresent) 1 else 0) +
+ (debtorAddress.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (debtorName.asKnown().isPresent) 1 else 0) +
+ (if (idempotencyKey.asKnown().isPresent) 1 else 0) +
+ (if (instructedAmount.asKnown().isPresent) 1 else 0) +
+ (instructedCurrency.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (pendingTransactionId.asKnown().isPresent) 1 else 0) +
+ (if (routingNumber.asKnown().isPresent) 1 else 0) +
+ (if (sourceAccountNumberId.asKnown().isPresent) 1 else 0) +
+ (status.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (transactionId.asKnown().isPresent) 1 else 0) +
+ (type.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (uniqueEndToEndTransactionReference.asKnown().isPresent) 1 else 0) +
+ (if (unstructuredRemittanceInformation.asKnown().isPresent) 1 else 0)
+
+ /** What object created the transfer, either via the API or the dashboard. */
+ class CreatedBy
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val apiKey: JsonField,
+ private val category: JsonField,
+ private val oauthApplication: JsonField,
+ private val user: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("api_key") @ExcludeMissing apiKey: JsonField = JsonMissing.of(),
+ @JsonProperty("category")
+ @ExcludeMissing
+ category: JsonField = JsonMissing.of(),
+ @JsonProperty("oauth_application")
+ @ExcludeMissing
+ oauthApplication: JsonField = JsonMissing.of(),
+ @JsonProperty("user") @ExcludeMissing user: JsonField = JsonMissing.of(),
+ ) : this(apiKey, category, oauthApplication, user, mutableMapOf())
+
+ /**
+ * If present, details about the API key that created the transfer.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun apiKey(): Optional = apiKey.getOptional("api_key")
+
+ /**
+ * The type of object that created this transfer.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun category(): Category = category.getRequired("category")
+
+ /**
+ * If present, details about the OAuth Application that created the transfer.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun oauthApplication(): Optional =
+ oauthApplication.getOptional("oauth_application")
+
+ /**
+ * If present, details about the User that created the transfer.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun user(): Optional = user.getOptional("user")
+
+ /**
+ * Returns the raw JSON value of [apiKey].
+ *
+ * Unlike [apiKey], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("api_key") @ExcludeMissing fun _apiKey(): JsonField = apiKey
+
+ /**
+ * Returns the raw JSON value of [category].
+ *
+ * Unlike [category], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("category") @ExcludeMissing fun _category(): JsonField = category
+
+ /**
+ * Returns the raw JSON value of [oauthApplication].
+ *
+ * Unlike [oauthApplication], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("oauth_application")
+ @ExcludeMissing
+ fun _oauthApplication(): JsonField = oauthApplication
+
+ /**
+ * Returns the raw JSON value of [user].
+ *
+ * Unlike [user], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("user") @ExcludeMissing fun _user(): JsonField = user
+
+ @JsonAnySetter
+ private fun putAdditionalProperty(key: String, value: JsonValue) {
+ additionalProperties.put(key, value)
+ }
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map =
+ Collections.unmodifiableMap(additionalProperties)
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of [CreatedBy].
+ *
+ * The following fields are required:
+ * ```java
+ * .apiKey()
+ * .category()
+ * .oauthApplication()
+ * .user()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [CreatedBy]. */
+ class Builder internal constructor() {
+
+ private var apiKey: JsonField? = null
+ private var category: JsonField? = null
+ private var oauthApplication: JsonField? = null
+ private var user: JsonField? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(createdBy: CreatedBy) = apply {
+ apiKey = createdBy.apiKey
+ category = createdBy.category
+ oauthApplication = createdBy.oauthApplication
+ user = createdBy.user
+ additionalProperties = createdBy.additionalProperties.toMutableMap()
+ }
+
+ /** If present, details about the API key that created the transfer. */
+ fun apiKey(apiKey: ApiKey?) = apiKey(JsonField.ofNullable(apiKey))
+
+ /** Alias for calling [Builder.apiKey] with `apiKey.orElse(null)`. */
+ fun apiKey(apiKey: Optional) = apiKey(apiKey.getOrNull())
+
+ /**
+ * Sets [Builder.apiKey] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.apiKey] with a well-typed [ApiKey] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun apiKey(apiKey: JsonField) = apply { this.apiKey = apiKey }
+
+ /** The type of object that created this transfer. */
+ fun category(category: Category) = category(JsonField.of(category))
+
+ /**
+ * Sets [Builder.category] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.category] with a well-typed [Category] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun category(category: JsonField) = apply { this.category = category }
+
+ /** If present, details about the OAuth Application that created the transfer. */
+ fun oauthApplication(oauthApplication: OAuthApplication?) =
+ oauthApplication(JsonField.ofNullable(oauthApplication))
+
+ /**
+ * Alias for calling [Builder.oauthApplication] with `oauthApplication.orElse(null)`.
+ */
+ fun oauthApplication(oauthApplication: Optional) =
+ oauthApplication(oauthApplication.getOrNull())
+
+ /**
+ * Sets [Builder.oauthApplication] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.oauthApplication] with a well-typed
+ * [OAuthApplication] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun oauthApplication(oauthApplication: JsonField) = apply {
+ this.oauthApplication = oauthApplication
+ }
+
+ /** If present, details about the User that created the transfer. */
+ fun user(user: User?) = user(JsonField.ofNullable(user))
+
+ /** Alias for calling [Builder.user] with `user.orElse(null)`. */
+ fun user(user: Optional) = user(user.getOrNull())
+
+ /**
+ * Sets [Builder.user] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.user] with a well-typed [User] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun user(user: JsonField) = apply { this.user = user }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ putAllAdditionalProperties(additionalProperties)
+ }
+
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) }
+
+ fun removeAllAdditionalProperties(keys: Set) = apply {
+ keys.forEach(::removeAdditionalProperty)
+ }
+
+ /**
+ * Returns an immutable instance of [CreatedBy].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .apiKey()
+ * .category()
+ * .oauthApplication()
+ * .user()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): CreatedBy =
+ CreatedBy(
+ checkRequired("apiKey", apiKey),
+ checkRequired("category", category),
+ checkRequired("oauthApplication", oauthApplication),
+ checkRequired("user", user),
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): CreatedBy = apply {
+ if (validated) {
+ return@apply
+ }
+
+ apiKey().ifPresent { it.validate() }
+ category().validate()
+ oauthApplication().ifPresent { it.validate() }
+ user().ifPresent { it.validate() }
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: IncreaseInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic
+ internal fun validity(): Int =
+ (apiKey.asKnown().getOrNull()?.validity() ?: 0) +
+ (category.asKnown().getOrNull()?.validity() ?: 0) +
+ (oauthApplication.asKnown().getOrNull()?.validity() ?: 0) +
+ (user.asKnown().getOrNull()?.validity() ?: 0)
+
+ /** If present, details about the API key that created the transfer. */
+ class ApiKey
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val description: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("description")
+ @ExcludeMissing
+ description: JsonField = JsonMissing.of()
+ ) : this(description, mutableMapOf())
+
+ /**
+ * The description set for the API key when it was created.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
+ * if the server responded with an unexpected value).
+ */
+ fun description(): Optional = description.getOptional("description")
+
+ /**
+ * Returns the raw JSON value of [description].
+ *
+ * Unlike [description], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("description")
+ @ExcludeMissing
+ fun _description(): JsonField = description
+
+ @JsonAnySetter
+ private fun putAdditionalProperty(key: String, value: JsonValue) {
+ additionalProperties.put(key, value)
+ }
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map =
+ Collections.unmodifiableMap(additionalProperties)
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of [ApiKey].
+ *
+ * The following fields are required:
+ * ```java
+ * .description()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [ApiKey]. */
+ class Builder internal constructor() {
+
+ private var description: JsonField? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(apiKey: ApiKey) = apply {
+ description = apiKey.description
+ additionalProperties = apiKey.additionalProperties.toMutableMap()
+ }
+
+ /** The description set for the API key when it was created. */
+ fun description(description: String?) =
+ description(JsonField.ofNullable(description))
+
+ /** Alias for calling [Builder.description] with `description.orElse(null)`. */
+ fun description(description: Optional) =
+ description(description.getOrNull())
+
+ /**
+ * Sets [Builder.description] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.description] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun description(description: JsonField) = apply {
+ this.description = description
+ }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ putAllAdditionalProperties(additionalProperties)
+ }
+
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) =
+ apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun removeAdditionalProperty(key: String) = apply {
+ additionalProperties.remove(key)
+ }
+
+ fun removeAllAdditionalProperties(keys: Set) = apply {
+ keys.forEach(::removeAdditionalProperty)
+ }
+
+ /**
+ * Returns an immutable instance of [ApiKey].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .description()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): ApiKey =
+ ApiKey(
+ checkRequired("description", description),
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): ApiKey = apply {
+ if (validated) {
+ return@apply
+ }
+
+ description()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: IncreaseInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic
+ internal fun validity(): Int = (if (description.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is ApiKey &&
+ description == other.description &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy { Objects.hash(description, additionalProperties) }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "ApiKey{description=$description, additionalProperties=$additionalProperties}"
+ }
+
+ /** The type of object that created this transfer. */
+ class Category @JsonCreator private constructor(private val value: JsonField) :
+ Enum {
+
+ /**
+ * Returns this class instance's raw value.
+ *
+ * This is usually only useful if this instance was deserialized from data that doesn't
+ * match any known member, and you want to know that value. For example, if the SDK is
+ * on an older version than the API, then the API may respond with new members that the
+ * SDK is unaware of.
+ */
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ companion object {
+
+ /** An API key. Details will be under the `api_key` object. */
+ @JvmField val API_KEY = of("api_key")
+
+ /**
+ * An OAuth application you connected to Increase. Details will be under the
+ * `oauth_application` object.
+ */
+ @JvmField val OAUTH_APPLICATION = of("oauth_application")
+
+ /** A User in the Increase dashboard. Details will be under the `user` object. */
+ @JvmField val USER = of("user")
+
+ @JvmStatic fun of(value: String) = Category(JsonField.of(value))
+ }
+
+ /** An enum containing [Category]'s known values. */
+ enum class Known {
+ /** An API key. Details will be under the `api_key` object. */
+ API_KEY,
+ /**
+ * An OAuth application you connected to Increase. Details will be under the
+ * `oauth_application` object.
+ */
+ OAUTH_APPLICATION,
+ /** A User in the Increase dashboard. Details will be under the `user` object. */
+ USER,
+ }
+
+ /**
+ * An enum containing [Category]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [Category] can contain an unknown value in a couple of cases:
+ * - It was deserialized from data that doesn't match any known member. For example, if
+ * the SDK is on an older version than the API, then the API may respond with new
+ * members that the SDK is unaware of.
+ * - It was constructed with an arbitrary value using the [of] method.
+ */
+ enum class Value {
+ /** An API key. Details will be under the `api_key` object. */
+ API_KEY,
+ /**
+ * An OAuth application you connected to Increase. Details will be under the
+ * `oauth_application` object.
+ */
+ OAUTH_APPLICATION,
+ /** A User in the Increase dashboard. Details will be under the `user` object. */
+ USER,
+ /**
+ * An enum member indicating that [Category] was instantiated with an unknown value.
+ */
+ _UNKNOWN,
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value, or
+ * [Value._UNKNOWN] if the class was instantiated with an unknown value.
+ *
+ * Use the [known] method instead if you're certain the value is always known or if you
+ * want to throw for the unknown case.
+ */
+ fun value(): Value =
+ when (this) {
+ API_KEY -> Value.API_KEY
+ OAUTH_APPLICATION -> Value.OAUTH_APPLICATION
+ USER -> Value.USER
+ else -> Value._UNKNOWN
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value.
+ *
+ * Use the [value] method instead if you're uncertain the value is always known and
+ * don't want to throw for the unknown case.
+ *
+ * @throws IncreaseInvalidDataException if this class instance's value is a not a known
+ * member.
+ */
+ fun known(): Known =
+ when (this) {
+ API_KEY -> Known.API_KEY
+ OAUTH_APPLICATION -> Known.OAUTH_APPLICATION
+ USER -> Known.USER
+ else -> throw IncreaseInvalidDataException("Unknown Category: $value")
+ }
+
+ /**
+ * Returns this class instance's primitive wire representation.
+ *
+ * This differs from the [toString] method because that method is primarily for
+ * debugging and generally doesn't throw.
+ *
+ * @throws IncreaseInvalidDataException if this class instance's value does not have the
+ * expected primitive type.
+ */
+ fun asString(): String =
+ _value().asString().orElseThrow {
+ IncreaseInvalidDataException("Value is not a String")
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): Category = apply {
+ if (validated) {
+ return@apply
+ }
+
+ known()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: IncreaseInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is Category && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ /** If present, details about the OAuth Application that created the transfer. */
+ class OAuthApplication
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val name: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of()
+ ) : this(name, mutableMapOf())
+
+ /**
+ * The name of the OAuth Application.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected
+ * value).
+ */
+ fun name(): String = name.getRequired("name")
+
+ /**
+ * Returns the raw JSON value of [name].
+ *
+ * Unlike [name], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("name") @ExcludeMissing fun _name(): JsonField = name
+
+ @JsonAnySetter
+ private fun putAdditionalProperty(key: String, value: JsonValue) {
+ additionalProperties.put(key, value)
+ }
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map =
+ Collections.unmodifiableMap(additionalProperties)
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of [OAuthApplication].
+ *
+ * The following fields are required:
+ * ```java
+ * .name()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [OAuthApplication]. */
+ class Builder internal constructor() {
+
+ private var name: JsonField? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(oauthApplication: OAuthApplication) = apply {
+ name = oauthApplication.name
+ additionalProperties = oauthApplication.additionalProperties.toMutableMap()
+ }
+
+ /** The name of the OAuth Application. */
+ fun name(name: String) = name(JsonField.of(name))
+
+ /**
+ * Sets [Builder.name] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.name] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun name(name: JsonField) = apply { this.name = name }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ putAllAdditionalProperties(additionalProperties)
+ }
+
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) =
+ apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun removeAdditionalProperty(key: String) = apply {
+ additionalProperties.remove(key)
+ }
+
+ fun removeAllAdditionalProperties(keys: Set) = apply {
+ keys.forEach(::removeAdditionalProperty)
+ }
+
+ /**
+ * Returns an immutable instance of [OAuthApplication].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .name()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): OAuthApplication =
+ OAuthApplication(
+ checkRequired("name", name),
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): OAuthApplication = apply {
+ if (validated) {
+ return@apply
+ }
+
+ name()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: IncreaseInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = (if (name.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is OAuthApplication &&
+ name == other.name &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy { Objects.hash(name, additionalProperties) }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "OAuthApplication{name=$name, additionalProperties=$additionalProperties}"
+ }
+
+ /** If present, details about the User that created the transfer. */
+ class User
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val email: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("email") @ExcludeMissing email: JsonField = JsonMissing.of()
+ ) : this(email, mutableMapOf())
+
+ /**
+ * The email address of the User.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected
+ * value).
+ */
+ fun email(): String = email.getRequired("email")
+
+ /**
+ * Returns the raw JSON value of [email].
+ *
+ * Unlike [email], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("email") @ExcludeMissing fun _email(): JsonField = email
+
+ @JsonAnySetter
+ private fun putAdditionalProperty(key: String, value: JsonValue) {
+ additionalProperties.put(key, value)
+ }
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map =
+ Collections.unmodifiableMap(additionalProperties)
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of [User].
+ *
+ * The following fields are required:
+ * ```java
+ * .email()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [User]. */
+ class Builder internal constructor() {
+
+ private var email: JsonField? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(user: User) = apply {
+ email = user.email
+ additionalProperties = user.additionalProperties.toMutableMap()
+ }
+
+ /** The email address of the User. */
+ fun email(email: String) = email(JsonField.of(email))
+
+ /**
+ * Sets [Builder.email] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.email] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun email(email: JsonField) = apply { this.email = email }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ putAllAdditionalProperties(additionalProperties)
+ }
+
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) =
+ apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun removeAdditionalProperty(key: String) = apply {
+ additionalProperties.remove(key)
+ }
+
+ fun removeAllAdditionalProperties(keys: Set) = apply {
+ keys.forEach(::removeAdditionalProperty)
+ }
+
+ /**
+ * Returns an immutable instance of [User].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .email()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): User =
+ User(checkRequired("email", email), additionalProperties.toMutableMap())
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): User = apply {
+ if (validated) {
+ return@apply
+ }
+
+ email()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: IncreaseInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = (if (email.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is User &&
+ email == other.email &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy { Objects.hash(email, additionalProperties) }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "User{email=$email, additionalProperties=$additionalProperties}"
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is CreatedBy &&
+ apiKey == other.apiKey &&
+ category == other.category &&
+ oauthApplication == other.oauthApplication &&
+ user == other.user &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(apiKey, category, oauthApplication, user, additionalProperties)
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "CreatedBy{apiKey=$apiKey, category=$category, oauthApplication=$oauthApplication, user=$user, additionalProperties=$additionalProperties}"
+ }
+
+ /** The creditor's address. */
+ class CreditorAddress
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val city: JsonField,
+ private val country: JsonField,
+ private val line1: JsonField,
+ private val line2: JsonField,
+ private val postalCode: JsonField,
+ private val state: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("city") @ExcludeMissing city: JsonField = JsonMissing.of(),
+ @JsonProperty("country") @ExcludeMissing country: JsonField = JsonMissing.of(),
+ @JsonProperty("line1") @ExcludeMissing line1: JsonField = JsonMissing.of(),
+ @JsonProperty("line2") @ExcludeMissing line2: JsonField = JsonMissing.of(),
+ @JsonProperty("postal_code")
+ @ExcludeMissing
+ postalCode: JsonField = JsonMissing.of(),
+ @JsonProperty("state") @ExcludeMissing state: JsonField = JsonMissing.of(),
+ ) : this(city, country, line1, line2, postalCode, state, mutableMapOf())
+
+ /**
+ * The city, district, town, or village of the address.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun city(): Optional = city.getOptional("city")
+
+ /**
+ * The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
+ * code for the country of the address.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun country(): String = country.getRequired("country")
+
+ /**
+ * The first line of the address.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun line1(): String = line1.getRequired("line1")
+
+ /**
+ * The second line of the address.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun line2(): Optional = line2.getOptional("line2")
+
+ /**
+ * The ZIP or postal code of the address.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun postalCode(): Optional = postalCode.getOptional("postal_code")
+
+ /**
+ * The state, province, or region of the address. Required in certain countries.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun state(): Optional = state.getOptional("state")
+
+ /**
+ * Returns the raw JSON value of [city].
+ *
+ * Unlike [city], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("city") @ExcludeMissing fun _city(): JsonField = city
+
+ /**
+ * Returns the raw JSON value of [country].
+ *
+ * Unlike [country], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("country") @ExcludeMissing fun _country(): JsonField = country
+
+ /**
+ * Returns the raw JSON value of [line1].
+ *
+ * Unlike [line1], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("line1") @ExcludeMissing fun _line1(): JsonField = line1
+
+ /**
+ * Returns the raw JSON value of [line2].
+ *
+ * Unlike [line2], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("line2") @ExcludeMissing fun _line2(): JsonField = line2
+
+ /**
+ * Returns the raw JSON value of [postalCode].
+ *
+ * Unlike [postalCode], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("postal_code")
+ @ExcludeMissing
+ fun _postalCode(): JsonField = postalCode
+
+ /**
+ * Returns the raw JSON value of [state].
+ *
+ * Unlike [state], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("state") @ExcludeMissing fun _state(): JsonField = state
+
+ @JsonAnySetter
+ private fun putAdditionalProperty(key: String, value: JsonValue) {
+ additionalProperties.put(key, value)
+ }
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map =
+ Collections.unmodifiableMap(additionalProperties)
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of [CreditorAddress].
+ *
+ * The following fields are required:
+ * ```java
+ * .city()
+ * .country()
+ * .line1()
+ * .line2()
+ * .postalCode()
+ * .state()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [CreditorAddress]. */
+ class Builder internal constructor() {
+
+ private var city: JsonField? = null
+ private var country: JsonField? = null
+ private var line1: JsonField? = null
+ private var line2: JsonField? = null
+ private var postalCode: JsonField? = null
+ private var state: JsonField? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(creditorAddress: CreditorAddress) = apply {
+ city = creditorAddress.city
+ country = creditorAddress.country
+ line1 = creditorAddress.line1
+ line2 = creditorAddress.line2
+ postalCode = creditorAddress.postalCode
+ state = creditorAddress.state
+ additionalProperties = creditorAddress.additionalProperties.toMutableMap()
+ }
+
+ /** The city, district, town, or village of the address. */
+ fun city(city: String?) = city(JsonField.ofNullable(city))
+
+ /** Alias for calling [Builder.city] with `city.orElse(null)`. */
+ fun city(city: Optional) = city(city.getOrNull())
+
+ /**
+ * Sets [Builder.city] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.city] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun city(city: JsonField) = apply { this.city = city }
+
+ /**
+ * The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
+ * code for the country of the address.
+ */
+ fun country(country: String) = country(JsonField.of(country))
+
+ /**
+ * Sets [Builder.country] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.country] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun country(country: JsonField) = apply { this.country = country }
+
+ /** The first line of the address. */
+ fun line1(line1: String) = line1(JsonField.of(line1))
+
+ /**
+ * Sets [Builder.line1] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.line1] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun line1(line1: JsonField) = apply { this.line1 = line1 }
+
+ /** The second line of the address. */
+ fun line2(line2: String?) = line2(JsonField.ofNullable(line2))
+
+ /** Alias for calling [Builder.line2] with `line2.orElse(null)`. */
+ fun line2(line2: Optional) = line2(line2.getOrNull())
+
+ /**
+ * Sets [Builder.line2] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.line2] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun line2(line2: JsonField) = apply { this.line2 = line2 }
+
+ /** The ZIP or postal code of the address. */
+ fun postalCode(postalCode: String?) = postalCode(JsonField.ofNullable(postalCode))
+
+ /** Alias for calling [Builder.postalCode] with `postalCode.orElse(null)`. */
+ fun postalCode(postalCode: Optional) = postalCode(postalCode.getOrNull())
+
+ /**
+ * Sets [Builder.postalCode] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.postalCode] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun postalCode(postalCode: JsonField) = apply { this.postalCode = postalCode }
+
+ /** The state, province, or region of the address. Required in certain countries. */
+ fun state(state: String?) = state(JsonField.ofNullable(state))
+
+ /** Alias for calling [Builder.state] with `state.orElse(null)`. */
+ fun state(state: Optional) = state(state.getOrNull())
+
+ /**
+ * Sets [Builder.state] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.state] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun state(state: JsonField) = apply { this.state = state }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ putAllAdditionalProperties(additionalProperties)
+ }
+
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) }
+
+ fun removeAllAdditionalProperties(keys: Set) = apply {
+ keys.forEach(::removeAdditionalProperty)
+ }
+
+ /**
+ * Returns an immutable instance of [CreditorAddress].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .city()
+ * .country()
+ * .line1()
+ * .line2()
+ * .postalCode()
+ * .state()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): CreditorAddress =
+ CreditorAddress(
+ checkRequired("city", city),
+ checkRequired("country", country),
+ checkRequired("line1", line1),
+ checkRequired("line2", line2),
+ checkRequired("postalCode", postalCode),
+ checkRequired("state", state),
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): CreditorAddress = apply {
+ if (validated) {
+ return@apply
+ }
+
+ city()
+ country()
+ line1()
+ line2()
+ postalCode()
+ state()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: IncreaseInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic
+ internal fun validity(): Int =
+ (if (city.asKnown().isPresent) 1 else 0) +
+ (if (country.asKnown().isPresent) 1 else 0) +
+ (if (line1.asKnown().isPresent) 1 else 0) +
+ (if (line2.asKnown().isPresent) 1 else 0) +
+ (if (postalCode.asKnown().isPresent) 1 else 0) +
+ (if (state.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is CreditorAddress &&
+ city == other.city &&
+ country == other.country &&
+ line1 == other.line1 &&
+ line2 == other.line2 &&
+ postalCode == other.postalCode &&
+ state == other.state &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(city, country, line1, line2, postalCode, state, additionalProperties)
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "CreditorAddress{city=$city, country=$country, line1=$line1, line2=$line2, postalCode=$postalCode, state=$state, additionalProperties=$additionalProperties}"
+ }
+
+ /** The debtor's address. */
+ class DebtorAddress
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val city: JsonField,
+ private val country: JsonField,
+ private val line1: JsonField,
+ private val line2: JsonField,
+ private val postalCode: JsonField,
+ private val state: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("city") @ExcludeMissing city: JsonField = JsonMissing.of(),
+ @JsonProperty("country") @ExcludeMissing country: JsonField = JsonMissing.of(),
+ @JsonProperty("line1") @ExcludeMissing line1: JsonField = JsonMissing.of(),
+ @JsonProperty("line2") @ExcludeMissing line2: JsonField = JsonMissing.of(),
+ @JsonProperty("postal_code")
+ @ExcludeMissing
+ postalCode: JsonField = JsonMissing.of(),
+ @JsonProperty("state") @ExcludeMissing state: JsonField = JsonMissing.of(),
+ ) : this(city, country, line1, line2, postalCode, state, mutableMapOf())
+
+ /**
+ * The city, district, town, or village of the address.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun city(): Optional = city.getOptional("city")
+
+ /**
+ * The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
+ * code for the country of the address.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun country(): String = country.getRequired("country")
+
+ /**
+ * The first line of the address.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun line1(): String = line1.getRequired("line1")
+
+ /**
+ * The second line of the address.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun line2(): Optional = line2.getOptional("line2")
+
+ /**
+ * The ZIP or postal code of the address.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun postalCode(): Optional = postalCode.getOptional("postal_code")
+
+ /**
+ * The state, province, or region of the address. Required in certain countries.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun state(): Optional = state.getOptional("state")
+
+ /**
+ * Returns the raw JSON value of [city].
+ *
+ * Unlike [city], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("city") @ExcludeMissing fun _city(): JsonField