Skip to content

Commit

Permalink
Merge pull request #36 from Soptareanu/SIP-374
Browse files Browse the repository at this point in the history
- Replace obsolete endpoint for lockers list with new one.
  • Loading branch information
Soptareanu authored May 22, 2023
2 parents d4a8a4a + 0b944bb commit 4aadd72
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Sameday/Requests/SamedayGetLockersRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function buildRequest()
return new SamedayRequest(
true,
'GET',
'/api/locker/lockers',
'/api/client/lockers',
count($this->lockerIds) > 0 ? ['lockersList' => implode(',', $this->lockerIds)] : []
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Sameday/SamedayClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*/
class SamedayClient implements SamedayClientInterface
{
const VERSION = '1.8.2';
const VERSION = '2.1.1';
const API_HOST = 'https://api.sameday.ro';
const KEY_TOKEN = 'token';
const KEY_TOKEN_EXPIRES = 'expires_at';
Expand Down
4 changes: 2 additions & 2 deletions tests/Requests/SamedayGetLockersRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function testBuildRequest()
$this->assertInstanceOf('Sameday\Http\SamedayRequest', $samedayRequest);
$this->assertTrue($samedayRequest->isNeedAuth());
$this->assertEquals('GET', $samedayRequest->getMethod());
$this->assertEquals('/api/locker/lockers', $samedayRequest->getEndpoint());
$this->assertEquals('/api/client/lockers', $samedayRequest->getEndpoint());
$this->assertEmpty($samedayRequest->getQueryParams());
}

Expand All @@ -46,7 +46,7 @@ public function testBuildRequestWithLockerIds()
$this->assertInstanceOf('Sameday\Http\SamedayRequest', $samedayRequest);
$this->assertTrue($samedayRequest->isNeedAuth());
$this->assertEquals('GET', $samedayRequest->getMethod());
$this->assertEquals('/api/locker/lockers', $samedayRequest->getEndpoint());
$this->assertEquals('/api/client/lockers', $samedayRequest->getEndpoint());
$this->assertEquals(['lockersList' => '1,2'], $samedayRequest->getQueryParams());
}
}

0 comments on commit 4aadd72

Please sign in to comment.