diff --git a/README.md b/README.md index 98f40f1..871818f 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,6 @@ $connection = new \AtolOnlineClient\Configuration\Connection(); $connection->version = \AtolOnlineClient\AtolOnlineApi::API_VERSION_V4; $connection->login = 'login'; $connection->pass = 'pass'; -$connection->enabled = true; $connection->group = 'group'; $config = new \AtolOnlineClient\Configuration(); diff --git a/src/AtolOnlineClient/Configuration/Connection.php b/src/AtolOnlineClient/Configuration/Connection.php index a7edb1f..95e19a3 100644 --- a/src/AtolOnlineClient/Configuration/Connection.php +++ b/src/AtolOnlineClient/Configuration/Connection.php @@ -15,13 +15,6 @@ class Connection const SNO_ESN = 'esn'; const SNO_PATENT = 'patent'; - const PLATFORMA_OFD = 'platforma_ofd'; - const PERVIY_OFD = 'perviy_ofd'; - const TAXCOM_OFD = 'taxcom_ofd'; - - const V3 = 'v3'; - const V4 = 'v4'; - const snoTypes = [ self::SNO_GENERAL, self::SNO_USN_INCOME, @@ -31,20 +24,11 @@ class Connection self::SNO_PATENT, ]; - const ofdList = [ - self::PLATFORMA_OFD, - self::PERVIY_OFD, - self::TAXCOM_OFD, - ]; - const versions = [ - self::V3, - self::V4, + AtolOnlineApi::API_VERSION_V3, + AtolOnlineApi::API_VERSION_V4, ]; - /** @var string */ - protected $url; - /** @var bool */ protected $debug = false; @@ -57,15 +41,9 @@ class Connection /** @var string */ public $group; - /** @var boolean */ - public $enabled; - /** @var string */ public $sno; - /** @var string */ - public $ofd; - /** @var string */ public $version; @@ -117,11 +95,7 @@ class Connection 'choices' => self::snoTypes, ]) ]); - $metadata->addPropertyConstraints('ofd', [ - new Assert\Choice([ - 'choices' => self::ofdList, - ]) - ]); + $metadata->addPropertyConstraints('version', [ new Assert\Choice([ 'choices' => self::versions, @@ -129,23 +103,6 @@ class Connection ]); } - /** - * @return string - */ - public function getOfdAddress() - { - switch ($this->ofd) { - case self::PLATFORMA_OFD: - return 'platformaofd.ru'; - case self::PERVIY_OFD: - return 'www.1-ofd.ru'; - case self::TAXCOM_OFD: - return 'taxcom.ru/ofd/'; - } - - return null; - } - /** * @return string */