From 4d8f522ac274693ff2e6d9647b3c2dfcbe5ec43b Mon Sep 17 00:00:00 2001 From: Stainless Bot Date: Thu, 19 Oct 2023 14:40:21 +0000 Subject: [PATCH] feat(api): add verification_failed_reason --- .../ExternalBankAccountCreateResponse.kt | 594 ++++++++++-------- .../models/ExternalBankAccountListResponse.kt | 594 ++++++++++-------- .../ExternalBankAccountRetrieveResponse.kt | 594 ++++++++++-------- .../ExternalBankAccountUpdateResponse.kt | 594 ++++++++++-------- .../api/models/MicroDepositCreateResponse.kt | 593 +++++++++-------- .../ExternalBankAccountCreateResponseTest.kt | 2 + .../ExternalBankAccountListResponseTest.kt | 2 + ...ExternalBankAccountRetrieveResponseTest.kt | 3 + .../ExternalBankAccountUpdateResponseTest.kt | 2 + .../models/MicroDepositCreateResponseTest.kt | 2 + 10 files changed, 1605 insertions(+), 1375 deletions(-) diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponse.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponse.kt index f5fb74d6..7661cd14 100644 --- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponse.kt +++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponse.kt @@ -22,25 +22,26 @@ import java.util.Objects @NoAutoDetect class ExternalBankAccountCreateResponse private constructor( - private val token: JsonField, - private val type: JsonField, - private val verificationMethod: JsonField, - private val ownerType: JsonField, - private val owner: JsonField, - private val state: JsonField, - private val verificationState: 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 companyId: JsonField, private val address: JsonField, + private val companyId: JsonField, + private val country: JsonField, + private val created: JsonField, + private val currency: JsonField, private val dob: JsonField, private val doingBusinessAs: JsonField, + private val lastFour: JsonField, + private val name: 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 verificationFailedReason: JsonField, + private val verificationMethod: JsonField, + private val verificationState: JsonField, private val additionalProperties: Map, ) { @@ -49,30 +50,36 @@ private constructor( private var hashCode: Int = 0 /** - * 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 + * 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 token(): String = token.getRequired("token") - - fun type(): Type = type.getRequired("type") + fun accountToken(): String? = accountToken.getNullable("account_token") - fun verificationMethod(): VerificationMethod = - verificationMethod.getRequired("verification_method") + /** + * Address used during Address Verification Service (AVS) checks during transactions if enabled + * via Auth Rules. + */ + fun address(): ExternalBankAccountAddress? = address.getNullable("address") - fun ownerType(): OwnerType = ownerType.getRequired("owner_type") + /** Optional field that helps identify bank accounts in receipts */ + fun companyId(): String? = companyId.getNullable("company_id") /** - * Legal Name of the business or individual who owns the external account. This will appear in - * statements + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - fun owner(): String = owner.getRequired("owner") + fun country(): String = country.getRequired("country") - fun state(): State = state.getRequired("state") + /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ + fun created(): OffsetDateTime = created.getRequired("created") - fun verificationState(): VerificationState = verificationState.getRequired("verification_state") + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + fun currency(): String = currency.getRequired("currency") - fun routingNumber(): String = routingNumber.getRequired("routing_number") + /** Date of Birth of the Individual that owns the external bank account */ + fun dob(): LocalDate? = dob.getNullable("dob") + + fun doingBusinessAs(): String? = doingBusinessAs.getNullable("doing_business_as") /** The last 4 digits of the bank account. Derived by Lithic from the account number passed */ fun lastFour(): String = lastFour.getRequired("last_four") @@ -80,66 +87,73 @@ private constructor( /** The nickname given to this record of External Bank Account */ fun name(): String? = name.getNullable("name") - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - fun currency(): String = currency.getRequired("currency") - /** - * 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") + fun owner(): String = owner.getRequired("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 - */ - fun accountToken(): String? = accountToken.getNullable("account_token") + fun ownerType(): OwnerType = ownerType.getRequired("owner_type") - /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ - fun created(): OffsetDateTime = created.getRequired("created") + fun routingNumber(): String = routingNumber.getRequired("routing_number") - /** Optional field that helps identify bank accounts in receipts */ - fun companyId(): String? = companyId.getNullable("company_id") + fun state(): State = state.getRequired("state") /** - * 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(): ExternalBankAccountAddress? = address.getNullable("address") - - /** Date of Birth of the Individual that owns the external bank account */ - fun dob(): LocalDate? = dob.getNullable("dob") + fun token(): String = token.getRequired("token") - fun doingBusinessAs(): String? = doingBusinessAs.getNullable("doing_business_as") + fun type(): Type = type.getRequired("type") fun userDefinedId(): String? = userDefinedId.getNullable("user_defined_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 + * 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 + * network */ - @JsonProperty("token") @ExcludeMissing fun _token() = token + fun verificationFailedReason(): String? = + verificationFailedReason.getNullable("verification_failed_reason") - @JsonProperty("type") @ExcludeMissing fun _type() = type + fun verificationMethod(): VerificationMethod = + verificationMethod.getRequired("verification_method") - @JsonProperty("verification_method") - @ExcludeMissing - fun _verificationMethod() = verificationMethod + fun verificationState(): VerificationState = verificationState.getRequired("verification_state") - @JsonProperty("owner_type") @ExcludeMissing fun _ownerType() = ownerType + /** + * 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 /** - * Legal Name of the business or individual who owns the external account. This will appear in - * statements + * Address used during Address Verification Service (AVS) checks during transactions if enabled + * via Auth Rules. */ - @JsonProperty("owner") @ExcludeMissing fun _owner() = owner + @JsonProperty("address") @ExcludeMissing fun _address() = address - @JsonProperty("state") @ExcludeMissing fun _state() = state + /** Optional field that helps identify bank accounts in receipts */ + @JsonProperty("company_id") @ExcludeMissing fun _companyId() = companyId - @JsonProperty("verification_state") @ExcludeMissing fun _verificationState() = verificationState + /** + * 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") @ExcludeMissing fun _country() = country - @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 + + /** 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("doing_business_as") @ExcludeMissing fun _doingBusinessAs() = doingBusinessAs /** The last 4 digits of the bank account. Derived by Lithic from the account number passed */ @JsonProperty("last_four") @ExcludeMissing fun _lastFour() = lastFour @@ -147,39 +161,43 @@ 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 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 + @JsonProperty("owner") @ExcludeMissing fun _owner() = owner + + @JsonProperty("owner_type") @ExcludeMissing fun _ownerType() = ownerType + + @JsonProperty("routing_number") @ExcludeMissing fun _routingNumber() = routingNumber + + @JsonProperty("state") @ExcludeMissing fun _state() = 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 + * 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("account_token") @ExcludeMissing fun _accountToken() = accountToken + @JsonProperty("token") @ExcludeMissing fun _token() = token - /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ - @JsonProperty("created") @ExcludeMissing fun _created() = created + @JsonProperty("type") @ExcludeMissing fun _type() = type - /** Optional field that helps identify bank accounts in receipts */ - @JsonProperty("company_id") @ExcludeMissing fun _companyId() = companyId + @JsonProperty("user_defined_id") @ExcludeMissing fun _userDefinedId() = userDefinedId /** - * Address used during Address Verification Service (AVS) checks during transactions if enabled - * via Auth Rules. + * 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 + * network */ - @JsonProperty("address") @ExcludeMissing fun _address() = address - - /** Date of Birth of the Individual that owns the external bank account */ - @JsonProperty("dob") @ExcludeMissing fun _dob() = dob + @JsonProperty("verification_failed_reason") + @ExcludeMissing + fun _verificationFailedReason() = verificationFailedReason - @JsonProperty("doing_business_as") @ExcludeMissing fun _doingBusinessAs() = doingBusinessAs + @JsonProperty("verification_method") + @ExcludeMissing + fun _verificationMethod() = verificationMethod - @JsonProperty("user_defined_id") @ExcludeMissing fun _userDefinedId() = userDefinedId + @JsonProperty("verification_state") @ExcludeMissing fun _verificationState() = verificationState @JsonAnyGetter @ExcludeMissing @@ -187,25 +205,26 @@ private constructor( fun validate(): ExternalBankAccountCreateResponse = apply { if (!validated) { - token() - type() - verificationMethod() - ownerType() - owner() - state() - verificationState() - routingNumber() - lastFour() - name() - currency() - country() accountToken() - created() - companyId() address()?.validate() + companyId() + country() + created() + currency() dob() doingBusinessAs() + lastFour() + name() + owner() + ownerType() + routingNumber() + state() + token() + type() userDefinedId() + verificationFailedReason() + verificationMethod() + verificationState() validated = true } } @@ -218,25 +237,26 @@ private constructor( } return other is ExternalBankAccountCreateResponse && - this.token == other.token && - this.type == other.type && - this.verificationMethod == other.verificationMethod && - this.ownerType == other.ownerType && - this.owner == other.owner && - this.state == other.state && - this.verificationState == other.verificationState && - 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.companyId == other.companyId && this.address == other.address && + this.companyId == other.companyId && + this.country == other.country && + this.created == other.created && + this.currency == other.currency && this.dob == other.dob && this.doingBusinessAs == other.doingBusinessAs && + this.lastFour == other.lastFour && + this.name == other.name && + 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.verificationFailedReason == other.verificationFailedReason && + this.verificationMethod == other.verificationMethod && + this.verificationState == other.verificationState && this.additionalProperties == other.additionalProperties } @@ -244,25 +264,26 @@ private constructor( if (hashCode == 0) { hashCode = Objects.hash( - token, - type, - verificationMethod, - ownerType, - owner, - state, - verificationState, - routingNumber, - lastFour, - name, - currency, - country, accountToken, - created, - companyId, address, + companyId, + country, + created, + currency, dob, doingBusinessAs, + lastFour, + name, + owner, + ownerType, + routingNumber, + state, + token, + type, userDefinedId, + verificationFailedReason, + verificationMethod, + verificationState, additionalProperties, ) } @@ -270,7 +291,7 @@ private constructor( } override fun toString() = - "ExternalBankAccountCreateResponse{token=$token, type=$type, verificationMethod=$verificationMethod, ownerType=$ownerType, owner=$owner, state=$state, verificationState=$verificationState, routingNumber=$routingNumber, lastFour=$lastFour, name=$name, currency=$currency, country=$country, accountToken=$accountToken, created=$created, companyId=$companyId, address=$address, dob=$dob, doingBusinessAs=$doingBusinessAs, userDefinedId=$userDefinedId, additionalProperties=$additionalProperties}" + "ExternalBankAccountCreateResponse{accountToken=$accountToken, address=$address, companyId=$companyId, country=$country, created=$created, currency=$currency, dob=$dob, doingBusinessAs=$doingBusinessAs, lastFour=$lastFour, name=$name, owner=$owner, ownerType=$ownerType, routingNumber=$routingNumber, state=$state, token=$token, type=$type, userDefinedId=$userDefinedId, verificationFailedReason=$verificationFailedReason, verificationMethod=$verificationMethod, verificationState=$verificationState, additionalProperties=$additionalProperties}" companion object { @@ -279,123 +300,143 @@ private constructor( class Builder { - private var token: JsonField = JsonMissing.of() - private var type: JsonField = JsonMissing.of() - private var verificationMethod: JsonField = JsonMissing.of() - private var ownerType: JsonField = JsonMissing.of() - private var owner: JsonField = JsonMissing.of() - private var state: JsonField = JsonMissing.of() - private var verificationState: 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 companyId: JsonField = JsonMissing.of() private var address: JsonField = JsonMissing.of() + private var companyId: JsonField = JsonMissing.of() + private var country: JsonField = JsonMissing.of() + private var created: JsonField = JsonMissing.of() + private var currency: 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 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 verificationFailedReason: JsonField = JsonMissing.of() + private var verificationMethod: JsonField = JsonMissing.of() + private var verificationState: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() internal fun from(externalBankAccountCreateResponse: ExternalBankAccountCreateResponse) = apply { - this.token = externalBankAccountCreateResponse.token - this.type = externalBankAccountCreateResponse.type - this.verificationMethod = externalBankAccountCreateResponse.verificationMethod - this.ownerType = externalBankAccountCreateResponse.ownerType - this.owner = externalBankAccountCreateResponse.owner - this.state = externalBankAccountCreateResponse.state - this.verificationState = externalBankAccountCreateResponse.verificationState - this.routingNumber = externalBankAccountCreateResponse.routingNumber - this.lastFour = externalBankAccountCreateResponse.lastFour - this.name = externalBankAccountCreateResponse.name - this.currency = externalBankAccountCreateResponse.currency + this.accountToken = externalBankAccountCreateResponse.accountToken + this.address = externalBankAccountCreateResponse.address + this.companyId = externalBankAccountCreateResponse.companyId this.country = externalBankAccountCreateResponse.country - this.accountToken = externalBankAccountCreateResponse.accountToken this.created = externalBankAccountCreateResponse.created - this.companyId = externalBankAccountCreateResponse.companyId - this.address = externalBankAccountCreateResponse.address + this.currency = externalBankAccountCreateResponse.currency this.dob = externalBankAccountCreateResponse.dob this.doingBusinessAs = externalBankAccountCreateResponse.doingBusinessAs + this.lastFour = externalBankAccountCreateResponse.lastFour + this.name = externalBankAccountCreateResponse.name + 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.verificationFailedReason = + externalBankAccountCreateResponse.verificationFailedReason + this.verificationMethod = externalBankAccountCreateResponse.verificationMethod + this.verificationState = externalBankAccountCreateResponse.verificationState additionalProperties(externalBankAccountCreateResponse.additionalProperties) } /** - * 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 + * 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 token(token: String) = token(JsonField.of(token)) + fun accountToken(accountToken: String) = accountToken(JsonField.of(accountToken)) /** - * 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 + * 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("token") + @JsonProperty("account_token") @ExcludeMissing - fun token(token: JsonField) = apply { this.token = token } + fun accountToken(accountToken: JsonField) = apply { + this.accountToken = accountToken + } - fun type(type: Type) = type(JsonField.of(type)) + /** + * Address used during Address Verification Service (AVS) checks during transactions if + * enabled via Auth Rules. + */ + fun address(address: ExternalBankAccountAddress) = address(JsonField.of(address)) - @JsonProperty("type") + /** + * Address used during Address Verification Service (AVS) checks during transactions if + * enabled via Auth Rules. + */ + @JsonProperty("address") @ExcludeMissing - fun type(type: JsonField) = apply { this.type = type } + fun address(address: JsonField) = apply { + this.address = address + } - fun verificationMethod(verificationMethod: VerificationMethod) = - verificationMethod(JsonField.of(verificationMethod)) + /** Optional field that helps identify bank accounts in receipts */ + fun companyId(companyId: String) = companyId(JsonField.of(companyId)) - @JsonProperty("verification_method") + /** Optional field that helps identify bank accounts in receipts */ + @JsonProperty("company_id") @ExcludeMissing - fun verificationMethod(verificationMethod: JsonField) = apply { - this.verificationMethod = verificationMethod - } + fun companyId(companyId: JsonField) = apply { this.companyId = companyId } - fun ownerType(ownerType: OwnerType) = ownerType(JsonField.of(ownerType)) + /** + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA + */ + fun country(country: String) = country(JsonField.of(country)) - @JsonProperty("owner_type") + /** + * 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") @ExcludeMissing - fun ownerType(ownerType: JsonField) = apply { this.ownerType = ownerType } + 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 + * An ISO 8601 string representing when this funding source was added to the Lithic account. */ - fun owner(owner: String) = owner(JsonField.of(owner)) + fun created(created: OffsetDateTime) = created(JsonField.of(created)) /** - * Legal Name of the business or individual who owns the external account. This will appear - * in statements + * An ISO 8601 string representing when this funding source was added to the Lithic account. */ - @JsonProperty("owner") + @JsonProperty("created") @ExcludeMissing - fun owner(owner: JsonField) = apply { this.owner = owner } + fun created(created: JsonField) = apply { this.created = created } - fun state(state: State) = state(JsonField.of(state)) + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + fun currency(currency: String) = currency(JsonField.of(currency)) - @JsonProperty("state") + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + @JsonProperty("currency") @ExcludeMissing - fun state(state: JsonField) = apply { this.state = state } + fun currency(currency: JsonField) = apply { this.currency = currency } - fun verificationState(verificationState: VerificationState) = - verificationState(JsonField.of(verificationState)) + /** Date of Birth of the Individual that owns the external bank account */ + fun dob(dob: LocalDate) = dob(JsonField.of(dob)) - @JsonProperty("verification_state") + /** Date of Birth of the Individual that owns the external bank account */ + @JsonProperty("dob") @ExcludeMissing - fun verificationState(verificationState: JsonField) = apply { - this.verificationState = verificationState - } + fun dob(dob: JsonField) = apply { this.dob = dob } - fun routingNumber(routingNumber: String) = routingNumber(JsonField.of(routingNumber)) + fun doingBusinessAs(doingBusinessAs: String) = + doingBusinessAs(JsonField.of(doingBusinessAs)) - @JsonProperty("routing_number") + @JsonProperty("doing_business_as") @ExcludeMissing - fun routingNumber(routingNumber: JsonField) = apply { - this.routingNumber = routingNumber + fun doingBusinessAs(doingBusinessAs: JsonField) = apply { + this.doingBusinessAs = doingBusinessAs } /** @@ -418,103 +459,105 @@ 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 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(country: String) = country(JsonField.of(country)) + fun owner(owner: String) = owner(JsonField.of(owner)) /** - * 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") + @JsonProperty("owner") @ExcludeMissing - fun country(country: JsonField) = apply { this.country = country } + fun owner(owner: JsonField) = 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 - */ - fun accountToken(accountToken: String) = accountToken(JsonField.of(accountToken)) + fun ownerType(ownerType: OwnerType) = ownerType(JsonField.of(ownerType)) - /** - * 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") + @JsonProperty("owner_type") @ExcludeMissing - fun accountToken(accountToken: JsonField) = apply { - this.accountToken = accountToken + fun ownerType(ownerType: JsonField) = apply { this.ownerType = ownerType } + + fun routingNumber(routingNumber: String) = routingNumber(JsonField.of(routingNumber)) + + @JsonProperty("routing_number") + @ExcludeMissing + fun routingNumber(routingNumber: JsonField) = apply { + this.routingNumber = routingNumber } + fun state(state: State) = state(JsonField.of(state)) + + @JsonProperty("state") + @ExcludeMissing + fun state(state: JsonField) = apply { this.state = state } + /** - * An ISO 8601 string representing when this funding source was added to the Lithic account. + * 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 created(created: OffsetDateTime) = created(JsonField.of(created)) + fun token(token: String) = token(JsonField.of(token)) /** - * An ISO 8601 string representing when this funding source was added to the Lithic account. + * 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("created") + @JsonProperty("token") @ExcludeMissing - fun created(created: JsonField) = apply { this.created = created } + fun token(token: JsonField) = apply { this.token = token } - /** Optional field that helps identify bank accounts in receipts */ - fun companyId(companyId: String) = companyId(JsonField.of(companyId)) + fun type(type: Type) = type(JsonField.of(type)) - /** Optional field that helps identify bank accounts in receipts */ - @JsonProperty("company_id") + @JsonProperty("type") @ExcludeMissing - fun companyId(companyId: JsonField) = apply { this.companyId = companyId } + fun type(type: JsonField) = apply { this.type = type } + + fun userDefinedId(userDefinedId: String) = userDefinedId(JsonField.of(userDefinedId)) + + @JsonProperty("user_defined_id") + @ExcludeMissing + fun userDefinedId(userDefinedId: JsonField) = apply { + this.userDefinedId = userDefinedId + } /** - * Address used during Address Verification Service (AVS) checks during transactions if - * enabled via Auth Rules. + * 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 + * network */ - fun address(address: ExternalBankAccountAddress) = address(JsonField.of(address)) + fun verificationFailedReason(verificationFailedReason: String) = + verificationFailedReason(JsonField.of(verificationFailedReason)) /** - * Address used during Address Verification Service (AVS) checks during transactions if - * enabled via Auth Rules. + * 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 + * network */ - @JsonProperty("address") + @JsonProperty("verification_failed_reason") @ExcludeMissing - fun address(address: JsonField) = apply { - this.address = address + fun verificationFailedReason(verificationFailedReason: JsonField) = apply { + this.verificationFailedReason = verificationFailedReason } - /** 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") - @ExcludeMissing - fun dob(dob: JsonField) = apply { this.dob = dob } - - fun doingBusinessAs(doingBusinessAs: String) = - doingBusinessAs(JsonField.of(doingBusinessAs)) + fun verificationMethod(verificationMethod: VerificationMethod) = + verificationMethod(JsonField.of(verificationMethod)) - @JsonProperty("doing_business_as") + @JsonProperty("verification_method") @ExcludeMissing - fun doingBusinessAs(doingBusinessAs: JsonField) = apply { - this.doingBusinessAs = doingBusinessAs + fun verificationMethod(verificationMethod: JsonField) = apply { + this.verificationMethod = verificationMethod } - fun userDefinedId(userDefinedId: String) = userDefinedId(JsonField.of(userDefinedId)) + fun verificationState(verificationState: VerificationState) = + verificationState(JsonField.of(verificationState)) - @JsonProperty("user_defined_id") + @JsonProperty("verification_state") @ExcludeMissing - fun userDefinedId(userDefinedId: JsonField) = apply { - this.userDefinedId = userDefinedId + fun verificationState(verificationState: JsonField) = apply { + this.verificationState = verificationState } fun additionalProperties(additionalProperties: Map) = apply { @@ -533,25 +576,26 @@ private constructor( fun build(): ExternalBankAccountCreateResponse = ExternalBankAccountCreateResponse( - token, - type, - verificationMethod, - ownerType, - owner, - state, - verificationState, - routingNumber, - lastFour, - name, - currency, - country, accountToken, - created, - companyId, address, + companyId, + country, + created, + currency, dob, doingBusinessAs, + lastFour, + name, + owner, + ownerType, + routingNumber, + state, + token, + type, userDefinedId, + verificationFailedReason, + verificationMethod, + verificationState, additionalProperties.toUnmodifiable(), ) } diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListResponse.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListResponse.kt index 25581d97..5336ec20 100644 --- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListResponse.kt +++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListResponse.kt @@ -22,25 +22,26 @@ import java.util.Objects @NoAutoDetect class ExternalBankAccountListResponse private constructor( - private val token: JsonField, - private val type: JsonField, - private val verificationMethod: JsonField, - private val ownerType: JsonField, - private val owner: JsonField, - private val state: JsonField, - private val verificationState: 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 companyId: JsonField, private val address: JsonField, + private val companyId: JsonField, + private val country: JsonField, + private val created: JsonField, + private val currency: JsonField, private val dob: JsonField, private val doingBusinessAs: JsonField, + private val lastFour: JsonField, + private val name: 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 verificationFailedReason: JsonField, + private val verificationMethod: JsonField, + private val verificationState: JsonField, private val additionalProperties: Map, ) { @@ -49,30 +50,36 @@ private constructor( private var hashCode: Int = 0 /** - * 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 + * 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 token(): String = token.getRequired("token") - - fun type(): Type = type.getRequired("type") + fun accountToken(): String? = accountToken.getNullable("account_token") - fun verificationMethod(): VerificationMethod = - verificationMethod.getRequired("verification_method") + /** + * Address used during Address Verification Service (AVS) checks during transactions if enabled + * via Auth Rules. + */ + fun address(): ExternalBankAccountAddress? = address.getNullable("address") - fun ownerType(): OwnerType = ownerType.getRequired("owner_type") + /** Optional field that helps identify bank accounts in receipts */ + fun companyId(): String? = companyId.getNullable("company_id") /** - * Legal Name of the business or individual who owns the external account. This will appear in - * statements + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - fun owner(): String = owner.getRequired("owner") + fun country(): String = country.getRequired("country") - fun state(): State = state.getRequired("state") + /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ + fun created(): OffsetDateTime = created.getRequired("created") - fun verificationState(): VerificationState = verificationState.getRequired("verification_state") + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + fun currency(): String = currency.getRequired("currency") - fun routingNumber(): String = routingNumber.getRequired("routing_number") + /** Date of Birth of the Individual that owns the external bank account */ + fun dob(): LocalDate? = dob.getNullable("dob") + + fun doingBusinessAs(): String? = doingBusinessAs.getNullable("doing_business_as") /** The last 4 digits of the bank account. Derived by Lithic from the account number passed */ fun lastFour(): String = lastFour.getRequired("last_four") @@ -80,66 +87,73 @@ private constructor( /** The nickname given to this record of External Bank Account */ fun name(): String? = name.getNullable("name") - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - fun currency(): String = currency.getRequired("currency") - /** - * 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") + fun owner(): String = owner.getRequired("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 - */ - fun accountToken(): String? = accountToken.getNullable("account_token") + fun ownerType(): OwnerType = ownerType.getRequired("owner_type") - /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ - fun created(): OffsetDateTime = created.getRequired("created") + fun routingNumber(): String = routingNumber.getRequired("routing_number") - /** Optional field that helps identify bank accounts in receipts */ - fun companyId(): String? = companyId.getNullable("company_id") + fun state(): State = state.getRequired("state") /** - * 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(): ExternalBankAccountAddress? = address.getNullable("address") - - /** Date of Birth of the Individual that owns the external bank account */ - fun dob(): LocalDate? = dob.getNullable("dob") + fun token(): String = token.getRequired("token") - fun doingBusinessAs(): String? = doingBusinessAs.getNullable("doing_business_as") + fun type(): Type = type.getRequired("type") fun userDefinedId(): String? = userDefinedId.getNullable("user_defined_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 + * 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 + * network */ - @JsonProperty("token") @ExcludeMissing fun _token() = token + fun verificationFailedReason(): String? = + verificationFailedReason.getNullable("verification_failed_reason") - @JsonProperty("type") @ExcludeMissing fun _type() = type + fun verificationMethod(): VerificationMethod = + verificationMethod.getRequired("verification_method") - @JsonProperty("verification_method") - @ExcludeMissing - fun _verificationMethod() = verificationMethod + fun verificationState(): VerificationState = verificationState.getRequired("verification_state") - @JsonProperty("owner_type") @ExcludeMissing fun _ownerType() = ownerType + /** + * 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 /** - * Legal Name of the business or individual who owns the external account. This will appear in - * statements + * Address used during Address Verification Service (AVS) checks during transactions if enabled + * via Auth Rules. */ - @JsonProperty("owner") @ExcludeMissing fun _owner() = owner + @JsonProperty("address") @ExcludeMissing fun _address() = address - @JsonProperty("state") @ExcludeMissing fun _state() = state + /** Optional field that helps identify bank accounts in receipts */ + @JsonProperty("company_id") @ExcludeMissing fun _companyId() = companyId - @JsonProperty("verification_state") @ExcludeMissing fun _verificationState() = verificationState + /** + * 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") @ExcludeMissing fun _country() = country - @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 + + /** 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("doing_business_as") @ExcludeMissing fun _doingBusinessAs() = doingBusinessAs /** The last 4 digits of the bank account. Derived by Lithic from the account number passed */ @JsonProperty("last_four") @ExcludeMissing fun _lastFour() = lastFour @@ -147,39 +161,43 @@ 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 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 + @JsonProperty("owner") @ExcludeMissing fun _owner() = owner + + @JsonProperty("owner_type") @ExcludeMissing fun _ownerType() = ownerType + + @JsonProperty("routing_number") @ExcludeMissing fun _routingNumber() = routingNumber + + @JsonProperty("state") @ExcludeMissing fun _state() = 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 + * 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("account_token") @ExcludeMissing fun _accountToken() = accountToken + @JsonProperty("token") @ExcludeMissing fun _token() = token - /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ - @JsonProperty("created") @ExcludeMissing fun _created() = created + @JsonProperty("type") @ExcludeMissing fun _type() = type - /** Optional field that helps identify bank accounts in receipts */ - @JsonProperty("company_id") @ExcludeMissing fun _companyId() = companyId + @JsonProperty("user_defined_id") @ExcludeMissing fun _userDefinedId() = userDefinedId /** - * Address used during Address Verification Service (AVS) checks during transactions if enabled - * via Auth Rules. + * 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 + * network */ - @JsonProperty("address") @ExcludeMissing fun _address() = address - - /** Date of Birth of the Individual that owns the external bank account */ - @JsonProperty("dob") @ExcludeMissing fun _dob() = dob + @JsonProperty("verification_failed_reason") + @ExcludeMissing + fun _verificationFailedReason() = verificationFailedReason - @JsonProperty("doing_business_as") @ExcludeMissing fun _doingBusinessAs() = doingBusinessAs + @JsonProperty("verification_method") + @ExcludeMissing + fun _verificationMethod() = verificationMethod - @JsonProperty("user_defined_id") @ExcludeMissing fun _userDefinedId() = userDefinedId + @JsonProperty("verification_state") @ExcludeMissing fun _verificationState() = verificationState @JsonAnyGetter @ExcludeMissing @@ -187,25 +205,26 @@ private constructor( fun validate(): ExternalBankAccountListResponse = apply { if (!validated) { - token() - type() - verificationMethod() - ownerType() - owner() - state() - verificationState() - routingNumber() - lastFour() - name() - currency() - country() accountToken() - created() - companyId() address()?.validate() + companyId() + country() + created() + currency() dob() doingBusinessAs() + lastFour() + name() + owner() + ownerType() + routingNumber() + state() + token() + type() userDefinedId() + verificationFailedReason() + verificationMethod() + verificationState() validated = true } } @@ -218,25 +237,26 @@ private constructor( } return other is ExternalBankAccountListResponse && - this.token == other.token && - this.type == other.type && - this.verificationMethod == other.verificationMethod && - this.ownerType == other.ownerType && - this.owner == other.owner && - this.state == other.state && - this.verificationState == other.verificationState && - 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.companyId == other.companyId && this.address == other.address && + this.companyId == other.companyId && + this.country == other.country && + this.created == other.created && + this.currency == other.currency && this.dob == other.dob && this.doingBusinessAs == other.doingBusinessAs && + this.lastFour == other.lastFour && + this.name == other.name && + 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.verificationFailedReason == other.verificationFailedReason && + this.verificationMethod == other.verificationMethod && + this.verificationState == other.verificationState && this.additionalProperties == other.additionalProperties } @@ -244,25 +264,26 @@ private constructor( if (hashCode == 0) { hashCode = Objects.hash( - token, - type, - verificationMethod, - ownerType, - owner, - state, - verificationState, - routingNumber, - lastFour, - name, - currency, - country, accountToken, - created, - companyId, address, + companyId, + country, + created, + currency, dob, doingBusinessAs, + lastFour, + name, + owner, + ownerType, + routingNumber, + state, + token, + type, userDefinedId, + verificationFailedReason, + verificationMethod, + verificationState, additionalProperties, ) } @@ -270,7 +291,7 @@ private constructor( } override fun toString() = - "ExternalBankAccountListResponse{token=$token, type=$type, verificationMethod=$verificationMethod, ownerType=$ownerType, owner=$owner, state=$state, verificationState=$verificationState, routingNumber=$routingNumber, lastFour=$lastFour, name=$name, currency=$currency, country=$country, accountToken=$accountToken, created=$created, companyId=$companyId, address=$address, dob=$dob, doingBusinessAs=$doingBusinessAs, userDefinedId=$userDefinedId, additionalProperties=$additionalProperties}" + "ExternalBankAccountListResponse{accountToken=$accountToken, address=$address, companyId=$companyId, country=$country, created=$created, currency=$currency, dob=$dob, doingBusinessAs=$doingBusinessAs, lastFour=$lastFour, name=$name, owner=$owner, ownerType=$ownerType, routingNumber=$routingNumber, state=$state, token=$token, type=$type, userDefinedId=$userDefinedId, verificationFailedReason=$verificationFailedReason, verificationMethod=$verificationMethod, verificationState=$verificationState, additionalProperties=$additionalProperties}" companion object { @@ -279,123 +300,143 @@ private constructor( class Builder { - private var token: JsonField = JsonMissing.of() - private var type: JsonField = JsonMissing.of() - private var verificationMethod: JsonField = JsonMissing.of() - private var ownerType: JsonField = JsonMissing.of() - private var owner: JsonField = JsonMissing.of() - private var state: JsonField = JsonMissing.of() - private var verificationState: 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 companyId: JsonField = JsonMissing.of() private var address: JsonField = JsonMissing.of() + private var companyId: JsonField = JsonMissing.of() + private var country: JsonField = JsonMissing.of() + private var created: JsonField = JsonMissing.of() + private var currency: 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 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 verificationFailedReason: JsonField = JsonMissing.of() + private var verificationMethod: JsonField = JsonMissing.of() + private var verificationState: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() internal fun from(externalBankAccountListResponse: ExternalBankAccountListResponse) = apply { - this.token = externalBankAccountListResponse.token - this.type = externalBankAccountListResponse.type - this.verificationMethod = externalBankAccountListResponse.verificationMethod - this.ownerType = externalBankAccountListResponse.ownerType - this.owner = externalBankAccountListResponse.owner - this.state = externalBankAccountListResponse.state - this.verificationState = externalBankAccountListResponse.verificationState - this.routingNumber = externalBankAccountListResponse.routingNumber - this.lastFour = externalBankAccountListResponse.lastFour - this.name = externalBankAccountListResponse.name - this.currency = externalBankAccountListResponse.currency + this.accountToken = externalBankAccountListResponse.accountToken + this.address = externalBankAccountListResponse.address + this.companyId = externalBankAccountListResponse.companyId this.country = externalBankAccountListResponse.country - this.accountToken = externalBankAccountListResponse.accountToken this.created = externalBankAccountListResponse.created - this.companyId = externalBankAccountListResponse.companyId - this.address = externalBankAccountListResponse.address + this.currency = externalBankAccountListResponse.currency this.dob = externalBankAccountListResponse.dob this.doingBusinessAs = externalBankAccountListResponse.doingBusinessAs + this.lastFour = externalBankAccountListResponse.lastFour + this.name = externalBankAccountListResponse.name + 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.verificationFailedReason = + externalBankAccountListResponse.verificationFailedReason + this.verificationMethod = externalBankAccountListResponse.verificationMethod + this.verificationState = externalBankAccountListResponse.verificationState additionalProperties(externalBankAccountListResponse.additionalProperties) } /** - * 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 + * 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 token(token: String) = token(JsonField.of(token)) + fun accountToken(accountToken: String) = accountToken(JsonField.of(accountToken)) /** - * 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 + * 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("token") + @JsonProperty("account_token") @ExcludeMissing - fun token(token: JsonField) = apply { this.token = token } + fun accountToken(accountToken: JsonField) = apply { + this.accountToken = accountToken + } - fun type(type: Type) = type(JsonField.of(type)) + /** + * Address used during Address Verification Service (AVS) checks during transactions if + * enabled via Auth Rules. + */ + fun address(address: ExternalBankAccountAddress) = address(JsonField.of(address)) - @JsonProperty("type") + /** + * Address used during Address Verification Service (AVS) checks during transactions if + * enabled via Auth Rules. + */ + @JsonProperty("address") @ExcludeMissing - fun type(type: JsonField) = apply { this.type = type } + fun address(address: JsonField) = apply { + this.address = address + } - fun verificationMethod(verificationMethod: VerificationMethod) = - verificationMethod(JsonField.of(verificationMethod)) + /** Optional field that helps identify bank accounts in receipts */ + fun companyId(companyId: String) = companyId(JsonField.of(companyId)) - @JsonProperty("verification_method") + /** Optional field that helps identify bank accounts in receipts */ + @JsonProperty("company_id") @ExcludeMissing - fun verificationMethod(verificationMethod: JsonField) = apply { - this.verificationMethod = verificationMethod - } + fun companyId(companyId: JsonField) = apply { this.companyId = companyId } - fun ownerType(ownerType: OwnerType) = ownerType(JsonField.of(ownerType)) + /** + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA + */ + fun country(country: String) = country(JsonField.of(country)) - @JsonProperty("owner_type") + /** + * 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") @ExcludeMissing - fun ownerType(ownerType: JsonField) = apply { this.ownerType = ownerType } + 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 + * An ISO 8601 string representing when this funding source was added to the Lithic account. */ - fun owner(owner: String) = owner(JsonField.of(owner)) + fun created(created: OffsetDateTime) = created(JsonField.of(created)) /** - * Legal Name of the business or individual who owns the external account. This will appear - * in statements + * An ISO 8601 string representing when this funding source was added to the Lithic account. */ - @JsonProperty("owner") + @JsonProperty("created") @ExcludeMissing - fun owner(owner: JsonField) = apply { this.owner = owner } + fun created(created: JsonField) = apply { this.created = created } - fun state(state: State) = state(JsonField.of(state)) + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + fun currency(currency: String) = currency(JsonField.of(currency)) - @JsonProperty("state") + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + @JsonProperty("currency") @ExcludeMissing - fun state(state: JsonField) = apply { this.state = state } + fun currency(currency: JsonField) = apply { this.currency = currency } - fun verificationState(verificationState: VerificationState) = - verificationState(JsonField.of(verificationState)) + /** Date of Birth of the Individual that owns the external bank account */ + fun dob(dob: LocalDate) = dob(JsonField.of(dob)) - @JsonProperty("verification_state") + /** Date of Birth of the Individual that owns the external bank account */ + @JsonProperty("dob") @ExcludeMissing - fun verificationState(verificationState: JsonField) = apply { - this.verificationState = verificationState - } + fun dob(dob: JsonField) = apply { this.dob = dob } - fun routingNumber(routingNumber: String) = routingNumber(JsonField.of(routingNumber)) + fun doingBusinessAs(doingBusinessAs: String) = + doingBusinessAs(JsonField.of(doingBusinessAs)) - @JsonProperty("routing_number") + @JsonProperty("doing_business_as") @ExcludeMissing - fun routingNumber(routingNumber: JsonField) = apply { - this.routingNumber = routingNumber + fun doingBusinessAs(doingBusinessAs: JsonField) = apply { + this.doingBusinessAs = doingBusinessAs } /** @@ -418,103 +459,105 @@ 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 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(country: String) = country(JsonField.of(country)) + fun owner(owner: String) = owner(JsonField.of(owner)) /** - * 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") + @JsonProperty("owner") @ExcludeMissing - fun country(country: JsonField) = apply { this.country = country } + fun owner(owner: JsonField) = 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 - */ - fun accountToken(accountToken: String) = accountToken(JsonField.of(accountToken)) + fun ownerType(ownerType: OwnerType) = ownerType(JsonField.of(ownerType)) - /** - * 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") + @JsonProperty("owner_type") @ExcludeMissing - fun accountToken(accountToken: JsonField) = apply { - this.accountToken = accountToken + fun ownerType(ownerType: JsonField) = apply { this.ownerType = ownerType } + + fun routingNumber(routingNumber: String) = routingNumber(JsonField.of(routingNumber)) + + @JsonProperty("routing_number") + @ExcludeMissing + fun routingNumber(routingNumber: JsonField) = apply { + this.routingNumber = routingNumber } + fun state(state: State) = state(JsonField.of(state)) + + @JsonProperty("state") + @ExcludeMissing + fun state(state: JsonField) = apply { this.state = state } + /** - * An ISO 8601 string representing when this funding source was added to the Lithic account. + * 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 created(created: OffsetDateTime) = created(JsonField.of(created)) + fun token(token: String) = token(JsonField.of(token)) /** - * An ISO 8601 string representing when this funding source was added to the Lithic account. + * 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("created") + @JsonProperty("token") @ExcludeMissing - fun created(created: JsonField) = apply { this.created = created } + fun token(token: JsonField) = apply { this.token = token } - /** Optional field that helps identify bank accounts in receipts */ - fun companyId(companyId: String) = companyId(JsonField.of(companyId)) + fun type(type: Type) = type(JsonField.of(type)) - /** Optional field that helps identify bank accounts in receipts */ - @JsonProperty("company_id") + @JsonProperty("type") @ExcludeMissing - fun companyId(companyId: JsonField) = apply { this.companyId = companyId } + fun type(type: JsonField) = apply { this.type = type } + + fun userDefinedId(userDefinedId: String) = userDefinedId(JsonField.of(userDefinedId)) + + @JsonProperty("user_defined_id") + @ExcludeMissing + fun userDefinedId(userDefinedId: JsonField) = apply { + this.userDefinedId = userDefinedId + } /** - * Address used during Address Verification Service (AVS) checks during transactions if - * enabled via Auth Rules. + * 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 + * network */ - fun address(address: ExternalBankAccountAddress) = address(JsonField.of(address)) + fun verificationFailedReason(verificationFailedReason: String) = + verificationFailedReason(JsonField.of(verificationFailedReason)) /** - * Address used during Address Verification Service (AVS) checks during transactions if - * enabled via Auth Rules. + * 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 + * network */ - @JsonProperty("address") + @JsonProperty("verification_failed_reason") @ExcludeMissing - fun address(address: JsonField) = apply { - this.address = address + fun verificationFailedReason(verificationFailedReason: JsonField) = apply { + this.verificationFailedReason = verificationFailedReason } - /** 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") - @ExcludeMissing - fun dob(dob: JsonField) = apply { this.dob = dob } - - fun doingBusinessAs(doingBusinessAs: String) = - doingBusinessAs(JsonField.of(doingBusinessAs)) + fun verificationMethod(verificationMethod: VerificationMethod) = + verificationMethod(JsonField.of(verificationMethod)) - @JsonProperty("doing_business_as") + @JsonProperty("verification_method") @ExcludeMissing - fun doingBusinessAs(doingBusinessAs: JsonField) = apply { - this.doingBusinessAs = doingBusinessAs + fun verificationMethod(verificationMethod: JsonField) = apply { + this.verificationMethod = verificationMethod } - fun userDefinedId(userDefinedId: String) = userDefinedId(JsonField.of(userDefinedId)) + fun verificationState(verificationState: VerificationState) = + verificationState(JsonField.of(verificationState)) - @JsonProperty("user_defined_id") + @JsonProperty("verification_state") @ExcludeMissing - fun userDefinedId(userDefinedId: JsonField) = apply { - this.userDefinedId = userDefinedId + fun verificationState(verificationState: JsonField) = apply { + this.verificationState = verificationState } fun additionalProperties(additionalProperties: Map) = apply { @@ -533,25 +576,26 @@ private constructor( fun build(): ExternalBankAccountListResponse = ExternalBankAccountListResponse( - token, - type, - verificationMethod, - ownerType, - owner, - state, - verificationState, - routingNumber, - lastFour, - name, - currency, - country, accountToken, - created, - companyId, address, + companyId, + country, + created, + currency, dob, doingBusinessAs, + lastFour, + name, + owner, + ownerType, + routingNumber, + state, + token, + type, userDefinedId, + verificationFailedReason, + verificationMethod, + verificationState, additionalProperties.toUnmodifiable(), ) } diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponse.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponse.kt index eab9cfa6..ec6d7602 100644 --- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponse.kt +++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponse.kt @@ -22,25 +22,26 @@ import java.util.Objects @NoAutoDetect class ExternalBankAccountRetrieveResponse private constructor( - private val token: JsonField, - private val type: JsonField, - private val verificationMethod: JsonField, - private val ownerType: JsonField, - private val owner: JsonField, - private val state: JsonField, - private val verificationState: 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 companyId: JsonField, private val address: JsonField, + private val companyId: JsonField, + private val country: JsonField, + private val created: JsonField, + private val currency: JsonField, private val dob: JsonField, private val doingBusinessAs: JsonField, + private val lastFour: JsonField, + private val name: 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 verificationFailedReason: JsonField, + private val verificationMethod: JsonField, + private val verificationState: JsonField, private val additionalProperties: Map, ) { @@ -49,30 +50,36 @@ private constructor( private var hashCode: Int = 0 /** - * 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 + * 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 token(): String = token.getRequired("token") - - fun type(): Type = type.getRequired("type") + fun accountToken(): String? = accountToken.getNullable("account_token") - fun verificationMethod(): VerificationMethod = - verificationMethod.getRequired("verification_method") + /** + * Address used during Address Verification Service (AVS) checks during transactions if enabled + * via Auth Rules. + */ + fun address(): ExternalBankAccountAddress? = address.getNullable("address") - fun ownerType(): OwnerType = ownerType.getRequired("owner_type") + /** Optional field that helps identify bank accounts in receipts */ + fun companyId(): String? = companyId.getNullable("company_id") /** - * Legal Name of the business or individual who owns the external account. This will appear in - * statements + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - fun owner(): String = owner.getRequired("owner") + fun country(): String = country.getRequired("country") - fun state(): State = state.getRequired("state") + /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ + fun created(): OffsetDateTime = created.getRequired("created") - fun verificationState(): VerificationState = verificationState.getRequired("verification_state") + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + fun currency(): String = currency.getRequired("currency") - fun routingNumber(): String = routingNumber.getRequired("routing_number") + /** Date of Birth of the Individual that owns the external bank account */ + fun dob(): LocalDate? = dob.getNullable("dob") + + fun doingBusinessAs(): String? = doingBusinessAs.getNullable("doing_business_as") /** The last 4 digits of the bank account. Derived by Lithic from the account number passed */ fun lastFour(): String = lastFour.getRequired("last_four") @@ -80,66 +87,73 @@ private constructor( /** The nickname given to this record of External Bank Account */ fun name(): String? = name.getNullable("name") - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - fun currency(): String = currency.getRequired("currency") - /** - * 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") + fun owner(): String = owner.getRequired("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 - */ - fun accountToken(): String? = accountToken.getNullable("account_token") + fun ownerType(): OwnerType = ownerType.getRequired("owner_type") - /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ - fun created(): OffsetDateTime = created.getRequired("created") + fun routingNumber(): String = routingNumber.getRequired("routing_number") - /** Optional field that helps identify bank accounts in receipts */ - fun companyId(): String? = companyId.getNullable("company_id") + fun state(): State = state.getRequired("state") /** - * 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(): ExternalBankAccountAddress? = address.getNullable("address") - - /** Date of Birth of the Individual that owns the external bank account */ - fun dob(): LocalDate? = dob.getNullable("dob") + fun token(): String = token.getRequired("token") - fun doingBusinessAs(): String? = doingBusinessAs.getNullable("doing_business_as") + fun type(): Type = type.getRequired("type") fun userDefinedId(): String? = userDefinedId.getNullable("user_defined_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 + * 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 + * network */ - @JsonProperty("token") @ExcludeMissing fun _token() = token + fun verificationFailedReason(): String? = + verificationFailedReason.getNullable("verification_failed_reason") - @JsonProperty("type") @ExcludeMissing fun _type() = type + fun verificationMethod(): VerificationMethod = + verificationMethod.getRequired("verification_method") - @JsonProperty("verification_method") - @ExcludeMissing - fun _verificationMethod() = verificationMethod + fun verificationState(): VerificationState = verificationState.getRequired("verification_state") - @JsonProperty("owner_type") @ExcludeMissing fun _ownerType() = ownerType + /** + * 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 /** - * Legal Name of the business or individual who owns the external account. This will appear in - * statements + * Address used during Address Verification Service (AVS) checks during transactions if enabled + * via Auth Rules. */ - @JsonProperty("owner") @ExcludeMissing fun _owner() = owner + @JsonProperty("address") @ExcludeMissing fun _address() = address - @JsonProperty("state") @ExcludeMissing fun _state() = state + /** Optional field that helps identify bank accounts in receipts */ + @JsonProperty("company_id") @ExcludeMissing fun _companyId() = companyId - @JsonProperty("verification_state") @ExcludeMissing fun _verificationState() = verificationState + /** + * 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") @ExcludeMissing fun _country() = country - @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 + + /** 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("doing_business_as") @ExcludeMissing fun _doingBusinessAs() = doingBusinessAs /** The last 4 digits of the bank account. Derived by Lithic from the account number passed */ @JsonProperty("last_four") @ExcludeMissing fun _lastFour() = lastFour @@ -147,39 +161,43 @@ 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 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 + @JsonProperty("owner") @ExcludeMissing fun _owner() = owner + + @JsonProperty("owner_type") @ExcludeMissing fun _ownerType() = ownerType + + @JsonProperty("routing_number") @ExcludeMissing fun _routingNumber() = routingNumber + + @JsonProperty("state") @ExcludeMissing fun _state() = 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 + * 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("account_token") @ExcludeMissing fun _accountToken() = accountToken + @JsonProperty("token") @ExcludeMissing fun _token() = token - /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ - @JsonProperty("created") @ExcludeMissing fun _created() = created + @JsonProperty("type") @ExcludeMissing fun _type() = type - /** Optional field that helps identify bank accounts in receipts */ - @JsonProperty("company_id") @ExcludeMissing fun _companyId() = companyId + @JsonProperty("user_defined_id") @ExcludeMissing fun _userDefinedId() = userDefinedId /** - * Address used during Address Verification Service (AVS) checks during transactions if enabled - * via Auth Rules. + * 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 + * network */ - @JsonProperty("address") @ExcludeMissing fun _address() = address - - /** Date of Birth of the Individual that owns the external bank account */ - @JsonProperty("dob") @ExcludeMissing fun _dob() = dob + @JsonProperty("verification_failed_reason") + @ExcludeMissing + fun _verificationFailedReason() = verificationFailedReason - @JsonProperty("doing_business_as") @ExcludeMissing fun _doingBusinessAs() = doingBusinessAs + @JsonProperty("verification_method") + @ExcludeMissing + fun _verificationMethod() = verificationMethod - @JsonProperty("user_defined_id") @ExcludeMissing fun _userDefinedId() = userDefinedId + @JsonProperty("verification_state") @ExcludeMissing fun _verificationState() = verificationState @JsonAnyGetter @ExcludeMissing @@ -187,25 +205,26 @@ private constructor( fun validate(): ExternalBankAccountRetrieveResponse = apply { if (!validated) { - token() - type() - verificationMethod() - ownerType() - owner() - state() - verificationState() - routingNumber() - lastFour() - name() - currency() - country() accountToken() - created() - companyId() address()?.validate() + companyId() + country() + created() + currency() dob() doingBusinessAs() + lastFour() + name() + owner() + ownerType() + routingNumber() + state() + token() + type() userDefinedId() + verificationFailedReason() + verificationMethod() + verificationState() validated = true } } @@ -218,25 +237,26 @@ private constructor( } return other is ExternalBankAccountRetrieveResponse && - this.token == other.token && - this.type == other.type && - this.verificationMethod == other.verificationMethod && - this.ownerType == other.ownerType && - this.owner == other.owner && - this.state == other.state && - this.verificationState == other.verificationState && - 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.companyId == other.companyId && this.address == other.address && + this.companyId == other.companyId && + this.country == other.country && + this.created == other.created && + this.currency == other.currency && this.dob == other.dob && this.doingBusinessAs == other.doingBusinessAs && + this.lastFour == other.lastFour && + this.name == other.name && + 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.verificationFailedReason == other.verificationFailedReason && + this.verificationMethod == other.verificationMethod && + this.verificationState == other.verificationState && this.additionalProperties == other.additionalProperties } @@ -244,25 +264,26 @@ private constructor( if (hashCode == 0) { hashCode = Objects.hash( - token, - type, - verificationMethod, - ownerType, - owner, - state, - verificationState, - routingNumber, - lastFour, - name, - currency, - country, accountToken, - created, - companyId, address, + companyId, + country, + created, + currency, dob, doingBusinessAs, + lastFour, + name, + owner, + ownerType, + routingNumber, + state, + token, + type, userDefinedId, + verificationFailedReason, + verificationMethod, + verificationState, additionalProperties, ) } @@ -270,7 +291,7 @@ private constructor( } override fun toString() = - "ExternalBankAccountRetrieveResponse{token=$token, type=$type, verificationMethod=$verificationMethod, ownerType=$ownerType, owner=$owner, state=$state, verificationState=$verificationState, routingNumber=$routingNumber, lastFour=$lastFour, name=$name, currency=$currency, country=$country, accountToken=$accountToken, created=$created, companyId=$companyId, address=$address, dob=$dob, doingBusinessAs=$doingBusinessAs, userDefinedId=$userDefinedId, additionalProperties=$additionalProperties}" + "ExternalBankAccountRetrieveResponse{accountToken=$accountToken, address=$address, companyId=$companyId, country=$country, created=$created, currency=$currency, dob=$dob, doingBusinessAs=$doingBusinessAs, lastFour=$lastFour, name=$name, owner=$owner, ownerType=$ownerType, routingNumber=$routingNumber, state=$state, token=$token, type=$type, userDefinedId=$userDefinedId, verificationFailedReason=$verificationFailedReason, verificationMethod=$verificationMethod, verificationState=$verificationState, additionalProperties=$additionalProperties}" companion object { @@ -279,124 +300,144 @@ private constructor( class Builder { - private var token: JsonField = JsonMissing.of() - private var type: JsonField = JsonMissing.of() - private var verificationMethod: JsonField = JsonMissing.of() - private var ownerType: JsonField = JsonMissing.of() - private var owner: JsonField = JsonMissing.of() - private var state: JsonField = JsonMissing.of() - private var verificationState: 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 companyId: JsonField = JsonMissing.of() private var address: JsonField = JsonMissing.of() + private var companyId: JsonField = JsonMissing.of() + private var country: JsonField = JsonMissing.of() + private var created: JsonField = JsonMissing.of() + private var currency: 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 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 verificationFailedReason: JsonField = JsonMissing.of() + private var verificationMethod: JsonField = JsonMissing.of() + private var verificationState: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() internal fun from( externalBankAccountRetrieveResponse: ExternalBankAccountRetrieveResponse ) = apply { - this.token = externalBankAccountRetrieveResponse.token - this.type = externalBankAccountRetrieveResponse.type - this.verificationMethod = externalBankAccountRetrieveResponse.verificationMethod - this.ownerType = externalBankAccountRetrieveResponse.ownerType - this.owner = externalBankAccountRetrieveResponse.owner - this.state = externalBankAccountRetrieveResponse.state - this.verificationState = externalBankAccountRetrieveResponse.verificationState - this.routingNumber = externalBankAccountRetrieveResponse.routingNumber - this.lastFour = externalBankAccountRetrieveResponse.lastFour - this.name = externalBankAccountRetrieveResponse.name - this.currency = externalBankAccountRetrieveResponse.currency + this.accountToken = externalBankAccountRetrieveResponse.accountToken + this.address = externalBankAccountRetrieveResponse.address + this.companyId = externalBankAccountRetrieveResponse.companyId this.country = externalBankAccountRetrieveResponse.country - this.accountToken = externalBankAccountRetrieveResponse.accountToken this.created = externalBankAccountRetrieveResponse.created - this.companyId = externalBankAccountRetrieveResponse.companyId - this.address = externalBankAccountRetrieveResponse.address + this.currency = externalBankAccountRetrieveResponse.currency this.dob = externalBankAccountRetrieveResponse.dob this.doingBusinessAs = externalBankAccountRetrieveResponse.doingBusinessAs + this.lastFour = externalBankAccountRetrieveResponse.lastFour + this.name = externalBankAccountRetrieveResponse.name + 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.verificationFailedReason = + externalBankAccountRetrieveResponse.verificationFailedReason + this.verificationMethod = externalBankAccountRetrieveResponse.verificationMethod + this.verificationState = externalBankAccountRetrieveResponse.verificationState additionalProperties(externalBankAccountRetrieveResponse.additionalProperties) } /** - * 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 + * 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 token(token: String) = token(JsonField.of(token)) + fun accountToken(accountToken: String) = accountToken(JsonField.of(accountToken)) /** - * 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 + * 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("token") + @JsonProperty("account_token") @ExcludeMissing - fun token(token: JsonField) = apply { this.token = token } + fun accountToken(accountToken: JsonField) = apply { + this.accountToken = accountToken + } - fun type(type: Type) = type(JsonField.of(type)) + /** + * Address used during Address Verification Service (AVS) checks during transactions if + * enabled via Auth Rules. + */ + fun address(address: ExternalBankAccountAddress) = address(JsonField.of(address)) - @JsonProperty("type") + /** + * Address used during Address Verification Service (AVS) checks during transactions if + * enabled via Auth Rules. + */ + @JsonProperty("address") @ExcludeMissing - fun type(type: JsonField) = apply { this.type = type } + fun address(address: JsonField) = apply { + this.address = address + } - fun verificationMethod(verificationMethod: VerificationMethod) = - verificationMethod(JsonField.of(verificationMethod)) + /** Optional field that helps identify bank accounts in receipts */ + fun companyId(companyId: String) = companyId(JsonField.of(companyId)) - @JsonProperty("verification_method") + /** Optional field that helps identify bank accounts in receipts */ + @JsonProperty("company_id") @ExcludeMissing - fun verificationMethod(verificationMethod: JsonField) = apply { - this.verificationMethod = verificationMethod - } + fun companyId(companyId: JsonField) = apply { this.companyId = companyId } - fun ownerType(ownerType: OwnerType) = ownerType(JsonField.of(ownerType)) + /** + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA + */ + fun country(country: String) = country(JsonField.of(country)) - @JsonProperty("owner_type") + /** + * 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") @ExcludeMissing - fun ownerType(ownerType: JsonField) = apply { this.ownerType = ownerType } + 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 + * An ISO 8601 string representing when this funding source was added to the Lithic account. */ - fun owner(owner: String) = owner(JsonField.of(owner)) + fun created(created: OffsetDateTime) = created(JsonField.of(created)) /** - * Legal Name of the business or individual who owns the external account. This will appear - * in statements + * An ISO 8601 string representing when this funding source was added to the Lithic account. */ - @JsonProperty("owner") + @JsonProperty("created") @ExcludeMissing - fun owner(owner: JsonField) = apply { this.owner = owner } + fun created(created: JsonField) = apply { this.created = created } - fun state(state: State) = state(JsonField.of(state)) + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + fun currency(currency: String) = currency(JsonField.of(currency)) - @JsonProperty("state") + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + @JsonProperty("currency") @ExcludeMissing - fun state(state: JsonField) = apply { this.state = state } + fun currency(currency: JsonField) = apply { this.currency = currency } - fun verificationState(verificationState: VerificationState) = - verificationState(JsonField.of(verificationState)) + /** Date of Birth of the Individual that owns the external bank account */ + fun dob(dob: LocalDate) = dob(JsonField.of(dob)) - @JsonProperty("verification_state") + /** Date of Birth of the Individual that owns the external bank account */ + @JsonProperty("dob") @ExcludeMissing - fun verificationState(verificationState: JsonField) = apply { - this.verificationState = verificationState - } + fun dob(dob: JsonField) = apply { this.dob = dob } - fun routingNumber(routingNumber: String) = routingNumber(JsonField.of(routingNumber)) + fun doingBusinessAs(doingBusinessAs: String) = + doingBusinessAs(JsonField.of(doingBusinessAs)) - @JsonProperty("routing_number") + @JsonProperty("doing_business_as") @ExcludeMissing - fun routingNumber(routingNumber: JsonField) = apply { - this.routingNumber = routingNumber + fun doingBusinessAs(doingBusinessAs: JsonField) = apply { + this.doingBusinessAs = doingBusinessAs } /** @@ -419,103 +460,105 @@ 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 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(country: String) = country(JsonField.of(country)) + fun owner(owner: String) = owner(JsonField.of(owner)) /** - * 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") + @JsonProperty("owner") @ExcludeMissing - fun country(country: JsonField) = apply { this.country = country } + fun owner(owner: JsonField) = 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 - */ - fun accountToken(accountToken: String) = accountToken(JsonField.of(accountToken)) + fun ownerType(ownerType: OwnerType) = ownerType(JsonField.of(ownerType)) - /** - * 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") + @JsonProperty("owner_type") @ExcludeMissing - fun accountToken(accountToken: JsonField) = apply { - this.accountToken = accountToken + fun ownerType(ownerType: JsonField) = apply { this.ownerType = ownerType } + + fun routingNumber(routingNumber: String) = routingNumber(JsonField.of(routingNumber)) + + @JsonProperty("routing_number") + @ExcludeMissing + fun routingNumber(routingNumber: JsonField) = apply { + this.routingNumber = routingNumber } + fun state(state: State) = state(JsonField.of(state)) + + @JsonProperty("state") + @ExcludeMissing + fun state(state: JsonField) = apply { this.state = state } + /** - * An ISO 8601 string representing when this funding source was added to the Lithic account. + * 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 created(created: OffsetDateTime) = created(JsonField.of(created)) + fun token(token: String) = token(JsonField.of(token)) /** - * An ISO 8601 string representing when this funding source was added to the Lithic account. + * 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("created") + @JsonProperty("token") @ExcludeMissing - fun created(created: JsonField) = apply { this.created = created } + fun token(token: JsonField) = apply { this.token = token } - /** Optional field that helps identify bank accounts in receipts */ - fun companyId(companyId: String) = companyId(JsonField.of(companyId)) + fun type(type: Type) = type(JsonField.of(type)) - /** Optional field that helps identify bank accounts in receipts */ - @JsonProperty("company_id") + @JsonProperty("type") @ExcludeMissing - fun companyId(companyId: JsonField) = apply { this.companyId = companyId } + fun type(type: JsonField) = apply { this.type = type } + + fun userDefinedId(userDefinedId: String) = userDefinedId(JsonField.of(userDefinedId)) + + @JsonProperty("user_defined_id") + @ExcludeMissing + fun userDefinedId(userDefinedId: JsonField) = apply { + this.userDefinedId = userDefinedId + } /** - * Address used during Address Verification Service (AVS) checks during transactions if - * enabled via Auth Rules. + * 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 + * network */ - fun address(address: ExternalBankAccountAddress) = address(JsonField.of(address)) + fun verificationFailedReason(verificationFailedReason: String) = + verificationFailedReason(JsonField.of(verificationFailedReason)) /** - * Address used during Address Verification Service (AVS) checks during transactions if - * enabled via Auth Rules. + * 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 + * network */ - @JsonProperty("address") + @JsonProperty("verification_failed_reason") @ExcludeMissing - fun address(address: JsonField) = apply { - this.address = address + fun verificationFailedReason(verificationFailedReason: JsonField) = apply { + this.verificationFailedReason = verificationFailedReason } - /** 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") - @ExcludeMissing - fun dob(dob: JsonField) = apply { this.dob = dob } - - fun doingBusinessAs(doingBusinessAs: String) = - doingBusinessAs(JsonField.of(doingBusinessAs)) + fun verificationMethod(verificationMethod: VerificationMethod) = + verificationMethod(JsonField.of(verificationMethod)) - @JsonProperty("doing_business_as") + @JsonProperty("verification_method") @ExcludeMissing - fun doingBusinessAs(doingBusinessAs: JsonField) = apply { - this.doingBusinessAs = doingBusinessAs + fun verificationMethod(verificationMethod: JsonField) = apply { + this.verificationMethod = verificationMethod } - fun userDefinedId(userDefinedId: String) = userDefinedId(JsonField.of(userDefinedId)) + fun verificationState(verificationState: VerificationState) = + verificationState(JsonField.of(verificationState)) - @JsonProperty("user_defined_id") + @JsonProperty("verification_state") @ExcludeMissing - fun userDefinedId(userDefinedId: JsonField) = apply { - this.userDefinedId = userDefinedId + fun verificationState(verificationState: JsonField) = apply { + this.verificationState = verificationState } fun additionalProperties(additionalProperties: Map) = apply { @@ -534,25 +577,26 @@ private constructor( fun build(): ExternalBankAccountRetrieveResponse = ExternalBankAccountRetrieveResponse( - token, - type, - verificationMethod, - ownerType, - owner, - state, - verificationState, - routingNumber, - lastFour, - name, - currency, - country, accountToken, - created, - companyId, address, + companyId, + country, + created, + currency, dob, doingBusinessAs, + lastFour, + name, + owner, + ownerType, + routingNumber, + state, + token, + type, userDefinedId, + verificationFailedReason, + verificationMethod, + verificationState, additionalProperties.toUnmodifiable(), ) } diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponse.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponse.kt index 2f11cdf4..5ecdf68a 100644 --- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponse.kt +++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponse.kt @@ -22,25 +22,26 @@ import java.util.Objects @NoAutoDetect class ExternalBankAccountUpdateResponse private constructor( - private val token: JsonField, - private val type: JsonField, - private val verificationMethod: JsonField, - private val ownerType: JsonField, - private val owner: JsonField, - private val state: JsonField, - private val verificationState: 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 companyId: JsonField, private val address: JsonField, + private val companyId: JsonField, + private val country: JsonField, + private val created: JsonField, + private val currency: JsonField, private val dob: JsonField, private val doingBusinessAs: JsonField, + private val lastFour: JsonField, + private val name: 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 verificationFailedReason: JsonField, + private val verificationMethod: JsonField, + private val verificationState: JsonField, private val additionalProperties: Map, ) { @@ -49,30 +50,36 @@ private constructor( private var hashCode: Int = 0 /** - * 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 + * 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 token(): String = token.getRequired("token") - - fun type(): Type = type.getRequired("type") + fun accountToken(): String? = accountToken.getNullable("account_token") - fun verificationMethod(): VerificationMethod = - verificationMethod.getRequired("verification_method") + /** + * Address used during Address Verification Service (AVS) checks during transactions if enabled + * via Auth Rules. + */ + fun address(): ExternalBankAccountAddress? = address.getNullable("address") - fun ownerType(): OwnerType = ownerType.getRequired("owner_type") + /** Optional field that helps identify bank accounts in receipts */ + fun companyId(): String? = companyId.getNullable("company_id") /** - * Legal Name of the business or individual who owns the external account. This will appear in - * statements + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - fun owner(): String = owner.getRequired("owner") + fun country(): String = country.getRequired("country") - fun state(): State = state.getRequired("state") + /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ + fun created(): OffsetDateTime = created.getRequired("created") - fun verificationState(): VerificationState = verificationState.getRequired("verification_state") + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + fun currency(): String = currency.getRequired("currency") - fun routingNumber(): String = routingNumber.getRequired("routing_number") + /** Date of Birth of the Individual that owns the external bank account */ + fun dob(): LocalDate? = dob.getNullable("dob") + + fun doingBusinessAs(): String? = doingBusinessAs.getNullable("doing_business_as") /** The last 4 digits of the bank account. Derived by Lithic from the account number passed */ fun lastFour(): String = lastFour.getRequired("last_four") @@ -80,66 +87,73 @@ private constructor( /** The nickname given to this record of External Bank Account */ fun name(): String? = name.getNullable("name") - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - fun currency(): String = currency.getRequired("currency") - /** - * 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") + fun owner(): String = owner.getRequired("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 - */ - fun accountToken(): String? = accountToken.getNullable("account_token") + fun ownerType(): OwnerType = ownerType.getRequired("owner_type") - /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ - fun created(): OffsetDateTime = created.getRequired("created") + fun routingNumber(): String = routingNumber.getRequired("routing_number") - /** Optional field that helps identify bank accounts in receipts */ - fun companyId(): String? = companyId.getNullable("company_id") + fun state(): State = state.getRequired("state") /** - * 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(): ExternalBankAccountAddress? = address.getNullable("address") - - /** Date of Birth of the Individual that owns the external bank account */ - fun dob(): LocalDate? = dob.getNullable("dob") + fun token(): String = token.getRequired("token") - fun doingBusinessAs(): String? = doingBusinessAs.getNullable("doing_business_as") + fun type(): Type = type.getRequired("type") fun userDefinedId(): String? = userDefinedId.getNullable("user_defined_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 + * 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 + * network */ - @JsonProperty("token") @ExcludeMissing fun _token() = token + fun verificationFailedReason(): String? = + verificationFailedReason.getNullable("verification_failed_reason") - @JsonProperty("type") @ExcludeMissing fun _type() = type + fun verificationMethod(): VerificationMethod = + verificationMethod.getRequired("verification_method") - @JsonProperty("verification_method") - @ExcludeMissing - fun _verificationMethod() = verificationMethod + fun verificationState(): VerificationState = verificationState.getRequired("verification_state") - @JsonProperty("owner_type") @ExcludeMissing fun _ownerType() = ownerType + /** + * 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 /** - * Legal Name of the business or individual who owns the external account. This will appear in - * statements + * Address used during Address Verification Service (AVS) checks during transactions if enabled + * via Auth Rules. */ - @JsonProperty("owner") @ExcludeMissing fun _owner() = owner + @JsonProperty("address") @ExcludeMissing fun _address() = address - @JsonProperty("state") @ExcludeMissing fun _state() = state + /** Optional field that helps identify bank accounts in receipts */ + @JsonProperty("company_id") @ExcludeMissing fun _companyId() = companyId - @JsonProperty("verification_state") @ExcludeMissing fun _verificationState() = verificationState + /** + * 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") @ExcludeMissing fun _country() = country - @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 + + /** 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("doing_business_as") @ExcludeMissing fun _doingBusinessAs() = doingBusinessAs /** The last 4 digits of the bank account. Derived by Lithic from the account number passed */ @JsonProperty("last_four") @ExcludeMissing fun _lastFour() = lastFour @@ -147,39 +161,43 @@ 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 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 + @JsonProperty("owner") @ExcludeMissing fun _owner() = owner + + @JsonProperty("owner_type") @ExcludeMissing fun _ownerType() = ownerType + + @JsonProperty("routing_number") @ExcludeMissing fun _routingNumber() = routingNumber + + @JsonProperty("state") @ExcludeMissing fun _state() = 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 + * 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("account_token") @ExcludeMissing fun _accountToken() = accountToken + @JsonProperty("token") @ExcludeMissing fun _token() = token - /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ - @JsonProperty("created") @ExcludeMissing fun _created() = created + @JsonProperty("type") @ExcludeMissing fun _type() = type - /** Optional field that helps identify bank accounts in receipts */ - @JsonProperty("company_id") @ExcludeMissing fun _companyId() = companyId + @JsonProperty("user_defined_id") @ExcludeMissing fun _userDefinedId() = userDefinedId /** - * Address used during Address Verification Service (AVS) checks during transactions if enabled - * via Auth Rules. + * 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 + * network */ - @JsonProperty("address") @ExcludeMissing fun _address() = address - - /** Date of Birth of the Individual that owns the external bank account */ - @JsonProperty("dob") @ExcludeMissing fun _dob() = dob + @JsonProperty("verification_failed_reason") + @ExcludeMissing + fun _verificationFailedReason() = verificationFailedReason - @JsonProperty("doing_business_as") @ExcludeMissing fun _doingBusinessAs() = doingBusinessAs + @JsonProperty("verification_method") + @ExcludeMissing + fun _verificationMethod() = verificationMethod - @JsonProperty("user_defined_id") @ExcludeMissing fun _userDefinedId() = userDefinedId + @JsonProperty("verification_state") @ExcludeMissing fun _verificationState() = verificationState @JsonAnyGetter @ExcludeMissing @@ -187,25 +205,26 @@ private constructor( fun validate(): ExternalBankAccountUpdateResponse = apply { if (!validated) { - token() - type() - verificationMethod() - ownerType() - owner() - state() - verificationState() - routingNumber() - lastFour() - name() - currency() - country() accountToken() - created() - companyId() address()?.validate() + companyId() + country() + created() + currency() dob() doingBusinessAs() + lastFour() + name() + owner() + ownerType() + routingNumber() + state() + token() + type() userDefinedId() + verificationFailedReason() + verificationMethod() + verificationState() validated = true } } @@ -218,25 +237,26 @@ private constructor( } return other is ExternalBankAccountUpdateResponse && - this.token == other.token && - this.type == other.type && - this.verificationMethod == other.verificationMethod && - this.ownerType == other.ownerType && - this.owner == other.owner && - this.state == other.state && - this.verificationState == other.verificationState && - 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.companyId == other.companyId && this.address == other.address && + this.companyId == other.companyId && + this.country == other.country && + this.created == other.created && + this.currency == other.currency && this.dob == other.dob && this.doingBusinessAs == other.doingBusinessAs && + this.lastFour == other.lastFour && + this.name == other.name && + 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.verificationFailedReason == other.verificationFailedReason && + this.verificationMethod == other.verificationMethod && + this.verificationState == other.verificationState && this.additionalProperties == other.additionalProperties } @@ -244,25 +264,26 @@ private constructor( if (hashCode == 0) { hashCode = Objects.hash( - token, - type, - verificationMethod, - ownerType, - owner, - state, - verificationState, - routingNumber, - lastFour, - name, - currency, - country, accountToken, - created, - companyId, address, + companyId, + country, + created, + currency, dob, doingBusinessAs, + lastFour, + name, + owner, + ownerType, + routingNumber, + state, + token, + type, userDefinedId, + verificationFailedReason, + verificationMethod, + verificationState, additionalProperties, ) } @@ -270,7 +291,7 @@ private constructor( } override fun toString() = - "ExternalBankAccountUpdateResponse{token=$token, type=$type, verificationMethod=$verificationMethod, ownerType=$ownerType, owner=$owner, state=$state, verificationState=$verificationState, routingNumber=$routingNumber, lastFour=$lastFour, name=$name, currency=$currency, country=$country, accountToken=$accountToken, created=$created, companyId=$companyId, address=$address, dob=$dob, doingBusinessAs=$doingBusinessAs, userDefinedId=$userDefinedId, additionalProperties=$additionalProperties}" + "ExternalBankAccountUpdateResponse{accountToken=$accountToken, address=$address, companyId=$companyId, country=$country, created=$created, currency=$currency, dob=$dob, doingBusinessAs=$doingBusinessAs, lastFour=$lastFour, name=$name, owner=$owner, ownerType=$ownerType, routingNumber=$routingNumber, state=$state, token=$token, type=$type, userDefinedId=$userDefinedId, verificationFailedReason=$verificationFailedReason, verificationMethod=$verificationMethod, verificationState=$verificationState, additionalProperties=$additionalProperties}" companion object { @@ -279,123 +300,143 @@ private constructor( class Builder { - private var token: JsonField = JsonMissing.of() - private var type: JsonField = JsonMissing.of() - private var verificationMethod: JsonField = JsonMissing.of() - private var ownerType: JsonField = JsonMissing.of() - private var owner: JsonField = JsonMissing.of() - private var state: JsonField = JsonMissing.of() - private var verificationState: 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 companyId: JsonField = JsonMissing.of() private var address: JsonField = JsonMissing.of() + private var companyId: JsonField = JsonMissing.of() + private var country: JsonField = JsonMissing.of() + private var created: JsonField = JsonMissing.of() + private var currency: 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 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 verificationFailedReason: JsonField = JsonMissing.of() + private var verificationMethod: JsonField = JsonMissing.of() + private var verificationState: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() internal fun from(externalBankAccountUpdateResponse: ExternalBankAccountUpdateResponse) = apply { - this.token = externalBankAccountUpdateResponse.token - this.type = externalBankAccountUpdateResponse.type - this.verificationMethod = externalBankAccountUpdateResponse.verificationMethod - this.ownerType = externalBankAccountUpdateResponse.ownerType - this.owner = externalBankAccountUpdateResponse.owner - this.state = externalBankAccountUpdateResponse.state - this.verificationState = externalBankAccountUpdateResponse.verificationState - this.routingNumber = externalBankAccountUpdateResponse.routingNumber - this.lastFour = externalBankAccountUpdateResponse.lastFour - this.name = externalBankAccountUpdateResponse.name - this.currency = externalBankAccountUpdateResponse.currency + this.accountToken = externalBankAccountUpdateResponse.accountToken + this.address = externalBankAccountUpdateResponse.address + this.companyId = externalBankAccountUpdateResponse.companyId this.country = externalBankAccountUpdateResponse.country - this.accountToken = externalBankAccountUpdateResponse.accountToken this.created = externalBankAccountUpdateResponse.created - this.companyId = externalBankAccountUpdateResponse.companyId - this.address = externalBankAccountUpdateResponse.address + this.currency = externalBankAccountUpdateResponse.currency this.dob = externalBankAccountUpdateResponse.dob this.doingBusinessAs = externalBankAccountUpdateResponse.doingBusinessAs + this.lastFour = externalBankAccountUpdateResponse.lastFour + this.name = externalBankAccountUpdateResponse.name + 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.verificationFailedReason = + externalBankAccountUpdateResponse.verificationFailedReason + this.verificationMethod = externalBankAccountUpdateResponse.verificationMethod + this.verificationState = externalBankAccountUpdateResponse.verificationState additionalProperties(externalBankAccountUpdateResponse.additionalProperties) } /** - * 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 + * 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 token(token: String) = token(JsonField.of(token)) + fun accountToken(accountToken: String) = accountToken(JsonField.of(accountToken)) /** - * 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 + * 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("token") + @JsonProperty("account_token") @ExcludeMissing - fun token(token: JsonField) = apply { this.token = token } + fun accountToken(accountToken: JsonField) = apply { + this.accountToken = accountToken + } - fun type(type: Type) = type(JsonField.of(type)) + /** + * Address used during Address Verification Service (AVS) checks during transactions if + * enabled via Auth Rules. + */ + fun address(address: ExternalBankAccountAddress) = address(JsonField.of(address)) - @JsonProperty("type") + /** + * Address used during Address Verification Service (AVS) checks during transactions if + * enabled via Auth Rules. + */ + @JsonProperty("address") @ExcludeMissing - fun type(type: JsonField) = apply { this.type = type } + fun address(address: JsonField) = apply { + this.address = address + } - fun verificationMethod(verificationMethod: VerificationMethod) = - verificationMethod(JsonField.of(verificationMethod)) + /** Optional field that helps identify bank accounts in receipts */ + fun companyId(companyId: String) = companyId(JsonField.of(companyId)) - @JsonProperty("verification_method") + /** Optional field that helps identify bank accounts in receipts */ + @JsonProperty("company_id") @ExcludeMissing - fun verificationMethod(verificationMethod: JsonField) = apply { - this.verificationMethod = verificationMethod - } + fun companyId(companyId: JsonField) = apply { this.companyId = companyId } - fun ownerType(ownerType: OwnerType) = ownerType(JsonField.of(ownerType)) + /** + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA + */ + fun country(country: String) = country(JsonField.of(country)) - @JsonProperty("owner_type") + /** + * 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") @ExcludeMissing - fun ownerType(ownerType: JsonField) = apply { this.ownerType = ownerType } + 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 + * An ISO 8601 string representing when this funding source was added to the Lithic account. */ - fun owner(owner: String) = owner(JsonField.of(owner)) + fun created(created: OffsetDateTime) = created(JsonField.of(created)) /** - * Legal Name of the business or individual who owns the external account. This will appear - * in statements + * An ISO 8601 string representing when this funding source was added to the Lithic account. */ - @JsonProperty("owner") + @JsonProperty("created") @ExcludeMissing - fun owner(owner: JsonField) = apply { this.owner = owner } + fun created(created: JsonField) = apply { this.created = created } - fun state(state: State) = state(JsonField.of(state)) + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + fun currency(currency: String) = currency(JsonField.of(currency)) - @JsonProperty("state") + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + @JsonProperty("currency") @ExcludeMissing - fun state(state: JsonField) = apply { this.state = state } + fun currency(currency: JsonField) = apply { this.currency = currency } - fun verificationState(verificationState: VerificationState) = - verificationState(JsonField.of(verificationState)) + /** Date of Birth of the Individual that owns the external bank account */ + fun dob(dob: LocalDate) = dob(JsonField.of(dob)) - @JsonProperty("verification_state") + /** Date of Birth of the Individual that owns the external bank account */ + @JsonProperty("dob") @ExcludeMissing - fun verificationState(verificationState: JsonField) = apply { - this.verificationState = verificationState - } + fun dob(dob: JsonField) = apply { this.dob = dob } - fun routingNumber(routingNumber: String) = routingNumber(JsonField.of(routingNumber)) + fun doingBusinessAs(doingBusinessAs: String) = + doingBusinessAs(JsonField.of(doingBusinessAs)) - @JsonProperty("routing_number") + @JsonProperty("doing_business_as") @ExcludeMissing - fun routingNumber(routingNumber: JsonField) = apply { - this.routingNumber = routingNumber + fun doingBusinessAs(doingBusinessAs: JsonField) = apply { + this.doingBusinessAs = doingBusinessAs } /** @@ -418,103 +459,105 @@ 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 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(country: String) = country(JsonField.of(country)) + fun owner(owner: String) = owner(JsonField.of(owner)) /** - * 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") + @JsonProperty("owner") @ExcludeMissing - fun country(country: JsonField) = apply { this.country = country } + fun owner(owner: JsonField) = 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 - */ - fun accountToken(accountToken: String) = accountToken(JsonField.of(accountToken)) + fun ownerType(ownerType: OwnerType) = ownerType(JsonField.of(ownerType)) - /** - * 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") + @JsonProperty("owner_type") @ExcludeMissing - fun accountToken(accountToken: JsonField) = apply { - this.accountToken = accountToken + fun ownerType(ownerType: JsonField) = apply { this.ownerType = ownerType } + + fun routingNumber(routingNumber: String) = routingNumber(JsonField.of(routingNumber)) + + @JsonProperty("routing_number") + @ExcludeMissing + fun routingNumber(routingNumber: JsonField) = apply { + this.routingNumber = routingNumber } + fun state(state: State) = state(JsonField.of(state)) + + @JsonProperty("state") + @ExcludeMissing + fun state(state: JsonField) = apply { this.state = state } + /** - * An ISO 8601 string representing when this funding source was added to the Lithic account. + * 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 created(created: OffsetDateTime) = created(JsonField.of(created)) + fun token(token: String) = token(JsonField.of(token)) /** - * An ISO 8601 string representing when this funding source was added to the Lithic account. + * 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("created") + @JsonProperty("token") @ExcludeMissing - fun created(created: JsonField) = apply { this.created = created } + fun token(token: JsonField) = apply { this.token = token } - /** Optional field that helps identify bank accounts in receipts */ - fun companyId(companyId: String) = companyId(JsonField.of(companyId)) + fun type(type: Type) = type(JsonField.of(type)) - /** Optional field that helps identify bank accounts in receipts */ - @JsonProperty("company_id") + @JsonProperty("type") @ExcludeMissing - fun companyId(companyId: JsonField) = apply { this.companyId = companyId } + fun type(type: JsonField) = apply { this.type = type } + + fun userDefinedId(userDefinedId: String) = userDefinedId(JsonField.of(userDefinedId)) + + @JsonProperty("user_defined_id") + @ExcludeMissing + fun userDefinedId(userDefinedId: JsonField) = apply { + this.userDefinedId = userDefinedId + } /** - * Address used during Address Verification Service (AVS) checks during transactions if - * enabled via Auth Rules. + * 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 + * network */ - fun address(address: ExternalBankAccountAddress) = address(JsonField.of(address)) + fun verificationFailedReason(verificationFailedReason: String) = + verificationFailedReason(JsonField.of(verificationFailedReason)) /** - * Address used during Address Verification Service (AVS) checks during transactions if - * enabled via Auth Rules. + * 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 + * network */ - @JsonProperty("address") + @JsonProperty("verification_failed_reason") @ExcludeMissing - fun address(address: JsonField) = apply { - this.address = address + fun verificationFailedReason(verificationFailedReason: JsonField) = apply { + this.verificationFailedReason = verificationFailedReason } - /** 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") - @ExcludeMissing - fun dob(dob: JsonField) = apply { this.dob = dob } - - fun doingBusinessAs(doingBusinessAs: String) = - doingBusinessAs(JsonField.of(doingBusinessAs)) + fun verificationMethod(verificationMethod: VerificationMethod) = + verificationMethod(JsonField.of(verificationMethod)) - @JsonProperty("doing_business_as") + @JsonProperty("verification_method") @ExcludeMissing - fun doingBusinessAs(doingBusinessAs: JsonField) = apply { - this.doingBusinessAs = doingBusinessAs + fun verificationMethod(verificationMethod: JsonField) = apply { + this.verificationMethod = verificationMethod } - fun userDefinedId(userDefinedId: String) = userDefinedId(JsonField.of(userDefinedId)) + fun verificationState(verificationState: VerificationState) = + verificationState(JsonField.of(verificationState)) - @JsonProperty("user_defined_id") + @JsonProperty("verification_state") @ExcludeMissing - fun userDefinedId(userDefinedId: JsonField) = apply { - this.userDefinedId = userDefinedId + fun verificationState(verificationState: JsonField) = apply { + this.verificationState = verificationState } fun additionalProperties(additionalProperties: Map) = apply { @@ -533,25 +576,26 @@ private constructor( fun build(): ExternalBankAccountUpdateResponse = ExternalBankAccountUpdateResponse( - token, - type, - verificationMethod, - ownerType, - owner, - state, - verificationState, - routingNumber, - lastFour, - name, - currency, - country, accountToken, - created, - companyId, address, + companyId, + country, + created, + currency, dob, doingBusinessAs, + lastFour, + name, + owner, + ownerType, + routingNumber, + state, + token, + type, userDefinedId, + verificationFailedReason, + verificationMethod, + verificationState, additionalProperties.toUnmodifiable(), ) } diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/MicroDepositCreateResponse.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/MicroDepositCreateResponse.kt index c4be9e50..418ca8ac 100644 --- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/MicroDepositCreateResponse.kt +++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/MicroDepositCreateResponse.kt @@ -22,25 +22,26 @@ import java.util.Objects @NoAutoDetect class MicroDepositCreateResponse private constructor( - private val token: JsonField, - private val type: JsonField, - private val verificationMethod: JsonField, - private val ownerType: JsonField, - private val owner: JsonField, - private val state: JsonField, - private val verificationState: 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 companyId: JsonField, private val address: JsonField, + private val companyId: JsonField, + private val country: JsonField, + private val created: JsonField, + private val currency: JsonField, private val dob: JsonField, private val doingBusinessAs: JsonField, + private val lastFour: JsonField, + private val name: 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 verificationFailedReason: JsonField, + private val verificationMethod: JsonField, + private val verificationState: JsonField, private val additionalProperties: Map, ) { @@ -49,30 +50,36 @@ private constructor( private var hashCode: Int = 0 /** - * 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 + * 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 token(): String = token.getRequired("token") - - fun type(): Type = type.getRequired("type") + fun accountToken(): String? = accountToken.getNullable("account_token") - fun verificationMethod(): VerificationMethod = - verificationMethod.getRequired("verification_method") + /** + * Address used during Address Verification Service (AVS) checks during transactions if enabled + * via Auth Rules. + */ + fun address(): ExternalBankAccountAddress? = address.getNullable("address") - fun ownerType(): OwnerType = ownerType.getRequired("owner_type") + /** Optional field that helps identify bank accounts in receipts */ + fun companyId(): String? = companyId.getNullable("company_id") /** - * Legal Name of the business or individual who owns the external account. This will appear in - * statements + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA */ - fun owner(): String = owner.getRequired("owner") + fun country(): String = country.getRequired("country") - fun state(): State = state.getRequired("state") + /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ + fun created(): OffsetDateTime = created.getRequired("created") - fun verificationState(): VerificationState = verificationState.getRequired("verification_state") + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + fun currency(): String = currency.getRequired("currency") - fun routingNumber(): String = routingNumber.getRequired("routing_number") + /** Date of Birth of the Individual that owns the external bank account */ + fun dob(): LocalDate? = dob.getNullable("dob") + + fun doingBusinessAs(): String? = doingBusinessAs.getNullable("doing_business_as") /** The last 4 digits of the bank account. Derived by Lithic from the account number passed */ fun lastFour(): String = lastFour.getRequired("last_four") @@ -80,66 +87,73 @@ private constructor( /** The nickname given to this record of External Bank Account */ fun name(): String? = name.getNullable("name") - /** currency of the external account 3-digit alphabetic ISO 4217 code */ - fun currency(): String = currency.getRequired("currency") - /** - * 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") + fun owner(): String = owner.getRequired("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 - */ - fun accountToken(): String? = accountToken.getNullable("account_token") + fun ownerType(): OwnerType = ownerType.getRequired("owner_type") - /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ - fun created(): OffsetDateTime = created.getRequired("created") + fun routingNumber(): String = routingNumber.getRequired("routing_number") - /** Optional field that helps identify bank accounts in receipts */ - fun companyId(): String? = companyId.getNullable("company_id") + fun state(): State = state.getRequired("state") /** - * 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(): ExternalBankAccountAddress? = address.getNullable("address") - - /** Date of Birth of the Individual that owns the external bank account */ - fun dob(): LocalDate? = dob.getNullable("dob") + fun token(): String = token.getRequired("token") - fun doingBusinessAs(): String? = doingBusinessAs.getNullable("doing_business_as") + fun type(): Type = type.getRequired("type") fun userDefinedId(): String? = userDefinedId.getNullable("user_defined_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 + * 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 + * network */ - @JsonProperty("token") @ExcludeMissing fun _token() = token + fun verificationFailedReason(): String? = + verificationFailedReason.getNullable("verification_failed_reason") - @JsonProperty("type") @ExcludeMissing fun _type() = type + fun verificationMethod(): VerificationMethod = + verificationMethod.getRequired("verification_method") - @JsonProperty("verification_method") - @ExcludeMissing - fun _verificationMethod() = verificationMethod + fun verificationState(): VerificationState = verificationState.getRequired("verification_state") - @JsonProperty("owner_type") @ExcludeMissing fun _ownerType() = ownerType + /** + * 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 /** - * Legal Name of the business or individual who owns the external account. This will appear in - * statements + * Address used during Address Verification Service (AVS) checks during transactions if enabled + * via Auth Rules. */ - @JsonProperty("owner") @ExcludeMissing fun _owner() = owner + @JsonProperty("address") @ExcludeMissing fun _address() = address - @JsonProperty("state") @ExcludeMissing fun _state() = state + /** Optional field that helps identify bank accounts in receipts */ + @JsonProperty("company_id") @ExcludeMissing fun _companyId() = companyId - @JsonProperty("verification_state") @ExcludeMissing fun _verificationState() = verificationState + /** + * 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") @ExcludeMissing fun _country() = country - @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 + + /** 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("doing_business_as") @ExcludeMissing fun _doingBusinessAs() = doingBusinessAs /** The last 4 digits of the bank account. Derived by Lithic from the account number passed */ @JsonProperty("last_four") @ExcludeMissing fun _lastFour() = lastFour @@ -147,39 +161,43 @@ 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 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 + @JsonProperty("owner") @ExcludeMissing fun _owner() = owner + + @JsonProperty("owner_type") @ExcludeMissing fun _ownerType() = ownerType + + @JsonProperty("routing_number") @ExcludeMissing fun _routingNumber() = routingNumber + + @JsonProperty("state") @ExcludeMissing fun _state() = 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 + * 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("account_token") @ExcludeMissing fun _accountToken() = accountToken + @JsonProperty("token") @ExcludeMissing fun _token() = token - /** An ISO 8601 string representing when this funding source was added to the Lithic account. */ - @JsonProperty("created") @ExcludeMissing fun _created() = created + @JsonProperty("type") @ExcludeMissing fun _type() = type - /** Optional field that helps identify bank accounts in receipts */ - @JsonProperty("company_id") @ExcludeMissing fun _companyId() = companyId + @JsonProperty("user_defined_id") @ExcludeMissing fun _userDefinedId() = userDefinedId /** - * Address used during Address Verification Service (AVS) checks during transactions if enabled - * via Auth Rules. + * 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 + * network */ - @JsonProperty("address") @ExcludeMissing fun _address() = address - - /** Date of Birth of the Individual that owns the external bank account */ - @JsonProperty("dob") @ExcludeMissing fun _dob() = dob + @JsonProperty("verification_failed_reason") + @ExcludeMissing + fun _verificationFailedReason() = verificationFailedReason - @JsonProperty("doing_business_as") @ExcludeMissing fun _doingBusinessAs() = doingBusinessAs + @JsonProperty("verification_method") + @ExcludeMissing + fun _verificationMethod() = verificationMethod - @JsonProperty("user_defined_id") @ExcludeMissing fun _userDefinedId() = userDefinedId + @JsonProperty("verification_state") @ExcludeMissing fun _verificationState() = verificationState @JsonAnyGetter @ExcludeMissing @@ -187,25 +205,26 @@ private constructor( fun validate(): MicroDepositCreateResponse = apply { if (!validated) { - token() - type() - verificationMethod() - ownerType() - owner() - state() - verificationState() - routingNumber() - lastFour() - name() - currency() - country() accountToken() - created() - companyId() address()?.validate() + companyId() + country() + created() + currency() dob() doingBusinessAs() + lastFour() + name() + owner() + ownerType() + routingNumber() + state() + token() + type() userDefinedId() + verificationFailedReason() + verificationMethod() + verificationState() validated = true } } @@ -218,25 +237,26 @@ private constructor( } return other is MicroDepositCreateResponse && - this.token == other.token && - this.type == other.type && - this.verificationMethod == other.verificationMethod && - this.ownerType == other.ownerType && - this.owner == other.owner && - this.state == other.state && - this.verificationState == other.verificationState && - 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.companyId == other.companyId && this.address == other.address && + this.companyId == other.companyId && + this.country == other.country && + this.created == other.created && + this.currency == other.currency && this.dob == other.dob && this.doingBusinessAs == other.doingBusinessAs && + this.lastFour == other.lastFour && + this.name == other.name && + 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.verificationFailedReason == other.verificationFailedReason && + this.verificationMethod == other.verificationMethod && + this.verificationState == other.verificationState && this.additionalProperties == other.additionalProperties } @@ -244,25 +264,26 @@ private constructor( if (hashCode == 0) { hashCode = Objects.hash( - token, - type, - verificationMethod, - ownerType, - owner, - state, - verificationState, - routingNumber, - lastFour, - name, - currency, - country, accountToken, - created, - companyId, address, + companyId, + country, + created, + currency, dob, doingBusinessAs, + lastFour, + name, + owner, + ownerType, + routingNumber, + state, + token, + type, userDefinedId, + verificationFailedReason, + verificationMethod, + verificationState, additionalProperties, ) } @@ -270,7 +291,7 @@ private constructor( } override fun toString() = - "MicroDepositCreateResponse{token=$token, type=$type, verificationMethod=$verificationMethod, ownerType=$ownerType, owner=$owner, state=$state, verificationState=$verificationState, routingNumber=$routingNumber, lastFour=$lastFour, name=$name, currency=$currency, country=$country, accountToken=$accountToken, created=$created, companyId=$companyId, address=$address, dob=$dob, doingBusinessAs=$doingBusinessAs, userDefinedId=$userDefinedId, additionalProperties=$additionalProperties}" + "MicroDepositCreateResponse{accountToken=$accountToken, address=$address, companyId=$companyId, country=$country, created=$created, currency=$currency, dob=$dob, doingBusinessAs=$doingBusinessAs, lastFour=$lastFour, name=$name, owner=$owner, ownerType=$ownerType, routingNumber=$routingNumber, state=$state, token=$token, type=$type, userDefinedId=$userDefinedId, verificationFailedReason=$verificationFailedReason, verificationMethod=$verificationMethod, verificationState=$verificationState, additionalProperties=$additionalProperties}" companion object { @@ -279,122 +300,141 @@ private constructor( class Builder { - private var token: JsonField = JsonMissing.of() - private var type: JsonField = JsonMissing.of() - private var verificationMethod: JsonField = JsonMissing.of() - private var ownerType: JsonField = JsonMissing.of() - private var owner: JsonField = JsonMissing.of() - private var state: JsonField = JsonMissing.of() - private var verificationState: 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 companyId: JsonField = JsonMissing.of() private var address: JsonField = JsonMissing.of() + private var companyId: JsonField = JsonMissing.of() + private var country: JsonField = JsonMissing.of() + private var created: JsonField = JsonMissing.of() + private var currency: 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 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 verificationFailedReason: JsonField = JsonMissing.of() + private var verificationMethod: JsonField = JsonMissing.of() + private var verificationState: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() internal fun from(microDepositCreateResponse: MicroDepositCreateResponse) = apply { - this.token = microDepositCreateResponse.token - this.type = microDepositCreateResponse.type - this.verificationMethod = microDepositCreateResponse.verificationMethod - this.ownerType = microDepositCreateResponse.ownerType - this.owner = microDepositCreateResponse.owner - this.state = microDepositCreateResponse.state - this.verificationState = microDepositCreateResponse.verificationState - this.routingNumber = microDepositCreateResponse.routingNumber - this.lastFour = microDepositCreateResponse.lastFour - this.name = microDepositCreateResponse.name - this.currency = microDepositCreateResponse.currency + this.accountToken = microDepositCreateResponse.accountToken + this.address = microDepositCreateResponse.address + this.companyId = microDepositCreateResponse.companyId this.country = microDepositCreateResponse.country - this.accountToken = microDepositCreateResponse.accountToken this.created = microDepositCreateResponse.created - this.companyId = microDepositCreateResponse.companyId - this.address = microDepositCreateResponse.address + this.currency = microDepositCreateResponse.currency this.dob = microDepositCreateResponse.dob this.doingBusinessAs = microDepositCreateResponse.doingBusinessAs + this.lastFour = microDepositCreateResponse.lastFour + this.name = microDepositCreateResponse.name + 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.verificationFailedReason = microDepositCreateResponse.verificationFailedReason + this.verificationMethod = microDepositCreateResponse.verificationMethod + this.verificationState = microDepositCreateResponse.verificationState additionalProperties(microDepositCreateResponse.additionalProperties) } /** - * 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 + * 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 token(token: String) = token(JsonField.of(token)) + fun accountToken(accountToken: String) = accountToken(JsonField.of(accountToken)) /** - * 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 + * 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("token") + @JsonProperty("account_token") @ExcludeMissing - fun token(token: JsonField) = apply { this.token = token } + fun accountToken(accountToken: JsonField) = apply { + this.accountToken = accountToken + } - fun type(type: Type) = type(JsonField.of(type)) + /** + * Address used during Address Verification Service (AVS) checks during transactions if + * enabled via Auth Rules. + */ + fun address(address: ExternalBankAccountAddress) = address(JsonField.of(address)) - @JsonProperty("type") + /** + * Address used during Address Verification Service (AVS) checks during transactions if + * enabled via Auth Rules. + */ + @JsonProperty("address") @ExcludeMissing - fun type(type: JsonField) = apply { this.type = type } + fun address(address: JsonField) = apply { + this.address = address + } - fun verificationMethod(verificationMethod: VerificationMethod) = - verificationMethod(JsonField.of(verificationMethod)) + /** Optional field that helps identify bank accounts in receipts */ + fun companyId(companyId: String) = companyId(JsonField.of(companyId)) - @JsonProperty("verification_method") + /** Optional field that helps identify bank accounts in receipts */ + @JsonProperty("company_id") @ExcludeMissing - fun verificationMethod(verificationMethod: JsonField) = apply { - this.verificationMethod = verificationMethod - } + fun companyId(companyId: JsonField) = apply { this.companyId = companyId } - fun ownerType(ownerType: OwnerType) = ownerType(JsonField.of(ownerType)) + /** + * The country that the bank account is located in using ISO 3166-1. We will only accept USA + * bank accounts e.g., USA + */ + fun country(country: String) = country(JsonField.of(country)) - @JsonProperty("owner_type") + /** + * 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") @ExcludeMissing - fun ownerType(ownerType: JsonField) = apply { this.ownerType = ownerType } + 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 + * An ISO 8601 string representing when this funding source was added to the Lithic account. */ - fun owner(owner: String) = owner(JsonField.of(owner)) + fun created(created: OffsetDateTime) = created(JsonField.of(created)) /** - * Legal Name of the business or individual who owns the external account. This will appear - * in statements + * An ISO 8601 string representing when this funding source was added to the Lithic account. */ - @JsonProperty("owner") + @JsonProperty("created") @ExcludeMissing - fun owner(owner: JsonField) = apply { this.owner = owner } + fun created(created: JsonField) = apply { this.created = created } - fun state(state: State) = state(JsonField.of(state)) + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + fun currency(currency: String) = currency(JsonField.of(currency)) - @JsonProperty("state") + /** currency of the external account 3-digit alphabetic ISO 4217 code */ + @JsonProperty("currency") @ExcludeMissing - fun state(state: JsonField) = apply { this.state = state } + fun currency(currency: JsonField) = apply { this.currency = currency } - fun verificationState(verificationState: VerificationState) = - verificationState(JsonField.of(verificationState)) + /** Date of Birth of the Individual that owns the external bank account */ + fun dob(dob: LocalDate) = dob(JsonField.of(dob)) - @JsonProperty("verification_state") + /** Date of Birth of the Individual that owns the external bank account */ + @JsonProperty("dob") @ExcludeMissing - fun verificationState(verificationState: JsonField) = apply { - this.verificationState = verificationState - } + fun dob(dob: JsonField) = apply { this.dob = dob } - fun routingNumber(routingNumber: String) = routingNumber(JsonField.of(routingNumber)) + fun doingBusinessAs(doingBusinessAs: String) = + doingBusinessAs(JsonField.of(doingBusinessAs)) - @JsonProperty("routing_number") + @JsonProperty("doing_business_as") @ExcludeMissing - fun routingNumber(routingNumber: JsonField) = apply { - this.routingNumber = routingNumber + fun doingBusinessAs(doingBusinessAs: JsonField) = apply { + this.doingBusinessAs = doingBusinessAs } /** @@ -417,103 +457,105 @@ 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 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(country: String) = country(JsonField.of(country)) + fun owner(owner: String) = owner(JsonField.of(owner)) /** - * 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") + @JsonProperty("owner") @ExcludeMissing - fun country(country: JsonField) = apply { this.country = country } + fun owner(owner: JsonField) = 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 - */ - fun accountToken(accountToken: String) = accountToken(JsonField.of(accountToken)) + fun ownerType(ownerType: OwnerType) = ownerType(JsonField.of(ownerType)) - /** - * 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") + @JsonProperty("owner_type") @ExcludeMissing - fun accountToken(accountToken: JsonField) = apply { - this.accountToken = accountToken + fun ownerType(ownerType: JsonField) = apply { this.ownerType = ownerType } + + fun routingNumber(routingNumber: String) = routingNumber(JsonField.of(routingNumber)) + + @JsonProperty("routing_number") + @ExcludeMissing + fun routingNumber(routingNumber: JsonField) = apply { + this.routingNumber = routingNumber } + fun state(state: State) = state(JsonField.of(state)) + + @JsonProperty("state") + @ExcludeMissing + fun state(state: JsonField) = apply { this.state = state } + /** - * An ISO 8601 string representing when this funding source was added to the Lithic account. + * 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 created(created: OffsetDateTime) = created(JsonField.of(created)) + fun token(token: String) = token(JsonField.of(token)) /** - * An ISO 8601 string representing when this funding source was added to the Lithic account. + * 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("created") + @JsonProperty("token") @ExcludeMissing - fun created(created: JsonField) = apply { this.created = created } + fun token(token: JsonField) = apply { this.token = token } - /** Optional field that helps identify bank accounts in receipts */ - fun companyId(companyId: String) = companyId(JsonField.of(companyId)) + fun type(type: Type) = type(JsonField.of(type)) - /** Optional field that helps identify bank accounts in receipts */ - @JsonProperty("company_id") + @JsonProperty("type") @ExcludeMissing - fun companyId(companyId: JsonField) = apply { this.companyId = companyId } + fun type(type: JsonField) = apply { this.type = type } + + fun userDefinedId(userDefinedId: String) = userDefinedId(JsonField.of(userDefinedId)) + + @JsonProperty("user_defined_id") + @ExcludeMissing + fun userDefinedId(userDefinedId: JsonField) = apply { + this.userDefinedId = userDefinedId + } /** - * Address used during Address Verification Service (AVS) checks during transactions if - * enabled via Auth Rules. + * 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 + * network */ - fun address(address: ExternalBankAccountAddress) = address(JsonField.of(address)) + fun verificationFailedReason(verificationFailedReason: String) = + verificationFailedReason(JsonField.of(verificationFailedReason)) /** - * Address used during Address Verification Service (AVS) checks during transactions if - * enabled via Auth Rules. + * 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 + * network */ - @JsonProperty("address") + @JsonProperty("verification_failed_reason") @ExcludeMissing - fun address(address: JsonField) = apply { - this.address = address + fun verificationFailedReason(verificationFailedReason: JsonField) = apply { + this.verificationFailedReason = verificationFailedReason } - /** 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") - @ExcludeMissing - fun dob(dob: JsonField) = apply { this.dob = dob } - - fun doingBusinessAs(doingBusinessAs: String) = - doingBusinessAs(JsonField.of(doingBusinessAs)) + fun verificationMethod(verificationMethod: VerificationMethod) = + verificationMethod(JsonField.of(verificationMethod)) - @JsonProperty("doing_business_as") + @JsonProperty("verification_method") @ExcludeMissing - fun doingBusinessAs(doingBusinessAs: JsonField) = apply { - this.doingBusinessAs = doingBusinessAs + fun verificationMethod(verificationMethod: JsonField) = apply { + this.verificationMethod = verificationMethod } - fun userDefinedId(userDefinedId: String) = userDefinedId(JsonField.of(userDefinedId)) + fun verificationState(verificationState: VerificationState) = + verificationState(JsonField.of(verificationState)) - @JsonProperty("user_defined_id") + @JsonProperty("verification_state") @ExcludeMissing - fun userDefinedId(userDefinedId: JsonField) = apply { - this.userDefinedId = userDefinedId + fun verificationState(verificationState: JsonField) = apply { + this.verificationState = verificationState } fun additionalProperties(additionalProperties: Map) = apply { @@ -532,25 +574,26 @@ private constructor( fun build(): MicroDepositCreateResponse = MicroDepositCreateResponse( - token, - type, - verificationMethod, - ownerType, - owner, - state, - verificationState, - routingNumber, - lastFour, - name, - currency, - country, accountToken, - created, - companyId, address, + companyId, + country, + created, + currency, dob, doingBusinessAs, + lastFour, + name, + owner, + ownerType, + routingNumber, + state, + token, + type, userDefinedId, + verificationFailedReason, + verificationMethod, + verificationState, additionalProperties.toUnmodifiable(), ) } diff --git a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponseTest.kt b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponseTest.kt index fc118e56..01fe6668 100644 --- a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponseTest.kt +++ b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponseTest.kt @@ -41,6 +41,7 @@ class ExternalBankAccountCreateResponseTest { .doingBusinessAs("string") .name("string") .userDefinedId("string") + .verificationFailedReason("string") .build() assertThat(externalBankAccountCreateResponse).isNotNull assertThat(externalBankAccountCreateResponse.token()) @@ -80,5 +81,6 @@ class ExternalBankAccountCreateResponseTest { assertThat(externalBankAccountCreateResponse.doingBusinessAs()).isEqualTo("string") assertThat(externalBankAccountCreateResponse.name()).isEqualTo("string") assertThat(externalBankAccountCreateResponse.userDefinedId()).isEqualTo("string") + assertThat(externalBankAccountCreateResponse.verificationFailedReason()).isEqualTo("string") } } diff --git a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountListResponseTest.kt b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountListResponseTest.kt index f4106204..e046b9f7 100644 --- a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountListResponseTest.kt +++ b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountListResponseTest.kt @@ -41,6 +41,7 @@ class ExternalBankAccountListResponseTest { .doingBusinessAs("string") .name("string") .userDefinedId("string") + .verificationFailedReason("string") .build() assertThat(externalBankAccountListResponse).isNotNull assertThat(externalBankAccountListResponse.token()) @@ -80,5 +81,6 @@ class ExternalBankAccountListResponseTest { assertThat(externalBankAccountListResponse.doingBusinessAs()).isEqualTo("string") assertThat(externalBankAccountListResponse.name()).isEqualTo("string") assertThat(externalBankAccountListResponse.userDefinedId()).isEqualTo("string") + assertThat(externalBankAccountListResponse.verificationFailedReason()).isEqualTo("string") } } diff --git a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponseTest.kt b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponseTest.kt index 2363e49d..34bab276 100644 --- a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponseTest.kt +++ b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponseTest.kt @@ -41,6 +41,7 @@ class ExternalBankAccountRetrieveResponseTest { .doingBusinessAs("string") .name("string") .userDefinedId("string") + .verificationFailedReason("string") .build() assertThat(externalBankAccountRetrieveResponse).isNotNull assertThat(externalBankAccountRetrieveResponse.token()) @@ -81,5 +82,7 @@ class ExternalBankAccountRetrieveResponseTest { assertThat(externalBankAccountRetrieveResponse.doingBusinessAs()).isEqualTo("string") assertThat(externalBankAccountRetrieveResponse.name()).isEqualTo("string") assertThat(externalBankAccountRetrieveResponse.userDefinedId()).isEqualTo("string") + assertThat(externalBankAccountRetrieveResponse.verificationFailedReason()) + .isEqualTo("string") } } diff --git a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponseTest.kt b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponseTest.kt index fb95195a..406f1c2e 100644 --- a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponseTest.kt +++ b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponseTest.kt @@ -41,6 +41,7 @@ class ExternalBankAccountUpdateResponseTest { .doingBusinessAs("string") .name("string") .userDefinedId("string") + .verificationFailedReason("string") .build() assertThat(externalBankAccountUpdateResponse).isNotNull assertThat(externalBankAccountUpdateResponse.token()) @@ -80,5 +81,6 @@ class ExternalBankAccountUpdateResponseTest { assertThat(externalBankAccountUpdateResponse.doingBusinessAs()).isEqualTo("string") assertThat(externalBankAccountUpdateResponse.name()).isEqualTo("string") assertThat(externalBankAccountUpdateResponse.userDefinedId()).isEqualTo("string") + assertThat(externalBankAccountUpdateResponse.verificationFailedReason()).isEqualTo("string") } } diff --git a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/MicroDepositCreateResponseTest.kt b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/MicroDepositCreateResponseTest.kt index 306fc149..ae647573 100644 --- a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/MicroDepositCreateResponseTest.kt +++ b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/MicroDepositCreateResponseTest.kt @@ -41,6 +41,7 @@ class MicroDepositCreateResponseTest { .doingBusinessAs("string") .name("string") .userDefinedId("string") + .verificationFailedReason("string") .build() assertThat(microDepositCreateResponse).isNotNull assertThat(microDepositCreateResponse.token()) @@ -80,5 +81,6 @@ class MicroDepositCreateResponseTest { assertThat(microDepositCreateResponse.doingBusinessAs()).isEqualTo("string") assertThat(microDepositCreateResponse.name()).isEqualTo("string") assertThat(microDepositCreateResponse.userDefinedId()).isEqualTo("string") + assertThat(microDepositCreateResponse.verificationFailedReason()).isEqualTo("string") } }