Class: Twilio::REST::Intelligence::V2

Inherits:
Version
  • Object
show all
Defined in:
lib/twilio-ruby/rest/intelligence/v2.rb,
lib/twilio-ruby/rest/intelligence/v2/service.rb,
lib/twilio-ruby/rest/intelligence/v2/transcript.rb,
lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb,
lib/twilio-ruby/rest/intelligence/v2/transcript/sentence.rb,
lib/twilio-ruby/rest/intelligence/v2/transcript/operator_result.rb

Defined Under Namespace

Classes: ServiceContext, ServiceInstance, ServiceList, ServicePage, TranscriptContext, TranscriptInstance, TranscriptList, TranscriptPage

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

Initialize the V2 version of Intelligence



21
22
23
24
25
26
# File 'lib/twilio-ruby/rest/intelligence/v2.rb', line 21

def initialize(domain)
    super
    @version = 'v2'
    @services = nil
    @transcripts = nil
end

Instance Method Details

#services(sid = :unset) ⇒ Twilio::REST::Intelligence::V2::ServiceContext, Twilio::REST::Intelligence::V2::ServiceList

Parameters:

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

    A 34 character string that uniquely identifies this Service.

Returns:



32
33
34
35
36
37
38
39
40
41
# File 'lib/twilio-ruby/rest/intelligence/v2.rb', line 32

def services(sid=:unset)
    if sid.nil?
        raise ArgumentError, 'sid cannot be nil'
    end
    if sid == :unset
        @services ||= ServiceList.new self
    else
        ServiceContext.new(self, sid)
    end
end

#to_sObject

Provide a user friendly representation



58
59
60
# File 'lib/twilio-ruby/rest/intelligence/v2.rb', line 58

def to_s
    '<Twilio::REST::Intelligence::V2>';
end

#transcripts(sid = :unset) ⇒ Twilio::REST::Intelligence::V2::TranscriptContext, Twilio::REST::Intelligence::V2::TranscriptList

Parameters:

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

    A 34 character string that uniquely identifies this Transcript.

Returns:



46
47
48
49
50
51
52
53
54
55
# File 'lib/twilio-ruby/rest/intelligence/v2.rb', line 46

def transcripts(sid=:unset)
    if sid.nil?
        raise ArgumentError, 'sid cannot be nil'
    end
    if sid == :unset
        @transcripts ||= TranscriptList.new self
    else
        TranscriptContext.new(self, sid)
    end
end