Class: Twilio::REST::Insights::V2::OutboundInstance
- Inherits:
-
Twilio::REST::InstanceResource
- Object
- Twilio::REST::InstanceResource
- Twilio::REST::Insights::V2::OutboundInstance
- Defined in:
- lib/twilio-ruby/rest/insights/v2/outbound.rb
Instance Method Summary collapse
-
#answer_rate_device_type ⇒ Hash<String, Float>
Answer rate for each device type.
- #answering_machine_detection ⇒ InsightsV2OutboundPhoneNumberReportAnsweringMachineDetection
-
#blocked_calls_by_carrier ⇒ Array<CountyCarrierValue>
Percentage of blocked calls by carrier per country.
-
#call_answer_score ⇒ Float
The call answer score measures customers behavior to the delivered calls.
- #call_state_percentage ⇒ InsightsV2OutboundPhoneNumberReportCallStatePercentage
-
#calls_by_device_type ⇒ Hash<String, Integer>
Number of calls made with each device type.
-
#handle ⇒ String
The outbound phone number handle.
-
#initialize(version, payload, report_id: nil) ⇒ OutboundInstance
constructor
Initialize the OutboundInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#long_duration_calls_percentage ⇒ Float
Percentage of long duration calls ( >= 60 seconds).
-
#potential_robocalls_percentage ⇒ Float
Percentage of completed outbound calls to unassigned or unallocated phone numbers.
-
#short_duration_calls_percentage ⇒ Float
Percentage of completed outbound calls under 10 seconds (PSTN Short call tags); More than 15% is typically low trust measured.
-
#silent_calls_percentage ⇒ Float
Percentage of calls with silence tags over total calls.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#total_calls ⇒ String
Total number of outbound calls made with the given handle during the report period.
Constructor Details
#initialize(version, payload, report_id: nil) ⇒ OutboundInstance
Initialize the OutboundInstance
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 |
# File 'lib/twilio-ruby/rest/insights/v2/outbound.rb', line 259 def initialize(version, payload , report_id: nil) super(version) # Marshaled Properties @properties = { 'handle' => payload['handle'], 'total_calls' => payload['total_calls'] == nil ? payload['total_calls'] : payload['total_calls'].to_i, 'call_answer_score' => payload['call_answer_score'], 'calls_by_device_type' => payload['calls_by_device_type'], 'answer_rate_device_type' => payload['answer_rate_device_type'], 'call_state_percentage' => payload['call_state_percentage'], 'blocked_calls_by_carrier' => payload['blocked_calls_by_carrier'], 'silent_calls_percentage' => payload['silent_calls_percentage'], 'short_duration_calls_percentage' => payload['short_duration_calls_percentage'], 'long_duration_calls_percentage' => payload['long_duration_calls_percentage'], 'potential_robocalls_percentage' => payload['potential_robocalls_percentage'], 'answering_machine_detection' => payload['answering_machine_detection'], } end |
Instance Method Details
#answer_rate_device_type ⇒ Hash<String, Float>
Returns Answer rate for each device type. voip, mobile, landline, unknown.
307 308 309 |
# File 'lib/twilio-ruby/rest/insights/v2/outbound.rb', line 307 def answer_rate_device_type @properties['answer_rate_device_type'] end |
#answering_machine_detection ⇒ InsightsV2OutboundPhoneNumberReportAnsweringMachineDetection
349 350 351 |
# File 'lib/twilio-ruby/rest/insights/v2/outbound.rb', line 349 def answering_machine_detection @properties['answering_machine_detection'] end |
#blocked_calls_by_carrier ⇒ Array<CountyCarrierValue>
Returns Percentage of blocked calls by carrier per country.
319 320 321 |
# File 'lib/twilio-ruby/rest/insights/v2/outbound.rb', line 319 def blocked_calls_by_carrier @properties['blocked_calls_by_carrier'] end |
#call_answer_score ⇒ Float
Returns The call answer score measures customers behavior to the delivered calls. The score is a value between 0 and 100, where 100 indicates that all calls were successfully answered.
295 296 297 |
# File 'lib/twilio-ruby/rest/insights/v2/outbound.rb', line 295 def call_answer_score @properties['call_answer_score'] end |
#call_state_percentage ⇒ InsightsV2OutboundPhoneNumberReportCallStatePercentage
313 314 315 |
# File 'lib/twilio-ruby/rest/insights/v2/outbound.rb', line 313 def call_state_percentage @properties['call_state_percentage'] end |
#calls_by_device_type ⇒ Hash<String, Integer>
Returns Number of calls made with each device type. voip, mobile, landline, unknown.
301 302 303 |
# File 'lib/twilio-ruby/rest/insights/v2/outbound.rb', line 301 def calls_by_device_type @properties['calls_by_device_type'] end |
#handle ⇒ String
Returns The outbound phone number handle.
283 284 285 |
# File 'lib/twilio-ruby/rest/insights/v2/outbound.rb', line 283 def handle @properties['handle'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
361 362 363 |
# File 'lib/twilio-ruby/rest/insights/v2/outbound.rb', line 361 def inspect "<Twilio.Insights.V2.OutboundInstance>" end |
#long_duration_calls_percentage ⇒ Float
Returns Percentage of long duration calls ( >= 60 seconds).
337 338 339 |
# File 'lib/twilio-ruby/rest/insights/v2/outbound.rb', line 337 def long_duration_calls_percentage @properties['long_duration_calls_percentage'] end |
#potential_robocalls_percentage ⇒ Float
Returns Percentage of completed outbound calls to unassigned or unallocated phone numbers.
343 344 345 |
# File 'lib/twilio-ruby/rest/insights/v2/outbound.rb', line 343 def potential_robocalls_percentage @properties['potential_robocalls_percentage'] end |
#short_duration_calls_percentage ⇒ Float
Returns Percentage of completed outbound calls under 10 seconds (PSTN Short call tags); More than 15% is typically low trust measured.
331 332 333 |
# File 'lib/twilio-ruby/rest/insights/v2/outbound.rb', line 331 def short_duration_calls_percentage @properties['short_duration_calls_percentage'] end |
#silent_calls_percentage ⇒ Float
Returns Percentage of calls with silence tags over total calls. A silent tag is indicative of a connectivity issue or muted audio.
325 326 327 |
# File 'lib/twilio-ruby/rest/insights/v2/outbound.rb', line 325 def silent_calls_percentage @properties['silent_calls_percentage'] end |
#to_s ⇒ Object
Provide a user friendly representation
355 356 357 |
# File 'lib/twilio-ruby/rest/insights/v2/outbound.rb', line 355 def to_s "<Twilio.Insights.V2.OutboundInstance>" end |
#total_calls ⇒ String
Returns Total number of outbound calls made with the given handle during the report period.
289 290 291 |
# File 'lib/twilio-ruby/rest/insights/v2/outbound.rb', line 289 def total_calls @properties['total_calls'] end |