Class: Twilio::REST::FlexApi::V1::InsightsQuestionnairesCategoryContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::FlexApi::V1::InsightsQuestionnairesCategoryContext
- Defined in:
- lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.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
-
#delete(token: :unset) ⇒ Boolean
Delete the InsightsQuestionnairesCategoryInstance.
-
#initialize(version, category_id) ⇒ InsightsQuestionnairesCategoryContext
constructor
Initialize the InsightsQuestionnairesCategoryContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(name: nil, token: :unset) ⇒ InsightsQuestionnairesCategoryInstance
Update the InsightsQuestionnairesCategoryInstance.
Constructor Details
#initialize(version, category_id) ⇒ InsightsQuestionnairesCategoryContext
Initialize the InsightsQuestionnairesCategoryContext
172 173 174 175 176 177 178 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 172 def initialize(version, category_id) super(version) # Path Solution @solution = {category_id: category_id, } @uri = "/Insights/QM/Categories/#{@solution[:category_id]}" end |
Instance Method Details
#delete(token: :unset) ⇒ Boolean
Delete the InsightsQuestionnairesCategoryInstance
198 199 200 201 202 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 198 def delete(token: :unset) headers = Twilio::Values.of({'Token' => token, }) @version.delete('DELETE', @uri, headers: headers) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
213 214 215 216 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 213 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.InsightsQuestionnairesCategoryContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
206 207 208 209 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 206 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.InsightsQuestionnairesCategoryContext #{context}>" end |
#update(name: nil, token: :unset) ⇒ InsightsQuestionnairesCategoryInstance
Update the InsightsQuestionnairesCategoryInstance
185 186 187 188 189 190 191 192 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 185 def update(name: nil, token: :unset) data = Twilio::Values.of({'Name' => name, }) headers = Twilio::Values.of({'Token' => token, }) payload = @version.update('POST', @uri, data: data, headers: headers) InsightsQuestionnairesCategoryInstance.new(@version, payload, category_id: @solution[:category_id], ) end |