class Twilio::REST::Autopilot::V1::AssistantContext::DefaultsInstance

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

Public Class Methods

new(version, payload, assistant_sid: nil) click to toggle source

Initialize the DefaultsInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] assistant_sid The SID of the

{Assistant}[https://www.twilio.com/docs/autopilot/api/assistant] that is the
parent of the resource.

@return [DefaultsInstance] DefaultsInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb
135 def initialize(version, payload, assistant_sid: nil)
136   super(version)
137 
138   # Marshaled Properties
139   @properties = {
140       'account_sid' => payload['account_sid'],
141       'assistant_sid' => payload['assistant_sid'],
142       'url' => payload['url'],
143       'data' => payload['data'],
144   }
145 
146   # Context
147   @instance_context = nil
148   @params = {'assistant_sid' => assistant_sid, }
149 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The SID of the Account that created the resource

    # File lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb
164 def account_sid
165   @properties['account_sid']
166 end
assistant_sid() click to toggle source

@return [String] The SID of the Assistant that is the parent of the resource

    # File lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb
170 def assistant_sid
171   @properties['assistant_sid']
172 end
context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [DefaultsContext] DefaultsContext for this DefaultsInstance

    # File lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb
155 def context
156   unless @instance_context
157     @instance_context = DefaultsContext.new(@version, @params['assistant_sid'], )
158   end
159   @instance_context
160 end
data() click to toggle source

@return [Hash] The JSON string that describes the default task links

    # File lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb
182 def data
183   @properties['data']
184 end
fetch() click to toggle source

Fetch the DefaultsInstance @return [DefaultsInstance] Fetched DefaultsInstance

    # File lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb
189 def fetch
190   context.fetch
191 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb
211 def inspect
212   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
213   "<Twilio.Autopilot.V1.DefaultsInstance #{values}>"
214 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb
204 def to_s
205   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
206   "<Twilio.Autopilot.V1.DefaultsInstance #{values}>"
207 end
update(defaults: :unset) click to toggle source

Update the DefaultsInstance @param [Hash] defaults A JSON string that describes the default task links for

the `assistant_initiation`, `collect`, and `fallback` situations.

@return [DefaultsInstance] Updated DefaultsInstance

    # File lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb
198 def update(defaults: :unset)
199   context.update(defaults: defaults, )
200 end
url() click to toggle source

@return [String] The absolute URL of the Defaults resource

    # File lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb
176 def url
177   @properties['url']
178 end