1
0
mirror of synced 2024-11-25 06:26:05 +03:00

убрал поля ofd, enabled у конфигурации Connection

This commit is contained in:
Alexey Chelnakov 2018-06-26 12:44:54 +03:00
parent 9f3dbdddcb
commit e9645633cb
2 changed files with 3 additions and 47 deletions

View File

@ -10,7 +10,6 @@ $connection = new \AtolOnlineClient\Configuration\Connection();
$connection->version = \AtolOnlineClient\AtolOnlineApi::API_VERSION_V4; $connection->version = \AtolOnlineClient\AtolOnlineApi::API_VERSION_V4;
$connection->login = 'login'; $connection->login = 'login';
$connection->pass = 'pass'; $connection->pass = 'pass';
$connection->enabled = true;
$connection->group = 'group'; $connection->group = 'group';
$config = new \AtolOnlineClient\Configuration(); $config = new \AtolOnlineClient\Configuration();

View File

@ -15,13 +15,6 @@ class Connection
const SNO_ESN = 'esn'; const SNO_ESN = 'esn';
const SNO_PATENT = 'patent'; 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 = [ const snoTypes = [
self::SNO_GENERAL, self::SNO_GENERAL,
self::SNO_USN_INCOME, self::SNO_USN_INCOME,
@ -31,20 +24,11 @@ class Connection
self::SNO_PATENT, self::SNO_PATENT,
]; ];
const ofdList = [
self::PLATFORMA_OFD,
self::PERVIY_OFD,
self::TAXCOM_OFD,
];
const versions = [ const versions = [
self::V3, AtolOnlineApi::API_VERSION_V3,
self::V4, AtolOnlineApi::API_VERSION_V4,
]; ];
/** @var string */
protected $url;
/** @var bool */ /** @var bool */
protected $debug = false; protected $debug = false;
@ -57,15 +41,9 @@ class Connection
/** @var string */ /** @var string */
public $group; public $group;
/** @var boolean */
public $enabled;
/** @var string */ /** @var string */
public $sno; public $sno;
/** @var string */
public $ofd;
/** @var string */ /** @var string */
public $version; public $version;
@ -117,11 +95,7 @@ class Connection
'choices' => self::snoTypes, 'choices' => self::snoTypes,
]) ])
]); ]);
$metadata->addPropertyConstraints('ofd', [
new Assert\Choice([
'choices' => self::ofdList,
])
]);
$metadata->addPropertyConstraints('version', [ $metadata->addPropertyConstraints('version', [
new Assert\Choice([ new Assert\Choice([
'choices' => self::versions, '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 * @return string
*/ */