class Twilio::REST::Chat::V2::ServiceContext::ChannelContext::MessagePage

Public Class Methods

new(version, response, solution) click to toggle source

Initialize the MessagePage @param [Version] version Version that contains the resource @param [Response] response Response from the API @param [Hash] solution Path solution for the resource @return [MessagePage] MessagePage

Calls superclass method Twilio::REST::Page::new
    # File lib/twilio-ruby/rest/chat/v2/service/channel/message.rb
183 def initialize(version, response, solution)
184   super(version, response)
185 
186   # Path Solution
187   @solution = solution
188 end

Public Instance Methods

get_instance(payload) click to toggle source

Build an instance of MessageInstance @param [Hash] payload Payload response from the API @return [MessageInstance] MessageInstance

    # File lib/twilio-ruby/rest/chat/v2/service/channel/message.rb
194 def get_instance(payload)
195   MessageInstance.new(
196       @version,
197       payload,
198       service_sid: @solution[:service_sid],
199       channel_sid: @solution[:channel_sid],
200   )
201 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/chat/v2/service/channel/message.rb
205 def to_s
206   '<Twilio.Chat.V2.MessagePage>'
207 end