Class: Twilio::REST::Api::V2010::AccountContext::ConferenceContext::RecordingContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Api::V2010::AccountContext::ConferenceContext::RecordingContext
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the RecordingInstance.
-
#delete_with_metadata ⇒ Boolean
Delete the RecordingInstanceMetadata.
-
#fetch ⇒ RecordingInstance
Fetch the RecordingInstance.
-
#fetch_with_metadata ⇒ RecordingInstance
Fetch the RecordingInstanceMetadata.
-
#initialize(version, account_sid, conference_sid, sid) ⇒ RecordingContext
constructor
Initialize the RecordingContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(status: nil, pause_behavior: :unset) ⇒ RecordingInstance
Update the RecordingInstance.
-
#update_with_metadata(status: nil, pause_behavior: :unset) ⇒ RecordingInstance
Update the RecordingInstanceMetadata.
Constructor Details
#initialize(version, account_sid, conference_sid, sid) ⇒ RecordingContext
Initialize the RecordingContext
188 189 190 191 192 193 194 195 196 197 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb', line 188 def initialize(version, account_sid, conference_sid, sid) super(version) # Path Solution @solution = { account_sid: account_sid, conference_sid: conference_sid, sid: sid, } @uri = "/Accounts/#{@solution[:account_sid]}/Conferences/#{@solution[:conference_sid]}/Recordings/#{@solution[:sid]}.json" end |
Instance Method Details
#delete ⇒ Boolean
Delete the RecordingInstance
201 202 203 204 205 206 207 208 209 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb', line 201 def delete headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) @version.delete('DELETE', @uri, headers: headers) end |
#delete_with_metadata ⇒ Boolean
Delete the RecordingInstanceMetadata
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb', line 214 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('DELETE', @uri, headers: headers) recording_instance = RecordingInstance.new( @version, response.body, account_sid: @solution[:account_sid], sid: @solution[:sid], ) RecordingInstanceMetadata.new(@version, recording_instance, response.headers, response.status_code) end |
#fetch ⇒ RecordingInstance
Fetch the RecordingInstance
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb', line 233 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) RecordingInstance.new( @version, payload, account_sid: @solution[:account_sid], conference_sid: @solution[:conference_sid], sid: @solution[:sid], ) end |
#fetch_with_metadata ⇒ RecordingInstance
Fetch the RecordingInstanceMetadata
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb', line 254 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('GET', @uri, headers: headers) recording_instance = RecordingInstance.new( @version, response.body, account_sid: @solution[:account_sid], conference_sid: @solution[:conference_sid], sid: @solution[:sid], ) RecordingInstanceMetadata.new( @version, recording_instance, response.headers, response.status_code ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
356 357 358 359 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb', line 356 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Api.V2010.RecordingContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
349 350 351 352 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb', line 349 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Api.V2010.RecordingContext #{context}>" end |
#update(status: nil, pause_behavior: :unset) ⇒ RecordingInstance
Update the RecordingInstance
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb', line 283 def update( status: nil, pause_behavior: :unset ) data = Twilio::Values.of({ 'Status' => status, 'PauseBehavior' => pause_behavior, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.update('POST', @uri, data: data, headers: headers) RecordingInstance.new( @version, payload, account_sid: @solution[:account_sid], conference_sid: @solution[:conference_sid], sid: @solution[:sid], ) end |
#update_with_metadata(status: nil, pause_behavior: :unset) ⇒ RecordingInstance
Update the RecordingInstanceMetadata
314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb', line 314 def ( status: nil, pause_behavior: :unset ) data = Twilio::Values.of({ 'Status' => status, 'PauseBehavior' => pause_behavior, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('POST', @uri, data: data, headers: headers) recording_instance = RecordingInstance.new( @version, response.body, account_sid: @solution[:account_sid], conference_sid: @solution[:conference_sid], sid: @solution[:sid], ) RecordingInstanceMetadata.new( @version, recording_instance, response.headers, response.status_code ) end |