Hide navigation sidebar
Hide table of contents sidebar
PTB has undergone significant changes in v20. Please read the documentation carefully and also check out the transition guide in the wiki.
Back to top
Toggle table of contents sidebar

# ShippingQuery

class telegram.ShippingQuery(id, from_user, invoice_payload, shipping_address, *, api_kwargs=None)

  Bases: `telegram.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.

  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`

  Available In

  `telegram.Update.shipping_query`

  async answer(ok, shipping_options=None, error_message=None, *, read_timeout=None, write_timeout=None, connect_timeout=None, pool_timeout=None, api_kwargs=None)

    Shortcut for:

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

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

  classmethod de_json(data, bot)

    See `telegram.TelegramObject.de_json()`.