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.



400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 400

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_sid ⇒ String

Returns The SID of the Account that the Flex Plugin resource is installed for.

Returns:

  • (String) —

    The SID of the Account that the Flex Plugin resource is installed for.



442
443
444
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 442

def 
    @properties['account_sid']
end

#changelog ⇒ String

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.



508
509
510
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 508

def changelog
    @properties['changelog']
end

#configuration_sid ⇒ String

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.



448
449
450
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 448

def configuration_sid
    @properties['configuration_sid']
end

#context ⇒ ConfiguredPluginContext

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

Returns:



433
434
435
436
437
438
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 433

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

#date_created ⇒ Time

Returns The date and time in GMT when the Flex Plugin was installed specified in ISO 8601 format.

Returns:

  • (Time) —

    The date and time in GMT when the Flex Plugin was installed specified in ISO 8601 format.



526
527
528
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 526

def date_created
    @properties['date_created']
end

#description ⇒ String

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



490
491
492
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 490

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:



540
541
542
543
544
545
546
547
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 540

def fetch(
  flex_metadata: :unset
)

    context.fetch(
        flex_metadata: , 
    )
end

#friendly_name ⇒ String

Returns The friendly name of this Flex Plugin resource.

Returns:

  • (String) —

    The friendly name of this Flex Plugin resource.



484
485
486
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 484

def friendly_name
    @properties['friendly_name']
end

#inspect ⇒ Object

Provide a detailed, user friendly representation



558
559
560
561
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 558

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

#phase ⇒ String

Returns The phase this Flex Plugin would initialize at runtime.

Returns:

  • (String) —

    The phase this Flex Plugin would initialize at runtime.



466
467
468
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 466

def phase
    @properties['phase']
end

#plugin_archived ⇒ Boolean

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.



496
497
498
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 496

def plugin_archived
    @properties['plugin_archived']
end

#plugin_sid ⇒ String

Returns The SID of the Flex Plugin.

Returns:

  • (String) —

    The SID of the Flex Plugin.



454
455
456
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 454

def plugin_sid
    @properties['plugin_sid']
end

#plugin_url ⇒ String

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.



472
473
474
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 472

def plugin_url
    @properties['plugin_url']
end

#plugin_version_archived ⇒ Boolean

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.



514
515
516
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 514

def plugin_version_archived
    @properties['plugin_version_archived']
end

#plugin_version_sid ⇒ String

Returns The SID of the Flex Plugin Version.

Returns:

  • (String) —

    The SID of the Flex Plugin Version.



460
461
462
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 460

def plugin_version_sid
    @properties['plugin_version_sid']
end

#private ⇒ Boolean

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.



520
521
522
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 520

def private
    @properties['private']
end

#to_s ⇒ Object

Provide a user friendly representation



551
552
553
554
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 551

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

#unique_name ⇒ String

Returns The name that uniquely identifies this Flex Plugin resource.

Returns:

  • (String) —

    The name that uniquely identifies this Flex Plugin resource.



478
479
480
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 478

def unique_name
    @properties['unique_name']
end

#url ⇒ String

Returns The absolute URL of the Flex Plugin resource.

Returns:

  • (String) —

    The absolute URL of the Flex Plugin resource.



532
533
534
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 532

def url
    @properties['url']
end

#version ⇒ String

Returns The latest version of this Flex Plugin Version.

Returns:

  • (String) —

    The latest version of this Flex Plugin Version.



502
503
504
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 502

def version
    @properties['version']
end