Skip to content

Commit 2802121

Browse files
committed
new: transaction description for cash back program
1 parent ecbac2c commit 2802121

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
@@ -598,6 +598,10 @@ def _activity_add_description(self, act):
598598
elif act['type'] == 'CREDIT_CARD' and act['subType'] == 'PAYMENT':
599599
act['description'] = "Credit card payment"
600600

601+
elif act['type'] == 'REIMBURSEMENT' and act['subType'] == 'CASHBACK':
602+
program = "- Visa Infinite" if act['rewardProgram'] == 'CREDIT_CARD_VISA_INFINITE_REWARDS' else ''
603+
act['description'] = f"Cash back {program}".rstrip()
604+
601605
# TODO: Add other types as needed
602606

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

0 commit comments

Comments
 (0)