class Twilio::REST::Api::V2010::AccountContext::ConferenceContext::RecordingInstance
Public Class Methods
Initialize the RecordingInstance
@param [Version] version Version
that contains the resource @param [Hash] payload payload that contains response from Twilio
@param [String] account_sid
The SID of the
{Account}[https://www.twilio.com/docs/iam/api/account] that created the Conference Recording resource.
@param [String] conference_sid
The Conference SID that identifies the conference
associated with the recording.
@param [String] sid The Twilio-provided string that uniquely identifies the
Conference Recording resource to fetch.
@return [RecordingInstance] RecordingInstance
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb 271 def initialize(version, payload, account_sid: nil, conference_sid: nil, sid: nil) 272 super(version) 273 274 # Marshaled Properties 275 @properties = { 276 'account_sid' => payload['account_sid'], 277 'api_version' => payload['api_version'], 278 'call_sid' => payload['call_sid'], 279 'conference_sid' => payload['conference_sid'], 280 'date_created' => Twilio.deserialize_rfc2822(payload['date_created']), 281 'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']), 282 'start_time' => Twilio.deserialize_rfc2822(payload['start_time']), 283 'duration' => payload['duration'], 284 'sid' => payload['sid'], 285 'price' => payload['price'], 286 'price_unit' => payload['price_unit'], 287 'status' => payload['status'], 288 'channels' => payload['channels'].to_i, 289 'source' => payload['source'], 290 'error_code' => payload['error_code'] == nil ? payload['error_code'] : payload['error_code'].to_i, 291 'encryption_details' => payload['encryption_details'], 292 'uri' => payload['uri'], 293 } 294 295 # Context 296 @instance_context = nil 297 @params = { 298 'account_sid' => account_sid, 299 'conference_sid' => conference_sid, 300 'sid' => sid || @properties['sid'], 301 } 302 end
Public Instance Methods
@return [String] The SID of the Account that created the resource
# File lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb 322 def account_sid 323 @properties['account_sid'] 324 end
@return [String] The API version used to create the recording
# File lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb 328 def api_version 329 @properties['api_version'] 330 end
@return [String] The SID of the Call the resource is associated with
# File lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb 334 def call_sid 335 @properties['call_sid'] 336 end
@return [String] The number of channels in the final recording file as an integer
# File lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb 394 def channels 395 @properties['channels'] 396 end
@return [String] The Conference SID that identifies the conference associated with the recording
# File lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb 340 def conference_sid 341 @properties['conference_sid'] 342 end
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [RecordingContext] RecordingContext
for this RecordingInstance
# File lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb 308 def context 309 unless @instance_context 310 @instance_context = RecordingContext.new( 311 @version, 312 @params['account_sid'], 313 @params['conference_sid'], 314 @params['sid'], 315 ) 316 end 317 @instance_context 318 end
@return [Time] The RFC 2822 date and time in GMT that the resource was created
# File lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb 346 def date_created 347 @properties['date_created'] 348 end
@return [Time] The RFC 2822 date and time in GMT that the resource was last updated
# File lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb 352 def date_updated 353 @properties['date_updated'] 354 end
Delete the RecordingInstance
@return [Boolean] true if delete succeeds, false otherwise
# File lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb 446 def delete 447 context.delete 448 end
@return [String] The length of the recording in seconds
# File lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb 364 def duration 365 @properties['duration'] 366 end
@return [Hash] How to decrypt the recording.
# File lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb 412 def encryption_details 413 @properties['encryption_details'] 414 end
@return [String] More information about why the recording is missing, if status is `absent`.
# File lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb 406 def error_code 407 @properties['error_code'] 408 end
Fetch the RecordingInstance
@return [RecordingInstance] Fetched RecordingInstance
# File lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb 439 def fetch 440 context.fetch 441 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb 459 def inspect 460 values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") 461 "<Twilio.Api.V2010.RecordingInstance #{values}>" 462 end
@return [String] The one-time cost of creating the recording.
# File lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb 376 def price 377 @properties['price'] 378 end
@return [String] The currency used in the price property.
# File lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb 382 def price_unit 383 @properties['price_unit'] 384 end
@return [String] The unique string that identifies the resource
# File lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb 370 def sid 371 @properties['sid'] 372 end
@return [recording.Source] How the recording was created
# File lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb 400 def source 401 @properties['source'] 402 end
@return [Time] The start time of the recording, given in RFC 2822 format
# File lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb 358 def start_time 359 @properties['start_time'] 360 end
@return [recording.Status] The status of the recording
# File lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb 388 def status 389 @properties['status'] 390 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb 452 def to_s 453 values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") 454 "<Twilio.Api.V2010.RecordingInstance #{values}>" 455 end
Update the RecordingInstance
@param [recording.Status] status The new status of the recording. Can be:
`stopped`, `paused`, `in-progress`.
@param [String] pause_behavior Whether to record during a pause. Can be: `skip`
or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`.
@return [RecordingInstance] Updated RecordingInstance
# File lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb 432 def update(status: nil, pause_behavior: :unset) 433 context.update(status: status, pause_behavior: pause_behavior, ) 434 end
@return [String] The URI of the resource, relative to `api.twilio.com`
# File lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb 418 def uri 419 @properties['uri'] 420 end