class Twilio::REST::Preview::Understand::AssistantContext::DialogueInstance

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, sid: nil) click to toggle source

Initialize the DialogueInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] assistant_sid The unique ID of the parent Assistant. @param [String] sid The sid @return [DialogueInstance] DialogueInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/preview/understand/assistant/dialogue.rb
123 def initialize(version, payload, assistant_sid: nil, sid: nil)
124   super(version)
125 
126   # Marshaled Properties
127   @properties = {
128       'account_sid' => payload['account_sid'],
129       'assistant_sid' => payload['assistant_sid'],
130       'sid' => payload['sid'],
131       'data' => payload['data'],
132       'url' => payload['url'],
133   }
134 
135   # Context
136   @instance_context = nil
137   @params = {'assistant_sid' => assistant_sid, 'sid' => sid || @properties['sid'], }
138 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The unique ID of the Account that created this Field.

    # File lib/twilio-ruby/rest/preview/understand/assistant/dialogue.rb
153 def account_sid
154   @properties['account_sid']
155 end
assistant_sid() click to toggle source

@return [String] The unique ID of the parent Assistant.

    # File lib/twilio-ruby/rest/preview/understand/assistant/dialogue.rb
159 def assistant_sid
160   @properties['assistant_sid']
161 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 [DialogueContext] DialogueContext for this DialogueInstance

    # File lib/twilio-ruby/rest/preview/understand/assistant/dialogue.rb
144 def context
145   unless @instance_context
146     @instance_context = DialogueContext.new(@version, @params['assistant_sid'], @params['sid'], )
147   end
148   @instance_context
149 end
data() click to toggle source

@return [Hash] The dialogue memory object as json

    # File lib/twilio-ruby/rest/preview/understand/assistant/dialogue.rb
171 def data
172   @properties['data']
173 end
fetch() click to toggle source

Fetch the DialogueInstance @return [DialogueInstance] Fetched DialogueInstance

    # File lib/twilio-ruby/rest/preview/understand/assistant/dialogue.rb
184 def fetch
185   context.fetch
186 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/preview/understand/assistant/dialogue.rb
197 def inspect
198   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
199   "<Twilio.Preview.Understand.DialogueInstance #{values}>"
200 end
sid() click to toggle source

@return [String] The unique ID of the Dialogue

    # File lib/twilio-ruby/rest/preview/understand/assistant/dialogue.rb
165 def sid
166   @properties['sid']
167 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/preview/understand/assistant/dialogue.rb
190 def to_s
191   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
192   "<Twilio.Preview.Understand.DialogueInstance #{values}>"
193 end
url() click to toggle source

@return [String] The url

    # File lib/twilio-ruby/rest/preview/understand/assistant/dialogue.rb
177 def url
178   @properties['url']
179 end