1
0
mirror of synced 2024-11-24 22:16:08 +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->login = 'login';
$connection->pass = 'pass';
$connection->enabled = true;
$connection->group = 'group';
$config = new \AtolOnlineClient\Configuration();

View File

@ -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
*/