.. rst-class:: phpdoctorst .. role:: php(code) :language: php ShippingService =============== .. php:namespace:: Firstred\PostNL\Service .. php:class:: ShippingService :Parent: :php:class:`Firstred\\PostNL\\Service\\AbstractService` :Implements: :php:interface:`Firstred\\PostNL\\Service\\ShippingServiceInterface` :Used traits: :php:trait:`Firstred\\PostNL\\Service\\ResponseProcessor\\ResponseProcessorSettersTrait` Summary ------- Methods ~~~~~~~ * :php:meth:`public \_\_construct\($apiKey, $sandbox, $httpClient, $requestFactory, $streamFactory\)` * :php:meth:`public sendShipment\($sendShipment, $confirm\)` * :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) :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 `) :Since: 2.0.0 .. rst-class:: public .. php:method:: public sendShipment( $sendShipment, $confirm=true) .. rst-class:: phpdoc-description | Generate a single Shipping vai REST\. :Parameters: * **$sendShipment** (:any:`Firstred\\PostNL\\Entity\\Request\\SendShipment `) * **$confirm** (bool) :Returns: :any:`\\Firstred\\PostNL\\Entity\\Response\\SendShipmentResponse ` | null :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\\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\\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\\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\\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\\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\\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\\DeserializationException ` :Throws: :any:`\\Firstred\\PostNL\\Exception\\InvalidConfigurationException ` :Since: 1.2.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