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/call.rb,
lib/twilio-ruby/rest/insights/v1/room.rb,
lib/twilio-ruby/rest/insights/v1/call/event.rb,
lib/twilio-ruby/rest/insights/v1/call/metric.rb,
lib/twilio-ruby/rest/insights/v1/call/summary.rb,
lib/twilio-ruby/rest/insights/v1/call_summaries.rb,
lib/twilio-ruby/rest/insights/v1/room/participant.rb

Defined Under Namespace

Classes: CallContext, CallInstance, CallList, CallPage, CallSummariesInstance, CallSummariesList, CallSummariesPage, RoomContext, RoomInstance, RoomList, RoomPage

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
20
21
# File 'lib/twilio-ruby/rest/insights/v1.rb', line 15

def initialize(domain)
  super
  @version = 'v1'
  @calls = nil
  @call_summaries = nil
  @rooms = nil
end

Instance Method Details

#call_summariesTwilio::REST::Insights::V1::CallSummariesContext

Returns:

  • (Twilio::REST::Insights::V1::CallSummariesContext)

40
41
42
# File 'lib/twilio-ruby/rest/insights/v1.rb', line 40

def call_summaries
  @call_summaries ||= CallSummariesList.new self
end

#calls(sid = :unset) ⇒ Twilio::REST::Insights::V1::CallContext, Twilio::REST::Insights::V1::CallList

Parameters:

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

    The sid

Returns:


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

def calls(sid=:unset)
  if sid.nil?
      raise ArgumentError, 'sid cannot be nil'
  end
  if sid == :unset
      @calls ||= CallList.new self
  else
      CallContext.new(self, sid)
  end
end

#rooms(room_sid = :unset) ⇒ Twilio::REST::Insights::V1::RoomContext, Twilio::REST::Insights::V1::RoomList

Parameters:

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

    The SID of the Room resource.

Returns:


48
49
50
51
52
53
54
55
56
57
# File 'lib/twilio-ruby/rest/insights/v1.rb', line 48

def rooms(room_sid=:unset)
  if room_sid.nil?
      raise ArgumentError, 'room_sid cannot be nil'
  end
  if room_sid == :unset
      @rooms ||= RoomList.new self
  else
      RoomContext.new(self, room_sid)
  end
end

#to_sObject

Provide a user friendly representation


61
62
63
# File 'lib/twilio-ruby/rest/insights/v1.rb', line 61

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