class Tourmaline::Gift

Overview

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

Included Modules

Defined in:

tourmaline/types/api.cr

Constructors

Instance Method Summary

Constructor Detail

def self.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) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]

Instance Method Detail

def background : Tourmaline::GiftBackground | Nil #

Optional. Background of the gift


[View source]
def background=(background : Tourmaline::GiftBackground | Nil) #

Optional. Background of the gift


[View source]
def has_colors=(has_colors : Bool | Nil) #

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


[View source]
def has_colors? : Bool | Nil #

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


[View source]
def id : String #

Unique identifier of the gift


[View source]
def id=(id : String) #

Unique identifier of the gift


[View source]
def is_premium=(is_premium : Bool | Nil) #

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


[View source]
def is_premium? : Bool | Nil #

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


[View source]
def 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


[View source]
def 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


[View source]
def 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


[View source]
def 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


[View source]
def publisher_chat : Tourmaline::Chat | Nil #

Optional. Information about the chat that published the gift


[View source]
def publisher_chat=(publisher_chat : Tourmaline::Chat | Nil) #

Optional. Information about the chat that published the gift


[View source]
def 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


[View source]
def 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


[View source]
def star_count : Int32 | Int64 #

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


[View source]
def star_count=(star_count : Int32 | Int64) #

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


[View source]
def sticker : Tourmaline::Sticker #

The sticker that represents the gift


[View source]
def sticker=(sticker : Tourmaline::Sticker) #

The sticker that represents the gift


[View source]
def 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


[View source]
def 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


[View source]
def unique_gift_variant_count : Int32 | Int64 | Nil #

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


[View source]
def 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


[View source]
def upgrade_star_count : Int32 | Int64 | Nil #

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


[View source]
def 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


[View source]