Class: Twilio::REST::FlexApi::V1::AssessmentsInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::FlexApi::V1::AssessmentsInstance
- Defined in:
- lib/twilio-ruby/rest/flex_api/v1/assessments.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The unique SID identifier of the Account.
-
#agent_id ⇒ String
The id of the Agent.
-
#answer_id ⇒ String
The id of the answer selected by user.
-
#answer_text ⇒ String
The answer text selected by user.
-
#assessment ⇒ Hash
Assessment Details associated with an assessment.
-
#assessment_sid ⇒ String
The SID of the assessment.
-
#context ⇒ AssessmentsContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#initialize(version, payload, assessment_sid: nil) ⇒ AssessmentsInstance
constructor
Initialize the AssessmentsInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#offset ⇒ Float
Offset of the conversation.
-
#report ⇒ Boolean
The flag indicating if this assessment is part of report.
-
#segment_id ⇒ String
Segment Id of conversation.
- #timestamp ⇒ Float
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(offset: nil, answer_text: nil, answer_id: nil, authorization: :unset) ⇒ AssessmentsInstance
Update the AssessmentsInstance.
- #url ⇒ String
-
#user_email ⇒ String
The email id of the user.
-
#user_name ⇒ String
The name of the user.
-
#weight ⇒ Float
The weightage given to this comment.
Constructor Details
#initialize(version, payload, assessment_sid: nil) ⇒ AssessmentsInstance
Initialize the AssessmentsInstance
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 299 def initialize(version, payload , assessment_sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'assessment_sid' => payload['assessment_sid'], 'offset' => payload['offset'], 'report' => payload['report'], 'weight' => payload['weight'], 'agent_id' => payload['agent_id'], 'segment_id' => payload['segment_id'], 'user_name' => payload['user_name'], 'user_email' => payload['user_email'], 'answer_text' => payload['answer_text'], 'answer_id' => payload['answer_id'], 'assessment' => payload['assessment'], 'timestamp' => payload['timestamp'], 'url' => payload['url'], } # Context @instance_context = nil @params = { 'assessment_sid' => assessment_sid || @properties['assessment_sid'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The unique SID identifier of the Account.
338 339 340 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 338 def account_sid @properties['account_sid'] end |
#agent_id ⇒ String
Returns The id of the Agent.
368 369 370 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 368 def agent_id @properties['agent_id'] end |
#answer_id ⇒ String
Returns The id of the answer selected by user.
398 399 400 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 398 def answer_id @properties['answer_id'] end |
#answer_text ⇒ String
Returns The answer text selected by user.
392 393 394 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 392 def answer_text @properties['answer_text'] end |
#assessment ⇒ Hash
Returns Assessment Details associated with an assessment.
404 405 406 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 404 def assessment @properties['assessment'] end |
#assessment_sid ⇒ String
Returns The SID of the assessment.
344 345 346 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 344 def assessment_sid @properties['assessment_sid'] end |
#context ⇒ AssessmentsContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
329 330 331 332 333 334 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 329 def context unless @instance_context @instance_context = AssessmentsContext.new(@version , @params['assessment_sid']) end @instance_context end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
451 452 453 454 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 451 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.AssessmentsInstance #{values}>" end |
#offset ⇒ Float
Returns Offset of the conversation.
350 351 352 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 350 def offset @properties['offset'] end |
#report ⇒ Boolean
Returns The flag indicating if this assessment is part of report.
356 357 358 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 356 def report @properties['report'] end |
#segment_id ⇒ String
Returns Segment Id of conversation.
374 375 376 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 374 def segment_id @properties['segment_id'] end |
#timestamp ⇒ Float
410 411 412 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 410 def @properties['timestamp'] end |
#to_s ⇒ Object
Provide a user friendly representation
444 445 446 447 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 444 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.AssessmentsInstance #{values}>" end |
#update(offset: nil, answer_text: nil, answer_id: nil, authorization: :unset) ⇒ AssessmentsInstance
Update the AssessmentsInstance
427 428 429 430 431 432 433 434 435 436 437 438 439 440 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 427 def update( offset: nil, answer_text: nil, answer_id: nil, authorization: :unset ) context.update( offset: offset, answer_text: answer_text, answer_id: answer_id, authorization: , ) end |
#url ⇒ String
416 417 418 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 416 def url @properties['url'] end |
#user_email ⇒ String
Returns The email id of the user.
386 387 388 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 386 def user_email @properties['user_email'] end |
#user_name ⇒ String
Returns The name of the user.
380 381 382 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 380 def user_name @properties['user_name'] end |
#weight ⇒ Float
Returns The weightage given to this comment.
362 363 364 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 362 def weight @properties['weight'] end |