Class: Twilio::REST::Preview::DeployedDevices::FleetInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Preview::DeployedDevices::FleetInstance
- Defined in:
- lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb
Overview
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected].
Instance Method Summary collapse
-
#account_sid ⇒ String
The unique SID that identifies this Account.
-
#certificates ⇒ certificates
Access the certificates.
-
#context ⇒ FleetContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date this Fleet was created.
-
#date_updated ⇒ Time
The date this Fleet was updated.
-
#default_deployment_sid ⇒ String
The unique SID that identifies this Fleet’s default Deployment.
-
#delete ⇒ Boolean
Deletes the FleetInstance.
-
#deployments ⇒ deployments
Access the deployments.
-
#devices ⇒ devices
Access the devices.
-
#fetch ⇒ FleetInstance
Fetch a FleetInstance.
-
#friendly_name ⇒ String
A human readable description for this Fleet.
-
#initialize(version, payload, sid: nil) ⇒ FleetInstance
constructor
Initialize the FleetInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#keys ⇒ keys
Access the keys.
-
#links ⇒ String
Nested resource URLs.
-
#sid ⇒ String
A string that uniquely identifies this Fleet.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#unique_name ⇒ String
A unique, addressable name of this Fleet.
-
#update(friendly_name: :unset, default_deployment_sid: :unset) ⇒ FleetInstance
Update the FleetInstance.
-
#url ⇒ String
URL of this Fleet.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ FleetInstance
Initialize the FleetInstance
374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 374 def initialize(version, payload, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'url' => payload['url'], 'unique_name' => payload['unique_name'], 'friendly_name' => payload['friendly_name'], 'account_sid' => payload['account_sid'], 'default_deployment_sid' => payload['default_deployment_sid'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'links' => payload['links'], } # Context @instance_context = nil @params = { 'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The unique SID that identifies this Account.
437 438 439 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 437 def account_sid @properties['account_sid'] end |
#certificates ⇒ certificates
Access the certificates
510 511 512 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 510 def certificates context.certificates end |
#context ⇒ FleetContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
401 402 403 404 405 406 407 408 409 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 401 def context unless @instance_context @instance_context = FleetContext.new( @version, @params['sid'], ) end @instance_context end |
#date_created ⇒ Time
Returns The date this Fleet was created.
449 450 451 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 449 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date this Fleet was updated.
455 456 457 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 455 def date_updated @properties['date_updated'] end |
#default_deployment_sid ⇒ String
Returns The unique SID that identifies this Fleet’s default Deployment.
443 444 445 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 443 def default_deployment_sid @properties['default_deployment_sid'] end |
#delete ⇒ Boolean
Deletes the FleetInstance
475 476 477 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 475 def delete context.delete end |
#deployments ⇒ deployments
Access the deployments
503 504 505 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 503 def deployments context.deployments end |
#devices ⇒ devices
Access the devices
496 497 498 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 496 def devices context.devices end |
#fetch ⇒ FleetInstance
Fetch a FleetInstance
468 469 470 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 468 def fetch context.fetch end |
#friendly_name ⇒ String
Returns A human readable description for this Fleet.
431 432 433 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 431 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
530 531 532 533 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 530 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.DeployedDevices.FleetInstance #{values}>" end |
#keys ⇒ keys
Access the keys
517 518 519 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 517 def keys context.keys end |
#links ⇒ String
Returns Nested resource URLs.
461 462 463 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 461 def links @properties['links'] end |
#sid ⇒ String
Returns A string that uniquely identifies this Fleet.
413 414 415 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 413 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
523 524 525 526 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 523 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.DeployedDevices.FleetInstance #{values}>" end |
#unique_name ⇒ String
Returns A unique, addressable name of this Fleet.
425 426 427 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 425 def unique_name @properties['unique_name'] end |
#update(friendly_name: :unset, default_deployment_sid: :unset) ⇒ FleetInstance
Update the FleetInstance
486 487 488 489 490 491 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 486 def update(friendly_name: :unset, default_deployment_sid: :unset) context.update( friendly_name: friendly_name, default_deployment_sid: default_deployment_sid, ) end |
#url ⇒ String
Returns URL of this Fleet.
419 420 421 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 419 def url @properties['url'] end |