class Hamilton::Types::OwnedGiftRegular

Overview

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

Included Modules

Defined in:

types/owned_gift.cr

Constructors

Instance Method Summary

Instance methods inherited from class Reference

==(other : Hamilton::Any) ==

Instance methods inherited from class Object

===(other : Hamilton::Any) ===

Constructor Detail

def self.new(pull : JSON::PullParser) #

def self.new(params) #

def self.new(*, __pull_for_json_serializable pull : JSON::PullParser) #

def self.new(**params) #

Instance Method Detail

def can_be_upgraded : Bool | Nil #

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


def can_be_upgraded=(can_be_upgraded : Bool | Nil) #

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


def convert_star_count : Int32 | Nil #

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.


def convert_star_count=(convert_star_count : Int32 | Nil) #

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.


def entities : Array(Hamilton::Types::MessageEntity) | Nil #

Special entities that appear in the text.


def entities=(entities : Array(Hamilton::Types::MessageEntity) | Nil) #

Special entities that appear in the text.


Information about the regular gift.


def gift=(gift : Hamilton::Types::Gift) #

Information about the regular gift.


def is_private : Bool | Nil #

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


def is_private=(is_private : Bool | Nil) #

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


def is_saved : Bool | Nil #

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


def is_saved=(is_saved : Bool | Nil) #

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


def non_nil_fields : Array(String) #

List of available non-nil fields.


def non_nil_fields=(non_nil_fields : Array(String)) #

List of available non-nil fields.


def owned_gift_id : String | Nil #

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


def owned_gift_id=(owned_gift_id : String | Nil) #

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


def prepaid_upgrade_star_count : Int32 | Nil #

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


def prepaid_upgrade_star_count=(prepaid_upgrade_star_count : Int32 | Nil) #

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


def send_date : Int32 #

Date the gift was sent in Unix time.


def send_date=(send_date : Int32) #

Date the gift was sent in Unix time.


def sender_user : Hamilton::Types::User | Nil #

Sender of the gift if it is a known user.


def sender_user=(sender_user : Hamilton::Types::User | Nil) #

Sender of the gift if it is a known user.


def text : String | Nil #

Text of the message that was added to the gift.


def text=(text : String | Nil) #

Text of the message that was added to the gift.


def type : String #

Type of the gift, always “regular”.


def type=(type : String) #

Type of the gift, always “regular”.


def was_refunded : Bool | Nil #

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


def was_refunded=(was_refunded : Bool | Nil) #

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