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

# ShippingOption

class telegram.ShippingOption(id, title, prices, *, api_kwargs=None)

  Bases: `telegram.TelegramObject`

  This object represents one shipping option.

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

  Examples

  Payment Bot

  Parameters:

    - id (`str`) – Shipping option identifier.

    - title (`str`) – Option title.

    - prices (Sequence[`telegram.LabeledPrice`]) –

      List of price portions.

      Changed in version 20.0: Accepts any `collections.abc.Sequence` as input instead of just a list. The input is converted to a tuple.

  id

    Shipping option identifier.

    Type:

      `str`

  title

    Option title.

    Type:

      `str`

  prices

    List of price portions.

    Changed in version 20.0: This attribute is now an immutable tuple.

    Type:

      Tuple[`telegram.LabeledPrice`]

  Use In

  `telegram.Bot.answer_shipping_query()`