class Tourmaline::OwnedGiftRegular

Overview

Describes a regular gift owned by a user or a chat.

Included Modules

Defined in:

tourmaline/types/api.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(type : String, gift : Tourmaline::Gift, send_date : Time, owned_gift_id : String | Nil = nil, sender_user : Tourmaline::User | Nil = nil, text : String | Nil = nil, entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity, is_private : Bool | Nil = nil, is_saved : Bool | Nil = nil, can_be_upgraded : Bool | Nil = nil, was_refunded : Bool | Nil = nil, convert_star_count : Int32 | Int64 | Nil = nil, prepaid_upgrade_star_count : Int32 | Int64 | Nil = nil, is_upgrade_separate : Bool | Nil = nil, unique_gift_number : Int32 | Int64 | Nil = nil) #

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

[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; for gifts received on behalf of business accounts only


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

Optional. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only


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

Optional. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars; for gifts received on behalf of business accounts only


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

Optional. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars; for gifts received on behalf of business accounts only


[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 regular gift


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

Information about the regular 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_saved=(is_saved : Bool | Nil) #

Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only


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

Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only


[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; for gifts received on behalf of business accounts only


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

Optional. True, if the gift's upgrade was purchased after the gift was sent; for gifts received on behalf of business accounts only


[View source]
def owned_gift_id : String | Nil #

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


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

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


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

Optional. Number of Telegram Stars that were paid 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 paid for the ability to upgrade the gift


[View source]
def send_date : Time #

Date the gift was sent in Unix time


[View source]
def send_date=(send_date : Time) #

Date the gift was sent in Unix time


[View source]
def sender_user : Tourmaline::User | Nil #

Optional. Sender of the gift if it is a known user


[View source]
def sender_user=(sender_user : Tourmaline::User | Nil) #

Optional. Sender of the gift if it is a known user


[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 type : String #

Type of the gift, always "regular"


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

Type of the gift, always "regular"


[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]
def was_refunded=(was_refunded : Bool | Nil) #

Optional. True, if the gift was refunded and isn't available anymore


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

Optional. True, if the gift was refunded and isn't available anymore


[View source]