telegram.ShippingQuery

class telegram.ShippingQuery(id: str, from_user: telegram.user.User, invoice_payload: str, shipping_address: telegram.payment.shippingaddress.ShippingAddress, bot: Bot = None, **_kwargs)

Bases: telegram.base.TelegramObject

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 id is equal.

Note

In Python from is a reserved word, use from_user instead.

Parameters:
  • id (str) – Unique query identifier.
  • from_user (telegram.User) – User who sent the query.
  • invoice_payload (str) – Bot specified invoice payload.
  • shipping_address (telegram.ShippingAddress) – User specified shipping address.
  • bot (telegram.Bot, optional) – The Bot to use for instance methods.
  • **kwargs (dict) – Arbitrary keyword arguments.
id

Unique query identifier.

Type:str
from_user

User who sent the query.

Type:telegram.User
invoice_payload

Bot specified invoice payload.

Type:str
shipping_address

User specified shipping address.

Type:telegram.ShippingAddress
bot

Optional. The Bot to use for instance methods.

Type:telegram.Bot
answer(ok: bool, shipping_options: List[telegram.payment.shippingoption.ShippingOption] = None, error_message: str = None, timeout: float = None, api_kwargs: Dict[str, Any] = None) → bool

Shortcut for:

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

For the documentation of the arguments, please see telegram.Bot.answer_shipping_query().