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
Instance Method Summary collapse
-
#delete(authorization: :unset) ⇒ Boolean
Delete the InsightsQuestionnairesCategoryInstance.
-
#delete_with_metadata(authorization: :unset) ⇒ Boolean
Delete the InsightsQuestionnairesCategoryInstanceMetadata.
-
#initialize(version, category_sid) ⇒ InsightsQuestionnairesCategoryContext
constructor
Initialize the InsightsQuestionnairesCategoryContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(name: nil, authorization: :unset) ⇒ InsightsQuestionnairesCategoryInstance
Update the InsightsQuestionnairesCategoryInstance.
-
#update_with_metadata(name: nil, authorization: :unset) ⇒ InsightsQuestionnairesCategoryInstance
Update the InsightsQuestionnairesCategoryInstanceMetadata.
Constructor Details
#initialize(version, category_sid) ⇒ InsightsQuestionnairesCategoryContext
Initialize the InsightsQuestionnairesCategoryContext
233 234 235 236 237 238 239 240 241 242 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 233 def initialize(version, category_sid) super(version) # Path Solution @solution = { category_sid: category_sid, } @uri = "/Insights/QualityManagement/Categories/#{@solution[:category_sid]}" end |
Instance Method Details
#delete(authorization: :unset) ⇒ Boolean
Delete the InsightsQuestionnairesCategoryInstance
247 248 249 250 251 252 253 254 255 256 257 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 247 def delete( authorization: :unset ) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'Authorization' => , }) @version.delete('DELETE', @uri, headers: headers) end |
#delete_with_metadata(authorization: :unset) ⇒ Boolean
Delete the InsightsQuestionnairesCategoryInstanceMetadata
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 263 def ( authorization: :unset ) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'Authorization' => , }) response = @version.('DELETE', @uri, headers: headers) insightsQuestionnairesCategory_instance = InsightsQuestionnairesCategoryInstance.new( @version, response.body, account_sid: @solution[:account_sid], sid: @solution[:sid], ) InsightsQuestionnairesCategoryInstanceMetadata.new(@version, insightsQuestionnairesCategory_instance, response.headers, response.status_code) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
353 354 355 356 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 353 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.InsightsQuestionnairesCategoryContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
346 347 348 349 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 346 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.InsightsQuestionnairesCategoryContext #{context}>" end |
#update(name: nil, authorization: :unset) ⇒ InsightsQuestionnairesCategoryInstance
Update the InsightsQuestionnairesCategoryInstance
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 286 def update( name: nil, authorization: :unset ) data = Twilio::Values.of({ 'Name' => name, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'Authorization' => , }) payload = @version.update('POST', @uri, data: data, headers: headers) InsightsQuestionnairesCategoryInstance.new( @version, payload, category_sid: @solution[:category_sid], ) end |
#update_with_metadata(name: nil, authorization: :unset) ⇒ InsightsQuestionnairesCategoryInstance
Update the InsightsQuestionnairesCategoryInstanceMetadata
314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 314 def ( name: nil, authorization: :unset ) data = Twilio::Values.of({ 'Name' => name, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'Authorization' => , }) response = @version.('POST', @uri, data: data, headers: headers) insights_questionnaires_category_instance = InsightsQuestionnairesCategoryInstance.new( @version, response.body, category_sid: @solution[:category_sid], ) InsightsQuestionnairesCategoryInstanceMetadata.new( @version, insights_questionnaires_category_instance, response.headers, response.status_code ) end |