PostNL

class Firstred\PostNL\PostNL
Class PostNL.
Implements

Psr\Log\LoggerAwareInterface

Summary

Methods

Constants

MODE_REST = 1
Deprecated

1.4.0

MODE_SOAP = 2
Deprecated

1.4.0

MODE_LEGACY = 2
Deprecated

1.4.0

Properties

public property Firstred\PostNL\PostNL::$threeSCountries
3S (or EU Pack Special) countries.
Type

array

public property Firstred\PostNL\PostNL::$a6positions
A6 positions
(index = amount of a6 left on the page).
Type

array

public static property Firstred\PostNL\PostNL::$verifySslCerts
Verify SSL certificate of the PostNL REST API.
Type

bool

Deprecated

protected static property Firstred\PostNL\PostNL::$apiKey
The PostNL REST API key or SOAP username/password to be used for requests.
In case of REST the API key is the `Password` property of the `UsernameToken`
In case of SOAP this has to be a `UsernameToken` object, with the following requirements:
- Do not pass a username (`null`)
And pass the plaintext password.
Type

string

protected static property Firstred\PostNL\PostNL::$customer
The PostNL Customer to be used for requests.
Type

\Firstred\PostNL\Entity\Customer

protected static property Firstred\PostNL\PostNL::$sandbox
Sandbox mode.
Type

bool

protected static property Firstred\PostNL\PostNL::$httpClient
Type

\Firstred\PostNL\HttpClient\ClientInterface

protected static property Firstred\PostNL\PostNL::$logger
Type

\Psr\Log\LoggerInterface

protected static property Firstred\PostNL\PostNL::$requestFactory
Type

\Psr\Http\Message\RequestFactoryInterface | \Firstred\PostNL\Factory\RequestFactoryInterface

protected static property Firstred\PostNL\PostNL::$responseFactory
Type

\Psr\Http\Message\ResponseFactoryInterface | \Firstred\PostNL\Factory\ResponseFactoryInterface

protected static property Firstred\PostNL\PostNL::$streamFactory
Type

\Psr\Http\Message\StreamFactoryInterface | \Firstred\PostNL\Factory\StreamFactoryInterface

protected static property Firstred\PostNL\PostNL::$mode
This is the current mode.
Type

int

protected static property Firstred\PostNL\PostNL::$barcodeService
Type

\Firstred\PostNL\Service\BarcodeServiceInterface

protected static property Firstred\PostNL\PostNL::$labellingService
Type

\Firstred\PostNL\Service\LabellingServiceInterface

protected static property Firstred\PostNL\PostNL::$confirmingService
Type

\Firstred\PostNL\Service\ConfirmingServiceInterface

protected static property Firstred\PostNL\PostNL::$shippingStatusService
Type

\Firstred\PostNL\Service\ShippingStatusServiceInterface

protected static property Firstred\PostNL\PostNL::$deliveryDateService
Type

\Firstred\PostNL\Service\DeliveryDateServiceInterface

protected static property Firstred\PostNL\PostNL::$timeframeService
Type

\Firstred\PostNL\Service\TimeframeServiceInterface

protected static property Firstred\PostNL\PostNL::$locationService
Type

\Firstred\PostNL\Service\LocationServiceInterface

protected static property Firstred\PostNL\PostNL::$shippingService
Type

\Firstred\PostNL\Service\ShippingServiceInterface

Methods

public Firstred\PostNL\PostNL::__construct($customer, $apiKey, $sandbox, $mode=null)
PostNL constructor.
Parameters

Valid options are: - MODE_REST: New REST API - MODE_SOAP: New SOAP API - MODE_LEGACY: Not supported anymore, converts to MODE_SOAP

Throws

\Firstred\PostNL\Exception\InvalidApiModeException

Throws

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws

\Firstred\PostNL\Exception\InvalidApiModeException

Throws

\Firstred\PostNL\Exception\InvalidConfigurationException

