From 110cea90a95b892cd03fe2aed31d6e6f17c7af56 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Henryk=20Pl=C3=B6tz?= Date: Tue, 28 Aug 2018 15:58:07 +0200 Subject: [PATCH] Also give information about supported SEPA PAIN formats --- fints/client.py | 3 +++ fints/formals.py | 9 +++++++++ fints/segments/accounts.py | 10 ++++++++-- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/fints/client.py b/fints/client.py index 48d021d..279649f 100644 --- a/fints/client.py +++ b/fints/client.py @@ -274,6 +274,9 @@ class FinTS3Client: op: any(self.bpd.find_segment_first(cmd[0]+'I'+cmd[2:]+'S') for cmd in op.value) for op in FinTSOperations } + hispas = self.bpd.find_segment_first('HISPAS') + if hispas: + retval['bank']['supported_sepa_formats'] = list(hispas.parameter.supported_sepa_formats) if self.upd.segments: for upd in self.upd.find_segments('HIUPD'): acc = {} diff --git a/fints/formals.py b/fints/formals.py index d720957..6ba9672 100644 --- a/fints/formals.py +++ b/fints/formals.py @@ -811,3 +811,12 @@ class StatusSEPATask1(RepresentableEnum): IN_PROGRESS = '3' #: in Bearbeitung PROCESSED = '4' #: Creditoren-seitig verarbeitet, Buchung veranlasst REVOKED = '5' #: R-Transaktion wurde veranlasst + +class GetSEPAAccountParameter1(DataElementGroup): + """Parameter SEPA-Kontoverbindung anfordern, version 1 + + Source: FinTS Financial Transaction Services, Schnittstellenspezifikation, Messages -- Multibankfähige Geschäftsvorfälle """ + single_account_query_allowed = DataElementField(type='jn', _d="Einzelkontenabruf erlaubt") + national_account_allowed = DataElementField(type='jn', _d="Nationale Kontoverbindung erlaubt") + structured_purpose_allowed = DataElementField(type='jn', _d="Strukturierter Verwendungszweck erlaubt") + supported_sepa_formats = DataElementField(type='an', max_length=256, max_count=9, required=False, _d="Unterstützte SEPA-Datenformate") diff --git a/fints/segments/accounts.py b/fints/segments/accounts.py index 8c5d3cb..fad213d 100644 --- a/fints/segments/accounts.py +++ b/fints/segments/accounts.py @@ -1,6 +1,6 @@ -from . import FinTS3Segment +from . import FinTS3Segment, ParameterSegment from ..fields import DataElementGroupField -from ..formals import KTZ1, Account3 +from ..formals import KTZ1, Account3, GetSEPAAccountParameter1 class HKSPA1(FinTS3Segment): """SEPA-Kontoverbindung anfordern, version 1 @@ -15,3 +15,9 @@ class HISPA1(FinTS3Segment): Source: FinTS Financial Transaction Services, Schnittstellenspezifikation, Messages -- Multibankfähige Geschäftsvorfälle """ accounts = DataElementGroupField(type=KTZ1, max_count=999, required=False, _d="SEPA-Kontoverbindung") + +class HISPAS1(ParameterSegment): + """SEPA-Kontoverbindung anfordern, Parameter, version 1 + + Source: FinTS Financial Transaction Services, Schnittstellenspezifikation, Messages -- Multibankfähige Geschäftsvorfälle""" + parameter = DataElementGroupField(type=GetSEPAAccountParameter1, _d="Parameter SEPA-Kontoverbindung anfordern") -- 2.39.5