Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
CitiesRequest: city code
Browse files Browse the repository at this point in the history
  • Loading branch information
sanmai committed Aug 15, 2019
1 parent 0c10cda commit 6a1a4cc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Requests/CitiesRequest.php
Expand Up @@ -43,6 +43,7 @@
* @method CitiesRequest setSize(mixed $value)
* @method CitiesRequest setCountryCode(mixed $value)
* @method CitiesRequest setCityName(mixed $value)
* @method CitiesRequest setCityCode(mixed $value)
* @method CitiesRequest setPostcode(mixed $value)
* @method CitiesRequest setLang(mixed $value)
*/
Expand Down Expand Up @@ -106,6 +107,13 @@ final class CitiesRequest implements ParamRequest
*/
protected $cityName;

/**
* Код города по базе СДЭК.
*
* @var int
*/
protected $cityCode;

/**
* Почтовый индекс.
*
Expand Down
2 changes: 2 additions & 0 deletions tests/Serialization/CitiesRequestTest.php
Expand Up @@ -71,12 +71,14 @@ public function test_with_new_properties()
$request = $request->setRegionFiasGuid('example');
$request = $request->setCountryCode('RU');
$request = $request->setCityName('Новосибирск');
$request = $request->setCityCode(1);
$request = $request->setPostcode('111222');

$this->assertSame([
'regionFiasGuid' => 'example',
'countryCode' => 'RU',
'cityName' => 'Новосибирск',
'cityCode' => 1,
'postcode' => '111222',
], $request->getParams());
}
Expand Down

0 comments on commit 6a1a4cc

Please sign in to comment.