Class: Twilio::REST::Insights::V2::InboundInstance
- Inherits:
-
Twilio::REST::InstanceResource
- Object
- Twilio::REST::InstanceResource
- Twilio::REST::Insights::V2::InboundInstance
- Defined in:
- lib/twilio-ruby/rest/insights/v2/inbound.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The unique SID identifier of the Account.
-
#call_answer_score ⇒ Float
The call answer score measures customers behavior to the delivered calls.
- #call_state_percentage ⇒ InsightsV2InboundPhoneNumberReportCallStatePercentage
-
#context ⇒ InboundContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#create(insights_v2_create_phone_numbers_report_request: :unset) ⇒ InboundInstance
Create the InboundInstance.
-
#handle ⇒ String
Inbound phone number handle represented in the report.
-
#initialize(version, payload, report_id: nil) ⇒ InboundInstance
constructor
Initialize the InboundInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#report_id ⇒ String
The report identifier as Voice Insights Report TTID.
- #request_meta ⇒ ReportMetadata
-
#silent_calls_percentage ⇒ Float
Percentage of inbound calls with silence tags over total outbound calls.
- #status ⇒ ReportStatus
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#total_calls ⇒ String
Total number of calls made with the given handle during the report period.
-
#url ⇒ String
The URL of this resource.
Constructor Details
#initialize(version, payload, report_id: nil) ⇒ InboundInstance
Initialize the InboundInstance
447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 447 def initialize(version, payload , report_id: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'report_id' => payload['report_id'], 'status' => payload['status'], 'request_meta' => payload['request_meta'], 'url' => payload['url'], 'handle' => payload['handle'], 'total_calls' => payload['total_calls'] == nil ? payload['total_calls'] : payload['total_calls'].to_i, 'call_answer_score' => payload['call_answer_score'], 'call_state_percentage' => payload['call_state_percentage'], 'silent_calls_percentage' => payload['silent_calls_percentage'], } # Context @instance_context = nil @params = { 'report_id' => report_id || @properties['report_id'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The unique SID identifier of the Account.
483 484 485 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 483 def account_sid @properties['account_sid'] 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.
525 526 527 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 525 def call_answer_score @properties['call_answer_score'] end |
#call_state_percentage ⇒ InsightsV2InboundPhoneNumberReportCallStatePercentage
531 532 533 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 531 def call_state_percentage @properties['call_state_percentage'] end |
#context ⇒ InboundContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
474 475 476 477 478 479 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 474 def context unless @instance_context @instance_context = InboundContext.new(@version , @params['report_id']) end @instance_context end |
#create(insights_v2_create_phone_numbers_report_request: :unset) ⇒ InboundInstance
Create the InboundInstance
545 546 547 548 549 550 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 545 def create(insights_v2_create_phone_numbers_report_request: :unset ) context.create( ) end |
#handle ⇒ String
Returns Inbound phone number handle represented in the report.
513 514 515 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 513 def handle @properties['handle'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
561 562 563 564 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 561 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Insights.V2.InboundInstance #{values}>" end |
#report_id ⇒ String
Returns The report identifier as Voice Insights Report TTID.
489 490 491 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 489 def report_id @properties['report_id'] end |
#request_meta ⇒ ReportMetadata
501 502 503 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 501 def @properties['request_meta'] end |
#silent_calls_percentage ⇒ Float
Returns Percentage of inbound calls with silence tags over total outbound calls. A silent tag is indicative of a connectivity issue or muted audio.
537 538 539 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 537 def silent_calls_percentage @properties['silent_calls_percentage'] end |
#status ⇒ ReportStatus
495 496 497 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 495 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
554 555 556 557 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 554 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Insights.V2.InboundInstance #{values}>" end |
#total_calls ⇒ String
Returns Total number of calls made with the given handle during the report period.
519 520 521 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 519 def total_calls @properties['total_calls'] end |
#url ⇒ String
Returns The URL of this resource.
507 508 509 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 507 def url @properties['url'] end |