diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 617f75025..124b9841a 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.118.0"
+ ".": "0.119.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index c89f84085..4f6a4f909 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 185
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-a45946df228eec554b3cd2491f658bd5a45cb91509da0a9f92d50468ea88072f.yml
-openapi_spec_hash: 24c7c13e1e7385cab5442ca66091ffc6
-config_hash: 50031f78031362c2e4900222b9ce7ada
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-ee8607f0a2cdcaee420935050334a439db8dd097be83023fccdaf1d6f9a7de14.yml
+openapi_spec_hash: 0f21c68cdddb7c5bd99f42356d507393
+config_hash: fb5070d41fcabdedbc084b83964b592a
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cb92ee630..afbe3e6a2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,21 @@
# Changelog
+## 0.119.0 (2026-03-05)
+
+Full Changelog: [v0.118.0...v0.119.0](https://github.com/lithic-com/lithic-java/compare/v0.118.0...v0.119.0)
+
+### Features
+
+* **api:** add action_counts to rule performance reports and code to authorization actions ([20e681f](https://github.com/lithic-com/lithic-java/commit/20e681f87cc67eb4aaad477acf4f5a00ef664834))
+* **api:** Add Hold API for financial account fund reservations ([e84bda4](https://github.com/lithic-com/lithic-java/commit/e84bda4371688459b68621dfe8defc0688da69bd))
+* **api:** Remove deprecated beneficial owner entities field ([9208b91](https://github.com/lithic-com/lithic-java/commit/9208b918e410d7829e59cba6e43304eb0f3489b3))
+
+
+### Chores
+
+* **internal:** codegen related update ([c308799](https://github.com/lithic-com/lithic-java/commit/c3087996b1eded5d7072dcc496a25eb1a8a4cfd2))
+* **internal:** codegen related update ([e6b968b](https://github.com/lithic-com/lithic-java/commit/e6b968b0729d68b7b59b4044cb5beac9a97fddda))
+
## 0.118.0 (2026-02-27)
Full Changelog: [v0.117.0...v0.118.0](https://github.com/lithic-com/lithic-java/compare/v0.117.0...v0.118.0)
diff --git a/README.md b/README.md
index dfe23ed44..cd00fb363 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.118.0)
-[](https://javadoc.io/doc/com.lithic.api/lithic-java/0.118.0)
+[](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.119.0)
+[](https://javadoc.io/doc/com.lithic.api/lithic-java/0.119.0)
@@ -22,7 +22,7 @@ Use the Lithic MCP Server to enable AI assistants to interact with this API, all
-The REST API documentation can be found on [docs.lithic.com](https://docs.lithic.com). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.lithic.api/lithic-java/0.118.0).
+The REST API documentation can be found on [docs.lithic.com](https://docs.lithic.com). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.lithic.api/lithic-java/0.119.0).
@@ -33,7 +33,7 @@ The REST API documentation can be found on [docs.lithic.com](https://docs.lithic
### Gradle
```kotlin
-implementation("com.lithic.api:lithic-java:0.118.0")
+implementation("com.lithic.api:lithic-java:0.119.0")
```
### Maven
@@ -42,7 +42,7 @@ implementation("com.lithic.api:lithic-java:0.118.0")
com.lithic.api
lithic-java
- 0.118.0
+ 0.119.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index 433e6f126..322e98c9b 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.lithic.api"
- version = "0.118.0" // x-release-please-version
+ version = "0.119.0" // x-release-please-version
}
subprojects {
diff --git a/buildSrc/src/main/kotlin/lithic.java.gradle.kts b/buildSrc/src/main/kotlin/lithic.java.gradle.kts
index 70fc33f41..8f4f902a6 100644
--- a/buildSrc/src/main/kotlin/lithic.java.gradle.kts
+++ b/buildSrc/src/main/kotlin/lithic.java.gradle.kts
@@ -45,7 +45,7 @@ tasks.withType().configureEach {
val palantir by configurations.creating
dependencies {
- palantir("com.palantir.javaformat:palantir-java-format:2.73.0")
+ palantir("com.palantir.javaformat:palantir-java-format:2.89.0")
}
fun registerPalantir(
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/core/http/RetryingHttpClient.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/core/http/RetryingHttpClient.kt
index a70bc12c2..733b9370a 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/core/http/RetryingHttpClient.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/core/http/RetryingHttpClient.kt
@@ -214,13 +214,8 @@ private constructor(
}
}
?.let { retryAfterNanos ->
- // If the API asks us to wait a certain amount of time (and it's a reasonable
- // amount), just
- // do what it says.
- val retryAfter = Duration.ofNanos(retryAfterNanos.toLong())
- if (retryAfter in Duration.ofNanos(0)..Duration.ofMinutes(1)) {
- return retryAfter
- }
+ // If the API asks us to wait a certain amount of time, do what it says.
+ return Duration.ofNanos(retryAfterNanos.toLong())
}
// Apply exponential backoff, but not more than the max.
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolder.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolder.kt
index 0bf76e54e..2c2f571fe 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolder.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolder.kt
@@ -27,7 +27,6 @@ private constructor(
private val token: JsonField,
private val created: JsonField,
private val accountToken: JsonField,
- private val beneficialOwnerEntities: JsonField>,
private val beneficialOwnerIndividuals: JsonField>,
private val businessAccountToken: JsonField,
private val businessEntity: JsonField,
@@ -57,9 +56,6 @@ private constructor(
@JsonProperty("account_token")
@ExcludeMissing
accountToken: JsonField = JsonMissing.of(),
- @JsonProperty("beneficial_owner_entities")
- @ExcludeMissing
- beneficialOwnerEntities: JsonField> = JsonMissing.of(),
@JsonProperty("beneficial_owner_individuals")
@ExcludeMissing
beneficialOwnerIndividuals: JsonField> =
@@ -108,7 +104,6 @@ private constructor(
token,
created,
accountToken,
- beneficialOwnerEntities,
beneficialOwnerIndividuals,
businessAccountToken,
businessEntity,
@@ -153,16 +148,6 @@ private constructor(
*/
fun accountToken(): Optional = accountToken.getOptional("account_token")
- /**
- * Deprecated.
- *
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
- */
- @Deprecated("deprecated")
- fun beneficialOwnerEntities(): Optional> =
- beneficialOwnerEntities.getOptional("beneficial_owner_entities")
-
/**
* Only present when user_type == "BUSINESS". You must submit a list of all direct and indirect
* individuals with 25% or more ownership in the company. A maximum of 4 beneficial owners can
@@ -359,18 +344,6 @@ private constructor(
@ExcludeMissing
fun _accountToken(): JsonField = accountToken
- /**
- * Returns the raw JSON value of [beneficialOwnerEntities].
- *
- * Unlike [beneficialOwnerEntities], this method doesn't throw if the JSON field has an
- * unexpected type.
- */
- @Deprecated("deprecated")
- @JsonProperty("beneficial_owner_entities")
- @ExcludeMissing
- fun _beneficialOwnerEntities(): JsonField> =
- beneficialOwnerEntities
-
/**
* Returns the raw JSON value of [beneficialOwnerIndividuals].
*
@@ -551,9 +524,6 @@ private constructor(
private var token: JsonField? = null
private var created: JsonField? = null
private var accountToken: JsonField = JsonMissing.of()
- private var beneficialOwnerEntities:
- JsonField>? =
- null
private var beneficialOwnerIndividuals:
JsonField>? =
null
@@ -581,8 +551,6 @@ private constructor(
token = accountHolder.token
created = accountHolder.created
accountToken = accountHolder.accountToken
- beneficialOwnerEntities =
- accountHolder.beneficialOwnerEntities.map { it.toMutableList() }
beneficialOwnerIndividuals =
accountHolder.beneficialOwnerIndividuals.map { it.toMutableList() }
businessAccountToken = accountHolder.businessAccountToken
@@ -641,38 +609,6 @@ private constructor(
this.accountToken = accountToken
}
- /** Deprecated. */
- @Deprecated("deprecated")
- fun beneficialOwnerEntities(beneficialOwnerEntities: List) =
- beneficialOwnerEntities(JsonField.of(beneficialOwnerEntities))
-
- /**
- * Sets [Builder.beneficialOwnerEntities] to an arbitrary JSON value.
- *
- * You should usually call [Builder.beneficialOwnerEntities] with a well-typed
- * `List` value instead. This method is primarily for setting
- * the field to an undocumented or not yet supported value.
- */
- @Deprecated("deprecated")
- fun beneficialOwnerEntities(
- beneficialOwnerEntities: JsonField>
- ) = apply {
- this.beneficialOwnerEntities = beneficialOwnerEntities.map { it.toMutableList() }
- }
-
- /**
- * Adds a single [AccountHolderBusinessResponse] to [beneficialOwnerEntities].
- *
- * @throws IllegalStateException if the field was previously set to a non-list.
- */
- @Deprecated("deprecated")
- fun addBeneficialOwnerEntity(beneficialOwnerEntity: AccountHolderBusinessResponse) = apply {
- beneficialOwnerEntities =
- (beneficialOwnerEntities ?: JsonField.of(mutableListOf())).also {
- checkKnown("beneficialOwnerEntities", it).add(beneficialOwnerEntity)
- }
- }
-
/**
* Only present when user_type == "BUSINESS". You must submit a list of all direct and
* indirect individuals with 25% or more ownership in the company. A maximum of 4 beneficial
@@ -1040,7 +976,6 @@ private constructor(
checkRequired("token", token),
checkRequired("created", created),
accountToken,
- (beneficialOwnerEntities ?: JsonMissing.of()).map { it.toImmutable() },
(beneficialOwnerIndividuals ?: JsonMissing.of()).map { it.toImmutable() },
businessAccountToken,
businessEntity,
@@ -1072,7 +1007,6 @@ private constructor(
token()
created()
accountToken()
- beneficialOwnerEntities().ifPresent { it.forEach { it.validate() } }
beneficialOwnerIndividuals().ifPresent { it.forEach { it.validate() } }
businessAccountToken()
businessEntity().ifPresent { it.validate() }
@@ -1111,7 +1045,6 @@ private constructor(
(if (token.asKnown().isPresent) 1 else 0) +
(if (created.asKnown().isPresent) 1 else 0) +
(if (accountToken.asKnown().isPresent) 1 else 0) +
- (beneficialOwnerEntities.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) +
(beneficialOwnerIndividuals.asKnown().getOrNull()?.sumOf { it.validity().toInt() }
?: 0) +
(if (businessAccountToken.asKnown().isPresent) 1 else 0) +
@@ -1131,54 +1064,44 @@ private constructor(
(verificationApplication.asKnown().getOrNull()?.validity() ?: 0) +
(if (websiteUrl.asKnown().isPresent) 1 else 0)
- class AccountHolderBusinessResponse
+ /**
+ * Information about an individual associated with an account holder. A subset of the
+ * information provided via KYC. For example, we do not return the government id.
+ */
+ class AccountHolderIndividualResponse
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val address: JsonField,
- private val dbaBusinessName: JsonField,
+ private val dob: JsonField,
+ private val email: JsonField,
private val entityToken: JsonField,
- private val governmentId: JsonField,
- private val legalBusinessName: JsonField,
- private val phoneNumbers: JsonField>,
- private val parentCompany: JsonField,
+ private val firstName: JsonField,
+ private val lastName: JsonField,
+ private val phoneNumber: JsonField,
private val additionalProperties: MutableMap,
) {
@JsonCreator
private constructor(
@JsonProperty("address") @ExcludeMissing address: JsonField = JsonMissing.of(),
- @JsonProperty("dba_business_name")
- @ExcludeMissing
- dbaBusinessName: JsonField = JsonMissing.of(),
+ @JsonProperty("dob") @ExcludeMissing dob: JsonField = JsonMissing.of(),
+ @JsonProperty("email") @ExcludeMissing email: JsonField = JsonMissing.of(),
@JsonProperty("entity_token")
@ExcludeMissing
entityToken: JsonField = JsonMissing.of(),
- @JsonProperty("government_id")
- @ExcludeMissing
- governmentId: JsonField = JsonMissing.of(),
- @JsonProperty("legal_business_name")
+ @JsonProperty("first_name")
@ExcludeMissing
- legalBusinessName: JsonField = JsonMissing.of(),
- @JsonProperty("phone_numbers")
+ firstName: JsonField = JsonMissing.of(),
+ @JsonProperty("last_name")
@ExcludeMissing
- phoneNumbers: JsonField> = JsonMissing.of(),
- @JsonProperty("parent_company")
+ lastName: JsonField = JsonMissing.of(),
+ @JsonProperty("phone_number")
@ExcludeMissing
- parentCompany: JsonField = JsonMissing.of(),
- ) : this(
- address,
- dbaBusinessName,
- entityToken,
- governmentId,
- legalBusinessName,
- phoneNumbers,
- parentCompany,
- mutableMapOf(),
- )
+ phoneNumber: JsonField = JsonMissing.of(),
+ ) : this(address, dob, email, entityToken, firstName, lastName, phoneNumber, mutableMapOf())
/**
- * Business's physical address - PO boxes, UPS drops, and FedEx drops are not acceptable;
- * APO/FPO are acceptable.
+ * Individual's current address
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
@@ -1186,54 +1109,52 @@ private constructor(
fun address(): Address = address.getRequired("address")
/**
- * Any name that the business operates under that is not its legal business name (if
- * applicable).
+ * Individual's date of birth, as an RFC 3339 date.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- fun dbaBusinessName(): String = dbaBusinessName.getRequired("dba_business_name")
+ fun dob(): String = dob.getRequired("dob")
/**
- * Globally unique identifier for the entity.
+ * Individual's email address.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- fun entityToken(): String = entityToken.getRequired("entity_token")
+ fun email(): String = email.getRequired("email")
/**
- * Government-issued identification number. US Federal Employer Identification Numbers (EIN)
- * are currently supported, entered as full nine-digits, with or without hyphens.
+ * Globally unique identifier for the entity.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- fun governmentId(): String = governmentId.getRequired("government_id")
+ fun entityToken(): String = entityToken.getRequired("entity_token")
/**
- * Legal (formal) business name.
+ * Individual's first name, as it appears on government-issued identity documents.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- fun legalBusinessName(): String = legalBusinessName.getRequired("legal_business_name")
+ fun firstName(): String = firstName.getRequired("first_name")
/**
- * One or more of the business's phone number(s), entered as a list in E.164 format.
+ * Individual's last name, as it appears on government-issued identity documents.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- fun phoneNumbers(): List = phoneNumbers.getRequired("phone_numbers")
+ fun lastName(): String = lastName.getRequired("last_name")
/**
- * Parent company name (if applicable).
+ * Individual's phone number, entered in E.164 format.
*
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- fun parentCompany(): Optional = parentCompany.getOptional("parent_company")
+ fun phoneNumber(): String = phoneNumber.getRequired("phone_number")
/**
* Returns the raw JSON value of [address].
@@ -1243,63 +1164,50 @@ private constructor(
@JsonProperty("address") @ExcludeMissing fun _address(): JsonField = address
/**
- * Returns the raw JSON value of [dbaBusinessName].
+ * Returns the raw JSON value of [dob].
*
- * Unlike [dbaBusinessName], this method doesn't throw if the JSON field has an unexpected
- * type.
+ * Unlike [dob], this method doesn't throw if the JSON field has an unexpected type.
*/
- @JsonProperty("dba_business_name")
- @ExcludeMissing
- fun _dbaBusinessName(): JsonField = dbaBusinessName
+ @JsonProperty("dob") @ExcludeMissing fun _dob(): JsonField = dob
/**
- * Returns the raw JSON value of [entityToken].
+ * Returns the raw JSON value of [email].
*
- * Unlike [entityToken], this method doesn't throw if the JSON field has an unexpected type.
+ * Unlike [email], this method doesn't throw if the JSON field has an unexpected type.
*/
- @JsonProperty("entity_token")
- @ExcludeMissing
- fun _entityToken(): JsonField = entityToken
+ @JsonProperty("email") @ExcludeMissing fun _email(): JsonField = email
/**
- * Returns the raw JSON value of [governmentId].
+ * Returns the raw JSON value of [entityToken].
*
- * Unlike [governmentId], this method doesn't throw if the JSON field has an unexpected
- * type.
+ * Unlike [entityToken], this method doesn't throw if the JSON field has an unexpected type.
*/
- @JsonProperty("government_id")
+ @JsonProperty("entity_token")
@ExcludeMissing
- fun _governmentId(): JsonField = governmentId
+ fun _entityToken(): JsonField = entityToken
/**
- * Returns the raw JSON value of [legalBusinessName].
+ * Returns the raw JSON value of [firstName].
*
- * Unlike [legalBusinessName], this method doesn't throw if the JSON field has an unexpected
- * type.
+ * Unlike [firstName], this method doesn't throw if the JSON field has an unexpected type.
*/
- @JsonProperty("legal_business_name")
- @ExcludeMissing
- fun _legalBusinessName(): JsonField = legalBusinessName
+ @JsonProperty("first_name") @ExcludeMissing fun _firstName(): JsonField = firstName
/**
- * Returns the raw JSON value of [phoneNumbers].
+ * Returns the raw JSON value of [lastName].
*
- * Unlike [phoneNumbers], this method doesn't throw if the JSON field has an unexpected
- * type.
+ * Unlike [lastName], this method doesn't throw if the JSON field has an unexpected type.
*/
- @JsonProperty("phone_numbers")
- @ExcludeMissing
- fun _phoneNumbers(): JsonField> = phoneNumbers
+ @JsonProperty("last_name") @ExcludeMissing fun _lastName(): JsonField = lastName
/**
- * Returns the raw JSON value of [parentCompany].
+ * Returns the raw JSON value of [phoneNumber].
*
- * Unlike [parentCompany], this method doesn't throw if the JSON field has an unexpected
- * type.
+ * Unlike [phoneNumber], this method doesn't throw if the JSON field has an unexpected type.
*/
- @JsonProperty("parent_company")
+ @JsonProperty("phone_number")
@ExcludeMissing
- fun _parentCompany(): JsonField = parentCompany
+ fun _phoneNumber(): JsonField = phoneNumber
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
@@ -1317,52 +1225,49 @@ private constructor(
/**
* Returns a mutable builder for constructing an instance of
- * [AccountHolderBusinessResponse].
+ * [AccountHolderIndividualResponse].
*
* The following fields are required:
* ```java
* .address()
- * .dbaBusinessName()
+ * .dob()
+ * .email()
* .entityToken()
- * .governmentId()
- * .legalBusinessName()
- * .phoneNumbers()
+ * .firstName()
+ * .lastName()
+ * .phoneNumber()
* ```
*/
@JvmStatic fun builder() = Builder()
}
- /** A builder for [AccountHolderBusinessResponse]. */
+ /** A builder for [AccountHolderIndividualResponse]. */
class Builder internal constructor() {
private var address: JsonField? = null
- private var dbaBusinessName: JsonField? = null
+ private var dob: JsonField? = null
+ private var email: JsonField? = null
private var entityToken: JsonField? = null
- private var governmentId: JsonField? = null
- private var legalBusinessName: JsonField? = null
- private var phoneNumbers: JsonField>? = null
- private var parentCompany: JsonField = JsonMissing.of()
+ private var firstName: JsonField? = null
+ private var lastName: JsonField? = null
+ private var phoneNumber: JsonField? = null
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
- internal fun from(accountHolderBusinessResponse: AccountHolderBusinessResponse) =
+ internal fun from(accountHolderIndividualResponse: AccountHolderIndividualResponse) =
apply {
- address = accountHolderBusinessResponse.address
- dbaBusinessName = accountHolderBusinessResponse.dbaBusinessName
- entityToken = accountHolderBusinessResponse.entityToken
- governmentId = accountHolderBusinessResponse.governmentId
- legalBusinessName = accountHolderBusinessResponse.legalBusinessName
- phoneNumbers =
- accountHolderBusinessResponse.phoneNumbers.map { it.toMutableList() }
- parentCompany = accountHolderBusinessResponse.parentCompany
+ address = accountHolderIndividualResponse.address
+ dob = accountHolderIndividualResponse.dob
+ email = accountHolderIndividualResponse.email
+ entityToken = accountHolderIndividualResponse.entityToken
+ firstName = accountHolderIndividualResponse.firstName
+ lastName = accountHolderIndividualResponse.lastName
+ phoneNumber = accountHolderIndividualResponse.phoneNumber
additionalProperties =
- accountHolderBusinessResponse.additionalProperties.toMutableMap()
+ accountHolderIndividualResponse.additionalProperties.toMutableMap()
}
- /**
- * Business's physical address - PO boxes, UPS drops, and FedEx drops are not
- * acceptable; APO/FPO are acceptable.
- */
+ /** Individual's current address */
fun address(address: Address) = address(JsonField.of(address))
/**
@@ -1374,23 +1279,29 @@ private constructor(
*/
fun address(address: JsonField) = apply { this.address = address }
+ /** Individual's date of birth, as an RFC 3339 date. */
+ fun dob(dob: String) = dob(JsonField.of(dob))
+
/**
- * Any name that the business operates under that is not its legal business name (if
- * applicable).
+ * Sets [Builder.dob] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.dob] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported
+ * value.
*/
- fun dbaBusinessName(dbaBusinessName: String) =
- dbaBusinessName(JsonField.of(dbaBusinessName))
+ fun dob(dob: JsonField) = apply { this.dob = dob }
+
+ /** Individual's email address. */
+ fun email(email: String) = email(JsonField.of(email))
/**
- * Sets [Builder.dbaBusinessName] to an arbitrary JSON value.
+ * Sets [Builder.email] to an arbitrary JSON value.
*
- * You should usually call [Builder.dbaBusinessName] with a well-typed [String] value
- * instead. This method is primarily for setting the field to an undocumented or not yet
+ * You should usually call [Builder.email] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
* supported value.
*/
- fun dbaBusinessName(dbaBusinessName: JsonField) = apply {
- this.dbaBusinessName = dbaBusinessName
- }
+ fun email(email: JsonField) = apply { this.email = email }
/** Globally unique identifier for the entity. */
fun entityToken(entityToken: String) = entityToken(JsonField.of(entityToken))
@@ -1406,76 +1317,42 @@ private constructor(
this.entityToken = entityToken
}
- /**
- * Government-issued identification number. US Federal Employer Identification Numbers
- * (EIN) are currently supported, entered as full nine-digits, with or without hyphens.
- */
- fun governmentId(governmentId: String) = governmentId(JsonField.of(governmentId))
+ /** Individual's first name, as it appears on government-issued identity documents. */
+ fun firstName(firstName: String) = firstName(JsonField.of(firstName))
/**
- * Sets [Builder.governmentId] to an arbitrary JSON value.
+ * Sets [Builder.firstName] to an arbitrary JSON value.
*
- * You should usually call [Builder.governmentId] with a well-typed [String] value
- * instead. This method is primarily for setting the field to an undocumented or not yet
+ * You should usually call [Builder.firstName] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
* supported value.
*/
- fun governmentId(governmentId: JsonField) = apply {
- this.governmentId = governmentId
- }
+ fun firstName(firstName: JsonField) = apply { this.firstName = firstName }
- /** Legal (formal) business name. */
- fun legalBusinessName(legalBusinessName: String) =
- legalBusinessName(JsonField.of(legalBusinessName))
+ /** Individual's last name, as it appears on government-issued identity documents. */
+ fun lastName(lastName: String) = lastName(JsonField.of(lastName))
/**
- * Sets [Builder.legalBusinessName] to an arbitrary JSON value.
- *
- * You should usually call [Builder.legalBusinessName] with a well-typed [String] value
- * instead. This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- fun legalBusinessName(legalBusinessName: JsonField) = apply {
- this.legalBusinessName = legalBusinessName
- }
-
- /** One or more of the business's phone number(s), entered as a list in E.164 format. */
- fun phoneNumbers(phoneNumbers: List) = phoneNumbers(JsonField.of(phoneNumbers))
-
- /**
- * Sets [Builder.phoneNumbers] to an arbitrary JSON value.
+ * Sets [Builder.lastName] to an arbitrary JSON value.
*
- * You should usually call [Builder.phoneNumbers] with a well-typed `List` value
- * instead. This method is primarily for setting the field to an undocumented or not yet
+ * You should usually call [Builder.lastName] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
* supported value.
*/
- fun phoneNumbers(phoneNumbers: JsonField>) = apply {
- this.phoneNumbers = phoneNumbers.map { it.toMutableList() }
- }
-
- /**
- * Adds a single [String] to [phoneNumbers].
- *
- * @throws IllegalStateException if the field was previously set to a non-list.
- */
- fun addPhoneNumber(phoneNumber: String) = apply {
- phoneNumbers =
- (phoneNumbers ?: JsonField.of(mutableListOf())).also {
- checkKnown("phoneNumbers", it).add(phoneNumber)
- }
- }
+ fun lastName(lastName: JsonField) = apply { this.lastName = lastName }
- /** Parent company name (if applicable). */
- fun parentCompany(parentCompany: String) = parentCompany(JsonField.of(parentCompany))
+ /** Individual's phone number, entered in E.164 format. */
+ fun phoneNumber(phoneNumber: String) = phoneNumber(JsonField.of(phoneNumber))
/**
- * Sets [Builder.parentCompany] to an arbitrary JSON value.
+ * Sets [Builder.phoneNumber] to an arbitrary JSON value.
*
- * You should usually call [Builder.parentCompany] with a well-typed [String] value
+ * You should usually call [Builder.phoneNumber] with a well-typed [String] value
* instead. This method is primarily for setting the field to an undocumented or not yet
* supported value.
*/
- fun parentCompany(parentCompany: JsonField) = apply {
- this.parentCompany = parentCompany
+ fun phoneNumber(phoneNumber: JsonField) = apply {
+ this.phoneNumber = phoneNumber
}
fun additionalProperties(additionalProperties: Map) = apply {
@@ -1498,49 +1375,50 @@ private constructor(
}
/**
- * Returns an immutable instance of [AccountHolderBusinessResponse].
+ * Returns an immutable instance of [AccountHolderIndividualResponse].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
* The following fields are required:
* ```java
* .address()
- * .dbaBusinessName()
+ * .dob()
+ * .email()
* .entityToken()
- * .governmentId()
- * .legalBusinessName()
- * .phoneNumbers()
+ * .firstName()
+ * .lastName()
+ * .phoneNumber()
* ```
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): AccountHolderBusinessResponse =
- AccountHolderBusinessResponse(
+ fun build(): AccountHolderIndividualResponse =
+ AccountHolderIndividualResponse(
checkRequired("address", address),
- checkRequired("dbaBusinessName", dbaBusinessName),
+ checkRequired("dob", dob),
+ checkRequired("email", email),
checkRequired("entityToken", entityToken),
- checkRequired("governmentId", governmentId),
- checkRequired("legalBusinessName", legalBusinessName),
- checkRequired("phoneNumbers", phoneNumbers).map { it.toImmutable() },
- parentCompany,
+ checkRequired("firstName", firstName),
+ checkRequired("lastName", lastName),
+ checkRequired("phoneNumber", phoneNumber),
additionalProperties.toMutableMap(),
)
}
private var validated: Boolean = false
- fun validate(): AccountHolderBusinessResponse = apply {
+ fun validate(): AccountHolderIndividualResponse = apply {
if (validated) {
return@apply
}
address().validate()
- dbaBusinessName()
+ dob()
+ email()
entityToken()
- governmentId()
- legalBusinessName()
- phoneNumbers()
- parentCompany()
+ firstName()
+ lastName()
+ phoneNumber()
validated = true
}
@@ -1561,38 +1439,38 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(address.asKnown().getOrNull()?.validity() ?: 0) +
- (if (dbaBusinessName.asKnown().isPresent) 1 else 0) +
+ (if (dob.asKnown().isPresent) 1 else 0) +
+ (if (email.asKnown().isPresent) 1 else 0) +
(if (entityToken.asKnown().isPresent) 1 else 0) +
- (if (governmentId.asKnown().isPresent) 1 else 0) +
- (if (legalBusinessName.asKnown().isPresent) 1 else 0) +
- (phoneNumbers.asKnown().getOrNull()?.size ?: 0) +
- (if (parentCompany.asKnown().isPresent) 1 else 0)
+ (if (firstName.asKnown().isPresent) 1 else 0) +
+ (if (lastName.asKnown().isPresent) 1 else 0) +
+ (if (phoneNumber.asKnown().isPresent) 1 else 0)
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}
- return other is AccountHolderBusinessResponse &&
+ return other is AccountHolderIndividualResponse &&
address == other.address &&
- dbaBusinessName == other.dbaBusinessName &&
+ dob == other.dob &&
+ email == other.email &&
entityToken == other.entityToken &&
- governmentId == other.governmentId &&
- legalBusinessName == other.legalBusinessName &&
- phoneNumbers == other.phoneNumbers &&
- parentCompany == other.parentCompany &&
+ firstName == other.firstName &&
+ lastName == other.lastName &&
+ phoneNumber == other.phoneNumber &&
additionalProperties == other.additionalProperties
}
private val hashCode: Int by lazy {
Objects.hash(
address,
- dbaBusinessName,
+ dob,
+ email,
entityToken,
- governmentId,
- legalBusinessName,
- phoneNumbers,
- parentCompany,
+ firstName,
+ lastName,
+ phoneNumber,
additionalProperties,
)
}
@@ -1600,47 +1478,61 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "AccountHolderBusinessResponse{address=$address, dbaBusinessName=$dbaBusinessName, entityToken=$entityToken, governmentId=$governmentId, legalBusinessName=$legalBusinessName, phoneNumbers=$phoneNumbers, parentCompany=$parentCompany, additionalProperties=$additionalProperties}"
+ "AccountHolderIndividualResponse{address=$address, dob=$dob, email=$email, entityToken=$entityToken, firstName=$firstName, lastName=$lastName, phoneNumber=$phoneNumber, additionalProperties=$additionalProperties}"
}
/**
- * Information about an individual associated with an account holder. A subset of the
- * information provided via KYC. For example, we do not return the government id.
+ * Only present when user_type == "BUSINESS". Information about the business for which the
+ * account is being opened and KYB is being run.
*/
- class AccountHolderIndividualResponse
+ class AccountHolderBusinessResponse
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val address: JsonField,
- private val dob: JsonField,
- private val email: JsonField,
+ private val dbaBusinessName: JsonField,
private val entityToken: JsonField,
- private val firstName: JsonField,
- private val lastName: JsonField,
- private val phoneNumber: JsonField,
+ private val governmentId: JsonField,
+ private val legalBusinessName: JsonField,
+ private val phoneNumbers: JsonField>,
+ private val parentCompany: JsonField,
private val additionalProperties: MutableMap,
) {
@JsonCreator
private constructor(
@JsonProperty("address") @ExcludeMissing address: JsonField = JsonMissing.of(),
- @JsonProperty("dob") @ExcludeMissing dob: JsonField = JsonMissing.of(),
- @JsonProperty("email") @ExcludeMissing email: JsonField = JsonMissing.of(),
+ @JsonProperty("dba_business_name")
+ @ExcludeMissing
+ dbaBusinessName: JsonField = JsonMissing.of(),
@JsonProperty("entity_token")
@ExcludeMissing
entityToken: JsonField = JsonMissing.of(),
- @JsonProperty("first_name")
+ @JsonProperty("government_id")
@ExcludeMissing
- firstName: JsonField = JsonMissing.of(),
- @JsonProperty("last_name")
+ governmentId: JsonField = JsonMissing.of(),
+ @JsonProperty("legal_business_name")
@ExcludeMissing
- lastName: JsonField = JsonMissing.of(),
- @JsonProperty("phone_number")
+ legalBusinessName: JsonField = JsonMissing.of(),
+ @JsonProperty("phone_numbers")
@ExcludeMissing
- phoneNumber: JsonField = JsonMissing.of(),
- ) : this(address, dob, email, entityToken, firstName, lastName, phoneNumber, mutableMapOf())
+ phoneNumbers: JsonField> = JsonMissing.of(),
+ @JsonProperty("parent_company")
+ @ExcludeMissing
+ parentCompany: JsonField = JsonMissing.of(),
+ ) : this(
+ address,
+ dbaBusinessName,
+ entityToken,
+ governmentId,
+ legalBusinessName,
+ phoneNumbers,
+ parentCompany,
+ mutableMapOf(),
+ )
/**
- * Individual's current address
+ * Business's physical address - PO boxes, UPS drops, and FedEx drops are not acceptable;
+ * APO/FPO are acceptable.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
@@ -1648,52 +1540,54 @@ private constructor(
fun address(): Address = address.getRequired("address")
/**
- * Individual's date of birth, as an RFC 3339 date.
+ * Any name that the business operates under that is not its legal business name (if
+ * applicable).
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- fun dob(): String = dob.getRequired("dob")
+ fun dbaBusinessName(): String = dbaBusinessName.getRequired("dba_business_name")
/**
- * Individual's email address.
+ * Globally unique identifier for the entity.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- fun email(): String = email.getRequired("email")
+ fun entityToken(): String = entityToken.getRequired("entity_token")
/**
- * Globally unique identifier for the entity.
+ * Government-issued identification number. US Federal Employer Identification Numbers (EIN)
+ * are currently supported, entered as full nine-digits, with or without hyphens.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- fun entityToken(): String = entityToken.getRequired("entity_token")
+ fun governmentId(): String = governmentId.getRequired("government_id")
/**
- * Individual's first name, as it appears on government-issued identity documents.
+ * Legal (formal) business name.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- fun firstName(): String = firstName.getRequired("first_name")
+ fun legalBusinessName(): String = legalBusinessName.getRequired("legal_business_name")
/**
- * Individual's last name, as it appears on government-issued identity documents.
+ * One or more of the business's phone number(s), entered as a list in E.164 format.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
- fun lastName(): String = lastName.getRequired("last_name")
+ fun phoneNumbers(): List = phoneNumbers.getRequired("phone_numbers")
/**
- * Individual's phone number, entered in E.164 format.
+ * Parent company name (if applicable).
*
- * @throws LithicInvalidDataException if the JSON field has an unexpected type or is
- * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
*/
- fun phoneNumber(): String = phoneNumber.getRequired("phone_number")
+ fun parentCompany(): Optional = parentCompany.getOptional("parent_company")
/**
* Returns the raw JSON value of [address].
@@ -1703,18 +1597,14 @@ private constructor(
@JsonProperty("address") @ExcludeMissing fun _address(): JsonField = address
/**
- * Returns the raw JSON value of [dob].
- *
- * Unlike [dob], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("dob") @ExcludeMissing fun _dob(): JsonField = dob
-
- /**
- * Returns the raw JSON value of [email].
+ * Returns the raw JSON value of [dbaBusinessName].
*
- * Unlike [email], this method doesn't throw if the JSON field has an unexpected type.
+ * Unlike [dbaBusinessName], this method doesn't throw if the JSON field has an unexpected
+ * type.
*/
- @JsonProperty("email") @ExcludeMissing fun _email(): JsonField = email
+ @JsonProperty("dba_business_name")
+ @ExcludeMissing
+ fun _dbaBusinessName(): JsonField = dbaBusinessName
/**
* Returns the raw JSON value of [entityToken].
@@ -1726,27 +1616,44 @@ private constructor(
fun _entityToken(): JsonField = entityToken
/**
- * Returns the raw JSON value of [firstName].
+ * Returns the raw JSON value of [governmentId].
*
- * Unlike [firstName], this method doesn't throw if the JSON field has an unexpected type.
+ * Unlike [governmentId], this method doesn't throw if the JSON field has an unexpected
+ * type.
*/
- @JsonProperty("first_name") @ExcludeMissing fun _firstName(): JsonField = firstName
+ @JsonProperty("government_id")
+ @ExcludeMissing
+ fun _governmentId(): JsonField = governmentId
/**
- * Returns the raw JSON value of [lastName].
+ * Returns the raw JSON value of [legalBusinessName].
*
- * Unlike [lastName], this method doesn't throw if the JSON field has an unexpected type.
+ * Unlike [legalBusinessName], this method doesn't throw if the JSON field has an unexpected
+ * type.
*/
- @JsonProperty("last_name") @ExcludeMissing fun _lastName(): JsonField = lastName
+ @JsonProperty("legal_business_name")
+ @ExcludeMissing
+ fun _legalBusinessName(): JsonField = legalBusinessName
/**
- * Returns the raw JSON value of [phoneNumber].
+ * Returns the raw JSON value of [phoneNumbers].
*
- * Unlike [phoneNumber], this method doesn't throw if the JSON field has an unexpected type.
+ * Unlike [phoneNumbers], this method doesn't throw if the JSON field has an unexpected
+ * type.
*/
- @JsonProperty("phone_number")
+ @JsonProperty("phone_numbers")
@ExcludeMissing
- fun _phoneNumber(): JsonField = phoneNumber
+ fun _phoneNumbers(): JsonField> = phoneNumbers
+
+ /**
+ * Returns the raw JSON value of [parentCompany].
+ *
+ * Unlike [parentCompany], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("parent_company")
+ @ExcludeMissing
+ fun _parentCompany(): JsonField = parentCompany
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
@@ -1764,49 +1671,52 @@ private constructor(
/**
* Returns a mutable builder for constructing an instance of
- * [AccountHolderIndividualResponse].
+ * [AccountHolderBusinessResponse].
*
* The following fields are required:
* ```java
* .address()
- * .dob()
- * .email()
+ * .dbaBusinessName()
* .entityToken()
- * .firstName()
- * .lastName()
- * .phoneNumber()
+ * .governmentId()
+ * .legalBusinessName()
+ * .phoneNumbers()
* ```
*/
@JvmStatic fun builder() = Builder()
}
- /** A builder for [AccountHolderIndividualResponse]. */
+ /** A builder for [AccountHolderBusinessResponse]. */
class Builder internal constructor() {
private var address: JsonField? = null
- private var dob: JsonField? = null
- private var email: JsonField? = null
+ private var dbaBusinessName: JsonField? = null
private var entityToken: JsonField? = null
- private var firstName: JsonField? = null
- private var lastName: JsonField? = null
- private var phoneNumber: JsonField? = null
+ private var governmentId: JsonField? = null
+ private var legalBusinessName: JsonField? = null
+ private var phoneNumbers: JsonField>? = null
+ private var parentCompany: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
- internal fun from(accountHolderIndividualResponse: AccountHolderIndividualResponse) =
+ internal fun from(accountHolderBusinessResponse: AccountHolderBusinessResponse) =
apply {
- address = accountHolderIndividualResponse.address
- dob = accountHolderIndividualResponse.dob
- email = accountHolderIndividualResponse.email
- entityToken = accountHolderIndividualResponse.entityToken
- firstName = accountHolderIndividualResponse.firstName
- lastName = accountHolderIndividualResponse.lastName
- phoneNumber = accountHolderIndividualResponse.phoneNumber
+ address = accountHolderBusinessResponse.address
+ dbaBusinessName = accountHolderBusinessResponse.dbaBusinessName
+ entityToken = accountHolderBusinessResponse.entityToken
+ governmentId = accountHolderBusinessResponse.governmentId
+ legalBusinessName = accountHolderBusinessResponse.legalBusinessName
+ phoneNumbers =
+ accountHolderBusinessResponse.phoneNumbers.map { it.toMutableList() }
+ parentCompany = accountHolderBusinessResponse.parentCompany
additionalProperties =
- accountHolderIndividualResponse.additionalProperties.toMutableMap()
+ accountHolderBusinessResponse.additionalProperties.toMutableMap()
}
- /** Individual's current address */
+ /**
+ * Business's physical address - PO boxes, UPS drops, and FedEx drops are not
+ * acceptable; APO/FPO are acceptable.
+ */
fun address(address: Address) = address(JsonField.of(address))
/**
@@ -1818,29 +1728,23 @@ private constructor(
*/
fun address(address: JsonField) = apply { this.address = address }
- /** Individual's date of birth, as an RFC 3339 date. */
- fun dob(dob: String) = dob(JsonField.of(dob))
-
/**
- * Sets [Builder.dob] to an arbitrary JSON value.
- *
- * You should usually call [Builder.dob] with a well-typed [String] value instead. This
- * method is primarily for setting the field to an undocumented or not yet supported
- * value.
+ * Any name that the business operates under that is not its legal business name (if
+ * applicable).
*/
- fun dob(dob: JsonField) = apply { this.dob = dob }
-
- /** Individual's email address. */
- fun email(email: String) = email(JsonField.of(email))
+ fun dbaBusinessName(dbaBusinessName: String) =
+ dbaBusinessName(JsonField.of(dbaBusinessName))
/**
- * Sets [Builder.email] to an arbitrary JSON value.
+ * Sets [Builder.dbaBusinessName] to an arbitrary JSON value.
*
- * You should usually call [Builder.email] with a well-typed [String] value instead.
- * This method is primarily for setting the field to an undocumented or not yet
+ * You should usually call [Builder.dbaBusinessName] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
* supported value.
*/
- fun email(email: JsonField) = apply { this.email = email }
+ fun dbaBusinessName(dbaBusinessName: JsonField) = apply {
+ this.dbaBusinessName = dbaBusinessName
+ }
/** Globally unique identifier for the entity. */
fun entityToken(entityToken: String) = entityToken(JsonField.of(entityToken))
@@ -1856,42 +1760,76 @@ private constructor(
this.entityToken = entityToken
}
- /** Individual's first name, as it appears on government-issued identity documents. */
- fun firstName(firstName: String) = firstName(JsonField.of(firstName))
+ /**
+ * Government-issued identification number. US Federal Employer Identification Numbers
+ * (EIN) are currently supported, entered as full nine-digits, with or without hyphens.
+ */
+ fun governmentId(governmentId: String) = governmentId(JsonField.of(governmentId))
/**
- * Sets [Builder.firstName] to an arbitrary JSON value.
+ * Sets [Builder.governmentId] to an arbitrary JSON value.
*
- * You should usually call [Builder.firstName] with a well-typed [String] value instead.
- * This method is primarily for setting the field to an undocumented or not yet
+ * You should usually call [Builder.governmentId] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
* supported value.
*/
- fun firstName(firstName: JsonField) = apply { this.firstName = firstName }
+ fun governmentId(governmentId: JsonField) = apply {
+ this.governmentId = governmentId
+ }
- /** Individual's last name, as it appears on government-issued identity documents. */
- fun lastName(lastName: String) = lastName(JsonField.of(lastName))
+ /** Legal (formal) business name. */
+ fun legalBusinessName(legalBusinessName: String) =
+ legalBusinessName(JsonField.of(legalBusinessName))
/**
- * Sets [Builder.lastName] to an arbitrary JSON value.
+ * Sets [Builder.legalBusinessName] to an arbitrary JSON value.
*
- * You should usually call [Builder.lastName] with a well-typed [String] value instead.
- * This method is primarily for setting the field to an undocumented or not yet
+ * You should usually call [Builder.legalBusinessName] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
* supported value.
*/
- fun lastName(lastName: JsonField) = apply { this.lastName = lastName }
+ fun legalBusinessName(legalBusinessName: JsonField) = apply {
+ this.legalBusinessName = legalBusinessName
+ }
- /** Individual's phone number, entered in E.164 format. */
- fun phoneNumber(phoneNumber: String) = phoneNumber(JsonField.of(phoneNumber))
+ /** One or more of the business's phone number(s), entered as a list in E.164 format. */
+ fun phoneNumbers(phoneNumbers: List) = phoneNumbers(JsonField.of(phoneNumbers))
/**
- * Sets [Builder.phoneNumber] to an arbitrary JSON value.
+ * Sets [Builder.phoneNumbers] to an arbitrary JSON value.
*
- * You should usually call [Builder.phoneNumber] with a well-typed [String] value
+ * You should usually call [Builder.phoneNumbers] with a well-typed `List` value
* instead. This method is primarily for setting the field to an undocumented or not yet
* supported value.
*/
- fun phoneNumber(phoneNumber: JsonField) = apply {
- this.phoneNumber = phoneNumber
+ fun phoneNumbers(phoneNumbers: JsonField>) = apply {
+ this.phoneNumbers = phoneNumbers.map { it.toMutableList() }
+ }
+
+ /**
+ * Adds a single [String] to [phoneNumbers].
+ *
+ * @throws IllegalStateException if the field was previously set to a non-list.
+ */
+ fun addPhoneNumber(phoneNumber: String) = apply {
+ phoneNumbers =
+ (phoneNumbers ?: JsonField.of(mutableListOf())).also {
+ checkKnown("phoneNumbers", it).add(phoneNumber)
+ }
+ }
+
+ /** Parent company name (if applicable). */
+ fun parentCompany(parentCompany: String) = parentCompany(JsonField.of(parentCompany))
+
+ /**
+ * Sets [Builder.parentCompany] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.parentCompany] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun parentCompany(parentCompany: JsonField) = apply {
+ this.parentCompany = parentCompany
}
fun additionalProperties(additionalProperties: Map) = apply {
@@ -1914,50 +1852,49 @@ private constructor(
}
/**
- * Returns an immutable instance of [AccountHolderIndividualResponse].
+ * Returns an immutable instance of [AccountHolderBusinessResponse].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
* The following fields are required:
* ```java
* .address()
- * .dob()
- * .email()
+ * .dbaBusinessName()
* .entityToken()
- * .firstName()
- * .lastName()
- * .phoneNumber()
+ * .governmentId()
+ * .legalBusinessName()
+ * .phoneNumbers()
* ```
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): AccountHolderIndividualResponse =
- AccountHolderIndividualResponse(
+ fun build(): AccountHolderBusinessResponse =
+ AccountHolderBusinessResponse(
checkRequired("address", address),
- checkRequired("dob", dob),
- checkRequired("email", email),
+ checkRequired("dbaBusinessName", dbaBusinessName),
checkRequired("entityToken", entityToken),
- checkRequired("firstName", firstName),
- checkRequired("lastName", lastName),
- checkRequired("phoneNumber", phoneNumber),
+ checkRequired("governmentId", governmentId),
+ checkRequired("legalBusinessName", legalBusinessName),
+ checkRequired("phoneNumbers", phoneNumbers).map { it.toImmutable() },
+ parentCompany,
additionalProperties.toMutableMap(),
)
}
private var validated: Boolean = false
- fun validate(): AccountHolderIndividualResponse = apply {
+ fun validate(): AccountHolderBusinessResponse = apply {
if (validated) {
return@apply
}
address().validate()
- dob()
- email()
+ dbaBusinessName()
entityToken()
- firstName()
- lastName()
- phoneNumber()
+ governmentId()
+ legalBusinessName()
+ phoneNumbers()
+ parentCompany()
validated = true
}
@@ -1978,38 +1915,38 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(address.asKnown().getOrNull()?.validity() ?: 0) +
- (if (dob.asKnown().isPresent) 1 else 0) +
- (if (email.asKnown().isPresent) 1 else 0) +
+ (if (dbaBusinessName.asKnown().isPresent) 1 else 0) +
(if (entityToken.asKnown().isPresent) 1 else 0) +
- (if (firstName.asKnown().isPresent) 1 else 0) +
- (if (lastName.asKnown().isPresent) 1 else 0) +
- (if (phoneNumber.asKnown().isPresent) 1 else 0)
+ (if (governmentId.asKnown().isPresent) 1 else 0) +
+ (if (legalBusinessName.asKnown().isPresent) 1 else 0) +
+ (phoneNumbers.asKnown().getOrNull()?.size ?: 0) +
+ (if (parentCompany.asKnown().isPresent) 1 else 0)
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}
- return other is AccountHolderIndividualResponse &&
+ return other is AccountHolderBusinessResponse &&
address == other.address &&
- dob == other.dob &&
- email == other.email &&
+ dbaBusinessName == other.dbaBusinessName &&
entityToken == other.entityToken &&
- firstName == other.firstName &&
- lastName == other.lastName &&
- phoneNumber == other.phoneNumber &&
+ governmentId == other.governmentId &&
+ legalBusinessName == other.legalBusinessName &&
+ phoneNumbers == other.phoneNumbers &&
+ parentCompany == other.parentCompany &&
additionalProperties == other.additionalProperties
}
private val hashCode: Int by lazy {
Objects.hash(
address,
- dob,
- email,
+ dbaBusinessName,
entityToken,
- firstName,
- lastName,
- phoneNumber,
+ governmentId,
+ legalBusinessName,
+ phoneNumbers,
+ parentCompany,
additionalProperties,
)
}
@@ -2017,7 +1954,7 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "AccountHolderIndividualResponse{address=$address, dob=$dob, email=$email, entityToken=$entityToken, firstName=$firstName, lastName=$lastName, phoneNumber=$phoneNumber, additionalProperties=$additionalProperties}"
+ "AccountHolderBusinessResponse{address=$address, dbaBusinessName=$dbaBusinessName, entityToken=$entityToken, governmentId=$governmentId, legalBusinessName=$legalBusinessName, phoneNumbers=$phoneNumbers, parentCompany=$parentCompany, additionalProperties=$additionalProperties}"
}
/** The type of KYC exemption for a KYC-Exempt Account Holder. */
@@ -3256,7 +3193,6 @@ private constructor(
token == other.token &&
created == other.created &&
accountToken == other.accountToken &&
- beneficialOwnerEntities == other.beneficialOwnerEntities &&
beneficialOwnerIndividuals == other.beneficialOwnerIndividuals &&
businessAccountToken == other.businessAccountToken &&
businessEntity == other.businessEntity &&
@@ -3282,7 +3218,6 @@ private constructor(
token,
created,
accountToken,
- beneficialOwnerEntities,
beneficialOwnerIndividuals,
businessAccountToken,
businessEntity,
@@ -3307,5 +3242,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "AccountHolder{token=$token, created=$created, accountToken=$accountToken, beneficialOwnerEntities=$beneficialOwnerEntities, beneficialOwnerIndividuals=$beneficialOwnerIndividuals, businessAccountToken=$businessAccountToken, businessEntity=$businessEntity, controlPerson=$controlPerson, email=$email, exemptionType=$exemptionType, externalId=$externalId, individual=$individual, naicsCode=$naicsCode, natureOfBusiness=$natureOfBusiness, phoneNumber=$phoneNumber, requiredDocuments=$requiredDocuments, status=$status, statusReasons=$statusReasons, userType=$userType, verificationApplication=$verificationApplication, websiteUrl=$websiteUrl, additionalProperties=$additionalProperties}"
+ "AccountHolder{token=$token, created=$created, accountToken=$accountToken, beneficialOwnerIndividuals=$beneficialOwnerIndividuals, businessAccountToken=$businessAccountToken, businessEntity=$businessEntity, controlPerson=$controlPerson, email=$email, exemptionType=$exemptionType, externalId=$externalId, individual=$individual, naicsCode=$naicsCode, natureOfBusiness=$natureOfBusiness, phoneNumber=$phoneNumber, requiredDocuments=$requiredDocuments, status=$status, statusReasons=$statusReasons, userType=$userType, verificationApplication=$verificationApplication, websiteUrl=$websiteUrl, additionalProperties=$additionalProperties}"
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderEntityCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderEntityCreateParams.kt
index c3bd16e4b..fc08f3045 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderEntityCreateParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderEntityCreateParams.kt
@@ -22,10 +22,10 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/**
- * Create a new beneficial owner or replace the control person entity on an existing KYB account
- * holder. This endpoint is only applicable for account holders enrolled through a KYB workflow with
- * the Persona KYB provider. A new control person can only replace the existing one. A maximum of 4
- * beneficial owners can be associated with an account holder.
+ * Create a new beneficial owner individual or replace the control person entity on an existing KYB
+ * account holder. This endpoint is only applicable for account holders enrolled through a KYB
+ * workflow with the Persona KYB provider. A new control person can only replace the existing one. A
+ * maximum of 4 beneficial owners can be associated with an account holder.
*/
class AccountHolderEntityCreateParams
private constructor(
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderEntityDeleteParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderEntityDeleteParams.kt
index 4b2486caf..4d08d0866 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderEntityDeleteParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderEntityDeleteParams.kt
@@ -13,8 +13,8 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/**
- * Deactivate a beneficial owner entity on an existing KYB account holder. Only beneficial owner
- * entities can be deactivated.
+ * Deactivate a beneficial owner individual on an existing KYB account holder. Only beneficial owner
+ * individuals can be deactivated.
*/
class AccountHolderEntityDeleteParams
private constructor(
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentReviewResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentReviewResponse.kt
index 9ec3b45e9..380871128 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentReviewResponse.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentReviewResponse.kt
@@ -26,7 +26,6 @@ class AccountHolderSimulateEnrollmentReviewResponse
private constructor(
private val token: JsonField,
private val accountToken: JsonField,
- private val beneficialOwnerEntities: JsonField>,
private val beneficialOwnerIndividuals: JsonField>,
private val businessAccountToken: JsonField,
private val businessEntity: JsonField,
@@ -54,9 +53,6 @@ private constructor(
@JsonProperty("account_token")
@ExcludeMissing
accountToken: JsonField = JsonMissing.of(),
- @JsonProperty("beneficial_owner_entities")
- @ExcludeMissing
- beneficialOwnerEntities: JsonField> = JsonMissing.of(),
@JsonProperty("beneficial_owner_individuals")
@ExcludeMissing
beneficialOwnerIndividuals: JsonField> = JsonMissing.of(),
@@ -106,7 +102,6 @@ private constructor(
) : this(
token,
accountToken,
- beneficialOwnerEntities,
beneficialOwnerIndividuals,
businessAccountToken,
businessEntity,
@@ -144,15 +139,6 @@ private constructor(
*/
fun accountToken(): Optional = accountToken.getOptional("account_token")
- /**
- * Deprecated.
- *
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
- */
- fun beneficialOwnerEntities(): Optional> =
- beneficialOwnerEntities.getOptional("beneficial_owner_entities")
-
/**
* Only present when user_type == "BUSINESS". You must submit a list of all direct and indirect
* individuals with 25% or more ownership in the company. A maximum of 4 beneficial owners can
@@ -351,16 +337,6 @@ private constructor(
@ExcludeMissing
fun _accountToken(): JsonField = accountToken
- /**
- * Returns the raw JSON value of [beneficialOwnerEntities].
- *
- * Unlike [beneficialOwnerEntities], this method doesn't throw if the JSON field has an
- * unexpected type.
- */
- @JsonProperty("beneficial_owner_entities")
- @ExcludeMissing
- fun _beneficialOwnerEntities(): JsonField> = beneficialOwnerEntities
-
/**
* Returns the raw JSON value of [beneficialOwnerIndividuals].
*
@@ -540,7 +516,6 @@ private constructor(
private var token: JsonField = JsonMissing.of()
private var accountToken: JsonField = JsonMissing.of()
- private var beneficialOwnerEntities: JsonField>? = null
private var beneficialOwnerIndividuals: JsonField>? = null
private var businessAccountToken: JsonField = JsonMissing.of()
private var businessEntity: JsonField = JsonMissing.of()
@@ -568,10 +543,6 @@ private constructor(
) = apply {
token = accountHolderSimulateEnrollmentReviewResponse.token
accountToken = accountHolderSimulateEnrollmentReviewResponse.accountToken
- beneficialOwnerEntities =
- accountHolderSimulateEnrollmentReviewResponse.beneficialOwnerEntities.map {
- it.toMutableList()
- }
beneficialOwnerIndividuals =
accountHolderSimulateEnrollmentReviewResponse.beneficialOwnerIndividuals.map {
it.toMutableList()
@@ -630,34 +601,6 @@ private constructor(
this.accountToken = accountToken
}
- /** Deprecated. */
- fun beneficialOwnerEntities(beneficialOwnerEntities: List) =
- beneficialOwnerEntities(JsonField.of(beneficialOwnerEntities))
-
- /**
- * Sets [Builder.beneficialOwnerEntities] to an arbitrary JSON value.
- *
- * You should usually call [Builder.beneficialOwnerEntities] with a well-typed
- * `List` value instead. This method is primarily for setting the field
- * to an undocumented or not yet supported value.
- */
- fun beneficialOwnerEntities(beneficialOwnerEntities: JsonField>) =
- apply {
- this.beneficialOwnerEntities = beneficialOwnerEntities.map { it.toMutableList() }
- }
-
- /**
- * Adds a single [KybBusinessEntity] to [beneficialOwnerEntities].
- *
- * @throws IllegalStateException if the field was previously set to a non-list.
- */
- fun addBeneficialOwnerEntity(beneficialOwnerEntity: KybBusinessEntity) = apply {
- beneficialOwnerEntities =
- (beneficialOwnerEntities ?: JsonField.of(mutableListOf())).also {
- checkKnown("beneficialOwnerEntities", it).add(beneficialOwnerEntity)
- }
- }
-
/**
* Only present when user_type == "BUSINESS". You must submit a list of all direct and
* indirect individuals with 25% or more ownership in the company. A maximum of 4 beneficial
@@ -1035,7 +978,6 @@ private constructor(
AccountHolderSimulateEnrollmentReviewResponse(
token,
accountToken,
- (beneficialOwnerEntities ?: JsonMissing.of()).map { it.toImmutable() },
(beneficialOwnerIndividuals ?: JsonMissing.of()).map { it.toImmutable() },
businessAccountToken,
businessEntity,
@@ -1067,7 +1009,6 @@ private constructor(
token()
accountToken()
- beneficialOwnerEntities().ifPresent { it.forEach { it.validate() } }
beneficialOwnerIndividuals().ifPresent { it.forEach { it.validate() } }
businessAccountToken()
businessEntity().ifPresent { it.validate() }
@@ -1106,7 +1047,6 @@ private constructor(
internal fun validity(): Int =
(if (token.asKnown().isPresent) 1 else 0) +
(if (accountToken.asKnown().isPresent) 1 else 0) +
- (beneficialOwnerEntities.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) +
(beneficialOwnerIndividuals.asKnown().getOrNull()?.sumOf { it.validity().toInt() }
?: 0) +
(if (businessAccountToken.asKnown().isPresent) 1 else 0) +
@@ -3473,7 +3413,6 @@ private constructor(
return other is AccountHolderSimulateEnrollmentReviewResponse &&
token == other.token &&
accountToken == other.accountToken &&
- beneficialOwnerEntities == other.beneficialOwnerEntities &&
beneficialOwnerIndividuals == other.beneficialOwnerIndividuals &&
businessAccountToken == other.businessAccountToken &&
businessEntity == other.businessEntity &&
@@ -3499,7 +3438,6 @@ private constructor(
Objects.hash(
token,
accountToken,
- beneficialOwnerEntities,
beneficialOwnerIndividuals,
businessAccountToken,
businessEntity,
@@ -3525,5 +3463,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "AccountHolderSimulateEnrollmentReviewResponse{token=$token, accountToken=$accountToken, beneficialOwnerEntities=$beneficialOwnerEntities, beneficialOwnerIndividuals=$beneficialOwnerIndividuals, businessAccountToken=$businessAccountToken, businessEntity=$businessEntity, controlPerson=$controlPerson, created=$created, email=$email, exemptionType=$exemptionType, externalId=$externalId, individual=$individual, naicsCode=$naicsCode, natureOfBusiness=$natureOfBusiness, phoneNumber=$phoneNumber, requiredDocuments=$requiredDocuments, status=$status, statusReasons=$statusReasons, userType=$userType, verificationApplication=$verificationApplication, websiteUrl=$websiteUrl, additionalProperties=$additionalProperties}"
+ "AccountHolderSimulateEnrollmentReviewResponse{token=$token, accountToken=$accountToken, beneficialOwnerIndividuals=$beneficialOwnerIndividuals, businessAccountToken=$businessAccountToken, businessEntity=$businessEntity, controlPerson=$controlPerson, created=$created, email=$email, exemptionType=$exemptionType, externalId=$externalId, individual=$individual, naicsCode=$naicsCode, natureOfBusiness=$natureOfBusiness, phoneNumber=$phoneNumber, requiredDocuments=$requiredDocuments, status=$status, statusReasons=$statusReasons, userType=$userType, verificationApplication=$verificationApplication, websiteUrl=$websiteUrl, additionalProperties=$additionalProperties}"
}
diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderUpdateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderUpdateParams.kt
index 54a08bcce..0dea077b0 100644
--- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderUpdateParams.kt
+++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderUpdateParams.kt
@@ -468,7 +468,6 @@ private constructor(
class KybPatchRequest
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
- private val beneficialOwnerEntities: JsonField>,
private val beneficialOwnerIndividuals: JsonField>,
private val businessEntity: JsonField,
private val controlPerson: JsonField,
@@ -481,9 +480,6 @@ private constructor(
@JsonCreator
private constructor(
- @JsonProperty("beneficial_owner_entities")
- @ExcludeMissing
- beneficialOwnerEntities: JsonField> = JsonMissing.of(),
@JsonProperty("beneficial_owner_individuals")
@ExcludeMissing
beneficialOwnerIndividuals: JsonField> = JsonMissing.of(),
@@ -506,7 +502,6 @@ private constructor(
@ExcludeMissing
websiteUrl: JsonField = JsonMissing.of(),
) : this(
- beneficialOwnerEntities,
beneficialOwnerIndividuals,
businessEntity,
controlPerson,
@@ -517,16 +512,6 @@ private constructor(
mutableMapOf(),
)
- /**
- * Deprecated.
- *
- * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if
- * the server responded with an unexpected value).
- */
- @Deprecated("deprecated")
- fun beneficialOwnerEntities(): Optional> =
- beneficialOwnerEntities.getOptional("beneficial_owner_entities")
-
/**
* You must submit a list of all direct and indirect individuals with 25% or more
* ownership in the company. A maximum of 4 beneficial owners can be submitted. If no
@@ -600,18 +585,6 @@ private constructor(
*/
fun websiteUrl(): Optional = websiteUrl.getOptional("website_url")
- /**
- * Returns the raw JSON value of [beneficialOwnerEntities].
- *
- * Unlike [beneficialOwnerEntities], this method doesn't throw if the JSON field has an
- * unexpected type.
- */
- @Deprecated("deprecated")
- @JsonProperty("beneficial_owner_entities")
- @ExcludeMissing
- fun _beneficialOwnerEntities(): JsonField> =
- beneficialOwnerEntities
-
/**
* Returns the raw JSON value of [beneficialOwnerIndividuals].
*
@@ -704,9 +677,6 @@ private constructor(
/** A builder for [KybPatchRequest]. */
class Builder internal constructor() {
- private var beneficialOwnerEntities:
- JsonField>? =
- null
private var beneficialOwnerIndividuals: JsonField>? =
null
private var businessEntity: JsonField = JsonMissing.of()
@@ -719,8 +689,6 @@ private constructor(
@JvmSynthetic
internal fun from(kybPatchRequest: KybPatchRequest) = apply {
- beneficialOwnerEntities =
- kybPatchRequest.beneficialOwnerEntities.map { it.toMutableList() }
beneficialOwnerIndividuals =
kybPatchRequest.beneficialOwnerIndividuals.map { it.toMutableList() }
businessEntity = kybPatchRequest.businessEntity
@@ -732,40 +700,6 @@ private constructor(
additionalProperties = kybPatchRequest.additionalProperties.toMutableMap()
}
- /** Deprecated. */
- @Deprecated("deprecated")
- fun beneficialOwnerEntities(beneficialOwnerEntities: List) =
- beneficialOwnerEntities(JsonField.of(beneficialOwnerEntities))
-
- /**
- * Sets [Builder.beneficialOwnerEntities] to an arbitrary JSON value.
- *
- * You should usually call [Builder.beneficialOwnerEntities] with a well-typed
- * `List` value instead. This method is primarily for
- * setting the field to an undocumented or not yet supported value.
- */
- @Deprecated("deprecated")
- fun beneficialOwnerEntities(
- beneficialOwnerEntities: JsonField>
- ) = apply {
- this.beneficialOwnerEntities =
- beneficialOwnerEntities.map { it.toMutableList() }
- }
-
- /**
- * Adds a single [KybBusinessEntityPatch] to [beneficialOwnerEntities].
- *
- * @throws IllegalStateException if the field was previously set to a non-list.
- */
- @Deprecated("deprecated")
- fun addBeneficialOwnerEntity(beneficialOwnerEntity: KybBusinessEntityPatch) =
- apply {
- beneficialOwnerEntities =
- (beneficialOwnerEntities ?: JsonField.of(mutableListOf())).also {
- checkKnown("beneficialOwnerEntities", it).add(beneficialOwnerEntity)
- }
- }
-
/**
* You must submit a list of all direct and indirect individuals with 25% or more
* ownership in the company. A maximum of 4 beneficial owners can be submitted. If
@@ -940,7 +874,6 @@ private constructor(
*/
fun build(): KybPatchRequest =
KybPatchRequest(
- (beneficialOwnerEntities ?: JsonMissing.of()).map { it.toImmutable() },
(beneficialOwnerIndividuals ?: JsonMissing.of()).map { it.toImmutable() },
businessEntity,
controlPerson,
@@ -959,7 +892,6 @@ private constructor(
return@apply
}
- beneficialOwnerEntities().ifPresent { it.forEach { it.validate() } }
beneficialOwnerIndividuals().ifPresent { it.forEach { it.validate() } }
businessEntity().ifPresent { it.validate() }
controlPerson().ifPresent { it.validate() }
@@ -986,11 +918,8 @@ private constructor(
*/
@JvmSynthetic
internal fun validity(): Int =
- (beneficialOwnerEntities.asKnown().getOrNull()?.sumOf { it.validity().toInt() }
+ (beneficialOwnerIndividuals.asKnown().getOrNull()?.sumOf { it.validity().toInt() }
?: 0) +
- (beneficialOwnerIndividuals.asKnown().getOrNull()?.sumOf {
- it.validity().toInt()
- } ?: 0) +
(businessEntity.asKnown().getOrNull()?.validity() ?: 0) +
(controlPerson.asKnown().getOrNull()?.validity() ?: 0) +
(if (externalId.asKnown().isPresent) 1 else 0) +
@@ -998,16 +927,18 @@ private constructor(
(if (natureOfBusiness.asKnown().isPresent) 1 else 0) +
(if (websiteUrl.asKnown().isPresent) 1 else 0)
- class KybBusinessEntityPatch
+ /** Individuals associated with a KYB application. Phone number is optional. */
+ class IndividualPatch
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val entityToken: JsonField,
private val address: JsonField,
- private val dbaBusinessName: JsonField,
+ private val dob: JsonField,
+ private val email: JsonField,
+ private val firstName: JsonField,
private val governmentId: JsonField,
- private val legalBusinessName: JsonField,
- private val parentCompany: JsonField,
- private val phoneNumbers: JsonField>,
+ private val lastName: JsonField,
+ private val phoneNumber: JsonField,
private val additionalProperties: MutableMap,
) {
@@ -1019,29 +950,31 @@ private constructor(
@JsonProperty("address")
@ExcludeMissing
address: JsonField = JsonMissing.of(),
- @JsonProperty("dba_business_name")
+ @JsonProperty("dob") @ExcludeMissing dob: JsonField = JsonMissing.of(),
+ @JsonProperty("email")
@ExcludeMissing
- dbaBusinessName: JsonField = JsonMissing.of(),
+ email: JsonField = JsonMissing.of(),
+ @JsonProperty("first_name")
+ @ExcludeMissing
+ firstName: JsonField = JsonMissing.of(),
@JsonProperty("government_id")
@ExcludeMissing
governmentId: JsonField = JsonMissing.of(),
- @JsonProperty("legal_business_name")
- @ExcludeMissing
- legalBusinessName: JsonField = JsonMissing.of(),
- @JsonProperty("parent_company")
+ @JsonProperty("last_name")
@ExcludeMissing
- parentCompany: JsonField = JsonMissing.of(),
- @JsonProperty("phone_numbers")
+ lastName: JsonField = JsonMissing.of(),
+ @JsonProperty("phone_number")
@ExcludeMissing
- phoneNumbers: JsonField> = JsonMissing.of(),
+ phoneNumber: JsonField = JsonMissing.of(),
) : this(
entityToken,
address,
- dbaBusinessName,
+ dob,
+ email,
+ firstName,
governmentId,
- legalBusinessName,
- parentCompany,
- phoneNumbers,
+ lastName,
+ phoneNumber,
mutableMapOf(),
)
@@ -1055,8 +988,8 @@ private constructor(
fun entityToken(): String = entityToken.getRequired("entity_token")
/**
- * Business''s physical address - PO boxes, UPS drops, and FedEx drops are not
- * acceptable; APO/FPO are acceptable.
+ * Individual's current address - PO boxes, UPS drops, and FedEx drops are not
+ * acceptable; APO/FPO are acceptable. Only USA addresses are currently supported.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g.
* if the server responded with an unexpected value).
@@ -1064,50 +997,56 @@ private constructor(
fun address(): Optional = address.getOptional("address")
/**
- * Any name that the business operates under that is not its legal business name (if
- * applicable).
+ * Individual's date of birth, as an RFC 3339 date.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g.
* if the server responded with an unexpected value).
*/
- fun dbaBusinessName(): Optional =
- dbaBusinessName.getOptional("dba_business_name")
+ fun dob(): Optional = dob.getOptional("dob")
/**
- * Government-issued identification number. US Federal Employer Identification
- * Numbers (EIN) are currently supported, entered as full nine-digits, with or
- * without hyphens.
+ * Individual's email address. If utilizing Lithic for chargeback processing, this
+ * customer email address may be used to communicate dispute status and resolution.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g.
* if the server responded with an unexpected value).
*/
- fun governmentId(): Optional = governmentId.getOptional("government_id")
+ fun email(): Optional = email.getOptional("email")
/**
- * Legal (formal) business name.
+ * Individual's first name, as it appears on government-issued identity documents.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g.
* if the server responded with an unexpected value).
*/
- fun legalBusinessName(): Optional =
- legalBusinessName.getOptional("legal_business_name")
+ fun firstName(): Optional = firstName.getOptional("first_name")
/**
- * Parent company name (if applicable).
+ * Government-issued identification number (required for identity verification and
+ * compliance with banking regulations). Social Security Numbers (SSN) and
+ * Individual Taxpayer Identification Numbers (ITIN) are currently supported,
+ * entered as full nine-digits, with or without hyphens
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g.
* if the server responded with an unexpected value).
*/
- fun parentCompany(): Optional = parentCompany.getOptional("parent_company")
+ fun governmentId(): Optional = governmentId.getOptional("government_id")
/**
- * One or more of the business's phone number(s), entered as a list in E.164 format.
+ * Individual's last name, as it appears on government-issued identity documents.
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g.
* if the server responded with an unexpected value).
*/
- fun phoneNumbers(): Optional> =
- phoneNumbers.getOptional("phone_numbers")
+ fun lastName(): Optional = lastName.getOptional("last_name")
+
+ /**
+ * Individual's phone number, entered in E.164 format.
+ *
+ * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g.
+ * if the server responded with an unexpected value).
+ */
+ fun phoneNumber(): Optional = phoneNumber.getOptional("phone_number")
/**
* Returns the raw JSON value of [entityToken].
@@ -1130,54 +1069,59 @@ private constructor(
fun _address(): JsonField = address
/**
- * Returns the raw JSON value of [dbaBusinessName].
+ * Returns the raw JSON value of [dob].
*
- * Unlike [dbaBusinessName], this method doesn't throw if the JSON field has an
- * unexpected type.
+ * Unlike [dob], this method doesn't throw if the JSON field has an unexpected type.
*/
- @JsonProperty("dba_business_name")
- @ExcludeMissing
- fun _dbaBusinessName(): JsonField = dbaBusinessName
+ @JsonProperty("dob") @ExcludeMissing fun _dob(): JsonField = dob
/**
- * Returns the raw JSON value of [governmentId].
+ * Returns the raw JSON value of [email].
*
- * Unlike [governmentId], this method doesn't throw if the JSON field has an
- * unexpected type.
+ * Unlike [email], this method doesn't throw if the JSON field has an unexpected
+ * type.
*/
- @JsonProperty("government_id")
+ @JsonProperty("email") @ExcludeMissing fun _email(): JsonField = email
+
+ /**
+ * Returns the raw JSON value of [firstName].
+ *
+ * Unlike [firstName], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("first_name")
@ExcludeMissing
- fun _governmentId(): JsonField = governmentId
+ fun _firstName(): JsonField = firstName
/**
- * Returns the raw JSON value of [legalBusinessName].
+ * Returns the raw JSON value of [governmentId].
*
- * Unlike [legalBusinessName], this method doesn't throw if the JSON field has an
+ * Unlike [governmentId], this method doesn't throw if the JSON field has an
* unexpected type.
*/
- @JsonProperty("legal_business_name")
+ @JsonProperty("government_id")
@ExcludeMissing
- fun _legalBusinessName(): JsonField = legalBusinessName
+ fun _governmentId(): JsonField = governmentId
/**
- * Returns the raw JSON value of [parentCompany].
+ * Returns the raw JSON value of [lastName].
*
- * Unlike [parentCompany], this method doesn't throw if the JSON field has an
- * unexpected type.
+ * Unlike [lastName], this method doesn't throw if the JSON field has an unexpected
+ * type.
*/
- @JsonProperty("parent_company")
+ @JsonProperty("last_name")
@ExcludeMissing
- fun _parentCompany(): JsonField = parentCompany
+ fun _lastName(): JsonField = lastName
/**
- * Returns the raw JSON value of [phoneNumbers].
+ * Returns the raw JSON value of [phoneNumber].
*
- * Unlike [phoneNumbers], this method doesn't throw if the JSON field has an
+ * Unlike [phoneNumber], this method doesn't throw if the JSON field has an
* unexpected type.
*/
- @JsonProperty("phone_numbers")
+ @JsonProperty("phone_number")
@ExcludeMissing
- fun _phoneNumbers(): JsonField> = phoneNumbers
+ fun _phoneNumber(): JsonField = phoneNumber
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
@@ -1194,8 +1138,7 @@ private constructor(
companion object {
/**
- * Returns a mutable builder for constructing an instance of
- * [KybBusinessEntityPatch].
+ * Returns a mutable builder for constructing an instance of [IndividualPatch].
*
* The following fields are required:
* ```java
@@ -1205,30 +1148,30 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [KybBusinessEntityPatch]. */
+ /** A builder for [IndividualPatch]. */
class Builder internal constructor() {
private var entityToken: JsonField? = null
private var address: JsonField = JsonMissing.of()
- private var dbaBusinessName: JsonField = JsonMissing.of()
+ private var dob: JsonField = JsonMissing.of()
+ private var email: JsonField = JsonMissing.of()
+ private var firstName: JsonField = JsonMissing.of()
private var governmentId: JsonField = JsonMissing.of()
- private var legalBusinessName: JsonField = JsonMissing.of()
- private var parentCompany: JsonField = JsonMissing.of()
- private var phoneNumbers: JsonField>? = null
+ private var lastName: JsonField = JsonMissing.of()
+ private var phoneNumber: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap