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
Instance Method Summary collapse
-
#account_sid ⇒ String
Speicifies the unique string identifier of the Account responsible for this Fleet.
-
#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
Specifies the date this Fleet was created, given in UTC ISO 8601 format.
-
#date_updated ⇒ Time
Specifies the date this Fleet was last updated, given in UTC ISO 8601 format.
-
#default_deployment_sid ⇒ String
Contains the string identifier of the automatically provisioned default Deployment of this Fleet.
-
#delete ⇒ Boolean
Delete the FleetInstance.
-
#deployments ⇒ deployments
Access the deployments.
-
#devices ⇒ devices
Access the devices.
-
#fetch ⇒ FleetInstance
Fetch the FleetInstance.
-
#friendly_name ⇒ String
Contains a human readable descriptive text for this Fleet, up to 256 characters long.
-
#initialize(version, payload, sid: nil) ⇒ FleetInstance
constructor
Initialize the FleetInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#keys ⇒ keys
Access the keys.
-
#links ⇒ Hash
Contains a dictionary of URL links to nested resources of this Fleet.
-
#sid ⇒ String
Contains a 34 character string that uniquely identifies this Fleet resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#unique_name ⇒ String
Contains a unique and addressable name of this Fleet, e.g.
-
#update(friendly_name: :unset, default_deployment_sid: :unset) ⇒ FleetInstance
Update the FleetInstance.
-
#url ⇒ String
Contains an absolute URL for this Fleet resource.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ FleetInstance
Initialize the FleetInstance
340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 340 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 Speicifies the unique string identifier of the Account responsible for this Fleet.
398 399 400 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 398 def account_sid @properties['account_sid'] end |
#certificates ⇒ certificates
Access the certificates
482 483 484 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 482 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
365 366 367 368 369 370 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 365 def context unless @instance_context @instance_context = FleetContext.new(@version , @params['sid']) end @instance_context end |
#date_created ⇒ Time
Returns Specifies the date this Fleet was created, given in UTC ISO 8601 format.
410 411 412 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 410 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns Specifies the date this Fleet was last updated, given in UTC ISO 8601 format.
416 417 418 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 416 def date_updated @properties['date_updated'] end |
#default_deployment_sid ⇒ String
Returns Contains the string identifier of the automatically provisioned default Deployment of this Fleet.
404 405 406 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 404 def default_deployment_sid @properties['default_deployment_sid'] end |
#delete ⇒ Boolean
Delete the FleetInstance
429 430 431 432 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 429 def delete context.delete end |
#deployments ⇒ deployments
Access the deployments
475 476 477 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 475 def deployments context.deployments end |
#devices ⇒ devices
Access the devices
461 462 463 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 461 def devices context.devices end |
#fetch ⇒ FleetInstance
Fetch the FleetInstance
437 438 439 440 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 437 def fetch context.fetch end |
#friendly_name ⇒ String
Returns Contains a human readable descriptive text for this Fleet, up to 256 characters long.
392 393 394 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 392 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
495 496 497 498 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 495 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.DeployedDevices.FleetInstance #{values}>" end |
#keys ⇒ keys
Access the keys
468 469 470 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 468 def keys context.keys end |
#links ⇒ Hash
Returns Contains a dictionary of URL links to nested resources of this Fleet.
422 423 424 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 422 def links @properties['links'] end |
#sid ⇒ String
Returns Contains a 34 character string that uniquely identifies this Fleet resource.
374 375 376 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 374 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
488 489 490 491 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 488 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.DeployedDevices.FleetInstance #{values}>" end |
#unique_name ⇒ String
Returns Contains a unique and addressable name of this Fleet, e.g. ‘default’, up to 128 characters long.
386 387 388 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 386 def unique_name @properties['unique_name'] end |
#update(friendly_name: :unset, default_deployment_sid: :unset) ⇒ FleetInstance
Update the FleetInstance
447 448 449 450 451 452 453 454 455 456 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 447 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 Contains an absolute URL for this Fleet resource.
380 381 382 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 380 def url @properties['url'] end |