Class: Twilio::REST::Iam::V1::OAuthAppContext
- Inherits:
-
Twilio::REST::InstanceContext
- Object
- Twilio::REST::InstanceContext
- Twilio::REST::Iam::V1::OAuthAppContext
- Defined in:
- lib/twilio-ruby/rest/iam/v1/o_auth_app.rb
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the OAuthAppInstance.
-
#initialize(version, sid) ⇒ OAuthAppContext
constructor
Initialize the OAuthAppContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(iam_v1_account_vendor_oauth_app_update_request: nil) ⇒ OAuthAppInstance
Update the OAuthAppInstance.
Constructor Details
#initialize(version, sid) ⇒ OAuthAppContext
Initialize the OAuthAppContext
215 216 217 218 219 220 221 222 223 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 215 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/Account/OAuthApps/#{@solution[:sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Delete the OAuthAppInstance
227 228 229 230 231 232 233 234 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 227 def delete headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) @version.delete('DELETE', @uri, headers: headers) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
267 268 269 270 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 267 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Iam.V1.OAuthAppContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
260 261 262 263 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 260 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Iam.V1.OAuthAppContext #{context}>" end |
#update(iam_v1_account_vendor_oauth_app_update_request: nil) ⇒ OAuthAppInstance
Update the OAuthAppInstance
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 240 def update(iam_v1_account_vendor_oauth_app_update_request: nil ) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) headers['Content-Type'] = 'application/json' payload = @version.update('PUT', @uri, headers: headers, data: iam_v1_account_vendor_oauth_app_update_request.to_json) OAuthAppInstance.new( @version, payload, sid: @solution[:sid], ) end |