public function deleteRegistration(RegistrationInterface $registration)
    {
        if (!$registration->getRegistrationId() || !$registration->getETag()) {
            throw new \RuntimeException('Registration ID and ETag are mandatory.');
        }

        $uri = $registration->buildUri($this->endpoint, $this->hubPath).self::API_VERSION;

        $token = $this->generateSasToken($uri);
        $headers = array_merge(['Authorization: '.$token], $registration->getHeaders());

        $this->request(self::METHOD_DELETE, $uri, $headers);
    }
public function deleteRegistration(RegistrationInterface $registration)
    {
        if (!$registration->getRegistrationId() || !$registration->getETag()) {
            throw new \RuntimeException('Registration ID and ETag are mandatory.');
        }

        $uri = $registration->buildUri($this->endpoint, $this->hubPath).self::API_VERSION;

        $token = $this->generateSasToken($uri);
        $headers = array_merge(['Authorization: '.$token], $registration->getHeaders());

        $this->request(self::METHOD_DELETE, $uri, $headers);
    }
public function deleteRegistration ( RegistrationInterface $ registration ) { if ( ! $ registration -> getRegistrationId ( ) || ! $ registration -> getETag ( ) ) { throw new \ RuntimeException ( 'Registration ID and ETag are mandatory.' ) ; } $ uri = $ registration -> buildUri ( $ this -> endpoint , $ this -> hubPath ) . self :: API_VERSION ; $ token = $ this -> generateSasToken ( $ uri ) ; $ headers = array_merge ( [ 'Authorization: ' . $ token ] , $ registration -> getHeaders ( ) ) ; $ this -> request ( self :: METHOD_DELETE , $ uri , $ headers ) ; }
Delete Registration.

@param ApiContentInterface $registration

@throws \RuntimeException
Delete Registration .