Class: Twilio::REST::FlexApi::V1::AssessmentsContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::FlexApi::V1::AssessmentsContext
- Defined in:
- lib/twilio-ruby/rest/flex_api/v1/assessments.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
-
#initialize(version, assessment_id) ⇒ AssessmentsContext
constructor
Initialize the AssessmentsContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(offset: nil, answer_text: nil, answer_id: nil, token: :unset) ⇒ AssessmentsInstance
Update the AssessmentsInstance.
Constructor Details
#initialize(version, assessment_id) ⇒ AssessmentsContext
Initialize the AssessmentsContext
112 113 114 115 116 117 118 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 112 def initialize(version, assessment_id) super(version) # Path Solution @solution = {assessment_id: assessment_id, } @uri = "/Insights/QM/Assessments/#{@solution[:assessment_id]}" end |
Instance Method Details
#inspect ⇒ Object
Provide a detailed, user friendly representation
145 146 147 148 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 145 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.AssessmentsContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
138 139 140 141 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 138 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.AssessmentsContext #{context}>" end |
#update(offset: nil, answer_text: nil, answer_id: nil, token: :unset) ⇒ AssessmentsInstance
Update the AssessmentsInstance
127 128 129 130 131 132 133 134 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 127 def update(offset: nil, answer_text: nil, answer_id: nil, token: :unset) data = Twilio::Values.of({'Offset' => offset, 'AnswerText' => answer_text, 'AnswerId' => answer_id, }) headers = Twilio::Values.of({'Token' => token, }) payload = @version.update('POST', @uri, data: data, headers: headers) AssessmentsInstance.new(@version, payload, assessment_id: @solution[:assessment_id], ) end |