Class: Twilio::REST::Insights::V2::ReportList::AccountReportAnsweringMachineDetection

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/rest/insights/v2/report.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ AccountReportAnsweringMachineDetection

Returns a new instance of AccountReportAnsweringMachineDetection.



27
28
29
30
31
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 27

def initialize(payload)
        @total_calls = payload["total_calls"]
        @answered_by_human_percentage = payload["answered_by_human_percentage"]
        @answered_by_machine_percentage = payload["answered_by_machine_percentage"]
end

Instance Attribute Details

#answered_by_human_percentageObject

Parameters:

  • : (total_calls)
    Integer

    Total number of calls with answering machine detection enabled (AMD).

  • : (answered_by_human_percentage)
    Float

    Percentage of calls marked as answered by human.

  • : (answered_by_machine_percentage)
    Float

    Percentage of calls marked as answered by machined related like the following: machine_start, machine_end_beep, machine_end_silence, machine_end_other, fax



26
27
28
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 26

def answered_by_human_percentage
  @answered_by_human_percentage
end

#answered_by_machine_percentageObject

Parameters:

  • : (total_calls)
    Integer

    Total number of calls with answering machine detection enabled (AMD).

  • : (answered_by_human_percentage)
    Float

    Percentage of calls marked as answered by human.

  • : (answered_by_machine_percentage)
    Float

    Percentage of calls marked as answered by machined related like the following: machine_start, machine_end_beep, machine_end_silence, machine_end_other, fax



26
27
28
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 26

def answered_by_machine_percentage
  @answered_by_machine_percentage
end

#total_callsObject

Parameters:

  • : (total_calls)
    Integer

    Total number of calls with answering machine detection enabled (AMD).

  • : (answered_by_human_percentage)
    Float

    Percentage of calls marked as answered by human.

  • : (answered_by_machine_percentage)
    Float

    Percentage of calls marked as answered by machined related like the following: machine_start, machine_end_beep, machine_end_silence, machine_end_other, fax



26
27
28
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 26

def total_calls
  @total_calls
end

Instance Method Details

#to_json(options = {}) ⇒ Object



32
33
34
35
36
37
38
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 32

def to_json(options = {})
{
        "total_calls": @total_calls,
        "answered_by_human_percentage": @answered_by_human_percentage,
        "answered_by_machine_percentage": @answered_by_machine_percentage,
}.to_json(options)
end