The idea is that in the future get_information, get_tan_*, and, for convenience, get_sepa_accounts will be answered from data cached in the FinTSClient object if possible. This information in stored and retrieved with deconstruct()/from_data=
The stay_offline mode allows to inspect this cached data without risking opening a dialogue (and maybe triggering Strong Customer Authentication)
def __init__(self,
bank_identifier, user_id, customer_id=None,
from_data: bytes=None,
- product_id=None, product_version=version[:5]):
+ product_id=None, product_version=version[:5],
+ stay_offline=False):
self.accounts = []
if isinstance(bank_identifier, BankIdentifier):
self.bank_identifier = bank_identifier
self.product_name = product_id
self.product_version = product_version
self.response_callbacks = []
+ self.stay_offline = stay_offline
self._standing_dialog = None
if from_data:
if self.paused:
raise FinTSDialogStateError("Cannot init() a paused dialog")
+ if self.client.stay_offline:
+ raise FinTSDialogOfflineError("Cannot open a dialog with stay_offline=True. "
+ "This is a control flow error, no online functionality "
+ "should have been attempted with this FinTSClient object.")
+
if self.need_init and not self.open:
segments = [
HKIDN2(
pass
+class FinTSDialogOfflineError(FinTSDialogError):
+ pass
+
+
class FinTSDialogInitError(FinTSDialogError):
pass