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
200 201 202 203 204 205 206 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 200 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
233 234 235 236 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 233 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.AssessmentsContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
226 227 228 229 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 226 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
215 216 217 218 219 220 221 222 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 215 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 |