Class: Twilio::REST::FlexApi::V1::PluginConfigurationInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, sid: nil) ⇒ PluginConfigurationInstance

Initialize the PluginConfigurationInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String)

    The SID of the Account that created this PluginConfiguration resource.

  • sid (String) (defaults to: nil)

    The SID of the Call resource to fetch.



280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb', line 280

def initialize(version, payload , sid: nil)
    super(version)
    
    # Marshaled Properties
    @properties = { 
        'sid' => payload['sid'],
        'account_sid' => payload['account_sid'],
        'name' => payload['name'],
        'description' => payload['description'],
        'archived' => payload['archived'],
        'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
        'url' => payload['url'],
        'links' => payload['links'],
    }

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

Instance Method Details

#account_sidString

Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Flex Plugin Configuration resource and owns this resource.

Returns:



319
320
321
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb', line 319

def 
    @properties['account_sid']
end

#archivedBoolean

Returns Whether the Flex Plugin Configuration is archived. The default value is false.

Returns:

  • (Boolean)

    Whether the Flex Plugin Configuration is archived. The default value is false.



337
338
339
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb', line 337

def archived
    @properties['archived']
end

#contextPluginConfigurationContext

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

Returns:



304
305
306
307
308
309
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb', line 304

def context
    unless @instance_context
        @instance_context = PluginConfigurationContext.new(@version , @params['sid'])
    end
    @instance_context
end

#date_createdTime

Returns The date and time in GMT when the Flex Plugin Configuration was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.

Returns:



343
344
345
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb', line 343

def date_created
    @properties['date_created']
end

#descriptionString

Returns The description of the Flex Plugin Configuration resource.

Returns:

  • (String)

    The description of the Flex Plugin Configuration resource.



331
332
333
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb', line 331

def description
    @properties['description']
end

#fetch(flex_metadata: :unset) ⇒ PluginConfigurationInstance

Fetch the PluginConfigurationInstance

Parameters:

  • flex_metadata (String) (defaults to: :unset)

    The Flex-Metadata HTTP request header

Returns:



363
364
365
366
367
368
369
370
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb', line 363

def fetch(
    flex_metadata: :unset
)

    context.fetch(
        flex_metadata: , 
    )
end

#inspectObject

Provide a detailed, user friendly representation



388
389
390
391
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb', line 388

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

Returns:

  • (Hash)


355
356
357
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb', line 355

def links
    @properties['links']
end

#nameString

Returns The name of this Flex Plugin Configuration.

Returns:

  • (String)

    The name of this Flex Plugin Configuration.



325
326
327
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb', line 325

def name
    @properties['name']
end

#pluginsplugins

Access the plugins

Returns:



375
376
377
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb', line 375

def plugins
    context.plugins
end

#sidString

Returns The unique string that we created to identify the Flex Plugin Configuration resource.

Returns:

  • (String)

    The unique string that we created to identify the Flex Plugin Configuration resource.



313
314
315
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb', line 313

def sid
    @properties['sid']
end

#to_sObject

Provide a user friendly representation



381
382
383
384
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb', line 381

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

#urlString

Returns The absolute URL of the Flex Plugin Configuration resource.

Returns:

  • (String)

    The absolute URL of the Flex Plugin Configuration resource.



349
350
351
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb', line 349

def url
    @properties['url']
end