LabellingService¶
-
class
Firstred\PostNL\Service\LabellingService¶ - Class LabellingService.
Summary¶
Methods¶
Constants¶
-
VERSION = \'2\.2\'
-
LIVE_ENDPOINT = \'https://api\.postnl\.nl/shipment/v2\_2/label\'
-
SANDBOX_ENDPOINT = \'https://api\-sandbox\.postnl\.nl/shipment/v2\_2/label\'
-
SOAP_ACTION = \'http://postnl\.nl/cif/services/LabellingWebService/ILabellingWebService/GenerateLabel\'
-
SOAP_ACTION_NO_CONFIRM = \'http://postnl\.nl/cif/services/LabellingWebService/ILabellingWebService/GenerateLabelWithoutConfirm\'
-
SERVICES_NAMESPACE = \'http://postnl\.nl/cif/services/LabellingWebService/\'
-
DOMAIN_NAMESPACE = \'http://postnl\.nl/cif/domain/LabellingWebService/\'
Properties¶
-
public property
Firstred\PostNL\Service\LabellingService::$namespaces¶ - Namespaces uses for the SOAP version of this service.
- Type
array
Methods¶
-
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
-
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
\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::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
-
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