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 ⇒ String
Offset of the conversation.
-
#report ⇒ Boolean
The flag indicating if this assessment is part of report.
-
#segment_id ⇒ String
Segment Id of conversation.
- #timestamp ⇒ String
-
#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 ⇒ String
The weightage given to this comment.
Constructor Details
#initialize(version, payload, assessment_sid: nil) ⇒ AssessmentsInstance
Initialize the AssessmentsInstance
543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 543 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.
583 584 585 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 583 def account_sid @properties['account_sid'] end |
#agent_id ⇒ String
Returns The id of the Agent.
613 614 615 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 613 def agent_id @properties['agent_id'] end |
#answer_id ⇒ String
Returns The id of the answer selected by user.
643 644 645 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 643 def answer_id @properties['answer_id'] end |
#answer_text ⇒ String
Returns The answer text selected by user.
637 638 639 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 637 def answer_text @properties['answer_text'] end |
#assessment ⇒ Hash
Returns Assessment Details associated with an assessment.
649 650 651 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 649 def assessment @properties['assessment'] end |
#assessment_sid ⇒ String
Returns The SID of the assessment.
589 590 591 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 589 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
574 575 576 577 578 579 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 574 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
696 697 698 699 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 696 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.AssessmentsInstance #{values}>" end |
#offset ⇒ String
Returns Offset of the conversation.
595 596 597 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 595 def offset @properties['offset'] end |
#report ⇒ Boolean
Returns The flag indicating if this assessment is part of report.
601 602 603 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 601 def report @properties['report'] end |
#segment_id ⇒ String
Returns Segment Id of conversation.
619 620 621 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 619 def segment_id @properties['segment_id'] end |
#timestamp ⇒ String
655 656 657 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 655 def @properties['timestamp'] end |
#to_s ⇒ Object
Provide a user friendly representation
689 690 691 692 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 689 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
672 673 674 675 676 677 678 679 680 681 682 683 684 685 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 672 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
661 662 663 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 661 def url @properties['url'] end |
#user_email ⇒ String
Returns The email id of the user.
631 632 633 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 631 def user_email @properties['user_email'] end |
#user_name ⇒ String
Returns The name of the user.
625 626 627 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 625 def user_name @properties['user_name'] end |
#weight ⇒ String
Returns The weightage given to this comment.
607 608 609 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 607 def weight @properties['weight'] end |