src/Shipment.php
public function getManifest($manifest_id, $rel = '', array $options = [])
    {
        if (!empty($rel) && ($rel !== 'details')) {
            $message = sprintf(
                'Unsupported "rel" value: "%s". Supported "rel" value are "details" or null.',
                $rel
            );
            throw new \InvalidArgumentException($message);
        }

        $endpoint = sprintf(
            'rs/%s/%s/manifest/%s/%s',
            $this->config['customer_number'],
            $this->config['customer_number'],
            $manifest_id,
            $rel
        );
        $response = $this->get(
            $endpoint,
            ['Accept' => 'application/vnd.cpc.manifest-v8+xml'],
            $options
        );
        return $response;
    }
public function getManifest($manifest_id, $rel = '', array $options = [])
    {
        if (!empty($rel) && ($rel !== 'details')) {
            $message = sprintf(
                'Unsupported "rel" value: "%s". Supported "rel" value are "details" or null.',
                $rel
            );
            throw new \InvalidArgumentException($message);
        }

        $endpoint = sprintf(
            'rs/%s/%s/manifest/%s/%s',
            $this->config['customer_number'],
            $this->config['customer_number'],
            $manifest_id,
            $rel
        );
        $response = $this->get(
            $endpoint,
            ['Accept' => 'application/vnd.cpc.manifest-v8+xml'],
            $options
        );
        return $response;
    }
public function getManifest ( $ manifest_id , $ rel = '' , array $ options = [ ] ) { if ( ! empty ( $ rel ) && ( $ rel !== 'details' ) ) { $ message = sprintf ( 'Unsupported "rel" value: "%s". Supported "rel" value are "details" or null.' , $ rel ) ; throw new \ InvalidArgumentException ( $ message ) ; } $ endpoint = sprintf ( 'rs/%s/%s/manifest/%s/%s' , $ this -> config [ 'customer_number' ] , $ this -> config [ 'customer_number' ] , $ manifest_id , $ rel ) ; $ response = $ this -> get ( $ endpoint , [ 'Accept' => 'application/vnd.cpc.manifest-v8+xml' ] , $ options ) ; return $ response ; }
Get the manifest from Canada Post server.

@param string $manifest_id
The manifest id.
@param string $rel
The 'rel' value from the links for a manifest. 'details' is the only valid argument.
@param array $options
The options array.

@return \DOMDocument|\Psr\Http\Message\StreamInterface
@throws \GuzzleHttp\Exception\GuzzleException
Get the manifest from Canada Post server .