public Firstred\PostNL\PostNL::setToken($apiKey)
Set the token.
Parameters
Returns

\Firstred\PostNL\PostNL

Throws

\Firstred\PostNL\Exception\InvalidConfigurationException

Since

1.0.0

public Firstred\PostNL\PostNL::getRestApiKey()
Get REST API Key.
Returns

bool | string

Since

1.0.0

Deprecated

1.4.1 Use `getApiKey` instead

public Firstred\PostNL\PostNL::getApiKey()
Get API Key.
Returns

null | string

Since

1.4.1

Deprecated

1.4.1 Will be removed from 2.0.0 on, without a replacement.

public Firstred\PostNL\PostNL::getToken()
Get UsernameToken object (for SOAP).
Returns

bool | \Firstred\PostNL\Entity\SOAP\UsernameToken

Since

1.0.0

Deprecated

1.4.1 Use `getApiKey` instead

public Firstred\PostNL\PostNL::getCustomer()
Get PostNL Customer.
Returns

\Firstred\PostNL\Entity\Customer

Since

1.0.0

public Firstred\PostNL\PostNL::setCustomer($customer)
Set PostNL Customer.
Parameters
Returns

\Firstred\PostNL\PostNL

Since

1.0.0

public Firstred\PostNL\PostNL::getSandbox()
Get sandbox mode.
Returns

bool

Since

1.0.0

public Firstred\PostNL\PostNL::setSandbox($sandbox)
Set sandbox mode.
Parameters
  • $sandbox (bool)

Returns

\Firstred\PostNL\PostNL

Since

1.0.0

public Firstred\PostNL\PostNL::getMode()
Get the current mode.
Returns

int

Since

1.0.0

public Firstred\PostNL\PostNL::setMode($mode)
Set current mode.
Parameters
  • $mode (int)

Returns

\Firstred\PostNL\PostNL

Throws

\Firstred\PostNL\Exception\InvalidApiModeException

Since

1.0.0

public Firstred\PostNL\PostNL::getHttpClient()
HttpClient.
Automatically load Guzzle when available
Returns

\Firstred\PostNL\HttpClient\ClientInterface

Since

1.0.0

public Firstred\PostNL\PostNL::setHttpClient($client)
Set the HttpClient.
Parameters
Since

1.0.0

public Firstred\PostNL\PostNL::getLogger()
Get the logger.
Returns

\Psr\Log\LoggerInterface

Since

1.0.0

public Firstred\PostNL\PostNL::setLogger($logger)
Set the logger.
Parameters
  • $logger (Psr\Log\LoggerInterface)

Returns

\Firstred\PostNL\PostNL

Since

1.0.0

public Firstred\PostNL\PostNL::resetLogger()
Set a dummy logger
Returns

static

Since

1.2.0

public Firstred\PostNL\PostNL::getRequestFactory()
Get PSR-7 Request factory.
Returns

\Psr\Http\Message\RequestFactoryInterface | \Firstred\PostNL\Factory\RequestFactoryInterface

Since

1.2.0

public Firstred\PostNL\PostNL::setRequestFactory($requestFactory)
Set PSR-7 Request factory.
Parameters
Returns

static

Since

1.2.0

Since

1.2.0

public Firstred\PostNL\PostNL::getResponseFactory()
Get PSR-7 Response factory.
Returns

\Psr\Http\Message\ResponseFactoryInterface | \Firstred\PostNL\Factory\ResponseFactoryInterface

Since

1.2.0

public Firstred\PostNL\PostNL::setResponseFactory($responseFactory)
Set PSR-7 Response factory.
Parameters
Returns

static

Since

1.2.0

Since

1.2.0

public Firstred\PostNL\PostNL::getStreamFactory()
Set PSR-7 Stream factory.
Returns

\Psr\Http\Message\StreamFactoryInterface | \Firstred\PostNL\Factory\StreamFactoryInterface

Since

1.2.0

