class

Tourmaline::Gift

Inherits JSON::Serializable < Reference < Object

This object represents a gift that can be sent by the bot.

Constructors

new(id : String, sticker : Tourmaline::Sticker, star_count : Int32 | Int64, upgrade_star_count : Int32 | Int64 | Nil = nil, is_premium : Bool | Nil = nil, has_colors : Bool | Nil = nil, total_count : Int32 | Int64 | Nil = nil, remaining_count : Int32 | Int64 | Nil = nil, personal_total_count : Int32 | Int64 | Nil = nil, personal_remaining_count : Int32 | Int64 | Nil = nil, background : Tourmaline::GiftBackground | Nil = nil, unique_gift_variant_count : Int32 | Int64 | Nil = nil, publisher_chat : Tourmaline::Chat | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

background

Optional. Background of the gift

Source
background=(background : Tourmaline::GiftBackground | Nil)

Optional. Background of the gift

Source
has_colors=(has_colors : Bool | Nil)

Optional. True, if the gift can be used (after being upgraded) to customize a user's appearance

Source
has_colors?

Optional. True, if the gift can be used (after being upgraded) to customize a user's appearance

Source
id

Unique identifier of the gift

Source
id=(id : String)

Unique identifier of the gift

Source
is_premium=(is_premium : Bool | Nil)

Optional. True, if the gift can only be purchased by Telegram Premium subscribers

Source
is_premium?

Optional. True, if the gift can only be purchased by Telegram Premium subscribers

Source
personal_remaining_count

Optional. The number of remaining gifts of this type that can be sent by the bot; for limited gifts only

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

Optional. The number of remaining gifts of this type that can be sent by the bot; for limited gifts only

Source
personal_total_count

Optional. The total number of gifts of this type that can be sent by the bot; for limited gifts only

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

Optional. The total number of gifts of this type that can be sent by the bot; for limited gifts only

Source
publisher_chat

Optional. Information about the chat that published the gift

Source
publisher_chat=(publisher_chat : Tourmaline::Chat | Nil)

Optional. Information about the chat that published the gift

Source
remaining_count

Optional. The number of remaining gifts of this type that can be sent by all users; for limited gifts only

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

Optional. The number of remaining gifts of this type that can be sent by all users; for limited gifts only

Source
star_count

The number of Telegram Stars that must be paid to send the sticker

Source
star_count=(star_count : Int32 | Int64)

The number of Telegram Stars that must be paid to send the sticker

Source
sticker

The sticker that represents the gift

Source
sticker=(sticker : Tourmaline::Sticker)

The sticker that represents the gift

Source
total_count

Optional. The total number of gifts of this type that can be sent by all users; for limited gifts only

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

Optional. The total number of gifts of this type that can be sent by all users; for limited gifts only

Source
unique_gift_variant_count

Optional. The total number of different unique gifts that can be obtained by upgrading the gift

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

Optional. The total number of different unique gifts that can be obtained by upgrading the gift

Source
upgrade_star_count

Optional. The number of Telegram Stars that must be paid to upgrade the gift to a unique one

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

Optional. The number of Telegram Stars that must be paid to upgrade the gift to a unique one

Source