Class: Twilio::REST::Insights::V1::CallSummaryInstance
- Inherits:
-
Twilio::REST::InstanceResource
- Object
- Twilio::REST::InstanceResource
- Twilio::REST::Insights::V1::CallSummaryInstance
- Defined in:
- lib/twilio-ruby/rest/insights/v1/summary.rb
Overview
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected].
Instance Method Summary collapse
-
#account_sid ⇒ String
The account_sid.
-
#attributes ⇒ Hash
The attributes.
-
#call_sid ⇒ String
The call_sid.
-
#call_state ⇒ call_summary.CallState
The call_state.
-
#call_type ⇒ call_summary.CallType
The call_type.
-
#carrier_edge ⇒ Hash
The carrier_edge.
-
#client_edge ⇒ Hash
The client_edge.
-
#connect_duration ⇒ String
The connect_duration.
-
#context ⇒ CallSummaryContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#duration ⇒ String
The duration.
-
#end_time ⇒ Time
The end_time.
-
#fetch(processing_state: :unset) ⇒ CallSummaryInstance
Fetch a CallSummaryInstance.
-
#from ⇒ Hash
The from.
-
#initialize(version, payload, call_sid: nil) ⇒ CallSummaryInstance
constructor
Initialize the CallSummaryInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#processing_state ⇒ call_summary.ProcessingState
The processing_state.
-
#properties ⇒ Hash
The properties.
-
#sdk_edge ⇒ Hash
The sdk_edge.
-
#sip_edge ⇒ Hash
The sip_edge.
-
#start_time ⇒ Time
The start_time.
-
#tags ⇒ String
The tags.
-
#to ⇒ Hash
The to.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The url.
Constructor Details
#initialize(version, payload, call_sid: nil) ⇒ CallSummaryInstance
Initialize the CallSummaryInstance
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/twilio-ruby/rest/insights/v1/summary.rb', line 121 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'], 'processing_state' => payload['processing_state'], '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'], } # Context @instance_context = nil @params = {'call_sid' => call_sid || @properties['call_sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The account_sid.
165 166 167 |
# File 'lib/twilio-ruby/rest/insights/v1/summary.rb', line 165 def account_sid @properties['account_sid'] end |
#attributes ⇒ Hash
Returns The attributes.
267 268 269 |
# File 'lib/twilio-ruby/rest/insights/v1/summary.rb', line 267 def attributes @properties['attributes'] end |
#call_sid ⇒ String
Returns The call_sid.
171 172 173 |
# File 'lib/twilio-ruby/rest/insights/v1/summary.rb', line 171 def call_sid @properties['call_sid'] end |
#call_state ⇒ call_summary.CallState
Returns The call_state.
183 184 185 |
# File 'lib/twilio-ruby/rest/insights/v1/summary.rb', line 183 def call_state @properties['call_state'] end |
#call_type ⇒ call_summary.CallType
Returns The call_type.
177 178 179 |
# File 'lib/twilio-ruby/rest/insights/v1/summary.rb', line 177 def call_type @properties['call_type'] end |
#carrier_edge ⇒ Hash
Returns The carrier_edge.
231 232 233 |
# File 'lib/twilio-ruby/rest/insights/v1/summary.rb', line 231 def carrier_edge @properties['carrier_edge'] end |
#client_edge ⇒ Hash
Returns The client_edge.
237 238 239 |
# File 'lib/twilio-ruby/rest/insights/v1/summary.rb', line 237 def client_edge @properties['client_edge'] end |
#connect_duration ⇒ String
Returns The connect_duration.
213 214 215 |
# File 'lib/twilio-ruby/rest/insights/v1/summary.rb', line 213 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
156 157 158 159 160 161 |
# File 'lib/twilio-ruby/rest/insights/v1/summary.rb', line 156 def context unless @instance_context @instance_context = CallSummaryContext.new(@version, @params['call_sid'], ) end @instance_context end |
#duration ⇒ String
Returns The duration.
207 208 209 |
# File 'lib/twilio-ruby/rest/insights/v1/summary.rb', line 207 def duration @properties['duration'] end |
#end_time ⇒ Time
Returns The end_time.
201 202 203 |
# File 'lib/twilio-ruby/rest/insights/v1/summary.rb', line 201 def end_time @properties['end_time'] end |
#fetch(processing_state: :unset) ⇒ CallSummaryInstance
Fetch a CallSummaryInstance
281 282 283 |
# File 'lib/twilio-ruby/rest/insights/v1/summary.rb', line 281 def fetch(processing_state: :unset) context.fetch(processing_state: processing_state, ) end |
#from ⇒ Hash
Returns The from.
219 220 221 |
# File 'lib/twilio-ruby/rest/insights/v1/summary.rb', line 219 def from @properties['from'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
294 295 296 297 |
# File 'lib/twilio-ruby/rest/insights/v1/summary.rb', line 294 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Insights.V1.CallSummaryInstance #{values}>" end |
#processing_state ⇒ call_summary.ProcessingState
Returns The processing_state.
189 190 191 |
# File 'lib/twilio-ruby/rest/insights/v1/summary.rb', line 189 def processing_state @properties['processing_state'] end |
#properties ⇒ Hash
Returns The properties.
273 274 275 |
# File 'lib/twilio-ruby/rest/insights/v1/summary.rb', line 273 def properties @properties['properties'] end |
#sdk_edge ⇒ Hash
Returns The sdk_edge.
243 244 245 |
# File 'lib/twilio-ruby/rest/insights/v1/summary.rb', line 243 def sdk_edge @properties['sdk_edge'] end |
#sip_edge ⇒ Hash
Returns The sip_edge.
249 250 251 |
# File 'lib/twilio-ruby/rest/insights/v1/summary.rb', line 249 def sip_edge @properties['sip_edge'] end |
#start_time ⇒ Time
Returns The start_time.
195 196 197 |
# File 'lib/twilio-ruby/rest/insights/v1/summary.rb', line 195 def start_time @properties['start_time'] end |
#tags ⇒ String
Returns The tags.
255 256 257 |
# File 'lib/twilio-ruby/rest/insights/v1/summary.rb', line 255 def @properties['tags'] end |
#to ⇒ Hash
Returns The to.
225 226 227 |
# File 'lib/twilio-ruby/rest/insights/v1/summary.rb', line 225 def to @properties['to'] end |
#to_s ⇒ Object
Provide a user friendly representation
287 288 289 290 |
# File 'lib/twilio-ruby/rest/insights/v1/summary.rb', line 287 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Insights.V1.CallSummaryInstance #{values}>" end |
#url ⇒ String
Returns The url.
261 262 263 |
# File 'lib/twilio-ruby/rest/insights/v1/summary.rb', line 261 def url @properties['url'] end |