Class: Twilio::REST::Voice::V1::ArchivedCallInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Voice::V1::ArchivedCallInstance
- 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
-
#context ⇒ ArchivedCallContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date ⇒ Date
Date.
-
#delete ⇒ Boolean
Delete the ArchivedCallInstance.
-
#initialize(version, payload, date: nil, sid: nil) ⇒ ArchivedCallInstance
constructor
Initialize the ArchivedCallInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#sid ⇒ String
Sid.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The absolute URL of the resource.
Constructor Details
#initialize(version, payload, date: nil, sid: nil) ⇒ ArchivedCallInstance
Initialize the ArchivedCallInstance
116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/twilio-ruby/rest/voice/v1/archived_call.rb', line 116 def initialize(version, payload, date: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'date' => Twilio.deserialize_iso8601_date(payload['date']), 'sid' => payload['sid'], 'url' => payload['url'], } # Context @instance_context = nil @params = {'date' => date || @properties['date'], 'sid' => sid || @properties['sid'], } end |
Instance Method Details
#context ⇒ ArchivedCallContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
135 136 137 138 139 140 |
# File 'lib/twilio-ruby/rest/voice/v1/archived_call.rb', line 135 def context unless @instance_context @instance_context = ArchivedCallContext.new(@version, @params['date'], @params['sid'], ) end @instance_context end |
#date ⇒ Date
Returns date.
144 145 146 |
# File 'lib/twilio-ruby/rest/voice/v1/archived_call.rb', line 144 def date @properties['date'] end |
#delete ⇒ Boolean
Delete the ArchivedCallInstance
163 164 165 |
# File 'lib/twilio-ruby/rest/voice/v1/archived_call.rb', line 163 def delete context.delete end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
176 177 178 179 |
# File 'lib/twilio-ruby/rest/voice/v1/archived_call.rb', line 176 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Voice.V1.ArchivedCallInstance #{values}>" end |
#sid ⇒ String
Returns sid.
150 151 152 |
# File 'lib/twilio-ruby/rest/voice/v1/archived_call.rb', line 150 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
169 170 171 172 |
# File 'lib/twilio-ruby/rest/voice/v1/archived_call.rb', line 169 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Voice.V1.ArchivedCallInstance #{values}>" end |
#url ⇒ String
Returns The absolute URL of the resource.
156 157 158 |
# File 'lib/twilio-ruby/rest/voice/v1/archived_call.rb', line 156 def url @properties['url'] end |