Class: MessageMediaConversations::GetAppUserByIdResponse

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/message_media_conversations/models/get_app_user_by_id_response.rb

Overview

GetAppUserByIdResponse Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(id = nil, surname = nil, given_name = nil) ⇒ GetAppUserByIdResponse

Returns a new instance of GetAppUserByIdResponse.



28
29
30
31
32
33
34
# File 'lib/message_media_conversations/models/get_app_user_by_id_response.rb', line 28

def initialize(id = nil,
               surname = nil,
               given_name = nil)
  @id = id
  @surname = surname
  @given_name = given_name
end

Instance Attribute Details

#given_nameString

TODO: Write general description for this method

Returns:



17
18
19
# File 'lib/message_media_conversations/models/get_app_user_by_id_response.rb', line 17

def given_name
  @given_name
end

#idString

TODO: Write general description for this method

Returns:



9
10
11
# File 'lib/message_media_conversations/models/get_app_user_by_id_response.rb', line 9

def id
  @id
end

#surnameString

TODO: Write general description for this method

Returns:



13
14
15
# File 'lib/message_media_conversations/models/get_app_user_by_id_response.rb', line 13

def surname
  @surname
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/message_media_conversations/models/get_app_user_by_id_response.rb', line 37

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  id = hash['id']
  surname = hash['surname']
  given_name = hash['given_name']

  # Create object from extracted values.
  GetAppUserByIdResponse.new(id,
                             surname,
                             given_name)
end

.namesObject

A mapping from model property names to API property names.



20
21
22
23
24
25
26
# File 'lib/message_media_conversations/models/get_app_user_by_id_response.rb', line 20

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['id'] = 'id'
  @_hash['surname'] = 'surname'
  @_hash['given_name'] = 'given_name'
  @_hash
end