Class: Twilio::REST::Insights::V2::ReportList::StirShaken

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) ⇒ StirShaken

Returns a new instance of StirShaken.



345
346
347
348
349
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 345

def initialize(payload)
        @call_count = payload["call_count"]
        @percentage = payload["percentage"]
        @answer_rate = payload["answer_rate"]
end

Instance Attribute Details

#answer_rateObject

Parameters:



344
345
346
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 344

def answer_rate
  @answer_rate
end

#call_countObject

Parameters:



344
345
346
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 344

def call_count
  @call_count
end

#percentageObject

Parameters:



344
345
346
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 344

def percentage
  @percentage
end

Instance Method Details

#to_json(options = {}) ⇒ Object



350
351
352
353
354
355
356
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 350

def to_json(options = {})
{
        "call_count": @call_count,
        "percentage": @percentage,
        "answer_rate": @answer_rate,
}.to_json(options)
end