Little refactoring
This commit is contained in:
parent
684b3fb40e
commit
f89de94aa7
|
@ -56,12 +56,12 @@ open class FinTsClient(
|
||||||
|
|
||||||
open suspend fun getAccountDataAsync(param: GetAccountDataParameter): GetAccountDataResponse {
|
open suspend fun getAccountDataAsync(param: GetAccountDataParameter): GetAccountDataResponse {
|
||||||
val basicAccountDataResponse = getRequiredDataToSendUserJobs(param)
|
val basicAccountDataResponse = getRequiredDataToSendUserJobs(param)
|
||||||
|
val bank = basicAccountDataResponse.finTsModel
|
||||||
|
|
||||||
if (basicAccountDataResponse.successful == false || param.retrieveOnlyAccountInfo || basicAccountDataResponse.finTsModel == null) {
|
if (basicAccountDataResponse.successful == false || param.retrieveOnlyAccountInfo || bank == null) {
|
||||||
return GetAccountDataResponse(basicAccountDataResponse.error, basicAccountDataResponse.errorMessage, null,
|
return GetAccountDataResponse(basicAccountDataResponse.error, basicAccountDataResponse.errorMessage, null,
|
||||||
basicAccountDataResponse.messageLog, basicAccountDataResponse.finTsModel)
|
basicAccountDataResponse.messageLog, bank)
|
||||||
} else {
|
} else {
|
||||||
val bank = basicAccountDataResponse.finTsModel!!
|
|
||||||
return getAccountData(param, bank, bank.accounts, basicAccountDataResponse.messageLog)
|
return getAccountData(param, bank, bank.accounts, basicAccountDataResponse.messageLog)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue