class Twilio::REST::Serverless::V1::ServiceContext::EnvironmentContext::DeploymentInstance

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

Public Class Methods

new(version, payload, service_sid: nil, environment_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] service_sid The SID of the Service that the Deployment resource

is associated with.

@param [String] environment_sid The SID of the Environment for the Deployment. @param [String] sid The SID that identifies the Deployment resource to fetch. @return [DeploymentInstance] DeploymentInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb
235 def initialize(version, payload, service_sid: nil, environment_sid: nil, sid: nil)
236   super(version)
237 
238   # Marshaled Properties
239   @properties = {
240       'sid' => payload['sid'],
241       'account_sid' => payload['account_sid'],
242       'service_sid' => payload['service_sid'],
243       'environment_sid' => payload['environment_sid'],
244       'build_sid' => payload['build_sid'],
245       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
246       'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
247       'url' => payload['url'],
248   }
249 
250   # Context
251   @instance_context = nil
252   @params = {
253       'service_sid' => service_sid,
254       'environment_sid' => environment_sid,
255       'sid' => sid || @properties['sid'],
256   }
257 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The SID of the Account that created the Deployment resource

    # File lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb
283 def account_sid
284   @properties['account_sid']
285 end
build_sid() click to toggle source

@return [String] The SID of the Build for the deployment

    # File lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb
301 def build_sid
302   @properties['build_sid']
303 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/serverless/v1/service/environment/deployment.rb
263 def context
264   unless @instance_context
265     @instance_context = DeploymentContext.new(
266         @version,
267         @params['service_sid'],
268         @params['environment_sid'],
269         @params['sid'],
270     )
271   end
272   @instance_context
273 end
date_created() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the Deployment resource was created

    # File lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb
307 def date_created
308   @properties['date_created']
309 end
date_updated() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the Deployment resource was last updated

    # File lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb
313 def date_updated
314   @properties['date_updated']
315 end
environment_sid() click to toggle source

@return [String] The SID of the Environment for the Deployment

    # File lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb
295 def environment_sid
296   @properties['environment_sid']
297 end
fetch() click to toggle source

Fetch the DeploymentInstance @return [DeploymentInstance] Fetched DeploymentInstance

    # File lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb
326 def fetch
327   context.fetch
328 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb
339 def inspect
340   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
341   "<Twilio.Serverless.V1.DeploymentInstance #{values}>"
342 end
service_sid() click to toggle source

@return [String] The SID of the Service that the Deployment resource is associated with

    # File lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb
289 def service_sid
290   @properties['service_sid']
291 end
sid() click to toggle source

@return [String] The unique string that identifies the Deployment resource

    # File lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb
277 def sid
278   @properties['sid']
279 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb
332 def to_s
333   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
334   "<Twilio.Serverless.V1.DeploymentInstance #{values}>"
335 end
url() click to toggle source

@return [String] The absolute URL of the Deployment resource

    # File lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb
319 def url
320   @properties['url']
321 end