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
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 341 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.
399 400 401 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 399 def account_sid @properties['account_sid'] end |
#certificates ⇒ certificates
Access the certificates
483 484 485 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 483 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
366 367 368 369 370 371 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 366 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.
411 412 413 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 411 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.
417 418 419 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 417 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.
405 406 407 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 405 def default_deployment_sid @properties['default_deployment_sid'] end |
#delete ⇒ Boolean
Delete the FleetInstance
430 431 432 433 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 430 def delete context.delete end |
#deployments ⇒ deployments
Access the deployments
476 477 478 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 476 def deployments context.deployments end |
#devices ⇒ devices
Access the devices
462 463 464 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 462 def devices context.devices end |
#fetch ⇒ FleetInstance
Fetch the FleetInstance
438 439 440 441 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 438 def fetch context.fetch end |
#friendly_name ⇒ String
Returns Contains a human readable descriptive text for this Fleet, up to 256 characters long.
393 394 395 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 393 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
496 497 498 499 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 496 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.DeployedDevices.FleetInstance #{values}>" end |
#keys ⇒ keys
Access the keys
469 470 471 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 469 def keys context.keys end |
#links ⇒ Hash
Returns Contains a dictionary of URL links to nested resources of this Fleet.
423 424 425 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 423 def links @properties['links'] end |
#sid ⇒ String
Returns Contains a 34 character string that uniquely identifies this Fleet resource.
375 376 377 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 375 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
489 490 491 492 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 489 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.
387 388 389 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 387 def unique_name @properties['unique_name'] end |
#update(friendly_name: :unset, default_deployment_sid: :unset) ⇒ FleetInstance
Update the FleetInstance
448 449 450 451 452 453 454 455 456 457 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 448 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.
381 382 383 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 381 def url @properties['url'] end |