Skip to content

Commit

Permalink
[system] make all fields nullable in system update
Browse files Browse the repository at this point in the history
  • Loading branch information
david-lev committed Oct 31, 2023
1 parent e20d95f commit 1f56263
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pywa/types/others.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,19 +463,19 @@ class System:
new_wa_id: New WhatsApp ID for the customer when their phone number is updated.
"""

type: str
body: str
identity: str
wa_id: str
type: str | None
body: str | None
identity: str | None
wa_id: str | None
new_wa_id: str | None

@classmethod
def from_dict(cls, data: dict, _client: WhatsApp) -> System:
return cls(
type=data["type"],
body=data["body"],
identity=data["identity"],
wa_id=data["customer"],
type=data.get("type"),
body=data.get("body"),
identity=data.get("identity"),
wa_id=data.get("customer"),
new_wa_id=data.get("wa_id"),
)

Expand Down

0 comments on commit 1f56263

Please sign in to comment.