diff --git a/pytr/event.py b/pytr/event.py index 0b18f40..5d54e8c 100644 --- a/pytr/event.py +++ b/pytr/event.py @@ -237,6 +237,7 @@ class PPEventType(EventType): "TRADING_ORDER_EXPIRED", "TRADING_ORDER_REJECTED", "TRADING_SAVINGSPLAN_EXECUTION_FAILED", + "TRADING_SAVINGSPLAN_EXECUTION_PENDING", "VERIFICATION_TRANSFER_ACCEPTED", "YEAR_END_TAX_REPORT", ] @@ -506,7 +507,7 @@ def from_dict(cls, event_dict: Dict[Any, Any]): break # If still no event type, try to deduce it from the overview section - if event_type is None and uebersicht_dict: + if event_type is None and uebersicht_dict and eventTypeStr not in events_known_ignored: for item in uebersicht_dict.get("data", []): ititle = item.get("title") if ititle in ["Kartenzahlung", "Zahlung"]: @@ -527,7 +528,7 @@ def from_dict(cls, event_dict: Dict[Any, Any]): event_type = PPEventType.DIVIDEND # If still no event type, try to deduce it from the sections - if event_type is None and sections: + if event_type is None and sections and eventTypeStr not in events_known_ignored: for item in sections: ititle = item.get("title") if ititle is None: diff --git a/tests/events/trading_savingsplan_execution_pending.json b/tests/events/trading_savingsplan_execution_pending.json new file mode 100644 index 0000000..d6d6207 --- /dev/null +++ b/tests/events/trading_savingsplan_execution_pending.json @@ -0,0 +1,143 @@ +{ + "id": "be638bf9-7bd9-400a-b401-548571f72f23", + "timestamp": "2026-09-16T01:05:56.903+0000", + "title": "Enovix", + "icon": "logos/US2935941078/v2", + "avatar": { + "asset": "logos/US2935941078/v2", + "badge": null + }, + "badge": null, + "subtitle": "Sparplan ausstehend", + "amount": { + "currency": "EUR", + "value": -20.0, + "fractionDigits": 2 + }, + "subAmount": null, + "status": "EXECUTED", + "action": { + "type": "timelineDetail", + "payload": "be638bf9-7bd9-400a-b401-548571f72f23" + }, + "cashAccountNumber": "123456789", + "hidden": false, + "deleted": false, + "eventType": "TRADING_SAVINGSPLAN_EXECUTION_PENDING", + "presentation": null, + "source": "timelineTransaction", + "details": { + "id": "be638bf9-7bd9-400a-b401-548571f72f23", + "sections": [ + { + "title": "Du sparst 20,00€", + "data": { + "icon": { + "asset": "logos/US2935941078/v2", + "badge": null + }, + "subtitleText": "16 Sept. · 01:05", + "status": "executed" + }, + "action": { + "payload": "US2935941078", + "type": "instrumentDetail" + }, + "type": "header" + }, + { + "title": "Für heute geplant", + "description": "Dein Sparplan ist derzeit in Bearbeitung und soll heute abgeschlossen werden. Bitte warte bis zum Ende des Tages.", + "type": "banner" + }, + { + "title": "Übersicht", + "data": [ + { + "title": "Sparplan", + "detail": { + "text": "Ausstehend", + "functionalStyle": "PENDING", + "type": "status" + }, + "style": "plain" + }, + { + "title": "Zahlung", + "detail": { + "text": "Cash", + "icon": "logos/bank_traderepublic/v2", + "type": "iconWithText" + }, + "style": "plain" + }, + { + "title": "Asset", + "detail": { + "text": "Enovix", + "displayValue": { + "text": "Enovix", + "textDataSensitivity": "PUBLIC" + }, + "type": "text" + }, + "style": "plain" + }, + { + "title": "Gebühr", + "detail": { + "text": "Kostenlos", + "displayValue": { + "text": "Kostenlos", + "textDataSensitivity": "PUBLIC" + }, + "type": "text" + }, + "style": "plain" + }, + { + "title": "Summe", + "detail": { + "text": "20,00€", + "displayValue": { + "text": "20,00€", + "textDataSensitivity": "PUBLIC" + }, + "type": "text" + }, + "style": "plain" + } + ], + "type": "table" + }, + { + "title": "Sparplan", + "data": [ + { + "title": "", + "detail": { + "title": "Enovix", + "timestamp": "2026-09-16T01:05:56.903723487Z", + "amount": "20,00€", + "icon": { + "asset": "logos/US2935941078/v2", + "badge": null + }, + "status": "executed", + "action": { + "payload": { + "savingsPlanId": "fcb4bfbb-6159-4a74-b73f-b0282a86d567" + }, + "type": "openSavingsPlanOverview" + }, + "subtitle": "Wöchentlich", + "type": "embeddedTimelineItem" + }, + "style": "plain" + } + ], + "type": "table" + } + ] + } +} diff --git a/tests/test_events.py b/tests/test_events.py index 11bc668..8743c81 100644 --- a/tests/test_events.py +++ b/tests/test_events.py @@ -2662,6 +2662,10 @@ } ], }, + { + "filename": "trading_savingsplan_execution_pending.json", + "event_type": None, + }, { "filename": "vorabpauschale_negative.json", "event_type": PPEventType.TAXES,