.. rst-class:: phpdoctorst .. role:: php(code) :language: php LabellingService ================ .. php:namespace:: Firstred\PostNL\Service .. php:class:: LabellingService :Parent: :php:class:`Firstred\\PostNL\\Service\\AbstractService` :Implements: :php:interface:`Firstred\\PostNL\\Service\\LabellingServiceInterface` :Used traits: :php:trait:`Firstred\\PostNL\\Service\\ResponseProcessor\\ResponseProcessorSettersTrait` Summary ------- Methods ~~~~~~~ * :php:meth:`public \_\_construct\($apiKey, $sandbox, $httpClient, $requestFactory, $streamFactory\)` * :php:meth:`public generateLabel\($generateLabel, $confirm\)` * :php:meth:`public generateLabels\($generateLabels\)` * :php:meth:`public setApiKey\($apiKey\)` * :php:meth:`public setSandbox\($sandbox\)` * :php:meth:`public setRequestFactory\($requestFactory\)` * :php:meth:`public setStreamFactory\($streamFactory\)` Properties ---------- .. php:attr:: protected static requestBuilder .. php:attr:: protected static responseProcessor .. php:attr:: private insuranceProductCodes Methods ------- .. rst-class:: public .. php:method:: public __construct( $apiKey, $sandbox, $httpClient, $requestFactory, $streamFactory) :Parameters: * **$apiKey** (:any:`ParagonIE\\HiddenString\\HiddenString `) * **$sandbox** (bool) * **$httpClient** (:any:`Firstred\\PostNL\\HttpClient\\HttpClientInterface `) * **$requestFactory** (:any:`Psr\\Http\\Message\\RequestFactoryInterface `) * **$streamFactory** (:any:`Psr\\Http\\Message\\StreamFactoryInterface `) .. rst-class:: public .. php:method:: public generateLabel( $generateLabel, $confirm=true) .. rst-class:: phpdoc-description | Generate a single barcode\. :Parameters: * **$generateLabel** (:any:`Firstred\\PostNL\\Entity\\Request\\GenerateLabel `) * **$confirm** (bool) :Returns: :any:`\\Firstred\\PostNL\\Entity\\Response\\GenerateLabelResponse ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ApiException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\DeserializationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\HttpClientException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidConfigurationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\NotSupportedException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidArgumentException ` :Throws: :any:`\\Psr\\Cache\\InvalidArgumentException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ResponseException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ApiException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\DeserializationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\HttpClientException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidConfigurationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\NotSupportedException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidArgumentException ` :Throws: :any:`\\Psr\\Cache\\InvalidArgumentException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ResponseException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ApiException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\DeserializationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\HttpClientException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidConfigurationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\NotSupportedException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidArgumentException ` :Throws: :any:`\\Psr\\Cache\\InvalidArgumentException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ResponseException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ApiException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\DeserializationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\HttpClientException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidConfigurationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\NotSupportedException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidArgumentException ` :Throws: :any:`\\Psr\\Cache\\InvalidArgumentException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ResponseException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ApiException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\DeserializationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\HttpClientException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidConfigurationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\NotSupportedException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidArgumentException ` :Throws: :any:`\\Psr\\Cache\\InvalidArgumentException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ResponseException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ApiException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\DeserializationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\HttpClientException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidConfigurationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\NotSupportedException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidArgumentException ` :Throws: :any:`\\Psr\\Cache\\InvalidArgumentException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ResponseException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ApiException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\DeserializationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\HttpClientException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidConfigurationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\NotSupportedException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidArgumentException ` :Throws: :any:`\\Psr\\Cache\\InvalidArgumentException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ResponseException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ApiException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\DeserializationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\HttpClientException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidConfigurationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\NotSupportedException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidArgumentException ` :Throws: :any:`\\Psr\\Cache\\InvalidArgumentException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ResponseException ` :Since: 1.0.0 .. rst-class:: public .. php:method:: public generateLabels( $generateLabels) .. rst-class:: phpdoc-description | Generate multiple labels at once\. :Parameters: * **$generateLabels** (:any:`array` | :any:`string,array\{0: \\Firstred\\PostNL\\Entity\\Request\\GenerateBarcode, 1: bool\}\> >`) :Returns: :any:`array` | :any:`string,\\Firstred\\PostNL\\Entity\\Response\\GenerateBarcodeResponse\> >` :Throws: :any:`\\Firstred\\PostNL\\Exception\\HttpClientException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\NotSupportedException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidArgumentException ` :Throws: :any:`\\Psr\\Cache\\InvalidArgumentException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ResponseException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ApiException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\DeserializationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidConfigurationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\HttpClientException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\NotSupportedException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidArgumentException ` :Throws: :any:`\\Psr\\Cache\\InvalidArgumentException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ResponseException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ApiException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\DeserializationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidConfigurationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\HttpClientException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\NotSupportedException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidArgumentException ` :Throws: :any:`\\Psr\\Cache\\InvalidArgumentException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ResponseException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ApiException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\DeserializationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidConfigurationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\HttpClientException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\NotSupportedException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidArgumentException ` :Throws: :any:`\\Psr\\Cache\\InvalidArgumentException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ResponseException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ApiException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\DeserializationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidConfigurationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\HttpClientException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\NotSupportedException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidArgumentException ` :Throws: :any:`\\Psr\\Cache\\InvalidArgumentException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ResponseException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ApiException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\DeserializationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidConfigurationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\HttpClientException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\NotSupportedException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidArgumentException ` :Throws: :any:`\\Psr\\Cache\\InvalidArgumentException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ResponseException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ApiException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\DeserializationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidConfigurationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\HttpClientException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\NotSupportedException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidArgumentException ` :Throws: :any:`\\Psr\\Cache\\InvalidArgumentException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ResponseException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ApiException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\DeserializationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidConfigurationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\HttpClientException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\NotSupportedException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidArgumentException ` :Throws: :any:`\\Psr\\Cache\\InvalidArgumentException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ResponseException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\ApiException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\DeserializationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidConfigurationException ` :Since: 1.0.0 .. rst-class:: public .. php:method:: public setApiKey( $apiKey) :Parameters: * **$apiKey** (:any:`ParagonIE\\HiddenString\\HiddenString `) :Returns: static :Since: 2.0.0 .. rst-class:: public .. php:method:: public setSandbox( $sandbox) :Parameters: * **$sandbox** (bool) :Returns: static :Since: 2.0.0 .. rst-class:: public .. php:method:: public setRequestFactory( $requestFactory) :Parameters: * **$requestFactory** (:any:`Psr\\Http\\Message\\RequestFactoryInterface `) :Returns: static :Since: 2.0.0 .. rst-class:: public .. php:method:: public setStreamFactory( $streamFactory) :Parameters: * **$streamFactory** (:any:`Psr\\Http\\Message\\StreamFactoryInterface `) :Returns: static :Since: 2.0.0