Added blocking calls to async BankingClient
This commit is contained in:
parent
0c9d1ab91c
commit
fad7a98d9d
|
@ -72,6 +72,8 @@ kotlin {
|
||||||
commonMain {
|
commonMain {
|
||||||
dependencies {
|
dependencies {
|
||||||
api(project(":BankingClientModel"))
|
api(project(":BankingClientModel"))
|
||||||
|
|
||||||
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
commonTest {
|
commonTest {
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
package net.codinux.banking.client
|
||||||
|
|
||||||
|
import kotlinx.coroutines.runBlocking
|
||||||
|
import net.codinux.banking.client.model.AccountCredentials
|
||||||
|
import net.codinux.banking.client.model.options.GetAccountDataOptions
|
||||||
|
|
||||||
|
fun BankingClient.getAccountData(credentials: AccountCredentials) = runBlocking {
|
||||||
|
this@getAccountData.getAccountDataAsync(credentials)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun BankingClient.getAccountData(credentials: AccountCredentials, options: GetAccountDataOptions) = runBlocking {
|
||||||
|
this@getAccountData.getAccountDataAsync(credentials, options)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun BankingClientForCustomer.getAccountData() = runBlocking {
|
||||||
|
this@getAccountData.getAccountDataAsync()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun BankingClientForCustomer.getAccountData(options: GetAccountDataOptions) = runBlocking {
|
||||||
|
this@getAccountData.getAccountDataAsync(options)
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
package net.codinux.banking.client
|
||||||
|
|
||||||
|
import kotlinx.coroutines.runBlocking
|
||||||
|
import net.codinux.banking.client.model.AccountCredentials
|
||||||
|
import net.codinux.banking.client.model.options.GetAccountDataOptions
|
||||||
|
|
||||||
|
fun BankingClient.getAccountData(credentials: AccountCredentials) = runBlocking {
|
||||||
|
this@getAccountData.getAccountDataAsync(credentials)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun BankingClient.getAccountData(credentials: AccountCredentials, options: GetAccountDataOptions) = runBlocking {
|
||||||
|
this@getAccountData.getAccountDataAsync(credentials, options)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun BankingClientForCustomer.getAccountData() = runBlocking {
|
||||||
|
this@getAccountData.getAccountDataAsync()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun BankingClientForCustomer.getAccountData(options: GetAccountDataOptions) = runBlocking {
|
||||||
|
this@getAccountData.getAccountDataAsync(options)
|
||||||
|
}
|
|
@ -5,3 +5,4 @@ kotlinVersion=2.0.10
|
||||||
|
|
||||||
kotlinxDateTimeVersion=0.6.0
|
kotlinxDateTimeVersion=0.6.0
|
||||||
jsJodaTimeZoneVersion=2.3.0
|
jsJodaTimeZoneVersion=2.3.0
|
||||||
|
coroutinesVersion=1.8.1
|
||||||
|
|
Loading…
Reference in New Issue