diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountAddress.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountAddress.kt index 752c2541..a44b7bb2 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountAddress.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountAddress.kt @@ -15,10 +15,6 @@ import com.lithic.api.core.toUnmodifiable import java.util.Objects import java.util.Optional -/** - * Address used during Address Verification Service (AVS) checks during transactions if enabled via - * Auth Rules. - */ @JsonDeserialize(builder = ExternalBankAccountAddress.Builder::class) @NoAutoDetect class ExternalBankAccountAddress @@ -26,9 +22,9 @@ private constructor( private val address1: JsonField, private val address2: JsonField, private val city: JsonField, - private val country: JsonField, - private val postalCode: JsonField, private val state: JsonField, + private val postalCode: JsonField, + private val country: JsonField, private val additionalProperties: Map, ) { @@ -42,11 +38,11 @@ private constructor( fun city(): String = city.getRequired("city") - fun country(): String = country.getRequired("country") + fun state(): String = state.getRequired("state") fun postalCode(): String = postalCode.getRequired("postal_code") - fun state(): String = state.getRequired("state") + fun country(): String = country.getRequired("country") @JsonProperty("address1") @ExcludeMissing fun _address1() = address1 @@ -54,11 +50,11 @@ private constructor( @JsonProperty("city") @ExcludeMissing fun _city() = city - @JsonProperty("country") @ExcludeMissing fun _country() = country + @JsonProperty("state") @ExcludeMissing fun _state() = state @JsonProperty("postal_code") @ExcludeMissing fun _postalCode() = postalCode - @JsonProperty("state") @ExcludeMissing fun _state() = state + @JsonProperty("country") @ExcludeMissing fun _country() = country @JsonAnyGetter @ExcludeMissing @@ -69,9 +65,9 @@ private constructor( address1() address2() city() - country() - postalCode() state() + postalCode() + country() validated = true } } @@ -87,9 +83,9 @@ private constructor( this.address1 == other.address1 && this.address2 == other.address2 && this.city == other.city && - this.country == other.country && - this.postalCode == other.postalCode && this.state == other.state && + this.postalCode == other.postalCode && + this.country == other.country && this.additionalProperties == other.additionalProperties } @@ -100,9 +96,9 @@ private constructor( address1, address2, city, - country, - postalCode, state, + postalCode, + country, additionalProperties, ) } @@ -110,7 +106,7 @@ private constructor( } override fun toString() = - "ExternalBankAccountAddress{address1=$address1, address2=$address2, city=$city, country=$country, postalCode=$postalCode, state=$state, additionalProperties=$additionalProperties}" + "ExternalBankAccountAddress{address1=$address1, address2=$address2, city=$city, state=$state, postalCode=$postalCode, country=$country, additionalProperties=$additionalProperties}" companion object { @@ -122,9 +118,9 @@ private constructor( private var address1: JsonField = JsonMissing.of() private var address2: JsonField = JsonMissing.of() private var city: JsonField = JsonMissing.of() - private var country: JsonField = JsonMissing.of() - private var postalCode: JsonField = JsonMissing.of() private var state: JsonField = JsonMissing.of() + private var postalCode: JsonField = JsonMissing.of() + private var country: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic @@ -132,9 +128,9 @@ private constructor( this.address1 = externalBankAccountAddress.address1 this.address2 = externalBankAccountAddress.address2 this.city = externalBankAccountAddress.city - this.country = externalBankAccountAddress.country - this.postalCode = externalBankAccountAddress.postalCode this.state = externalBankAccountAddress.state + this.postalCode = externalBankAccountAddress.postalCode + this.country = externalBankAccountAddress.country additionalProperties(externalBankAccountAddress.additionalProperties) } @@ -156,11 +152,11 @@ private constructor( @ExcludeMissing fun city(city: JsonField) = apply { this.city = city } - fun country(country: String) = country(JsonField.of(country)) + fun state(state: String) = state(JsonField.of(state)) - @JsonProperty("country") + @JsonProperty("state") @ExcludeMissing - fun country(country: JsonField) = apply { this.country = country } + fun state(state: JsonField) = apply { this.state = state } fun postalCode(postalCode: String) = postalCode(JsonField.of(postalCode)) @@ -168,11 +164,11 @@ private constructor( @ExcludeMissing fun postalCode(postalCode: JsonField) = apply { this.postalCode = postalCode } - fun state(state: String) = state(JsonField.of(state)) + fun country(country: String) = country(JsonField.of(country)) - @JsonProperty("state") + @JsonProperty("country") @ExcludeMissing - fun state(state: JsonField) = apply { this.state = state } + fun country(country: JsonField) = apply { this.country = country } fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() @@ -193,9 +189,9 @@ private constructor( address1, address2, city, - country, - postalCode, state, + postalCode, + country, additionalProperties.toUnmodifiable(), ) } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateParams.kt index 8f569482..d2575cc3 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateParams.kt @@ -331,79 +331,89 @@ constructor( @NoAutoDetect class BankVerifiedCreateBankAccountApiRequest private constructor( - private val accountNumber: String?, + private val verificationMethod: VerificationMethod?, + private val ownerType: OwnerType?, + private val owner: String?, private val accountToken: String?, - private val address: ExternalBankAccountAddress?, private val companyId: String?, - private val country: String?, - private val currency: String?, - private val dob: LocalDate?, private val doingBusinessAs: String?, - private val financialAccountToken: String?, - private val name: String?, - private val owner: String?, - private val ownerType: OwnerType?, - private val routingNumber: String?, - private val type: AccountType?, + private val dob: LocalDate?, private val userDefinedId: String?, + private val type: AccountType?, + private val routingNumber: String?, + private val accountNumber: String?, + private val name: String?, + private val country: String?, + private val currency: String?, private val verificationEnforcement: Boolean?, - private val verificationMethod: VerificationMethod?, + private val address: ExternalBankAccountAddress?, + private val financialAccountToken: String?, private val additionalProperties: Map, ) { private var hashCode: Int = 0 - @JsonProperty("account_number") fun accountNumber(): String? = accountNumber + /** Verification Method */ + @JsonProperty("verification_method") + fun verificationMethod(): VerificationMethod? = verificationMethod - @JsonProperty("account_token") fun accountToken(): String? = accountToken + /** Owner Type */ + @JsonProperty("owner_type") fun ownerType(): OwnerType? = ownerType /** - * Address used during Address Verification Service (AVS) checks during transactions if - * enabled via Auth Rules. + * Legal Name of the business or individual who owns the external account. This will appear + * in statements */ - @JsonProperty("address") fun address(): ExternalBankAccountAddress? = address + @JsonProperty("owner") fun owner(): String? = owner - @JsonProperty("company_id") fun companyId(): String? = companyId + /** + * Indicates which Lithic account the external account is associated with. For external + * accounts that are associated with the program, account_token field returned will be null + */ + @JsonProperty("account_token") fun accountToken(): String? = accountToken - @JsonProperty("country") fun country(): String? = country + /** Optional field that helps identify bank accounts in receipts */ + @JsonProperty("company_id") fun companyId(): String? = companyId - @JsonProperty("currency") fun currency(): String? = currency + /** Doing Business As */ + @JsonProperty("doing_business_as") fun doingBusinessAs(): String? = doingBusinessAs /** Date of Birth of the Individual that owns the external bank account */ @JsonProperty("dob") fun dob(): LocalDate? = dob - @JsonProperty("doing_business_as") fun doingBusinessAs(): String? = doingBusinessAs - - /** - * The financial account token of the operating account, which will provide the funds for - * micro deposits used to verify the account - */ - @JsonProperty("financial_account_token") - fun financialAccountToken(): String? = financialAccountToken - - @JsonProperty("name") fun name(): String? = name - - @JsonProperty("owner") fun owner(): String? = owner + /** User Defined ID */ + @JsonProperty("user_defined_id") fun userDefinedId(): String? = userDefinedId - @JsonProperty("owner_type") fun ownerType(): OwnerType? = ownerType + /** Account Type */ + @JsonProperty("type") fun type(): AccountType? = type + /** Routing Number */ @JsonProperty("routing_number") fun routingNumber(): String? = routingNumber - @JsonProperty("type") fun type(): AccountType? = type + /** Routing Number */ + @JsonProperty("account_number") fun accountNumber(): String? = accountNumber - @JsonProperty("user_defined_id") fun userDefinedId(): String? = userDefinedId + /** The nickname given to this record of External Bank Account */ + @JsonProperty("name") fun name(): String? = name /** - * Indicates whether verification was enforced for a given association record. For - * MICRO_DEPOSIT, option to disable verification if the external bank account has already - * been verified before. By default, verification will be required unless users pass in a - * value of false + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ + @JsonProperty("country") fun country(): String? = country + + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + @JsonProperty("currency") fun currency(): String? = currency + @JsonProperty("verification_enforcement") fun verificationEnforcement(): Boolean? = verificationEnforcement - @JsonProperty("verification_method") - fun verificationMethod(): VerificationMethod? = verificationMethod + /** Address */ + @JsonProperty("address") fun address(): ExternalBankAccountAddress? = address + + /** The financial account token of the operating account to fund the micro deposits */ + @JsonProperty("financial_account_token") + fun financialAccountToken(): String? = financialAccountToken @JsonAnyGetter @ExcludeMissing @@ -417,23 +427,23 @@ constructor( } return other is BankVerifiedCreateBankAccountApiRequest && - this.accountNumber == other.accountNumber && + this.verificationMethod == other.verificationMethod && + this.ownerType == other.ownerType && + this.owner == other.owner && this.accountToken == other.accountToken && - this.address == other.address && this.companyId == other.companyId && - this.country == other.country && - this.currency == other.currency && - this.dob == other.dob && this.doingBusinessAs == other.doingBusinessAs && - this.financialAccountToken == other.financialAccountToken && - this.name == other.name && - this.owner == other.owner && - this.ownerType == other.ownerType && - this.routingNumber == other.routingNumber && - this.type == other.type && + this.dob == other.dob && this.userDefinedId == other.userDefinedId && + this.type == other.type && + this.routingNumber == other.routingNumber && + this.accountNumber == other.accountNumber && + this.name == other.name && + this.country == other.country && + this.currency == other.currency && this.verificationEnforcement == other.verificationEnforcement && - this.verificationMethod == other.verificationMethod && + this.address == other.address && + this.financialAccountToken == other.financialAccountToken && this.additionalProperties == other.additionalProperties } @@ -441,23 +451,23 @@ constructor( if (hashCode == 0) { hashCode = Objects.hash( - accountNumber, + verificationMethod, + ownerType, + owner, accountToken, - address, companyId, - country, - currency, - dob, doingBusinessAs, - financialAccountToken, - name, - owner, - ownerType, - routingNumber, - type, + dob, userDefinedId, + type, + routingNumber, + accountNumber, + name, + country, + currency, verificationEnforcement, - verificationMethod, + address, + financialAccountToken, additionalProperties, ) } @@ -465,7 +475,7 @@ constructor( } override fun toString() = - "BankVerifiedCreateBankAccountApiRequest{accountNumber=$accountNumber, accountToken=$accountToken, address=$address, companyId=$companyId, country=$country, currency=$currency, dob=$dob, doingBusinessAs=$doingBusinessAs, financialAccountToken=$financialAccountToken, name=$name, owner=$owner, ownerType=$ownerType, routingNumber=$routingNumber, type=$type, userDefinedId=$userDefinedId, verificationEnforcement=$verificationEnforcement, verificationMethod=$verificationMethod, additionalProperties=$additionalProperties}" + "BankVerifiedCreateBankAccountApiRequest{verificationMethod=$verificationMethod, ownerType=$ownerType, owner=$owner, accountToken=$accountToken, companyId=$companyId, doingBusinessAs=$doingBusinessAs, dob=$dob, userDefinedId=$userDefinedId, type=$type, routingNumber=$routingNumber, accountNumber=$accountNumber, name=$name, country=$country, currency=$currency, verificationEnforcement=$verificationEnforcement, address=$address, financialAccountToken=$financialAccountToken, additionalProperties=$additionalProperties}" companion object { @@ -474,118 +484,129 @@ constructor( class Builder { - private var accountNumber: String? = null + private var verificationMethod: VerificationMethod? = null + private var ownerType: OwnerType? = null + private var owner: String? = null private var accountToken: String? = null - private var address: ExternalBankAccountAddress? = null private var companyId: String? = null - private var country: String? = null - private var currency: String? = null - private var dob: LocalDate? = null private var doingBusinessAs: String? = null - private var financialAccountToken: String? = null - private var name: String? = null - private var owner: String? = null - private var ownerType: OwnerType? = null - private var routingNumber: String? = null - private var type: AccountType? = null + private var dob: LocalDate? = null private var userDefinedId: String? = null + private var type: AccountType? = null + private var routingNumber: String? = null + private var accountNumber: String? = null + private var name: String? = null + private var country: String? = null + private var currency: String? = null private var verificationEnforcement: Boolean? = null - private var verificationMethod: VerificationMethod? = null + private var address: ExternalBankAccountAddress? = null + private var financialAccountToken: String? = null private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from( bankVerifiedCreateBankAccountApiRequest: BankVerifiedCreateBankAccountApiRequest ) = apply { - this.accountNumber = bankVerifiedCreateBankAccountApiRequest.accountNumber + this.verificationMethod = bankVerifiedCreateBankAccountApiRequest.verificationMethod + this.ownerType = bankVerifiedCreateBankAccountApiRequest.ownerType + this.owner = bankVerifiedCreateBankAccountApiRequest.owner this.accountToken = bankVerifiedCreateBankAccountApiRequest.accountToken - this.address = bankVerifiedCreateBankAccountApiRequest.address this.companyId = bankVerifiedCreateBankAccountApiRequest.companyId - this.country = bankVerifiedCreateBankAccountApiRequest.country - this.currency = bankVerifiedCreateBankAccountApiRequest.currency - this.dob = bankVerifiedCreateBankAccountApiRequest.dob this.doingBusinessAs = bankVerifiedCreateBankAccountApiRequest.doingBusinessAs - this.financialAccountToken = - bankVerifiedCreateBankAccountApiRequest.financialAccountToken - this.name = bankVerifiedCreateBankAccountApiRequest.name - this.owner = bankVerifiedCreateBankAccountApiRequest.owner - this.ownerType = bankVerifiedCreateBankAccountApiRequest.ownerType - this.routingNumber = bankVerifiedCreateBankAccountApiRequest.routingNumber - this.type = bankVerifiedCreateBankAccountApiRequest.type + this.dob = bankVerifiedCreateBankAccountApiRequest.dob this.userDefinedId = bankVerifiedCreateBankAccountApiRequest.userDefinedId + this.type = bankVerifiedCreateBankAccountApiRequest.type + this.routingNumber = bankVerifiedCreateBankAccountApiRequest.routingNumber + this.accountNumber = bankVerifiedCreateBankAccountApiRequest.accountNumber + this.name = bankVerifiedCreateBankAccountApiRequest.name + this.country = bankVerifiedCreateBankAccountApiRequest.country + this.currency = bankVerifiedCreateBankAccountApiRequest.currency this.verificationEnforcement = bankVerifiedCreateBankAccountApiRequest.verificationEnforcement - this.verificationMethod = bankVerifiedCreateBankAccountApiRequest.verificationMethod + this.address = bankVerifiedCreateBankAccountApiRequest.address + this.financialAccountToken = + bankVerifiedCreateBankAccountApiRequest.financialAccountToken additionalProperties(bankVerifiedCreateBankAccountApiRequest.additionalProperties) } - @JsonProperty("account_number") - fun accountNumber(accountNumber: String) = apply { this.accountNumber = accountNumber } + /** Verification Method */ + @JsonProperty("verification_method") + fun verificationMethod(verificationMethod: VerificationMethod) = apply { + this.verificationMethod = verificationMethod + } - @JsonProperty("account_token") - fun accountToken(accountToken: String) = apply { this.accountToken = accountToken } + /** Owner Type */ + @JsonProperty("owner_type") + fun ownerType(ownerType: OwnerType) = apply { this.ownerType = ownerType } /** - * Address used during Address Verification Service (AVS) checks during transactions if - * enabled via Auth Rules. + * Legal Name of the business or individual who owns the external account. This will + * appear in statements */ - @JsonProperty("address") - fun address(address: ExternalBankAccountAddress) = apply { this.address = address } + @JsonProperty("owner") fun owner(owner: String) = apply { this.owner = owner } + + /** + * Indicates which Lithic account the external account is associated with. For external + * accounts that are associated with the program, account_token field returned will be + * null + */ + @JsonProperty("account_token") + fun accountToken(accountToken: String) = apply { this.accountToken = accountToken } + /** Optional field that helps identify bank accounts in receipts */ @JsonProperty("company_id") fun companyId(companyId: String) = apply { this.companyId = companyId } - @JsonProperty("country") fun country(country: String) = apply { this.country = country } - - @JsonProperty("currency") - fun currency(currency: String) = apply { this.currency = currency } - - /** Date of Birth of the Individual that owns the external bank account */ - @JsonProperty("dob") fun dob(dob: LocalDate) = apply { this.dob = dob } - + /** Doing Business As */ @JsonProperty("doing_business_as") fun doingBusinessAs(doingBusinessAs: String) = apply { this.doingBusinessAs = doingBusinessAs } - /** - * The financial account token of the operating account, which will provide the funds - * for micro deposits used to verify the account - */ - @JsonProperty("financial_account_token") - fun financialAccountToken(financialAccountToken: String) = apply { - this.financialAccountToken = financialAccountToken - } - - @JsonProperty("name") fun name(name: String) = apply { this.name = name } + /** Date of Birth of the Individual that owns the external bank account */ + @JsonProperty("dob") fun dob(dob: LocalDate) = apply { this.dob = dob } - @JsonProperty("owner") fun owner(owner: String) = apply { this.owner = owner } + /** User Defined ID */ + @JsonProperty("user_defined_id") + fun userDefinedId(userDefinedId: String) = apply { this.userDefinedId = userDefinedId } - @JsonProperty("owner_type") - fun ownerType(ownerType: OwnerType) = apply { this.ownerType = ownerType } + /** Account Type */ + @JsonProperty("type") fun type(type: AccountType) = apply { this.type = type } + /** Routing Number */ @JsonProperty("routing_number") fun routingNumber(routingNumber: String) = apply { this.routingNumber = routingNumber } - @JsonProperty("type") fun type(type: AccountType) = apply { this.type = type } + /** Routing Number */ + @JsonProperty("account_number") + fun accountNumber(accountNumber: String) = apply { this.accountNumber = accountNumber } - @JsonProperty("user_defined_id") - fun userDefinedId(userDefinedId: String) = apply { this.userDefinedId = userDefinedId } + /** The nickname given to this record of External Bank Account */ + @JsonProperty("name") fun name(name: String) = apply { this.name = name } /** - * Indicates whether verification was enforced for a given association record. For - * MICRO_DEPOSIT, option to disable verification if the external bank account has - * already been verified before. By default, verification will be required unless users - * pass in a value of false + * The country that the bank account is located in using ISO 3166-1. We will only accept + * USA bank accounts e.g., USA */ + @JsonProperty("country") fun country(country: String) = apply { this.country = country } + + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + @JsonProperty("currency") + fun currency(currency: String) = apply { this.currency = currency } + @JsonProperty("verification_enforcement") fun verificationEnforcement(verificationEnforcement: Boolean) = apply { this.verificationEnforcement = verificationEnforcement } - @JsonProperty("verification_method") - fun verificationMethod(verificationMethod: VerificationMethod) = apply { - this.verificationMethod = verificationMethod + /** Address */ + @JsonProperty("address") + fun address(address: ExternalBankAccountAddress) = apply { this.address = address } + + /** The financial account token of the operating account to fund the micro deposits */ + @JsonProperty("financial_account_token") + fun financialAccountToken(financialAccountToken: String) = apply { + this.financialAccountToken = financialAccountToken } fun additionalProperties(additionalProperties: Map) = apply { @@ -604,27 +625,25 @@ constructor( fun build(): BankVerifiedCreateBankAccountApiRequest = BankVerifiedCreateBankAccountApiRequest( - checkNotNull(accountNumber) { "`accountNumber` is required but was not set" }, + checkNotNull(verificationMethod) { + "`verificationMethod` is required but was not set" + }, + checkNotNull(ownerType) { "`ownerType` is required but was not set" }, + checkNotNull(owner) { "`owner` is required but was not set" }, accountToken, - address, companyId, - checkNotNull(country) { "`country` is required but was not set" }, - checkNotNull(currency) { "`currency` is required but was not set" }, - dob, doingBusinessAs, - checkNotNull(financialAccountToken) { - "`financialAccountToken` is required but was not set" - }, - name, - checkNotNull(owner) { "`owner` is required but was not set" }, - checkNotNull(ownerType) { "`ownerType` is required but was not set" }, - checkNotNull(routingNumber) { "`routingNumber` is required but was not set" }, - checkNotNull(type) { "`type` is required but was not set" }, + dob, userDefinedId, + checkNotNull(type) { "`type` is required but was not set" }, + checkNotNull(routingNumber) { "`routingNumber` is required but was not set" }, + checkNotNull(accountNumber) { "`accountNumber` is required but was not set" }, + name, + checkNotNull(country) { "`country` is required but was not set" }, + checkNotNull(currency) { "`currency` is required but was not set" }, verificationEnforcement, - checkNotNull(verificationMethod) { - "`verificationMethod` is required but was not set" - }, + address, + financialAccountToken, additionalProperties.toUnmodifiable(), ) } @@ -691,39 +710,52 @@ constructor( @NoAutoDetect class PlaidCreateBankAccountApiRequest private constructor( + private val verificationMethod: VerificationMethod?, + private val ownerType: OwnerType?, + private val owner: String?, private val accountToken: String?, private val companyId: String?, - private val dob: LocalDate?, private val doingBusinessAs: String?, - private val owner: String?, - private val ownerType: OwnerType?, - private val processorToken: String?, + private val dob: LocalDate?, private val userDefinedId: String?, - private val verificationMethod: VerificationMethod?, + private val processorToken: String?, private val additionalProperties: Map, ) { private var hashCode: Int = 0 - @JsonProperty("account_token") fun accountToken(): String? = accountToken + /** Verification Method */ + @JsonProperty("verification_method") + fun verificationMethod(): VerificationMethod? = verificationMethod - @JsonProperty("company_id") fun companyId(): String? = companyId + /** Owner Type */ + @JsonProperty("owner_type") fun ownerType(): OwnerType? = ownerType - /** Date of Birth of the Individual that owns the external bank account */ - @JsonProperty("dob") fun dob(): LocalDate? = dob + /** + * Legal Name of the business or individual who owns the external account. This will appear + * in statements + */ + @JsonProperty("owner") fun owner(): String? = owner - @JsonProperty("doing_business_as") fun doingBusinessAs(): String? = doingBusinessAs + /** + * Indicates which Lithic account the external account is associated with. For external + * accounts that are associated with the program, account_token field returned will be null + */ + @JsonProperty("account_token") fun accountToken(): String? = accountToken - @JsonProperty("owner") fun owner(): String? = owner + /** Optional field that helps identify bank accounts in receipts */ + @JsonProperty("company_id") fun companyId(): String? = companyId - @JsonProperty("owner_type") fun ownerType(): OwnerType? = ownerType + /** Doing Business As */ + @JsonProperty("doing_business_as") fun doingBusinessAs(): String? = doingBusinessAs - @JsonProperty("processor_token") fun processorToken(): String? = processorToken + /** Date of Birth of the Individual that owns the external bank account */ + @JsonProperty("dob") fun dob(): LocalDate? = dob + /** User Defined ID */ @JsonProperty("user_defined_id") fun userDefinedId(): String? = userDefinedId - @JsonProperty("verification_method") - fun verificationMethod(): VerificationMethod? = verificationMethod + @JsonProperty("processor_token") fun processorToken(): String? = processorToken @JsonAnyGetter @ExcludeMissing @@ -737,15 +769,15 @@ constructor( } return other is PlaidCreateBankAccountApiRequest && + this.verificationMethod == other.verificationMethod && + this.ownerType == other.ownerType && + this.owner == other.owner && this.accountToken == other.accountToken && this.companyId == other.companyId && - this.dob == other.dob && this.doingBusinessAs == other.doingBusinessAs && - this.owner == other.owner && - this.ownerType == other.ownerType && - this.processorToken == other.processorToken && + this.dob == other.dob && this.userDefinedId == other.userDefinedId && - this.verificationMethod == other.verificationMethod && + this.processorToken == other.processorToken && this.additionalProperties == other.additionalProperties } @@ -753,15 +785,15 @@ constructor( if (hashCode == 0) { hashCode = Objects.hash( + verificationMethod, + ownerType, + owner, accountToken, companyId, - dob, doingBusinessAs, - owner, - ownerType, - processorToken, + dob, userDefinedId, - verificationMethod, + processorToken, additionalProperties, ) } @@ -769,7 +801,7 @@ constructor( } override fun toString() = - "PlaidCreateBankAccountApiRequest{accountToken=$accountToken, companyId=$companyId, dob=$dob, doingBusinessAs=$doingBusinessAs, owner=$owner, ownerType=$ownerType, processorToken=$processorToken, userDefinedId=$userDefinedId, verificationMethod=$verificationMethod, additionalProperties=$additionalProperties}" + "PlaidCreateBankAccountApiRequest{verificationMethod=$verificationMethod, ownerType=$ownerType, owner=$owner, accountToken=$accountToken, companyId=$companyId, doingBusinessAs=$doingBusinessAs, dob=$dob, userDefinedId=$userDefinedId, processorToken=$processorToken, additionalProperties=$additionalProperties}" companion object { @@ -778,64 +810,78 @@ constructor( class Builder { + private var verificationMethod: VerificationMethod? = null + private var ownerType: OwnerType? = null + private var owner: String? = null private var accountToken: String? = null private var companyId: String? = null - private var dob: LocalDate? = null private var doingBusinessAs: String? = null - private var owner: String? = null - private var ownerType: OwnerType? = null - private var processorToken: String? = null + private var dob: LocalDate? = null private var userDefinedId: String? = null - private var verificationMethod: VerificationMethod? = null + private var processorToken: String? = null private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(plaidCreateBankAccountApiRequest: PlaidCreateBankAccountApiRequest) = apply { + this.verificationMethod = plaidCreateBankAccountApiRequest.verificationMethod + this.ownerType = plaidCreateBankAccountApiRequest.ownerType + this.owner = plaidCreateBankAccountApiRequest.owner this.accountToken = plaidCreateBankAccountApiRequest.accountToken this.companyId = plaidCreateBankAccountApiRequest.companyId - this.dob = plaidCreateBankAccountApiRequest.dob this.doingBusinessAs = plaidCreateBankAccountApiRequest.doingBusinessAs - this.owner = plaidCreateBankAccountApiRequest.owner - this.ownerType = plaidCreateBankAccountApiRequest.ownerType - this.processorToken = plaidCreateBankAccountApiRequest.processorToken + this.dob = plaidCreateBankAccountApiRequest.dob this.userDefinedId = plaidCreateBankAccountApiRequest.userDefinedId - this.verificationMethod = plaidCreateBankAccountApiRequest.verificationMethod + this.processorToken = plaidCreateBankAccountApiRequest.processorToken additionalProperties(plaidCreateBankAccountApiRequest.additionalProperties) } + /** Verification Method */ + @JsonProperty("verification_method") + fun verificationMethod(verificationMethod: VerificationMethod) = apply { + this.verificationMethod = verificationMethod + } + + /** Owner Type */ + @JsonProperty("owner_type") + fun ownerType(ownerType: OwnerType) = apply { this.ownerType = ownerType } + + /** + * Legal Name of the business or individual who owns the external account. This will + * appear in statements + */ + @JsonProperty("owner") fun owner(owner: String) = apply { this.owner = owner } + + /** + * Indicates which Lithic account the external account is associated with. For external + * accounts that are associated with the program, account_token field returned will be + * null + */ @JsonProperty("account_token") fun accountToken(accountToken: String) = apply { this.accountToken = accountToken } + /** Optional field that helps identify bank accounts in receipts */ @JsonProperty("company_id") fun companyId(companyId: String) = apply { this.companyId = companyId } - /** Date of Birth of the Individual that owns the external bank account */ - @JsonProperty("dob") fun dob(dob: LocalDate) = apply { this.dob = dob } - + /** Doing Business As */ @JsonProperty("doing_business_as") fun doingBusinessAs(doingBusinessAs: String) = apply { this.doingBusinessAs = doingBusinessAs } - @JsonProperty("owner") fun owner(owner: String) = apply { this.owner = owner } + /** Date of Birth of the Individual that owns the external bank account */ + @JsonProperty("dob") fun dob(dob: LocalDate) = apply { this.dob = dob } - @JsonProperty("owner_type") - fun ownerType(ownerType: OwnerType) = apply { this.ownerType = ownerType } + /** User Defined ID */ + @JsonProperty("user_defined_id") + fun userDefinedId(userDefinedId: String) = apply { this.userDefinedId = userDefinedId } @JsonProperty("processor_token") fun processorToken(processorToken: String) = apply { this.processorToken = processorToken } - @JsonProperty("user_defined_id") - fun userDefinedId(userDefinedId: String) = apply { this.userDefinedId = userDefinedId } - - @JsonProperty("verification_method") - fun verificationMethod(verificationMethod: VerificationMethod) = apply { - this.verificationMethod = verificationMethod - } - fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() this.additionalProperties.putAll(additionalProperties) @@ -852,17 +898,17 @@ constructor( fun build(): PlaidCreateBankAccountApiRequest = PlaidCreateBankAccountApiRequest( + checkNotNull(verificationMethod) { + "`verificationMethod` is required but was not set" + }, + checkNotNull(ownerType) { "`ownerType` is required but was not set" }, + checkNotNull(owner) { "`owner` is required but was not set" }, accountToken, companyId, - dob, doingBusinessAs, - checkNotNull(owner) { "`owner` is required but was not set" }, - checkNotNull(ownerType) { "`ownerType` is required but was not set" }, - checkNotNull(processorToken) { "`processorToken` is required but was not set" }, + dob, userDefinedId, - checkNotNull(verificationMethod) { - "`verificationMethod` is required but was not set" - }, + checkNotNull(processorToken) { "`processorToken` is required but was not set" }, additionalProperties.toUnmodifiable(), ) } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponse.kt index 9d0f98c3..1653929a 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponse.kt @@ -24,28 +24,28 @@ import java.util.Optional @NoAutoDetect class ExternalBankAccountCreateResponse private constructor( - private val accountToken: JsonField, - private val address: JsonField, - private val companyId: JsonField, + private val token: JsonField, + private val owner: JsonField, + private val routingNumber: JsonField, + private val lastFour: JsonField, + private val name: JsonField, + private val currency: JsonField, private val country: JsonField, + private val accountToken: JsonField, private val created: JsonField, - private val currency: JsonField, + private val companyId: JsonField, private val dob: JsonField, private val doingBusinessAs: JsonField, - private val lastFour: JsonField, - private val name: JsonField, - private val financialAccountToken: JsonField, - private val owner: JsonField, - private val ownerType: JsonField, - private val routingNumber: JsonField, - private val state: JsonField, - private val token: JsonField, - private val type: JsonField, private val userDefinedId: JsonField, - private val verificationAttempts: JsonField, private val verificationFailedReason: JsonField, + private val verificationAttempts: JsonField, + private val financialAccountToken: JsonField, + private val type: JsonField, private val verificationMethod: JsonField, + private val ownerType: JsonField, + private val state: JsonField, private val verificationState: JsonField, + private val address: JsonField, private val additionalProperties: Map, ) { @@ -54,39 +54,20 @@ private constructor( private var hashCode: Int = 0 /** - * Indicates which Lithic account the external account is associated with. For external accounts - * that are associated with the program, account_token field returned will be null - */ - fun accountToken(): Optional = - Optional.ofNullable(accountToken.getNullable("account_token")) - - /** - * Address used during Address Verification Service (AVS) checks during transactions if enabled - * via Auth Rules. + * A globally unique identifier for this record of an external bank account association. If a + * program links an external bank account to more than one end-user or to both the program and + * the end-user, then Lithic will return each record of the association */ - fun address(): Optional = - Optional.ofNullable(address.getNullable("address")) - - /** Optional field that helps identify bank accounts in receipts */ - fun companyId(): Optional = Optional.ofNullable(companyId.getNullable("company_id")) + fun token(): String = token.getRequired("token") /** - * The country that the bank account is located in using ISO 3166-1. We will only accept USA - * bank accounts e.g., USA + * Legal Name of the business or individual who owns the external account. This will appear in + * statements */ - fun country(): String = country.getRequired("country") - - /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ - fun created(): OffsetDateTime = created.getRequired("created") - - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - fun currency(): String = currency.getRequired("currency") - - /** Date of Birth of the Individual that owns the external bank account */ - fun dob(): Optional = Optional.ofNullable(dob.getNullable("dob")) + fun owner(): String = owner.getRequired("owner") - fun doingBusinessAs(): Optional = - Optional.ofNullable(doingBusinessAs.getNullable("doing_business_as")) + /** Routing Number */ + fun routingNumber(): String = routingNumber.getRequired("routing_number") /** The last 4 digits of the bank account. Derived by Lithic from the account number passed */ fun lastFour(): String = lastFour.getRequired("last_four") @@ -94,40 +75,39 @@ private constructor( /** The nickname given to this record of External Bank Account */ fun name(): Optional = Optional.ofNullable(name.getNullable("name")) + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + fun currency(): String = currency.getRequired("currency") + /** - * The financial account token of the operating account, which will provide the funds for micro - * deposits used to verify the account + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - fun financialAccountToken(): Optional = - Optional.ofNullable(financialAccountToken.getNullable("financial_account_token")) + fun country(): String = country.getRequired("country") /** - * Legal Name of the business or individual who owns the external account. This will appear in - * statements + * Indicates which Lithic account the external account is associated with. For external accounts + * that are associated with the program, account_token field returned will be null */ - fun owner(): String = owner.getRequired("owner") - - fun ownerType(): OwnerType = ownerType.getRequired("owner_type") + fun accountToken(): Optional = + Optional.ofNullable(accountToken.getNullable("account_token")) - fun routingNumber(): String = routingNumber.getRequired("routing_number") + /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ + fun created(): OffsetDateTime = created.getRequired("created") - fun state(): State = state.getRequired("state") + /** Optional field that helps identify bank accounts in receipts */ + fun companyId(): Optional = Optional.ofNullable(companyId.getNullable("company_id")) - /** - * A globally unique identifier for this record of an external bank account association. If a - * program links an external bank account to more than one end-user or to both the program and - * the end-user, then Lithic will return each record of the association - */ - fun token(): String = token.getRequired("token") + /** Date of Birth of the Individual that owns the external bank account */ + fun dob(): Optional = Optional.ofNullable(dob.getNullable("dob")) - fun type(): Type = type.getRequired("type") + /** Doing Business As */ + fun doingBusinessAs(): Optional = + Optional.ofNullable(doingBusinessAs.getNullable("doing_business_as")) + /** User Defined ID */ fun userDefinedId(): Optional = Optional.ofNullable(userDefinedId.getNullable("user_defined_id")) - /** The number of attempts at verification */ - fun verificationAttempts(): Long = verificationAttempts.getRequired("verification_attempts") - /** * Optional free text description of the reason for the failed verification. For ACH * micro-deposits returned, this field will display the reason return code sent by the ACH @@ -136,42 +116,48 @@ private constructor( fun verificationFailedReason(): Optional = Optional.ofNullable(verificationFailedReason.getNullable("verification_failed_reason")) + /** The number of attempts at verification */ + fun verificationAttempts(): Long = verificationAttempts.getRequired("verification_attempts") + + /** The financial account token of the operating account to fund the micro deposits */ + fun financialAccountToken(): Optional = + Optional.ofNullable(financialAccountToken.getNullable("financial_account_token")) + + /** Account Type */ + fun type(): Type = type.getRequired("type") + + /** Verification Method */ fun verificationMethod(): VerificationMethod = verificationMethod.getRequired("verification_method") + /** Owner Type */ + fun ownerType(): OwnerType = ownerType.getRequired("owner_type") + + /** Account State */ + fun state(): State = state.getRequired("state") + + /** Verification State */ fun verificationState(): VerificationState = verificationState.getRequired("verification_state") - /** - * Indicates which Lithic account the external account is associated with. For external accounts - * that are associated with the program, account_token field returned will be null - */ - @JsonProperty("account_token") @ExcludeMissing fun _accountToken() = accountToken + /** Address */ + fun address(): Optional = + Optional.ofNullable(address.getNullable("address")) /** - * Address used during Address Verification Service (AVS) checks during transactions if enabled - * via Auth Rules. + * A globally unique identifier for this record of an external bank account association. If a + * program links an external bank account to more than one end-user or to both the program and + * the end-user, then Lithic will return each record of the association */ - @JsonProperty("address") @ExcludeMissing fun _address() = address - - /** Optional field that helps identify bank accounts in receipts */ - @JsonProperty("company_id") @ExcludeMissing fun _companyId() = companyId + @JsonProperty("token") @ExcludeMissing fun _token() = token /** - * The country that the bank account is located in using ISO 3166-1. We will only accept USA - * bank accounts e.g., USA + * Legal Name of the business or individual who owns the external account. This will appear in + * statements */ - @JsonProperty("country") @ExcludeMissing fun _country() = country - - /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ - @JsonProperty("created") @ExcludeMissing fun _created() = created - - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - @JsonProperty("currency") @ExcludeMissing fun _currency() = currency - - /** Date of Birth of the Individual that owns the external bank account */ - @JsonProperty("dob") @ExcludeMissing fun _dob() = dob + @JsonProperty("owner") @ExcludeMissing fun _owner() = owner - @JsonProperty("doing_business_as") @ExcludeMissing fun _doingBusinessAs() = doingBusinessAs + /** Routing Number */ + @JsonProperty("routing_number") @ExcludeMissing fun _routingNumber() = routingNumber /** The last 4 digits of the bank account. Derived by Lithic from the account number passed */ @JsonProperty("last_four") @ExcludeMissing fun _lastFour() = lastFour @@ -179,42 +165,36 @@ private constructor( /** The nickname given to this record of External Bank Account */ @JsonProperty("name") @ExcludeMissing fun _name() = name + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + @JsonProperty("currency") @ExcludeMissing fun _currency() = currency + /** - * The financial account token of the operating account, which will provide the funds for micro - * deposits used to verify the account + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - @JsonProperty("financial_account_token") - @ExcludeMissing - fun _financialAccountToken() = financialAccountToken + @JsonProperty("country") @ExcludeMissing fun _country() = country /** - * Legal Name of the business or individual who owns the external account. This will appear in - * statements + * Indicates which Lithic account the external account is associated with. For external accounts + * that are associated with the program, account_token field returned will be null */ - @JsonProperty("owner") @ExcludeMissing fun _owner() = owner - - @JsonProperty("owner_type") @ExcludeMissing fun _ownerType() = ownerType + @JsonProperty("account_token") @ExcludeMissing fun _accountToken() = accountToken - @JsonProperty("routing_number") @ExcludeMissing fun _routingNumber() = routingNumber + /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ + @JsonProperty("created") @ExcludeMissing fun _created() = created - @JsonProperty("state") @ExcludeMissing fun _state() = state + /** Optional field that helps identify bank accounts in receipts */ + @JsonProperty("company_id") @ExcludeMissing fun _companyId() = companyId - /** - * A globally unique identifier for this record of an external bank account association. If a - * program links an external bank account to more than one end-user or to both the program and - * the end-user, then Lithic will return each record of the association - */ - @JsonProperty("token") @ExcludeMissing fun _token() = token + /** Date of Birth of the Individual that owns the external bank account */ + @JsonProperty("dob") @ExcludeMissing fun _dob() = dob - @JsonProperty("type") @ExcludeMissing fun _type() = type + /** Doing Business As */ + @JsonProperty("doing_business_as") @ExcludeMissing fun _doingBusinessAs() = doingBusinessAs + /** User Defined ID */ @JsonProperty("user_defined_id") @ExcludeMissing fun _userDefinedId() = userDefinedId - /** The number of attempts at verification */ - @JsonProperty("verification_attempts") - @ExcludeMissing - fun _verificationAttempts() = verificationAttempts - /** * Optional free text description of the reason for the failed verification. For ACH * micro-deposits returned, this field will display the reason return code sent by the ACH @@ -224,40 +204,64 @@ private constructor( @ExcludeMissing fun _verificationFailedReason() = verificationFailedReason + /** The number of attempts at verification */ + @JsonProperty("verification_attempts") + @ExcludeMissing + fun _verificationAttempts() = verificationAttempts + + /** The financial account token of the operating account to fund the micro deposits */ + @JsonProperty("financial_account_token") + @ExcludeMissing + fun _financialAccountToken() = financialAccountToken + + /** Account Type */ + @JsonProperty("type") @ExcludeMissing fun _type() = type + + /** Verification Method */ @JsonProperty("verification_method") @ExcludeMissing fun _verificationMethod() = verificationMethod + /** Owner Type */ + @JsonProperty("owner_type") @ExcludeMissing fun _ownerType() = ownerType + + /** Account State */ + @JsonProperty("state") @ExcludeMissing fun _state() = state + + /** Verification State */ @JsonProperty("verification_state") @ExcludeMissing fun _verificationState() = verificationState + /** Address */ + @JsonProperty("address") @ExcludeMissing fun _address() = address + @JsonAnyGetter @ExcludeMissing fun _additionalProperties(): Map = additionalProperties fun validate(): ExternalBankAccountCreateResponse = apply { if (!validated) { - accountToken() - address().map { it.validate() } - companyId() + token() + owner() + routingNumber() + lastFour() + name() + currency() country() + accountToken() created() - currency() + companyId() dob() doingBusinessAs() - lastFour() - name() - financialAccountToken() - owner() - ownerType() - routingNumber() - state() - token() - type() userDefinedId() - verificationAttempts() verificationFailedReason() + verificationAttempts() + financialAccountToken() + type() verificationMethod() + ownerType() + state() verificationState() + address().map { it.validate() } validated = true } } @@ -270,28 +274,28 @@ private constructor( } return other is ExternalBankAccountCreateResponse && - this.accountToken == other.accountToken && - this.address == other.address && - this.companyId == other.companyId && + this.token == other.token && + this.owner == other.owner && + this.routingNumber == other.routingNumber && + this.lastFour == other.lastFour && + this.name == other.name && + this.currency == other.currency && this.country == other.country && + this.accountToken == other.accountToken && this.created == other.created && - this.currency == other.currency && + this.companyId == other.companyId && this.dob == other.dob && this.doingBusinessAs == other.doingBusinessAs && - this.lastFour == other.lastFour && - this.name == other.name && - this.financialAccountToken == other.financialAccountToken && - this.owner == other.owner && - this.ownerType == other.ownerType && - this.routingNumber == other.routingNumber && - this.state == other.state && - this.token == other.token && - this.type == other.type && this.userDefinedId == other.userDefinedId && - this.verificationAttempts == other.verificationAttempts && this.verificationFailedReason == other.verificationFailedReason && + this.verificationAttempts == other.verificationAttempts && + this.financialAccountToken == other.financialAccountToken && + this.type == other.type && this.verificationMethod == other.verificationMethod && + this.ownerType == other.ownerType && + this.state == other.state && this.verificationState == other.verificationState && + this.address == other.address && this.additionalProperties == other.additionalProperties } @@ -299,28 +303,28 @@ private constructor( if (hashCode == 0) { hashCode = Objects.hash( - accountToken, - address, - companyId, + token, + owner, + routingNumber, + lastFour, + name, + currency, country, + accountToken, created, - currency, + companyId, dob, doingBusinessAs, - lastFour, - name, - financialAccountToken, - owner, - ownerType, - routingNumber, - state, - token, - type, userDefinedId, - verificationAttempts, verificationFailedReason, + verificationAttempts, + financialAccountToken, + type, verificationMethod, + ownerType, + state, verificationState, + address, additionalProperties, ) } @@ -328,7 +332,7 @@ private constructor( } override fun toString() = - "ExternalBankAccountCreateResponse{accountToken=$accountToken, address=$address, companyId=$companyId, country=$country, created=$created, currency=$currency, dob=$dob, doingBusinessAs=$doingBusinessAs, lastFour=$lastFour, name=$name, financialAccountToken=$financialAccountToken, owner=$owner, ownerType=$ownerType, routingNumber=$routingNumber, state=$state, token=$token, type=$type, userDefinedId=$userDefinedId, verificationAttempts=$verificationAttempts, verificationFailedReason=$verificationFailedReason, verificationMethod=$verificationMethod, verificationState=$verificationState, additionalProperties=$additionalProperties}" + "ExternalBankAccountCreateResponse{token=$token, owner=$owner, routingNumber=$routingNumber, lastFour=$lastFour, name=$name, currency=$currency, country=$country, accountToken=$accountToken, created=$created, companyId=$companyId, dob=$dob, doingBusinessAs=$doingBusinessAs, userDefinedId=$userDefinedId, verificationFailedReason=$verificationFailedReason, verificationAttempts=$verificationAttempts, financialAccountToken=$financialAccountToken, type=$type, verificationMethod=$verificationMethod, ownerType=$ownerType, state=$state, verificationState=$verificationState, address=$address, additionalProperties=$additionalProperties}" companion object { @@ -337,148 +341,97 @@ private constructor( class Builder { - private var accountToken: JsonField = JsonMissing.of() - private var address: JsonField = JsonMissing.of() - private var companyId: JsonField = JsonMissing.of() + private var token: JsonField = JsonMissing.of() + private var owner: JsonField = JsonMissing.of() + private var routingNumber: JsonField = JsonMissing.of() + private var lastFour: JsonField = JsonMissing.of() + private var name: JsonField = JsonMissing.of() + private var currency: JsonField = JsonMissing.of() private var country: JsonField = JsonMissing.of() + private var accountToken: JsonField = JsonMissing.of() private var created: JsonField = JsonMissing.of() - private var currency: JsonField = JsonMissing.of() + private var companyId: JsonField = JsonMissing.of() private var dob: JsonField = JsonMissing.of() private var doingBusinessAs: JsonField = JsonMissing.of() - private var lastFour: JsonField = JsonMissing.of() - private var name: JsonField = JsonMissing.of() - private var financialAccountToken: JsonField = JsonMissing.of() - private var owner: JsonField = JsonMissing.of() - private var ownerType: JsonField = JsonMissing.of() - private var routingNumber: JsonField = JsonMissing.of() - private var state: JsonField = JsonMissing.of() - private var token: JsonField = JsonMissing.of() - private var type: JsonField = JsonMissing.of() private var userDefinedId: JsonField = JsonMissing.of() - private var verificationAttempts: JsonField = JsonMissing.of() private var verificationFailedReason: JsonField = JsonMissing.of() + private var verificationAttempts: JsonField = JsonMissing.of() + private var financialAccountToken: JsonField = JsonMissing.of() + private var type: JsonField = JsonMissing.of() private var verificationMethod: JsonField = JsonMissing.of() + private var ownerType: JsonField = JsonMissing.of() + private var state: JsonField = JsonMissing.of() private var verificationState: JsonField = JsonMissing.of() + private var address: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(externalBankAccountCreateResponse: ExternalBankAccountCreateResponse) = apply { - this.accountToken = externalBankAccountCreateResponse.accountToken - this.address = externalBankAccountCreateResponse.address - this.companyId = externalBankAccountCreateResponse.companyId + this.token = externalBankAccountCreateResponse.token + this.owner = externalBankAccountCreateResponse.owner + this.routingNumber = externalBankAccountCreateResponse.routingNumber + this.lastFour = externalBankAccountCreateResponse.lastFour + this.name = externalBankAccountCreateResponse.name + this.currency = externalBankAccountCreateResponse.currency this.country = externalBankAccountCreateResponse.country + this.accountToken = externalBankAccountCreateResponse.accountToken this.created = externalBankAccountCreateResponse.created - this.currency = externalBankAccountCreateResponse.currency + this.companyId = externalBankAccountCreateResponse.companyId this.dob = externalBankAccountCreateResponse.dob this.doingBusinessAs = externalBankAccountCreateResponse.doingBusinessAs - this.lastFour = externalBankAccountCreateResponse.lastFour - this.name = externalBankAccountCreateResponse.name - this.financialAccountToken = externalBankAccountCreateResponse.financialAccountToken - this.owner = externalBankAccountCreateResponse.owner - this.ownerType = externalBankAccountCreateResponse.ownerType - this.routingNumber = externalBankAccountCreateResponse.routingNumber - this.state = externalBankAccountCreateResponse.state - this.token = externalBankAccountCreateResponse.token - this.type = externalBankAccountCreateResponse.type this.userDefinedId = externalBankAccountCreateResponse.userDefinedId - this.verificationAttempts = externalBankAccountCreateResponse.verificationAttempts this.verificationFailedReason = externalBankAccountCreateResponse.verificationFailedReason + this.verificationAttempts = externalBankAccountCreateResponse.verificationAttempts + this.financialAccountToken = externalBankAccountCreateResponse.financialAccountToken + this.type = externalBankAccountCreateResponse.type this.verificationMethod = externalBankAccountCreateResponse.verificationMethod + this.ownerType = externalBankAccountCreateResponse.ownerType + this.state = externalBankAccountCreateResponse.state this.verificationState = externalBankAccountCreateResponse.verificationState - additionalProperties(externalBankAccountCreateResponse.additionalProperties) - } - - /** - * Indicates which Lithic account the external account is associated with. For external - * accounts that are associated with the program, account_token field returned will be null - */ - fun accountToken(accountToken: String) = accountToken(JsonField.of(accountToken)) - - /** - * Indicates which Lithic account the external account is associated with. For external - * accounts that are associated with the program, account_token field returned will be null - */ - @JsonProperty("account_token") - @ExcludeMissing - fun accountToken(accountToken: JsonField) = apply { - this.accountToken = accountToken - } - - /** - * Address used during Address Verification Service (AVS) checks during transactions if - * enabled via Auth Rules. - */ - fun address(address: ExternalBankAccountAddress) = address(JsonField.of(address)) - - /** - * Address used during Address Verification Service (AVS) checks during transactions if - * enabled via Auth Rules. - */ - @JsonProperty("address") - @ExcludeMissing - fun address(address: JsonField) = apply { - this.address = address - } - - /** Optional field that helps identify bank accounts in receipts */ - fun companyId(companyId: String) = companyId(JsonField.of(companyId)) - - /** Optional field that helps identify bank accounts in receipts */ - @JsonProperty("company_id") - @ExcludeMissing - fun companyId(companyId: JsonField) = apply { this.companyId = companyId } + this.address = externalBankAccountCreateResponse.address + additionalProperties(externalBankAccountCreateResponse.additionalProperties) + } /** - * The country that the bank account is located in using ISO 3166-1. We will only accept USA - * bank accounts e.g., USA + * A globally unique identifier for this record of an external bank account association. If + * a program links an external bank account to more than one end-user or to both the program + * and the end-user, then Lithic will return each record of the association */ - fun country(country: String) = country(JsonField.of(country)) + fun token(token: String) = token(JsonField.of(token)) /** - * The country that the bank account is located in using ISO 3166-1. We will only accept USA - * bank accounts e.g., USA + * A globally unique identifier for this record of an external bank account association. If + * a program links an external bank account to more than one end-user or to both the program + * and the end-user, then Lithic will return each record of the association */ - @JsonProperty("country") + @JsonProperty("token") @ExcludeMissing - fun country(country: JsonField) = apply { this.country = country } + fun token(token: JsonField) = apply { this.token = token } /** - * An ISO 8601 string representing when this funding source was added to the Lithic account. + * Legal Name of the business or individual who owns the external account. This will appear + * in statements */ - fun created(created: OffsetDateTime) = created(JsonField.of(created)) + fun owner(owner: String) = owner(JsonField.of(owner)) /** - * An ISO 8601 string representing when this funding source was added to the Lithic account. + * Legal Name of the business or individual who owns the external account. This will appear + * in statements */ - @JsonProperty("created") - @ExcludeMissing - fun created(created: JsonField) = apply { this.created = created } - - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - fun currency(currency: String) = currency(JsonField.of(currency)) - - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - @JsonProperty("currency") - @ExcludeMissing - fun currency(currency: JsonField) = apply { this.currency = currency } - - /** Date of Birth of the Individual that owns the external bank account */ - fun dob(dob: LocalDate) = dob(JsonField.of(dob)) - - /** Date of Birth of the Individual that owns the external bank account */ - @JsonProperty("dob") + @JsonProperty("owner") @ExcludeMissing - fun dob(dob: JsonField) = apply { this.dob = dob } + fun owner(owner: JsonField) = apply { this.owner = owner } - fun doingBusinessAs(doingBusinessAs: String) = - doingBusinessAs(JsonField.of(doingBusinessAs)) + /** Routing Number */ + fun routingNumber(routingNumber: String) = routingNumber(JsonField.of(routingNumber)) - @JsonProperty("doing_business_as") + /** Routing Number */ + @JsonProperty("routing_number") @ExcludeMissing - fun doingBusinessAs(doingBusinessAs: JsonField) = apply { - this.doingBusinessAs = doingBusinessAs + fun routingNumber(routingNumber: JsonField) = apply { + this.routingNumber = routingNumber } /** @@ -501,98 +454,93 @@ private constructor( @ExcludeMissing fun name(name: JsonField) = apply { this.name = name } + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + fun currency(currency: String) = currency(JsonField.of(currency)) + + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + @JsonProperty("currency") + @ExcludeMissing + fun currency(currency: JsonField) = apply { this.currency = currency } + /** - * The financial account token of the operating account, which will provide the funds for - * micro deposits used to verify the account + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - fun financialAccountToken(financialAccountToken: String) = - financialAccountToken(JsonField.of(financialAccountToken)) + fun country(country: String) = country(JsonField.of(country)) /** - * The financial account token of the operating account, which will provide the funds for - * micro deposits used to verify the account + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - @JsonProperty("financial_account_token") + @JsonProperty("country") @ExcludeMissing - fun financialAccountToken(financialAccountToken: JsonField) = apply { - this.financialAccountToken = financialAccountToken - } + fun country(country: JsonField) = apply { this.country = country } /** - * Legal Name of the business or individual who owns the external account. This will appear - * in statements + * Indicates which Lithic account the external account is associated with. For external + * accounts that are associated with the program, account_token field returned will be null */ - fun owner(owner: String) = owner(JsonField.of(owner)) + fun accountToken(accountToken: String) = accountToken(JsonField.of(accountToken)) /** - * Legal Name of the business or individual who owns the external account. This will appear - * in statements + * Indicates which Lithic account the external account is associated with. For external + * accounts that are associated with the program, account_token field returned will be null */ - @JsonProperty("owner") - @ExcludeMissing - fun owner(owner: JsonField) = apply { this.owner = owner } - - fun ownerType(ownerType: OwnerType) = ownerType(JsonField.of(ownerType)) - - @JsonProperty("owner_type") + @JsonProperty("account_token") @ExcludeMissing - fun ownerType(ownerType: JsonField) = apply { this.ownerType = ownerType } + fun accountToken(accountToken: JsonField) = apply { + this.accountToken = accountToken + } - fun routingNumber(routingNumber: String) = routingNumber(JsonField.of(routingNumber)) + /** + * An ISO 8601 string representing when this funding source was added to the Lithic account. + */ + fun created(created: OffsetDateTime) = created(JsonField.of(created)) - @JsonProperty("routing_number") + /** + * An ISO 8601 string representing when this funding source was added to the Lithic account. + */ + @JsonProperty("created") @ExcludeMissing - fun routingNumber(routingNumber: JsonField) = apply { - this.routingNumber = routingNumber - } + fun created(created: JsonField) = apply { this.created = created } - fun state(state: State) = state(JsonField.of(state)) + /** Optional field that helps identify bank accounts in receipts */ + fun companyId(companyId: String) = companyId(JsonField.of(companyId)) - @JsonProperty("state") + /** Optional field that helps identify bank accounts in receipts */ + @JsonProperty("company_id") @ExcludeMissing - fun state(state: JsonField) = apply { this.state = state } + fun companyId(companyId: JsonField) = apply { this.companyId = companyId } - /** - * A globally unique identifier for this record of an external bank account association. If - * a program links an external bank account to more than one end-user or to both the program - * and the end-user, then Lithic will return each record of the association - */ - fun token(token: String) = token(JsonField.of(token)) + /** Date of Birth of the Individual that owns the external bank account */ + fun dob(dob: LocalDate) = dob(JsonField.of(dob)) - /** - * A globally unique identifier for this record of an external bank account association. If - * a program links an external bank account to more than one end-user or to both the program - * and the end-user, then Lithic will return each record of the association - */ - @JsonProperty("token") + /** Date of Birth of the Individual that owns the external bank account */ + @JsonProperty("dob") @ExcludeMissing - fun token(token: JsonField) = apply { this.token = token } + fun dob(dob: JsonField) = apply { this.dob = dob } - fun type(type: Type) = type(JsonField.of(type)) + /** Doing Business As */ + fun doingBusinessAs(doingBusinessAs: String) = + doingBusinessAs(JsonField.of(doingBusinessAs)) - @JsonProperty("type") + /** Doing Business As */ + @JsonProperty("doing_business_as") @ExcludeMissing - fun type(type: JsonField) = apply { this.type = type } + fun doingBusinessAs(doingBusinessAs: JsonField) = apply { + this.doingBusinessAs = doingBusinessAs + } + /** User Defined ID */ fun userDefinedId(userDefinedId: String) = userDefinedId(JsonField.of(userDefinedId)) + /** User Defined ID */ @JsonProperty("user_defined_id") @ExcludeMissing fun userDefinedId(userDefinedId: JsonField) = apply { this.userDefinedId = userDefinedId } - /** The number of attempts at verification */ - fun verificationAttempts(verificationAttempts: Long) = - verificationAttempts(JsonField.of(verificationAttempts)) - - /** The number of attempts at verification */ - @JsonProperty("verification_attempts") - @ExcludeMissing - fun verificationAttempts(verificationAttempts: JsonField) = apply { - this.verificationAttempts = verificationAttempts - } - /** * Optional free text description of the reason for the failed verification. For ACH * micro-deposits returned, this field will display the reason return code sent by the ACH @@ -612,24 +560,84 @@ private constructor( this.verificationFailedReason = verificationFailedReason } + /** The number of attempts at verification */ + fun verificationAttempts(verificationAttempts: Long) = + verificationAttempts(JsonField.of(verificationAttempts)) + + /** The number of attempts at verification */ + @JsonProperty("verification_attempts") + @ExcludeMissing + fun verificationAttempts(verificationAttempts: JsonField) = apply { + this.verificationAttempts = verificationAttempts + } + + /** The financial account token of the operating account to fund the micro deposits */ + fun financialAccountToken(financialAccountToken: String) = + financialAccountToken(JsonField.of(financialAccountToken)) + + /** The financial account token of the operating account to fund the micro deposits */ + @JsonProperty("financial_account_token") + @ExcludeMissing + fun financialAccountToken(financialAccountToken: JsonField) = apply { + this.financialAccountToken = financialAccountToken + } + + /** Account Type */ + fun type(type: Type) = type(JsonField.of(type)) + + /** Account Type */ + @JsonProperty("type") + @ExcludeMissing + fun type(type: JsonField) = apply { this.type = type } + + /** Verification Method */ fun verificationMethod(verificationMethod: VerificationMethod) = verificationMethod(JsonField.of(verificationMethod)) + /** Verification Method */ @JsonProperty("verification_method") @ExcludeMissing fun verificationMethod(verificationMethod: JsonField) = apply { this.verificationMethod = verificationMethod } + /** Owner Type */ + fun ownerType(ownerType: OwnerType) = ownerType(JsonField.of(ownerType)) + + /** Owner Type */ + @JsonProperty("owner_type") + @ExcludeMissing + fun ownerType(ownerType: JsonField) = apply { this.ownerType = ownerType } + + /** Account State */ + fun state(state: State) = state(JsonField.of(state)) + + /** Account State */ + @JsonProperty("state") + @ExcludeMissing + fun state(state: JsonField) = apply { this.state = state } + + /** Verification State */ fun verificationState(verificationState: VerificationState) = verificationState(JsonField.of(verificationState)) + /** Verification State */ @JsonProperty("verification_state") @ExcludeMissing fun verificationState(verificationState: JsonField) = apply { this.verificationState = verificationState } + /** Address */ + fun address(address: ExternalBankAccountAddress) = address(JsonField.of(address)) + + /** Address */ + @JsonProperty("address") + @ExcludeMissing + fun address(address: JsonField) = apply { + this.address = address + } + fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() this.additionalProperties.putAll(additionalProperties) @@ -646,28 +654,28 @@ private constructor( fun build(): ExternalBankAccountCreateResponse = ExternalBankAccountCreateResponse( - accountToken, - address, - companyId, + token, + owner, + routingNumber, + lastFour, + name, + currency, country, + accountToken, created, - currency, + companyId, dob, doingBusinessAs, - lastFour, - name, - financialAccountToken, - owner, - ownerType, - routingNumber, - state, - token, - type, userDefinedId, - verificationAttempts, verificationFailedReason, + verificationAttempts, + financialAccountToken, + type, verificationMethod, + ownerType, + state, verificationState, + address, additionalProperties.toUnmodifiable(), ) } @@ -751,40 +759,40 @@ private constructor( companion object { - @JvmField val CLOSED = State(JsonField.of("CLOSED")) - @JvmField val ENABLED = State(JsonField.of("ENABLED")) + @JvmField val CLOSED = State(JsonField.of("CLOSED")) + @JvmField val PAUSED = State(JsonField.of("PAUSED")) @JvmStatic fun of(value: String) = State(JsonField.of(value)) } enum class Known { - CLOSED, ENABLED, + CLOSED, PAUSED, } enum class Value { - CLOSED, ENABLED, + CLOSED, PAUSED, _UNKNOWN, } fun value(): Value = when (this) { - CLOSED -> Value.CLOSED ENABLED -> Value.ENABLED + CLOSED -> Value.CLOSED PAUSED -> Value.PAUSED else -> Value._UNKNOWN } fun known(): Known = when (this) { - CLOSED -> Known.CLOSED ENABLED -> Known.ENABLED + CLOSED -> Known.CLOSED PAUSED -> Known.PAUSED else -> throw LithicInvalidDataException("Unknown State: $value") } @@ -940,6 +948,8 @@ private constructor( companion object { + @JvmField val PENDING = VerificationState(JsonField.of("PENDING")) + @JvmField val ENABLED = VerificationState(JsonField.of("ENABLED")) @JvmField @@ -947,41 +957,39 @@ private constructor( @JvmField val INSUFFICIENT_FUNDS = VerificationState(JsonField.of("INSUFFICIENT_FUNDS")) - @JvmField val PENDING = VerificationState(JsonField.of("PENDING")) - @JvmStatic fun of(value: String) = VerificationState(JsonField.of(value)) } enum class Known { + PENDING, ENABLED, FAILED_VERIFICATION, INSUFFICIENT_FUNDS, - PENDING, } enum class Value { + PENDING, ENABLED, FAILED_VERIFICATION, INSUFFICIENT_FUNDS, - PENDING, _UNKNOWN, } fun value(): Value = when (this) { + PENDING -> Value.PENDING ENABLED -> Value.ENABLED FAILED_VERIFICATION -> Value.FAILED_VERIFICATION INSUFFICIENT_FUNDS -> Value.INSUFFICIENT_FUNDS - PENDING -> Value.PENDING else -> Value._UNKNOWN } fun known(): Known = when (this) { + PENDING -> Known.PENDING ENABLED -> Known.ENABLED FAILED_VERIFICATION -> Known.FAILED_VERIFICATION INSUFFICIENT_FUNDS -> Known.INSUFFICIENT_FUNDS - PENDING -> Known.PENDING else -> throw LithicInvalidDataException("Unknown VerificationState: $value") } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListParams.kt index accbf27c..308cc61f 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListParams.kt @@ -359,40 +359,40 @@ constructor( companion object { - @JvmField val CLOSED = AccountState(JsonField.of("CLOSED")) - @JvmField val ENABLED = AccountState(JsonField.of("ENABLED")) + @JvmField val CLOSED = AccountState(JsonField.of("CLOSED")) + @JvmField val PAUSED = AccountState(JsonField.of("PAUSED")) @JvmStatic fun of(value: String) = AccountState(JsonField.of(value)) } enum class Known { - CLOSED, ENABLED, + CLOSED, PAUSED, } enum class Value { - CLOSED, ENABLED, + CLOSED, PAUSED, _UNKNOWN, } fun value(): Value = when (this) { - CLOSED -> Value.CLOSED ENABLED -> Value.ENABLED + CLOSED -> Value.CLOSED PAUSED -> Value.PAUSED else -> Value._UNKNOWN } fun known(): Known = when (this) { - CLOSED -> Known.CLOSED ENABLED -> Known.ENABLED + CLOSED -> Known.CLOSED PAUSED -> Known.PAUSED else -> throw LithicInvalidDataException("Unknown AccountState: $value") } @@ -422,6 +422,8 @@ constructor( companion object { + @JvmField val PENDING = VerificationState(JsonField.of("PENDING")) + @JvmField val ENABLED = VerificationState(JsonField.of("ENABLED")) @JvmField @@ -429,41 +431,39 @@ constructor( @JvmField val INSUFFICIENT_FUNDS = VerificationState(JsonField.of("INSUFFICIENT_FUNDS")) - @JvmField val PENDING = VerificationState(JsonField.of("PENDING")) - @JvmStatic fun of(value: String) = VerificationState(JsonField.of(value)) } enum class Known { + PENDING, ENABLED, FAILED_VERIFICATION, INSUFFICIENT_FUNDS, - PENDING, } enum class Value { + PENDING, ENABLED, FAILED_VERIFICATION, INSUFFICIENT_FUNDS, - PENDING, _UNKNOWN, } fun value(): Value = when (this) { + PENDING -> Value.PENDING ENABLED -> Value.ENABLED FAILED_VERIFICATION -> Value.FAILED_VERIFICATION INSUFFICIENT_FUNDS -> Value.INSUFFICIENT_FUNDS - PENDING -> Value.PENDING else -> Value._UNKNOWN } fun known(): Known = when (this) { + PENDING -> Known.PENDING ENABLED -> Known.ENABLED FAILED_VERIFICATION -> Known.FAILED_VERIFICATION INSUFFICIENT_FUNDS -> Known.INSUFFICIENT_FUNDS - PENDING -> Known.PENDING else -> throw LithicInvalidDataException("Unknown VerificationState: $value") } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListResponse.kt index 4e5b8420..209e51f4 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListResponse.kt @@ -24,28 +24,28 @@ import java.util.Optional @NoAutoDetect class ExternalBankAccountListResponse private constructor( - private val accountToken: JsonField, - private val address: JsonField, - private val companyId: JsonField, + private val token: JsonField, + private val owner: JsonField, + private val routingNumber: JsonField, + private val lastFour: JsonField, + private val name: JsonField, + private val currency: JsonField, private val country: JsonField, + private val accountToken: JsonField, private val created: JsonField, - private val currency: JsonField, + private val companyId: JsonField, private val dob: JsonField, private val doingBusinessAs: JsonField, - private val lastFour: JsonField, - private val name: JsonField, - private val financialAccountToken: JsonField, - private val owner: JsonField, - private val ownerType: JsonField, - private val routingNumber: JsonField, - private val state: JsonField, - private val token: JsonField, - private val type: JsonField, private val userDefinedId: JsonField, - private val verificationAttempts: JsonField, private val verificationFailedReason: JsonField, + private val verificationAttempts: JsonField, + private val financialAccountToken: JsonField, + private val type: JsonField, private val verificationMethod: JsonField, + private val ownerType: JsonField, + private val state: JsonField, private val verificationState: JsonField, + private val address: JsonField, private val additionalProperties: Map, ) { @@ -54,39 +54,20 @@ private constructor( private var hashCode: Int = 0 /** - * Indicates which Lithic account the external account is associated with. For external accounts - * that are associated with the program, account_token field returned will be null - */ - fun accountToken(): Optional = - Optional.ofNullable(accountToken.getNullable("account_token")) - - /** - * Address used during Address Verification Service (AVS) checks during transactions if enabled - * via Auth Rules. + * A globally unique identifier for this record of an external bank account association. If a + * program links an external bank account to more than one end-user or to both the program and + * the end-user, then Lithic will return each record of the association */ - fun address(): Optional = - Optional.ofNullable(address.getNullable("address")) - - /** Optional field that helps identify bank accounts in receipts */ - fun companyId(): Optional = Optional.ofNullable(companyId.getNullable("company_id")) + fun token(): String = token.getRequired("token") /** - * The country that the bank account is located in using ISO 3166-1. We will only accept USA - * bank accounts e.g., USA + * Legal Name of the business or individual who owns the external account. This will appear in + * statements */ - fun country(): String = country.getRequired("country") - - /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ - fun created(): OffsetDateTime = created.getRequired("created") - - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - fun currency(): String = currency.getRequired("currency") - - /** Date of Birth of the Individual that owns the external bank account */ - fun dob(): Optional = Optional.ofNullable(dob.getNullable("dob")) + fun owner(): String = owner.getRequired("owner") - fun doingBusinessAs(): Optional = - Optional.ofNullable(doingBusinessAs.getNullable("doing_business_as")) + /** Routing Number */ + fun routingNumber(): String = routingNumber.getRequired("routing_number") /** The last 4 digits of the bank account. Derived by Lithic from the account number passed */ fun lastFour(): String = lastFour.getRequired("last_four") @@ -94,40 +75,39 @@ private constructor( /** The nickname given to this record of External Bank Account */ fun name(): Optional = Optional.ofNullable(name.getNullable("name")) + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + fun currency(): String = currency.getRequired("currency") + /** - * The financial account token of the operating account, which will provide the funds for micro - * deposits used to verify the account + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - fun financialAccountToken(): Optional = - Optional.ofNullable(financialAccountToken.getNullable("financial_account_token")) + fun country(): String = country.getRequired("country") /** - * Legal Name of the business or individual who owns the external account. This will appear in - * statements + * Indicates which Lithic account the external account is associated with. For external accounts + * that are associated with the program, account_token field returned will be null */ - fun owner(): String = owner.getRequired("owner") - - fun ownerType(): OwnerType = ownerType.getRequired("owner_type") + fun accountToken(): Optional = + Optional.ofNullable(accountToken.getNullable("account_token")) - fun routingNumber(): String = routingNumber.getRequired("routing_number") + /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ + fun created(): OffsetDateTime = created.getRequired("created") - fun state(): State = state.getRequired("state") + /** Optional field that helps identify bank accounts in receipts */ + fun companyId(): Optional = Optional.ofNullable(companyId.getNullable("company_id")) - /** - * A globally unique identifier for this record of an external bank account association. If a - * program links an external bank account to more than one end-user or to both the program and - * the end-user, then Lithic will return each record of the association - */ - fun token(): String = token.getRequired("token") + /** Date of Birth of the Individual that owns the external bank account */ + fun dob(): Optional = Optional.ofNullable(dob.getNullable("dob")) - fun type(): Type = type.getRequired("type") + /** Doing Business As */ + fun doingBusinessAs(): Optional = + Optional.ofNullable(doingBusinessAs.getNullable("doing_business_as")) + /** User Defined ID */ fun userDefinedId(): Optional = Optional.ofNullable(userDefinedId.getNullable("user_defined_id")) - /** The number of attempts at verification */ - fun verificationAttempts(): Long = verificationAttempts.getRequired("verification_attempts") - /** * Optional free text description of the reason for the failed verification. For ACH * micro-deposits returned, this field will display the reason return code sent by the ACH @@ -136,42 +116,48 @@ private constructor( fun verificationFailedReason(): Optional = Optional.ofNullable(verificationFailedReason.getNullable("verification_failed_reason")) + /** The number of attempts at verification */ + fun verificationAttempts(): Long = verificationAttempts.getRequired("verification_attempts") + + /** The financial account token of the operating account to fund the micro deposits */ + fun financialAccountToken(): Optional = + Optional.ofNullable(financialAccountToken.getNullable("financial_account_token")) + + /** Account Type */ + fun type(): Type = type.getRequired("type") + + /** Verification Method */ fun verificationMethod(): VerificationMethod = verificationMethod.getRequired("verification_method") + /** Owner Type */ + fun ownerType(): OwnerType = ownerType.getRequired("owner_type") + + /** Account State */ + fun state(): State = state.getRequired("state") + + /** Verification State */ fun verificationState(): VerificationState = verificationState.getRequired("verification_state") - /** - * Indicates which Lithic account the external account is associated with. For external accounts - * that are associated with the program, account_token field returned will be null - */ - @JsonProperty("account_token") @ExcludeMissing fun _accountToken() = accountToken + /** Address */ + fun address(): Optional = + Optional.ofNullable(address.getNullable("address")) /** - * Address used during Address Verification Service (AVS) checks during transactions if enabled - * via Auth Rules. + * A globally unique identifier for this record of an external bank account association. If a + * program links an external bank account to more than one end-user or to both the program and + * the end-user, then Lithic will return each record of the association */ - @JsonProperty("address") @ExcludeMissing fun _address() = address - - /** Optional field that helps identify bank accounts in receipts */ - @JsonProperty("company_id") @ExcludeMissing fun _companyId() = companyId + @JsonProperty("token") @ExcludeMissing fun _token() = token /** - * The country that the bank account is located in using ISO 3166-1. We will only accept USA - * bank accounts e.g., USA + * Legal Name of the business or individual who owns the external account. This will appear in + * statements */ - @JsonProperty("country") @ExcludeMissing fun _country() = country - - /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ - @JsonProperty("created") @ExcludeMissing fun _created() = created - - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - @JsonProperty("currency") @ExcludeMissing fun _currency() = currency - - /** Date of Birth of the Individual that owns the external bank account */ - @JsonProperty("dob") @ExcludeMissing fun _dob() = dob + @JsonProperty("owner") @ExcludeMissing fun _owner() = owner - @JsonProperty("doing_business_as") @ExcludeMissing fun _doingBusinessAs() = doingBusinessAs + /** Routing Number */ + @JsonProperty("routing_number") @ExcludeMissing fun _routingNumber() = routingNumber /** The last 4 digits of the bank account. Derived by Lithic from the account number passed */ @JsonProperty("last_four") @ExcludeMissing fun _lastFour() = lastFour @@ -179,42 +165,36 @@ private constructor( /** The nickname given to this record of External Bank Account */ @JsonProperty("name") @ExcludeMissing fun _name() = name + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + @JsonProperty("currency") @ExcludeMissing fun _currency() = currency + /** - * The financial account token of the operating account, which will provide the funds for micro - * deposits used to verify the account + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - @JsonProperty("financial_account_token") - @ExcludeMissing - fun _financialAccountToken() = financialAccountToken + @JsonProperty("country") @ExcludeMissing fun _country() = country /** - * Legal Name of the business or individual who owns the external account. This will appear in - * statements + * Indicates which Lithic account the external account is associated with. For external accounts + * that are associated with the program, account_token field returned will be null */ - @JsonProperty("owner") @ExcludeMissing fun _owner() = owner - - @JsonProperty("owner_type") @ExcludeMissing fun _ownerType() = ownerType + @JsonProperty("account_token") @ExcludeMissing fun _accountToken() = accountToken - @JsonProperty("routing_number") @ExcludeMissing fun _routingNumber() = routingNumber + /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ + @JsonProperty("created") @ExcludeMissing fun _created() = created - @JsonProperty("state") @ExcludeMissing fun _state() = state + /** Optional field that helps identify bank accounts in receipts */ + @JsonProperty("company_id") @ExcludeMissing fun _companyId() = companyId - /** - * A globally unique identifier for this record of an external bank account association. If a - * program links an external bank account to more than one end-user or to both the program and - * the end-user, then Lithic will return each record of the association - */ - @JsonProperty("token") @ExcludeMissing fun _token() = token + /** Date of Birth of the Individual that owns the external bank account */ + @JsonProperty("dob") @ExcludeMissing fun _dob() = dob - @JsonProperty("type") @ExcludeMissing fun _type() = type + /** Doing Business As */ + @JsonProperty("doing_business_as") @ExcludeMissing fun _doingBusinessAs() = doingBusinessAs + /** User Defined ID */ @JsonProperty("user_defined_id") @ExcludeMissing fun _userDefinedId() = userDefinedId - /** The number of attempts at verification */ - @JsonProperty("verification_attempts") - @ExcludeMissing - fun _verificationAttempts() = verificationAttempts - /** * Optional free text description of the reason for the failed verification. For ACH * micro-deposits returned, this field will display the reason return code sent by the ACH @@ -224,40 +204,64 @@ private constructor( @ExcludeMissing fun _verificationFailedReason() = verificationFailedReason + /** The number of attempts at verification */ + @JsonProperty("verification_attempts") + @ExcludeMissing + fun _verificationAttempts() = verificationAttempts + + /** The financial account token of the operating account to fund the micro deposits */ + @JsonProperty("financial_account_token") + @ExcludeMissing + fun _financialAccountToken() = financialAccountToken + + /** Account Type */ + @JsonProperty("type") @ExcludeMissing fun _type() = type + + /** Verification Method */ @JsonProperty("verification_method") @ExcludeMissing fun _verificationMethod() = verificationMethod + /** Owner Type */ + @JsonProperty("owner_type") @ExcludeMissing fun _ownerType() = ownerType + + /** Account State */ + @JsonProperty("state") @ExcludeMissing fun _state() = state + + /** Verification State */ @JsonProperty("verification_state") @ExcludeMissing fun _verificationState() = verificationState + /** Address */ + @JsonProperty("address") @ExcludeMissing fun _address() = address + @JsonAnyGetter @ExcludeMissing fun _additionalProperties(): Map = additionalProperties fun validate(): ExternalBankAccountListResponse = apply { if (!validated) { - accountToken() - address().map { it.validate() } - companyId() + token() + owner() + routingNumber() + lastFour() + name() + currency() country() + accountToken() created() - currency() + companyId() dob() doingBusinessAs() - lastFour() - name() - financialAccountToken() - owner() - ownerType() - routingNumber() - state() - token() - type() userDefinedId() - verificationAttempts() verificationFailedReason() + verificationAttempts() + financialAccountToken() + type() verificationMethod() + ownerType() + state() verificationState() + address().map { it.validate() } validated = true } } @@ -270,28 +274,28 @@ private constructor( } return other is ExternalBankAccountListResponse && - this.accountToken == other.accountToken && - this.address == other.address && - this.companyId == other.companyId && + this.token == other.token && + this.owner == other.owner && + this.routingNumber == other.routingNumber && + this.lastFour == other.lastFour && + this.name == other.name && + this.currency == other.currency && this.country == other.country && + this.accountToken == other.accountToken && this.created == other.created && - this.currency == other.currency && + this.companyId == other.companyId && this.dob == other.dob && this.doingBusinessAs == other.doingBusinessAs && - this.lastFour == other.lastFour && - this.name == other.name && - this.financialAccountToken == other.financialAccountToken && - this.owner == other.owner && - this.ownerType == other.ownerType && - this.routingNumber == other.routingNumber && - this.state == other.state && - this.token == other.token && - this.type == other.type && this.userDefinedId == other.userDefinedId && - this.verificationAttempts == other.verificationAttempts && this.verificationFailedReason == other.verificationFailedReason && + this.verificationAttempts == other.verificationAttempts && + this.financialAccountToken == other.financialAccountToken && + this.type == other.type && this.verificationMethod == other.verificationMethod && + this.ownerType == other.ownerType && + this.state == other.state && this.verificationState == other.verificationState && + this.address == other.address && this.additionalProperties == other.additionalProperties } @@ -299,28 +303,28 @@ private constructor( if (hashCode == 0) { hashCode = Objects.hash( - accountToken, - address, - companyId, + token, + owner, + routingNumber, + lastFour, + name, + currency, country, + accountToken, created, - currency, + companyId, dob, doingBusinessAs, - lastFour, - name, - financialAccountToken, - owner, - ownerType, - routingNumber, - state, - token, - type, userDefinedId, - verificationAttempts, verificationFailedReason, + verificationAttempts, + financialAccountToken, + type, verificationMethod, + ownerType, + state, verificationState, + address, additionalProperties, ) } @@ -328,7 +332,7 @@ private constructor( } override fun toString() = - "ExternalBankAccountListResponse{accountToken=$accountToken, address=$address, companyId=$companyId, country=$country, created=$created, currency=$currency, dob=$dob, doingBusinessAs=$doingBusinessAs, lastFour=$lastFour, name=$name, financialAccountToken=$financialAccountToken, owner=$owner, ownerType=$ownerType, routingNumber=$routingNumber, state=$state, token=$token, type=$type, userDefinedId=$userDefinedId, verificationAttempts=$verificationAttempts, verificationFailedReason=$verificationFailedReason, verificationMethod=$verificationMethod, verificationState=$verificationState, additionalProperties=$additionalProperties}" + "ExternalBankAccountListResponse{token=$token, owner=$owner, routingNumber=$routingNumber, lastFour=$lastFour, name=$name, currency=$currency, country=$country, accountToken=$accountToken, created=$created, companyId=$companyId, dob=$dob, doingBusinessAs=$doingBusinessAs, userDefinedId=$userDefinedId, verificationFailedReason=$verificationFailedReason, verificationAttempts=$verificationAttempts, financialAccountToken=$financialAccountToken, type=$type, verificationMethod=$verificationMethod, ownerType=$ownerType, state=$state, verificationState=$verificationState, address=$address, additionalProperties=$additionalProperties}" companion object { @@ -337,148 +341,97 @@ private constructor( class Builder { - private var accountToken: JsonField = JsonMissing.of() - private var address: JsonField = JsonMissing.of() - private var companyId: JsonField = JsonMissing.of() + private var token: JsonField = JsonMissing.of() + private var owner: JsonField = JsonMissing.of() + private var routingNumber: JsonField = JsonMissing.of() + private var lastFour: JsonField = JsonMissing.of() + private var name: JsonField = JsonMissing.of() + private var currency: JsonField = JsonMissing.of() private var country: JsonField = JsonMissing.of() + private var accountToken: JsonField = JsonMissing.of() private var created: JsonField = JsonMissing.of() - private var currency: JsonField = JsonMissing.of() + private var companyId: JsonField = JsonMissing.of() private var dob: JsonField = JsonMissing.of() private var doingBusinessAs: JsonField = JsonMissing.of() - private var lastFour: JsonField = JsonMissing.of() - private var name: JsonField = JsonMissing.of() - private var financialAccountToken: JsonField = JsonMissing.of() - private var owner: JsonField = JsonMissing.of() - private var ownerType: JsonField = JsonMissing.of() - private var routingNumber: JsonField = JsonMissing.of() - private var state: JsonField = JsonMissing.of() - private var token: JsonField = JsonMissing.of() - private var type: JsonField = JsonMissing.of() private var userDefinedId: JsonField = JsonMissing.of() - private var verificationAttempts: JsonField = JsonMissing.of() private var verificationFailedReason: JsonField = JsonMissing.of() + private var verificationAttempts: JsonField = JsonMissing.of() + private var financialAccountToken: JsonField = JsonMissing.of() + private var type: JsonField = JsonMissing.of() private var verificationMethod: JsonField = JsonMissing.of() + private var ownerType: JsonField = JsonMissing.of() + private var state: JsonField = JsonMissing.of() private var verificationState: JsonField = JsonMissing.of() + private var address: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(externalBankAccountListResponse: ExternalBankAccountListResponse) = apply { - this.accountToken = externalBankAccountListResponse.accountToken - this.address = externalBankAccountListResponse.address - this.companyId = externalBankAccountListResponse.companyId + this.token = externalBankAccountListResponse.token + this.owner = externalBankAccountListResponse.owner + this.routingNumber = externalBankAccountListResponse.routingNumber + this.lastFour = externalBankAccountListResponse.lastFour + this.name = externalBankAccountListResponse.name + this.currency = externalBankAccountListResponse.currency this.country = externalBankAccountListResponse.country + this.accountToken = externalBankAccountListResponse.accountToken this.created = externalBankAccountListResponse.created - this.currency = externalBankAccountListResponse.currency + this.companyId = externalBankAccountListResponse.companyId this.dob = externalBankAccountListResponse.dob this.doingBusinessAs = externalBankAccountListResponse.doingBusinessAs - this.lastFour = externalBankAccountListResponse.lastFour - this.name = externalBankAccountListResponse.name - this.financialAccountToken = externalBankAccountListResponse.financialAccountToken - this.owner = externalBankAccountListResponse.owner - this.ownerType = externalBankAccountListResponse.ownerType - this.routingNumber = externalBankAccountListResponse.routingNumber - this.state = externalBankAccountListResponse.state - this.token = externalBankAccountListResponse.token - this.type = externalBankAccountListResponse.type this.userDefinedId = externalBankAccountListResponse.userDefinedId - this.verificationAttempts = externalBankAccountListResponse.verificationAttempts this.verificationFailedReason = externalBankAccountListResponse.verificationFailedReason + this.verificationAttempts = externalBankAccountListResponse.verificationAttempts + this.financialAccountToken = externalBankAccountListResponse.financialAccountToken + this.type = externalBankAccountListResponse.type this.verificationMethod = externalBankAccountListResponse.verificationMethod + this.ownerType = externalBankAccountListResponse.ownerType + this.state = externalBankAccountListResponse.state this.verificationState = externalBankAccountListResponse.verificationState - additionalProperties(externalBankAccountListResponse.additionalProperties) - } - - /** - * Indicates which Lithic account the external account is associated with. For external - * accounts that are associated with the program, account_token field returned will be null - */ - fun accountToken(accountToken: String) = accountToken(JsonField.of(accountToken)) - - /** - * Indicates which Lithic account the external account is associated with. For external - * accounts that are associated with the program, account_token field returned will be null - */ - @JsonProperty("account_token") - @ExcludeMissing - fun accountToken(accountToken: JsonField) = apply { - this.accountToken = accountToken - } - - /** - * Address used during Address Verification Service (AVS) checks during transactions if - * enabled via Auth Rules. - */ - fun address(address: ExternalBankAccountAddress) = address(JsonField.of(address)) - - /** - * Address used during Address Verification Service (AVS) checks during transactions if - * enabled via Auth Rules. - */ - @JsonProperty("address") - @ExcludeMissing - fun address(address: JsonField) = apply { - this.address = address - } - - /** Optional field that helps identify bank accounts in receipts */ - fun companyId(companyId: String) = companyId(JsonField.of(companyId)) - - /** Optional field that helps identify bank accounts in receipts */ - @JsonProperty("company_id") - @ExcludeMissing - fun companyId(companyId: JsonField) = apply { this.companyId = companyId } + this.address = externalBankAccountListResponse.address + additionalProperties(externalBankAccountListResponse.additionalProperties) + } /** - * The country that the bank account is located in using ISO 3166-1. We will only accept USA - * bank accounts e.g., USA + * A globally unique identifier for this record of an external bank account association. If + * a program links an external bank account to more than one end-user or to both the program + * and the end-user, then Lithic will return each record of the association */ - fun country(country: String) = country(JsonField.of(country)) + fun token(token: String) = token(JsonField.of(token)) /** - * The country that the bank account is located in using ISO 3166-1. We will only accept USA - * bank accounts e.g., USA + * A globally unique identifier for this record of an external bank account association. If + * a program links an external bank account to more than one end-user or to both the program + * and the end-user, then Lithic will return each record of the association */ - @JsonProperty("country") + @JsonProperty("token") @ExcludeMissing - fun country(country: JsonField) = apply { this.country = country } + fun token(token: JsonField) = apply { this.token = token } /** - * An ISO 8601 string representing when this funding source was added to the Lithic account. + * Legal Name of the business or individual who owns the external account. This will appear + * in statements */ - fun created(created: OffsetDateTime) = created(JsonField.of(created)) + fun owner(owner: String) = owner(JsonField.of(owner)) /** - * An ISO 8601 string representing when this funding source was added to the Lithic account. + * Legal Name of the business or individual who owns the external account. This will appear + * in statements */ - @JsonProperty("created") - @ExcludeMissing - fun created(created: JsonField) = apply { this.created = created } - - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - fun currency(currency: String) = currency(JsonField.of(currency)) - - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - @JsonProperty("currency") - @ExcludeMissing - fun currency(currency: JsonField) = apply { this.currency = currency } - - /** Date of Birth of the Individual that owns the external bank account */ - fun dob(dob: LocalDate) = dob(JsonField.of(dob)) - - /** Date of Birth of the Individual that owns the external bank account */ - @JsonProperty("dob") + @JsonProperty("owner") @ExcludeMissing - fun dob(dob: JsonField) = apply { this.dob = dob } + fun owner(owner: JsonField) = apply { this.owner = owner } - fun doingBusinessAs(doingBusinessAs: String) = - doingBusinessAs(JsonField.of(doingBusinessAs)) + /** Routing Number */ + fun routingNumber(routingNumber: String) = routingNumber(JsonField.of(routingNumber)) - @JsonProperty("doing_business_as") + /** Routing Number */ + @JsonProperty("routing_number") @ExcludeMissing - fun doingBusinessAs(doingBusinessAs: JsonField) = apply { - this.doingBusinessAs = doingBusinessAs + fun routingNumber(routingNumber: JsonField) = apply { + this.routingNumber = routingNumber } /** @@ -501,98 +454,93 @@ private constructor( @ExcludeMissing fun name(name: JsonField) = apply { this.name = name } + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + fun currency(currency: String) = currency(JsonField.of(currency)) + + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + @JsonProperty("currency") + @ExcludeMissing + fun currency(currency: JsonField) = apply { this.currency = currency } + /** - * The financial account token of the operating account, which will provide the funds for - * micro deposits used to verify the account + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - fun financialAccountToken(financialAccountToken: String) = - financialAccountToken(JsonField.of(financialAccountToken)) + fun country(country: String) = country(JsonField.of(country)) /** - * The financial account token of the operating account, which will provide the funds for - * micro deposits used to verify the account + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - @JsonProperty("financial_account_token") + @JsonProperty("country") @ExcludeMissing - fun financialAccountToken(financialAccountToken: JsonField) = apply { - this.financialAccountToken = financialAccountToken - } + fun country(country: JsonField) = apply { this.country = country } /** - * Legal Name of the business or individual who owns the external account. This will appear - * in statements + * Indicates which Lithic account the external account is associated with. For external + * accounts that are associated with the program, account_token field returned will be null */ - fun owner(owner: String) = owner(JsonField.of(owner)) + fun accountToken(accountToken: String) = accountToken(JsonField.of(accountToken)) /** - * Legal Name of the business or individual who owns the external account. This will appear - * in statements + * Indicates which Lithic account the external account is associated with. For external + * accounts that are associated with the program, account_token field returned will be null */ - @JsonProperty("owner") - @ExcludeMissing - fun owner(owner: JsonField) = apply { this.owner = owner } - - fun ownerType(ownerType: OwnerType) = ownerType(JsonField.of(ownerType)) - - @JsonProperty("owner_type") + @JsonProperty("account_token") @ExcludeMissing - fun ownerType(ownerType: JsonField) = apply { this.ownerType = ownerType } + fun accountToken(accountToken: JsonField) = apply { + this.accountToken = accountToken + } - fun routingNumber(routingNumber: String) = routingNumber(JsonField.of(routingNumber)) + /** + * An ISO 8601 string representing when this funding source was added to the Lithic account. + */ + fun created(created: OffsetDateTime) = created(JsonField.of(created)) - @JsonProperty("routing_number") + /** + * An ISO 8601 string representing when this funding source was added to the Lithic account. + */ + @JsonProperty("created") @ExcludeMissing - fun routingNumber(routingNumber: JsonField) = apply { - this.routingNumber = routingNumber - } + fun created(created: JsonField) = apply { this.created = created } - fun state(state: State) = state(JsonField.of(state)) + /** Optional field that helps identify bank accounts in receipts */ + fun companyId(companyId: String) = companyId(JsonField.of(companyId)) - @JsonProperty("state") + /** Optional field that helps identify bank accounts in receipts */ + @JsonProperty("company_id") @ExcludeMissing - fun state(state: JsonField) = apply { this.state = state } + fun companyId(companyId: JsonField) = apply { this.companyId = companyId } - /** - * A globally unique identifier for this record of an external bank account association. If - * a program links an external bank account to more than one end-user or to both the program - * and the end-user, then Lithic will return each record of the association - */ - fun token(token: String) = token(JsonField.of(token)) + /** Date of Birth of the Individual that owns the external bank account */ + fun dob(dob: LocalDate) = dob(JsonField.of(dob)) - /** - * A globally unique identifier for this record of an external bank account association. If - * a program links an external bank account to more than one end-user or to both the program - * and the end-user, then Lithic will return each record of the association - */ - @JsonProperty("token") + /** Date of Birth of the Individual that owns the external bank account */ + @JsonProperty("dob") @ExcludeMissing - fun token(token: JsonField) = apply { this.token = token } + fun dob(dob: JsonField) = apply { this.dob = dob } - fun type(type: Type) = type(JsonField.of(type)) + /** Doing Business As */ + fun doingBusinessAs(doingBusinessAs: String) = + doingBusinessAs(JsonField.of(doingBusinessAs)) - @JsonProperty("type") + /** Doing Business As */ + @JsonProperty("doing_business_as") @ExcludeMissing - fun type(type: JsonField) = apply { this.type = type } + fun doingBusinessAs(doingBusinessAs: JsonField) = apply { + this.doingBusinessAs = doingBusinessAs + } + /** User Defined ID */ fun userDefinedId(userDefinedId: String) = userDefinedId(JsonField.of(userDefinedId)) + /** User Defined ID */ @JsonProperty("user_defined_id") @ExcludeMissing fun userDefinedId(userDefinedId: JsonField) = apply { this.userDefinedId = userDefinedId } - /** The number of attempts at verification */ - fun verificationAttempts(verificationAttempts: Long) = - verificationAttempts(JsonField.of(verificationAttempts)) - - /** The number of attempts at verification */ - @JsonProperty("verification_attempts") - @ExcludeMissing - fun verificationAttempts(verificationAttempts: JsonField) = apply { - this.verificationAttempts = verificationAttempts - } - /** * Optional free text description of the reason for the failed verification. For ACH * micro-deposits returned, this field will display the reason return code sent by the ACH @@ -612,24 +560,84 @@ private constructor( this.verificationFailedReason = verificationFailedReason } + /** The number of attempts at verification */ + fun verificationAttempts(verificationAttempts: Long) = + verificationAttempts(JsonField.of(verificationAttempts)) + + /** The number of attempts at verification */ + @JsonProperty("verification_attempts") + @ExcludeMissing + fun verificationAttempts(verificationAttempts: JsonField) = apply { + this.verificationAttempts = verificationAttempts + } + + /** The financial account token of the operating account to fund the micro deposits */ + fun financialAccountToken(financialAccountToken: String) = + financialAccountToken(JsonField.of(financialAccountToken)) + + /** The financial account token of the operating account to fund the micro deposits */ + @JsonProperty("financial_account_token") + @ExcludeMissing + fun financialAccountToken(financialAccountToken: JsonField) = apply { + this.financialAccountToken = financialAccountToken + } + + /** Account Type */ + fun type(type: Type) = type(JsonField.of(type)) + + /** Account Type */ + @JsonProperty("type") + @ExcludeMissing + fun type(type: JsonField) = apply { this.type = type } + + /** Verification Method */ fun verificationMethod(verificationMethod: VerificationMethod) = verificationMethod(JsonField.of(verificationMethod)) + /** Verification Method */ @JsonProperty("verification_method") @ExcludeMissing fun verificationMethod(verificationMethod: JsonField) = apply { this.verificationMethod = verificationMethod } + /** Owner Type */ + fun ownerType(ownerType: OwnerType) = ownerType(JsonField.of(ownerType)) + + /** Owner Type */ + @JsonProperty("owner_type") + @ExcludeMissing + fun ownerType(ownerType: JsonField) = apply { this.ownerType = ownerType } + + /** Account State */ + fun state(state: State) = state(JsonField.of(state)) + + /** Account State */ + @JsonProperty("state") + @ExcludeMissing + fun state(state: JsonField) = apply { this.state = state } + + /** Verification State */ fun verificationState(verificationState: VerificationState) = verificationState(JsonField.of(verificationState)) + /** Verification State */ @JsonProperty("verification_state") @ExcludeMissing fun verificationState(verificationState: JsonField) = apply { this.verificationState = verificationState } + /** Address */ + fun address(address: ExternalBankAccountAddress) = address(JsonField.of(address)) + + /** Address */ + @JsonProperty("address") + @ExcludeMissing + fun address(address: JsonField) = apply { + this.address = address + } + fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() this.additionalProperties.putAll(additionalProperties) @@ -646,28 +654,28 @@ private constructor( fun build(): ExternalBankAccountListResponse = ExternalBankAccountListResponse( - accountToken, - address, - companyId, + token, + owner, + routingNumber, + lastFour, + name, + currency, country, + accountToken, created, - currency, + companyId, dob, doingBusinessAs, - lastFour, - name, - financialAccountToken, - owner, - ownerType, - routingNumber, - state, - token, - type, userDefinedId, - verificationAttempts, verificationFailedReason, + verificationAttempts, + financialAccountToken, + type, verificationMethod, + ownerType, + state, verificationState, + address, additionalProperties.toUnmodifiable(), ) } @@ -751,40 +759,40 @@ private constructor( companion object { - @JvmField val CLOSED = State(JsonField.of("CLOSED")) - @JvmField val ENABLED = State(JsonField.of("ENABLED")) + @JvmField val CLOSED = State(JsonField.of("CLOSED")) + @JvmField val PAUSED = State(JsonField.of("PAUSED")) @JvmStatic fun of(value: String) = State(JsonField.of(value)) } enum class Known { - CLOSED, ENABLED, + CLOSED, PAUSED, } enum class Value { - CLOSED, ENABLED, + CLOSED, PAUSED, _UNKNOWN, } fun value(): Value = when (this) { - CLOSED -> Value.CLOSED ENABLED -> Value.ENABLED + CLOSED -> Value.CLOSED PAUSED -> Value.PAUSED else -> Value._UNKNOWN } fun known(): Known = when (this) { - CLOSED -> Known.CLOSED ENABLED -> Known.ENABLED + CLOSED -> Known.CLOSED PAUSED -> Known.PAUSED else -> throw LithicInvalidDataException("Unknown State: $value") } @@ -940,6 +948,8 @@ private constructor( companion object { + @JvmField val PENDING = VerificationState(JsonField.of("PENDING")) + @JvmField val ENABLED = VerificationState(JsonField.of("ENABLED")) @JvmField @@ -947,41 +957,39 @@ private constructor( @JvmField val INSUFFICIENT_FUNDS = VerificationState(JsonField.of("INSUFFICIENT_FUNDS")) - @JvmField val PENDING = VerificationState(JsonField.of("PENDING")) - @JvmStatic fun of(value: String) = VerificationState(JsonField.of(value)) } enum class Known { + PENDING, ENABLED, FAILED_VERIFICATION, INSUFFICIENT_FUNDS, - PENDING, } enum class Value { + PENDING, ENABLED, FAILED_VERIFICATION, INSUFFICIENT_FUNDS, - PENDING, _UNKNOWN, } fun value(): Value = when (this) { + PENDING -> Value.PENDING ENABLED -> Value.ENABLED FAILED_VERIFICATION -> Value.FAILED_VERIFICATION INSUFFICIENT_FUNDS -> Value.INSUFFICIENT_FUNDS - PENDING -> Value.PENDING else -> Value._UNKNOWN } fun known(): Known = when (this) { + PENDING -> Known.PENDING ENABLED -> Known.ENABLED FAILED_VERIFICATION -> Known.FAILED_VERIFICATION INSUFFICIENT_FUNDS -> Known.INSUFFICIENT_FUNDS - PENDING -> Known.PENDING else -> throw LithicInvalidDataException("Unknown VerificationState: $value") } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponse.kt index 492eaad2..19d5be97 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponse.kt @@ -24,28 +24,28 @@ import java.util.Optional @NoAutoDetect class ExternalBankAccountRetrieveResponse private constructor( - private val accountToken: JsonField, - private val address: JsonField, - private val companyId: JsonField, + private val token: JsonField, + private val owner: JsonField, + private val routingNumber: JsonField, + private val lastFour: JsonField, + private val name: JsonField, + private val currency: JsonField, private val country: JsonField, + private val accountToken: JsonField, private val created: JsonField, - private val currency: JsonField, + private val companyId: JsonField, private val dob: JsonField, private val doingBusinessAs: JsonField, - private val lastFour: JsonField, - private val name: JsonField, - private val financialAccountToken: JsonField, - private val owner: JsonField, - private val ownerType: JsonField, - private val routingNumber: JsonField, - private val state: JsonField, - private val token: JsonField, - private val type: JsonField, private val userDefinedId: JsonField, - private val verificationAttempts: JsonField, private val verificationFailedReason: JsonField, + private val verificationAttempts: JsonField, + private val financialAccountToken: JsonField, + private val type: JsonField, private val verificationMethod: JsonField, + private val ownerType: JsonField, + private val state: JsonField, private val verificationState: JsonField, + private val address: JsonField, private val additionalProperties: Map, ) { @@ -54,39 +54,20 @@ private constructor( private var hashCode: Int = 0 /** - * Indicates which Lithic account the external account is associated with. For external accounts - * that are associated with the program, account_token field returned will be null - */ - fun accountToken(): Optional = - Optional.ofNullable(accountToken.getNullable("account_token")) - - /** - * Address used during Address Verification Service (AVS) checks during transactions if enabled - * via Auth Rules. + * A globally unique identifier for this record of an external bank account association. If a + * program links an external bank account to more than one end-user or to both the program and + * the end-user, then Lithic will return each record of the association */ - fun address(): Optional = - Optional.ofNullable(address.getNullable("address")) - - /** Optional field that helps identify bank accounts in receipts */ - fun companyId(): Optional = Optional.ofNullable(companyId.getNullable("company_id")) + fun token(): String = token.getRequired("token") /** - * The country that the bank account is located in using ISO 3166-1. We will only accept USA - * bank accounts e.g., USA + * Legal Name of the business or individual who owns the external account. This will appear in + * statements */ - fun country(): String = country.getRequired("country") - - /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ - fun created(): OffsetDateTime = created.getRequired("created") - - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - fun currency(): String = currency.getRequired("currency") - - /** Date of Birth of the Individual that owns the external bank account */ - fun dob(): Optional = Optional.ofNullable(dob.getNullable("dob")) + fun owner(): String = owner.getRequired("owner") - fun doingBusinessAs(): Optional = - Optional.ofNullable(doingBusinessAs.getNullable("doing_business_as")) + /** Routing Number */ + fun routingNumber(): String = routingNumber.getRequired("routing_number") /** The last 4 digits of the bank account. Derived by Lithic from the account number passed */ fun lastFour(): String = lastFour.getRequired("last_four") @@ -94,40 +75,39 @@ private constructor( /** The nickname given to this record of External Bank Account */ fun name(): Optional = Optional.ofNullable(name.getNullable("name")) + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + fun currency(): String = currency.getRequired("currency") + /** - * The financial account token of the operating account, which will provide the funds for micro - * deposits used to verify the account + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - fun financialAccountToken(): Optional = - Optional.ofNullable(financialAccountToken.getNullable("financial_account_token")) + fun country(): String = country.getRequired("country") /** - * Legal Name of the business or individual who owns the external account. This will appear in - * statements + * Indicates which Lithic account the external account is associated with. For external accounts + * that are associated with the program, account_token field returned will be null */ - fun owner(): String = owner.getRequired("owner") - - fun ownerType(): OwnerType = ownerType.getRequired("owner_type") + fun accountToken(): Optional = + Optional.ofNullable(accountToken.getNullable("account_token")) - fun routingNumber(): String = routingNumber.getRequired("routing_number") + /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ + fun created(): OffsetDateTime = created.getRequired("created") - fun state(): State = state.getRequired("state") + /** Optional field that helps identify bank accounts in receipts */ + fun companyId(): Optional = Optional.ofNullable(companyId.getNullable("company_id")) - /** - * A globally unique identifier for this record of an external bank account association. If a - * program links an external bank account to more than one end-user or to both the program and - * the end-user, then Lithic will return each record of the association - */ - fun token(): String = token.getRequired("token") + /** Date of Birth of the Individual that owns the external bank account */ + fun dob(): Optional = Optional.ofNullable(dob.getNullable("dob")) - fun type(): Type = type.getRequired("type") + /** Doing Business As */ + fun doingBusinessAs(): Optional = + Optional.ofNullable(doingBusinessAs.getNullable("doing_business_as")) + /** User Defined ID */ fun userDefinedId(): Optional = Optional.ofNullable(userDefinedId.getNullable("user_defined_id")) - /** The number of attempts at verification */ - fun verificationAttempts(): Long = verificationAttempts.getRequired("verification_attempts") - /** * Optional free text description of the reason for the failed verification. For ACH * micro-deposits returned, this field will display the reason return code sent by the ACH @@ -136,42 +116,48 @@ private constructor( fun verificationFailedReason(): Optional = Optional.ofNullable(verificationFailedReason.getNullable("verification_failed_reason")) + /** The number of attempts at verification */ + fun verificationAttempts(): Long = verificationAttempts.getRequired("verification_attempts") + + /** The financial account token of the operating account to fund the micro deposits */ + fun financialAccountToken(): Optional = + Optional.ofNullable(financialAccountToken.getNullable("financial_account_token")) + + /** Account Type */ + fun type(): Type = type.getRequired("type") + + /** Verification Method */ fun verificationMethod(): VerificationMethod = verificationMethod.getRequired("verification_method") + /** Owner Type */ + fun ownerType(): OwnerType = ownerType.getRequired("owner_type") + + /** Account State */ + fun state(): State = state.getRequired("state") + + /** Verification State */ fun verificationState(): VerificationState = verificationState.getRequired("verification_state") - /** - * Indicates which Lithic account the external account is associated with. For external accounts - * that are associated with the program, account_token field returned will be null - */ - @JsonProperty("account_token") @ExcludeMissing fun _accountToken() = accountToken + /** Address */ + fun address(): Optional = + Optional.ofNullable(address.getNullable("address")) /** - * Address used during Address Verification Service (AVS) checks during transactions if enabled - * via Auth Rules. + * A globally unique identifier for this record of an external bank account association. If a + * program links an external bank account to more than one end-user or to both the program and + * the end-user, then Lithic will return each record of the association */ - @JsonProperty("address") @ExcludeMissing fun _address() = address - - /** Optional field that helps identify bank accounts in receipts */ - @JsonProperty("company_id") @ExcludeMissing fun _companyId() = companyId + @JsonProperty("token") @ExcludeMissing fun _token() = token /** - * The country that the bank account is located in using ISO 3166-1. We will only accept USA - * bank accounts e.g., USA + * Legal Name of the business or individual who owns the external account. This will appear in + * statements */ - @JsonProperty("country") @ExcludeMissing fun _country() = country - - /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ - @JsonProperty("created") @ExcludeMissing fun _created() = created - - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - @JsonProperty("currency") @ExcludeMissing fun _currency() = currency - - /** Date of Birth of the Individual that owns the external bank account */ - @JsonProperty("dob") @ExcludeMissing fun _dob() = dob + @JsonProperty("owner") @ExcludeMissing fun _owner() = owner - @JsonProperty("doing_business_as") @ExcludeMissing fun _doingBusinessAs() = doingBusinessAs + /** Routing Number */ + @JsonProperty("routing_number") @ExcludeMissing fun _routingNumber() = routingNumber /** The last 4 digits of the bank account. Derived by Lithic from the account number passed */ @JsonProperty("last_four") @ExcludeMissing fun _lastFour() = lastFour @@ -179,42 +165,36 @@ private constructor( /** The nickname given to this record of External Bank Account */ @JsonProperty("name") @ExcludeMissing fun _name() = name + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + @JsonProperty("currency") @ExcludeMissing fun _currency() = currency + /** - * The financial account token of the operating account, which will provide the funds for micro - * deposits used to verify the account + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - @JsonProperty("financial_account_token") - @ExcludeMissing - fun _financialAccountToken() = financialAccountToken + @JsonProperty("country") @ExcludeMissing fun _country() = country /** - * Legal Name of the business or individual who owns the external account. This will appear in - * statements + * Indicates which Lithic account the external account is associated with. For external accounts + * that are associated with the program, account_token field returned will be null */ - @JsonProperty("owner") @ExcludeMissing fun _owner() = owner - - @JsonProperty("owner_type") @ExcludeMissing fun _ownerType() = ownerType + @JsonProperty("account_token") @ExcludeMissing fun _accountToken() = accountToken - @JsonProperty("routing_number") @ExcludeMissing fun _routingNumber() = routingNumber + /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ + @JsonProperty("created") @ExcludeMissing fun _created() = created - @JsonProperty("state") @ExcludeMissing fun _state() = state + /** Optional field that helps identify bank accounts in receipts */ + @JsonProperty("company_id") @ExcludeMissing fun _companyId() = companyId - /** - * A globally unique identifier for this record of an external bank account association. If a - * program links an external bank account to more than one end-user or to both the program and - * the end-user, then Lithic will return each record of the association - */ - @JsonProperty("token") @ExcludeMissing fun _token() = token + /** Date of Birth of the Individual that owns the external bank account */ + @JsonProperty("dob") @ExcludeMissing fun _dob() = dob - @JsonProperty("type") @ExcludeMissing fun _type() = type + /** Doing Business As */ + @JsonProperty("doing_business_as") @ExcludeMissing fun _doingBusinessAs() = doingBusinessAs + /** User Defined ID */ @JsonProperty("user_defined_id") @ExcludeMissing fun _userDefinedId() = userDefinedId - /** The number of attempts at verification */ - @JsonProperty("verification_attempts") - @ExcludeMissing - fun _verificationAttempts() = verificationAttempts - /** * Optional free text description of the reason for the failed verification. For ACH * micro-deposits returned, this field will display the reason return code sent by the ACH @@ -224,40 +204,64 @@ private constructor( @ExcludeMissing fun _verificationFailedReason() = verificationFailedReason + /** The number of attempts at verification */ + @JsonProperty("verification_attempts") + @ExcludeMissing + fun _verificationAttempts() = verificationAttempts + + /** The financial account token of the operating account to fund the micro deposits */ + @JsonProperty("financial_account_token") + @ExcludeMissing + fun _financialAccountToken() = financialAccountToken + + /** Account Type */ + @JsonProperty("type") @ExcludeMissing fun _type() = type + + /** Verification Method */ @JsonProperty("verification_method") @ExcludeMissing fun _verificationMethod() = verificationMethod + /** Owner Type */ + @JsonProperty("owner_type") @ExcludeMissing fun _ownerType() = ownerType + + /** Account State */ + @JsonProperty("state") @ExcludeMissing fun _state() = state + + /** Verification State */ @JsonProperty("verification_state") @ExcludeMissing fun _verificationState() = verificationState + /** Address */ + @JsonProperty("address") @ExcludeMissing fun _address() = address + @JsonAnyGetter @ExcludeMissing fun _additionalProperties(): Map = additionalProperties fun validate(): ExternalBankAccountRetrieveResponse = apply { if (!validated) { - accountToken() - address().map { it.validate() } - companyId() + token() + owner() + routingNumber() + lastFour() + name() + currency() country() + accountToken() created() - currency() + companyId() dob() doingBusinessAs() - lastFour() - name() - financialAccountToken() - owner() - ownerType() - routingNumber() - state() - token() - type() userDefinedId() - verificationAttempts() verificationFailedReason() + verificationAttempts() + financialAccountToken() + type() verificationMethod() + ownerType() + state() verificationState() + address().map { it.validate() } validated = true } } @@ -270,28 +274,28 @@ private constructor( } return other is ExternalBankAccountRetrieveResponse && - this.accountToken == other.accountToken && - this.address == other.address && - this.companyId == other.companyId && + this.token == other.token && + this.owner == other.owner && + this.routingNumber == other.routingNumber && + this.lastFour == other.lastFour && + this.name == other.name && + this.currency == other.currency && this.country == other.country && + this.accountToken == other.accountToken && this.created == other.created && - this.currency == other.currency && + this.companyId == other.companyId && this.dob == other.dob && this.doingBusinessAs == other.doingBusinessAs && - this.lastFour == other.lastFour && - this.name == other.name && - this.financialAccountToken == other.financialAccountToken && - this.owner == other.owner && - this.ownerType == other.ownerType && - this.routingNumber == other.routingNumber && - this.state == other.state && - this.token == other.token && - this.type == other.type && this.userDefinedId == other.userDefinedId && - this.verificationAttempts == other.verificationAttempts && this.verificationFailedReason == other.verificationFailedReason && + this.verificationAttempts == other.verificationAttempts && + this.financialAccountToken == other.financialAccountToken && + this.type == other.type && this.verificationMethod == other.verificationMethod && + this.ownerType == other.ownerType && + this.state == other.state && this.verificationState == other.verificationState && + this.address == other.address && this.additionalProperties == other.additionalProperties } @@ -299,28 +303,28 @@ private constructor( if (hashCode == 0) { hashCode = Objects.hash( - accountToken, - address, - companyId, + token, + owner, + routingNumber, + lastFour, + name, + currency, country, + accountToken, created, - currency, + companyId, dob, doingBusinessAs, - lastFour, - name, - financialAccountToken, - owner, - ownerType, - routingNumber, - state, - token, - type, userDefinedId, - verificationAttempts, verificationFailedReason, + verificationAttempts, + financialAccountToken, + type, verificationMethod, + ownerType, + state, verificationState, + address, additionalProperties, ) } @@ -328,7 +332,7 @@ private constructor( } override fun toString() = - "ExternalBankAccountRetrieveResponse{accountToken=$accountToken, address=$address, companyId=$companyId, country=$country, created=$created, currency=$currency, dob=$dob, doingBusinessAs=$doingBusinessAs, lastFour=$lastFour, name=$name, financialAccountToken=$financialAccountToken, owner=$owner, ownerType=$ownerType, routingNumber=$routingNumber, state=$state, token=$token, type=$type, userDefinedId=$userDefinedId, verificationAttempts=$verificationAttempts, verificationFailedReason=$verificationFailedReason, verificationMethod=$verificationMethod, verificationState=$verificationState, additionalProperties=$additionalProperties}" + "ExternalBankAccountRetrieveResponse{token=$token, owner=$owner, routingNumber=$routingNumber, lastFour=$lastFour, name=$name, currency=$currency, country=$country, accountToken=$accountToken, created=$created, companyId=$companyId, dob=$dob, doingBusinessAs=$doingBusinessAs, userDefinedId=$userDefinedId, verificationFailedReason=$verificationFailedReason, verificationAttempts=$verificationAttempts, financialAccountToken=$financialAccountToken, type=$type, verificationMethod=$verificationMethod, ownerType=$ownerType, state=$state, verificationState=$verificationState, address=$address, additionalProperties=$additionalProperties}" companion object { @@ -337,149 +341,98 @@ private constructor( class Builder { - private var accountToken: JsonField = JsonMissing.of() - private var address: JsonField = JsonMissing.of() - private var companyId: JsonField = JsonMissing.of() + private var token: JsonField = JsonMissing.of() + private var owner: JsonField = JsonMissing.of() + private var routingNumber: JsonField = JsonMissing.of() + private var lastFour: JsonField = JsonMissing.of() + private var name: JsonField = JsonMissing.of() + private var currency: JsonField = JsonMissing.of() private var country: JsonField = JsonMissing.of() + private var accountToken: JsonField = JsonMissing.of() private var created: JsonField = JsonMissing.of() - private var currency: JsonField = JsonMissing.of() + private var companyId: JsonField = JsonMissing.of() private var dob: JsonField = JsonMissing.of() private var doingBusinessAs: JsonField = JsonMissing.of() - private var lastFour: JsonField = JsonMissing.of() - private var name: JsonField = JsonMissing.of() - private var financialAccountToken: JsonField = JsonMissing.of() - private var owner: JsonField = JsonMissing.of() - private var ownerType: JsonField = JsonMissing.of() - private var routingNumber: JsonField = JsonMissing.of() - private var state: JsonField = JsonMissing.of() - private var token: JsonField = JsonMissing.of() - private var type: JsonField = JsonMissing.of() private var userDefinedId: JsonField = JsonMissing.of() - private var verificationAttempts: JsonField = JsonMissing.of() private var verificationFailedReason: JsonField = JsonMissing.of() + private var verificationAttempts: JsonField = JsonMissing.of() + private var financialAccountToken: JsonField = JsonMissing.of() + private var type: JsonField = JsonMissing.of() private var verificationMethod: JsonField = JsonMissing.of() + private var ownerType: JsonField = JsonMissing.of() + private var state: JsonField = JsonMissing.of() private var verificationState: JsonField = JsonMissing.of() + private var address: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from( externalBankAccountRetrieveResponse: ExternalBankAccountRetrieveResponse ) = apply { - this.accountToken = externalBankAccountRetrieveResponse.accountToken - this.address = externalBankAccountRetrieveResponse.address - this.companyId = externalBankAccountRetrieveResponse.companyId + this.token = externalBankAccountRetrieveResponse.token + this.owner = externalBankAccountRetrieveResponse.owner + this.routingNumber = externalBankAccountRetrieveResponse.routingNumber + this.lastFour = externalBankAccountRetrieveResponse.lastFour + this.name = externalBankAccountRetrieveResponse.name + this.currency = externalBankAccountRetrieveResponse.currency this.country = externalBankAccountRetrieveResponse.country + this.accountToken = externalBankAccountRetrieveResponse.accountToken this.created = externalBankAccountRetrieveResponse.created - this.currency = externalBankAccountRetrieveResponse.currency + this.companyId = externalBankAccountRetrieveResponse.companyId this.dob = externalBankAccountRetrieveResponse.dob this.doingBusinessAs = externalBankAccountRetrieveResponse.doingBusinessAs - this.lastFour = externalBankAccountRetrieveResponse.lastFour - this.name = externalBankAccountRetrieveResponse.name - this.financialAccountToken = externalBankAccountRetrieveResponse.financialAccountToken - this.owner = externalBankAccountRetrieveResponse.owner - this.ownerType = externalBankAccountRetrieveResponse.ownerType - this.routingNumber = externalBankAccountRetrieveResponse.routingNumber - this.state = externalBankAccountRetrieveResponse.state - this.token = externalBankAccountRetrieveResponse.token - this.type = externalBankAccountRetrieveResponse.type this.userDefinedId = externalBankAccountRetrieveResponse.userDefinedId - this.verificationAttempts = externalBankAccountRetrieveResponse.verificationAttempts this.verificationFailedReason = externalBankAccountRetrieveResponse.verificationFailedReason + this.verificationAttempts = externalBankAccountRetrieveResponse.verificationAttempts + this.financialAccountToken = externalBankAccountRetrieveResponse.financialAccountToken + this.type = externalBankAccountRetrieveResponse.type this.verificationMethod = externalBankAccountRetrieveResponse.verificationMethod + this.ownerType = externalBankAccountRetrieveResponse.ownerType + this.state = externalBankAccountRetrieveResponse.state this.verificationState = externalBankAccountRetrieveResponse.verificationState - additionalProperties(externalBankAccountRetrieveResponse.additionalProperties) - } - - /** - * Indicates which Lithic account the external account is associated with. For external - * accounts that are associated with the program, account_token field returned will be null - */ - fun accountToken(accountToken: String) = accountToken(JsonField.of(accountToken)) - - /** - * Indicates which Lithic account the external account is associated with. For external - * accounts that are associated with the program, account_token field returned will be null - */ - @JsonProperty("account_token") - @ExcludeMissing - fun accountToken(accountToken: JsonField) = apply { - this.accountToken = accountToken - } - - /** - * Address used during Address Verification Service (AVS) checks during transactions if - * enabled via Auth Rules. - */ - fun address(address: ExternalBankAccountAddress) = address(JsonField.of(address)) - - /** - * Address used during Address Verification Service (AVS) checks during transactions if - * enabled via Auth Rules. - */ - @JsonProperty("address") - @ExcludeMissing - fun address(address: JsonField) = apply { - this.address = address - } - - /** Optional field that helps identify bank accounts in receipts */ - fun companyId(companyId: String) = companyId(JsonField.of(companyId)) - - /** Optional field that helps identify bank accounts in receipts */ - @JsonProperty("company_id") - @ExcludeMissing - fun companyId(companyId: JsonField) = apply { this.companyId = companyId } + this.address = externalBankAccountRetrieveResponse.address + additionalProperties(externalBankAccountRetrieveResponse.additionalProperties) + } /** - * The country that the bank account is located in using ISO 3166-1. We will only accept USA - * bank accounts e.g., USA + * A globally unique identifier for this record of an external bank account association. If + * a program links an external bank account to more than one end-user or to both the program + * and the end-user, then Lithic will return each record of the association */ - fun country(country: String) = country(JsonField.of(country)) + fun token(token: String) = token(JsonField.of(token)) /** - * The country that the bank account is located in using ISO 3166-1. We will only accept USA - * bank accounts e.g., USA + * A globally unique identifier for this record of an external bank account association. If + * a program links an external bank account to more than one end-user or to both the program + * and the end-user, then Lithic will return each record of the association */ - @JsonProperty("country") + @JsonProperty("token") @ExcludeMissing - fun country(country: JsonField) = apply { this.country = country } + fun token(token: JsonField) = apply { this.token = token } /** - * An ISO 8601 string representing when this funding source was added to the Lithic account. + * Legal Name of the business or individual who owns the external account. This will appear + * in statements */ - fun created(created: OffsetDateTime) = created(JsonField.of(created)) + fun owner(owner: String) = owner(JsonField.of(owner)) /** - * An ISO 8601 string representing when this funding source was added to the Lithic account. + * Legal Name of the business or individual who owns the external account. This will appear + * in statements */ - @JsonProperty("created") - @ExcludeMissing - fun created(created: JsonField) = apply { this.created = created } - - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - fun currency(currency: String) = currency(JsonField.of(currency)) - - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - @JsonProperty("currency") - @ExcludeMissing - fun currency(currency: JsonField) = apply { this.currency = currency } - - /** Date of Birth of the Individual that owns the external bank account */ - fun dob(dob: LocalDate) = dob(JsonField.of(dob)) - - /** Date of Birth of the Individual that owns the external bank account */ - @JsonProperty("dob") + @JsonProperty("owner") @ExcludeMissing - fun dob(dob: JsonField) = apply { this.dob = dob } + fun owner(owner: JsonField) = apply { this.owner = owner } - fun doingBusinessAs(doingBusinessAs: String) = - doingBusinessAs(JsonField.of(doingBusinessAs)) + /** Routing Number */ + fun routingNumber(routingNumber: String) = routingNumber(JsonField.of(routingNumber)) - @JsonProperty("doing_business_as") + /** Routing Number */ + @JsonProperty("routing_number") @ExcludeMissing - fun doingBusinessAs(doingBusinessAs: JsonField) = apply { - this.doingBusinessAs = doingBusinessAs + fun routingNumber(routingNumber: JsonField) = apply { + this.routingNumber = routingNumber } /** @@ -502,98 +455,93 @@ private constructor( @ExcludeMissing fun name(name: JsonField) = apply { this.name = name } + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + fun currency(currency: String) = currency(JsonField.of(currency)) + + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + @JsonProperty("currency") + @ExcludeMissing + fun currency(currency: JsonField) = apply { this.currency = currency } + /** - * The financial account token of the operating account, which will provide the funds for - * micro deposits used to verify the account + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - fun financialAccountToken(financialAccountToken: String) = - financialAccountToken(JsonField.of(financialAccountToken)) + fun country(country: String) = country(JsonField.of(country)) /** - * The financial account token of the operating account, which will provide the funds for - * micro deposits used to verify the account + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - @JsonProperty("financial_account_token") + @JsonProperty("country") @ExcludeMissing - fun financialAccountToken(financialAccountToken: JsonField) = apply { - this.financialAccountToken = financialAccountToken - } + fun country(country: JsonField) = apply { this.country = country } /** - * Legal Name of the business or individual who owns the external account. This will appear - * in statements + * Indicates which Lithic account the external account is associated with. For external + * accounts that are associated with the program, account_token field returned will be null */ - fun owner(owner: String) = owner(JsonField.of(owner)) + fun accountToken(accountToken: String) = accountToken(JsonField.of(accountToken)) /** - * Legal Name of the business or individual who owns the external account. This will appear - * in statements + * Indicates which Lithic account the external account is associated with. For external + * accounts that are associated with the program, account_token field returned will be null */ - @JsonProperty("owner") - @ExcludeMissing - fun owner(owner: JsonField) = apply { this.owner = owner } - - fun ownerType(ownerType: OwnerType) = ownerType(JsonField.of(ownerType)) - - @JsonProperty("owner_type") + @JsonProperty("account_token") @ExcludeMissing - fun ownerType(ownerType: JsonField) = apply { this.ownerType = ownerType } + fun accountToken(accountToken: JsonField) = apply { + this.accountToken = accountToken + } - fun routingNumber(routingNumber: String) = routingNumber(JsonField.of(routingNumber)) + /** + * An ISO 8601 string representing when this funding source was added to the Lithic account. + */ + fun created(created: OffsetDateTime) = created(JsonField.of(created)) - @JsonProperty("routing_number") + /** + * An ISO 8601 string representing when this funding source was added to the Lithic account. + */ + @JsonProperty("created") @ExcludeMissing - fun routingNumber(routingNumber: JsonField) = apply { - this.routingNumber = routingNumber - } + fun created(created: JsonField) = apply { this.created = created } - fun state(state: State) = state(JsonField.of(state)) + /** Optional field that helps identify bank accounts in receipts */ + fun companyId(companyId: String) = companyId(JsonField.of(companyId)) - @JsonProperty("state") + /** Optional field that helps identify bank accounts in receipts */ + @JsonProperty("company_id") @ExcludeMissing - fun state(state: JsonField) = apply { this.state = state } + fun companyId(companyId: JsonField) = apply { this.companyId = companyId } - /** - * A globally unique identifier for this record of an external bank account association. If - * a program links an external bank account to more than one end-user or to both the program - * and the end-user, then Lithic will return each record of the association - */ - fun token(token: String) = token(JsonField.of(token)) + /** Date of Birth of the Individual that owns the external bank account */ + fun dob(dob: LocalDate) = dob(JsonField.of(dob)) - /** - * A globally unique identifier for this record of an external bank account association. If - * a program links an external bank account to more than one end-user or to both the program - * and the end-user, then Lithic will return each record of the association - */ - @JsonProperty("token") + /** Date of Birth of the Individual that owns the external bank account */ + @JsonProperty("dob") @ExcludeMissing - fun token(token: JsonField) = apply { this.token = token } + fun dob(dob: JsonField) = apply { this.dob = dob } - fun type(type: Type) = type(JsonField.of(type)) + /** Doing Business As */ + fun doingBusinessAs(doingBusinessAs: String) = + doingBusinessAs(JsonField.of(doingBusinessAs)) - @JsonProperty("type") + /** Doing Business As */ + @JsonProperty("doing_business_as") @ExcludeMissing - fun type(type: JsonField) = apply { this.type = type } + fun doingBusinessAs(doingBusinessAs: JsonField) = apply { + this.doingBusinessAs = doingBusinessAs + } + /** User Defined ID */ fun userDefinedId(userDefinedId: String) = userDefinedId(JsonField.of(userDefinedId)) + /** User Defined ID */ @JsonProperty("user_defined_id") @ExcludeMissing fun userDefinedId(userDefinedId: JsonField) = apply { this.userDefinedId = userDefinedId } - /** The number of attempts at verification */ - fun verificationAttempts(verificationAttempts: Long) = - verificationAttempts(JsonField.of(verificationAttempts)) - - /** The number of attempts at verification */ - @JsonProperty("verification_attempts") - @ExcludeMissing - fun verificationAttempts(verificationAttempts: JsonField) = apply { - this.verificationAttempts = verificationAttempts - } - /** * Optional free text description of the reason for the failed verification. For ACH * micro-deposits returned, this field will display the reason return code sent by the ACH @@ -613,24 +561,84 @@ private constructor( this.verificationFailedReason = verificationFailedReason } + /** The number of attempts at verification */ + fun verificationAttempts(verificationAttempts: Long) = + verificationAttempts(JsonField.of(verificationAttempts)) + + /** The number of attempts at verification */ + @JsonProperty("verification_attempts") + @ExcludeMissing + fun verificationAttempts(verificationAttempts: JsonField) = apply { + this.verificationAttempts = verificationAttempts + } + + /** The financial account token of the operating account to fund the micro deposits */ + fun financialAccountToken(financialAccountToken: String) = + financialAccountToken(JsonField.of(financialAccountToken)) + + /** The financial account token of the operating account to fund the micro deposits */ + @JsonProperty("financial_account_token") + @ExcludeMissing + fun financialAccountToken(financialAccountToken: JsonField) = apply { + this.financialAccountToken = financialAccountToken + } + + /** Account Type */ + fun type(type: Type) = type(JsonField.of(type)) + + /** Account Type */ + @JsonProperty("type") + @ExcludeMissing + fun type(type: JsonField) = apply { this.type = type } + + /** Verification Method */ fun verificationMethod(verificationMethod: VerificationMethod) = verificationMethod(JsonField.of(verificationMethod)) + /** Verification Method */ @JsonProperty("verification_method") @ExcludeMissing fun verificationMethod(verificationMethod: JsonField) = apply { this.verificationMethod = verificationMethod } + /** Owner Type */ + fun ownerType(ownerType: OwnerType) = ownerType(JsonField.of(ownerType)) + + /** Owner Type */ + @JsonProperty("owner_type") + @ExcludeMissing + fun ownerType(ownerType: JsonField) = apply { this.ownerType = ownerType } + + /** Account State */ + fun state(state: State) = state(JsonField.of(state)) + + /** Account State */ + @JsonProperty("state") + @ExcludeMissing + fun state(state: JsonField) = apply { this.state = state } + + /** Verification State */ fun verificationState(verificationState: VerificationState) = verificationState(JsonField.of(verificationState)) + /** Verification State */ @JsonProperty("verification_state") @ExcludeMissing fun verificationState(verificationState: JsonField) = apply { this.verificationState = verificationState } + /** Address */ + fun address(address: ExternalBankAccountAddress) = address(JsonField.of(address)) + + /** Address */ + @JsonProperty("address") + @ExcludeMissing + fun address(address: JsonField) = apply { + this.address = address + } + fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() this.additionalProperties.putAll(additionalProperties) @@ -647,28 +655,28 @@ private constructor( fun build(): ExternalBankAccountRetrieveResponse = ExternalBankAccountRetrieveResponse( - accountToken, - address, - companyId, + token, + owner, + routingNumber, + lastFour, + name, + currency, country, + accountToken, created, - currency, + companyId, dob, doingBusinessAs, - lastFour, - name, - financialAccountToken, - owner, - ownerType, - routingNumber, - state, - token, - type, userDefinedId, - verificationAttempts, verificationFailedReason, + verificationAttempts, + financialAccountToken, + type, verificationMethod, + ownerType, + state, verificationState, + address, additionalProperties.toUnmodifiable(), ) } @@ -752,40 +760,40 @@ private constructor( companion object { - @JvmField val CLOSED = State(JsonField.of("CLOSED")) - @JvmField val ENABLED = State(JsonField.of("ENABLED")) + @JvmField val CLOSED = State(JsonField.of("CLOSED")) + @JvmField val PAUSED = State(JsonField.of("PAUSED")) @JvmStatic fun of(value: String) = State(JsonField.of(value)) } enum class Known { - CLOSED, ENABLED, + CLOSED, PAUSED, } enum class Value { - CLOSED, ENABLED, + CLOSED, PAUSED, _UNKNOWN, } fun value(): Value = when (this) { - CLOSED -> Value.CLOSED ENABLED -> Value.ENABLED + CLOSED -> Value.CLOSED PAUSED -> Value.PAUSED else -> Value._UNKNOWN } fun known(): Known = when (this) { - CLOSED -> Known.CLOSED ENABLED -> Known.ENABLED + CLOSED -> Known.CLOSED PAUSED -> Known.PAUSED else -> throw LithicInvalidDataException("Unknown State: $value") } @@ -941,6 +949,8 @@ private constructor( companion object { + @JvmField val PENDING = VerificationState(JsonField.of("PENDING")) + @JvmField val ENABLED = VerificationState(JsonField.of("ENABLED")) @JvmField @@ -948,41 +958,39 @@ private constructor( @JvmField val INSUFFICIENT_FUNDS = VerificationState(JsonField.of("INSUFFICIENT_FUNDS")) - @JvmField val PENDING = VerificationState(JsonField.of("PENDING")) - @JvmStatic fun of(value: String) = VerificationState(JsonField.of(value)) } enum class Known { + PENDING, ENABLED, FAILED_VERIFICATION, INSUFFICIENT_FUNDS, - PENDING, } enum class Value { + PENDING, ENABLED, FAILED_VERIFICATION, INSUFFICIENT_FUNDS, - PENDING, _UNKNOWN, } fun value(): Value = when (this) { + PENDING -> Value.PENDING ENABLED -> Value.ENABLED FAILED_VERIFICATION -> Value.FAILED_VERIFICATION INSUFFICIENT_FUNDS -> Value.INSUFFICIENT_FUNDS - PENDING -> Value.PENDING else -> Value._UNKNOWN } fun known(): Known = when (this) { + PENDING -> Known.PENDING ENABLED -> Known.ENABLED FAILED_VERIFICATION -> Known.FAILED_VERIFICATION INSUFFICIENT_FUNDS -> Known.INSUFFICIENT_FUNDS - PENDING -> Known.PENDING else -> throw LithicInvalidDataException("Unknown VerificationState: $value") } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsParams.kt index d98e71da..510b9d9a 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsParams.kt @@ -56,10 +56,6 @@ constructor( private var hashCode: Int = 0 - /** - * The financial account token of the operating account, which will provide the funds for - * micro deposits used to verify the account - */ @JsonProperty("financial_account_token") fun financialAccountToken(): String? = financialAccountToken @@ -108,10 +104,6 @@ constructor( additionalProperties(externalBankAccountRetryMicroDepositsBody.additionalProperties) } - /** - * The financial account token of the operating account, which will provide the funds - * for micro deposits used to verify the account - */ @JsonProperty("financial_account_token") fun financialAccountToken(financialAccountToken: String) = apply { this.financialAccountToken = financialAccountToken @@ -206,10 +198,6 @@ constructor( this.externalBankAccountToken = externalBankAccountToken } - /** - * The financial account token of the operating account, which will provide the funds for - * micro deposits used to verify the account - */ fun financialAccountToken(financialAccountToken: String) = apply { this.financialAccountToken = financialAccountToken } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsResponse.kt index f1edccd1..152c8199 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsResponse.kt @@ -24,28 +24,28 @@ import java.util.Optional @NoAutoDetect class ExternalBankAccountRetryMicroDepositsResponse private constructor( - private val accountToken: JsonField, - private val address: JsonField, - private val companyId: JsonField, + private val token: JsonField, + private val owner: JsonField, + private val routingNumber: JsonField, + private val lastFour: JsonField, + private val name: JsonField, + private val currency: JsonField, private val country: JsonField, + private val accountToken: JsonField, private val created: JsonField, - private val currency: JsonField, + private val companyId: JsonField, private val dob: JsonField, private val doingBusinessAs: JsonField, - private val lastFour: JsonField, - private val name: JsonField, - private val financialAccountToken: JsonField, - private val owner: JsonField, - private val ownerType: JsonField, - private val routingNumber: JsonField, - private val state: JsonField, - private val token: JsonField, - private val type: JsonField, private val userDefinedId: JsonField, - private val verificationAttempts: JsonField, private val verificationFailedReason: JsonField, + private val verificationAttempts: JsonField, + private val financialAccountToken: JsonField, + private val type: JsonField, private val verificationMethod: JsonField, + private val ownerType: JsonField, + private val state: JsonField, private val verificationState: JsonField, + private val address: JsonField, private val additionalProperties: Map, ) { @@ -54,39 +54,20 @@ private constructor( private var hashCode: Int = 0 /** - * Indicates which Lithic account the external account is associated with. For external accounts - * that are associated with the program, account_token field returned will be null - */ - fun accountToken(): Optional = - Optional.ofNullable(accountToken.getNullable("account_token")) - - /** - * Address used during Address Verification Service (AVS) checks during transactions if enabled - * via Auth Rules. + * A globally unique identifier for this record of an external bank account association. If a + * program links an external bank account to more than one end-user or to both the program and + * the end-user, then Lithic will return each record of the association */ - fun address(): Optional = - Optional.ofNullable(address.getNullable("address")) - - /** Optional field that helps identify bank accounts in receipts */ - fun companyId(): Optional = Optional.ofNullable(companyId.getNullable("company_id")) + fun token(): String = token.getRequired("token") /** - * The country that the bank account is located in using ISO 3166-1. We will only accept USA - * bank accounts e.g., USA + * Legal Name of the business or individual who owns the external account. This will appear in + * statements */ - fun country(): String = country.getRequired("country") - - /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ - fun created(): OffsetDateTime = created.getRequired("created") - - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - fun currency(): String = currency.getRequired("currency") - - /** Date of Birth of the Individual that owns the external bank account */ - fun dob(): Optional = Optional.ofNullable(dob.getNullable("dob")) + fun owner(): String = owner.getRequired("owner") - fun doingBusinessAs(): Optional = - Optional.ofNullable(doingBusinessAs.getNullable("doing_business_as")) + /** Routing Number */ + fun routingNumber(): String = routingNumber.getRequired("routing_number") /** The last 4 digits of the bank account. Derived by Lithic from the account number passed */ fun lastFour(): String = lastFour.getRequired("last_four") @@ -94,40 +75,39 @@ private constructor( /** The nickname given to this record of External Bank Account */ fun name(): Optional = Optional.ofNullable(name.getNullable("name")) + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + fun currency(): String = currency.getRequired("currency") + /** - * The financial account token of the operating account, which will provide the funds for micro - * deposits used to verify the account + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - fun financialAccountToken(): Optional = - Optional.ofNullable(financialAccountToken.getNullable("financial_account_token")) + fun country(): String = country.getRequired("country") /** - * Legal Name of the business or individual who owns the external account. This will appear in - * statements + * Indicates which Lithic account the external account is associated with. For external accounts + * that are associated with the program, account_token field returned will be null */ - fun owner(): String = owner.getRequired("owner") - - fun ownerType(): OwnerType = ownerType.getRequired("owner_type") + fun accountToken(): Optional = + Optional.ofNullable(accountToken.getNullable("account_token")) - fun routingNumber(): String = routingNumber.getRequired("routing_number") + /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ + fun created(): OffsetDateTime = created.getRequired("created") - fun state(): State = state.getRequired("state") + /** Optional field that helps identify bank accounts in receipts */ + fun companyId(): Optional = Optional.ofNullable(companyId.getNullable("company_id")) - /** - * A globally unique identifier for this record of an external bank account association. If a - * program links an external bank account to more than one end-user or to both the program and - * the end-user, then Lithic will return each record of the association - */ - fun token(): String = token.getRequired("token") + /** Date of Birth of the Individual that owns the external bank account */ + fun dob(): Optional = Optional.ofNullable(dob.getNullable("dob")) - fun type(): Type = type.getRequired("type") + /** Doing Business As */ + fun doingBusinessAs(): Optional = + Optional.ofNullable(doingBusinessAs.getNullable("doing_business_as")) + /** User Defined ID */ fun userDefinedId(): Optional = Optional.ofNullable(userDefinedId.getNullable("user_defined_id")) - /** The number of attempts at verification */ - fun verificationAttempts(): Long = verificationAttempts.getRequired("verification_attempts") - /** * Optional free text description of the reason for the failed verification. For ACH * micro-deposits returned, this field will display the reason return code sent by the ACH @@ -136,42 +116,48 @@ private constructor( fun verificationFailedReason(): Optional = Optional.ofNullable(verificationFailedReason.getNullable("verification_failed_reason")) + /** The number of attempts at verification */ + fun verificationAttempts(): Long = verificationAttempts.getRequired("verification_attempts") + + /** The financial account token of the operating account to fund the micro deposits */ + fun financialAccountToken(): Optional = + Optional.ofNullable(financialAccountToken.getNullable("financial_account_token")) + + /** Account Type */ + fun type(): Type = type.getRequired("type") + + /** Verification Method */ fun verificationMethod(): VerificationMethod = verificationMethod.getRequired("verification_method") + /** Owner Type */ + fun ownerType(): OwnerType = ownerType.getRequired("owner_type") + + /** Account State */ + fun state(): State = state.getRequired("state") + + /** Verification State */ fun verificationState(): VerificationState = verificationState.getRequired("verification_state") - /** - * Indicates which Lithic account the external account is associated with. For external accounts - * that are associated with the program, account_token field returned will be null - */ - @JsonProperty("account_token") @ExcludeMissing fun _accountToken() = accountToken + /** Address */ + fun address(): Optional = + Optional.ofNullable(address.getNullable("address")) /** - * Address used during Address Verification Service (AVS) checks during transactions if enabled - * via Auth Rules. + * A globally unique identifier for this record of an external bank account association. If a + * program links an external bank account to more than one end-user or to both the program and + * the end-user, then Lithic will return each record of the association */ - @JsonProperty("address") @ExcludeMissing fun _address() = address - - /** Optional field that helps identify bank accounts in receipts */ - @JsonProperty("company_id") @ExcludeMissing fun _companyId() = companyId + @JsonProperty("token") @ExcludeMissing fun _token() = token /** - * The country that the bank account is located in using ISO 3166-1. We will only accept USA - * bank accounts e.g., USA + * Legal Name of the business or individual who owns the external account. This will appear in + * statements */ - @JsonProperty("country") @ExcludeMissing fun _country() = country - - /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ - @JsonProperty("created") @ExcludeMissing fun _created() = created - - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - @JsonProperty("currency") @ExcludeMissing fun _currency() = currency - - /** Date of Birth of the Individual that owns the external bank account */ - @JsonProperty("dob") @ExcludeMissing fun _dob() = dob + @JsonProperty("owner") @ExcludeMissing fun _owner() = owner - @JsonProperty("doing_business_as") @ExcludeMissing fun _doingBusinessAs() = doingBusinessAs + /** Routing Number */ + @JsonProperty("routing_number") @ExcludeMissing fun _routingNumber() = routingNumber /** The last 4 digits of the bank account. Derived by Lithic from the account number passed */ @JsonProperty("last_four") @ExcludeMissing fun _lastFour() = lastFour @@ -179,42 +165,36 @@ private constructor( /** The nickname given to this record of External Bank Account */ @JsonProperty("name") @ExcludeMissing fun _name() = name + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + @JsonProperty("currency") @ExcludeMissing fun _currency() = currency + /** - * The financial account token of the operating account, which will provide the funds for micro - * deposits used to verify the account + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - @JsonProperty("financial_account_token") - @ExcludeMissing - fun _financialAccountToken() = financialAccountToken + @JsonProperty("country") @ExcludeMissing fun _country() = country /** - * Legal Name of the business or individual who owns the external account. This will appear in - * statements + * Indicates which Lithic account the external account is associated with. For external accounts + * that are associated with the program, account_token field returned will be null */ - @JsonProperty("owner") @ExcludeMissing fun _owner() = owner - - @JsonProperty("owner_type") @ExcludeMissing fun _ownerType() = ownerType + @JsonProperty("account_token") @ExcludeMissing fun _accountToken() = accountToken - @JsonProperty("routing_number") @ExcludeMissing fun _routingNumber() = routingNumber + /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ + @JsonProperty("created") @ExcludeMissing fun _created() = created - @JsonProperty("state") @ExcludeMissing fun _state() = state + /** Optional field that helps identify bank accounts in receipts */ + @JsonProperty("company_id") @ExcludeMissing fun _companyId() = companyId - /** - * A globally unique identifier for this record of an external bank account association. If a - * program links an external bank account to more than one end-user or to both the program and - * the end-user, then Lithic will return each record of the association - */ - @JsonProperty("token") @ExcludeMissing fun _token() = token + /** Date of Birth of the Individual that owns the external bank account */ + @JsonProperty("dob") @ExcludeMissing fun _dob() = dob - @JsonProperty("type") @ExcludeMissing fun _type() = type + /** Doing Business As */ + @JsonProperty("doing_business_as") @ExcludeMissing fun _doingBusinessAs() = doingBusinessAs + /** User Defined ID */ @JsonProperty("user_defined_id") @ExcludeMissing fun _userDefinedId() = userDefinedId - /** The number of attempts at verification */ - @JsonProperty("verification_attempts") - @ExcludeMissing - fun _verificationAttempts() = verificationAttempts - /** * Optional free text description of the reason for the failed verification. For ACH * micro-deposits returned, this field will display the reason return code sent by the ACH @@ -224,40 +204,64 @@ private constructor( @ExcludeMissing fun _verificationFailedReason() = verificationFailedReason + /** The number of attempts at verification */ + @JsonProperty("verification_attempts") + @ExcludeMissing + fun _verificationAttempts() = verificationAttempts + + /** The financial account token of the operating account to fund the micro deposits */ + @JsonProperty("financial_account_token") + @ExcludeMissing + fun _financialAccountToken() = financialAccountToken + + /** Account Type */ + @JsonProperty("type") @ExcludeMissing fun _type() = type + + /** Verification Method */ @JsonProperty("verification_method") @ExcludeMissing fun _verificationMethod() = verificationMethod + /** Owner Type */ + @JsonProperty("owner_type") @ExcludeMissing fun _ownerType() = ownerType + + /** Account State */ + @JsonProperty("state") @ExcludeMissing fun _state() = state + + /** Verification State */ @JsonProperty("verification_state") @ExcludeMissing fun _verificationState() = verificationState + /** Address */ + @JsonProperty("address") @ExcludeMissing fun _address() = address + @JsonAnyGetter @ExcludeMissing fun _additionalProperties(): Map = additionalProperties fun validate(): ExternalBankAccountRetryMicroDepositsResponse = apply { if (!validated) { - accountToken() - address().map { it.validate() } - companyId() + token() + owner() + routingNumber() + lastFour() + name() + currency() country() + accountToken() created() - currency() + companyId() dob() doingBusinessAs() - lastFour() - name() - financialAccountToken() - owner() - ownerType() - routingNumber() - state() - token() - type() userDefinedId() - verificationAttempts() verificationFailedReason() + verificationAttempts() + financialAccountToken() + type() verificationMethod() + ownerType() + state() verificationState() + address().map { it.validate() } validated = true } } @@ -270,28 +274,28 @@ private constructor( } return other is ExternalBankAccountRetryMicroDepositsResponse && - this.accountToken == other.accountToken && - this.address == other.address && - this.companyId == other.companyId && + this.token == other.token && + this.owner == other.owner && + this.routingNumber == other.routingNumber && + this.lastFour == other.lastFour && + this.name == other.name && + this.currency == other.currency && this.country == other.country && + this.accountToken == other.accountToken && this.created == other.created && - this.currency == other.currency && + this.companyId == other.companyId && this.dob == other.dob && this.doingBusinessAs == other.doingBusinessAs && - this.lastFour == other.lastFour && - this.name == other.name && - this.financialAccountToken == other.financialAccountToken && - this.owner == other.owner && - this.ownerType == other.ownerType && - this.routingNumber == other.routingNumber && - this.state == other.state && - this.token == other.token && - this.type == other.type && this.userDefinedId == other.userDefinedId && - this.verificationAttempts == other.verificationAttempts && this.verificationFailedReason == other.verificationFailedReason && + this.verificationAttempts == other.verificationAttempts && + this.financialAccountToken == other.financialAccountToken && + this.type == other.type && this.verificationMethod == other.verificationMethod && + this.ownerType == other.ownerType && + this.state == other.state && this.verificationState == other.verificationState && + this.address == other.address && this.additionalProperties == other.additionalProperties } @@ -299,28 +303,28 @@ private constructor( if (hashCode == 0) { hashCode = Objects.hash( - accountToken, - address, - companyId, + token, + owner, + routingNumber, + lastFour, + name, + currency, country, + accountToken, created, - currency, + companyId, dob, doingBusinessAs, - lastFour, - name, - financialAccountToken, - owner, - ownerType, - routingNumber, - state, - token, - type, userDefinedId, - verificationAttempts, verificationFailedReason, + verificationAttempts, + financialAccountToken, + type, verificationMethod, + ownerType, + state, verificationState, + address, additionalProperties, ) } @@ -328,7 +332,7 @@ private constructor( } override fun toString() = - "ExternalBankAccountRetryMicroDepositsResponse{accountToken=$accountToken, address=$address, companyId=$companyId, country=$country, created=$created, currency=$currency, dob=$dob, doingBusinessAs=$doingBusinessAs, lastFour=$lastFour, name=$name, financialAccountToken=$financialAccountToken, owner=$owner, ownerType=$ownerType, routingNumber=$routingNumber, state=$state, token=$token, type=$type, userDefinedId=$userDefinedId, verificationAttempts=$verificationAttempts, verificationFailedReason=$verificationFailedReason, verificationMethod=$verificationMethod, verificationState=$verificationState, additionalProperties=$additionalProperties}" + "ExternalBankAccountRetryMicroDepositsResponse{token=$token, owner=$owner, routingNumber=$routingNumber, lastFour=$lastFour, name=$name, currency=$currency, country=$country, accountToken=$accountToken, created=$created, companyId=$companyId, dob=$dob, doingBusinessAs=$doingBusinessAs, userDefinedId=$userDefinedId, verificationFailedReason=$verificationFailedReason, verificationAttempts=$verificationAttempts, financialAccountToken=$financialAccountToken, type=$type, verificationMethod=$verificationMethod, ownerType=$ownerType, state=$state, verificationState=$verificationState, address=$address, additionalProperties=$additionalProperties}" companion object { @@ -337,28 +341,28 @@ private constructor( class Builder { - private var accountToken: JsonField = JsonMissing.of() - private var address: JsonField = JsonMissing.of() - private var companyId: JsonField = JsonMissing.of() + private var token: JsonField = JsonMissing.of() + private var owner: JsonField = JsonMissing.of() + private var routingNumber: JsonField = JsonMissing.of() + private var lastFour: JsonField = JsonMissing.of() + private var name: JsonField = JsonMissing.of() + private var currency: JsonField = JsonMissing.of() private var country: JsonField = JsonMissing.of() + private var accountToken: JsonField = JsonMissing.of() private var created: JsonField = JsonMissing.of() - private var currency: JsonField = JsonMissing.of() + private var companyId: JsonField = JsonMissing.of() private var dob: JsonField = JsonMissing.of() private var doingBusinessAs: JsonField = JsonMissing.of() - private var lastFour: JsonField = JsonMissing.of() - private var name: JsonField = JsonMissing.of() - private var financialAccountToken: JsonField = JsonMissing.of() - private var owner: JsonField = JsonMissing.of() - private var ownerType: JsonField = JsonMissing.of() - private var routingNumber: JsonField = JsonMissing.of() - private var state: JsonField = JsonMissing.of() - private var token: JsonField = JsonMissing.of() - private var type: JsonField = JsonMissing.of() private var userDefinedId: JsonField = JsonMissing.of() - private var verificationAttempts: JsonField = JsonMissing.of() private var verificationFailedReason: JsonField = JsonMissing.of() + private var verificationAttempts: JsonField = JsonMissing.of() + private var financialAccountToken: JsonField = JsonMissing.of() + private var type: JsonField = JsonMissing.of() private var verificationMethod: JsonField = JsonMissing.of() + private var ownerType: JsonField = JsonMissing.of() + private var state: JsonField = JsonMissing.of() private var verificationState: JsonField = JsonMissing.of() + private var address: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic @@ -366,124 +370,73 @@ private constructor( externalBankAccountRetryMicroDepositsResponse: ExternalBankAccountRetryMicroDepositsResponse ) = apply { - this.accountToken = externalBankAccountRetryMicroDepositsResponse.accountToken - this.address = externalBankAccountRetryMicroDepositsResponse.address - this.companyId = externalBankAccountRetryMicroDepositsResponse.companyId + this.token = externalBankAccountRetryMicroDepositsResponse.token + this.owner = externalBankAccountRetryMicroDepositsResponse.owner + this.routingNumber = externalBankAccountRetryMicroDepositsResponse.routingNumber + this.lastFour = externalBankAccountRetryMicroDepositsResponse.lastFour + this.name = externalBankAccountRetryMicroDepositsResponse.name + this.currency = externalBankAccountRetryMicroDepositsResponse.currency this.country = externalBankAccountRetryMicroDepositsResponse.country + this.accountToken = externalBankAccountRetryMicroDepositsResponse.accountToken this.created = externalBankAccountRetryMicroDepositsResponse.created - this.currency = externalBankAccountRetryMicroDepositsResponse.currency + this.companyId = externalBankAccountRetryMicroDepositsResponse.companyId this.dob = externalBankAccountRetryMicroDepositsResponse.dob this.doingBusinessAs = externalBankAccountRetryMicroDepositsResponse.doingBusinessAs - this.lastFour = externalBankAccountRetryMicroDepositsResponse.lastFour - this.name = externalBankAccountRetryMicroDepositsResponse.name - this.financialAccountToken = - externalBankAccountRetryMicroDepositsResponse.financialAccountToken - this.owner = externalBankAccountRetryMicroDepositsResponse.owner - this.ownerType = externalBankAccountRetryMicroDepositsResponse.ownerType - this.routingNumber = externalBankAccountRetryMicroDepositsResponse.routingNumber - this.state = externalBankAccountRetryMicroDepositsResponse.state - this.token = externalBankAccountRetryMicroDepositsResponse.token - this.type = externalBankAccountRetryMicroDepositsResponse.type this.userDefinedId = externalBankAccountRetryMicroDepositsResponse.userDefinedId - this.verificationAttempts = - externalBankAccountRetryMicroDepositsResponse.verificationAttempts this.verificationFailedReason = externalBankAccountRetryMicroDepositsResponse.verificationFailedReason + this.verificationAttempts = + externalBankAccountRetryMicroDepositsResponse.verificationAttempts + this.financialAccountToken = + externalBankAccountRetryMicroDepositsResponse.financialAccountToken + this.type = externalBankAccountRetryMicroDepositsResponse.type this.verificationMethod = externalBankAccountRetryMicroDepositsResponse.verificationMethod + this.ownerType = externalBankAccountRetryMicroDepositsResponse.ownerType + this.state = externalBankAccountRetryMicroDepositsResponse.state this.verificationState = externalBankAccountRetryMicroDepositsResponse.verificationState - additionalProperties(externalBankAccountRetryMicroDepositsResponse.additionalProperties) - } - - /** - * Indicates which Lithic account the external account is associated with. For external - * accounts that are associated with the program, account_token field returned will be null - */ - fun accountToken(accountToken: String) = accountToken(JsonField.of(accountToken)) - - /** - * Indicates which Lithic account the external account is associated with. For external - * accounts that are associated with the program, account_token field returned will be null - */ - @JsonProperty("account_token") - @ExcludeMissing - fun accountToken(accountToken: JsonField) = apply { - this.accountToken = accountToken - } - - /** - * Address used during Address Verification Service (AVS) checks during transactions if - * enabled via Auth Rules. - */ - fun address(address: ExternalBankAccountAddress) = address(JsonField.of(address)) - - /** - * Address used during Address Verification Service (AVS) checks during transactions if - * enabled via Auth Rules. - */ - @JsonProperty("address") - @ExcludeMissing - fun address(address: JsonField) = apply { - this.address = address - } - - /** Optional field that helps identify bank accounts in receipts */ - fun companyId(companyId: String) = companyId(JsonField.of(companyId)) - - /** Optional field that helps identify bank accounts in receipts */ - @JsonProperty("company_id") - @ExcludeMissing - fun companyId(companyId: JsonField) = apply { this.companyId = companyId } + this.address = externalBankAccountRetryMicroDepositsResponse.address + additionalProperties(externalBankAccountRetryMicroDepositsResponse.additionalProperties) + } /** - * The country that the bank account is located in using ISO 3166-1. We will only accept USA - * bank accounts e.g., USA + * A globally unique identifier for this record of an external bank account association. If + * a program links an external bank account to more than one end-user or to both the program + * and the end-user, then Lithic will return each record of the association */ - fun country(country: String) = country(JsonField.of(country)) + fun token(token: String) = token(JsonField.of(token)) /** - * The country that the bank account is located in using ISO 3166-1. We will only accept USA - * bank accounts e.g., USA + * A globally unique identifier for this record of an external bank account association. If + * a program links an external bank account to more than one end-user or to both the program + * and the end-user, then Lithic will return each record of the association */ - @JsonProperty("country") + @JsonProperty("token") @ExcludeMissing - fun country(country: JsonField) = apply { this.country = country } + fun token(token: JsonField) = apply { this.token = token } /** - * An ISO 8601 string representing when this funding source was added to the Lithic account. + * Legal Name of the business or individual who owns the external account. This will appear + * in statements */ - fun created(created: OffsetDateTime) = created(JsonField.of(created)) + fun owner(owner: String) = owner(JsonField.of(owner)) /** - * An ISO 8601 string representing when this funding source was added to the Lithic account. + * Legal Name of the business or individual who owns the external account. This will appear + * in statements */ - @JsonProperty("created") - @ExcludeMissing - fun created(created: JsonField) = apply { this.created = created } - - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - fun currency(currency: String) = currency(JsonField.of(currency)) - - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - @JsonProperty("currency") - @ExcludeMissing - fun currency(currency: JsonField) = apply { this.currency = currency } - - /** Date of Birth of the Individual that owns the external bank account */ - fun dob(dob: LocalDate) = dob(JsonField.of(dob)) - - /** Date of Birth of the Individual that owns the external bank account */ - @JsonProperty("dob") + @JsonProperty("owner") @ExcludeMissing - fun dob(dob: JsonField) = apply { this.dob = dob } + fun owner(owner: JsonField) = apply { this.owner = owner } - fun doingBusinessAs(doingBusinessAs: String) = - doingBusinessAs(JsonField.of(doingBusinessAs)) + /** Routing Number */ + fun routingNumber(routingNumber: String) = routingNumber(JsonField.of(routingNumber)) - @JsonProperty("doing_business_as") + /** Routing Number */ + @JsonProperty("routing_number") @ExcludeMissing - fun doingBusinessAs(doingBusinessAs: JsonField) = apply { - this.doingBusinessAs = doingBusinessAs + fun routingNumber(routingNumber: JsonField) = apply { + this.routingNumber = routingNumber } /** @@ -506,98 +459,93 @@ private constructor( @ExcludeMissing fun name(name: JsonField) = apply { this.name = name } + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + fun currency(currency: String) = currency(JsonField.of(currency)) + + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + @JsonProperty("currency") + @ExcludeMissing + fun currency(currency: JsonField) = apply { this.currency = currency } + /** - * The financial account token of the operating account, which will provide the funds for - * micro deposits used to verify the account + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - fun financialAccountToken(financialAccountToken: String) = - financialAccountToken(JsonField.of(financialAccountToken)) + fun country(country: String) = country(JsonField.of(country)) /** - * The financial account token of the operating account, which will provide the funds for - * micro deposits used to verify the account + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - @JsonProperty("financial_account_token") + @JsonProperty("country") @ExcludeMissing - fun financialAccountToken(financialAccountToken: JsonField) = apply { - this.financialAccountToken = financialAccountToken - } + fun country(country: JsonField) = apply { this.country = country } /** - * Legal Name of the business or individual who owns the external account. This will appear - * in statements + * Indicates which Lithic account the external account is associated with. For external + * accounts that are associated with the program, account_token field returned will be null */ - fun owner(owner: String) = owner(JsonField.of(owner)) + fun accountToken(accountToken: String) = accountToken(JsonField.of(accountToken)) /** - * Legal Name of the business or individual who owns the external account. This will appear - * in statements + * Indicates which Lithic account the external account is associated with. For external + * accounts that are associated with the program, account_token field returned will be null */ - @JsonProperty("owner") - @ExcludeMissing - fun owner(owner: JsonField) = apply { this.owner = owner } - - fun ownerType(ownerType: OwnerType) = ownerType(JsonField.of(ownerType)) - - @JsonProperty("owner_type") + @JsonProperty("account_token") @ExcludeMissing - fun ownerType(ownerType: JsonField) = apply { this.ownerType = ownerType } + fun accountToken(accountToken: JsonField) = apply { + this.accountToken = accountToken + } - fun routingNumber(routingNumber: String) = routingNumber(JsonField.of(routingNumber)) + /** + * An ISO 8601 string representing when this funding source was added to the Lithic account. + */ + fun created(created: OffsetDateTime) = created(JsonField.of(created)) - @JsonProperty("routing_number") + /** + * An ISO 8601 string representing when this funding source was added to the Lithic account. + */ + @JsonProperty("created") @ExcludeMissing - fun routingNumber(routingNumber: JsonField) = apply { - this.routingNumber = routingNumber - } + fun created(created: JsonField) = apply { this.created = created } - fun state(state: State) = state(JsonField.of(state)) + /** Optional field that helps identify bank accounts in receipts */ + fun companyId(companyId: String) = companyId(JsonField.of(companyId)) - @JsonProperty("state") + /** Optional field that helps identify bank accounts in receipts */ + @JsonProperty("company_id") @ExcludeMissing - fun state(state: JsonField) = apply { this.state = state } + fun companyId(companyId: JsonField) = apply { this.companyId = companyId } - /** - * A globally unique identifier for this record of an external bank account association. If - * a program links an external bank account to more than one end-user or to both the program - * and the end-user, then Lithic will return each record of the association - */ - fun token(token: String) = token(JsonField.of(token)) + /** Date of Birth of the Individual that owns the external bank account */ + fun dob(dob: LocalDate) = dob(JsonField.of(dob)) - /** - * A globally unique identifier for this record of an external bank account association. If - * a program links an external bank account to more than one end-user or to both the program - * and the end-user, then Lithic will return each record of the association - */ - @JsonProperty("token") + /** Date of Birth of the Individual that owns the external bank account */ + @JsonProperty("dob") @ExcludeMissing - fun token(token: JsonField) = apply { this.token = token } + fun dob(dob: JsonField) = apply { this.dob = dob } - fun type(type: Type) = type(JsonField.of(type)) + /** Doing Business As */ + fun doingBusinessAs(doingBusinessAs: String) = + doingBusinessAs(JsonField.of(doingBusinessAs)) - @JsonProperty("type") + /** Doing Business As */ + @JsonProperty("doing_business_as") @ExcludeMissing - fun type(type: JsonField) = apply { this.type = type } + fun doingBusinessAs(doingBusinessAs: JsonField) = apply { + this.doingBusinessAs = doingBusinessAs + } + /** User Defined ID */ fun userDefinedId(userDefinedId: String) = userDefinedId(JsonField.of(userDefinedId)) + /** User Defined ID */ @JsonProperty("user_defined_id") @ExcludeMissing fun userDefinedId(userDefinedId: JsonField) = apply { this.userDefinedId = userDefinedId } - /** The number of attempts at verification */ - fun verificationAttempts(verificationAttempts: Long) = - verificationAttempts(JsonField.of(verificationAttempts)) - - /** The number of attempts at verification */ - @JsonProperty("verification_attempts") - @ExcludeMissing - fun verificationAttempts(verificationAttempts: JsonField) = apply { - this.verificationAttempts = verificationAttempts - } - /** * Optional free text description of the reason for the failed verification. For ACH * micro-deposits returned, this field will display the reason return code sent by the ACH @@ -617,24 +565,84 @@ private constructor( this.verificationFailedReason = verificationFailedReason } + /** The number of attempts at verification */ + fun verificationAttempts(verificationAttempts: Long) = + verificationAttempts(JsonField.of(verificationAttempts)) + + /** The number of attempts at verification */ + @JsonProperty("verification_attempts") + @ExcludeMissing + fun verificationAttempts(verificationAttempts: JsonField) = apply { + this.verificationAttempts = verificationAttempts + } + + /** The financial account token of the operating account to fund the micro deposits */ + fun financialAccountToken(financialAccountToken: String) = + financialAccountToken(JsonField.of(financialAccountToken)) + + /** The financial account token of the operating account to fund the micro deposits */ + @JsonProperty("financial_account_token") + @ExcludeMissing + fun financialAccountToken(financialAccountToken: JsonField) = apply { + this.financialAccountToken = financialAccountToken + } + + /** Account Type */ + fun type(type: Type) = type(JsonField.of(type)) + + /** Account Type */ + @JsonProperty("type") + @ExcludeMissing + fun type(type: JsonField) = apply { this.type = type } + + /** Verification Method */ fun verificationMethod(verificationMethod: VerificationMethod) = verificationMethod(JsonField.of(verificationMethod)) + /** Verification Method */ @JsonProperty("verification_method") @ExcludeMissing fun verificationMethod(verificationMethod: JsonField) = apply { this.verificationMethod = verificationMethod } + /** Owner Type */ + fun ownerType(ownerType: OwnerType) = ownerType(JsonField.of(ownerType)) + + /** Owner Type */ + @JsonProperty("owner_type") + @ExcludeMissing + fun ownerType(ownerType: JsonField) = apply { this.ownerType = ownerType } + + /** Account State */ + fun state(state: State) = state(JsonField.of(state)) + + /** Account State */ + @JsonProperty("state") + @ExcludeMissing + fun state(state: JsonField) = apply { this.state = state } + + /** Verification State */ fun verificationState(verificationState: VerificationState) = verificationState(JsonField.of(verificationState)) + /** Verification State */ @JsonProperty("verification_state") @ExcludeMissing fun verificationState(verificationState: JsonField) = apply { this.verificationState = verificationState } + /** Address */ + fun address(address: ExternalBankAccountAddress) = address(JsonField.of(address)) + + /** Address */ + @JsonProperty("address") + @ExcludeMissing + fun address(address: JsonField) = apply { + this.address = address + } + fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() this.additionalProperties.putAll(additionalProperties) @@ -651,28 +659,28 @@ private constructor( fun build(): ExternalBankAccountRetryMicroDepositsResponse = ExternalBankAccountRetryMicroDepositsResponse( - accountToken, - address, - companyId, + token, + owner, + routingNumber, + lastFour, + name, + currency, country, + accountToken, created, - currency, + companyId, dob, doingBusinessAs, - lastFour, - name, - financialAccountToken, - owner, - ownerType, - routingNumber, - state, - token, - type, userDefinedId, - verificationAttempts, verificationFailedReason, + verificationAttempts, + financialAccountToken, + type, verificationMethod, + ownerType, + state, verificationState, + address, additionalProperties.toUnmodifiable(), ) } @@ -756,40 +764,40 @@ private constructor( companion object { - @JvmField val CLOSED = State(JsonField.of("CLOSED")) - @JvmField val ENABLED = State(JsonField.of("ENABLED")) + @JvmField val CLOSED = State(JsonField.of("CLOSED")) + @JvmField val PAUSED = State(JsonField.of("PAUSED")) @JvmStatic fun of(value: String) = State(JsonField.of(value)) } enum class Known { - CLOSED, ENABLED, + CLOSED, PAUSED, } enum class Value { - CLOSED, ENABLED, + CLOSED, PAUSED, _UNKNOWN, } fun value(): Value = when (this) { - CLOSED -> Value.CLOSED ENABLED -> Value.ENABLED + CLOSED -> Value.CLOSED PAUSED -> Value.PAUSED else -> Value._UNKNOWN } fun known(): Known = when (this) { - CLOSED -> Known.CLOSED ENABLED -> Known.ENABLED + CLOSED -> Known.CLOSED PAUSED -> Known.PAUSED else -> throw LithicInvalidDataException("Unknown State: $value") } @@ -945,6 +953,8 @@ private constructor( companion object { + @JvmField val PENDING = VerificationState(JsonField.of("PENDING")) + @JvmField val ENABLED = VerificationState(JsonField.of("ENABLED")) @JvmField @@ -952,41 +962,39 @@ private constructor( @JvmField val INSUFFICIENT_FUNDS = VerificationState(JsonField.of("INSUFFICIENT_FUNDS")) - @JvmField val PENDING = VerificationState(JsonField.of("PENDING")) - @JvmStatic fun of(value: String) = VerificationState(JsonField.of(value)) } enum class Known { + PENDING, ENABLED, FAILED_VERIFICATION, INSUFFICIENT_FUNDS, - PENDING, } enum class Value { + PENDING, ENABLED, FAILED_VERIFICATION, INSUFFICIENT_FUNDS, - PENDING, _UNKNOWN, } fun value(): Value = when (this) { + PENDING -> Value.PENDING ENABLED -> Value.ENABLED FAILED_VERIFICATION -> Value.FAILED_VERIFICATION INSUFFICIENT_FUNDS -> Value.INSUFFICIENT_FUNDS - PENDING -> Value.PENDING else -> Value._UNKNOWN } fun known(): Known = when (this) { + PENDING -> Known.PENDING ENABLED -> Known.ENABLED FAILED_VERIFICATION -> Known.FAILED_VERIFICATION INSUFFICIENT_FUNDS -> Known.INSUFFICIENT_FUNDS - PENDING -> Known.PENDING else -> throw LithicInvalidDataException("Unknown VerificationState: $value") } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateParams.kt index 6dba68e2..8f832fd5 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateParams.kt @@ -92,25 +92,31 @@ constructor( private var hashCode: Int = 0 - /** - * Address used during Address Verification Service (AVS) checks during transactions if - * enabled via Auth Rules. - */ + /** Address */ @JsonProperty("address") fun address(): ExternalBankAccountAddress? = address + /** Optional field that helps identify bank accounts in receipts */ @JsonProperty("company_id") fun companyId(): String? = companyId /** Date of Birth of the Individual that owns the external bank account */ @JsonProperty("dob") fun dob(): LocalDate? = dob + /** Doing Business As */ @JsonProperty("doing_business_as") fun doingBusinessAs(): String? = doingBusinessAs + /** The nickname given to this record of External Bank Account */ @JsonProperty("name") fun name(): String? = name + /** + * Legal Name of the business or individual who owns the external account. This will appear + * in statements + */ @JsonProperty("owner") fun owner(): String? = owner + /** Owner Type */ @JsonProperty("owner_type") fun ownerType(): OwnerType? = ownerType + /** User Defined ID */ @JsonProperty("user_defined_id") fun userDefinedId(): String? = userDefinedId @JsonAnyGetter @@ -188,31 +194,37 @@ constructor( additionalProperties(externalBankAccountUpdateBody.additionalProperties) } - /** - * Address used during Address Verification Service (AVS) checks during transactions if - * enabled via Auth Rules. - */ + /** Address */ @JsonProperty("address") fun address(address: ExternalBankAccountAddress) = apply { this.address = address } + /** Optional field that helps identify bank accounts in receipts */ @JsonProperty("company_id") fun companyId(companyId: String) = apply { this.companyId = companyId } /** Date of Birth of the Individual that owns the external bank account */ @JsonProperty("dob") fun dob(dob: LocalDate) = apply { this.dob = dob } + /** Doing Business As */ @JsonProperty("doing_business_as") fun doingBusinessAs(doingBusinessAs: String) = apply { this.doingBusinessAs = doingBusinessAs } + /** The nickname given to this record of External Bank Account */ @JsonProperty("name") fun name(name: String) = apply { this.name = name } + /** + * Legal Name of the business or individual who owns the external account. This will + * appear in statements + */ @JsonProperty("owner") fun owner(owner: String) = apply { this.owner = owner } + /** Owner Type */ @JsonProperty("owner_type") fun ownerType(ownerType: OwnerType) = apply { this.ownerType = ownerType } + /** User Defined ID */ @JsonProperty("user_defined_id") fun userDefinedId(userDefinedId: String) = apply { this.userDefinedId = userDefinedId } @@ -336,27 +348,33 @@ constructor( this.externalBankAccountToken = externalBankAccountToken } - /** - * Address used during Address Verification Service (AVS) checks during transactions if - * enabled via Auth Rules. - */ + /** Address */ fun address(address: ExternalBankAccountAddress) = apply { this.address = address } + /** Optional field that helps identify bank accounts in receipts */ fun companyId(companyId: String) = apply { this.companyId = companyId } /** Date of Birth of the Individual that owns the external bank account */ fun dob(dob: LocalDate) = apply { this.dob = dob } + /** Doing Business As */ fun doingBusinessAs(doingBusinessAs: String) = apply { this.doingBusinessAs = doingBusinessAs } + /** The nickname given to this record of External Bank Account */ fun name(name: String) = apply { this.name = name } + /** + * Legal Name of the business or individual who owns the external account. This will appear + * in statements + */ fun owner(owner: String) = apply { this.owner = owner } + /** Owner Type */ fun ownerType(ownerType: OwnerType) = apply { this.ownerType = ownerType } + /** User Defined ID */ fun userDefinedId(userDefinedId: String) = apply { this.userDefinedId = userDefinedId } fun additionalQueryParams(additionalQueryParams: Map>) = apply { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponse.kt index e3c94ebd..50ff4eda 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponse.kt @@ -24,28 +24,28 @@ import java.util.Optional @NoAutoDetect class ExternalBankAccountUpdateResponse private constructor( - private val accountToken: JsonField, - private val address: JsonField, - private val companyId: JsonField, + private val token: JsonField, + private val owner: JsonField, + private val routingNumber: JsonField, + private val lastFour: JsonField, + private val name: JsonField, + private val currency: JsonField, private val country: JsonField, + private val accountToken: JsonField, private val created: JsonField, - private val currency: JsonField, + private val companyId: JsonField, private val dob: JsonField, private val doingBusinessAs: JsonField, - private val lastFour: JsonField, - private val name: JsonField, - private val financialAccountToken: JsonField, - private val owner: JsonField, - private val ownerType: JsonField, - private val routingNumber: JsonField, - private val state: JsonField, - private val token: JsonField, - private val type: JsonField, private val userDefinedId: JsonField, - private val verificationAttempts: JsonField, private val verificationFailedReason: JsonField, + private val verificationAttempts: JsonField, + private val financialAccountToken: JsonField, + private val type: JsonField, private val verificationMethod: JsonField, + private val ownerType: JsonField, + private val state: JsonField, private val verificationState: JsonField, + private val address: JsonField, private val additionalProperties: Map, ) { @@ -54,39 +54,20 @@ private constructor( private var hashCode: Int = 0 /** - * Indicates which Lithic account the external account is associated with. For external accounts - * that are associated with the program, account_token field returned will be null - */ - fun accountToken(): Optional = - Optional.ofNullable(accountToken.getNullable("account_token")) - - /** - * Address used during Address Verification Service (AVS) checks during transactions if enabled - * via Auth Rules. + * A globally unique identifier for this record of an external bank account association. If a + * program links an external bank account to more than one end-user or to both the program and + * the end-user, then Lithic will return each record of the association */ - fun address(): Optional = - Optional.ofNullable(address.getNullable("address")) - - /** Optional field that helps identify bank accounts in receipts */ - fun companyId(): Optional = Optional.ofNullable(companyId.getNullable("company_id")) + fun token(): String = token.getRequired("token") /** - * The country that the bank account is located in using ISO 3166-1. We will only accept USA - * bank accounts e.g., USA + * Legal Name of the business or individual who owns the external account. This will appear in + * statements */ - fun country(): String = country.getRequired("country") - - /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ - fun created(): OffsetDateTime = created.getRequired("created") - - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - fun currency(): String = currency.getRequired("currency") - - /** Date of Birth of the Individual that owns the external bank account */ - fun dob(): Optional = Optional.ofNullable(dob.getNullable("dob")) + fun owner(): String = owner.getRequired("owner") - fun doingBusinessAs(): Optional = - Optional.ofNullable(doingBusinessAs.getNullable("doing_business_as")) + /** Routing Number */ + fun routingNumber(): String = routingNumber.getRequired("routing_number") /** The last 4 digits of the bank account. Derived by Lithic from the account number passed */ fun lastFour(): String = lastFour.getRequired("last_four") @@ -94,40 +75,39 @@ private constructor( /** The nickname given to this record of External Bank Account */ fun name(): Optional = Optional.ofNullable(name.getNullable("name")) + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + fun currency(): String = currency.getRequired("currency") + /** - * The financial account token of the operating account, which will provide the funds for micro - * deposits used to verify the account + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - fun financialAccountToken(): Optional = - Optional.ofNullable(financialAccountToken.getNullable("financial_account_token")) + fun country(): String = country.getRequired("country") /** - * Legal Name of the business or individual who owns the external account. This will appear in - * statements + * Indicates which Lithic account the external account is associated with. For external accounts + * that are associated with the program, account_token field returned will be null */ - fun owner(): String = owner.getRequired("owner") - - fun ownerType(): OwnerType = ownerType.getRequired("owner_type") + fun accountToken(): Optional = + Optional.ofNullable(accountToken.getNullable("account_token")) - fun routingNumber(): String = routingNumber.getRequired("routing_number") + /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ + fun created(): OffsetDateTime = created.getRequired("created") - fun state(): State = state.getRequired("state") + /** Optional field that helps identify bank accounts in receipts */ + fun companyId(): Optional = Optional.ofNullable(companyId.getNullable("company_id")) - /** - * A globally unique identifier for this record of an external bank account association. If a - * program links an external bank account to more than one end-user or to both the program and - * the end-user, then Lithic will return each record of the association - */ - fun token(): String = token.getRequired("token") + /** Date of Birth of the Individual that owns the external bank account */ + fun dob(): Optional = Optional.ofNullable(dob.getNullable("dob")) - fun type(): Type = type.getRequired("type") + /** Doing Business As */ + fun doingBusinessAs(): Optional = + Optional.ofNullable(doingBusinessAs.getNullable("doing_business_as")) + /** User Defined ID */ fun userDefinedId(): Optional = Optional.ofNullable(userDefinedId.getNullable("user_defined_id")) - /** The number of attempts at verification */ - fun verificationAttempts(): Long = verificationAttempts.getRequired("verification_attempts") - /** * Optional free text description of the reason for the failed verification. For ACH * micro-deposits returned, this field will display the reason return code sent by the ACH @@ -136,42 +116,48 @@ private constructor( fun verificationFailedReason(): Optional = Optional.ofNullable(verificationFailedReason.getNullable("verification_failed_reason")) + /** The number of attempts at verification */ + fun verificationAttempts(): Long = verificationAttempts.getRequired("verification_attempts") + + /** The financial account token of the operating account to fund the micro deposits */ + fun financialAccountToken(): Optional = + Optional.ofNullable(financialAccountToken.getNullable("financial_account_token")) + + /** Account Type */ + fun type(): Type = type.getRequired("type") + + /** Verification Method */ fun verificationMethod(): VerificationMethod = verificationMethod.getRequired("verification_method") + /** Owner Type */ + fun ownerType(): OwnerType = ownerType.getRequired("owner_type") + + /** Account State */ + fun state(): State = state.getRequired("state") + + /** Verification State */ fun verificationState(): VerificationState = verificationState.getRequired("verification_state") - /** - * Indicates which Lithic account the external account is associated with. For external accounts - * that are associated with the program, account_token field returned will be null - */ - @JsonProperty("account_token") @ExcludeMissing fun _accountToken() = accountToken + /** Address */ + fun address(): Optional = + Optional.ofNullable(address.getNullable("address")) /** - * Address used during Address Verification Service (AVS) checks during transactions if enabled - * via Auth Rules. + * A globally unique identifier for this record of an external bank account association. If a + * program links an external bank account to more than one end-user or to both the program and + * the end-user, then Lithic will return each record of the association */ - @JsonProperty("address") @ExcludeMissing fun _address() = address - - /** Optional field that helps identify bank accounts in receipts */ - @JsonProperty("company_id") @ExcludeMissing fun _companyId() = companyId + @JsonProperty("token") @ExcludeMissing fun _token() = token /** - * The country that the bank account is located in using ISO 3166-1. We will only accept USA - * bank accounts e.g., USA + * Legal Name of the business or individual who owns the external account. This will appear in + * statements */ - @JsonProperty("country") @ExcludeMissing fun _country() = country - - /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ - @JsonProperty("created") @ExcludeMissing fun _created() = created - - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - @JsonProperty("currency") @ExcludeMissing fun _currency() = currency - - /** Date of Birth of the Individual that owns the external bank account */ - @JsonProperty("dob") @ExcludeMissing fun _dob() = dob + @JsonProperty("owner") @ExcludeMissing fun _owner() = owner - @JsonProperty("doing_business_as") @ExcludeMissing fun _doingBusinessAs() = doingBusinessAs + /** Routing Number */ + @JsonProperty("routing_number") @ExcludeMissing fun _routingNumber() = routingNumber /** The last 4 digits of the bank account. Derived by Lithic from the account number passed */ @JsonProperty("last_four") @ExcludeMissing fun _lastFour() = lastFour @@ -179,42 +165,36 @@ private constructor( /** The nickname given to this record of External Bank Account */ @JsonProperty("name") @ExcludeMissing fun _name() = name + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + @JsonProperty("currency") @ExcludeMissing fun _currency() = currency + /** - * The financial account token of the operating account, which will provide the funds for micro - * deposits used to verify the account + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - @JsonProperty("financial_account_token") - @ExcludeMissing - fun _financialAccountToken() = financialAccountToken + @JsonProperty("country") @ExcludeMissing fun _country() = country /** - * Legal Name of the business or individual who owns the external account. This will appear in - * statements + * Indicates which Lithic account the external account is associated with. For external accounts + * that are associated with the program, account_token field returned will be null */ - @JsonProperty("owner") @ExcludeMissing fun _owner() = owner - - @JsonProperty("owner_type") @ExcludeMissing fun _ownerType() = ownerType + @JsonProperty("account_token") @ExcludeMissing fun _accountToken() = accountToken - @JsonProperty("routing_number") @ExcludeMissing fun _routingNumber() = routingNumber + /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ + @JsonProperty("created") @ExcludeMissing fun _created() = created - @JsonProperty("state") @ExcludeMissing fun _state() = state + /** Optional field that helps identify bank accounts in receipts */ + @JsonProperty("company_id") @ExcludeMissing fun _companyId() = companyId - /** - * A globally unique identifier for this record of an external bank account association. If a - * program links an external bank account to more than one end-user or to both the program and - * the end-user, then Lithic will return each record of the association - */ - @JsonProperty("token") @ExcludeMissing fun _token() = token + /** Date of Birth of the Individual that owns the external bank account */ + @JsonProperty("dob") @ExcludeMissing fun _dob() = dob - @JsonProperty("type") @ExcludeMissing fun _type() = type + /** Doing Business As */ + @JsonProperty("doing_business_as") @ExcludeMissing fun _doingBusinessAs() = doingBusinessAs + /** User Defined ID */ @JsonProperty("user_defined_id") @ExcludeMissing fun _userDefinedId() = userDefinedId - /** The number of attempts at verification */ - @JsonProperty("verification_attempts") - @ExcludeMissing - fun _verificationAttempts() = verificationAttempts - /** * Optional free text description of the reason for the failed verification. For ACH * micro-deposits returned, this field will display the reason return code sent by the ACH @@ -224,40 +204,64 @@ private constructor( @ExcludeMissing fun _verificationFailedReason() = verificationFailedReason + /** The number of attempts at verification */ + @JsonProperty("verification_attempts") + @ExcludeMissing + fun _verificationAttempts() = verificationAttempts + + /** The financial account token of the operating account to fund the micro deposits */ + @JsonProperty("financial_account_token") + @ExcludeMissing + fun _financialAccountToken() = financialAccountToken + + /** Account Type */ + @JsonProperty("type") @ExcludeMissing fun _type() = type + + /** Verification Method */ @JsonProperty("verification_method") @ExcludeMissing fun _verificationMethod() = verificationMethod + /** Owner Type */ + @JsonProperty("owner_type") @ExcludeMissing fun _ownerType() = ownerType + + /** Account State */ + @JsonProperty("state") @ExcludeMissing fun _state() = state + + /** Verification State */ @JsonProperty("verification_state") @ExcludeMissing fun _verificationState() = verificationState + /** Address */ + @JsonProperty("address") @ExcludeMissing fun _address() = address + @JsonAnyGetter @ExcludeMissing fun _additionalProperties(): Map = additionalProperties fun validate(): ExternalBankAccountUpdateResponse = apply { if (!validated) { - accountToken() - address().map { it.validate() } - companyId() + token() + owner() + routingNumber() + lastFour() + name() + currency() country() + accountToken() created() - currency() + companyId() dob() doingBusinessAs() - lastFour() - name() - financialAccountToken() - owner() - ownerType() - routingNumber() - state() - token() - type() userDefinedId() - verificationAttempts() verificationFailedReason() + verificationAttempts() + financialAccountToken() + type() verificationMethod() + ownerType() + state() verificationState() + address().map { it.validate() } validated = true } } @@ -270,28 +274,28 @@ private constructor( } return other is ExternalBankAccountUpdateResponse && - this.accountToken == other.accountToken && - this.address == other.address && - this.companyId == other.companyId && + this.token == other.token && + this.owner == other.owner && + this.routingNumber == other.routingNumber && + this.lastFour == other.lastFour && + this.name == other.name && + this.currency == other.currency && this.country == other.country && + this.accountToken == other.accountToken && this.created == other.created && - this.currency == other.currency && + this.companyId == other.companyId && this.dob == other.dob && this.doingBusinessAs == other.doingBusinessAs && - this.lastFour == other.lastFour && - this.name == other.name && - this.financialAccountToken == other.financialAccountToken && - this.owner == other.owner && - this.ownerType == other.ownerType && - this.routingNumber == other.routingNumber && - this.state == other.state && - this.token == other.token && - this.type == other.type && this.userDefinedId == other.userDefinedId && - this.verificationAttempts == other.verificationAttempts && this.verificationFailedReason == other.verificationFailedReason && + this.verificationAttempts == other.verificationAttempts && + this.financialAccountToken == other.financialAccountToken && + this.type == other.type && this.verificationMethod == other.verificationMethod && + this.ownerType == other.ownerType && + this.state == other.state && this.verificationState == other.verificationState && + this.address == other.address && this.additionalProperties == other.additionalProperties } @@ -299,28 +303,28 @@ private constructor( if (hashCode == 0) { hashCode = Objects.hash( - accountToken, - address, - companyId, + token, + owner, + routingNumber, + lastFour, + name, + currency, country, + accountToken, created, - currency, + companyId, dob, doingBusinessAs, - lastFour, - name, - financialAccountToken, - owner, - ownerType, - routingNumber, - state, - token, - type, userDefinedId, - verificationAttempts, verificationFailedReason, + verificationAttempts, + financialAccountToken, + type, verificationMethod, + ownerType, + state, verificationState, + address, additionalProperties, ) } @@ -328,7 +332,7 @@ private constructor( } override fun toString() = - "ExternalBankAccountUpdateResponse{accountToken=$accountToken, address=$address, companyId=$companyId, country=$country, created=$created, currency=$currency, dob=$dob, doingBusinessAs=$doingBusinessAs, lastFour=$lastFour, name=$name, financialAccountToken=$financialAccountToken, owner=$owner, ownerType=$ownerType, routingNumber=$routingNumber, state=$state, token=$token, type=$type, userDefinedId=$userDefinedId, verificationAttempts=$verificationAttempts, verificationFailedReason=$verificationFailedReason, verificationMethod=$verificationMethod, verificationState=$verificationState, additionalProperties=$additionalProperties}" + "ExternalBankAccountUpdateResponse{token=$token, owner=$owner, routingNumber=$routingNumber, lastFour=$lastFour, name=$name, currency=$currency, country=$country, accountToken=$accountToken, created=$created, companyId=$companyId, dob=$dob, doingBusinessAs=$doingBusinessAs, userDefinedId=$userDefinedId, verificationFailedReason=$verificationFailedReason, verificationAttempts=$verificationAttempts, financialAccountToken=$financialAccountToken, type=$type, verificationMethod=$verificationMethod, ownerType=$ownerType, state=$state, verificationState=$verificationState, address=$address, additionalProperties=$additionalProperties}" companion object { @@ -337,148 +341,97 @@ private constructor( class Builder { - private var accountToken: JsonField = JsonMissing.of() - private var address: JsonField = JsonMissing.of() - private var companyId: JsonField = JsonMissing.of() + private var token: JsonField = JsonMissing.of() + private var owner: JsonField = JsonMissing.of() + private var routingNumber: JsonField = JsonMissing.of() + private var lastFour: JsonField = JsonMissing.of() + private var name: JsonField = JsonMissing.of() + private var currency: JsonField = JsonMissing.of() private var country: JsonField = JsonMissing.of() + private var accountToken: JsonField = JsonMissing.of() private var created: JsonField = JsonMissing.of() - private var currency: JsonField = JsonMissing.of() + private var companyId: JsonField = JsonMissing.of() private var dob: JsonField = JsonMissing.of() private var doingBusinessAs: JsonField = JsonMissing.of() - private var lastFour: JsonField = JsonMissing.of() - private var name: JsonField = JsonMissing.of() - private var financialAccountToken: JsonField = JsonMissing.of() - private var owner: JsonField = JsonMissing.of() - private var ownerType: JsonField = JsonMissing.of() - private var routingNumber: JsonField = JsonMissing.of() - private var state: JsonField = JsonMissing.of() - private var token: JsonField = JsonMissing.of() - private var type: JsonField = JsonMissing.of() private var userDefinedId: JsonField = JsonMissing.of() - private var verificationAttempts: JsonField = JsonMissing.of() private var verificationFailedReason: JsonField = JsonMissing.of() + private var verificationAttempts: JsonField = JsonMissing.of() + private var financialAccountToken: JsonField = JsonMissing.of() + private var type: JsonField = JsonMissing.of() private var verificationMethod: JsonField = JsonMissing.of() + private var ownerType: JsonField = JsonMissing.of() + private var state: JsonField = JsonMissing.of() private var verificationState: JsonField = JsonMissing.of() + private var address: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(externalBankAccountUpdateResponse: ExternalBankAccountUpdateResponse) = apply { - this.accountToken = externalBankAccountUpdateResponse.accountToken - this.address = externalBankAccountUpdateResponse.address - this.companyId = externalBankAccountUpdateResponse.companyId + this.token = externalBankAccountUpdateResponse.token + this.owner = externalBankAccountUpdateResponse.owner + this.routingNumber = externalBankAccountUpdateResponse.routingNumber + this.lastFour = externalBankAccountUpdateResponse.lastFour + this.name = externalBankAccountUpdateResponse.name + this.currency = externalBankAccountUpdateResponse.currency this.country = externalBankAccountUpdateResponse.country + this.accountToken = externalBankAccountUpdateResponse.accountToken this.created = externalBankAccountUpdateResponse.created - this.currency = externalBankAccountUpdateResponse.currency + this.companyId = externalBankAccountUpdateResponse.companyId this.dob = externalBankAccountUpdateResponse.dob this.doingBusinessAs = externalBankAccountUpdateResponse.doingBusinessAs - this.lastFour = externalBankAccountUpdateResponse.lastFour - this.name = externalBankAccountUpdateResponse.name - this.financialAccountToken = externalBankAccountUpdateResponse.financialAccountToken - this.owner = externalBankAccountUpdateResponse.owner - this.ownerType = externalBankAccountUpdateResponse.ownerType - this.routingNumber = externalBankAccountUpdateResponse.routingNumber - this.state = externalBankAccountUpdateResponse.state - this.token = externalBankAccountUpdateResponse.token - this.type = externalBankAccountUpdateResponse.type this.userDefinedId = externalBankAccountUpdateResponse.userDefinedId - this.verificationAttempts = externalBankAccountUpdateResponse.verificationAttempts this.verificationFailedReason = externalBankAccountUpdateResponse.verificationFailedReason + this.verificationAttempts = externalBankAccountUpdateResponse.verificationAttempts + this.financialAccountToken = externalBankAccountUpdateResponse.financialAccountToken + this.type = externalBankAccountUpdateResponse.type this.verificationMethod = externalBankAccountUpdateResponse.verificationMethod + this.ownerType = externalBankAccountUpdateResponse.ownerType + this.state = externalBankAccountUpdateResponse.state this.verificationState = externalBankAccountUpdateResponse.verificationState - additionalProperties(externalBankAccountUpdateResponse.additionalProperties) - } - - /** - * Indicates which Lithic account the external account is associated with. For external - * accounts that are associated with the program, account_token field returned will be null - */ - fun accountToken(accountToken: String) = accountToken(JsonField.of(accountToken)) - - /** - * Indicates which Lithic account the external account is associated with. For external - * accounts that are associated with the program, account_token field returned will be null - */ - @JsonProperty("account_token") - @ExcludeMissing - fun accountToken(accountToken: JsonField) = apply { - this.accountToken = accountToken - } - - /** - * Address used during Address Verification Service (AVS) checks during transactions if - * enabled via Auth Rules. - */ - fun address(address: ExternalBankAccountAddress) = address(JsonField.of(address)) - - /** - * Address used during Address Verification Service (AVS) checks during transactions if - * enabled via Auth Rules. - */ - @JsonProperty("address") - @ExcludeMissing - fun address(address: JsonField) = apply { - this.address = address - } - - /** Optional field that helps identify bank accounts in receipts */ - fun companyId(companyId: String) = companyId(JsonField.of(companyId)) - - /** Optional field that helps identify bank accounts in receipts */ - @JsonProperty("company_id") - @ExcludeMissing - fun companyId(companyId: JsonField) = apply { this.companyId = companyId } + this.address = externalBankAccountUpdateResponse.address + additionalProperties(externalBankAccountUpdateResponse.additionalProperties) + } /** - * The country that the bank account is located in using ISO 3166-1. We will only accept USA - * bank accounts e.g., USA + * A globally unique identifier for this record of an external bank account association. If + * a program links an external bank account to more than one end-user or to both the program + * and the end-user, then Lithic will return each record of the association */ - fun country(country: String) = country(JsonField.of(country)) + fun token(token: String) = token(JsonField.of(token)) /** - * The country that the bank account is located in using ISO 3166-1. We will only accept USA - * bank accounts e.g., USA + * A globally unique identifier for this record of an external bank account association. If + * a program links an external bank account to more than one end-user or to both the program + * and the end-user, then Lithic will return each record of the association */ - @JsonProperty("country") + @JsonProperty("token") @ExcludeMissing - fun country(country: JsonField) = apply { this.country = country } + fun token(token: JsonField) = apply { this.token = token } /** - * An ISO 8601 string representing when this funding source was added to the Lithic account. + * Legal Name of the business or individual who owns the external account. This will appear + * in statements */ - fun created(created: OffsetDateTime) = created(JsonField.of(created)) + fun owner(owner: String) = owner(JsonField.of(owner)) /** - * An ISO 8601 string representing when this funding source was added to the Lithic account. + * Legal Name of the business or individual who owns the external account. This will appear + * in statements */ - @JsonProperty("created") - @ExcludeMissing - fun created(created: JsonField) = apply { this.created = created } - - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - fun currency(currency: String) = currency(JsonField.of(currency)) - - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - @JsonProperty("currency") - @ExcludeMissing - fun currency(currency: JsonField) = apply { this.currency = currency } - - /** Date of Birth of the Individual that owns the external bank account */ - fun dob(dob: LocalDate) = dob(JsonField.of(dob)) - - /** Date of Birth of the Individual that owns the external bank account */ - @JsonProperty("dob") + @JsonProperty("owner") @ExcludeMissing - fun dob(dob: JsonField) = apply { this.dob = dob } + fun owner(owner: JsonField) = apply { this.owner = owner } - fun doingBusinessAs(doingBusinessAs: String) = - doingBusinessAs(JsonField.of(doingBusinessAs)) + /** Routing Number */ + fun routingNumber(routingNumber: String) = routingNumber(JsonField.of(routingNumber)) - @JsonProperty("doing_business_as") + /** Routing Number */ + @JsonProperty("routing_number") @ExcludeMissing - fun doingBusinessAs(doingBusinessAs: JsonField) = apply { - this.doingBusinessAs = doingBusinessAs + fun routingNumber(routingNumber: JsonField) = apply { + this.routingNumber = routingNumber } /** @@ -501,98 +454,93 @@ private constructor( @ExcludeMissing fun name(name: JsonField) = apply { this.name = name } + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + fun currency(currency: String) = currency(JsonField.of(currency)) + + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + @JsonProperty("currency") + @ExcludeMissing + fun currency(currency: JsonField) = apply { this.currency = currency } + /** - * The financial account token of the operating account, which will provide the funds for - * micro deposits used to verify the account + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - fun financialAccountToken(financialAccountToken: String) = - financialAccountToken(JsonField.of(financialAccountToken)) + fun country(country: String) = country(JsonField.of(country)) /** - * The financial account token of the operating account, which will provide the funds for - * micro deposits used to verify the account + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - @JsonProperty("financial_account_token") + @JsonProperty("country") @ExcludeMissing - fun financialAccountToken(financialAccountToken: JsonField) = apply { - this.financialAccountToken = financialAccountToken - } + fun country(country: JsonField) = apply { this.country = country } /** - * Legal Name of the business or individual who owns the external account. This will appear - * in statements + * Indicates which Lithic account the external account is associated with. For external + * accounts that are associated with the program, account_token field returned will be null */ - fun owner(owner: String) = owner(JsonField.of(owner)) + fun accountToken(accountToken: String) = accountToken(JsonField.of(accountToken)) /** - * Legal Name of the business or individual who owns the external account. This will appear - * in statements + * Indicates which Lithic account the external account is associated with. For external + * accounts that are associated with the program, account_token field returned will be null */ - @JsonProperty("owner") - @ExcludeMissing - fun owner(owner: JsonField) = apply { this.owner = owner } - - fun ownerType(ownerType: OwnerType) = ownerType(JsonField.of(ownerType)) - - @JsonProperty("owner_type") + @JsonProperty("account_token") @ExcludeMissing - fun ownerType(ownerType: JsonField) = apply { this.ownerType = ownerType } + fun accountToken(accountToken: JsonField) = apply { + this.accountToken = accountToken + } - fun routingNumber(routingNumber: String) = routingNumber(JsonField.of(routingNumber)) + /** + * An ISO 8601 string representing when this funding source was added to the Lithic account. + */ + fun created(created: OffsetDateTime) = created(JsonField.of(created)) - @JsonProperty("routing_number") + /** + * An ISO 8601 string representing when this funding source was added to the Lithic account. + */ + @JsonProperty("created") @ExcludeMissing - fun routingNumber(routingNumber: JsonField) = apply { - this.routingNumber = routingNumber - } + fun created(created: JsonField) = apply { this.created = created } - fun state(state: State) = state(JsonField.of(state)) + /** Optional field that helps identify bank accounts in receipts */ + fun companyId(companyId: String) = companyId(JsonField.of(companyId)) - @JsonProperty("state") + /** Optional field that helps identify bank accounts in receipts */ + @JsonProperty("company_id") @ExcludeMissing - fun state(state: JsonField) = apply { this.state = state } + fun companyId(companyId: JsonField) = apply { this.companyId = companyId } - /** - * A globally unique identifier for this record of an external bank account association. If - * a program links an external bank account to more than one end-user or to both the program - * and the end-user, then Lithic will return each record of the association - */ - fun token(token: String) = token(JsonField.of(token)) + /** Date of Birth of the Individual that owns the external bank account */ + fun dob(dob: LocalDate) = dob(JsonField.of(dob)) - /** - * A globally unique identifier for this record of an external bank account association. If - * a program links an external bank account to more than one end-user or to both the program - * and the end-user, then Lithic will return each record of the association - */ - @JsonProperty("token") + /** Date of Birth of the Individual that owns the external bank account */ + @JsonProperty("dob") @ExcludeMissing - fun token(token: JsonField) = apply { this.token = token } + fun dob(dob: JsonField) = apply { this.dob = dob } - fun type(type: Type) = type(JsonField.of(type)) + /** Doing Business As */ + fun doingBusinessAs(doingBusinessAs: String) = + doingBusinessAs(JsonField.of(doingBusinessAs)) - @JsonProperty("type") + /** Doing Business As */ + @JsonProperty("doing_business_as") @ExcludeMissing - fun type(type: JsonField) = apply { this.type = type } + fun doingBusinessAs(doingBusinessAs: JsonField) = apply { + this.doingBusinessAs = doingBusinessAs + } + /** User Defined ID */ fun userDefinedId(userDefinedId: String) = userDefinedId(JsonField.of(userDefinedId)) + /** User Defined ID */ @JsonProperty("user_defined_id") @ExcludeMissing fun userDefinedId(userDefinedId: JsonField) = apply { this.userDefinedId = userDefinedId } - /** The number of attempts at verification */ - fun verificationAttempts(verificationAttempts: Long) = - verificationAttempts(JsonField.of(verificationAttempts)) - - /** The number of attempts at verification */ - @JsonProperty("verification_attempts") - @ExcludeMissing - fun verificationAttempts(verificationAttempts: JsonField) = apply { - this.verificationAttempts = verificationAttempts - } - /** * Optional free text description of the reason for the failed verification. For ACH * micro-deposits returned, this field will display the reason return code sent by the ACH @@ -612,24 +560,84 @@ private constructor( this.verificationFailedReason = verificationFailedReason } + /** The number of attempts at verification */ + fun verificationAttempts(verificationAttempts: Long) = + verificationAttempts(JsonField.of(verificationAttempts)) + + /** The number of attempts at verification */ + @JsonProperty("verification_attempts") + @ExcludeMissing + fun verificationAttempts(verificationAttempts: JsonField) = apply { + this.verificationAttempts = verificationAttempts + } + + /** The financial account token of the operating account to fund the micro deposits */ + fun financialAccountToken(financialAccountToken: String) = + financialAccountToken(JsonField.of(financialAccountToken)) + + /** The financial account token of the operating account to fund the micro deposits */ + @JsonProperty("financial_account_token") + @ExcludeMissing + fun financialAccountToken(financialAccountToken: JsonField) = apply { + this.financialAccountToken = financialAccountToken + } + + /** Account Type */ + fun type(type: Type) = type(JsonField.of(type)) + + /** Account Type */ + @JsonProperty("type") + @ExcludeMissing + fun type(type: JsonField) = apply { this.type = type } + + /** Verification Method */ fun verificationMethod(verificationMethod: VerificationMethod) = verificationMethod(JsonField.of(verificationMethod)) + /** Verification Method */ @JsonProperty("verification_method") @ExcludeMissing fun verificationMethod(verificationMethod: JsonField) = apply { this.verificationMethod = verificationMethod } + /** Owner Type */ + fun ownerType(ownerType: OwnerType) = ownerType(JsonField.of(ownerType)) + + /** Owner Type */ + @JsonProperty("owner_type") + @ExcludeMissing + fun ownerType(ownerType: JsonField) = apply { this.ownerType = ownerType } + + /** Account State */ + fun state(state: State) = state(JsonField.of(state)) + + /** Account State */ + @JsonProperty("state") + @ExcludeMissing + fun state(state: JsonField) = apply { this.state = state } + + /** Verification State */ fun verificationState(verificationState: VerificationState) = verificationState(JsonField.of(verificationState)) + /** Verification State */ @JsonProperty("verification_state") @ExcludeMissing fun verificationState(verificationState: JsonField) = apply { this.verificationState = verificationState } + /** Address */ + fun address(address: ExternalBankAccountAddress) = address(JsonField.of(address)) + + /** Address */ + @JsonProperty("address") + @ExcludeMissing + fun address(address: JsonField) = apply { + this.address = address + } + fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() this.additionalProperties.putAll(additionalProperties) @@ -646,28 +654,28 @@ private constructor( fun build(): ExternalBankAccountUpdateResponse = ExternalBankAccountUpdateResponse( - accountToken, - address, - companyId, + token, + owner, + routingNumber, + lastFour, + name, + currency, country, + accountToken, created, - currency, + companyId, dob, doingBusinessAs, - lastFour, - name, - financialAccountToken, - owner, - ownerType, - routingNumber, - state, - token, - type, userDefinedId, - verificationAttempts, verificationFailedReason, + verificationAttempts, + financialAccountToken, + type, verificationMethod, + ownerType, + state, verificationState, + address, additionalProperties.toUnmodifiable(), ) } @@ -751,40 +759,40 @@ private constructor( companion object { - @JvmField val CLOSED = State(JsonField.of("CLOSED")) - @JvmField val ENABLED = State(JsonField.of("ENABLED")) + @JvmField val CLOSED = State(JsonField.of("CLOSED")) + @JvmField val PAUSED = State(JsonField.of("PAUSED")) @JvmStatic fun of(value: String) = State(JsonField.of(value)) } enum class Known { - CLOSED, ENABLED, + CLOSED, PAUSED, } enum class Value { - CLOSED, ENABLED, + CLOSED, PAUSED, _UNKNOWN, } fun value(): Value = when (this) { - CLOSED -> Value.CLOSED ENABLED -> Value.ENABLED + CLOSED -> Value.CLOSED PAUSED -> Value.PAUSED else -> Value._UNKNOWN } fun known(): Known = when (this) { - CLOSED -> Known.CLOSED ENABLED -> Known.ENABLED + CLOSED -> Known.CLOSED PAUSED -> Known.PAUSED else -> throw LithicInvalidDataException("Unknown State: $value") } @@ -940,6 +948,8 @@ private constructor( companion object { + @JvmField val PENDING = VerificationState(JsonField.of("PENDING")) + @JvmField val ENABLED = VerificationState(JsonField.of("ENABLED")) @JvmField @@ -947,41 +957,39 @@ private constructor( @JvmField val INSUFFICIENT_FUNDS = VerificationState(JsonField.of("INSUFFICIENT_FUNDS")) - @JvmField val PENDING = VerificationState(JsonField.of("PENDING")) - @JvmStatic fun of(value: String) = VerificationState(JsonField.of(value)) } enum class Known { + PENDING, ENABLED, FAILED_VERIFICATION, INSUFFICIENT_FUNDS, - PENDING, } enum class Value { + PENDING, ENABLED, FAILED_VERIFICATION, INSUFFICIENT_FUNDS, - PENDING, _UNKNOWN, } fun value(): Value = when (this) { + PENDING -> Value.PENDING ENABLED -> Value.ENABLED FAILED_VERIFICATION -> Value.FAILED_VERIFICATION INSUFFICIENT_FUNDS -> Value.INSUFFICIENT_FUNDS - PENDING -> Value.PENDING else -> Value._UNKNOWN } fun known(): Known = when (this) { + PENDING -> Known.PENDING ENABLED -> Known.ENABLED FAILED_VERIFICATION -> Known.FAILED_VERIFICATION INSUFFICIENT_FUNDS -> Known.INSUFFICIENT_FUNDS - PENDING -> Known.PENDING else -> throw LithicInvalidDataException("Unknown VerificationState: $value") } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Kyb.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Kyb.kt index 7eed286c..12e1cac6 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Kyb.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Kyb.kt @@ -52,9 +52,9 @@ private constructor( beneficialOwnerEntities.getRequired("beneficial_owner_entities") /** - * List of all individuals with >25% ownership in the company. If no entity or individual - * owns >25% of the company, and the largest shareholder is an individual, please identify them - * in this field. See + * List of all direct and indirect individuals with >25% ownership in the company. If no entity + * or individual owns >25% of the company, and the largest shareholder is an individual, please + * identify them in this field. See * [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf) * (Section I) for more background on individuals that should be included. If no individual is * an entity, pass in an empty list. However, either this parameter or @@ -119,9 +119,9 @@ private constructor( fun _beneficialOwnerEntities() = beneficialOwnerEntities /** - * List of all individuals with >25% ownership in the company. If no entity or individual - * owns >25% of the company, and the largest shareholder is an individual, please identify them - * in this field. See + * List of all direct and indirect individuals with >25% ownership in the company. If no entity + * or individual owns >25% of the company, and the largest shareholder is an individual, please + * identify them in this field. See * [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf) * (Section I) for more background on individuals that should be included. If no individual is * an entity, pass in an empty list. However, either this parameter or @@ -301,9 +301,9 @@ private constructor( } /** - * List of all individuals with >25% ownership in the company. If no entity or individual - * owns >25% of the company, and the largest shareholder is an individual, please identify - * them in this field. See + * List of all direct and indirect individuals with >25% ownership in the company. If no + * entity or individual owns >25% of the company, and the largest shareholder is an + * individual, please identify them in this field. See * [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf) * (Section I) for more background on individuals that should be included. If no individual * is an entity, pass in an empty list. However, either this parameter or @@ -313,9 +313,9 @@ private constructor( beneficialOwnerIndividuals(JsonField.of(beneficialOwnerIndividuals)) /** - * List of all individuals with >25% ownership in the company. If no entity or individual - * owns >25% of the company, and the largest shareholder is an individual, please identify - * them in this field. See + * List of all direct and indirect individuals with >25% ownership in the company. If no + * entity or individual owns >25% of the company, and the largest shareholder is an + * individual, please identify them in this field. See * [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf) * (Section I) for more background on individuals that should be included. If no individual * is an entity, pass in an empty list. However, either this parameter or diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/MicroDepositCreateResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/MicroDepositCreateResponse.kt index 71bf13be..ccfda1cd 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/MicroDepositCreateResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/MicroDepositCreateResponse.kt @@ -24,28 +24,28 @@ import java.util.Optional @NoAutoDetect class MicroDepositCreateResponse private constructor( - private val accountToken: JsonField, - private val address: JsonField, - private val companyId: JsonField, + private val token: JsonField, + private val owner: JsonField, + private val routingNumber: JsonField, + private val lastFour: JsonField, + private val name: JsonField, + private val currency: JsonField, private val country: JsonField, + private val accountToken: JsonField, private val created: JsonField, - private val currency: JsonField, + private val companyId: JsonField, private val dob: JsonField, private val doingBusinessAs: JsonField, - private val lastFour: JsonField, - private val name: JsonField, - private val financialAccountToken: JsonField, - private val owner: JsonField, - private val ownerType: JsonField, - private val routingNumber: JsonField, - private val state: JsonField, - private val token: JsonField, - private val type: JsonField, private val userDefinedId: JsonField, - private val verificationAttempts: JsonField, private val verificationFailedReason: JsonField, + private val verificationAttempts: JsonField, + private val financialAccountToken: JsonField, + private val type: JsonField, private val verificationMethod: JsonField, + private val ownerType: JsonField, + private val state: JsonField, private val verificationState: JsonField, + private val address: JsonField, private val additionalProperties: Map, ) { @@ -54,39 +54,20 @@ private constructor( private var hashCode: Int = 0 /** - * Indicates which Lithic account the external account is associated with. For external accounts - * that are associated with the program, account_token field returned will be null - */ - fun accountToken(): Optional = - Optional.ofNullable(accountToken.getNullable("account_token")) - - /** - * Address used during Address Verification Service (AVS) checks during transactions if enabled - * via Auth Rules. + * A globally unique identifier for this record of an external bank account association. If a + * program links an external bank account to more than one end-user or to both the program and + * the end-user, then Lithic will return each record of the association */ - fun address(): Optional = - Optional.ofNullable(address.getNullable("address")) - - /** Optional field that helps identify bank accounts in receipts */ - fun companyId(): Optional = Optional.ofNullable(companyId.getNullable("company_id")) + fun token(): String = token.getRequired("token") /** - * The country that the bank account is located in using ISO 3166-1. We will only accept USA - * bank accounts e.g., USA + * Legal Name of the business or individual who owns the external account. This will appear in + * statements */ - fun country(): String = country.getRequired("country") - - /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ - fun created(): OffsetDateTime = created.getRequired("created") - - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - fun currency(): String = currency.getRequired("currency") - - /** Date of Birth of the Individual that owns the external bank account */ - fun dob(): Optional = Optional.ofNullable(dob.getNullable("dob")) + fun owner(): String = owner.getRequired("owner") - fun doingBusinessAs(): Optional = - Optional.ofNullable(doingBusinessAs.getNullable("doing_business_as")) + /** Routing Number */ + fun routingNumber(): String = routingNumber.getRequired("routing_number") /** The last 4 digits of the bank account. Derived by Lithic from the account number passed */ fun lastFour(): String = lastFour.getRequired("last_four") @@ -94,40 +75,39 @@ private constructor( /** The nickname given to this record of External Bank Account */ fun name(): Optional = Optional.ofNullable(name.getNullable("name")) + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + fun currency(): String = currency.getRequired("currency") + /** - * The financial account token of the operating account, which will provide the funds for micro - * deposits used to verify the account + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - fun financialAccountToken(): Optional = - Optional.ofNullable(financialAccountToken.getNullable("financial_account_token")) + fun country(): String = country.getRequired("country") /** - * Legal Name of the business or individual who owns the external account. This will appear in - * statements + * Indicates which Lithic account the external account is associated with. For external accounts + * that are associated with the program, account_token field returned will be null */ - fun owner(): String = owner.getRequired("owner") - - fun ownerType(): OwnerType = ownerType.getRequired("owner_type") + fun accountToken(): Optional = + Optional.ofNullable(accountToken.getNullable("account_token")) - fun routingNumber(): String = routingNumber.getRequired("routing_number") + /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ + fun created(): OffsetDateTime = created.getRequired("created") - fun state(): State = state.getRequired("state") + /** Optional field that helps identify bank accounts in receipts */ + fun companyId(): Optional = Optional.ofNullable(companyId.getNullable("company_id")) - /** - * A globally unique identifier for this record of an external bank account association. If a - * program links an external bank account to more than one end-user or to both the program and - * the end-user, then Lithic will return each record of the association - */ - fun token(): String = token.getRequired("token") + /** Date of Birth of the Individual that owns the external bank account */ + fun dob(): Optional = Optional.ofNullable(dob.getNullable("dob")) - fun type(): Type = type.getRequired("type") + /** Doing Business As */ + fun doingBusinessAs(): Optional = + Optional.ofNullable(doingBusinessAs.getNullable("doing_business_as")) + /** User Defined ID */ fun userDefinedId(): Optional = Optional.ofNullable(userDefinedId.getNullable("user_defined_id")) - /** The number of attempts at verification */ - fun verificationAttempts(): Long = verificationAttempts.getRequired("verification_attempts") - /** * Optional free text description of the reason for the failed verification. For ACH * micro-deposits returned, this field will display the reason return code sent by the ACH @@ -136,42 +116,48 @@ private constructor( fun verificationFailedReason(): Optional = Optional.ofNullable(verificationFailedReason.getNullable("verification_failed_reason")) + /** The number of attempts at verification */ + fun verificationAttempts(): Long = verificationAttempts.getRequired("verification_attempts") + + /** The financial account token of the operating account to fund the micro deposits */ + fun financialAccountToken(): Optional = + Optional.ofNullable(financialAccountToken.getNullable("financial_account_token")) + + /** Account Type */ + fun type(): Type = type.getRequired("type") + + /** Verification Method */ fun verificationMethod(): VerificationMethod = verificationMethod.getRequired("verification_method") + /** Owner Type */ + fun ownerType(): OwnerType = ownerType.getRequired("owner_type") + + /** Account State */ + fun state(): State = state.getRequired("state") + + /** Verification State */ fun verificationState(): VerificationState = verificationState.getRequired("verification_state") - /** - * Indicates which Lithic account the external account is associated with. For external accounts - * that are associated with the program, account_token field returned will be null - */ - @JsonProperty("account_token") @ExcludeMissing fun _accountToken() = accountToken + /** Address */ + fun address(): Optional = + Optional.ofNullable(address.getNullable("address")) /** - * Address used during Address Verification Service (AVS) checks during transactions if enabled - * via Auth Rules. + * A globally unique identifier for this record of an external bank account association. If a + * program links an external bank account to more than one end-user or to both the program and + * the end-user, then Lithic will return each record of the association */ - @JsonProperty("address") @ExcludeMissing fun _address() = address - - /** Optional field that helps identify bank accounts in receipts */ - @JsonProperty("company_id") @ExcludeMissing fun _companyId() = companyId + @JsonProperty("token") @ExcludeMissing fun _token() = token /** - * The country that the bank account is located in using ISO 3166-1. We will only accept USA - * bank accounts e.g., USA + * Legal Name of the business or individual who owns the external account. This will appear in + * statements */ - @JsonProperty("country") @ExcludeMissing fun _country() = country - - /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ - @JsonProperty("created") @ExcludeMissing fun _created() = created - - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - @JsonProperty("currency") @ExcludeMissing fun _currency() = currency - - /** Date of Birth of the Individual that owns the external bank account */ - @JsonProperty("dob") @ExcludeMissing fun _dob() = dob + @JsonProperty("owner") @ExcludeMissing fun _owner() = owner - @JsonProperty("doing_business_as") @ExcludeMissing fun _doingBusinessAs() = doingBusinessAs + /** Routing Number */ + @JsonProperty("routing_number") @ExcludeMissing fun _routingNumber() = routingNumber /** The last 4 digits of the bank account. Derived by Lithic from the account number passed */ @JsonProperty("last_four") @ExcludeMissing fun _lastFour() = lastFour @@ -179,42 +165,36 @@ private constructor( /** The nickname given to this record of External Bank Account */ @JsonProperty("name") @ExcludeMissing fun _name() = name + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + @JsonProperty("currency") @ExcludeMissing fun _currency() = currency + /** - * The financial account token of the operating account, which will provide the funds for micro - * deposits used to verify the account + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - @JsonProperty("financial_account_token") - @ExcludeMissing - fun _financialAccountToken() = financialAccountToken + @JsonProperty("country") @ExcludeMissing fun _country() = country /** - * Legal Name of the business or individual who owns the external account. This will appear in - * statements + * Indicates which Lithic account the external account is associated with. For external accounts + * that are associated with the program, account_token field returned will be null */ - @JsonProperty("owner") @ExcludeMissing fun _owner() = owner - - @JsonProperty("owner_type") @ExcludeMissing fun _ownerType() = ownerType + @JsonProperty("account_token") @ExcludeMissing fun _accountToken() = accountToken - @JsonProperty("routing_number") @ExcludeMissing fun _routingNumber() = routingNumber + /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ + @JsonProperty("created") @ExcludeMissing fun _created() = created - @JsonProperty("state") @ExcludeMissing fun _state() = state + /** Optional field that helps identify bank accounts in receipts */ + @JsonProperty("company_id") @ExcludeMissing fun _companyId() = companyId - /** - * A globally unique identifier for this record of an external bank account association. If a - * program links an external bank account to more than one end-user or to both the program and - * the end-user, then Lithic will return each record of the association - */ - @JsonProperty("token") @ExcludeMissing fun _token() = token + /** Date of Birth of the Individual that owns the external bank account */ + @JsonProperty("dob") @ExcludeMissing fun _dob() = dob - @JsonProperty("type") @ExcludeMissing fun _type() = type + /** Doing Business As */ + @JsonProperty("doing_business_as") @ExcludeMissing fun _doingBusinessAs() = doingBusinessAs + /** User Defined ID */ @JsonProperty("user_defined_id") @ExcludeMissing fun _userDefinedId() = userDefinedId - /** The number of attempts at verification */ - @JsonProperty("verification_attempts") - @ExcludeMissing - fun _verificationAttempts() = verificationAttempts - /** * Optional free text description of the reason for the failed verification. For ACH * micro-deposits returned, this field will display the reason return code sent by the ACH @@ -224,40 +204,64 @@ private constructor( @ExcludeMissing fun _verificationFailedReason() = verificationFailedReason + /** The number of attempts at verification */ + @JsonProperty("verification_attempts") + @ExcludeMissing + fun _verificationAttempts() = verificationAttempts + + /** The financial account token of the operating account to fund the micro deposits */ + @JsonProperty("financial_account_token") + @ExcludeMissing + fun _financialAccountToken() = financialAccountToken + + /** Account Type */ + @JsonProperty("type") @ExcludeMissing fun _type() = type + + /** Verification Method */ @JsonProperty("verification_method") @ExcludeMissing fun _verificationMethod() = verificationMethod + /** Owner Type */ + @JsonProperty("owner_type") @ExcludeMissing fun _ownerType() = ownerType + + /** Account State */ + @JsonProperty("state") @ExcludeMissing fun _state() = state + + /** Verification State */ @JsonProperty("verification_state") @ExcludeMissing fun _verificationState() = verificationState + /** Address */ + @JsonProperty("address") @ExcludeMissing fun _address() = address + @JsonAnyGetter @ExcludeMissing fun _additionalProperties(): Map = additionalProperties fun validate(): MicroDepositCreateResponse = apply { if (!validated) { - accountToken() - address().map { it.validate() } - companyId() + token() + owner() + routingNumber() + lastFour() + name() + currency() country() + accountToken() created() - currency() + companyId() dob() doingBusinessAs() - lastFour() - name() - financialAccountToken() - owner() - ownerType() - routingNumber() - state() - token() - type() userDefinedId() - verificationAttempts() verificationFailedReason() + verificationAttempts() + financialAccountToken() + type() verificationMethod() + ownerType() + state() verificationState() + address().map { it.validate() } validated = true } } @@ -270,28 +274,28 @@ private constructor( } return other is MicroDepositCreateResponse && - this.accountToken == other.accountToken && - this.address == other.address && - this.companyId == other.companyId && + this.token == other.token && + this.owner == other.owner && + this.routingNumber == other.routingNumber && + this.lastFour == other.lastFour && + this.name == other.name && + this.currency == other.currency && this.country == other.country && + this.accountToken == other.accountToken && this.created == other.created && - this.currency == other.currency && + this.companyId == other.companyId && this.dob == other.dob && this.doingBusinessAs == other.doingBusinessAs && - this.lastFour == other.lastFour && - this.name == other.name && - this.financialAccountToken == other.financialAccountToken && - this.owner == other.owner && - this.ownerType == other.ownerType && - this.routingNumber == other.routingNumber && - this.state == other.state && - this.token == other.token && - this.type == other.type && this.userDefinedId == other.userDefinedId && - this.verificationAttempts == other.verificationAttempts && this.verificationFailedReason == other.verificationFailedReason && + this.verificationAttempts == other.verificationAttempts && + this.financialAccountToken == other.financialAccountToken && + this.type == other.type && this.verificationMethod == other.verificationMethod && + this.ownerType == other.ownerType && + this.state == other.state && this.verificationState == other.verificationState && + this.address == other.address && this.additionalProperties == other.additionalProperties } @@ -299,28 +303,28 @@ private constructor( if (hashCode == 0) { hashCode = Objects.hash( - accountToken, - address, - companyId, + token, + owner, + routingNumber, + lastFour, + name, + currency, country, + accountToken, created, - currency, + companyId, dob, doingBusinessAs, - lastFour, - name, - financialAccountToken, - owner, - ownerType, - routingNumber, - state, - token, - type, userDefinedId, - verificationAttempts, verificationFailedReason, + verificationAttempts, + financialAccountToken, + type, verificationMethod, + ownerType, + state, verificationState, + address, additionalProperties, ) } @@ -328,7 +332,7 @@ private constructor( } override fun toString() = - "MicroDepositCreateResponse{accountToken=$accountToken, address=$address, companyId=$companyId, country=$country, created=$created, currency=$currency, dob=$dob, doingBusinessAs=$doingBusinessAs, lastFour=$lastFour, name=$name, financialAccountToken=$financialAccountToken, owner=$owner, ownerType=$ownerType, routingNumber=$routingNumber, state=$state, token=$token, type=$type, userDefinedId=$userDefinedId, verificationAttempts=$verificationAttempts, verificationFailedReason=$verificationFailedReason, verificationMethod=$verificationMethod, verificationState=$verificationState, additionalProperties=$additionalProperties}" + "MicroDepositCreateResponse{token=$token, owner=$owner, routingNumber=$routingNumber, lastFour=$lastFour, name=$name, currency=$currency, country=$country, accountToken=$accountToken, created=$created, companyId=$companyId, dob=$dob, doingBusinessAs=$doingBusinessAs, userDefinedId=$userDefinedId, verificationFailedReason=$verificationFailedReason, verificationAttempts=$verificationAttempts, financialAccountToken=$financialAccountToken, type=$type, verificationMethod=$verificationMethod, ownerType=$ownerType, state=$state, verificationState=$verificationState, address=$address, additionalProperties=$additionalProperties}" companion object { @@ -337,146 +341,95 @@ private constructor( class Builder { - private var accountToken: JsonField = JsonMissing.of() - private var address: JsonField = JsonMissing.of() - private var companyId: JsonField = JsonMissing.of() + private var token: JsonField = JsonMissing.of() + private var owner: JsonField = JsonMissing.of() + private var routingNumber: JsonField = JsonMissing.of() + private var lastFour: JsonField = JsonMissing.of() + private var name: JsonField = JsonMissing.of() + private var currency: JsonField = JsonMissing.of() private var country: JsonField = JsonMissing.of() + private var accountToken: JsonField = JsonMissing.of() private var created: JsonField = JsonMissing.of() - private var currency: JsonField = JsonMissing.of() + private var companyId: JsonField = JsonMissing.of() private var dob: JsonField = JsonMissing.of() private var doingBusinessAs: JsonField = JsonMissing.of() - private var lastFour: JsonField = JsonMissing.of() - private var name: JsonField = JsonMissing.of() - private var financialAccountToken: JsonField = JsonMissing.of() - private var owner: JsonField = JsonMissing.of() - private var ownerType: JsonField = JsonMissing.of() - private var routingNumber: JsonField = JsonMissing.of() - private var state: JsonField = JsonMissing.of() - private var token: JsonField = JsonMissing.of() - private var type: JsonField = JsonMissing.of() private var userDefinedId: JsonField = JsonMissing.of() - private var verificationAttempts: JsonField = JsonMissing.of() private var verificationFailedReason: JsonField = JsonMissing.of() + private var verificationAttempts: JsonField = JsonMissing.of() + private var financialAccountToken: JsonField = JsonMissing.of() + private var type: JsonField = JsonMissing.of() private var verificationMethod: JsonField = JsonMissing.of() + private var ownerType: JsonField = JsonMissing.of() + private var state: JsonField = JsonMissing.of() private var verificationState: JsonField = JsonMissing.of() + private var address: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(microDepositCreateResponse: MicroDepositCreateResponse) = apply { - this.accountToken = microDepositCreateResponse.accountToken - this.address = microDepositCreateResponse.address - this.companyId = microDepositCreateResponse.companyId + this.token = microDepositCreateResponse.token + this.owner = microDepositCreateResponse.owner + this.routingNumber = microDepositCreateResponse.routingNumber + this.lastFour = microDepositCreateResponse.lastFour + this.name = microDepositCreateResponse.name + this.currency = microDepositCreateResponse.currency this.country = microDepositCreateResponse.country + this.accountToken = microDepositCreateResponse.accountToken this.created = microDepositCreateResponse.created - this.currency = microDepositCreateResponse.currency + this.companyId = microDepositCreateResponse.companyId this.dob = microDepositCreateResponse.dob this.doingBusinessAs = microDepositCreateResponse.doingBusinessAs - this.lastFour = microDepositCreateResponse.lastFour - this.name = microDepositCreateResponse.name - this.financialAccountToken = microDepositCreateResponse.financialAccountToken - this.owner = microDepositCreateResponse.owner - this.ownerType = microDepositCreateResponse.ownerType - this.routingNumber = microDepositCreateResponse.routingNumber - this.state = microDepositCreateResponse.state - this.token = microDepositCreateResponse.token - this.type = microDepositCreateResponse.type this.userDefinedId = microDepositCreateResponse.userDefinedId - this.verificationAttempts = microDepositCreateResponse.verificationAttempts this.verificationFailedReason = microDepositCreateResponse.verificationFailedReason + this.verificationAttempts = microDepositCreateResponse.verificationAttempts + this.financialAccountToken = microDepositCreateResponse.financialAccountToken + this.type = microDepositCreateResponse.type this.verificationMethod = microDepositCreateResponse.verificationMethod + this.ownerType = microDepositCreateResponse.ownerType + this.state = microDepositCreateResponse.state this.verificationState = microDepositCreateResponse.verificationState - additionalProperties(microDepositCreateResponse.additionalProperties) - } - - /** - * Indicates which Lithic account the external account is associated with. For external - * accounts that are associated with the program, account_token field returned will be null - */ - fun accountToken(accountToken: String) = accountToken(JsonField.of(accountToken)) - - /** - * Indicates which Lithic account the external account is associated with. For external - * accounts that are associated with the program, account_token field returned will be null - */ - @JsonProperty("account_token") - @ExcludeMissing - fun accountToken(accountToken: JsonField) = apply { - this.accountToken = accountToken - } - - /** - * Address used during Address Verification Service (AVS) checks during transactions if - * enabled via Auth Rules. - */ - fun address(address: ExternalBankAccountAddress) = address(JsonField.of(address)) - - /** - * Address used during Address Verification Service (AVS) checks during transactions if - * enabled via Auth Rules. - */ - @JsonProperty("address") - @ExcludeMissing - fun address(address: JsonField) = apply { - this.address = address - } - - /** Optional field that helps identify bank accounts in receipts */ - fun companyId(companyId: String) = companyId(JsonField.of(companyId)) - - /** Optional field that helps identify bank accounts in receipts */ - @JsonProperty("company_id") - @ExcludeMissing - fun companyId(companyId: JsonField) = apply { this.companyId = companyId } + this.address = microDepositCreateResponse.address + additionalProperties(microDepositCreateResponse.additionalProperties) + } /** - * The country that the bank account is located in using ISO 3166-1. We will only accept USA - * bank accounts e.g., USA + * A globally unique identifier for this record of an external bank account association. If + * a program links an external bank account to more than one end-user or to both the program + * and the end-user, then Lithic will return each record of the association */ - fun country(country: String) = country(JsonField.of(country)) + fun token(token: String) = token(JsonField.of(token)) /** - * The country that the bank account is located in using ISO 3166-1. We will only accept USA - * bank accounts e.g., USA + * A globally unique identifier for this record of an external bank account association. If + * a program links an external bank account to more than one end-user or to both the program + * and the end-user, then Lithic will return each record of the association */ - @JsonProperty("country") + @JsonProperty("token") @ExcludeMissing - fun country(country: JsonField) = apply { this.country = country } + fun token(token: JsonField) = apply { this.token = token } /** - * An ISO 8601 string representing when this funding source was added to the Lithic account. + * Legal Name of the business or individual who owns the external account. This will appear + * in statements */ - fun created(created: OffsetDateTime) = created(JsonField.of(created)) + fun owner(owner: String) = owner(JsonField.of(owner)) /** - * An ISO 8601 string representing when this funding source was added to the Lithic account. + * Legal Name of the business or individual who owns the external account. This will appear + * in statements */ - @JsonProperty("created") - @ExcludeMissing - fun created(created: JsonField) = apply { this.created = created } - - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - fun currency(currency: String) = currency(JsonField.of(currency)) - - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - @JsonProperty("currency") - @ExcludeMissing - fun currency(currency: JsonField) = apply { this.currency = currency } - - /** Date of Birth of the Individual that owns the external bank account */ - fun dob(dob: LocalDate) = dob(JsonField.of(dob)) - - /** Date of Birth of the Individual that owns the external bank account */ - @JsonProperty("dob") + @JsonProperty("owner") @ExcludeMissing - fun dob(dob: JsonField) = apply { this.dob = dob } + fun owner(owner: JsonField) = apply { this.owner = owner } - fun doingBusinessAs(doingBusinessAs: String) = - doingBusinessAs(JsonField.of(doingBusinessAs)) + /** Routing Number */ + fun routingNumber(routingNumber: String) = routingNumber(JsonField.of(routingNumber)) - @JsonProperty("doing_business_as") + /** Routing Number */ + @JsonProperty("routing_number") @ExcludeMissing - fun doingBusinessAs(doingBusinessAs: JsonField) = apply { - this.doingBusinessAs = doingBusinessAs + fun routingNumber(routingNumber: JsonField) = apply { + this.routingNumber = routingNumber } /** @@ -499,98 +452,93 @@ private constructor( @ExcludeMissing fun name(name: JsonField) = apply { this.name = name } + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + fun currency(currency: String) = currency(JsonField.of(currency)) + + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + @JsonProperty("currency") + @ExcludeMissing + fun currency(currency: JsonField) = apply { this.currency = currency } + /** - * The financial account token of the operating account, which will provide the funds for - * micro deposits used to verify the account + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - fun financialAccountToken(financialAccountToken: String) = - financialAccountToken(JsonField.of(financialAccountToken)) + fun country(country: String) = country(JsonField.of(country)) /** - * The financial account token of the operating account, which will provide the funds for - * micro deposits used to verify the account + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - @JsonProperty("financial_account_token") + @JsonProperty("country") @ExcludeMissing - fun financialAccountToken(financialAccountToken: JsonField) = apply { - this.financialAccountToken = financialAccountToken - } + fun country(country: JsonField) = apply { this.country = country } /** - * Legal Name of the business or individual who owns the external account. This will appear - * in statements + * Indicates which Lithic account the external account is associated with. For external + * accounts that are associated with the program, account_token field returned will be null */ - fun owner(owner: String) = owner(JsonField.of(owner)) + fun accountToken(accountToken: String) = accountToken(JsonField.of(accountToken)) /** - * Legal Name of the business or individual who owns the external account. This will appear - * in statements + * Indicates which Lithic account the external account is associated with. For external + * accounts that are associated with the program, account_token field returned will be null */ - @JsonProperty("owner") - @ExcludeMissing - fun owner(owner: JsonField) = apply { this.owner = owner } - - fun ownerType(ownerType: OwnerType) = ownerType(JsonField.of(ownerType)) - - @JsonProperty("owner_type") + @JsonProperty("account_token") @ExcludeMissing - fun ownerType(ownerType: JsonField) = apply { this.ownerType = ownerType } + fun accountToken(accountToken: JsonField) = apply { + this.accountToken = accountToken + } - fun routingNumber(routingNumber: String) = routingNumber(JsonField.of(routingNumber)) + /** + * An ISO 8601 string representing when this funding source was added to the Lithic account. + */ + fun created(created: OffsetDateTime) = created(JsonField.of(created)) - @JsonProperty("routing_number") + /** + * An ISO 8601 string representing when this funding source was added to the Lithic account. + */ + @JsonProperty("created") @ExcludeMissing - fun routingNumber(routingNumber: JsonField) = apply { - this.routingNumber = routingNumber - } + fun created(created: JsonField) = apply { this.created = created } - fun state(state: State) = state(JsonField.of(state)) + /** Optional field that helps identify bank accounts in receipts */ + fun companyId(companyId: String) = companyId(JsonField.of(companyId)) - @JsonProperty("state") + /** Optional field that helps identify bank accounts in receipts */ + @JsonProperty("company_id") @ExcludeMissing - fun state(state: JsonField) = apply { this.state = state } + fun companyId(companyId: JsonField) = apply { this.companyId = companyId } - /** - * A globally unique identifier for this record of an external bank account association. If - * a program links an external bank account to more than one end-user or to both the program - * and the end-user, then Lithic will return each record of the association - */ - fun token(token: String) = token(JsonField.of(token)) + /** Date of Birth of the Individual that owns the external bank account */ + fun dob(dob: LocalDate) = dob(JsonField.of(dob)) - /** - * A globally unique identifier for this record of an external bank account association. If - * a program links an external bank account to more than one end-user or to both the program - * and the end-user, then Lithic will return each record of the association - */ - @JsonProperty("token") + /** Date of Birth of the Individual that owns the external bank account */ + @JsonProperty("dob") @ExcludeMissing - fun token(token: JsonField) = apply { this.token = token } + fun dob(dob: JsonField) = apply { this.dob = dob } - fun type(type: Type) = type(JsonField.of(type)) + /** Doing Business As */ + fun doingBusinessAs(doingBusinessAs: String) = + doingBusinessAs(JsonField.of(doingBusinessAs)) - @JsonProperty("type") + /** Doing Business As */ + @JsonProperty("doing_business_as") @ExcludeMissing - fun type(type: JsonField) = apply { this.type = type } + fun doingBusinessAs(doingBusinessAs: JsonField) = apply { + this.doingBusinessAs = doingBusinessAs + } + /** User Defined ID */ fun userDefinedId(userDefinedId: String) = userDefinedId(JsonField.of(userDefinedId)) + /** User Defined ID */ @JsonProperty("user_defined_id") @ExcludeMissing fun userDefinedId(userDefinedId: JsonField) = apply { this.userDefinedId = userDefinedId } - /** The number of attempts at verification */ - fun verificationAttempts(verificationAttempts: Long) = - verificationAttempts(JsonField.of(verificationAttempts)) - - /** The number of attempts at verification */ - @JsonProperty("verification_attempts") - @ExcludeMissing - fun verificationAttempts(verificationAttempts: JsonField) = apply { - this.verificationAttempts = verificationAttempts - } - /** * Optional free text description of the reason for the failed verification. For ACH * micro-deposits returned, this field will display the reason return code sent by the ACH @@ -610,24 +558,84 @@ private constructor( this.verificationFailedReason = verificationFailedReason } + /** The number of attempts at verification */ + fun verificationAttempts(verificationAttempts: Long) = + verificationAttempts(JsonField.of(verificationAttempts)) + + /** The number of attempts at verification */ + @JsonProperty("verification_attempts") + @ExcludeMissing + fun verificationAttempts(verificationAttempts: JsonField) = apply { + this.verificationAttempts = verificationAttempts + } + + /** The financial account token of the operating account to fund the micro deposits */ + fun financialAccountToken(financialAccountToken: String) = + financialAccountToken(JsonField.of(financialAccountToken)) + + /** The financial account token of the operating account to fund the micro deposits */ + @JsonProperty("financial_account_token") + @ExcludeMissing + fun financialAccountToken(financialAccountToken: JsonField) = apply { + this.financialAccountToken = financialAccountToken + } + + /** Account Type */ + fun type(type: Type) = type(JsonField.of(type)) + + /** Account Type */ + @JsonProperty("type") + @ExcludeMissing + fun type(type: JsonField) = apply { this.type = type } + + /** Verification Method */ fun verificationMethod(verificationMethod: VerificationMethod) = verificationMethod(JsonField.of(verificationMethod)) + /** Verification Method */ @JsonProperty("verification_method") @ExcludeMissing fun verificationMethod(verificationMethod: JsonField) = apply { this.verificationMethod = verificationMethod } + /** Owner Type */ + fun ownerType(ownerType: OwnerType) = ownerType(JsonField.of(ownerType)) + + /** Owner Type */ + @JsonProperty("owner_type") + @ExcludeMissing + fun ownerType(ownerType: JsonField) = apply { this.ownerType = ownerType } + + /** Account State */ + fun state(state: State) = state(JsonField.of(state)) + + /** Account State */ + @JsonProperty("state") + @ExcludeMissing + fun state(state: JsonField) = apply { this.state = state } + + /** Verification State */ fun verificationState(verificationState: VerificationState) = verificationState(JsonField.of(verificationState)) + /** Verification State */ @JsonProperty("verification_state") @ExcludeMissing fun verificationState(verificationState: JsonField) = apply { this.verificationState = verificationState } + /** Address */ + fun address(address: ExternalBankAccountAddress) = address(JsonField.of(address)) + + /** Address */ + @JsonProperty("address") + @ExcludeMissing + fun address(address: JsonField) = apply { + this.address = address + } + fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() this.additionalProperties.putAll(additionalProperties) @@ -644,28 +652,28 @@ private constructor( fun build(): MicroDepositCreateResponse = MicroDepositCreateResponse( - accountToken, - address, - companyId, + token, + owner, + routingNumber, + lastFour, + name, + currency, country, + accountToken, created, - currency, + companyId, dob, doingBusinessAs, - lastFour, - name, - financialAccountToken, - owner, - ownerType, - routingNumber, - state, - token, - type, userDefinedId, - verificationAttempts, verificationFailedReason, + verificationAttempts, + financialAccountToken, + type, verificationMethod, + ownerType, + state, verificationState, + address, additionalProperties.toUnmodifiable(), ) } @@ -749,40 +757,40 @@ private constructor( companion object { - @JvmField val CLOSED = State(JsonField.of("CLOSED")) - @JvmField val ENABLED = State(JsonField.of("ENABLED")) + @JvmField val CLOSED = State(JsonField.of("CLOSED")) + @JvmField val PAUSED = State(JsonField.of("PAUSED")) @JvmStatic fun of(value: String) = State(JsonField.of(value)) } enum class Known { - CLOSED, ENABLED, + CLOSED, PAUSED, } enum class Value { - CLOSED, ENABLED, + CLOSED, PAUSED, _UNKNOWN, } fun value(): Value = when (this) { - CLOSED -> Value.CLOSED ENABLED -> Value.ENABLED + CLOSED -> Value.CLOSED PAUSED -> Value.PAUSED else -> Value._UNKNOWN } fun known(): Known = when (this) { - CLOSED -> Known.CLOSED ENABLED -> Known.ENABLED + CLOSED -> Known.CLOSED PAUSED -> Known.PAUSED else -> throw LithicInvalidDataException("Unknown State: $value") } @@ -938,6 +946,8 @@ private constructor( companion object { + @JvmField val PENDING = VerificationState(JsonField.of("PENDING")) + @JvmField val ENABLED = VerificationState(JsonField.of("ENABLED")) @JvmField @@ -945,41 +955,39 @@ private constructor( @JvmField val INSUFFICIENT_FUNDS = VerificationState(JsonField.of("INSUFFICIENT_FUNDS")) - @JvmField val PENDING = VerificationState(JsonField.of("PENDING")) - @JvmStatic fun of(value: String) = VerificationState(JsonField.of(value)) } enum class Known { + PENDING, ENABLED, FAILED_VERIFICATION, INSUFFICIENT_FUNDS, - PENDING, } enum class Value { + PENDING, ENABLED, FAILED_VERIFICATION, INSUFFICIENT_FUNDS, - PENDING, _UNKNOWN, } fun value(): Value = when (this) { + PENDING -> Value.PENDING ENABLED -> Value.ENABLED FAILED_VERIFICATION -> Value.FAILED_VERIFICATION INSUFFICIENT_FUNDS -> Value.INSUFFICIENT_FUNDS - PENDING -> Value.PENDING else -> Value._UNKNOWN } fun known(): Known = when (this) { + PENDING -> Known.PENDING ENABLED -> Known.ENABLED FAILED_VERIFICATION -> Known.FAILED_VERIFICATION INSUFFICIENT_FUNDS -> Known.INSUFFICIENT_FUNDS - PENDING -> Known.PENDING else -> throw LithicInvalidDataException("Unknown VerificationState: $value") } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/OwnerType.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/OwnerType.kt index 58c6d79c..857c6bc5 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/OwnerType.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/OwnerType.kt @@ -30,35 +30,35 @@ private constructor( companion object { - @JvmField val BUSINESS = OwnerType(JsonField.of("BUSINESS")) - @JvmField val INDIVIDUAL = OwnerType(JsonField.of("INDIVIDUAL")) + @JvmField val BUSINESS = OwnerType(JsonField.of("BUSINESS")) + @JvmStatic fun of(value: String) = OwnerType(JsonField.of(value)) } enum class Known { - BUSINESS, INDIVIDUAL, + BUSINESS, } enum class Value { - BUSINESS, INDIVIDUAL, + BUSINESS, _UNKNOWN, } fun value(): Value = when (this) { - BUSINESS -> Value.BUSINESS INDIVIDUAL -> Value.INDIVIDUAL + BUSINESS -> Value.BUSINESS else -> Value._UNKNOWN } fun known(): Known = when (this) { - BUSINESS -> Known.BUSINESS INDIVIDUAL -> Known.INDIVIDUAL + BUSINESS -> Known.BUSINESS else -> throw LithicInvalidDataException("Unknown OwnerType: $value") } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Transaction.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Transaction.kt index 1a96d9e3..cdc65d6e 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Transaction.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Transaction.kt @@ -1366,6 +1366,9 @@ private constructor( @JvmField val DO_NOT_HONOR = DetailedResult(JsonField.of("DO_NOT_HONOR")) + @JvmField + val DRIVER_NUMBER_INVALID = DetailedResult(JsonField.of("DRIVER_NUMBER_INVALID")) + @JvmField val FORMAT_ERROR = DetailedResult(JsonField.of("FORMAT_ERROR")) @JvmField @@ -1375,10 +1378,6 @@ private constructor( @JvmField val INSUFFICIENT_FUNDS = DetailedResult(JsonField.of("INSUFFICIENT_FUNDS")) - @JvmField val INVALID_DRIVER = DetailedResult(JsonField.of("INVALID_DRIVER")) - - @JvmField val INVALID_VEHICLE = DetailedResult(JsonField.of("INVALID_VEHICLE")) - @JvmField val LITHIC_SYSTEM_ERROR = DetailedResult(JsonField.of("LITHIC_SYSTEM_ERROR")) @@ -1444,6 +1443,9 @@ private constructor( @JvmField val UNAUTHORIZED_MERCHANT = DetailedResult(JsonField.of("UNAUTHORIZED_MERCHANT")) + @JvmField + val VEHICLE_NUMBER_INVALID = DetailedResult(JsonField.of("VEHICLE_NUMBER_INVALID")) + @JvmStatic fun of(value: String) = DetailedResult(JsonField.of(value)) } @@ -1475,11 +1477,10 @@ private constructor( CUSTOM_ASA_RESULT, DECLINED, DO_NOT_HONOR, + DRIVER_NUMBER_INVALID, FORMAT_ERROR, INSUFFICIENT_FUNDING_SOURCE_BALANCE, INSUFFICIENT_FUNDS, - INVALID_DRIVER, - INVALID_VEHICLE, LITHIC_SYSTEM_ERROR, LITHIC_SYSTEM_RATE_LIMIT, MALFORMED_ASA_RESPONSE, @@ -1498,6 +1499,7 @@ private constructor( TRANSACTION_NOT_PERMITTED_TO_ISSUER_OR_CARDHOLDER, TRANSACTION_PREVIOUSLY_COMPLETED, UNAUTHORIZED_MERCHANT, + VEHICLE_NUMBER_INVALID, } enum class Value { @@ -1528,11 +1530,10 @@ private constructor( CUSTOM_ASA_RESULT, DECLINED, DO_NOT_HONOR, + DRIVER_NUMBER_INVALID, FORMAT_ERROR, INSUFFICIENT_FUNDING_SOURCE_BALANCE, INSUFFICIENT_FUNDS, - INVALID_DRIVER, - INVALID_VEHICLE, LITHIC_SYSTEM_ERROR, LITHIC_SYSTEM_RATE_LIMIT, MALFORMED_ASA_RESPONSE, @@ -1551,6 +1552,7 @@ private constructor( TRANSACTION_NOT_PERMITTED_TO_ISSUER_OR_CARDHOLDER, TRANSACTION_PREVIOUSLY_COMPLETED, UNAUTHORIZED_MERCHANT, + VEHICLE_NUMBER_INVALID, _UNKNOWN, } @@ -1585,11 +1587,10 @@ private constructor( CUSTOM_ASA_RESULT -> Value.CUSTOM_ASA_RESULT DECLINED -> Value.DECLINED DO_NOT_HONOR -> Value.DO_NOT_HONOR + DRIVER_NUMBER_INVALID -> Value.DRIVER_NUMBER_INVALID FORMAT_ERROR -> Value.FORMAT_ERROR INSUFFICIENT_FUNDING_SOURCE_BALANCE -> Value.INSUFFICIENT_FUNDING_SOURCE_BALANCE INSUFFICIENT_FUNDS -> Value.INSUFFICIENT_FUNDS - INVALID_DRIVER -> Value.INVALID_DRIVER - INVALID_VEHICLE -> Value.INVALID_VEHICLE LITHIC_SYSTEM_ERROR -> Value.LITHIC_SYSTEM_ERROR LITHIC_SYSTEM_RATE_LIMIT -> Value.LITHIC_SYSTEM_RATE_LIMIT MALFORMED_ASA_RESPONSE -> Value.MALFORMED_ASA_RESPONSE @@ -1611,6 +1612,7 @@ private constructor( Value.TRANSACTION_NOT_PERMITTED_TO_ISSUER_OR_CARDHOLDER TRANSACTION_PREVIOUSLY_COMPLETED -> Value.TRANSACTION_PREVIOUSLY_COMPLETED UNAUTHORIZED_MERCHANT -> Value.UNAUTHORIZED_MERCHANT + VEHICLE_NUMBER_INVALID -> Value.VEHICLE_NUMBER_INVALID else -> Value._UNKNOWN } @@ -1645,11 +1647,10 @@ private constructor( CUSTOM_ASA_RESULT -> Known.CUSTOM_ASA_RESULT DECLINED -> Known.DECLINED DO_NOT_HONOR -> Known.DO_NOT_HONOR + DRIVER_NUMBER_INVALID -> Known.DRIVER_NUMBER_INVALID FORMAT_ERROR -> Known.FORMAT_ERROR INSUFFICIENT_FUNDING_SOURCE_BALANCE -> Known.INSUFFICIENT_FUNDING_SOURCE_BALANCE INSUFFICIENT_FUNDS -> Known.INSUFFICIENT_FUNDS - INVALID_DRIVER -> Known.INVALID_DRIVER - INVALID_VEHICLE -> Known.INVALID_VEHICLE LITHIC_SYSTEM_ERROR -> Known.LITHIC_SYSTEM_ERROR LITHIC_SYSTEM_RATE_LIMIT -> Known.LITHIC_SYSTEM_RATE_LIMIT MALFORMED_ASA_RESPONSE -> Known.MALFORMED_ASA_RESPONSE @@ -1671,6 +1672,7 @@ private constructor( Known.TRANSACTION_NOT_PERMITTED_TO_ISSUER_OR_CARDHOLDER TRANSACTION_PREVIOUSLY_COMPLETED -> Known.TRANSACTION_PREVIOUSLY_COMPLETED UNAUTHORIZED_MERCHANT -> Known.UNAUTHORIZED_MERCHANT + VEHICLE_NUMBER_INVALID -> Known.VEHICLE_NUMBER_INVALID else -> throw LithicInvalidDataException("Unknown DetailedResult: $value") } diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountCreateParamsTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountCreateParamsTest.kt index 47624961..b9d84eab 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountCreateParamsTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountCreateParamsTest.kt @@ -16,9 +16,8 @@ class ExternalBankAccountCreateParamsTest { .accountNumber("12345678901234567") .country("USD") .currency("USD") - .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .owner("x") - .ownerType(OwnerType.BUSINESS) + .ownerType(OwnerType.INDIVIDUAL) .routingNumber("123456789") .type( ExternalBankAccountCreateParams.BankVerifiedCreateBankAccountApiRequest @@ -39,9 +38,10 @@ class ExternalBankAccountCreateParamsTest { ) .companyId("x") .dob(LocalDate.parse("2019-12-27")) - .doingBusinessAs("string") + .doingBusinessAs("x") + .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .name("x") - .userDefinedId("string") + .userDefinedId("x") .verificationEnforcement(true) .build() ) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponseTest.kt index 171a56f2..94572f5e 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponseTest.kt @@ -21,11 +21,11 @@ class ExternalBankAccountCreateResponseTest { .owner("string") .ownerType(ExternalBankAccountCreateResponse.OwnerType.BUSINESS) .routingNumber("string") - .state(ExternalBankAccountCreateResponse.State.CLOSED) + .state(ExternalBankAccountCreateResponse.State.ENABLED) .type(ExternalBankAccountCreateResponse.Type.CHECKING) .verificationAttempts(123L) .verificationMethod(ExternalBankAccountCreateResponse.VerificationMethod.MANUAL) - .verificationState(ExternalBankAccountCreateResponse.VerificationState.ENABLED) + .verificationState(ExternalBankAccountCreateResponse.VerificationState.PENDING) .accountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .address( ExternalBankAccountAddress.builder() @@ -58,14 +58,14 @@ class ExternalBankAccountCreateResponseTest { .isEqualTo(ExternalBankAccountCreateResponse.OwnerType.BUSINESS) assertThat(externalBankAccountCreateResponse.routingNumber()).isEqualTo("string") assertThat(externalBankAccountCreateResponse.state()) - .isEqualTo(ExternalBankAccountCreateResponse.State.CLOSED) + .isEqualTo(ExternalBankAccountCreateResponse.State.ENABLED) assertThat(externalBankAccountCreateResponse.type()) .isEqualTo(ExternalBankAccountCreateResponse.Type.CHECKING) assertThat(externalBankAccountCreateResponse.verificationAttempts()).isEqualTo(123L) assertThat(externalBankAccountCreateResponse.verificationMethod()) .isEqualTo(ExternalBankAccountCreateResponse.VerificationMethod.MANUAL) assertThat(externalBankAccountCreateResponse.verificationState()) - .isEqualTo(ExternalBankAccountCreateResponse.VerificationState.ENABLED) + .isEqualTo(ExternalBankAccountCreateResponse.VerificationState.PENDING) assertThat(externalBankAccountCreateResponse.accountToken()) .contains("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") assertThat(externalBankAccountCreateResponse.address()) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountListParamsTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountListParamsTest.kt index 5b878f08..a0b49baa 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountListParamsTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountListParamsTest.kt @@ -15,11 +15,11 @@ class ExternalBankAccountListParamsTest { .accountTypes(listOf(ExternalBankAccountListParams.AccountType.CHECKING)) .countries(listOf("string")) .endingBefore("string") - .ownerTypes(listOf(OwnerType.BUSINESS)) + .ownerTypes(listOf(OwnerType.INDIVIDUAL)) .pageSize(123L) .startingAfter("string") - .states(listOf(ExternalBankAccountListParams.AccountState.CLOSED)) - .verificationStates(listOf(ExternalBankAccountListParams.VerificationState.ENABLED)) + .states(listOf(ExternalBankAccountListParams.AccountState.ENABLED)) + .verificationStates(listOf(ExternalBankAccountListParams.VerificationState.PENDING)) .build() } @@ -31,11 +31,11 @@ class ExternalBankAccountListParamsTest { .accountTypes(listOf(ExternalBankAccountListParams.AccountType.CHECKING)) .countries(listOf("string")) .endingBefore("string") - .ownerTypes(listOf(OwnerType.BUSINESS)) + .ownerTypes(listOf(OwnerType.INDIVIDUAL)) .pageSize(123L) .startingAfter("string") - .states(listOf(ExternalBankAccountListParams.AccountState.CLOSED)) - .verificationStates(listOf(ExternalBankAccountListParams.VerificationState.ENABLED)) + .states(listOf(ExternalBankAccountListParams.AccountState.ENABLED)) + .verificationStates(listOf(ExternalBankAccountListParams.VerificationState.PENDING)) .build() val expected = mutableMapOf>() expected.put("account_token", listOf("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")) @@ -45,13 +45,16 @@ class ExternalBankAccountListParamsTest { ) expected.put("countries", listOf("string")) expected.put("ending_before", listOf("string")) - expected.put("owner_types", listOf(OwnerType.BUSINESS.toString())) + expected.put("owner_types", listOf(OwnerType.INDIVIDUAL.toString())) expected.put("page_size", listOf("123")) expected.put("starting_after", listOf("string")) - expected.put("states", listOf(ExternalBankAccountListParams.AccountState.CLOSED.toString())) + expected.put( + "states", + listOf(ExternalBankAccountListParams.AccountState.ENABLED.toString()) + ) expected.put( "verification_states", - listOf(ExternalBankAccountListParams.VerificationState.ENABLED.toString()) + listOf(ExternalBankAccountListParams.VerificationState.PENDING.toString()) ) assertThat(params.getQueryParams()).isEqualTo(expected) } diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountListResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountListResponseTest.kt index a5471ccb..3871764f 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountListResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountListResponseTest.kt @@ -21,11 +21,11 @@ class ExternalBankAccountListResponseTest { .owner("string") .ownerType(ExternalBankAccountListResponse.OwnerType.BUSINESS) .routingNumber("string") - .state(ExternalBankAccountListResponse.State.CLOSED) + .state(ExternalBankAccountListResponse.State.ENABLED) .type(ExternalBankAccountListResponse.Type.CHECKING) .verificationAttempts(123L) .verificationMethod(ExternalBankAccountListResponse.VerificationMethod.MANUAL) - .verificationState(ExternalBankAccountListResponse.VerificationState.ENABLED) + .verificationState(ExternalBankAccountListResponse.VerificationState.PENDING) .accountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .address( ExternalBankAccountAddress.builder() @@ -58,14 +58,14 @@ class ExternalBankAccountListResponseTest { .isEqualTo(ExternalBankAccountListResponse.OwnerType.BUSINESS) assertThat(externalBankAccountListResponse.routingNumber()).isEqualTo("string") assertThat(externalBankAccountListResponse.state()) - .isEqualTo(ExternalBankAccountListResponse.State.CLOSED) + .isEqualTo(ExternalBankAccountListResponse.State.ENABLED) assertThat(externalBankAccountListResponse.type()) .isEqualTo(ExternalBankAccountListResponse.Type.CHECKING) assertThat(externalBankAccountListResponse.verificationAttempts()).isEqualTo(123L) assertThat(externalBankAccountListResponse.verificationMethod()) .isEqualTo(ExternalBankAccountListResponse.VerificationMethod.MANUAL) assertThat(externalBankAccountListResponse.verificationState()) - .isEqualTo(ExternalBankAccountListResponse.VerificationState.ENABLED) + .isEqualTo(ExternalBankAccountListResponse.VerificationState.PENDING) assertThat(externalBankAccountListResponse.accountToken()) .contains("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") assertThat(externalBankAccountListResponse.address()) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountMicroDepositCreateParamsTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountMicroDepositCreateParamsTest.kt index 0695bee3..3a5dfa12 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountMicroDepositCreateParamsTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountMicroDepositCreateParamsTest.kt @@ -12,7 +12,7 @@ class ExternalBankAccountMicroDepositCreateParamsTest { fun createExternalBankAccountMicroDepositCreateParams() { ExternalBankAccountMicroDepositCreateParams.builder() .externalBankAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .microDeposits(listOf(123L)) + .microDeposits(listOf(123L, 123L)) .build() } @@ -21,11 +21,11 @@ class ExternalBankAccountMicroDepositCreateParamsTest { val params = ExternalBankAccountMicroDepositCreateParams.builder() .externalBankAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .microDeposits(listOf(123L)) + .microDeposits(listOf(123L, 123L)) .build() val body = params.getBody() assertThat(body).isNotNull - assertThat(body.microDeposits()).isEqualTo(listOf(123L)) + assertThat(body.microDeposits()).isEqualTo(listOf(123L, 123L)) } @Test @@ -33,11 +33,11 @@ class ExternalBankAccountMicroDepositCreateParamsTest { val params = ExternalBankAccountMicroDepositCreateParams.builder() .externalBankAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .microDeposits(listOf(123L)) + .microDeposits(listOf(123L, 123L)) .build() val body = params.getBody() assertThat(body).isNotNull - assertThat(body.microDeposits()).isEqualTo(listOf(123L)) + assertThat(body.microDeposits()).isEqualTo(listOf(123L, 123L)) } @Test @@ -45,7 +45,7 @@ class ExternalBankAccountMicroDepositCreateParamsTest { val params = ExternalBankAccountMicroDepositCreateParams.builder() .externalBankAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .microDeposits(listOf(123L)) + .microDeposits(listOf(123L, 123L)) .build() assertThat(params).isNotNull // path param "externalBankAccountToken" diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponseTest.kt index bccf455a..29a7c4ff 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponseTest.kt @@ -21,11 +21,11 @@ class ExternalBankAccountRetrieveResponseTest { .owner("string") .ownerType(ExternalBankAccountRetrieveResponse.OwnerType.BUSINESS) .routingNumber("string") - .state(ExternalBankAccountRetrieveResponse.State.CLOSED) + .state(ExternalBankAccountRetrieveResponse.State.ENABLED) .type(ExternalBankAccountRetrieveResponse.Type.CHECKING) .verificationAttempts(123L) .verificationMethod(ExternalBankAccountRetrieveResponse.VerificationMethod.MANUAL) - .verificationState(ExternalBankAccountRetrieveResponse.VerificationState.ENABLED) + .verificationState(ExternalBankAccountRetrieveResponse.VerificationState.PENDING) .accountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .address( ExternalBankAccountAddress.builder() @@ -58,14 +58,14 @@ class ExternalBankAccountRetrieveResponseTest { .isEqualTo(ExternalBankAccountRetrieveResponse.OwnerType.BUSINESS) assertThat(externalBankAccountRetrieveResponse.routingNumber()).isEqualTo("string") assertThat(externalBankAccountRetrieveResponse.state()) - .isEqualTo(ExternalBankAccountRetrieveResponse.State.CLOSED) + .isEqualTo(ExternalBankAccountRetrieveResponse.State.ENABLED) assertThat(externalBankAccountRetrieveResponse.type()) .isEqualTo(ExternalBankAccountRetrieveResponse.Type.CHECKING) assertThat(externalBankAccountRetrieveResponse.verificationAttempts()).isEqualTo(123L) assertThat(externalBankAccountRetrieveResponse.verificationMethod()) .isEqualTo(ExternalBankAccountRetrieveResponse.VerificationMethod.MANUAL) assertThat(externalBankAccountRetrieveResponse.verificationState()) - .isEqualTo(ExternalBankAccountRetrieveResponse.VerificationState.ENABLED) + .isEqualTo(ExternalBankAccountRetrieveResponse.VerificationState.PENDING) assertThat(externalBankAccountRetrieveResponse.accountToken()) .contains("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") assertThat(externalBankAccountRetrieveResponse.address()) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsResponseTest.kt index 67592676..a5c980c2 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsResponseTest.kt @@ -21,14 +21,14 @@ class ExternalBankAccountRetryMicroDepositsResponseTest { .owner("string") .ownerType(ExternalBankAccountRetryMicroDepositsResponse.OwnerType.BUSINESS) .routingNumber("string") - .state(ExternalBankAccountRetryMicroDepositsResponse.State.CLOSED) + .state(ExternalBankAccountRetryMicroDepositsResponse.State.ENABLED) .type(ExternalBankAccountRetryMicroDepositsResponse.Type.CHECKING) .verificationAttempts(123L) .verificationMethod( ExternalBankAccountRetryMicroDepositsResponse.VerificationMethod.MANUAL ) .verificationState( - ExternalBankAccountRetryMicroDepositsResponse.VerificationState.ENABLED + ExternalBankAccountRetryMicroDepositsResponse.VerificationState.PENDING ) .accountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .address( @@ -63,7 +63,7 @@ class ExternalBankAccountRetryMicroDepositsResponseTest { assertThat(externalBankAccountRetryMicroDepositsResponse.routingNumber()) .isEqualTo("string") assertThat(externalBankAccountRetryMicroDepositsResponse.state()) - .isEqualTo(ExternalBankAccountRetryMicroDepositsResponse.State.CLOSED) + .isEqualTo(ExternalBankAccountRetryMicroDepositsResponse.State.ENABLED) assertThat(externalBankAccountRetryMicroDepositsResponse.type()) .isEqualTo(ExternalBankAccountRetryMicroDepositsResponse.Type.CHECKING) assertThat(externalBankAccountRetryMicroDepositsResponse.verificationAttempts()) @@ -71,7 +71,7 @@ class ExternalBankAccountRetryMicroDepositsResponseTest { assertThat(externalBankAccountRetryMicroDepositsResponse.verificationMethod()) .isEqualTo(ExternalBankAccountRetryMicroDepositsResponse.VerificationMethod.MANUAL) assertThat(externalBankAccountRetryMicroDepositsResponse.verificationState()) - .isEqualTo(ExternalBankAccountRetryMicroDepositsResponse.VerificationState.ENABLED) + .isEqualTo(ExternalBankAccountRetryMicroDepositsResponse.VerificationState.PENDING) assertThat(externalBankAccountRetryMicroDepositsResponse.accountToken()) .contains("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") assertThat(externalBankAccountRetryMicroDepositsResponse.address()) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountUpdateParamsTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountUpdateParamsTest.kt index ccb50778..f611d481 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountUpdateParamsTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountUpdateParamsTest.kt @@ -25,11 +25,11 @@ class ExternalBankAccountUpdateParamsTest { ) .companyId("x") .dob(LocalDate.parse("2019-12-27")) - .doingBusinessAs("string") + .doingBusinessAs("x") .name("x") .owner("x") - .ownerType(OwnerType.BUSINESS) - .userDefinedId("string") + .ownerType(OwnerType.INDIVIDUAL) + .userDefinedId("x") .build() } @@ -50,11 +50,11 @@ class ExternalBankAccountUpdateParamsTest { ) .companyId("x") .dob(LocalDate.parse("2019-12-27")) - .doingBusinessAs("string") + .doingBusinessAs("x") .name("x") .owner("x") - .ownerType(OwnerType.BUSINESS) - .userDefinedId("string") + .ownerType(OwnerType.INDIVIDUAL) + .userDefinedId("x") .build() val body = params.getBody() assertThat(body).isNotNull @@ -71,11 +71,11 @@ class ExternalBankAccountUpdateParamsTest { ) assertThat(body.companyId()).isEqualTo("x") assertThat(body.dob()).isEqualTo(LocalDate.parse("2019-12-27")) - assertThat(body.doingBusinessAs()).isEqualTo("string") + assertThat(body.doingBusinessAs()).isEqualTo("x") assertThat(body.name()).isEqualTo("x") assertThat(body.owner()).isEqualTo("x") - assertThat(body.ownerType()).isEqualTo(OwnerType.BUSINESS) - assertThat(body.userDefinedId()).isEqualTo("string") + assertThat(body.ownerType()).isEqualTo(OwnerType.INDIVIDUAL) + assertThat(body.userDefinedId()).isEqualTo("x") } @Test diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponseTest.kt index 6378188c..5ee100d9 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponseTest.kt @@ -21,11 +21,11 @@ class ExternalBankAccountUpdateResponseTest { .owner("string") .ownerType(ExternalBankAccountUpdateResponse.OwnerType.BUSINESS) .routingNumber("string") - .state(ExternalBankAccountUpdateResponse.State.CLOSED) + .state(ExternalBankAccountUpdateResponse.State.ENABLED) .type(ExternalBankAccountUpdateResponse.Type.CHECKING) .verificationAttempts(123L) .verificationMethod(ExternalBankAccountUpdateResponse.VerificationMethod.MANUAL) - .verificationState(ExternalBankAccountUpdateResponse.VerificationState.ENABLED) + .verificationState(ExternalBankAccountUpdateResponse.VerificationState.PENDING) .accountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .address( ExternalBankAccountAddress.builder() @@ -58,14 +58,14 @@ class ExternalBankAccountUpdateResponseTest { .isEqualTo(ExternalBankAccountUpdateResponse.OwnerType.BUSINESS) assertThat(externalBankAccountUpdateResponse.routingNumber()).isEqualTo("string") assertThat(externalBankAccountUpdateResponse.state()) - .isEqualTo(ExternalBankAccountUpdateResponse.State.CLOSED) + .isEqualTo(ExternalBankAccountUpdateResponse.State.ENABLED) assertThat(externalBankAccountUpdateResponse.type()) .isEqualTo(ExternalBankAccountUpdateResponse.Type.CHECKING) assertThat(externalBankAccountUpdateResponse.verificationAttempts()).isEqualTo(123L) assertThat(externalBankAccountUpdateResponse.verificationMethod()) .isEqualTo(ExternalBankAccountUpdateResponse.VerificationMethod.MANUAL) assertThat(externalBankAccountUpdateResponse.verificationState()) - .isEqualTo(ExternalBankAccountUpdateResponse.VerificationState.ENABLED) + .isEqualTo(ExternalBankAccountUpdateResponse.VerificationState.PENDING) assertThat(externalBankAccountUpdateResponse.accountToken()) .contains("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") assertThat(externalBankAccountUpdateResponse.address()) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/MicroDepositCreateResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/MicroDepositCreateResponseTest.kt index 8c906ee5..50ec0f63 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/MicroDepositCreateResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/MicroDepositCreateResponseTest.kt @@ -21,11 +21,11 @@ class MicroDepositCreateResponseTest { .owner("string") .ownerType(MicroDepositCreateResponse.OwnerType.BUSINESS) .routingNumber("string") - .state(MicroDepositCreateResponse.State.CLOSED) + .state(MicroDepositCreateResponse.State.ENABLED) .type(MicroDepositCreateResponse.Type.CHECKING) .verificationAttempts(123L) .verificationMethod(MicroDepositCreateResponse.VerificationMethod.MANUAL) - .verificationState(MicroDepositCreateResponse.VerificationState.ENABLED) + .verificationState(MicroDepositCreateResponse.VerificationState.PENDING) .accountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .address( ExternalBankAccountAddress.builder() @@ -58,14 +58,14 @@ class MicroDepositCreateResponseTest { .isEqualTo(MicroDepositCreateResponse.OwnerType.BUSINESS) assertThat(microDepositCreateResponse.routingNumber()).isEqualTo("string") assertThat(microDepositCreateResponse.state()) - .isEqualTo(MicroDepositCreateResponse.State.CLOSED) + .isEqualTo(MicroDepositCreateResponse.State.ENABLED) assertThat(microDepositCreateResponse.type()) .isEqualTo(MicroDepositCreateResponse.Type.CHECKING) assertThat(microDepositCreateResponse.verificationAttempts()).isEqualTo(123L) assertThat(microDepositCreateResponse.verificationMethod()) .isEqualTo(MicroDepositCreateResponse.VerificationMethod.MANUAL) assertThat(microDepositCreateResponse.verificationState()) - .isEqualTo(MicroDepositCreateResponse.VerificationState.ENABLED) + .isEqualTo(MicroDepositCreateResponse.VerificationState.PENDING) assertThat(microDepositCreateResponse.accountToken()) .contains("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") assertThat(microDepositCreateResponse.address()) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/ExternalBankAccountServiceTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/ExternalBankAccountServiceTest.kt index 18d93191..2a08c8d6 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/ExternalBankAccountServiceTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/ExternalBankAccountServiceTest.kt @@ -30,9 +30,8 @@ class ExternalBankAccountServiceTest { .accountNumber("12345678901234567") .country("USD") .currency("USD") - .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .owner("x") - .ownerType(OwnerType.BUSINESS) + .ownerType(OwnerType.INDIVIDUAL) .routingNumber("123456789") .type( ExternalBankAccountCreateParams @@ -54,9 +53,10 @@ class ExternalBankAccountServiceTest { ) .companyId("x") .dob(LocalDate.parse("2019-12-27")) - .doingBusinessAs("string") + .doingBusinessAs("x") + .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .name("x") - .userDefinedId("string") + .userDefinedId("x") .verificationEnforcement(true) .build() ) @@ -108,11 +108,11 @@ class ExternalBankAccountServiceTest { ) .companyId("x") .dob(LocalDate.parse("2019-12-27")) - .doingBusinessAs("string") + .doingBusinessAs("x") .name("x") .owner("x") - .ownerType(OwnerType.BUSINESS) - .userDefinedId("string") + .ownerType(OwnerType.INDIVIDUAL) + .userDefinedId("x") .build() ) println(externalBankAccountUpdateResponse) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/externalBankAccounts/MicroDepositServiceTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/externalBankAccounts/MicroDepositServiceTest.kt index 322ed2a3..7e753d1a 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/externalBankAccounts/MicroDepositServiceTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/externalBankAccounts/MicroDepositServiceTest.kt @@ -23,7 +23,7 @@ class MicroDepositServiceTest { microDepositService.create( ExternalBankAccountMicroDepositCreateParams.builder() .externalBankAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .microDeposits(listOf(123L)) + .microDeposits(listOf(123L, 123L)) .build() ) println(microDepositCreateResponse)