class Twilio::REST::IpMessaging::V1::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/ip_messaging/v1/service/channel/message.rb
147 def initialize(version, response, solution)
148   super(version, response)
149 
150   # Path Solution
151   @solution = solution
152 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/ip_messaging/v1/service/channel/message.rb
158 def get_instance(payload)
159   MessageInstance.new(
160       @version,
161       payload,
162       service_sid: @solution[:service_sid],
163       channel_sid: @solution[:channel_sid],
164   )
165 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb
169 def to_s
170   '<Twilio.IpMessaging.V1.MessagePage>'
171 end