Skip to content
Back to top
View this page

# RevenueWithdrawalState

class telegram.RevenueWithdrawalState(type, *, api_kwargs=None)

  Bases: `telegram.TelegramObject`

  This object describes the state of a revenue withdrawal operation. Currently, it can be one of:

  - `telegram.RevenueWithdrawalStatePending`

  - `telegram.RevenueWithdrawalStateSucceeded`

  - `telegram.RevenueWithdrawalStateFailed`

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

  Available In

  `telegram.TransactionPartnerFragment.withdrawal_state`

  Added in version 21.4.

  Parameters:

    type (`str`) – The type of the state.

  type

    The type of the state.

    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.