Class: Twilio::REST::Api::V2010::AccountContext::AuthorizedConnectAppInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, account_sid: nil, connect_app_sid: nil) ⇒ AuthorizedConnectAppInstance

Initialize the AuthorizedConnectAppInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String) (defaults to: nil)

    The SID of the Account that created this AuthorizedConnectApp resource.

  • sid (String)

    The SID of the Call resource to fetch.



212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 212

def initialize(version, payload , account_sid: nil, connect_app_sid: nil)
    super(version)
    
    # Marshaled Properties
    @properties = { 
        'account_sid' => payload['account_sid'],
        'connect_app_company_name' => payload['connect_app_company_name'],
        'connect_app_description' => payload['connect_app_description'],
        'connect_app_friendly_name' => payload['connect_app_friendly_name'],
        'connect_app_homepage_url' => payload['connect_app_homepage_url'],
        'connect_app_sid' => payload['connect_app_sid'],
        'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
        'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
        'permissions' => payload['permissions'],
        'uri' => payload['uri'],
    }

    # Context
    @instance_context = nil
    @params = { 'account_sid' =>   ,'connect_app_sid' => connect_app_sid  || @properties['connect_app_sid']  , }
end

Instance Method Details

#account_sidString

Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the AuthorizedConnectApp resource.

Returns:



247
248
249
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 247

def 
    @properties['account_sid']
end

#connect_app_company_nameString

Returns The company name set for the Connect App.

Returns:

  • (String)

    The company name set for the Connect App.



253
254
255
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 253

def connect_app_company_name
    @properties['connect_app_company_name']
end

#connect_app_descriptionString

Returns A detailed description of the Connect App.

Returns:

  • (String)

    A detailed description of the Connect App.



259
260
261
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 259

def connect_app_description
    @properties['connect_app_description']
end

#connect_app_friendly_nameString

Returns The name of the Connect App.

Returns:

  • (String)

    The name of the Connect App.



265
266
267
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 265

def connect_app_friendly_name
    @properties['connect_app_friendly_name']
end

#connect_app_homepage_urlString

Returns The public URL for the Connect App.

Returns:

  • (String)

    The public URL for the Connect App.



271
272
273
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 271

def connect_app_homepage_url
    @properties['connect_app_homepage_url']
end

#connect_app_sidString

Returns The SID that we assigned to the Connect App.

Returns:

  • (String)

    The SID that we assigned to the Connect App.



277
278
279
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 277

def connect_app_sid
    @properties['connect_app_sid']
end

#contextAuthorizedConnectAppContext

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context

Returns:



238
239
240
241
242
243
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 238

def context
    unless @instance_context
        @instance_context = AuthorizedConnectAppContext.new(@version , @params['account_sid'], @params['connect_app_sid'])
    end
    @instance_context
end

#date_createdTime

Returns The date and time in GMT that the resource was created specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.

Returns:



283
284
285
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 283

def date_created
    @properties['date_created']
end

#date_updatedTime

Returns The date and time in GMT that the resource was last updated specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.

Returns:



289
290
291
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 289

def date_updated
    @properties['date_updated']
end

#fetchAuthorizedConnectAppInstance

Fetch the AuthorizedConnectAppInstance

Returns:



308
309
310
311
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 308

def fetch

    context.fetch
end

#inspectObject

Provide a detailed, user friendly representation



322
323
324
325
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 322

def inspect
    values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Api.V2010.AuthorizedConnectAppInstance #{values}>"
end

#permissionsArray<Permission>

Returns The set of permissions that you authorized for the Connect App. Can be: ‘get-all` or `post-all`.

Returns:

  • (Array<Permission>)

    The set of permissions that you authorized for the Connect App. Can be: ‘get-all` or `post-all`.



295
296
297
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 295

def permissions
    @properties['permissions']
end

#to_sObject

Provide a user friendly representation



315
316
317
318
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 315

def to_s
    values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Api.V2010.AuthorizedConnectAppInstance #{values}>"
end

#uriString

Returns The URI of the resource, relative to ‘api.twilio.com`.

Returns:

  • (String)

    The URI of the resource, relative to ‘api.twilio.com`.



301
302
303
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 301

def uri
    @properties['uri']
end