LabellingService

class Firstred\PostNL\Service\LabellingService
Parent:

Firstred\PostNL\Service\AbstractService

Implements:

Firstred\PostNL\Service\LabellingServiceInterface

Used traits:

Firstred\PostNL\Service\ResponseProcessor\ResponseProcessorSettersTrait

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:
Returns:

\Firstred\PostNL\Entity\Response\GenerateLabelResponse

Throws:

\Firstred\PostNL\Exception\ApiException

Throws:

\Firstred\PostNL\Exception\DeserializationException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\NotSupportedException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Psr\Cache\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\ApiException

Throws:

\Firstred\PostNL\Exception\DeserializationException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\NotSupportedException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Psr\Cache\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\ApiException

Throws:

\Firstred\PostNL\Exception\DeserializationException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\NotSupportedException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Psr\Cache\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\ApiException

Throws:

\Firstred\PostNL\Exception\DeserializationException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\NotSupportedException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Psr\Cache\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\ApiException

Throws:

\Firstred\PostNL\Exception\DeserializationException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\NotSupportedException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Psr\Cache\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\ApiException

Throws:

\Firstred\PostNL\Exception\DeserializationException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\NotSupportedException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Psr\Cache\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\ApiException

Throws:

\Firstred\PostNL\Exception\DeserializationException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\NotSupportedException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Psr\Cache\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\ApiException

Throws:

\Firstred\PostNL\Exception\DeserializationException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\NotSupportedException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Psr\Cache\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\ResponseException

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:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\NotSupportedException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Psr\Cache\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\ApiException

Throws:

\Firstred\PostNL\Exception\DeserializationException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\NotSupportedException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Psr\Cache\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\ApiException

Throws:

\Firstred\PostNL\Exception\DeserializationException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\NotSupportedException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Psr\Cache\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\ApiException

Throws:

\Firstred\PostNL\Exception\DeserializationException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\NotSupportedException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Psr\Cache\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\ApiException

Throws:

\Firstred\PostNL\Exception\DeserializationException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\NotSupportedException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Psr\Cache\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\ApiException

Throws:

\Firstred\PostNL\Exception\DeserializationException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\NotSupportedException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Psr\Cache\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\ApiException

Throws:

\Firstred\PostNL\Exception\DeserializationException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\NotSupportedException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Psr\Cache\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\ApiException

Throws:

\Firstred\PostNL\Exception\DeserializationException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\HttpClientException

Throws:

\Firstred\PostNL\Exception\NotSupportedException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Psr\Cache\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\ResponseException

Throws:

\Firstred\PostNL\Exception\ApiException

Throws:

\Firstred\PostNL\Exception\DeserializationException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

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