Class: MessageMediaConversations::GetAppUserByIdResponse
- Defined in:
- lib/message_media_conversations/models/get_app_user_by_id_response.rb
Overview
GetAppUserByIdResponse Model.
Instance Attribute Summary collapse
-
#given_name ⇒ String
TODO: Write general description for this method.
-
#id ⇒ String
TODO: Write general description for this method.
-
#surname ⇒ String
TODO: Write general description for this method.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
Instance Method Summary collapse
-
#initialize(id = nil, surname = nil, given_name = nil) ⇒ GetAppUserByIdResponse
constructor
A new instance of GetAppUserByIdResponse.
Methods inherited from BaseModel
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_name ⇒ String
TODO: Write general description for this method
17 18 19 |
# File 'lib/message_media_conversations/models/get_app_user_by_id_response.rb', line 17 def given_name @given_name end |
#id ⇒ String
TODO: Write general description for this method
9 10 11 |
# File 'lib/message_media_conversations/models/get_app_user_by_id_response.rb', line 9 def id @id end |
#surname ⇒ String
TODO: Write general description for this method
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 |
.names ⇒ Object
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 |