class Twilio::REST::Autopilot::V1::AssistantContext::StyleSheetInstance

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) click to toggle source

Initialize the StyleSheetInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] assistant_sid The SID of the

{Assistant}[https://www.twilio.com/docs/autopilot/api/assistant] that is the
parent of the resource.

@return [StyleSheetInstance] StyleSheetInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb
134 def initialize(version, payload, assistant_sid: nil)
135   super(version)
136 
137   # Marshaled Properties
138   @properties = {
139       'account_sid' => payload['account_sid'],
140       'assistant_sid' => payload['assistant_sid'],
141       'url' => payload['url'],
142       'data' => payload['data'],
143   }
144 
145   # Context
146   @instance_context = nil
147   @params = {'assistant_sid' => assistant_sid, }
148 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The SID of the Account that created the resource

    # File lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb
163 def account_sid
164   @properties['account_sid']
165 end
assistant_sid() click to toggle source

@return [String] The SID of the Assistant that is the parent of the resource

    # File lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb
169 def assistant_sid
170   @properties['assistant_sid']
171 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 [StyleSheetContext] StyleSheetContext for this StyleSheetInstance

    # File lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb
154 def context
155   unless @instance_context
156     @instance_context = StyleSheetContext.new(@version, @params['assistant_sid'], )
157   end
158   @instance_context
159 end
data() click to toggle source

@return [Hash] The JSON string that describes the style sheet object

    # File lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb
181 def data
182   @properties['data']
183 end
fetch() click to toggle source

Fetch the StyleSheetInstance @return [StyleSheetInstance] Fetched StyleSheetInstance

    # File lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb
188 def fetch
189   context.fetch
190 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb
209 def inspect
210   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
211   "<Twilio.Autopilot.V1.StyleSheetInstance #{values}>"
212 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb
202 def to_s
203   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
204   "<Twilio.Autopilot.V1.StyleSheetInstance #{values}>"
205 end
update(style_sheet: :unset) click to toggle source

Update the StyleSheetInstance @param [Hash] style_sheet The JSON string that describes the style sheet object. @return [StyleSheetInstance] Updated StyleSheetInstance

    # File lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb
196 def update(style_sheet: :unset)
197   context.update(style_sheet: style_sheet, )
198 end
url() click to toggle source

@return [String] The absolute URL of the StyleSheet resource

    # File lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb
175 def url
176   @properties['url']
177 end