mirror of
https://github.com/EvolutionAPI/evolution-client-python.git
synced 2025-12-22 05:12:19 -06:00
adjusts in package
This commit is contained in:
21
build/lib/evolutionapi/models/label.py
Normal file
21
build/lib/evolutionapi/models/label.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from typing import Literal
|
||||
|
||||
class BaseLabel:
|
||||
def __init__(self, **kwargs):
|
||||
self.__dict__.update({k: v for k, v in kwargs.items() if v is not None})
|
||||
|
||||
class HandleLabel(BaseLabel):
|
||||
def __init__(
|
||||
self,
|
||||
number: str,
|
||||
label_id: str,
|
||||
action: Literal["add", "remove"]
|
||||
):
|
||||
if action not in ["add", "remove"]:
|
||||
raise ValueError("action deve ser 'add' ou 'remove'")
|
||||
|
||||
super().__init__(
|
||||
number=number,
|
||||
labelId=label_id,
|
||||
action=action
|
||||
)
|
||||
Reference in New Issue
Block a user