public Firstred\PostNL\PostNL::setStreamFactory($streamFactory)
Set PSR-7 Stream factory.
Parameters
Returns

static

Since

1.2.0

Since

1.2.0

public Firstred\PostNL\PostNL::getBarcodeService()
Barcode service.
Automatically load the barcode service
Returns

\Firstred\PostNL\Service\BarcodeServiceInterface

Since

1.0.0

public Firstred\PostNL\PostNL::setBarcodeService($service)
Set the barcode service.
Parameters
Since

1.0.0

public Firstred\PostNL\PostNL::getLabellingService()
Labelling service.
Automatically load the labelling service
Returns

\Firstred\PostNL\Service\LabellingServiceInterface

Since

1.0.0

public Firstred\PostNL\PostNL::setLabellingService($service)
Set the labelling service.
Parameters
Since

1.0.0

public Firstred\PostNL\PostNL::getConfirmingService()
Confirming service.
Automatically load the confirming service
Returns

\Firstred\PostNL\Service\ConfirmingServiceInterface

Since

1.0.0

public Firstred\PostNL\PostNL::setConfirmingService($service)
Set the confirming service.
Parameters
Since

1.0.0

public Firstred\PostNL\PostNL::getShippingStatusService()
Shipping status service.
Automatically load the shipping status service
Returns

\Firstred\PostNL\Service\ShippingStatusServiceInterface

Since

1.0.0

public Firstred\PostNL\PostNL::setShippingStatusService($service)
Set the shipping status service.
Parameters
Since

1.0.0

public Firstred\PostNL\PostNL::getDeliveryDateService()
Delivery date service.
Automatically load the delivery date service
Returns

\Firstred\PostNL\Service\DeliveryDateServiceInterface

Since

1.0.0

public Firstred\PostNL\PostNL::setDeliveryDateService($service)
Set the delivery date service.
Parameters
Since

1.0.0

public Firstred\PostNL\PostNL::getTimeframeService()
Timeframe service.
Automatically load the timeframe service
Returns

\Firstred\PostNL\Service\TimeframeServiceInterface

Since

1.0.0

public Firstred\PostNL\PostNL::setTimeframeService($service)
Set the timeframe service.
Parameters
Since

1.0.0

public Firstred\PostNL\PostNL::getLocationService()
Location service.
Automatically load the location service
Returns

\Firstred\PostNL\Service\LocationServiceInterface

Since

1.0.0

public Firstred\PostNL\PostNL::setLocationService($service)
Set the location service.
Parameters
Since

1.0.0

public Firstred\PostNL\PostNL::getShippingService()
Shipping service.
Automatically load the shipping service
Returns

mixed

Since

1.2.0

public Firstred\PostNL\PostNL::setShippingService($service)
Set the shipping service.
Parameters
Since

1.2.0

