BarcodeService

class Firstred\PostNL\Service\BarcodeService
Class BarcodeService.
Parent:

Firstred\PostNL\Service\AbstractService

Implements:

Firstred\PostNL\Service\BarcodeServiceInterface

Summary

Methods

Constants

VERSION = \'1\.1\'
SANDBOX_ENDPOINT = \'https://api\-sandbox\.postnl\.nl/shipment/v1\_1/barcode\'
LIVE_ENDPOINT = \'https://api\.postnl\.nl/shipment/v1\_1/barcode\'
SOAP_ACTION = \'http://postnl\.nl/cif/services/BarcodeWebService/IBarcodeWebService/GenerateBarcode\'
ENVELOPE_NAMESPACE = \'http://schemas\.xmlsoap\.org/soap/envelope/\'
SERVICES_NAMESPACE = \'http://postnl\.nl/cif/services/BarcodeWebService/\'
DOMAIN_NAMESPACE = \'http://postnl\.nl/cif/domain/BarcodeWebService/\'

Properties

protected static property Firstred\PostNL\Service\BarcodeService::$postnl
Type:

\Firstred\PostNL\PostNL

public property Firstred\PostNL\Service\BarcodeService::$namespaces
Namespaces uses for the SOAP version of this service.
Type:

array

Methods

public Firstred\PostNL\Service\BarcodeService::generateBarcodeREST($generateBarcode)
Generate a single barcode.
Parameters:
Returns:

string | null Barcode

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Since:

1.0.0

Deprecated:

1.4.0 Use `generateBarcode` instead

public Firstred\PostNL\Service\BarcodeService::generateBarcodeSOAP($generateBarcode)
Generate a single barcode.
Parameters:
Returns:

string Barcode

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Since:

1.0.0

Deprecated:

1.4.0 Use `generateBarcode` instead

public Firstred\PostNL\Service\BarcodeService::generateBarcodesREST($generateBarcodes)
Generate multiple barcodes at once.
Parameters:
Returns:

string[] Barcodes

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Since:

1.0.0

Deprecated:

1.4.0 Use `generateBarcodes` instead

public Firstred\PostNL\Service\BarcodeService::generateBarcodesSOAP($generateBarcodes)
Generate multiple barcodes at once.
Parameters:
Returns:

string[] Barcodes

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Since:

1.0.0

Deprecated:

1.4.0

public Firstred\PostNL\Service\BarcodeService::buildGenerateBarcodeRequestREST($generateBarcode)
Build the `generateBarcode` HTTP request for the REST API.
Parameters:
Returns:

\Psr\Http\Message\RequestInterface

Since:

1.0.0

Deprecated:

1.4.0

public Firstred\PostNL\Service\BarcodeService::buildGenerateBarcodeRequestSOAP($generateBarcode)
Build the `generateBarcode` HTTP request for the SOAP API.
Parameters:
Returns:

\Psr\Http\Message\RequestInterface

Since:

1.0.0

Deprecated:

1.4.0

public Firstred\PostNL\Service\BarcodeService::processGenerateBarcodeResponseREST($response)
Process GenerateBarcode REST response.
Parameters:
  • $response (Psr\Http\Message\ResponseInterface)

Returns:

\stdClass

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Since:

1.0.0

Deprecated:

1.4.0

public Firstred\PostNL\Service\BarcodeService::processGenerateBarcodeResponseSOAP($response)
Process GenerateBarcode SOAP response.
Parameters:
  • $response (Psr\Http\Message\ResponseInterface)

Returns:

string

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\ResponseException

Since:

1.0.0

Deprecated:

1.4.0