class Twilio::REST::Api::V2010::AccountContext::RecordingInstance

Public Class Methods

new(version, payload, account_sid: nil, sid: nil) click to toggle source

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
Recording resource.

@param [String] sid The Twilio-provided string that uniquely identifies the

Recording resource to fetch.

@return [RecordingInstance] RecordingInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/api/v2010/account/recording.rb
298 def initialize(version, payload, account_sid: nil, sid: nil)
299   super(version)
300 
301   # Marshaled Properties
302   @properties = {
303       'account_sid' => payload['account_sid'],
304       'api_version' => payload['api_version'],
305       'call_sid' => payload['call_sid'],
306       'conference_sid' => payload['conference_sid'],
307       'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
308       'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
309       'start_time' => Twilio.deserialize_rfc2822(payload['start_time']),
310       'duration' => payload['duration'],
311       'sid' => payload['sid'],
312       'price' => payload['price'],
313       'price_unit' => payload['price_unit'],
314       'status' => payload['status'],
315       'channels' => payload['channels'].to_i,
316       'source' => payload['source'],
317       'error_code' => payload['error_code'] == nil ? payload['error_code'] : payload['error_code'].to_i,
318       'uri' => payload['uri'],
319       'encryption_details' => payload['encryption_details'],
320       'subresource_uris' => payload['subresource_uris'],
321   }
322 
323   # Context
324   @instance_context = nil
325   @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'], }
326 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The SID of the Account that created the resource

    # File lib/twilio-ruby/rest/api/v2010/account/recording.rb
341 def account_sid
342   @properties['account_sid']
343 end
add_on_results() click to toggle source

Access the add_on_results @return [add_on_results] add_on_results

    # File lib/twilio-ruby/rest/api/v2010/account/recording.rb
471 def add_on_results
472   context.add_on_results
473 end
api_version() click to toggle source

@return [String] The API version used during the recording.

    # File lib/twilio-ruby/rest/api/v2010/account/recording.rb
347 def api_version
348   @properties['api_version']
349 end
call_sid() click to toggle source

@return [String] The SID of the Call the resource is associated with

    # File lib/twilio-ruby/rest/api/v2010/account/recording.rb
353 def call_sid
354   @properties['call_sid']
355 end
channels() click to toggle source

@return [String] The number of channels in the final recording file as an integer.

    # File lib/twilio-ruby/rest/api/v2010/account/recording.rb
413 def channels
414   @properties['channels']
415 end
conference_sid() click to toggle source

@return [String] The unique ID for the conference associated with the recording.

    # File lib/twilio-ruby/rest/api/v2010/account/recording.rb
359 def conference_sid
360   @properties['conference_sid']
361 end
context() click to toggle source

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/recording.rb
332 def context
333   unless @instance_context
334     @instance_context = RecordingContext.new(@version, @params['account_sid'], @params['sid'], )
335   end
336   @instance_context
337 end
date_created() click to toggle source

@return [Time] The RFC 2822 date and time in GMT that the resource was created

    # File lib/twilio-ruby/rest/api/v2010/account/recording.rb
365 def date_created
366   @properties['date_created']
367 end
date_updated() click to toggle source

@return [Time] The RFC 2822 date and time in GMT that the resource was last updated

    # File lib/twilio-ruby/rest/api/v2010/account/recording.rb
371 def date_updated
372   @properties['date_updated']
373 end
delete() click to toggle source

Delete the RecordingInstance @return [Boolean] true if delete succeeds, false otherwise

    # File lib/twilio-ruby/rest/api/v2010/account/recording.rb
457 def delete
458   context.delete
459 end
duration() click to toggle source

@return [String] The length of the recording in seconds.

    # File lib/twilio-ruby/rest/api/v2010/account/recording.rb
383 def duration
384   @properties['duration']
385 end
encryption_details() click to toggle source

@return [Hash] How to decrypt the recording.

    # File lib/twilio-ruby/rest/api/v2010/account/recording.rb
437 def encryption_details
438   @properties['encryption_details']
439 end
error_code() click to toggle source

@return [String] More information about why the recording is missing, if status is `absent`.

    # File lib/twilio-ruby/rest/api/v2010/account/recording.rb
425 def error_code
426   @properties['error_code']
427 end
fetch() click to toggle source

Fetch the RecordingInstance @return [RecordingInstance] Fetched RecordingInstance

    # File lib/twilio-ruby/rest/api/v2010/account/recording.rb
450 def fetch
451   context.fetch
452 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/api/v2010/account/recording.rb
484 def inspect
485   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
486   "<Twilio.Api.V2010.RecordingInstance #{values}>"
487 end
price() click to toggle source

@return [String] The one-time cost of creating the recording.

    # File lib/twilio-ruby/rest/api/v2010/account/recording.rb
395 def price
396   @properties['price']
397 end
price_unit() click to toggle source

@return [String] The currency used in the price property.

    # File lib/twilio-ruby/rest/api/v2010/account/recording.rb
401 def price_unit
402   @properties['price_unit']
403 end
sid() click to toggle source

@return [String] The unique string that identifies the resource

    # File lib/twilio-ruby/rest/api/v2010/account/recording.rb
389 def sid
390   @properties['sid']
391 end
source() click to toggle source

@return [recording.Source] How the recording was created

    # File lib/twilio-ruby/rest/api/v2010/account/recording.rb
419 def source
420   @properties['source']
421 end
start_time() click to toggle source

@return [Time] The start time of the recording, given in RFC 2822 format

    # File lib/twilio-ruby/rest/api/v2010/account/recording.rb
377 def start_time
378   @properties['start_time']
379 end
status() click to toggle source

@return [recording.Status] The status of the recording.

    # File lib/twilio-ruby/rest/api/v2010/account/recording.rb
407 def status
408   @properties['status']
409 end
subresource_uris() click to toggle source

@return [String] A list of related resources identified by their relative URIs

    # File lib/twilio-ruby/rest/api/v2010/account/recording.rb
443 def subresource_uris
444   @properties['subresource_uris']
445 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/api/v2010/account/recording.rb
477 def to_s
478   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
479   "<Twilio.Api.V2010.RecordingInstance #{values}>"
480 end
transcriptions() click to toggle source

Access the transcriptions @return [transcriptions] transcriptions

    # File lib/twilio-ruby/rest/api/v2010/account/recording.rb
464 def transcriptions
465   context.transcriptions
466 end
uri() click to toggle source

@return [String] The URI of the resource, relative to `api.twilio.com`

    # File lib/twilio-ruby/rest/api/v2010/account/recording.rb
431 def uri
432   @properties['uri']
433 end