TransactionPartnerFragment

class telegram.TransactionPartnerFragment(withdrawal_state=None, *, api_kwargs=None)[source]

Bases: telegram.TransactionPartner

Describes a withdrawal transaction with Fragment.

Added in version 21.4.

Parameters:

withdrawal_state (telegram.RevenueWithdrawalState, optional) – State of the transaction if the transaction is outgoing.

type[source]

The type of the transaction partner, always 'fragment'.

Type:

str

withdrawal_state[source]

Optional. State of the transaction if the transaction is outgoing.

Type:

telegram.RevenueWithdrawalState

FRAGMENT = 'fragment'[source]

telegram.constants.TransactionPartnerType.FRAGMENT

OTHER = 'other'[source]

telegram.constants.TransactionPartnerType.OTHER

TELEGRAM_ADS = 'telegram_ads'[source]

telegram.constants.TransactionPartnerType.TELEGRAM_ADS

USER = 'user'[source]

telegram.constants.TransactionPartnerType.USER

classmethod de_json(data, bot=None)[source]

Converts JSON data to the appropriate TransactionPartner 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.