Class: Twilio::REST::Fax::V1::FaxContext::FaxMediaContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Fax::V1::FaxContext::FaxMediaContext
- Defined in:
- lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the FaxMediaInstance.
-
#fetch ⇒ FaxMediaInstance
Fetch the FaxMediaInstance.
-
#initialize(version, fax_sid, sid) ⇒ FaxMediaContext
constructor
Initialize the FaxMediaContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, fax_sid, sid) ⇒ FaxMediaContext
Initialize the FaxMediaContext
159 160 161 162 163 164 165 |
# File 'lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb', line 159 def initialize(version, fax_sid, sid) super(version) # Path Solution @solution = {fax_sid: fax_sid, sid: sid, } @uri = "/Faxes/#{@solution[:fax_sid]}/Media/#{@solution[:sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Delete the FaxMediaInstance
179 180 181 |
# File 'lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb', line 179 def delete @version.delete('DELETE', @uri) end |
#fetch ⇒ FaxMediaInstance
Fetch the FaxMediaInstance
170 171 172 173 174 |
# File 'lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb', line 170 def fetch payload = @version.fetch('GET', @uri) FaxMediaInstance.new(@version, payload, fax_sid: @solution[:fax_sid], sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
192 193 194 195 |
# File 'lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb', line 192 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Fax.V1.FaxMediaContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
185 186 187 188 |
# File 'lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb', line 185 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Fax.V1.FaxMediaContext #{context}>" end |