Class: Twilio::REST::Insights::V1

Inherits:
Version
  • Object
show all
Defined in:
lib/twilio-ruby/rest/insights/v1.rb,
lib/twilio-ruby/rest/insights/v1/summary.rb

Defined Under Namespace

Classes: CallSummaryContext, CallSummaryInstance, CallSummaryList, CallSummaryPage

Instance Attribute Summary

Attributes inherited from Version

#domain

Instance Method Summary collapse

Methods inherited from Version

#absolute_url, #create, #delete, #exception, #fetch, #page, #read_limits, #relative_uri, #request, #stream, #update

Constructor Details

#initialize(domain) ⇒ V1

Initialize the V1 version of Insights



15
16
17
18
19
# File 'lib/twilio-ruby/rest/insights/v1.rb', line 15

def initialize(domain)
  super
  @version = 'v1'
  @summary = nil
end

Instance Method Details

#summary(call_sid = :unset) ⇒ Twilio::REST::Insights::V1::CallSummaryContext, Twilio::REST::Insights::V1::CallSummaryList

Parameters:

  • call_sid (String) (defaults to: :unset)

    The call_sid

Returns:



25
26
27
28
29
30
31
32
33
# File 'lib/twilio-ruby/rest/insights/v1.rb', line 25

def summary(call_sid=:unset)
  if call_sid.nil?
    raise ArgumentError, 'call_sid cannot be nil'
  elsif call_sid == :unset
    @summary ||= CallSummaryList.new self
  else
    CallSummaryContext.new(self, call_sid)
  end
end

#to_sObject

Provide a user friendly representation



37
38
39
# File 'lib/twilio-ruby/rest/insights/v1.rb', line 37

def to_s
  '<Twilio::REST::Insights::V1>'
end