diff --git a/fints4javaLib/src/main/kotlin/net/dankito/fints/FinTsClient.kt b/fints4javaLib/src/main/kotlin/net/dankito/fints/FinTsClient.kt index f3d80bb7..f2f79c50 100644 --- a/fints4javaLib/src/main/kotlin/net/dankito/fints/FinTsClient.kt +++ b/fints4javaLib/src/main/kotlin/net/dankito/fints/FinTsClient.kt @@ -221,13 +221,15 @@ open class FinTsClient( customer.customerSystemStatus = KundensystemStatusWerte.Benoetigt // TODO: didn't find out for sure yet, but i think i read somewhere, that this has to be set when customerSystemId is set } - - // TODO: may also save securityReferenceNumbers } response.getFirstSegmentById(InstituteSegmentId.AccountInfo)?.let { accountInfo -> customer.iban = accountInfo.iban + customer.name = accountInfo.accountHolderName1 + accountInfo.accountHolderName2?.let { + customer.name = customer.name + it // TODO: add a whitespace in between? + } // TODO: may also make use of other info } @@ -235,6 +237,12 @@ open class FinTsClient( response.getFirstSegmentById(InstituteSegmentId.UserParameters)?.let { userParameters -> customer.updVersion = userParameters.updVersion + if (customer.name.isEmpty()) { + userParameters.username?.let { + customer.name = it + } + } + // TODO: may also make use of other info } }