passport_phone.py 631 B

123456789101112131415161718192021222324
  1. from typing import TYPE_CHECKING, Optional
  2. from yandex_music import YandexMusicModel
  3. from yandex_music.utils import model
  4. if TYPE_CHECKING:
  5. from yandex_music import ClientType
  6. @model
  7. class PassportPhone(YandexMusicModel):
  8. """Класс, представляющий номер телефона пользователя.
  9. Attributes:
  10. phone (:obj:`str`): Номер телефона.
  11. client (:obj:`yandex_music.Client`, optional): Клиент Yandex Music.
  12. """
  13. phone: str
  14. client: Optional['ClientType'] = None
  15. def __post_init__(self) -> None:
  16. self._id_attrs = (self.phone,)