o
    Zzj³  ã                   @   s˜   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 ddlmZ dd	lmZmZ erBdd
lmZ ddlmZ G dd„ deƒZdS )zHThis module contains an object that represents a Telegram ShippingQuery.é    )ÚSequence)ÚTYPE_CHECKING)ÚShippingAddress)ÚTelegramObject)ÚUser)Úde_json_optional)ÚDEFAULT_NONE)ÚJSONDictÚODVInput)ÚBot)ÚShippingOptionc                       sÆ   e Zd ZdZdZddœdedededed	edB f
‡ fd
d„Z	e
ddedddd f‡ fdd„ƒZ		deeeeddœdeded dB dedB dee dee dee dee d	edB defdd„Z‡  ZS )ÚShippingQuerya‘  This object contains information about an incoming shipping query.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`id` is equal.

    Note:
        In Python :keyword:`from` is a reserved word. Use :paramref:`from_user` instead.

    Args:
        id (:obj:`str`): Unique query identifier.
        from_user (:class:`telegram.User`): User who sent the query.
        invoice_payload (:obj:`str`): Bot-specified invoice payload.
        shipping_address (:class:`telegram.ShippingAddress`): User specified shipping address.

    Attributes:
        id (:obj:`str`): Unique query identifier.
        from_user (:class:`telegram.User`): User who sent the query.
        invoice_payload (:obj:`str`): Bot-specified invoice payload.
        shipping_address (:class:`telegram.ShippingAddress`): User specified shipping address.


    )Ú	from_userÚidÚinvoice_payloadÚshipping_addressN©Ú
api_kwargsr   r   r   r   r   c                   s<   t ƒ j|d� || _|| _|| _|| _| jf| _|  ¡  d S )Nr   )ÚsuperÚ__init__r   r   r   r   Ú	_id_attrsÚ_freeze)Úselfr   r   r   r   r   ©Ú	__class__© úZ/var/www/kodo/tsheker/venv/lib/python3.10/site-packages/telegram/_payment/shippingquery.pyr   >   s   	
zShippingQuery.__init__ÚdataÚbotz
Bot | NoneÚreturnc                    sH   |   |¡}t| dd¡t|ƒ|d< t| d¡t|ƒ|d< tƒ j||d�S )z,See :meth:`telegram.TelegramObject.de_json`.ÚfromNr   r   )r   r   )Ú_parse_datar   Úpopr   Úgetr   r   Úde_json)Úclsr   r   r   r   r   r$   Q   s   
ÿzShippingQuery.de_json)Úread_timeoutÚwrite_timeoutÚconnect_timeoutÚpool_timeoutr   ÚokÚshipping_optionsr   Úerror_messager&   r'   r(   r)   c          	      Ã   s*   �|   ¡ j| j||||||||d�	I dH S )záShortcut for::

             await bot.answer_shipping_query(update.shipping_query.id, *args, **kwargs)

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.answer_shipping_query`.

        )	Úshipping_query_idr*   r+   r,   r&   r'   r(   r)   r   N)Úget_botÚanswer_shipping_queryr   )	r   r*   r+   r,   r&   r'   r(   r)   r   r   r   r   Úanswer]   s   €÷zShippingQuery.answer)N)NN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__Ústrr   r   r	   r   Úclassmethodr$   r   Úboolr   r
   Úfloatr0   Ú__classcell__r   r   r   r   r   $   sX    	ùþýüûùüöþ
ýüúùø	÷
öõr   N)r4   Úcollections.abcr   Útypingr   Ú!telegram._payment.shippingaddressr   Útelegram._telegramobjectr   Útelegram._userr   Útelegram._utils.argumentparsingr   Útelegram._utils.defaultvaluer   Útelegram._utils.typesr	   r
   Útelegramr   Ú telegram._payment.shippingoptionr   r   r   r   r   r   Ú<module>   s   