@@ -11025,3 +11025,66 @@ def de_json(cls, json_string):
1102511025 obj = cls .check_json (json_string )
1102611026 return cls (** obj )
1102711027
11028+
11029+ class Gift (JsonDeserializable ):
11030+ """
11031+ This object represents a gift that can be sent by the bot.
11032+
11033+ Telegram documentation: https://core.telegram.org/bots/api#gift
11034+
11035+ :param id: Unique identifier of the gift
11036+ :type id: :obj:`str`
11037+
11038+ :param sticker: The sticker that represents the gift
11039+ :type sticker: :class:`Sticker`
11040+
11041+ :param star_count: The number of Telegram Stars that must be paid to send the sticker
11042+ :type star_count: :obj:`int`
11043+
11044+ :param total_count: Optional. The total number of the gifts of this type that can be sent; for limited gifts only
11045+ :type total_count: :obj:`int`
11046+
11047+ :param remaining_count: Optional. The number of remaining gifts of this type that can be sent; for limited gifts only
11048+ :type remaining_count: :obj:`int`
11049+
11050+ :return: Instance of the class
11051+ :rtype: :class:`Gift`
11052+ """
11053+
11054+ def __init__ (self , id , sticker , star_count , total_count = None , remaining_count = None , ** kwargs ):
11055+ self .id : str = id
11056+ self .sticker : Sticker = sticker
11057+ self .star_count : int = star_count
11058+ self .total_count : Optional [int ] = total_count
11059+ self .remaining_count : Optional [int ] = remaining_count
11060+
11061+ @classmethod
11062+ def de_json (cls , json_string ):
11063+ if json_string is None : return None
11064+ obj = cls .check_json (json_string )
11065+ obj ['sticker' ] = Sticker .de_json (obj ['sticker' ])
11066+ return cls (** obj )
11067+
11068+ class Gifts (JsonDeserializable ):
11069+ """
11070+ This object represent a list of gifts.
11071+
11072+ Telegram documentation: https://core.telegram.org/bots/api#gifts
11073+
11074+ :param gifts: The list of gifts
11075+ :type gifts: :obj:`list` of :class:`Gift`
11076+
11077+ :return: Instance of the class
11078+ :rtype: :class:`Gifts`
11079+ """
11080+
11081+ def __init__ (self , gifts , ** kwargs ):
11082+ self .gifts : List [Gift ] = gifts
11083+
11084+ @classmethod
11085+ def de_json (cls , json_string ):
11086+ if json_string is None : return None
11087+ obj = cls .check_json (json_string )
11088+ obj ['gifts' ] = [Gift .de_json (gift ) for gift in obj ['gifts' ]]
11089+ return cls (** obj )
11090+
0 commit comments