Class: Twilio::REST::FlexApi::V1::InsightsQuestionnairesQuestionContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::FlexApi::V1::InsightsQuestionnairesQuestionContext
- Defined in:
- lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb
Instance Method Summary collapse
-
#delete(authorization: :unset) ⇒ Boolean
Delete the InsightsQuestionnairesQuestionInstance.
-
#initialize(version, question_sid) ⇒ InsightsQuestionnairesQuestionContext
constructor
Initialize the InsightsQuestionnairesQuestionContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(allow_na: nil, category_sid: :unset, question: :unset, description: :unset, answer_set_id: :unset, authorization: :unset) ⇒ InsightsQuestionnairesQuestionInstance
Update the InsightsQuestionnairesQuestionInstance.
Constructor Details
#initialize(version, question_sid) ⇒ InsightsQuestionnairesQuestionContext
Initialize the InsightsQuestionnairesQuestionContext
188 189 190 191 192 193 194 195 196 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb', line 188 def initialize(version, question_sid) super(version) # Path Solution @solution = { question_sid: question_sid, } @uri = "/Insights/QualityManagement/Questions/#{@solution[:question_sid]}" end |
Instance Method Details
#delete(authorization: :unset) ⇒ Boolean
Delete the InsightsQuestionnairesQuestionInstance
201 202 203 204 205 206 207 208 209 210 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb', line 201 def delete( authorization: :unset ) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'Authorization' => , }) @version.delete('DELETE', @uri, headers: headers) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
262 263 264 265 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb', line 262 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.InsightsQuestionnairesQuestionContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
255 256 257 258 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb', line 255 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.InsightsQuestionnairesQuestionContext #{context}>" end |
#update(allow_na: nil, category_sid: :unset, question: :unset, description: :unset, answer_set_id: :unset, authorization: :unset) ⇒ InsightsQuestionnairesQuestionInstance
Update the InsightsQuestionnairesQuestionInstance
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb', line 221 def update( allow_na: nil, category_sid: :unset, question: :unset, description: :unset, answer_set_id: :unset, authorization: :unset ) data = Twilio::Values.of({ 'AllowNa' => allow_na, 'CategorySid' => category_sid, 'Question' => question, 'Description' => description, 'AnswerSetId' => answer_set_id, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'Authorization' => , }) payload = @version.update('POST', @uri, data: data, headers: headers) InsightsQuestionnairesQuestionInstance.new( @version, payload, question_sid: @solution[:question_sid], ) end |