non_auto_renewable.py 736 B

1234567891011121314151617181920212223242526
  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 NonAutoRenewable(YandexMusicModel):
  8. """Класс, представляющий отключённое автопродление.
  9. Attributes:
  10. start (:obj:`str`): Дата начала подписки.
  11. end (:obj:`str`): Дата окончания подписки.
  12. client (:obj:`yandex_music.Client`, optional): Клиент Yandex Music.
  13. """
  14. start: str
  15. end: str
  16. client: Optional['ClientType'] = None
  17. def __post_init__(self) -> None:
  18. self._id_attrs = (self.start, self.end)