From 20329394e46ee32a1b8a7b34c913e3014d7d1550 Mon Sep 17 00:00:00 2001 From: tomas-novotny Date: Tue, 18 Apr 2023 10:47:36 +0200 Subject: [PATCH] Fix trackstatus API URL --- src/Service/DefaultTrackService.php | 2 +- tests/Integration/Services/DefaultTrackServiceTest.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Service/DefaultTrackService.php b/src/Service/DefaultTrackService.php index 8a0c7fe..cb777c1 100644 --- a/src/Service/DefaultTrackService.php +++ b/src/Service/DefaultTrackService.php @@ -72,7 +72,7 @@ public function trackPackagesLastStatuses(PackageCollection $packages): StatusCo public function trackPackagesLastStatusesByIds(string $carrier, array $carrierIds): StatusCollection { $response = $this->client->call( - Version::V2V2, + Version::V2V1, $carrier, Method::TRACK_STATUS, ['carrier_ids' => $carrierIds], diff --git a/tests/Integration/Services/DefaultTrackServiceTest.php b/tests/Integration/Services/DefaultTrackServiceTest.php index 05742e4..ac66b6b 100644 --- a/tests/Integration/Services/DefaultTrackServiceTest.php +++ b/tests/Integration/Services/DefaultTrackServiceTest.php @@ -28,9 +28,9 @@ public function testTrackPackagesLastStatuses(): void { $trackService = $this->newDefaultTrackService(); - $packages = new DefaultPackageCollection(Carrier::PPL); - $packages->add(new DefaultPackage(Carrier::PPL, '1', '0001', '1234')); - $packages->add(new DefaultPackage(Carrier::PPL, '2', '0001', '1235')); + $packages = new DefaultPackageCollection(Carrier::DHL); + $packages->add(new DefaultPackage(Carrier::DHL, '1', '0001', '1234')); + $packages->add(new DefaultPackage(Carrier::DHL, '2', '0001', '1235')); $statuses = $trackService->trackPackagesLastStatuses($packages);