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
343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 343 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.
401 402 403 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 401 def account_sid @properties['account_sid'] end |
#certificates ⇒ certificates
Access the certificates
464 465 466 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 464 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
368 369 370 371 372 373 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 368 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.
413 414 415 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 413 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.
419 420 421 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 419 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.
407 408 409 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 407 def default_deployment_sid @properties['default_deployment_sid'] end |
#delete ⇒ Boolean
Delete the FleetInstance
432 433 434 435 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 432 def delete context.delete end |
#deployments ⇒ deployments
Access the deployments
485 486 487 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 485 def deployments context.deployments end |
#devices ⇒ devices
Access the devices
471 472 473 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 471 def devices context.devices end |
#fetch ⇒ FleetInstance
Fetch the FleetInstance
440 441 442 443 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 440 def fetch context.fetch end |
#friendly_name ⇒ String
Returns Contains a human readable descriptive text for this Fleet, up to 256 characters long.
395 396 397 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 395 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
498 499 500 501 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 498 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.DeployedDevices.FleetInstance #{values}>" end |
#keys ⇒ keys
Access the keys
478 479 480 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 478 def keys context.keys end |
#links ⇒ Hash
Returns Contains a dictionary of URL links to nested resources of this Fleet.
425 426 427 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 425 def links @properties['links'] end |
#sid ⇒ String
Returns Contains a 34 character string that uniquely identifies this Fleet resource.
377 378 379 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 377 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
491 492 493 494 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 491 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.
389 390 391 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 389 def unique_name @properties['unique_name'] end |
#update(friendly_name: :unset, default_deployment_sid: :unset) ⇒ FleetInstance
Update the FleetInstance
450 451 452 453 454 455 456 457 458 459 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 450 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.
383 384 385 |
# File 'lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb', line 383 def url @properties['url'] end |