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
173 174 175 176 177 178 179 180 181 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 173 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/Recordings/#{@solution[:sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Delete the RecordingInstance
185 186 187 188 189 190 191 192 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 185 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
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 197 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
223 224 225 226 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 223 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Video.V1.RecordingContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
216 217 218 219 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 216 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Video.V1.RecordingContext #{context}>" end |