Class: Twilio::REST::Video::V1::RecordingContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Video::V1::RecordingContext
- Defined in:
- lib/twilio-ruby/rest/video/v1/recording.rb
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the RecordingInstance.
-
#fetch ⇒ RecordingInstance
Fetch the RecordingInstance.
-
#initialize(version, sid) ⇒ RecordingContext
constructor
Initialize the RecordingContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, sid) ⇒ RecordingContext
Initialize the RecordingContext
170 171 172 173 174 175 176 177 178 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 170 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/Recordings/#{@solution[:sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Delete the RecordingInstance
182 183 184 185 186 187 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 182 def delete headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) @version.delete('DELETE', @uri, headers: headers) end |
#fetch ⇒ RecordingInstance
Fetch the RecordingInstance
192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 192 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) RecordingInstance.new( @version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
214 215 216 217 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 214 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Video.V1.RecordingContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
207 208 209 210 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 207 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Video.V1.RecordingContext #{context}>" end |