Updated to new signatures

This commit is contained in:
dankito 2020-12-31 16:12:18 +01:00
parent 30b6a0dec1
commit 54c82482ed
3 changed files with 20 additions and 18 deletions

View File

@ -23,7 +23,7 @@ open class DtoMapper {
protected open fun map(bank: BankData): BankResponseDto { protected open fun map(bank: BankData): BankResponseDto {
return BankResponseDto( return BankResponseDto(
bank.bankCode, bank.bankCode,
bank.userName, bank.customerId,
bank.finTs3ServerAddress, bank.finTs3ServerAddress,
bank.bic, bank.bic,
bank.bankName, bank.bankName,
@ -47,8 +47,8 @@ open class DtoMapper {
val bookedTransactions = map(retrievedData.bookedTransactions) val bookedTransactions = map(retrievedData.bookedTransactions)
return GetAccountTransactionsResponseDto( return GetAccountTransactionsResponseDto(
retrievedData.accountData.accountIdentifier, retrievedData.account.accountIdentifier,
retrievedData.accountData.productName, retrievedData.account.productName,
accountTransactions.successful, accountTransactions.successful,
mapErrorMessage(accountTransactions), mapErrorMessage(accountTransactions),
balance, balance,
@ -63,19 +63,20 @@ open class DtoMapper {
} }
protected open fun map(accountData: RetrievedAccountData): BankAccountResponseDto { protected open fun map(accountData: RetrievedAccountData): BankAccountResponseDto {
val account = accountData.account
return BankAccountResponseDto( return BankAccountResponseDto(
accountData.accountData.accountIdentifier, account.accountIdentifier,
accountData.accountData.subAccountAttribute, account.subAccountAttribute,
accountData.accountData.iban, account.iban,
accountData.accountData.userName, account.accountType,
accountData.accountData.accountType, account.currency,
accountData.accountData.currency, account.accountHolderName,
accountData.accountData.accountHolderName, account.productName,
accountData.accountData.productName, account.supportsRetrievingBalance,
accountData.accountData.supportsRetrievingBalance, account.supportsRetrievingAccountTransactions,
accountData.accountData.supportsRetrievingAccountTransactions, account.supportsTransferringMoney,
accountData.accountData.supportsTransferringMoney, account.supportsRealTimeTransfer,
accountData.accountData.supportsRealTimeTransfer,
accountData.successfullyRetrievedData, accountData.successfullyRetrievedData,
mapNullable(accountData.balance), mapNullable(accountData.balance),
accountData.retrievedTransactionsFrom, accountData.retrievedTransactionsFrom,

View File

@ -10,6 +10,6 @@ open class TanMethodResponseDto(
open val type: TanMethodType, open val type: TanMethodType,
open val hhdVersion: String? = null, open val hhdVersion: String? = null,
open val maxTanInputLength: Int? = null, open val maxTanInputLength: Int? = null,
open val allowedTanFormat: AllowedTanFormat = AllowedTanFormat.Alphanumeric, open val allowedTanFormat: AllowedTanFormat? = null,
open val nameOfTanMediumRequired: Boolean = false open val nameOfTanMediumRequired: Boolean = false
) )

View File

@ -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 // 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 { protected fun getAccountData(bank: BankData): AddAccountResponse {
return getAsyncResponse { client, responseRetrieved -> return getAsyncResponse { client, responseRetrieved ->
client.addAccountAsync(bank) { response -> client.addAccountAsync(AddAccountParameter(bank)) { response ->
responseRetrieved(response) responseRetrieved(response)
} }
} }
@ -102,7 +102,8 @@ class fints4kService {
val tanRequestId = UUID.randomUUID().toString() 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() originatingRequestLatch.countDown()
tanRequests.put(tanRequestId, EnterTanContext(enterTanResult, enterTanLatch)) tanRequests.put(tanRequestId, EnterTanContext(enterTanResult, enterTanLatch))