Class: TD::Types::ChatBoostSource::Giveaway

Inherits:
TD::Types::ChatBoostSource show all
Defined in:
lib/tdlib/types/chat_boost_source/giveaway.rb

Overview

The chat created a Telegram Premium giveaway.

Instance Attribute Summary collapse

Method Summary

Methods inherited from Base

#to_hash, #to_json

Instance Attribute Details

#gift_codeTD::Types::String

The created Telegram Premium gift code if it was used by the user or can be claimed by the current user; an empty string otherwise.

Returns:

  • (TD::Types::String)

    the current value of gift_code



11
12
13
# File 'lib/tdlib/types/chat_boost_source/giveaway.rb', line 11

def gift_code
  @gift_code
end

#giveaway_message_idInteger

Identifier of the corresponding giveaway message; can be an identifier of a deleted message.

Returns:

  • (Integer)

    the current value of giveaway_message_id



11
12
13
# File 'lib/tdlib/types/chat_boost_source/giveaway.rb', line 11

def giveaway_message_id
  @giveaway_message_id
end

#is_unclaimedBoolean

True, if the winner for the corresponding Telegram Premium subscription wasn’t chosen, because there were not enough participants.

Returns:

  • (Boolean)

    the current value of is_unclaimed



11
12
13
# File 'lib/tdlib/types/chat_boost_source/giveaway.rb', line 11

def is_unclaimed
  @is_unclaimed
end

#user_idInteger

Identifier of a user that won in the giveaway; 0 if none.

Returns:

  • (Integer)

    the current value of user_id



11
12
13
# File 'lib/tdlib/types/chat_boost_source/giveaway.rb', line 11

def user_id
  @user_id
end