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
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
-
#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
177 178 179 180 181 182 183 184 185 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 177 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
190 191 192 193 194 195 196 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 190 def delete( authorization: :unset ) headers = Twilio::Values.of({ 'Authorization' => , }) @version.delete('DELETE', @uri, headers: headers) end |
#fetch(authorization: :unset) ⇒ InsightsQuestionnairesInstance
Fetch the InsightsQuestionnairesInstance
202 203 204 205 206 207 208 209 210 211 212 213 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 202 def fetch( authorization: :unset ) headers = Twilio::Values.of({ '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
257 258 259 260 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 257 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.InsightsQuestionnairesContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
250 251 252 253 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 250 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
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 223 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({ 'Authorization' => , }) payload = @version.update('POST', @uri, data: data, headers: headers) InsightsQuestionnairesInstance.new( @version, payload, questionnaire_sid: @solution[:questionnaire_sid], ) end |