@@ -10394,6 +10394,8 @@ def de_json(cls, json_string):
1039410394 return TransactionPartnerUser .de_json (obj )
1039510395 elif obj ["type" ] == "telegram_ads" :
1039610396 return TransactionPartnerTelegramAds .de_json (obj )
10397+ elif obj ["type" ] == "telegram_api" :
10398+ return TransactionPartnerTelegramApi .de_json (obj )
1039710399 elif obj ["type" ] == "other" :
1039810400 return TransactionPartnerOther .de_json (obj )
1039910401
@@ -10429,6 +10431,33 @@ def de_json(cls, json_string):
1042910431 return cls (** obj )
1043010432
1043110433
10434+ class TransactionPartnerTelegramApi (TransactionPartner ):
10435+ """
10436+ Describes a transaction with payment for paid broadcasting.
10437+
10438+ Telegram documentation: https://core.telegram.org/bots/api#transactionpartnertelegramapi
10439+
10440+ :param type: Type of the transaction partner, always “telegram_api”
10441+ :type type: :obj:`str`
10442+
10443+ :param request_count: The number of successful requests that exceeded regular limits and were therefore billed
10444+ :type request_count: :obj:`int`
10445+
10446+ :return: Instance of the class
10447+ :rtype: :class:`TransactionPartnerTelegramApi`
10448+ """
10449+
10450+ def __init__ (self , type , request_count , ** kwargs ):
10451+ self .type : str = type
10452+ self .request_count : int = request_count
10453+
10454+ @classmethod
10455+ def de_json (cls , json_string ):
10456+ if json_string is None : return None
10457+ obj = cls .check_json (json_string )
10458+ return cls (** obj )
10459+
10460+
1043210461# noinspection PyShadowingBuiltins
1043310462class TransactionPartnerUser (TransactionPartner ):
1043410463 """
0 commit comments