lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb in twilio-ruby-5.38.0 vs lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb in twilio-ruby-5.39.0
- old
+ new
@@ -89,15 +89,13 @@
params = Twilio::Values.of({
'PageToken' => page_token,
'Page' => page_number,
'PageSize' => page_size,
})
- response = @version.page(
- 'GET',
- @uri,
- params
- )
+
+ response = @version.page('GET', @uri, params)
+
DeploymentPage.new(@version, response, @solution)
end
##
# Retrieve a single page of DeploymentInstance records from the API.
@@ -111,22 +109,17 @@
)
DeploymentPage.new(@version, response, @solution)
end
##
- # Retrieve a single page of DeploymentInstance records from the API.
- # Request is executed immediately.
+ # Create the DeploymentInstance
# @param [String] build_sid The SID of the build for the deployment.
- # @return [DeploymentInstance] Newly created DeploymentInstance
+ # @return [DeploymentInstance] Created DeploymentInstance
def create(build_sid: :unset)
data = Twilio::Values.of({'BuildSid' => build_sid, })
- payload = @version.create(
- 'POST',
- @uri,
- data: data
- )
+ payload = @version.create('POST', @uri, data: data)
DeploymentInstance.new(
@version,
payload,
service_sid: @solution[:service_sid],
@@ -196,21 +189,15 @@
@solution = {service_sid: service_sid, environment_sid: environment_sid, sid: sid, }
@uri = "/Services/#{@solution[:service_sid]}/Environments/#{@solution[:environment_sid]}/Deployments/#{@solution[:sid]}"
end
##
- # Fetch a DeploymentInstance
+ # Fetch the DeploymentInstance
# @return [DeploymentInstance] Fetched DeploymentInstance
def fetch
- params = Twilio::Values.of({})
+ payload = @version.fetch('GET', @uri)
- payload = @version.fetch(
- 'GET',
- @uri,
- params,
- )
-
DeploymentInstance.new(
@version,
payload,
service_sid: @solution[:service_sid],
environment_sid: @solution[:environment_sid],
@@ -332,10 +319,10 @@
def url
@properties['url']
end
##
- # Fetch a DeploymentInstance
+ # Fetch the DeploymentInstance
# @return [DeploymentInstance] Fetched DeploymentInstance
def fetch
context.fetch
end
\ No newline at end of file