Class: Twilio::REST::Voice::V1::ArchivedCallContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Voice::V1::ArchivedCallContext
- Defined in:
- lib/twilio-ruby/rest/voice/v1/archived_call.rb
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the ArchivedCallInstance.
-
#delete_with_metadata ⇒ Boolean
Delete the ArchivedCallInstanceMetadata.
-
#initialize(version, date, sid) ⇒ ArchivedCallContext
constructor
Initialize the ArchivedCallContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, date, sid) ⇒ ArchivedCallContext
Initialize the ArchivedCallContext
51 52 53 54 55 56 57 58 59 60 |
# File 'lib/twilio-ruby/rest/voice/v1/archived_call.rb', line 51 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
#delete ⇒ Boolean
Delete the ArchivedCallInstance
64 65 66 67 68 69 70 71 72 |
# File 'lib/twilio-ruby/rest/voice/v1/archived_call.rb', line 64 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 ArchivedCallInstanceMetadata
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/twilio-ruby/rest/voice/v1/archived_call.rb', line 77 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('DELETE', @uri, headers: headers) archivedCall_instance = ArchivedCallInstance.new( @version, response.body, account_sid: @solution[:account_sid], sid: @solution[:sid], ) ArchivedCallInstanceMetadata.new(@version, archivedCall_instance, response.headers, response.status_code) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
103 104 105 106 |
# File 'lib/twilio-ruby/rest/voice/v1/archived_call.rb', line 103 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Voice.V1.ArchivedCallContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
96 97 98 99 |
# File 'lib/twilio-ruby/rest/voice/v1/archived_call.rb', line 96 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Voice.V1.ArchivedCallContext #{context}>" end |