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
202 203 204 205 206 207 208 209 210 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 202 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
255 256 257 258 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 255 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.AssessmentsContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
248 249 250 251 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 248 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
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
# File 'lib/twilio-ruby/rest/flex_api/v1/assessments.rb', line 218 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({'Content-Type' => 'application/x-www-form-urlencoded', 'Authorization' => , }) payload = @version.update('POST', @uri, data: data, headers: headers) AssessmentsInstance.new( @version, payload, assessment_sid: @solution[:assessment_sid], ) end |