class Twilio::REST::Preview::DeployedDevices::FleetContext::DeploymentContext

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

Initialize the DeploymentContext @param [Version] version Version that contains the resource @param [String] fleet_sid The fleet_sid @param [String] sid Provides a 34 character string that uniquely identifies the

requested Deployment resource.

@return [DeploymentContext] DeploymentContext

Calls superclass method Twilio::REST::InstanceContext::new
    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb
175 def initialize(version, fleet_sid, sid)
176   super(version)
177 
178   # Path Solution
179   @solution = {fleet_sid: fleet_sid, sid: sid, }
180   @uri = "/Fleets/#{@solution[:fleet_sid]}/Deployments/#{@solution[:sid]}"
181 end

Public Instance Methods

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
195 def delete
196    @version.delete('DELETE', @uri)
197 end
fetch() click to toggle source

Fetch the DeploymentInstance @return [DeploymentInstance] Fetched DeploymentInstance

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb
186 def fetch
187   payload = @version.fetch('GET', @uri)
188 
189   DeploymentInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid], sid: @solution[:sid], )
190 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb
224 def inspect
225   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
226   "#<Twilio.Preview.DeployedDevices.DeploymentContext #{context}>"
227 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb
217 def to_s
218   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
219   "#<Twilio.Preview.DeployedDevices.DeploymentContext #{context}>"
220 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
207 def update(friendly_name: :unset, sync_service_sid: :unset)
208   data = Twilio::Values.of({'FriendlyName' => friendly_name, 'SyncServiceSid' => sync_service_sid, })
209 
210   payload = @version.update('POST', @uri, data: data)
211 
212   DeploymentInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid], sid: @solution[:sid], )
213 end