Class: Twilio::REST::Preview::Understand

Inherits:
Version
  • Object
show all
Defined in:
lib/twilio-ruby/rest/preview/understand.rb,
lib/twilio-ruby/rest/preview/understand/assistant.rb,
lib/twilio-ruby/rest/preview/understand/assistant/task.rb,
lib/twilio-ruby/rest/preview/understand/assistant/query.rb,
lib/twilio-ruby/rest/preview/understand/assistant/dialogue.rb,
lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb,
lib/twilio-ruby/rest/preview/understand/assistant/task/field.rb,
lib/twilio-ruby/rest/preview/understand/assistant/model_build.rb,
lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb,
lib/twilio-ruby/rest/preview/understand/assistant/task/sample.rb,
lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb,
lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb,
lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb,
lib/twilio-ruby/rest/preview/understand/assistant/assistant_fallback_actions.rb,
lib/twilio-ruby/rest/preview/understand/assistant/assistant_initiation_actions.rb

Defined Under Namespace

Classes: AssistantContext, AssistantInstance, AssistantList, AssistantPage

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

Initialize the Understand version of Preview



21
22
23
24
25
# File 'lib/twilio-ruby/rest/preview/understand.rb', line 21

def initialize(domain)
    super
    @version = 'understand'
    @assistants = nil
end

Instance Method Details

#assistants(sid = :unset) ⇒ Twilio::REST::Preview::Understand::AssistantContext, Twilio::REST::Preview::Understand::AssistantList

Parameters:

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

    A 34 character string that uniquely identifies this resource.

Returns:



31
32
33
34
35
36
37
38
39
40
# File 'lib/twilio-ruby/rest/preview/understand.rb', line 31

def assistants(sid=:unset)
    if sid.nil?
        raise ArgumentError, 'sid cannot be nil'
    end
    if sid == :unset
        @assistants ||= AssistantList.new self
    else
        AssistantContext.new(self, sid)
    end
end

#to_sObject

Provide a user friendly representation



43
44
45
# File 'lib/twilio-ruby/rest/preview/understand.rb', line 43

def to_s
    '<Twilio::REST::Preview::Understand>';
end