class Hamilton::Types::Gift

Overview

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

Included Modules

Defined in:

types/gift.cr

Constructors

Instance Method Summary

Instance methods inherited from class Reference

==(other : Hamilton::Any) ==

Instance methods inherited from class Object

===(other : Hamilton::Any) ===

Constructor Detail

def self.new(pull : JSON::PullParser) #

def self.new(params) #

def self.new(*, __pull_for_json_serializable pull : JSON::PullParser) #

def self.new(**params) #

Instance Method Detail

def background : Hamilton::Types::GiftBackground | Nil #

Background of the gift.


def background=(background : Hamilton::Types::GiftBackground | Nil) #

Background of the gift.


def has_colors : Bool | Nil #

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


def has_colors=(has_colors : Bool | Nil) #

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


def id : String #

Unique identifier of the gift.


def id=(id : String) #

Unique identifier of the gift.


def is_premium : Bool | Nil #

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


def is_premium=(is_premium : Bool | Nil) #

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


def non_nil_fields : Array(String) #

List of available non-nil fields.


def non_nil_fields=(non_nil_fields : Array(String)) #

List of available non-nil fields.


def personal_remaining_count : Int32 | Nil #

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


def personal_remaining_count=(personal_remaining_count : Int32 | Nil) #

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


def personal_total_count : Int32 | Nil #

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


def personal_total_count=(personal_total_count : Int32 | Nil) #

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


def publisher_chat : Hamilton::Types::Chat | Nil #

Information about the chat that published the gift.


def publisher_chat=(publisher_chat : Hamilton::Types::Chat | Nil) #

Information about the chat that published the gift.


def remaining_count : Int32 | Nil #

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


def remaining_count=(remaining_count : Int32 | Nil) #

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


def star_count : Int32 #

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


def star_count=(star_count : Int32) #

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


def sticker : Hamilton::Types::Sticker #

The sticker that represents the gift.


def sticker=(sticker : Hamilton::Types::Sticker) #

The sticker that represents the gift.


def total_count : Int32 | Nil #

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


def total_count=(total_count : Int32 | Nil) #

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


def unique_gift_variant_count : Int32 | Nil #

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


def unique_gift_variant_count=(unique_gift_variant_count : Int32 | Nil) #

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


def upgrade_star_count : Int32 | Nil #

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


def upgrade_star_count=(upgrade_star_count : Int32 | Nil) #

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