src/ClientBase.php
public function delete($endpoint, array $headers = [], array $options = [])
    {
        $url = $this->baseUrl . '/' . $endpoint;

        try {
            $client = $this->buildClient($options);
            $options += [
                'auth' => [$this->username, $this->password],
                'headers' => $headers,
            ];

            $response = $client->request('DELETE', $url, $options);
        } catch (GuzzleClientException $exception) {
            $response = $exception->getResponse();

            throw new ClientException(
                $exception->getMessage(),
                $this->parseResponse($response),
                $exception->getRequest(),
                $response,
                $exception->getPrevious(),
                $exception->getHandlerContext()
            );
        }
        return $this->parseResponse($response);
    }
public function delete($endpoint, array $headers = [], array $options = [])
    {
        $url = $this->baseUrl . '/' . $endpoint;

        try {
            $client = $this->buildClient($options);
            $options += [
                'auth' => [$this->username, $this->password],
                'headers' => $headers,
            ];

            $response = $client->request('DELETE', $url, $options);
        } catch (GuzzleClientException $exception) {
            $response = $exception->getResponse();

            throw new ClientException(
                $exception->getMessage(),
                $this->parseResponse($response),
                $exception->getRequest(),
                $response,
                $exception->getPrevious(),
                $exception->getHandlerContext()
            );
        }
        return $this->parseResponse($response);
    }
public function delete ( $ endpoint , array $ headers = [ ] , array $ options = [ ] ) { $ url = $ this -> baseUrl . '/' . $ endpoint ; try { $ client = $ this -> buildClient ( $ options ) ; $ options += [ 'auth' => [ $ this -> username , $ this -> password ] , 'headers' => $ headers , ] ; $ response = $ client -> request ( 'DELETE' , $ url , $ options ) ; } catch ( GuzzleClientException $ exception ) { $ response = $ exception -> getResponse ( ) ; throw new ClientException ( $ exception -> getMessage ( ) , $ this -> parseResponse ( $ response ) , $ exception -> getRequest ( ) , $ response , $ exception -> getPrevious ( ) , $ exception -> getHandlerContext ( ) ) ; } return $ this -> parseResponse ( $ response ) ; }
Send the DELETE request to the Canada Post API.

@param string $endpoint
The endpoint to send the request.
@param array $headers
The HTTP headers array.
@param array $options
An array of options.

@return \DOMDocument|\Psr\Http\Message\StreamInterface
@throws \GuzzleHttp\Exception\GuzzleException
Send the DELETE request to the Canada Post API .