Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
message_number=2)),
fints.segments.message.HNVSK3(header=fints.formals.SegmentHeader('HNVSK', 998, 3, None),
security_profile=fints.formals.SecurityProfile(security_method='PIN', security_method_version=1),
security_function='998', security_role='1',
security_identification_details=fints.formals.SecurityIdentificationDetails(identified_role='2',
cid=None,
identifier='oIm3BlHv6mQBAADYgbPpp+kWrAQA'),
security_datetime=fints.formals.SecurityDateTime(date_time_type='1', date=None, time=None),
encryption_algorithm=fints.formals.EncryptionAlgorithm(usage_encryption='2', operation_mode='2',
encryption_algorithm='13',
algorithm_parameter_value=b'00000000',
algorithm_parameter_name='5',
algorithm_parameter_iv_name='1',
algorithm_parameter_iv_value=None),
key_name=fints.formals.KeyName(
bank_identifier=fints.formals.BankIdentifier(country_identifier='280', bank_code='15050500'),
user_id='hermes', key_type='S', key_number=0, key_version=0), compression_function='0',
certificate=fints.formals.Certificate(certificate_type=None, certificate_content=None)),
fints.segments.message.HNVSD1(header=fints.formals.SegmentHeader('HNVSD', 999, 1, None), data=SegmentSequence([
fints.segments.message.HNSHK4(
header=fints.formals.SegmentHeader(
'HNSHK', 2,
4, None),
security_profile=fints.formals.SecurityProfile(
security_method='PIN',
security_method_version=1),
security_function='999',
security_reference='9166926',
security_application_area='1',
security_role='1',
security_identification_details=fints.formals.SecurityIdentificationDetails(
identified_role='2',
algorithm_parameter_value=b'00000000',
algorithm_parameter_name='5',
algorithm_parameter_iv_name='1'),
key_name=fints.formals.KeyName(
bank_identifier=fints.formals.BankIdentifier(country_identifier='280', bank_code='15050500'),
user_id='hermes', key_type='S', key_number=0, key_version=0), compression_function='0'),
fints.segments.message.HNVSD1(header=fints.formals.SegmentHeader('HNVSD', 999, 1), data=SegmentSequence([fints.segments.message.HNSHK4(
header=fints.formals.SegmentHeader('HNSHK', 2, 4),
security_profile=fints.formals.SecurityProfile(security_method='PIN', security_method_version=1), security_function='999',
security_reference='9166926', security_application_area='1', security_role='1',
security_identification_details=fints.formals.SecurityIdentificationDetails(identified_role='2', cid=None,
identifier='oIm3BlHv6mQBAADYgbPpp+kWrAQA'),
security_reference_number=1, security_datetime=fints.formals.SecurityDateTime(date_time_type='1'),
hash_algorithm=fints.formals.HashAlgorithm(usage_hash='1', hash_algorithm='999', algorithm_parameter_name='1'),
signature_algorithm=fints.formals.SignatureAlgorithm(usage_signature='6', signature_algorithm='10', operation_mode='16'),
key_name=fints.formals.KeyName(bank_identifier=fints.formals.BankIdentifier(country_identifier='280', bank_code='15050500'),
user_id='hermes', key_type='S', key_number=0, key_version=0)), fints.segments.dialog.HIRMG2(
header=fints.formals.SegmentHeader('HIRMG', 3, 2),
responses=[fints.formals.Response(code='0010', reference_element=None, text='Nachricht entgegengenommen.'),
fints.formals.Response(code='0100', reference_element=None, text='Dialog beendet.')]), fints.segments.message.HNSHA2(
header=fints.formals.SegmentHeader('HNSHA', 4, 2), security_reference='9166926')])),
fints.segments.message.HNHBS1(header=fints.formals.SegmentHeader('HNHBS', 5, 1), message_number=2)])
assert FinTS3Serializer().serialize_message(s) == TEST_MESSAGES['basic_simple']
account_type = DataElementField(type='num', max_length=2, _d="Kontoart")
account_currency = DataElementField(type='cur', _d="Kontowährung")
name_account_owner_1 = DataElementField(type='an', max_length=27, _d="Name des Kontoinhabers 1")
name_account_owner_2 = DataElementField(type='an', max_length=27, required=False, _d="Name des Kontoinhabers 2")
account_product_name = DataElementField(type='an', max_length=30, required=False, _d="Kontoproduktbezeichnung")
account_limit = DataElementGroupField(type=AccountLimit, required=False, _d="Kontolimit")
allowed_transactions = DataElementGroupField(type=AllowedTransaction, count=999, required=False, _d="Erlaubte Geschäftsvorfälle")
extension = DataElementField(type='an', max_length=2048, required=False, _d="Erweiterung, kontobezogen")
class HKKOM4(FinTS3Segment):
"""Kommunikationszugang anfordern, version 4
Source: FinTS Financial Transaction Services, Schnittstellenspezifikation, Formals"""
start_bank_identifier = DataElementGroupField(type=BankIdentifier, required=False, _d="Von Kreditinstitutskennung")
end_bank_identifier = DataElementGroupField(type=BankIdentifier, required=False, _d="Bis Kreditinstitutskennung")
max_number_responses = DataElementField(type='num', max_length=4, required=False, _d="Maximale Anzahl Einträge")
touchdown_point = DataElementField(type='an', max_length=35, required=False, _d="Aufsetzpunkt")
class HIKOM4(FinTS3Segment):
"""Kommunikationszugang rückmelden, version 4
Source: FinTS Financial Transaction Services, Schnittstellenspezifikation, Formals"""
bank_identifier = DataElementGroupField(type=BankIdentifier, _d="Kreditinstitutskennung")
default_language = CodeField(enum=Language2, max_length=3, _d="Standardsprache")
communication_parameters = DataElementGroupField(type=CommunicationParameter2, min_count=1, max_count=9, _d="Kommunikationsparameter")
bpd_version = DataElementField(type='num', max_length=3, _d="BPD-Version")
bank_identifier = DataElementGroupField(type=BankIdentifier, _d="Kreditinstitutskennung")
bank_name = DataElementField(type='an', max_length=60, _d="Kreditinstitutsbezeichnung")
number_tasks = DataElementField(type='num', max_length=3, _d="Anzahl Geschäftsvorfallarten pro Nachricht")
supported_languages = DataElementGroupField(type=SupportedLanguages2, _d="Unterstützte Sprachen")
supported_hbci_version = DataElementGroupField(type=SupportedHBCIVersions2, _d="Unterstützte HBCI-Versionen")
max_message_length = DataElementField(type='num', max_length=4, required=False, _d="Maximale Nachrichtengröße")
min_timeout = DataElementField(type='num', max_length=4, required=False, _d="Minimaler Timeout-Wert")
max_timeout = DataElementField(type='num', max_length=4, required=False, _d="Maximaler Timeout-Wert")
class HKKOM4(FinTS3Segment):
"""Kommunikationszugang anfordern, version 4
Source: FinTS Financial Transaction Services, Schnittstellenspezifikation, Formals"""
start_bank_identifier = DataElementGroupField(type=BankIdentifier, required=False, _d="Von Kreditinstitutskennung")
end_bank_identifier = DataElementGroupField(type=BankIdentifier, required=False, _d="Bis Kreditinstitutskennung")
max_number_responses = DataElementField(type='num', max_length=4, required=False, _d="Maximale Anzahl Einträge")
touchdown_point = DataElementField(type='an', max_length=35, required=False, _d="Aufsetzpunkt")
class HIKOM4(FinTS3Segment):
"""Kommunikationszugang rückmelden, version 4
Source: FinTS Financial Transaction Services, Schnittstellenspezifikation, Formals"""
bank_identifier = DataElementGroupField(type=BankIdentifier, _d="Kreditinstitutskennung")
default_language = CodeField(enum=Language2, max_length=3, _d="Standardsprache")
communication_parameters = DataElementGroupField(type=CommunicationParameter2, min_count=1, max_count=9, _d="Kommunikationsparameter")
from . import (
accounts, auth, debit, depot, dialog, message, saldo, statement, transfer, journal,
class SupportedHBCIVersions2(DataElementGroup):
versions = DataElementField(type='code', max_length=3, min_count=1, max_count=9)
class KTZ1(DataElementGroup):
"""Kontoverbindung ZV international, version 1
Source: FinTS Financial Transaction Services, Schnittstellenspezifikation, Messages -- Multibankfähige Geschäftsvorfälle """
is_sepa = DataElementField(type='jn', _d="Kontoverwendung SEPA")
iban = DataElementField(type='an', max_length=34, _d="IBAN")
bic = DataElementField(type='an', max_length=11, _d="BIC")
account_number = DataElementField(type='id', _d="Konto-/Depotnummer")
subaccount_number = DataElementField(type='id', _d="Unterkontomerkmal")
bank_identifier = DataElementGroupField(type=BankIdentifier, _d="Kreditinstitutskennung")
def as_sepa_account(self):
from fints.models import SEPAAccount
if not self.is_sepa:
return None
return SEPAAccount(self.iban, self.bic, self.account_number, self.subaccount_number, self.bank_identifier.bank_code)
@classmethod
def from_sepa_account(cls, acc):
return cls(
is_sepa=True,
iban=acc.iban,
bic=acc.bic,
account_number=acc.accountnumber,
subaccount_number=acc.subaccount,
bank_identifier=BankIdentifier(
def __init__(self,
bank_identifier, user_id, customer_id=None,
from_data: bytes=None,
product_id=None, product_version=version[:5],
mode=FinTSClientMode.INTERACTIVE):
self.accounts = []
if isinstance(bank_identifier, BankIdentifier):
self.bank_identifier = bank_identifier
elif isinstance(bank_identifier, str):
self.bank_identifier = BankIdentifier(BankIdentifier.COUNTRY_ALPHA_TO_NUMERIC['DE'], bank_identifier)
else:
raise TypeError("bank_identifier must be BankIdentifier or str (BLZ)")
self.system_id = SYSTEM_ID_UNASSIGNED
if not product_id:
logger.warning('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
self.bpa = None
self.bpd = SegmentSequence()
self.upd_version = 0
self.upa = None
self.upd = SegmentSequence()
self.product_name = product_id
def from_sepa_account(cls, acc):
return cls(
account_number=acc.accountnumber,
subaccount_number=acc.subaccount,
bank_identifier=BankIdentifier(
country_identifier=BankIdentifier.COUNTRY_ALPHA_TO_NUMERIC[acc.bic[4:6]],
bank_code=acc.blz
)
KTI1, BankIdentifier, ChallengeValidUntil, Language2,
ParameterChallengeClass, ParameterPinTan, ParameterTwostepTAN1,
ParameterTwostepTAN2, ParameterTwostepTAN3, ParameterTwostepTAN4,
ParameterTwostepTAN5, ParameterTwostepTAN6, ResponseHHDUC,
SystemIDStatus, TANMedia4, TANMedia5, TANMediaClass3,
TANMediaClass4, TANMediaType2, TANUsageOption,
)
from .base import FinTS3Segment, ParameterSegment
class HKIDN2(FinTS3Segment):
"""Identifikation, version 2
Source: FinTS Financial Transaction Services, Schnittstellenspezifikation, Formals"""
bank_identifier = DataElementGroupField(type=BankIdentifier, _d="Kreditinstitutskennung")
customer_id = DataElementField(type='id', _d="Kunden-ID")
system_id = DataElementField(type='id', _d="Kundensystem-ID")
system_id_status = CodeField(enum=SystemIDStatus, length=1, _d="Kundensystem-Status")
class HKVVB3(FinTS3Segment):
"""Verarbeitungsvorbereitung, version 3
Source: FinTS Financial Transaction Services, Schnittstellenspezifikation, Formals"""
bpd_version = DataElementField(type='num', max_length=3, _d="BPD-Version")
upd_version = DataElementField(type='num', max_length=3, _d="UPD-Version")
language = CodeField(enum=Language2, max_length=3, _d="Dialogsprache")
product_name = DataElementField(type='an', max_length=25, _d="Produktbezeichnung")
product_version = DataElementField(type='an', max_length=5, _d="Produktversion")
def from_sepa_account(cls, acc):
return cls(
account_number=acc.accountnumber,
subaccount_number=acc.subaccount,
bank_identifier=BankIdentifier(
country_identifier=BankIdentifier.COUNTRY_ALPHA_TO_NUMERIC[acc.bic[4:6]],
bank_code=acc.blz
)