@@ -150,7 +150,7 @@ def __repr__(self):
150150
151151
152152class FinTS3Client :
153- def __init__ (self , bank_identifier , user_id , customer_id = None , set_data : bytes = None ):
153+ def __init__ (self , bank_identifier , user_id , customer_id = None , from_data : bytes = None ):
154154 self .accounts = []
155155 if isinstance (bank_identifier , BankIdentifier ):
156156 self .bank_identifier = bank_identifier
@@ -172,8 +172,8 @@ def __init__(self, bank_identifier, user_id, customer_id=None, set_data: bytes=N
172172 self .response_callbacks = []
173173 self ._standing_dialog = None
174174
175- if set_data :
176- self .set_data (bytes (set_data ))
175+ if from_data :
176+ self .set_data (bytes (from_data ))
177177
178178 def _new_dialog (self , lazy_init = False ):
179179 raise NotImplemented ()
@@ -268,7 +268,7 @@ def _set_data_v1(self, data):
268268 self .upa = SegmentSequence (data ['upa_bin' ]).segments [0 ]
269269 self .upd_version = data ['upd_version' ]
270270
271- def _get_data_v1 (self , including_private = False ):
271+ def _deconstruct_v1 (self , including_private = False ):
272272 data = {
273273 "system_id" : self .system_id ,
274274 "bpd_bin" : self .bpd .render_bytes (),
@@ -285,8 +285,9 @@ def _get_data_v1(self, including_private=False):
285285
286286 return data
287287
288- def get_data (self , including_private : bool = False ) -> bytes :
289- """Return state of this FinTSClient instance as an opaque datablob.
288+ def deconstruct (self , including_private : bool = False ) -> bytes :
289+ """Return state of this FinTSClient instance as an opaque datablob. You should not
290+ use this object after calling this method.
290291
291292 Information about the connection is implicitly retrieved from the bank and
292293 cached in the FinTSClient. This includes: system identifier, bank parameter
@@ -301,11 +302,11 @@ def get_data(self, including_private: bool=False) -> bytes:
301302
302303 Note: No connection information is stored in the datablob, neither is the PIN.
303304 """
304- data = self ._get_data_v1 (including_private = including_private )
305+ data = self ._deconstruct_v1 (including_private = including_private )
305306 return compress_datablob (DATA_BLOB_MAGIC , 1 , data )
306307
307308 def set_data (self , blob : bytes ):
308- """Restore a datablob created with get_data ().
309+ """Restore a datablob created with deconstruct ().
309310
310311 You should only call this method once, and only immediately after constructing
311312 the object and before calling any other method or functionality (e.g. __enter__()).
@@ -825,15 +826,15 @@ def pause_dialog(self):
825826
826827 Commands MUST NOT be issued in the dialog after calling this method.
827828
828- MUST be used in conjunction with get_data ()/set_data().
829+ MUST be used in conjunction with deconstruct ()/set_data().
829830
830831 Caller SHOULD ensure that the dialog is resumed (and properly ended) within a reasonable amount of time.
831832
832833 :Example:
833834
834835 ::
835836
836- client = FinTS3PinTanClient(..., set_data =None)
837+ client = FinTS3PinTanClient(..., from_data =None)
837838 with client:
838839 challenge = client.sepa_transfer(...)
839840
@@ -842,13 +843,13 @@ def pause_dialog(self):
842843 # dialog is now frozen, no new commands may be issued
843844 # exiting the context does not end the dialog
844845
845- client_data = client.get_data ()
846+ client_data = client.deconstruct ()
846847
847848 # Store dialog_data and client_data out-of-band somewhere
848849 # ... Some time passes ...
849850 # Later, possibly in a different process, restore the state
850851
851- client = FinTS3PinTanClient(..., set_data =client_data)
852+ client = FinTS3PinTanClient(..., from_data =client_data)
852853 with client.resume_dialog(dialog_data):
853854 client.send_tan(...)
854855
@@ -1017,8 +1018,8 @@ def _set_data_v1(self, data):
10171018 self .selected_security_function = data .get ('selected_security_function' , self .selected_security_function )
10181019 self .allowed_security_functions = data .get ('allowed_security_functions' , self .allowed_security_functions )
10191020
1020- def _get_data_v1 (self , including_private = False ):
1021- data = super ()._get_data_v1 (including_private = including_private )
1021+ def _deconstruct_v1 (self , including_private = False ):
1022+ data = super ()._deconstruct_v1 (including_private = including_private )
10221023 data .update ({
10231024 "selected_security_function" : self .selected_security_function ,
10241025 "selected_tan_medium" : self .selected_tan_medium ,
0 commit comments