Сorrections for two namespaces & visible and variative fields
This commit is contained in:
commit
649b60b392
77
src/Model/Entity/Store/ProductProperty.php
Normal file
77
src/Model/Entity/Store/ProductProperty.php
Normal file
@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @category ProductProperty
|
||||
* @package RetailCrm\Api\Model\Entity\Store
|
||||
*/
|
||||
|
||||
namespace RetailCrm\Api\Model\Entity\Store;
|
||||
|
||||
use RetailCrm\Api\Component\Serializer\Annotation as JMS;
|
||||
|
||||
/**
|
||||
* Class ProductProperty
|
||||
*
|
||||
* @category ProductProperty
|
||||
* @package RetailCrm\Api\Model\Entity\Store
|
||||
*/
|
||||
class ProductProperty
|
||||
{
|
||||
/**
|
||||
* @var string[]
|
||||
*
|
||||
* @JMS\Type("array<string>")
|
||||
* @JMS\SerializedName("sites")
|
||||
*/
|
||||
public $sites;
|
||||
|
||||
/**
|
||||
* @var \RetailCrm\Api\Model\Entity\Store\ProductPropertyGroup[]
|
||||
*
|
||||
* @JMS\Type("array<RetailCrm\Api\Model\Entity\Store\ProductPropertyGroup>")
|
||||
* @JMS\SerializedName("groups")
|
||||
*/
|
||||
public $groups;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("code")
|
||||
*/
|
||||
public $code;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("name")
|
||||
*/
|
||||
public $name;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*
|
||||
* @JMS\Type("bool")
|
||||
* @JMS\SerializedName("isNumeric")
|
||||
*/
|
||||
public $isNumeric;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*
|
||||
* @JMS\Type("bool")
|
||||
* @JMS\SerializedName("visible")
|
||||
*/
|
||||
public $visible;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*
|
||||
* @JMS\Type("bool")
|
||||
* @JMS\SerializedName("variative")
|
||||
*/
|
||||
public $variative;
|
||||
}
|
37
src/Model/Entity/Store/ProductPropertyGroup.php
Normal file
37
src/Model/Entity/Store/ProductPropertyGroup.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @category ProductPropertyGroup
|
||||
* @package RetailCrm\Api\Model\Entity\Store
|
||||
*/
|
||||
|
||||
namespace RetailCrm\Api\Model\Entity\Store;
|
||||
|
||||
use RetailCrm\Api\Component\Serializer\Annotation as JMS;
|
||||
|
||||
/**
|
||||
* Class ProductPropertyGroup
|
||||
*
|
||||
* @category ProductPropertyGroup
|
||||
* @package RetailCrm\Api\Model\Entity\Store
|
||||
*/
|
||||
class ProductPropertyGroup
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("id")
|
||||
*/
|
||||
public $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("name")
|
||||
*/
|
||||
public $name;
|
||||
}
|
@ -35,6 +35,22 @@ class ProductPropertiesFilterType
|
||||
*/
|
||||
public $code;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @Form\Type("int")
|
||||
* @Form\SerializedName("visible")
|
||||
*/
|
||||
public $visible;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @Form\Type("int")
|
||||
* @Form\SerializedName("variative")
|
||||
*/
|
||||
public $variative;
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*
|
||||
|
@ -9,53 +9,15 @@
|
||||
|
||||
namespace RetailCrm\Api\Model\Filter\Store;
|
||||
|
||||
use RetailCrm\Api\Component\Serializer\Annotation as JMS;
|
||||
use RetailCrm\Api\Model\Entity\Store\ProductProperty as Base;
|
||||
|
||||
/**
|
||||
* Class ProductProperty
|
||||
*
|
||||
* @category ProductProperty
|
||||
* @package RetailCrm\Api\Model\Filter\Store
|
||||
* @deprecated Please use RetailCrm\Api\Model\Entity\Store\ProductProperty instead.
|
||||
*/
|
||||
class ProductProperty
|
||||
class ProductProperty extends Base
|
||||
{
|
||||
/**
|
||||
* @var string[]
|
||||
*
|
||||
* @JMS\Type("array<string>")
|
||||
* @JMS\SerializedName("sites")
|
||||
*/
|
||||
public $sites;
|
||||
|
||||
/**
|
||||
* @var \RetailCrm\Api\Model\Filter\Store\ProductPropertyGroup[]
|
||||
*
|
||||
* @JMS\Type("array<RetailCrm\Api\Model\Filter\Store\ProductPropertyGroup>")
|
||||
* @JMS\SerializedName("groups")
|
||||
*/
|
||||
public $groups;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("code")
|
||||
*/
|
||||
public $code;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("name")
|
||||
*/
|
||||
public $name;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*
|
||||
* @JMS\Type("bool")
|
||||
* @JMS\SerializedName("isNumeric")
|
||||
*/
|
||||
public $isNumeric;
|
||||
}
|
||||
|
@ -9,29 +9,15 @@
|
||||
|
||||
namespace RetailCrm\Api\Model\Filter\Store;
|
||||
|
||||
use RetailCrm\Api\Component\Serializer\Annotation as JMS;
|
||||
use RetailCrm\Api\Model\Entity\Store\ProductPropertyGroup as Base;
|
||||
|
||||
/**
|
||||
* Class ProductPropertyGroup
|
||||
*
|
||||
* @category ProductPropertyGroup
|
||||
* @package RetailCrm\Api\Model\Filter\Store
|
||||
* @deprecated Please use RetailCrm\Api\Model\Entity\Store\ProductPropertyGroup instead.
|
||||
*/
|
||||
class ProductPropertyGroup
|
||||
class ProductPropertyGroup extends Base
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("id")
|
||||
*/
|
||||
public $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("name")
|
||||
*/
|
||||
public $name;
|
||||
}
|
||||
|
@ -21,9 +21,9 @@ use RetailCrm\Api\Model\Response\AbstractPaginatedResponse;
|
||||
class ProductPropertiesResponse extends AbstractPaginatedResponse
|
||||
{
|
||||
/**
|
||||
* @var \RetailCrm\Api\Model\Filter\Store\ProductProperty[]
|
||||
* @var \RetailCrm\Api\Model\Entity\Store\ProductProperty[]
|
||||
*
|
||||
* @JMS\Type("array<RetailCrm\Api\Model\Filter\Store\ProductProperty>")
|
||||
* @JMS\Type("array<RetailCrm\Api\Model\Entity\Store\ProductProperty>")
|
||||
* @JMS\SerializedName("properties")
|
||||
*/
|
||||
public $properties;
|
||||
|
@ -597,15 +597,19 @@ EOF;
|
||||
],
|
||||
"code": "code",
|
||||
"name": "Код",
|
||||
"isNumeric": false
|
||||
"isNumeric": false,
|
||||
"visible": true,
|
||||
"variative": true
|
||||
}
|
||||
]
|
||||
}
|
||||
EOF;
|
||||
|
||||
$request = new ProductPropertiesRequest();
|
||||
$request->filter = new ProductPropertiesFilterType();
|
||||
$request = new ProductPropertiesRequest();
|
||||
$request->filter = new ProductPropertiesFilterType();
|
||||
$request->filter->sites = ['moysklad', 'aliexpress'];
|
||||
$request->filter->visible = NumericBoolean::TRUE;
|
||||
$request->filter->variative = NumericBoolean::TRUE;
|
||||
|
||||
$mock = static::createApiMockBuilder('store/products/properties');
|
||||
$mock->matchMethod(RequestMethod::GET)
|
||||
|
Loading…
Reference in New Issue
Block a user