Class: Twilio::REST::FlexApi::V1::PluginConfigurationContext::ConfiguredPluginInstance

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, configuration_sid: nil, plugin_sid: nil) ⇒ ConfiguredPluginInstance

Initialize the ConfiguredPluginInstance

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 ConfiguredPlugin resource.

  • sid (String)

    The SID of the Call resource to fetch.



231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 231

def initialize(version, payload , configuration_sid: nil, plugin_sid: nil)
    super(version)
    
    # Marshaled Properties
    @properties = { 
        'account_sid' => payload['account_sid'],
        'configuration_sid' => payload['configuration_sid'],
        'plugin_sid' => payload['plugin_sid'],
        'plugin_version_sid' => payload['plugin_version_sid'],
        'phase' => payload['phase'] == nil ? payload['phase'] : payload['phase'].to_i,
        'plugin_url' => payload['plugin_url'],
        'unique_name' => payload['unique_name'],
        'friendly_name' => payload['friendly_name'],
        'description' => payload['description'],
        'plugin_archived' => payload['plugin_archived'],
        'version' => payload['version'],
        'changelog' => payload['changelog'],
        'plugin_version_archived' => payload['plugin_version_archived'],
        'private' => payload['private'],
        'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
        'url' => payload['url'],
    }

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

Instance Method Details

#account_sidString

Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that the Flex Plugin resource is installed for.

Returns:



272
273
274
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 272

def 
    @properties['account_sid']
end

#changelogString

Returns A changelog that describes the changes this Flex Plugin Version brings.

Returns:

  • (String)

    A changelog that describes the changes this Flex Plugin Version brings.



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

def changelog
    @properties['changelog']
end

#configuration_sidString

Returns The SID of the Flex Plugin Configuration that this Flex Plugin belongs to.

Returns:

  • (String)

    The SID of the Flex Plugin Configuration that this Flex Plugin belongs to.



278
279
280
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 278

def configuration_sid
    @properties['configuration_sid']
end

#contextConfiguredPluginContext

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

Returns:



263
264
265
266
267
268
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 263

def context
    unless @instance_context
        @instance_context = ConfiguredPluginContext.new(@version , @params['configuration_sid'], @params['plugin_sid'])
    end
    @instance_context
end

#date_createdTime

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

Returns:



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

def date_created
    @properties['date_created']
end

#descriptionString

Returns A descriptive string that you create to describe the plugin resource. It can be up to 500 characters long.

Returns:

  • (String)

    A descriptive string that you create to describe the plugin resource. It can be up to 500 characters long



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

def description
    @properties['description']
end

#fetch(flex_metadata: :unset) ⇒ ConfiguredPluginInstance

Fetch the ConfiguredPluginInstance

Parameters:

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

    The Flex-Metadata HTTP request header

Returns:



370
371
372
373
374
375
376
377
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 370

def fetch(
    flex_metadata: :unset
)

    context.fetch(
        flex_metadata: , 
    )
end

#friendly_nameString

Returns The friendly name of this Flex Plugin resource.

Returns:

  • (String)

    The friendly name of this Flex Plugin resource.



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

def friendly_name
    @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



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

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

#phaseString

Returns The phase this Flex Plugin would initialize at runtime.

Returns:

  • (String)

    The phase this Flex Plugin would initialize at runtime.



296
297
298
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 296

def phase
    @properties['phase']
end

#plugin_archivedBoolean

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

Returns:

  • (Boolean)

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



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

def plugin_archived
    @properties['plugin_archived']
end

#plugin_sidString

Returns The SID of the Flex Plugin.

Returns:

  • (String)

    The SID of the Flex Plugin.



284
285
286
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 284

def plugin_sid
    @properties['plugin_sid']
end

#plugin_urlString

Returns The URL of where the Flex Plugin Version JavaScript bundle is hosted on.

Returns:

  • (String)

    The URL of where the Flex Plugin Version JavaScript bundle is hosted on.



302
303
304
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 302

def plugin_url
    @properties['plugin_url']
end

#plugin_version_archivedBoolean

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

Returns:

  • (Boolean)

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



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

def plugin_version_archived
    @properties['plugin_version_archived']
end

#plugin_version_sidString

Returns The SID of the Flex Plugin Version.

Returns:

  • (String)

    The SID of the Flex Plugin Version.



290
291
292
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 290

def plugin_version_sid
    @properties['plugin_version_sid']
end

#privateBoolean

Returns Whether to validate the request is authorized to access the Flex Plugin Version.

Returns:

  • (Boolean)

    Whether to validate the request is authorized to access the Flex Plugin Version.



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

def private
    @properties['private']
end

#to_sObject

Provide a user friendly representation



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

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

#unique_nameString

Returns The name that uniquely identifies this Flex Plugin resource.

Returns:

  • (String)

    The name that uniquely identifies this Flex Plugin resource.



308
309
310
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 308

def unique_name
    @properties['unique_name']
end

#urlString

Returns The absolute URL of the Flex Plugin resource.

Returns:

  • (String)

    The absolute URL of the Flex Plugin resource.



362
363
364
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 362

def url
    @properties['url']
end

#versionString

Returns The latest version of this Flex Plugin Version.

Returns:

  • (String)

    The latest version of this Flex Plugin Version.



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

def version
    @properties['version']
end