Welcome to the documentation site of an unofficial PostNL PHP library

These PHP API bindings aim to make it easier to connect to PostNL’s CIF API, used for displaying delivery options, printing shipment labels and retrieving actual shipment statuses.

  • The goal is to have a simple interface for connecting with either the SOAP or REST API, while still being able to follow the official API documentation.

  • Abstracts away direct requests to the API, allowing you to focus on the code itself. The object structure is based on the SOAP API.

  • Can merge PDF labels (both A6 and A4) and automatically handles concurrent requests when necessary, making batch processing a lot easier.

  • Follows PHP standards, some of them are:

    • PSR-3 logging. You can log the requests and responses for debugging purposes. More info on the page Logging.

    • PSR-7 interfaces for requests and responses. Build and process functions are provided for every service so you can create your own mix of batch requests. See the Firstred\PostNL\PostNL::getTimeframesAndNearestLocations method for an example.

    • PSR-18 HTTP Clients or HTTPlug clients.

  • Framework agnostic. You can use this library with any framework.

  • A custom HTTP client interface so you can use the HTTP client of your choice. Using the Guzzle or Symfony HTTP client is strongly recommended. Any HTTPlug client can be used by installing the related packages. See the HTTP Client chapter for more information.

<?php

use Firstred\PostNL\Entity\Timeframe;
use Firstred\PostNL\Entity\Request\GetTimeframes;

$postnl = new PostNL(...);
$timeframes = $postnl->getTimeframes(
    (new GetTimeframes())
        ->setTimeframe([(new Timeframe())
            ->setCountryCode('NL')
            ->setStartDate(date('d-m-Y', strtotime('+1 day')))
            ->setEndDate(date('d-m-Y', strtotime('+14 days')))
            ->setHouseNr(42)
            ->setPostalCode('2132WT')
            ->setSundaySorting(true)
            ->setOptions(['Daytime', 'Evening'])
        ])
);
var_dump($timeframes);

Developer Guide

Overview

Requirements

Nowadays there are two APIs you can choose from: SOAP or REST. PostNL’s REST API provides all of the functionality and is currently the recommended way to connect.

REST API Requirements
  1. PHP 5.6 or higher (up to and including 8.2)

  2. JSON extension

  3. An HTTP Client such as Symfony’s HTTP Client (PostNL lib v1.3.0 or higher) or Guzzle (or at least have the PHP cURL extension installed)

  4. opcache.save_comments set to 1

SOAP API Requirements
  1. PHP 5.6 or higher (up to and including 8.2)

  2. JSON extension (both the Shipping webservice and Shipping Status webservice can only be handled by the REST API)

  3. XMLWriter extension

  4. XMLReader extension

  5. An HTTP Client such as Symfony’s HTTP Client (PostNL lib v1.3.0 or higher) or Guzzle (or at least have the PHP cURL extension installed)

  6. opcache.save_comments set to 1

Warning

Enabling the OPCache and setting opcache.save_comments to 0 will break this library since it depends on PHPDoc comments.

You can quickly check your current settings with this snippet:

echo "OPCache is ".opcache_enabled() ? "enabled\n" : "disabled\n";
echo "opcache.save_comments is set to ".ini_get('opcache.save_comments') ? '1' : '0';

Note

You can install any HTTP Client that is supported by the HTTPlug project. See chapter HTTP Client for more information.

Note

If you use the Guzzle client, you do not need to have the cURL extension installed. As an alternative, you can enable allow_url_fopen in your system’s php.ini. The included Guzzle version can work with the PHP stream wrapper to handle HTTP requests. For more information check out Guzzle’s documentation.

License

Licensed using the MIT license.

The MIT License (MIT).

Copyright (c) 2017-2023 Michael Dekker (https://github.com/firstred)

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.

Contributing

Guidelines
  1. This library supports PSR-1, PSR-2, PSR-3, PSR-4, PSR-6, PSR-7 and PSR-18.

  2. The library is meant to be lean, fast and sticks to the standards of the SOAP API. This means that not every feature request can be accepted. When in doubt, please open an issue first.

  3. The PostNL library has a minimum PHP version requirement of PHP 5.6. Pull requests must not require a PHP version lower than PHP 5.6.

  4. All pull requests must include unit tests to ensure the change works as expected and to prevent regressions.

Running the tests

In order to contribute, you’ll need to checkout the source from GitHub and install the dependencies using Composer:

git clone https://github.com/firstred/postnl-api-php.git
cd postnl-api-php && composer install

This library is unit tested with PHPUnit. Run the tests using the included PHPUnit version:

composer test
Building the documentation

The documentation is automatically built and hosted on readthedocs.io. You can build a local HTML copy by installing Sphinx and running

pip install -r docs/requirements.txt

to install the requirements, followed by

sphinx-build -b html docs builddir

to build the HTML output in the directory builddir.

Installation

The recommended way to install the PostNL library is through Composer. Composer is a dependency management tool for PHP that allows you to declare the dependencies your project needs and installs them into your project.

This chapter assumes that you meet all the requirements as described in the Overview chapter.

Install composer with the instructions on this page: https://getcomposer.org/download/

Install through Composer

Install the PostNL library:

composer require firstred/postnl-api-php

You can optionally add the well-known Guzzle HTTP client as a dependency using composer:

composer require guzzlehttp/guzzle

This library will prefer the Guzzle client and automatically start using it instead of the built-in cURL-client.

Note

After installing, you need to require Composer’s autoloader somewhere in your project, which is not necessary if you are using a framework such as Laravel or Symfony, for example.

You can require the autoloader as follows (assuming the vendor/ dir is relative to your current directory):

require_once 'vendor/autoload.php';

You can find out more on how to install Composer, configure autoloading, and other best-practices for defining dependencies at getcomposer.org.

Install the latest development build through composer

During your development, you can keep up with the latest changes on the master branch by setting the version requirement for this library to dev-1.4.x.

{
   "require": {
      "firstred/postnl-api-php": "dev-1.4.x"
   }
}

Note

You will likely have to change the min-stability setting:

https://getcomposer.org/doc/04-schema.md#minimum-stability

Authentication

The PostNL API requires an API key to authenticate. You can request one via MijnPostNL.

If you do not already have a PostNL account, be sure to check out this page: https://developer.postnl.nl/request-api-key/

Note

The API key is automatically attached to the Firstred\PostNL\Entity\SOAP\UsernameToken object (SOAP) or apikey HTTP header (REST). You do not have to manually add the API key with every request.

Passing all credentials

Besides having to provide an API key, you will have to pass information about your business. These credentials will have to be passed with a Firstred\PostNL\Entity\Customer object when creating a new Firstred\PostNL\PostNL instance.

Note

The Firstred\PostNL\PostNL class is the main class of this library. It handles all functionality you will need from a developer’s perspective. After instantiating a new Firstred\PostNL\PostNL object you will have everything you need to communicate with the PostNL API. Everything else (caching, HTTP Clients, logging, etc.) is optional.

In order to get started with the API, the following credentials are important:

Required credentials
API key
Required: True

The API key

Customer code
Required: True

The customer code is a code that usually consists of 4 letters and appears in domestic 3S-codes.

Customer number
Required: True

The customer number is a number that usually consists of 8 digits.

Address

A filled Firstred\PostNL\Entity\Address object with at least the following information:

AddressType
Required: True
Default: 02

The address type should be 02, which means the address belongs to the sender.

City
Required: True

City

CompanyName
Required: True

The company name

HouseNr
Required: True

The house number

Street
Required: True

Street name

Zipcode
Required: True

The postcode. Be aware that the API might sometimes refer to a postcode as postcode, postal code or zipcode.

Collection location
Required: True
Default: 123456

I must admit that to this day I still do not have a single clue what this value means. It could refer to your local drop-off location (if you use one). If your PostNL account manager can provide you with a collection location number please use that one.

I usually fill out 123456 and it seems to work just fine.

Globalpack barcode type
Required: False

The barcode type to use for international shipments. This field is optional if you do not ship outside the EU.

This field usually consists of 2 letters.

Globalpack customer code
Required: False

The barcode type to use for international shipments. This field is optional if you do not ship outside the EU.

This field usually consists of 4 digits.

When you have all the required information, you are ready to configure the library. It can be configured as follows:

Note

Example configuration. All the credential come together in the Firstred\PostNL\Entity\Customer and main Firstred\PostNL\PostNL class.

<?php

use Firstred\PostNL\Entity\Address;
use Firstred\PostNL\Entity\Customer;

$apiKey = 'qjsdjufhjasudhfaSDFasdifh324';
$customer = (new Customer())
    ->setCollectionLocation('123456')
    ->setCustomerCode('DEVC')
    ->setCustomerNumber('11223344')
    ->setContactPerson('Test')
    ->setAddress((new Address())
        ->setAddressType('02')
        ->setCity('Hoofddorp')
        ->setCompanyName('PostNL')
        ->setCountrycode('NL')
        ->setHouseNr('42')
        ->setStreet('Siriusdreef')
        ->setZipcode('2132WT')
    )
    ->setGlobalPackBarcodeType('AB')
    ->setGlobalPackCustomerCode('1234')
;

$postnl = new PostNL(
    $customer,        // The filled Customer object
    $apiKey,          // The API key
    false,            // Sandbox = false, meaning we are now using the live environment
    PostNL::MODE_REST // We are going to use the REST API (default)
);

You might have noticed that several different ways have been used to instantiate an object. More information about this can be found in the Object instantiation section.

The PostNL client constructor accepts a few options:

customer
Required: True

The Firstred\PostNL\Entity\Customer object that is used to configure the client and let PostNL know who is requesting the data.

<?php

use Firstred\PostNL\Entity\Address;
use Firstred\PostNL\Entity\Customer;

// Create a new customer
$client = (new Customer())
    ->setCollectionLocation('123456')              // Your collection location
    ->setCustomerCode('DEVC')                      // Your Customer Code
    ->setCustomerNumber('11223344')                // Your Customer Number
    ->setGlobalPackBarcodeType('CX')               // Add your GlobalPack information if you nee
    ->setGlobalPackCustomerCode('1234')            // to create international shipment labels
    ->setContactPerson('Sander')
    ->setAddress((new Address())
        ->setAddressType('02')                     // This address will be shown on the label
        ->setCity('Hoofddorp')
        ->setCompanyName('PostNL')
        ->setCountrycode('NL')
        ->setHouseNr('42')
        ->setStreet('Siriusdreef')
        ->setZipcode('2132WT')
    )
    ->setEmail('test@voorbeeld.nl')
    ->setName('Michael')
;
apiKey

The API key to use. Note that if you want to switch from the legacy API to the new SOAP and REST API you will have to request a new key.

If you want to connect to the legacy API, you should pass a Firstred\PostNL\Entity\SOAP\UsernameToken with your username and token set:

$usernameToken = new UsernameToken('username', 'token');

You can request an API key for the sandbox environment on this page: https://developer.postnl.nl/content/request-api-key For a live key you should contact your PostNL account manager.

sandbox
Required: True

Indicate whether you’d like to connect to the sandbox environment. When false the library uses the live endpoints.

mode
Required: True

This library provides three ways to connect to the API:

  • Firstred\PostNL\PostNL::MODE_REST: REST mode

  • Firstred\PostNL\PostNL::MODE_SOAP: SOAP mode (deprecated since v1.4.0)

  • Firstred\PostNL\PostNL::MODE_LEGACY: Legacy mode – This is the legacy SOAP API, which is now disabled and replaced with SOAP mode (deprecated since v1.4.0).

Authorization

You may not be authorized to access all services. Contact your PostNL account manager to find out what’s available to you.

Quickstart

This page provides a quick introduction to this library and a few quick copy/paste examples which you can adjust to your likings.

This section assumes that you have installed the library and are fully authenticated.

If you do not have the library installed, head over to the Installation page. If you do not know what to pass to the main Firstred\PostNL\PostNL class, please refer to the chapter Authentication first.

You can do requests over the API by creating the request objects and passing them to one of the functions in the main Firstred\PostNL\PostNL class.

Creating request objects may seem a bit counter-intuitive at first, but this makes it a lot easier to follow the request examples from the official API documentation and quickly figure out what each field does.

Using an IDE with code completion is strongly recommended.

Requesting timeframes, locations and the delivery date at once

You can request the timeframes, locations and delivery date at once to quickly retrieve all the available delivery options.

Note

For more details on how to retrieve delivery options, consult the Delivery options chapter.

Here’s how it is done from scratch:

<?php

use Firstred\PostNL\Entity\CutOffTime;
use Firstred\PostNL\Entity\Location;
use Firstred\PostNL\Entity\Message\Message;
use Firstred\PostNL\Entity\Request\GetDeliveryDate;
use Firstred\PostNL\Entity\Request\GetNearestLocations;
use Firstred\PostNL\Entity\Request\GetTimeframes;
use Firstred\PostNL\Entity\Timeframe;
use Firstred\PostNL\PostNL;
use Firstred\PostNL\Entity\Customer;
use Firstred\PostNL\Entity\Address;

require_once __DIR__.'/vendor/autoload.php';

// Your PostNL credentials
$customer = (new Customer())
    ->setCollectionLocation('123456')
    ->setCustomerCode('DEVC')
    ->setCustomerNumber('11223344')
    ->setContactPerson('Sander')
    ->setAddress((new Address())
        ->setAddressType('02')
        ->setCity('Hoofddorp')
        ->setCompanyName('PostNL')
        ->setCountrycode('NL')
        ->setHouseNr('42')
        ->setStreet('Siriusdreef')
        ->setZipcode('2132WT')
    )
    ->SetEmail('test@voorbeeld.nl')
    ->setName('Michael');

$apikey = 'YOUR_API_KEY_HERE';
$sandbox = true;

$postnl = new PostNL($customer, $apikey, $sandbox, PostNL::MODE_REST);

$mondayDelivery = true;
$deliveryDaysWindow = 7; // Amount of days to show ahead
$dropoffDelay = 0;       // Amount of days to delay delivery

// Configure the cut-off window for every day, 1 = Monday, 7 = Sunday
$cutoffTime = '15:00:00';
$dropoffDays = [1 => true, 2 => true, 3 => true, 4 => true, 5 => true, 6 => false, 7 => false];
foreach (range(1, 7) as $day) {
    if ($dropoffDays[$day]) {
        $cutOffTimes[] = new CutOffTime(
            str_pad($day, 2, '0', STR_PAD_LEFT),
            date('H:i:00', strtotime($cutoffTime)),
            true
        );
    }
}

$response = $postnl->getTimeframesAndNearestLocations(
    (new GetTimeframes())
        ->setTimeframe([
            (new Timeframe())
                ->setCountryCode('NL')
                ->setEndDate(date('d-m-Y', strtotime(" +{$deliveryDaysWindow} days +{$dropoffDelay} days")))
                ->setHouseNr('66')
                ->setOptions(['Morning', 'Daytime'])
                ->setPostalCode('2132WT')
                ->setStartDate(date('d-m-Y', strtotime("+1 days")))
                ->setSundaySorting(!empty($mondayDelivery) && date('w', strtotime("+{$dropoffDelay} days")))
        ]),
    (new GetNearestLocations())
        ->setCountrycode('NL')
        ->setLocation(
            (new Location())
                ->setAllowSundaySorting(!empty($mondayDelivery))
                ->setDeliveryOptions(['PG'])
                ->setOptions(['Daytime'])
                ->setHouseNr('66')
                ->setPostalcode('2132WT')
        ),
    (new GetDeliveryDate())
        ->setGetDeliveryDate(
            (new GetDeliveryDate())
                ->setAllowSundaySorting(!empty($mondayDelivery))
                ->setCountryCode('NL')
                ->setCutOffTimes($cutOffTimes)
                ->setHouseNr('12')
                ->setOptions(['Daytime', 'Evening'])
                ->setPostalCode('2132WT')
                ->setShippingDate(date('d-m-Y H:i:s'))
                ->setShippingDuration(strval(1 + (int) $dropoffDelay))
        )
        ->setMessage(new Message())
);

The response variable will be an associative array containing the timeframes, nearest locations and delivery date. It has the following keys:

timeframes

The embedded timeframes contain the actual timeframes on that particular day.

The response format is the same for both the SOAP and REST API and is described on this page: https://developer.postnl.nl/browse-apis/delivery-options/timeframe-webservice/testtool-rest/#/Timeframe/get_calculate_timeframes

Note

Dates and times returned by the library always use the same format for consistency and therefore may differ from the API. Please refer to the Formats chapter for more information.

locations

The pickup locations can be found in the Firstred\PostNL\Entity\Response\GetNearestLocationsResponse object.

You can iterate over the found locations as follows:

foreach ($response['locations']->getGetLocationsResult()->getResponseLocation() as $location) {
    var_dump($location);
}
delivery_date

The delivery date that was found, returned in a Firstred\PostNL\Entity\Response\GetDeliveryDateResponse object.

You can print the date as follows:

echo $response['delivery_date']->getDeliveryDate()->format('d-m-Y');

Creating a (merged) shipment label

This section describes how you can create two labels and have them merged into a single PDF automatically.

Note

If you’d like to know more about all the methods you can use to create labels, see the Send and track shipments chapter.

Example code:

use Firstred\PostNL\Entity\Label;
use Firstred\PostNL\PostNL;
use Firstred\PostNL\Entity\Customer;
use Firstred\PostNL\Entity\Address;
use Firstred\PostNL\Entity\Shipment;
use Firstred\PostNL\Entity\Dimension;

require_once __DIR__.'/vendor/autoload.php';

// Your PostNL credentials
$customer = (new Customer())
        ->setCollectionLocation('123456')
        ->setCustomerCode('DEVC')
        ->setCustomerNumber('11223344')
        ->setGlobalPackBarcodeType('CX')
        ->setGlobalPackCustomerCode('1234')
        ->setContactPerson('Sander')
        ->setAddress((new Address())
            ->setAddressType('02')
            ->setCity('Hoofddorp')
            ->setCompanyName('PostNL')
            ->setCountrycode('NL')
            ->setHouseNr('42')
            ->setStreet('Siriusdreef')
            ->setZipcode('2132WT')
        )
        ->setEmail('test@voorbeeld.nl')
        ->setName('Michael');

$apikey = 'YOUR_API_KEY_HERE';
$sandbox = true;

$postnl = new PostNL($customer, $apikey, $sandbox, PostNL::MODE_SOAP);

$barcodes = $postnl->generateBarcodesByCountryCodes(['NL' => 2]);

$shipments = [
    (new Shipment())
        ->setAddresses([
            (new Address())
                ->setAddressType('01')
                ->setCity('Utrecht')
                ->setCountrycode('NL')
                ->setFirstName('Peter')
                ->setHouseNr('9')
                ->setHouseNrExt('a bis')
                ->setName('de Ruijter')
                ->setStreet('Bilderdijkstraat')
                ->setZipcode('3521VA')
        ])
        ->setBarcode($barcodes['NL'][0])
        ->setDimension(new Dimension('1000'))
        ->setProductCodeDelivery('3085'),
    (new Shipment())
        ->setAddresses([
            (new Address())
                ->setAddressType('01')
                ->setCity('Utrecht')
                ->setCountrycode('NL')
                ->setFirstName('Peter')
                ->setHouseNr('9')
                ->setHouseNrExt('a bis')
                ->setName('de Ruijter')
                ->setStreet('Bilderdijkstraat')
                ->setZipcode('3521VA')
        ])
        ->setBarcode($barcodes['NL'][1])
        ->setDimension(new Dimension('1000'))
        ->setProductCodeDelivery('3085')
];

$label = $postnl->generateLabels(
    $shipments,
    'GraphicFile|PDF', // Printertype (only PDFs can be merged -- no need to use the Merged types)
    true, // Confirm immediately
    true, // Merge
    Label::FORMAT_A4, // Format -- this merges multiple A6 labels onto an A4
    [
        1 => true,
        2 => true,
        3 => true,
        4 => true,
    ] // Positions
);

file_put_contents('labels.pdf', $label);

This will write a labels.pdf file that looks like this:

_images/mergedlabels.png

If you’d rather have the user download a label, you can set the Content-Disposition header:

$label = ...;

header('Content-Type: application/pdf');
header('Content-Disposition: attachment; filename="label.pdf"');
echo $label;
exit;

Note

Your framework might already provide a way to output files. Here are a few examples for several popular PHP frameworks:

<?php

use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\ResponseHeaderBag;

class CreateShipmentController extends AbstractController
{
    public function downloadLabelAction()
    {
        // Provide a name for your file with extension
        $filename = 'label.pdf';

        // Create the label
        $label = ...;

        // Return a response with a specific content
        $response = new Response($label);

        // Create the disposition of the file
        $disposition = $response->headers->makeDisposition(
            ResponseHeaderBag::DISPOSITION_ATTACHMENT,
            $filename
        );

        // Set the content type and disposition
        $response->headers->set('Content-Type', 'application/pdf');
        $response->headers->set('Content-Disposition', $disposition);

        // Dispatch request
        return $response;
    }
}

Source: https://ourcodeworld.com/articles/read/329/how-to-send-a-file-as-response-from-a-controller-in-symfony-3

Tracking a shipment

You can track a single shipment by calling Firstred\PostNL\PostNL::getShippingStatusByBarcode with the barcode of the shipment.

It accepts the following parameters:

barcode

The actual barcode, for example: 3SABCD1837238723.

complete

Whether the method should return a complete status update. A complete status update contains the shipment history as well.

Code example:

$postnl = new PostNL(...);

$currentStatusResponse = $postnl->getShippingStatusByBarcode(
    '3SABCD1837238723', // Barcode
    false               // Return just the current status (complete = false)
);

Delivery options

The PostNL API allows you to retrieve a list of predicted timeframes and a list of possible pickup locations. For timeframes you will have to use a certain date range and to get the nearest pickup locations you can use an address or geolocation.

There are two ways to gather timeframes and pickup locations. You can

  1. combine the delivery date, timeframe and location webservices

  2. or use the checkout service.

The checkout service is currently not supported, but this library contains an easy interface to combine the three separate services listed in this section and provides the same functionality, if not more.

This section lists all the ways in which you can retrieve delivery options, using three webservices. It is possible to request:

  1. Delivery dates (when a shipment could arrive, given the current shipping date)

  2. Shipping dates (when a shipment should be dispatched, given the predicted delivery date)

  3. Timeframes

  4. Nearest locations

  5. Nearest locations by coordinates

Checkout

On an e-commerce checkout page you will probably want to show timeframes and/or pickup locations based on the current day and cut-off window. This library provides an interface to easily combine the three webservices required to show all the delivery options. It will simultaneously contact the three webservices and request a list of timeframes and pickup locations based on the given input.

An example of how the interface can be used can be found in the section Requesting timeframes, locations and the delivery date at once, part of the Quickstart chapter.

Deliverydate webservice

Note

PostNL API documentation for this service:

Use the delivery date webservice to determine the delivery and shipping date. You can use this service to calculate the dates ‘live’ and to make sure you do not promise your customers any timeframes that are no longer available.

Delivery dates

Here’s how you can retrieve the closest delivery date:

<?php

use Firstred\PostNL\Entity\CutOffTime;
use Firstred\PostNL\Entity\Request\GetDeliveryDate;

$cutoffTime = '15:00:00';
$dropoffDays = [1 => true, 2 => true, 3 => true, 4 => true, 5 => true, 6 => false, 7 => false];
foreach (range(1, 7) as $day) {
    if (isset($dropoffDays[$day])) {
        $cutOffTimes[] = new CutOffTime(
            str_pad($day, 2, '0', STR_PAD_LEFT),
            date('H:i:00', strtotime($cutoffTime)),
            true
        );
    }
}
$deliveryDate = $postnl->getDeliveryDate(
    (new GetDeliveryDate())
        ->setGetDeliveryDate(
            (new GetDeliveryDate())
                ->setAllowSundaySorting(false)
                ->setCountryCode('NL')
                ->setCutOffTimes($cutOffTimes)
                ->setHouseNr('66')
                ->setOptions(['Morning', 'Daytime'])
                ->setPostalCode('2132WT')
                ->setShippingDate(date('d-m-Y H:i:s'))
                ->setShippingDuration('1')
        )
);

The result will be a GetDeliveryDateResponse. Calling getDeliveryDate on this object will return the delivery date as a string in the d-m-Y H:i:s PHP date format.

The function accepts the following arguments

getDeliveryDate
Required: True

The Firstred\PostNL\Entity\Request\GetDeliveryDate request object. See the API documentation for the possibilities. As shown in the example you will need to provide as many details as possible to get accurate availability information.

Shipping dates

The Shipping Date service almost works in the same way as the Delivery Date service, except this time you provide the actual delivery date in order to calculate the closest shipping date.

<?php

use Firstred\PostNL\Entity\Request\GetSentDate;
use Firstred\PostNL\Entity\Request\GetSentDateRequest;

$deliveryDate = $postnl->getSentDate(
    (new GetSentDateRequest())
        ->setGetSentDate(
            (new GetSentDate())
                ->setAllowSundaySorting(false)
                ->setCountryCode('NL')
                ->setHouseNr('66')
                ->setOptions(['Morning', 'Daytime'])
                ->setPostalCode('2132WT')
                ->setShippingDate(date('d-m-Y H:i:s'))
                ->setShippingDuration('1')
        )
);

The function accepts the following arguments

getSentDate
Required: True

The Firstred\PostNL\Entity\Request\GetSentDateRequest request object. See the API documentation for the possibilities. As shown in the example you will need to provide as many details as possible to get accurate availability information.

Timeframe webservice

Note

PostNL API documentation for this service:
Timeframes
<?php

use Firstred\PostNL\Entity\CutOffTime;

$deliveryDaysWindow = 7;
$dropoffDelay = 0;

$timeframes = $postnl->getTimeframes(new GetTimeframes())
    ->setTimeframe([
        (new Timeframe())
            ->setCountryCode('NL')
            ->setEndDate(date('d-m-Y', strtotime(" +{$deliveryDaysWindow} days +{$dropoffDelay} days")))
            ->setHouseNr('66')
            ->setOptions(['Daytime', 'Evening'])
            ->setPostalCode('2132WT')
            ->setStartDate(date('d-m-Y', strtotime(" +1 day +{$dropoffDelay} days")))
            ->setSundaySorting(false)
    ])
);
timeframes
Required: True

The Firstred\PostNL\Entity\Request\GetTimeframes request object. See the API documentation for more details.

Location webservice

Note

PostNL API documentation for this service:

The location service allows you to retrieve a list of locations for the given postcode or coordinates.

Nearest locations

Here’s an example of how you can retrieve the nearest location by postcode:

<?php

use Firstred\PostNL\Entity\Location;
use Firstred\PostNL\Entity\Request\GetNearestLocations;

$postnl->getNearestLocations(
    (new GetNearestLocations())
        ->setCountrycode('NL')
        ->setLocation(
            (new Location())
                ->setAllowSundaySorting(false)
                ->setDeliveryOptions(['PG'])
                ->setOptions(['Daytime'])
                ->setHouseNr('66')
                ->setPostalcode('2132WT')
        )
);
getNearestLocations
Required: True

The Firstred\PostNL\Entity\Request\GetNearestLocations request object. See the API documentation for more details.

Nearest locations by coordinates

You can also get the locations by specifying a bounding box. One can be drawn by providing the North-West and South-East corner of the box:

<?php

use Firstred\PostNL\Entity\CoordinatesNorthWest;
use Firstred\PostNL\Entity\CoordinatesSouthEast;
use Firstred\PostNL\Entity\Location;
use Firstred\PostNL\Entity\Request\GetLocationsInArea;

 $postnl->getLocationsInArea(
     (new GetLocationsInArea())
         ->setCountrycode('NL')
         ->setLocation(
             (new Location())
                 ->setAllowSundaySorting(false)
                 ->setDeliveryDate(date('d-m-Y', strtotime('+1 day')))
                 ->setDeliveryOptions([
                     'PG',
                 ])
                 ->setOptions([
                     'Daytime',
                 ])
                 ->setCoordinatesNorthWest(
                     (new CoordinatesNorthWest())
                         ->setLatitude((string) 52.156439)
                         ->setLongitude((string) 5.015643)
                 )
                 ->setCoordinatesSouthEast(
                     (new CoordinatesSouthEast())
                         ->setLatitude((string) 52.017473)
                         ->setLongitude((string) 5.065254)
                 )
         )
 );

This function accepts the arguments:

locationsInArea
Required: True

The Firstred\PostNL\Entity\Request\GetLocationsInArea request object. See the API documentation for more details.

Send and track shipments

Sending shipments can be done in one of two ways:

  1. Using the Shipping webservice

  2. Using the Barcode, Labelling and Confirming webservice

This library supports both methods. In this sections we’ll go through all the available webservices.

Barcode webservice

Note

PostNL API documentation for this service:

The barcode service allows you to generate barcodes for your shipment labels. Usually you would reserve an amount of barcodes, generate shipping labels and eventually confirm those labels. According to PostNL, this flow is necessary for a higher delivery success rate.

Generate a single barcode

You can generate a single barcode for domestic shipments as follows:

$postnl->generateBarcode();

This will generate a 3S barcode meant for domestic shipments only.

The method Firstred\PostNL\PostNL::generateBarcode accepts the following arguments:

type
Required: False
Default: 3S

The barcode type. This is 2S/3S for the Netherlands and EU Pack Special shipments. For other destinations this is your GlobalPack barcode type. For more info, check the PostNL barcode service page.

range
Required: False
Default: null
serie
Required: False
Default: null

This is the barcode range for your shipment(s). Check the PostNL barcode service page for the ranges that are available.

eps
Required: False
Default: false

Indicates whether this is an EU Pack Special shipment.

Generate a barcode by country code

It is possible to generate a barcode by country code. This will let the library figure out what type, range, serie to use.

Example:

$postnl->generateBarcodeByCountryCode('BE');

This will generate a 3S barcode meant for domestic shipments only.

The method Firstred\PostNL\PostNL::generateBarcodeByCountryCode accepts the following arguments:

iso
Required: True

The two letter country ISO-3166 alpha-2 code. Make sure you use UPPERCASE. List of ISO-3166 codes: https://www.iban.com/country-codes

Generate multiple barcodes by using country codes

You can generate a whole batch of barcodes at once by providing country codes and the amounts you would like to generate.

Example:

$postnl->generatesBarcodeByCountryCodes(['NL' => 2, 'DE' => 3]);

The method Firstred\PostNL\PostNL::generateBarcodesByCountryCodes will return a list of barcodes:

[
    'NL' => [
        '3SDEVC11111111111',
        '3SDEVC22222222222',
    ],
    'DE' => [
        '3SDEVC111111111',
        '3SDEVC222222222',
        '3SDEVC333333333',
    ],
];

The function accepts the following argument:

type
Required: True

This must be an associative array with country codes as key and the amount of barcodes you’d like to generate per country as the value.

Labelling webservice

Note

PostNL API documentation for this service:

The labelling service allows you to create shipment labels and optionally confirm the shipments. The library has a built-in way to merge labels automatically, so you can request labels for multiple shipments at once.

Generate a single label

The following example generates a single shipment label for a domestic shipment:

$postnl = new PostNL(...);
$postnl->generateLabel(
    (new Shipment())
        ->setAddresses([
            (new Address())
                ->setAddressType('01')
                ->setCity('Utrecht')
                ->setCountrycode('NL')
                ->setFirstName('Peter')
                ->setHouseNr('9')
                ->setHouseNrExt('a bis')
                ->setName('de Ruijter')
                ->setStreet('Bilderdijkstraat')
                ->setZipcode('3521VA'),
            (new Address())
                ->setAddressType('02')
                ->setCity('Hoofddorp')
                ->setCompanyName('PostNL')
                ->setCountrycode('NL')
                ->setHouseNr('42')
                ->setStreet('Siriusdreef')
                ->setZipcode('2132WT'),
        ])
        ->setBarcode($barcode)
        ->setDeliveryAddress('01')
        ->setDimension(new Dimension('2000'))
        ->setProductCodeDelivery('3085'),
    'GraphicFile|PDF',
    false
);

This will create a standard shipment (product code 3085). You can access the label (base64 encoded PDF) this way:

$pdf = base64_decode($label->getResponseShipments()[0]->getLabels()[0]->getContent());

This function accepts the following arguments:

shipment
Required: True

The Firstred\PostNL\Entity\Shipment object. Visit the PostNL API documentation to find out what a Firstred\PostNL\Entity\Shipment object consists of. The Firstred\PostNL\Entity\Shipment object is based on the SOAP API: https://developer.postnl.nl/browse-apis/send-and-track/labelling-webservice/documentation-soap/

printerType
Required: True
Default: GraphicFile|PDF

The list of supported printer types can be found on this page: https://developer.postnl.nl/browse-apis/send-and-track/labelling-webservice/documentation-soap/

confirm
Required: False
Default: true

Indicates whether the shipment should immediately be confirmed.

Generate multiple shipment labels

The following example shows how a label can be merged:

