Class: Twilio::REST::FlexApi::V1::InsightsQuestionnairesCategoryInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::FlexApi::V1::InsightsQuestionnairesCategoryInstance
- Defined in:
- lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.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 SID of the Account that created the resource and owns this Flex Insights.
-
#category_id ⇒ String
Unique category ID.
-
#context ⇒ InsightsQuestionnairesCategoryContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#delete(token: :unset) ⇒ Boolean
Delete the InsightsQuestionnairesCategoryInstance.
-
#initialize(version, payload, category_id: nil) ⇒ InsightsQuestionnairesCategoryInstance
constructor
Initialize the InsightsQuestionnairesCategoryInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#name ⇒ String
The category name.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(name: nil, token: :unset) ⇒ InsightsQuestionnairesCategoryInstance
Update the InsightsQuestionnairesCategoryInstance.
-
#url ⇒ String
The url.
Constructor Details
#initialize(version, payload, category_id: nil) ⇒ InsightsQuestionnairesCategoryInstance
Initialize the InsightsQuestionnairesCategoryInstance
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 228 def initialize(version, payload, category_id: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'category_id' => payload['category_id'], 'name' => payload['name'], 'url' => payload['url'], } # Context @instance_context = nil @params = {'category_id' => category_id || @properties['category_id'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the Account that created the resource and owns this Flex Insights.
257 258 259 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 257 def account_sid @properties['account_sid'] end |
#category_id ⇒ String
Returns Unique category ID.
263 264 265 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 263 def category_id @properties['category_id'] end |
#context ⇒ InsightsQuestionnairesCategoryContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
248 249 250 251 252 253 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 248 def context unless @instance_context @instance_context = InsightsQuestionnairesCategoryContext.new(@version, @params['category_id'], ) end @instance_context end |
#delete(token: :unset) ⇒ Boolean
Delete the InsightsQuestionnairesCategoryInstance
292 293 294 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 292 def delete(token: :unset) context.delete(token: token, ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
305 306 307 308 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 305 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.InsightsQuestionnairesCategoryInstance #{values}>" end |
#name ⇒ String
Returns The category name.
269 270 271 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 269 def name @properties['name'] end |
#to_s ⇒ Object
Provide a user friendly representation
298 299 300 301 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 298 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.InsightsQuestionnairesCategoryInstance #{values}>" end |
#update(name: nil, token: :unset) ⇒ InsightsQuestionnairesCategoryInstance
Update the InsightsQuestionnairesCategoryInstance
284 285 286 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 284 def update(name: nil, token: :unset) context.update(name: name, token: token, ) end |
#url ⇒ String
Returns The url.
275 276 277 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 275 def url @properties['url'] end |