LocationService
- class Firstred\PostNL\Service\LocationService
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:
$getNearestLocations (
Firstred\PostNL\Entity\Request\GetNearestLocations)
- Returns:
\Firstred\PostNL\Entity\Response\GetNearestLocationsResponse- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
\Psr\Cache\InvalidArgumentException- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
\Psr\Cache\InvalidArgumentException- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
\Psr\Cache\InvalidArgumentException- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
\Psr\Cache\InvalidArgumentException- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
\Psr\Cache\InvalidArgumentException- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
\Psr\Cache\InvalidArgumentException- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
\Psr\Cache\InvalidArgumentException- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
\Psr\Cache\InvalidArgumentException- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
\Psr\Cache\InvalidArgumentException- Throws:
- Since:
1.0.0
- public Firstred\PostNL\Service\LocationService::getLocationsInArea($getLocations)
- Get the nearest locations via REST.
- Parameters:
$getLocations (
Firstred\PostNL\Entity\Request\GetLocationsInArea)
- Returns:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
\Psr\Cache\InvalidArgumentException- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
\Psr\Cache\InvalidArgumentException- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
\Psr\Cache\InvalidArgumentException- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
\Psr\Cache\InvalidArgumentException- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
\Psr\Cache\InvalidArgumentException- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
\Psr\Cache\InvalidArgumentException- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
\Psr\Cache\InvalidArgumentException- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
\Psr\Cache\InvalidArgumentException- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
\Psr\Cache\InvalidArgumentException- Throws:
- Since:
1.0.0
- public Firstred\PostNL\Service\LocationService::getLocation($getLocation)
- Get the location via REST.
- Parameters:
$getLocation (
Firstred\PostNL\Entity\Request\GetLocation)
- Returns:
- Throws:
- Throws:
- Throws:
- Throws:
\Psr\Cache\InvalidArgumentException- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
\Psr\Cache\InvalidArgumentException- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
\Psr\Cache\InvalidArgumentException- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
\Psr\Cache\InvalidArgumentException- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
\Psr\Cache\InvalidArgumentException- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
\Psr\Cache\InvalidArgumentException- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
\Psr\Cache\InvalidArgumentException- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
\Psr\Cache\InvalidArgumentException- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
\Psr\Cache\InvalidArgumentException- Throws:
- Throws:
- Throws:
- Throws:
- Throws:
- 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