LabellingService
- class Firstred\PostNL\Service\LabellingService
Summary
Methods
Properties
- protected static property Firstred\PostNL\Service\LabellingService::$requestBuilder
- protected static property Firstred\PostNL\Service\LabellingService::$responseProcessor
- private property Firstred\PostNL\Service\LabellingService::$insuranceProductCodes
Methods
- public Firstred\PostNL\Service\LabellingService::__construct($apiKey, $sandbox, $httpClient, $requestFactory, $streamFactory)
- Parameters:
$apiKey (
ParagonIE\HiddenString\HiddenString)$sandbox (bool)
$httpClient (
Firstred\PostNL\HttpClient\HttpClientInterface)$requestFactory (
Psr\Http\Message\RequestFactoryInterface)$streamFactory (
Psr\Http\Message\StreamFactoryInterface)
- public Firstred\PostNL\Service\LabellingService::generateLabel($generateLabel, $confirm=true)
- Generate a single barcode.
- Parameters:
$generateLabel (
Firstred\PostNL\Entity\Request\GenerateLabel)$confirm (bool)
- Returns:
- 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- Throws:
- Since:
1.0.0
- public Firstred\PostNL\Service\LabellingService::generateLabels($generateLabels)
- Generate multiple labels at once.
- Parameters:
$generateLabels (
array|string,array{0: \Firstred\PostNL\Entity\Request\GenerateBarcode, 1: bool}>)
- Returns:
array|string,\Firstred\PostNL\Entity\Response\GenerateBarcodeResponse>- 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::setApiKey($apiKey)
- Parameters:
$apiKey (
ParagonIE\HiddenString\HiddenString)
- Returns:
static
- Since:
2.0.0
- public Firstred\PostNL\Service\LabellingService::setSandbox($sandbox)
- Parameters:
$sandbox (bool)
- Returns:
static
- Since:
2.0.0
- public Firstred\PostNL\Service\LabellingService::setRequestFactory($requestFactory)
- Parameters:
$requestFactory (
Psr\Http\Message\RequestFactoryInterface)
- Returns:
static
- Since:
2.0.0
- public Firstred\PostNL\Service\LabellingService::setStreamFactory($streamFactory)
- Parameters:
$streamFactory (
Psr\Http\Message\StreamFactoryInterface)
- Returns:
static
- Since:
2.0.0