class Tourmaline::GiftInfo

Overview

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

Included Modules

Defined in:

tourmaline/types/api.cr

Constructors

Instance Method Summary

Constructor Detail

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

[View source]
def self.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) #

[View source]

Instance Method Detail

def can_be_upgraded=(can_be_upgraded : Bool | Nil) #

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


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

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


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


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


[View source]
def entities : Array(Tourmaline::MessageEntity) #

Optional. Special entities that appear in the text


[View source]
def entities=(entities : Array(Tourmaline::MessageEntity)) #

Optional. Special entities that appear in the text


[View source]
def gift : Tourmaline::Gift #

Information about the gift


[View source]
def gift=(gift : Tourmaline::Gift) #

Information about the gift


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


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


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

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


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

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


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


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


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

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


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


[View source]
def text : String | Nil #

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


[View source]
def text=(text : String | Nil) #

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


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

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


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

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


[View source]