Class: Twilio::REST::Insights::V1::CallContext::CallSummaryInstance
- Inherits:
-
Twilio::REST::InstanceResource
- Object
- Twilio::REST::InstanceResource
- Twilio::REST::Insights::V1::CallContext::CallSummaryInstance
- Defined in:
- lib/twilio-ruby/rest/insights/v1/call/call_summary.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The unique SID identifier of the Account.
-
#annotation ⇒ Hash
Programmatically labeled annotations for the Call.
- #answered_by ⇒ AnsweredBy
-
#attributes ⇒ Hash
Attributes capturing call-flow-specific details.
-
#call_sid ⇒ String
The unique SID identifier of the Call.
- #call_state ⇒ CallState
- #call_type ⇒ CallType
-
#carrier_edge ⇒ Hash
Contains metrics and properties for the Twilio media gateway of a PSTN call.
-
#client_edge ⇒ Hash
Contains metrics and properties for the Twilio media gateway of a Client call.
-
#connect_duration ⇒ String
Duration between when the call was answered and when it ended.
-
#context ⇒ CallSummaryContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#created_time ⇒ Time
The time at which the Call was created, given in ISO 8601 format.
-
#duration ⇒ String
Duration between when the call was initiated and the call was ended.
-
#end_time ⇒ Time
The time at which the Call was ended, given in ISO 8601 format.
-
#fetch(processing_state: :unset) ⇒ CallSummaryInstance
Fetch the CallSummaryInstance.
-
#from ⇒ Hash
The calling party.
-
#initialize(version, payload, call_sid: nil) ⇒ CallSummaryInstance
constructor
Initialize the CallSummaryInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
- #processing_state ⇒ ProcessingState
-
#properties ⇒ Hash
Contains edge-agnostic call-level details.
-
#sdk_edge ⇒ Hash
Contains metrics and properties for the SDK sensor library for Client calls.
-
#sip_edge ⇒ Hash
Contains metrics and properties for the Twilio media gateway of a SIP Interface or Trunking call.
-
#start_time ⇒ Time
The time at which the Call was started, given in ISO 8601 format.
-
#tags ⇒ Array<String>
Tags applied to calls by Voice Insights analysis indicating a condition that could result in subjective degradation of the call quality.
-
#to ⇒ Hash
The called party.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#trust ⇒ Hash
Contains trusted communications details including Branded Call and verified caller ID.
-
#url ⇒ String
The URL of this resource.
Constructor Details
#initialize(version, payload, call_sid: nil) ⇒ CallSummaryInstance
Initialize the CallSummaryInstance
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 132 def initialize(version, payload , call_sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'call_sid' => payload['call_sid'], 'call_type' => payload['call_type'], 'call_state' => payload['call_state'], 'answered_by' => payload['answered_by'], 'processing_state' => payload['processing_state'], 'created_time' => Twilio.deserialize_iso8601_datetime(payload['created_time']), 'start_time' => Twilio.deserialize_iso8601_datetime(payload['start_time']), 'end_time' => Twilio.deserialize_iso8601_datetime(payload['end_time']), 'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i, 'connect_duration' => payload['connect_duration'] == nil ? payload['connect_duration'] : payload['connect_duration'].to_i, 'from' => payload['from'], 'to' => payload['to'], 'carrier_edge' => payload['carrier_edge'], 'client_edge' => payload['client_edge'], 'sdk_edge' => payload['sdk_edge'], 'sip_edge' => payload['sip_edge'], 'tags' => payload['tags'], 'url' => payload['url'], 'attributes' => payload['attributes'], 'properties' => payload['properties'], 'trust' => payload['trust'], 'annotation' => payload['annotation'], } # Context @instance_context = nil @params = { 'call_sid' => call_sid || @properties['call_sid'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The unique SID identifier of the Account.
180 181 182 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 180 def account_sid @properties['account_sid'] end |
#annotation ⇒ Hash
Returns Programmatically labeled annotations for the Call. Developers can update the Call Summary records with Annotation during or after a Call. Annotations can be updated as long as the Call Summary record is addressable via the API.
312 313 314 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 312 def annotation @properties['annotation'] end |
#answered_by ⇒ AnsweredBy
204 205 206 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 204 def answered_by @properties['answered_by'] end |
#attributes ⇒ Hash
Returns Attributes capturing call-flow-specific details.
294 295 296 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 294 def attributes @properties['attributes'] end |
#call_sid ⇒ String
Returns The unique SID identifier of the Call.
186 187 188 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 186 def call_sid @properties['call_sid'] end |
#call_state ⇒ CallState
198 199 200 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 198 def call_state @properties['call_state'] end |
#call_type ⇒ CallType
192 193 194 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 192 def call_type @properties['call_type'] end |
#carrier_edge ⇒ Hash
Returns Contains metrics and properties for the Twilio media gateway of a PSTN call.
258 259 260 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 258 def carrier_edge @properties['carrier_edge'] end |
#client_edge ⇒ Hash
Returns Contains metrics and properties for the Twilio media gateway of a Client call.
264 265 266 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 264 def client_edge @properties['client_edge'] end |
#connect_duration ⇒ String
Returns Duration between when the call was answered and when it ended.
240 241 242 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 240 def connect_duration @properties['connect_duration'] end |
#context ⇒ CallSummaryContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
171 172 173 174 175 176 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 171 def context unless @instance_context @instance_context = CallSummaryContext.new(@version , @params['call_sid']) end @instance_context end |
#created_time ⇒ Time
Returns The time at which the Call was created, given in ISO 8601 format. Can be different from ‘start_time` in the event of queueing due to CPS.
216 217 218 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 216 def created_time @properties['created_time'] end |
#duration ⇒ String
Returns Duration between when the call was initiated and the call was ended.
234 235 236 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 234 def duration @properties['duration'] end |
#end_time ⇒ Time
Returns The time at which the Call was ended, given in ISO 8601 format.
228 229 230 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 228 def end_time @properties['end_time'] end |
#fetch(processing_state: :unset) ⇒ CallSummaryInstance
Fetch the CallSummaryInstance
320 321 322 323 324 325 326 327 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 320 def fetch( processing_state: :unset ) context.fetch( processing_state: processing_state, ) end |
#from ⇒ Hash
Returns The calling party.
246 247 248 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 246 def from @properties['from'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
338 339 340 341 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 338 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Insights.V1.CallSummaryInstance #{values}>" end |
#processing_state ⇒ ProcessingState
210 211 212 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 210 def processing_state @properties['processing_state'] end |
#properties ⇒ Hash
Returns Contains edge-agnostic call-level details.
300 301 302 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 300 def properties @properties['properties'] end |
#sdk_edge ⇒ Hash
Returns Contains metrics and properties for the SDK sensor library for Client calls.
270 271 272 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 270 def sdk_edge @properties['sdk_edge'] end |
#sip_edge ⇒ Hash
Returns Contains metrics and properties for the Twilio media gateway of a SIP Interface or Trunking call.
276 277 278 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 276 def sip_edge @properties['sip_edge'] end |
#start_time ⇒ Time
Returns The time at which the Call was started, given in ISO 8601 format.
222 223 224 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 222 def start_time @properties['start_time'] end |
#tags ⇒ Array<String>
Returns Tags applied to calls by Voice Insights analysis indicating a condition that could result in subjective degradation of the call quality.
282 283 284 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 282 def @properties['tags'] end |
#to ⇒ Hash
Returns The called party.
252 253 254 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 252 def to @properties['to'] end |
#to_s ⇒ Object
Provide a user friendly representation
331 332 333 334 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 331 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Insights.V1.CallSummaryInstance #{values}>" end |
#trust ⇒ Hash
Returns Contains trusted communications details including Branded Call and verified caller ID.
306 307 308 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 306 def trust @properties['trust'] end |
#url ⇒ String
Returns The URL of this resource.
288 289 290 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 288 def url @properties['url'] end |