Skip to content

Commit

Permalink
[Add] support reconciled
Browse files Browse the repository at this point in the history
  • Loading branch information
ileodo committed Jul 26, 2023
1 parent 1321dbc commit 1bec137
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "moneywiz-api"
version = "0.0.2"
version = "0.0.3"
authors = [
{ name="iLeoDo", email="iLeoDo@gmail.com" },
]
Expand Down
3 changes: 3 additions & 0 deletions src/moneywiz_api/model/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class Transaction(Record, ABC):
"""
ENT: 36
"""
reconciled: bool

amount: float
description: str
Expand All @@ -21,12 +22,14 @@ class Transaction(Record, ABC):

def __init__(self, row):
super().__init__(row)
self.reconciled = row["ZRECONCILED"] == 1
self.amount = row["ZAMOUNT1"]
self.description = row["ZDESC2"]
self.date = row["ZDATE1"]
self.notes = row["ZNOTES1"]

# Validate
assert self.reconciled is not None
assert self.amount is not None
assert self.description is not None
assert self.date is not None
Expand Down

0 comments on commit 1bec137

Please sign in to comment.