1
0
mirror of synced 2024-11-22 21:36:10 +03:00
bitrix-module/intaro.retailcrm/lib/component/json/propertyannotations.php
Сергей Чазов 34e8105583
Loyalty (#241)
* Loyalty program
* fix dot bug for shops-exoprt option
* delete credantials request from services
* add CurlException for credentials catch
* add catching CurlException
* edit error msgs
* add supportind double bonuses
* add any step for bonus-input field in sale.order.ajax template
* recalculate bonuses
* fix bonus rounded
* strtoupper for params in icml
* change delivery service code
2022-03-02 15:40:53 +03:00

78 lines
1.8 KiB
PHP

<?php
/**
* PHP version 7.1
*
* @category Integration
* @package Intaro\RetailCrm\Component\Json
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace Intaro\RetailCrm\Component\Json;
use Intaro\RetailCrm\Component\Json\Mapping\Accessor;
use Intaro\RetailCrm\Component\Json\Mapping\BitrixBoolean;
use Intaro\RetailCrm\Component\Json\Mapping\SerializedName;
use Intaro\RetailCrm\Component\Json\Mapping\Type;
/**
* Class PropertyAnnotations
*
* @category PropertyAnnotations
* @package Intaro\RetailCrm\Component\Json
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class PropertyAnnotations
{
/**
* @var SerializedName
*/
public $serializedName;
/**
* @var Accessor
*/
public $accessor;
/**
* @var Type
*/
public $type;
/**
* @var BitrixBoolean
*/
public $bitrixBoolean;
/**
* PropertyAnnotations constructor.
*
* @param array $annotations
*/
public function __construct(array $annotations = [])
{
foreach ($annotations as $annotation) {
switch (get_class($annotation)) {
case Type::class:
$this->type = $annotation;
break;
case SerializedName::class:
$this->serializedName = $annotation;
break;
case Accessor::class:
$this->accessor = $annotation;
break;
case BitrixBoolean::class:
$this->bitrixBoolean = $annotation;
break;
}
}
}
}