Skip to content

Conversation

@NiklasRosenstein
Copy link
Collaborator

@NiklasRosenstein NiklasRosenstein commented Feb 11, 2025

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 the customerSupportChat payload's timelineEventId 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.

@NiklasRosenstein NiklasRosenstein added the enhancement New feature or request label Feb 11, 2025
"benefits_spare_change_execution": ConditionalEventType.TRADE_INVOICE,
"TRADE_INVOICE": ConditionalEventType.TRADE_INVOICE,
# Gifting
"GIFTER_TRANSACTION": PPEventType.TRANSFER_OUT,
Copy link
Collaborator Author

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).

Comment on lines +139 to +141
self.log.warning("Missing timeline event %r for detail: %s", timeline_event_id, json.dumps(response))
self.skipped_detail += 1
return
Copy link
Collaborator Author

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.

@NiklasRosenstein NiklasRosenstein linked an issue Feb 11, 2025 that may be closed by this pull request
@NiklasRosenstein NiklasRosenstein added the help wanted Extra attention is needed label Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include Gift event in transaction

2 participants