Skip to content

Commit

Permalink
set zip instead of zone to narrow the search
Browse files Browse the repository at this point in the history
  • Loading branch information
kenny-inventis committed Jun 20, 2022
1 parent e547490 commit 3739dae
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Factory/Bpost/ServicePointQueryFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function createServicePointQueryForAllPickupPoints(string $countryCode, ?
$servicePointQuery->setCountry($countryCode);

if ($postalCode !== null) {
$servicePointQuery->setZone($postalCode);
$servicePointQuery->setZip($postalCode);
}

return $servicePointQuery;
Expand Down
12 changes: 12 additions & 0 deletions src/Model/Query/Bpost/ServicePointQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ final class ServicePointQuery implements ServicePointQueryInterface, CountryAwar

private int $limit;

private string $zip;

public function __construct(string $partner)
{
$this->checkData = 1;
Expand Down Expand Up @@ -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 = [];
Expand Down

0 comments on commit 3739dae

Please sign in to comment.