LocationService

class Firstred\PostNL\Service\LocationService
Parent:

Firstred\PostNL\Service\AbstractCacheableService

Implements:

Firstred\PostNL\Service\LocationServiceInterface

Used traits:

Firstred\PostNL\Service\ResponseProcessor\ResponseProcessorSettersTrait

Summary

Methods

Properties

protected static property Firstred\PostNL\Service\LocationService::$requestBuilder
protected static property Firstred\PostNL\Service\LocationService::$responseProcessor

Methods

public Firstred\PostNL\Service\LocationService::__construct($apiKey, $sandbox, $httpClient, $requestFactory, $streamFactory, $cache=null, \\DateInterval|\\DateTimeInterface|int $ttl=null)
Parameters:
  • $apiKey (ParagonIE\HiddenString\HiddenString)

  • $sandbox (bool)

  • $httpClient (Firstred\PostNL\HttpClient\HttpClientInterface)

  • $requestFactory (Psr\Http\Message\RequestFactoryInterface)

  • $streamFactory (Psr\Http\Message\StreamFactoryInterface)

  • $cache (Psr\Cache\CacheItemPoolInterface | null)

  • $ttl (DateInterval | \DateTimeInterface | int | null)

public Firstred\PostNL\Service\LocationService::getNearestLocations($getNearestLocations)
Get the nearest locations via REST.
Parameters:
Returns:

\Firstred\PostNL\Entity\Response\GetNearestLocationsResponse

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

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\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

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\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

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\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

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\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

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\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

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\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

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\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

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\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

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\LocationService::getLocationsInArea($getLocations)
Get the nearest locations via REST.
Parameters:
Returns:

\Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse

Throws:

\Firstred\PostNL\Exception\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

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\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

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\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

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\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

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\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

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\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

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\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

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\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

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\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

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\LocationService::getLocation($getLocation)
Get the location via REST.
Parameters:
Returns:

\Firstred\PostNL\Entity\Response\GetLocationsInAreaResponse

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\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

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\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

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\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

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\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

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\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

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\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

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\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

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\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

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\CifDownException

Throws:

\Firstred\PostNL\Exception\CifException

Throws:

\Firstred\PostNL\Exception\DeserializationException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Since:

1.0.0

public Firstred\PostNL\Service\LocationService::setApiKey($apiKey)
Parameters:
  • $apiKey (ParagonIE\HiddenString\HiddenString)

Returns:

static

Since:

2.0.0

public Firstred\PostNL\Service\LocationService::setSandbox($sandbox)
Parameters:
  • $sandbox (bool)

Returns:

static

Since:

2.0.0

public Firstred\PostNL\Service\LocationService::setRequestFactory($requestFactory)
Parameters:
  • $requestFactory (Psr\Http\Message\RequestFactoryInterface)

Returns:

static

Since:

2.0.0

public Firstred\PostNL\Service\LocationService::setStreamFactory($streamFactory)
Parameters:
  • $streamFactory (Psr\Http\Message\StreamFactoryInterface)

Returns:

static

Since:

2.0.0