class Tourmaline::OwnedGiftUnique

Overview

Describes a unique gift received and 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::UniqueGift, send_date : Time, owned_gift_id : String | Nil = nil, sender_user : Tourmaline::User | Nil = nil, is_saved : Bool | Nil = nil, can_be_transferred : Bool | Nil = nil, transfer_star_count : Int32 | Int64 | Nil = nil, next_transfer_date : Int32 | Int64 | Nil = nil) #

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

[View source]

Instance Method Detail

def can_be_transferred=(can_be_transferred : Bool | Nil) #

Optional. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only


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

Optional. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only


[View source]

Information about the unique gift


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

Information about the unique gift


[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 next_transfer_date : Time | Nil #

Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now


[View source]
def next_transfer_date=(next_transfer_date : Time | Nil) #

Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now


[View source]
def owned_gift_id : String | Nil #

Optional. Unique identifier of the received 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 received gift for the bot; for gifts received on behalf of business accounts only


[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 transfer_star_count : Int32 | Int64 | Nil #

Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift


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

Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift


[View source]
def type : String #

Type of the gift, always "unique"


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

Type of the gift, always "unique"


[View source]