L i$zdZddlmZmZddlmZddlmZddlm Z ddl m Z ddl m Z erddlmZGd d eZy ) z?This module contains the classes for Telegram Stars affiliates.) TYPE_CHECKINGOptional)Chat)TelegramObject)User)de_json_optional)JSONDict)BotceZdZdZdZ ddddedededd ed d eed eed dffdZe ddededd dffd Z xZ S) AffiliateInfoa Contains information about the affiliate that received a commission via this transaction. Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`affiliate_user`, :attr:`affiliate_chat`, :attr:`commission_per_mille`, :attr:`amount`, and :attr:`nanostar_amount` are equal. .. versionadded:: 21.9 Args: affiliate_user (:class:`telegram.User`, optional): The bot or the user that received an affiliate commission if it was received by a bot or a user affiliate_chat (:class:`telegram.Chat`, optional): The chat that received an affiliate commission if it was received by a chat commission_per_mille (:obj:`int`): The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users amount (:obj:`int`): Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds nanostar_amount (:obj:`int`, optional): The number of :tg-const:`~telegram.constants.Nanostar.VALUE` shares of Telegram Stars received by the affiliate; from :tg-const:`~telegram.constants.NanostarLimit.MIN_AMOUNT` to :tg-const:`~telegram.constants.NanostarLimit.MAX_AMOUNT`; can be negative for refunds Attributes: affiliate_user (:class:`telegram.User`): Optional. The bot or the user that received an affiliate commission if it was received by a bot or a user affiliate_chat (:class:`telegram.Chat`): Optional. The chat that received an affiliate commission if it was received by a chat commission_per_mille (:obj:`int`): The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users amount (:obj:`int`): Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds nanostar_amount (:obj:`int`): Optional. The number of :tg-const:`~telegram.constants.Nanostar.VALUE` shares of Telegram Stars received by the affiliate; from :tg-const:`~telegram.constants.NanostarLimit.MIN_AMOUNT` to :tg-const:`~telegram.constants.NanostarLimit.MAX_AMOUNT`; can be negative for refunds )affiliate_chataffiliate_useramountcommission_per_millenanostar_amountN api_kwargsrrrrr rrrreturnct||||_||_||_||_||_|j|j|j|j |j f|_|jy)Nr) super__init__rr rrr _id_attrs_freeze)selfrrrr rr __class__s k/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/telegram/_payment/stars/affiliateinfo.pyrzAffiliateInfo.__init__Ss} J/.<.<)=!! .=        % % KK    databotr c|j|}t|jdt||d<t|jdt||d<t |||S)z,See :meth:`telegram.TelegramObject.de_json`.rr )rr) _parse_datargetrrrde_json)clsrrrs rr#zAffiliateInfo.de_jsonmsdt$!1$((;K2LdTW!X !1$((;K2LdTW!X wDc22r)NNN)N) __name__ __module__ __qualname____doc__ __slots__intrr r classmethodr# __classcell__)rs@rr r !s'RI,0+/)- *.!!(  !(  "# X& 4383(5/3_33rr N)r(typingrrtelegram._chatrtelegram._telegramobjectrtelegram._userrtelegram._utils.argumentparsingrtelegram._utils.typesr telegramr r rrr5s1&F*3<*T3NT3r