]> git.ipfire.org Git - thirdparty/python-fints.git/commitdiff
Allow to provide product_version in FinTS3Client constructor
authorHenryk Plötz <henryk@ploetzli.ch>
Mon, 9 Sep 2019 10:43:02 +0000 (12:43 +0200)
committerHenryk Plötz <henryk@ploetzli.ch>
Mon, 9 Sep 2019 10:43:02 +0000 (12:43 +0200)
fints/client.py

index 974cc7f5fc147f32fc95db4a7d95445c61216783..fd029c3e101ccd6240b5a0b35506161e3acae57f 100644 (file)
@@ -152,7 +152,10 @@ class TransactionResponse:
 
 
 class FinTS3Client:
-    def __init__(self, bank_identifier, user_id, customer_id=None, from_data: bytes=None, product_id=None):
+    def __init__(self,
+                 bank_identifier, user_id, customer_id=None,
+                 from_data: bytes=None,
+                 product_id=None, product_version=version[:5]):
         self.accounts = []
         if isinstance(bank_identifier, BankIdentifier):
             self.bank_identifier = bank_identifier
@@ -164,7 +167,7 @@ class FinTS3Client:
         if not product_id:
             logger.warn('You should register your program with the ZKA and pass your own product_id as a parameter.')
             product_id = 'DC333D745719C4BD6A6F9DB6A'
-        
+
         self.user_id = user_id
         self.customer_id = customer_id or user_id
         self.bpd_version = 0
@@ -174,7 +177,7 @@ class FinTS3Client:
         self.upa = None
         self.upd = SegmentSequence()
         self.product_name = product_id
-        self.product_version = version[:5]
+        self.product_version = product_version
         self.response_callbacks = []
         self._standing_dialog = None