ShippingService

class Firstred\PostNL\Service\ShippingService
Parent:

Firstred\PostNL\Service\AbstractService

Implements:

Firstred\PostNL\Service\ShippingServiceInterface

Used traits:

Firstred\PostNL\Service\ResponseProcessor\ResponseProcessorSettersTrait

Summary

Methods

Properties

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

Methods

public Firstred\PostNL\Service\ShippingService::__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)

Since:

2.0.0

public Firstred\PostNL\Service\ShippingService::sendShipment($sendShipment, $confirm=true)
Generate a single Shipping vai REST.
Parameters:
Returns:

\Firstred\PostNL\Entity\Response\SendShipmentResponse | null

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

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Since:

1.2.0

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

Returns:

static

Since:

2.0.0

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

Returns:

static

Since:

2.0.0

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

Returns:

static

Since:

2.0.0

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

Returns:

static

Since:

2.0.0