class Twilio::REST::Api::V2010::AccountContext::CallContext::RecordingContext

Public Class Methods

new(version, account_sid, call_sid, sid) click to toggle source

Initialize the RecordingContext @param [Version] version Version that contains the resource @param [String] account_sid The SID of the

{Account}[https://www.twilio.com/docs/iam/api/account] that created the
Recording resource to fetch.

@param [String] call_sid The

{Call}[https://www.twilio.com/docs/voice/api/call-resource] SID of the resource
to fetch.

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

Recording resource to fetch.

@return [RecordingContext] RecordingContext

Calls superclass method Twilio::REST::InstanceContext::new
    # File lib/twilio-ruby/rest/api/v2010/account/call/recording.rb
238 def initialize(version, account_sid, call_sid, sid)
239   super(version)
240 
241   # Path Solution
242   @solution = {account_sid: account_sid, call_sid: call_sid, sid: sid, }
243   @uri = "/Accounts/#{@solution[:account_sid]}/Calls/#{@solution[:call_sid]}/Recordings/#{@solution[:sid]}.json"
244 end

Public Instance Methods

delete() click to toggle source

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

    # File lib/twilio-ruby/rest/api/v2010/account/call/recording.rb
288 def delete
289    @version.delete('DELETE', @uri)
290 end
fetch() click to toggle source

Fetch the RecordingInstance @return [RecordingInstance] Fetched RecordingInstance

    # File lib/twilio-ruby/rest/api/v2010/account/call/recording.rb
273 def fetch
274   payload = @version.fetch('GET', @uri)
275 
276   RecordingInstance.new(
277       @version,
278       payload,
279       account_sid: @solution[:account_sid],
280       call_sid: @solution[:call_sid],
281       sid: @solution[:sid],
282   )
283 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/api/v2010/account/call/recording.rb
301 def inspect
302   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
303   "#<Twilio.Api.V2010.RecordingContext #{context}>"
304 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/api/v2010/account/call/recording.rb
294 def to_s
295   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
296   "#<Twilio.Api.V2010.RecordingContext #{context}>"
297 end
update(status: nil, pause_behavior: :unset) click to toggle source

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/call/recording.rb
256 def update(status: nil, pause_behavior: :unset)
257   data = Twilio::Values.of({'Status' => status, 'PauseBehavior' => pause_behavior, })
258 
259   payload = @version.update('POST', @uri, data: data)
260 
261   RecordingInstance.new(
262       @version,
263       payload,
264       account_sid: @solution[:account_sid],
265       call_sid: @solution[:call_sid],
266       sid: @solution[:sid],
267   )
268 end