Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement dikku2 #80

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions fints/formals.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,27 @@ def as_mt940_Balance(self):
)


class CreditCardTransaction1(DataElementGroup):
"""Kreditkartenumsatz

Source: Reverse engineered"""
credit_card_number = DataElementField(type='an', _d="Kreditkartennummer")
receipt_date = DataElementField(type='dat', _d="Belegdatum")
booking_date = DataElementField(type='dat', _d="Buchungsatum")
value_date = DataElementField(type='dat', _d="Wertstellungsdatum")
original_amount = DataElementField(type='wrt', _d="Original-Wert")
currency = DataElementField(type='cur', _d="Währung")
credit_debit = CodeField(enum=CreditDebit2, length=1, _d="Soll-Haben-Kennzeichen")
exchange_rate = DataElementField(type='float', _d="Umrechnungskurs")
booked_amount = DataElementField(type='wrt', _d="Gebuchter Wert")
booked_currency = DataElementField(type='cur', _d="Gebuchte Währung")
booked_credit_debit = CodeField(enum=CreditDebit2, length=1, _d="Gebuchtes Soll-Haben-Kennzeichen")
memo = DataElementField(type='an', _d="Buchungstext", count=9)
settled = DataElementField(type='jn')
booking_reference = DataElementField(type='an', _d="Buchungsreferenz")



class Timestamp1(DataElementGroup):
"""Zeitstempel

Expand Down
10 changes: 9 additions & 1 deletion fints/segments/statement.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from fints.fields import DataElementField, DataElementGroupField
from fints.formals import KTI1, Account2, Account3, QueryCreditCardStatements2, SupportedMessageTypes
from fints.formals import KTI1, Account2, Account3, QueryCreditCardStatements2, SupportedMessageTypes, Balance1,\
CreditCardTransaction1

from .base import FinTS3Segment, ParameterSegment

Expand Down Expand Up @@ -81,6 +82,13 @@ class DIKKU2(FinTS3Segment):
"""Kreditkartenumsätze rückmelden, version 2

Source: Reverse engineered"""
credit_card_number = DataElementField(type='an', _d="Kreditkartennummer")
_unknown_1 = DataElementField(type='an')
balance = DataElementGroupField(type=Balance1, _d="Saldo")
_unknown_2 = DataElementField(type='an')
_unknown_3 = DataElementField(type='an')
transactions = DataElementGroupField(type=CreditCardTransaction1, _d="Kreditkartenumsatz", min_count=1, required=False)


class DIKKUS2(ParameterSegment):
"""Kreditkartenumsätze anfordern Parameter, version 2
Expand Down