solution = [ 'serviceSid' => $serviceSid, 'environmentSid' => $environmentSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) .'/Environments/' . \rawurlencode($environmentSid) .'/Deployments/' . \rawurlencode($sid) .''; } /** * Fetch the DeploymentInstance * * @return DeploymentInstance Fetched DeploymentInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DeploymentInstance { $payload = $this->version->fetch('GET', $this->uri); return new DeploymentInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['environmentSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Serverless.V1.DeploymentContext ' . \implode(' ', $context) . ']'; } }