Class: Twilio::REST::FlexApi::V1::InsightsQuestionnairesInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::FlexApi::V1::InsightsQuestionnairesInstance
- Defined in:
- lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.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.
-
#active ⇒ Boolean
The flag to enable or disable questionnaire.
-
#context ⇒ InsightsQuestionnairesContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#delete(authorization: :unset) ⇒ Boolean
Delete the InsightsQuestionnairesInstance.
-
#description ⇒ String
The description of this questionnaire.
-
#fetch(authorization: :unset) ⇒ InsightsQuestionnairesInstance
Fetch the InsightsQuestionnairesInstance.
-
#initialize(version, payload, questionnaire_sid: nil) ⇒ InsightsQuestionnairesInstance
constructor
Initialize the InsightsQuestionnairesInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#name ⇒ String
The name of this category.
-
#questionnaire_sid ⇒ String
The sid of this questionnaire.
-
#questions ⇒ Array<Hash>
The list of questions with category for a questionnaire.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(active: nil, name: :unset, description: :unset, question_sids: :unset, authorization: :unset) ⇒ InsightsQuestionnairesInstance
Update the InsightsQuestionnairesInstance.
- #url ⇒ String
Constructor Details
#initialize(version, payload, questionnaire_sid: nil) ⇒ InsightsQuestionnairesInstance
Initialize the InsightsQuestionnairesInstance
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 306 def initialize(version, payload , questionnaire_sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'questionnaire_sid' => payload['questionnaire_sid'], 'name' => payload['name'], 'description' => payload['description'], 'active' => payload['active'], 'questions' => payload['questions'], 'url' => payload['url'], } # Context @instance_context = nil @params = { 'questionnaire_sid' => questionnaire_sid || @properties['questionnaire_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.
338 339 340 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 338 def account_sid @properties['account_sid'] end |
#active ⇒ Boolean
Returns The flag to enable or disable questionnaire.
362 363 364 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 362 def active @properties['active'] end |
#context ⇒ InsightsQuestionnairesContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
329 330 331 332 333 334 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 329 def context unless @instance_context @instance_context = InsightsQuestionnairesContext.new(@version , @params['questionnaire_sid']) end @instance_context end |
#delete(authorization: :unset) ⇒ Boolean
Delete the InsightsQuestionnairesInstance
382 383 384 385 386 387 388 389 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 382 def delete( authorization: :unset ) context.delete( authorization: , ) end |
#description ⇒ String
Returns The description of this questionnaire.
356 357 358 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 356 def description @properties['description'] end |
#fetch(authorization: :unset) ⇒ InsightsQuestionnairesInstance
Fetch the InsightsQuestionnairesInstance
395 396 397 398 399 400 401 402 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 395 def fetch( authorization: :unset ) context.fetch( authorization: , ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
438 439 440 441 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 438 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.InsightsQuestionnairesInstance #{values}>" end |
#name ⇒ String
Returns The name of this category.
350 351 352 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 350 def name @properties['name'] end |
#questionnaire_sid ⇒ String
Returns The sid of this questionnaire.
344 345 346 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 344 def questionnaire_sid @properties['questionnaire_sid'] end |
#questions ⇒ Array<Hash>
Returns The list of questions with category for a questionnaire.
368 369 370 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 368 def questions @properties['questions'] end |
#to_s ⇒ Object
Provide a user friendly representation
431 432 433 434 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 431 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.InsightsQuestionnairesInstance #{values}>" end |
#update(active: nil, name: :unset, description: :unset, question_sids: :unset, authorization: :unset) ⇒ InsightsQuestionnairesInstance
Update the InsightsQuestionnairesInstance
412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 412 def update( active: nil, name: :unset, description: :unset, question_sids: :unset, authorization: :unset ) context.update( active: active, name: name, description: description, question_sids: question_sids, authorization: , ) end |
#url ⇒ String
374 375 376 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 374 def url @properties['url'] end |