class Twilio::REST::Api::V2010::AccountContext::ConnectAppInstance
Public Class Methods
Initialize the ConnectAppInstance
@param [Version] version Version
that contains the resource @param [Hash] payload payload that contains response from Twilio
@param [String] account_sid
The SID of the
{Account}[https://www.twilio.com/docs/iam/api/account] that created the ConnectApp resource.
@param [String] sid The Twilio-provided string that uniquely identifies the
ConnectApp resource to fetch.
@return [ConnectAppInstance] ConnectAppInstance
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/api/v2010/account/connect_app.rb 251 def initialize(version, payload, account_sid: nil, sid: nil) 252 super(version) 253 254 # Marshaled Properties 255 @properties = { 256 'account_sid' => payload['account_sid'], 257 'authorize_redirect_url' => payload['authorize_redirect_url'], 258 'company_name' => payload['company_name'], 259 'deauthorize_callback_method' => payload['deauthorize_callback_method'], 260 'deauthorize_callback_url' => payload['deauthorize_callback_url'], 261 'description' => payload['description'], 262 'friendly_name' => payload['friendly_name'], 263 'homepage_url' => payload['homepage_url'], 264 'permissions' => payload['permissions'], 265 'sid' => payload['sid'], 266 'uri' => payload['uri'], 267 } 268 269 # Context 270 @instance_context = nil 271 @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'], } 272 end
Public Instance Methods
@return [String] The SID of the Account that created the resource
# File lib/twilio-ruby/rest/api/v2010/account/connect_app.rb 287 def account_sid 288 @properties['account_sid'] 289 end
@return [String] The company name set for the Connect App
# File lib/twilio-ruby/rest/api/v2010/account/connect_app.rb 299 def company_name 300 @properties['company_name'] 301 end
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [ConnectAppContext] ConnectAppContext
for this ConnectAppInstance
# File lib/twilio-ruby/rest/api/v2010/account/connect_app.rb 278 def context 279 unless @instance_context 280 @instance_context = ConnectAppContext.new(@version, @params['account_sid'], @params['sid'], ) 281 end 282 @instance_context 283 end
Delete the ConnectAppInstance
@return [Boolean] true if delete succeeds, false otherwise
# File lib/twilio-ruby/rest/api/v2010/account/connect_app.rb 392 def delete 393 context.delete 394 end
@return [String] The description of the Connect App
# File lib/twilio-ruby/rest/api/v2010/account/connect_app.rb 317 def description 318 @properties['description'] 319 end
Fetch the ConnectAppInstance
@return [ConnectAppInstance] Fetched ConnectAppInstance
# File lib/twilio-ruby/rest/api/v2010/account/connect_app.rb 354 def fetch 355 context.fetch 356 end
@return [String] The string that you assigned to describe the resource
# File lib/twilio-ruby/rest/api/v2010/account/connect_app.rb 323 def friendly_name 324 @properties['friendly_name'] 325 end
@return [String] The URL users can obtain more information
# File lib/twilio-ruby/rest/api/v2010/account/connect_app.rb 329 def homepage_url 330 @properties['homepage_url'] 331 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/api/v2010/account/connect_app.rb 405 def inspect 406 values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") 407 "<Twilio.Api.V2010.ConnectAppInstance #{values}>" 408 end
@return [Array] The set of permissions that your ConnectApp requests
# File lib/twilio-ruby/rest/api/v2010/account/connect_app.rb 335 def permissions 336 @properties['permissions'] 337 end
@return [String] The unique string that identifies the resource
# File lib/twilio-ruby/rest/api/v2010/account/connect_app.rb 341 def sid 342 @properties['sid'] 343 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/api/v2010/account/connect_app.rb 398 def to_s 399 values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") 400 "<Twilio.Api.V2010.ConnectAppInstance #{values}>" 401 end
Update the ConnectAppInstance
@param [String] authorize_redirect_url
The URL to redirect the user to after we
authenticate the user and obtain authorization to access the Connect App.
@param [String] company_name
The company name to set for the Connect App. @param [String] deauthorize_callback_method
The HTTP
method to use when calling
`deauthorize_callback_url`.
@param [String] deauthorize_callback_url
The URL to call using the
`deauthorize_callback_method` to de-authorize the Connect App.
@param [String] description A description of the Connect App. @param [String] friendly_name
A descriptive string that you create to describe
the resource. It can be up to 64 characters long.
@param [String] homepage_url
A public URL where users can obtain more
information about this Connect App.
@param [Array] permissions A comma-separated list of the
permissions you will request from the users of this ConnectApp. Can include: `get-all` and `post-all`.
@return [ConnectAppInstance] Updated ConnectAppInstance
# File lib/twilio-ruby/rest/api/v2010/account/connect_app.rb 376 def update(authorize_redirect_url: :unset, company_name: :unset, deauthorize_callback_method: :unset, deauthorize_callback_url: :unset, description: :unset, friendly_name: :unset, homepage_url: :unset, permissions: :unset) 377 context.update( 378 authorize_redirect_url: authorize_redirect_url, 379 company_name: company_name, 380 deauthorize_callback_method: deauthorize_callback_method, 381 deauthorize_callback_url: deauthorize_callback_url, 382 description: description, 383 friendly_name: friendly_name, 384 homepage_url: homepage_url, 385 permissions: permissions, 386 ) 387 end
@return [String] The URI of the resource, relative to `api.twilio.com`
# File lib/twilio-ruby/rest/api/v2010/account/connect_app.rb 347 def uri 348 @properties['uri'] 349 end