class Twilio::REST::Preview::Understand::AssistantContext::StyleSheetContext
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, assistant_sid)
click to toggle source
Initialize the StyleSheetContext
@param [Version] version Version
that contains the resource @param [String] assistant_sid The unique ID of the Assistant @return [StyleSheetContext] StyleSheetContext
Calls superclass method
Twilio::REST::InstanceContext::new
# File lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb 75 def initialize(version, assistant_sid) 76 super(version) 77 78 # Path Solution 79 @solution = {assistant_sid: assistant_sid, } 80 @uri = "/Assistants/#{@solution[:assistant_sid]}/StyleSheet" 81 end
Public Instance Methods
fetch()
click to toggle source
Fetch the StyleSheetInstance
@return [StyleSheetInstance] Fetched StyleSheetInstance
# File lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb 86 def fetch 87 payload = @version.fetch('GET', @uri) 88 89 StyleSheetInstance.new(@version, payload, assistant_sid: @solution[:assistant_sid], ) 90 end
inspect()
click to toggle source
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb 113 def inspect 114 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 115 "#<Twilio.Preview.Understand.StyleSheetContext #{context}>" 116 end
to_s()
click to toggle source
Provide a user friendly representation
# File lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb 106 def to_s 107 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 108 "#<Twilio.Preview.Understand.StyleSheetContext #{context}>" 109 end
update(style_sheet: :unset)
click to toggle source
Update the StyleSheetInstance
@param [Hash] style_sheet The JSON Style sheet string @return [StyleSheetInstance] Updated StyleSheetInstance
# File lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb 96 def update(style_sheet: :unset) 97 data = Twilio::Values.of({'StyleSheet' => Twilio.serialize_object(style_sheet), }) 98 99 payload = @version.update('POST', @uri, data: data) 100 101 StyleSheetInstance.new(@version, payload, assistant_sid: @solution[:assistant_sid], ) 102 end