From: Henryk Plötz Date: Thu, 9 Aug 2018 22:57:05 +0000 (+0200) Subject: Rename old FinTS3Segment to FinTS3SegmentOLD for coexistence with old code X-Git-Tag: v2.0.0~1^2~131 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c447c45f78504f7e1278331153d90bdf73e5301c;p=thirdparty%2Fpython-fints.git Rename old FinTS3Segment to FinTS3SegmentOLD for coexistence with old code --- diff --git a/fints/segments/__init__.py b/fints/segments/__init__.py index 0fce22a..ac5fa44 100644 --- a/fints/segments/__init__.py +++ b/fints/segments/__init__.py @@ -6,6 +6,19 @@ from fints.utils import classproperty, SubclassesMixin TYPE_VERSION_RE = re.compile(r'^([A-Z]+)(\d+)$') +class FinTS3SegmentOLD: + type = '???' + country_code = 280 + version = 2 + def __init__(self, segmentno, data): + self.segmentno = segmentno + self.data = data + def __str__(self): + res = '{}:{}:{}'.format(self.type, self.segmentno, self.version) + for d in self.data: + res += '+' + str(d) + return res + "'" + class FinTS3SegmentMeta(ContainerMeta): @staticmethod def _check_fields_recursive(instance): diff --git a/fints/segments/accounts.py b/fints/segments/accounts.py index ef78955..6357af0 100644 --- a/fints/segments/accounts.py +++ b/fints/segments/accounts.py @@ -1,7 +1,7 @@ -from . import FinTS3Segment +from . import FinTS3SegmentOLD -class HKSPA(FinTS3Segment): +class HKSPA(FinTS3SegmentOLD): """ HKSPA (SEPA-Kontoverbindung anfordern) Section C.10.1.3 diff --git a/fints/segments/auth.py b/fints/segments/auth.py index a049fb5..7ea7378 100644 --- a/fints/segments/auth.py +++ b/fints/segments/auth.py @@ -1,8 +1,8 @@ from fints.utils import fints_escape -from . import FinTS3Segment +from . import FinTS3SegmentOLD -class HKIDN(FinTS3Segment): +class HKIDN(FinTS3SegmentOLD): """ HKIDN (Identifikation) Section C.3.1.2 @@ -20,7 +20,7 @@ class HKIDN(FinTS3Segment): super().__init__(segmentno, data) -class HKVVB(FinTS3Segment): +class HKVVB(FinTS3SegmentOLD): """ HKVVB (Verarbeitungsvorbereitung) Section C.3.1.3 @@ -42,7 +42,7 @@ class HKVVB(FinTS3Segment): super().__init__(segmentno, data) -class HKSYN(FinTS3Segment): +class HKSYN(FinTS3SegmentOLD): """ HKSYN (Synchronisation) Section C.8.1.2 @@ -61,7 +61,7 @@ class HKSYN(FinTS3Segment): super().__init__(segmentno, data) -class HKTAN(FinTS3Segment): +class HKTAN(FinTS3SegmentOLD): """ HKTAN (TAN-Verfahren festlegen) Section B.5.1 @@ -98,7 +98,7 @@ class HKTAN(FinTS3Segment): super().__init__(segno, data) -class HKTAB(FinTS3Segment): +class HKTAB(FinTS3SegmentOLD): """ HKTAB (Verfügbarre TAN-Medien ermitteln) Section C.2.1.2 diff --git a/fints/segments/debit.py b/fints/segments/debit.py index 0c349ca..d55fe1d 100644 --- a/fints/segments/debit.py +++ b/fints/segments/debit.py @@ -1,8 +1,8 @@ -from . import FinTS3Segment +from . import FinTS3SegmentOLD from ..models import SEPAAccount -class HKDSE(FinTS3Segment): +class HKDSE(FinTS3SegmentOLD): """ HKDSE (Einreichung terminierter SEPA-Einzellastschrift) Section C.10.2.5.4.1 @@ -24,7 +24,7 @@ class HKDSE(FinTS3Segment): super().__init__(segno, data) -class HKDME(FinTS3Segment): +class HKDME(FinTS3SegmentOLD): """ HKDME (Einreichung terminierter SEPA-Sammellastschrift) Section C.10.3.2.2.1 diff --git a/fints/segments/depot.py b/fints/segments/depot.py index 218d6b8..2b4c31f 100644 --- a/fints/segments/depot.py +++ b/fints/segments/depot.py @@ -1,7 +1,7 @@ -from . import FinTS3Segment +from . import FinTS3SegmentOLD -class HKWPD(FinTS3Segment): +class HKWPD(FinTS3SegmentOLD): """ HKWPD (Depotaufstellung anfordern) Section C.4.3.1 diff --git a/fints/segments/dialog.py b/fints/segments/dialog.py index 34e2f75..4d74679 100644 --- a/fints/segments/dialog.py +++ b/fints/segments/dialog.py @@ -1,7 +1,7 @@ -from . import FinTS3Segment +from . import FinTS3SegmentOLD -class HKEND(FinTS3Segment): +class HKEND(FinTS3SegmentOLD): """ HKEND (Dialogende) Section C.4.1.2 diff --git a/fints/segments/message.py b/fints/segments/message.py index de199f7..3157f48 100644 --- a/fints/segments/message.py +++ b/fints/segments/message.py @@ -1,10 +1,10 @@ import time from fints.utils import fints_escape -from . import FinTS3Segment +from . import FinTS3SegmentOLD -class HNHBK(FinTS3Segment): +class HNHBK(FinTS3SegmentOLD): """ HNHBK (Nachrichtenkopf) Section B.5.2 @@ -28,7 +28,7 @@ class HNHBK(FinTS3Segment): super().__init__(1, data) -class HNSHK(FinTS3Segment): +class HNSHK(FinTS3SegmentOLD): """ HNSHK (Signaturkopf) Section B.5.1 @@ -57,7 +57,7 @@ class HNSHK(FinTS3Segment): super().__init__(segno, data) -class HNVSK(FinTS3Segment): +class HNVSK(FinTS3SegmentOLD): """ HNVSK (Verschlüsslungskopf) Section B.5.3 @@ -82,7 +82,7 @@ class HNVSK(FinTS3Segment): super().__init__(segno, data) -class HNVSD(FinTS3Segment): +class HNVSD(FinTS3SegmentOLD): """ HNVSD (Verschlüsselte Daten) Section B.5.4 @@ -104,7 +104,7 @@ class HNVSD(FinTS3Segment): ] -class HNSHA(FinTS3Segment): +class HNSHA(FinTS3SegmentOLD): """ HNSHA (Signaturabschluss) Section B.5.2 @@ -129,7 +129,7 @@ class HNSHA(FinTS3Segment): super().__init__(segno, data) -class HNHBS(FinTS3Segment): +class HNHBS(FinTS3SegmentOLD): """ HNHBS (Nachrichtenabschluss) Section B.5.3 diff --git a/fints/segments/saldo.py b/fints/segments/saldo.py index 1c92316..a53333d 100644 --- a/fints/segments/saldo.py +++ b/fints/segments/saldo.py @@ -1,7 +1,7 @@ -from . import FinTS3Segment +from . import FinTS3SegmentOLD -class HKSAL(FinTS3Segment): +class HKSAL(FinTS3SegmentOLD): """ HKSAL (Konto Saldo anfordern) Section C.2.1.2 diff --git a/fints/segments/statement.py b/fints/segments/statement.py index 71114e4..389546d 100644 --- a/fints/segments/statement.py +++ b/fints/segments/statement.py @@ -1,8 +1,8 @@ from fints.utils import fints_escape -from . import FinTS3Segment +from . import FinTS3SegmentOLD -class HKKAZ(FinTS3Segment): +class HKKAZ(FinTS3SegmentOLD): """ HKKAZ (Kontoumsätze) diff --git a/fints/segments/transfer.py b/fints/segments/transfer.py index eae03dd..91e28e1 100644 --- a/fints/segments/transfer.py +++ b/fints/segments/transfer.py @@ -1,8 +1,8 @@ -from . import FinTS3Segment +from . import FinTS3SegmentOLD from ..models import SEPAAccount -class HKCCS(FinTS3Segment): +class HKCCS(FinTS3SegmentOLD): """ HKCCS (SEPA Überweisung übertragen) Section C.2.1.2 @@ -24,7 +24,7 @@ class HKCCS(FinTS3Segment): super().__init__(segno, data) -class HKCCM(FinTS3Segment): +class HKCCM(FinTS3SegmentOLD): """ HKCCM (SEPA-Sammelüberweisung einreichen) Section C.10.3.1.1