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/operator.rb,
lib/twilio-ruby/rest/intelligence/v2/transcript.rb,
lib/twilio-ruby/rest/intelligence/v2/operator_type.rb,
lib/twilio-ruby/rest/intelligence/v2/custom_operator.rb,
lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb,
lib/twilio-ruby/rest/intelligence/v2/prebuilt_operator.rb,
lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb,
lib/twilio-ruby/rest/intelligence/v2/transcript/sentence.rb,
lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb,
lib/twilio-ruby/rest/intelligence/v2/transcript/operator_result.rb

Defined Under Namespace

Classes: CustomOperatorContext, CustomOperatorInstance, CustomOperatorList, CustomOperatorPage, OperatorAttachmentContext, OperatorAttachmentInstance, OperatorAttachmentList, OperatorAttachmentPage, OperatorAttachmentsContext, OperatorAttachmentsInstance, OperatorAttachmentsList, OperatorAttachmentsPage, OperatorContext, OperatorInstance, OperatorList, OperatorPage, OperatorTypeContext, OperatorTypeInstance, OperatorTypeList, OperatorTypePage, PrebuiltOperatorContext, PrebuiltOperatorInstance, PrebuiltOperatorList, PrebuiltOperatorPage, 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
27
28
29
30
31
32
# File 'lib/twilio-ruby/rest/intelligence/v2.rb', line 21

def initialize(domain)
    super
    @version = 'v2'
    @custom_operators = nil
    @operators = nil
    @operator_attachment = nil
    @operator_attachments = nil
    @operator_type = nil
    @prebuilt_operators = nil
    @services = nil
    @transcripts = nil
end

Instance Method Details

#custom_operators(sid = :unset) ⇒ Twilio::REST::Intelligence::V2::CustomOperatorContext, Twilio::REST::Intelligence::V2::CustomOperatorList

Parameters:

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

    A 34 character string that uniquely identifies this Custom Operator.

Returns:



38
39
40
41
42
43
44
45
46
47
# File 'lib/twilio-ruby/rest/intelligence/v2.rb', line 38

def custom_operators(sid=:unset)
    if sid.nil?
        raise ArgumentError, 'sid cannot be nil'
    end
    if sid == :unset
        @custom_operators ||= CustomOperatorList.new self
    else
        CustomOperatorContext.new(self, sid)
    end
end

#operator_attachment(service_sid = :unset, operator_sid = :unset) ⇒ Twilio::REST::Intelligence::V2::OperatorAttachmentContext, Twilio::REST::Intelligence::V2::OperatorAttachmentList

Parameters:

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

    The unique SID identifier of the Service.

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

    The unique SID identifier of the Operator. Allows both Custom and Pre-built Operators.

Returns:



67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/twilio-ruby/rest/intelligence/v2.rb', line 67

def operator_attachment(service_sid=:unset, operator_sid=:unset)
    if service_sid.nil?
        raise ArgumentError, 'service_sid cannot be nil'
    end
    if operator_sid.nil?
        raise ArgumentError, 'operator_sid cannot be nil'
    end
    if service_sid == :unset && operator_sid == :unset
        @operator_attachment ||= OperatorAttachmentList.new self
    else
        OperatorAttachmentContext.new(self, service_sid, operator_sid)
    end
end

#operator_attachments(service_sid = :unset) ⇒ Twilio::REST::Intelligence::V2::OperatorAttachmentsContext, Twilio::REST::Intelligence::V2::OperatorAttachmentsList

Parameters:

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

    The unique SID identifier of the Service.

Returns:



102
103
104
105
106
107
108
109
110
111
# File 'lib/twilio-ruby/rest/intelligence/v2.rb', line 102

def operator_attachments(service_sid=:unset)
    if service_sid.nil?
        raise ArgumentError, 'service_sid cannot be nil'
    end
    if service_sid == :unset
        @operator_attachments ||= OperatorAttachmentsList.new self
    else
        OperatorAttachmentsContext.new(self, service_sid)
    end
end

#operator_type(sid = :unset) ⇒ Twilio::REST::Intelligence::V2::OperatorTypeContext, Twilio::REST::Intelligence::V2::OperatorTypeList

Parameters:

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

    Either a 34 character string that uniquely identifies this Operator Type or the unique name that references an Operator Type.

Returns:



116
117
118
119
120
121
122
123
124
125
# File 'lib/twilio-ruby/rest/intelligence/v2.rb', line 116

def operator_type(sid=:unset)
    if sid.nil?
        raise ArgumentError, 'sid cannot be nil'
    end
    if sid == :unset
        @operator_type ||= OperatorTypeList.new self
    else
        OperatorTypeContext.new(self, sid)
    end
end

#operators(sid = :unset) ⇒ Twilio::REST::Intelligence::V2::OperatorContext, Twilio::REST::Intelligence::V2::OperatorList

Parameters:

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

    A 34 character string that uniquely identifies this Operator.

Returns:



52
53
54
55
56
57
58
59
60
61
# File 'lib/twilio-ruby/rest/intelligence/v2.rb', line 52

def operators(sid=:unset)
    if sid.nil?
        raise ArgumentError, 'sid cannot be nil'
    end
    if sid == :unset
        @operators ||= OperatorList.new self
    else
        OperatorContext.new(self, sid)
    end
end

#prebuilt_operators(sid = :unset) ⇒ Twilio::REST::Intelligence::V2::PrebuiltOperatorContext, Twilio::REST::Intelligence::V2::PrebuiltOperatorList

Parameters:

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

    A 34 character string that uniquely identifies this Pre-built Operator.

Returns:



130
131
132
133
134
135
136
137
138
139
# File 'lib/twilio-ruby/rest/intelligence/v2.rb', line 130

def prebuilt_operators(sid=:unset)
    if sid.nil?
        raise ArgumentError, 'sid cannot be nil'
    end
    if sid == :unset
        @prebuilt_operators ||= PrebuiltOperatorList.new self
    else
        PrebuiltOperatorContext.new(self, sid)
    end
end

#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:



144
145
146
147
148
149
150
151
152
153
# File 'lib/twilio-ruby/rest/intelligence/v2.rb', line 144

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



170
171
172
# File 'lib/twilio-ruby/rest/intelligence/v2.rb', line 170

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:



158
159
160
161
162
163
164
165
166
167
# File 'lib/twilio-ruby/rest/intelligence/v2.rb', line 158

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