Skip to content

Commit 1e3576b

Browse files
committed
new: Add Spend activity description
Adds transaction description for SPEND - PREPAID activities. Fixes #22
1 parent d8392ea commit 1e3576b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

ws_api/wealthsimple_api.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,10 @@ def _activity_add_description(self, act):
695695
program = "- Visa Infinite" if act['rewardProgram'] == 'CREDIT_CARD_VISA_INFINITE_REWARDS' else ''
696696
act['description'] = f"Cash back {program}".rstrip()
697697

698+
elif act['type'] == 'SPEND' and act['subType'] == 'PREPAID':
699+
merchant = act['spendMerchant']
700+
act['description'] = f"Purchase: {merchant}"
701+
698702
# TODO: Add other types as needed
699703

700704
def security_id_to_symbol(self, security_id: str) -> str:

0 commit comments

Comments
 (0)