Class: Twilio::REST::Preview::Understand::AssistantContext::StyleSheetInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Preview::Understand::AssistantContext::StyleSheetInstance
- Defined in:
- lib/twilio-ruby/rest/preview/understand/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
-
#account_sid ⇒ String
The unique ID of the Account that created this Assistant.
-
#assistant_sid ⇒ String
The unique ID of the Assistant.
-
#context ⇒ StyleSheetContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#data ⇒ Hash
The JSON style sheet object.
-
#fetch ⇒ StyleSheetInstance
Fetch the StyleSheetInstance.
-
#initialize(version, payload, assistant_sid: nil) ⇒ StyleSheetInstance
constructor
Initialize the StyleSheetInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(style_sheet: :unset) ⇒ StyleSheetInstance
Update the StyleSheetInstance.
-
#url ⇒ String
The url.
Constructor Details
#initialize(version, payload, assistant_sid: nil) ⇒ StyleSheetInstance
Initialize the StyleSheetInstance
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb', line 128 def initialize(version, payload, assistant_sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'assistant_sid' => payload['assistant_sid'], 'url' => payload['url'], 'data' => payload['data'], } # Context @instance_context = nil @params = {'assistant_sid' => assistant_sid, } end |
Instance Method Details
#account_sid ⇒ String
Returns The unique ID of the Account that created this Assistant.
157 158 159 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb', line 157 def account_sid @properties['account_sid'] end |
#assistant_sid ⇒ String
Returns The unique ID of the Assistant.
163 164 165 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb', line 163 def assistant_sid @properties['assistant_sid'] end |
#context ⇒ StyleSheetContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
148 149 150 151 152 153 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb', line 148 def context unless @instance_context @instance_context = StyleSheetContext.new(@version, @params['assistant_sid'], ) end @instance_context end |
#data ⇒ Hash
Returns The JSON style sheet object.
175 176 177 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb', line 175 def data @properties['data'] end |
#fetch ⇒ StyleSheetInstance
Fetch the StyleSheetInstance
182 183 184 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb', line 182 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
203 204 205 206 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb', line 203 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Understand.StyleSheetInstance #{values}>" end |
#to_s ⇒ Object
Provide a user friendly representation
196 197 198 199 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb', line 196 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Understand.StyleSheetInstance #{values}>" end |
#update(style_sheet: :unset) ⇒ StyleSheetInstance
Update the StyleSheetInstance
190 191 192 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb', line 190 def update(style_sheet: :unset) context.update(style_sheet: style_sheet, ) end |
#url ⇒ String
Returns The url.
169 170 171 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb', line 169 def url @properties['url'] end |