class Twilio::REST::Preview::DeployedDevices::FleetInstance

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 help@twilio.com.

Public Class Methods

new(version, payload, sid: nil) click to toggle source

Initialize the FleetInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] sid Provides a 34 character string that uniquely identifies the

requested Fleet resource.

@return [FleetInstance] FleetInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb
313 def initialize(version, payload, sid: nil)
314   super(version)
315 
316   # Marshaled Properties
317   @properties = {
318       'sid' => payload['sid'],
319       'url' => payload['url'],
320       'unique_name' => payload['unique_name'],
321       'friendly_name' => payload['friendly_name'],
322       'account_sid' => payload['account_sid'],
323       'default_deployment_sid' => payload['default_deployment_sid'],
324       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
325       'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
326       'links' => payload['links'],
327   }
328 
329   # Context
330   @instance_context = nil
331   @params = {'sid' => sid || @properties['sid'], }
332 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The unique SID that identifies this Account.

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb
371 def account_sid
372   @properties['account_sid']
373 end
certificates() click to toggle source

Access the certificates @return [certificates] certificates

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb
441 def certificates
442   context.certificates
443 end
context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [FleetContext] FleetContext for this FleetInstance

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb
338 def context
339   unless @instance_context
340     @instance_context = FleetContext.new(@version, @params['sid'], )
341   end
342   @instance_context
343 end
date_created() click to toggle source

@return [Time] The date this Fleet was created.

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb
383 def date_created
384   @properties['date_created']
385 end
date_updated() click to toggle source

@return [Time] The date this Fleet was updated.

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb
389 def date_updated
390   @properties['date_updated']
391 end
default_deployment_sid() click to toggle source

@return [String] The unique SID that identifies this Fleet's default Deployment.

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb
377 def default_deployment_sid
378   @properties['default_deployment_sid']
379 end
delete() click to toggle source

Delete the FleetInstance @return [Boolean] true if delete succeeds, false otherwise

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb
409 def delete
410   context.delete
411 end
deployments() click to toggle source

Access the deployments @return [deployments] deployments

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb
434 def deployments
435   context.deployments
436 end
devices() click to toggle source

Access the devices @return [devices] devices

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb
427 def devices
428   context.devices
429 end
fetch() click to toggle source

Fetch the FleetInstance @return [FleetInstance] Fetched FleetInstance

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb
402 def fetch
403   context.fetch
404 end
friendly_name() click to toggle source

@return [String] A human readable description for this Fleet.

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb
365 def friendly_name
366   @properties['friendly_name']
367 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb
461 def inspect
462   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
463   "<Twilio.Preview.DeployedDevices.FleetInstance #{values}>"
464 end
keys() click to toggle source

Access the keys @return [keys] keys

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb
448 def keys
449   context.keys
450 end
sid() click to toggle source

@return [String] A string that uniquely identifies this Fleet.

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb
347 def sid
348   @properties['sid']
349 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb
454 def to_s
455   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
456   "<Twilio.Preview.DeployedDevices.FleetInstance #{values}>"
457 end
unique_name() click to toggle source

@return [String] A unique, addressable name of this Fleet.

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb
359 def unique_name
360   @properties['unique_name']
361 end
update(friendly_name: :unset, default_deployment_sid: :unset) click to toggle source

Update the FleetInstance @param [String] friendly_name Provides a human readable descriptive text for

this Fleet, up to 256 characters long.

@param [String] default_deployment_sid Provides a string identifier of a

Deployment that is going to be used as a default one for this Fleet.

@return [FleetInstance] Updated FleetInstance

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb
420 def update(friendly_name: :unset, default_deployment_sid: :unset)
421   context.update(friendly_name: friendly_name, default_deployment_sid: default_deployment_sid, )
422 end
url() click to toggle source

@return [String] URL of this Fleet.

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb
353 def url
354   @properties['url']
355 end