PrimaryServerID = $primaryServerID; } use \DigiComp\HetznerDnsApi\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; } public function getUri() : string { return str_replace(array('{PrimaryServerID}'), array($this->PrimaryServerID), '/primary_servers/{PrimaryServerID}'); } public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array { return array(array(), null); } /** * {@inheritdoc} * * @throws \DigiComp\HetznerDnsApi\Exception\DeletePrimaryServerUnauthorizedException * @throws \DigiComp\HetznerDnsApi\Exception\DeletePrimaryServerForbiddenException * @throws \DigiComp\HetznerDnsApi\Exception\DeletePrimaryServerNotFoundException * @throws \DigiComp\HetznerDnsApi\Exception\DeletePrimaryServerNotAcceptableException * * @return null */ protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { if (200 === $status) { return null; } if (401 === $status) { throw new \DigiComp\HetznerDnsApi\Exception\DeletePrimaryServerUnauthorizedException(); } if (403 === $status) { throw new \DigiComp\HetznerDnsApi\Exception\DeletePrimaryServerForbiddenException(); } if (404 === $status) { throw new \DigiComp\HetznerDnsApi\Exception\DeletePrimaryServerNotFoundException(); } if (406 === $status) { throw new \DigiComp\HetznerDnsApi\Exception\DeletePrimaryServerNotAcceptableException(); } } public function getAuthenticationScopes() : array { return array('Auth-API-Token'); } }