Class: Twilio::REST::Preview::Understand::AssistantContext::DialogueContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Preview::Understand::AssistantContext::DialogueContext
- Defined in:
- lib/twilio-ruby/rest/preview/understand/assistant/dialogue.rb
Overview
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 [email protected].
Instance Method Summary collapse
-
#fetch ⇒ DialogueInstance
Fetch a DialogueInstance.
-
#initialize(version, assistant_sid, sid) ⇒ DialogueContext
constructor
Initialize the DialogueContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, assistant_sid, sid) ⇒ DialogueContext
Initialize the DialogueContext
76 77 78 79 80 81 82 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/dialogue.rb', line 76 def initialize(version, assistant_sid, sid) super(version) # Path Solution @solution = {assistant_sid: assistant_sid, sid: sid, } @uri = "/Assistants/#{@solution[:assistant_sid]}/Dialogues/#{@solution[:sid]}" end |
Instance Method Details
#fetch ⇒ DialogueInstance
Fetch a DialogueInstance
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/dialogue.rb', line 87 def fetch params = Twilio::Values.of({}) payload = @version.fetch( 'GET', @uri, params, ) DialogueInstance.new( @version, payload, assistant_sid: @solution[:assistant_sid], sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
113 114 115 116 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/dialogue.rb', line 113 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Preview.Understand.DialogueContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
106 107 108 109 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/dialogue.rb', line 106 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Preview.Understand.DialogueContext #{context}>" end |