Skip to content

Commit

Permalink
Allow setting delivery options (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
media253 authored Jun 17, 2024
1 parent 981489d commit 9bedcc6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Postnl.php
Original file line number Diff line number Diff line change
Expand Up @@ -398,16 +398,18 @@ public function getSignature($barcode)
* @param string $allowSundaySorting
* @param null|string $deliveryDate
* @param string $countryCode
* @param array $deliveryOptions
* @return ComplexTypes\GetNearestLocationsResponse
*/
public function getNearestLocations(
$postalCode,
$allowSundaySorting = 'false',
$deliveryDate = null,
$countryCode = 'NL'
$countryCode = 'NL',
$deliveryOptions = ['PG']
) {
$message = new ComplexTypes\Message;
$location = new ComplexTypes\Location($postalCode, $allowSundaySorting, $deliveryDate);
$location = new ComplexTypes\Location($postalCode, $allowSundaySorting, $deliveryDate, $deliveryOptions);

$request = new ComplexTypes\GetNearestLocationsRequest($message, $location, $countryCode);
return $this->call('LocationClient', __FUNCTION__, $request);
Expand Down

0 comments on commit 9bedcc6

Please sign in to comment.