Skip to content

Commit 730f389

Browse files
authored
Merge pull request #15 from remnawave:development
Add user and HWID device access properties to UserHwidDeviceEventDto
2 parents 327acc7 + 31a189c commit 730f389

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "remnawave"
3-
version = "2.1.19"
3+
version = "2.1.19.post.1"
44
description = "A Python SDK for interacting with the Remnawave API v2.1.19."
55
authors = [
66
{name = "Artem",email = "[email protected]"}

remnawave/models/webhook.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,14 @@ class UserHwidDeviceEventDto(BaseModel):
102102
@classmethod
103103
def build(cls, user: UserDto, hwid_device: HwidUserDeviceDto, event: TUserHwidDevicesEvents):
104104
return cls(data={"user": user, "hwidUserDevice": hwid_device}, event_name=event)
105+
106+
@property
107+
def user(self) -> UserDto:
108+
return self.data["user"]
109+
110+
@property
111+
def hwid_user_device(self) -> HwidUserDeviceDto:
112+
return self.data["hwidUserDevice"]
105113

106114
# ---------------- SERVICE EVENTS ---------------- #
107115

0 commit comments

Comments
 (0)