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
235 236 237 238 239 240 241 242 243 244 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 235 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
249 250 251 252 253 254 255 256 257 258 259 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 249 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
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 265 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
355 356 357 358 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 355 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.InsightsQuestionnairesCategoryContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
348 349 350 351 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 348 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
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 288 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
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 342 343 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 316 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 |