]> git.ipfire.org Git - thirdparty/python-fints.git/commitdiff
Implement querying the status protocol
authorHenryk Plötz <henryk@ploetzli.ch>
Sun, 26 Aug 2018 23:54:01 +0000 (01:54 +0200)
committerRaphael Michel <mail@raphaelmichel.de>
Mon, 3 Dec 2018 18:34:29 +0000 (19:34 +0100)
fints/client.py
fints/segments/__init__.py

index c60ad2f19c059ad141db481eef0db95ea52ebdf6..b51ded2c748f0de450690aa0a99934071bf26f5b 100644 (file)
@@ -33,6 +33,7 @@ from .segments.debit import HKDSE1, HKDSE2, HKDME1, HKDME2, HKDMC1, HKDBS1, HKDB
 from .segments.saldo import HKSAL5, HKSAL6, HKSAL7
 from .segments.statement import HKKAZ5, HKKAZ6, HKKAZ7
 from .segments.transfer import HKCCM1, HKCCS1
+from .segments.journal import HKPRO3, HKPRO4
 from .types import SegmentSequence
 from .utils import MT535_Miniparser, Password, mt940_to_array, compress_datablob, decompress_datablob, SubclassesMixin
 from .parser import FinTS3Serializer
@@ -393,6 +394,20 @@ class FinTS3Client:
 
         return responses
 
+    def get_status_protocol(self):
+        with self._get_dialog() as dialog:
+            hkpro = self._find_highest_supported_command(HKPRO3, HKPRO4)
+
+            responses = self._fetch_with_touchdowns(
+                dialog,
+                lambda touchdown: hkpro(
+                    touchdown_point=touchdown,
+                ),
+                'HIPRO',
+            )
+
+        return responses
+
     def get_communication_endpoints(self):
         with self._get_dialog() as dialog:
             hkkom = self._find_highest_supported_command(HKKOM4)
index b132b476b78f82108552cd0a1223f9c8ebf1489c..2b37951e3f71053fbae2cce4ae308b2282aaecf1 100644 (file)
@@ -99,6 +99,10 @@ class HIUPD6(FinTS3Segment):
     allowed_transactions = DataElementGroupField(type=AllowedTransaction, max_count=999, required=False, _d="Erlaubte Geschäftsvorfälle")
     extension = DataElementField(type='an', max_length=2048, required=False, _d="Erweiterung, kontobezogen")
 
+class ParameterSegment_22(FinTS3Segment):
+    max_number_tasks = DataElementField(type='num', max_length=3, _d="Maximale Anzahl Aufträge")
+    min_number_signatures = DataElementField(type='num', length=1, _d="Anzahl Signaturen mindestens")
+
 class ParameterSegment(FinTS3Segment):
     max_number_tasks = DataElementField(type='num', max_length=3, _d="Maximale Anzahl Aufträge")
     min_number_signatures = DataElementField(type='num', length=1, _d="Anzahl Signaturen mindestens")
@@ -165,5 +169,5 @@ class HIKOM4(FinTS3Segment):
     communication_parameters = DataElementGroupField(type=CommunicationParameter2, min_count=1, max_count=9, _d="Kommunikationsparameter")
 
 from . import (
-    accounts, auth, debit, depot, dialog, message, saldo, statement, transfer,
+    accounts, auth, debit, depot, dialog, message, saldo, statement, transfer, journal,
 )