diff --git a/src/Factory/Bpost/ServicePointQueryFactory.php b/src/Factory/Bpost/ServicePointQueryFactory.php index ba54e4b..cc8523d 100644 --- a/src/Factory/Bpost/ServicePointQueryFactory.php +++ b/src/Factory/Bpost/ServicePointQueryFactory.php @@ -65,7 +65,7 @@ public function createServicePointQueryForAllPickupPoints(string $countryCode, ? $servicePointQuery->setCountry($countryCode); if ($postalCode !== null) { - $servicePointQuery->setZone($postalCode); + $servicePointQuery->setZip($postalCode); } return $servicePointQuery; diff --git a/src/Model/Query/Bpost/ServicePointQuery.php b/src/Model/Query/Bpost/ServicePointQuery.php index ba0a176..3b6a20d 100644 --- a/src/Model/Query/Bpost/ServicePointQuery.php +++ b/src/Model/Query/Bpost/ServicePointQuery.php @@ -38,6 +38,8 @@ final class ServicePointQuery implements ServicePointQueryInterface, CountryAwar private int $limit; + private string $zip; + public function __construct(string $partner) { $this->checkData = 1; @@ -217,6 +219,16 @@ public function setInfo(bool $info): void $this->info = $info; } + public function getZip(): string + { + return $this->zip; + } + + public function setZip(string $zip): void + { + $this->zip = $zip; + } + public function toArray(): array { $arrayValue = [];