Class: TD::Types::MessageContent::PremiumGiftCode

Inherits:
TD::Types::MessageContent show all
Defined in:
lib/tdlib/types/message_content/premium_gift_code.rb

Overview

A Telegram Premium gift code was created for the user.

Instance Attribute Summary collapse

Method Summary

Methods inherited from Base

#to_hash, #to_json

Instance Attribute Details

#amountInteger

The paid amount, in the smallest units of the currency; 0 if unknown.



17
18
19
# File 'lib/tdlib/types/message_content/premium_gift_code.rb', line 17

def amount
  @amount
end

#codeTD::Types::String

The gift code.



17
18
19
# File 'lib/tdlib/types/message_content/premium_gift_code.rb', line 17

def code
  @code
end

#creator_idTD::Types::MessageSender?

Identifier of a chat or a user that created the gift code; may be null if unknown.



17
18
19
# File 'lib/tdlib/types/message_content/premium_gift_code.rb', line 17

def creator_id
  @creator_id
end

#cryptocurrencyTD::Types::String?

Cryptocurrency used to pay for the gift; may be empty if none or unknown.



17
18
19
# File 'lib/tdlib/types/message_content/premium_gift_code.rb', line 17

def cryptocurrency
  @cryptocurrency
end

#cryptocurrency_amountInteger

The paid amount, in the smallest units of the cryptocurrency; 0 if unknown.



17
18
19
# File 'lib/tdlib/types/message_content/premium_gift_code.rb', line 17

def cryptocurrency_amount
  @cryptocurrency_amount
end

#currencyTD::Types::String

Currency for the paid amount; empty if unknown.



17
18
19
# File 'lib/tdlib/types/message_content/premium_gift_code.rb', line 17

def currency
  @currency
end

#is_from_giveawayBoolean

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



17
18
19
# File 'lib/tdlib/types/message_content/premium_gift_code.rb', line 17

def is_from_giveaway
  @is_from_giveaway
end

#is_unclaimedBoolean

True, if the winner for the corresponding Telegram Premium subscription wasn’t chosen.



17
18
19
# File 'lib/tdlib/types/message_content/premium_gift_code.rb', line 17

def is_unclaimed
  @is_unclaimed
end

#month_countInteger

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



17
18
19
# File 'lib/tdlib/types/message_content/premium_gift_code.rb', line 17

def month_count
  @month_count
end

#stickerTD::Types::Sticker?

A sticker to be shown in the message; may be null if unknown.



17
18
19
# File 'lib/tdlib/types/message_content/premium_gift_code.rb', line 17

def sticker
  @sticker
end