public Firstred\PostNL\PostNL::generateBarcode($type=\'3S\', $range=null, $serie=null, $eps=false)
Generate a single barcode.
Parameters
  • $type (string)

  • $range (string)

  • $serie (string)

  • $eps (bool)

Returns

string The barcode as a 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\InvalidConfigurationException

Throws

\Firstred\PostNL\Exception\InvalidBarcodeException

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\InvalidBarcodeException

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\InvalidBarcodeException

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\InvalidBarcodeException

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\InvalidBarcodeException

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\InvalidBarcodeException

Since

1.0.0

public Firstred\PostNL\PostNL::generateBarcodeByCountryCode($iso)
Generate a single barcode by country code.
Parameters
  • $iso (string) 2-letter Country ISO Code

Returns

string The Barcode as a string

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\InvalidBarcodeException

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\InvalidBarcodeException

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\InvalidBarcodeException

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\InvalidBarcodeException

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\InvalidBarcodeException

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\InvalidBarcodeException

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\InvalidBarcodeException

Since

1.0.0

public Firstred\PostNL\PostNL::generateBarcodesByCountryCodes($isos)
Generate a single barcode by country code.
Parameters
  • $isos (array) key = iso code, value = amount of barcodes requested

Returns

array Country isos with the barcode as string

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\InvalidBarcodeException

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\InvalidBarcodeException

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\InvalidBarcodeException

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\InvalidBarcodeException

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\InvalidBarcodeException

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\InvalidBarcodeException

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\InvalidBarcodeException

Since

1.0.0

public Firstred\PostNL\PostNL::sendShipment($shipment, $printertype=\'GraphicFile\|PDF\', $confirm=true)
Send a single shipment.
Parameters
Returns

\Firstred\PostNL\Entity\Response\SendShipmentResponse

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Since

1.2.0

public Firstred\PostNL\PostNL::sendShipments( $shipments, $printertype=\'GraphicFile\|PDF\', $confirm=true, $merge=false, $format=Label::FORMAT\_A4, $positions=\[1 =\> true, 2 =\> true, 3 =\> true, 4 =\> true\], $a6Orientation=\'P\')
Send multiple shipments.
Parameters
  • $shipments (Firstred\PostNL\Entity\Shipment[]) Array of shipments

  • $printertype (string) Printer type, see PostNL dev docs for available types

  • $confirm (bool) Immediately confirm the shipments

  • $merge (bool) Merge the PDFs and return them in a MyParcel way

  • $format (int) A4 or A6

  • $positions (array) Set the positions of the A6s on the first A4

The indices should be the position number, marked with true or false These are the position numbers: ` +-+-+ |2|4| +-+-+ |1|3| +-+-+ ` So, for ` +-+-+ |x|✔| +-+-+ |✔|x| +-+-+ ` you would have to pass: `php [ 1 => true, 2 => false, 3 => false, 4 => true, ] ` * $a6Orientation (string) A6 orientation (P or L)

Returns

\Firstred\PostNL\Entity\Response\SendShipmentResponse | string

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException

Throws

\setasign\Fpdi\PdfParser\Filter\FilterException

Throws

\setasign\Fpdi\PdfParser\PdfParserException

Throws

\setasign\Fpdi\PdfParser\Type\PdfTypeException

Throws

\setasign\Fpdi\PdfReader\PdfReaderException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException

Throws

\setasign\Fpdi\PdfParser\Filter\FilterException

Throws

\setasign\Fpdi\PdfParser\PdfParserException

Throws

\setasign\Fpdi\PdfParser\Type\PdfTypeException

Throws

\setasign\Fpdi\PdfReader\PdfReaderException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException

Throws

\setasign\Fpdi\PdfParser\Filter\FilterException

Throws

\setasign\Fpdi\PdfParser\PdfParserException

Throws

\setasign\Fpdi\PdfParser\Type\PdfTypeException

Throws

\setasign\Fpdi\PdfReader\PdfReaderException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException

Throws

\setasign\Fpdi\PdfParser\Filter\FilterException

Throws

\setasign\Fpdi\PdfParser\PdfParserException

Throws

\setasign\Fpdi\PdfParser\Type\PdfTypeException

Throws

\setasign\Fpdi\PdfReader\PdfReaderException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException

Throws

\setasign\Fpdi\PdfParser\Filter\FilterException

Throws

\setasign\Fpdi\PdfParser\PdfParserException

Throws

\setasign\Fpdi\PdfParser\Type\PdfTypeException

Throws

\setasign\Fpdi\PdfReader\PdfReaderException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException

Throws

\setasign\Fpdi\PdfParser\Filter\FilterException

Throws

\setasign\Fpdi\PdfParser\PdfParserException

Throws

\setasign\Fpdi\PdfParser\Type\PdfTypeException

Throws

\setasign\Fpdi\PdfReader\PdfReaderException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException

Throws

\setasign\Fpdi\PdfParser\Filter\FilterException

Throws

\setasign\Fpdi\PdfParser\PdfParserException

Throws

\setasign\Fpdi\PdfParser\Type\PdfTypeException

Throws

\setasign\Fpdi\PdfReader\PdfReaderException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException

Throws

\setasign\Fpdi\PdfParser\Filter\FilterException

Throws

\setasign\Fpdi\PdfParser\PdfParserException

Throws

\setasign\Fpdi\PdfParser\Type\PdfTypeException

Throws

\setasign\Fpdi\PdfReader\PdfReaderException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException

Throws

\setasign\Fpdi\PdfParser\Filter\FilterException

Throws

\setasign\Fpdi\PdfParser\PdfParserException

Throws

\setasign\Fpdi\PdfParser\Type\PdfTypeException

Throws

\setasign\Fpdi\PdfReader\PdfReaderException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException

Throws

\setasign\Fpdi\PdfParser\Filter\FilterException

Throws

\setasign\Fpdi\PdfParser\PdfParserException

Throws

\setasign\Fpdi\PdfParser\Type\PdfTypeException

Throws

\setasign\Fpdi\PdfReader\PdfReaderException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException

Throws

\setasign\Fpdi\PdfParser\Filter\FilterException

Throws

\setasign\Fpdi\PdfParser\PdfParserException

Throws

\setasign\Fpdi\PdfParser\Type\PdfTypeException

Throws

\setasign\Fpdi\PdfReader\PdfReaderException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException

Throws

\setasign\Fpdi\PdfParser\Filter\FilterException

Throws

\setasign\Fpdi\PdfParser\PdfParserException

Throws

\setasign\Fpdi\PdfParser\Type\PdfTypeException

Throws

\setasign\Fpdi\PdfReader\PdfReaderException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException

Throws

\setasign\Fpdi\PdfParser\Filter\FilterException

Throws

\setasign\Fpdi\PdfParser\PdfParserException

Throws

\setasign\Fpdi\PdfParser\Type\PdfTypeException

Throws

\setasign\Fpdi\PdfReader\PdfReaderException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Since

1.2.0

public Firstred\PostNL\PostNL::generateLabel($shipment, $printertype=\'GraphicFile\|PDF\', $confirm=true)
Generate a single label.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GenerateLabelResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Since

1.0.0

public Firstred\PostNL\PostNL::generateLabels( $shipments, $printertype=\'GraphicFile\|PDF\', $confirm=true, $merge=false, $format=Label::FORMAT\_A4, $positions=\[1 =\> true, 2 =\> true, 3 =\> true, 4 =\> true\], $a6Orientation=\'P\')
Generate or retrieve multiple labels.
Note that instead of returning a GenerateLabelResponse this function can merge the labels and return a
string which contains the PDF with the merged pages as well.
Parameters
  • $shipments (Firstred\PostNL\Entity\Shipment[]) (key = ID) Shipments

  • $printertype (string) Printer type, see PostNL dev docs for available types

  • $confirm (bool) Immediately confirm the shipments

  • $merge (bool) Merge the PDFs and return them in a MyParcel way

  • $format (int) A4 or A6

  • $positions (array) Set the positions of the A6s on the first A4

The indices should be the position number, marked with true or false These are the position numbers: ` +-+-+ |2|4| +-+-+ |1|3| +-+-+ ` So, for ` +-+-+ |x|✔| +-+-+ |✔|x| +-+-+ ` you would have to pass: `php [ 1 => true, 2 => false, 3 => false, 4 => true, ] ` * $a6Orientation (string) A6 orientation (P or L)

Returns

\Firstred\PostNL\Entity\Response\GenerateLabelResponse[] | string

Throws

\setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException

Throws

\setasign\Fpdi\PdfParser\Filter\FilterException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\setasign\Fpdi\PdfParser\PdfParserException

Throws

\setasign\Fpdi\PdfReader\PdfReaderException

Throws

\setasign\Fpdi\PdfParser\Type\PdfTypeException

Throws

\Firstred\PostNL\Exception\PostNLException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException

Throws

\setasign\Fpdi\PdfParser\Filter\FilterException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\setasign\Fpdi\PdfParser\PdfParserException

Throws

\setasign\Fpdi\PdfReader\PdfReaderException

Throws

\setasign\Fpdi\PdfParser\Type\PdfTypeException

Throws

\Firstred\PostNL\Exception\PostNLException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException

Throws

\setasign\Fpdi\PdfParser\Filter\FilterException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\setasign\Fpdi\PdfParser\PdfParserException

Throws

\setasign\Fpdi\PdfReader\PdfReaderException

Throws

\setasign\Fpdi\PdfParser\Type\PdfTypeException

Throws

\Firstred\PostNL\Exception\PostNLException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException

Throws

\setasign\Fpdi\PdfParser\Filter\FilterException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\setasign\Fpdi\PdfParser\PdfParserException

Throws

\setasign\Fpdi\PdfReader\PdfReaderException

Throws

\setasign\Fpdi\PdfParser\Type\PdfTypeException

Throws

\Firstred\PostNL\Exception\PostNLException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException

Throws

\setasign\Fpdi\PdfParser\Filter\FilterException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\setasign\Fpdi\PdfParser\PdfParserException

Throws

\setasign\Fpdi\PdfReader\PdfReaderException

Throws

\setasign\Fpdi\PdfParser\Type\PdfTypeException

Throws

\Firstred\PostNL\Exception\PostNLException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException

Throws

\setasign\Fpdi\PdfParser\Filter\FilterException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\setasign\Fpdi\PdfParser\PdfParserException

Throws

\setasign\Fpdi\PdfReader\PdfReaderException

Throws

\setasign\Fpdi\PdfParser\Type\PdfTypeException

Throws

\Firstred\PostNL\Exception\PostNLException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException

Throws

\setasign\Fpdi\PdfParser\Filter\FilterException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\setasign\Fpdi\PdfParser\PdfParserException

Throws

\setasign\Fpdi\PdfReader\PdfReaderException

Throws

\setasign\Fpdi\PdfParser\Type\PdfTypeException

Throws

\Firstred\PostNL\Exception\PostNLException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException

Throws

\setasign\Fpdi\PdfParser\Filter\FilterException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\setasign\Fpdi\PdfParser\PdfParserException

Throws

\setasign\Fpdi\PdfReader\PdfReaderException

Throws

\setasign\Fpdi\PdfParser\Type\PdfTypeException

Throws

\Firstred\PostNL\Exception\PostNLException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException

Throws

\setasign\Fpdi\PdfParser\Filter\FilterException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\setasign\Fpdi\PdfParser\PdfParserException

Throws

\setasign\Fpdi\PdfReader\PdfReaderException

Throws

\setasign\Fpdi\PdfParser\Type\PdfTypeException

Throws

\Firstred\PostNL\Exception\PostNLException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException

Throws

\setasign\Fpdi\PdfParser\Filter\FilterException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\setasign\Fpdi\PdfParser\PdfParserException

Throws

\setasign\Fpdi\PdfReader\PdfReaderException

Throws

\setasign\Fpdi\PdfParser\Type\PdfTypeException

Throws

\Firstred\PostNL\Exception\PostNLException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException

Throws

\setasign\Fpdi\PdfParser\Filter\FilterException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\setasign\Fpdi\PdfParser\PdfParserException

Throws

\setasign\Fpdi\PdfReader\PdfReaderException

Throws

\setasign\Fpdi\PdfParser\Type\PdfTypeException

Throws

\Firstred\PostNL\Exception\PostNLException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException

Throws

\setasign\Fpdi\PdfParser\Filter\FilterException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\setasign\Fpdi\PdfParser\PdfParserException

Throws

\setasign\Fpdi\PdfReader\PdfReaderException

Throws

\setasign\Fpdi\PdfParser\Type\PdfTypeException

Throws

\Firstred\PostNL\Exception\PostNLException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Since

1.0.0

public Firstred\PostNL\PostNL::confirmShipment($shipment)
Confirm a single shipment.
Parameters
Returns

\Firstred\PostNL\Entity\Response\ConfirmingResponseShipment

Since

1.0.0

public Firstred\PostNL\PostNL::confirmShipments($shipments)
Confirm multiple shipments.
Parameters
  • $shipments (array)

Returns

\Firstred\PostNL\Entity\Response\ConfirmingResponseShipment[]

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\NotFoundException

Since

1.0.0

public Firstred\PostNL\PostNL::getCurrentStatus($currentStatus)
Get the current status of a shipment.
This is a combi-function, supporting the following:
- CurrentStatus (by barcode):
- Fill the Shipment->Barcode property. Leave the rest empty.
- CurrentStatusByReference:
- Fill the Shipment->Reference property. Leave the rest empty.
Parameters
Returns

\Firstred\PostNL\Entity\Response\CurrentStatusResponse

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Since

1.0.0

Deprecated

1.2.0 Use the dedicated methods (get by phase and status are no longer working)

public Firstred\PostNL\PostNL::getShippingStatusByBarcode($barcode, $complete=false)
Get the current status of the given shipment by barcode.
Parameters
  • $barcode (string) Pass a single barcode

  • $complete (bool) Return the complete status (incl. shipment history)

Returns

\Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment | \Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment

Throws

\Firstred\PostNL\Exception\ShipmentNotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\ShipmentNotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\ShipmentNotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\ShipmentNotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\ShipmentNotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\ShipmentNotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\ShipmentNotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Since

1.2.0

public Firstred\PostNL\PostNL::getShippingStatusesByBarcodes($barcodes, $complete=false)
Get the current statuses of the given shipments by barcodes.
Parameters
  • $barcodes (string[]) Pass multiple barcodes

  • $complete (bool) Return the complete status (incl. shipment history)

Returns

\Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment[] | \Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment[]

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Since

1.2.0

public Firstred\PostNL\PostNL::getShippingStatusByReference($reference, $complete=false)
Get the current status of the given shipment by reference.
Parameters
  • $reference (string) Pass a single reference

  • $complete (bool) Return the complete status (incl. shipment history)

Returns

\Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment | \Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\ShipmentNotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\ShipmentNotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\ShipmentNotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\ShipmentNotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\ShipmentNotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\ShipmentNotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\ShipmentNotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\ShipmentNotFoundException

Since

1.2.0

public Firstred\PostNL\PostNL::getShippingStatusesByReferences($references, $complete=false)
Get the current statuses of the given shipments by references.
Parameters
  • $references (string[]) Pass multiple references

  • $complete (bool) Return the complete status (incl. shipment history)

Returns

\Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment[] | \Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment[]

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Since

1.2.0

public Firstred\PostNL\PostNL::getCompleteStatus($completeStatus)
Get the complete status of a shipment.
This is a combi-function, supporting the following:
- CurrentStatus (by barcode):
- Fill the Shipment->Barcode property. Leave the rest empty.
- CurrentStatusByReference:
- Fill the Shipment->Reference property. Leave the rest empty.
- CurrentStatusByPhase:
- Fill the Shipment->PhaseCode property, do not pass Barcode or Reference.
Optionally add DateFrom and/or DateTo.
- CurrentStatusByStatus:
- Fill the Shipment->StatusCode property. Leave the rest empty.
Parameters
Returns

\Firstred\PostNL\Entity\Response\CompleteStatusResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Since

1.0.0

Deprecated

1.2.0 Use the dedicated getShippingStatus* methods (get by phase and status are no longer working)

public Firstred\PostNL\PostNL::getUpdatedShipments($dateTimeFrom=null, $dateTimeTo=null)
Get updated shipments
Parameters
  • $dateTimeFrom (DateTimeInterface | null)

  • $dateTimeTo (DateTimeInterface | null)

Returns

\Firstred\PostNL\Entity\Response\UpdatedShipmentsResponse[]

Since

1.2.0

public Firstred\PostNL\PostNL::getSignature($signature)
Get the signature of a shipment.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GetSignatureResponseSignature

Since

1.0.0

Deprecated

1.2.0 Use the getSignature(s)By* alternatives

public Firstred\PostNL\PostNL::getSignatureByBarcode($barcode)
Get the signature of a shipment.
Parameters
  • $barcode (string)

Returns

\Firstred\PostNL\Entity\Response\GetSignatureResponseSignature

Since

1.2.0

public Firstred\PostNL\PostNL::getSignaturesByBarcodes($barcodes)
Get the signature of a shipment.
Parameters
  • $barcodes (string[])

Returns

\Firstred\PostNL\Entity\Response\GetSignatureResponseSignature[]

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Since

1.2.0

public Firstred\PostNL\PostNL::getDeliveryDate($getDeliveryDate)
Get a delivery date.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GetDeliveryDateResponse

Since

1.0.0

public Firstred\PostNL\PostNL::getSentDate($getSentDate)
Get a shipping date.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GetSentDateResponse

Since

1.0.0

public Firstred\PostNL\PostNL::getTimeframes($getTimeframes)
Get timeframes.
Parameters
Returns

\Firstred\PostNL\Entity\Response\ResponseTimeframes

Since

1.0.0

public Firstred\PostNL\PostNL::getNearestLocations($getNearestLocations)
Get nearest locations.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GetNearestLocationsResponse

Since

1.0.0

public Firstred\PostNL\PostNL::getTimeframesAndNearestLocations($getTimeframes, $getNearestLocations, $getDeliveryDate)
All-in-one function for checkout widgets. It retrieves and returns the
- timeframes
- locations
- delivery date.
Parameters
Returns
array [

timeframes => ResponseTimeframes, locations => GetNearestLocationsResponse, delivery_date => GetDeliveryDateResponse,

]

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws

\Psr\Cache\InvalidArgumentException

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\InvalidConfigurationException

Throws

\Psr\Cache\InvalidArgumentException

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\InvalidConfigurationException

Throws

\Psr\Cache\InvalidArgumentException

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\InvalidConfigurationException

Throws

\Psr\Cache\InvalidArgumentException

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\InvalidConfigurationException

Throws

\Psr\Cache\InvalidArgumentException

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\InvalidConfigurationException

Throws

\Psr\Cache\InvalidArgumentException

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\InvalidConfigurationException

Throws

\Psr\Cache\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.0.0

public Firstred\PostNL\PostNL::getLocationsInArea($getLocationsInArea)
Get locations in area.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse

Since

1.0.0

public Firstred\PostNL\PostNL::getLocation($getLocation)
Get locations in area.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse

Since

1.0.0

public Firstred\PostNL\PostNL::findBarcodeSerie($type, $range, $eps=null)
Find a suitable serie for the barcode.
Parameters
  • $type (string)

  • $range (string)

  • $eps (bool) Indicates whether it is an EPS Shipment

Returns

string

Throws

\Firstred\PostNL\Exception\InvalidBarcodeException

Since

1.0.0

private Firstred\PostNL\PostNL::checkEnvironment()
Check whether this library will work in the current environment
Since

1.2.0

public static Firstred\PostNL\PostNL::triggerDeprecation($package, $version, $message, ...$args)
Triggers a silenced deprecation notice.
Copyright (c) 2020-present Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Parameters
  • $package (string) The name of the Composer package that is triggering the deprecation

  • $version (string) The version of the package that introduced the deprecation

  • $message (string) The message of the deprecation

  • …$args (mixed) Values to insert in the message using printf() formatting

Since

1.4.0