ShippingServiceRestRequestBuilder

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

Firstred\PostNL\Service\RequestBuilder\Rest\AbstractRestRequestBuilder

Implements:

Firstred\PostNL\Service\RequestBuilder\ShippingServiceRequestBuilderInterface

Summary

Methods

Constants

LIVE_ENDPOINT = \'https://api\.postnl\.nl/v1/shipment\'
SANDBOX_ENDPOINT = \'https://api\-sandbox\.postnl\.nl/v1/shipment\'

Methods

public Firstred\PostNL\Service\RequestBuilder\Rest\ShippingServiceRestRequestBuilder::buildSendShipmentRequest($sendShipment, $confirm=true)
Build the 'send shipment' 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

protected Firstred\PostNL\Service\RequestBuilder\Rest\ShippingServiceRestRequestBuilder::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