class Twilio::REST::Fax::V1::FaxContext::FaxMediaContext
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Public Class Methods
new(version, fax_sid, sid)
click to toggle source
Initialize the FaxMediaContext
@param [Version] version Version
that contains the resource @param [String] fax_sid The SID of the fax with the FaxMedia resource to fetch. @param [String] sid The Twilio-provided string that uniquely identifies the
FaxMedia resource to fetch.
@return [FaxMediaContext] FaxMediaContext
Calls superclass method
Twilio::REST::InstanceContext::new
# File lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb 159 def initialize(version, fax_sid, sid) 160 super(version) 161 162 # Path Solution 163 @solution = {fax_sid: fax_sid, sid: sid, } 164 @uri = "/Faxes/#{@solution[:fax_sid]}/Media/#{@solution[:sid]}" 165 end
Public Instance Methods
delete()
click to toggle source
Delete the FaxMediaInstance
@return [Boolean] true if delete succeeds, false otherwise
# File lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb 179 def delete 180 @version.delete('DELETE', @uri) 181 end
fetch()
click to toggle source
Fetch the FaxMediaInstance
@return [FaxMediaInstance] Fetched FaxMediaInstance
# File lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb 170 def fetch 171 payload = @version.fetch('GET', @uri) 172 173 FaxMediaInstance.new(@version, payload, fax_sid: @solution[:fax_sid], sid: @solution[:sid], ) 174 end
inspect()
click to toggle source
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb 192 def inspect 193 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 194 "#<Twilio.Fax.V1.FaxMediaContext #{context}>" 195 end
to_s()
click to toggle source
Provide a user friendly representation
# File lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb 185 def to_s 186 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 187 "#<Twilio.Fax.V1.FaxMediaContext #{context}>" 188 end