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

#amountInteger

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

Returns:

  • (Integer)

    the current value of amount



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

def amount
  @amount
end

#cryptocurrencyTD::Types::String?

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

Returns:

  • (TD::Types::String, nil)

    the current value of cryptocurrency



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

def cryptocurrency
  @cryptocurrency
end

#cryptocurrency_amountInteger

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

Returns:

  • (Integer)

    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

#currencyTD::Types::String

Currency for the paid amount.

Returns:

  • (TD::Types::String)

    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_idInteger

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

Returns:

  • (Integer)

    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_countInteger

Number of months the Telegram Premium subscription will be active.

Returns:

  • (Integer)

    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_idInteger

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

Returns:

  • (Integer)

    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

#stickerTD::Types::Sticker?

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

Returns:



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

def sticker
  @sticker
end