Class: TD::Types::User

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

Overview

Represents a user.

Instance Attribute Summary collapse

Method Summary

Methods inherited from Base

#to_hash, #to_json

Instance Attribute Details

#first_nameTD::Types::String

First name of the user.

Returns:

  • (TD::Types::String)

    the current value of first_name



25
26
27
# File 'lib/tdlib/types/user.rb', line 25

def first_name
  @first_name
end

#have_accessBoolean

If false, the user is inaccessible, and the only information known about the user is inside this class. It can’t be passed to any method except GetUser.

Returns:

  • (Boolean)

    the current value of have_access



25
26
27
# File 'lib/tdlib/types/user.rb', line 25

def have_access
  @have_access
end

#idInteger

User identifier.

Returns:

  • (Integer)

    the current value of id



25
26
27
# File 'lib/tdlib/types/user.rb', line 25

def id
  @id
end

#is_contactBoolean

The user is a contact of the current user.

Returns:

  • (Boolean)

    the current value of is_contact



25
26
27
# File 'lib/tdlib/types/user.rb', line 25

def is_contact
  @is_contact
end

#is_fakeBoolean

True, if many users reported this user as a fake account.

Returns:

  • (Boolean)

    the current value of is_fake



25
26
27
# File 'lib/tdlib/types/user.rb', line 25

def is_fake
  @is_fake
end

#is_mutual_contactBoolean

The user is a contact of the current user and the current user is a contact of the user.

Returns:

  • (Boolean)

    the current value of is_mutual_contact



25
26
27
# File 'lib/tdlib/types/user.rb', line 25

def is_mutual_contact
  @is_mutual_contact
end

#is_scamBoolean

True, if many users reported this user as a scam.

Returns:

  • (Boolean)

    the current value of is_scam



25
26
27
# File 'lib/tdlib/types/user.rb', line 25

def is_scam
  @is_scam
end

#is_supportBoolean

True, if the user is Telegram support account.

Returns:

  • (Boolean)

    the current value of is_support



25
26
27
# File 'lib/tdlib/types/user.rb', line 25

def is_support
  @is_support
end

#is_verifiedBoolean

True, if the user is verified.

Returns:

  • (Boolean)

    the current value of is_verified



25
26
27
# File 'lib/tdlib/types/user.rb', line 25

def is_verified
  @is_verified
end

#language_codeTD::Types::String

IETF language tag of the user’s language; only available to bots.

Returns:

  • (TD::Types::String)

    the current value of language_code



25
26
27
# File 'lib/tdlib/types/user.rb', line 25

def language_code
  @language_code
end

#last_nameTD::Types::String

Last name of the user.

Returns:

  • (TD::Types::String)

    the current value of last_name



25
26
27
# File 'lib/tdlib/types/user.rb', line 25

def last_name
  @last_name
end

#phone_numberTD::Types::String

Phone number of the user.

Returns:

  • (TD::Types::String)

    the current value of phone_number



25
26
27
# File 'lib/tdlib/types/user.rb', line 25

def phone_number
  @phone_number
end

#profile_photoTD::Types::ProfilePhoto?

Profile photo of the user; may be null.

Returns:



25
26
27
# File 'lib/tdlib/types/user.rb', line 25

def profile_photo
  @profile_photo
end

#restriction_reasonTD::Types::String

If non-empty, it contains a human-readable description of the reason why access to this user must be restricted.

Returns:

  • (TD::Types::String)

    the current value of restriction_reason



25
26
27
# File 'lib/tdlib/types/user.rb', line 25

def restriction_reason
  @restriction_reason
end

#statusTD::Types::UserStatus

Current online status of the user.

Returns:



25
26
27
# File 'lib/tdlib/types/user.rb', line 25

def status
  @status
end

#typeTD::Types::UserType

Type of the user.

Returns:



25
26
27
# File 'lib/tdlib/types/user.rb', line 25

def type
  @type
end

#usernameTD::Types::String

Username of the user.

Returns:

  • (TD::Types::String)

    the current value of username



25
26
27
# File 'lib/tdlib/types/user.rb', line 25

def username
  @username
end