peyk.platforms.telegram.types.affiliate_info

Classes

AffiliateInfo([commission_per_mille, ...])

Contains information about the affiliate that received a commission via this transaction.

class peyk.platforms.telegram.types.affiliate_info.AffiliateInfo(commission_per_mille: int = 0, amount: int = 0, nanostar_amount: int | None = None, currency: str = '')[source]

Bases: object

Contains information about the affiliate that received a commission via this transaction.

Variables:
  • commission_per_mille (int) – The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users

  • amount (int) – Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds

  • affiliate_user – The bot or the user that received an affiliate commission if it was received by a bot or a user

  • affiliate_chat – The chat that received an affiliate commission if it was received by a chat

  • nanostar_amount (int | None) – The number of 1/1000000000 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; can be negative for refunds

commission_per_mille: int = 0
amount: int = 0
nanostar_amount: int | None = None
currency: str = ''
classmethod from_dict(data: dict | None) AffiliateInfo | None[source]

Provides the from dict operation for the Telegram integration.

Parameters:

data – Value used by this operation.

Returns:

Result produced by the operation.