Class: Twilio::REST::Assistants::V1

Inherits:
Version
  • Object
show all
Defined in:
lib/twilio-ruby/rest/assistants/v1.rb,
lib/twilio-ruby/rest/assistants/v1/tool.rb,
lib/twilio-ruby/rest/assistants/v1/policy.rb,
lib/twilio-ruby/rest/assistants/v1/session.rb,
lib/twilio-ruby/rest/assistants/v1/assistant.rb,
lib/twilio-ruby/rest/assistants/v1/knowledge.rb,
lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb,
lib/twilio-ruby/rest/assistants/v1/session/message.rb,
lib/twilio-ruby/rest/assistants/v1/assistant/message.rb,
lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb,
lib/twilio-ruby/rest/assistants/v1/assistant/assistants_tool.rb,
lib/twilio-ruby/rest/assistants/v1/knowledge/knowledge_status.rb,
lib/twilio-ruby/rest/assistants/v1/assistant/assistants_knowledge.rb

Defined Under Namespace

Classes: AssistantContext, AssistantInstance, AssistantList, AssistantPage, Knowledge, KnowledgeContext, KnowledgeInstance, KnowledgeList, KnowledgePage, PolicyInstance, PolicyList, PolicyPage, Session, SessionContext, SessionInstance, SessionList, SessionPage, ToolContext, ToolInstance, ToolList, ToolPage

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 Assistants



21
22
23
24
25
26
27
28
29
# File 'lib/twilio-ruby/rest/assistants/v1.rb', line 21

def initialize(domain)
    super
    @version = 'v1'
    @assistants = nil
    @knowledge = nil
    @policies = nil
    @sessions = nil
    @tools = nil
end

Instance Method Details

#assistants(id = :unset) ⇒ Twilio::REST::Assistants::V1::AssistantContext, Twilio::REST::Assistants::V1::AssistantList

Parameters:

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

Returns:



35
36
37
38
39
40
41
42
43
44
# File 'lib/twilio-ruby/rest/assistants/v1.rb', line 35

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

#knowledge(id = :unset) ⇒ Twilio::REST::Assistants::V1::KnowledgeContext, Twilio::REST::Assistants::V1::KnowledgeList

Parameters:

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

Returns:



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

def knowledge(id=:unset)
    if id.nil?
        raise ArgumentError, 'id cannot be nil'
    end
    if id == :unset
        @knowledge ||= KnowledgeList.new self
    else
        KnowledgeContext.new(self, id)
    end
end

#policiesTwilio::REST::Assistants::V1::PolicyList



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

def policies
    @policies ||= PolicyList.new self
end

#sessions(id = :unset) ⇒ Twilio::REST::Assistants::V1::SessionContext, Twilio::REST::Assistants::V1::SessionList

Parameters:

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

Returns:



68
69
70
71
72
73
74
75
76
77
# File 'lib/twilio-ruby/rest/assistants/v1.rb', line 68

def sessions(id=:unset)
    if id.nil?
        raise ArgumentError, 'id cannot be nil'
    end
    if id == :unset
        @sessions ||= SessionList.new self
    else
        SessionContext.new(self, id)
    end
end

#to_sObject

Provide a user friendly representation



94
95
96
# File 'lib/twilio-ruby/rest/assistants/v1.rb', line 94

def to_s
    '<Twilio::REST::Assistants::V1>';
end

#tools(id = :unset) ⇒ Twilio::REST::Assistants::V1::ToolContext, Twilio::REST::Assistants::V1::ToolList

Parameters:

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

Returns:



82
83
84
85
86
87
88
89
90
91
# File 'lib/twilio-ruby/rest/assistants/v1.rb', line 82

def tools(id=:unset)
    if id.nil?
        raise ArgumentError, 'id cannot be nil'
    end
    if id == :unset
        @tools ||= ToolList.new self
    else
        ToolContext.new(self, id)
    end
end