LocationServiceRestRequestBuilder

class Firstred\PostNL\Service\RequestBuilder\Rest\LocationServiceRestRequestBuilder
Parent:

Firstred\PostNL\Service\RequestBuilder\Rest\AbstractRestRequestBuilder

Implements:

Firstred\PostNL\Service\RequestBuilder\LocationServiceRequestBuilderInterface

Summary

Methods

Constants

LIVE_ENDPOINT = \'https://api\.postnl\.nl/shipment/v2\_1/locations\'
SANDBOX_ENDPOINT = \'https://api\-sandbox\.postnl\.nl/shipment/v2\_1/locations\'

Methods

public Firstred\PostNL\Service\RequestBuilder\Rest\LocationServiceRestRequestBuilder::buildGetNearestLocationsRequest($getNearestLocations)
Build the 'get nearest locations' HTTP request.
Parameters:
Returns:

\Psr\Http\Message\RequestInterface

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Since:

2.0.0

public Firstred\PostNL\Service\RequestBuilder\Rest\LocationServiceRestRequestBuilder::buildGetLocationsInAreaRequest($getLocations)
Build the 'get locations in area' HTTP.
Parameters:
Returns:

\Psr\Http\Message\RequestInterface

Since:

2.0.0

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

public Firstred\PostNL\Service\RequestBuilder\Rest\LocationServiceRestRequestBuilder::buildGetLocationRequest($getLocation)
Build the 'get single location' HTTP request.
Parameters:
Returns:

\Psr\Http\Message\RequestInterface

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Since:

2.0.0

protected Firstred\PostNL\Service\RequestBuilder\Rest\LocationServiceRestRequestBuilder::setService($entity)
Set this service on the given entity.
This lets the entity know for which service it should serialize.
Parameters:
Returns:

void

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Throws:

\Firstred\PostNL\Exception\InvalidArgumentException

Throws:

\Firstred\PostNL\Exception\InvalidConfigurationException

Since:

2.0.0