-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Gift transaction event, map timeline events using customerSupportChat payload when available #184
base: master
Are you sure you want to change the base?
Conversation
…portChat payload when available
@@ -73,6 +73,8 @@ class EventType(Enum): | |||
"SAVINGS_PLAN_INVOICE_CREATED": ConditionalEventType.TRADE_INVOICE, | |||
"benefits_spare_change_execution": ConditionalEventType.TRADE_INVOICE, | |||
"TRADE_INVOICE": ConditionalEventType.TRADE_INVOICE, | |||
# Gifting | |||
"GIFTER_TRANSACTION": PPEventType.TRANSFER_OUT, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not exactly sure yet if this is the right category to assign it to. In the export_transactions
result, it will be labelled as Transfer (Outbound)
.
self.log.warning("Missing timeline event %r for detail: %s", timeline_event_id, json.dumps(response)) | ||
self.skipped_detail += 1 | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that I have a better understanding of this code, I think this code makes more sense than what I introduced in #161.
This PR addresses #183 to process the
timelineDetailV2
object for a TR gift that was sent by the user (I cannot test it the other way around since I have not received a gift on my account).It does so by, instead of relying on the
timelineDetailV2
"id" field, which seems to differ from the corresponding timeline event object in this particular case, but instead to use thecustomerSupportChat
payload'stimelineEventId
if it is available. Overall, this should make the timeline detail processing more robust.I've also started to add type hints on the new code that I introduced here.