-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added method findAffiliatedParty, update phpDoc (#3)
* added new fields in PartyResponse (okato, oktmo, okogu, okfs) * added new method findAffiliatedParty * fix geolocate models * remove IplocateRequest, update AddressRequest * update phpdoc
- Loading branch information
Showing
16 changed files
with
866 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Velhron\DadataBundle\Model\Request\Find; | ||
|
||
use Velhron\DadataBundle\Model\Request\Suggest\SuggestRequest; | ||
|
||
class AffiliatedPartyRequest extends SuggestRequest | ||
{ | ||
/** | ||
* @var string[] Ограничение области поиска (FOUNDERS / MANAGERS) | ||
*/ | ||
protected $scope; | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getBaseUrl(): string | ||
{ | ||
return 'https://suggestions.dadata.ru/suggestions/api/4_1/rs/findAffiliated/'; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected function getMethodUrl(): string | ||
{ | ||
return 'party'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Velhron\DadataBundle\Model\Response\Find; | ||
|
||
use Velhron\DadataBundle\Model\Response\Suggest\AddressResponse; | ||
use Velhron\DadataBundle\Model\Response\Suggest\SuggestResponse; | ||
|
||
class AffiliatedPartyResponse extends SuggestResponse | ||
{ | ||
/** | ||
* @var string ИНН | ||
*/ | ||
public $inn; | ||
|
||
/** | ||
* @var string КПП | ||
*/ | ||
public $kpp; | ||
|
||
/** | ||
* @var string ОГРН | ||
*/ | ||
public $ogrn; | ||
|
||
/** | ||
* @var string Уникальный идентификатор в Дадате | ||
*/ | ||
public $hid; | ||
|
||
/** | ||
* @var string Тип организации (LEGAL — юридическое лицо, INDIVIDUAL — индивидуальный предприниматель) | ||
*/ | ||
public $type; | ||
|
||
/** | ||
* @var string Код ОКАТО | ||
*/ | ||
public $okato; | ||
|
||
/** | ||
* @var string Код ОКТМО | ||
*/ | ||
public $oktmo; | ||
|
||
/** | ||
* @var string Код ОКПО | ||
*/ | ||
public $okpo; | ||
|
||
/** | ||
* @var string Код ОКОГУ | ||
*/ | ||
public $okogu; | ||
|
||
/** | ||
* @var string Код ОКФС | ||
*/ | ||
public $okfs; | ||
|
||
/** | ||
* @var string Код ОКВЭД | ||
*/ | ||
public $okved; | ||
|
||
/** | ||
* @var string Версия справочника ОКВЭД (2001 или 2014) | ||
*/ | ||
public $okvedType; | ||
|
||
/** | ||
* @var string Количество филиалов | ||
*/ | ||
public $branchCount; | ||
|
||
/** | ||
* @var string Тип подразделения (MAIN — головная организация, BRANCH — филиал) | ||
*/ | ||
public $branchType; | ||
|
||
/** | ||
* @var AddressResponse Адрес одной строкой | ||
*/ | ||
public $address; | ||
|
||
/** | ||
* @var array Состояние | ||
*/ | ||
public $state; | ||
|
||
public function __construct(array $data) | ||
{ | ||
parent::__construct($data); | ||
|
||
if (isset($data['data']['address'])) { | ||
$this->address = new AddressResponse($data['data']['address']); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.