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
Instance Method Summary collapse
-
#initialize(version, assessment_sid) ⇒ 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, authorization: :unset) ⇒ AssessmentsInstance
Update the AssessmentsInstance.
Constructor Details
#initialize(version, assessment_sid) ⇒ AssessmentsContext
Initialize the AssessmentsContext
195 196 197 198 199 200 201 202 203 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 195 def initialize(version, assessment_sid) super(version) # Path Solution @solution = { assessment_sid: assessment_sid, } @uri = "/Insights/QualityManagement/Assessments/#{@solution[:assessment_sid]}" end |
Instance Method Details
#inspect ⇒ Object
Provide a detailed, user friendly representation
244 245 246 247 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 244 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.AssessmentsContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
237 238 239 240 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 237 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, authorization: :unset) ⇒ AssessmentsInstance
Update the AssessmentsInstance
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 211 def update( offset: nil, answer_text: nil, answer_id: nil, authorization: :unset ) data = Twilio::Values.of({ 'Offset' => offset, 'AnswerText' => answer_text, 'AnswerId' => answer_id, }) headers = Twilio::Values.of({ 'Authorization' => , }) payload = @version.update('POST', @uri, data: data, headers: headers) AssessmentsInstance.new( @version, payload, assessment_sid: @solution[:assessment_sid], ) end |