From 90ce8be25d111c768bb3f18470d2fa06c92e001b Mon Sep 17 00:00:00 2001 From: dankl Date: Sat, 25 Jan 2020 19:53:44 +0100 Subject: [PATCH] Implemented toString() --- .../response/client/FinTsClientResponse.kt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/fints4javaLib/src/main/kotlin/net/dankito/fints/response/client/FinTsClientResponse.kt b/fints4javaLib/src/main/kotlin/net/dankito/fints/response/client/FinTsClientResponse.kt index 3485e97f..96d5ac0b 100644 --- a/fints4javaLib/src/main/kotlin/net/dankito/fints/response/client/FinTsClientResponse.kt +++ b/fints4javaLib/src/main/kotlin/net/dankito/fints/response/client/FinTsClientResponse.kt @@ -39,4 +39,21 @@ open class FinTsClientResponse( return Response(this.isSuccessful) } + + override fun toString(): String { + if (noTanProcedureSelected) { + return "Error: No TAN procedure selected" + } + + if (isJobAllowed == false) { + return "Error: Job is not allowed" + } + + if (isJobVersionSupported == false) { + return "Error: Job version is not supported. Supported versions are $supportedVersions" + } + + return "isSuccessful = $isSuccessful" + } + } \ No newline at end of file