Class: Twilio::REST::Autopilot::V1

Inherits:
Version
  • Object
show all
Defined in:
lib/twilio-ruby/rest/autopilot/v1.rb,
lib/twilio-ruby/rest/autopilot/v1/assistant.rb,
lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb,
lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb,
lib/twilio-ruby/rest/autopilot/v1/assistant/webhook.rb,
lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb,
lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb,
lib/twilio-ruby/rest/autopilot/v1/assistant/dialogue.rb,
lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb,
lib/twilio-ruby/rest/autopilot/v1/assistant/task/field.rb,
lib/twilio-ruby/rest/autopilot/v1/assistant/model_build.rb,
lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb,
lib/twilio-ruby/rest/autopilot/v1/assistant/task/sample.rb,
lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb,
lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb,
lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb

Defined Under Namespace

Classes: AssistantContext, AssistantInstance, AssistantList, AssistantPage, RestoreAssistantInstance, RestoreAssistantList, RestoreAssistantPage

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 Autopilot


15
16
17
18
19
20
# File 'lib/twilio-ruby/rest/autopilot/v1.rb', line 15

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

Instance Method Details

#assistants(sid = :unset) ⇒ Twilio::REST::Autopilot::V1::AssistantContext, Twilio::REST::Autopilot::V1::AssistantList

Parameters:

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

    The Twilio-provided string that uniquely identifies the Assistant resource to fetch.

Returns:


27
28
29
30
31
32
33
34
35
36
# File 'lib/twilio-ruby/rest/autopilot/v1.rb', line 27

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

#restore_assistantTwilio::REST::Autopilot::V1::RestoreAssistantContext

Returns:

  • (Twilio::REST::Autopilot::V1::RestoreAssistantContext)

40
41
42
# File 'lib/twilio-ruby/rest/autopilot/v1.rb', line 40

def restore_assistant
  @restore_assistant ||= RestoreAssistantList.new self
end

#to_sObject

Provide a user friendly representation


46
47
48
# File 'lib/twilio-ruby/rest/autopilot/v1.rb', line 46

def to_s
  '<Twilio::REST::Autopilot::V1>'
end