Sha256: 11f3f49bcaad8feedf688fe982d9c8093994c6b00167292d655445e83e32645f

Contents?: true

Size: 1.7 KB

Versions: 9

Compression:

Stored size: 1.7 KB

Contents

##
# This code was generated by
# \ / _    _  _|   _  _
#  | (_)\/(_)(_|\/| |(/_  v1.0.0
#       /       /
#
# frozen_string_literal: true

module Twilio
  module REST
    class Insights
      class V1 < Version
        ##
        # Initialize the V1 version of Insights
        def initialize(domain)
          super
          @version = 'v1'
          @calls = nil
          @call_summaries = nil
          @rooms = nil
        end

        ##
        # @param [String] sid The sid
        # @return [Twilio::REST::Insights::V1::CallContext] if sid was passed.
        # @return [Twilio::REST::Insights::V1::CallList]
        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

        ##
        # @return [Twilio::REST::Insights::V1::CallSummariesContext]
        def call_summaries
          @call_summaries ||= CallSummariesList.new self
        end

        ##
        # @param [String] room_sid The SID of the Room resource.
        # @return [Twilio::REST::Insights::V1::RoomContext] if room_sid was passed.
        # @return [Twilio::REST::Insights::V1::RoomList]
        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

        ##
        # Provide a user friendly representation
        def to_s
          '<Twilio::REST::Insights::V1>'
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
twilio-ruby-5.61.2 lib/twilio-ruby/rest/insights/v1.rb
twilio-ruby-5.61.1 lib/twilio-ruby/rest/insights/v1.rb
twilio-ruby-5.61.0 lib/twilio-ruby/rest/insights/v1.rb
twilio-ruby-5.60.0 lib/twilio-ruby/rest/insights/v1.rb
twilio-ruby-5.59.0 lib/twilio-ruby/rest/insights/v1.rb
twilio-ruby-5.58.3 lib/twilio-ruby/rest/insights/v1.rb
twilio-ruby-5.58.2 lib/twilio-ruby/rest/insights/v1.rb
twilio-ruby-5.58.1 lib/twilio-ruby/rest/insights/v1.rb
twilio-ruby-5.58.0 lib/twilio-ruby/rest/insights/v1.rb