Skip to content

Commit f2c7c8a

Browse files
committed
feat(api): add verification_attempts response property (#113)
1 parent 2fa3348 commit f2c7c8a

10 files changed

Lines changed: 145 additions & 5 deletions

lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponse.kt

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ private constructor(
4040
private val token: JsonField<String>,
4141
private val type: JsonField<Type>,
4242
private val userDefinedId: JsonField<String>,
43+
private val verificationAttempts: JsonField<Long>,
4344
private val verificationFailedReason: JsonField<String>,
4445
private val verificationMethod: JsonField<VerificationMethod>,
4546
private val verificationState: JsonField<VerificationState>,
@@ -115,6 +116,9 @@ private constructor(
115116
fun userDefinedId(): Optional<String> =
116117
Optional.ofNullable(userDefinedId.getNullable("user_defined_id"))
117118

119+
/** The number of attempts at verification */
120+
fun verificationAttempts(): Long = verificationAttempts.getRequired("verification_attempts")
121+
118122
/**
119123
* Optional free text description of the reason for the failed verification. For ACH
120124
* micro-deposits returned, this field will display the reason return code sent by the ACH
@@ -189,6 +193,11 @@ private constructor(
189193

190194
@JsonProperty("user_defined_id") @ExcludeMissing fun _userDefinedId() = userDefinedId
191195

196+
/** The number of attempts at verification */
197+
@JsonProperty("verification_attempts")
198+
@ExcludeMissing
199+
fun _verificationAttempts() = verificationAttempts
200+
192201
/**
193202
* Optional free text description of the reason for the failed verification. For ACH
194203
* micro-deposits returned, this field will display the reason return code sent by the ACH
@@ -227,6 +236,7 @@ private constructor(
227236
token()
228237
type()
229238
userDefinedId()
239+
verificationAttempts()
230240
verificationFailedReason()
231241
verificationMethod()
232242
verificationState()
@@ -259,6 +269,7 @@ private constructor(
259269
this.token == other.token &&
260270
this.type == other.type &&
261271
this.userDefinedId == other.userDefinedId &&
272+
this.verificationAttempts == other.verificationAttempts &&
262273
this.verificationFailedReason == other.verificationFailedReason &&
263274
this.verificationMethod == other.verificationMethod &&
264275
this.verificationState == other.verificationState &&
@@ -286,6 +297,7 @@ private constructor(
286297
token,
287298
type,
288299
userDefinedId,
300+
verificationAttempts,
289301
verificationFailedReason,
290302
verificationMethod,
291303
verificationState,
@@ -296,7 +308,7 @@ private constructor(
296308
}
297309

298310
override fun toString() =
299-
"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}"
311+
"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, verificationAttempts=$verificationAttempts, verificationFailedReason=$verificationFailedReason, verificationMethod=$verificationMethod, verificationState=$verificationState, additionalProperties=$additionalProperties}"
300312

301313
companion object {
302314

@@ -322,6 +334,7 @@ private constructor(
322334
private var token: JsonField<String> = JsonMissing.of()
323335
private var type: JsonField<Type> = JsonMissing.of()
324336
private var userDefinedId: JsonField<String> = JsonMissing.of()
337+
private var verificationAttempts: JsonField<Long> = JsonMissing.of()
325338
private var verificationFailedReason: JsonField<String> = JsonMissing.of()
326339
private var verificationMethod: JsonField<VerificationMethod> = JsonMissing.of()
327340
private var verificationState: JsonField<VerificationState> = JsonMissing.of()
@@ -347,6 +360,7 @@ private constructor(
347360
this.token = externalBankAccountCreateResponse.token
348361
this.type = externalBankAccountCreateResponse.type
349362
this.userDefinedId = externalBankAccountCreateResponse.userDefinedId
363+
this.verificationAttempts = externalBankAccountCreateResponse.verificationAttempts
350364
this.verificationFailedReason =
351365
externalBankAccountCreateResponse.verificationFailedReason
352366
this.verificationMethod = externalBankAccountCreateResponse.verificationMethod
@@ -529,6 +543,17 @@ private constructor(
529543
this.userDefinedId = userDefinedId
530544
}
531545

546+
/** The number of attempts at verification */
547+
fun verificationAttempts(verificationAttempts: Long) =
548+
verificationAttempts(JsonField.of(verificationAttempts))
549+
550+
/** The number of attempts at verification */
551+
@JsonProperty("verification_attempts")
552+
@ExcludeMissing
553+
fun verificationAttempts(verificationAttempts: JsonField<Long>) = apply {
554+
this.verificationAttempts = verificationAttempts
555+
}
556+
532557
/**
533558
* Optional free text description of the reason for the failed verification. For ACH
534559
* micro-deposits returned, this field will display the reason return code sent by the ACH
@@ -599,6 +624,7 @@ private constructor(
599624
token,
600625
type,
601626
userDefinedId,
627+
verificationAttempts,
602628
verificationFailedReason,
603629
verificationMethod,
604630
verificationState,

lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListResponse.kt

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ private constructor(
4040
private val token: JsonField<String>,
4141
private val type: JsonField<Type>,
4242
private val userDefinedId: JsonField<String>,
43+
private val verificationAttempts: JsonField<Long>,
4344
private val verificationFailedReason: JsonField<String>,
4445
private val verificationMethod: JsonField<VerificationMethod>,
4546
private val verificationState: JsonField<VerificationState>,
@@ -115,6 +116,9 @@ private constructor(
115116
fun userDefinedId(): Optional<String> =
116117
Optional.ofNullable(userDefinedId.getNullable("user_defined_id"))
117118

119+
/** The number of attempts at verification */
120+
fun verificationAttempts(): Long = verificationAttempts.getRequired("verification_attempts")
121+
118122
/**
119123
* Optional free text description of the reason for the failed verification. For ACH
120124
* micro-deposits returned, this field will display the reason return code sent by the ACH
@@ -189,6 +193,11 @@ private constructor(
189193

190194
@JsonProperty("user_defined_id") @ExcludeMissing fun _userDefinedId() = userDefinedId
191195

196+
/** The number of attempts at verification */
197+
@JsonProperty("verification_attempts")
198+
@ExcludeMissing
199+
fun _verificationAttempts() = verificationAttempts
200+
192201
/**
193202
* Optional free text description of the reason for the failed verification. For ACH
194203
* micro-deposits returned, this field will display the reason return code sent by the ACH
@@ -227,6 +236,7 @@ private constructor(
227236
token()
228237
type()
229238
userDefinedId()
239+
verificationAttempts()
230240
verificationFailedReason()
231241
verificationMethod()
232242
verificationState()
@@ -259,6 +269,7 @@ private constructor(
259269
this.token == other.token &&
260270
this.type == other.type &&
261271
this.userDefinedId == other.userDefinedId &&
272+
this.verificationAttempts == other.verificationAttempts &&
262273
this.verificationFailedReason == other.verificationFailedReason &&
263274
this.verificationMethod == other.verificationMethod &&
264275
this.verificationState == other.verificationState &&
@@ -286,6 +297,7 @@ private constructor(
286297
token,
287298
type,
288299
userDefinedId,
300+
verificationAttempts,
289301
verificationFailedReason,
290302
verificationMethod,
291303
verificationState,
@@ -296,7 +308,7 @@ private constructor(
296308
}
297309

298310
override fun toString() =
299-
"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}"
311+
"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, verificationAttempts=$verificationAttempts, verificationFailedReason=$verificationFailedReason, verificationMethod=$verificationMethod, verificationState=$verificationState, additionalProperties=$additionalProperties}"
300312

301313
companion object {
302314

@@ -322,6 +334,7 @@ private constructor(
322334
private var token: JsonField<String> = JsonMissing.of()
323335
private var type: JsonField<Type> = JsonMissing.of()
324336
private var userDefinedId: JsonField<String> = JsonMissing.of()
337+
private var verificationAttempts: JsonField<Long> = JsonMissing.of()
325338
private var verificationFailedReason: JsonField<String> = JsonMissing.of()
326339
private var verificationMethod: JsonField<VerificationMethod> = JsonMissing.of()
327340
private var verificationState: JsonField<VerificationState> = JsonMissing.of()
@@ -347,6 +360,7 @@ private constructor(
347360
this.token = externalBankAccountListResponse.token
348361
this.type = externalBankAccountListResponse.type
349362
this.userDefinedId = externalBankAccountListResponse.userDefinedId
363+
this.verificationAttempts = externalBankAccountListResponse.verificationAttempts
350364
this.verificationFailedReason =
351365
externalBankAccountListResponse.verificationFailedReason
352366
this.verificationMethod = externalBankAccountListResponse.verificationMethod
@@ -529,6 +543,17 @@ private constructor(
529543
this.userDefinedId = userDefinedId
530544
}
531545

546+
/** The number of attempts at verification */
547+
fun verificationAttempts(verificationAttempts: Long) =
548+
verificationAttempts(JsonField.of(verificationAttempts))
549+
550+
/** The number of attempts at verification */
551+
@JsonProperty("verification_attempts")
552+
@ExcludeMissing
553+
fun verificationAttempts(verificationAttempts: JsonField<Long>) = apply {
554+
this.verificationAttempts = verificationAttempts
555+
}
556+
532557
/**
533558
* Optional free text description of the reason for the failed verification. For ACH
534559
* micro-deposits returned, this field will display the reason return code sent by the ACH
@@ -599,6 +624,7 @@ private constructor(
599624
token,
600625
type,
601626
userDefinedId,
627+
verificationAttempts,
602628
verificationFailedReason,
603629
verificationMethod,
604630
verificationState,

lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponse.kt

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ private constructor(
4040
private val token: JsonField<String>,
4141
private val type: JsonField<Type>,
4242
private val userDefinedId: JsonField<String>,
43+
private val verificationAttempts: JsonField<Long>,
4344
private val verificationFailedReason: JsonField<String>,
4445
private val verificationMethod: JsonField<VerificationMethod>,
4546
private val verificationState: JsonField<VerificationState>,
@@ -115,6 +116,9 @@ private constructor(
115116
fun userDefinedId(): Optional<String> =
116117
Optional.ofNullable(userDefinedId.getNullable("user_defined_id"))
117118

119+
/** The number of attempts at verification */
120+
fun verificationAttempts(): Long = verificationAttempts.getRequired("verification_attempts")
121+
118122
/**
119123
* Optional free text description of the reason for the failed verification. For ACH
120124
* micro-deposits returned, this field will display the reason return code sent by the ACH
@@ -189,6 +193,11 @@ private constructor(
189193

190194
@JsonProperty("user_defined_id") @ExcludeMissing fun _userDefinedId() = userDefinedId
191195

196+
/** The number of attempts at verification */
197+
@JsonProperty("verification_attempts")
198+
@ExcludeMissing
199+
fun _verificationAttempts() = verificationAttempts
200+
192201
/**
193202
* Optional free text description of the reason for the failed verification. For ACH
194203
* micro-deposits returned, this field will display the reason return code sent by the ACH
@@ -227,6 +236,7 @@ private constructor(
227236
token()
228237
type()
229238
userDefinedId()
239+
verificationAttempts()
230240
verificationFailedReason()
231241
verificationMethod()
232242
verificationState()
@@ -259,6 +269,7 @@ private constructor(
259269
this.token == other.token &&
260270
this.type == other.type &&
261271
this.userDefinedId == other.userDefinedId &&
272+
this.verificationAttempts == other.verificationAttempts &&
262273
this.verificationFailedReason == other.verificationFailedReason &&
263274
this.verificationMethod == other.verificationMethod &&
264275
this.verificationState == other.verificationState &&
@@ -286,6 +297,7 @@ private constructor(
286297
token,
287298
type,
288299
userDefinedId,
300+
verificationAttempts,
289301
verificationFailedReason,
290302
verificationMethod,
291303
verificationState,
@@ -296,7 +308,7 @@ private constructor(
296308
}
297309

298310
override fun toString() =
299-
"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}"
311+
"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, verificationAttempts=$verificationAttempts, verificationFailedReason=$verificationFailedReason, verificationMethod=$verificationMethod, verificationState=$verificationState, additionalProperties=$additionalProperties}"
300312

301313
companion object {
302314

@@ -322,6 +334,7 @@ private constructor(
322334
private var token: JsonField<String> = JsonMissing.of()
323335
private var type: JsonField<Type> = JsonMissing.of()
324336
private var userDefinedId: JsonField<String> = JsonMissing.of()
337+
private var verificationAttempts: JsonField<Long> = JsonMissing.of()
325338
private var verificationFailedReason: JsonField<String> = JsonMissing.of()
326339
private var verificationMethod: JsonField<VerificationMethod> = JsonMissing.of()
327340
private var verificationState: JsonField<VerificationState> = JsonMissing.of()
@@ -348,6 +361,7 @@ private constructor(
348361
this.token = externalBankAccountRetrieveResponse.token
349362
this.type = externalBankAccountRetrieveResponse.type
350363
this.userDefinedId = externalBankAccountRetrieveResponse.userDefinedId
364+
this.verificationAttempts = externalBankAccountRetrieveResponse.verificationAttempts
351365
this.verificationFailedReason =
352366
externalBankAccountRetrieveResponse.verificationFailedReason
353367
this.verificationMethod = externalBankAccountRetrieveResponse.verificationMethod
@@ -530,6 +544,17 @@ private constructor(
530544
this.userDefinedId = userDefinedId
531545
}
532546

547+
/** The number of attempts at verification */
548+
fun verificationAttempts(verificationAttempts: Long) =
549+
verificationAttempts(JsonField.of(verificationAttempts))
550+
551+
/** The number of attempts at verification */
552+
@JsonProperty("verification_attempts")
553+
@ExcludeMissing
554+
fun verificationAttempts(verificationAttempts: JsonField<Long>) = apply {
555+
this.verificationAttempts = verificationAttempts
556+
}
557+
533558
/**
534559
* Optional free text description of the reason for the failed verification. For ACH
535560
* micro-deposits returned, this field will display the reason return code sent by the ACH
@@ -600,6 +625,7 @@ private constructor(
600625
token,
601626
type,
602627
userDefinedId,
628+
verificationAttempts,
603629
verificationFailedReason,
604630
verificationMethod,
605631
verificationState,

0 commit comments

Comments
 (0)