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
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Flex Insights resource and owns this resource.
-
#category_sid ⇒ String
The SID of the category.
-
#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_sid: nil) ⇒ InsightsQuestionnairesCategoryInstance
constructor
Initialize the InsightsQuestionnairesCategoryInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#name ⇒ String
The name of this category.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(name: nil, token: :unset) ⇒ InsightsQuestionnairesCategoryInstance
Update the InsightsQuestionnairesCategoryInstance.
- #url ⇒ String
Constructor Details
#initialize(version, payload, category_sid: nil) ⇒ InsightsQuestionnairesCategoryInstance
Initialize the InsightsQuestionnairesCategoryInstance
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 262 def initialize(version, payload , category_sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'category_sid' => payload['category_sid'], 'name' => payload['name'], 'url' => payload['url'], } # Context @instance_context = nil @params = { 'category_sid' => category_sid || @properties['category_sid'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Flex Insights resource and owns this resource.
291 292 293 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 291 def account_sid @properties['account_sid'] end |
#category_sid ⇒ String
Returns The SID of the category.
297 298 299 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 297 def category_sid @properties['category_sid'] 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
282 283 284 285 286 287 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 282 def context unless @instance_context @instance_context = InsightsQuestionnairesCategoryContext.new(@version , @params['category_sid']) end @instance_context end |
#delete(token: :unset) ⇒ Boolean
Delete the InsightsQuestionnairesCategoryInstance
317 318 319 320 321 322 323 324 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 317 def delete( token: :unset ) context.delete( token: token, ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
351 352 353 354 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 351 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.InsightsQuestionnairesCategoryInstance #{values}>" end |
#name ⇒ String
Returns The name of this category.
303 304 305 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 303 def name @properties['name'] end |
#to_s ⇒ Object
Provide a user friendly representation
344 345 346 347 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 344 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
331 332 333 334 335 336 337 338 339 340 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 331 def update( name: nil, token: :unset ) context.update( name: name, token: token, ) end |
#url ⇒ String
309 310 311 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 309 def url @properties['url'] end |