class Twilio::REST::Api::V2010::AccountContext::ConnectAppInstance

Public Class Methods

new(version, payload, account_sid: nil, sid: nil) click to toggle source

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

Calls superclass method 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

account_sid() click to toggle source

@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
authorize_redirect_url() click to toggle source

@return [String] The URL to redirect the user to after authorization

    # File lib/twilio-ruby/rest/api/v2010/account/connect_app.rb
293 def authorize_redirect_url
294   @properties['authorize_redirect_url']
295 end
company_name() click to toggle source

@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
context() click to toggle source

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
deauthorize_callback_method() click to toggle source

@return [String] The HTTP method we use to call deauthorize_callback_url

    # File lib/twilio-ruby/rest/api/v2010/account/connect_app.rb
305 def deauthorize_callback_method
306   @properties['deauthorize_callback_method']
307 end
deauthorize_callback_url() click to toggle source

@return [String] The URL we call to de-authorize the Connect App

    # File lib/twilio-ruby/rest/api/v2010/account/connect_app.rb
311 def deauthorize_callback_url
312   @properties['deauthorize_callback_url']
313 end
delete() click to toggle source

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
description() click to toggle source

@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() click to toggle source

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
friendly_name() click to toggle source

@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
homepage_url() click to toggle source

@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
inspect() click to toggle source

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
permissions() click to toggle source

@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
sid() click to toggle source

@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
to_s() click to toggle source

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(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) click to toggle source

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
uri() click to toggle source

@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