Class: Twilio::REST::Voice::V1::ArchivedCallContext

Inherits:
InstanceContext show all
Defined in:
lib/twilio-ruby/rest/voice/v1/archived_call.rb

Overview

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

Instance Method Summary collapse

Constructor Details

#initialize(version, date, sid) ⇒ ArchivedCallContext

Initialize the ArchivedCallContext

Parameters:

  • version (Version)

    Version that contains the resource

  • date (Date)

    The date of the Call in UTC.

  • sid (String)

    The Twilio-provided Call SID that uniquely identifies the Call resource to delete



52
53
54
55
56
57
58
59
60
# File 'lib/twilio-ruby/rest/voice/v1/archived_call.rb', line 52

def initialize(version, date, sid)
    super(version)

    # Path Solution
    @solution = { date: date, sid: sid,  }
    @uri = "/Archives/#{@solution[:date]}/Calls/#{@solution[:sid]}"

    
end

Instance Method Details

#deleteBoolean

Delete the ArchivedCallInstance

Returns:

  • (Boolean)

    True if delete succeeds, false otherwise



64
65
66
67
68
# File 'lib/twilio-ruby/rest/voice/v1/archived_call.rb', line 64

def delete

    
    @version.delete('DELETE', @uri)
end

#inspectObject

Provide a detailed, user friendly representation



80
81
82
83
# File 'lib/twilio-ruby/rest/voice/v1/archived_call.rb', line 80

def inspect
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Voice.V1.ArchivedCallContext #{context}>"
end

#to_sObject

Provide a user friendly representation



73
74
75
76
# File 'lib/twilio-ruby/rest/voice/v1/archived_call.rb', line 73

def to_s
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Voice.V1.ArchivedCallContext #{context}>"
end