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
Deletes the FaxMediaInstance.
-
#fetch ⇒ FaxMediaInstance
Fetch a 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
161 162 163 164 165 166 167 |
# File 'lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb', line 161 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
Deletes the FaxMediaInstance
187 188 189 |
# File 'lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb', line 187 def delete @version.delete('delete', @uri) end |
#fetch ⇒ FaxMediaInstance
Fetch a FaxMediaInstance
172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb', line 172 def fetch params = Twilio::Values.of({}) payload = @version.fetch( 'GET', @uri, params, ) FaxMediaInstance.new(@version, payload, fax_sid: @solution[:fax_sid], sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
200 201 202 203 |
# File 'lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb', line 200 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Fax.V1.FaxMediaContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
193 194 195 196 |
# File 'lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb', line 193 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Fax.V1.FaxMediaContext #{context}>" end |