Added description and clarified that by default the transaction of last 90 days are retrieved

This commit is contained in:
dankito 2024-08-26 22:37:30 +02:00
parent 68dabf9c68
commit ea1c184abc
2 changed files with 38 additions and 0 deletions

View File

@ -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<GetAccountDataResponse>
}

View File

@ -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<GetAccountDataResponse>
}