class Twilio::REST::Preview::DeployedDevices::FleetContext::DeploymentInstance

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, fleet_sid: nil, sid: nil) click to toggle source

Initialize the DeploymentInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] fleet_sid Specifies the unique string identifier of the Fleet

that the given Deployment belongs to.

@param [String] sid Provides a 34 character string that uniquely identifies the

requested Deployment resource.

@return [DeploymentInstance] DeploymentInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb
242 def initialize(version, payload, fleet_sid: nil, sid: nil)
243   super(version)
244 
245   # Marshaled Properties
246   @properties = {
247       'sid' => payload['sid'],
248       'url' => payload['url'],
249       'friendly_name' => payload['friendly_name'],
250       'fleet_sid' => payload['fleet_sid'],
251       'account_sid' => payload['account_sid'],
252       'sync_service_sid' => payload['sync_service_sid'],
253       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
254       'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
255   }
256 
257   # Context
258   @instance_context = nil
259   @params = {'fleet_sid' => fleet_sid, 'sid' => sid || @properties['sid'], }
260 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/deployment.rb
299 def account_sid
300   @properties['account_sid']
301 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 [DeploymentContext] DeploymentContext for this DeploymentInstance

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb
266 def context
267   unless @instance_context
268     @instance_context = DeploymentContext.new(@version, @params['fleet_sid'], @params['sid'], )
269   end
270   @instance_context
271 end
date_created() click to toggle source

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

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

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

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb
317 def date_updated
318   @properties['date_updated']
319 end
delete() click to toggle source

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

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb
331 def delete
332   context.delete
333 end
fetch() click to toggle source

Fetch the DeploymentInstance @return [DeploymentInstance] Fetched DeploymentInstance

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb
324 def fetch
325   context.fetch
326 end
fleet_sid() click to toggle source

@return [String] The unique identifier of the Fleet.

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb
293 def fleet_sid
294   @properties['fleet_sid']
295 end
friendly_name() click to toggle source

@return [String] A human readable description for this Deployment

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

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb
356 def inspect
357   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
358   "<Twilio.Preview.DeployedDevices.DeploymentInstance #{values}>"
359 end
sid() click to toggle source

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

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb
275 def sid
276   @properties['sid']
277 end
sync_service_sid() click to toggle source

@return [String] The unique identifier of the Sync service instance.

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb
305 def sync_service_sid
306   @properties['sync_service_sid']
307 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb
349 def to_s
350   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
351   "<Twilio.Preview.DeployedDevices.DeploymentInstance #{values}>"
352 end
update(friendly_name: :unset, sync_service_sid: :unset) click to toggle source

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

this Deployment, up to 64 characters long

@param [String] sync_service_sid Provides the unique string identifier of the

Twilio Sync service instance that will be linked to and accessible by this
Deployment.

@return [DeploymentInstance] Updated DeploymentInstance

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb
343 def update(friendly_name: :unset, sync_service_sid: :unset)
344   context.update(friendly_name: friendly_name, sync_service_sid: sync_service_sid, )
345 end
url() click to toggle source

@return [String] URL of this Deployment.

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb
281 def url
282   @properties['url']
283 end