class Twilio::REST::Api::V2010::AccountContext::MessageContext::MediaPage

Public Class Methods

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

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

Calls superclass method Twilio::REST::Page::new
    # File lib/twilio-ruby/rest/api/v2010/account/message/media.rb
150 def initialize(version, response, solution)
151   super(version, response)
152 
153   # Path Solution
154   @solution = solution
155 end

Public Instance Methods

get_instance(payload) click to toggle source

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

    # File lib/twilio-ruby/rest/api/v2010/account/message/media.rb
161 def get_instance(payload)
162   MediaInstance.new(
163       @version,
164       payload,
165       account_sid: @solution[:account_sid],
166       message_sid: @solution[:message_sid],
167   )
168 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/api/v2010/account/message/media.rb
172 def to_s
173   '<Twilio.Api.V2010.MediaPage>'
174 end