$shipments = [
    (new Shipment())
        ->setAddresses([
            (new Address())
                ->setAddressType('01')
                ->setCity('Utrecht')
                ->setCountrycode('NL')
                ->setFirstName('Peter')
                ->setHouseNr('9')
                ->setHouseNrExt('a bis')
                ->setName('de Ruijter')
                ->setStreet('Bilderdijkstraat')
                ->setZipcode('3521VA')
        ])
        ->setBarcode($barcodes['NL'][0])
        ->setDimension(new Dimension('1000'))
        ->setProductCodeDelivery('3085'),
    (new Shipment())
        ->setAddresses([
            (new Address())
                ->setAddressType('01')
                ->setCity('Utrecht')
                ->setCountrycode('NL')
                ->setFirstName('Peter')
                ->setHouseNr('9')
                ->setHouseNrExt('a bis')
                ->setName('de Ruijter')
                ->setStreet('Bilderdijkstraat')
                ->setZipcode('3521VA)
        ])
        ->setBarcode($barcodes['NL'][1])
        ->setDimension(new Dimension('1000'))
        ->setProductCodeDelivery('3085)
];

$label = $postnl->generateLabels(
    $shipments,
    'GraphicFile|PDF', // Printertype (only PDFs can be merged -- no need to use the Merged types)
    true, // Confirm immediately
    true, // Merge
    Label::FORMAT_A4, // Format -- this merges multiple A6 labels onto an A4
    [
        1 => true,
        2 => true,
        3 => true,
        4 => true,
    ] // Positions
);

file_put_contents('labels.pdf', $label);

By setting the merge flag it will automatically merge the labels into a PDF string.

The function accepts the following arguments:

shipments
Required: True

An array with Firstred\PostNL\Entity\Shipment objects. Visit the PostNL API documentation to find out what a Firstred\PostNL\Entity\Shipment object consists of. The Firstred\PostNL\Entity\Shipment object is based on the SOAP API: https://developer.postnl.nl/browse-apis/send-and-track/labelling-webservice/documentation-soap/

printerType
Required: False
Default: GraphicFile|PDF

The list of supported printer types can be found on this page: https://developer.postnl.nl/browse-apis/send-and-track/labelling-webservice/documentation-soap/

confirm
Required: False
Default: true

Indicates whether the shipment should immediately be confirmed.

merge
Required: False
Default: false

This will merge the labels and make the function return a pdf string of the merged label.

format
Required: False
Default: Firstred\PostNL\PostNL::FORMAT_A4

This sets the paper format (can be Firstred\PostNL\PostNL::FORMAT_A4 or Firstred\PostNL\PostNL::FORMAT_A6).

positions
Required: False
Default: [1 => true, 2 => true, 3 => true, 4 => true]

This will set the positions of the labels. The following image shows the available positions, use true or false to resp. enable or disable a position:

_images/positions.png

Shipping webservice

Note

The shipping service combines all the functionality of the labeling, confirming, barcode and easy return service. The service is only available as REST.

Send a single shipment

The following example sends a single domestic shipment:

$postnl = new PostNL(...);
$postnl->sendShipment(
    (new Shipment())
        ->setAddresses([
            (new Address())
                ->setAddressType('01')
                ->setCity('Utrecht')
                ->setCountrycode('NL')
                ->setFirstName('Peter')
                ->setHouseNr('9')
                ->setHouseNrExt('a bis')
                ->setName('de Ruijter')
                ->setStreet('Bilderdijkstraat')
                ->setZipcode('3521VA'),
            (new Address())
                ->setAddressType('02')
                ->setCity('Hoofddorp')
                ->setCompanyName('PostNL')
                ->setCountrycode('NL')
                ->setHouseNr('42')
                ->setStreet('Siriusdreef')
                ->setZipcode('2132WT'),
        ])
        ->setDeliveryAddress('01')
        ->setDimension(new Dimension('2000'))
        ->setProductCodeDelivery('3085'),
    'GraphicFile|PDF',
    false
);

This will create a standard shipment (product code 3085). You can access the label (base64 encoded PDF) this way:

$pdf = base64_decode($shipping->getResponseShipments()[0]->getLabels()[0]->getContent());

This function accepts the following arguments:

shipment
Required: True

The Firstred\PostNL\Entity\Shipment object. Visit the PostNL API documentation to find out what a Shipment object consists of.

printertype
Required: False
Default: GraphicFile|PDF

The list of supported printer types can be found on this page: https://developer.postnl.nl/browse-apis/send-and-track/shipping-webservice/documentation/

confirm
Required: False
Default: true

Indicates whether the shipment should immediately be confirmed.

Send multiple shipments

The following example shows how labels of multiple shipment labels can be merged:

$shipments = [
     (new Shipment())
         ->setAddresses([
             (new Address())
                 ->setAddressType('01')
                 ->setCity('Utrecht')
                 ->setCountrycode('NL')
                 ->setFirstName('Peter')
                 ->setHouseNr('9')
                 ->setHouseNrExt('a bis')
                 ->setName('de Ruijter')
                 ->setStreet('Bilderdijkstraat')
                 ->setZipcode('3521VA')
         ])
         ->setBarcode($barcodes['NL'][0])
         ->setDimension(new Dimension('1000'))
         ->setProductCodeDelivery('3085'),
     (new Shipment())
         ->setAddresses([
             (new Address())
                 ->setAddressType('01')
                 ->setCity('Utrecht')
                 ->setCountrycode('NL')
                 ->setFirstName('Peter')
                 ->setHouseNr('9')
                 ->setHouseNrExt('a bis')
                 ->setName('de Ruijter')
                 ->setStreet('Bilderdijkstraat')
                 ->setZipcode('3521VA)
         ])
         ->setBarcode($barcodes['NL'][1])
         ->setDimension(new Dimension('1000'))
         ->setProductCodeDelivery('3085)
 ];

 $label = $postnl->sendShipments(
     $shipments,
     'GraphicFile|PDF', // Printertype (only PDFs can be merged -- no need to use the Merged types)
     true, // Confirm immediately
     true, // Merge
     Label::FORMAT_A4, // Format -- this merges multiple A6 labels onto an A4
     [
         1 => true,
         2 => true,
         3 => true,
         4 => true,
     ] // Positions
 );

 file_put_contents('labels.pdf', $label);

By setting the merge flag it will automatically merge the labels into a PDF string.

The function accepts the following arguments:

shipments
Required: True

An array with Firstred\Entity\Shipment objects. Visit the PostNL API documentation to find out what a Shipment object consists of.

printertype
Required: False
Default: GraphicFile|PDF

The list of supported printer types can be found on this page: https://developer.postnl.nl/browse-apis/send-and-track/shipping-webservice/documentation/

confirm
Required: False
Default: true

Indicates whether the shipment should immediately be confirmed.

merge
Required: False
Default: false

This will merge the labels and make the function return a pdf string of the merged label.

format
Required: False
Default: Firstred\PostNL\PostNL::FORMAT_A4

This sets the paper format (can be Firstred\PostNL\PostNL::FORMAT_A4 or Firstred\PostNL\PostNL::FORMAT_A6).

positions
Required: False
Default: [1 => true, 2 => true, 3 => true, 4 => true]

This will set the positions of the labels. The following image shows the available positions, use true or false to resp. enable or disable a position:

_images/positions.png

Confirming webservice

Note

PostNL API documentation for this service:

You can confirm shipments that have previously not been confirmed. Shipments can be confirmed after both the Labelling webservice or the Shipping webservice.

The available methods are Firstred\PostNL\PostNL::confirmShipment and Firstred\PostNL\PostNL::confirmShipments. The first method accepts a single Firstred\PostNL\Entity\Shipment object whereas the latter accepts an array of :php:class:`Firstred\PostNL\Entity\Shipment`s.

Example code:

$postnl = new PostNL(...);

$confirmedShipment = $postnl->confirmShipment(
    (new Shipment())
        ->setAddresses([
            (new Address())
                ->setAddressType('01')
                ->setCity('Utrecht')
                ->setCountrycode('NL')
                ->setFirstName('Peter')
                ->setHouseNr('9')
                ->setHouseNrExt('a bis')
                ->setName('de Ruijter')
                ->setStreet('Bilderdijkstraat')
                ->setZipcode('3521VA'),
            (new Address())
                ->setAddressType('02')
                ->setCity('Hoofddorp')
                ->setCompanyName('PostNL')
                ->setCountrycode('NL')
                ->setHouseNr('42')
                ->setStreet('Siriusdreef')
                ->setZipcode('2132WT'),
        ])
        ->setBarcode('3SDEVC201611210')
        ->setDeliveryAddress('01')
        ->setDimension(new Dimension('2000'))
        ->setProductCodeDelivery('3085')
);

The output is a Firstred\PostNL\Entity\Respone\ConfirmingResponseShipment or an array with these objects in case you are confirming multiple shipments. The results array will have the same index keys as the request input.

Shippingstatus webservice

Note

PostNL API documentation for this service:

This service can be used to retrieve shipping statuses. For a short update request a current status, otherwise complete status will provide you with a long list containing the shipment’s history.

Current or complete shipping status by barcode

Gets the current or complete status by barcode. A complete status also includes the shipment history.

$postnl = new PostNL(...);
$postnl->getShippingStatusByBarcode('3SDEVC98237423');
barcode
Required: True

The barcode, e.g.: 3SDEVC98237423

complete
Required: False

Return the complete shipping status. This includes the shipment history.

Depending on the complete parameter this returns a Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment or a Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment object.

Multiple current or complete shipping statuses by barcodes

Gets multiple current or complete statuses by barcodes. A complete status also includes the shipment history.

$postnl = new PostNL(...);
$postnl->getShippingStatusesByBarcodes(['3SDEVC98237423', '3SDEVC98237423']);
barcodes
Required: True

The references, e.g.: ['3SDEVC98237423', '3SDEVC98237423']

complete
Required: False

Return the complete shipping status. This includes the shipment history.

Depending on the complete parameter this returns an array with Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment or Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment objects. The array is an associative array indexed by the given barcodes, e.g.: ['3SDEVC98237423' => CurrentStatusResponseShipment, ...].

Current or complete shipping status by reference

Gets the current or complete status by reference. A complete status also includes the shipment history.

$postnl = new PostNL(...);
$postnl->getShippingStatusByReference('order-12');
reference
Required: True

The barcode, e.g.: order-12

complete
Required: False

Return the complete shipping status. This includes the shipment history.

Depending on the complete parameter this returns a Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment or a Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment object.

Multiple current or complete shipping statuses by references

Gets multiple current or complete statuses by references. A complete status also includes the shipment history.

$postnl = new PostNL(...);
$postnl->getShippingStatusesByReferences(['order-12', 'order-16']);
barcodes
Required: True

The references, e.g.: ['order-12', 'order-16]

complete
Required: False

Return the complete shipping status. This includes the shipment history.

Depending on the complete parameter this returns an array with Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment or Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment objects. The array is an associative array indexed by the given references, e.g.: ['order-12' => CurrentStatusResponseShipment, ...].

Current status by status code

Warning

This is no longer supported by the PostNL API.

Current status by phase code

Gets the current status by phase code. Note that the date range is required.

Warning

This is no longer supported by the PostNL API

Complete status by status code

Warning

This is no longer supported by the PostNL API.

Complete status by phase code

Warning

This is no longer supported by the PostNL API.

Get a single signature by barcode

Gets the signature of the shipment when available. A signature can be accessed by barcode only.

$postnl = new PostNL(...);
$postnl->getSignatureByBarcode('3SDEVC23987423');

It accepts the following arguments

barcode
Required: True

The shipment’s barcode, e.g. 3SDEVC23987423

This method returns a Firstred\PostNL\Entity\Response\GetSignatureResponseSignature object. To get the actual signature in binary format you will have to use:

$postnl = new PostNL(...);

$getSignatureResponseSignature = $postnl->getSignatureByBarcode('3SDEVC23987423');
$content = base64_decode($getSignatureResponseSignature->getSignatureImage());

header('Content-Type: image/gif');
echo $content;
exit;
Get multiple signatures by barcodes

Gets multiple signatures of multiple shipments, when available.

$postnl = new PostNL(...);
$postnl->getSignaturesByBarcodes(['3SDEVC23987423', '3SDEVC23987425']);

It accepts the following arguments

barcodes
Required: True

An array of barcodes, e.g. ['3SDEVC23987423', '3SDEVC23987425'].

It returns an array of Firstred\PostNL\Entity\Response\GetSignatureResponseSignature objects. To get the image data out of these objects, see Get a single signature by barcode.

Exception handling

The following tree view describes how the exceptions used in this library depend on each other.

. Exception : Throwable
└── Firstred\PostNL\Exception\PostNLException
    ├── Firstred\PostNL\Exception\ApiException
    │   ├── Firstred\PostNL\Exception\ApiConnectionException
    │   ├── Firstred\PostNL\Exception\CifDownException
    │   ├── Firstred\PostNL\Exception\CifException
    │   ├── Firstred\PostNL\Exception\NotFoundException
    │   ├── Firstred\PostNL\Exception\ResponseException
    │   └── Firstred\PostNL\Exception\ShipmentNotFoundException
    ├── Firstred\PostNL\Exception\HttpClientException
    └── Firstred\PostNL\Exception\InvalidArgumentException
        ├── Firstred\PostNL\Exception\InvalidApiModeException
        ├── Firstred\PostNL\Exception\InvalidBarcodeException
        ├── Firstred\PostNL\Exception\InvalidConfigurationException
        ├── Firstred\PostNL\Exception\InvalidMessageTimeStampException
        ├── Firstred\PostNL\Exception\InvalidMethodException
        ├── Firstred\PostNL\Exception\NotImplementedException
        └── Firstred\PostNL\Exception\NotSupportedException

Exception types

This library throws several exceptions for errors that can occur. In order to provide harmonized error handling for different API modes, several implementation details are left out. For example, errors related to XML or JSON parsing are wrapped in a Firstred\PostNL\Exception\ResponseException exception.

If you want to catch all exceptions thrown by this library be sure to catch Firstred\PostNL\Exception\PostNLException s. Under normal conditions there is no need to catch all Throwable s. If any other Throwable such as Error, TypeError or PsrCacheInvalidArgumentException is uncaught, it means that there is a bug somewhere in the library. Please file a new issue with all the details you can find (preferably with the original request/response [be sure to scrub personal data]): https://github.com/firstred/postnl-api-php/issues/new.

use Firstred\PostNL\Exception\PostNLException;
use Psr\Cache\InvalidArgumentException as PsrCacheInvalidArgumentException;

try {
    $postnl->getTimeframes(...);
} catch (PostNLException $e) {
    // ...
}
Firstred\PostNL\Exception\ApiException

This groups of exceptions occurs when there is something wrong with the way the API returns an object (likely an unsupported feature or structure), when the API has trouble processing data, is either down or the requested object could not be found.

deprecated Firstred\PostNL\Exception\ApiConnectionException

This happens when the HTTP client has a problem connecting with the API. This exception has been replaced by the Firstred\PostNL\Exception\HttpClientException exception, which allows you to gather more detailed information.

Firstred\PostNL\Exception\CifDownException

This exception is thrown when the CIF API is down.

Firstred\PostNL\Exception\CifException

When the CIF API itself has a fatal error this exception is thrown.

Firstred\PostNL\Exception\NotFoundException

This exception is thrown when the requested object could not be found.

Firstred\PostNL\Exception\ResponseException

This exception is thrown when a response could not be understood by the library. If there was a problem parsing the response, the previous argument might point at the underlying error.

deprecated
Required: False
deprecated Firstred\PostNL\Exception\ShipmentNotFoundException

Occurs when the requested Firstred\PostNL\Entity\Shipment or Firstred\PostNL\Entity\Response\ResponseShipment object could not be found. This exception is deprecated and being replaced by a Firstred\PostNL\Exception\NotFoundException.

Firstred\PostNL\Exception\HttpClientException

All exceptions that occur in underlying HTTP Clients are handled by Firstred\PostNL\Exception\HttpClientException s.

Firstred\PostNL\Exception\InvalidArgumentException

Invalid inputs are handled by the group of Firstred\PostNL\Exception\InvalidArgumentException exceptions.

deprecated Firstred\PostNL\Exception\InvalidApiModeException

When an invalid API mode is selected, this exception is thrown. This exception is deprecated, because the ability to select an API mode will be removed in the future.

Firstred\PostNL\Exception\InvalidBarcodeException

This exception is thrown when there is a problem with generating a barcode. Usually caused by invalid input.

Firstred\PostNL\Exception\InvalidConfigurationException

When a problem occurs due to configuration errors, this exception is thrown. For example, an invalid API key.

deprecated Firstred\PostNL\Exception\InvalidMessageTimeStampException

This occurs when a Firstred\PostNL\Entity\SOAP\Message has an invalid timestamp. Deprecated, because SOAP support is being removed.

Firstred\PostNL\Exception\InvalidMethodException

This happens when an invalid method has been called.

Firstred\PostNL\Exception\NotImplementedException

When a feature has not been implemented, yet, you will see this exception thrown.

Firstred\PostNL\Exception\NotSupportedException

This occurs when a feature is not supported.

Formats

The API can be very inconsistent when it comes to returning times and dates, for example. To standardize how some fields are handled, the library uses different formats.

Dates, Times and DateTimes

This library makes a distinction between Dates, Times and DateTimes. To normalize moments in time, this package returns DateTimeImmutable objects when referring to a single point in time and uses strings for times.

The following definitions and formats are used:

Dates

Dates refer to a specific moment in time; not specifying the time. Can be formatted as 2020-02-03. Is always a DateTimeImmutable object.

Times

Times refer to a certain moment on any given day. Can be formatted as 12:12:12. Is always a string and should always be formatted using the following PHP date format: H:i:s (Hours, minutes and seconds with leading zeros).

DateTimes

DateTimes are referring to a specific date and time. They can be formatted for example as 2021-02-03 12:12:12. Is always a DateTimeImmutable object.

Note

Every DateTimeImmutable object and time string returned by the library is adjusted to the timezone of the PostNL API (Europe/Amsterdam). Make sure your timezone is aligned correctly, or otherwise convert dates and times manually by adding/subtracting the time difference.

You can check your PHP’s configured timezone by printing the date.timezone setting:

die(ini_get('date.timezone'));

SOAP object structure

Sometimes you will notice that the REST API documentation might return property names in singular whereas the library returns the plural version of a property. This is caused by the fact that the SOAP API returns most properties in plural format. An example is the shipping status service when requesting the current status of a shipment. The SOAP API would return an addresses property whereas REST returns address. This is automatically converted to the Firstred\PostNL\Entity\Shipment::$Addresses property by this library. Therefore, when in doubt, you can safely assume that plural is used.

HTTP Client

This library supports almost all available HTTP clients. There are several ways to configure the HTTP client that should be used.

If not passed to the Firstred\PostNL\PostNL constructor or set with the Firstred\PostNL\PostNL::setHttpClient method, the library will automatically check if HTTP clients are available in the following order:

  1. Guzzle client

  2. HTTPlug client, an Asynchronous HTTP client, PSR-18 HTTP clients

  3. Built-in cURL client

Setting the HTTP client manually

By default the library will use cURL or Guzzle when available. You can always switch HTTP clients as follows:

$postnl = new PostNL(...);
$postnl->setHttpClient(\Firstred\PostNL\HttpClient\CurlClient::getInstance());

You can create a custom HTTP Client by implementing the \Firstred\PostNL\HttpClient\ClientInterface interface.

Setting the HTTP client with HTTPlug

Using auto-discovery with HTTPlug.

The following packages are required if you want to use HTTPlug:

composer require php-http/discovery php-http/httplug php-http/message-factory psr/http-factory

HTTPlug + Symfony HTTP Client example

This package already requires a Message factory and HTTP factory implementation (guzzlehttp/psr7), so all we need to do is to install the client and its requirements according to the official Symfony documentation:

composer require symfony/http-client

If you haven’t installed Guzzle itself, this library should now auto-detect the Symfony HTTP Client and use it through the HTTPlug bridge.

If you have installed Guzzle already, then you can still configure the PostNL library to use the Symfony HTTP Client. To do this, pass the new client to the Firstred\PostNL\PostNL constructor or Firstred\PostNL\PostNL::setHttpClient method. Example:

use Symfony\Component\HttpClient\HttplugClient;
use Firstred\PostNL\HttpClient\HTTPlugClient;

$symfonyClient = new HttplugClient();

$httpPlugBridgeClient = new HTTPlugClient($symfonyClient);

$postnl = new PostNL($customer, null, $httpClient);

Note

A list of HTTP Client supported by HTTPlug can be found on the following page:

Logging

Requests and responses can be logged for debugging purposes. In order to enable logging you will need to pass a PSR-3 compatible logger.

<?php

use League\Flysystem\Adapter\Local;
use League\Flysystem\Filesystem;

use Psr\Log\LogLevel;
use wappr\Logger;

// Initialize the file system adapter
$logfs = new Filesystem($adapter);

// Set the DEBUG log level
$logger = new Logger($logfs, LogLevel::DEBUG);

// Set the filename format, we're creating one file for every minute of request/responses
$logger->setFilenameFormat('Y-m-d H:i');

// Set this logger for all services at once
$postnl->setLogger($logger);

// Set the logger for just the Labelling service
$postnl->getLabellingService()->setLogger($logger);

Note

This example used the Wappr logger. You can use any logger you like, as long as it implements the PSR-3 standard. To log all responses the level needs to be set at DEBUG. For error responses you can set the debug level to ERROR.

Advanced usage

This section describes more advanced ways to use this library. The main class Firstred\PostNL\PostNL and separate service classes (such as Firstred\PostNL\Service\BarcodeService) provide more ways to interact with the API.

Object instantiation

There are four ways in which entities can be instantiated. Either by

  1. passing all arguments to the constructor in the right order

  2. or using named parameters,

  3. invoking the create method on an entity (deprecated since v1.4.0, avoid if you can)

  4. or by instantiating an empty entity and calling the setters one by one.

Which method to use is entirely up to you. They are all supported by the library.
However, if you use an IDE with code completion then the safest ways to use are (2) using named parameters (PHP 8) or by calling the setters (4), one by one.
Even without using an editor with code completion you might benefit from using methods (2) and (4) since you will be able to detect errors earlier in the process.
<?php

use Firstred\PostNL\Entity\Address;
use Firstred\PostNL\Entity\Customer;

// Your PostNL credentials
$customer = new Customer(
    '11223344',
    'DEVC',
    '123456',
    'Sander',
    'test@voorbeeld.nl',
    'Michael',
    new Address(
        '02',
        'PostNL',
        'Siriusdreef',
        '42',
        '2132WT',
        'Hoofddorp',
        'NL',
    ),
);

Building requests manually

For most cases using the API through the (Firstred\PostNL\PostNL) object would be sufficient. There might be times, however, when the main class does not align with your use case. This section aims to describe the process that is involved in creating requests, sending them and processing the responses.

Interacting with the API through this library

In the above-mentioned merged label example we are passing two Firstred\PostNL\Entity\Shipment objects, filled with the needed information to generate the labels. To merge those labels manually, we have to set the merge option to false and can omit both the format and positions parameters. This will in turn make the library return Firstred\PostNL\Entity\Response\GenerateLabelResponse objects.

These are in line with the Firstred\PostNL\Entity\Response\GenerateLabelResponse nodes generated by the SOAP API, even when using the REST API. The main reason for this standardization is that the initial version of this library was built for the SOAP API. If you need a quick reference of the Firstred\PostNL\Entity\Response\GenerateLabelResponse object, you can either look up the code of the GenerateLabelResponse class or navigate to the API documentation directly.

Sending concurrent requests manually

There is no direct need to manually handle concurrent requests. This library handles most cases automatically and even provides a special function to quickly grab timeframe and location data for frontend delivery options widgets.

In case you manually want to send a custom mix of requests, you can look up the corresponding functions in the Service class of your choice and call the `buildXXXXXXRequest()` functions manually. Thanks to the PSR-7 standard used by this library you can use the PsrHttpMessageRequestInterface object that is returned to access the full request that would otherwise be sent directly. To pick up where you left off you can then grab the response and pass it to one of the processXXXXXXXResponse()` functions of the Service class. The easiest method is to grab the raw HTTP message and parse it with the included PSR-7 library. An example can be found in the cURL client.

Processing Response objects

Note

This section refers to Response objects returned by the library, not the standardized PSR-7 messages.

As soon as you’ve done your first request with this library, you will find that it returns a Response object. As mentioned in the Building Requests section, these Response objects are based on the SOAP API, regardless of the mode set. The properties of a Response object can be looked up in the code, but it can be a bit confusing at times, since the Response object will likely not contain all properties at once. It often depends on the context of the request. For this reason, you’re better off by having a look at the SOAP API documentation directly or by checking out some of the examples in this documentation.

API Reference

\Firstred\PostNL

Namespaces

Entity

\Firstred\PostNL\Entity

Namespaces
Message

\Firstred\PostNL\Entity\Message

Classes
LabellingMessage
class Firstred\PostNL\Entity\Message\LabellingMessage
Class LabellingMessage.
Parent

Firstred\PostNL\Entity\Message\Message

Properties
public property Firstred\PostNL\Entity\Message\LabellingMessage::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Message\LabellingMessage::$Printertype
Type

string | null

Methods
public Firstred\PostNL\Entity\Message\LabellingMessage::__construct($Printertype=\'GraphicFile\|PDF\', $MessageID=null, $MessageTimeStamp=null)
LabellingMessage constructor.
Parameters
  • $Printertype (string | null)

  • $MessageID (string | null)

  • $MessageTimeStamp (string | \DateTimeInterface | null)

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Message
class Firstred\PostNL\Entity\Message\Message
Class Message.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Message\Message::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Message\Message::$MessageID
Type

string | null

protected static property Firstred\PostNL\Entity\Message\Message::$MessageTimeStamp
Type

string | null

Methods
public Firstred\PostNL\Entity\Message\Message::__construct($MessageID=null, $MessageTimeStamp=null)
Parameters
  • $MessageID (string | null)

  • $MessageTimeStamp (string | \DateTimeInterface | null)

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

public Firstred\PostNL\Entity\Message\Message::setMessageTimeStamp($MessageTimeStamp=null)
Parameters
  • $MessageTimeStamp (string | \DateTimeInterface | null)

Returns

static

Throws

\Firstred\PostNL\Exception\InvalidMessageTimeStampException

Since

1.2.0

Request

\Firstred\PostNL\Entity\Request

Classes
GetLocation
class Firstred\PostNL\Entity\Request\GetLocation
Class GetLocation.
This class is both the container and can be the actual GetLocation object itself!
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Request\GetLocation::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Request\GetLocation::$LocationCode
Type

string | null

protected static property Firstred\PostNL\Entity\Request\GetLocation::$Message
Type

\Firstred\PostNL\Entity\Message\Message | null

Deprecated

1.4.1 SOAP support is going to be removed

protected static property Firstred\PostNL\Entity\Request\GetLocation::$RetailNetworkID
Type

string | null

Methods
public Firstred\PostNL\Entity\Request\GetLocation::__construct($LocationCode=null, $Message=null, $RetailNetworkID=null)
GetLocation constructor.
Parameters
public Firstred\PostNL\Entity\Request\GetLocation::getMessage()
Returns

\Firstred\PostNL\Entity\Message\Message | null

Deprecated

1.4.1 SOAP support is going to be removed

public Firstred\PostNL\Entity\Request\GetLocation::setMessage($Message)
Parameters
Returns

static

Deprecated

1.4.1 SOAP support is going to be removed

CompleteStatusByStatus
class Firstred\PostNL\Entity\Request\CompleteStatusByStatus
Class CompleteStatusByStatus.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Request\CompleteStatusByStatus::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Request\CompleteStatusByStatus::$Message
Type

\Firstred\PostNL\Entity\Message\Message | null

protected static property Firstred\PostNL\Entity\Request\CompleteStatusByStatus::$Customer
Type

\Firstred\PostNL\Entity\Customer | null

protected static property Firstred\PostNL\Entity\Request\CompleteStatusByStatus::$Shipment
Type

\Firstred\PostNL\Entity\Shipment | null

Methods
public Firstred\PostNL\Entity\Request\CompleteStatusByStatus::__construct($Shipment=null, $Customer=null, $Message=null)
CompleteStatusByStatus constructor.
Parameters
public Firstred\PostNL\Entity\Request\CompleteStatusByStatus::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

GetSignature
class Firstred\PostNL\Entity\Request\GetSignature
Class GetSignature.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Request\GetSignature::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Request\GetSignature::$Message
Type

\Firstred\PostNL\Entity\Message\Message | null

Deprecated

1.4.1 SOAP support is going to be removed

protected static property Firstred\PostNL\Entity\Request\GetSignature::$Customer
Type

\Firstred\PostNL\Entity\Customer | null

protected static property Firstred\PostNL\Entity\Request\GetSignature::$Shipment
Type

\Firstred\PostNL\Entity\Shipment | null

Methods
public Firstred\PostNL\Entity\Request\GetSignature::__construct($Shipment=null, $Customer=null, $Message=null)
GetSignature constructor.
Parameters
public Firstred\PostNL\Entity\Request\GetSignature::getMessage()
Returns

\Firstred\PostNL\Entity\Message\Message | null

Deprecated

1.4.1 SOAP support is going to be removed

public Firstred\PostNL\Entity\Request\GetSignature::setMessage($Message)
Parameters
Returns

\Firstred\PostNL\Entity\Request\GetSignature

Deprecated

1.4.1 SOAP support is going to be removed

public Firstred\PostNL\Entity\Request\GetSignature::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

GetSentDate
class Firstred\PostNL\Entity\Request\GetSentDate
Class GetSentDate.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Request\GetSentDate::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Request\GetSentDate::$AllowSundaySorting
Type

bool | null

protected static property Firstred\PostNL\Entity\Request\GetSentDate::$City
Type

string | null

protected static property Firstred\PostNL\Entity\Request\GetSentDate::$CountryCode
Type

string | null

protected static property Firstred\PostNL\Entity\Request\GetSentDate::$DeliveryDate
Type

\DateTimeInterface | null

protected static property Firstred\PostNL\Entity\Request\GetSentDate::$HouseNr
Type

string | null

protected static property Firstred\PostNL\Entity\Request\GetSentDate::$HouseNrExt
Type

string | null

protected static property Firstred\PostNL\Entity\Request\GetSentDate::$Options
Type

string[] | null

protected static property Firstred\PostNL\Entity\Request\GetSentDate::$PostalCode
Type

string | null

protected static property Firstred\PostNL\Entity\Request\GetSentDate::$ShippingDuration
Type

string | null

protected static property Firstred\PostNL\Entity\Request\GetSentDate::$Street
Type

string | null

Methods
public Firstred\PostNL\Entity\Request\GetSentDate::__construct($AllowSundaySorting=false, $City=null, $CountryCode=null, $HouseNr=null, $HouseNrExt=null, $Options=null, $PostalCode=null, $DeliveryDate=null, $Street=null, $ShippingDuration=null)
GetSentDate constructor.
Parameters
  • $AllowSundaySorting (bool | null)

  • $City (string | null)

  • $CountryCode (string | null)

  • $HouseNr (string | null)

  • $HouseNrExt (string | null)

  • $Options (array | null)

  • $PostalCode (string | null)

  • $DeliveryDate (DateTimeInterface | string | null)

  • $Street (string | null)

  • $ShippingDuration (string | null)

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

public Firstred\PostNL\Entity\Request\GetSentDate::setDeliveryDate($deliveryDate=null)
Parameters
  • $deliveryDate (string | \DateTimeInterface | null)

Returns

static

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

public Firstred\PostNL\Entity\Request\GetSentDate::setPostalCode($postcode=null)
Set the postcode.
Parameters
  • $postcode (string | null)

Returns

static

public Firstred\PostNL\Entity\Request\GetSentDate::setAllowSundaySorting($AllowSundaySorting=null)
Parameters
  • $AllowSundaySorting (string | bool | int | null)

Returns

\Firstred\PostNL\Entity\Request\GetSentDate

Since

1.0.0

Since

1.0.0

public Firstred\PostNL\Entity\Request\GetSentDate::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

GetLocationsInArea
class Firstred\PostNL\Entity\Request\GetLocationsInArea
Class GetLocationsInArea.
This class is both the container and can be the actual GetLocationsInArea object itself!
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Request\GetLocationsInArea::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Request\GetLocationsInArea::$Countrycode
Type

string | null

protected static property Firstred\PostNL\Entity\Request\GetLocationsInArea::$Location
Type

\Firstred\PostNL\Entity\Location | null

protected static property Firstred\PostNL\Entity\Request\GetLocationsInArea::$Message
Type

\Firstred\PostNL\Entity\Message\Message | null

Deprecated

1.4.1 SOAP support is going to be removed

Methods
public Firstred\PostNL\Entity\Request\GetLocationsInArea::__construct($Countrycode=null, $Location=null, $Message=null)
GetLocationsInArea constructor.
Parameters
CurrentStatusByPhase
class Firstred\PostNL\Entity\Request\CurrentStatusByPhase
Class CurrentStatusByPhase.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Request\CurrentStatusByPhase::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Request\CurrentStatusByPhase::$Message
Type

\Firstred\PostNL\Entity\Message\Message | null

protected static property Firstred\PostNL\Entity\Request\CurrentStatusByPhase::$Customer
Type

\Firstred\PostNL\Entity\Customer | null

protected static property Firstred\PostNL\Entity\Request\CurrentStatusByPhase::$Shipment
Type

\Firstred\PostNL\Entity\Shipment | null

Methods
public Firstred\PostNL\Entity\Request\CurrentStatusByPhase::__construct($Shipment=null, $Customer=null, $Message=null)
CurrentStatusByPhase constructor.
Parameters
public Firstred\PostNL\Entity\Request\CurrentStatusByPhase::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

CurrentStatusByStatus
class Firstred\PostNL\Entity\Request\CurrentStatusByStatus
Class CurrentStatusByStatus.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Request\CurrentStatusByStatus::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Request\CurrentStatusByStatus::$Message
Type

\Firstred\PostNL\Entity\Message\Message | null

protected static property Firstred\PostNL\Entity\Request\CurrentStatusByStatus::$Customer
Type

\Firstred\PostNL\Entity\Customer | null

protected static property Firstred\PostNL\Entity\Request\CurrentStatusByStatus::$Shipment
Type

\Firstred\PostNL\Entity\Shipment | null

Methods
public Firstred\PostNL\Entity\Request\CurrentStatusByStatus::__construct($Shipment=null, $Customer=null, $Message=null)
CurrentStatusByStatus constructor.
Parameters
public Firstred\PostNL\Entity\Request\CurrentStatusByStatus::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

GetNearestLocations
class Firstred\PostNL\Entity\Request\GetNearestLocations
Class GetNearestLocations.
This class is both the container and can be the actual GetNearestLocations object itself!
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Request\GetNearestLocations::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Request\GetNearestLocations::$Countrycode
Type

string | null

protected static property Firstred\PostNL\Entity\Request\GetNearestLocations::$Location
Type

\Firstred\PostNL\Entity\Location | null

protected static property Firstred\PostNL\Entity\Request\GetNearestLocations::$Message
Type

\Firstred\PostNL\Entity\Message\Message | null

Deprecated

1.4.1 SOAP support is going to be removed

Methods
public Firstred\PostNL\Entity\Request\GetNearestLocations::__construct($Countrycode=null, $Location=null, $Message=null)
GetNearestLocations constructor.
Parameters
public Firstred\PostNL\Entity\Request\GetNearestLocations::getMessage()
Returns

\Firstred\PostNL\Entity\Message\Message | null

Deprecated

1.4.1 SOAP support is going to be removed

public Firstred\PostNL\Entity\Request\GetNearestLocations::setMessage($Message)
Parameters
Returns

static

Deprecated

1.4.1 SOAP support is going to be removed

CompleteStatusByReference
class Firstred\PostNL\Entity\Request\CompleteStatusByReference
Class CompleteStatusByReference.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Request\CompleteStatusByReference::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Request\CompleteStatusByReference::$Message
Type

\Firstred\PostNL\Entity\Message\Message | null

Deprecated

1.4.1 SOAP support is going to be removed

protected static property Firstred\PostNL\Entity\Request\CompleteStatusByReference::$Customer
Type

\Firstred\PostNL\Entity\Customer | null

protected static property Firstred\PostNL\Entity\Request\CompleteStatusByReference::$Shipment
Type

\Firstred\PostNL\Entity\Shipment | null

Methods
public Firstred\PostNL\Entity\Request\CompleteStatusByReference::__construct($Shipment=null, $Customer=null, $Message=null)
CompleteStatusByReference constructor.
Parameters
public Firstred\PostNL\Entity\Request\CompleteStatusByReference::getMessage()
Returns

\Firstred\PostNL\Entity\Message\Message | null

Deprecated

1.4.1 SOAP support is going to be removed

public Firstred\PostNL\Entity\Request\CompleteStatusByReference::setMessage($Message)
Parameters
Returns

static

Deprecated

1.4.1 SOAP support is going to be removed

public Firstred\PostNL\Entity\Request\CompleteStatusByReference::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

CompleteStatus
class Firstred\PostNL\Entity\Request\CompleteStatus
Class CompleteStatus.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Request\CompleteStatus::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Request\CompleteStatus::$Message
Type

\Firstred\PostNL\Entity\Message\Message | null

Deprecated

1.4.1 SOAP support is going to be removed

protected static property Firstred\PostNL\Entity\Request\CompleteStatus::$Customer
Type

\Firstred\PostNL\Entity\Customer | null

protected static property Firstred\PostNL\Entity\Request\CompleteStatus::$Shipment
Type

\Firstred\PostNL\Entity\Shipment | null

Methods
public Firstred\PostNL\Entity\Request\CompleteStatus::__construct($Shipment=null, $Customer=null, $Message=null)
CompleteStatus constructor.
Parameters
public Firstred\PostNL\Entity\Request\CompleteStatus::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

public Firstred\PostNL\Entity\Request\CompleteStatus::getMessage()
Returns

\Firstred\PostNL\Entity\Message\Message | null

Deprecated

1.4.1 SOAP support is going to be removed

public Firstred\PostNL\Entity\Request\CompleteStatus::setMessage($Message)
Parameters
Returns

static

Deprecated

1.4.1 SOAP support is going to be removed

GetTimeframes
class Firstred\PostNL\Entity\Request\GetTimeframes
Class GetTimeframes.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Request\GetTimeframes::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Request\GetTimeframes::$Message
Type

\Firstred\PostNL\Entity\Message\Message | null

Deprecated

1.4.1 SOAP support is going to be removed

protected static property Firstred\PostNL\Entity\Request\GetTimeframes::$Timeframe
Type

\Firstred\PostNL\Entity\Timeframe[] | null

Methods
public Firstred\PostNL\Entity\Request\GetTimeframes::__construct($Message=null, $Timeframes=null)
GetTimeframes constructor.
Parameters
public Firstred\PostNL\Entity\Request\GetTimeframes::setTimeframe($timeframes)
Set timeframes
Parameters
Returns

$this

Since

1.0.0

Since

1.0.0

public Firstred\PostNL\Entity\Request\GetTimeframes::setTimeframes($timeframes)
Set timeframes
Parameters
Returns

$this

Since

1.2.0

public Firstred\PostNL\Entity\Request\GetTimeframes::getTimeframe()
Get timeframes
Returns

\Firstred\PostNL\Entity\Timeframe[] | null

public Firstred\PostNL\Entity\Request\GetTimeframes::getTimeframes()
Get timeframes
Returns

\Firstred\PostNL\Entity\Timeframe[] | null

Since

1.2.0

public Firstred\PostNL\Entity\Request\GetTimeframes::getMessage()
Returns

\Firstred\PostNL\Entity\Message\Message | null

Deprecated

1.4.1 SOAP support is going to be removed

public Firstred\PostNL\Entity\Request\GetTimeframes::setMessage($Message)
Parameters
Returns

static

Deprecated

1.4.1 SOAP support is going to be removed

public Firstred\PostNL\Entity\Request\GetTimeframes::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

CurrentStatusByReference
class Firstred\PostNL\Entity\Request\CurrentStatusByReference
Class CurrentStatusByReference.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Request\CurrentStatusByReference::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Request\CurrentStatusByReference::$Message
Type

\Firstred\PostNL\Entity\Message\Message | null

Deprecated

1.4.1 SOAP support is going to be removed

protected static property Firstred\PostNL\Entity\Request\CurrentStatusByReference::$Customer
Type

\Firstred\PostNL\Entity\Customer | null

protected static property Firstred\PostNL\Entity\Request\CurrentStatusByReference::$Shipment
Type

\Firstred\PostNL\Entity\Shipment | null

Methods
public Firstred\PostNL\Entity\Request\CurrentStatusByReference::__construct($Shipment=null, $Customer=null, $Message=null)
CurrentStatusByReference constructor.
Parameters
public Firstred\PostNL\Entity\Request\CurrentStatusByReference::getMessage()
Returns

\Firstred\PostNL\Entity\Message\Message | null

Deprecated

1.4.1 SOAP support is going to be removed

public Firstred\PostNL\Entity\Request\CurrentStatusByReference::setMessage($Message)
Parameters
Returns

static

Deprecated

1.4.1 SOAP support is going to be removed

public Firstred\PostNL\Entity\Request\CurrentStatusByReference::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

GenerateBarcode
class Firstred\PostNL\Entity\Request\GenerateBarcode
Class GenerateLabel.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Request\GenerateBarcode::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Request\GenerateBarcode::$Message
Type

\Firstred\PostNL\Entity\Message\Message | null

Deprecated

1.4.1 SOAP support is going to be removed

protected static property Firstred\PostNL\Entity\Request\GenerateBarcode::$Customer
Type

\Firstred\PostNL\Entity\Customer | null

protected static property Firstred\PostNL\Entity\Request\GenerateBarcode::$Barcode
Type

\Firstred\PostNL\Entity\Barcode | null

Methods
public Firstred\PostNL\Entity\Request\GenerateBarcode::__construct($Barcode=null, $Customer=null, $Message=null)
GenerateBarcode constructor.
Parameters
public Firstred\PostNL\Entity\Request\GenerateBarcode::getMessage()
Returns

\Firstred\PostNL\Entity\Message\Message | null

Deprecated

1.4.1 SOAP support is going to be removed

public Firstred\PostNL\Entity\Request\GenerateBarcode::setMessage($Message)
Parameters
Returns

static

Deprecated

1.4.1 SOAP support is going to be removed

CurrentStatus
class Firstred\PostNL\Entity\Request\CurrentStatus
Class CurrentStatus.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Request\CurrentStatus::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Request\CurrentStatus::$Message
Type

\Firstred\PostNL\Entity\Message\Message | null

Deprecated

1.4.1 SOAP support is going to be removed

protected static property Firstred\PostNL\Entity\Request\CurrentStatus::$Customer
Type

\Firstred\PostNL\Entity\Customer | null

protected static property Firstred\PostNL\Entity\Request\CurrentStatus::$Shipment
Type

\Firstred\PostNL\Entity\Shipment | null

Methods
public Firstred\PostNL\Entity\Request\CurrentStatus::__construct($Shipment=null, $Customer=null, $Message=null)
CurrentStatus constructor.
Parameters
public Firstred\PostNL\Entity\Request\CurrentStatus::getMessage()
Returns

\Firstred\PostNL\Entity\Message\Message | null

Deprecated

1.4.1 SOAP support is going to be removed

public Firstred\PostNL\Entity\Request\CurrentStatus::setMessage($Message)
Parameters
Returns

static

Deprecated

1.4.1 SOAP support is going to be removed

public Firstred\PostNL\Entity\Request\CurrentStatus::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

CompleteStatusByPhase
class Firstred\PostNL\Entity\Request\CompleteStatusByPhase
Class CompleteStatusByPhase.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Request\CompleteStatusByPhase::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Request\CompleteStatusByPhase::$Message
Type

\Firstred\PostNL\Entity\Message\Message | null

protected static property Firstred\PostNL\Entity\Request\CompleteStatusByPhase::$Customer
Type

\Firstred\PostNL\Entity\Customer | null

protected static property Firstred\PostNL\Entity\Request\CompleteStatusByPhase::$Shipment
Type

\Firstred\PostNL\Entity\Shipment | null

Methods
public Firstred\PostNL\Entity\Request\CompleteStatusByPhase::__construct($Shipment=null, $Customer=null, $Message=null)
CompleteStatusByPhase constructor.
Parameters
public Firstred\PostNL\Entity\Request\CompleteStatusByPhase::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

GenerateLabel
class Firstred\PostNL\Entity\Request\GenerateLabel
Class GenerateLabel.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Request\GenerateLabel::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Request\GenerateLabel::$Customer
Type

\Firstred\PostNL\Entity\Customer | null

protected static property Firstred\PostNL\Entity\Request\GenerateLabel::$Message
Type

\Firstred\PostNL\Entity\Message\LabellingMessage | null

protected static property Firstred\PostNL\Entity\Request\GenerateLabel::$Shipments
Type

\Firstred\PostNL\Entity\Shipment[] | null

protected static property Firstred\PostNL\Entity\Request\GenerateLabel::$LabelSignature
Type

string | null

Methods
public Firstred\PostNL\Entity\Request\GenerateLabel::__construct($Shipments=null, $Message=null, $Customer=null, $LabelSignature=null)
GenerateLabel constructor.
Parameters
public Firstred\PostNL\Entity\Request\GenerateLabel::jsonSerialize()
Return a serializable array for `json_encode`.
Returns

array

public Firstred\PostNL\Entity\Request\GenerateLabel::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

SendShipment
class Firstred\PostNL\Entity\Request\SendShipment
Class SendShipment.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Request\SendShipment::$defaultProperties
Type

array

protected static property Firstred\PostNL\Entity\Request\SendShipment::$Customer
Type

\Firstred\PostNL\Entity\Customer | null

protected static property Firstred\PostNL\Entity\Request\SendShipment::$Message
Type

\Firstred\PostNL\Entity\Message\LabellingMessage | null

protected static property Firstred\PostNL\Entity\Request\SendShipment::$Shipments
Type

\Firstred\PostNL\Entity\Shipment[] | null

Methods
public Firstred\PostNL\Entity\Request\SendShipment::__construct($Shipments=null, $Message=null, $Customer=null)
SendShipment constructor.
Parameters
public Firstred\PostNL\Entity\Request\SendShipment::jsonSerialize()
Return a serializable array for `json_encode`.
Returns

array

Confirming
class Firstred\PostNL\Entity\Request\Confirming
Class Confirming.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Request\Confirming::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Request\Confirming::$Customer
Type

\Firstred\PostNL\Entity\Customer | null

protected static property Firstred\PostNL\Entity\Request\Confirming::$Message
Type

\Firstred\PostNL\Entity\Message\Message | null

protected static property Firstred\PostNL\Entity\Request\Confirming::$Shipments
Type

\Firstred\PostNL\Entity\Shipment[] | null

Methods
public Firstred\PostNL\Entity\Request\Confirming::__construct($Shipments=null, $Customer=null, $Message=null)
Confirming constructor.
Parameters
public Firstred\PostNL\Entity\Request\Confirming::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

public Firstred\PostNL\Entity\Request\Confirming::jsonSerialize()
Return a serializable array for `json_encode`.
Returns

array

GetDeliveryDate
class Firstred\PostNL\Entity\Request\GetDeliveryDate
Class GetDeliveryDate.
This class is both the container and can be the actual GetDeliveryDate object itself!
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Request\GetDeliveryDate::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Request\GetDeliveryDate::$AllowSundaySorting
Type

bool | null

protected static property Firstred\PostNL\Entity\Request\GetDeliveryDate::$City
Type

string | null

protected static property Firstred\PostNL\Entity\Request\GetDeliveryDate::$CountryCode
Type

string | null

protected static property Firstred\PostNL\Entity\Request\GetDeliveryDate::$CutOffTimes
Type

\Firstred\PostNL\Entity\CutOffTime[] | null

protected static property Firstred\PostNL\Entity\Request\GetDeliveryDate::$HouseNr
Type

string | null

protected static property Firstred\PostNL\Entity\Request\GetDeliveryDate::$HouseNrExt
Type

string | null

protected static property Firstred\PostNL\Entity\Request\GetDeliveryDate::$Options
Type

string[] | null

protected static property Firstred\PostNL\Entity\Request\GetDeliveryDate::$OriginCountryCode
Type

string | null

protected static property Firstred\PostNL\Entity\Request\GetDeliveryDate::$PostalCode
Type

string | null

protected static property Firstred\PostNL\Entity\Request\GetDeliveryDate::$ShippingDate
Type

\DateTimeInterface | null

protected static property Firstred\PostNL\Entity\Request\GetDeliveryDate::$ShippingDuration
Type

string | null

protected static property Firstred\PostNL\Entity\Request\GetDeliveryDate::$Street
Type

string | null

protected static property Firstred\PostNL\Entity\Request\GetDeliveryDate::$GetDeliveryDate
Type

\Firstred\PostNL\Entity\Request\GetDeliveryDate | null

protected static property Firstred\PostNL\Entity\Request\GetDeliveryDate::$Message
Type

\Firstred\PostNL\Entity\Message\Message | null

Deprecated

1.4.1 SOAP support is going to be removed

Methods
public Firstred\PostNL\Entity\Request\GetDeliveryDate::__construct($AllowSundaySorting=null, $City=null, $CountryCode=null, $CutOffTimes=null, $HouseNr=null, $HouseNrExt=null, $Options=null, $OriginCountryCode=null, $PostalCode=null, $ShippingDate=null, $ShippingDuration=null, $Street=null, $GetDeliveryDate=null, $Message=null)
GetDeliveryDate constructor.
Parameters
  • $AllowSundaySorting (bool | null)

  • $City (string | null)

  • $CountryCode (string | null)

  • $CutOffTimes (array | null)

  • $HouseNr (string | null)

  • $HouseNrExt (string | null)

  • $Options (array | null)

  • $OriginCountryCode (string | null)

  • $PostalCode (string | null)

  • $ShippingDate (DateTimeInterface | string | null)

  • $ShippingDuration (string | null)

  • $Street (string | null)

  • $GetDeliveryDate (Firstred\PostNL\Entity\Request\GetDeliveryDate | null)

  • $Message (Firstred\PostNL\Entity\Message\Message | null)

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

public Firstred\PostNL\Entity\Request\GetDeliveryDate::setShippingDate($shippingDate=null)
Parameters
  • $shippingDate (string | \DateTimeInterface | null)

Returns

static

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

public Firstred\PostNL\Entity\Request\GetDeliveryDate::setPostalCode($postcode=null)
Set the postcode.
Parameters
  • $postcode (string | null)

Returns

static

public Firstred\PostNL\Entity\Request\GetDeliveryDate::setAllowSundaySorting($AllowSundaySorting=null)
Parameters
  • $AllowSundaySorting (string | bool | int | null)

Returns

\Firstred\PostNL\Entity\Request\GetDeliveryDate

Since

1.0.0

Since

1.0.0

public Firstred\PostNL\Entity\Request\GetDeliveryDate::getMessage()
Returns

\Firstred\PostNL\Entity\Message\Message | null

Deprecated

1.4.1 SOAP support is going to be removed

public Firstred\PostNL\Entity\Request\GetDeliveryDate::setMessage($Message)
Parameters
Returns

static

Deprecated

1.4.1 SOAP support is going to be removed

public Firstred\PostNL\Entity\Request\GetDeliveryDate::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

GetSentDateRequest
class Firstred\PostNL\Entity\Request\GetSentDateRequest
Class GetSentDateRequest.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Request\GetSentDateRequest::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Request\GetSentDateRequest::$GetSentDate
Type

\Firstred\PostNL\Entity\Request\GetSentDate | null

protected static property Firstred\PostNL\Entity\Request\GetSentDateRequest::$Message
Type

\Firstred\PostNL\Entity\Message\Message | null

Deprecated

1.4.1 SOAP support is going to be removed

Methods
public Firstred\PostNL\Entity\Request\GetSentDateRequest::__construct($GetSentDate=null, $Message=null)
GetSentDate constructor.
Parameters
public Firstred\PostNL\Entity\Request\GetSentDateRequest::getMessage()
Returns

\Firstred\PostNL\Entity\Message\Message | null

Deprecated

1.4.1 SOAP support is going to be removed

public Firstred\PostNL\Entity\Request\GetSentDateRequest::setMessage($Message)
Parameters
Returns

static

Deprecated

1.4.1 SOAP support is going to be removec

Response

\Firstred\PostNL\Entity\Response

Classes
GetLocationsResult
class Firstred\PostNL\Entity\Response\GetLocationsResult
Class GetLocationsResult.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Response\GetLocationsResult::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Response\GetLocationsResult::$ResponseLocation
Type

\Firstred\PostNL\Entity\Response\ResponseLocation[] | null

Methods
public Firstred\PostNL\Entity\Response\GetLocationsResult::__construct($ResponseLocation=null)
GetLocationsResult constructor.
Parameters
public Firstred\PostNL\Entity\Response\GetLocationsResult::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

SignatureResponse
class Firstred\PostNL\Entity\Response\SignatureResponse
Class SignatureResponse.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Response\SignatureResponse::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Response\SignatureResponse::$Signature
Type

\Firstred\PostNL\Entity\Signature | null

Methods
public Firstred\PostNL\Entity\Response\SignatureResponse::__construct($Signature=null)
SignatureResponse constructor.
Parameters
GetNearestLocationsResponse
class Firstred\PostNL\Entity\Response\GetNearestLocationsResponse
Class GetNearestLocationsResponse.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Response\GetNearestLocationsResponse::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Response\GetNearestLocationsResponse::$GetLocationsResult
Type

\Firstred\PostNL\Entity\Response\GetLocationsResult | null

Methods
public Firstred\PostNL\Entity\Response\GetNearestLocationsResponse::__construct($GetLocationsResult=null)
GetNearestLocationsResponse constructor.
Parameters
public static Firstred\PostNL\Entity\Response\GetNearestLocationsResponse::jsonDeserialize($json)
Parameters
  • $json (stdClass)

Returns

\Firstred\PostNL\Entity\Response\GetNearestLocationsResponse | \stdClass | null

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Since

1.2.0

public Firstred\PostNL\Entity\Response\GetNearestLocationsResponse::jsonSerialize()
Return a serializable array for `json_encode`.
Returns

array

ResponseShipment
class Firstred\PostNL\Entity\Response\ResponseShipment
Class ResponseShipment.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Response\ResponseShipment::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Response\ResponseShipment::$Barcode
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseShipment::$DownPartnerBarcode
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseShipment::$DownPartnerID
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseShipment::$DownPartnerLocation
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseShipment::$Labels
Type

\Firstred\PostNL\Entity\Label[] | null

protected static property Firstred\PostNL\Entity\Response\ResponseShipment::$ProductCodeDelivery
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseShipment::$Warnings
Type

\Firstred\PostNL\Entity\Warning[] | null

protected static property Firstred\PostNL\Entity\Response\ResponseShipment::$CodingText
Type

string | null

Methods
public Firstred\PostNL\Entity\Response\ResponseShipment::__construct($Barcode=null, $ProductCodeDelivery=null, $Labels=null, $DownPartnerBarcode=null, $DownPartnerID=null, $DownPartnerLocation=null, $Warnings=null, $CodingText=null)
Parameters
CompleteStatusResponseEvent
class Firstred\PostNL\Entity\Response\CompleteStatusResponseEvent
Class CompleteStatusResponseEvent.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Response\CompleteStatusResponseEvent::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseEvent::$Code
Type

string | null

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseEvent::$Description
Type

string | null

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseEvent::$DestinationLocationCode
Type

string | null

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseEvent::$LocationCode
Type

string | null

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseEvent::$RouteCode
Type

string | null

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseEvent::$RouteName
Type

string | null

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseEvent::$TimeStamp
Type

string | null

Methods
public Firstred\PostNL\Entity\Response\CompleteStatusResponseEvent::__construct($Code=null, $Description=null, $DestinationLocationCode=null, $LocationCode=null, $RouteCode=null, $RouteName=null, $TimeStamp=null)
CompleteStatusResponseEvent constructor.
Parameters
  • $Code (string | null)

  • $Description (string | null)

  • $DestinationLocationCode (string | null)

  • $LocationCode (string | null)

  • $RouteCode (string | null)

  • $RouteName (string | null)

  • $TimeStamp (string | null)

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

public Firstred\PostNL\Entity\Response\CompleteStatusResponseEvent::setTimeStamp($TimeStamp=null)
Parameters
  • $TimeStamp (string | \DateTimeInterface | null)

Returns

static

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

ResponseTimeframes
class Firstred\PostNL\Entity\Response\ResponseTimeframes
Class ResponseTimeframes.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Response\ResponseTimeframes::$defaultProperties
Type

array

protected static property Firstred\PostNL\Entity\Response\ResponseTimeframes::$ReasonNoTimeframes
Type

\Firstred\PostNL\Entity\ReasonNoTimeframe[] | null

protected static property Firstred\PostNL\Entity\Response\ResponseTimeframes::$Timeframes
Type

\Firstred\PostNL\Entity\Timeframe[] | null

Methods
public Firstred\PostNL\Entity\Response\ResponseTimeframes::__construct($ReasonNoTimeframes=null, $Timeframes=null)
Parameters
public Firstred\PostNL\Entity\Response\ResponseTimeframes::jsonSerialize()
Return a serializable array for `json_encode`.
Returns

array

CompleteStatusResponseShipment
class Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment
Class CompleteStatusResponseShipment.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::$Addresses
Type

\Firstred\PostNL\Entity\Response\StatusAddress[] | null

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::$Amounts
Type

\Firstred\PostNL\Entity\Amount[] | null

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::$Barcode
Type

\Firstred\PostNL\Entity\Barcode | null

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::$Customer
Type

\Firstred\PostNL\Entity\Customer | null

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::$DeliveryDate
Type

\DateTimeInterface | null

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::$Dimension
Type

\Firstred\PostNL\Entity\Dimension | null Dimension

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::$Events
Type

\Firstred\PostNL\Entity\Response\CompleteStatusResponseEvent[] | null

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::$Expectation
Type

\Firstred\PostNL\Entity\Expectation | null

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::$Groups
Type

\Firstred\PostNL\Entity\Group[] | null

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::$MainBarcode
Type

string | null

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::$OldStatuses
Type

\Firstred\PostNL\Entity\Response\CompleteStatusResponseOldStatus[] | null

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::$ProductCode
Type

string | null

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::$ProductDescription
Type

string | null

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::$ProductOptions
Type

\Firstred\PostNL\Entity\ProductOption[] | null

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::$Reference
Type

string | null

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::$ShipmentAmount
Type

string | null

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::$ShipmentCounter
Type

string | null

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::$Status
Type

\Firstred\PostNL\Entity\Status | null

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::$Warnings
Type

\Firstred\PostNL\Entity\Warning[] | null

Methods
public Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::__construct($Addresses=null, $Amounts=null, $Barcode=null, $Customer=null, $DeliveryDate=null, $Dimension=null, $Events=null, $Expectation=null, $Groups=null, $OldStatuses=null, $ProductCode=null, $ProductOptions=null, $Reference=null, $Status=null, $Warnings=null, $MainBarcode=null, $ShipmentAmount=null, $ShipmentCounter=null, $ProductDescription=null)
CompleteStatusResponseShipment constructor.
Parameters
Throws

\Firstred\PostNL\Exception\InvalidArgumentException

public Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::setDeliveryDate($deliveryDate=null)
Parameters
  • $deliveryDate (string | \DateTimeInterface | null)

Returns

static

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

public static Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::jsonDeserialize($json)
Parameters
  • $json (stdClass)

Returns

mixed | \stdClass | null

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Since

1.2.0

public Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

ResponseGroup
class Firstred\PostNL\Entity\Response\ResponseGroup
Class ResponseGroup.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Response\ResponseGroup::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Response\ResponseGroup::$GroupCount
Amount of shipments in the ResponseGroup.
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseGroup::$GroupSequence
Sequence number.
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseGroup::$GroupType
The type of Group.
Possible values:

- `01`: Collection request
- `03`: Multiple parcels in one shipment (multi-colli)
- `04`: Single parcel in one shipment
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseGroup::$MainBarcode
Main barcode for the shipment.
Type

string | null

Methods
public Firstred\PostNL\Entity\Response\ResponseGroup::__construct($GroupCount=null, $GroupSequence=null, $GroupType=null, $MainBarcode=null)
ResponseGroup Constructor.
Parameters
  • $GroupCount (string | null)

  • $GroupSequence (string | null)

  • $GroupType (string | null)

  • $MainBarcode (string | null)

GenerateBarcodeResponse
class Firstred\PostNL\Entity\Response\GenerateBarcodeResponse
Class GenerateBarcodeResponse.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Response\GenerateBarcodeResponse::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Response\GenerateBarcodeResponse::$Barcode
Type

string | null

Methods
public Firstred\PostNL\Entity\Response\GenerateBarcodeResponse::__construct($Barcode=null)
GenerateBarcodeResponse constructor.
Parameters
  • $Barcode (string | null)

GetLocationsInAreaResponse
class Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse
Class GetLocationsInAreaResponse.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse::$GetLocationsResult
Type

\Firstred\PostNL\Entity\Response\GetLocationsResult | null

Methods
public Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse::__construct($GetLocationsResult=null)
GetLocationsInAreaResponse constructor.
Parameters
public Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse::jsonSerialize()
Return a serializable array for `json_encode`.
Returns

array

CurrentStatusResponse
class Firstred\PostNL\Entity\Response\CurrentStatusResponse
Class CurrentStatusResponse.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Response\CurrentStatusResponse::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Response\CurrentStatusResponse::$Shipments
Type

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

protected static property Firstred\PostNL\Entity\Response\CurrentStatusResponse::$Warnings
Type

\Firstred\PostNL\Entity\Warning[] | null

Methods
public Firstred\PostNL\Entity\Response\CurrentStatusResponse::__construct($Shipments=null, $Warnings=null)
CurrentStatusResponse constructor.
Parameters
public Firstred\PostNL\Entity\Response\CurrentStatusResponse::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

CompleteStatusResponse
class Firstred\PostNL\Entity\Response\CompleteStatusResponse
Class CompleteStatusResponse.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Response\CompleteStatusResponse::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponse::$Shipments
Type

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

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponse::$Warnings
Type

\Firstred\PostNL\Entity\Warning[] | null

Methods
public Firstred\PostNL\Entity\Response\CompleteStatusResponse::__construct($Shipments=null, $Warnings=null)
CompleteStatusResponse constructor.
Parameters
public static Firstred\PostNL\Entity\Response\CompleteStatusResponse::jsonDeserialize($json)
public Firstred\PostNL\Entity\Response\CompleteStatusResponse::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

ResponseLocation
class Firstred\PostNL\Entity\Response\ResponseLocation
Class ResponseLocation.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Response\ResponseLocation::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Response\ResponseLocation::$Address
Type

\Firstred\PostNL\Entity\Address | null

protected static property Firstred\PostNL\Entity\Response\ResponseLocation::$DeliveryOptions
Type

string[] | null

protected static property Firstred\PostNL\Entity\Response\ResponseLocation::$Distance
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseLocation::$Latitude
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseLocation::$Longitude
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseLocation::$Name
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseLocation::$OpeningHours
Type

\Firstred\PostNL\Entity\OpeningHours | null

protected static property Firstred\PostNL\Entity\Response\ResponseLocation::$PartnerName
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseLocation::$PhoneNumber
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseLocation::$LocationCode
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseLocation::$RetailNetworkID
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseLocation::$Saleschannel
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseLocation::$TerminalType
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseLocation::$Warnings
Type

\Firstred\PostNL\Entity\Warning[] | null

protected static property Firstred\PostNL\Entity\Response\ResponseLocation::$DownPartnerID
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseLocation::$DownPartnerLocation
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseLocation::$Sustainability
Type

\Firstred\PostNL\Entity\Sustainability | null

Methods
public Firstred\PostNL\Entity\Response\ResponseLocation::__construct($Address=null, $DeliveryOptions=null, $Distance=null, $Latitude=null, $Longitude=null, $Name=null, $OpeningHours=null, $PartnerName=null, $PhoneNumber=null, $LocationCode=null, $RetailNetworkID=null, $Saleschannel=null, $TerminalType=null, $Warnings=null, $DownPartnerID=null, $DownPartnerLocation=null, $Sustainability=null)
ResponseLocation constructor.
Parameters
  • $Address (Firstred\PostNL\Entity\Address | null)

  • $DeliveryOptions (string[] | null)

  • $Distance (string | null)

  • $Latitude (string | null)

  • $Longitude (string | null)

  • $Name (string | null)

  • $OpeningHours (string[] | null)

  • $PartnerName (string | null)

  • $PhoneNumber (string | null)

  • $LocationCode (string | null)

  • $RetailNetworkID (string | null)

  • $Saleschannel (string | null)

  • $TerminalType (string | null)

  • $Warnings (Firstred\PostNL\Entity\Warning[] | null)

  • $DownPartnerID (string | null)

  • $DownPartnerLocation (string | null)

  • $Sustainability (Firstred\PostNL\Entity\Sustainability | null)

public static Firstred\PostNL\Entity\Response\ResponseLocation::jsonDeserialize($json)
MergedLabel
class Firstred\PostNL\Entity\Response\MergedLabel
Class MergedLabel.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Response\MergedLabel::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Response\MergedLabel::$Barcodes
Type

string[] | null

protected static property Firstred\PostNL\Entity\Response\MergedLabel::$Labels
Type

\Firstred\PostNL\Entity\Label[] | null

Methods
public Firstred\PostNL\Entity\Response\MergedLabel::__construct($Barcodes=null, $Labels=null)
Parameters
GetSentDateResponse
class Firstred\PostNL\Entity\Response\GetSentDateResponse
Class GetSentDateResponse.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Response\GetSentDateResponse::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Response\GetSentDateResponse::$SentDate
Type

\DateTimeInterface | null

protected static property Firstred\PostNL\Entity\Response\GetSentDateResponse::$Options
Type

string[] | null

Methods
public Firstred\PostNL\Entity\Response\GetSentDateResponse::__construct($GetSentDate=null, $Options=null)
GetSentDateResponse constructor.
Parameters
  • $GetSentDate (DateTimeInterface | string | null)

  • $Options (string[] | null)

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

public Firstred\PostNL\Entity\Response\GetSentDateResponse::setSentDate($SentDate=null)
Parameters
  • $SentDate (string | \DateTimeInterface | null)

Returns

static

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

public Firstred\PostNL\Entity\Response\GetSentDateResponse::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

UpdatedShipmentsResponse
class Firstred\PostNL\Entity\Response\UpdatedShipmentsResponse
Class CompleteStatusResponse.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Response\UpdatedShipmentsResponse::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Response\UpdatedShipmentsResponse::$Barcode
Type

string | null

protected static property Firstred\PostNL\Entity\Response\UpdatedShipmentsResponse::$CreationDate
Type

\DateTimeInterface | null

protected static property Firstred\PostNL\Entity\Response\UpdatedShipmentsResponse::$CustomerNumber
Type

string | null

protected static property Firstred\PostNL\Entity\Response\UpdatedShipmentsResponse::$CustomerCode
Type

string | null

protected static property Firstred\PostNL\Entity\Response\UpdatedShipmentsResponse::$Status
Type

\Firstred\PostNL\Entity\Status | null

Methods
public Firstred\PostNL\Entity\Response\UpdatedShipmentsResponse::__construct($Barcode=null, $CreationDate=null, $CustomerNumber=null, $CustomerCode=null, $Status=null)
UpdatedShipmentsResponse constructor.
Parameters
  • $Barcode (string | null)

  • $CreationDate (string | \DateTimeInterface | null)

  • $CustomerNumber (string | null)

  • $CustomerCode (string | null)

  • $Status (Firstred\PostNL\Entity\Status | null)

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

public Firstred\PostNL\Entity\Response\UpdatedShipmentsResponse::setCreationDate($CreationDate=null)
Parameters
  • $CreationDate (string | \DateTimeInterface | null)

Returns

static

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

GetSignatureResponseSignature
class Firstred\PostNL\Entity\Response\GetSignatureResponseSignature
Class GetSignatureResponseSignature.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Response\GetSignatureResponseSignature::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Response\GetSignatureResponseSignature::$Barcode
Type

string | null

protected static property Firstred\PostNL\Entity\Response\GetSignatureResponseSignature::$SignatureDate
Type

string | null

protected static property Firstred\PostNL\Entity\Response\GetSignatureResponseSignature::$SignatureImage
Type

string | null

Methods
public Firstred\PostNL\Entity\Response\GetSignatureResponseSignature::__construct($Barcode=null, $SignatureDate=null, $SignatureImage=null)
GetSignatureResponseSignature constructor.
Parameters
  • $Barcode (string | null)

  • $SignatureDate (string | null)

  • $SignatureImage (string | null)

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

public Firstred\PostNL\Entity\Response\GetSignatureResponseSignature::setSignatureDate($SignatureDate=null)
Parameters
  • $SignatureDate (string | \DateTimeInterface | null)

Returns

static

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

ResponseAmount
class Firstred\PostNL\Entity\Response\ResponseAmount
Class ResponseAmount.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Response\ResponseAmount::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Response\ResponseAmount::$AccountName
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseAmount::$ResponseAmountType
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseAmount::$BIC
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseAmount::$Currency
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseAmount::$IBAN
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseAmount::$Reference
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseAmount::$TransactionNumber
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseAmount::$Value
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseAmount::$VerzekerdBedrag
Type

string | null

Methods
public Firstred\PostNL\Entity\Response\ResponseAmount::__construct($AccountName=null, $ResponseAmount=null, $BIC=null, $Currency=null, $IBAN=null, $Reference=null, $TransactionNumber=null, $Value=null, $VerzekerdBedrag=null)
Parameters
  • $AccountName (string | null)

  • $ResponseAmount (string | null)

  • $BIC (string | null)

  • $Currency (string | null)

  • $IBAN (string | null)

  • $Reference (string | null)

  • $TransactionNumber (string | null)

  • $Value (string | null)

  • $VerzekerdBedrag (string | null)

GenerateLabelResponse
class Firstred\PostNL\Entity\Response\GenerateLabelResponse
Class GenerateLabelResponse.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Response\GenerateLabelResponse::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array | null

protected static property Firstred\PostNL\Entity\Response\GenerateLabelResponse::$MergedLabels
Type

\Firstred\PostNL\Entity\Response\MergedLabel[] | null

protected static property Firstred\PostNL\Entity\Response\GenerateLabelResponse::$ResponseShipments
Type

\Firstred\PostNL\Entity\Response\ResponseShipment[] | null

Methods
public Firstred\PostNL\Entity\Response\GenerateLabelResponse::__construct($MergedLabels=null, $ReponseShipments=null)
GenerateLabelResponse constructor.
Parameters
ResponseAddress
class Firstred\PostNL\Entity\Response\ResponseAddress
Class ResponseAddress.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Response\ResponseAddress::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Response\ResponseAddress::$AddressType
Type

string | null PostNL internal applications validate the receiver ResponseAddress. In case the spelling of ResponseAddresses should be different according to our PostNL information, the ResponseAddress details will be corrected. This can be noticed in Track & Trace.

Please note that the webservice will not add ResponseAddress details. Street and City fields will only be printed when they are in the call towards the labeling webservice.

The element ResponseAddress type is a code in the request. Possible values are:

Code Description 01 Receiver 02 Sender 03 Alternative sender ResponseAddress 04 Collection ResponseAddress (In the orders need to be collected first) 08 Return ResponseAddress* 09 Drop off location (for use with Pick up at PostNL location)

> * When using the ‘label in the box return label’, it is mandatory to use an > `Antwoordnummer` in AddressType 08. > This cannot be a regular ResponseAddress

The following rules apply: If there is no ResponseAddress specified with AddressType = 02, the data from Customer/ResponseAddress will be added to the list as AddressType 02. If there is no Customer/ResponseAddress, the message will be rejected.

At least one other AddressType must be specified, other than AddressType 02 In most cases this will be AddressType 01, the receiver ResponseAddress.

protected static property Firstred\PostNL\Entity\Response\ResponseAddress::$Area
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseAddress::$Buildingname
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseAddress::$City
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseAddress::$CompanyName
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseAddress::$Countrycode
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseAddress::$Department
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseAddress::$Doorcode
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseAddress::$FirstName
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseAddress::$Floor
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseAddress::$HouseNr
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseAddress::$HouseNrExt
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseAddress::$Name
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseAddress::$Region
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseAddress::$Remark
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseAddress::$Street
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseAddress::$Zipcode
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ResponseAddress::$other
Type

array | null Array with optional properties

Methods
public Firstred\PostNL\Entity\Response\ResponseAddress::__construct($AddressType=null, $FirstName=null, $Name=null, $CompanyName=null, $Street=null, $HouseNr=null, $HouseNrExt=null, $Zipcode=null, $City=null, $Countrycode=null, $Area=null, $BuildingName=null, $Department=null, $Doorcode=null, $Floor=null, $Region=null, $Remark=null)
Parameters
  • $AddressType (string | null)

  • $FirstName (string | null)

  • $Name (string | null)

  • $CompanyName (string | null)

  • $Street (string | null)

  • $HouseNr (string | null)

  • $HouseNrExt (string | null)

  • $Zipcode (string | null)

  • $City (string | null)

  • $Countrycode (string | null)

  • $Area (string | null)

  • $BuildingName (string | null)

  • $Department (string | null)

  • $Doorcode (string | null)

  • $Floor (string | null)

  • $Region (string | null)

  • $Remark (string | null)

public Firstred\PostNL\Entity\Response\ResponseAddress::setZipcode($Zipcode=null)
Set postcode.
Parameters
  • $Zipcode (string | null)

Returns

static

CurrentStatusResponseShipment
class Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment
Class CurrentStatusResponseShipment.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::$Addresses
Type

\Firstred\PostNL\Entity\StatusAddress[] | null

protected static property Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::$Amounts
Type

\Firstred\PostNL\Entity\Amount[] | null

protected static property Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::$Barcode
Type

\Firstred\PostNL\Entity\Barcode | null

protected static property Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::$DeliveryDate
Type

string | null

protected static property Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::$Dimension
Type

\Firstred\PostNL\Entity\Dimension | null Dimension

protected static property Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::$Expectation
Type

\Firstred\PostNL\Entity\Expectation | null

protected static property Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::$Groups
Type

\Firstred\PostNL\Entity\Group[] | null

protected static property Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::$MainBarcode
Type

string | null

protected static property Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::$ProductCode
Type

string | null

protected static property Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::$ProductDescription
Type

string | null

protected static property Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::$ProductOptions
Type

\Firstred\PostNL\Entity\ProductOption[] | null

protected static property Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::$Reference
Type

string | null

protected static property Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::$ShipmentAmount
Type

string | null

protected static property Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::$ShipmentCounter
Type

string | null

protected static property Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::$Status
Type

\Firstred\PostNL\Entity\Status | null

protected static property Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::$Warnings
Type

\Firstred\PostNL\Entity\Warning[] | null

Methods
public Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::__construct($Addresses=null, $Amounts=null, $Barcode=null, $DeliveryDate=null, $Dimension=null, $Expectation=null, $Groups=null, $ProductCode=null, $ProductOptions=null, $Reference=null, $Status=null, $Warnings=null, $MainBarcode=null, $ShipmentAmount=null, $ShipmentCounter=null, $ProductDescription=null)
CurrentStatusResponseShipment constructor.
Parameters
Throws

\Firstred\PostNL\Exception\InvalidArgumentException

public Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::setDeliveryDate($deliveryDate=null)
Parameters
  • $deliveryDate (string | \DateTimeInterface | null)

Returns

static

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

public static Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::jsonDeserialize($json)
Parameters
  • $json (stdClass)

Returns

mixed | \stdClass | null

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Since

1.2.0

public Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

ConfirmingResponseShipment
class Firstred\PostNL\Entity\Response\ConfirmingResponseShipment
Class ConfirmingResponseShipment.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Response\ConfirmingResponseShipment::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Response\ConfirmingResponseShipment::$Barcode
Type

string | null

protected static property Firstred\PostNL\Entity\Response\ConfirmingResponseShipment::$Warnings
Type

\Firstred\PostNL\Entity\Warning[] | null

Methods
public Firstred\PostNL\Entity\Response\ConfirmingResponseShipment::__construct($Barcode=null, $Warnings=null)
Parameters
GetDeliveryDateResponse
class Firstred\PostNL\Entity\Response\GetDeliveryDateResponse
Class GetDeliveryDateResponse.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Response\GetDeliveryDateResponse::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Response\GetDeliveryDateResponse::$DeliveryDate
Type

string | null

protected static property Firstred\PostNL\Entity\Response\GetDeliveryDateResponse::$Options
Type

string[] | null

Methods
public Firstred\PostNL\Entity\Response\GetDeliveryDateResponse::__construct($DeliveryDate=null, $Options=null)
GetDeliveryDateResponse constructor.
Parameters
  • $DeliveryDate (string | \DateTimeInterface | null)

  • $Options (string[] | null)

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

public Firstred\PostNL\Entity\Response\GetDeliveryDateResponse::setDeliveryDate($DeliveryDate=null)
Parameters
  • $DeliveryDate (DateTimeInterface | string | null)

Returns

static

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

public Firstred\PostNL\Entity\Response\GetDeliveryDateResponse::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

public static Firstred\PostNL\Entity\Response\GetDeliveryDateResponse::jsonDeserialize($json)
Parameters
  • $json (stdClass)

Returns

\Firstred\PostNL\Entity\Response\GetDeliveryDateResponse | object | \stdClass | null

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

SendShipmentResponse
class Firstred\PostNL\Entity\Response\SendShipmentResponse
Class SendShipmentResponse.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Response\SendShipmentResponse::$defaultProperties
Type

array | null

protected static property Firstred\PostNL\Entity\Response\SendShipmentResponse::$MergedLabels
Type

\Firstred\PostNL\Entity\Response\MergedLabel[] | null

protected static property Firstred\PostNL\Entity\Response\SendShipmentResponse::$ResponseShipments
Type

\Firstred\PostNL\Entity\Response\ResponseShipment[] | null

Methods
public Firstred\PostNL\Entity\Response\SendShipmentResponse::__construct($MergedLabels=null, $ReponseShipments=null)
SendShipmentResponse constructor.
Parameters
CompleteStatusResponseOldStatus
class Firstred\PostNL\Entity\Response\CompleteStatusResponseOldStatus
Class CompleteStatusResponseOldStatus.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Response\CompleteStatusResponseOldStatus::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseOldStatus::$StatusCode
Type

string | null

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseOldStatus::$StatusDescription
Type

string | null

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseOldStatus::$PhaseCode
Type

string | null

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseOldStatus::$PhaseDescription
Type

string | null

protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseOldStatus::$TimeStamp
Type

\DateTimeInterface | null

Methods
public Firstred\PostNL\Entity\Response\CompleteStatusResponseOldStatus::__construct($StatusCode=null, $StatusDescription=null, $PhaseCode=null, $PhaseDescription=null, $TimeStamp=null)
CompleteStatusResponseOldStatus constructor.
Parameters
  • $StatusCode (string | null)

  • $StatusDescription (string | null)

  • $PhaseCode (string | null)

  • $PhaseDescription (string | null)

  • $TimeStamp (DateTimeInterface | string | null)

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

public Firstred\PostNL\Entity\Response\CompleteStatusResponseOldStatus::setTimeStamp($TimeStamp=null)
Parameters
  • $TimeStamp (string | \DateTimeInterface | null)

Returns

static

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

SOAP

\Firstred\PostNL\Entity\SOAP

Classes
Header
class Firstred\PostNL\Entity\SOAP\Header
Class Header.
NOTE: this class has been introduced for deserializing
Parent

Firstred\PostNL\Entity\AbstractEntity

Summary
Body
class Firstred\PostNL\Entity\SOAP\Body
Class Body.
NOTE: this class has been introduced for deserializing
Parent

Firstred\PostNL\Entity\AbstractEntity

Summary
Properties
public property Firstred\PostNL\Entity\SOAP\Body::$defaultProperties
Type

array

protected static property Firstred\PostNL\Entity\SOAP\Body::$GenerateBarcodeResponse
Type

\Firstred\PostNL\Entity\Response\GenerateBarcodeResponse | null

UsernameToken
class Firstred\PostNL\Entity\SOAP\UsernameToken
Class UsernameToken.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\SOAP\UsernameToken::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\SOAP\UsernameToken::$Username
Type

string | null

protected static property Firstred\PostNL\Entity\SOAP\UsernameToken::$Password
Type

string | null

Methods
public Firstred\PostNL\Entity\SOAP\UsernameToken::__construct($Username=null, $Password=null)
UsernameToken constructor.
Parameters
  • $Username (string | null)

  • $Password (string | null) Plaintext password

public Firstred\PostNL\Entity\SOAP\UsernameToken::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

Security
class Firstred\PostNL\Entity\SOAP\Security
Class Security.
Parent

Firstred\PostNL\Entity\AbstractEntity

Constants
SECURITY_NAMESPACE = \'http://docs\.oasis\-open\.org/wss/2004/01/oasis\-200401\-wss\-wssecurity\-secext\-1\.0\.xsd\'
Properties
public property Firstred\PostNL\Entity\SOAP\Security::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\SOAP\Security::$UsernameToken
Type

\Firstred\PostNL\Entity\SOAP\UsernameToken

Methods
public Firstred\PostNL\Entity\SOAP\Security::__construct($UserNameToken=null)
Security constructor.
Parameters
Envelope
class Firstred\PostNL\Entity\SOAP\Envelope
Class Envelope.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\SOAP\Envelope::$defaultProperties
Default properties and namespaces for the SOAP API.
Type

array

protected static property Firstred\PostNL\Entity\SOAP\Envelope::$Header
Type

\Firstred\PostNL\Entity\SOAP\Header | null

protected static property Firstred\PostNL\Entity\SOAP\Envelope::$Body
Type

\Firstred\PostNL\Entity\SOAP\Body | null

Methods
public Firstred\PostNL\Entity\SOAP\Envelope::__construct($Header=null, $Body=null)
Envelope constructor.
Parameters
Classes
CoordinatesSouthEast
class Firstred\PostNL\Entity\CoordinatesSouthEast
Class CoordinatesSouthEast.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\CoordinatesSouthEast::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\CoordinatesSouthEast::$Latitude
Type

string | null

protected static property Firstred\PostNL\Entity\CoordinatesSouthEast::$Longitude
Type

string | null

Methods
public Firstred\PostNL\Entity\CoordinatesSouthEast::__construct($Latitude=null, $Longitude=null)
Parameters
  • $Latitude (string | null)

  • $Longitude (string | null)

OldStatus
class Firstred\PostNL\Entity\OldStatus
Class OldStatus.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\OldStatus::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\OldStatus::$CurrentPhaseCode
Type

string | null

protected static property Firstred\PostNL\Entity\OldStatus::$CurrentPhaseDescription
Type

string | null

protected static property Firstred\PostNL\Entity\OldStatus::$CurrentOldStatusCode
Type

string | null

protected static property Firstred\PostNL\Entity\OldStatus::$CurrentOldStatusDescription
Type

string | null

protected static property Firstred\PostNL\Entity\OldStatus::$CurrentOldStatusTimeStamp
Type

string | null

Methods
public Firstred\PostNL\Entity\OldStatus::__construct($PhaseCode=null, $PhaseDescription=null, $OldStatusCode=null, $OldStatusDescription=null, $TimeStamp=null)
Parameters
  • $PhaseCode (string | null)

  • $PhaseDescription (string | null)

  • $OldStatusCode (string | null)

  • $OldStatusDescription (string | null)

  • $TimeStamp (string | null)

StatusAddress
class Firstred\PostNL\Entity\StatusAddress
Class StatusAddress.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\StatusAddress::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\StatusAddress::$AddressType
Type

string | null PostNL internal applications validate the receiver address. In case the spelling of addresses should be different according to our PostNL information, the address details will be corrected. This can be noticed in Track & Trace.

Please note that the webservice will not add address details. Street and City fields will only be printed when they are in the call towards the labeling webservice.

The element Address type is a code in the request. Possible values are:

Code Description 01 Receiver 02 Sender 03 Alternative sender address 04 Collection address (In the orders need to be collected first) 08 Return address* 09 Drop off location (for use with Pick up at PostNL location)

> * When using the ‘label in the box return label’, it is mandatory to use an > `Antwoordnummer` in AddressType 08. > This cannot be a regular address

The following rules apply: If there is no Address specified with AddressType = 02, the data from Customer/Address will be added to the list as AddressType 02. If there is no Customer/Address, the message will be rejected.

At least one other AddressType must be specified, other than AddressType 02 In most cases this will be AddressType 01, the receiver address.

protected static property Firstred\PostNL\Entity\StatusAddress::$Building
Type

string | null

protected static property Firstred\PostNL\Entity\StatusAddress::$City
Type

string | null

protected static property Firstred\PostNL\Entity\StatusAddress::$CompanyName
Type

string | null

protected static property Firstred\PostNL\Entity\StatusAddress::$CountryCode
Type

string | null

protected static property Firstred\PostNL\Entity\StatusAddress::$DepartmentName
Type

string | null

protected static property Firstred\PostNL\Entity\StatusAddress::$District
Type

string | null

protected static property Firstred\PostNL\Entity\StatusAddress::$FirstName
Type

string | null

protected static property Firstred\PostNL\Entity\StatusAddress::$Floor
Type

string | null

protected static property Firstred\PostNL\Entity\StatusAddress::$HouseNumber
Type

string | null

protected static property Firstred\PostNL\Entity\StatusAddress::$HouseNumberSuffix
Type

string | null

protected static property Firstred\PostNL\Entity\StatusAddress::$LastName
Type

string | null

protected static property Firstred\PostNL\Entity\StatusAddress::$Region
Type

string | null

protected static property Firstred\PostNL\Entity\StatusAddress::$RegistrationDate
Type

string | null

protected static property Firstred\PostNL\Entity\StatusAddress::$Remark
Type

string | null

protected static property Firstred\PostNL\Entity\StatusAddress::$Street
Type

string | null

protected static property Firstred\PostNL\Entity\StatusAddress::$Zipcode
Type

string | null

protected static property Firstred\PostNL\Entity\StatusAddress::$other
Type

array | null Array with optional properties

Methods
public Firstred\PostNL\Entity\StatusAddress::__construct($AddressType=null, $FirstName=null, $LastName=null, $CompanyName=null, $DepartmentName=null, $Street=null, $HouseNumber=null, $HouseNumberSuffix=null, $Zipcode=null, $City=null, $CountryCode=null, $Region=null, $District=null, $Building=null, $Floor=null, $Remark=null, $RegistrationDate=null)
Parameters
  • $AddressType (string | null)

  • $FirstName (string | null)

  • $LastName (string | null)

  • $CompanyName (string | null)

  • $DepartmentName (string | null)

  • $Street (string | null)

  • $HouseNumber (string | null)

  • $HouseNumberSuffix (string | null)

  • $Zipcode (string | null)

  • $City (string | null)

  • $CountryCode (string | null)

  • $Region (string | null)

  • $District (string | null)

  • $Building (string | null)

  • $Floor (string | null)

  • $Remark (string | null)

  • $RegistrationDate (DateTimeInterface | string | null)

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

public Firstred\PostNL\Entity\StatusAddress::setZipcode($Zipcode=null)
Set postcode.
Parameters
  • $Zipcode (string | null)

Returns

static

public Firstred\PostNL\Entity\StatusAddress::setAddressType($AddressType=null)
Set the AddressType.
Parameters
  • $AddressType (int | string | null)

Returns

static

public Firstred\PostNL\Entity\StatusAddress::setRegistrationDate($RegistrationDate=null)
Parameters
  • $RegistrationDate (DateTimeInterface | string | null)

Returns

static

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

Warning
class Firstred\PostNL\Entity\Warning
Class Warning.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Warning::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Warning::$Code
Type

string | null

protected static property Firstred\PostNL\Entity\Warning::$Description
Type

string | null

Methods
public Firstred\PostNL\Entity\Warning::__construct($Code=null, $Description=null)
Parameters
  • $Code (string | null)

  • $Description (string | null)

public static Firstred\PostNL\Entity\Warning::jsonDeserialize($json)
Deserialize JSON.
Parameters
  • $json (stdClass) JSON object {“EntityName”: object}

Returns

static

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

ReasonNoTimeframe
class Firstred\PostNL\Entity\ReasonNoTimeframe
Class ReasonNoTimeframe.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\ReasonNoTimeframe::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\ReasonNoTimeframe::$Code
Type

string | null

protected static property Firstred\PostNL\Entity\ReasonNoTimeframe::$Date
Type

\DateTimeInterface | null

protected static property Firstred\PostNL\Entity\ReasonNoTimeframe::$Description
Type

string | null

protected static property Firstred\PostNL\Entity\ReasonNoTimeframe::$Options
Type

string[] | null

protected static property Firstred\PostNL\Entity\ReasonNoTimeframe::$From
Type

string | null

protected static property Firstred\PostNL\Entity\ReasonNoTimeframe::$To
Type

string | null

protected static property Firstred\PostNL\Entity\ReasonNoTimeframe::$Sustainability
Type

\Firstred\PostNL\Entity\Sustainability | null

Methods
public Firstred\PostNL\Entity\ReasonNoTimeframe::__construct($Code=null, $Date=null, $Description=null, $Options=null, $From=null, $To=null, $Sustainability=null)
ReasonNoTimeframe constructor.
Parameters
  • $Code (string | null)

  • $Date (string | \DateTimeInterface | null)

  • $Description (string | null)

  • $Options (string[] | null)

  • $From (string | null)

  • $To (string | null)

  • $Sustainability (Firstred\PostNL\Entity\Sustainability | null)

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

public Firstred\PostNL\Entity\ReasonNoTimeframe::setDate($date=null)
Set date
Parameters
  • $date (string | \DateTimeInterface | null)

Returns

static

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

public static Firstred\PostNL\Entity\ReasonNoTimeframe::jsonDeserialize($json)
Parameters
  • $json (stdClass)

Returns

mixed | \stdClass | null

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Since

1.2.0

public Firstred\PostNL\Entity\ReasonNoTimeframe::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

Area
class Firstred\PostNL\Entity\Area
Class Area.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Area::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Area::$CoordinatesNorthWest
Type

\Firstred\PostNL\Entity\Coordinates | null

protected static property Firstred\PostNL\Entity\Area::$CoordinatesSouthEast
Type

\Firstred\PostNL\Entity\Coordinates | null

Methods
public Firstred\PostNL\Entity\Area::__construct($CoordinatesNorthWest=null, $CoordinatesSouthEast=null)
Parameters
Contact
class Firstred\PostNL\Entity\Contact
Class Contact.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Contact::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Contact::$ContactType
Type

string | null

protected static property Firstred\PostNL\Entity\Contact::$Email
Type

string | null

protected static property Firstred\PostNL\Entity\Contact::$SMSNr
Type

string | null

protected static property Firstred\PostNL\Entity\Contact::$TelNr
Type

string | null

Methods
public Firstred\PostNL\Entity\Contact::__construct($ContactType=null, $Email=null, $SMSNr=null, $TelNr=null)
Contact constructor.
Parameters
  • $ContactType (string | null)

  • $Email (string | null)

  • $SMSNr (string | null)

  • $TelNr (string | null)

Throws

\libphonenumber\NumberParseException

public Firstred\PostNL\Entity\Contact::setTelNr($TelNr=null, $countryCode=null)
Set the telephone number.
Parameters
  • $TelNr (string | null)

  • $countryCode (string | null)

Returns

static

Throws

\libphonenumber\NumberParseException

Since

1.0.0

Since

1.0.0

public Firstred\PostNL\Entity\Contact::setSMSNr($SMSNr=null, $countryCode=null)
Set the mobile number.
Parameters
  • $SMSNr (string | null)

  • $countryCode (string | null)

Returns

static

Throws

\libphonenumber\NumberParseException

Since

1.0.0

Since

1.0.0

Event
class Firstred\PostNL\Entity\Event
Class Event.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Event::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Event::$CompleteStatusResponseEvent
Type

\Firstred\PostNL\Entity\Response\CompleteStatusResponseEvent | null

Methods
public Firstred\PostNL\Entity\Event::__construct($CompleteStatusResponseEvent=null)
Parameters
AbstractEntity
class Firstred\PostNL\Entity\AbstractEntity
Class Entity.
Implements

JsonSerializable Firstred\PostNL\Util\XmlSerializable

Properties
public property Firstred\PostNL\Entity\AbstractEntity::$defaultProperties
Type

array

protected static property Firstred\PostNL\Entity\AbstractEntity::$id
Type

string

protected static property Firstred\PostNL\Entity\AbstractEntity::$currentService
Type

string

Methods
public Firstred\PostNL\Entity\AbstractEntity::__construct()
AbstractEntity constructor.
public static Firstred\PostNL\Entity\AbstractEntity::create( $properties=\[\])
Create an instance of this class without touching the constructor.
Parameters
  • $properties (array)

Returns

static

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.0.0

Deprecated

1.4.0 Use the constructor instead with named arguments

public Firstred\PostNL\Entity\AbstractEntity::__call($name, $value)
Parameters
  • $name (string)

  • $value (mixed)

Returns

object | null

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

public Firstred\PostNL\Entity\AbstractEntity::jsonSerialize()
Return a serializable array for `json_encode`.
Returns

array

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

public Firstred\PostNL\Entity\AbstractEntity::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

public static Firstred\PostNL\Entity\AbstractEntity::jsonDeserialize($json)
Deserialize JSON.
Parameters
  • $json (stdClass) JSON object {“EntityName”: object}

Returns

static

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

public static Firstred\PostNL\Entity\AbstractEntity::xmlDeserialize($xml)
Deserialize XML.
Parameters
  • $xml (array) Associative array representation of XML response, using Clark notation for namespaces

Returns

\Firstred\PostNL\Entity\AbstractEntity

public static Firstred\PostNL\Entity\AbstractEntity::shouldBeAnArray($fqcn, $propertyName)
Whether the given property should bbe an array
Parameters
  • $fqcn (string)

  • $propertyName (string)

Returns

false | string If found, singular name of property

Since

1.2.0

Deprecated

1.4.1

public static Firstred\PostNL\Entity\AbstractEntity::getFullyQualifiedEntityClassName($shortName)
Get the fully qualified class name for the given entity name.
Parameters
  • $shortName (string)

Returns

string The FQCN

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

Deprecated

1.4.1

Label
class Firstred\PostNL\Entity\Label
Class Label.
Parent

Firstred\PostNL\Entity\AbstractEntity

Constants
FORMAT_A4 = 1
FORMAT_A6 = 2
Properties
public property Firstred\PostNL\Entity\Label::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Label::$Content
Type

string | null Base 64 encoded content

protected static property Firstred\PostNL\Entity\Label::$OutputType
Type

string | null

protected static property Firstred\PostNL\Entity\Label::$Labeltype
Type

string | null

Methods
public Firstred\PostNL\Entity\Label::__construct($Content=null, $ContentType=null, $Labeltype=null)
Parameters
  • $Content (string | null)

  • $ContentType (string | null)

  • $Labeltype (string | null)

public Firstred\PostNL\Entity\Label::getContenttype()
Returns

string | null

Deprecated

1.4.2 Use `getOutputType` instead

public Firstred\PostNL\Entity\Label::setContenttype($Contenttype)
Parameters
  • $Contenttype (string | null)

Returns

static

Deprecated

1.4.2 Use `getOutputType` instead

Expectation
class Firstred\PostNL\Entity\Expectation
Class Expectation.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Expectation::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Expectation::$ETAFrom
Type

\DateTimeInterface | null

protected static property Firstred\PostNL\Entity\Expectation::$ETATo
Type

\DateTimeInterface | null

Methods
public Firstred\PostNL\Entity\Expectation::__construct($ETAFrom=null, $ETATo=null)
Parameters
  • $ETAFrom (DateTimeInterface | string | null)

  • $ETATo (DateTimeInterface | string | null)

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

public Firstred\PostNL\Entity\Expectation::setETAFrom($ETAFrom=null)
Parameters
  • $ETAFrom (DateTimeInterface | string | null)

Returns

static

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

public Firstred\PostNL\Entity\Expectation::setETATo($ETATo=null)
Parameters
  • $ETATo (DateTimeInterface | string | null)

Returns

static

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

Timeframes
class Firstred\PostNL\Entity\Timeframes
Class Timeframes.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Timeframes::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Timeframes::$Timeframes
Type

\Firstred\PostNL\Entity\Timeframe[] | null

protected static property Firstred\PostNL\Entity\Timeframes::$TimeframeTimeFrames
Type

\Firstred\PostNL\Entity\TimeframeTimeFrame[] | null

Methods
public Firstred\PostNL\Entity\Timeframes::__construct($timeframes=null, $timeframetimeframes=null)
Timeframes constructor.
Parameters
public Firstred\PostNL\Entity\Timeframes::jsonSerialize()
Return a serializable array for `json_encode`.
Returns

array

Group
class Firstred\PostNL\Entity\Group
Class Group.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Group::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Group::$GroupCount
Amount of shipments in the group.
Type

string | null

protected static property Firstred\PostNL\Entity\Group::$GroupSequence
Sequence number.
Type

string | null

protected static property Firstred\PostNL\Entity\Group::$GroupType
The type of group.
Possible values:

- `01`: Collection request
- `03`: Multiple parcels in one shipment (multi-colli)
- `04`: Single parcel in one shipment
Type

string | null

protected static property Firstred\PostNL\Entity\Group::$MainBarcode
Main barcode for the shipment.
Type

string | null

Methods
public Firstred\PostNL\Entity\Group::__construct($GroupCount=null, $GroupSequence=null, $GroupType=null, $MainBarcode=null)
Group Constructor.
Parameters
  • $GroupCount (string | null)

  • $GroupSequence (string | null)

  • $GroupType (string | null)

  • $MainBarcode (string | null)

Address
class Firstred\PostNL\Entity\Address
Class Address.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Address::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Address::$AddressType
Type

string | null PostNL internal applications validate the receiver address. In case the spelling of addresses should be different according to our PostNL information, the address details will be corrected. This can be noticed in Track & Trace.

Please note that the webservice will not add address details. Street and City fields will only be printed when they are in the call towards the labeling webservice.

The element Address type is a code in the request. Possible values are:

Code Description 01 Receiver 02 Sender 03 Alternative sender address 04 Collection address (In the orders need to be collected first) 08 Return address* 09 Drop off location (for use with Pick up at PostNL location)

> * When using the ‘label in the box return label’, it is mandatory to use an > `Antwoordnummer` in AddressType 08. > This cannot be a regular address

The following rules apply: If there is no Address specified with AddressType = 02, the data from Customer/Address will be added to the list as AddressType 02. If there is no Customer/Address, the message will be rejected.

At least one other AddressType must be specified, other than AddressType 02 In most cases this will be AddressType 01, the receiver address.

protected static property Firstred\PostNL\Entity\Address::$Area
Type

string | null

protected static property Firstred\PostNL\Entity\Address::$Buildingname
Type

string | null

protected static property Firstred\PostNL\Entity\Address::$City
Type

string | null

protected static property Firstred\PostNL\Entity\Address::$CompanyName
Type

string | null

protected static property Firstred\PostNL\Entity\Address::$Countrycode
Type

string | null

protected static property Firstred\PostNL\Entity\Address::$Department
Type

string | null

protected static property Firstred\PostNL\Entity\Address::$Doorcode
Type

string | null

protected static property Firstred\PostNL\Entity\Address::$FirstName
Type

string | null

protected static property Firstred\PostNL\Entity\Address::$Floor
Type

string | null

protected static property Firstred\PostNL\Entity\Address::$HouseNr
Type

string | null

protected static property Firstred\PostNL\Entity\Address::$HouseNrExt
Type

string | null

protected static property Firstred\PostNL\Entity\Address::$StreetHouseNrExt
Type

string | null

protected static property Firstred\PostNL\Entity\Address::$Name
Type

string | null

protected static property Firstred\PostNL\Entity\Address::$Region
Type

string | null

protected static property Firstred\PostNL\Entity\Address::$Remark
Type

string | null

protected static property Firstred\PostNL\Entity\Address::$Street
Type

string | null

protected static property Firstred\PostNL\Entity\Address::$Zipcode
Type

string | null

protected static property Firstred\PostNL\Entity\Address::$other
Type

array | null Array with optional properties

Methods
public Firstred\PostNL\Entity\Address::__construct($AddressType=null, $FirstName=null, $Name=null, $CompanyName=null, $Street=null, $HouseNr=null, $HouseNrExt=null, $Zipcode=null, $City=null, $Countrycode=null, $Area=null, $BuildingName=null, $Department=null, $Doorcode=null, $Floor=null, $Region=null, $Remark=null, $StreetHouseNrExt=null)
Parameters
  • $AddressType (string | null)

  • $FirstName (string | null)

  • $Name (string | null)

  • $CompanyName (string | null)

  • $Street (string | null)

  • $HouseNr (string | null)

  • $HouseNrExt (string | null)

  • $Zipcode (string | null)

  • $City (string | null)

  • $Countrycode (string | null)

  • $Area (string | null)

  • $BuildingName (string | null)

  • $Department (string | null)

  • $Doorcode (string | null)

  • $Floor (string | null)

  • $Region (string | null)

  • $Remark (string | null)

  • $StreetHouseNrExt (string | null)

public Firstred\PostNL\Entity\Address::setZipcode($Zipcode=null)
Set postcode.
Parameters
  • $Zipcode (string | null)

Returns

static

public Firstred\PostNL\Entity\Address::setAddressType($AddressType=null)
Set the AddressType.
Parameters
  • $AddressType (int | string | null)

Returns

static

Customer
class Firstred\PostNL\Entity\Customer
Class Customer.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Customer::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Customer::$Address
Type

\Firstred\PostNL\Entity\Address | null

protected static property Firstred\PostNL\Entity\Customer::$CollectionLocation
Type

string | null

protected static property Firstred\PostNL\Entity\Customer::$ContactPerson
Type

string | null

protected static property Firstred\PostNL\Entity\Customer::$CustomerCode
Type

string | null

protected static property Firstred\PostNL\Entity\Customer::$CustomerNumber
Type

string | null

protected static property Firstred\PostNL\Entity\Customer::$GlobalPackCustomerCode
Type

string | null

protected static property Firstred\PostNL\Entity\Customer::$GlobalPackBarcodeType
Type

string | null

protected static property Firstred\PostNL\Entity\Customer::$Email
Type

string | null

protected static property Firstred\PostNL\Entity\Customer::$Name
Type

string | null

Methods
public Firstred\PostNL\Entity\Customer::__construct($CustomerNumber=null, $CustomerCode=null, $CollectionLocation=null, $ContactPerson=null, $Email=null, $Name=null, $Address=null, $GlobalPackCustomerCode=null, $GlobalPackBarcodeType=null)
Parameters
  • $CustomerNumber (string | null)

  • $CustomerCode (string | null)

  • $CollectionLocation (string | null)

  • $ContactPerson (string | null)

  • $Email (string | null)

  • $Name (string | null)

  • $Address (Firstred\PostNL\Entity\Address | null)

  • $GlobalPackCustomerCode (string | null)

  • $GlobalPackBarcodeType (string | null)

Coordinates
class Firstred\PostNL\Entity\Coordinates
Class Coordinates.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Coordinates::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Coordinates::$Latitude
Type

string | null

protected static property Firstred\PostNL\Entity\Coordinates::$Longitude
Type

string | null

Methods
public Firstred\PostNL\Entity\Coordinates::__construct($Latitude=null, $Longitude=null)
Parameters
  • $Latitude (string)

  • $Longitude (string)

Signature
class Firstred\PostNL\Entity\Signature
Class Signature.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Signature::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Signature::$GetSignatureResponseSignature
Type

\Firstred\PostNL\Entity\Response\GetSignatureResponseSignature | null

protected static property Firstred\PostNL\Entity\Signature::$Warnings
Type

\Firstred\PostNL\Entity\Warning[] | null

Methods
public Firstred\PostNL\Entity\Signature::__construct($GetSignatureResponseSignature=null, $Warnings=null)
Amount
class Firstred\PostNL\Entity\Amount
Class Amount.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Amount::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Amount::$AccountName
Type

string | null

protected static property Firstred\PostNL\Entity\Amount::$AmountType
Type

string | null

protected static property Firstred\PostNL\Entity\Amount::$BIC
Type

string | null

protected static property Firstred\PostNL\Entity\Amount::$Currency
Type

string | null

protected static property Firstred\PostNL\Entity\Amount::$IBAN
Type

string | null

protected static property Firstred\PostNL\Entity\Amount::$Reference
Type

string | null

protected static property Firstred\PostNL\Entity\Amount::$TransactionNumber
Type

string | null

protected static property Firstred\PostNL\Entity\Amount::$Value
Type

string | null

protected static property Firstred\PostNL\Entity\Amount::$VerzekerdBedrag
Type

string | null

Methods
public Firstred\PostNL\Entity\Amount::__construct($AccountName=null, $AmountType=null, $BIC=null, $Currency=null, $IBAN=null, $Reference=null, $TransactionNumber=null, $Value=null, $VerzekerdBedrag=null)
Parameters
  • $AccountName (string | null)

  • $AmountType (string | null)

  • $BIC (string | null)

  • $Currency (string | null)

  • $IBAN (string | null)

  • $Reference (string | null)

  • $TransactionNumber (string | null)

  • $Value (string | null)

public Firstred\PostNL\Entity\Amount::setAmountType($AmountType=null)
Set amount type.
Parameters
  • $AmountType (string | int | null)

Returns

static

public Firstred\PostNL\Entity\Amount::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

Throws

\InvalidArgumentException

Dimension
class Firstred\PostNL\Entity\Dimension
Class Dimension.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Dimension::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Dimension::$Height
Type

string | null

protected static property Firstred\PostNL\Entity\Dimension::$Length
Type

string | null

protected static property Firstred\PostNL\Entity\Dimension::$Volume
Type

string | null

protected static property Firstred\PostNL\Entity\Dimension::$Weight
Type

string | null

protected static property Firstred\PostNL\Entity\Dimension::$Width
Type

string | null

Methods
public Firstred\PostNL\Entity\Dimension::__construct($Weight=null, $Height=null, $Length=null, $Volume=null, $Width=null)
Parameters
  • $Weight (string | null)

  • $Height (string | null)

  • $Length (string | null)

  • $Volume (string | null)

  • $Width (string | null)

Barcode
class Firstred\PostNL\Entity\Barcode
Class Barcode.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Barcode::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Barcode::$Type
Type

string | null

protected static property Firstred\PostNL\Entity\Barcode::$Range
Type

string | null

protected static property Firstred\PostNL\Entity\Barcode::$Serie
Type

string | null

Methods
public Firstred\PostNL\Entity\Barcode::__construct($Type=null, $Range=null, $Serie=\'000000000\-999999999\')
Parameters
  • $Type (string | null)

  • $Range (string | null)

  • $Serie (string | null)

Location
class Firstred\PostNL\Entity\Location
Class Location.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Location::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Location::$AllowSundaySorting
Type

string | null

protected static property Firstred\PostNL\Entity\Location::$DeliveryDate
Type

string | null

protected static property Firstred\PostNL\Entity\Location::$DeliveryOptions
Type

string[] | null

protected static property Firstred\PostNL\Entity\Location::$OpeningTime
Type

string | null

protected static property Firstred\PostNL\Entity\Location::$Options
Type

string[] | null

protected static property Firstred\PostNL\Entity\Location::$City
Type

string | null

protected static property Firstred\PostNL\Entity\Location::$HouseNr
Type

string | null

protected static property Firstred\PostNL\Entity\Location::$HouseNrExt
Type

string | null

protected static property Firstred\PostNL\Entity\Location::$Postalcode
Type

string | null

protected static property Firstred\PostNL\Entity\Location::$Street
Type

string | null

protected static property Firstred\PostNL\Entity\Location::$Coordinates
Type

\Firstred\PostNL\Entity\Coordinates | null

protected static property Firstred\PostNL\Entity\Location::$CoordinatesNorthWest
Type

\Firstred\PostNL\Entity\CoordinatesNorthWest | null

protected static property Firstred\PostNL\Entity\Location::$CoordinatesSouthEast
Type

\Firstred\PostNL\Entity\CoordinatesSouthEast | null

protected static property Firstred\PostNL\Entity\Location::$LocationCode
Type

string | null

protected static property Firstred\PostNL\Entity\Location::$Saleschannel
Type

string | null

protected static property Firstred\PostNL\Entity\Location::$TerminalType
Type

string | null

protected static property Firstred\PostNL\Entity\Location::$RetailNetworkID
Type

string | null

protected static property Firstred\PostNL\Entity\Location::$DownPartnerID
Type

string | null

protected static property Firstred\PostNL\Entity\Location::$DownPartnerLocation
Type

string | null

Methods
public Firstred\PostNL\Entity\Location::__construct($Postalcode=null, $AllowSundaySorting=null, $DeliveryDate=null, $DeliveryOptions=null, $Options=null, $Coordinates=null, $CoordinatesNorthWest=null, $CoordinatesSouthEast=null, $City=null, $Street=null, $HouseNr=null, $HouseNrExt=null, $LocationCode=null, $Saleschannel=null, $TerminalType=null, $RetailNetworkID=null, $DownPartnerID=null, $DownPartnerLocation=null)
Parameters
  • $Postalcode (string | null)

  • $AllowSundaySorting (string | null)

  • $DeliveryDate (string | \DateTimeInterface | null)

  • $DeliveryOptions (array | null)

  • $Options (array | null)

  • $Coordinates (Firstred\PostNL\Entity\Coordinates | null)

  • $CoordinatesNorthWest (Firstred\PostNL\Entity\CoordinatesNorthWest | null)

  • $CoordinatesSouthEast (Firstred\PostNL\Entity\CoordinatesSouthEast | null)

  • $City (string | null)

  • $Street (string | null)

  • $HouseNr (string | null)

  • $HouseNrExt (string | null)

  • $LocationCode (string | null)

  • $Saleschannel (string | null)

  • $TerminalType (string | null)

  • $RetailNetworkID (string | null)

  • $DownPartnerID (string | null)

  • $DownPartnerLocation (string | null)

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

public Firstred\PostNL\Entity\Location::setDeliveryDate($DeliveryDate=null)
Parameters
  • $DeliveryDate (string | \DateTimeInterface | null)

Returns

static

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

public Firstred\PostNL\Entity\Location::setPostalcode($Postalcode=null)
Set the postcode.
Parameters
  • $Postalcode (string | null)

Returns

\Firstred\PostNL\Entity\Location

public Firstred\PostNL\Entity\Location::setAllowSundaySorting($AllowSundaySorting=null)
Parameters
  • $AllowSundaySorting (string | bool | int | null)

Returns

\Firstred\PostNL\Entity\Location

Since

1.0.0

Since

1.0.0

public Firstred\PostNL\Entity\Location::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

ProductOption
class Firstred\PostNL\Entity\ProductOption
Class ProductOption.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\ProductOption::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\ProductOption::$Characteristic
Type

string | null

protected static property Firstred\PostNL\Entity\ProductOption::$Option
Type

string | null

protected static property Firstred\PostNL\Entity\ProductOption::$Description
Type

string | null

Methods
public Firstred\PostNL\Entity\ProductOption::__construct($Characteristic=null, $Option=null, $Description=null)
Parameters
  • $Characteristic (string | null)

  • $Option (string | null)

  • $Description (string | null)

public static Firstred\PostNL\Entity\ProductOption::jsonDeserialize($json)
Parameters
  • $json (stdClass)

Returns

mixed | \stdClass | null

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Since

1.2.0

Shipment
class Firstred\PostNL\Entity\Shipment
Class Shipment.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Shipment::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Shipment::$Addresses
Type

\Firstred\PostNL\Entity\Address[] | null

protected static property Firstred\PostNL\Entity\Shipment::$Amounts
Type

\Firstred\PostNL\Entity\Amount[] | null

protected static property Firstred\PostNL\Entity\Shipment::$Barcode
Type

string | null

protected static property Firstred\PostNL\Entity\Shipment::$CollectionTimeStampEnd
Type

\DateTimeInterface | null

protected static property Firstred\PostNL\Entity\Shipment::$CollectionTimeStampStart
Type

\DateTimeInterface | null

protected static property Firstred\PostNL\Entity\Shipment::$Contacts
Type

\Firstred\PostNL\Entity\Contact[] | null

protected static property Firstred\PostNL\Entity\Shipment::$Content
Type

string | null

protected static property Firstred\PostNL\Entity\Shipment::$CostCenter
Type

string | null

protected static property Firstred\PostNL\Entity\Shipment::$CustomerOrderNumber
Type

string | null

protected static property Firstred\PostNL\Entity\Shipment::$Customer
Type

\Firstred\PostNL\Entity\Customer | null

protected static property Firstred\PostNL\Entity\Shipment::$Customs
Type

\Firstred\PostNL\Entity\Customs | null

protected static property Firstred\PostNL\Entity\Shipment::$StatusCode
Type

string |null$StatusCode

protected static property Firstred\PostNL\Entity\Shipment::$PhaseCode
Type

int | null

protected static property Firstred\PostNL\Entity\Shipment::$DateFrom
Type

\DateTimeInterface | null

protected static property Firstred\PostNL\Entity\Shipment::$DateTo
Type

\DateTimeInterface | null

protected static property Firstred\PostNL\Entity\Shipment::$DeliveryAddress
Type

string | null

protected static property Firstred\PostNL\Entity\Shipment::$DeliveryTimeStampStart
Type

\DateTimeInterface | null

protected static property Firstred\PostNL\Entity\Shipment::$DeliveryTimeStampEnd
Type

\DateTimeInterface | null

protected static property Firstred\PostNL\Entity\Shipment::$DeliveryDate
Type

\DateTimeInterface | null

protected static property Firstred\PostNL\Entity\Shipment::$Dimension
Type

\Firstred\PostNL\Entity\Dimension | null

protected static property Firstred\PostNL\Entity\Shipment::$DownPartnerBarcode
Type

string | null

protected static property Firstred\PostNL\Entity\Shipment::$DownPartnerID
Type

string | null

protected static property Firstred\PostNL\Entity\Shipment::$DownPartnerLocation
Type

string | null

protected static property Firstred\PostNL\Entity\Shipment::$Events
Type

\Firstred\PostNL\Entity\Event[] | null

protected static property Firstred\PostNL\Entity\Shipment::$Groups
Type

\Firstred\PostNL\Entity\Group[] | null

protected static property Firstred\PostNL\Entity\Shipment::$IDExpiration
Type

string | null

protected static property Firstred\PostNL\Entity\Shipment::$IDNumber
Type

string | null

protected static property Firstred\PostNL\Entity\Shipment::$IDType
Type

string | null

protected static property Firstred\PostNL\Entity\Shipment::$OldStatuses
Type

string | null

protected static property Firstred\PostNL\Entity\Shipment::$ProductCodeCollect
Type

string | null

protected static property Firstred\PostNL\Entity\Shipment::$ProductCodeDelivery
Type

string | null

protected static property Firstred\PostNL\Entity\Shipment::$ProductOptions
Type

\Firstred\PostNL\Entity\ProductOption[] | null

protected static property Firstred\PostNL\Entity\Shipment::$ReceiverDateOfBirth
Type

string | null

protected static property Firstred\PostNL\Entity\Shipment::$Reference
Type

string | null

protected static property Firstred\PostNL\Entity\Shipment::$ReferenceCollect
Type

string | null

protected static property Firstred\PostNL\Entity\Shipment::$Remark
Type

string | null

protected static property Firstred\PostNL\Entity\Shipment::$ReturnBarcode
Type

string | null

protected static property Firstred\PostNL\Entity\Shipment::$ReturnReference
Type

string | null

Methods
public Firstred\PostNL\Entity\Shipment::__construct($Addresses=null, $Amounts=null, $Barcode=null, $Contacts=null, $Content=null, $CollectionTimeStampEnd=null, $CollectionTimeStampStart=null, $CostCenter=null, $Customer=null, $CustomerOrderNumber=null, $Customs=null, $DeliveryAddress=null, $DeliveryDate=null, $Dimension=null, $DownPartnerBarcode=null, $DownPartnerID=null, $DownPartnerLocation=null, $Events=null, $Groups=null, $IDExpiration=null, $IDNumber=null, $IDType=null, $OldStatuses=null, $ProductCodeCollect=null, $ProductCodeDelivery=null, $ProductOptions=null, $ReceiverDateOfBirth=null, $Reference=null, $ReferenceCollect=null, $Remark=null, $ReturnBarcode=null, $ReturnReference=null, $StatusCode=null, $PhaseCode=null, $DateFrom=null, $DateTo=null, $DeliveryTimeStampStart=null, $DeliveryTimeStampEnd=null)
Shipment constructor.
Parameters
  • $Addresses (Firstred\PostNL\Entity\Address[] | null)

  • $Amounts (array | null)

  • $Barcode (string | null)

  • $Contacts (Firstred\PostNL\Entity\Contact[] | null)

  • $Content (string | null)

  • $CollectionTimeStampEnd (string | \DateTimeInterface | null)

  • $CollectionTimeStampStart (string | \DateTimeInterface | null)

  • $CostCenter (string | null)

  • $Customer (Firstred\PostNL\Entity\Customer | null)

  • $CustomerOrderNumber (string | null)

  • $Customs (Firstred\PostNL\Entity\Customs | null)

  • $DeliveryAddress (string | null)

  • $DeliveryDate (string | \DateTimeInterface | null)

  • $Dimension (Firstred\PostNL\Entity\Dimension | null)

  • $DownPartnerBarcode (string | null)

  • $DownPartnerID (string | null)

  • $DownPartnerLocation (string | null)

  • $Events (Firstred\PostNL\Entity\Event[] | null)

  • $Groups (Firstred\PostNL\Entity\Group[] | null)

  • $IDExpiration (string | null)

  • $IDNumber (string | null)

  • $IDType (string | null)

  • $OldStatuses (array | null)

  • $ProductCodeCollect (string | null)

  • $ProductCodeDelivery (string | null)

  • $ProductOptions (Firstred\PostNL\Entity\ProductOption[] | null)

  • $ReceiverDateOfBirth (string | null)

  • $Reference (string | null)

  • $ReferenceCollect (string | null)

  • $Remark (string | null)

  • $ReturnBarcode (string | null)

  • $ReturnReference (string | null)

  • $StatusCode (string | null)

  • $PhaseCode (int | null)

  • $DateFrom (string | null)

  • $DateTo (string | null)

  • $DeliveryTimeStampStart (string | \DateTimeInterface | null)

  • $DeliveryTimeStampEnd (string | \DateTimeInterface | null)

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

public Firstred\PostNL\Entity\Shipment::setCollectionTimeStampStart($CollectionTimeStampStart=null)
Parameters
  • $CollectionTimeStampStart (string | \DateTimeInterface | null)

Returns

static

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

public Firstred\PostNL\Entity\Shipment::setCollectionTimeStampEnd($CollectionTimeStampEnd=null)
Parameters
  • $CollectionTimeStampEnd (string | \DateTimeInterface | null)

Returns

static

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

public Firstred\PostNL\Entity\Shipment::setDeliveryTimeStampStart($DeliveryTimeStampStart=null)
Parameters
  • $DeliveryTimeStampStart (string | \DateTimeInterface | null)

Returns

static

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

public Firstred\PostNL\Entity\Shipment::setDeliveryTimeStampEnd($DeliveryTimeStampEnd=null)
Parameters
  • $DeliveryTimeStampEnd (string | \DateTimeInterface | null)

Returns

static

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

public Firstred\PostNL\Entity\Shipment::setDeliveryDate($DeliveryDate=null)
Parameters
  • $DeliveryDate (string | \DateTimeInterface | null)

Returns

static

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

public Firstred\PostNL\Entity\Shipment::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

Status
class Firstred\PostNL\Entity\Status
Class Status.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Status::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Status::$PhaseCode
Type

string | null

protected static property Firstred\PostNL\Entity\Status::$PhaseDescription
Type

string | null

protected static property Firstred\PostNL\Entity\Status::$StatusCode
Type

string | null

protected static property Firstred\PostNL\Entity\Status::$StatusDescription
Type

string | null

protected static property Firstred\PostNL\Entity\Status::$TimeStamp
Type

\DateTimeInterface | null

Methods
public Firstred\PostNL\Entity\Status::__construct($PhaseCode=null, $PhaseDescription=null, $StatusCode=null, $StatusDescription=null, $TimeStamp=null)
Status constructor.
Parameters
  • $PhaseCode (string | null)

  • $PhaseDescription (string | null)

  • $StatusCode (string | null)

  • $StatusDescription (string | null)

  • $TimeStamp (string | \DateTimeInterface | null)

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

public Firstred\PostNL\Entity\Status::setTimeStamp($TimeStamp=null)
Parameters
  • $TimeStamp (string | \DateTimeInterface | null)

Returns

static

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

public Firstred\PostNL\Entity\Status::getCurrentStatusPhaseCode()
Backward compatible with SOAP API
Returns

string | null

Since

1.2.0

Deprecated

1.4.1 SOAP support is going to be removed

public Firstred\PostNL\Entity\Status::getCurrentStatusPhaseDescription()
Backward compatible with SOAP API
Returns

string | null

Since

1.2.0

Deprecated

1.4.1 SOAP support is going to be removed

public Firstred\PostNL\Entity\Status::getCurrentStatusStatusCode()
Backward compatible with SOAP API
Returns

string | null

Since

1.2.0

Deprecated

1.4.1 SOAP support is going to be removed

public Firstred\PostNL\Entity\Status::getCurrentStatusStatusDescription()
Backward compatible with SOAP API
Returns

string | null

Since

1.2.0

Deprecated

1.4.1 SOAP support is going to be removed

public Firstred\PostNL\Entity\Status::getCurrentStatusTimeStamp()
Backward compatible with SOAP API
Returns

string | null

Since

1.2.0

Deprecated

1.4.1 SOAP support is going to be removed

public Firstred\PostNL\Entity\Status::getCompleteStatusPhaseCode()
Backward compatible with SOAP API
Returns

string | null

Since

1.2.0

Deprecated

1.4.1 SOAP support is going to be removed

public Firstred\PostNL\Entity\Status::getCompleteStatusPhaseDescription()
Backward compatible with SOAP API
Returns

string | null

Since

1.2.0

Deprecated

1.4.1 SOAP support is going to be removed

public Firstred\PostNL\Entity\Status::getCompleteStatusStatusCode()
Backward compatible with SOAP API
Returns

string | null

Since

1.2.0

Deprecated

1.4.1 SOAP support is going to be removed

public Firstred\PostNL\Entity\Status::getCompleteStatusStatusDescription()
Backward compatible with SOAP API
Returns

string | null

Since

1.2.0

Deprecated

1.4.1 SOAP support is going to be removed

public Firstred\PostNL\Entity\Status::getCompleteStatusTimeStamp()
Backward compatible with SOAP API
Returns

string | null

Since

1.2.0

Deprecated

1.4.1 SOAP support is going to be removed

Sustainability
class Firstred\PostNL\Entity\Sustainability
Class Sustainability.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Sustainability::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Sustainability::$Code
Type

string | null

protected static property Firstred\PostNL\Entity\Sustainability::$Description
Type

string | null

Methods
public Firstred\PostNL\Entity\Sustainability::__construct($Code=null, $Description=null)
Parameters
  • $Code (string | null)

  • $Description (string | null)

Timeframe
class Firstred\PostNL\Entity\Timeframe
Class Timeframe.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Timeframe::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Timeframe::$City
Type

string | null

protected static property Firstred\PostNL\Entity\Timeframe::$CountryCode
Type

string | null

protected static property Firstred\PostNL\Entity\Timeframe::$Date
Type

\DateTimeInterface | null

protected static property Firstred\PostNL\Entity\Timeframe::$EndDate
Type

\DateTimeInterface | null

protected static property Firstred\PostNL\Entity\Timeframe::$HouseNr
Type

string | null

protected static property Firstred\PostNL\Entity\Timeframe::$HouseNrExt
Type

string | null

protected static property Firstred\PostNL\Entity\Timeframe::$Options
Type

string[] | null

protected static property Firstred\PostNL\Entity\Timeframe::$PostalCode
Type

string | null

protected static property Firstred\PostNL\Entity\Timeframe::$StartDate
Type

string | null

protected static property Firstred\PostNL\Entity\Timeframe::$Street
Type

string | null

protected static property Firstred\PostNL\Entity\Timeframe::$SundaySorting
Type

bool | null

protected static property Firstred\PostNL\Entity\Timeframe::$Interval
Type

string | null

protected static property Firstred\PostNL\Entity\Timeframe::$TimeframeRange
Type

string | null

protected static property Firstred\PostNL\Entity\Timeframe::$Timeframes
Type

\Firstred\PostNL\Entity\TimeframeTimeFrame[] | \Firstred\PostNL\Entity\Timeframe[] | null

Methods
public Firstred\PostNL\Entity\Timeframe::__construct( $City=null, $CountryCode=null, $Date=null, $EndDate=null, $HouseNr=null, $HouseNrExt=null, $Options=\[\], $PostalCode=null, $Street=null, $SundaySorting=\'false\', $Interval=null, $Range=null, $Timeframes=null, $StartDate=null)
Timeframe constructor.
Parameters
  • $City (string | null)

  • $CountryCode (string | null)

  • $Date (string | \DateTimeInterface | null)

  • $EndDate (string | \DateTimeInterface | null)

  • $HouseNr (string | null)

  • $HouseNrExt (string | null)

  • $Options (array | null)

  • $PostalCode (string | null)

  • $Street (string | null)

  • $SundaySorting (string | null)

  • $Interval (string | null)

  • $Range (string | null)

  • $Timeframes (Firstred\PostNL\Entity\Timeframe[] | null)

  • $StartDate (string | \DateTimeInterface | null)

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

public Firstred\PostNL\Entity\Timeframe::setDate($Date=null)
Parameters
  • $Date (null)

Returns

static

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

public Firstred\PostNL\Entity\Timeframe::setStartDate($StartDate=null)
Parameters
  • $StartDate (string | \DateTimeInterface | null)

Returns

static

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

public Firstred\PostNL\Entity\Timeframe::setEndDate($EndDate=null)
Parameters
  • $EndDate (string | \DateTimeInterface | null)

Returns

static

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

public Firstred\PostNL\Entity\Timeframe::setPostalCode($PostalCode=null)
Set the postcode.
Parameters
  • $PostalCode (string | null)

Returns

static

public Firstred\PostNL\Entity\Timeframe::setSundaySorting($SundaySorting=null)
Parameters
  • $SundaySorting (string | bool | int | null)

Returns

\Firstred\PostNL\Entity\Timeframe

Since

1.0.0

Since

1.0.0

public Firstred\PostNL\Entity\Timeframe::jsonSerialize()
Return a serializable array for `json_encode`.
Returns

array

public Firstred\PostNL\Entity\Timeframe::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Customs
class Firstred\PostNL\Entity\Customs
Class Customs.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Customs::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Customs::$Certificate
Type

string | null

protected static property Firstred\PostNL\Entity\Customs::$CertificateNr
Type

string | null

protected static property Firstred\PostNL\Entity\Customs::$Content
Type

\Firstred\PostNL\Entity\Content[] | null

protected static property Firstred\PostNL\Entity\Customs::$Currency
Type

string | null

protected static property Firstred\PostNL\Entity\Customs::$HandleAsNonDeliverable
Type

string | null

protected static property Firstred\PostNL\Entity\Customs::$Invoice
Type

string | null

protected static property Firstred\PostNL\Entity\Customs::$InvoiceNr
Type

string | null

protected static property Firstred\PostNL\Entity\Customs::$License
Type

string | null

protected static property Firstred\PostNL\Entity\Customs::$LicenseNr
Type

string | null

protected static property Firstred\PostNL\Entity\Customs::$ShipmentType
Type

string | null

protected static property Firstred\PostNL\Entity\Customs::$TrustedShipperID
Type

string | null

protected static property Firstred\PostNL\Entity\Customs::$TransactionCode
Type

string | null

protected static property Firstred\PostNL\Entity\Customs::$TransactionDescription
Type

string | null

protected static property Firstred\PostNL\Entity\Customs::$ImporterReferenceCode
Type

string | null

Methods
public Firstred\PostNL\Entity\Customs::__construct($Certificate=null, $CertificateNr=null, $Content=null, $Currency=null, $HandleAsNonDeliverable=null, $Invoice=null, $InvoiceNr=null, $License=null, $LicenseNr=null, $ShipmentType=null, $TrustedShipperID=null, $TransactionCode=null, $TransactionDescription=null, $ImporterReferenceCode=null)
Parameters
  • $Certificate (string | null)

  • $CertificateNr (string | null)

  • $Content (Firstred\PostNL\Entity\Content[] | null)

  • $Currency (string | null)

  • $HandleAsNonDeliverable (string | null)

  • $Invoice (string | null)

  • $InvoiceNr (string | null)

  • $License (string | null)

  • $LicenseNr (string | null)

  • $ShipmentType (string | null)

  • $TrustedShipperID (string | null)

  • $TransactionCode (string | null)

  • $TransactionDescription (string | null)

  • $ImporterReferenceCode (string | null)

TimeframeTimeFrame
class Firstred\PostNL\Entity\TimeframeTimeFrame
Class TimeframeTimeFrame.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\TimeframeTimeFrame::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\TimeframeTimeFrame::$Date
Type

string | null

protected static property Firstred\PostNL\Entity\TimeframeTimeFrame::$From
Type

string | null

protected static property Firstred\PostNL\Entity\TimeframeTimeFrame::$Options
Type

string[] | null

protected static property Firstred\PostNL\Entity\TimeframeTimeFrame::$To
Type

string | null

protected static property Firstred\PostNL\Entity\TimeframeTimeFrame::$Sustainability
Type

\Firstred\PostNL\Entity\Sustainability | null

Methods
public Firstred\PostNL\Entity\TimeframeTimeFrame::__construct($GetSentDate=null, $From=null, $To=null, $Options=null, $Sustainability=null)
Parameters
Throws

\Firstred\PostNL\Exception\InvalidArgumentException

public Firstred\PostNL\Entity\TimeframeTimeFrame::setDate($Date=null)
Parameters
  • $Date (string | \DateTimeInterface | null)

Returns

static

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

public static Firstred\PostNL\Entity\TimeframeTimeFrame::jsonDeserialize($json)
Parameters
  • $json (stdClass)

Returns

mixed | \stdClass | null

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Since

1.2.0

CoordinatesNorthWest
class Firstred\PostNL\Entity\CoordinatesNorthWest
Class CoordinatesNorthWest.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\CoordinatesNorthWest::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\CoordinatesNorthWest::$Latitude
Type

string | null

protected static property Firstred\PostNL\Entity\CoordinatesNorthWest::$Longitude
Type

string | null

Methods
public Firstred\PostNL\Entity\CoordinatesNorthWest::__construct($Latitude=null, $Longitude=null)
Parameters
  • $Latitude (string)

  • $Longitude (string)

CutOffTime
class Firstred\PostNL\Entity\CutOffTime
Class CutOffTime.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\CutOffTime::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\CutOffTime::$Day
Type

string | null

protected static property Firstred\PostNL\Entity\CutOffTime::$Time
Type

string | null

protected static property Firstred\PostNL\Entity\CutOffTime::$Available
Type

bool | null

Methods
public Firstred\PostNL\Entity\CutOffTime::__construct($Day=null, $Time=null, $Available=null)
Parameters
  • $Day (string)

  • $Time (string)

  • $Available (bool)

public Firstred\PostNL\Entity\CutOffTime::xmlSerialize($writer)
Return a serializable array for the XMLWriter.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

Content
class Firstred\PostNL\Entity\Content
Class Content.
Parent

Firstred\PostNL\Entity\AbstractEntity

Properties
public property Firstred\PostNL\Entity\Content::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\Content::$CountryOfOrigin
Type

string | null

protected static property Firstred\PostNL\Entity\Content::$Description
Type

string | null

protected static property Firstred\PostNL\Entity\Content::$HSTariffNr
Type

string | null

protected static property Firstred\PostNL\Entity\Content::$Quantity
Type

string | null

protected static property Firstred\PostNL\Entity\Content::$Value
Type

string | null

protected static property Firstred\PostNL\Entity\Content::$Weight
Type

string | null

protected static property Firstred\PostNL\Entity\Content::$Content
Type

\Firstred\PostNL\Entity\Content[] | null

Methods
public Firstred\PostNL\Entity\Content::__construct($CountryOfOrigin=null, $Description=null, $HSTariffNr=null, $Quantity=null, $Value=null, $Weight=null, $Content=null)
Parameters
  • $CountryOfOrigin (string | null)

  • $Description (string | null)

  • $HSTariffNr (string | null)

  • $Quantity (string | null)

  • $Value (string | null)

  • $Weight (string | null)

  • $Content (Firstred\PostNL\Entity\Content[] | null)

OpeningHours
class Firstred\PostNL\Entity\OpeningHours
Class OpeningHours.
Parent

Firstred\PostNL\Entity\AbstractEntity

Implements

ArrayAccess Iterator

Properties
private static property Firstred\PostNL\Entity\OpeningHours::$currentDay
public property Firstred\PostNL\Entity\OpeningHours::$defaultProperties
Type

string[][]

protected static property Firstred\PostNL\Entity\OpeningHours::$Monday
Type

string | array | null

protected static property Firstred\PostNL\Entity\OpeningHours::$Tuesday
Type

string | array | null

protected static property Firstred\PostNL\Entity\OpeningHours::$Wednesday
Type

string | array | null

protected static property Firstred\PostNL\Entity\OpeningHours::$Thursday
Type

string | array | null

protected static property Firstred\PostNL\Entity\OpeningHours::$Friday
Type

string | array | null

protected static property Firstred\PostNL\Entity\OpeningHours::$Saturday
Type

string | array | null

protected static property Firstred\PostNL\Entity\OpeningHours::$Sunday
Type

string | array | null

Methods
public Firstred\PostNL\Entity\OpeningHours::__construct($Monday=null, $Tuesday=null, $Wednesday=null, $Thursday=null, $Friday=null, $Saturday=null, $Sunday=null)
OpeningHours constructor.
Parameters
  • $Monday (string | array | null)

  • $Tuesday (string | array | null)

  • $Wednesday (string | array | null)

  • $Thursday (string | array | null)

  • $Friday (string | array | null)

  • $Saturday (string | array | null)

  • $Sunday (string | array | null)

public static Firstred\PostNL\Entity\OpeningHours::jsonDeserialize($json)
Deserialize opening hours
Parameters
  • $json (stdClass)

Returns

\Firstred\PostNL\Entity\OpeningHours

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.0.0

public Firstred\PostNL\Entity\OpeningHours::toArray()
Returns

array

public Firstred\PostNL\Entity\OpeningHours::offsetExists($offset)
Parameters
  • $offset (mixed)

Returns

bool

Since

1.2.0

public Firstred\PostNL\Entity\OpeningHours::offsetGet($offset)
Parameters
  • $offset (mixed)

Returns

mixed

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

public Firstred\PostNL\Entity\OpeningHours::offsetSet($offset, $value)
Parameters
  • $offset (mixed)

  • $value (mixed)

Since

1.2.0

public Firstred\PostNL\Entity\OpeningHours::offsetUnset($offset)
Parameters
  • $offset (mixed)

Since

1.2.0

public Firstred\PostNL\Entity\OpeningHours::current()
Returns

mixed

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

public Firstred\PostNL\Entity\OpeningHours::next()
Since

1.2.0

public Firstred\PostNL\Entity\OpeningHours::key()
Returns

string

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

public Firstred\PostNL\Entity\OpeningHours::valid()
Returns

bool

Since

1.2.0

public Firstred\PostNL\Entity\OpeningHours::rewind()
Since

1.2.0

private static Firstred\PostNL\Entity\OpeningHours::findCurrentDayString($currentDay)
Parameters
  • $currentDay (mixed)

Returns

string

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

Exception

\Firstred\PostNL\Exception

Namespaces
Promise

\Firstred\PostNL\Exception\Promise

Classes
RejectionException
class Firstred\PostNL\Exception\Promise\RejectionException
A special exception that is thrown when waiting on a rejected promise.
The reason value is available via the getReason() method.
Parent

RuntimeException

Properties
private static property Firstred\PostNL\Exception\Promise\RejectionException::$reason
Type

mixed Rejection reason.

Methods
public Firstred\PostNL\Exception\Promise\RejectionException::__construct($reason, $description=null)
Parameters
  • $reason (mixed) rejection reason

  • $description (string) Optional description

public Firstred\PostNL\Exception\Promise\RejectionException::getReason()
Returns the rejection reason.
Returns

mixed

CancellationException
class Firstred\PostNL\Exception\Promise\CancellationException
Exception that is set as the reason for a promise that has been cancelled.
Parent

Firstred\PostNL\Exception\Promise\RejectionException

Summary
AggregateException
class Firstred\PostNL\Exception\Promise\AggregateException
Exception thrown when too many errors occur in the some() or any() methods.
Parent

Firstred\PostNL\Exception\Promise\RejectionException

Methods
public Firstred\PostNL\Exception\Promise\AggregateException::__construct($msg, $reasons)
AggregateException constructor.
Parameters
  • $msg (mixed)

  • $reasons (array)

Classes
ApiConnectionException
class Firstred\PostNL\Exception\ApiConnectionException
Class ApiConnectionException.
Thrown when there is a problem connecting to the CIF API.
Parent

Firstred\PostNL\Exception\ApiException

Properties
protected static property Firstred\PostNL\Exception\ApiConnectionException::$body
Type

string

protected static property Firstred\PostNL\Exception\ApiConnectionException::$jsonBody
Type

object

protected static property Firstred\PostNL\Exception\ApiConnectionException::$headers
Type

array

Methods
public Firstred\PostNL\Exception\ApiConnectionException::__construct($message=\'\', $code=0, $body=null, $jsonBody=null, $headers=null)
ApiConnectionException constructor.
Parameters
  • $message (string)

  • $code (int)

  • $body (string | null)

  • $jsonBody (object | null)

  • $headers (array | null)

public Firstred\PostNL\Exception\ApiConnectionException::getBody()
Returns

string

public Firstred\PostNL\Exception\ApiConnectionException::getJsonBody()
Returns

object

public Firstred\PostNL\Exception\ApiConnectionException::getHeaders()
Returns

array

NotSupportedException
class Firstred\PostNL\Exception\NotSupportedException
Class NotSupportedException
Thrown when a feature is not supported (anymore).
Parent

Firstred\PostNL\Exception\InvalidArgumentException

Summary
ApiException
class Firstred\PostNL\Exception\ApiException
Class ApiException.
Group of API exceptions.
Parent

Firstred\PostNL\Exception\PostNLException

Summary
InvalidMessageTimeStampException
class Firstred\PostNL\Exception\InvalidMessageTimeStampException
Class InvalidMessageTimestampException.
Thrown when the timestamp of a `Message` entity is invalid.
Parent

Firstred\PostNL\Exception\InvalidArgumentException

Summary
InvalidApiModeException
class Firstred\PostNL\Exception\InvalidApiModeException
Class InvalidApiModeException.
Thrown when an invalid API mode has been selected.
Parent

Firstred\PostNL\Exception\InvalidArgumentException

Summary
InvalidMethodException
class Firstred\PostNL\Exception\InvalidMethodException
Class InvalidMethodException.
Thrown when an invalid method is called.
Parent

Firstred\PostNL\Exception\HttpClientException

Summary
ResponseException
class Firstred\PostNL\Exception\ResponseException
Class ResponseException.
Thrown when there was a problem with the response returned by the CIF API.
Parent

Firstred\PostNL\Exception\ApiException

Properties
private static property Firstred\PostNL\Exception\ResponseException::$response
Type

\Psr\Http\Message\ResponseInterface

Methods
public Firstred\PostNL\Exception\ResponseException::__construct($message=\'\', $code=0, $previous=null, $response=null)
ResponseException constructor.
Parameters
  • $message (string)

  • $code (int)

  • $previous (Exception | null)

  • $response (Psr\Http\Message\ResponseInterface | null)

public Firstred\PostNL\Exception\ResponseException::setResponse($response)
Parameters
  • $response (Psr\Http\Message\ResponseInterface)

public Firstred\PostNL\Exception\ResponseException::getResponse()
Returns

\Psr\Http\Message\ResponseInterface

InvalidBarcodeException
class Firstred\PostNL\Exception\InvalidBarcodeException
Class InvalidBarcodeException.
Thrown when an invalid barcode has been passed.
Parent

Firstred\PostNL\Exception\InvalidArgumentException

Summary
CifException
class Firstred\PostNL\Exception\CifException
Class CifException.
Thrown when the CIF API has a fatal error.
Parent

Firstred\PostNL\Exception\ApiException

Properties
protected static property Firstred\PostNL\Exception\CifException::$messages
Type

array

Methods
public Firstred\PostNL\Exception\CifException::__construct($message=\'\', $code=0, $previous=null)
CifException constructor.
Parameters
  • $message (string | string[]) In case of multiple errors, the format looks like:

[ ‘description’ => string <The description>, ‘message’ => string <The error message>, ‘code’ => int <The error code> ] The code param will be discarded if $message is an array * $code (int) * $previous (Throwable | null)

public Firstred\PostNL\Exception\CifException::getMessagesDescriptionsAndCodes()
Get error messages and codes.
Returns

array | string | string[]

CifDownException
class Firstred\PostNL\Exception\CifDownException
Class CifDownException.
Thrown when the CIF API is down.
Parent

Firstred\PostNL\Exception\ApiException

Summary
PostNLException
class Firstred\PostNL\Exception\PostNLException
Class AbstractException
Group of exceptions that can be thrown by this library.
Parent

Exception

Summary
InvalidArgumentException
class Firstred\PostNL\Exception\InvalidArgumentException
Class InvalidArgumentException.
Group of exceptions that are the result of an invalid passed argument.
Parent

Firstred\PostNL\Exception\PostNLException

Summary
HttpClientException
class Firstred\PostNL\Exception\HttpClientException
Class HttpClientException.
Thrown when the HTTP Client has an error.
Parent

Firstred\PostNL\Exception\PostNLException

Properties
private static property Firstred\PostNL\Exception\HttpClientException::$response
Type

\Psr\Http\Message\ResponseInterface

Methods
public Firstred\PostNL\Exception\HttpClientException::__construct($message=\'\', $code=0, $previous=null, $response=null)
ResponseException constructor.
Parameters
  • $message (string)

  • $code (int)

  • $previous (Exception | null)

  • $response (Psr\Http\Message\ResponseInterface | null)

public Firstred\PostNL\Exception\HttpClientException::setResponse($response)
Parameters
  • $response (Psr\Http\Message\ResponseInterface)

public Firstred\PostNL\Exception\HttpClientException::getResponse()
Returns

\Psr\Http\Message\ResponseInterface

InvalidConfigurationException
class Firstred\PostNL\Exception\InvalidConfigurationException
Class InvalidConfigurationException.
Thrown when there is a configuration error.
Parent

Firstred\PostNL\Exception\InvalidArgumentException

Summary
NotImplementedException
class Firstred\PostNL\Exception\NotImplementedException
Class NotImplementedException.
Thrown when a feature is not implemented (yet).
Parent

Firstred\PostNL\Exception\InvalidArgumentException

Summary
ShipmentNotFoundException
class Firstred\PostNL\Exception\ShipmentNotFoundException
Class InvalidArgumentException.
Thrown when a `Shipment` object could not be found.
Parent

Firstred\PostNL\Exception\NotFoundException

Summary
NotFoundException
class Firstred\PostNL\Exception\NotFoundException
Class NotFoundException.
Thrown when (a) requested object(s) could not be found.
Parent

Firstred\PostNL\Exception\ApiException

Summary
Factory

\Firstred\PostNL\Factory

Interfaces
StreamFactoryInterface
interface Firstred\PostNL\Factory\StreamFactoryInterface
Factory for PSR-7 Stream.
Methods
public Firstred\PostNL\Factory\StreamFactoryInterface::createStream($content=\'\')
Create a new stream from a string.
The stream SHOULD be created with a temporary resource.
Parameters
  • $content (string) String content with which to populate the stream.

Returns

\Psr\Http\Message\StreamInterface

public Firstred\PostNL\Factory\StreamFactoryInterface::createStreamFromFile($filename, $mode=\'r\')
Create a stream from an existing file.
The file MUST be opened using the given mode, which may be any mode
supported by the `fopen` function.

The `$filename` MAY be any string supported by `fopen()`.
Parameters
  • $filename (string) Filename or stream URI to use as basis of stream.

  • $mode (string) Mode with which to open the underlying filename/stream.

Returns

\Psr\Http\Message\StreamInterface

Throws

\RuntimeException If the file cannot be opened.

Throws

\InvalidArgumentException If the mode is invalid.

Throws

\RuntimeException If the file cannot be opened.

Throws

\InvalidArgumentException If the mode is invalid.

public Firstred\PostNL\Factory\StreamFactoryInterface::createStreamFromResource($resource)
Create a new stream from an existing resource.
The stream MUST be readable and may be writable.
Parameters
  • $resource (resource) PHP resource to use as basis of stream.

Returns

\Psr\Http\Message\StreamInterface

ResponseFactoryInterface
interface Firstred\PostNL\Factory\ResponseFactoryInterface
Factory for PSR-7 Response.
This factory contract can be reused in Message and Server Message factories.

FOR BACKWARD COMPATIBLE REASONS - NOT COMPATIBLE WITH SYMFONY HTTP CLIENT
Methods
public Firstred\PostNL\Factory\ResponseFactoryInterface::createResponse($code=200, $reasonPhrase=\'\')
Creates a new PSR-7 response.
Parameters
  • $code (int)

  • $reasonPhrase (string | null)

Returns

\Psr\Http\Message\ResponseInterface

RequestFactoryInterface
interface Firstred\PostNL\Factory\RequestFactoryInterface
Factory for PSR-7 Request.
Methods
public Firstred\PostNL\Factory\RequestFactoryInterface::createRequest($method, $uri)
Creates a new PSR-7 request.
Parameters
  • $method (string)

  • $uri (string | \Psr\Http\Message\UriInterface)

Returns

\Psr\Http\Message\RequestInterface

Classes
GuzzleResponseFactory
class Firstred\PostNL\Factory\GuzzleResponseFactory
Class GuzzleResponseFactory
Implements

Firstred\PostNL\Factory\ResponseFactoryInterface

Methods
public Firstred\PostNL\Factory\GuzzleResponseFactory::createResponse($code=200, $reasonPhrase=\'\')
Creates a new PSR-7 response.
Parameters
  • $code (int)

  • $reasonPhrase (string | null)

Returns

\Psr\Http\Message\ResponseInterface

GuzzleRequestFactory
class Firstred\PostNL\Factory\GuzzleRequestFactory
Class GuzzleRequestFactory
Implements

Firstred\PostNL\Factory\RequestFactoryInterface

Methods
public Firstred\PostNL\Factory\GuzzleRequestFactory::createRequest($method, $uri)
Creates a new PSR-7 request.
Parameters
  • $method (string)

  • $uri (string | \Psr\Http\Message\UriInterface)

Returns

\Psr\Http\Message\RequestInterface

GuzzleStreamFactory
class Firstred\PostNL\Factory\GuzzleStreamFactory
Class GuzzleStreamFactory
Implements

Firstred\PostNL\Factory\StreamFactoryInterface

Methods
public Firstred\PostNL\Factory\GuzzleStreamFactory::createStream($content=\'\')
Creat a new stream from a string.
Parameters
  • $content (string)

Returns

\Psr\Http\Message\StreamInterface

public Firstred\PostNL\Factory\GuzzleStreamFactory::createStreamFromFile($file, $mode=\'r\')
Create a new PSR-7 stream from file.
Parameters
  • $file (string)

  • $mode (string)

Returns

\Psr\Http\Message\StreamInterface

public Firstred\PostNL\Factory\GuzzleStreamFactory::createStreamFromResource($resource)
Create a new PSR-7 stream from resource.
Parameters
  • $resource (resource)

Returns

\Psr\Http\Message\StreamInterface

HttpClient

\Firstred\PostNL\HttpClient

Interfaces
ClientInterface
interface Firstred\PostNL\HttpClient\ClientInterface
Interface ClientInterface.
Methods
public Firstred\PostNL\HttpClient\ClientInterface::getLogger()
Get the logger.
Returns

\Psr\Log\LoggerInterface

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

public static Firstred\PostNL\HttpClient\ClientInterface::getInstance()
Get the HTTP Client instance.
Returns

static

public Firstred\PostNL\HttpClient\ClientInterface::addOrUpdateRequest($id, $request)
Adds a request to the list of pending requests
Using the ID you can replace a request.
Parameters
  • $id (string) Request ID

  • $request (Psr\Http\Message\RequestInterface) PSR-7 request

Returns

int | string

public Firstred\PostNL\HttpClient\ClientInterface::setVerify($verify)
Set the verify setting.
Parameters
  • $verify (bool | string)

Returns

static

Deprecated

public Firstred\PostNL\HttpClient\ClientInterface::getVerify()
Return verify setting.
Returns

bool | string

Deprecated

public Firstred\PostNL\HttpClient\ClientInterface::removeRequest($id)
Remove a request from the list of pending requests.
Parameters
  • $id (string)

public Firstred\PostNL\HttpClient\ClientInterface::clearRequests()
Clear all requests.
public Firstred\PostNL\HttpClient\ClientInterface::doRequest($request)
Do a single request.
Exceptions are captured into the result array
Parameters
  • $request (Psr\Http\Message\RequestInterface)

Returns

\Psr\Http\Message\ResponseInterface

Throws

\Firstred\PostNL\Exception\HttpClientException

public Firstred\PostNL\HttpClient\ClientInterface::doRequests( $requests=\[\])
Do all async requests.
Exceptions are captured into the result array
Parameters
  • $requests (Psr\Http\Message\RequestInterface[])

Returns

\Psr\Http\Message\ResponseInterface | \Psr\Http\Message\ResponseInterface[] | \Firstred\PostNL\Exception\HttpClientException | \Firstred\PostNL\Exception\HttpClientException[]

Classes
BaseHttpClient
class Firstred\PostNL\HttpClient\BaseHttpClient
Constants
DEFAULT_TIMEOUT = 80
DEFAULT_CONNECT_TIMEOUT = 30
Properties
protected static property Firstred\PostNL\HttpClient\BaseHttpClient::$timeout
Type

int

protected static property Firstred\PostNL\HttpClient\BaseHttpClient::$connectTimeout
Type

int

protected static property Firstred\PostNL\HttpClient\BaseHttpClient::$verify
Verify the server SSL certificate.
Type

bool | string

protected static property Firstred\PostNL\HttpClient\BaseHttpClient::$pendingRequests
Type

array

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

\Psr\Log\LoggerInterface

protected static property Firstred\PostNL\HttpClient\BaseHttpClient::$maxRetries
Type

int

protected static property Firstred\PostNL\HttpClient\BaseHttpClient::$concurrency
Type

int

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

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

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

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

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

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

Methods
public Firstred\PostNL\HttpClient\BaseHttpClient::getTimeout()
Get timeout.
Returns

int

public Firstred\PostNL\HttpClient\BaseHttpClient::setTimeout($seconds)
Set timeout.
Parameters
  • $seconds (int)

Returns

static

public Firstred\PostNL\HttpClient\BaseHttpClient::getConnectTimeout()
Get connection timeout.
Returns

int

public Firstred\PostNL\HttpClient\BaseHttpClient::setConnectTimeout($seconds)
Set connection timeout.
Parameters
  • $seconds (int)

Returns

static

public Firstred\PostNL\HttpClient\BaseHttpClient::getVerify()
Return verify setting.
Returns

bool | string

Deprecated

public Firstred\PostNL\HttpClient\BaseHttpClient::setVerify($verify)
Set the verify setting.
Parameters
  • $verify (bool | string)

Returns

static

Deprecated

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

\Psr\Log\LoggerInterface

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

Returns

static

public Firstred\PostNL\HttpClient\BaseHttpClient::getMaxRetries()
Return max retries.
Returns

int

public Firstred\PostNL\HttpClient\BaseHttpClient::setMaxRetries($maxRetries)
Set the amount of retries.
Parameters
  • $maxRetries (int)

Returns

static

public Firstred\PostNL\HttpClient\BaseHttpClient::setConcurrency($concurrency)
Set the concurrency.
Parameters
  • $concurrency (int)

Returns

static

public Firstred\PostNL\HttpClient\BaseHttpClient::getConcurrency()
Return concurrency.
Returns

int

public Firstred\PostNL\HttpClient\BaseHttpClient::addOrUpdateRequest($id, $request)
Adds a request to the list of pending requests
Using the ID you can replace a request.
Parameters
  • $id (string) Request ID

  • $request (Psr\Http\Message\RequestInterface) PSR-7 request

Returns

int | string

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

public Firstred\PostNL\HttpClient\BaseHttpClient::removeRequest($id)
Remove a request from the list of pending requests.
Parameters
  • $id (string)

public Firstred\PostNL\HttpClient\BaseHttpClient::clearRequests()
Clear all pending requests.
public Firstred\PostNL\HttpClient\BaseHttpClient::doRequests( $requests=\[\])
Do all async requests.
Exceptions are captured into the result array
Parameters
  • $requests (Psr\Http\Message\RequestInterface[])

Returns

\Firstred\PostNL\Exception\HttpClientException[] | \Psr\Http\Message\ResponseInterface[]

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

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

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

Throws

\Firstred\PostNL\Exception\NotSupportedException

Since

1.3.0

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

static

Since

1.3.0

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

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

Throws

\Firstred\PostNL\Exception\NotSupportedException

Since

1.3.0

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

static

Since

1.3.0

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

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

Throws

\Firstred\PostNL\Exception\NotSupportedException

Since

1.3.0

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

static

Since

1.3.0

HTTPlugClient
class Firstred\PostNL\HttpClient\HTTPlugClient
Class HTTPlugClient.
Parent

Firstred\PostNL\HttpClient\BaseHttpClient

Implements

Firstred\PostNL\HttpClient\ClientInterface Psr\Log\LoggerAwareInterface

Properties
protected property Firstred\PostNL\HttpClient\HTTPlugClient::$instance
Type

static

protected static property Firstred\PostNL\HttpClient\HTTPlugClient::$client
Type

\Http\Client\HttpAsyncClient | \Http\Client\HttpClient

Methods
public Firstred\PostNL\HttpClient\HTTPlugClient::__construct($client=null, $logger=null, $concurrency=5, $maxRetries=5)
HTTPlugClient constructor.
Parameters
  • $client (Http\Client\HttpAsyncClient | \Http\Client\HttpClient | null)

  • $logger (Psr\Log\LoggerInterface | null)

  • $concurrency (int)

Throws

\Firstred\PostNL\Exception\HttpClientException

Since

1.0.0

Since

1.0.0

public Firstred\PostNL\HttpClient\HTTPlugClient::doRequests( $requests=\[\])
Do all async requests.
Exceptions are captured into the result array
Parameters
  • $requests (Psr\Http\Message\RequestInterface[])

Returns

\Firstred\PostNL\Exception\HttpClientException[] | \Psr\Http\Message\ResponseInterface[]

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

public Firstred\PostNL\HttpClient\HTTPlugClient::doRequest($request)
Do a single request.
Exceptions are captured into the result array
Parameters
  • $request (Psr\Http\Message\RequestInterface)

Returns

\Psr\Http\Message\ResponseInterface

Throws

\Firstred\PostNL\Exception\HttpClientException

public Firstred\PostNL\HttpClient\HTTPlugClient::getClient()
Returns

\Http\Client\HttpAsyncClient | \Http\Client\HttpClient

public Firstred\PostNL\HttpClient\HTTPlugClient::setClient($client)
Parameters
  • $client (Http\Client\HttpAsyncClient | \Http\Client\HttpClient)

Returns

static

public static Firstred\PostNL\HttpClient\HTTPlugClient::getInstance($client=null)
Parameters
  • $client (Http\Client\HttpAsyncClient | \Http\Client\HttpClient | null)

Returns

\Firstred\PostNL\HttpClient\HTTPlugClient

Throws

\Firstred\PostNL\Exception\HttpClientException

Deprecated

Please instantiate a new client rather than using this singleton

public Firstred\PostNL\HttpClient\HTTPlugClient::setVerify($verify)
Parameters
  • $verify (bool | string)

Returns

\Firstred\PostNL\HttpClient\HTTPlugClient

Deprecated

public Firstred\PostNL\HttpClient\HTTPlugClient::getVerify()
Returns

bool | string | void

Deprecated

CurlClient
class Firstred\PostNL\HttpClient\CurlClient
Class CurlClient.
Parent

Firstred\PostNL\HttpClient\BaseHttpClient

Implements

Firstred\PostNL\HttpClient\ClientInterface Psr\Log\LoggerAwareInterface

Properties
private property Firstred\PostNL\HttpClient\CurlClient::$instance
Type

static

protected static property Firstred\PostNL\HttpClient\CurlClient::$defaultOptions
Type

array | callable | null

Methods
public static Firstred\PostNL\HttpClient\CurlClient::getInstance()
CurlClient Singleton.
Returns

\Firstred\PostNL\HttpClient\CurlClient

Deprecated

Please instantiate a new client rather than using this singleton

public Firstred\PostNL\HttpClient\CurlClient::doRequest($request)
Do a single request.
Exceptions are captured into the result array
Parameters
  • $request (Psr\Http\Message\RequestInterface)

Returns

\Psr\Http\Message\ResponseInterface

Throws

\Firstred\PostNL\Exception\HttpClientException

public Firstred\PostNL\HttpClient\CurlClient::doRequests( $requests=\[\])
Do all async requests.
Exceptions are captured into the result array
Parameters
  • $requests (Psr\Http\Message\RequestInterface[])

Returns

\Psr\Http\Message\ResponseInterface[] | \Firstred\PostNL\Exception\HttpClientException[]

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

protected Firstred\PostNL\HttpClient\CurlClient::prepareRequest($curl, $request)
Parameters
  • $curl (resource)

  • $request (Psr\Http\Message\RequestInterface)

Throws

\Firstred\PostNL\Exception\HttpClientException

private Firstred\PostNL\HttpClient\CurlClient::handleCurlError($url, $errno, $message)
Parameters
  • $url

  • $errno (Firstred\PostNL\HttpClient\number)

  • $message (string)

Throws

\Firstred\PostNL\Exception\ApiConnectionException

SymfonyHttpClient
class Firstred\PostNL\HttpClient\SymfonyHttpClient
Class SymfonyHttpClientInterface.
Parent

Firstred\PostNL\HttpClient\BaseHttpClient

Implements

Firstred\PostNL\HttpClient\ClientInterface Psr\Log\LoggerAwareInterface

Constants
DEFAULT_TIMEOUT = 60
DEFAULT_CONNECT_TIMEOUT = 20
Properties
protected property Firstred\PostNL\HttpClient\SymfonyHttpClient::$instance
Type

static

protected static property Firstred\PostNL\HttpClient\SymfonyHttpClient::$defaultOptions
Type

array

private static property Firstred\PostNL\HttpClient\SymfonyHttpClient::$client
Type

\Symfony\Contracts\HttpClient\HttpClientInterface

Methods
public Firstred\PostNL\HttpClient\SymfonyHttpClient::__construct($client=null, $logger=null, $concurrency=5, $maxRetries=5)
SymfonyHttpClient constructor.
Parameters
  • $client (Symfony\Contracts\HttpClient\HttpClientInterface | null)

  • $logger (Psr\Log\LoggerInterface | null)

  • $concurrency (int)

  • $maxRetries (int)

Since

1.3.0 Custom constructor

private Firstred\PostNL\HttpClient\SymfonyHttpClient::getClient()
Get the Symfony HTTP Client.
Returns

\Symfony\Contracts\HttpClient\HttpClientInterface

public static Firstred\PostNL\HttpClient\SymfonyHttpClient::getInstance()
Returns

static

Deprecated

Please instantiate a new client rather than using this singleton

public Firstred\PostNL\HttpClient\SymfonyHttpClient::setOption($name, $value)
Set Symfony HTTP Client option.
Parameters
  • $name (string)

  • $value (mixed)

Returns

static

public Firstred\PostNL\HttpClient\SymfonyHttpClient::getOption($name)
Get Symfony HTTP Client option.
Parameters
  • $name (string)

Returns

mixed | null

public Firstred\PostNL\HttpClient\SymfonyHttpClient::doRequest($request)
Do a single request.
Exceptions are captured into the result array
Parameters
  • $request (Psr\Http\Message\RequestInterface)

Returns

\Psr\Http\Message\ResponseInterface

Throws

\Firstred\PostNL\Exception\HttpClientException

public Firstred\PostNL\HttpClient\SymfonyHttpClient::doRequests( $requests=\[\])
Do all async requests.
Exceptions are captured into the result array
Parameters
  • $requests (Psr\Http\Message\RequestInterface[])

Returns

\Firstred\PostNL\Exception\HttpClientException[] | \Psr\Http\Message\ResponseInterface[]

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

public Firstred\PostNL\HttpClient\SymfonyHttpClient::setMaxRetries($maxRetries)
Set the amount of retries.
Parameters
  • $maxRetries (int)

Returns

static

public Firstred\PostNL\HttpClient\SymfonyHttpClient::setConcurrency($concurrency)
Set the concurrency.
Parameters
  • $concurrency (int)

Returns

static

private Firstred\PostNL\HttpClient\SymfonyHttpClient::convertPsrRequestToSymfonyHttpClientRequestParams($psrRequest)
Parameters
  • $psrRequest (Psr\Http\Message\RequestInterface)

Returns

array

Since

1.3.0

private Firstred\PostNL\HttpClient\SymfonyHttpClient::convertSymfonyHttpClientResponseToPsrResponse($symfonyHttpClientResponse)
Parameters
  • $symfonyHttpClientResponse (Symfony\Contracts\HttpClient\ResponseInterface)

Returns

\Psr\Http\Message\ResponseInterface

Throws

\Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface

Throws

\Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface

Throws

\Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface

Throws

\Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface

Throws

\Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface

Throws

\Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface

Throws

\Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface

Throws

\Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface

Throws

\Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface

Throws

\Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface

Throws

\Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface

Throws

\Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface

Throws

\Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface

Throws

\Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface

Throws

\Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface

Since

1.3.0

MockClient
class Firstred\PostNL\HttpClient\MockClient
Class MockClient.
Parent

Firstred\PostNL\HttpClient\BaseHttpClient

Implements

Firstred\PostNL\HttpClient\ClientInterface Psr\Log\LoggerAwareInterface

Constants
DEFAULT_TIMEOUT = 60
DEFAULT_CONNECT_TIMEOUT = 20
Properties
protected property Firstred\PostNL\HttpClient\MockClient::$instance
Type

static

protected static property Firstred\PostNL\HttpClient\MockClient::$defaultOptions
Type

array

private static property Firstred\PostNL\HttpClient\MockClient::$handler
Type

\GuzzleHttp\HandlerStack

Methods
public static Firstred\PostNL\HttpClient\MockClient::getInstance()
Returns

\Firstred\PostNL\HttpClient\MockClient | static

Deprecated

Please instantiate a new client rather than using this singleton

public Firstred\PostNL\HttpClient\MockClient::setOption($name, $value)
Set Guzzle option.
Parameters
  • $name (string)

  • $value (mixed)

Returns

\Firstred\PostNL\HttpClient\MockClient

public Firstred\PostNL\HttpClient\MockClient::getOption($name)
Get Guzzle option.
Parameters
  • $name (string)

Returns

mixed | null

public Firstred\PostNL\HttpClient\MockClient::setHandler($handler)
Returns

\Firstred\PostNL\HttpClient\MockClient

public Firstred\PostNL\HttpClient\MockClient::getHandler()
Returns

\GuzzleHttp\HandlerStack

public Firstred\PostNL\HttpClient\MockClient::doRequest($request)
Do a single request.
Exceptions are captured into the result array
Parameters
  • $request (Psr\Http\Message\RequestInterface)

Returns

\Psr\Http\Message\ResponseInterface

Throws

\Firstred\PostNL\Exception\HttpClientException

public Firstred\PostNL\HttpClient\MockClient::doRequests( $requests=\[\])
Do all async requests.
Exceptions are captured into the result array
Parameters
  • $requests (Psr\Http\Message\RequestInterface[])

Returns

\Psr\Http\Message\ResponseInterface[] | \Firstred\PostNL\Exception\HttpClientException[]

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

GuzzleClient
class Firstred\PostNL\HttpClient\GuzzleClient
Class GuzzleClient.
Parent

Firstred\PostNL\HttpClient\BaseHttpClient

Implements

Firstred\PostNL\HttpClient\ClientInterface Psr\Log\LoggerAwareInterface

Constants
DEFAULT_TIMEOUT = 60
DEFAULT_CONNECT_TIMEOUT = 20
Properties
protected property Firstred\PostNL\HttpClient\GuzzleClient::$instance
Type

static

protected static property Firstred\PostNL\HttpClient\GuzzleClient::$defaultOptions
Type

array

private static property Firstred\PostNL\HttpClient\GuzzleClient::$client
Type

\GuzzleHttp\Client

Methods
public Firstred\PostNL\HttpClient\GuzzleClient::__construct($client=null, $logger=null, $concurrency=5, $maxRetries=5)
GuzzleClient constructor.
Parameters
  • $client (GuzzleHttp\Client | null)

  • $logger (Psr\Log\LoggerInterface | null)

  • $concurrency (int)

  • $maxRetries (int)

Since

1.3.0 Custom constructor

private Firstred\PostNL\HttpClient\GuzzleClient::setClient($client)
private Firstred\PostNL\HttpClient\GuzzleClient::getClient()
Get the Guzzle client.
Returns

\GuzzleHttp\Client

public static Firstred\PostNL\HttpClient\GuzzleClient::getInstance()
Returns

\Firstred\PostNL\HttpClient\GuzzleClient | static

Deprecated

Please instantiate a new client rather than using this singleton

public Firstred\PostNL\HttpClient\GuzzleClient::setOption($name, $value)
Set Guzzle option.
Parameters
  • $name (string)

  • $value (mixed)

Returns

\Firstred\PostNL\HttpClient\GuzzleClient

public Firstred\PostNL\HttpClient\GuzzleClient::getOption($name)
Get Guzzle option.
Parameters
  • $name (string)

Returns

mixed | null

public Firstred\PostNL\HttpClient\GuzzleClient::doRequest($request)
Do a single request.
Exceptions are captured into the result array
Parameters
  • $request (Psr\Http\Message\RequestInterface)

Returns

\Psr\Http\Message\ResponseInterface

Throws

\Firstred\PostNL\Exception\HttpClientException

public Firstred\PostNL\HttpClient\GuzzleClient::doRequests( $requests=\[\])
Do all async requests.
Exceptions are captured into the result array
Parameters
  • $requests (Psr\Http\Message\RequestInterface[])

Returns

\Firstred\PostNL\Exception\HttpClientException[] | \Psr\Http\Message\ResponseInterface[]

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Service

\Firstred\PostNL\Service

Interfaces
TimeframeServiceInterface
interface Firstred\PostNL\Service\TimeframeServiceInterface
Class TimeframeService.
Parent

Firstred\PostNL\Service\ServiceInterface

Methods
public Firstred\PostNL\Service\TimeframeServiceInterface::getTimeframesREST($getTimeframes)
Get timeframes via REST.
Parameters
Returns

\Firstred\PostNL\Entity\Response\ResponseTimeframes

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

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

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

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

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

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

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

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Since

1.0.0

Deprecated

1.4.0 Use `getTimeframes` instead

public Firstred\PostNL\Service\TimeframeServiceInterface::getTimeframesSOAP($getTimeframes)
Get timeframes via SOAP.
Parameters
Returns

\Firstred\PostNL\Entity\Response\ResponseTimeframes

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

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

Throws

\Firstred\PostNL\Exception\NotFoundException

Since

1.0.0

Deprecated

1.4.0 Use `getTimeframes` instead

public Firstred\PostNL\Service\TimeframeServiceInterface::buildGetTimeframesRequestREST($getTimeframes)
Build the GetTimeframes request for the REST API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\TimeframeServiceInterface::processGetTimeframesResponseREST($response)
Process GetTimeframes Response REST.
Parameters
  • $response (mixed)

Returns

\Firstred\PostNL\Entity\Response\ResponseTimeframes | null

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\TimeframeServiceInterface::buildGetTimeframesRequestSOAP($getTimeframes)
Build the GetTimeframes request for the SOAP API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\TimeframeServiceInterface::processGetTimeframesResponseSOAP($response)
Process GetTimeframes Response SOAP.
Parameters
  • $response (Psr\Http\Message\ResponseInterface)

Returns

\Firstred\PostNL\Entity\Response\ResponseTimeframes

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

ConfirmingServiceInterface
interface Firstred\PostNL\Service\ConfirmingServiceInterface
Class ConfirmingService.
Parent

Firstred\PostNL\Service\ServiceInterface

Methods
public Firstred\PostNL\Service\ConfirmingServiceInterface::confirmShipmentREST($confirming)
Generate a single barcode via REST.
Parameters
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\InvalidArgumentException

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

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

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

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

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

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

Throws

\Firstred\PostNL\Exception\NotFoundException

Since

1.0.0

Deprecated

1.4.0 Use `confirmShipment`

public Firstred\PostNL\Service\ConfirmingServiceInterface::confirmShipmentsREST($confirms)
Confirm multiple shipments.
Parameters
Returns

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

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Since

1.0.0

Deprecated

1.4.0 Used `confirmShipments`

public Firstred\PostNL\Service\ConfirmingServiceInterface::confirmShipmentSOAP($confirming)
Generate a single label via SOAP.
Parameters
Returns

\Firstred\PostNL\Entity\Response\ConfirmingResponseShipment

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 `confirmShipment`

public Firstred\PostNL\Service\ConfirmingServiceInterface::confirmShipmentsSOAP($confirmings)
Generate multiple labels at once.
Parameters
  • $confirmings (array) [‘uuid’ => Confirming, …]

Returns

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

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 `confirmShipments`

public Firstred\PostNL\Service\ConfirmingServiceInterface::buildConfirmRequestREST($confirming)
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\ConfirmingServiceInterface::processConfirmResponseREST($response)
Proces Confirm REST Response.
Parameters
  • $response (mixed)

Returns

\Firstred\PostNL\Entity\Response\ConfirmingResponseShipment | null

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

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

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

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

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

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

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\ConfirmingServiceInterface::buildConfirmRequestSOAP($confirming)
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\ConfirmingServiceInterface::processConfirmResponseSOAP($response)
Process Confirm SOAP response.
Parameters
  • $response (Psr\Http\Message\ResponseInterface)

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

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Since

1.0.0

Deprecated

1.4.0

LabellingServiceInterface
interface Firstred\PostNL\Service\LabellingServiceInterface
Class LabellingService.
Parent

Firstred\PostNL\Service\ServiceInterface

Methods
public Firstred\PostNL\Service\LabellingServiceInterface::generateLabelREST($generateLabel, $confirm=true)
Generate a single barcode via REST.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GenerateLabelResponse

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

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

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

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

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

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

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

Throws

\Firstred\PostNL\Exception\NotFoundException

Since

1.0.0

Deprecated

1.4.0 Use `generateLabels` instead

public Firstred\PostNL\Service\LabellingServiceInterface::generateLabelsREST($generateLabels)
Generate multiple labels at once.
Parameters
  • $generateLabels (array) [‘uuid’ => [GenerateBarcode, confirm], …]

Returns

array

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Since

1.0.0

Deprecated

1.4.0 Use `generateLabels` instead

public Firstred\PostNL\Service\LabellingServiceInterface::generateLabelSOAP($generateLabel, $confirm=true)
Generate a single label via SOAP.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GenerateLabelResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Since

1.0.0

Deprecated

1.4.0 Use `generateLabels`

public Firstred\PostNL\Service\LabellingServiceInterface::generateLabelsSOAP($generateLabels)
Generate multiple labels at once via SOAP.
Parameters
  • $generateLabels (array) [‘uuid’ => [GenerateBarcode, confirm], …]

Returns

array

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 `generateLabels` instead

public Firstred\PostNL\Service\LabellingServiceInterface::buildGenerateLabelRequestREST($generateLabel, $confirm=true)
Build the GenerateLabel request for the REST API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

public Firstred\PostNL\Service\LabellingServiceInterface::processGenerateLabelResponseREST($response)
Process the GenerateLabel REST Response.
Parameters
  • $response (Psr\Http\Message\ResponseInterface)

Returns

\Firstred\PostNL\Entity\Response\GenerateLabelResponse | null

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\LabellingServiceInterface::buildGenerateLabelRequestSOAP($generateLabel, $confirm=true)
Build the GenerateLabel request for the SOAP API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\LabellingServiceInterface::processGenerateLabelResponseSOAP($response)
Parameters
  • $response (Psr\Http\Message\ResponseInterface)

Returns

\Firstred\PostNL\Entity\Response\GenerateLabelResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Since

1.0.0

Deprecated

1.4.0

DeliveryDateServiceInterface
interface Firstred\PostNL\Service\DeliveryDateServiceInterface
Class DeliveryDateService.
Parent

Firstred\PostNL\Service\ServiceInterface

Methods
public Firstred\PostNL\Service\DeliveryDateServiceInterface::getDeliveryDateREST($getDeliveryDate)
Get a delivery date via REST.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GetDeliveryDateResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

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

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

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

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

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

Throws

\Firstred\PostNL\Exception\NotFoundException

Since

1.0.0

Deprecated

1.4.0 Use `getDeliveryDate` instead

public Firstred\PostNL\Service\DeliveryDateServiceInterface::getDeliveryDateSOAP($getDeliveryDate)
Get a delivery date via SOAP.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GetDeliveryDateResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

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

Since

1.0.0

Deprecated

1.4.0 Use `getDeliveryDate` instead

public Firstred\PostNL\Service\DeliveryDateServiceInterface::getSentDateREST($getSentDate)
Get the sent date via REST.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GetSentDateResponse

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

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

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

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

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

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

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

Throws

\Firstred\PostNL\Exception\NotFoundException

Since

1.0.0

Deprecated

1.4.0 USe `getSentDate` instead

public Firstred\PostNL\Service\DeliveryDateServiceInterface::getSentDateSOAP($getSentDate)
Generate a single label via SOAP.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GetSentDateResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

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

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\DeliveryDateServiceInterface::buildGetDeliveryDateRequestREST($getDeliveryDate)
Build the GetDeliveryDate request for the REST API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\DeliveryDateServiceInterface::processGetDeliveryDateResponseREST($response)
Process GetDeliveryDate REST Response.
Parameters
  • $response (mixed)

Returns

\Firstred\PostNL\Entity\Response\GetDeliveryDateResponse | null

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\DeliveryDateServiceInterface::buildGetDeliveryDateRequestSOAP($getDeliveryDate)
Build the GetDeliveryDate request for the SOAP API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\DeliveryDateServiceInterface::processGetDeliveryDateResponseSOAP($response)
Parameters
  • $response (Psr\Http\Message\ResponseInterface)

Returns

\Firstred\PostNL\Entity\Response\GetDeliveryDateResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\DeliveryDateServiceInterface::buildGetSentDateRequestREST($getSentDate)
Build the GetSentDate request for the REST API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\DeliveryDateServiceInterface::processGetSentDateResponseREST($response)
Process GetSentDate REST Response.
Parameters
  • $response (mixed)

Returns

\Firstred\PostNL\Entity\Response\GetSentDateResponse | null

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\DeliveryDateServiceInterface::buildGetSentDateRequestSOAP($getSentDate)
Build the GetSentDate request for the SOAP API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\DeliveryDateServiceInterface::processGetSentDateResponseSOAP($response)
Process GetSentDate SOAP Response.
Parameters
  • $response (Psr\Http\Message\ResponseInterface)

Returns

\Firstred\PostNL\Entity\Response\GetSentDateResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Since

1.0.0

Deprecated

1.4.0

LocationServiceInterface
interface Firstred\PostNL\Service\LocationServiceInterface
Class LocationService.
Parent

Firstred\PostNL\Service\ServiceInterface

Methods
public Firstred\PostNL\Service\LocationServiceInterface::getNearestLocationsREST($getNearestLocations)
Get the nearest locations via REST.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GetNearestLocationsResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

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

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

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

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

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

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

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Since

1.0.0

Deprecated

1.4.0 Use `getNearestLocations` instead

public Firstred\PostNL\Service\LocationServiceInterface::getNearestLocationsSOAP($getNearestLocations)
Get the nearest locations via SOAP.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GetNearestLocationsResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

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

Since

1.0.0

Deprecated

1.4.0 Use `getNearestLocations` instead

public Firstred\PostNL\Service\LocationServiceInterface::getLocationsInAreaREST($getLocations)
Get the nearest locations via REST.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse

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

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

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

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

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

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

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

Throws

\Firstred\PostNL\Exception\NotFoundException

Since

1.0.0

Deprecated

1.4.0 Use `getLocationsInArea` instead

public Firstred\PostNL\Service\LocationServiceInterface::getLocationsInAreaSOAP($getNearestLocations)
Get the nearest locations via SOAP.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

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

Since

1.0.0

Deprecated

1.4.0 Use `getLocationsInArea` instead

public Firstred\PostNL\Service\LocationServiceInterface::getLocationREST($getLocation)
Get the location via REST.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotFoundException

Since

1.0.0

Deprecated

1.4.0 Use `getLocation` instead

public Firstred\PostNL\Service\LocationServiceInterface::getLocationSOAP($getLocation)
Get the nearest locations via SOAP.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

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

Since

1.0.0

Deprecated

1.4.0 Use `getLocation` instead

public Firstred\PostNL\Service\LocationServiceInterface::buildGetNearestLocationsRequestREST($getNearestLocations)
Build the GenerateLabel request for the REST API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\LocationServiceInterface::processGetNearestLocationsResponseREST($response)
Process GetNearestLocations Response REST.
Parameters
  • $response (mixed)

Returns

\Firstred\PostNL\Entity\Response\GetNearestLocationsResponse | null

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\LocationServiceInterface::buildGetNearestLocationsRequestSOAP($getLocations)
Build the GenerateLabel request for the SOAP API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\LocationServiceInterface::processGetNearestLocationsResponseSOAP($response)
Process GetNearestLocations Response SOAP.
Parameters
  • $response (Psr\Http\Message\ResponseInterface)

Returns

\Firstred\PostNL\Entity\Response\GetNearestLocationsResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\LocationServiceInterface::buildGetLocationsInAreaRequestREST($getLocations)
Build the GetLocationsInArea request for the REST API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\LocationServiceInterface::processGetLocationsInAreaResponseREST($response)
Proess GetLocationsInArea Response REST.
Parameters
  • $response (mixed)

Returns

\Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse | null

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\LocationServiceInterface::buildGetLocationsInAreaRequestSOAP($getLocations)
Build the GetLocationsInArea request for the SOAP API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\LocationServiceInterface::processGetLocationsInAreaResponseSOAP($response)
Parameters
  • $response (Psr\Http\Message\ResponseInterface)

Returns

\Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\LocationServiceInterface::buildGetLocationRequestREST($getLocation)
Build the GetLocation request for the REST API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\LocationServiceInterface::processGetLocationResponseREST($response)
Process GetLocation Response REST.
Parameters
  • $response (mixed)

Returns

\Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse | null

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\LocationServiceInterface::buildGetLocationRequestSOAP($getLocations)
Build the GetLocation request for the SOAP API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\LocationServiceInterface::processGetLocationResponseSOAP($response)
Process GetLocation Response SOAP.
Parameters
  • $response (Psr\Http\Message\ResponseInterface)

Returns

\Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Since

1.0.0

Deprecated

1.4.0

ServiceInterface
interface Firstred\PostNL\Service\ServiceInterface
Methods
public Firstred\PostNL\Service\ServiceInterface::cacheItem($item)
Cache an item
Parameters
  • $item (Psr\Cache\CacheItemInterface)

Since

1.0.0

public Firstred\PostNL\Service\ServiceInterface::retrieveCachedItem($uuid)
Retrieve a cached item.
Parameters
  • $uuid (string)

Returns

\Psr\Cache\CacheItemInterface | null

Throws

\Psr\Cache\InvalidArgumentException

Since

1.0.0

public Firstred\PostNL\Service\ServiceInterface::removeCachedItem($item)
Delete an item from cache
Parameters
  • $item (Psr\Cache\CacheItemInterface)

Since

1.2.0

public Firstred\PostNL\Service\ServiceInterface::getTtl()
Returns

\DateInterval | \DateTimeInterface | int | null

Since

1.2.0

public Firstred\PostNL\Service\ServiceInterface::setTtl($ttl=null)
Parameters
  • $ttl (int | \DateTimeInterface | \DateInterval | null)

Returns

static

Since

1.2.0

public Firstred\PostNL\Service\ServiceInterface::getCache()
Returns

\Psr\Cache\CacheItemPoolInterface | null

Since

1.2.0

public Firstred\PostNL\Service\ServiceInterface::setCache($cache=null)
Parameters
  • $cache (Psr\Cache\CacheItemPoolInterface | null)

Returns

static

Since

1.2.0

BarcodeServiceInterface
interface Firstred\PostNL\Service\BarcodeServiceInterface
Class BarcodeService.
Parent

Firstred\PostNL\Service\ServiceInterface

Methods
public Firstred\PostNL\Service\BarcodeServiceInterface::generateBarcodeREST($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\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\BarcodeServiceInterface::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\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 `generateBarcodes` instead

public Firstred\PostNL\Service\BarcodeServiceInterface::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\BarcodeServiceInterface::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\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

public Firstred\PostNL\Service\BarcodeServiceInterface::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\BarcodeServiceInterface::processGenerateBarcodeResponseREST($response)
Process GenerateBarcode REST response.
Parameters
  • $response (Psr\Http\Message\ResponseInterface)

Returns

array

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\BarcodeServiceInterface::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\BarcodeServiceInterface::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

ShippingServiceInterface
interface Firstred\PostNL\Service\ShippingServiceInterface
Class ShippingService.
Parent

Firstred\PostNL\Service\ServiceInterface

Methods
public Firstred\PostNL\Service\ShippingServiceInterface::sendShipmentRest($sendShipment, $confirm=true)
Generate a single Shipping vai REST.
Parameters
Returns

\Firstred\PostNL\Entity\Response\SendShipmentResponse | null

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

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

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

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

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

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

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

Since

1.2.0

Deprecated

1.4.0 Use `sendShipment` instead

public Firstred\PostNL\Service\ShippingServiceInterface::buildSendShipmentRequestREST($sendShipment, $confirm=true)
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.2.0

Deprecated

1.4.0

public Firstred\PostNL\Service\ShippingServiceInterface::processSendShipmentResponseREST($response)
Process the SendShipment REST Response.
Parameters
  • $response (Psr\Http\Message\ResponseInterface)

Returns

\Firstred\PostNL\Entity\Response\SendShipmentResponse | null

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

Deprecated

1.4.0

ShippingStatusServiceInterface
interface Firstred\PostNL\Service\ShippingStatusServiceInterface
Class ShippingStatusService.
Parent

Firstred\PostNL\Service\ServiceInterface

Methods
public Firstred\PostNL\Service\ShippingStatusServiceInterface::currentStatusREST($currentStatus)
Gets the current status.
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\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

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

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

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

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

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

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

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Since

1.0.0

Deprecated

1.4.0 Use `currentStatus` instead

public Firstred\PostNL\Service\ShippingStatusServiceInterface::currentStatusesREST($currentStatuses)
Get current statuses REST.
Parameters
Returns

\Firstred\PostNL\Entity\Response\CurrentStatusResponse[]

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Since

1.2.0

Deprecated

1.4.0 Use `currentStatuses` instead

public Firstred\PostNL\Service\ShippingStatusServiceInterface::completeStatusREST($completeStatus)
Gets the complete status.
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\UpdatedShipmentsResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

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

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

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

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

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

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

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Since

1.0.0

Deprecated

1.4.0 Use `completeStatus` instead

public Firstred\PostNL\Service\ShippingStatusServiceInterface::completeStatusesREST($completeStatuses)
Get complete statuses REST.
Parameters
Returns

\Firstred\PostNL\Entity\Response\CompleteStatusResponse[]

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Since

1.2.0

Deprecated

1.4.0 Use `completeStatuses` instead

public Firstred\PostNL\Service\ShippingStatusServiceInterface::getSignatureREST($getSignature)
Gets the complete status.
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\GetSignatureResponseSignature

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

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

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

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

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

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

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

Throws

\Firstred\PostNL\Exception\NotFoundException

Since

1.0.0

Deprecated

1.4.0 Use `getSignature` instead

public Firstred\PostNL\Service\ShippingStatusServiceInterface::getSignaturesREST($getSignatures)
Get multiple signatures.
Parameters
Returns

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

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Since

1.2.0

Deprecated

1.4.0 Use `getSignatures` instead

public Firstred\PostNL\Service\ShippingStatusServiceInterface::buildCurrentStatusRequestREST($currentStatus)
Build the CurrentStatus request for the REST API.
This function auto-detects and adjusts the following requests:
- CurrentStatus
- CurrentStatusByReference
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\ShippingStatusServiceInterface::processCurrentStatusResponseREST($response)
Process CurrentStatus Response REST.
Parameters
  • $response (mixed)

Returns

\Firstred\PostNL\Entity\Response\CurrentStatusResponse

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\ShippingStatusServiceInterface::buildCompleteStatusRequestREST($completeStatus)
Build the CompleteStatus request for the REST API.
This function auto-detects and adjusts the following requests:
- CompleteStatus
- CompleteStatusByReference
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\ShippingStatusServiceInterface::processCompleteStatusResponseREST($response)
Process CompleteStatus Response REST.
Parameters
  • $response (mixed)

Returns

\Firstred\PostNL\Entity\Response\CompleteStatusResponse | null

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\ShippingStatusServiceInterface::buildGetSignatureRequestREST($getSignature)
Build the GetSignature request for the REST API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\ShippingStatusServiceInterface::processGetSignatureResponseREST($response)
Process GetSignature Response REST.
Parameters
  • $response (mixed)

Returns

\Firstred\PostNL\Entity\Response\GetSignatureResponseSignature | null

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\ShippingStatusServiceInterface::getUpdatedShipmentsREST($customer, $dateTimeFrom=null, $dateTimeTo=null)
Get updated shipments for customer REST.
Parameters
Returns

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

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotFoundException

Since

1.2.0

Deprecated

1.4.0

public Firstred\PostNL\Service\ShippingStatusServiceInterface::buildGetUpdatedShipmentsRequestREST($customer, $dateTimeFrom=null, $dateTimeTo=null)
Build get updated shipments request REST.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.2.0

Deprecated

1.4.0

public Firstred\PostNL\Service\ShippingStatusServiceInterface::processGetUpdatedShipmentsResponseREST($response)
Process updated shipments response REST.
Parameters
  • $response (Psr\Http\Message\ResponseInterface)

Returns

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

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Since

1.2.0

Deprecated

1.4.0

Classes
AbstractService
class Firstred\PostNL\Service\AbstractService
Class AbstractService.
Constants
COMMON_NAMESPACE = \'http://postnl\.nl/cif/services/common/\'
XML_SCHEMA_NAMESPACE = \'http://www\.w3\.org/2001/XMLSchema\-instance\'
ENVELOPE_NAMESPACE = \'http://schemas\.xmlsoap\.org/soap/envelope/\'
OLD_ENVELOPE_NAMESPACE = \'http://www\.w3\.org/2003/05/soap\-envelope\'
Properties
public property Firstred\PostNL\Service\AbstractService::$namespaces
Type

array

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

\Firstred\PostNL\PostNL

public static property Firstred\PostNL\Service\AbstractService::$ttl
TTL for the cache.
`null` disables the cache
`int` is the TTL in seconds
Any `DateTime` will be used as the exact date/time at which to expire the data (auto calculate TTL)
A `DateInterval` can be used as well to set the TTL
Type

int | \DateTimeInterface | \DateInterval | null

Deprecated

1.4.0

public static property Firstred\PostNL\Service\AbstractService::$cache
The [PSR-6](https://www.php-fig.org/psr/psr-6/) CacheItemPoolInterface.
Use a caching library that implements [PSR-6](https://www.php-fig.org/psr/psr-6/) and you'll be good to go
`null` disables the cache
Type

\Psr\Cache\CacheItemPoolInterface | null

Deprecated

1.4.0

Methods
public Firstred\PostNL\Service\AbstractService::__construct($postnl, $cache=null, $ttl=null)
AbstractService constructor.
Parameters
  • $postnl (Firstred\PostNL\PostNL) PostNL instance

  • $cache (Psr\Cache\CacheItemPoolInterface | null)

  • $ttl (int | \DateTimeInterface | \DateInterval | null)

public Firstred\PostNL\Service\AbstractService::__call($name, $args)
Parameters
  • $name (string)

  • $args (mixed)

Returns

mixed

Throws

\Firstred\PostNL\Exception\InvalidMethodException

Since

1.0.0

public Firstred\PostNL\Service\AbstractService::setService($object)
Set the webservice on the object.
This lets the object know for which service it should serialize
Parameters
Returns

bool

Since

1.0.0

public static Firstred\PostNL\Service\AbstractService::registerNamespaces($element)
Register namespaces.
Parameters
  • $element (SimpleXMLElement)

Since

1.0.0

public static Firstred\PostNL\Service\AbstractService::validateRESTResponse($response)
Parameters
  • $response (Psr\Http\Message\ResponseInterface | \Exception)

Returns

bool

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

public static Firstred\PostNL\Service\AbstractService::validateSOAPResponse($xml)
Parameters
  • $xml (SimpleXMLElement)

Returns

bool

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Since

1.0.0

public static Firstred\PostNL\Service\AbstractService::getResponseText($response)
Get the response.
Parameters
  • $response

Returns

string

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Since

1.0.0

public Firstred\PostNL\Service\AbstractService::retrieveCachedItem($uuid)
Retrieve a cached item.
Parameters
  • $uuid (string)

Returns

\Psr\Cache\CacheItemInterface | null

Throws

\Psr\Cache\InvalidArgumentException

Since

1.0.0

public Firstred\PostNL\Service\AbstractService::cacheItem($item)
Cache an item
Parameters
  • $item (Psr\Cache\CacheItemInterface)

Since

1.0.0

public Firstred\PostNL\Service\AbstractService::removeCachedItem($item)
Delete an item from cache
Parameters
  • $item (Psr\Cache\CacheItemInterface)

Throws

\Psr\Cache\InvalidArgumentException

Since

1.2.0

public Firstred\PostNL\Service\AbstractService::getTtl()
Returns

\DateInterval | \DateTimeInterface | int | null

Since

1.2.0

public Firstred\PostNL\Service\AbstractService::setTtl($ttl=null)
Parameters
  • $ttl (int | \DateTimeInterface | \DateInterval | null)

Returns

static

Since

1.2.0

public Firstred\PostNL\Service\AbstractService::getCache()
Returns

\Psr\Cache\CacheItemPoolInterface | null

Since

1.2.0

Deprecated

1.4.0

public Firstred\PostNL\Service\AbstractService::setCache($cache=null)
Parameters
  • $cache (Psr\Cache\CacheItemPoolInterface | null)

Returns

static

Since

1.2.0

Deprecated

1.4.0

public static Firstred\PostNL\Service\AbstractService::defaultDateFormat($writer, $value)
Write default date format in XML
Parameters
  • $writer (Sabre\Xml\Writer)

  • $value (DateTimeImmutable)

Since

1.2.0

LocationService
class Firstred\PostNL\Service\LocationService
Class LocationService.
Parent

Firstred\PostNL\Service\AbstractService

Implements

Firstred\PostNL\Service\LocationServiceInterface

Constants
VERSION = \'2\.1\'
LIVE_ENDPOINT = \'https://api\.postnl\.nl/shipment/v2\_1/locations\'
SANDBOX_ENDPOINT = \'https://api\-sandbox\.postnl\.nl/shipment/v2\_1/locations\'
SOAP_ACTION = \'http://postnl\.nl/cif/services/LocationWebService/ILocationWebService/GetNearestLocations\'
SOAP_ACTION_LOCATIONS_IN_AREA = \'http://postnl\.nl/cif/services/LocationWebService/ILocationWebService/GetLocationsInArea\'
SERVICES_NAMESPACE = \'http://postnl\.nl/cif/services/LocationWebService/\'
DOMAIN_NAMESPACE = \'http://postnl\.nl/cif/domain/LocationWebService/\'
Properties
public property Firstred\PostNL\Service\LocationService::$namespaces
Namespaces uses for the SOAP version of this service.
Type

array

Methods
public Firstred\PostNL\Service\LocationService::getNearestLocationsREST($getNearestLocations)
Get the nearest locations via REST.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GetNearestLocationsResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

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

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

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

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

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

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

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Since

1.0.0

Deprecated

1.4.0 Use `getNearestLocations` instead

public Firstred\PostNL\Service\LocationService::getNearestLocationsSOAP($getNearestLocations)
Get the nearest locations via SOAP.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GetNearestLocationsResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

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

Since

1.0.0

Deprecated

1.4.0 Use `getNearestLocations` instead

public Firstred\PostNL\Service\LocationService::getLocationsInAreaREST($getLocations)
Get the nearest locations via REST.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse

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

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

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

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

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

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

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

Throws

\Firstred\PostNL\Exception\NotFoundException

Since

1.0.0

Deprecated

1.4.0 Use `getLocationsInArea` instead

public Firstred\PostNL\Service\LocationService::getLocationsInAreaSOAP($getNearestLocations)
Get the nearest locations via SOAP.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

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

Since

1.0.0

Deprecated

1.4.0 Use `getLocationsInArea` instead

public Firstred\PostNL\Service\LocationService::getLocationREST($getLocation)
Get the location via REST.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotFoundException

Since

1.0.0

Deprecated

1.4.0 Use `getLocation`

public Firstred\PostNL\Service\LocationService::getLocationSOAP($getLocation)
Get the nearest locations via SOAP.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

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

Since

1.0.0

Deprecated

1.4.0 Use `getLocation`

public Firstred\PostNL\Service\LocationService::buildGetNearestLocationsRequestREST($getNearestLocations)
Build the GenerateLabel request for the REST API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\LocationService::processGetNearestLocationsResponseREST($response)
Process GetNearestLocations Response REST.
Parameters
  • $response (mixed)

Returns

\Firstred\PostNL\Entity\Response\GetNearestLocationsResponse | null

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\LocationService::buildGetNearestLocationsRequestSOAP($getLocations)
Build the GenerateLabel request for the SOAP API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\LocationService::processGetNearestLocationsResponseSOAP($response)
Process GetNearestLocations Response SOAP.
Parameters
  • $response (Psr\Http\Message\ResponseInterface)

Returns

\Firstred\PostNL\Entity\Response\GetNearestLocationsResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\LocationService::buildGetLocationsInAreaRequestREST($getLocations)
Build the GetLocationsInArea request for the REST API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\LocationService::processGetLocationsInAreaResponseREST($response)
Process GetLocationsInArea Response REST.
Parameters
  • $response (mixed)

Returns

\Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse | null

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\LocationService::buildGetLocationsInAreaRequestSOAP($getLocations)
Build the GetLocationsInArea request for the SOAP API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\LocationService::processGetLocationsInAreaResponseSOAP($response)
Parameters
  • $response (Psr\Http\Message\ResponseInterface)

Returns

\Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\LocationService::buildGetLocationRequestREST($getLocation)
Build the GetLocation request for the REST API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\LocationService::processGetLocationResponseREST($response)
Process GetLocation Response REST.
Parameters
  • $response (mixed)

Returns

\Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse | null

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\LocationService::buildGetLocationRequestSOAP($getLocations)
Build the GetLocation request for the SOAP API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\LocationService::processGetLocationResponseSOAP($response)
Process GetLocation Response SOAP.
Parameters
  • $response (Psr\Http\Message\ResponseInterface)

Returns

\Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Since

1.0.0

Deprecated

1.4.0

ShippingService
class Firstred\PostNL\Service\ShippingService
Class ShippingService.
Parent

Firstred\PostNL\Service\AbstractService

Implements

Firstred\PostNL\Service\ShippingServiceInterface

Constants
VERSION = \'1\'
LIVE_ENDPOINT = \'https://api\.postnl\.nl/v1/shipment\'
SANDBOX_ENDPOINT = \'https://api\-sandbox\.postnl\.nl/v1/shipment\'
DOMAIN_NAMESPACE = \'http://postnl\.nl/\'
Methods
public Firstred\PostNL\Service\ShippingService::sendShipmentRest($sendShipment, $confirm=true)
Generate a single Shipping vai REST.
Parameters
Returns

\Firstred\PostNL\Entity\Response\SendShipmentResponse | null

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

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

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

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

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

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

Since

1.2.0

Deprecated

1.4.0 Use `sendShipment` instead

public Firstred\PostNL\Service\ShippingService::buildSendShipmentRequestREST($sendShipment, $confirm=true)
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.2.0

Deprecated

1.4.0

public Firstred\PostNL\Service\ShippingService::processSendShipmentResponseREST($response)
Process the SendShipment REST Response.
Parameters
  • $response (Psr\Http\Message\ResponseInterface)

Returns

\Firstred\PostNL\Entity\Response\SendShipmentResponse | null

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.2.0

Deprecated

1.4.0

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

Firstred\PostNL\Service\AbstractService

Implements

Firstred\PostNL\Service\BarcodeServiceInterface

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

DeliveryDateService
class Firstred\PostNL\Service\DeliveryDateService
Class DeliveryDateService.
Parent

Firstred\PostNL\Service\AbstractService

Implements

Firstred\PostNL\Service\DeliveryDateServiceInterface

Constants
VERSION = \'2\.2\'
LIVE_ENDPOINT = \'https://api\.postnl\.nl/shipment/v2\_2/calculate/date\'
SANDBOX_ENDPOINT = \'https://api\-sandbox\.postnl\.nl/shipment/v2\_2/calculate/date\'
SOAP_ACTION = \'http://postnl\.nl/cif/services/DeliveryDateWebService/IDeliveryDateWebService/GetDeliveryDate\'
SERVICES_NAMESPACE = \'http://postnl\.nl/cif/services/DeliveryDateWebService/\'
DOMAIN_NAMESPACE = \'http://postnl\.nl/cif/domain/DeliveryDateWebService/\'
Properties
public property Firstred\PostNL\Service\DeliveryDateService::$namespaces
Namespaces uses for the SOAP version of this service.
Type

array

Methods
public Firstred\PostNL\Service\DeliveryDateService::getDeliveryDateREST($getDeliveryDate)
Get a delivery date via REST.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GetDeliveryDateResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

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

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

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

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

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

Throws

\Firstred\PostNL\Exception\NotFoundException

Since

1.0.0

Deprecated

1.4.0 Use `getDeliveryDate` instead

public Firstred\PostNL\Service\DeliveryDateService::getDeliveryDateSOAP($getDeliveryDate)
Get a delivery date via SOAP.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GetDeliveryDateResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

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

Since

1.0.0

Deprecated

1.4.0 Use `getDeliveryDate` instead

public Firstred\PostNL\Service\DeliveryDateService::getSentDateREST($getSentDate)
Get the sent date via REST.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GetSentDateResponse

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

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

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

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

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

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

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

Throws

\Firstred\PostNL\Exception\NotFoundException

Since

1.0.0

Deprecated

1.4.0 Use `getSentDate` instead

public Firstred\PostNL\Service\DeliveryDateService::getSentDateSOAP($getSentDate)
Generate a single label via SOAP.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GetSentDateResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

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

Since

1.0.0

Deprecated

1.4.0 Use `getSentDate` instead

public Firstred\PostNL\Service\DeliveryDateService::buildGetDeliveryDateRequestREST($getDeliveryDate)
Build the GetDeliveryDate request for the REST API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\DeliveryDateService::processGetDeliveryDateResponseREST($response)
Process GetDeliveryDate REST Response.
Parameters
  • $response (mixed)

Returns

\Firstred\PostNL\Entity\Response\GetDeliveryDateResponse | null

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\DeliveryDateService::buildGetDeliveryDateRequestSOAP($getDeliveryDate)
Build the GetDeliveryDate request for the SOAP API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\DeliveryDateService::processGetDeliveryDateResponseSOAP($response)
Parameters
  • $response (Psr\Http\Message\ResponseInterface)

Returns

\Firstred\PostNL\Entity\Response\GetDeliveryDateResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\DeliveryDateService::buildGetSentDateRequestREST($getSentDate)
Build the GetSentDate request for the REST API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\DeliveryDateService::processGetSentDateResponseREST($response)
Process GetSentDate REST Response.
Parameters
  • $response (mixed)

Returns

\Firstred\PostNL\Entity\Response\GetSentDateResponse | null

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\DeliveryDateService::buildGetSentDateRequestSOAP($getSentDate)
Build the GetSentDate request for the SOAP API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\DeliveryDateService::processGetSentDateResponseSOAP($response)
Process GetSentDate SOAP Response.
Parameters
  • $response (Psr\Http\Message\ResponseInterface)

Returns

\Firstred\PostNL\Entity\Response\GetSentDateResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Since

1.0.0

Deprecated

1.4.0

TimeframeService
class Firstred\PostNL\Service\TimeframeService
Class TimeframeService.
Parent

Firstred\PostNL\Service\AbstractService

Implements

Firstred\PostNL\Service\TimeframeServiceInterface

Constants
VERSION = \'2\.1\'
LIVE_ENDPOINT = \'https://api\.postnl\.nl/shipment/v2\_1/calculate/timeframes\'
SANDBOX_ENDPOINT = \'https://api\-sandbox\.postnl\.nl/shipment/v2\_1/calculate/timeframes\'
SOAP_ACTION = \'http://postnl\.nl/cif/services/TimeframeWebService/ITimeframeWebService/GetTimeframes\'
SERVICES_NAMESPACE = \'http://postnl\.nl/cif/services/TimeframeWebService/\'
DOMAIN_NAMESPACE = \'http://postnl\.nl/cif/domain/TimeframeWebService/\'
Properties
public property Firstred\PostNL\Service\TimeframeService::$namespaces
Namespaces uses for the SOAP version of this service.
Type

array

Methods
public Firstred\PostNL\Service\TimeframeService::getTimeframesREST($getTimeframes)
Get timeframes via REST.
Parameters
Returns

\Firstred\PostNL\Entity\Response\ResponseTimeframes

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

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

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

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

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

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

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

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Since

1.0.0

Deprecated

1.4.0 Use `getTimeframes` instead

public Firstred\PostNL\Service\TimeframeService::getTimeframesSOAP($getTimeframes)
Get timeframes via SOAP.
Parameters
Returns

\Firstred\PostNL\Entity\Response\ResponseTimeframes

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

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

Throws

\Firstred\PostNL\Exception\NotFoundException

Since

1.0.0

Deprecated

1.4.0 Use `getTimeframes` instead

public Firstred\PostNL\Service\TimeframeService::buildGetTimeframesRequestREST($getTimeframes)
Build the GetTimeframes request for the REST API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\TimeframeService::processGetTimeframesResponseREST($response)
Process GetTimeframes Response REST.
Parameters
  • $response (mixed)

Returns

\Firstred\PostNL\Entity\Response\ResponseTimeframes | null

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\TimeframeService::buildGetTimeframesRequestSOAP($getTimeframes)
Build the GetTimeframes request for the SOAP API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\TimeframeService::processGetTimeframesResponseSOAP($response)
Process GetTimeframes Response SOAP.
Parameters
  • $response (Psr\Http\Message\ResponseInterface)

Returns

\Firstred\PostNL\Entity\Response\ResponseTimeframes

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

ShippingStatusService
class Firstred\PostNL\Service\ShippingStatusService
Class ShippingStatusService.
Parent

Firstred\PostNL\Service\AbstractService

Implements

Firstred\PostNL\Service\ShippingStatusServiceInterface

Constants
VERSION = \'2\'
LIVE_ENDPOINT = \'https://api\.postnl\.nl/shipment/v2/status\'
SANDBOX_ENDPOINT = \'https://api\-sandbox\.postnl\.nl/shipment/v2/status\'
DOMAIN_NAMESPACE = \'http://postnl\.nl/\'
Methods
public Firstred\PostNL\Service\ShippingStatusService::currentStatusREST($currentStatus)
Gets the current status.
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\CurrentStatusResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

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

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

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

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

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

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

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Since

1.0.0

Deprecated

1.4.0 Use `currentStatus` instead

public Firstred\PostNL\Service\ShippingStatusService::currentStatusesREST($currentStatuses)
Get current statuses REST.
Parameters
Returns

\Firstred\PostNL\Entity\Response\CurrentStatusResponse[]

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Since

1.2.0

Deprecated

1.4.0 Use `currentStatuses` instead

public Firstred\PostNL\Service\ShippingStatusService::completeStatusREST($completeStatus)
Gets the complete status.
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\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\InvalidArgumentException

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

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

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

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

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

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

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotFoundException

Since

1.0.0

Deprecated

1.4.0 Use `completeStatus` instead

public Firstred\PostNL\Service\ShippingStatusService::completeStatusesREST($completeStatuses)
Get complete statuses REST.
Parameters
Returns

\Firstred\PostNL\Entity\Response\CompleteStatusResponse[]

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Since

1.2.0

Deprecated

1.4.0 Use `completeStatuses` instead

public Firstred\PostNL\Service\ShippingStatusService::getSignatureREST($getSignature)
Gets the signature.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GetSignatureResponseSignature

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

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

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

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

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

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

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

Throws

\Firstred\PostNL\Exception\NotFoundException

Since

1.0.0

Deprecated

1.4.0 Use `getSignature` instead

public Firstred\PostNL\Service\ShippingStatusService::getSignaturesREST($getSignatures)
Get multiple signatures.
Parameters
Returns

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

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Since

1.2.0

Deprecated

1.4.0 Use `getSignatures` instead

public Firstred\PostNL\Service\ShippingStatusService::buildCurrentStatusRequestREST($currentStatus)
Build the CurrentStatus request for the REST API.
This function auto-detects and adjusts the following requests:
- CurrentStatus
- CurrentStatusByReference
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\ShippingStatusService::processCurrentStatusResponseREST($response)
Process CurrentStatus Response REST.
Parameters
  • $response (mixed)

Returns

\Firstred\PostNL\Entity\Response\CurrentStatusResponse

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\ShippingStatusService::buildCompleteStatusRequestREST($completeStatus)
Build the CompleteStatus request for the REST API.
This function auto-detects and adjusts the following requests:
- CompleteStatus
- CompleteStatusByReference
- CompleteStatusByPhase
- CompleteStatusByStatus
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\ShippingStatusService::processCompleteStatusResponseREST($response)
Process CompleteStatus Response REST.
Parameters
  • $response (mixed)

Returns

\Firstred\PostNL\Entity\Response\CompleteStatusResponse | null

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\ShippingStatusService::buildGetSignatureRequestREST($getSignature)
Build the GetSignature request for the REST API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\ShippingStatusService::processGetSignatureResponseREST($response)
Process GetSignature Response REST.
Parameters
  • $response (mixed)

Returns

\Firstred\PostNL\Entity\Response\GetSignatureResponseSignature | null

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\ShippingStatusService::getUpdatedShipmentsREST($customer, $dateTimeFrom=null, $dateTimeTo=null)
Get updated shipments for customer REST.
Parameters
Returns

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

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotFoundException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotFoundException

Since

1.2.0

Deprecated

1.4.0

public Firstred\PostNL\Service\ShippingStatusService::buildGetUpdatedShipmentsRequestREST($customer, $dateTimeFrom=null, $dateTimeTo=null)
Build get updated shipments request REST.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.2.0

Deprecated

1.4.0

public Firstred\PostNL\Service\ShippingStatusService::processGetUpdatedShipmentsResponseREST($response)
Process updated shipments response REST.
Parameters
  • $response (Psr\Http\Message\ResponseInterface)

Returns

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

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Since

1.2.0

Deprecated

1.4.0

LabellingService
class Firstred\PostNL\Service\LabellingService
Class LabellingService.
Parent

Firstred\PostNL\Service\AbstractService

Implements

Firstred\PostNL\Service\LabellingServiceInterface

Constants
VERSION = \'2\.2\'
LIVE_ENDPOINT = \'https://api\.postnl\.nl/shipment/v2\_2/label\'
SANDBOX_ENDPOINT = \'https://api\-sandbox\.postnl\.nl/shipment/v2\_2/label\'
SOAP_ACTION = \'http://postnl\.nl/cif/services/LabellingWebService/ILabellingWebService/GenerateLabel\'
SOAP_ACTION_NO_CONFIRM = \'http://postnl\.nl/cif/services/LabellingWebService/ILabellingWebService/GenerateLabelWithoutConfirm\'
SERVICES_NAMESPACE = \'http://postnl\.nl/cif/services/LabellingWebService/\'
DOMAIN_NAMESPACE = \'http://postnl\.nl/cif/domain/LabellingWebService/\'
Properties
public property Firstred\PostNL\Service\LabellingService::$namespaces
Namespaces uses for the SOAP version of this service.
Type

array

private property Firstred\PostNL\Service\LabellingService::$insuranceProductCodes
Methods
public Firstred\PostNL\Service\LabellingService::generateLabelREST($generateLabel, $confirm=true)
Generate a single barcode via REST.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GenerateLabelResponse

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

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

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

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

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

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

Since

1.0.0

Deprecated

1.4.0 Use `generateLabel` instead

public Firstred\PostNL\Service\LabellingService::generateLabelsREST($generateLabels)
Generate multiple labels at once.
Parameters
  • $generateLabels (array) [‘uuid’ => [GenerateBarcode, confirm], …]

Returns

array

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Since

1.0.0

Deprecated

1.4.0 Use `generateLabels` instead

public Firstred\PostNL\Service\LabellingService::generateLabelSOAP($generateLabel, $confirm=true)
Generate a single label via SOAP.
Parameters
Returns

\Firstred\PostNL\Entity\Response\GenerateLabelResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Since

1.0.0

Deprecated

1.4.0 Use `generateLabels` instead

public Firstred\PostNL\Service\LabellingService::generateLabelsSOAP($generateLabels)
Generate multiple labels at once via SOAP.
Parameters
  • $generateLabels (array) [‘uuid’ => [GenerateBarcode, confirm], …]

Returns

array

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 Use `generateLabels` instead

public Firstred\PostNL\Service\LabellingService::buildGenerateLabelRequestREST($generateLabel, $confirm=true)
Build the GenerateLabel request for the REST API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\LabellingService::processGenerateLabelResponseREST($response)
Process the GenerateLabel REST Response.
Parameters
  • $response (Psr\Http\Message\ResponseInterface)

Returns

\Firstred\PostNL\Entity\Response\GenerateLabelResponse | null

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Since

1.0.0

public Firstred\PostNL\Service\LabellingService::buildGenerateLabelRequestSOAP($generateLabel, $confirm=true)
Build the GenerateLabel request for the SOAP API.
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\LabellingService::processGenerateLabelResponseSOAP($response)
Parameters
  • $response (Psr\Http\Message\ResponseInterface)

Returns

\Firstred\PostNL\Entity\Response\GenerateLabelResponse

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Since

1.0.0

Deprecated

1.4.0

ConfirmingService
class Firstred\PostNL\Service\ConfirmingService
Class ConfirmingService.
Parent

Firstred\PostNL\Service\AbstractService

Implements

Firstred\PostNL\Service\ConfirmingServiceInterface

Constants
VERSION = \'2\.0\'
LIVE_ENDPOINT = \'https://api\.postnl\.nl/shipment/v2/confirm\'
SANDBOX_ENDPOINT = \'https://api\-sandbox\.postnl\.nl/shipment/v2/confirm\'
SOAP_ACTION = \'http://postnl\.nl/cif/services/ConfirmingWebService/IConfirmingWebService/Confirming\'
ENVELOPE_NAMESPACE = \'http://schemas\.xmlsoap\.org/soap/envelope/\'
SERVICES_NAMESPACE = \'http://postnl\.nl/cif/services/ConfirmingWebService/\'
DOMAIN_NAMESPACE = \'http://postnl\.nl/cif/domain/ConfirmingWebService/\'
Properties
public property Firstred\PostNL\Service\ConfirmingService::$namespaces
Namespaces uses for the SOAP version of this service.
Type

array

Methods
public Firstred\PostNL\Service\ConfirmingService::confirmShipmentREST($confirming)
Confirm a single shipment via REST.
Parameters
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\InvalidArgumentException

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

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

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

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

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

Since

1.0.0

public Firstred\PostNL\Service\ConfirmingService::confirmShipmentsREST($confirms)
Confirm multiple shipments.
Parameters
Returns

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

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Throws

\Firstred\PostNL\Exception\NotSupportedException

Throws

\Firstred\PostNL\Exception\ResponseException

Since

1.0.0

public Firstred\PostNL\Service\ConfirmingService::confirmShipmentSOAP($confirming)
Generate a single label via SOAP.
Parameters
Returns

\Firstred\PostNL\Entity\Response\ConfirmingResponseShipment

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

public Firstred\PostNL\Service\ConfirmingService::confirmShipmentsSOAP($confirmings)
Generate multiple labels at once.
Parameters
  • $confirmings (array) [‘uuid’ => Confirming, …]

Returns

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

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\ConfirmingService::buildConfirmRequestREST($confirming)
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

public Firstred\PostNL\Service\ConfirmingService::processConfirmResponseREST($response)
Proces Confirm REST Response.
Parameters
  • $response (mixed)

Returns

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

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

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

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

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

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

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

Since

1.0.0

public Firstred\PostNL\Service\ConfirmingService::buildConfirmRequestSOAP($confirming)
Parameters
Returns

\Psr\Http\Message\RequestInterface

Since

1.0.0

Deprecated

1.4.0

public Firstred\PostNL\Service\ConfirmingService::processConfirmResponseSOAP($response)
Process Confirm SOAP response.
Parameters
  • $response (Psr\Http\Message\ResponseInterface)

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

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Throws

\Firstred\PostNL\Exception\CifDownException

Throws

\Firstred\PostNL\Exception\CifException

Throws

\Firstred\PostNL\Exception\ResponseException

Throws

\Firstred\PostNL\Exception\HttpClientException

Since

1.0.0

Deprecated

1.4.0

Util

\Firstred\PostNL\Util

Interfaces
XmlSerializable
interface Firstred\PostNL\Util\XmlSerializable
Objects implementing XmlSerializable can control how they are represented in
Xml.
Methods
public Firstred\PostNL\Util\XmlSerializable::xmlSerialize($writer)
The xmlSerialize method is called during xml writing.
Use the $writer argument to write its own xml serialization.

An important note: do _not_ create a parent element. Any element
implementing XmlSerializable should only ever write what's considered
its 'inner xml'.

The parent of the current element is responsible for writing a
containing element.

This allows serializers to be re-used for different element names.

If you are opening new elements, you must also close them again.
Parameters
  • $writer (Sabre\Xml\Writer)

Returns

void

Classes
PendingPromise
class Firstred\PostNL\Util\PendingPromise
Promises/A+ implementation that avoids recursion when possible.
Implements

Http\Promise\Promise

Properties
private static property Firstred\PostNL\Util\PendingPromise::$state
private static property Firstred\PostNL\Util\PendingPromise::$result
private static property Firstred\PostNL\Util\PendingPromise::$cancelFn
private static property Firstred\PostNL\Util\PendingPromise::$waitFn
private static property Firstred\PostNL\Util\PendingPromise::$waitList
private static property Firstred\PostNL\Util\PendingPromise::$handlers
Methods
public Firstred\PostNL\Util\PendingPromise::__construct($waitFn=null, $cancelFn=null)
Parameters
  • $waitFn (callable) fn that when invoked resolves the promise

  • $cancelFn (callable) fn that when invoked cancels the promise

public Firstred\PostNL\Util\PendingPromise::then($onFulfilled=null, $onRejected=null)
Parameters
  • $onFulfilled (callable | null)

  • $onRejected (callable | null)

Returns

\Firstred\PostNL\Util\PendingPromise | \Http\Promise\Promise

public Firstred\PostNL\Util\PendingPromise::otherwise($onRejected)
Parameters
  • $onRejected (callable)

Returns

\Firstred\PostNL\Util\PendingPromise | \Http\Promise\Promise

public Firstred\PostNL\Util\PendingPromise::wait($unwrap=true)
Parameters
  • $unwrap (bool)

Returns

mixed | void

Throws

\Exception

public Firstred\PostNL\Util\PendingPromise::getState()
Returns

string

public Firstred\PostNL\Util\PendingPromise::cancel()
Returns

void

public Firstred\PostNL\Util\PendingPromise::resolve($value)
Parameters
  • $value (mixed)

public Firstred\PostNL\Util\PendingPromise::reject($reason)
Parameters
  • $reason (mixed)

private Firstred\PostNL\Util\PendingPromise::settle($state, $value)
Parameters
  • $state (string)

  • $value (mixed)

private static Firstred\PostNL\Util\PendingPromise::callHandler($index, $value, $handler)
Call a stack of handlers using a specific callback index and value.
Parameters
  • $index (int) 1 (resolve) or 2 (reject)

  • $value (mixed) value to pass to the callback

  • $handler (array) array of handler data (promise and callbacks)

Returns

void returns the next group to resolve

private Firstred\PostNL\Util\PendingPromise::waitIfPending()
Throws

\Exception

Returns

void

private Firstred\PostNL\Util\PendingPromise::invokeWaitFn()
Throws

\Exception

private Firstred\PostNL\Util\PendingPromise::invokeWaitList()
Throws

\Exception

UUID
class Firstred\PostNL\Util\UUID
Class UUID.
Methods
public static Firstred\PostNL\Util\UUID::generate()
Generate a v4 UUID in RFC 4122 format.
Returns

string

PromiseTool
class Firstred\PostNL\Util\PromiseTool
Class PromiseTool.
Methods
public static Firstred\PostNL\Util\PromiseTool::queue($assign=null)
Get the global task queue used for promise resolution.
This task queue MUST be run in an event loop in order for promises to be
settled asynchronously. It will be automatically run when synchronously
waiting on a promise.

<code>
while ($eventLoop->isRunning()) {
queue()->run();
}
</code>
Parameters
Returns

\Firstred\PostNL\Util\TaskQueue

public static Firstred\PostNL\Util\PromiseTool::task($task)
Adds a function to run in the task queue when it is next `run()` and returns
a promise that is fulfilled or rejected with the result.
Parameters
  • $task (callable) task function to run

Returns

\Http\Promise\Promise

public static Firstred\PostNL\Util\PromiseTool::promiseFor($value)
Creates a promise for a value if the value is not a promise.
Parameters
  • $value (mixed) promise or value

Returns

\Http\Promise\Promise

public static Firstred\PostNL\Util\PromiseTool::rejectionFor($reason)
Creates a rejected promise for a reason if the reason is not a promise. If
the provided reason is a promise, then it is returned as-is.
Parameters
  • $reason (mixed) promise or reason

Returns

\Http\Promise\Promise

public static Firstred\PostNL\Util\PromiseTool::exceptionFor($reason)
Create an exception for a rejected promise value.
Parameters
  • $reason (mixed)

Returns

\Firstred\PostNL\Util\Throwable

public static Firstred\PostNL\Util\PromiseTool::iterFor($value)
Returns an iterator for the given value.
Parameters
  • $value (mixed)

Returns

\Iterator

public static Firstred\PostNL\Util\PromiseTool::inspect($promise)
Synchronously waits on a promise to resolve and returns an inspection state
array.
Returns a state associative array containing a “state” key mapping to a
valid promise state. If the state of the promise is “fulfilled”, the array
will contain a “value” key mapping to the fulfilled value of the promise. If
the promise is rejected, the array will contain a “reason” key mapping to
the rejection reason of the promise.
Parameters
  • $promise (Http\Promise\Promise) promise or value

Returns

array

Throws

\Exception

public static Firstred\PostNL\Util\PromiseTool::inspectAll($promises)
Waits on all of the provided promises, but does not unwrap rejected promises
as thrown exception.
Returns an array of inspection state arrays.
Parameters
  • $promises (Http\Promise\Promise[]) traversable of promises to wait upon

Returns

array

Throws

\Exception

Throws

\Exception

Throws

\Exception

Throws

\Exception

public static Firstred\PostNL\Util\PromiseTool::unwrap($promises)
Waits on all of the provided promises and returns the fulfilled values.
Returns an array that contains the value of each promise (in the same order
the promises were provided). An exception is thrown if any of the promises
are rejected.
Parameters
  • $promises (mixed) iterable of Promise objects to wait on

Returns

array

Throws

\Exception on error

Throws

\Firstred\PostNL\Util\Throwable on error in PHP >=7

Throws

\Exception on error

Throws

\Firstred\PostNL\Util\Throwable on error in PHP >=7

public static Firstred\PostNL\Util\PromiseTool::all($promises, $recursive=false)
Given an array of promises, return a promise that is fulfilled when all the
items in the array are fulfilled.
The promise's fulfillment value is an array with fulfillment values at
respective positions to the original array. If any promise in the array
rejects, the returned promise is rejected with the rejection reason.
Parameters
  • $promises (mixed) promises or values

  • $recursive (bool) - If true, resolves new promises that might have been added to the stack during its own resolution

Returns

\Http\Promise\Promise

public static Firstred\PostNL\Util\PromiseTool::some($count, $promises)
Initiate a competitive race between multiple promises or values (values will
become immediately fulfilled promises).
When count amount of promises have been fulfilled, the returned promise is
fulfilled with an array that contains the fulfillment values of the winners
in order of resolution.
Parameters
  • $count (int) total number of promises

  • $promises (mixed) promises or values

Returns

\Http\Promise\Promise

public static Firstred\PostNL\Util\PromiseTool::any($promises)
Like some(), with 1 as count. However, if the promise fulfills, the
fulfillment value is not an array of 1 but the value directly.
Parameters
  • $promises (mixed) promises or values

Returns

\Http\Promise\Promise

public static Firstred\PostNL\Util\PromiseTool::settle($promises)
Returns a promise that is fulfilled when all of the provided promises have
been fulfilled or rejected.
The returned promise is fulfilled with an array of inspection state arrays.
Parameters
  • $promises (mixed) promises or values

Returns

\Http\Promise\Promise

public static Firstred\PostNL\Util\PromiseTool::each($iterable, $onFulfilled=null, $onRejected=null)
Given an iterator that yields promises or values, returns a promise that is
fulfilled with a null value when the iterator has been consumed or the
aggregate promise has been fulfilled or rejected.
$onFulfilled is a function that accepts the fulfilled value, iterator
index, and the aggregate promise. The callback can invoke any necessary side
effects and choose to resolve or reject the aggregate promise if needed.

$onRejected is a function that accepts the rejection reason, iterator
index, and the aggregate promise. The callback can invoke any necessary side
effects and choose to resolve or reject the aggregate promise if needed.
Parameters
  • $iterable (mixed) iterator or array to iterate over

  • $onFulfilled (callable)

  • $onRejected (callable)

Returns

\Http\Promise\Promise

public static Firstred\PostNL\Util\PromiseTool::eachLimit($iterable, $concurrency, $onFulfilled=null, $onRejected=null)
Like each, but only allows a certain number of outstanding promises at any
given time.
$concurrency may be an integer or a function that accepts the number of
pending promises and returns a numeric concurrency limit value to allow for
dynamic a concurrency size.
Parameters
  • $iterable (mixed)

  • $concurrency (int | callable)

  • $onFulfilled (callable)

  • $onRejected (callable)

Returns

\Http\Promise\Promise

public static Firstred\PostNL\Util\PromiseTool::eachLimitAll($iterable, $concurrency, $onFulfilled=null)
Like each_limit, but ensures that no promise in the given $iterable argument
is rejected. If any promise is rejected, then the aggregate promise is
rejected with the encountered rejection.
Parameters
  • $iterable (mixed)

  • $concurrency (int | callable)

  • $onFulfilled (callable)

Returns

\Http\Promise\Promise

public static Firstred\PostNL\Util\PromiseTool::isFulfilled($promise)
Returns true if a promise is fulfilled.
Parameters
  • $promise (Http\Promise\Promise)

Returns

bool

public static Firstred\PostNL\Util\PromiseTool::isRejected($promise)
Returns true if a promise is rejected.
Parameters
  • $promise (Http\Promise\Promise)

Returns

bool

public static Firstred\PostNL\Util\PromiseTool::isSettled($promise)
Returns true if a promise is fulfilled or rejected.
Parameters
  • $promise (Http\Promise\Promise)

Returns

bool

TaskQueue
class Firstred\PostNL\Util\TaskQueue
A task queue that executes tasks in a FIFO order.
This task queue class is used to settle promises asynchronously and
maintains a constant stack size. You can use the task queue asynchronously
by calling the `run()` function of the global task queue in an event loop.

queue()->run();
Properties
private static property Firstred\PostNL\Util\TaskQueue::$enableShutdown
private static property Firstred\PostNL\Util\TaskQueue::$queue
Methods
public Firstred\PostNL\Util\TaskQueue::__construct($withShutdown=true)
TaskQueue constructor.
Parameters
  • $withShutdown (bool)

public Firstred\PostNL\Util\TaskQueue::isEmpty()
Returns

bool

public Firstred\PostNL\Util\TaskQueue::add($task)
Parameters
  • $task (callable)

public Firstred\PostNL\Util\TaskQueue::run()
Returns

void

public Firstred\PostNL\Util\TaskQueue::disableShutdown()
The task queue will be run and exhausted by default when the process
exits IFF the exit is not the result of a PHP E_ERROR error.
You can disable running the automatic shutdown of the queue by calling
this function. If you disable the task queue shutdown process, then you
MUST either run the task queue (as a result of running your event loop
or manually using the run() method) or wait on each outstanding promise.

Note: This shutdown will occur before any destructors are triggered.
RFPdi
class Firstred\PostNL\Util\RFPdi
Class RFPdi.
Parent

setasign\Fpdi\Fpdi

Properties
public static property Firstred\PostNL\Util\RFPdi::$angle
Methods
public Firstred\PostNL\Util\RFPdi::rotate($angle, $x=\-1, $y=\-1)
public Firstred\PostNL\Util\RFPdi::rotateClockWise()
public Firstred\PostNL\Util\RFPdi::rotateCounterClockWise()
public Firstred\PostNL\Util\RFPdi::_endpage()
EachPromise
class Firstred\PostNL\Util\EachPromise
Represents a promise that iterates over many promises and invokes
side-effect functions in the process.
Constants
PENDING = \'pending\'
FULFILLED = \'fulfilled\'
REJECTED = \'rejected\'
Properties
private static property Firstred\PostNL\Util\EachPromise::$pending
private static property Firstred\PostNL\Util\EachPromise::$iterable
Type

\Iterator

private static property Firstred\PostNL\Util\EachPromise::$concurrency
Type

callable | int

private static property Firstred\PostNL\Util\EachPromise::$onFulfilled
Type

callable

private static property Firstred\PostNL\Util\EachPromise::$onRejected
Type

callable

private static property Firstred\PostNL\Util\EachPromise::$aggregate
Type

\Http\Promise\Promise

private static property Firstred\PostNL\Util\EachPromise::$mutex
Type

bool

Methods
public Firstred\PostNL\Util\EachPromise::__construct( $iterable, $config=\[\])
Configuration hash can include the following key value pairs:.
- fulfilled: (callable) Invoked when a promise fulfills. The function
is invoked with three arguments: the fulfillment value, the index
position from the iterable list of the promise, and the aggregate
promise that manages all of the promises. The aggregate promise may
be resolved from within the callback to short-circuit the promise.
- rejected: (callable) Invoked when a promise is rejected. The
function is invoked with three arguments: the rejection reason, the
index position from the iterable list of the promise, and the
aggregate promise that manages all of the promises. The aggregate
promise may be resolved from within the callback to short-circuit
the promise.
- concurrency: (integer) Pass this configuration option to limit the
allowed number of outstanding concurrently executing promises,
creating a capped pool of promises. There is no limit by default.
Parameters
  • $iterable (mixed) promises or values to iterate

  • $config (array) Configuration options

public Firstred\PostNL\Util\EachPromise::promise()
Returns

\Http\Promise\Promise

private Firstred\PostNL\Util\EachPromise::createPromise()
Returns

void

private Firstred\PostNL\Util\EachPromise::refillPending()
Returns

void

private Firstred\PostNL\Util\EachPromise::addPending()
Returns

bool

private Firstred\PostNL\Util\EachPromise::advanceIterator()
Returns

bool

private Firstred\PostNL\Util\EachPromise::step($idx)
Parameters
  • $idx (mixed)

private Firstred\PostNL\Util\EachPromise::checkIfFinished()
Returns

bool

Util
class Firstred\PostNL\Util\Util
Class Util.
Constants
ERROR_MARGIN = 2
Methods
public static Firstred\PostNL\Util\Util::urlEncode($arr, $prefix=null)
Parameters
  • $arr (array) a map of param keys to values

  • $prefix (string | null)

Returns

string a querystring, essentially

public static Firstred\PostNL\Util\Util::getPdfSizeAndOrientation($pdf)
Parameters
  • $pdf (string) Raw PDF string

Returns

array | false | string Returns an array with the dimensions or ISO size and orientation The orientation is in FPDF format, so L for Landscape and P for Portrait Sizes are in mm

public static Firstred\PostNL\Util\Util::getDeliveryDate($deliveryDate, $mondayDelivery=false, $sundayDelivery=false)
Offline delivery date calculation.
Parameters
  • $deliveryDate (string) Delivery date in any format accepted by DateTime

  • $mondayDelivery (bool) Sunday sorting/Monday delivery enabled

  • $sundayDelivery (bool) Sunday delivery enabled

Returns

string (format: `Y-m-d H:i:s`)

Throws

\Exception

public static Firstred\PostNL\Util\Util::getShippingDate( $deliveryDate, $days=\[0 =\> false, 1 =\> true, 2 =\> true, 3 =\> true, 4 =\> true, 5 =\> true, 6 =\> true\])
Offline shipping date calculation.
Parameters
  • $deliveryDate (string)

  • $days (array)

Returns

string

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

public static Firstred\PostNL\Util\Util::getShippingDaysRemaining($shippingDate, $preferredDeliveryDate)
Calculates amount of days remaining
i.e. preferred delivery date the day tomorrow => today = 0
i.e. preferred delivery date the day after tomorrow => today + tomorrow = 1
i.e. preferred delivery date the day after tomorrow, but one holiday => today + holiday = 0.
0 means: should ship today
< 0 means: should've shipped in the past
anything higher means: you've got some more time
Parameters
  • $shippingDate (string) Shipping date (format: Y-m-d H:i:s)

  • $preferredDeliveryDate (string) Customer preference

Returns

int

Throws

\Exception

protected static Firstred\PostNL\Util\Util::getHolidaysForYear($year)
Get an array with all Dutch holidays for the given year.
Parameters
  • $year (string)

Returns

array Credits to @tvlooy (https://gist.github.com/tvlooy/1894247)

public static Firstred\PostNL\Util\Util::compareGuzzleVersion($a, $b)
DummyLogger
class Firstred\PostNL\Util\DummyLogger
Class DummyLogger.
Implements

Psr\Log\LoggerInterface

Methods
public Firstred\PostNL\Util\DummyLogger::emergency( $message, $context=\[\])
Parameters
  • $message (string)

  • $context (array)

public Firstred\PostNL\Util\DummyLogger::alert( $message, $context=\[\])
Parameters
  • $message (string)

  • $context (array)

public Firstred\PostNL\Util\DummyLogger::critical( $message, $context=\[\])
Parameters
  • $message (string)

  • $context (array)

public Firstred\PostNL\Util\DummyLogger::error( $message, $context=\[\])
Parameters
  • $message (string)

  • $context (array)

public Firstred\PostNL\Util\DummyLogger::warning( $message, $context=\[\])
Parameters
  • $message (string)

  • $context (array)

public Firstred\PostNL\Util\DummyLogger::notice( $message, $context=\[\])
Parameters
  • $message (string)

  • $context (array)

public Firstred\PostNL\Util\DummyLogger::info( $message, $context=\[\])
Parameters
  • $message (string)

  • $context (array)

public Firstred\PostNL\Util\DummyLogger::debug( $message, $context=\[\])
Parameters
  • $message (string)

  • $context (array)

public Firstred\PostNL\Util\DummyLogger::log( $level, $message, $context=\[\])
Parameters
  • $level (mixed)

  • $message (string)

  • $context (array)

Message
class Firstred\PostNL\Util\Message
Class Message.
Constants
RFC7230_HEADER_REGEX = "\(^\(\[^\(\)<\>@,;:\\\\\\"/\[\\\\\]?=\{\}\\x01\- \]\+\+\):\[ \\t\]\*\+\(\(?:\[ \\t\]\*\+\[\!\-~\\x80\-\\xff\]\+\+\)\*\+\)\[ \\t\]\*\+\\r?\\n\)m"
RFC7230_HEADER_FOLD_REGEX = "\(\\r?\\n\[ \\t\]\+\+\)"
Methods
public static Firstred\PostNL\Util\Message::str($message)
Returns the string representation of an HTTP message.
Parameters
  • $message (Psr\Http\Message\MessageInterface) message to convert to a string

Returns

string

public static Firstred\PostNL\Util\Message::parseResponse($message)
Parses a response message string into a response object.
Parameters
  • $message (string) response message string

Returns

\Psr\Http\Message\ResponseInterface

private static Firstred\PostNL\Util\Message::parseMessage($message)
Parses an HTTP message into an associative array.
The array contains the “start-line” key containing the start line of
the message, “headers” key containing an associative array of header
array values, and a “body” key containing the body of the message.
Parameters
  • $message (string) HTTP request or response to parse

Returns

array

Traits
FlexibleEntityTrait
trait Firstred\PostNL\Util\FlexibleEntityTrait
Trait FlexibleEntityTrait.
Methods
public Firstred\PostNL\Util\FlexibleEntityTrait::__call($name, $value)
Add additional properties.
Parameters
  • $name (string)

  • $value (mixed)

Returns

object | null

Throws

\Firstred\PostNL\Exception\InvalidArgumentException

Classes

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

Authors

Maintainers:

Looking for maintainers! If you’d like to help keep this library up to date please send and email to git@michaeldekker.nl

Contributors:

These contributors have helped with making this library possible. Thank you so much!