Skip to content
Back to top
View this page

# PaidMediaPurchased

class telegram.PaidMediaPurchased(from_user, paid_media_payload, *, api_kwargs=None)

  Bases: `telegram.TelegramObject`

  This object contains information about a paid media purchase.

  Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their `from_user` and `paid_media_payload` are equal.

  Note

  In Python `from` is a reserved word. Use `from_user` instead.

  Available In

  `telegram.Update.purchased_paid_media`

  Added in version 21.6.

  Parameters:

    - from_user (`telegram.User`) – User who purchased the media.

    - paid_media_payload (`str`) – Bot-specified paid media payload.

  from_user

    User who purchased the media.

    Type:

      `telegram.User`

  paid_media_payload

    Bot-specified paid media payload.

    Type:

      `str`

  classmethod de_json(data, bot=None)

    Converts JSON data to a Telegram object.

    Parameters:

      - data (dict[`str`, …]) – The JSON data.

      - bot (`telegram.Bot`, optional) –

        The bot associated with this object. Defaults to `None`, in which case shortcut methods will not be available.

        Changed in version 21.4: `bot` is now optional and defaults to `None`

    Returns:

      The Telegram object.