File tree Expand file tree Collapse file tree 3 files changed +15
-6
lines changed
Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -46,9 +46,12 @@ class Transaction:
4646 """Transaction data."""
4747
4848 id : str
49- posted : int
49+ posted : datetime = field ( metadata = config ( decoder = datetime . datetime . fromtimestamp ))
5050 amount : str
5151 description : str
52+ payee : str
53+ memo : str
54+ transacted_at : datetime = field (metadata = config (decoder = datetime .datetime .fromtimestamp ))
5255
5356
5457@dataclass_json
@@ -57,7 +60,7 @@ class Holding:
5760 """Holding data."""
5861
5962 id : str
60- created : int
63+ created : datetime = field ( metadata = config ( decoder = datetime . datetime . fromtimestamp ))
6164 currency : str | None # Using `|` for optional fields
6265 cost_basis : str = field (metadata = config (field_name = "cost-basis" ))
6366 description : str
@@ -78,7 +81,7 @@ class Account:
7881 currency : str
7982 balance : str
8083 available_balance : str = field (metadata = config (field_name = "available-balance" ))
81- balance_date : int = field (metadata = config (field_name = "balance-date" ))
84+ balance_date : datetime = field (metadata = config (field_name = "balance-date" , decoder = datetime . datetime . fromtimestamp ))
8285 transactions : list [Transaction ]
8386 holdings : list [Holding ] = field (default_factory = list )
8487 extra : dict | None = None # type: ignore
Original file line number Diff line number Diff line change 2222 "id" : " 12394832938403" ,
2323 "posted" : 793090572 ,
2424 "amount" : " -1234.56" ,
25- "description" : " Enchanted Bait Shop"
25+ "description" : " Enchanted Bait Shop" ,
26+ "payee" : " Uncle Frank" ,
27+ "memo" : " Some memo" ,
28+ "transacted_at" : 793080572
2629 }
2730 ],
2831 "extra" : {
Original file line number Diff line number Diff line change 1717 "id" : " 12394832938403" ,
1818 "posted" : 793090572 ,
1919 "amount" : " -33293.43" ,
20- "description" : " Uncle Frank's Bait Shop"
20+ "description" : " Uncle Frank's Bait Shop" ,
21+ "payee" : " Uncle Frank" ,
22+ "memo" : " Some memo" ,
23+ "transacted_at" : 793080572
2124 }
2225 ],
2326 "extra" : {
2427 "account-open-date" : 978360153
2528 }
2629 }
2730 ]
28- }
31+ }
You can’t perform that action at this time.
0 commit comments