.. rst-class:: phpdoctorst .. role:: php(code) :language: php TimeframeService ================ .. php:namespace:: Firstred\PostNL\Service .. php:class:: TimeframeService :Parent: :php:class:`Firstred\\PostNL\\Service\\AbstractCacheableService` :Implements: :php:interface:`Firstred\\PostNL\\Service\\TimeframeServiceInterface` :Used traits: :php:trait:`Firstred\\PostNL\\Service\\ResponseProcessor\\ResponseProcessorSettersTrait` Summary ------- Methods ~~~~~~~ * :php:meth:`public \_\_construct\($apiKey, $sandbox, $httpClient, $requestFactory, $streamFactory, $cache, $ttl\)` * :php:meth:`public getTimeframes\($getTimeframes\)` * :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 Methods ------- .. rst-class:: public .. php:method:: public __construct( $apiKey, $sandbox, $httpClient, $requestFactory, $streamFactory, $cache=null, \\DateInterval|\\DateTimeInterface|int $ttl=null) :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 `) * **$cache** (:any:`Psr\\Cache\\CacheItemPoolInterface ` | null) * **$ttl** (:any:`DateInterval ` | :any:`\\DateTimeInterface ` | int | null) .. rst-class:: public .. php:method:: public getTimeframes( $getTimeframes) .. rst-class:: phpdoc-description | Get timeframes via REST\. :Parameters: * **$getTimeframes** (:any:`Firstred\\PostNL\\Entity\\Request\\GetTimeframes `) :Returns: :any:`\\Firstred\\PostNL\\Entity\\Response\\ResponseTimeframes ` :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\\CifDownException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\CifException ` :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\\CifDownException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\CifException ` :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\\CifDownException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\CifException ` :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\\CifDownException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\CifException ` :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\\CifDownException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\CifException ` :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\\CifDownException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\CifException ` :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\\CifDownException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\CifException ` :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\\CifDownException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\CifException ` :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\\CifDownException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\CifException ` :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