class

Tourmaline::GiftInfo

Inherits JSON::Serializable < Reference < Object

Describes a service message about a regular gift that was sent or received.

Constructors

new(gift : Tourmaline::Gift, owned_gift_id : String | Nil = nil, convert_star_count : Int32 | Int64 | Nil = nil, prepaid_upgrade_star_count : Int32 | Int64 | Nil = nil, is_upgrade_separate : Bool | Nil = nil, can_be_upgraded : Bool | Nil = nil, text : String | Nil = nil, entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity, is_private : Bool | Nil = nil, unique_gift_number : Int32 | Int64 | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

can_be_upgraded=(can_be_upgraded : Bool | Nil)

Optional. True, if the gift can be upgraded to a unique gift

Source
can_be_upgraded?

Optional. True, if the gift can be upgraded to a unique gift

Source
convert_star_count

Optional. Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible

Source
convert_star_count=(convert_star_count : Int32 | Int64 | Nil)

Optional. Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible

Source
entities

Optional. Special entities that appear in the text

Source
entities=(entities : Array(Tourmaline::MessageEntity))

Optional. Special entities that appear in the text

Source
gift

Information about the gift

Source
gift=(gift : Tourmaline::Gift)

Information about the gift

Source
is_private=(is_private : Bool | Nil)

Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them

Source
is_private?

Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them

Source
is_upgrade_separate=(is_upgrade_separate : Bool | Nil)

Optional. True, if the gift's upgrade was purchased after the gift was sent

Source
is_upgrade_separate?

Optional. True, if the gift's upgrade was purchased after the gift was sent

Source
owned_gift_id

Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts

Source
owned_gift_id=(owned_gift_id : String | Nil)

Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts

Source
prepaid_upgrade_star_count

Optional. Number of Telegram Stars that were prepaid for the ability to upgrade the gift

Source
prepaid_upgrade_star_count=(prepaid_upgrade_star_count : Int32 | Int64 | Nil)

Optional. Number of Telegram Stars that were prepaid for the ability to upgrade the gift

Source
text

Optional. Text of the message that was added to the gift

Source
text=(text : String | Nil)

Optional. Text of the message that was added to the gift

Source
unique_gift_number

Optional. Unique number reserved for this gift when upgraded. See the number field in UniqueGift

Source
unique_gift_number=(unique_gift_number : Int32 | Int64 | Nil)

Optional. Unique number reserved for this gift when upgraded. See the number field in UniqueGift

Source