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(authorization: :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, authorization: :unset) ⇒ InsightsQuestionnairesCategoryInstance
Update the InsightsQuestionnairesCategoryInstance.
- #url ⇒ String
Constructor Details
#initialize(version, payload, category_sid: nil) ⇒ InsightsQuestionnairesCategoryInstance
Initialize the InsightsQuestionnairesCategoryInstance
507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 507 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.
537 538 539 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 537 def account_sid @properties['account_sid'] end |
#category_sid ⇒ String
Returns The SID of the category.
543 544 545 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 543 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
528 529 530 531 532 533 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 528 def context unless @instance_context @instance_context = InsightsQuestionnairesCategoryContext.new(@version , @params['category_sid']) end @instance_context end |
#delete(authorization: :unset) ⇒ Boolean
Delete the InsightsQuestionnairesCategoryInstance
563 564 565 566 567 568 569 570 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 563 def delete( authorization: :unset ) context.delete( authorization: , ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
597 598 599 600 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 597 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.InsightsQuestionnairesCategoryInstance #{values}>" end |
#name ⇒ String
Returns The name of this category.
549 550 551 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 549 def name @properties['name'] end |
#to_s ⇒ Object
Provide a user friendly representation
590 591 592 593 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 590 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.InsightsQuestionnairesCategoryInstance #{values}>" end |
#update(name: nil, authorization: :unset) ⇒ InsightsQuestionnairesCategoryInstance
Update the InsightsQuestionnairesCategoryInstance
577 578 579 580 581 582 583 584 585 586 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 577 def update( name: nil, authorization: :unset ) context.update( name: name, authorization: , ) end |
#url ⇒ String
555 556 557 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 555 def url @properties['url'] end |