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-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-3 logging. You can log the requests and responses for debugging purposes. More info on the page Logging.
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.
$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
PHP 5.6 or higher (up to and including 8.0)
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)
opcache.save_comments
set to1
SOAP API Requirements
PHP 5.6 or higher (up to and including 8.0)
JSON extension (both the Shipping webservice and Shipping Status webservice can only be handled by the REST API)
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)
opcache.save_comments
set to1
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-2021 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
This library supports PSR-1, PSR-2, PSR-3, PSR-4, PSR-6, PSR-7 and PSR-18.
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.
The PostNL library has a minimum PHP version requirement of PHP 5.6. Pull requests must not require a PHP version greater than PHP 5.6.
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
Note
You’ll need to use PHP 7.3 or newer in order to perform the tests.
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.2.x
.
{
"require": {
"firstred/postnl-api-php": "dev-1.2.x"
}
}
Note
You will likely have to change the min-stability
setting:
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.
$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.// 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 modeFirstred\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())
);
<?php
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(
CustomerNumber: '11223344',
CustomerCode: 'DEVC',
CollectionLocation: '123456',
ContactPerson: 'Sander',
Email: 'test@voorbeeld.nl',
Name: 'Michael',
Address: new Address(
AddressType: '02',
CompanyName: 'PostNL',
Street: 'Siriusdreef',
HouseNr: '42',
Zipcode: '2132WT',
City: 'Hoofddorp',
Countrycode: 'NL',
),
);
$apikey = 'YOUR_API_KEY_HERE';
$sandbox = true;
$postnl = new PostNL(
customer: $customer,
apiKey: $apikey,
sandbox: $sandbox,
mode: 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:

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;
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class DownloadLabelController extends Controller
{
public function downloadLabelAction(Request $request) {
// Create the label
$label = ...;
return response()
->header('Content-Type', 'application/pdf')
->header('Content-Disposition', 'attachment; filename="label.pdf"');
}
}
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)
);
$postnl = new PostNL(...);
$currentStatusResponse = $postnl->getShippingStatusByBarcode(
barcode: '3SABCD1837238723',
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
combine the delivery date, timeframe and location webservices
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:
Delivery dates (when a shipment could arrive, given the current shipping date)
Shipping dates (when a shipment should be dispatched, given the predicted delivery date)
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
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:
$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.
$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 function accepts the following arguments
- getSentDate
- Required:
True
The
Firstred\PostNL\Entity\Request\GetSentDate
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
Timeframes
$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
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:
$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:
$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 CoordinatesNorthWest())
->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:
Using the Shipping webservice
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
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
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 aFirstred\PostNL\Entity\Shipment
object consists of. TheFirstred\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 aFirstred\PostNL\Entity\Shipment
object consists of. TheFirstred\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:

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->generateShippings(
$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
orFirstred\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
orfalse
to resp. enable or disable a position:

Confirming webservice
Note
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
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
├── 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\InvalidBarcodeException
│ ├── Firstred\PostNL\Exception\InvalidConfigurationException
│ ├── Firstred\PostNL\Exception\InvalidMethodException
│ ├── Firstred\PostNL\Exception\NotImplementedException
│ └── Firstred\PostNL\Exception\NotSupportedException
└── Psr\Cache\InvalidArgumentException
This library throws exceptions for errors that occur during a request.
In the event of an API error a
Firstred\PostNL\Exception\ApiException
is thrownuse Firstred\PostNL\Exception\ApiException; try { $postnl->getTimeframes(...); } catch (ApiException $e) { // ... }
A
Firstred\PostNL\Exception\ResponseException
exception is thrown when a response could not be understood by the library.All exceptions that occur in underlying HTTP Clients are handled by
Firstred\PostNL\Exception\HttpClientException
s.Invalid inputs are handled by the
Firstred\PostNL\Exception\InvalidArgumentException
exceptions.In case of caching problems due to invalid keys, a
Psr\Cache\InvalidArgumentException
is thrown. This could mean that the library is unable to utilize the configured caching library.
If you want to catch all exceptions thrown by this library be sure to catch both Firstred\PostNL\Exception\PostNLException
s and Psr\Cache\InvalidArgumentException
s.
use Firstred\PostNL\Exception\PostNLException;
use Psr\Cache\InvalidArgumentException as PsrCacheInvalidArgumentException;
try {
$postnl->getTimeframes(...);
} catch (PostNLException $e) {
// ...
} catch (PsrCacheInvalidArgumentException $e) {
// ...
}
use Firstred\PostNL\Exception\PostNLException;
use Psr\Cache\InvalidArgumentException as PsrCacheInvalidArgumentException;
try {
$postnl->getTimeframes(...);
} catch (PostNLException | PsrCacheInvalidArgumentException $e) {
// ...
}
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 aDateTimeImmutable
object.
- Times
Times refer to a certain moment on any given day. Can be formatted as
12:12:12
. Is always astring
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 aDateTimeImmutable
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:
HTTPlug client, an Asynchronous HTTP client, PSR-18 HTTP clients
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
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.
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
passing all arguments to the constructor in the right order
or using named parameters,
invoking the create method on an entity (deprecated since v1.4.0, avoid if you can)
or by instantiating an empty entity and calling the setters one by one.
// Your PostNL credentials
$customer = new Customer(
'11223344',
'DEVC',
'123456',
'Sander',
'test@voorbeeld.nl',
'Michael',
new Address(
'02',
'PostNL',
'Siriusdreef',
'42',
'2132WT',
'Hoofddorp',
'NL',
),
);
// Your PostNL credentials
$customer = new Customer(
CustomerNumber: '11223344',
CustomerCode: 'DEVC',
CollectionLocation: '123456',
ContactPerson: 'Sander',
Email: 'test@voorbeeld.nl',
Name: 'Michael',
Address: new Address(
AddressType: '02',
CompanyName: 'PostNL',
Street: 'Siriusdreef',
HouseNr: '42',
Zipcode: '2132WT',
City: 'Hoofddorp',
Countrycode: 'NL',
),
);
$customer = Customer::create([
'CustomerNumber' => '11223344',
'CustomerCode' => 'DEVC',
'CollectionLocation' => '123456',
'ContactPerson' => 'Sander',
'Email' => 'test@voorbeeld.nl',
'Name' => 'Michael',
'Address' => Address::create([
'AddressType' => '02',
'CompanyName' => 'PostNL',
'Street' => 'Siriusdreef',
'HouseNr' => '42',
'Zipcode' => '2132WT',
'City' => 'Hoofddorp',
'Countrycode' => 'NL',
]),
]);
$customer = (new Customer())
->setCustomerNumber('11223344')
->setCustomerCode('DEVC')
->setCollectionLocation('123456')
->setContactPerson('Sander')
->setEmail('test@voorbeeld.nl')
->setName('Michael')
->setAddress((new Address())
->setAddressType('02')
->setCompanyName('PostNL')
->setStreet('Siriusdreef')
->setHouseNr('42')
->setZipcode('2132WT')
->setCity('Hoofddorp')
->setCountrycode('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
\Firstred\PostNL\Entity\Message
- class Firstred\PostNL\Entity\Message\LabellingMessage
- Class LabellingMessage.
- public property Firstred\PostNL\Entity\Message\LabellingMessage::$defaultProperties
- Type
string[][]
- protected static property Firstred\PostNL\Entity\Message\LabellingMessage::$Printertype
- Type
string | null
- 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
- class Firstred\PostNL\Entity\Message\Message
- Class Message.
- 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
- public Firstred\PostNL\Entity\Message\Message::__construct($MessageID=null, $MessageTimeStamp=null)
- Parameters
$MessageID (string | null)
$MessageTimeStamp (string |
\DateTimeInterface
| null)
- Throws
- public Firstred\PostNL\Entity\Message\Message::setMessageTimeStamp($MessageTimeStamp=null)
- Parameters
$MessageTimeStamp (string |
\DateTimeInterface
| null)
- Returns
static
- Throws
- Since
1.2.0
\Firstred\PostNL\Entity\Request
- class Firstred\PostNL\Entity\Request\GetLocation
- Class GetLocation.This class is both the container and can be the actual GetLocation object itself!
- 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
- protected static property Firstred\PostNL\Entity\Request\GetLocation::$RetailNetworkID
- Type
string | null
- public Firstred\PostNL\Entity\Request\GetLocation::__construct($LocationCode=null, $Message=null, $RetailNetworkID=null)
- GetLocation constructor.
- Parameters
$LocationCode (string | null)
$Message (
Firstred\PostNL\Entity\Message\Message
| null)$RetailNetworkID (string | null)
- class Firstred\PostNL\Entity\Request\CompleteStatusByStatus
- Class CompleteStatusByStatus.
- 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
- protected static property Firstred\PostNL\Entity\Request\CompleteStatusByStatus::$Customer
- Type
- protected static property Firstred\PostNL\Entity\Request\CompleteStatusByStatus::$Shipment
- Type
- public Firstred\PostNL\Entity\Request\CompleteStatusByStatus::__construct($Shipment=null, $Customer=null, $Message=null)
- CompleteStatusByStatus constructor.
- Parameters
$Shipment (
Firstred\PostNL\Entity\Shipment
| null)$Customer (
Firstred\PostNL\Entity\Customer
| null)$Message (
Firstred\PostNL\Entity\Message\Message
| null)
- public Firstred\PostNL\Entity\Request\CompleteStatusByStatus::xmlSerialize($writer)
- Return a serializable array for the XMLWriter.
- Parameters
$writer (
Sabre\Xml\Writer
)
- Returns
void
- class Firstred\PostNL\Entity\Request\GetSignature
- Class GetSignature.
- 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
- protected static property Firstred\PostNL\Entity\Request\GetSignature::$Customer
- Type
- protected static property Firstred\PostNL\Entity\Request\GetSignature::$Shipment
- Type
- public Firstred\PostNL\Entity\Request\GetSignature::__construct($Shipment=null, $Customer=null, $Message=null)
- GetSignature constructor.
- Parameters
$Shipment (
Firstred\PostNL\Entity\Shipment
| null)$Customer (
Firstred\PostNL\Entity\Customer
| null)$Message (
Firstred\PostNL\Entity\Message\Message
| null)
- public Firstred\PostNL\Entity\Request\GetSignature::xmlSerialize($writer)
- Return a serializable array for the XMLWriter.
- Parameters
$writer (
Sabre\Xml\Writer
)
- Returns
void
- class Firstred\PostNL\Entity\Request\GetSentDate
- Class GetSentDate.
- 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
- 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
- public Firstred\PostNL\Entity\Request\GetSentDate::setDeliveryDate($deliveryDate=null)
- Parameters
$deliveryDate (string |
\DateTimeInterface
| null)
- Returns
static
- Throws
- 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
- 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
- class Firstred\PostNL\Entity\Request\GetLocationsInArea
- Class GetLocationsInArea.This class is both the container and can be the actual GetLocationsInArea object itself!
- 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
- protected static property Firstred\PostNL\Entity\Request\GetLocationsInArea::$Message
- Type
- public Firstred\PostNL\Entity\Request\GetLocationsInArea::__construct($Countrycode=null, $Location=null, $Message=null)
- GetLocationsInArea constructor.
- Parameters
$Countrycode (string | null)
$Location (
Firstred\PostNL\Entity\Location
| null)$Message (
Firstred\PostNL\Entity\Message\Message
| null)
- class Firstred\PostNL\Entity\Request\CurrentStatusByPhase
- Class CurrentStatusByPhase.
- 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
- protected static property Firstred\PostNL\Entity\Request\CurrentStatusByPhase::$Customer
- Type
- protected static property Firstred\PostNL\Entity\Request\CurrentStatusByPhase::$Shipment
- Type
- public Firstred\PostNL\Entity\Request\CurrentStatusByPhase::__construct($Shipment=null, $Customer=null, $Message=null)
- CurrentStatusByPhase constructor.
- Parameters
$Shipment (
Firstred\PostNL\Entity\Shipment
| null)$Customer (
Firstred\PostNL\Entity\Customer
| null)$Message (
Firstred\PostNL\Entity\Message\Message
| null)
- public Firstred\PostNL\Entity\Request\CurrentStatusByPhase::xmlSerialize($writer)
- Return a serializable array for the XMLWriter.
- Parameters
$writer (
Sabre\Xml\Writer
)
- Returns
void
- class Firstred\PostNL\Entity\Request\CurrentStatusByStatus
- Class CurrentStatusByStatus.
- 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
- protected static property Firstred\PostNL\Entity\Request\CurrentStatusByStatus::$Customer
- Type
- protected static property Firstred\PostNL\Entity\Request\CurrentStatusByStatus::$Shipment
- Type
- public Firstred\PostNL\Entity\Request\CurrentStatusByStatus::__construct($Shipment=null, $Customer=null, $Message=null)
- CurrentStatusByStatus constructor.
- Parameters
$Shipment (
Firstred\PostNL\Entity\Shipment
| null)$Customer (
Firstred\PostNL\Entity\Customer
| null)$Message (
Firstred\PostNL\Entity\Message\Message
| null)
- public Firstred\PostNL\Entity\Request\CurrentStatusByStatus::xmlSerialize($writer)
- Return a serializable array for the XMLWriter.
- Parameters
$writer (
Sabre\Xml\Writer
)
- Returns
void
- class Firstred\PostNL\Entity\Request\GetNearestLocations
- Class GetNearestLocations.This class is both the container and can be the actual GetNearestLocations object itself!
- 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
- protected static property Firstred\PostNL\Entity\Request\GetNearestLocations::$Message
- Type
- public Firstred\PostNL\Entity\Request\GetNearestLocations::__construct($Countrycode=null, $Location=null, $Message=null)
- GetNearestLocations constructor.
- Parameters
$Countrycode (string | null)
$Location (
Firstred\PostNL\Entity\Location
| null)$Message (
Firstred\PostNL\Entity\Message\Message
| null)
- class Firstred\PostNL\Entity\Request\CompleteStatusByReference
- Class CompleteStatusByReference.
- 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
- protected static property Firstred\PostNL\Entity\Request\CompleteStatusByReference::$Customer
- Type
- protected static property Firstred\PostNL\Entity\Request\CompleteStatusByReference::$Shipment
- Type
- public Firstred\PostNL\Entity\Request\CompleteStatusByReference::__construct($Shipment=null, $Customer=null, $Message=null)
- CompleteStatusByReference constructor.
- Parameters
$Shipment (
Firstred\PostNL\Entity\Shipment
| null)$Customer (
Firstred\PostNL\Entity\Customer
| null)$Message (
Firstred\PostNL\Entity\Message\Message
| null)
- public Firstred\PostNL\Entity\Request\CompleteStatusByReference::xmlSerialize($writer)
- Return a serializable array for the XMLWriter.
- Parameters
$writer (
Sabre\Xml\Writer
)
- Returns
void
- class Firstred\PostNL\Entity\Request\CompleteStatus
- Class CompleteStatus.
- 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
- protected static property Firstred\PostNL\Entity\Request\CompleteStatus::$Customer
- Type
- protected static property Firstred\PostNL\Entity\Request\CompleteStatus::$Shipment
- Type
- public Firstred\PostNL\Entity\Request\CompleteStatus::__construct($Shipment=null, $Customer=null, $Message=null)
- CompleteStatus constructor.
- Parameters
$Shipment (
Firstred\PostNL\Entity\Shipment
| null)$Customer (
Firstred\PostNL\Entity\Customer
| null)$Message (
Firstred\PostNL\Entity\Message\Message
| null)
- public Firstred\PostNL\Entity\Request\CompleteStatus::xmlSerialize($writer)
- Return a serializable array for the XMLWriter.
- Parameters
$writer (
Sabre\Xml\Writer
)
- Returns
void
- class Firstred\PostNL\Entity\Request\GetTimeframes
- Class GetTimeframes.
- 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
- protected static property Firstred\PostNL\Entity\Request\GetTimeframes::$Timeframe
- Type
- public Firstred\PostNL\Entity\Request\GetTimeframes::__construct($Message=null, $Timeframes=null)
- GetTimeframes constructor.
- Parameters
$Message (
Firstred\PostNL\Entity\Message\Message
| null)$Timeframes (
Firstred\PostNL\Entity\Timeframe[]
| null)
- public Firstred\PostNL\Entity\Request\GetTimeframes::setTimeframe($timeframes)
- Set timeframes
- Parameters
$timeframes (
Firstred\PostNL\Entity\Timeframe
|\Firstred\PostNL\Entity\Timeframe[]
| null)
- Returns
$this
- Since
1.0.0
- Since
1.0.0
- public Firstred\PostNL\Entity\Request\GetTimeframes::setTimeframes($timeframes)
- Set timeframes
- Parameters
$timeframes (
Firstred\PostNL\Entity\Timeframe
|\Firstred\PostNL\Entity\Timeframe[]
| null)
- Returns
$this
- Since
1.2.0
- public Firstred\PostNL\Entity\Request\GetTimeframes::getTimeframe()
- Get timeframes
- Returns
- public Firstred\PostNL\Entity\Request\GetTimeframes::getTimeframes()
- Get timeframes
- Returns
- Since
1.2.0
- public Firstred\PostNL\Entity\Request\GetTimeframes::xmlSerialize($writer)
- Return a serializable array for the XMLWriter.
- Parameters
$writer (
Sabre\Xml\Writer
)
- Returns
void
- class Firstred\PostNL\Entity\Request\CurrentStatusByReference
- Class CurrentStatusByReference.
- 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
- protected static property Firstred\PostNL\Entity\Request\CurrentStatusByReference::$Customer
- Type
- protected static property Firstred\PostNL\Entity\Request\CurrentStatusByReference::$Shipment
- Type
- public Firstred\PostNL\Entity\Request\CurrentStatusByReference::__construct($Shipment=null, $Customer=null, $Message=null)
- CurrentStatusByReference constructor.
- Parameters
$Shipment (
Firstred\PostNL\Entity\Shipment
| null)$Customer (
Firstred\PostNL\Entity\Customer
| null)$Message (
Firstred\PostNL\Entity\Message\Message
| null)
- public Firstred\PostNL\Entity\Request\CurrentStatusByReference::xmlSerialize($writer)
- Return a serializable array for the XMLWriter.
- Parameters
$writer (
Sabre\Xml\Writer
)
- Returns
void
- class Firstred\PostNL\Entity\Request\GenerateBarcode
- Class GenerateLabel.
- 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
- protected static property Firstred\PostNL\Entity\Request\GenerateBarcode::$Customer
- Type
- protected static property Firstred\PostNL\Entity\Request\GenerateBarcode::$Barcode
- Type
- public Firstred\PostNL\Entity\Request\GenerateBarcode::__construct($Barcode=null, $Customer=null, $Message=null)
- GenerateBarcode constructor.
- Parameters
$Barcode (
Firstred\PostNL\Entity\Barcode
| null)$Customer (
Firstred\PostNL\Entity\Customer
| null)$Message (
Firstred\PostNL\Entity\Message\Message
| null)
- class Firstred\PostNL\Entity\Request\CurrentStatus
- Class CurrentStatus.
- 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
- protected static property Firstred\PostNL\Entity\Request\CurrentStatus::$Customer
- Type
- protected static property Firstred\PostNL\Entity\Request\CurrentStatus::$Shipment
- Type
- public Firstred\PostNL\Entity\Request\CurrentStatus::__construct($Shipment=null, $Customer=null, $Message=null)
- CurrentStatus constructor.
- Parameters
$Shipment (
Firstred\PostNL\Entity\Shipment
| null)$Customer (
Firstred\PostNL\Entity\Customer
| null)$Message (
Firstred\PostNL\Entity\Message\Message
| null)
- public Firstred\PostNL\Entity\Request\CurrentStatus::xmlSerialize($writer)
- Return a serializable array for the XMLWriter.
- Parameters
$writer (
Sabre\Xml\Writer
)
- Returns
void
- class Firstred\PostNL\Entity\Request\CompleteStatusByPhase
- Class CompleteStatusByPhase.
- 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
- protected static property Firstred\PostNL\Entity\Request\CompleteStatusByPhase::$Customer
- Type
- protected static property Firstred\PostNL\Entity\Request\CompleteStatusByPhase::$Shipment
- Type
- public Firstred\PostNL\Entity\Request\CompleteStatusByPhase::__construct($Shipment=null, $Customer=null, $Message=null)
- CompleteStatusByPhase constructor.
- Parameters
$Shipment (
Firstred\PostNL\Entity\Shipment
| null)$Customer (
Firstred\PostNL\Entity\Customer
| null)$Message (
Firstred\PostNL\Entity\Message\Message
| null)
- public Firstred\PostNL\Entity\Request\CompleteStatusByPhase::xmlSerialize($writer)
- Return a serializable array for the XMLWriter.
- Parameters
$writer (
Sabre\Xml\Writer
)
- Returns
void
- class Firstred\PostNL\Entity\Request\GenerateLabel
- Class GenerateLabel.
- 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
- protected static property Firstred\PostNL\Entity\Request\GenerateLabel::$Message
- Type
- protected static property Firstred\PostNL\Entity\Request\GenerateLabel::$Shipments
- Type
- protected static property Firstred\PostNL\Entity\Request\GenerateLabel::$LabelSignature
- Type
string | null
- public Firstred\PostNL\Entity\Request\GenerateLabel::__construct($Shipments=null, $Message=null, $Customer=null, $LabelSignature=null)
- GenerateLabel constructor.
- Parameters
$Shipments (
Firstred\PostNL\Entity\Shipment[]
| null)$Message (
Firstred\PostNL\Entity\Message\LabellingMessage
| null)$Customer (
Firstred\PostNL\Entity\Customer
| null)$LabelSignature (string | null)
- 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
- class Firstred\PostNL\Entity\Request\SendShipment
- Class SendShipment.
- public property Firstred\PostNL\Entity\Request\SendShipment::$defaultProperties
- Type
array
- protected static property Firstred\PostNL\Entity\Request\SendShipment::$Customer
- Type
- protected static property Firstred\PostNL\Entity\Request\SendShipment::$Message
- Type
- protected static property Firstred\PostNL\Entity\Request\SendShipment::$Shipments
- Type
- public Firstred\PostNL\Entity\Request\SendShipment::__construct($Shipments=null, $Message=null, $Customer=null)
- SendShipment constructor.
- Parameters
$Shipments (
Firstred\PostNL\Entity\Shipment[]
| null)$Message (
Firstred\PostNL\Entity\Message\LabellingMessage
| null)$Customer (
Firstred\PostNL\Entity\Customer
| null)
- public Firstred\PostNL\Entity\Request\SendShipment::jsonSerialize()
- Return a serializable array for `json_encode`.
- Returns
array
- class Firstred\PostNL\Entity\Request\Confirming
- Class Confirming.
- 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
- protected static property Firstred\PostNL\Entity\Request\Confirming::$Message
- Type
- protected static property Firstred\PostNL\Entity\Request\Confirming::$Shipments
- Type
- public Firstred\PostNL\Entity\Request\Confirming::__construct($Shipments=null, $Customer=null, $Message=null)
- Confirming constructor.
- Parameters
$Shipments (
Firstred\PostNL\Entity\Shipment[]
| null)$Customer (
Firstred\PostNL\Entity\Customer
| null)$Message (
Firstred\PostNL\Entity\Message\Message
| null)
- 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
- class Firstred\PostNL\Entity\Request\GetDeliveryDate
- Class GetDeliveryDate.This class is both the container and can be the actual GetDeliveryDate object itself!
- 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
- 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
- protected static property Firstred\PostNL\Entity\Request\GetDeliveryDate::$Message
- Type
- 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
- public Firstred\PostNL\Entity\Request\GetDeliveryDate::setShippingDate($shippingDate=null)
- Parameters
$shippingDate (string |
\DateTimeInterface
| null)
- Returns
static
- Throws
- 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
- Since
1.0.0
- Since
1.0.0
- public Firstred\PostNL\Entity\Request\GetDeliveryDate::xmlSerialize($writer)
- Return a serializable array for the XMLWriter.
- Parameters
$writer (
Sabre\Xml\Writer
)
- Returns
void
- class Firstred\PostNL\Entity\Request\GetSentDateRequest
- Class GetSentDateRequest.
- 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
- protected static property Firstred\PostNL\Entity\Request\GetSentDateRequest::$Message
- Type
- public Firstred\PostNL\Entity\Request\GetSentDateRequest::__construct($GetSentDate=null, $Message=null)
- GetSentDate constructor.
- Parameters
$GetSentDate (
Firstred\PostNL\Entity\Request\GetSentDate
| null)$Message (
Firstred\PostNL\Entity\Message\Message
| null)
\Firstred\PostNL\Entity\Response
- class Firstred\PostNL\Entity\Response\GetLocationsResult
- Class GetLocationsResult.
- 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
- public Firstred\PostNL\Entity\Response\GetLocationsResult::__construct($ResponseLocation=null)
- GetLocationsResult constructor.
- Parameters
$ResponseLocation (
Firstred\PostNL\Entity\Response\ResponseLocation[]
| null)
- public Firstred\PostNL\Entity\Response\GetLocationsResult::xmlSerialize($writer)
- Return a serializable array for the XMLWriter.
- Parameters
$writer (
Sabre\Xml\Writer
)
- Returns
void
- class Firstred\PostNL\Entity\Response\SignatureResponse
- Class SignatureResponse.
- 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
- public Firstred\PostNL\Entity\Response\SignatureResponse::__construct($Signature=null)
- SignatureResponse constructor.
- Parameters
$Signature (
Firstred\PostNL\Entity\Signature
| null)
- class Firstred\PostNL\Entity\Response\GetNearestLocationsResponse
- Class GetNearestLocationsResponse.
- 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
- public Firstred\PostNL\Entity\Response\GetNearestLocationsResponse::__construct($GetLocationsResult=null)
- GetNearestLocationsResponse constructor.
- Parameters
$GetLocationsResult (
Firstred\PostNL\Entity\Response\GetLocationsResult
| null)
- public static Firstred\PostNL\Entity\Response\GetNearestLocationsResponse::jsonDeserialize($json)
- Parameters
$json (
stdClass
)
- Returns
mixed |
\stdClass
| null- Throws
- Throws
- Throws
- Throws
- Since
1.2.0
- public Firstred\PostNL\Entity\Response\GetNearestLocationsResponse::jsonSerialize()
- Return a serializable array for `json_encode`.
- Returns
array
- class Firstred\PostNL\Entity\Response\ResponseShipment
- Class ResponseShipment.
- 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
- protected static property Firstred\PostNL\Entity\Response\ResponseShipment::$ProductCodeDelivery
- Type
string | null
- protected static property Firstred\PostNL\Entity\Response\ResponseShipment::$Warnings
- Type
- public Firstred\PostNL\Entity\Response\ResponseShipment::__construct($Barcode=null, $ProductCodeDelivery=null, $Labels=null, $DownPartnerBarcode=null, $DownPartnerID=null, $DownPartnerLocation=null, $Warnings=null)
- Parameters
$Barcode (string | null)
$ProductCodeDelivery (string | null)
$Labels (
Firstred\PostNL\Entity\Label[]
| null)$DownPartnerBarcode (string | null)
$DownPartnerID (string | null)
$DownPartnerLocation (string | null)
$Warnings (
Firstred\PostNL\Entity\Warning[]
| null)
- class Firstred\PostNL\Entity\Response\CompleteStatusResponseEvent
- Class CompleteStatusResponseEvent.
- 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
- 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
- public Firstred\PostNL\Entity\Response\CompleteStatusResponseEvent::setTimeStamp($TimeStamp=null)
- Parameters
$TimeStamp (string |
\DateTimeInterface
| null)
- Returns
static
- Throws
- Since
1.2.0
- class Firstred\PostNL\Entity\Response\ResponseTimeframes
- Class ResponseTimeframes.
- public property Firstred\PostNL\Entity\Response\ResponseTimeframes::$defaultProperties
- Type
array
- protected static property Firstred\PostNL\Entity\Response\ResponseTimeframes::$ReasonNoTimeframes
- Type
- protected static property Firstred\PostNL\Entity\Response\ResponseTimeframes::$Timeframes
- Type
- public Firstred\PostNL\Entity\Response\ResponseTimeframes::__construct($ReasonNoTimeframes=null, $Timeframes=null)
- Parameters
$ReasonNoTimeframes (
Firstred\PostNL\Entity\ReasonNoTimeframe[]
| null)$Timeframes (
Firstred\PostNL\Entity\Timeframe[]
| null)
- public Firstred\PostNL\Entity\Response\ResponseTimeframes::jsonSerialize()
- Return a serializable array for `json_encode`.
- Returns
array
- class Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment
- Class CompleteStatusResponseShipment.
- 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
- protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::$Barcode
- Type
- protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::$Customer
- Type
- 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
- protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::$Expectation
- Type
- protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::$Groups
- Type
- protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::$MainBarcode
- Type
string | null
- protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::$OldStatuses
- 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
- 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
- protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::$Warnings
- Type
- 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
$Addresses (
Firstred\PostNL\Entity\Response\StatusAddress[]
| null)$Amounts (
Firstred\PostNL\Entity\Amount[]
| null)$Barcode (string | null)
$Customer (
Firstred\PostNL\Entity\Customer
| null)$DeliveryDate (
DateTimeInterface
| string | null)$Dimension (
Firstred\PostNL\Entity\Dimension
| null)$Events (
Firstred\PostNL\Entity\Response\CompleteStatusResponseEvent[]
| null)$Expectation (
Firstred\PostNL\Entity\Expectation
| null)$Groups (
Firstred\PostNL\Entity\Group[]
| null)$OldStatuses (
Firstred\PostNL\Entity\Response\CompleteStatusResponseOldStatus[]
| null)$ProductCode (string | null)
$ProductOptions (
Firstred\PostNL\Entity\ProductOption[]
| null)$Reference (string | null)
$Status (
Firstred\PostNL\Entity\Status
| null)$Warnings (
Firstred\PostNL\Entity\Warning[]
| null)$MainBarcode (string | null)
$ShipmentAmount (string | null)
$ShipmentCounter (string | null)
$ProductDescription (string | null)
- Throws
- public Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::setDeliveryDate($deliveryDate=null)
- Parameters
$deliveryDate (string |
\DateTimeInterface
| null)
- Returns
static
- Throws
- Since
1.2.0
- public static Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment::jsonDeserialize($json)
- Parameters
$json (
stdClass
)
- Returns
mixed |
\stdClass
| null- Throws
- Throws
- Throws
- Throws
- 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
- class Firstred\PostNL\Entity\Response\ResponseGroup
- Class ResponseGroup.
- 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
- 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)
- class Firstred\PostNL\Entity\Response\GenerateBarcodeResponse
- Class GenerateBarcodeResponse.
- class Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse
- Class GetLocationsInAreaResponse.
- 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
- public Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse::__construct($GetLocationsResult=null)
- GetLocationsInAreaResponse constructor.
- Parameters
$GetLocationsResult (
Firstred\PostNL\Entity\Response\GetLocationsResult
| null)
- public Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse::jsonSerialize()
- Return a serializable array for `json_encode`.
- Returns
array
- class Firstred\PostNL\Entity\Response\CurrentStatusResponse
- Class CurrentStatusResponse.
- 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
- protected static property Firstred\PostNL\Entity\Response\CurrentStatusResponse::$Warnings
- Type
- public Firstred\PostNL\Entity\Response\CurrentStatusResponse::__construct($Shipments=null, $Warnings=null)
- CurrentStatusResponse constructor.
- Parameters
$Shipments (
Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment[]
| null)$Warnings (
Firstred\PostNL\Entity\Warning[]
| null)
- public Firstred\PostNL\Entity\Response\CurrentStatusResponse::xmlSerialize($writer)
- Return a serializable array for the XMLWriter.
- Parameters
$writer (
Sabre\Xml\Writer
)
- Returns
void
- class Firstred\PostNL\Entity\Response\CompleteStatusResponse
- Class CompleteStatusResponse.
- 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
- protected static property Firstred\PostNL\Entity\Response\CompleteStatusResponse::$Warnings
- Type
- public Firstred\PostNL\Entity\Response\CompleteStatusResponse::__construct($Shipments=null, $Warnings=null)
- CompleteStatusResponse constructor.
- Parameters
$Shipments (
Firstred\PostNL\Entity\Response\CompleteStatusResponseShipment[]
| null)$Warnings (
Firstred\PostNL\Entity\Response\Warnings[]
| null)
- 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
- class Firstred\PostNL\Entity\Response\ResponseLocation
- Class ResponseLocation.
- 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
- 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
- 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
- protected static property Firstred\PostNL\Entity\Response\ResponseLocation::$DownPartnerID
- Type
string | null
- protected static property Firstred\PostNL\Entity\Response\ResponseLocation::$DownPartnerLocation
- Type
string | null
- 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)
- 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)
- public static Firstred\PostNL\Entity\Response\ResponseLocation::jsonDeserialize($json)
- class Firstred\PostNL\Entity\Response\MergedLabel
- Class MergedLabel.
- 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
- public Firstred\PostNL\Entity\Response\MergedLabel::__construct($Barcodes=null, $Labels=null)
- Parameters
$Barcodes (string[] | null)
$Labels (
Firstred\PostNL\Entity\Label[]
| null)
- class Firstred\PostNL\Entity\Response\GetSentDateResponse
- Class GetSentDateResponse.
- 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
- public Firstred\PostNL\Entity\Response\GetSentDateResponse::__construct($GetSentDate=null, $Options=null)
- GetSentDateResponse constructor.
- Parameters
$GetSentDate (
DateTimeInterface
| string | null)$Options (string[] | null)
- Throws
- public Firstred\PostNL\Entity\Response\GetSentDateResponse::setSentDate($SentDate=null)
- Parameters
$SentDate (string |
\DateTimeInterface
| null)
- Returns
static
- Throws
- 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
- class Firstred\PostNL\Entity\Response\UpdatedShipmentsResponse
- Class CompleteStatusResponse.
- 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
- 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
- public Firstred\PostNL\Entity\Response\UpdatedShipmentsResponse::setCreationDate($CreationDate=null)
- Parameters
$CreationDate (string |
\DateTimeInterface
| null)
- Returns
static
- Throws
- Since
1.2.0
- class Firstred\PostNL\Entity\Response\GetSignatureResponseSignature
- Class GetSignatureResponseSignature.
- 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
- 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
- public Firstred\PostNL\Entity\Response\GetSignatureResponseSignature::setSignatureDate($SignatureDate=null)
- Parameters
$SignatureDate (string |
\DateTimeInterface
| null)
- Returns
static
- Throws
- Since
1.2.0
- class Firstred\PostNL\Entity\Response\ResponseAmount
- Class ResponseAmount.
- 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
- 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)
- class Firstred\PostNL\Entity\Response\GenerateLabelResponse
- Class GenerateLabelResponse.
- 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
- protected static property Firstred\PostNL\Entity\Response\GenerateLabelResponse::$ResponseShipments
- public Firstred\PostNL\Entity\Response\GenerateLabelResponse::__construct($MergedLabels=null, $ReponseShipments=null)
- GenerateLabelResponse constructor.
- Parameters
$MergedLabels (
Firstred\PostNL\Entity\Response\MergedLabel[]
| null)$ReponseShipments (
Firstred\PostNL\Entity\Response\ResponseShipment[]
| null)
- class Firstred\PostNL\Entity\Response\ResponseAddress
- Class ResponseAddress.
- 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
- 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
- class Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment
- Class CurrentStatusResponseShipment.
- public property Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::$defaultProperties
- Type
string[][]
- protected static property Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::$Addresses
- Type
- protected static property Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::$Amounts
- Type
- protected static property Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::$Barcode
- Type
- 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
- protected static property Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::$Groups
- Type
- 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
- 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
- protected static property Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::$Warnings
- Type
- 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
$Addresses (
Firstred\PostNL\Entity\StatusAddress[]
| null)$Amounts (
Firstred\PostNL\Entity\Amount[]
| null)$Barcode (string | null)
$DeliveryDate (
DateTimeInterface
| string | null)$Dimension (
Firstred\PostNL\Entity\Dimension
| null)$Expectation (
Firstred\PostNL\Entity\Expectation
| null)$Groups (
Firstred\PostNL\Entity\Group[]
| null)$ProductCode (string | null)
$ProductOptions (
Firstred\PostNL\Entity\ProductOption[]
| null)$Reference (string | null)
$Status (
Firstred\PostNL\Entity\Status
| null)$Warnings (
Firstred\PostNL\Entity\Warning[]
| null)$MainBarcode (string | null)
$ProductDescription (string | null)
- Throws
- public Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::setDeliveryDate($deliveryDate=null)
- Parameters
$deliveryDate (string |
\DateTimeInterface
| null)
- Returns
static
- Throws
- Since
1.2.0
- public static Firstred\PostNL\Entity\Response\CurrentStatusResponseShipment::jsonDeserialize($json)
- Parameters
$json (
stdClass
)
- Returns
mixed |
\stdClass
| null- Throws
- Throws
- Throws
- Throws
- 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
- class Firstred\PostNL\Entity\Response\ConfirmingResponseShipment
- Class ConfirmingResponseShipment.
- 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
- public Firstred\PostNL\Entity\Response\ConfirmingResponseShipment::__construct($Barcode=null, $Warnings=null)
- Parameters
$Barcode (string | null)
$Warnings (
Firstred\PostNL\Entity\Warning[]
| null)
- class Firstred\PostNL\Entity\Response\GetDeliveryDateResponse
- Class GetDeliveryDateResponse.
- 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
- public Firstred\PostNL\Entity\Response\GetDeliveryDateResponse::__construct($DeliveryDate=null, $Options=null)
- GetDeliveryDateResponse constructor.
- Parameters
$DeliveryDate (string |
\DateTimeInterface
| null)$Options (string[] | null)
- Throws
- public Firstred\PostNL\Entity\Response\GetDeliveryDateResponse::setDeliveryDate($DeliveryDate=null)
- Parameters
$DeliveryDate (
DateTimeInterface
| string | null)
- Returns
static
- Throws
- 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
- class Firstred\PostNL\Entity\Response\SendShipmentResponse
- Class SendShipmentResponse.
- public property Firstred\PostNL\Entity\Response\SendShipmentResponse::$defaultProperties
- Type
array | null
- protected static property Firstred\PostNL\Entity\Response\SendShipmentResponse::$MergedLabels
- Type
- protected static property Firstred\PostNL\Entity\Response\SendShipmentResponse::$ResponseShipments
- public Firstred\PostNL\Entity\Response\SendShipmentResponse::__construct($MergedLabels=null, $ReponseShipments=null)
- SendShipmentResponse constructor.
- Parameters
$MergedLabels (
Firstred\PostNL\Entity\Response\MergedLabel[]
| null)$ReponseShipments (
Firstred\PostNL\Entity\Response\ResponseShipment[]
| null)
- class Firstred\PostNL\Entity\Response\CompleteStatusResponseOldStatus
- Class CompleteStatusResponseOldStatus.
- 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
- 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
- public Firstred\PostNL\Entity\Response\CompleteStatusResponseOldStatus::setTimeStamp($TimeStamp=null)
- Parameters
$TimeStamp (string |
\DateTimeInterface
| null)
- Returns
static
- Throws
- Since
1.2.0
\Firstred\PostNL\Entity\SOAP
- class Firstred\PostNL\Entity\SOAP\Header
- Class Header.NOTE: this class has been introduced for deserializing
- class Firstred\PostNL\Entity\SOAP\Body
- Class Body.NOTE: this class has been introduced for deserializing
- class Firstred\PostNL\Entity\SOAP\UsernameToken
- Class UsernameToken.
- 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
- 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
- class Firstred\PostNL\Entity\SOAP\Security
- Class Security.
- SECURITY_NAMESPACE = \'http://docs\.oasis\-open\.org/wss/2004/01/oasis\-200401\-wss\-wssecurity\-secext\-1\.0\.xsd\'
- public property Firstred\PostNL\Entity\SOAP\Security::$defaultProperties
- Type
string[][]
- protected static property Firstred\PostNL\Entity\SOAP\Security::$UsernameToken
- public Firstred\PostNL\Entity\SOAP\Security::__construct($UserNameToken=null)
- Security constructor.
- Parameters
$UserNameToken (
Firstred\PostNL\Entity\SOAP\UsernameToken
)
- class Firstred\PostNL\Entity\SOAP\Envelope
- Class Envelope.
- 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
- protected static property Firstred\PostNL\Entity\SOAP\Envelope::$Body
- Type
- public Firstred\PostNL\Entity\SOAP\Envelope::__construct($Header=null, $Body=null)
- Envelope constructor.
- Parameters
$Header (
Firstred\PostNL\Entity\SOAP\Header
| null)$Body (
Firstred\PostNL\Entity\SOAP\Body
| null)
Classes
- class Firstred\PostNL\Entity\CoordinatesSouthEast
- Class CoordinatesSouthEast.
- 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
- class Firstred\PostNL\Entity\OldStatus
- Class OldStatus.
- 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
- 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)
- class Firstred\PostNL\Entity\StatusAddress
- Class StatusAddress.
- 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
- 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
- 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
- Since
1.2.0
- class Firstred\PostNL\Entity\Warning
- Class Warning.
- 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
- 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
- Throws
- Throws
- Throws
- class Firstred\PostNL\Entity\ReasonNoTimeframe
- Class ReasonNoTimeframe.
- 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
- public Firstred\PostNL\Entity\ReasonNoTimeframe::__construct($Code=null, $Date=null, $Description=null, $Options=null, $From=null, $To=null)
- ReasonNoTimeframe constructor.
- Parameters
$Code (string | null)
$Date (string |
\DateTimeInterface
| null)$Description (string | null)
$Options (string[] | null)
$From (string | null)
$To (string | null)
- Throws
- public Firstred\PostNL\Entity\ReasonNoTimeframe::setDate($date=null)
- Set date
- Parameters
$date (string |
\DateTimeInterface
| null)
- Returns
static
- Throws
- Since
1.2.0
- public static Firstred\PostNL\Entity\ReasonNoTimeframe::jsonDeserialize($json)
- Parameters
$json (
stdClass
)
- Returns
mixed |
\stdClass
| null- Throws
- Throws
- Throws
- Throws
- 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
- class Firstred\PostNL\Entity\Area
- Class Area.
- public property Firstred\PostNL\Entity\Area::$defaultProperties
- Type
string[][]
- protected static property Firstred\PostNL\Entity\Area::$CoordinatesNorthWest
- Type
- protected static property Firstred\PostNL\Entity\Area::$CoordinatesSouthEast
- Type
- public Firstred\PostNL\Entity\Area::__construct($CoordinatesNorthWest=null, $CoordinatesSouthEast=null)
- Parameters
$CoordinatesNorthWest (
Firstred\PostNL\Entity\Coordinates
| null)$CoordinatesSouthEast (
Firstred\PostNL\Entity\Coordinates
| null)
- class Firstred\PostNL\Entity\Contact
- Class Contact.
- 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
- 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
- class Firstred\PostNL\Entity\Event
- Class Event.
- public property Firstred\PostNL\Entity\Event::$defaultProperties
- Type
string[][]
- protected static property Firstred\PostNL\Entity\Event::$CompleteStatusResponseEvent
- public Firstred\PostNL\Entity\Event::__construct($CompleteStatusResponseEvent=null)
- Parameters
$CompleteStatusResponseEvent (
Firstred\PostNL\Entity\Response\CompleteStatusResponseEvent
| null)
- class Firstred\PostNL\Entity\AbstractEntity
- Class Entity.
- Implements
JsonSerializable
Firstred\PostNL\Util\XmlSerializable
- 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
- 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
- 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
- public Firstred\PostNL\Entity\AbstractEntity::jsonSerialize()
- Return a serializable array for `json_encode`.
- Returns
array
- Throws
- public Firstred\PostNL\Entity\AbstractEntity::xmlSerialize($writer)
- Return a serializable array for the XMLWriter.
- Parameters
$writer (
Sabre\Xml\Writer
)
- Returns
void
- Throws
- public static Firstred\PostNL\Entity\AbstractEntity::jsonDeserialize($json)
- Deserialize JSON.
- Parameters
$json (
stdClass
) JSON object {“EntityName”: object}
- Returns
static
- Throws
- Throws
- Throws
- Throws
- 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
- 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
- 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
- Since
1.2.0
- class Firstred\PostNL\Entity\Label
- Class Label.
- 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::$Contenttype
- Type
string | null
- protected static property Firstred\PostNL\Entity\Label::$Labeltype
- Type
string | null
- class Firstred\PostNL\Entity\Expectation
- Class Expectation.
- 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
- public Firstred\PostNL\Entity\Expectation::__construct($ETAFrom=null, $ETATo=null)
- Parameters
$ETAFrom (
DateTimeInterface
| string | null)$ETATo (
DateTimeInterface
| string | null)
- Throws
- public Firstred\PostNL\Entity\Expectation::setETAFrom($ETAFrom=null)
- Parameters
$ETAFrom (
DateTimeInterface
| string | null)
- Returns
static
- Throws
- Since
1.2.0
- public Firstred\PostNL\Entity\Expectation::setETATo($ETATo=null)
- Parameters
$ETATo (
DateTimeInterface
| string | null)
- Returns
static
- Throws
- Since
1.2.0
- class Firstred\PostNL\Entity\Timeframes
- Class Timeframes.
- public property Firstred\PostNL\Entity\Timeframes::$defaultProperties
- Type
string[][]
- protected static property Firstred\PostNL\Entity\Timeframes::$Timeframes
- Type
- protected static property Firstred\PostNL\Entity\Timeframes::$TimeframeTimeFrames
- Type
- public Firstred\PostNL\Entity\Timeframes::__construct($timeframes=null, $timeframetimeframes=null)
- Timeframes constructor.
- Parameters
$timeframes (array | null)
$timeframetimeframes (
Firstred\PostNL\Entity\TimeframeTimeFrame[]
| null)
- public Firstred\PostNL\Entity\Timeframes::jsonSerialize()
- Return a serializable array for `json_encode`.
- Returns
array
- class Firstred\PostNL\Entity\Group
- Class Group.
- 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
- class Firstred\PostNL\Entity\Address
- Class Address.
- 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
- 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
- class Firstred\PostNL\Entity\Customer
- Class Customer.
- public property Firstred\PostNL\Entity\Customer::$defaultProperties
- Type
string[][]
- protected static property Firstred\PostNL\Entity\Customer::$Address
- Type
- 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
- 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)
- class Firstred\PostNL\Entity\Coordinates
- Class Coordinates.
- class Firstred\PostNL\Entity\Signature
- Class Signature.
- class Firstred\PostNL\Entity\Amount
- Class Amount.
- 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
- 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
- class Firstred\PostNL\Entity\Dimension
- Class Dimension.
- 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
- class Firstred\PostNL\Entity\Barcode
- Class Barcode.
- 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
- class Firstred\PostNL\Entity\Location
- Class Location.
- 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
- protected static property Firstred\PostNL\Entity\Location::$CoordinatesNorthWest
- Type
- protected static property Firstred\PostNL\Entity\Location::$CoordinatesSouthEast
- Type
- 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
- 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
- public Firstred\PostNL\Entity\Location::setDeliveryDate($DeliveryDate=null)
- Parameters
$DeliveryDate (string |
\DateTimeInterface
| null)
- Returns
static
- Throws
- Since
1.2.0
- public Firstred\PostNL\Entity\Location::setPostalcode($Postalcode=null)
- Set the postcode.
- Parameters
$Postalcode (string | null)
- Returns
- public Firstred\PostNL\Entity\Location::setAllowSundaySorting($AllowSundaySorting=null)
- Parameters
$AllowSundaySorting (string | bool | int | null)
- Returns
- 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
- class Firstred\PostNL\Entity\ProductOption
- Class ProductOption.
- class Firstred\PostNL\Entity\Shipment
- Class Shipment.
- public property Firstred\PostNL\Entity\Shipment::$defaultProperties
- Type
string[][]
- protected static property Firstred\PostNL\Entity\Shipment::$Addresses
- Type
- protected static property Firstred\PostNL\Entity\Shipment::$Amounts
- Type
- 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
- 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
- protected static property Firstred\PostNL\Entity\Shipment::$Customs
- Type
- 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
- 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
- protected static property Firstred\PostNL\Entity\Shipment::$Groups
- Type
- 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
- 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
- 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
- public Firstred\PostNL\Entity\Shipment::setCollectionTimeStampStart($CollectionTimeStampStart=null)
- Parameters
$CollectionTimeStampStart (string |
\DateTimeInterface
| null)
- Returns
static
- Throws
- Since
1.2.0
- public Firstred\PostNL\Entity\Shipment::setCollectionTimeStampEnd($CollectionTimeStampEnd=null)
- Parameters
$CollectionTimeStampEnd (string |
\DateTimeInterface
| null)
- Returns
static
- Throws
- Since
1.2.0
- public Firstred\PostNL\Entity\Shipment::setDeliveryTimeStampStart($DeliveryTimeStampStart=null)
- Parameters
$DeliveryTimeStampStart (string |
\DateTimeInterface
| null)
- Returns
static
- Throws
- Since
1.2.0
- public Firstred\PostNL\Entity\Shipment::setDeliveryTimeStampEnd($DeliveryTimeStampEnd=null)
- Parameters
$DeliveryTimeStampEnd (string |
\DateTimeInterface
| null)
- Returns
static
- Throws
- Since
1.2.0
- public Firstred\PostNL\Entity\Shipment::setDeliveryDate($DeliveryDate=null)
- Parameters
$DeliveryDate (string |
\DateTimeInterface
| null)
- Returns
static
- Throws
- 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
- class Firstred\PostNL\Entity\Status
- Class Status.
- 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
- 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
- public Firstred\PostNL\Entity\Status::setTimeStamp($TimeStamp=null)
- Parameters
$TimeStamp (string |
\DateTimeInterface
| null)
- Returns
static
- Throws
- Since
1.2.0
- public Firstred\PostNL\Entity\Status::getCurrentStatusPhaseCode()
- Backward compatible with SOAP API
- Returns
string | null
- Since
1.2.0
- public Firstred\PostNL\Entity\Status::getCurrentStatusPhaseDescription()
- Backward compatible with SOAP API
- Returns
string | null
- Since
1.2.0
- public Firstred\PostNL\Entity\Status::getCurrentStatusStatusCode()
- Backward compatible with SOAP API
- Returns
string | null
- Since
1.2.0
- public Firstred\PostNL\Entity\Status::getCurrentStatusStatusDescription()
- Backward compatible with SOAP API
- Returns
string | null
- Since
1.2.0
- public Firstred\PostNL\Entity\Status::getCurrentStatusTimeStamp()
- Backward compatible with SOAP API
- Returns
string | null
- Since
1.2.0
- public Firstred\PostNL\Entity\Status::getCompleteStatusPhaseCode()
- Backward compatible with SOAP API
- Returns
string | null
- Since
1.2.0
- public Firstred\PostNL\Entity\Status::getCompleteStatusPhaseDescription()
- Backward compatible with SOAP API
- Returns
string | null
- Since
1.2.0
- public Firstred\PostNL\Entity\Status::getCompleteStatusStatusCode()
- Backward compatible with SOAP API
- Returns
string | null
- Since
1.2.0
- public Firstred\PostNL\Entity\Status::getCompleteStatusStatusDescription()
- Backward compatible with SOAP API
- Returns
string | null
- Since
1.2.0
- public Firstred\PostNL\Entity\Status::getCompleteStatusTimeStamp()
- Backward compatible with SOAP API
- Returns
string | null
- Since
1.2.0
- class Firstred\PostNL\Entity\Timeframe
- Class Timeframe.
- 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
- 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
- public Firstred\PostNL\Entity\Timeframe::setDate($Date=null)
- Parameters
$Date (null)
- Returns
static
- Throws
- Since
1.2.0
- public Firstred\PostNL\Entity\Timeframe::setStartDate($StartDate=null)
- Parameters
$StartDate (string |
\DateTimeInterface
| null)
- Returns
static
- Throws
- Since
1.2.0
- public Firstred\PostNL\Entity\Timeframe::setEndDate($EndDate=null)
- Parameters
$EndDate (string |
\DateTimeInterface
| null)
- Returns
static
- Throws
- 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
- 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
\InvalidArgumentException
- class Firstred\PostNL\Entity\Customs
- Class Customs.
- 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
- 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
- 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)
- class Firstred\PostNL\Entity\TimeframeTimeFrame
- Class TimeframeTimeFrame.
- 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
- public Firstred\PostNL\Entity\TimeframeTimeFrame::__construct($GetSentDate=null, $From=null, $To=null, $Options=null)
- Parameters
$GetSentDate (string |
\DateTimeInterface
| null)$From (string | null)
$To (string | null)
$Options (string[] | null)
- Throws
- public Firstred\PostNL\Entity\TimeframeTimeFrame::setDate($Date=null)
- Parameters
$Date (string |
\DateTimeInterface
| null)
- Returns
static
- Throws
- Since
1.2.0
- public static Firstred\PostNL\Entity\TimeframeTimeFrame::jsonDeserialize($json)
- Parameters
$json (
stdClass
)
- Returns
mixed |
\stdClass
| null- Throws
- Throws
- Throws
- Throws
- Since
1.2.0
- class Firstred\PostNL\Entity\CoordinatesNorthWest
- Class CoordinatesNorthWest.
- 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
- class Firstred\PostNL\Entity\CutOffTime
- Class CutOffTime.
- 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
- 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
- class Firstred\PostNL\Entity\Content
- Class Content.
- 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
- 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)
- class Firstred\PostNL\Entity\OpeningHours
- Class OpeningHours.
- Parent
- Implements
ArrayAccess
Iterator
- 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
- 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
- Throws
- Throws
- Throws
- Throws
- 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
- 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
- Throws
- Throws
- Throws
- Since
1.2.0
- public Firstred\PostNL\Entity\OpeningHours::next()
- Since
1.2.0
- public Firstred\PostNL\Entity\OpeningHours::key()
- Returns
string
- Throws
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
- Since
1.2.0
Exception
\Firstred\PostNL\Exception
Namespaces
\Firstred\PostNL\Exception\Promise
- 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
- private static property Firstred\PostNL\Exception\Promise\RejectionException::$reason
- Type
mixed Rejection reason.
- 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
- class Firstred\PostNL\Exception\Promise\CancellationException
- Exception that is set as the reason for a promise that has been cancelled.
Classes
- class Firstred\PostNL\Exception\ApiConnectionException
- Class ApiConnectionException.
- 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
- 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
- class Firstred\PostNL\Exception\NotSupportedException
- Class NotSupportedException
- class Firstred\PostNL\Exception\InvalidMethodException
- Class InvalidMethodException.
- class Firstred\PostNL\Exception\ResponseException
- Class ResponseException
- private static property Firstred\PostNL\Exception\ResponseException::$response
- Type
\Psr\Http\Message\ResponseInterface
- 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
- class Firstred\PostNL\Exception\InvalidBarcodeException
- Class InvalidBarcodeException.
- class Firstred\PostNL\Exception\CifException
- Class CifException.
- 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[]
- class Firstred\PostNL\Exception\CifDownException
- Class CifDownException.
- class Firstred\PostNL\Exception\PostNLException
- Class AbstractException
- Parent
Exception
- class Firstred\PostNL\Exception\InvalidArgumentException
- Class InvalidArgumentException.
- class Firstred\PostNL\Exception\HttpClientException
- Class HttpClientException
- private static property Firstred\PostNL\Exception\HttpClientException::$response
- Type
\Psr\Http\Message\ResponseInterface
- 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
- class Firstred\PostNL\Exception\InvalidConfigurationException
- Class InvalidConfigurationException.
- class Firstred\PostNL\Exception\NotImplementedException
- Class NotImplementedException.
- class Firstred\PostNL\Exception\ShipmentNotFoundException
- Class InvalidArgumentException.
Factory
\Firstred\PostNL\Factory
Interfaces
- interface Firstred\PostNL\Factory\StreamFactoryInterface
- Factory for PSR-7 Stream.
- 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 modesupported 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
- 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
Classes
- class Firstred\PostNL\Factory\GuzzleResponseFactory
- Class GuzzleResponseFactory
- class Firstred\PostNL\Factory\GuzzleRequestFactory
- Class GuzzleRequestFactory
- class Firstred\PostNL\Factory\GuzzleStreamFactory
- Class GuzzleStreamFactory
- 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
- interface Firstred\PostNL\HttpClient\ClientInterface
- Interface ClientInterface.
- 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 requestsUsing 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
- 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
- class Firstred\PostNL\HttpClient\BaseHttpClient
- 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
- 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 requestsUsing the ID you can replace a request.
- Parameters
$id (string) Request ID
$request (
Psr\Http\Message\RequestInterface
) PSR-7 request
- Returns
int | string
- Throws
- 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
- public Firstred\PostNL\HttpClient\BaseHttpClient::getRequestFactory()
- Get PSR-7 Request factory.
- Returns
\Psr\Http\Message\RequestFactoryInterface
|\Firstred\PostNL\Factory\RequestFactoryInterface
- Throws
- Since
1.3.0
- public Firstred\PostNL\HttpClient\BaseHttpClient::setRequestFactory($requestFactory)
- Set PSR-7 Request factory.
- Parameters
$requestFactory (
Psr\Http\Message\RequestFactoryInterface
|\Firstred\PostNL\Factory\RequestFactoryInterface
)
- 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
- Since
1.3.0
- public Firstred\PostNL\HttpClient\BaseHttpClient::setResponseFactory($responseFactory)
- Set PSR-7 Response factory.
- Parameters
$responseFactory (
Psr\Http\Message\ResponseFactoryInterface
|\Firstred\PostNL\Factory\ResponseFactoryInterface
)
- 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
- Since
1.3.0
- public Firstred\PostNL\HttpClient\BaseHttpClient::setStreamFactory($streamFactory)
- Set PSR-7 Stream factory.
- Parameters
$streamFactory (
Psr\Http\Message\StreamFactoryInterface
|\Firstred\PostNL\Factory\StreamFactoryInterface
)
- Returns
static
- Since
1.3.0
- class Firstred\PostNL\HttpClient\HTTPlugClient
- Class HTTPlugClient.
- protected property Firstred\PostNL\HttpClient\HTTPlugClient::$instance
- Type
static
- protected static property Firstred\PostNL\HttpClient\HTTPlugClient::$client
- Type
\Http\Client\HttpAsyncClient
|\Http\Client\HttpClient
- 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
- 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
- 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
- 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
- Throws
- Deprecated
Please instantiate a new client rather than using this singleton
- public Firstred\PostNL\HttpClient\HTTPlugClient::setVerify($verify)
- Parameters
$verify (bool | string)
- Returns
- Deprecated
- public Firstred\PostNL\HttpClient\HTTPlugClient::getVerify()
- Returns
bool | string | void
- Deprecated
- class Firstred\PostNL\HttpClient\CurlClient
- Class CurlClient.
- Parent
- Implements
Firstred\PostNL\HttpClient\ClientInterface
Psr\Log\LoggerAwareInterface
- private property Firstred\PostNL\HttpClient\CurlClient::$instance
- Type
static
- protected static property Firstred\PostNL\HttpClient\CurlClient::$defaultOptions
- Type
array | callable | null
- public static Firstred\PostNL\HttpClient\CurlClient::getInstance()
- CurlClient Singleton.
- Returns
- 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
- 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
- protected Firstred\PostNL\HttpClient\CurlClient::prepareRequest($curl, $request)
- Parameters
$curl (resource)
$request (
Psr\Http\Message\RequestInterface
)
- Throws
- private Firstred\PostNL\HttpClient\CurlClient::handleCurlError($url, $errno, $message)
- Parameters
$url
$errno (
Firstred\PostNL\HttpClient\number
)$message (string)
- Throws
- class Firstred\PostNL\HttpClient\SymfonyHttpClient
- Class SymfonyHttpClientInterface.
- Parent
- Implements
Firstred\PostNL\HttpClient\ClientInterface
Psr\Log\LoggerAwareInterface
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- Throws
\Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface
- Throws
\Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface
- Throws
\Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface
- Since
1.3.0
- class Firstred\PostNL\HttpClient\MockClient
- Class MockClient.
- Parent
- Implements
Firstred\PostNL\HttpClient\ClientInterface
Psr\Log\LoggerAwareInterface
- 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
- public static Firstred\PostNL\HttpClient\MockClient::getInstance()
- Returns
- 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
- public Firstred\PostNL\HttpClient\MockClient::getOption($name)
- Get Guzzle option.
- Parameters
$name (string)
- Returns
mixed | null
- public Firstred\PostNL\HttpClient\MockClient::setHandler($handler)
- 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
- 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
- class Firstred\PostNL\HttpClient\GuzzleClient
- Class GuzzleClient.
- Parent
- Implements
Firstred\PostNL\HttpClient\ClientInterface
Psr\Log\LoggerAwareInterface
- 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
- 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
- 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
- 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
- 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
Service
\Firstred\PostNL\Service
Interfaces
- interface Firstred\PostNL\Service\TimeframeServiceInterface
- Class TimeframeService.
- public Firstred\PostNL\Service\TimeframeServiceInterface::getTimeframesREST($getTimeframes)
- Get timeframes via REST.
- Parameters
$getTimeframes (
Firstred\PostNL\Entity\Request\GetTimeframes
)
- Returns
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\TimeframeServiceInterface::getTimeframesSOAP($getTimeframes)
- Get timeframes via SOAP.
- Parameters
$getTimeframes (
Firstred\PostNL\Entity\Request\GetTimeframes
)
- Returns
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- public Firstred\PostNL\Service\TimeframeServiceInterface::buildGetTimeframesRequestREST($getTimeframes)
- Build the GetTimeframes request for the REST API.
- Parameters
$getTimeframes (
Firstred\PostNL\Entity\Request\GetTimeframes
)
- Returns
\Psr\Http\Message\RequestInterface
- Since
1.0.0
- public Firstred\PostNL\Service\TimeframeServiceInterface::processGetTimeframesResponseREST($response)
- Process GetTimeframes Response REST.
- Parameters
$response (mixed)
- Returns
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\TimeframeServiceInterface::buildGetTimeframesRequestSOAP($getTimeframes)
- Build the GetTimeframes request for the SOAP API.
- Parameters
$getTimeframes (
Firstred\PostNL\Entity\Request\GetTimeframes
)
- 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
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- interface Firstred\PostNL\Service\ConfirmingServiceInterface
- Class ConfirmingService.
- public Firstred\PostNL\Service\ConfirmingServiceInterface::confirmShipmentREST($confirming)
- Generate a single barcode via REST.
- Parameters
$confirming (
Firstred\PostNL\Entity\Request\Confirming
)
- Returns
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\ConfirmingServiceInterface::confirmShipmentsREST($confirms)
- Confirm multiple shipments.
- Parameters
$confirms (
Firstred\PostNL\Entity\Request\Confirming[]
) [‘uuid’ => Confirming, …]
- Returns
\Firstred\PostNL\Entity\Response\ConfirmingResponseShipment[]
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\ConfirmingServiceInterface::confirmShipmentSOAP($confirming)
- Generate a single label via SOAP.
- Parameters
$confirming (
Firstred\PostNL\Entity\Request\Confirming
)
- Returns
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- public Firstred\PostNL\Service\ConfirmingServiceInterface::confirmShipmentsSOAP($confirmings)
- Generate multiple labels at once.
- Parameters
$confirmings (array) [‘uuid’ => Confirming, …]
- Returns
\Firstred\PostNL\Entity\Response\ConfirmingResponseShipment[]
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- public Firstred\PostNL\Service\ConfirmingServiceInterface::buildConfirmRequestREST($confirming)
- Parameters
$confirming (
Firstred\PostNL\Entity\Request\Confirming
)
- Returns
\Psr\Http\Message\RequestInterface
- Since
1.0.0
- public Firstred\PostNL\Service\ConfirmingServiceInterface::processConfirmResponseREST($response)
- Proces Confirm REST Response.
- Parameters
$response (mixed)
- Returns
\Firstred\PostNL\Entity\Response\ConfirmingResponseShipment
| null- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\ConfirmingServiceInterface::buildConfirmRequestSOAP($confirming)
- Parameters
$confirming (
Firstred\PostNL\Entity\Request\Confirming
)
- 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
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- interface Firstred\PostNL\Service\LabellingServiceInterface
- Class LabellingService.
- public Firstred\PostNL\Service\LabellingServiceInterface::generateLabelREST($generateLabel, $confirm=true)
- Generate a single barcode via REST.
- Parameters
$generateLabel (
Firstred\PostNL\Entity\Request\GenerateLabel
)$confirm (bool)
- Returns
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\LabellingServiceInterface::generateLabelsREST($generateLabels)
- Generate multiple labels at once.
- Parameters
$generateLabels (array) [‘uuid’ => [GenerateBarcode, confirm], …]
- Returns
array
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\LabellingServiceInterface::generateLabelSOAP($generateLabel, $confirm=true)
- Generate a single label via SOAP.
- Parameters
$generateLabel (
Firstred\PostNL\Entity\Request\GenerateLabel
)$confirm (bool)
- Returns
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- public Firstred\PostNL\Service\LabellingServiceInterface::generateLabelsSOAP($generateLabels)
- Generate multiple labels at once via SOAP.
- Parameters
$generateLabels (array) [‘uuid’ => [GenerateBarcode, confirm], …]
- Returns
array
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- public Firstred\PostNL\Service\LabellingServiceInterface::buildGenerateLabelRequestREST($generateLabel, $confirm=true)
- Build the GenerateLabel request for the REST API.
- Parameters
$generateLabel (
Firstred\PostNL\Entity\Request\GenerateLabel
)$confirm (bool)
- 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
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\LabellingServiceInterface::buildGenerateLabelRequestSOAP($generateLabel, $confirm=true)
- Build the GenerateLabel request for the SOAP API.
- Parameters
$generateLabel (
Firstred\PostNL\Entity\Request\GenerateLabel
)$confirm (bool)
- 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
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- interface Firstred\PostNL\Service\DeliveryDateServiceInterface
- Class DeliveryDateService.
- public Firstred\PostNL\Service\DeliveryDateServiceInterface::getDeliveryDateREST($getDeliveryDate)
- Get a delivery date via REST.
- Parameters
$getDeliveryDate (
Firstred\PostNL\Entity\Request\GetDeliveryDate
)
- Returns
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Since
1.0.0
- public Firstred\PostNL\Service\DeliveryDateServiceInterface::getDeliveryDateSOAP($getDeliveryDate)
- Get a delivery date via SOAP.
- Parameters
$getDeliveryDate (
Firstred\PostNL\Entity\Request\GetDeliveryDate
)
- Returns
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Since
1.0.0
- Deprecated
1.4.0
- public Firstred\PostNL\Service\DeliveryDateServiceInterface::getSentDateREST($getSentDate)
- Get the sent date via REST.
- Parameters
$getSentDate (
Firstred\PostNL\Entity\Request\GetSentDateRequest
)
- Returns
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Since
1.0.0
- public Firstred\PostNL\Service\DeliveryDateServiceInterface::getSentDateSOAP($getSentDate)
- Generate a single label via SOAP.
- Parameters
$getSentDate (
Firstred\PostNL\Entity\Request\GetSentDateRequest
)
- Returns
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Since
1.0.0
- Deprecated
1.4.0
- public Firstred\PostNL\Service\DeliveryDateServiceInterface::buildGetDeliveryDateRequestREST($getDeliveryDate)
- Build the GetDeliveryDate request for the REST API.
- Parameters
$getDeliveryDate (
Firstred\PostNL\Entity\Request\GetDeliveryDate
)
- Returns
\Psr\Http\Message\RequestInterface
- Since
1.0.0
- public Firstred\PostNL\Service\DeliveryDateServiceInterface::processGetDeliveryDateResponseREST($response)
- Process GetDeliveryDate REST Response.
- Parameters
$response (mixed)
- Returns
\Firstred\PostNL\Entity\Response\GetDeliveryDateResponse
| null- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\DeliveryDateServiceInterface::buildGetDeliveryDateRequestSOAP($getDeliveryDate)
- Build the GetDeliveryDate request for the SOAP API.
- Parameters
$getDeliveryDate (
Firstred\PostNL\Entity\Request\GetDeliveryDate
)
- 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
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- public Firstred\PostNL\Service\DeliveryDateServiceInterface::buildGetSentDateRequestREST($getSentDate)
- Build the GetSentDate request for the REST API.
- Parameters
$getSentDate (
Firstred\PostNL\Entity\Request\GetSentDateRequest
)
- Returns
\Psr\Http\Message\RequestInterface
- Since
1.0.0
- public Firstred\PostNL\Service\DeliveryDateServiceInterface::processGetSentDateResponseREST($response)
- Process GetSentDate REST Response.
- Parameters
$response (mixed)
- Returns
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\DeliveryDateServiceInterface::buildGetSentDateRequestSOAP($getSentDate)
- Build the GetSentDate request for the SOAP API.
- Parameters
$getSentDate (
Firstred\PostNL\Entity\Request\GetSentDateRequest
)
- 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
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- interface Firstred\PostNL\Service\LocationServiceInterface
- Class LocationService.
- public Firstred\PostNL\Service\LocationServiceInterface::getNearestLocationsREST($getNearestLocations)
- Get the nearest locations via REST.
- Parameters
$getNearestLocations (
Firstred\PostNL\Entity\Request\GetNearestLocations
)
- Returns
\Firstred\PostNL\Entity\Response\GetNearestLocationsResponse
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\LocationServiceInterface::getNearestLocationsSOAP($getNearestLocations)
- Get the nearest locations via SOAP.
- Parameters
$getNearestLocations (
Firstred\PostNL\Entity\Request\GetNearestLocations
)
- Returns
\Firstred\PostNL\Entity\Response\GetNearestLocationsResponse
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- public Firstred\PostNL\Service\LocationServiceInterface::getLocationsInAreaREST($getLocations)
- Get the nearest locations via REST.
- Parameters
$getLocations (
Firstred\PostNL\Entity\Request\GetLocationsInArea
)
- Returns
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\LocationServiceInterface::getLocationsInAreaSOAP($getNearestLocations)
- Get the nearest locations via SOAP.
- Parameters
$getNearestLocations (
Firstred\PostNL\Entity\Request\GetLocationsInArea
)
- Returns
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- public Firstred\PostNL\Service\LocationServiceInterface::getLocationREST($getLocation)
- Get the location via REST.
- Parameters
$getLocation (
Firstred\PostNL\Entity\Request\GetLocation
)
- Returns
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\LocationServiceInterface::getLocationSOAP($getLocation)
- Get the nearest locations via SOAP.
- Parameters
$getLocation (
Firstred\PostNL\Entity\Request\GetLocation
)
- Returns
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- public Firstred\PostNL\Service\LocationServiceInterface::buildGetNearestLocationsRequestREST($getNearestLocations)
- Build the GenerateLabel request for the REST API.
- Parameters
$getNearestLocations (
Firstred\PostNL\Entity\Request\GetNearestLocations
)
- Returns
\Psr\Http\Message\RequestInterface
- Since
1.0.0
- public Firstred\PostNL\Service\LocationServiceInterface::processGetNearestLocationsResponseREST($response)
- Process GetNearestLocations Response REST.
- Parameters
$response (mixed)
- Returns
\Firstred\PostNL\Entity\Response\GetNearestLocationsResponse
| null- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\LocationServiceInterface::buildGetNearestLocationsRequestSOAP($getLocations)
- Build the GenerateLabel request for the SOAP API.
- Parameters
$getLocations (
Firstred\PostNL\Entity\Request\GetNearestLocations
)
- 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
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- public Firstred\PostNL\Service\LocationServiceInterface::buildGetLocationsInAreaRequestREST($getLocations)
- Build the GetLocationsInArea request for the REST API.
- Parameters
$getLocations (
Firstred\PostNL\Entity\Request\GetLocationsInArea
)
- Returns
\Psr\Http\Message\RequestInterface
- Since
1.0.0
- public Firstred\PostNL\Service\LocationServiceInterface::processGetLocationsInAreaResponseREST($response)
- Proess GetLocationsInArea Response REST.
- Parameters
$response (mixed)
- Returns
\Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse
| null- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\LocationServiceInterface::buildGetLocationsInAreaRequestSOAP($getLocations)
- Build the GetLocationsInArea request for the SOAP API.
- Parameters
$getLocations (
Firstred\PostNL\Entity\Request\GetLocationsInArea
)
- 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
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- public Firstred\PostNL\Service\LocationServiceInterface::buildGetLocationRequestREST($getLocation)
- Build the GetLocation request for the REST API.
- Parameters
$getLocation (
Firstred\PostNL\Entity\Request\GetLocation
)
- Returns
\Psr\Http\Message\RequestInterface
- Since
1.0.0
- public Firstred\PostNL\Service\LocationServiceInterface::processGetLocationResponseREST($response)
- Process GetLocation Response REST.
- Parameters
$response (mixed)
- Returns
\Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse
| null- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\LocationServiceInterface::buildGetLocationRequestSOAP($getLocations)
- Build the GetLocation request for the SOAP API.
- Parameters
$getLocations (
Firstred\PostNL\Entity\Request\GetLocation
)
- 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
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- interface Firstred\PostNL\Service\ServiceInterface
- 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
- interface Firstred\PostNL\Service\BarcodeServiceInterface
- Class BarcodeService.
- public Firstred\PostNL\Service\BarcodeServiceInterface::generateBarcodeREST($generateBarcode)
- Generate a single barcode.
- Parameters
$generateBarcode (
Firstred\PostNL\Entity\Request\GenerateBarcode
)
- Returns
string Barcode
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\BarcodeServiceInterface::generateBarcodesREST($generateBarcodes)
- Generate multiple barcodes at once.
- Parameters
$generateBarcodes (
Firstred\PostNL\Entity\Request\GenerateBarcode[]
)
- Returns
string[] Barcodes
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\BarcodeServiceInterface::generateBarcodeSOAP($generateBarcode)
- Generate a single barcode.
- Parameters
$generateBarcode (
Firstred\PostNL\Entity\Request\GenerateBarcode
)
- Returns
string Barcode
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- public Firstred\PostNL\Service\BarcodeServiceInterface::generateBarcodesSOAP($generateBarcodes)
- Generate multiple barcodes at once.
- Parameters
$generateBarcodes (
Firstred\PostNL\Entity\Request\GenerateBarcode[]
)
- Returns
string[] Barcodes
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- 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
$generateBarcode (
Firstred\PostNL\Entity\Request\GenerateBarcode
)
- Returns
\Psr\Http\Message\RequestInterface
- Since
1.0.0
- public Firstred\PostNL\Service\BarcodeServiceInterface::processGenerateBarcodeResponseREST($response)
- Process GenerateBarcode REST response.
- Parameters
$response (
Psr\Http\Message\ResponseInterface
)
- Returns
array
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\BarcodeServiceInterface::buildGenerateBarcodeRequestSOAP($generateBarcode)
- Build the `generateBarcode` HTTP request for the SOAP API.
- Parameters
$generateBarcode (
Firstred\PostNL\Entity\Request\GenerateBarcode
)
- 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
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- interface Firstred\PostNL\Service\ShippingServiceInterface
- Class ShippingService.
- public Firstred\PostNL\Service\ShippingServiceInterface::sendShipmentRest($sendShipment, $confirm=true)
- Generate a single Shipping vai REST.
- Parameters
$sendShipment (
Firstred\PostNL\Entity\Request\SendShipment
)$confirm (bool)
- Returns
\Firstred\PostNL\Entity\Response\SendShipmentResponse
| null- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Since
1.2.0
- public Firstred\PostNL\Service\ShippingServiceInterface::buildSendShipmentRequestREST($sendShipment, $confirm=true)
- Parameters
$sendShipment (
Firstred\PostNL\Entity\Request\SendShipment
)$confirm (bool)
- Returns
\Psr\Http\Message\RequestInterface
- Since
1.2.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
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.2.0
- interface Firstred\PostNL\Service\ShippingStatusServiceInterface
- Class ShippingStatusService.
- 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
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\ShippingStatusServiceInterface::currentStatusesREST($currentStatuses)
- Get current statuses REST.
- Parameters
- Returns
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Since
1.2.0
- 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
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\ShippingStatusServiceInterface::completeStatusesREST($completeStatuses)
- Get complete statuses REST.
- Parameters
- Returns
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Since
1.2.0
- 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
$getSignature (
Firstred\PostNL\Entity\Request\GetSignature
)
- Returns
\Firstred\PostNL\Entity\Response\GetSignatureResponseSignature
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\ShippingStatusServiceInterface::getSignaturesREST($getSignatures)
- Get multiple signatures.
- Parameters
$getSignatures (
Firstred\PostNL\Entity\Request\GetSignature[]
)
- Returns
\Firstred\PostNL\Entity\Response\GetSignatureResponseSignature[]
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Since
1.2.0
- 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
- public Firstred\PostNL\Service\ShippingStatusServiceInterface::processCurrentStatusResponseREST($response)
- Process CurrentStatus Response REST.
- Parameters
$response (mixed)
- Returns
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.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
$completeStatus (
Firstred\PostNL\Entity\Request\CompleteStatus
)
- Returns
\Psr\Http\Message\RequestInterface
- Since
1.0.0
- public Firstred\PostNL\Service\ShippingStatusServiceInterface::processCompleteStatusResponseREST($response)
- Process CompleteStatus Response REST.
- Parameters
$response (mixed)
- Returns
\Firstred\PostNL\Entity\Response\CompleteStatusResponse
| null- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\ShippingStatusServiceInterface::buildGetSignatureRequestREST($getSignature)
- Build the GetSignature request for the REST API.
- Parameters
$getSignature (
Firstred\PostNL\Entity\Request\GetSignature
)
- Returns
\Psr\Http\Message\RequestInterface
- public Firstred\PostNL\Service\ShippingStatusServiceInterface::processGetSignatureResponseREST($response)
- Process GetSignature Response REST.
- Parameters
$response (mixed)
- Returns
\Firstred\PostNL\Entity\Response\GetSignatureResponseSignature
| null- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\ShippingStatusServiceInterface::getUpdatedShipmentsREST($customer, $dateTimeFrom=null, $dateTimeTo=null)
- Get updated shipments for customer REST.
- Parameters
$customer (
Firstred\PostNL\Entity\Customer
)$dateTimeFrom (
DateTimeInterface
| null)$dateTimeTo (
DateTimeInterface
| null)
- Returns
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Since
1.2.0
- public Firstred\PostNL\Service\ShippingStatusServiceInterface::buildGetUpdatedShipmentsRequestREST($customer, $dateTimeFrom=null, $dateTimeTo=null)
- Build get updated shipments request REST.
- Parameters
$customer (
Firstred\PostNL\Entity\Customer
)$dateTimeFrom (
DateTimeInterface
| null)$dateTimeTo (
DateTimeInterface
| null)
- Returns
\Psr\Http\Message\RequestInterface
- Since
1.2.0
- public Firstred\PostNL\Service\ShippingStatusServiceInterface::processGetUpdatedShipmentsResponseREST($response)
- Process updated shipments response REST.
- Parameters
$response (
Psr\Http\Message\ResponseInterface
)
- Returns
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.2.0
Classes
- class Firstred\PostNL\Service\AbstractService
- Class AbstractService.
- 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\'
- public property Firstred\PostNL\Service\AbstractService::$namespaces
- Type
array
- protected static property Firstred\PostNL\Service\AbstractService::$postnl
- public static property Firstred\PostNL\Service\AbstractService::$ttl
- TTL for the cache.`null` disables the cache`int` is the TTL in secondsAny `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
- 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
- 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
- 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
$object (
Firstred\PostNL\Entity\AbstractEntity
)
- 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
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public static Firstred\PostNL\Service\AbstractService::validateSOAPResponse($xml)
- Parameters
$xml (
SimpleXMLElement
)
- Returns
bool
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public static Firstred\PostNL\Service\AbstractService::getResponseText($response)
- Get the response.
- Parameters
$response
- Returns
string
- Throws
- Throws
- Throws
- Throws
- 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
- public Firstred\PostNL\Service\AbstractService::setCache($cache=null)
- Parameters
$cache (
Psr\Cache\CacheItemPoolInterface
| null)
- Returns
static
- Since
1.2.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
- class Firstred\PostNL\Service\LocationService
- Class LocationService.
- 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/\'
- public property Firstred\PostNL\Service\LocationService::$namespaces
- Namespaces uses for the SOAP version of this service.
- Type
array
- public Firstred\PostNL\Service\LocationService::getNearestLocationsREST($getNearestLocations)
- Get the nearest locations via REST.
- Parameters
$getNearestLocations (
Firstred\PostNL\Entity\Request\GetNearestLocations
)
- Returns
\Firstred\PostNL\Entity\Response\GetNearestLocationsResponse
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\LocationService::getNearestLocationsSOAP($getNearestLocations)
- Get the nearest locations via SOAP.
- Parameters
$getNearestLocations (
Firstred\PostNL\Entity\Request\GetNearestLocations
)
- Returns
\Firstred\PostNL\Entity\Response\GetNearestLocationsResponse
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- public Firstred\PostNL\Service\LocationService::getLocationsInAreaREST($getLocations)
- Get the nearest locations via REST.
- Parameters
$getLocations (
Firstred\PostNL\Entity\Request\GetLocationsInArea
)
- Returns
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\LocationService::getLocationsInAreaSOAP($getNearestLocations)
- Get the nearest locations via SOAP.
- Parameters
$getNearestLocations (
Firstred\PostNL\Entity\Request\GetLocationsInArea
)
- Returns
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- public Firstred\PostNL\Service\LocationService::getLocationREST($getLocation)
- Get the location via REST.
- Parameters
$getLocation (
Firstred\PostNL\Entity\Request\GetLocation
)
- Returns
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\LocationService::getLocationSOAP($getLocation)
- Get the nearest locations via SOAP.
- Parameters
$getLocation (
Firstred\PostNL\Entity\Request\GetLocation
)
- Returns
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- public Firstred\PostNL\Service\LocationService::buildGetNearestLocationsRequestREST($getNearestLocations)
- Build the GenerateLabel request for the REST API.
- Parameters
$getNearestLocations (
Firstred\PostNL\Entity\Request\GetNearestLocations
)
- Returns
\Psr\Http\Message\RequestInterface
- Since
1.0.0
- public Firstred\PostNL\Service\LocationService::processGetNearestLocationsResponseREST($response)
- Process GetNearestLocations Response REST.
- Parameters
$response (mixed)
- Returns
\Firstred\PostNL\Entity\Response\GetNearestLocationsResponse
| null- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\LocationService::buildGetNearestLocationsRequestSOAP($getLocations)
- Build the GenerateLabel request for the SOAP API.
- Parameters
$getLocations (
Firstred\PostNL\Entity\Request\GetNearestLocations
)
- 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
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- public Firstred\PostNL\Service\LocationService::buildGetLocationsInAreaRequestREST($getLocations)
- Build the GetLocationsInArea request for the REST API.
- Parameters
$getLocations (
Firstred\PostNL\Entity\Request\GetLocationsInArea
)
- Returns
\Psr\Http\Message\RequestInterface
- Since
1.0.0
- public Firstred\PostNL\Service\LocationService::processGetLocationsInAreaResponseREST($response)
- Process GetLocationsInArea Response REST.
- Parameters
$response (mixed)
- Returns
\Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse
| null- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\LocationService::buildGetLocationsInAreaRequestSOAP($getLocations)
- Build the GetLocationsInArea request for the SOAP API.
- Parameters
$getLocations (
Firstred\PostNL\Entity\Request\GetLocationsInArea
)
- 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
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- public Firstred\PostNL\Service\LocationService::buildGetLocationRequestREST($getLocation)
- Build the GetLocation request for the REST API.
- Parameters
$getLocation (
Firstred\PostNL\Entity\Request\GetLocation
)
- Returns
\Psr\Http\Message\RequestInterface
- Since
1.0.0
- public Firstred\PostNL\Service\LocationService::processGetLocationResponseREST($response)
- Process GetLocation Response REST.
- Parameters
$response (mixed)
- Returns
\Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse
| null- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\LocationService::buildGetLocationRequestSOAP($getLocations)
- Build the GetLocation request for the SOAP API.
- Parameters
$getLocations (
Firstred\PostNL\Entity\Request\GetLocation
)
- 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
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Throws
- Throws
- Throws
\Sabre\Xml\LibXMLException
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- class Firstred\PostNL\Service\ShippingService
- Class ShippingService.
- VERSION = \'1\'
- LIVE_ENDPOINT = \'https://api\.postnl\.nl/v1/shipment\'
- SANDBOX_ENDPOINT = \'https://api\-sandbox\.postnl\.nl/v1/shipment\'
- DOMAIN_NAMESPACE = \'http://postnl\.nl/\'
- public Firstred\PostNL\Service\ShippingService::sendShipmentRest($sendShipment, $confirm=true)
- Generate a single Shipping vai REST.
- Parameters
$sendShipment (
Firstred\PostNL\Entity\Request\SendShipment
)$confirm (bool)
- Returns
\Firstred\PostNL\Entity\Response\SendShipmentResponse
| null- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Since
1.2.0
- public Firstred\PostNL\Service\ShippingService::buildSendShipmentRequestREST($sendShipment, $confirm=true)
- Parameters
$sendShipment (
Firstred\PostNL\Entity\Request\SendShipment
)$confirm (bool)
- Returns
\Psr\Http\Message\RequestInterface
- Since
1.2.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
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.2.0
- class Firstred\PostNL\Service\BarcodeService
- Class BarcodeService.
- 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/\'
- protected static property Firstred\PostNL\Service\BarcodeService::$postnl
- public property Firstred\PostNL\Service\BarcodeService::$namespaces
- Namespaces uses for the SOAP version of this service.
- Type
array
- public Firstred\PostNL\Service\BarcodeService::generateBarcodeREST($generateBarcode)
- Generate a single barcode.
- Parameters
$generateBarcode (
Firstred\PostNL\Entity\Request\GenerateBarcode
)
- Returns
string | null Barcode
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\BarcodeService::generateBarcodeSOAP($generateBarcode)
- Generate a single barcode.
- Parameters
$generateBarcode (
Firstred\PostNL\Entity\Request\GenerateBarcode
)
- Returns
string Barcode
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- public Firstred\PostNL\Service\BarcodeService::generateBarcodesREST($generateBarcodes)
- Generate multiple barcodes at once.
- Parameters
$generateBarcodes (
Firstred\PostNL\Entity\Request\GenerateBarcode[]
)
- Returns
string[] Barcodes
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\BarcodeService::generateBarcodesSOAP($generateBarcodes)
- Generate multiple barcodes at once.
- Parameters
$generateBarcodes (
Firstred\PostNL\Entity\Request\GenerateBarcode[]
)
- Returns
string[] Barcodes
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- 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
$generateBarcode (
Firstred\PostNL\Entity\Request\GenerateBarcode
)
- Returns
\Psr\Http\Message\RequestInterface
- Since
1.0.0
- public Firstred\PostNL\Service\BarcodeService::buildGenerateBarcodeRequestSOAP($generateBarcode)
- Build the `generateBarcode` HTTP request for the SOAP API.
- Parameters
$generateBarcode (
Firstred\PostNL\Entity\Request\GenerateBarcode
)
- 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
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\BarcodeService::processGenerateBarcodeResponseSOAP($response)
- Process GenerateBarcode SOAP response.
- Parameters
$response (
Psr\Http\Message\ResponseInterface
)
- Returns
string
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- class Firstred\PostNL\Service\DeliveryDateService
- Class DeliveryDateService.
- 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/\'
- public property Firstred\PostNL\Service\DeliveryDateService::$namespaces
- Namespaces uses for the SOAP version of this service.
- Type
array
- public Firstred\PostNL\Service\DeliveryDateService::getDeliveryDateREST($getDeliveryDate)
- Get a delivery date via REST.
- Parameters
$getDeliveryDate (
Firstred\PostNL\Entity\Request\GetDeliveryDate
)
- Returns
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Since
1.0.0
- public Firstred\PostNL\Service\DeliveryDateService::getDeliveryDateSOAP($getDeliveryDate)
- Get a delivery date via SOAP.
- Parameters
$getDeliveryDate (
Firstred\PostNL\Entity\Request\GetDeliveryDate
)
- Returns
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Since
1.0.0
- Deprecated
1.4.0
- public Firstred\PostNL\Service\DeliveryDateService::getSentDateREST($getSentDate)
- Get the sent date via REST.
- Parameters
$getSentDate (
Firstred\PostNL\Entity\Request\GetSentDateRequest
)
- Returns
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Since
1.0.0
- public Firstred\PostNL\Service\DeliveryDateService::getSentDateSOAP($getSentDate)
- Generate a single label via SOAP.
- Parameters
$getSentDate (
Firstred\PostNL\Entity\Request\GetSentDateRequest
)
- Returns
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Since
1.0.0
- Deprecated
1.4.0
- public Firstred\PostNL\Service\DeliveryDateService::buildGetDeliveryDateRequestREST($getDeliveryDate)
- Build the GetDeliveryDate request for the REST API.
- Parameters
$getDeliveryDate (
Firstred\PostNL\Entity\Request\GetDeliveryDate
)
- Returns
\Psr\Http\Message\RequestInterface
- Since
1.0.0
- public Firstred\PostNL\Service\DeliveryDateService::processGetDeliveryDateResponseREST($response)
- Process GetDeliveryDate REST Response.
- Parameters
$response (mixed)
- Returns
\Firstred\PostNL\Entity\Response\GetDeliveryDateResponse
| null- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\DeliveryDateService::buildGetDeliveryDateRequestSOAP($getDeliveryDate)
- Build the GetDeliveryDate request for the SOAP API.
- Parameters
$getDeliveryDate (
Firstred\PostNL\Entity\Request\GetDeliveryDate
)
- 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
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- public Firstred\PostNL\Service\DeliveryDateService::buildGetSentDateRequestREST($getSentDate)
- Build the GetSentDate request for the REST API.
- Parameters
$getSentDate (
Firstred\PostNL\Entity\Request\GetSentDateRequest
)
- Returns
\Psr\Http\Message\RequestInterface
- Since
1.0.0
- public Firstred\PostNL\Service\DeliveryDateService::processGetSentDateResponseREST($response)
- Process GetSentDate REST Response.
- Parameters
$response (mixed)
- Returns
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\DeliveryDateService::buildGetSentDateRequestSOAP($getSentDate)
- Build the GetSentDate request for the SOAP API.
- Parameters
$getSentDate (
Firstred\PostNL\Entity\Request\GetSentDateRequest
)
- 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
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- class Firstred\PostNL\Service\TimeframeService
- Class TimeframeService.
- 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/\'
- public property Firstred\PostNL\Service\TimeframeService::$namespaces
- Namespaces uses for the SOAP version of this service.
- Type
array
- public Firstred\PostNL\Service\TimeframeService::getTimeframesREST($getTimeframes)
- Get timeframes via REST.
- Parameters
$getTimeframes (
Firstred\PostNL\Entity\Request\GetTimeframes
)
- Returns
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\TimeframeService::getTimeframesSOAP($getTimeframes)
- Get timeframes via SOAP.
- Parameters
$getTimeframes (
Firstred\PostNL\Entity\Request\GetTimeframes
)
- Returns
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- public Firstred\PostNL\Service\TimeframeService::buildGetTimeframesRequestREST($getTimeframes)
- Build the GetTimeframes request for the REST API.
- Parameters
$getTimeframes (
Firstred\PostNL\Entity\Request\GetTimeframes
)
- Returns
\Psr\Http\Message\RequestInterface
- Since
1.0.0
- public Firstred\PostNL\Service\TimeframeService::processGetTimeframesResponseREST($response)
- Process GetTimeframes Response REST.
- Parameters
$response (mixed)
- Returns
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\TimeframeService::buildGetTimeframesRequestSOAP($getTimeframes)
- Build the GetTimeframes request for the SOAP API.
- Parameters
$getTimeframes (
Firstred\PostNL\Entity\Request\GetTimeframes
)
- 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
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- class Firstred\PostNL\Service\ShippingStatusService
- Class ShippingStatusService.
- 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/\'
- 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
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\ShippingStatusService::currentStatusesREST($currentStatuses)
- Get current statuses REST.
- Parameters
- Returns
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Since
1.2.0
- 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
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\ShippingStatusService::completeStatusesREST($completeStatuses)
- Get complete statuses REST.
- Parameters
- Returns
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Since
1.2.0
- public Firstred\PostNL\Service\ShippingStatusService::getSignatureREST($getSignature)
- Gets the signature.
- Parameters
$getSignature (
Firstred\PostNL\Entity\Request\GetSignature
)
- Returns
\Firstred\PostNL\Entity\Response\GetSignatureResponseSignature
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\ShippingStatusService::getSignaturesREST($getSignatures)
- Get multiple signatures.
- Parameters
$getSignatures (
Firstred\PostNL\Entity\Request\GetSignature[]
)
- Returns
\Firstred\PostNL\Entity\Response\GetSignatureResponseSignature[]
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Since
1.2.0
- 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
- public Firstred\PostNL\Service\ShippingStatusService::processCurrentStatusResponseREST($response)
- Process CurrentStatus Response REST.
- Parameters
$response (mixed)
- Returns
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.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
$completeStatus (
Firstred\PostNL\Entity\Request\CompleteStatus
)
- Returns
\Psr\Http\Message\RequestInterface
- Since
1.0.0
- public Firstred\PostNL\Service\ShippingStatusService::processCompleteStatusResponseREST($response)
- Process CompleteStatus Response REST.
- Parameters
$response (mixed)
- Returns
\Firstred\PostNL\Entity\Response\CompleteStatusResponse
| null- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\ShippingStatusService::buildGetSignatureRequestREST($getSignature)
- Build the GetSignature request for the REST API.
- Parameters
$getSignature (
Firstred\PostNL\Entity\Request\GetSignature
)
- Returns
\Psr\Http\Message\RequestInterface
- Since
1.0.0
- public Firstred\PostNL\Service\ShippingStatusService::processGetSignatureResponseREST($response)
- Process GetSignature Response REST.
- Parameters
$response (mixed)
- Returns
\Firstred\PostNL\Entity\Response\GetSignatureResponseSignature
| null- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\ShippingStatusService::getUpdatedShipmentsREST($customer, $dateTimeFrom=null, $dateTimeTo=null)
- Get updated shipments for customer REST.
- Parameters
$customer (
Firstred\PostNL\Entity\Customer
)$dateTimeFrom (
DateTimeInterface
| null)$dateTimeTo (
DateTimeInterface
| null)
- Returns
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Since
1.2.0
- public Firstred\PostNL\Service\ShippingStatusService::buildGetUpdatedShipmentsRequestREST($customer, $dateTimeFrom=null, $dateTimeTo=null)
- Build get updated shipments request REST.
- Parameters
$customer (
Firstred\PostNL\Entity\Customer
)$dateTimeFrom (
DateTimeInterface
| null)$dateTimeTo (
DateTimeInterface
| null)
- Returns
\Psr\Http\Message\RequestInterface
- Since
1.2.0
- public Firstred\PostNL\Service\ShippingStatusService::processGetUpdatedShipmentsResponseREST($response)
- Process updated shipments response REST.
- Parameters
$response (
Psr\Http\Message\ResponseInterface
)
- Returns
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.2.0
- class Firstred\PostNL\Service\LabellingService
- Class LabellingService.
- 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/\'
- 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
- public Firstred\PostNL\Service\LabellingService::generateLabelREST($generateLabel, $confirm=true)
- Generate a single barcode via REST.
- Parameters
$generateLabel (
Firstred\PostNL\Entity\Request\GenerateLabel
)$confirm (bool)
- Returns
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\LabellingService::generateLabelsREST($generateLabels)
- Generate multiple labels at once.
- Parameters
$generateLabels (array) [‘uuid’ => [GenerateBarcode, confirm], …]
- Returns
array
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\LabellingService::generateLabelSOAP($generateLabel, $confirm=true)
- Generate a single label via SOAP.
- Parameters
$generateLabel (
Firstred\PostNL\Entity\Request\GenerateLabel
)$confirm (bool)
- Returns
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- public Firstred\PostNL\Service\LabellingService::generateLabelsSOAP($generateLabels)
- Generate multiple labels at once via SOAP.
- Parameters
$generateLabels (array) [‘uuid’ => [GenerateBarcode, confirm], …]
- Returns
array
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- public Firstred\PostNL\Service\LabellingService::buildGenerateLabelRequestREST($generateLabel, $confirm=true)
- Build the GenerateLabel request for the REST API.
- Parameters
$generateLabel (
Firstred\PostNL\Entity\Request\GenerateLabel
)$confirm (bool)
- Returns
\Psr\Http\Message\RequestInterface
- Since
1.0.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
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\LabellingService::buildGenerateLabelRequestSOAP($generateLabel, $confirm=true)
- Build the GenerateLabel request for the SOAP API.
- Parameters
$generateLabel (
Firstred\PostNL\Entity\Request\GenerateLabel
)$confirm (bool)
- 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
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- class Firstred\PostNL\Service\ConfirmingService
- Class ConfirmingService.
- 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/\'
- public property Firstred\PostNL\Service\ConfirmingService::$namespaces
- Namespaces uses for the SOAP version of this service.
- Type
array
- public Firstred\PostNL\Service\ConfirmingService::confirmShipmentREST($confirming)
- Confirm a single shipment via REST.
- Parameters
$confirming (
Firstred\PostNL\Entity\Request\Confirming
)
- Returns
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\ConfirmingService::confirmShipmentsREST($confirms)
- Confirm multiple shipments.
- Parameters
$confirms (
Firstred\PostNL\Entity\Request\Confirming[]
) [‘uuid’ => Confirming, …]
- Returns
\Firstred\PostNL\Entity\Response\ConfirmingResponseShipment[]
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\ConfirmingService::confirmShipmentSOAP($confirming)
- Generate a single label via SOAP.
- Parameters
$confirming (
Firstred\PostNL\Entity\Request\Confirming
)
- Returns
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
- public Firstred\PostNL\Service\ConfirmingService::buildConfirmRequestREST($confirming)
- Parameters
$confirming (
Firstred\PostNL\Entity\Request\Confirming
)
- 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
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\Service\ConfirmingService::buildConfirmRequestSOAP($confirming)
- Parameters
$confirming (
Firstred\PostNL\Entity\Request\Confirming
)
- 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
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- Deprecated
1.4.0
Util
\Firstred\PostNL\Util
Interfaces
- interface Firstred\PostNL\Util\XmlSerializable
- Objects implementing XmlSerializable can control how they are represented inXml.
- 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 elementimplementing XmlSerializable should only ever write what's consideredits 'inner xml'.The parent of the current element is responsible for writing acontaining 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
- class Firstred\PostNL\Util\PendingPromise
- Promises/A+ implementation that avoids recursion when possible.
- Implements
Http\Promise\Promise
- 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
- 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
- class Firstred\PostNL\Util\PromiseTool
- Class PromiseTool.
- 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 besettled asynchronously. It will be automatically run when synchronouslywaiting on a promise.<code>while ($eventLoop->isRunning()) {queue()->run();}</code>
- Parameters
$assign (
Firstred\PostNL\Util\TaskQueue
) optionally specify a new queue instance
- Returns
- public static Firstred\PostNL\Util\PromiseTool::task($task)
- Adds a function to run in the task queue when it is next `run()` and returnsa 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. Ifthe 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 statearray.Returns a state associative array containing a “state” key mapping to avalid promise state. If the state of the promise is “fulfilled”, the arraywill contain a “value” key mapping to the fulfilled value of the promise. Ifthe promise is rejected, the array will contain a “reason” key mapping tothe 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 promisesas 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 orderthe promises were provided). An exception is thrown if any of the promisesare 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 theitems in the array are fulfilled.The promise's fulfillment value is an array with fulfillment values atrespective positions to the original array. If any promise in the arrayrejects, 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 willbecome immediately fulfilled promises).When count amount of promises have been fulfilled, the returned promise isfulfilled with an array that contains the fulfillment values of the winnersin 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, thefulfillment 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 havebeen 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 isfulfilled with a null value when the iterator has been consumed or theaggregate promise has been fulfilled or rejected.$onFulfilled is a function that accepts the fulfilled value, iteratorindex, and the aggregate promise. The callback can invoke any necessary sideeffects and choose to resolve or reject the aggregate promise if needed.$onRejected is a function that accepts the rejection reason, iteratorindex, and the aggregate promise. The callback can invoke any necessary sideeffects 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 anygiven time.$concurrency may be an integer or a function that accepts the number ofpending promises and returns a numeric concurrency limit value to allow fordynamic 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 argumentis rejected. If any promise is rejected, then the aggregate promise isrejected 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
- 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 andmaintains a constant stack size. You can use the task queue asynchronouslyby calling the `run()` function of the global task queue in an event loop.queue()->run();
- private static property Firstred\PostNL\Util\TaskQueue::$enableShutdown
- private static property Firstred\PostNL\Util\TaskQueue::$queue
- 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 processexits IFF the exit is not the result of a PHP E_ERROR error.You can disable running the automatic shutdown of the queue by callingthis function. If you disable the task queue shutdown process, then youMUST either run the task queue (as a result of running your event loopor manually using the run() method) or wait on each outstanding promise.Note: This shutdown will occur before any destructors are triggered.
- class Firstred\PostNL\Util\EachPromise
- Represents a promise that iterates over many promises and invokesside-effect functions in the process.
- 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
- 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 functionis invoked with three arguments: the fulfillment value, the indexposition from the iterable list of the promise, and the aggregatepromise that manages all of the promises. The aggregate promise maybe resolved from within the callback to short-circuit the promise.- rejected: (callable) Invoked when a promise is rejected. Thefunction is invoked with three arguments: the rejection reason, theindex position from the iterable list of the promise, and theaggregate promise that manages all of the promises. The aggregatepromise may be resolved from within the callback to short-circuitthe promise.- concurrency: (integer) Pass this configuration option to limit theallowed 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
- class Firstred\PostNL\Util\Util
- Class Util.
- ERROR_MARGIN = 2
- 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
- public static Firstred\PostNL\Util\Util::getShippingDaysRemaining($shippingDate, $preferredDeliveryDate)
- Calculates amount of days remainingi.e. preferred delivery date the day tomorrow => today = 0i.e. preferred delivery date the day after tomorrow => today + tomorrow = 1i.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 pastanything 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)
- class Firstred\PostNL\Util\DummyLogger
- Class DummyLogger.
- Implements
Psr\Log\LoggerInterface
- 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)
- class Firstred\PostNL\Util\Message
- Class Message.
- RFC7230_HEADER_REGEX = "\(^\(\[^\(\)<\>@,;:\\\\\\"/\[\\\\\]?=\{\}\\x01\- \]\+\+\):\[ \\t\]\*\+\(\(?:\[ \\t\]\*\+\[\!\-~\\x80\-\\xff\]\+\+\)\*\+\)\[ \\t\]\*\+\\r?\\n\)m"
- RFC7230_HEADER_FOLD_REGEX = "\(\\r?\\n\[ \\t\]\+\+\)"
- 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 ofthe message, “headers” key containing an associative array of headerarray values, and a “body” key containing the body of the message.
- Parameters
$message (string) HTTP request or response to parse
- Returns
array
Classes
PostNL
- class Firstred\PostNL\PostNL
- Class PostNL.
- Implements
Psr\Log\LoggerAwareInterface
Summary
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.
- protected static property Firstred\PostNL\PostNL::$sandbox
- Sandbox mode.
- Type
bool
- protected static property Firstred\PostNL\PostNL::$httpClient
- 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
- protected static property Firstred\PostNL\PostNL::$labellingService
- protected static property Firstred\PostNL\PostNL::$confirmingService
- protected static property Firstred\PostNL\PostNL::$shippingStatusService
- protected static property Firstred\PostNL\PostNL::$deliveryDateService
- protected static property Firstred\PostNL\PostNL::$timeframeService
- protected static property Firstred\PostNL\PostNL::$locationService
- protected static property Firstred\PostNL\PostNL::$shippingService
Methods
- public Firstred\PostNL\PostNL::__construct($customer, $apiKey, $sandbox, $mode=null)
- PostNL constructor.
- Parameters
$customer (
Firstred\PostNL\Entity\Customer
) Customer object.$apiKey (
Firstred\PostNL\Entity\SOAP\UsernameToken
| string) API key or UsernameToken object.$sandbox (bool) Whether the testing environment should be used.
$mode (int) Set the preferred connection strategy.
Valid options are: - MODE_REST: New REST API - MODE_SOAP: New SOAP API - MODE_LEGACY: Not supported anymore, converts to MODE_SOAP
- Throws
- public Firstred\PostNL\PostNL::setToken($apiKey)
- Set the token.
- Parameters
$apiKey (string |
\Firstred\PostNL\Entity\SOAP\UsernameToken
)
- Returns
- Throws
- Since
1.0.0
- public Firstred\PostNL\PostNL::getRestApiKey()
- Get REST API Key.
- Returns
bool | string
- Since
1.0.0
- public Firstred\PostNL\PostNL::getToken()
- Get UsernameToken object (for SOAP).
- Returns
- Since
1.0.0
- public Firstred\PostNL\PostNL::getCustomer()
- Get PostNL Customer.
- Returns
- Since
1.0.0
- public Firstred\PostNL\PostNL::setCustomer($customer)
- Set PostNL Customer.
- Parameters
$customer (
Firstred\PostNL\Entity\Customer
)
- Returns
- 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
- 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
- Throws
- Since
1.0.0
- public Firstred\PostNL\PostNL::getHttpClient()
- HttpClient.Automatically load Guzzle when available
- Returns
- 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
- 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
$requestFactory (
Psr\Http\Message\RequestFactoryInterface
|\Firstred\PostNL\Factory\RequestFactoryInterface
)
- 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
$responseFactory (
Psr\Http\Message\ResponseFactoryInterface
|\Firstred\PostNL\Factory\ResponseFactoryInterface
)
- 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
$streamFactory (
Psr\Http\Message\StreamFactoryInterface
|\Firstred\PostNL\Factory\StreamFactoryInterface
)
- Returns
static
- Since
1.2.0
- Since
1.2.0
- public Firstred\PostNL\PostNL::getBarcodeService()
- Barcode service.Automatically load the barcode service
- Returns
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Since
1.0.0
- public Firstred\PostNL\PostNL::sendShipment($shipment, $printertype=\'GraphicFile\|PDF\', $confirm=true)
- Send a single shipment.
- Parameters
$shipment (
Firstred\PostNL\Entity\Shipment
)$printertype (string)
$confirm (bool)
- Returns
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- 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
- 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
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Since
1.2.0
- public Firstred\PostNL\PostNL::generateLabel($shipment, $printertype=\'GraphicFile\|PDF\', $confirm=true)
- Generate a single label.
- Parameters
$shipment (
Firstred\PostNL\Entity\Shipment
)$printertype (string)
$confirm (bool)
- Returns
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- 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 astring 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
- Throws
- 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
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Since
1.0.0
- public Firstred\PostNL\PostNL::confirmShipment($shipment)
- Confirm a single shipment.
- Parameters
$shipment (
Firstred\PostNL\Entity\Shipment
)
- Returns
- Since
1.0.0
- public Firstred\PostNL\PostNL::confirmShipments($shipments)
- Confirm multiple shipments.
- Parameters
$shipments (array)
- Returns
\Firstred\PostNL\Entity\Response\ConfirmingResponseShipment[]
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- 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
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- 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
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
\Http\Discovery\NotFoundException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
\Http\Discovery\NotFoundException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
\Http\Discovery\NotFoundException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
\Http\Discovery\NotFoundException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
\Http\Discovery\NotFoundException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
\Http\Discovery\NotFoundException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
\Http\Discovery\NotFoundException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
\Http\Discovery\NotFoundException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
\Http\Discovery\NotFoundException
- Throws
- 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
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- 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
$completeStatus (
Firstred\PostNL\Entity\Request\CompleteStatus
)
- Returns
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- 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
- Since
1.2.0
- public Firstred\PostNL\PostNL::getSignature($signature)
- Get the signature of a shipment.
- Parameters
$signature (
Firstred\PostNL\Entity\Request\GetSignature
)
- 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
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Since
1.2.0
- public Firstred\PostNL\PostNL::getDeliveryDate($getDeliveryDate)
- Get a delivery date.
- Parameters
$getDeliveryDate (
Firstred\PostNL\Entity\Request\GetDeliveryDate
)
- Returns
- Since
1.0.0
- public Firstred\PostNL\PostNL::getSentDate($getSentDate)
- Get a shipping date.
- Parameters
$getSentDate (
Firstred\PostNL\Entity\Request\GetSentDateRequest
)
- Returns
- Since
1.0.0
- public Firstred\PostNL\PostNL::getTimeframes($getTimeframes)
- Get timeframes.
- Parameters
$getTimeframes (
Firstred\PostNL\Entity\Request\GetTimeframes
)
- Returns
- Since
1.0.0
- public Firstred\PostNL\PostNL::getNearestLocations($getNearestLocations)
- Get nearest locations.
- Parameters
$getNearestLocations (
Firstred\PostNL\Entity\Request\GetNearestLocations
)
- 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
$getTimeframes (
Firstred\PostNL\Entity\Request\GetTimeframes
)$getNearestLocations (
Firstred\PostNL\Entity\Request\GetNearestLocations
)$getDeliveryDate (
Firstred\PostNL\Entity\Request\GetDeliveryDate
)
- Returns
- array [
timeframes => ResponseTimeframes, locations => GetNearestLocationsResponse, delivery_date => GetDeliveryDateResponse,
]
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Since
1.0.0
- public Firstred\PostNL\PostNL::getLocationsInArea($getLocationsInArea)
- Get locations in area.
- Parameters
$getLocationsInArea (
Firstred\PostNL\Entity\Request\GetLocationsInArea
)
- Returns
- Since
1.0.0
- public Firstred\PostNL\PostNL::getLocation($getLocation)
- Get locations in area.
- Parameters
$getLocation (
Firstred\PostNL\Entity\Request\GetLocation
)
- Returns
- Since
1.0.0
- public Firstred\PostNL\PostNL::findBarcodeSerie($type, $range, $eps)
- Find a suitable serie for the barcode.
- Parameters
$type (string)
$range (string)
$eps (bool) Indicates whether it is an EPS Shipment
- Returns
string
- Throws
- 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 PotencierPermission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the “Software”), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software is furnishedto do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, 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 INTHE 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:
Michael Dekker <git@michaeldekker.nl> (maintainer)
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!
janwilletje (contributor)
jbours (contributor)
timmtim (contributor)
niccifor (contributor)
fgd007 (contributor)
TomKriek (contributor)
rowhel95 (contributor)
lenvanessen (contributor)
GetMagented (contributor)
rvanvelzen (contributor)
timo002 (contributor)
rdanklof (contributor)
Bert Brunekreeft (contributor)
Daniel Schipper (contributor)
Joshua Bours (contributor)
Mathieu Haverkamp (contributor)
Jeroen Smit (contributor)