From: Henryk Plötz Date: Mon, 27 Aug 2018 13:13:09 +0000 (+0200) Subject: Fix bugs found when talking to banks X-Git-Tag: v2.0.0~1^2~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=235aca117f21826e892155a4ec127a2386b7593f;p=thirdparty%2Fpython-fints.git Fix bugs found when talking to banks --- diff --git a/fints/fields.py b/fints/fields.py index 06ca8b7..31bf5cb 100644 --- a/fints/fields.py +++ b/fints/fields.py @@ -184,7 +184,7 @@ class NumericField(FieldRenderFormatStringMixin, DataElementField): def _parse_value(self, value): _value = str(value) if len(_value) > 1 and _value[0] == '0': - raise TypeError("Leading zeroes not allowed for value of type 'num': {!r}".format(value)) + raise ValueError("Leading zeroes not allowed for value of type 'num': {!r}".format(value)) return int(_value, 10) class ZeroPaddedNumericField(NumericField): diff --git a/fints/formals.py b/fints/formals.py index dc01fd9..3e0ee75 100644 --- a/fints/formals.py +++ b/fints/formals.py @@ -718,8 +718,8 @@ class ScheduledDebitParameter2(DataElementGroup): """Parameter terminierte SEPA-Einzellastschrift einreichen, version 2 Source: FinTS Financial Transaction Services, Schnittstellenspezifikation, Messages -- Multibankfähige Geschäftsvorfälle """ - min_advance_notice = DataElementField(type='num', max_length=4, _d="Minimale Vorlaufzeit SEPA-Lastschrift") - max_advance_notice = DataElementField(type='num', max_length=4, _d="Maximale Vorlaufzeit SEPA-Lastschrift") + min_advance_notice = DataElementField(type='an', max_length=99, _d="Minimale Vorlaufzeit SEPA-Lastschrift") + max_advance_notice = DataElementField(type='an', max_length=99, _d="Maximale Vorlaufzeit SEPA-Lastschrift") allowed_purpose_codes = DataElementField(type='an', max_length=4096, required=False, _d="Zulässige purpose codes") supported_sepa_formats = DataElementField(type='an', max_length=256, max_count=9, required=False, _d="Unterstützte SEPA-Datenformate") @@ -739,8 +739,8 @@ class ScheduledBatchDebitParameter2(DataElementGroup): """Parameter terminierte SEPA-Sammellastschrift einreichen, version 2 Source: FinTS Financial Transaction Services, Schnittstellenspezifikation, Messages -- Multibankfähige Geschäftsvorfälle """ - min_advance_notice = DataElementField(type='num', max_length=4, _d="Minimale Vorlaufzeit SEPA-Lastschrift") - max_advance_notice = DataElementField(type='num', max_length=4, _d="Maximale Vorlaufzeit SEPA-Lastschrift") + min_advance_notice = DataElementField(type='an', max_length=99, _d="Minimale Vorlaufzeit SEPA-Lastschrift") + max_advance_notice = DataElementField(type='an', max_length=99, _d="Maximale Vorlaufzeit SEPA-Lastschrift") max_debit_count = DataElementField(type='num', max_length=7, _d="Maximale Anzahl DirectDebitTransfer TransactionInformation") sum_amount_required = DataElementField(type='jn', _d="Summenfeld benötigt") single_booking_allowed = DataElementField(type='jn', _d="Einzelbuchung erlaubt") @@ -774,6 +774,7 @@ class QueryScheduledDebitParameter1(DataElementGroup): Source: FinTS Financial Transaction Services, Schnittstellenspezifikation, Messages -- Multibankfähige Geschäftsvorfälle """ date_range_allowed = DataElementField(type='jn', _d="Zeitraum möglich") + max_number_responses_allowed = DataElementField(type='jn', _d="Eingabe Anzahl Einträge erlaubt") class QueryScheduledDebitParameter2(DataElementGroup): """Parameter Bestand terminierter SEPA-Einzellastschriften, version 2