-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(banks): add support for zurcherkantonalbank
- Loading branch information
1 parent
64e61ff
commit da4a221
Showing
8 changed files
with
68 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from .zurcherkantonalbank import ZurcherKantonalBank | ||
|
||
__all__ = ["ZurcherKantonalBank"] |
34 changes: 34 additions & 0 deletions
34
src/monopoly/banks/zurcherkantonalbank/zurcherkantonalbank.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import logging | ||
from re import compile as regex | ||
|
||
from monopoly.config import StatementConfig | ||
from monopoly.constants import BankNames, DebitTransactionPatterns, EntryType | ||
from monopoly.constants.date import ISO8601 | ||
from monopoly.identifiers import MetadataIdentifier | ||
|
||
from ..base import BankBase | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
class ZurcherKantonalBank(BankBase): | ||
debit_config = StatementConfig( | ||
statement_type=EntryType.DEBIT, | ||
bank_name=BankNames.ZKB, | ||
statement_date_pattern=regex(rf"Balance as of: ({ISO8601.DD_MM_YYYY})"), | ||
header_pattern=regex(r"(Date.*Booking text.*Debit CHF.*Credit CHF)"), | ||
transaction_pattern=DebitTransactionPatterns.ZurcherKantonalBank, | ||
multiline_transactions=True, | ||
) | ||
|
||
identifiers = [ | ||
[ | ||
MetadataIdentifier( | ||
format="PDF 1.7", | ||
title="SLK_Vermoegensinfo_Group", | ||
creator="Designer", | ||
producer="PDFlib+PDI", | ||
) | ||
] | ||
] | ||
statement_configs = [debit_config] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters