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
455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 455 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.
491 492 493 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 491 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.
533 534 535 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 533 def call_answer_score @properties['call_answer_score'] end |
#call_state_percentage ⇒ InsightsV2InboundPhoneNumberReportCallStatePercentage
539 540 541 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 539 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
482 483 484 485 486 487 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 482 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
553 554 555 556 557 558 559 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 553 def create(insights_v2_create_phone_numbers_report_request: :unset ) context.create( insights_v2_create_phone_numbers_report_request: insights_v2_create_phone_numbers_report_request, ) end |
#handle ⇒ String
Returns Inbound phone number handle represented in the report.
521 522 523 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 521 def handle @properties['handle'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
570 571 572 573 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 570 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.
497 498 499 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 497 def report_id @properties['report_id'] end |
#request_meta ⇒ ReportMetadata
509 510 511 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 509 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.
545 546 547 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 545 def silent_calls_percentage @properties['silent_calls_percentage'] end |
#status ⇒ ReportStatus
503 504 505 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 503 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
563 564 565 566 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 563 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.
527 528 529 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 527 def total_calls @properties['total_calls'] end |
#url ⇒ String
Returns The URL of this resource.
515 516 517 |
# File 'lib/twilio-ruby/rest/insights/v2/inbound.rb', line 515 def url @properties['url'] end |