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
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.
-
#active ⇒ Boolean
Is questionnaire enabled ?.
-
#context ⇒ InsightsQuestionnairesContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#delete(token: :unset) ⇒ Boolean
Delete the InsightsQuestionnairesInstance.
-
#description ⇒ String
The questionnaire description.
-
#fetch(token: :unset) ⇒ InsightsQuestionnairesInstance
Fetch the InsightsQuestionnairesInstance.
-
#id ⇒ String
The questionnaire id.
-
#initialize(version, payload, id: nil) ⇒ InsightsQuestionnairesInstance
constructor
Initialize the InsightsQuestionnairesInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#name ⇒ String
The category name.
-
#questions ⇒ Array[Hash]
The questions list.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(active: nil, name: :unset, description: :unset, question_ids: :unset, token: :unset) ⇒ InsightsQuestionnairesInstance
Update the InsightsQuestionnairesInstance.
-
#url ⇒ String
The url.
Constructor Details
#initialize(version, payload, id: nil) ⇒ InsightsQuestionnairesInstance
Initialize the InsightsQuestionnairesInstance
270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 270 def initialize(version, payload, id: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'id' => payload['id'], 'name' => payload['name'], 'description' => payload['description'], 'active' => payload['active'], 'questions' => payload['questions'], 'url' => payload['url'], } # Context @instance_context = nil @params = {'id' => id || @properties['id'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the Account that created the resource and owns this Flex Insights.
302 303 304 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 302 def account_sid @properties['account_sid'] end |
#active ⇒ Boolean
Returns Is questionnaire enabled ?.
326 327 328 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 326 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
293 294 295 296 297 298 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 293 def context unless @instance_context @instance_context = InsightsQuestionnairesContext.new(@version, @params['id'], ) end @instance_context end |
#delete(token: :unset) ⇒ Boolean
Delete the InsightsQuestionnairesInstance
365 366 367 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 365 def delete(token: :unset) context.delete(token: token, ) end |
#description ⇒ String
Returns The questionnaire description.
320 321 322 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 320 def description @properties['description'] end |
#fetch(token: :unset) ⇒ InsightsQuestionnairesInstance
Fetch the InsightsQuestionnairesInstance
373 374 375 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 373 def fetch(token: :unset) context.fetch(token: token, ) end |
#id ⇒ String
Returns The questionnaire id.
308 309 310 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 308 def id @properties['id'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
386 387 388 389 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 386 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.InsightsQuestionnairesInstance #{values}>" end |
#name ⇒ String
Returns The category name.
314 315 316 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 314 def name @properties['name'] end |
#questions ⇒ Array[Hash]
Returns The questions list.
332 333 334 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 332 def questions @properties['questions'] end |
#to_s ⇒ Object
Provide a user friendly representation
379 380 381 382 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 379 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_ids: :unset, token: :unset) ⇒ InsightsQuestionnairesInstance
Update the InsightsQuestionnairesInstance
351 352 353 354 355 356 357 358 359 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 351 def update(active: nil, name: :unset, description: :unset, question_ids: :unset, token: :unset) context.update( active: active, name: name, description: description, question_ids: question_ids, token: token, ) end |
#url ⇒ String
Returns The url.
338 339 340 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 338 def url @properties['url'] end |