diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index aaa9928e9..62c7b030b 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.469.0"
+ ".": "0.470.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index c29f1d485..89d1fa6cf 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 236
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4d9e8a8a1909ef7c96fe28293ab07720938ce09be84687c57e3cf95890a78205.yml
-openapi_spec_hash: 4b3867a81a8429bf6ab119f910e72865
-config_hash: e73b1147c039cb3d6a2c56ae5926bca8
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5c95dd79214af830e2e7fb34ab05f98bde9213311d5e2d59f9a816a8e0369b85.yml
+openapi_spec_hash: ec66c2961a8b90e06ea57f934d8d75db
+config_hash: 25d7d7aa4882db6189b4b53e8e249e80
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bc27ccb79..57ccd6e38 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,14 @@
# Changelog
+## 0.470.0 (2026-03-12)
+
+Full Changelog: [v0.469.0...v0.470.0](https://github.com/Increase/increase-java/compare/v0.469.0...v0.470.0)
+
+### Features
+
+* **api:** api update ([f40da24](https://github.com/Increase/increase-java/commit/f40da246ad6e98f954edcab0931eace92ed4cd3f))
+* **api:** api update ([7470b8e](https://github.com/Increase/increase-java/commit/7470b8e77eb0ff806b41158136ec6b2346270330))
+
## 0.469.0 (2026-03-12)
Full Changelog: [v0.468.0...v0.469.0](https://github.com/Increase/increase-java/compare/v0.468.0...v0.469.0)
diff --git a/README.md b/README.md
index 734d4ad4e..00db06e8b 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.469.0)
-[](https://javadoc.io/doc/com.increase.api/increase-java/0.469.0)
+[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.470.0)
+[](https://javadoc.io/doc/com.increase.api/increase-java/0.470.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.469.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.470.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.469.0")
+implementation("com.increase.api:increase-java:0.470.0")
```
### Maven
@@ -33,7 +33,7 @@ implementation("com.increase.api:increase-java:0.469.0")
com.increase.api
increase-java
- 0.469.0
+ 0.470.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index c1f86fc17..d3a71b9de 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.increase.api"
- version = "0.469.0" // x-release-please-version
+ version = "0.470.0" // x-release-please-version
}
subprojects {
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/beneficialowners/BeneficialOwnerCreateParams.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/beneficialowners/BeneficialOwnerCreateParams.kt
new file mode 100644
index 000000000..3067c6fc2
--- /dev/null
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/beneficialowners/BeneficialOwnerCreateParams.kt
@@ -0,0 +1,2960 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package com.increase.api.models.beneficialowners
+
+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.Params
+import com.increase.api.core.checkKnown
+import com.increase.api.core.checkRequired
+import com.increase.api.core.http.Headers
+import com.increase.api.core.http.QueryParams
+import com.increase.api.core.toImmutable
+import com.increase.api.errors.IncreaseInvalidDataException
+import java.time.LocalDate
+import java.util.Collections
+import java.util.Objects
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+/** Create a beneficial owner */
+class BeneficialOwnerCreateParams
+private constructor(
+ private val body: Body,
+ private val additionalHeaders: Headers,
+ private val additionalQueryParams: QueryParams,
+) : Params {
+
+ /**
+ * The identifier of the Entity to associate with the new Beneficial Owner.
+ *
+ * @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 entityId(): String = body.entityId()
+
+ /**
+ * Personal details for the beneficial owner.
+ *
+ * @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 individual(): Individual = body.individual()
+
+ /**
+ * Why this person is considered a beneficial owner of the entity. At least one option is
+ * required, if a person is both a control person and owner, submit an array containing both.
+ *
+ * @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 prongs(): List = body.prongs()
+
+ /**
+ * This person's role or title within the entity.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun companyTitle(): Optional = body.companyTitle()
+
+ /**
+ * Returns the raw JSON value of [entityId].
+ *
+ * Unlike [entityId], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _entityId(): JsonField = body._entityId()
+
+ /**
+ * Returns the raw JSON value of [individual].
+ *
+ * Unlike [individual], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _individual(): JsonField = body._individual()
+
+ /**
+ * Returns the raw JSON value of [prongs].
+ *
+ * Unlike [prongs], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _prongs(): JsonField> = body._prongs()
+
+ /**
+ * Returns the raw JSON value of [companyTitle].
+ *
+ * Unlike [companyTitle], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _companyTitle(): JsonField = body._companyTitle()
+
+ fun _additionalBodyProperties(): Map = body._additionalProperties()
+
+ /** Additional headers to send with the request. */
+ fun _additionalHeaders(): Headers = additionalHeaders
+
+ /** Additional query param to send with the request. */
+ fun _additionalQueryParams(): QueryParams = additionalQueryParams
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of [BeneficialOwnerCreateParams].
+ *
+ * The following fields are required:
+ * ```java
+ * .entityId()
+ * .individual()
+ * .prongs()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [BeneficialOwnerCreateParams]. */
+ class Builder internal constructor() {
+
+ private var body: Body.Builder = Body.builder()
+ private var additionalHeaders: Headers.Builder = Headers.builder()
+ private var additionalQueryParams: QueryParams.Builder = QueryParams.builder()
+
+ @JvmSynthetic
+ internal fun from(beneficialOwnerCreateParams: BeneficialOwnerCreateParams) = apply {
+ body = beneficialOwnerCreateParams.body.toBuilder()
+ additionalHeaders = beneficialOwnerCreateParams.additionalHeaders.toBuilder()
+ additionalQueryParams = beneficialOwnerCreateParams.additionalQueryParams.toBuilder()
+ }
+
+ /**
+ * Sets the entire request body.
+ *
+ * This is generally only useful if you are already constructing the body separately.
+ * Otherwise, it's more convenient to use the top-level setters instead:
+ * - [entityId]
+ * - [individual]
+ * - [prongs]
+ * - [companyTitle]
+ */
+ fun body(body: Body) = apply { this.body = body.toBuilder() }
+
+ /** The identifier of the Entity to associate with the new Beneficial Owner. */
+ fun entityId(entityId: String) = apply { body.entityId(entityId) }
+
+ /**
+ * Sets [Builder.entityId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.entityId] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun entityId(entityId: JsonField) = apply { body.entityId(entityId) }
+
+ /** Personal details for the beneficial owner. */
+ fun individual(individual: Individual) = apply { body.individual(individual) }
+
+ /**
+ * Sets [Builder.individual] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.individual] with a well-typed [Individual] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun individual(individual: JsonField) = apply { body.individual(individual) }
+
+ /**
+ * Why this person is considered a beneficial owner of the entity. At least one option is
+ * required, if a person is both a control person and owner, submit an array containing
+ * both.
+ */
+ fun prongs(prongs: List) = apply { body.prongs(prongs) }
+
+ /**
+ * Sets [Builder.prongs] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.prongs] with a well-typed `List` value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun prongs(prongs: JsonField>) = apply { body.prongs(prongs) }
+
+ /**
+ * Adds a single [Prong] to [prongs].
+ *
+ * @throws IllegalStateException if the field was previously set to a non-list.
+ */
+ fun addProng(prong: Prong) = apply { body.addProng(prong) }
+
+ /** This person's role or title within the entity. */
+ fun companyTitle(companyTitle: String) = apply { body.companyTitle(companyTitle) }
+
+ /**
+ * Sets [Builder.companyTitle] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.companyTitle] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun companyTitle(companyTitle: JsonField) = apply {
+ body.companyTitle(companyTitle)
+ }
+
+ fun additionalBodyProperties(additionalBodyProperties: Map) = apply {
+ body.additionalProperties(additionalBodyProperties)
+ }
+
+ fun putAdditionalBodyProperty(key: String, value: JsonValue) = apply {
+ body.putAdditionalProperty(key, value)
+ }
+
+ fun putAllAdditionalBodyProperties(additionalBodyProperties: Map) =
+ apply {
+ body.putAllAdditionalProperties(additionalBodyProperties)
+ }
+
+ fun removeAdditionalBodyProperty(key: String) = apply { body.removeAdditionalProperty(key) }
+
+ fun removeAllAdditionalBodyProperties(keys: Set) = apply {
+ body.removeAllAdditionalProperties(keys)
+ }
+
+ fun additionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.clear()
+ putAllAdditionalHeaders(additionalHeaders)
+ }
+
+ fun additionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.clear()
+ putAllAdditionalHeaders(additionalHeaders)
+ }
+
+ fun putAdditionalHeader(name: String, value: String) = apply {
+ additionalHeaders.put(name, value)
+ }
+
+ fun putAdditionalHeaders(name: String, values: Iterable) = apply {
+ additionalHeaders.put(name, values)
+ }
+
+ fun putAllAdditionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.putAll(additionalHeaders)
+ }
+
+ fun putAllAdditionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.putAll(additionalHeaders)
+ }
+
+ fun replaceAdditionalHeaders(name: String, value: String) = apply {
+ additionalHeaders.replace(name, value)
+ }
+
+ fun replaceAdditionalHeaders(name: String, values: Iterable) = apply {
+ additionalHeaders.replace(name, values)
+ }
+
+ fun replaceAllAdditionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.replaceAll(additionalHeaders)
+ }
+
+ fun replaceAllAdditionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.replaceAll(additionalHeaders)
+ }
+
+ fun removeAdditionalHeaders(name: String) = apply { additionalHeaders.remove(name) }
+
+ fun removeAllAdditionalHeaders(names: Set) = apply {
+ additionalHeaders.removeAll(names)
+ }
+
+ fun additionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.clear()
+ putAllAdditionalQueryParams(additionalQueryParams)
+ }
+
+ fun additionalQueryParams(additionalQueryParams: Map>) = apply {
+ this.additionalQueryParams.clear()
+ putAllAdditionalQueryParams(additionalQueryParams)
+ }
+
+ fun putAdditionalQueryParam(key: String, value: String) = apply {
+ additionalQueryParams.put(key, value)
+ }
+
+ fun putAdditionalQueryParams(key: String, values: Iterable) = apply {
+ additionalQueryParams.put(key, values)
+ }
+
+ fun putAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.putAll(additionalQueryParams)
+ }
+
+ fun putAllAdditionalQueryParams(additionalQueryParams: Map>) =
+ apply {
+ this.additionalQueryParams.putAll(additionalQueryParams)
+ }
+
+ fun replaceAdditionalQueryParams(key: String, value: String) = apply {
+ additionalQueryParams.replace(key, value)
+ }
+
+ fun replaceAdditionalQueryParams(key: String, values: Iterable) = apply {
+ additionalQueryParams.replace(key, values)
+ }
+
+ fun replaceAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.replaceAll(additionalQueryParams)
+ }
+
+ fun replaceAllAdditionalQueryParams(additionalQueryParams: Map>) =
+ apply {
+ this.additionalQueryParams.replaceAll(additionalQueryParams)
+ }
+
+ fun removeAdditionalQueryParams(key: String) = apply { additionalQueryParams.remove(key) }
+
+ fun removeAllAdditionalQueryParams(keys: Set) = apply {
+ additionalQueryParams.removeAll(keys)
+ }
+
+ /**
+ * Returns an immutable instance of [BeneficialOwnerCreateParams].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .entityId()
+ * .individual()
+ * .prongs()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): BeneficialOwnerCreateParams =
+ BeneficialOwnerCreateParams(
+ body.build(),
+ additionalHeaders.build(),
+ additionalQueryParams.build(),
+ )
+ }
+
+ fun _body(): Body = body
+
+ override fun _headers(): Headers = additionalHeaders
+
+ override fun _queryParams(): QueryParams = additionalQueryParams
+
+ class Body
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val entityId: JsonField,
+ private val individual: JsonField,
+ private val prongs: JsonField>,
+ private val companyTitle: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("entity_id")
+ @ExcludeMissing
+ entityId: JsonField = JsonMissing.of(),
+ @JsonProperty("individual")
+ @ExcludeMissing
+ individual: JsonField = JsonMissing.of(),
+ @JsonProperty("prongs")
+ @ExcludeMissing
+ prongs: JsonField> = JsonMissing.of(),
+ @JsonProperty("company_title")
+ @ExcludeMissing
+ companyTitle: JsonField = JsonMissing.of(),
+ ) : this(entityId, individual, prongs, companyTitle, mutableMapOf())
+
+ /**
+ * The identifier of the Entity to associate with the new Beneficial Owner.
+ *
+ * @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 entityId(): String = entityId.getRequired("entity_id")
+
+ /**
+ * Personal details for the beneficial owner.
+ *
+ * @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 individual(): Individual = individual.getRequired("individual")
+
+ /**
+ * Why this person is considered a beneficial owner of the entity. At least one option is
+ * required, if a person is both a control person and owner, submit an array containing
+ * both.
+ *
+ * @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 prongs(): List = prongs.getRequired("prongs")
+
+ /**
+ * This person's role or title within the entity.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun companyTitle(): Optional = companyTitle.getOptional("company_title")
+
+ /**
+ * Returns the raw JSON value of [entityId].
+ *
+ * Unlike [entityId], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("entity_id") @ExcludeMissing fun _entityId(): JsonField = entityId
+
+ /**
+ * Returns the raw JSON value of [individual].
+ *
+ * Unlike [individual], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("individual")
+ @ExcludeMissing
+ fun _individual(): JsonField = individual
+
+ /**
+ * Returns the raw JSON value of [prongs].
+ *
+ * Unlike [prongs], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("prongs") @ExcludeMissing fun _prongs(): JsonField> = prongs
+
+ /**
+ * Returns the raw JSON value of [companyTitle].
+ *
+ * Unlike [companyTitle], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("company_title")
+ @ExcludeMissing
+ fun _companyTitle(): JsonField = companyTitle
+
+ @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 [Body].
+ *
+ * The following fields are required:
+ * ```java
+ * .entityId()
+ * .individual()
+ * .prongs()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [Body]. */
+ class Builder internal constructor() {
+
+ private var entityId: JsonField? = null
+ private var individual: JsonField? = null
+ private var prongs: JsonField>? = null
+ private var companyTitle: JsonField = JsonMissing.of()
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(body: Body) = apply {
+ entityId = body.entityId
+ individual = body.individual
+ prongs = body.prongs.map { it.toMutableList() }
+ companyTitle = body.companyTitle
+ additionalProperties = body.additionalProperties.toMutableMap()
+ }
+
+ /** The identifier of the Entity to associate with the new Beneficial Owner. */
+ fun entityId(entityId: String) = entityId(JsonField.of(entityId))
+
+ /**
+ * Sets [Builder.entityId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.entityId] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun entityId(entityId: JsonField) = apply { this.entityId = entityId }
+
+ /** Personal details for the beneficial owner. */
+ fun individual(individual: Individual) = individual(JsonField.of(individual))
+
+ /**
+ * Sets [Builder.individual] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.individual] with a well-typed [Individual] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun individual(individual: JsonField) = apply {
+ this.individual = individual
+ }
+
+ /**
+ * Why this person is considered a beneficial owner of the entity. At least one option
+ * is required, if a person is both a control person and owner, submit an array
+ * containing both.
+ */
+ fun prongs(prongs: List) = prongs(JsonField.of(prongs))
+
+ /**
+ * Sets [Builder.prongs] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.prongs] with a well-typed `List` value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun prongs(prongs: JsonField>) = apply {
+ this.prongs = prongs.map { it.toMutableList() }
+ }
+
+ /**
+ * Adds a single [Prong] to [prongs].
+ *
+ * @throws IllegalStateException if the field was previously set to a non-list.
+ */
+ fun addProng(prong: Prong) = apply {
+ prongs =
+ (prongs ?: JsonField.of(mutableListOf())).also {
+ checkKnown("prongs", it).add(prong)
+ }
+ }
+
+ /** This person's role or title within the entity. */
+ fun companyTitle(companyTitle: String) = companyTitle(JsonField.of(companyTitle))
+
+ /**
+ * Sets [Builder.companyTitle] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.companyTitle] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun companyTitle(companyTitle: JsonField) = apply {
+ this.companyTitle = companyTitle
+ }
+
+ 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 [Body].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .entityId()
+ * .individual()
+ * .prongs()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): Body =
+ Body(
+ checkRequired("entityId", entityId),
+ checkRequired("individual", individual),
+ checkRequired("prongs", prongs).map { it.toImmutable() },
+ companyTitle,
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): Body = apply {
+ if (validated) {
+ return@apply
+ }
+
+ entityId()
+ individual().validate()
+ prongs().forEach { it.validate() }
+ companyTitle()
+ 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 (entityId.asKnown().isPresent) 1 else 0) +
+ (individual.asKnown().getOrNull()?.validity() ?: 0) +
+ (prongs.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) +
+ (if (companyTitle.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is Body &&
+ entityId == other.entityId &&
+ individual == other.individual &&
+ prongs == other.prongs &&
+ companyTitle == other.companyTitle &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(entityId, individual, prongs, companyTitle, additionalProperties)
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "Body{entityId=$entityId, individual=$individual, prongs=$prongs, companyTitle=$companyTitle, additionalProperties=$additionalProperties}"
+ }
+
+ /** Personal details for the beneficial owner. */
+ class Individual
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val address: JsonField,
+ private val dateOfBirth: JsonField,
+ private val identification: JsonField,
+ private val name: JsonField,
+ private val confirmedNoUsTaxId: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("address") @ExcludeMissing address: JsonField = JsonMissing.of(),
+ @JsonProperty("date_of_birth")
+ @ExcludeMissing
+ dateOfBirth: JsonField = JsonMissing.of(),
+ @JsonProperty("identification")
+ @ExcludeMissing
+ identification: JsonField = JsonMissing.of(),
+ @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(),
+ @JsonProperty("confirmed_no_us_tax_id")
+ @ExcludeMissing
+ confirmedNoUsTaxId: JsonField = JsonMissing.of(),
+ ) : this(address, dateOfBirth, identification, name, confirmedNoUsTaxId, mutableMapOf())
+
+ /**
+ * The individual's physical address. Mail receiving locations like PO Boxes and PMB's are
+ * disallowed.
+ *
+ * @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 address(): Address = address.getRequired("address")
+
+ /**
+ * The person's date of birth in YYYY-MM-DD format.
+ *
+ * @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 dateOfBirth(): LocalDate = dateOfBirth.getRequired("date_of_birth")
+
+ /**
+ * A means of verifying the person's identity.
+ *
+ * @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 identification(): Identification = identification.getRequired("identification")
+
+ /**
+ * The person's legal 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 name(): String = name.getRequired("name")
+
+ /**
+ * The identification method for an individual can only be a passport, driver's license, or
+ * other document if you've confirmed the individual does not have a US tax id (either a
+ * Social Security Number or Individual Taxpayer Identification Number).
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun confirmedNoUsTaxId(): Optional =
+ confirmedNoUsTaxId.getOptional("confirmed_no_us_tax_id")
+
+ /**
+ * Returns the raw JSON value of [address].
+ *
+ * Unlike [address], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("address") @ExcludeMissing fun _address(): JsonField = address
+
+ /**
+ * Returns the raw JSON value of [dateOfBirth].
+ *
+ * Unlike [dateOfBirth], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("date_of_birth")
+ @ExcludeMissing
+ fun _dateOfBirth(): JsonField = dateOfBirth
+
+ /**
+ * Returns the raw JSON value of [identification].
+ *
+ * Unlike [identification], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("identification")
+ @ExcludeMissing
+ fun _identification(): JsonField = identification
+
+ /**
+ * 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
+
+ /**
+ * Returns the raw JSON value of [confirmedNoUsTaxId].
+ *
+ * Unlike [confirmedNoUsTaxId], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("confirmed_no_us_tax_id")
+ @ExcludeMissing
+ fun _confirmedNoUsTaxId(): JsonField = confirmedNoUsTaxId
+
+ @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 [Individual].
+ *
+ * The following fields are required:
+ * ```java
+ * .address()
+ * .dateOfBirth()
+ * .identification()
+ * .name()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [Individual]. */
+ class Builder internal constructor() {
+
+ private var address: JsonField? = null
+ private var dateOfBirth: JsonField? = null
+ private var identification: JsonField? = null
+ private var name: JsonField? = null
+ private var confirmedNoUsTaxId: JsonField = JsonMissing.of()
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(individual: Individual) = apply {
+ address = individual.address
+ dateOfBirth = individual.dateOfBirth
+ identification = individual.identification
+ name = individual.name
+ confirmedNoUsTaxId = individual.confirmedNoUsTaxId
+ additionalProperties = individual.additionalProperties.toMutableMap()
+ }
+
+ /**
+ * The individual's physical address. Mail receiving locations like PO Boxes and PMB's
+ * are disallowed.
+ */
+ fun address(address: Address) = address(JsonField.of(address))
+
+ /**
+ * Sets [Builder.address] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.address] with a well-typed [Address] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun address(address: JsonField) = apply { this.address = address }
+
+ /** The person's date of birth in YYYY-MM-DD format. */
+ fun dateOfBirth(dateOfBirth: LocalDate) = dateOfBirth(JsonField.of(dateOfBirth))
+
+ /**
+ * Sets [Builder.dateOfBirth] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.dateOfBirth] with a well-typed [LocalDate] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun dateOfBirth(dateOfBirth: JsonField) = apply {
+ this.dateOfBirth = dateOfBirth
+ }
+
+ /** A means of verifying the person's identity. */
+ fun identification(identification: Identification) =
+ identification(JsonField.of(identification))
+
+ /**
+ * Sets [Builder.identification] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.identification] with a well-typed [Identification]
+ * value instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun identification(identification: JsonField) = apply {
+ this.identification = identification
+ }
+
+ /** The person's legal name. */
+ 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 }
+
+ /**
+ * The identification method for an individual can only be a passport, driver's license,
+ * or other document if you've confirmed the individual does not have a US tax id
+ * (either a Social Security Number or Individual Taxpayer Identification Number).
+ */
+ fun confirmedNoUsTaxId(confirmedNoUsTaxId: Boolean) =
+ confirmedNoUsTaxId(JsonField.of(confirmedNoUsTaxId))
+
+ /**
+ * Sets [Builder.confirmedNoUsTaxId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.confirmedNoUsTaxId] with a well-typed [Boolean]
+ * value instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun confirmedNoUsTaxId(confirmedNoUsTaxId: JsonField) = apply {
+ this.confirmedNoUsTaxId = confirmedNoUsTaxId
+ }
+
+ 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 [Individual].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .address()
+ * .dateOfBirth()
+ * .identification()
+ * .name()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): Individual =
+ Individual(
+ checkRequired("address", address),
+ checkRequired("dateOfBirth", dateOfBirth),
+ checkRequired("identification", identification),
+ checkRequired("name", name),
+ confirmedNoUsTaxId,
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): Individual = apply {
+ if (validated) {
+ return@apply
+ }
+
+ address().validate()
+ dateOfBirth()
+ identification().validate()
+ name()
+ confirmedNoUsTaxId()
+ 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 =
+ (address.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (dateOfBirth.asKnown().isPresent) 1 else 0) +
+ (identification.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (name.asKnown().isPresent) 1 else 0) +
+ (if (confirmedNoUsTaxId.asKnown().isPresent) 1 else 0)
+
+ /**
+ * The individual's physical address. Mail receiving locations like PO Boxes and PMB's are
+ * disallowed.
+ */
+ class Address
+ @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 state: JsonField,
+ private val zip: 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("state") @ExcludeMissing state: JsonField = JsonMissing.of(),
+ @JsonProperty("zip") @ExcludeMissing zip: JsonField = JsonMissing.of(),
+ ) : this(city, country, line1, line2, state, zip, mutableMapOf())
+
+ /**
+ * The city, district, town, or village 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 city(): String = city.getRequired("city")
+
+ /**
+ * The two-letter 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. This is usually the street number and street.
+ *
+ * @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. This might be the floor or room number.
+ *
+ * @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 two-letter United States Postal Service (USPS) abbreviation for the US 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")
+
+ /**
+ * The ZIP or postal code 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 zip(): Optional = zip.getOptional("zip")
+
+ /**
+ * 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 [state].
+ *
+ * Unlike [state], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("state") @ExcludeMissing fun _state(): JsonField = state
+
+ /**
+ * Returns the raw JSON value of [zip].
+ *
+ * Unlike [zip], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("zip") @ExcludeMissing fun _zip(): JsonField = zip
+
+ @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 [Address].
+ *
+ * The following fields are required:
+ * ```java
+ * .city()
+ * .country()
+ * .line1()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [Address]. */
+ class Builder internal constructor() {
+
+ private var city: JsonField? = null
+ private var country: JsonField? = null
+ private var line1: JsonField? = null
+ private var line2: JsonField = JsonMissing.of()
+ private var state: JsonField = JsonMissing.of()
+ private var zip: JsonField = JsonMissing.of()
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(address: Address) = apply {
+ city = address.city
+ country = address.country
+ line1 = address.line1
+ line2 = address.line2
+ state = address.state
+ zip = address.zip
+ additionalProperties = address.additionalProperties.toMutableMap()
+ }
+
+ /** The city, district, town, or village of the address. */
+ fun city(city: String) = city(JsonField.of(city))
+
+ /**
+ * 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 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. This is usually the street number and street. */
+ 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. This might be the floor or room number. */
+ fun line2(line2: String) = line2(JsonField.of(line2))
+
+ /**
+ * 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 two-letter United States Postal Service (USPS) abbreviation for the US state,
+ * province, or region of the address. Required in certain countries.
+ */
+ fun state(state: String) = state(JsonField.of(state))
+
+ /**
+ * 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 }
+
+ /** The ZIP or postal code of the address. Required in certain countries. */
+ fun zip(zip: String) = zip(JsonField.of(zip))
+
+ /**
+ * Sets [Builder.zip] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.zip] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun zip(zip: JsonField) = apply { this.zip = zip }
+
+ 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 [Address].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .city()
+ * .country()
+ * .line1()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): Address =
+ Address(
+ checkRequired("city", city),
+ checkRequired("country", country),
+ checkRequired("line1", line1),
+ line2,
+ state,
+ zip,
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): Address = apply {
+ if (validated) {
+ return@apply
+ }
+
+ city()
+ country()
+ line1()
+ line2()
+ state()
+ zip()
+ 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 (state.asKnown().isPresent) 1 else 0) +
+ (if (zip.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is Address &&
+ city == other.city &&
+ country == other.country &&
+ line1 == other.line1 &&
+ line2 == other.line2 &&
+ state == other.state &&
+ zip == other.zip &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(city, country, line1, line2, state, zip, additionalProperties)
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "Address{city=$city, country=$country, line1=$line1, line2=$line2, state=$state, zip=$zip, additionalProperties=$additionalProperties}"
+ }
+
+ /** A means of verifying the person's identity. */
+ class Identification
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val method: JsonField,
+ private val number: JsonField,
+ private val driversLicense: JsonField,
+ private val other: JsonField,
+ private val passport: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("method")
+ @ExcludeMissing
+ method: JsonField = JsonMissing.of(),
+ @JsonProperty("number")
+ @ExcludeMissing
+ number: JsonField = JsonMissing.of(),
+ @JsonProperty("drivers_license")
+ @ExcludeMissing
+ driversLicense: JsonField = JsonMissing.of(),
+ @JsonProperty("other") @ExcludeMissing other: JsonField = JsonMissing.of(),
+ @JsonProperty("passport")
+ @ExcludeMissing
+ passport: JsonField = JsonMissing.of(),
+ ) : this(method, number, driversLicense, other, passport, mutableMapOf())
+
+ /**
+ * A method that can be used to verify the individual's identity.
+ *
+ * @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 method(): Method = method.getRequired("method")
+
+ /**
+ * An identification number that can be used to verify the individual's identity, such
+ * as a social security 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 number(): String = number.getRequired("number")
+
+ /**
+ * Information about the United States driver's license used for identification.
+ * Required if `method` is equal to `drivers_license`.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
+ * if the server responded with an unexpected value).
+ */
+ fun driversLicense(): Optional =
+ driversLicense.getOptional("drivers_license")
+
+ /**
+ * Information about the identification document provided. Required if `method` is equal
+ * to `other`.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
+ * if the server responded with an unexpected value).
+ */
+ fun other(): Optional = other.getOptional("other")
+
+ /**
+ * Information about the passport used for identification. Required if `method` is equal
+ * to `passport`.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
+ * if the server responded with an unexpected value).
+ */
+ fun passport(): Optional = passport.getOptional("passport")
+
+ /**
+ * Returns the raw JSON value of [method].
+ *
+ * Unlike [method], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("method") @ExcludeMissing fun _method(): JsonField = method
+
+ /**
+ * Returns the raw JSON value of [number].
+ *
+ * Unlike [number], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("number") @ExcludeMissing fun _number(): JsonField = number
+
+ /**
+ * Returns the raw JSON value of [driversLicense].
+ *
+ * Unlike [driversLicense], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("drivers_license")
+ @ExcludeMissing
+ fun _driversLicense(): JsonField = driversLicense
+
+ /**
+ * Returns the raw JSON value of [other].
+ *
+ * Unlike [other], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("other") @ExcludeMissing fun _other(): JsonField = other
+
+ /**
+ * Returns the raw JSON value of [passport].
+ *
+ * Unlike [passport], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("passport")
+ @ExcludeMissing
+ fun _passport(): JsonField = passport
+
+ @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 [Identification].
+ *
+ * The following fields are required:
+ * ```java
+ * .method()
+ * .number()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [Identification]. */
+ class Builder internal constructor() {
+
+ private var method: JsonField? = null
+ private var number: JsonField? = null
+ private var driversLicense: JsonField = JsonMissing.of()
+ private var other: JsonField = JsonMissing.of()
+ private var passport: JsonField = JsonMissing.of()
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(identification: Identification) = apply {
+ method = identification.method
+ number = identification.number
+ driversLicense = identification.driversLicense
+ other = identification.other
+ passport = identification.passport
+ additionalProperties = identification.additionalProperties.toMutableMap()
+ }
+
+ /** A method that can be used to verify the individual's identity. */
+ fun method(method: Method) = method(JsonField.of(method))
+
+ /**
+ * Sets [Builder.method] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.method] with a well-typed [Method] value
+ * instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun method(method: JsonField) = apply { this.method = method }
+
+ /**
+ * An identification number that can be used to verify the individual's identity,
+ * such as a social security number.
+ */
+ fun number(number: String) = number(JsonField.of(number))
+
+ /**
+ * Sets [Builder.number] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.number] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun number(number: JsonField) = apply { this.number = number }
+
+ /**
+ * Information about the United States driver's license used for identification.
+ * Required if `method` is equal to `drivers_license`.
+ */
+ fun driversLicense(driversLicense: DriversLicense) =
+ driversLicense(JsonField.of(driversLicense))
+
+ /**
+ * Sets [Builder.driversLicense] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.driversLicense] with a well-typed
+ * [DriversLicense] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun driversLicense(driversLicense: JsonField) = apply {
+ this.driversLicense = driversLicense
+ }
+
+ /**
+ * Information about the identification document provided. Required if `method` is
+ * equal to `other`.
+ */
+ fun other(other: Other) = other(JsonField.of(other))
+
+ /**
+ * Sets [Builder.other] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.other] with a well-typed [Other] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun other(other: JsonField) = apply { this.other = other }
+
+ /**
+ * Information about the passport used for identification. Required if `method` is
+ * equal to `passport`.
+ */
+ fun passport(passport: Passport) = passport(JsonField.of(passport))
+
+ /**
+ * Sets [Builder.passport] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.passport] with a well-typed [Passport] value
+ * instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun passport(passport: JsonField) = apply { this.passport = passport }
+
+ 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 [Identification].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .method()
+ * .number()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): Identification =
+ Identification(
+ checkRequired("method", method),
+ checkRequired("number", number),
+ driversLicense,
+ other,
+ passport,
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): Identification = apply {
+ if (validated) {
+ return@apply
+ }
+
+ method().validate()
+ number()
+ driversLicense().ifPresent { it.validate() }
+ other().ifPresent { it.validate() }
+ passport().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 =
+ (method.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (number.asKnown().isPresent) 1 else 0) +
+ (driversLicense.asKnown().getOrNull()?.validity() ?: 0) +
+ (other.asKnown().getOrNull()?.validity() ?: 0) +
+ (passport.asKnown().getOrNull()?.validity() ?: 0)
+
+ /** A method that can be used to verify the individual's identity. */
+ class Method @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 {
+
+ /** A social security number. */
+ @JvmField val SOCIAL_SECURITY_NUMBER = of("social_security_number")
+
+ /** An individual taxpayer identification number (ITIN). */
+ @JvmField
+ val INDIVIDUAL_TAXPAYER_IDENTIFICATION_NUMBER =
+ of("individual_taxpayer_identification_number")
+
+ /** A passport number. */
+ @JvmField val PASSPORT = of("passport")
+
+ /** A driver's license number. */
+ @JvmField val DRIVERS_LICENSE = of("drivers_license")
+
+ /** Another identifying document. */
+ @JvmField val OTHER = of("other")
+
+ @JvmStatic fun of(value: String) = Method(JsonField.of(value))
+ }
+
+ /** An enum containing [Method]'s known values. */
+ enum class Known {
+ /** A social security number. */
+ SOCIAL_SECURITY_NUMBER,
+ /** An individual taxpayer identification number (ITIN). */
+ INDIVIDUAL_TAXPAYER_IDENTIFICATION_NUMBER,
+ /** A passport number. */
+ PASSPORT,
+ /** A driver's license number. */
+ DRIVERS_LICENSE,
+ /** Another identifying document. */
+ OTHER,
+ }
+
+ /**
+ * An enum containing [Method]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [Method] 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 {
+ /** A social security number. */
+ SOCIAL_SECURITY_NUMBER,
+ /** An individual taxpayer identification number (ITIN). */
+ INDIVIDUAL_TAXPAYER_IDENTIFICATION_NUMBER,
+ /** A passport number. */
+ PASSPORT,
+ /** A driver's license number. */
+ DRIVERS_LICENSE,
+ /** Another identifying document. */
+ OTHER,
+ /**
+ * An enum member indicating that [Method] 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) {
+ SOCIAL_SECURITY_NUMBER -> Value.SOCIAL_SECURITY_NUMBER
+ INDIVIDUAL_TAXPAYER_IDENTIFICATION_NUMBER ->
+ Value.INDIVIDUAL_TAXPAYER_IDENTIFICATION_NUMBER
+ PASSPORT -> Value.PASSPORT
+ DRIVERS_LICENSE -> Value.DRIVERS_LICENSE
+ OTHER -> Value.OTHER
+ 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) {
+ SOCIAL_SECURITY_NUMBER -> Known.SOCIAL_SECURITY_NUMBER
+ INDIVIDUAL_TAXPAYER_IDENTIFICATION_NUMBER ->
+ Known.INDIVIDUAL_TAXPAYER_IDENTIFICATION_NUMBER
+ PASSPORT -> Known.PASSPORT
+ DRIVERS_LICENSE -> Known.DRIVERS_LICENSE
+ OTHER -> Known.OTHER
+ else -> throw IncreaseInvalidDataException("Unknown Method: $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(): Method = 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 Method && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ /**
+ * Information about the United States driver's license used for identification.
+ * Required if `method` is equal to `drivers_license`.
+ */
+ class DriversLicense
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val expirationDate: JsonField,
+ private val fileId: JsonField,
+ private val state: JsonField,
+ private val backFileId: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("expiration_date")
+ @ExcludeMissing
+ expirationDate: JsonField = JsonMissing.of(),
+ @JsonProperty("file_id")
+ @ExcludeMissing
+ fileId: JsonField = JsonMissing.of(),
+ @JsonProperty("state")
+ @ExcludeMissing
+ state: JsonField = JsonMissing.of(),
+ @JsonProperty("back_file_id")
+ @ExcludeMissing
+ backFileId: JsonField = JsonMissing.of(),
+ ) : this(expirationDate, fileId, state, backFileId, mutableMapOf())
+
+ /**
+ * The driver's license's expiration date in YYYY-MM-DD format.
+ *
+ * @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 expirationDate(): LocalDate = expirationDate.getRequired("expiration_date")
+
+ /**
+ * The identifier of the File containing the front of the driver's license.
+ *
+ * @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 fileId(): String = fileId.getRequired("file_id")
+
+ /**
+ * The state that issued the provided driver's license.
+ *
+ * @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 state(): String = state.getRequired("state")
+
+ /**
+ * The identifier of the File containing the back of the driver's license.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun backFileId(): Optional = backFileId.getOptional("back_file_id")
+
+ /**
+ * Returns the raw JSON value of [expirationDate].
+ *
+ * Unlike [expirationDate], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("expiration_date")
+ @ExcludeMissing
+ fun _expirationDate(): JsonField = expirationDate
+
+ /**
+ * Returns the raw JSON value of [fileId].
+ *
+ * Unlike [fileId], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("file_id") @ExcludeMissing fun _fileId(): JsonField = fileId
+
+ /**
+ * 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
+
+ /**
+ * Returns the raw JSON value of [backFileId].
+ *
+ * Unlike [backFileId], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("back_file_id")
+ @ExcludeMissing
+ fun _backFileId(): JsonField = backFileId
+
+ @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 [DriversLicense].
+ *
+ * The following fields are required:
+ * ```java
+ * .expirationDate()
+ * .fileId()
+ * .state()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [DriversLicense]. */
+ class Builder internal constructor() {
+
+ private var expirationDate: JsonField? = null
+ private var fileId: JsonField? = null
+ private var state: JsonField? = null
+ private var backFileId: JsonField = JsonMissing.of()
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(driversLicense: DriversLicense) = apply {
+ expirationDate = driversLicense.expirationDate
+ fileId = driversLicense.fileId
+ state = driversLicense.state
+ backFileId = driversLicense.backFileId
+ additionalProperties = driversLicense.additionalProperties.toMutableMap()
+ }
+
+ /** The driver's license's expiration date in YYYY-MM-DD format. */
+ fun expirationDate(expirationDate: LocalDate) =
+ expirationDate(JsonField.of(expirationDate))
+
+ /**
+ * Sets [Builder.expirationDate] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.expirationDate] with a well-typed
+ * [LocalDate] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun expirationDate(expirationDate: JsonField) = apply {
+ this.expirationDate = expirationDate
+ }
+
+ /** The identifier of the File containing the front of the driver's license. */
+ fun fileId(fileId: String) = fileId(JsonField.of(fileId))
+
+ /**
+ * Sets [Builder.fileId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.fileId] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun fileId(fileId: JsonField) = apply { this.fileId = fileId }
+
+ /** The state that issued the provided driver's license. */
+ fun state(state: String) = state(JsonField.of(state))
+
+ /**
+ * 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 }
+
+ /** The identifier of the File containing the back of the driver's license. */
+ fun backFileId(backFileId: String) = backFileId(JsonField.of(backFileId))
+
+ /**
+ * Sets [Builder.backFileId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.backFileId] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun backFileId(backFileId: JsonField) = apply {
+ this.backFileId = backFileId
+ }
+
+ 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 [DriversLicense].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .expirationDate()
+ * .fileId()
+ * .state()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): DriversLicense =
+ DriversLicense(
+ checkRequired("expirationDate", expirationDate),
+ checkRequired("fileId", fileId),
+ checkRequired("state", state),
+ backFileId,
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): DriversLicense = apply {
+ if (validated) {
+ return@apply
+ }
+
+ expirationDate()
+ fileId()
+ state()
+ backFileId()
+ 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 (expirationDate.asKnown().isPresent) 1 else 0) +
+ (if (fileId.asKnown().isPresent) 1 else 0) +
+ (if (state.asKnown().isPresent) 1 else 0) +
+ (if (backFileId.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is DriversLicense &&
+ expirationDate == other.expirationDate &&
+ fileId == other.fileId &&
+ state == other.state &&
+ backFileId == other.backFileId &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(expirationDate, fileId, state, backFileId, additionalProperties)
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "DriversLicense{expirationDate=$expirationDate, fileId=$fileId, state=$state, backFileId=$backFileId, additionalProperties=$additionalProperties}"
+ }
+
+ /**
+ * Information about the identification document provided. Required if `method` is equal
+ * to `other`.
+ */
+ class Other
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val country: JsonField,
+ private val description: JsonField,
+ private val fileId: JsonField,
+ private val backFileId: JsonField,
+ private val expirationDate: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("country")
+ @ExcludeMissing
+ country: JsonField = JsonMissing.of(),
+ @JsonProperty("description")
+ @ExcludeMissing
+ description: JsonField = JsonMissing.of(),
+ @JsonProperty("file_id")
+ @ExcludeMissing
+ fileId: JsonField = JsonMissing.of(),
+ @JsonProperty("back_file_id")
+ @ExcludeMissing
+ backFileId: JsonField = JsonMissing.of(),
+ @JsonProperty("expiration_date")
+ @ExcludeMissing
+ expirationDate: JsonField = JsonMissing.of(),
+ ) : this(country, description, fileId, backFileId, expirationDate, mutableMapOf())
+
+ /**
+ * The two-character ISO 3166-1 code representing the country that issued the
+ * document (e.g., `US`).
+ *
+ * @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")
+
+ /**
+ * A description of the document submitted.
+ *
+ * @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 description(): String = description.getRequired("description")
+
+ /**
+ * The identifier of the File containing the front of the document.
+ *
+ * @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 fileId(): String = fileId.getRequired("file_id")
+
+ /**
+ * The identifier of the File containing the back of the document. Not every
+ * document has a reverse side.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun backFileId(): Optional = backFileId.getOptional("back_file_id")
+
+ /**
+ * The document's expiration date in YYYY-MM-DD format.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type
+ * (e.g. if the server responded with an unexpected value).
+ */
+ fun expirationDate(): Optional =
+ expirationDate.getOptional("expiration_date")
+
+ /**
+ * 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 [description].
+ *
+ * Unlike [description], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("description")
+ @ExcludeMissing
+ fun _description(): JsonField = description
+
+ /**
+ * Returns the raw JSON value of [fileId].
+ *
+ * Unlike [fileId], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("file_id") @ExcludeMissing fun _fileId(): JsonField = fileId
+
+ /**
+ * Returns the raw JSON value of [backFileId].
+ *
+ * Unlike [backFileId], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("back_file_id")
+ @ExcludeMissing
+ fun _backFileId(): JsonField = backFileId
+
+ /**
+ * Returns the raw JSON value of [expirationDate].
+ *
+ * Unlike [expirationDate], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("expiration_date")
+ @ExcludeMissing
+ fun _expirationDate(): JsonField = expirationDate
+
+ @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 [Other].
+ *
+ * The following fields are required:
+ * ```java
+ * .country()
+ * .description()
+ * .fileId()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [Other]. */
+ class Builder internal constructor() {
+
+ private var country: JsonField? = null
+ private var description: JsonField? = null
+ private var fileId: JsonField? = null
+ private var backFileId: JsonField = JsonMissing.of()
+ private var expirationDate: JsonField = JsonMissing.of()
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(other: Other) = apply {
+ country = other.country
+ description = other.description
+ fileId = other.fileId
+ backFileId = other.backFileId
+ expirationDate = other.expirationDate
+ additionalProperties = other.additionalProperties.toMutableMap()
+ }
+
+ /**
+ * The two-character ISO 3166-1 code representing the country that issued the
+ * document (e.g., `US`).
+ */
+ 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 }
+
+ /** A description of the document submitted. */
+ fun description(description: String) = description(JsonField.of(description))
+
+ /**
+ * 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
+ }
+
+ /** The identifier of the File containing the front of the document. */
+ fun fileId(fileId: String) = fileId(JsonField.of(fileId))
+
+ /**
+ * Sets [Builder.fileId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.fileId] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun fileId(fileId: JsonField) = apply { this.fileId = fileId }
+
+ /**
+ * The identifier of the File containing the back of the document. Not every
+ * document has a reverse side.
+ */
+ fun backFileId(backFileId: String) = backFileId(JsonField.of(backFileId))
+
+ /**
+ * Sets [Builder.backFileId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.backFileId] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun backFileId(backFileId: JsonField) = apply {
+ this.backFileId = backFileId
+ }
+
+ /** The document's expiration date in YYYY-MM-DD format. */
+ fun expirationDate(expirationDate: LocalDate) =
+ expirationDate(JsonField.of(expirationDate))
+
+ /**
+ * Sets [Builder.expirationDate] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.expirationDate] with a well-typed
+ * [LocalDate] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun expirationDate(expirationDate: JsonField) = apply {
+ this.expirationDate = expirationDate
+ }
+
+ 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 [Other].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .country()
+ * .description()
+ * .fileId()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): Other =
+ Other(
+ checkRequired("country", country),
+ checkRequired("description", description),
+ checkRequired("fileId", fileId),
+ backFileId,
+ expirationDate,
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): Other = apply {
+ if (validated) {
+ return@apply
+ }
+
+ country()
+ description()
+ fileId()
+ backFileId()
+ expirationDate()
+ 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 (country.asKnown().isPresent) 1 else 0) +
+ (if (description.asKnown().isPresent) 1 else 0) +
+ (if (fileId.asKnown().isPresent) 1 else 0) +
+ (if (backFileId.asKnown().isPresent) 1 else 0) +
+ (if (expirationDate.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is Other &&
+ country == other.country &&
+ description == other.description &&
+ fileId == other.fileId &&
+ backFileId == other.backFileId &&
+ expirationDate == other.expirationDate &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(
+ country,
+ description,
+ fileId,
+ backFileId,
+ expirationDate,
+ additionalProperties,
+ )
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "Other{country=$country, description=$description, fileId=$fileId, backFileId=$backFileId, expirationDate=$expirationDate, additionalProperties=$additionalProperties}"
+ }
+
+ /**
+ * Information about the passport used for identification. Required if `method` is equal
+ * to `passport`.
+ */
+ class Passport
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val country: JsonField,
+ private val expirationDate: JsonField,
+ private val fileId: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("country")
+ @ExcludeMissing
+ country: JsonField = JsonMissing.of(),
+ @JsonProperty("expiration_date")
+ @ExcludeMissing
+ expirationDate: JsonField = JsonMissing.of(),
+ @JsonProperty("file_id")
+ @ExcludeMissing
+ fileId: JsonField = JsonMissing.of(),
+ ) : this(country, expirationDate, fileId, mutableMapOf())
+
+ /**
+ * The two-character ISO 3166-1 code representing the country that issued the
+ * document (e.g., `US`).
+ *
+ * @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 passport's expiration date in YYYY-MM-DD format.
+ *
+ * @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 expirationDate(): LocalDate = expirationDate.getRequired("expiration_date")
+
+ /**
+ * The identifier of the File containing the passport.
+ *
+ * @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 fileId(): String = fileId.getRequired("file_id")
+
+ /**
+ * 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 [expirationDate].
+ *
+ * Unlike [expirationDate], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("expiration_date")
+ @ExcludeMissing
+ fun _expirationDate(): JsonField = expirationDate
+
+ /**
+ * Returns the raw JSON value of [fileId].
+ *
+ * Unlike [fileId], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("file_id") @ExcludeMissing fun _fileId(): JsonField = fileId
+
+ @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 [Passport].
+ *
+ * The following fields are required:
+ * ```java
+ * .country()
+ * .expirationDate()
+ * .fileId()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [Passport]. */
+ class Builder internal constructor() {
+
+ private var country: JsonField? = null
+ private var expirationDate: JsonField? = null
+ private var fileId: JsonField? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(passport: Passport) = apply {
+ country = passport.country
+ expirationDate = passport.expirationDate
+ fileId = passport.fileId
+ additionalProperties = passport.additionalProperties.toMutableMap()
+ }
+
+ /**
+ * The two-character ISO 3166-1 code representing the country that issued the
+ * document (e.g., `US`).
+ */
+ 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 passport's expiration date in YYYY-MM-DD format. */
+ fun expirationDate(expirationDate: LocalDate) =
+ expirationDate(JsonField.of(expirationDate))
+
+ /**
+ * Sets [Builder.expirationDate] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.expirationDate] with a well-typed
+ * [LocalDate] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun expirationDate(expirationDate: JsonField) = apply {
+ this.expirationDate = expirationDate
+ }
+
+ /** The identifier of the File containing the passport. */
+ fun fileId(fileId: String) = fileId(JsonField.of(fileId))
+
+ /**
+ * Sets [Builder.fileId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.fileId] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or
+ * not yet supported value.
+ */
+ fun fileId(fileId: JsonField) = apply { this.fileId = fileId }
+
+ 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 [Passport].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .country()
+ * .expirationDate()
+ * .fileId()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): Passport =
+ Passport(
+ checkRequired("country", country),
+ checkRequired("expirationDate", expirationDate),
+ checkRequired("fileId", fileId),
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): Passport = apply {
+ if (validated) {
+ return@apply
+ }
+
+ country()
+ expirationDate()
+ fileId()
+ 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 (country.asKnown().isPresent) 1 else 0) +
+ (if (expirationDate.asKnown().isPresent) 1 else 0) +
+ (if (fileId.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is Passport &&
+ country == other.country &&
+ expirationDate == other.expirationDate &&
+ fileId == other.fileId &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(country, expirationDate, fileId, additionalProperties)
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "Passport{country=$country, expirationDate=$expirationDate, fileId=$fileId, additionalProperties=$additionalProperties}"
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is Identification &&
+ method == other.method &&
+ number == other.number &&
+ driversLicense == other.driversLicense &&
+ this.other == other.other &&
+ passport == other.passport &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(method, number, driversLicense, other, passport, additionalProperties)
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "Identification{method=$method, number=$number, driversLicense=$driversLicense, other=$other, passport=$passport, additionalProperties=$additionalProperties}"
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is Individual &&
+ address == other.address &&
+ dateOfBirth == other.dateOfBirth &&
+ identification == other.identification &&
+ name == other.name &&
+ confirmedNoUsTaxId == other.confirmedNoUsTaxId &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(
+ address,
+ dateOfBirth,
+ identification,
+ name,
+ confirmedNoUsTaxId,
+ additionalProperties,
+ )
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "Individual{address=$address, dateOfBirth=$dateOfBirth, identification=$identification, name=$name, confirmedNoUsTaxId=$confirmedNoUsTaxId, additionalProperties=$additionalProperties}"
+ }
+
+ class Prong @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 {
+
+ /** A person with 25% or greater direct or indirect ownership of the entity. */
+ @JvmField val OWNERSHIP = of("ownership")
+
+ /** A person who manages, directs, or has significant control of the entity. */
+ @JvmField val CONTROL = of("control")
+
+ @JvmStatic fun of(value: String) = Prong(JsonField.of(value))
+ }
+
+ /** An enum containing [Prong]'s known values. */
+ enum class Known {
+ /** A person with 25% or greater direct or indirect ownership of the entity. */
+ OWNERSHIP,
+ /** A person who manages, directs, or has significant control of the entity. */
+ CONTROL,
+ }
+
+ /**
+ * An enum containing [Prong]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [Prong] 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 {
+ /** A person with 25% or greater direct or indirect ownership of the entity. */
+ OWNERSHIP,
+ /** A person who manages, directs, or has significant control of the entity. */
+ CONTROL,
+ /** An enum member indicating that [Prong] 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) {
+ OWNERSHIP -> Value.OWNERSHIP
+ CONTROL -> Value.CONTROL
+ 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) {
+ OWNERSHIP -> Known.OWNERSHIP
+ CONTROL -> Known.CONTROL
+ else -> throw IncreaseInvalidDataException("Unknown Prong: $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(): Prong = 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 Prong && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is BeneficialOwnerCreateParams &&
+ body == other.body &&
+ additionalHeaders == other.additionalHeaders &&
+ additionalQueryParams == other.additionalQueryParams
+ }
+
+ override fun hashCode(): Int = Objects.hash(body, additionalHeaders, additionalQueryParams)
+
+ override fun toString() =
+ "BeneficialOwnerCreateParams{body=$body, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
+}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/beneficialowners/EntityBeneficialOwner.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/beneficialowners/EntityBeneficialOwner.kt
index 6cac2f2e0..878927e0c 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/beneficialowners/EntityBeneficialOwner.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/beneficialowners/EntityBeneficialOwner.kt
@@ -34,6 +34,7 @@ private constructor(
private val id: JsonField,
private val companyTitle: JsonField,
private val createdAt: JsonField,
+ private val idempotencyKey: JsonField,
private val individual: JsonField,
private val prongs: JsonField>,
private val type: JsonField