Class: Twilio::REST::Autopilot::V1::AssistantContext::StyleSheetContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Autopilot::V1::AssistantContext::StyleSheetContext
- Defined in:
- lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.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 ⇒ StyleSheetInstance
Fetch the StyleSheetInstance.
-
#initialize(version, assistant_sid) ⇒ StyleSheetContext
constructor
Initialize the StyleSheetContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(style_sheet: :unset) ⇒ StyleSheetInstance
Update the StyleSheetInstance.
Constructor Details
#initialize(version, assistant_sid) ⇒ StyleSheetContext
Initialize the StyleSheetContext
79 80 81 82 83 84 85 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb', line 79 def initialize(version, assistant_sid) super(version) # Path Solution @solution = {assistant_sid: assistant_sid, } @uri = "/Assistants/#{@solution[:assistant_sid]}/StyleSheet" end |
Instance Method Details
#fetch ⇒ StyleSheetInstance
Fetch the StyleSheetInstance
90 91 92 93 94 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb', line 90 def fetch payload = @version.fetch('GET', @uri) StyleSheetInstance.new(@version, payload, assistant_sid: @solution[:assistant_sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
117 118 119 120 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb', line 117 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Autopilot.V1.StyleSheetContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
110 111 112 113 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb', line 110 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Autopilot.V1.StyleSheetContext #{context}>" end |
#update(style_sheet: :unset) ⇒ StyleSheetInstance
Update the StyleSheetInstance
100 101 102 103 104 105 106 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb', line 100 def update(style_sheet: :unset) data = Twilio::Values.of({'StyleSheet' => Twilio.serialize_object(style_sheet), }) payload = @version.update('POST', @uri, data: data) StyleSheetInstance.new(@version, payload, assistant_sid: @solution[:assistant_sid], ) end |