Class: Twilio::REST::Conversations::V1::ConversationContext::MessageListResponse

Inherits:
InstanceListResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/conversations/v1/conversation/message.rb,
lib/twilio-ruby/rest/conversations/v1/conversation/message.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, key, limit = :unset) ⇒ MessageListResponse

Returns a new instance of MessageListResponse.

Parameters:

  • instance (Array<MessageInstance>)
  • headers (Hash{String => Object})
  • status_code (Integer)


538
539
540
541
542
543
544
# File 'lib/twilio-ruby/rest/conversations/v1/conversation/message.rb', line 538

def initialize(version, payload, key)
   @message_instance = payload.body[key].map do |data|
    MessageInstance.new(version, data)
   end
   @headers = payload.headers
   @status_code = payload.status_code
end

Instance Method Details

#headersObject



631
632
633
# File 'lib/twilio-ruby/rest/conversations/v1/conversation/message.rb', line 631

def headers
  @headers
end

#messageObject



627
628
629
# File 'lib/twilio-ruby/rest/conversations/v1/conversation/message.rb', line 627

def message
    @message
end

#message_instanceObject



546
547
548
# File 'lib/twilio-ruby/rest/conversations/v1/conversation/message.rb', line 546

def message_instance
    @instance
end

#status_codeObject



635
636
637
# File 'lib/twilio-ruby/rest/conversations/v1/conversation/message.rb', line 635

def status_code
  @status_code
end