LabellingServiceRestRequestBuilder

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

Firstred\PostNL\Service\RequestBuilder\Rest\AbstractRestRequestBuilder

Implements:

Firstred\PostNL\Service\RequestBuilder\LabellingServiceRequestBuilderInterface

Summary

Methods

Constants

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

Properties

private property Firstred\PostNL\Service\RequestBuilder\Rest\LabellingServiceRestRequestBuilder::$insuranceProductCodes
Type:

int[]

Methods

public Firstred\PostNL\Service\RequestBuilder\Rest\LabellingServiceRestRequestBuilder::buildGenerateLabelRequest($generateLabel, $confirm=true)
Build the 'generate label' 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\LabellingServiceRestRequestBuilder::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