class Tourmaline::UniqueGiftInfo

Overview

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

Included Modules

Defined in:

tourmaline/types/api.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(gift : Tourmaline::UniqueGift, origin : String, last_resale_currency : String | Nil = nil, last_resale_amount : Int32 | Int64 | Nil = nil, owned_gift_id : String | 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

Information about the gift


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

Information about the gift


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

Optional. For gifts bought from other users, the price paid for the gift in either Telegram Stars or nanotoncoins


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

Optional. For gifts bought from other users, the price paid for the gift in either Telegram Stars or nanotoncoins


[View source]
def last_resale_currency : String | Nil #

Optional. For gifts bought from other users, the currency in which the payment for the gift was done. Currently, one of "XTR" for Telegram Stars or "TON" for toncoins.


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

Optional. For gifts bought from other users, the currency in which the payment for the gift was done. Currently, one of "XTR" for Telegram Stars or "TON" for toncoins.


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

Origin of the gift. Currently, either "upgrade" for gifts upgraded from regular gifts, "transfer" for gifts transferred from other users or channels, "resale" for gifts bought from other users, "gifted_upgrade" for upgrades purchased after the gift was sent, or "offer" for gifts bought or sold through gift purchase offers


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

Origin of the gift. Currently, either "upgrade" for gifts upgraded from regular gifts, "transfer" for gifts transferred from other users or channels, "resale" for gifts bought from other users, "gifted_upgrade" for upgrades purchased after the gift was sent, or "offer" for gifts bought or sold through gift purchase offers


[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 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]