Class: TD::Types::MessageContent::GiftedPremium

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

Overview

Telegram Premium was gifted to a user.

Instance Attribute Summary collapse

Method Summary

Methods inherited from Base

#to_hash, #to_json

Instance Attribute Details

#amount ⇒ Integer

The paid amount, in the smallest units of the currency.

Returns:

  • the current value of amount



14
15
16
# File 'lib/tdlib/types/message_content/gifted_premium.rb', line 14

def amount
  @amount
end

#cryptocurrency ⇒ TD::Types::String?

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

Returns:

  • the current value of cryptocurrency



14
15
16
# File 'lib/tdlib/types/message_content/gifted_premium.rb', line 14

def cryptocurrency
  @cryptocurrency
end

#cryptocurrency_amount ⇒ Integer

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

Returns:

  • the current value of cryptocurrency_amount



14
15
16
# File 'lib/tdlib/types/message_content/gifted_premium.rb', line 14

def cryptocurrency_amount
  @cryptocurrency_amount
end

#currency ⇒ TD::Types::String

Currency for the paid amount.

Returns:

  • the current value of currency



14
15
16
# File 'lib/tdlib/types/message_content/gifted_premium.rb', line 14

def currency
  @currency
end

#gifter_user_id ⇒ Integer

The identifier of a user that gifted Telegram Premium; 0 if the gift was anonymous or is outgoing.

Returns:

  • the current value of gifter_user_id



14
15
16
# File 'lib/tdlib/types/message_content/gifted_premium.rb', line 14

def gifter_user_id
  @gifter_user_id
end

#month_count ⇒ Integer

Number of months the Telegram Premium subscription will be active.

Returns:

  • the current value of month_count



14
15
16
# File 'lib/tdlib/types/message_content/gifted_premium.rb', line 14

def month_count
  @month_count
end

#receiver_user_id ⇒ Integer

The identifier of a user that received Telegram Premium; 0 if the gift is incoming.

Returns:

  • the current value of receiver_user_id



14
15
16
# File 'lib/tdlib/types/message_content/gifted_premium.rb', line 14

def receiver_user_id
  @receiver_user_id
end

#sticker ⇒ TD::Types::Sticker?

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

Returns:

  • the current value of sticker



14
15
16
# File 'lib/tdlib/types/message_content/gifted_premium.rb', line 14

def sticker
  @sticker
end