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(token: :unset) ⇒ Boolean
Delete the InsightsQuestionnairesInstance.
-
#fetch(token: :unset) ⇒ InsightsQuestionnairesInstance
Fetch the InsightsQuestionnairesInstance.
-
#initialize(version, id) ⇒ 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_ids: :unset, token: :unset) ⇒ InsightsQuestionnairesInstance
Update the InsightsQuestionnairesInstance.
Constructor Details
#initialize(version, id) ⇒ InsightsQuestionnairesContext
Initialize the InsightsQuestionnairesContext
193 194 195 196 197 198 199 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 193 def initialize(version, id) super(version) # Path Solution @solution = {id: id, } @uri = "/Insights/QM/Questionnaires/#{@solution[:id]}" end |
Instance Method Details
#delete(token: :unset) ⇒ Boolean
Delete the InsightsQuestionnairesInstance
228 229 230 231 232 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 228 def delete(token: :unset) headers = Twilio::Values.of({'Token' => token, }) @version.delete('DELETE', @uri, headers: headers) end |
#fetch(token: :unset) ⇒ InsightsQuestionnairesInstance
Fetch the InsightsQuestionnairesInstance
238 239 240 241 242 243 244 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 238 def fetch(token: :unset) headers = Twilio::Values.of({'Token' => token, }) payload = @version.fetch('GET', @uri, headers: headers) InsightsQuestionnairesInstance.new(@version, payload, id: @solution[:id], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
255 256 257 258 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 255 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.InsightsQuestionnairesContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
248 249 250 251 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 248 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_ids: :unset, token: :unset) ⇒ InsightsQuestionnairesInstance
Update the InsightsQuestionnairesInstance
210 211 212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb', line 210 def update(active: nil, name: :unset, description: :unset, question_ids: :unset, token: :unset) data = Twilio::Values.of({ 'Active' => active, 'Name' => name, 'Description' => description, 'QuestionIds' => Twilio.serialize_list(question_ids) { |e| e }, }) headers = Twilio::Values.of({'Token' => token, }) payload = @version.update('POST', @uri, data: data, headers: headers) InsightsQuestionnairesInstance.new(@version, payload, id: @solution[:id], ) end |