Class: Twilio::REST::FlexApi::V1::PluginInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::FlexApi::V1::PluginInstance
- Defined in:
- lib/twilio-ruby/rest/flex_api/v1/plugin.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Flex Plugin resource and owns this resource.
-
#archived ⇒ Boolean
Whether the Flex Plugin is archived.
-
#context ⇒ PluginContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date and time in GMT-7 when the Flex Plugin was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#date_updated ⇒ Time
The date and time in GMT-7 when the Flex Plugin was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#description ⇒ String
A descriptive string that you create to describe the plugin resource.
-
#fetch(flex_metadata: :unset) ⇒ PluginInstance
Fetch the PluginInstance.
-
#friendly_name ⇒ String
The friendly name this Flex Plugin resource.
-
#initialize(version, payload, sid: nil) ⇒ PluginInstance
constructor
Initialize the PluginInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
- #links ⇒ Hash
-
#plugin_versions ⇒ plugin_versions
Access the plugin_versions.
-
#sid ⇒ String
The unique string that we created to identify the Flex Plugin resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#unique_name ⇒ String
The name that uniquely identifies this Flex Plugin resource.
-
#update(friendly_name: :unset, description: :unset, flex_metadata: :unset) ⇒ PluginInstance
Update the PluginInstance.
-
#url ⇒ String
The absolute URL of the Flex Plugin resource.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ PluginInstance
Initialize the PluginInstance
311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin.rb', line 311 def initialize(version, payload , sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'account_sid' => payload['account_sid'], 'unique_name' => payload['unique_name'], 'friendly_name' => payload['friendly_name'], 'description' => payload['description'], 'archived' => payload['archived'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'url' => payload['url'], 'links' => payload['links'], } # Context @instance_context = nil @params = { 'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Flex Plugin resource and owns this resource.
352 353 354 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin.rb', line 352 def account_sid @properties['account_sid'] end |
#archived ⇒ Boolean
Returns Whether the Flex Plugin is archived. The default value is false.
376 377 378 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin.rb', line 376 def archived @properties['archived'] end |
#context ⇒ PluginContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
337 338 339 340 341 342 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin.rb', line 337 def context unless @instance_context @instance_context = PluginContext.new(@version , @params['sid']) end @instance_context end |
#date_created ⇒ Time
Returns The date and time in GMT-7 when the Flex Plugin was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
382 383 384 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin.rb', line 382 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date and time in GMT-7 when the Flex Plugin was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
388 389 390 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin.rb', line 388 def date_updated @properties['date_updated'] end |
#description ⇒ String
Returns A descriptive string that you create to describe the plugin resource. It can be up to 500 characters long.
370 371 372 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin.rb', line 370 def description @properties['description'] end |
#fetch(flex_metadata: :unset) ⇒ PluginInstance
Fetch the PluginInstance
408 409 410 411 412 413 414 415 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin.rb', line 408 def fetch( flex_metadata: :unset ) context.fetch( flex_metadata: , ) end |
#friendly_name ⇒ String
Returns The friendly name this Flex Plugin resource.
364 365 366 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin.rb', line 364 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
452 453 454 455 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin.rb', line 452 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.PluginInstance #{values}>" end |
#links ⇒ Hash
400 401 402 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin.rb', line 400 def links @properties['links'] end |
#plugin_versions ⇒ plugin_versions
Access the plugin_versions
439 440 441 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin.rb', line 439 def plugin_versions context.plugin_versions end |
#sid ⇒ String
Returns The unique string that we created to identify the Flex Plugin resource.
346 347 348 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin.rb', line 346 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
445 446 447 448 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin.rb', line 445 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.PluginInstance #{values}>" end |
#unique_name ⇒ String
Returns The name that uniquely identifies this Flex Plugin resource.
358 359 360 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin.rb', line 358 def unique_name @properties['unique_name'] end |
#update(friendly_name: :unset, description: :unset, flex_metadata: :unset) ⇒ PluginInstance
Update the PluginInstance
423 424 425 426 427 428 429 430 431 432 433 434 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin.rb', line 423 def update( friendly_name: :unset, description: :unset, flex_metadata: :unset ) context.update( friendly_name: friendly_name, description: description, flex_metadata: , ) end |
#url ⇒ String
Returns The absolute URL of the Flex Plugin resource.
394 395 396 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin.rb', line 394 def url @properties['url'] end |