diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 561ef01a7..b6f0298a6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.493.0" + ".": "0.494.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index c8871b7f0..5d64e13d4 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-6d31504be6985a7ded14abd0da36f4272e585f43332b4b844a6950c98ddcd525.yml -openapi_spec_hash: f1a49121780ec8b6678b864ac9b1deca +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e2a6ff4685a5e09babcce1fb8bac1f373d707d5b5aa82aae375d923de890e56e.yml +openapi_spec_hash: 244249a4dfb6c746c161a704764d7630 config_hash: 0997ade8b52ec04e82d5b0c3b61bb51e diff --git a/CHANGELOG.md b/CHANGELOG.md index 06178f679..a25e120fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.494.0 (2026-03-25) + +Full Changelog: [v0.493.0...v0.494.0](https://github.com/Increase/increase-java/compare/v0.493.0...v0.494.0) + +### Features + +* **api:** api update ([602a20a](https://github.com/Increase/increase-java/commit/602a20ad4df6395d478ab90616c7722615a107f7)) + ## 0.493.0 (2026-03-24) Full Changelog: [v0.492.0...v0.493.0](https://github.com/Increase/increase-java/compare/v0.492.0...v0.493.0) diff --git a/README.md b/README.md index 92ddd5b9f..a3282876f 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ -[![Maven Central](https://img.shields.io/maven-central/v/com.increase.api/increase-java)](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.493.0) -[![javadoc](https://javadoc.io/badge2/com.increase.api/increase-java/0.493.0/javadoc.svg)](https://javadoc.io/doc/com.increase.api/increase-java/0.493.0) +[![Maven Central](https://img.shields.io/maven-central/v/com.increase.api/increase-java)](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.494.0) +[![javadoc](https://javadoc.io/badge2/com.increase.api/increase-java/0.494.0/javadoc.svg)](https://javadoc.io/doc/com.increase.api/increase-java/0.494.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.493.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.494.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.493.0") +implementation("com.increase.api:increase-java:0.494.0") ``` ### Maven @@ -33,7 +33,7 @@ implementation("com.increase.api:increase-java:0.493.0") com.increase.api increase-java - 0.493.0 + 0.494.0 ``` diff --git a/build.gradle.kts b/build.gradle.kts index 594ee5e4b..46629b1af 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ repositories { allprojects { group = "com.increase.api" - version = "0.493.0" // x-release-please-version + version = "0.494.0" // x-release-please-version } subprojects { diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/entities/Entity.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/entities/Entity.kt index bbe503746..c8dfc175f 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/entities/Entity.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/entities/Entity.kt @@ -1007,8 +1007,8 @@ private constructor( private val email: JsonField, private val incorporationState: JsonField, private val industryCode: JsonField, + private val legalIdentifier: JsonField, private val name: JsonField, - private val taxIdentifier: JsonField, private val website: JsonField, private val additionalProperties: MutableMap, ) { @@ -1026,10 +1026,10 @@ private constructor( @JsonProperty("industry_code") @ExcludeMissing industryCode: JsonField = JsonMissing.of(), - @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(), - @JsonProperty("tax_identifier") + @JsonProperty("legal_identifier") @ExcludeMissing - taxIdentifier: JsonField = JsonMissing.of(), + legalIdentifier: JsonField = JsonMissing.of(), + @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(), @JsonProperty("website") @ExcludeMissing website: JsonField = JsonMissing.of(), ) : this( address, @@ -1037,8 +1037,8 @@ private constructor( email, incorporationState, industryCode, + legalIdentifier, name, - taxIdentifier, website, mutableMapOf(), ) @@ -1088,20 +1088,21 @@ private constructor( fun industryCode(): Optional = industryCode.getOptional("industry_code") /** - * The legal name of the corporation. + * The legal identifier of the corporation. * - * @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). + * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). */ - fun name(): String = name.getRequired("name") + fun legalIdentifier(): Optional = + legalIdentifier.getOptional("legal_identifier") /** - * The Employer Identification Number (EIN) for the corporation. + * The legal name of the corporation. * - * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if - * the server responded with an unexpected value). + * @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 taxIdentifier(): Optional = taxIdentifier.getOptional("tax_identifier") + fun name(): String = name.getRequired("name") /** * The website of the corporation. @@ -1156,21 +1157,21 @@ private constructor( fun _industryCode(): JsonField = industryCode /** - * Returns the raw JSON value of [name]. + * Returns the raw JSON value of [legalIdentifier]. * - * Unlike [name], this method doesn't throw if the JSON field has an unexpected type. + * Unlike [legalIdentifier], this method doesn't throw if the JSON field has an unexpected + * type. */ - @JsonProperty("name") @ExcludeMissing fun _name(): JsonField = name + @JsonProperty("legal_identifier") + @ExcludeMissing + fun _legalIdentifier(): JsonField = legalIdentifier /** - * Returns the raw JSON value of [taxIdentifier]. + * Returns the raw JSON value of [name]. * - * Unlike [taxIdentifier], this method doesn't throw if the JSON field has an unexpected - * type. + * Unlike [name], this method doesn't throw if the JSON field has an unexpected type. */ - @JsonProperty("tax_identifier") - @ExcludeMissing - fun _taxIdentifier(): JsonField = taxIdentifier + @JsonProperty("name") @ExcludeMissing fun _name(): JsonField = name /** * Returns the raw JSON value of [website]. @@ -1203,8 +1204,8 @@ private constructor( * .email() * .incorporationState() * .industryCode() + * .legalIdentifier() * .name() - * .taxIdentifier() * .website() * ``` */ @@ -1219,8 +1220,8 @@ private constructor( private var email: JsonField? = null private var incorporationState: JsonField? = null private var industryCode: JsonField? = null + private var legalIdentifier: JsonField? = null private var name: JsonField? = null - private var taxIdentifier: JsonField? = null private var website: JsonField? = null private var additionalProperties: MutableMap = mutableMapOf() @@ -1231,8 +1232,8 @@ private constructor( email = corporation.email incorporationState = corporation.incorporationState industryCode = corporation.industryCode + legalIdentifier = corporation.legalIdentifier name = corporation.name - taxIdentifier = corporation.taxIdentifier website = corporation.website additionalProperties = corporation.additionalProperties.toMutableMap() } @@ -1341,6 +1342,25 @@ private constructor( this.industryCode = industryCode } + /** The legal identifier of the corporation. */ + fun legalIdentifier(legalIdentifier: LegalIdentifier?) = + legalIdentifier(JsonField.ofNullable(legalIdentifier)) + + /** Alias for calling [Builder.legalIdentifier] with `legalIdentifier.orElse(null)`. */ + fun legalIdentifier(legalIdentifier: Optional) = + legalIdentifier(legalIdentifier.getOrNull()) + + /** + * Sets [Builder.legalIdentifier] to an arbitrary JSON value. + * + * You should usually call [Builder.legalIdentifier] with a well-typed [LegalIdentifier] + * value instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun legalIdentifier(legalIdentifier: JsonField) = apply { + this.legalIdentifier = legalIdentifier + } + /** The legal name of the corporation. */ fun name(name: String) = name(JsonField.of(name)) @@ -1353,25 +1373,6 @@ private constructor( */ fun name(name: JsonField) = apply { this.name = name } - /** The Employer Identification Number (EIN) for the corporation. */ - fun taxIdentifier(taxIdentifier: String?) = - taxIdentifier(JsonField.ofNullable(taxIdentifier)) - - /** Alias for calling [Builder.taxIdentifier] with `taxIdentifier.orElse(null)`. */ - fun taxIdentifier(taxIdentifier: Optional) = - taxIdentifier(taxIdentifier.getOrNull()) - - /** - * Sets [Builder.taxIdentifier] to an arbitrary JSON value. - * - * You should usually call [Builder.taxIdentifier] with a well-typed [String] value - * instead. This method is primarily for setting the field to an undocumented or not yet - * supported value. - */ - fun taxIdentifier(taxIdentifier: JsonField) = apply { - this.taxIdentifier = taxIdentifier - } - /** The website of the corporation. */ fun website(website: String?) = website(JsonField.ofNullable(website)) @@ -1418,8 +1419,8 @@ private constructor( * .email() * .incorporationState() * .industryCode() + * .legalIdentifier() * .name() - * .taxIdentifier() * .website() * ``` * @@ -1432,8 +1433,8 @@ private constructor( checkRequired("email", email), checkRequired("incorporationState", incorporationState), checkRequired("industryCode", industryCode), + checkRequired("legalIdentifier", legalIdentifier), checkRequired("name", name), - checkRequired("taxIdentifier", taxIdentifier), checkRequired("website", website), additionalProperties.toMutableMap(), ) @@ -1451,8 +1452,8 @@ private constructor( email() incorporationState() industryCode() + legalIdentifier().ifPresent { it.validate() } name() - taxIdentifier() website() validated = true } @@ -1478,8 +1479,8 @@ private constructor( (if (email.asKnown().isPresent) 1 else 0) + (if (incorporationState.asKnown().isPresent) 1 else 0) + (if (industryCode.asKnown().isPresent) 1 else 0) + + (legalIdentifier.asKnown().getOrNull()?.validity() ?: 0) + (if (name.asKnown().isPresent) 1 else 0) + - (if (taxIdentifier.asKnown().isPresent) 1 else 0) + (if (website.asKnown().isPresent) 1 else 0) /** The corporation's address. */ @@ -3356,6 +3357,374 @@ private constructor( "BeneficialOwner{id=$id, companyTitle=$companyTitle, individual=$individual, prongs=$prongs, additionalProperties=$additionalProperties}" } + /** The legal identifier of the corporation. */ + class LegalIdentifier + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val category: JsonField, + private val value: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("category") + @ExcludeMissing + category: JsonField = JsonMissing.of(), + @JsonProperty("value") @ExcludeMissing value: JsonField = JsonMissing.of(), + ) : this(category, value, mutableMapOf()) + + /** + * The category of the legal identifier. + * + * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected + * value). + */ + fun category(): Category = category.getRequired("category") + + /** + * The identifier of the legal identifier. + * + * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected + * value). + */ + fun value(): String = value.getRequired("value") + + /** + * Returns the raw JSON value of [category]. + * + * Unlike [category], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("category") + @ExcludeMissing + fun _category(): JsonField = category + + /** + * Returns the raw JSON value of [value]. + * + * Unlike [value], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("value") @ExcludeMissing fun _value(): JsonField = value + + @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 [LegalIdentifier]. + * + * The following fields are required: + * ```java + * .category() + * .value() + * ``` + */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [LegalIdentifier]. */ + class Builder internal constructor() { + + private var category: JsonField? = null + private var value: JsonField? = null + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(legalIdentifier: LegalIdentifier) = apply { + category = legalIdentifier.category + value = legalIdentifier.value + additionalProperties = legalIdentifier.additionalProperties.toMutableMap() + } + + /** The category of the legal identifier. */ + fun category(category: Category) = category(JsonField.of(category)) + + /** + * Sets [Builder.category] to an arbitrary JSON value. + * + * You should usually call [Builder.category] with a well-typed [Category] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun category(category: JsonField) = apply { this.category = category } + + /** The identifier of the legal identifier. */ + fun value(value: String) = value(JsonField.of(value)) + + /** + * Sets [Builder.value] to an arbitrary JSON value. + * + * You should usually call [Builder.value] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun value(value: JsonField) = apply { this.value = value } + + 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 [LegalIdentifier]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```java + * .category() + * .value() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ + fun build(): LegalIdentifier = + LegalIdentifier( + checkRequired("category", category), + checkRequired("value", value), + additionalProperties.toMutableMap(), + ) + } + + private var validated: Boolean = false + + fun validate(): LegalIdentifier = apply { + if (validated) { + return@apply + } + + category().validate() + value() + 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 = + (category.asKnown().getOrNull()?.validity() ?: 0) + + (if (value.asKnown().isPresent) 1 else 0) + + /** The category of the legal identifier. */ + class Category @JsonCreator private constructor(private val value: JsonField) : + Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that + * doesn't match any known member, and you want to know that value. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + /** + * The Employer Identification Number (EIN) for the company. The EIN is a + * 9-digit number assigned by the IRS. + */ + @JvmField + val US_EMPLOYER_IDENTIFICATION_NUMBER = of("us_employer_identification_number") + + /** + * A legal identifier issued by a foreign government, like a tax identification + * number or registration number. + */ + @JvmField val OTHER = of("other") + + @JvmStatic fun of(value: String) = Category(JsonField.of(value)) + } + + /** An enum containing [Category]'s known values. */ + enum class Known { + /** + * The Employer Identification Number (EIN) for the company. The EIN is a + * 9-digit number assigned by the IRS. + */ + US_EMPLOYER_IDENTIFICATION_NUMBER, + /** + * A legal identifier issued by a foreign government, like a tax identification + * number or registration number. + */ + OTHER, + } + + /** + * An enum containing [Category]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [Category] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, + * if the SDK is on an older version than the API, then the API may respond with + * new members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + /** + * The Employer Identification Number (EIN) for the company. The EIN is a + * 9-digit number assigned by the IRS. + */ + US_EMPLOYER_IDENTIFICATION_NUMBER, + /** + * A legal identifier issued by a foreign government, like a tax identification + * number or registration number. + */ + OTHER, + /** + * An enum member indicating that [Category] was instantiated with an unknown + * value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if + * you want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + US_EMPLOYER_IDENTIFICATION_NUMBER -> Value.US_EMPLOYER_IDENTIFICATION_NUMBER + 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) { + US_EMPLOYER_IDENTIFICATION_NUMBER -> Known.US_EMPLOYER_IDENTIFICATION_NUMBER + OTHER -> Known.OTHER + else -> throw IncreaseInvalidDataException("Unknown Category: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws IncreaseInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + IncreaseInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + fun validate(): Category = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: IncreaseInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Category && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is LegalIdentifier && + category == other.category && + value == other.value && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash(category, value, additionalProperties) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "LegalIdentifier{category=$category, value=$value, additionalProperties=$additionalProperties}" + } + override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -3367,8 +3736,8 @@ private constructor( email == other.email && incorporationState == other.incorporationState && industryCode == other.industryCode && + legalIdentifier == other.legalIdentifier && name == other.name && - taxIdentifier == other.taxIdentifier && website == other.website && additionalProperties == other.additionalProperties } @@ -3380,8 +3749,8 @@ private constructor( email, incorporationState, industryCode, + legalIdentifier, name, - taxIdentifier, website, additionalProperties, ) @@ -3390,7 +3759,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "Corporation{address=$address, beneficialOwners=$beneficialOwners, email=$email, incorporationState=$incorporationState, industryCode=$industryCode, name=$name, taxIdentifier=$taxIdentifier, website=$website, additionalProperties=$additionalProperties}" + "Corporation{address=$address, beneficialOwners=$beneficialOwners, email=$email, incorporationState=$incorporationState, industryCode=$industryCode, legalIdentifier=$legalIdentifier, name=$name, website=$website, additionalProperties=$additionalProperties}" } /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/entities/EntityCreateParams.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/entities/EntityCreateParams.kt index 0d1a0e74b..3f48e653c 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/entities/EntityCreateParams.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/entities/EntityCreateParams.kt @@ -1431,8 +1431,8 @@ private constructor( private constructor( private val address: JsonField
, private val beneficialOwners: JsonField>, + private val legalIdentifier: JsonField, private val name: JsonField, - private val taxIdentifier: JsonField, private val beneficialOwnershipExemptionReason: JsonField, private val email: JsonField, @@ -1448,10 +1448,10 @@ private constructor( @JsonProperty("beneficial_owners") @ExcludeMissing beneficialOwners: JsonField> = JsonMissing.of(), - @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(), - @JsonProperty("tax_identifier") + @JsonProperty("legal_identifier") @ExcludeMissing - taxIdentifier: JsonField = JsonMissing.of(), + legalIdentifier: JsonField = JsonMissing.of(), + @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(), @JsonProperty("beneficial_ownership_exemption_reason") @ExcludeMissing beneficialOwnershipExemptionReason: JsonField = @@ -1467,8 +1467,8 @@ private constructor( ) : this( address, beneficialOwners, + legalIdentifier, name, - taxIdentifier, beneficialOwnershipExemptionReason, email, incorporationState, @@ -1498,20 +1498,21 @@ private constructor( beneficialOwners.getRequired("beneficial_owners") /** - * The legal name of the corporation. + * The legal identifier of the corporation. This is usually the Employer Identification + * Number (EIN). * * @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") + fun legalIdentifier(): LegalIdentifier = legalIdentifier.getRequired("legal_identifier") /** - * The Employer Identification Number (EIN) for the corporation. + * The legal name of the corporation. * * @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 taxIdentifier(): String = taxIdentifier.getRequired("tax_identifier") + fun name(): String = name.getRequired("name") /** * If the entity is exempt from the requirement to submit beneficial owners, provide the @@ -1580,21 +1581,21 @@ private constructor( fun _beneficialOwners(): JsonField> = beneficialOwners /** - * Returns the raw JSON value of [name]. + * Returns the raw JSON value of [legalIdentifier]. * - * Unlike [name], this method doesn't throw if the JSON field has an unexpected type. + * Unlike [legalIdentifier], this method doesn't throw if the JSON field has an unexpected + * type. */ - @JsonProperty("name") @ExcludeMissing fun _name(): JsonField = name + @JsonProperty("legal_identifier") + @ExcludeMissing + fun _legalIdentifier(): JsonField = legalIdentifier /** - * Returns the raw JSON value of [taxIdentifier]. + * Returns the raw JSON value of [name]. * - * Unlike [taxIdentifier], this method doesn't throw if the JSON field has an unexpected - * type. + * Unlike [name], this method doesn't throw if the JSON field has an unexpected type. */ - @JsonProperty("tax_identifier") - @ExcludeMissing - fun _taxIdentifier(): JsonField = taxIdentifier + @JsonProperty("name") @ExcludeMissing fun _name(): JsonField = name /** * Returns the raw JSON value of [beneficialOwnershipExemptionReason]. @@ -1662,8 +1663,8 @@ private constructor( * ```java * .address() * .beneficialOwners() + * .legalIdentifier() * .name() - * .taxIdentifier() * ``` */ @JvmStatic fun builder() = Builder() @@ -1674,8 +1675,8 @@ private constructor( private var address: JsonField
? = null private var beneficialOwners: JsonField>? = null + private var legalIdentifier: JsonField? = null private var name: JsonField? = null - private var taxIdentifier: JsonField? = null private var beneficialOwnershipExemptionReason: JsonField = JsonMissing.of() @@ -1689,8 +1690,8 @@ private constructor( internal fun from(corporation: Corporation) = apply { address = corporation.address beneficialOwners = corporation.beneficialOwners.map { it.toMutableList() } + legalIdentifier = corporation.legalIdentifier name = corporation.name - taxIdentifier = corporation.taxIdentifier beneficialOwnershipExemptionReason = corporation.beneficialOwnershipExemptionReason email = corporation.email incorporationState = corporation.incorporationState @@ -1745,6 +1746,24 @@ private constructor( } } + /** + * The legal identifier of the corporation. This is usually the Employer Identification + * Number (EIN). + */ + fun legalIdentifier(legalIdentifier: LegalIdentifier) = + legalIdentifier(JsonField.of(legalIdentifier)) + + /** + * Sets [Builder.legalIdentifier] to an arbitrary JSON value. + * + * You should usually call [Builder.legalIdentifier] with a well-typed [LegalIdentifier] + * value instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun legalIdentifier(legalIdentifier: JsonField) = apply { + this.legalIdentifier = legalIdentifier + } + /** The legal name of the corporation. */ fun name(name: String) = name(JsonField.of(name)) @@ -1757,20 +1776,6 @@ private constructor( */ fun name(name: JsonField) = apply { this.name = name } - /** The Employer Identification Number (EIN) for the corporation. */ - fun taxIdentifier(taxIdentifier: String) = taxIdentifier(JsonField.of(taxIdentifier)) - - /** - * Sets [Builder.taxIdentifier] to an arbitrary JSON value. - * - * You should usually call [Builder.taxIdentifier] with a well-typed [String] value - * instead. This method is primarily for setting the field to an undocumented or not yet - * supported value. - */ - fun taxIdentifier(taxIdentifier: JsonField) = apply { - this.taxIdentifier = taxIdentifier - } - /** * If the entity is exempt from the requirement to submit beneficial owners, provide the * justification. If a reason is provided, you do not need to submit a list of @@ -1885,8 +1890,8 @@ private constructor( * ```java * .address() * .beneficialOwners() + * .legalIdentifier() * .name() - * .taxIdentifier() * ``` * * @throws IllegalStateException if any required field is unset. @@ -1895,8 +1900,8 @@ private constructor( Corporation( checkRequired("address", address), checkRequired("beneficialOwners", beneficialOwners).map { it.toImmutable() }, + checkRequired("legalIdentifier", legalIdentifier), checkRequired("name", name), - checkRequired("taxIdentifier", taxIdentifier), beneficialOwnershipExemptionReason, email, incorporationState, @@ -1915,8 +1920,8 @@ private constructor( address().validate() beneficialOwners().forEach { it.validate() } + legalIdentifier().validate() name() - taxIdentifier() beneficialOwnershipExemptionReason().ifPresent { it.validate() } email() incorporationState() @@ -1943,8 +1948,8 @@ private constructor( internal fun validity(): Int = (address.asKnown().getOrNull()?.validity() ?: 0) + (beneficialOwners.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) + + (legalIdentifier.asKnown().getOrNull()?.validity() ?: 0) + (if (name.asKnown().isPresent) 1 else 0) + - (if (taxIdentifier.asKnown().isPresent) 1 else 0) + (beneficialOwnershipExemptionReason.asKnown().getOrNull()?.validity() ?: 0) + (if (email.asKnown().isPresent) 1 else 0) + (if (incorporationState.asKnown().isPresent) 1 else 0) + @@ -4965,6 +4970,381 @@ private constructor( "BeneficialOwner{individual=$individual, prongs=$prongs, companyTitle=$companyTitle, additionalProperties=$additionalProperties}" } + /** + * The legal identifier of the corporation. This is usually the Employer Identification + * Number (EIN). + */ + class LegalIdentifier + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val value: JsonField, + private val category: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("value") @ExcludeMissing value: JsonField = JsonMissing.of(), + @JsonProperty("category") + @ExcludeMissing + category: JsonField = JsonMissing.of(), + ) : this(value, category, mutableMapOf()) + + /** + * The legal identifier. + * + * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected + * value). + */ + fun value(): String = value.getRequired("value") + + /** + * The category of the legal identifier. If not provided, the default is + * `us_employer_identification_number`. + * + * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun category(): Optional = category.getOptional("category") + + /** + * Returns the raw JSON value of [value]. + * + * Unlike [value], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("value") @ExcludeMissing fun _value(): JsonField = value + + /** + * Returns the raw JSON value of [category]. + * + * Unlike [category], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("category") + @ExcludeMissing + fun _category(): JsonField = category + + @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 [LegalIdentifier]. + * + * The following fields are required: + * ```java + * .value() + * ``` + */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [LegalIdentifier]. */ + class Builder internal constructor() { + + private var value: JsonField? = null + private var category: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(legalIdentifier: LegalIdentifier) = apply { + value = legalIdentifier.value + category = legalIdentifier.category + additionalProperties = legalIdentifier.additionalProperties.toMutableMap() + } + + /** The legal identifier. */ + fun value(value: String) = value(JsonField.of(value)) + + /** + * Sets [Builder.value] to an arbitrary JSON value. + * + * You should usually call [Builder.value] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun value(value: JsonField) = apply { this.value = value } + + /** + * The category of the legal identifier. If not provided, the default is + * `us_employer_identification_number`. + */ + fun category(category: Category) = category(JsonField.of(category)) + + /** + * Sets [Builder.category] to an arbitrary JSON value. + * + * You should usually call [Builder.category] with a well-typed [Category] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun category(category: JsonField) = apply { this.category = category } + + 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 [LegalIdentifier]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```java + * .value() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ + fun build(): LegalIdentifier = + LegalIdentifier( + checkRequired("value", value), + category, + additionalProperties.toMutableMap(), + ) + } + + private var validated: Boolean = false + + fun validate(): LegalIdentifier = apply { + if (validated) { + return@apply + } + + value() + category().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 = + (if (value.asKnown().isPresent) 1 else 0) + + (category.asKnown().getOrNull()?.validity() ?: 0) + + /** + * The category of the legal identifier. If not provided, the default is + * `us_employer_identification_number`. + */ + class Category @JsonCreator private constructor(private val value: JsonField) : + Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that + * doesn't match any known member, and you want to know that value. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + /** + * The Employer Identification Number (EIN) for the company. The EIN is a + * 9-digit number assigned by the IRS. + */ + @JvmField + val US_EMPLOYER_IDENTIFICATION_NUMBER = of("us_employer_identification_number") + + /** + * A legal identifier issued by a foreign government, like a tax identification + * number or registration number. + */ + @JvmField val OTHER = of("other") + + @JvmStatic fun of(value: String) = Category(JsonField.of(value)) + } + + /** An enum containing [Category]'s known values. */ + enum class Known { + /** + * The Employer Identification Number (EIN) for the company. The EIN is a + * 9-digit number assigned by the IRS. + */ + US_EMPLOYER_IDENTIFICATION_NUMBER, + /** + * A legal identifier issued by a foreign government, like a tax identification + * number or registration number. + */ + OTHER, + } + + /** + * An enum containing [Category]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [Category] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, + * if the SDK is on an older version than the API, then the API may respond with + * new members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + /** + * The Employer Identification Number (EIN) for the company. The EIN is a + * 9-digit number assigned by the IRS. + */ + US_EMPLOYER_IDENTIFICATION_NUMBER, + /** + * A legal identifier issued by a foreign government, like a tax identification + * number or registration number. + */ + OTHER, + /** + * An enum member indicating that [Category] was instantiated with an unknown + * value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if + * you want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + US_EMPLOYER_IDENTIFICATION_NUMBER -> Value.US_EMPLOYER_IDENTIFICATION_NUMBER + 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) { + US_EMPLOYER_IDENTIFICATION_NUMBER -> Known.US_EMPLOYER_IDENTIFICATION_NUMBER + OTHER -> Known.OTHER + else -> throw IncreaseInvalidDataException("Unknown Category: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws IncreaseInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + IncreaseInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + fun validate(): Category = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: IncreaseInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Category && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is LegalIdentifier && + value == other.value && + category == other.category && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash(value, category, additionalProperties) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "LegalIdentifier{value=$value, category=$category, additionalProperties=$additionalProperties}" + } + /** * If the entity is exempt from the requirement to submit beneficial owners, provide the * justification. If a reason is provided, you do not need to submit a list of beneficial @@ -5153,8 +5533,8 @@ private constructor( return other is Corporation && address == other.address && beneficialOwners == other.beneficialOwners && + legalIdentifier == other.legalIdentifier && name == other.name && - taxIdentifier == other.taxIdentifier && beneficialOwnershipExemptionReason == other.beneficialOwnershipExemptionReason && email == other.email && incorporationState == other.incorporationState && @@ -5167,8 +5547,8 @@ private constructor( Objects.hash( address, beneficialOwners, + legalIdentifier, name, - taxIdentifier, beneficialOwnershipExemptionReason, email, incorporationState, @@ -5181,7 +5561,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "Corporation{address=$address, beneficialOwners=$beneficialOwners, name=$name, taxIdentifier=$taxIdentifier, beneficialOwnershipExemptionReason=$beneficialOwnershipExemptionReason, email=$email, incorporationState=$incorporationState, industryCode=$industryCode, website=$website, additionalProperties=$additionalProperties}" + "Corporation{address=$address, beneficialOwners=$beneficialOwners, legalIdentifier=$legalIdentifier, name=$name, beneficialOwnershipExemptionReason=$beneficialOwnershipExemptionReason, email=$email, incorporationState=$incorporationState, industryCode=$industryCode, website=$website, additionalProperties=$additionalProperties}" } /** diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/entities/EntityCreateParamsTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/entities/EntityCreateParamsTest.kt index 4c7f6e1c1..24aeb2076 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/entities/EntityCreateParamsTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/entities/EntityCreateParamsTest.kt @@ -100,8 +100,16 @@ internal class EntityCreateParamsTest { .companyTitle("CEO") .build() ) + .legalIdentifier( + EntityCreateParams.Corporation.LegalIdentifier.builder() + .value("602214076") + .category( + EntityCreateParams.Corporation.LegalIdentifier.Category + .US_EMPLOYER_IDENTIFICATION_NUMBER + ) + .build() + ) .name("National Phonograph Company") - .taxIdentifier("602214076") .beneficialOwnershipExemptionReason( EntityCreateParams.Corporation.BeneficialOwnershipExemptionReason .REGULATED_FINANCIAL_INSTITUTION @@ -509,8 +517,16 @@ internal class EntityCreateParamsTest { .companyTitle("CEO") .build() ) + .legalIdentifier( + EntityCreateParams.Corporation.LegalIdentifier.builder() + .value("602214076") + .category( + EntityCreateParams.Corporation.LegalIdentifier.Category + .US_EMPLOYER_IDENTIFICATION_NUMBER + ) + .build() + ) .name("National Phonograph Company") - .taxIdentifier("602214076") .beneficialOwnershipExemptionReason( EntityCreateParams.Corporation.BeneficialOwnershipExemptionReason .REGULATED_FINANCIAL_INSTITUTION @@ -915,8 +931,16 @@ internal class EntityCreateParamsTest { .companyTitle("CEO") .build() ) + .legalIdentifier( + EntityCreateParams.Corporation.LegalIdentifier.builder() + .value("602214076") + .category( + EntityCreateParams.Corporation.LegalIdentifier.Category + .US_EMPLOYER_IDENTIFICATION_NUMBER + ) + .build() + ) .name("National Phonograph Company") - .taxIdentifier("602214076") .beneficialOwnershipExemptionReason( EntityCreateParams.Corporation.BeneficialOwnershipExemptionReason .REGULATED_FINANCIAL_INSTITUTION diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/entities/EntityListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/entities/EntityListPageResponseTest.kt index 8fae2c94f..df2539355 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/entities/EntityListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/entities/EntityListPageResponseTest.kt @@ -75,8 +75,16 @@ internal class EntityListPageResponseTest { .email(null) .incorporationState("NY") .industryCode(null) + .legalIdentifier( + Entity.Corporation.LegalIdentifier.builder() + .category( + Entity.Corporation.LegalIdentifier.Category + .US_EMPLOYER_IDENTIFICATION_NUMBER + ) + .value("602214076") + .build() + ) .name("National Phonograph Company") - .taxIdentifier("602214076") .website("https://example.com") .build() ) @@ -369,8 +377,16 @@ internal class EntityListPageResponseTest { .email(null) .incorporationState("NY") .industryCode(null) + .legalIdentifier( + Entity.Corporation.LegalIdentifier.builder() + .category( + Entity.Corporation.LegalIdentifier.Category + .US_EMPLOYER_IDENTIFICATION_NUMBER + ) + .value("602214076") + .build() + ) .name("National Phonograph Company") - .taxIdentifier("602214076") .website("https://example.com") .build() ) @@ -667,8 +683,16 @@ internal class EntityListPageResponseTest { .email(null) .incorporationState("NY") .industryCode(null) + .legalIdentifier( + Entity.Corporation.LegalIdentifier.builder() + .category( + Entity.Corporation.LegalIdentifier.Category + .US_EMPLOYER_IDENTIFICATION_NUMBER + ) + .value("602214076") + .build() + ) .name("National Phonograph Company") - .taxIdentifier("602214076") .website("https://example.com") .build() ) diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/entities/EntityTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/entities/EntityTest.kt index b61dfae3b..06bf252ca 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/entities/EntityTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/entities/EntityTest.kt @@ -69,8 +69,16 @@ internal class EntityTest { .email(null) .incorporationState("NY") .industryCode(null) + .legalIdentifier( + Entity.Corporation.LegalIdentifier.builder() + .category( + Entity.Corporation.LegalIdentifier.Category + .US_EMPLOYER_IDENTIFICATION_NUMBER + ) + .value("602214076") + .build() + ) .name("National Phonograph Company") - .taxIdentifier("602214076") .website("https://example.com") .build() ) @@ -347,8 +355,16 @@ internal class EntityTest { .email(null) .incorporationState("NY") .industryCode(null) + .legalIdentifier( + Entity.Corporation.LegalIdentifier.builder() + .category( + Entity.Corporation.LegalIdentifier.Category + .US_EMPLOYER_IDENTIFICATION_NUMBER + ) + .value("602214076") + .build() + ) .name("National Phonograph Company") - .taxIdentifier("602214076") .website("https://example.com") .build() ) @@ -637,8 +653,16 @@ internal class EntityTest { .email(null) .incorporationState("NY") .industryCode(null) + .legalIdentifier( + Entity.Corporation.LegalIdentifier.builder() + .category( + Entity.Corporation.LegalIdentifier.Category + .US_EMPLOYER_IDENTIFICATION_NUMBER + ) + .value("602214076") + .build() + ) .name("National Phonograph Company") - .taxIdentifier("602214076") .website("https://example.com") .build() ) diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/EntityServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/EntityServiceAsyncTest.kt index a7888d1ad..9a1e2f5cb 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/EntityServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/EntityServiceAsyncTest.kt @@ -128,8 +128,16 @@ internal class EntityServiceAsyncTest { .companyTitle("CEO") .build() ) + .legalIdentifier( + EntityCreateParams.Corporation.LegalIdentifier.builder() + .value("602214076") + .category( + EntityCreateParams.Corporation.LegalIdentifier.Category + .US_EMPLOYER_IDENTIFICATION_NUMBER + ) + .build() + ) .name("National Phonograph Company") - .taxIdentifier("602214076") .beneficialOwnershipExemptionReason( EntityCreateParams.Corporation.BeneficialOwnershipExemptionReason .REGULATED_FINANCIAL_INSTITUTION diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/EntityServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/EntityServiceTest.kt index b36b4beca..b9c4b466a 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/EntityServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/EntityServiceTest.kt @@ -128,8 +128,16 @@ internal class EntityServiceTest { .companyTitle("CEO") .build() ) + .legalIdentifier( + EntityCreateParams.Corporation.LegalIdentifier.builder() + .value("602214076") + .category( + EntityCreateParams.Corporation.LegalIdentifier.Category + .US_EMPLOYER_IDENTIFICATION_NUMBER + ) + .build() + ) .name("National Phonograph Company") - .taxIdentifier("602214076") .beneficialOwnershipExemptionReason( EntityCreateParams.Corporation.BeneficialOwnershipExemptionReason .REGULATED_FINANCIAL_INSTITUTION