class Twilio::REST::Serverless::V1::ServiceContext::EnvironmentContext::DeploymentContext
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Public Class Methods
new(version, service_sid, environment_sid, sid)
click to toggle source
Initialize the DeploymentContext
@param [Version] version Version
that contains the resource @param [String] service_sid The SID of the Service to fetch the Deployment
resource from.
@param [String] environment_sid The SID of the Environment used by the
Deployment to fetch.
@param [String] sid The SID that identifies the Deployment resource to fetch. @return [DeploymentContext] DeploymentContext
Calls superclass method
Twilio::REST::InstanceContext::new
# File lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb 185 def initialize(version, service_sid, environment_sid, sid) 186 super(version) 187 188 # Path Solution 189 @solution = {service_sid: service_sid, environment_sid: environment_sid, sid: sid, } 190 @uri = "/Services/#{@solution[:service_sid]}/Environments/#{@solution[:environment_sid]}/Deployments/#{@solution[:sid]}" 191 end
Public Instance Methods
fetch()
click to toggle source
Fetch the DeploymentInstance
@return [DeploymentInstance] Fetched DeploymentInstance
# File lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb 196 def fetch 197 payload = @version.fetch('GET', @uri) 198 199 DeploymentInstance.new( 200 @version, 201 payload, 202 service_sid: @solution[:service_sid], 203 environment_sid: @solution[:environment_sid], 204 sid: @solution[:sid], 205 ) 206 end
inspect()
click to toggle source
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb 217 def inspect 218 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 219 "#<Twilio.Serverless.V1.DeploymentContext #{context}>" 220 end
to_s()
click to toggle source
Provide a user friendly representation
# File lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb 210 def to_s 211 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 212 "#<Twilio.Serverless.V1.DeploymentContext #{context}>" 213 end