Class: MessageMediaConversations::GetFacebookPagesResponse

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

Overview

GetFacebookPagesResponse Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(data = nil) ⇒ GetFacebookPagesResponse

Returns a new instance of GetFacebookPagesResponse.



18
19
20
# File 'lib/message_media_conversations/models/get_facebook_pages_response.rb', line 18

def initialize(data = nil)
  @data = data
end

Instance Attribute Details

#dataList of Object

TODO: Write general description for this method

Returns:

  • (List of Object)


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

def data
  @data
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



23
24
25
26
27
28
29
30
31
# File 'lib/message_media_conversations/models/get_facebook_pages_response.rb', line 23

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  data = hash['data']

  # Create object from extracted values.
  GetFacebookPagesResponse.new(data)
end

.namesObject

A mapping from model property names to API property names.



12
13
14
15
16
# File 'lib/message_media_conversations/models/get_facebook_pages_response.rb', line 12

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