-
Notifications
You must be signed in to change notification settings - Fork 10
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 chase credit
- Loading branch information
1 parent
0a39aa6
commit af90705
Showing
6 changed files
with
49 additions
and
2 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 .chase import Chase | ||
|
||
__all__ = ["Chase"] |
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,36 @@ | ||
import logging | ||
from re import compile as regex | ||
|
||
from monopoly.config import DateOrder, StatementConfig | ||
from monopoly.constants import BankNames, CreditTransactionPatterns, EntryType | ||
from monopoly.identifiers import MetadataIdentifier, TextIdentifier | ||
|
||
from ..base import BankBase | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
class Chase(BankBase): | ||
name = BankNames.CHASE | ||
|
||
credit = StatementConfig( | ||
statement_type=EntryType.CREDIT, | ||
statement_date_pattern=regex(r"Statement Date:\s+(.*)"), | ||
statement_date_order=DateOrder("MDY"), | ||
transaction_date_order=DateOrder("MDY"), | ||
header_pattern=regex(r"(.*Transaction.*Merchant Name .*\$ Amount)"), | ||
transaction_pattern=CreditTransactionPatterns.CHASE, | ||
multiline_transactions=True, | ||
) | ||
|
||
identifiers = [ | ||
[ | ||
MetadataIdentifier( | ||
format="PDF 1.7", | ||
producer="OpenText Output Transformation Engine - 23.4", | ||
), | ||
TextIdentifier("Chase"), | ||
] | ||
] | ||
|
||
statement_configs = [credit] |
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