class
Tourmaline::OwnedGiftRegular
- Tourmaline::OwnedGiftRegular
- Reference
- Object
Overview
Describes a regular gift owned by a user or a chat.
Included Modules
- JSON::Serializable
Defined in:
tourmaline/types/api.crConstructors
- .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)
- .new(pull : JSON::PullParser)
Instance Method Summary
-
#can_be_upgraded=(can_be_upgraded : Bool | Nil)
Optional.
-
#can_be_upgraded? : Bool | Nil
Optional.
-
#convert_star_count : Int32 | Int64 | Nil
Optional.
-
#convert_star_count=(convert_star_count : Int32 | Int64 | Nil)
Optional.
-
#entities : Array(Tourmaline::MessageEntity)
Optional.
-
#entities=(entities : Array(Tourmaline::MessageEntity))
Optional.
-
#gift : Tourmaline::Gift
Information about the regular gift
-
#gift=(gift : Tourmaline::Gift)
Information about the regular gift
-
#is_private=(is_private : Bool | Nil)
Optional.
-
#is_private? : Bool | Nil
Optional.
-
#is_saved=(is_saved : Bool | Nil)
Optional.
-
#is_saved? : Bool | Nil
Optional.
-
#is_upgrade_separate=(is_upgrade_separate : Bool | Nil)
Optional.
-
#is_upgrade_separate? : Bool | Nil
Optional.
-
#owned_gift_id : String | Nil
Optional.
-
#owned_gift_id=(owned_gift_id : String | Nil)
Optional.
-
#prepaid_upgrade_star_count : Int32 | Int64 | Nil
Optional.
-
#prepaid_upgrade_star_count=(prepaid_upgrade_star_count : Int32 | Int64 | Nil)
Optional.
-
#send_date : Time
Date the gift was sent in Unix time
-
#send_date=(send_date : Time)
Date the gift was sent in Unix time
-
#sender_user : Tourmaline::User | Nil
Optional.
-
#sender_user=(sender_user : Tourmaline::User | Nil)
Optional.
-
#text : String | Nil
Optional.
-
#text=(text : String | Nil)
Optional.
-
#type : String
Type of the gift, always "regular"
-
#type=(type : String)
Type of the gift, always "regular"
-
#unique_gift_number : Int32 | Int64 | Nil
Optional.
-
#unique_gift_number=(unique_gift_number : Int32 | Int64 | Nil)
Optional.
-
#was_refunded=(was_refunded : Bool | Nil)
Optional.
-
#was_refunded? : Bool | Nil
Optional.
Constructor Detail
Instance Method Detail
Optional. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only
Optional. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only
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
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
Optional. Special entities that appear in the text
Optional. Special entities that appear in the text
Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them
Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them
Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only
Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only
Optional. True, if the gift's upgrade was purchased after the gift was sent; for gifts received on behalf of business accounts only
Optional. True, if the gift's upgrade was purchased after the gift was sent; for gifts received on behalf of business accounts only
Optional. Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only
Optional. Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only
Optional. Number of Telegram Stars that were paid for the ability to upgrade the gift
Optional. Number of Telegram Stars that were paid for the ability to upgrade the gift
Optional. Sender of the gift if it is a known user
Optional. Unique number reserved for this gift when upgraded. See the number field in UniqueGift
Optional. Unique number reserved for this gift when upgraded. See the number field in UniqueGift
Optional. True, if the gift was refunded and isn't available anymore
Optional. True, if the gift was refunded and isn't available anymore