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 the AuthorizedConnectApp resource.

  • connect_app_sid (String) (defaults to: nil)

    The SID of the Connect App to fetch.


202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 202

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 that created the resource.

Returns:

  • (String)

    The SID of the Account that created the resource


244
245
246
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 244

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


250
251
252
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 250

def connect_app_company_name
  @properties['connect_app_company_name']
end

#connect_app_descriptionString

Returns A detailed description of the app.

Returns:

  • (String)

    A detailed description of the app


256
257
258
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 256

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


262
263
264
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 262

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


268
269
270
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 268

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


274
275
276
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 274

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:


231
232
233
234
235
236
237
238
239
240
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 231

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 RFC 2822 date and time in GMT that the resource was created.

Returns:

  • (Time)

    The RFC 2822 date and time in GMT that the resource was created


280
281
282
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 280

def date_created
  @properties['date_created']
end

#date_updatedTime

Returns The RFC 2822 date and time in GMT that the resource was last updated.

Returns:

  • (Time)

    The RFC 2822 date and time in GMT that the resource was last updated


286
287
288
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 286

def date_updated
  @properties['date_updated']
end

#fetchAuthorizedConnectAppInstance

Fetch the AuthorizedConnectAppInstance

Returns:


305
306
307
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 305

def fetch
  context.fetch
end

#inspectObject

Provide a detailed, user friendly representation


318
319
320
321
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 318

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

#permissionsArray[authorized_connect_app.Permission]

Returns Permissions authorized to the app.

Returns:

  • (Array[authorized_connect_app.Permission])

    Permissions authorized to the app


292
293
294
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 292

def permissions
  @properties['permissions']
end

#to_sObject

Provide a user friendly representation


311
312
313
314
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 311

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:


298
299
300
# File 'lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb', line 298

def uri
  @properties['uri']
end