-
Notifications
You must be signed in to change notification settings - Fork 12
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 bank of america combined statement
- Loading branch information
1 parent
af90705
commit 251afb5
Showing
8 changed files
with
68 additions
and
3 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 .boa import BankOfAmerica | ||
|
||
__all__ = ["BankOfAmerica"] |
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,39 @@ | ||
import logging | ||
from re import compile as regex | ||
|
||
from monopoly.config import DateOrder, StatementConfig | ||
from monopoly.constants import BankNames, CreditTransactionPatterns, EntryType | ||
from monopoly.constants.date import ISO8601 | ||
from monopoly.identifiers import MetadataIdentifier | ||
|
||
from ..base import BankBase | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
class BankOfAmerica(BankBase): | ||
name = BankNames.BANK_OF_AMERICA | ||
|
||
credit = StatementConfig( | ||
statement_type=EntryType.CREDIT, | ||
statement_date_pattern=regex(rf"for .* to {ISO8601.MMMM_DD_YYYY}"), | ||
statement_date_order=DateOrder("MDY"), | ||
transaction_date_order=DateOrder("MDY"), | ||
header_pattern=regex(r"(Date.*Description.*Amount)"), | ||
transaction_pattern=CreditTransactionPatterns.BANK_OF_AMERICA, | ||
multiline_transactions=True, | ||
safety_check=False, | ||
auto_polarity=False, | ||
) | ||
|
||
identifiers = [ | ||
[ | ||
MetadataIdentifier( | ||
format="PDF 1.5", | ||
creator="Bank of America", | ||
producer="TargetStream StreamEDS", | ||
) | ||
] | ||
] | ||
|
||
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
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