Skip to content
This repository was archived by the owner on Jun 8, 2026. It is now read-only.

Commit 59b3599

Browse files
authored
PTA-45 - Removed endpoint /reports/bookings/ (#132)
Co-authored-by: Youssef Yasmine <yya@mdinti.de>
1 parent 7b42f68 commit 59b3599

6 files changed

Lines changed: 5 additions & 126 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All Notable changes to `Kaufland.de API SDK for PHP` will be documented in this file.
44

5+
## 1.54.0 - 2023-04-26
6+
### Removed
7+
- `/reports/bookings/`
8+
59
## 1.51.0 - 2022-05-17
610
- Added source country field on the order unit send endpoint
711

src/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*/
3838
class Client
3939
{
40-
const VERSION = '1.35.1';
40+
const VERSION = '1.54.0';
4141

4242
/** @var Transport */
4343
private $transport;

src/Endpoints/Reports/Bookings.php

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/Namespaces/ReportsNamespace.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use Hitmeister\Component\Api\Cursor;
66
use Hitmeister\Component\Api\Endpoints\Reports\AccountListing;
77
use Hitmeister\Component\Api\Endpoints\Reports\AccountListingWithShopPrice;
8-
use Hitmeister\Component\Api\Endpoints\Reports\Bookings;
98
use Hitmeister\Component\Api\Endpoints\Reports\BookingsNew;
109
use Hitmeister\Component\Api\Endpoints\Reports\Cancellations;
1110
use Hitmeister\Component\Api\Endpoints\Reports\CompetitorsComparer;
@@ -119,25 +118,6 @@ public function competitorsComparer()
119118
return Response::extractId($resultRequest, '/reports/%d/');
120119
}
121120

122-
/**
123-
* @param \DateTime|int|string $dateFrom
124-
* @param \DateTime|int|string $dateTo
125-
* @return int
126-
*/
127-
public function bookings($dateFrom, $dateTo)
128-
{
129-
$data = new ReportRequestBookingsTransfer();
130-
$data->date_from = Request::formatDate($dateFrom);
131-
$data->date_to = Request::formatDate($dateTo);
132-
133-
$endpoint = new Bookings($this->getTransport());
134-
$endpoint->setTransfer($data);
135-
136-
$resultRequest = $endpoint->performRequest();
137-
138-
return Response::extractId($resultRequest, '/reports/%d/');
139-
}
140-
141121
/**
142122
* @param \DateTime|int|string $dateFrom
143123
* @param \DateTime|int|string $dateTo

tests/Endpoints/Reports/BookingsTest.php

Lines changed: 0 additions & 36 deletions
This file was deleted.

tests/Namespaces/ReportsNamespaceTest.php

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -198,39 +198,6 @@ public function testCompetitorsComparer()
198198
$this->assertEquals(123456, $result);
199199
}
200200

201-
public function testBookings()
202-
{
203-
$from = time() - 100;
204-
$to = $from + 200;
205-
206-
$this->transport
207-
->shouldReceive('performRequest')
208-
->once()
209-
->withArgs(
210-
[
211-
'POST',
212-
'reports/bookings/',
213-
[], // no params
214-
[
215-
'date_from' => Request::formatDate($from),
216-
'date_to' => Request::formatDate($to),
217-
],
218-
\Mockery::any(),
219-
]
220-
)
221-
->andReturn(
222-
[
223-
'headers' => [
224-
'Location' => ['/reports/123456/'],
225-
],
226-
]
227-
);
228-
229-
$namespace = new ReportsNamespace($this->transport);
230-
$result = $namespace->bookings($from, $to);
231-
$this->assertEquals(123456, $result);
232-
}
233-
234201
public function testSales()
235202
{
236203
$from = time() - 100;

0 commit comments

Comments
 (0)