Class: Twilio::REST::FlexApi::V1::InsightsQuestionnairesQuestionInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::FlexApi::V1::InsightsQuestionnairesQuestionInstance
- Defined in:
- lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.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.
-
#allow_na ⇒ Boolean
The flag to enable for disable NA for answer.
-
#answer_set ⇒ Hash
Set of answers for the question.
-
#answer_set_id ⇒ String
The answer_set for the question.
-
#category ⇒ Hash
The Category for the question.
-
#context ⇒ InsightsQuestionnairesQuestionContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#delete(authorization: :unset) ⇒ Boolean
Delete the InsightsQuestionnairesQuestionInstance.
-
#description ⇒ String
The description for the question.
-
#initialize(version, payload, question_sid: nil) ⇒ InsightsQuestionnairesQuestionInstance
constructor
Initialize the InsightsQuestionnairesQuestionInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#question ⇒ String
The question.
-
#question_sid ⇒ String
The SID of the question.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(allow_na: nil, category_sid: :unset, question: :unset, description: :unset, answer_set_id: :unset, authorization: :unset) ⇒ InsightsQuestionnairesQuestionInstance
Update the InsightsQuestionnairesQuestionInstance.
- #url ⇒ String
-
#usage ⇒ String
Integer value that tells a particular question is used by how many questionnaires.
Constructor Details
#initialize(version, payload, question_sid: nil) ⇒ InsightsQuestionnairesQuestionInstance
Initialize the InsightsQuestionnairesQuestionInstance
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb', line 306 def initialize(version, payload , question_sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'question_sid' => payload['question_sid'], 'question' => payload['question'], 'description' => payload['description'], 'category' => payload['category'], 'answer_set_id' => payload['answer_set_id'], 'allow_na' => payload['allow_na'], 'usage' => payload['usage'] == nil ? payload['usage'] : payload['usage'].to_i, 'answer_set' => payload['answer_set'], 'url' => payload['url'], } # Context @instance_context = nil @params = { 'question_sid' => question_sid || @properties['question_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.
341 342 343 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb', line 341 def account_sid @properties['account_sid'] end |
#allow_na ⇒ Boolean
Returns The flag to enable for disable NA for answer.
377 378 379 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb', line 377 def allow_na @properties['allow_na'] end |
#answer_set ⇒ Hash
Returns Set of answers for the question.
389 390 391 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb', line 389 def answer_set @properties['answer_set'] end |
#answer_set_id ⇒ String
Returns The answer_set for the question.
371 372 373 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb', line 371 def answer_set_id @properties['answer_set_id'] end |
#category ⇒ Hash
Returns The Category for the question.
365 366 367 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb', line 365 def category @properties['category'] end |
#context ⇒ InsightsQuestionnairesQuestionContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
332 333 334 335 336 337 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb', line 332 def context unless @instance_context @instance_context = InsightsQuestionnairesQuestionContext.new(@version , @params['question_sid']) end @instance_context end |
#delete(authorization: :unset) ⇒ Boolean
Delete the InsightsQuestionnairesQuestionInstance
403 404 405 406 407 408 409 410 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb', line 403 def delete( authorization: :unset ) context.delete( authorization: , ) end |
#description ⇒ String
Returns The description for the question.
359 360 361 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb', line 359 def description @properties['description'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
449 450 451 452 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb', line 449 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.InsightsQuestionnairesQuestionInstance #{values}>" end |
#question ⇒ String
Returns The question.
353 354 355 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb', line 353 def question @properties['question'] end |
#question_sid ⇒ String
Returns The SID of the question.
347 348 349 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb', line 347 def question_sid @properties['question_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
442 443 444 445 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb', line 442 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.InsightsQuestionnairesQuestionInstance #{values}>" end |
#update(allow_na: nil, category_sid: :unset, question: :unset, description: :unset, answer_set_id: :unset, authorization: :unset) ⇒ InsightsQuestionnairesQuestionInstance
Update the InsightsQuestionnairesQuestionInstance
421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb', line 421 def update( allow_na: nil, category_sid: :unset, question: :unset, description: :unset, answer_set_id: :unset, authorization: :unset ) context.update( allow_na: allow_na, category_sid: category_sid, question: question, description: description, answer_set_id: answer_set_id, authorization: , ) end |
#url ⇒ String
395 396 397 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb', line 395 def url @properties['url'] end |
#usage ⇒ String
Returns Integer value that tells a particular question is used by how many questionnaires.
383 384 385 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb', line 383 def usage @properties['usage'] end |