Class: Twilio::REST::Autopilot::V1::AssistantContext::DialogueContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Autopilot::V1::AssistantContext::DialogueContext
- Defined in:
- lib/twilio-ruby/rest/autopilot/v1/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 the 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
53 54 55 56 57 58 59 60 61 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/dialogue.rb', line 53 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 the DialogueInstance
65 66 67 68 69 70 71 72 73 74 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/dialogue.rb', line 65 def fetch payload = @version.fetch('GET', @uri) DialogueInstance.new( @version, payload, assistant_sid: @solution[:assistant_sid], sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
86 87 88 89 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/dialogue.rb', line 86 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Autopilot.V1.DialogueContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
79 80 81 82 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/dialogue.rb', line 79 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Autopilot.V1.DialogueContext #{context}>" end |