Class: Twilio::REST::FlexApi::V1::InsightsQuestionnairesContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::FlexApi::V1::InsightsQuestionnairesContext
- Defined in:
- lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb
Instance Method Summary collapse
-
#delete(authorization: :unset) ⇒ Boolean
Delete the InsightsQuestionnairesInstance.
-
#fetch(authorization: :unset) ⇒ InsightsQuestionnairesInstance
Fetch the InsightsQuestionnairesInstance.
-
#initialize(version, questionnaire_sid) ⇒ InsightsQuestionnairesContext
constructor
Initialize the InsightsQuestionnairesContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(active: nil, name: :unset, description: :unset, question_sids: :unset, authorization: :unset) ⇒ InsightsQuestionnairesInstance
Update the InsightsQuestionnairesInstance.
Constructor Details
#initialize(version, questionnaire_sid) ⇒ InsightsQuestionnairesContext
Initialize the InsightsQuestionnairesContext
184 185 186 187 188 189 190 191 192 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 184 def initialize(version, questionnaire_sid) super(version) # Path Solution @solution = { questionnaire_sid: questionnaire_sid, } @uri = "/Insights/QualityManagement/Questionnaires/#{@solution[:questionnaire_sid]}" end |
Instance Method Details
#delete(authorization: :unset) ⇒ Boolean
Delete the InsightsQuestionnairesInstance
197 198 199 200 201 202 203 204 205 206 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 197 def delete( authorization: :unset ) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'Authorization' => , }) @version.delete('DELETE', @uri, headers: headers) end |
#fetch(authorization: :unset) ⇒ InsightsQuestionnairesInstance
Fetch the InsightsQuestionnairesInstance
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 212 def fetch( authorization: :unset ) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'Authorization' => , }) payload = @version.fetch('GET', @uri, headers: headers) InsightsQuestionnairesInstance.new( @version, payload, questionnaire_sid: @solution[:questionnaire_sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
277 278 279 280 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 277 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.InsightsQuestionnairesContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
270 271 272 273 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 270 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.InsightsQuestionnairesContext #{context}>" end |
#update(active: nil, name: :unset, description: :unset, question_sids: :unset, authorization: :unset) ⇒ InsightsQuestionnairesInstance
Update the InsightsQuestionnairesInstance
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 238 def update( active: nil, name: :unset, description: :unset, question_sids: :unset, authorization: :unset ) data = Twilio::Values.of({ 'Active' => active, 'Name' => name, 'Description' => description, 'QuestionSids' => Twilio.serialize_list(question_sids) { |e| e }, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'Authorization' => , }) payload = @version.update('POST', @uri, data: data, headers: headers) InsightsQuestionnairesInstance.new( @version, payload, questionnaire_sid: @solution[:questionnaire_sid], ) end |