diff --git a/src/Model/Entity/Store/Product.php b/src/Model/Entity/Store/Product.php index 59aa32b..f2178ae 100644 --- a/src/Model/Entity/Store/Product.php +++ b/src/Model/Entity/Store/Product.php @@ -36,6 +36,14 @@ class Product */ public $maxPrice; + /** + * @var int + * + * @JMS\Type("int") + * @JMS\SerializedName("catalogId") + */ + public $catalogId; + /** * @var int * diff --git a/src/Model/Filter/Store/OfferFilterType.php b/src/Model/Filter/Store/OfferFilterType.php index 3589050..bc542da 100644 --- a/src/Model/Filter/Store/OfferFilterType.php +++ b/src/Model/Filter/Store/OfferFilterType.php @@ -68,6 +68,14 @@ class OfferFilterType */ public $sites; + /** + * @var int[] + * + * @Form\Type("int[]") + * @Form\SerializedName("catalogs") + */ + public $catalogs; + /** * @var int * @@ -83,4 +91,52 @@ class OfferFilterType * @Form\SerializedName("sinceId") */ public $sinceId; + + /** + * @var int[] + * + * @Form\Type("int[]") + * @Form\SerializedName("groups") + */ + public $groups; + + /** + * @var string + * + * @Form\Type("string") + * @Form\SerializedName("priceType") + */ + public $priceType; + + /** + * @var int + * + * @Form\Type("int") + * @Form\SerializedName("minPrice") + */ + public $minPrice; + + /** + * @var int + * + * @Form\Type("int") + * @Form\SerializedName("maxPrice") + */ + public $maxPrice; + + /** + * @var int + * + * @Form\Type("int") + * @Form\SerializedName("minQuantity") + */ + public $minQuantity; + + /** + * @var int + * + * @Form\Type("int") + * @Form\SerializedName("maxQuantity") + */ + public $maxQuantity; } diff --git a/tests/src/ResourceGroup/StoreTest.php b/tests/src/ResourceGroup/StoreTest.php index 57120cd..20133ad 100644 --- a/tests/src/ResourceGroup/StoreTest.php +++ b/tests/src/ResourceGroup/StoreTest.php @@ -943,11 +943,24 @@ EOF; $request = new OffersRequest(); $request->filter = new OfferFilterType(); $request->filter->active = NumericBoolean::TRUE; - $request->filter->name = 'Test Offer'; + $request->filter->minPrice = 1; + $request->filter->maxPrice = 120000; + $request->filter->sites = ['main']; + $request->filter->maxQuantity = 5; + $request->filter->catalogs = [2]; $mock = static::createApiMockBuilder('store/offers'); $mock->matchMethod(RequestMethod::GET) - ->matchQuery(self::encodeFormArray($request)) + ->matchQuery([ + 'filter' => [ + 'sites' => ['main'], + 'catalogs' => ['2'], + 'active' => '1', + 'minPrice' => '1', + 'maxPrice' => '120000', + 'maxQuantity' => '5', + ] + ]) ->reply(200) ->withBody($json);