L idZddlmZmZddlmZddlmZddlm Z ddl m Z ddl m Z ddlmZmZerdd lmZGd d eZy ) zKThis module contains an object that represents a Telegram PreCheckoutQuery.) TYPE_CHECKINGOptional) OrderInfo)TelegramObject)User)de_json_optional) DEFAULT_NONE)JSONDictODVInput)BotceZdZdZdZ ddddedededed ed eed ee d ee ffd Z e dde dedddffd Z deeeedddedeedeedeedeedeed ee defdZxZS)PreCheckoutQueryaThis object contains information about an incoming pre-checkout 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. currency (:obj:`str`): Three-letter ISO 4217 currency code, or ``XTR`` for payments in |tg_stars|. total_amount (:obj:`int`): Total price in the smallest units of the currency (integer, **not** float/double). For example, for a price of ``US$ 1.45`` pass ``amount = 145``. See the ``exp`` parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). invoice_payload (:obj:`str`): Bot-specified invoice payload. shipping_option_id (:obj:`str`, optional): Identifier of the shipping option chosen by the user. order_info (:class:`telegram.OrderInfo`, optional): Order info provided by the user. Attributes: id (:obj:`str`): Unique query identifier. from_user (:class:`telegram.User`): User who sent the query. currency (:obj:`str`): Three-letter ISO 4217 currency code, or ``XTR`` for payments in |tg_stars|. total_amount (:obj:`int`): Total price in the smallest units of the currency (integer, **not** float/double). For example, for a price of ``US$ 1.45`` pass ``amount = 145``. See the ``exp`` parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). invoice_payload (:obj:`str`): Bot-specified invoice payload. shipping_option_id (:obj:`str`): Optional. Identifier of the shipping option chosen by the user. order_info (:class:`telegram.OrderInfo`): Optional. Order info provided by the user. )currency from_useridinvoice_payload order_infoshipping_option_id total_amountN api_kwargsrrrrrrrrct ||||_||_||_||_||_||_||_|jf|_ |jy)Nr) super__init__rrrrrrr _id_attrs_freeze) selfrrrrrrrr __class__s h/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/telegram/_payment/precheckoutquery.pyrzPreCheckoutQuery.__init__Xs_ J/(% !-$31C/9'' databotr returnc|j|}t|jddt||d<t|j dt ||d<t |||S)z,See :meth:`telegram.TelegramObject.de_json`.fromNrr)r!r") _parse_datarpoprgetrrde_json)clsr!r"rs rr)zPreCheckoutQuery.de_jsonqsat$,TXXfd-CT3O[-dhh|.DiQTU\wDc22r ) read_timeout write_timeoutconnect_timeout pool_timeoutrok error_messager+r,r-r.c K|jj|j|||||||d{S7w)zShortcut for:: await bot.answer_pre_checkout_query(update.pre_checkout_query.id, *args, **kwargs) For the documentation of the arguments, please see :meth:`telegram.Bot.answer_pre_checkout_query`. )pre_checkout_query_idr/r0r+r,r-r.rN)get_botanswer_pre_checkout_queryr)rr/r0r+r,r-r.rs ranswerzPreCheckoutQuery.answer{sL&\\^=="&'''%'+%!>    s 5><>)NN)N)__name__ __module__ __qualname____doc__ __slots__strrintrrr r classmethodr)r boolr floatr5 __classcell__)rs@rrr"s8)VI"-1*.*.      %SMY'X&2383(5/3EW33(, )5)5+7(4)-   } uo     "% uo X&   r rN)r9typingrrtelegram._payment.orderinfortelegram._telegramobjectrtelegram._userrtelegram._utils.argumentparsingrtelegram._utils.defaultvaluer telegram._utils.typesr r telegramr rr rrJs4&R*13<54u ~u r