PostNL¶
-
class
Firstred\PostNL\
PostNL
¶ - Class PostNL.
- Implements
Psr\Log\LoggerAwareInterface
Summary¶
Methods¶
Constants¶
-
MODE_REST = 1
-
MODE_SOAP = 2
-
MODE_LEGACY = 2
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
¶
-
protected static property
Firstred\PostNL\PostNL::$
responseFactory
¶
-
protected static property
Firstred\PostNL\PostNL::$
streamFactory
¶
-
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=self::MODE\_REST)¶ - 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
- Since
1.2.0
-
public
Firstred\PostNL\PostNL::
setRequestFactory
($requestFactory)¶ - Set PSR-7 Request factory.
- Parameters
$requestFactory (
Firstred\PostNL\Factory\RequestFactoryInterface
)
- Returns
static
- Since
1.2.0
-
public
Firstred\PostNL\PostNL::
getResponseFactory
()¶ - Get PSR-7 Response factory.
- Returns
- Since
1.2.0
-
public
Firstred\PostNL\PostNL::
setResponseFactory
($responseFactory)¶ - Set PSR-7 Response factory.
- Parameters
$responseFactory (
Firstred\PostNL\Factory\ResponseFactoryInterface
)
- Returns
static
- Since
1.2.0
-
public
Firstred\PostNL\PostNL::
getStreamFactory
()¶ - Set PSR-7 Stream factory.
- Returns
- Since
1.2.0
-
public
Firstred\PostNL\PostNL::
setStreamFactory
($streamFactory)¶ - Set PSR-7 Stream factory.
- Parameters
$streamFactory (
Firstred\PostNL\Factory\StreamFactoryInterface
)
- Returns
static
- 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
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
\Http\Discovery\NotFoundException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
\Http\Discovery\NotFoundException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
\Http\Discovery\NotFoundException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
\Http\Discovery\NotFoundException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
\Http\Discovery\NotFoundException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
\Http\Discovery\NotFoundException
- Throws
- Throws
- Throws
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
\Http\Discovery\NotFoundException
- Since
1.2.0
-
public
Firstred\PostNL\PostNL::
getShippingStatusesByReference
($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 [uuid => ResponseTimeframes, uuid => GetNearestLocationsResponse, uuid => GetDeliveryDateResponse]
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- Throws
- Throws
- Throws
\Psr\Cache\InvalidArgumentException
- 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