From 5e1c3142cc09b59fe1fb010d0fcfe575d57eb26d Mon Sep 17 00:00:00 2001 From: dankito Date: Mon, 19 Aug 2024 11:39:48 +0200 Subject: [PATCH] Removed other unused extensions --- .../banking/fints/FinTsClientExtensions.kt | 27 ------------------- .../banking/fints/util/AmountExtensions.kt | 14 ---------- 2 files changed, 41 deletions(-) delete mode 100644 fints4k/src/jvmMain/kotlin/net/dankito/banking/fints/FinTsClientExtensions.kt delete mode 100644 fints4k/src/jvmMain/kotlin/net/dankito/banking/fints/util/AmountExtensions.kt diff --git a/fints4k/src/jvmMain/kotlin/net/dankito/banking/fints/FinTsClientExtensions.kt b/fints4k/src/jvmMain/kotlin/net/dankito/banking/fints/FinTsClientExtensions.kt deleted file mode 100644 index f86e3c54..00000000 --- a/fints4k/src/jvmMain/kotlin/net/dankito/banking/fints/FinTsClientExtensions.kt +++ /dev/null @@ -1,27 +0,0 @@ -package net.dankito.banking.fints - -import kotlinx.coroutines.runBlocking -import net.dankito.banking.client.model.parameter.GetAccountDataParameter -import net.dankito.banking.client.model.parameter.TransferMoneyParameter -import net.dankito.banking.client.model.response.GetAccountDataResponse -import net.dankito.banking.client.model.response.TransferMoneyResponse -import net.dankito.banking.fints.model.Money - - -fun FinTsClient.getAccountData(bankCode: String, loginName: String, password: String): GetAccountDataResponse { - return runBlocking { getAccountDataAsync(bankCode, loginName, password) } -} - -fun FinTsClient.getAccountData(param: GetAccountDataParameter): GetAccountDataResponse { - return runBlocking { getAccountDataAsync(param) } -} - - -fun FinTsClient.transferMoney(bankCode: String, loginName: String, password: String, recipientName: String, recipientAccountIdentifier: String, - amount: Money, reference: String? = null): TransferMoneyResponse { - return runBlocking { transferMoneyAsync(bankCode, loginName, password, recipientName, recipientAccountIdentifier, amount, reference) } -} - -fun FinTsClient.transferMoney(param: TransferMoneyParameter): TransferMoneyResponse { - return runBlocking { transferMoneyAsync(param) } -} \ No newline at end of file diff --git a/fints4k/src/jvmMain/kotlin/net/dankito/banking/fints/util/AmountExtensions.kt b/fints4k/src/jvmMain/kotlin/net/dankito/banking/fints/util/AmountExtensions.kt deleted file mode 100644 index 29cfd2a9..00000000 --- a/fints4k/src/jvmMain/kotlin/net/dankito/banking/fints/util/AmountExtensions.kt +++ /dev/null @@ -1,14 +0,0 @@ -package net.dankito.banking.fints.util - -import net.dankito.banking.fints.model.Amount -import net.dankito.banking.fints.model.Money -import java.math.BigDecimal - - -fun Amount.toBigDecimal(): BigDecimal { - return BigDecimal(this.string.replace(',', '.')) -} - -fun Money.toBigDecimal(): BigDecimal { - return this.amount.toBigDecimal() -} \ No newline at end of file