diff --git a/rest/fints4kRest/src/main/kotlin/net/dankito/banking/fints/rest/mapper/DtoMapper.kt b/rest/fints4kRest/src/main/kotlin/net/dankito/banking/fints/rest/mapper/DtoMapper.kt index 83f35443..1b91366d 100644 --- a/rest/fints4kRest/src/main/kotlin/net/dankito/banking/fints/rest/mapper/DtoMapper.kt +++ b/rest/fints4kRest/src/main/kotlin/net/dankito/banking/fints/rest/mapper/DtoMapper.kt @@ -23,7 +23,7 @@ open class DtoMapper { protected open fun map(bank: BankData): BankResponseDto { return BankResponseDto( bank.bankCode, - bank.userName, + bank.customerId, bank.finTs3ServerAddress, bank.bic, bank.bankName, @@ -47,8 +47,8 @@ open class DtoMapper { val bookedTransactions = map(retrievedData.bookedTransactions) return GetAccountTransactionsResponseDto( - retrievedData.accountData.accountIdentifier, - retrievedData.accountData.productName, + retrievedData.account.accountIdentifier, + retrievedData.account.productName, accountTransactions.successful, mapErrorMessage(accountTransactions), balance, @@ -63,19 +63,20 @@ open class DtoMapper { } protected open fun map(accountData: RetrievedAccountData): BankAccountResponseDto { + val account = accountData.account + return BankAccountResponseDto( - accountData.accountData.accountIdentifier, - accountData.accountData.subAccountAttribute, - accountData.accountData.iban, - accountData.accountData.userName, - accountData.accountData.accountType, - accountData.accountData.currency, - accountData.accountData.accountHolderName, - accountData.accountData.productName, - accountData.accountData.supportsRetrievingBalance, - accountData.accountData.supportsRetrievingAccountTransactions, - accountData.accountData.supportsTransferringMoney, - accountData.accountData.supportsRealTimeTransfer, + account.accountIdentifier, + account.subAccountAttribute, + account.iban, + account.accountType, + account.currency, + account.accountHolderName, + account.productName, + account.supportsRetrievingBalance, + account.supportsRetrievingAccountTransactions, + account.supportsTransferringMoney, + account.supportsRealTimeTransfer, accountData.successfullyRetrievedData, mapNullable(accountData.balance), accountData.retrievedTransactionsFrom, diff --git a/rest/fints4kRest/src/main/kotlin/net/dankito/banking/fints/rest/model/dto/response/TanMethodResponseDto.kt b/rest/fints4kRest/src/main/kotlin/net/dankito/banking/fints/rest/model/dto/response/TanMethodResponseDto.kt index f8557b7e..c08f110b 100644 --- a/rest/fints4kRest/src/main/kotlin/net/dankito/banking/fints/rest/model/dto/response/TanMethodResponseDto.kt +++ b/rest/fints4kRest/src/main/kotlin/net/dankito/banking/fints/rest/model/dto/response/TanMethodResponseDto.kt @@ -10,6 +10,6 @@ open class TanMethodResponseDto( open val type: TanMethodType, open val hhdVersion: String? = null, open val maxTanInputLength: Int? = null, - open val allowedTanFormat: AllowedTanFormat = AllowedTanFormat.Alphanumeric, + open val allowedTanFormat: AllowedTanFormat? = null, open val nameOfTanMediumRequired: Boolean = false ) \ No newline at end of file diff --git a/rest/fints4kRest/src/main/kotlin/net/dankito/banking/fints/rest/service/fints4kService.kt b/rest/fints4kRest/src/main/kotlin/net/dankito/banking/fints/rest/service/fints4kService.kt index 5f350fca..676fc76d 100644 --- a/rest/fints4kRest/src/main/kotlin/net/dankito/banking/fints/rest/service/fints4kService.kt +++ b/rest/fints4kRest/src/main/kotlin/net/dankito/banking/fints/rest/service/fints4kService.kt @@ -39,7 +39,7 @@ class fints4kService { // TODO: as in most cases we really just want the account data, so just retrieve these without balances and transactions protected fun getAccountData(bank: BankData): AddAccountResponse { return getAsyncResponse { client, responseRetrieved -> - client.addAccountAsync(bank) { response -> + client.addAccountAsync(AddAccountParameter(bank)) { response -> responseRetrieved(response) } } @@ -102,7 +102,8 @@ class fints4kService { val tanRequestId = UUID.randomUUID().toString() - originatingRequestResult.set(EnteringTanRequested(tanRequestId, bank, tanChallenge)) + // TODO: find a solution for returning TAN challenge to caller + //originatingRequestResult.set(EnteringTanRequested(tanRequestId, bank, tanChallenge)) originatingRequestLatch.countDown() tanRequests.put(tanRequestId, EnterTanContext(enterTanResult, enterTanLatch))