Class: Twilio::REST::Chat::V1::ServiceContext::ChannelContext::MessageListResponse

Inherits:
InstanceListResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/chat/v1/service/channel/message.rb,
lib/twilio-ruby/rest/chat/v1/service/channel/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)


452
453
454
455
456
457
458
# File 'lib/twilio-ruby/rest/chat/v1/service/channel/message.rb', line 452

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



545
546
547
# File 'lib/twilio-ruby/rest/chat/v1/service/channel/message.rb', line 545

def headers
  @headers
end

#messageObject



541
542
543
# File 'lib/twilio-ruby/rest/chat/v1/service/channel/message.rb', line 541

def message
    @message
end

#message_instanceObject



460
461
462
# File 'lib/twilio-ruby/rest/chat/v1/service/channel/message.rb', line 460

def message_instance
    @instance
end

#status_codeObject



549
550
551
# File 'lib/twilio-ruby/rest/chat/v1/service/channel/message.rb', line 549

def status_code
  @status_code
end