Class: TD::Types::PremiumGiftCodeInfo

Inherits:
Base
  • Object
show all
Defined in:
lib/tdlib/types/premium_gift_code_info.rb

Overview

Contains information about a Telegram Premium gift code.

Instance Attribute Summary collapse

Method Summary

Methods inherited from Base

#to_hash, #to_json

Instance Attribute Details

#creation_dateInteger

Point in time (Unix timestamp) when the code was created.

Returns:

  • (Integer)

    the current value of creation_date



16
17
18
# File 'lib/tdlib/types/premium_gift_code_info.rb', line 16

def creation_date
  @creation_date
end

#creator_idTD::Types::MessageSender?

Identifier of a chat or a user that created the gift code; may be null if unknown. If null and the code is from MessageContent::PremiumGiftCode message, then creator_id from the message can be used.

Returns:



16
17
18
# File 'lib/tdlib/types/premium_gift_code_info.rb', line 16

def creator_id
  @creator_id
end

#giveaway_message_idInteger

Identifier of the corresponding giveaway message in the creator_id chat; can be 0 or an identifier of a deleted message.

Returns:

  • (Integer)

    the current value of giveaway_message_id



16
17
18
# File 'lib/tdlib/types/premium_gift_code_info.rb', line 16

def giveaway_message_id
  @giveaway_message_id
end

#is_from_giveawayBoolean

True, if the gift code was created for a giveaway.

Returns:

  • (Boolean)

    the current value of is_from_giveaway



16
17
18
# File 'lib/tdlib/types/premium_gift_code_info.rb', line 16

def is_from_giveaway
  @is_from_giveaway
end

#month_countInteger

Number of months the Telegram Premium subscription will be active after code activation.

Returns:

  • (Integer)

    the current value of month_count



16
17
18
# File 'lib/tdlib/types/premium_gift_code_info.rb', line 16

def month_count
  @month_count
end

#use_dateInteger

Point in time (Unix timestamp) when the code was activated; 0 if none.

Returns:

  • (Integer)

    the current value of use_date



16
17
18
# File 'lib/tdlib/types/premium_gift_code_info.rb', line 16

def use_date
  @use_date
end

#user_idInteger

Identifier of a user for which the code was created; 0 if none.

Returns:

  • (Integer)

    the current value of user_id



16
17
18
# File 'lib/tdlib/types/premium_gift_code_info.rb', line 16

def user_id
  @user_id
end