Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# RevenueWithdrawalStateFailed

class telegram.RevenueWithdrawalStateFailed(*, api_kwargs=None)

  Bases: `telegram.RevenueWithdrawalState`

  The withdrawal failed and the transaction was refunded.

  Available In

  `telegram.TransactionPartnerFragment.withdrawal_state`

  Added in version 21.4.

  type

    The type of the state, always `'failed'`.

    Type:

      `str`

  FAILED = 'failed'

    `telegram.constants.RevenueWithdrawalStateType.FAILED`

  PENDING = 'pending'

    `telegram.constants.RevenueWithdrawalStateType.PENDING`

  SUCCEEDED = 'succeeded'

    `telegram.constants.RevenueWithdrawalStateType.SUCCEEDED`

  classmethod de_json(data, bot=None)

    Converts JSON data to the appropriate `RevenueWithdrawalState` object, i.e. takes care of selecting the correct subclass.

    Parameters:

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

      - bot (`telegram.Bot`) – The bot associated with this object.

    Returns:

      The Telegram object.