From ea1c184abc7851e5bc7802e36c218e47cb376565 Mon Sep 17 00:00:00 2001 From: dankito Date: Mon, 26 Aug 2024 22:37:30 +0200 Subject: [PATCH] Added description and clarified that by default the transaction of last 90 days are retrieved --- .../codinux/banking/client/BankingClient.kt | 19 +++++++++++++++++++ .../client/BankingClientForCustomer.kt | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/BankingClient/src/commonMain/kotlin/net/codinux/banking/client/BankingClient.kt b/BankingClient/src/commonMain/kotlin/net/codinux/banking/client/BankingClient.kt index 1b304e9a..8f9a5861 100644 --- a/BankingClient/src/commonMain/kotlin/net/codinux/banking/client/BankingClient.kt +++ b/BankingClient/src/commonMain/kotlin/net/codinux/banking/client/BankingClient.kt @@ -1,14 +1,33 @@ package net.codinux.banking.client +import net.codinux.banking.client.model.options.RetrieveTransactions import net.codinux.banking.client.model.request.GetAccountDataRequest import net.codinux.banking.client.model.response.GetAccountDataResponse import net.codinux.banking.client.model.response.Response interface BankingClient { + /** + * Retrieves account data like customer name, her bank accounts, their balance and account transactions. + * + * By default the account transactions of the last 90 days are retrieved (which in most cases doesn't require a + * TAN according to PSD2). + * + * If you like to retrieve the transactions of a different period, use the method overload that takes a + * [GetAccountDataRequest] parameter and set [RetrieveTransactions] and may to and from date in its options object. + */ suspend fun getAccountDataAsync(bankCode: String, loginName: String, password: String) = getAccountDataAsync(GetAccountDataRequest(bankCode, loginName, password)) + /** + * Retrieves account data like customer name, her bank accounts, their balance and account transactions. + * + * By default the account transactions of the last 90 days are retrieved (which in most cases doesn't require a + * TAN according to PSD2). + * + * If you like to retrieve the transactions of a different period, set [RetrieveTransactions] and may to and from + * date in [GetAccountDataRequest.options]. + */ suspend fun getAccountDataAsync(request: GetAccountDataRequest): Response } \ No newline at end of file diff --git a/BankingClient/src/commonMain/kotlin/net/codinux/banking/client/BankingClientForCustomer.kt b/BankingClient/src/commonMain/kotlin/net/codinux/banking/client/BankingClientForCustomer.kt index e73228f8..88e50bae 100644 --- a/BankingClient/src/commonMain/kotlin/net/codinux/banking/client/BankingClientForCustomer.kt +++ b/BankingClient/src/commonMain/kotlin/net/codinux/banking/client/BankingClientForCustomer.kt @@ -1,14 +1,33 @@ package net.codinux.banking.client import net.codinux.banking.client.model.options.GetAccountDataOptions +import net.codinux.banking.client.model.options.RetrieveTransactions import net.codinux.banking.client.model.response.GetAccountDataResponse import net.codinux.banking.client.model.response.Response interface BankingClientForCustomer { + /** + * Retrieves account data like customer name, her bank accounts, their balance and account transactions. + * + * By default the account transactions of the last 90 days are retrieved (which in most cases doesn't require a + * TAN according to PSD2). + * + * If you like to retrieve the transactions of a different period, use the method overload that takes a + * [GetAccountDataOptions] parameter and set [RetrieveTransactions] and may to and from date. + */ // for languages not supporting default parameters (Java, Swift, JS, ...) suspend fun getAccountDataAsync() = getAccountDataAsync(GetAccountDataOptions()) + /** + * Retrieves account data like customer name, her bank accounts, their balance and account transactions. + * + * By default the account transactions of the last 90 days are retrieved (which in most cases doesn't require a + * TAN according to PSD2). + * + * If you like to retrieve the transactions of a different period, set [GetAccountDataOptions.retrieveTransactions] + * and may [GetAccountDataOptions.retrieveTransactionsFrom] and [GetAccountDataOptions.retrieveTransactionsTo]. + */ suspend fun getAccountDataAsync(options: GetAccountDataOptions): Response } \ No newline at end of file