Class: Twilio::REST::FlexApi::V1::InsightsQuestionnairesCategoryContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::FlexApi::V1::InsightsQuestionnairesCategoryContext
- Defined in:
- lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb
Instance Method Summary collapse
-
#delete(authorization: :unset) ⇒ Boolean
Delete the InsightsQuestionnairesCategoryInstance.
-
#initialize(version, category_sid) ⇒ InsightsQuestionnairesCategoryContext
constructor
Initialize the InsightsQuestionnairesCategoryContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(name: nil, authorization: :unset) ⇒ InsightsQuestionnairesCategoryInstance
Update the InsightsQuestionnairesCategoryInstance.
Constructor Details
#initialize(version, category_sid) ⇒ InsightsQuestionnairesCategoryContext
Initialize the InsightsQuestionnairesCategoryContext
169 170 171 172 173 174 175 176 177 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 169 def initialize(version, category_sid) super(version) # Path Solution @solution = { category_sid: category_sid, } @uri = "/Insights/QualityManagement/Categories/#{@solution[:category_sid]}" end |
Instance Method Details
#delete(authorization: :unset) ⇒ Boolean
Delete the InsightsQuestionnairesCategoryInstance
182 183 184 185 186 187 188 189 190 191 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 182 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
231 232 233 234 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 231 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.InsightsQuestionnairesCategoryContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
224 225 226 227 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 224 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.InsightsQuestionnairesCategoryContext #{context}>" end |
#update(name: nil, authorization: :unset) ⇒ InsightsQuestionnairesCategoryInstance
Update the InsightsQuestionnairesCategoryInstance
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb', line 198 def update( name: nil, authorization: :unset ) data = Twilio::Values.of({ 'Name' => name, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'Authorization' => , }) payload = @version.update('POST', @uri, data: data, headers: headers) InsightsQuestionnairesCategoryInstance.new( @version, payload, category_sid: @solution[:category_sid], ) end |