From 228d7e082555f733ad1a04e085d0fcd078a1af6f Mon Sep 17 00:00:00 2001 From: Velhron Date: Sun, 28 Feb 2021 13:59:45 +0300 Subject: [PATCH] added new methods, fix iplocateAddress (#9) * fix iplocateAddress * added new methods --- src/Model/Request/Find/CountryRequest.php | 9 + src/Model/Request/Find/FnsUnitRequest.php | 13 ++ src/Model/Request/Find/FtsUnitRequest.php | 9 + src/Model/Request/Find/RegionCourtRequest.php | 13 ++ src/Model/Request/Iplocate/AddressRequest.php | 12 ++ src/Model/Request/Suggest/FtsUnitRequest.php | 9 + .../Response/Suggest/FnsUnitResponse.php | 5 + .../Response/Suggest/FtsUnitResponse.php | 63 +++++++ src/Resources/config/services.yaml | 25 +++ src/Service/DadataIplocate.php | 6 +- src/Service/DadataSuggest.php | 87 +++++++++- tests/Service/DadataCleanTest.php | 80 ++++----- tests/Service/DadataGeneralTest.php | 32 ++-- tests/Service/DadataGeolocateTest.php | 32 ++-- tests/Service/DadataIplocateTest.php | 24 +-- tests/Service/DadataSuggestTest.php | 161 +++++++++++++----- tests/mocks/Find/country.json | 15 ++ tests/mocks/Find/fnsUnit.json | 29 ++++ tests/mocks/Find/ftsUnit.json | 21 +++ tests/mocks/Find/regionCourt.json | 13 ++ tests/mocks/Suggest/ftsUnit.json | 106 ++++++++++++ 21 files changed, 637 insertions(+), 127 deletions(-) create mode 100644 src/Model/Request/Find/CountryRequest.php create mode 100644 src/Model/Request/Find/FnsUnitRequest.php create mode 100644 src/Model/Request/Find/FtsUnitRequest.php create mode 100644 src/Model/Request/Find/RegionCourtRequest.php create mode 100644 src/Model/Request/Suggest/FtsUnitRequest.php create mode 100644 src/Model/Response/Suggest/FtsUnitResponse.php create mode 100644 tests/mocks/Find/country.json create mode 100644 tests/mocks/Find/fnsUnit.json create mode 100644 tests/mocks/Find/ftsUnit.json create mode 100644 tests/mocks/Find/regionCourt.json create mode 100644 tests/mocks/Suggest/ftsUnit.json diff --git a/src/Model/Request/Find/CountryRequest.php b/src/Model/Request/Find/CountryRequest.php new file mode 100644 index 0000000..2b61c2c --- /dev/null +++ b/src/Model/Request/Find/CountryRequest.php @@ -0,0 +1,9 @@ +ip = $ip; + + return $this; + } } diff --git a/src/Model/Request/Suggest/FtsUnitRequest.php b/src/Model/Request/Suggest/FtsUnitRequest.php new file mode 100644 index 0000000..5386fb4 --- /dev/null +++ b/src/Model/Request/Suggest/FtsUnitRequest.php @@ -0,0 +1,9 @@ +handle('suggestFnsUnit', $query, $options); } + /** + * Подсказки по справочнику таможенных органов и постов. + * + * @param string $query Текст запроса + * @param array $options Дополнительные параметры запроса + * + * @return FtsUnitResponse[] Массив подсказок + * + * @throws DadataException|InvalidConfigException + */ + public function suggestFtsUnit(string $query, array $options = []): array + { + return $this->handle('suggestFtsUnit', $query, $options); + } + /** * Подсказки по справочнику "Мировые суды". * @@ -499,7 +516,7 @@ public function findAffiliatedParty(string $query, array $options = []): array * @param string $query Текст запроса * @param array $options Дополнительные параметры запроса * - * @return OktmoResponse[] + * @return OktmoResponse[] Массив подсказок * * @throws DadataException|InvalidConfigException */ @@ -507,4 +524,72 @@ public function findOktmo(string $query, array $options = []): array { return $this->handle('findOktmo', $query, $options); } + + /** + * Налоговые инспекции по идентификатору. + * + * Выборка работает по полям: code, inn. + * + * @param string $query Текст запроса + * @param array $options Дополнительные параметры запроса + * + * @return FnsUnitResponse[] Массив подсказок + * + * @throws DadataException|InvalidConfigException + */ + public function findFnsUnit(string $query, array $options = []): array + { + return $this->handle('findFnsUnit', $query, $options); + } + + /** + * Таможни по идентификатору. + * + * Выборка работает по полям: code. + * + * @param string $query Текст запроса + * @param array $options Дополнительные параметры запроса + * + * @return FnsUnitResponse[] Массив подсказок + * + * @throws DadataException|InvalidConfigException + */ + public function findFtsUnit(string $query, array $options = []): array + { + return $this->handle('findFtsUnit', $query, $options); + } + + /** + * Страны по идентификатору. + * + * Выборка работает по полям: code, alfa2, alfa3. + * + * @param string $query Текст запроса + * @param array $options Дополнительные параметры запроса + * + * @return CountryResponse[] Массив подсказок + * + * @throws DadataException|InvalidConfigException + */ + public function findCountry(string $query, array $options = []): array + { + return $this->handle('findCountry', $query, $options); + } + + /** + * Мировые суды по справочнику. + * + * Выборка работает по полям: code. + * + * @param string $query Текст запроса + * @param array $options Дополнительные параметры запроса + * + * @return RegionCourtResponse[] Массив подсказок + * + * @throws DadataException|InvalidConfigException + */ + public function findRegionCourt(string $query, array $options = []): array + { + return $this->handle('findRegionCourt', $query, $options); + } } diff --git a/tests/Service/DadataCleanTest.php b/tests/Service/DadataCleanTest.php index 68f74eb..8ca7ad7 100644 --- a/tests/Service/DadataCleanTest.php +++ b/tests/Service/DadataCleanTest.php @@ -77,6 +77,46 @@ public function testCleanEmail(): void $this->assertEquals('serega@yandex.ru', $result->email); } + /** + * @dataProvider dataProvider + */ + public function testRequestParams( + string $methodName, + string $methodUrl, + string $query, + string $filePath + ): void { + $expectedUrl = 'https://example.com/cleaner'.$methodUrl; + + $expectedOptions = [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Authorization' => 'Token token', + 'X-Secret' => 'secret', + ], + 'body' => json_encode([$query]), + ]; + + $response = $this->createMock(ResponseInterface::class); + + $response + ->expects($this->once()) + ->method('getContent') + ->willReturn(file_get_contents($filePath)); + + $httpClient = $this->createMock(HttpClientInterface::class); + + $httpClient + ->expects($this->once()) + ->method('request') + ->with('POST', $expectedUrl, $expectedOptions) + ->willReturn($response); + + $service = new DadataClean('token', 'secret', $httpClient, $this->requestFactory, $this->responseFactory); + + $service->$methodName($query); + } + public function dataProvider(): array { return [ @@ -124,44 +164,4 @@ public function dataProvider(): array ], ]; } - - /** - * @dataProvider dataProvider - */ - public function testRequestParams( - string $methodName, - string $methodUrl, - string $query, - string $filePath - ): void { - $expectedUrl = 'https://example.com/cleaner'.$methodUrl; - - $expectedOptions = [ - 'headers' => [ - 'Content-Type' => 'application/json', - 'Authorization' => 'Token token', - 'X-Secret' => 'secret', - ], - 'body' => json_encode([$query]), - ]; - - $response = $this->createMock(ResponseInterface::class); - - $response - ->expects($this->once()) - ->method('getContent') - ->willReturn(file_get_contents($filePath)); - - $httpClient = $this->createMock(HttpClientInterface::class); - - $httpClient - ->expects($this->once()) - ->method('request') - ->with('POST', $expectedUrl, $expectedOptions) - ->willReturn($response); - - $service = new DadataClean('token', 'secret', $httpClient, $this->requestFactory, $this->responseFactory); - - $service->$methodName($query); - } } diff --git a/tests/Service/DadataGeneralTest.php b/tests/Service/DadataGeneralTest.php index e454a7b..56b5789 100644 --- a/tests/Service/DadataGeneralTest.php +++ b/tests/Service/DadataGeneralTest.php @@ -33,22 +33,6 @@ public function testStat(): void $this->assertEquals(7, $result->clean); } - public function dataProvider(): array - { - return [ - [ - 'balance', - '/profile/balance', - __DIR__.'/../mocks/General/balance.json', - ], - [ - 'stat', - '/stat/daily', - __DIR__.'/../mocks/General/stat.json', - ], - ]; - } - /** * @dataProvider dataProvider */ @@ -83,4 +67,20 @@ public function testRequestParams(string $methodName, string $methodUrl, string $service->$methodName(); } + + public function dataProvider(): array + { + return [ + [ + 'balance', + '/profile/balance', + __DIR__.'/../mocks/General/balance.json', + ], + [ + 'stat', + '/stat/daily', + __DIR__.'/../mocks/General/stat.json', + ], + ]; + } } diff --git a/tests/Service/DadataGeolocateTest.php b/tests/Service/DadataGeolocateTest.php index e03be2c..a9eaa7e 100644 --- a/tests/Service/DadataGeolocateTest.php +++ b/tests/Service/DadataGeolocateTest.php @@ -33,22 +33,6 @@ public function testGeolocatePostalUnit(): void $this->assertEquals('г Москва, проезд Дежнёва, д 2А', $result[0]->addressStr); } - public function dataProvider(): array - { - return [ - [ - 'geolocateAddress', - '/geolocate/address', - __DIR__.'/../mocks/Geolocate/address.json', - ], - [ - 'geolocatePostalUnit', - '/geolocate/postal_unit', - __DIR__.'/../mocks/Geolocate/postalUnit.json', - ], - ]; - } - /** * @dataProvider dataProvider */ @@ -84,4 +68,20 @@ public function testRequestParams(string $methodName, string $methodUrl, string $service->$methodName(55.878, 37.653); } + + public function dataProvider(): array + { + return [ + [ + 'geolocateAddress', + '/geolocate/address', + __DIR__.'/../mocks/Geolocate/address.json', + ], + [ + 'geolocatePostalUnit', + '/geolocate/postal_unit', + __DIR__.'/../mocks/Geolocate/postalUnit.json', + ], + ]; + } } diff --git a/tests/Service/DadataIplocateTest.php b/tests/Service/DadataIplocateTest.php index 210215a..25364dc 100644 --- a/tests/Service/DadataIplocateTest.php +++ b/tests/Service/DadataIplocateTest.php @@ -25,17 +25,6 @@ public function testIplocateAddress(): void $this->assertEquals('31000001000000000000000', $result->fiasCode); } - public function dataProvider(): array - { - return [ - [ - 'iplocateAddress', - '/iplocate/address', - __DIR__.'/../mocks/Iplocate/address.json', - ], - ]; - } - /** * @dataProvider dataProvider */ @@ -49,7 +38,7 @@ public function testRequestParams(string $methodName, string $methodUrl, string 'Accept' => 'application/json', 'Authorization' => 'Token token', ], - 'query' => ['query' => '46.226.227.20'], + 'query' => ['ip' => '46.226.227.20'], ]; $response = $this->createMock(ResponseInterface::class); @@ -71,4 +60,15 @@ public function testRequestParams(string $methodName, string $methodUrl, string $service->$methodName('46.226.227.20'); } + + public function dataProvider(): array + { + return [ + [ + 'iplocateAddress', + '/iplocate/address', + __DIR__.'/../mocks/Iplocate/address.json', + ], + ]; + } } diff --git a/tests/Service/DadataSuggestTest.php b/tests/Service/DadataSuggestTest.php index db120fb..e6b721a 100644 --- a/tests/Service/DadataSuggestTest.php +++ b/tests/Service/DadataSuggestTest.php @@ -113,6 +113,18 @@ public function testSuggestFnsUnit(): void $this->assertEquals('5256034801', $result[0]->inn); } + public function testSuggestFtsUnit(): void + { + $service = $this->createService(__DIR__.'/../mocks/Suggest/ftsUnit.json'); + $result = $service->suggestFtsUnit('домодедово'); + + $this->assertEquals('ДОМОДЕДОВСКАЯ', $result[0]->value); + $this->assertEquals('ДОМОДЕДОВСКАЯ ТАМОЖНЯ', $result[0]->name); + $this->assertEquals('10002000', $result[0]->code); + $this->assertEquals('5009004697', $result[0]->inn); + $this->assertEquals('domodedovo@ca.eais.customs.ru', $result[0]->email); + } + public function testSuggestRegionCourt(): void { $service = $this->createService(__DIR__.'/../mocks/Suggest/regionCourt.json'); @@ -270,6 +282,87 @@ public function testFindOktmo(): void $this->assertEquals('54623000', $result[0]->areaCode); } + public function testFindFnsUnit(): void + { + $service = $this->createService(__DIR__.'/../mocks/Find/fnsUnit.json'); + $result = $service->findFnsUnit('5257'); + + $this->assertEquals('Межрайонная инспекция ФНС России № 19 по Нижегородской области', $result[0]->value); + $this->assertEquals('5257', $result[0]->code); + $this->assertEquals('5257046101', $result[0]->inn); + } + + public function testFindFtsUnit(): void + { + $service = $this->createService(__DIR__.'/../mocks/Find/ftsUnit.json'); + $result = $service->findFtsUnit('10002000'); + + $this->assertEquals('ДОМОДЕДОВСКАЯ', $result[0]->value); + $this->assertEquals('ДОМОДЕДОВСКАЯ ТАМОЖНЯ', $result[0]->name); + $this->assertEquals('10002000', $result[0]->code); + $this->assertEquals('5009004697', $result[0]->inn); + } + + public function testCountry(): void + { + $service = $this->createService(__DIR__.'/../mocks/Find/country.json'); + $result = $service->findCountry('TH'); + + $this->assertEquals('Таиланд', $result[0]->value); + $this->assertEquals('Королевство Таиланд', $result[0]->name); + $this->assertEquals('TH', $result[0]->alfa2); + $this->assertEquals('764', $result[0]->code); + } + + public function findRegionCourt(): void + { + $service = $this->createService(__DIR__.'/../mocks/Find/regionCourt.json'); + $result = $service->findRegionCourt('52MS0022'); + + $this->assertEquals('52MS0001', $result[0]->code); + $this->assertEquals('52', $result[0]->regionCode); + } + + /** + * @dataProvider suggestDataProvider + */ + public function testSuggestRequestParams( + string $methodName, + string $methodUrl, + string $query, + string $filePath + ): void { + $expectedUrl = 'https://example.com/suggetions'.$methodUrl; + + $expectedOptions = [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + 'Authorization' => 'Token token', + ], + 'body' => json_encode(['query' => $query]), + ]; + + $response = $this->createMock(ResponseInterface::class); + + $response + ->expects($this->once()) + ->method('getContent') + ->willReturn(file_get_contents($filePath)); + + $httpClient = $this->createMock(HttpClientInterface::class); + + $httpClient + ->expects($this->once()) + ->method('request') + ->with('POST', $expectedUrl, $expectedOptions) + ->willReturn($response); + + $service = new DadataSuggest('token', 'secret', $httpClient, $this->requestFactory, $this->responseFactory); + + $service->$methodName($query); + } + public function suggestDataProvider(): array { return [ @@ -375,6 +468,12 @@ public function suggestDataProvider(): array '5462342', __DIR__.'/../mocks/Suggest/oktmo.json', ], + [ + 'suggestFtsUnit', + '/suggest/fts_unit', + 'домодедово', + __DIR__.'/../mocks/Suggest/ftsUnit.json', + ], [ 'findAddress', '/findById/address', @@ -423,46 +522,30 @@ public function suggestDataProvider(): array '54623425', __DIR__.'/../mocks/Find/oktmo.json', ], - ]; - } - - /** - * @dataProvider suggestDataProvider - */ - public function testSuggestRequestParams( - string $methodName, - string $methodUrl, - string $query, - string $filePath - ): void { - $expectedUrl = 'https://example.com/suggetions'.$methodUrl; - - $expectedOptions = [ - 'headers' => [ - 'Content-Type' => 'application/json', - 'Accept' => 'application/json', - 'Authorization' => 'Token token', + [ + 'findFnsUnit', + '/findById/fns_unit', + '5257', + __DIR__.'/../mocks/Find/fnsUnit.json', + ], + [ + 'findFtsUnit', + '/findById/fts_unit', + '10002000', + __DIR__.'/../mocks/Find/ftsUnit.json', + ], + [ + 'findCountry', + '/findById/country', + 'TH', + __DIR__.'/../mocks/Find/country.json', + ], + [ + 'findRegionCourt', + '/findById/region_court', + '52MS0022', + __DIR__.'/../mocks/Find/regionCourt.json', ], - 'body' => json_encode(['query' => $query]), ]; - - $response = $this->createMock(ResponseInterface::class); - - $response - ->expects($this->once()) - ->method('getContent') - ->willReturn(file_get_contents($filePath)); - - $httpClient = $this->createMock(HttpClientInterface::class); - - $httpClient - ->expects($this->once()) - ->method('request') - ->with('POST', $expectedUrl, $expectedOptions) - ->willReturn($response); - - $service = new DadataSuggest('token', 'secret', $httpClient, $this->requestFactory, $this->responseFactory); - - $service->$methodName($query); } } diff --git a/tests/mocks/Find/country.json b/tests/mocks/Find/country.json new file mode 100644 index 0000000..10d7894 --- /dev/null +++ b/tests/mocks/Find/country.json @@ -0,0 +1,15 @@ +{ + "suggestions": [ + { + "value": "Таиланд", + "unrestricted_value": "Королевство Таиланд", + "data": { + "code": "764", + "alfa2": "TH", + "alfa3": "THA", + "name_short": "Таиланд", + "name": "Королевство Таиланд" + } + } + ] +} \ No newline at end of file diff --git a/tests/mocks/Find/fnsUnit.json b/tests/mocks/Find/fnsUnit.json new file mode 100644 index 0000000..2db093f --- /dev/null +++ b/tests/mocks/Find/fnsUnit.json @@ -0,0 +1,29 @@ +{ + "suggestions": [ + { + "value": "Межрайонная инспекция ФНС России № 19 по Нижегородской области", + "unrestricted_value": "Межрайонная инспекция ФНС России № 19 по Нижегородской области", + "data": { + "code": "5257", + "name": "Межрайонная инспекция ФНС России № 19 по Нижегородской области", + "name_short": "Межрайонная инспекция ФНС России № 19 по Нижегородской области", + "address": ",603011,,,Нижний Новгород г,,Искры ул,1,,", + "phone": "831 432-65-65, факс: 432-65-66", + "comment": "Код ОКПО:70381914. Режим работы: понедельник-четверг 08:30-17:30, пятница 08:30-16:30, перерыв на обед 12:30-13:18. Оперзал понедельник-четверг 09:00-18:00, пятница 09:00-16:45 без обеда. Информирование и прием деклараций вторник, четверг 09:00-20:00", + "payment_name": "УФК по Нижегородской области (Межрайонная инспекция ФНС России № 19 по Нижегородской области)", + "oktmo": "22701000,22712000", + "inn": "5257046101", + "kpp": "525701001", + "bank_name": "ВОЛГО-ВЯТСКОЕ ГУ БАНКА РОССИИ//УФК по Нижегородской области г. Нижний Новгород", + "bank_bic": "012202102", + "bank_correspondent_account": "40102810745370000024", + "bank_account": "03100643000000013200", + "parent_code": "52198", + "parent_name": "МРИ ФНС России № 15 по Нижегородской области", + "parent_address": ",603155,,, Нижний Новгород г,, Фрунзе ул, д 7,,", + "parent_phone": "831-4162231", + "parent_comment": "Режим работы: ПН-ЧТ: с 9-00 до 18-00, ПТ: с 9-00 до 16-45" + } + } + ] +} \ No newline at end of file diff --git a/tests/mocks/Find/ftsUnit.json b/tests/mocks/Find/ftsUnit.json new file mode 100644 index 0000000..11c9ede --- /dev/null +++ b/tests/mocks/Find/ftsUnit.json @@ -0,0 +1,21 @@ +{ + "suggestions": [ + { + "value": "ДОМОДЕДОВСКАЯ", + "unrestricted_value": "ДОМОДЕДОВСКАЯ ТАМОЖНЯ", + "data": { + "code": "10002000", + "name_short": "ДОМОДЕДОВСКАЯ", + "name": "ДОМОДЕДОВСКАЯ ТАМОЖНЯ", + "inn": "5009004697", + "ogrn": "1035001283228", + "okpo": "34861084", + "osf": "07", + "address": "142015 МОСКОВСКАЯ ОБЛ., Г. ДОМОДЕДОВО, ТЕРРИТОРИЯ \"АЭРОПОРТ \"ДОМОДЕДОВО\", СТР. 24", + "phone": "(495)967-83-52", + "fax": "(495)787-86-04", + "email": "domodedovo@ca.eais.customs.ru" + } + } + ] +} \ No newline at end of file diff --git a/tests/mocks/Find/regionCourt.json b/tests/mocks/Find/regionCourt.json new file mode 100644 index 0000000..ac09bc5 --- /dev/null +++ b/tests/mocks/Find/regionCourt.json @@ -0,0 +1,13 @@ +{ + "suggestions": [ + { + "value": "Судебный участок № 1 Ленинского судебного района города Нижний Новгород Нижегородской области", + "unrestricted_value": "Судебный участок № 1 Ленинского судебного района города Нижний Новгород Нижегородской области", + "data": { + "code": "52MS0022", + "name": "Судебный участок № 1 Ленинского судебного района города Нижний Новгород Нижегородской области", + "region_code": "52" + } + } + ] +} \ No newline at end of file diff --git a/tests/mocks/Suggest/ftsUnit.json b/tests/mocks/Suggest/ftsUnit.json new file mode 100644 index 0000000..17c8e31 --- /dev/null +++ b/tests/mocks/Suggest/ftsUnit.json @@ -0,0 +1,106 @@ +{ + "suggestions": [ + { + "value": "ДОМОДЕДОВСКАЯ", + "unrestricted_value": "ДОМОДЕДОВСКАЯ ТАМОЖНЯ", + "data": { + "code": "10002000", + "name_short": "ДОМОДЕДОВСКАЯ", + "name": "ДОМОДЕДОВСКАЯ ТАМОЖНЯ", + "inn": "5009004697", + "ogrn": "1035001283228", + "okpo": "34861084", + "osf": "07", + "address": "142015 МОСКОВСКАЯ ОБЛ., Г. ДОМОДЕДОВО, ТЕРРИТОРИЯ \"АЭРОПОРТ \"ДОМОДЕДОВО\", СТР. 24", + "phone": "(495)967-83-52", + "fax": "(495)787-86-04", + "email": "domodedovo@ca.eais.customs.ru" + } + }, + { + "value": "т/п Аэропорт Домодедово (грузовой)", + "unrestricted_value": "таможенный пост Аэропорт Домодедово (грузовой)", + "data": { + "code": "10002010", + "name_short": "т/п Аэропорт Домодедово (грузовой)", + "name": "таможенный пост Аэропорт Домодедово (грузовой)", + "inn": null, + "ogrn": null, + "okpo": null, + "osf": "07", + "address": "142015 МОСКОВСКАЯ ОБЛ., ДОМОДЕДОВСКИЙ Р-Н, АЭРОПОРТ ДОМОДЕДОВО", + "phone": "(495)276-09-52", + "fax": null, + "email": null + } + }, + { + "value": "т/п Аэропорт Домодедово (пассажирский)", + "unrestricted_value": "таможенный пост Аэропорт Домодедово (пассажирский)", + "data": { + "code": "10002040", + "name_short": "т/п Аэропорт Домодедово (пассажирский)", + "name": "таможенный пост Аэропорт Домодедово (пассажирский)", + "inn": null, + "ogrn": null, + "okpo": null, + "osf": "07", + "address": "142015 МОСКОВСКАЯ ОБЛ., ДОМОДЕДОВСКИЙ Р-Н, АЭРОПОРТ ДОМОДЕДОВО", + "phone": "(495)787-16-69", + "fax": null, + "email": null + } + }, + { + "value": "т/п Донской", + "unrestricted_value": "Донской таможенный пост", + "data": { + "code": "10009050", + "name_short": "т/п Донской", + "name": "Донской таможенный пост", + "inn": null, + "ogrn": null, + "okpo": null, + "osf": "04", + "address": "142000 МОСКОВСКАЯ ОБЛ., Г.ДОМОДЕДОВО, УЛ. КРАСНОДАРСКАЯ, Д.17", + "phone": "(495)657-92-37", + "fax": null, + "email": null + } + }, + { + "value": "т/п Каширский", + "unrestricted_value": "Каширский таможенный пост", + "data": { + "code": "10013060", + "name_short": "т/п Каширский", + "name": "Каширский таможенный пост", + "inn": null, + "ogrn": null, + "okpo": null, + "osf": "00", + "address": "142000 МОСКОВСКАЯ ОБЛ., Г.ДОМОДЕДОВО, УЛ.ЛОГИСТИЧЕСКАЯ, Д.1/6, КОРП.7Б", + "phone": "(495)644-45-90", + "fax": "(495)644-45-96", + "email": "mot-kash-insp@mtu.customs.ru" + } + }, + { + "value": "Экспертно-исследоват. отдел №2 (пгт. Домодедово)", + "unrestricted_value": "Экспертно-исследовательский отдел №2 (пгт. Домодедово)", + "data": { + "code": "12411020", + "name_short": "Экспертно-исследоват. отдел №2 (пгт. Домодедово)", + "name": "Экспертно-исследовательский отдел №2 (пгт. Домодедово)", + "inn": null, + "ogrn": null, + "okpo": null, + "osf": null, + "address": "142015, МОСКОВСКАЯ ОБЛАСТЬ, Г. ДОМОДЕДОВО, ТЕРРИТОРИЯ \"АЭРОПОРТ \"ДОМОДЕДОВО\", СТР.24", + "phone": null, + "fax": null, + "email": null + } + } + ] +} \ No newline at end of file