class

Tourmaline::OwnedGiftRegular

Inherits JSON::Serializable < Reference < Object

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

Constructors

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)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

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

Source
can_be_upgraded?

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

Source
convert_star_count

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

Source
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

Source
entities

Optional. Special entities that appear in the text

Source
entities=(entities : Array(Tourmaline::MessageEntity))

Optional. Special entities that appear in the text

Source
gift

Information about the regular gift

Source
gift=(gift : Tourmaline::Gift)

Information about the regular gift

Source
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

Source
is_private?

Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them

Source
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

Source
is_saved?

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

Source
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

Source
is_upgrade_separate?

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

Source
owned_gift_id

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

Source
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

Source
prepaid_upgrade_star_count

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

Source
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

Source
send_date

Date the gift was sent in Unix time

Source
send_date=(send_date : Time)

Date the gift was sent in Unix time

Source
sender_user

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

Source
sender_user=(sender_user : Tourmaline::User | Nil)

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

Source
text

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

Source
text=(text : String | Nil)

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

Source
type

Type of the gift, always "regular"

Source
type=(type : String)

Type of the gift, always "regular"

Source
unique_gift_number

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

Source
unique_gift_number=(unique_gift_number : Int32 | Int64 | Nil)

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

Source
was_refunded=(was_refunded : Bool | Nil)

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

Source
was_refunded?

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

Source