§
    ¬eîi  ã                   ó~   — d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ erddlmZ  G d	„ d
e¦  «        ZdS )z?This module contains the classes for Telegram Stars affiliates.é    )ÚTYPE_CHECKING)ÚChat)ÚTelegramObject)ÚUser)Úde_json_optional)ÚJSONDict)ÚBotc                   óˆ   ‡ — e Zd ZdZdZ	 	 	 dddœdededdd	d
dedz  dedz  ddfˆ fd„Zeddedddd fˆ fd„¦   «         Z	ˆ xZ
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_chatÚaffiliate_userÚamountÚcommission_per_milleÚnanostar_amountN©Ú
api_kwargsr   r   r   zUser | Noner   zChat | Noner   r   Úreturnc                ó  •— t          ¦   «                              |¬¦  «         || _        || _        || _        || _        || _        | j        | j        | j        | j        | j        f| _        |                      ¦   «          d S )Nr   )	ÚsuperÚ__init__r   r   r   r   r   Ú	_id_attrsÚ_freeze)Úselfr   r   r   r   r   r   Ú	__class__s          €úi/home/div/.hermes/hermes-agent/venv/lib/python3.11/site-packages/telegram/_payment/stars/affiliateinfo.pyr   zAffiliateInfo.__init__S   s‚   ø€ õ 	‰Œ×Ò JÐÑ/Ô/Ð/Ø+9ˆÔØ+9ˆÔØ)=ˆÔ!Ø!ˆŒØ+:ˆÔð ÔØÔØÔ%ØŒKØÔ ð
ˆŒð 	�Š‰Œˆˆˆó    ÚdataÚbotz
Bot | Nonec                 ó$  •— |                       |¦  «        }t          |                     d¦  «        t          |¦  «        |d<   t          |                     d¦  «        t          |¦  «        |d<   t          ¦   «                              ||¬¦  «        S )z,See :meth:`telegram.TelegramObject.de_json`.r   r   )r   r   )Ú_parse_datar   Úgetr   r   r   Úde_json)Úclsr   r   r   s      €r   r"   zAffiliateInfo.de_jsonm   sz   ø€ ð �Š˜tÑ$Ô$ˆå!1°$·(²(Ð;KÑ2LÔ2LÍdÐTWÑ!XÔ!XˆÐÑÝ!1°$·(²(Ð;KÑ2LÔ2LÍdÐTWÑ!XÔ!XˆÐÑå‰wŒw�Š D¨cˆÑ2Ô2Ð2r   )NNN)N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__Úintr   r   Úclassmethodr"   Ú__classcell__)r   s   @r   r   r   !   sþ   ø€ € € € € ð'ð 'ðR€Ið )-Ø(,Ø&*ðð '+ðð ð à!ðð ðð &ð	ð
 &ðð ˜t™ðð ˜t‘Oðð 
ðð ð ð ð ð ð4 ð3ð 3˜8ð 3¨,ð 3À/ð 3ð 3ð 3ð 3ð 3ñ „[ð3ð 3ð 3ð 3ð 3r   r   N)r'   Útypingr   Útelegram._chatr   Útelegram._telegramobjectr   Útelegram._userr   Útelegram._utils.argumentparsingr   Útelegram._utils.typesr   Útelegramr	   r   © r   r   ú<module>r4      sÒ   ðð& FÐ Eà  Ð  Ð  Ð  Ð  Ð  à Ð Ð Ð Ð Ð Ø 3Ð 3Ð 3Ð 3Ð 3Ð 3Ø Ð Ð Ð Ð Ð Ø <Ð <Ð <Ð <Ð <Ð <Ø *Ð *Ð *Ð *Ð *Ð *àð ØÐÐÐÐÐðT3ð T3ð T3ð T3ð T3�Nñ T3ô T3ð T3ð T3ð T3r   