Class: Twilio::REST::Insights::V2::ReportListResponse

Inherits:
Twilio::REST::InstanceListResource show all
Defined in:
lib/twilio-ruby/rest/insights/v2/report.rb,
lib/twilio-ruby/rest/insights/v2/report.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, key, limit = :unset) ⇒ ReportListResponse

Returns a new instance of ReportListResponse.

Parameters:

  • instance (Array<ReportInstance>)
  • headers (Hash{String => Object})
  • status_code (Integer)


641
642
643
644
645
646
647
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 641

def initialize(version, payload, key)
   @report_instance = payload.body[key].map do |data|
    ReportInstance.new(version, data)
   end
   @headers = payload.headers
   @status_code = payload.status_code
end

Instance Method Details

#headersObject



734
735
736
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 734

def headers
  @headers
end

#reportObject



730
731
732
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 730

def report
    @report
end

#report_instanceObject



649
650
651
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 649

def report_instance
    @instance
end

#status_codeObject



738
739
740
# File 'lib/twilio-ruby/rest/insights/v2/report.rb', line 738

def status_code
  @status_code
end