-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for GET /api/v5/store/offers method
- Loading branch information
Showing
7 changed files
with
536 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,190 @@ | ||
<?php | ||
|
||
/** | ||
* PHP version 7.3 | ||
* | ||
* @category OfferProduct | ||
* @package RetailCrm\Api\Model\Entity\Store | ||
*/ | ||
|
||
namespace RetailCrm\Api\Model\Entity\Store; | ||
|
||
use DateTime; | ||
use RetailCrm\Api\Component\Serializer\Annotation as JMS; | ||
|
||
/** | ||
* Class Product | ||
* | ||
* @category OfferProduct | ||
* @package RetailCrm\Api\Model\Entity\Store | ||
*/ | ||
class OfferProduct | ||
{ | ||
/** | ||
* @var float | ||
* | ||
* @JMS\Type("float") | ||
* @JMS\SerializedName("minPrice") | ||
*/ | ||
public $minPrice; | ||
|
||
/** | ||
* @var float | ||
* | ||
* @JMS\Type("float") | ||
* @JMS\SerializedName("maxPrice") | ||
*/ | ||
public $maxPrice; | ||
|
||
/** | ||
* @var int | ||
* | ||
* @JMS\Type("int") | ||
* @JMS\SerializedName("id") | ||
*/ | ||
public $id; | ||
|
||
/** | ||
* @var string | ||
* | ||
* @JMS\Type("string") | ||
* @JMS\SerializedName("article") | ||
*/ | ||
public $article; | ||
|
||
/** | ||
* @var string | ||
* | ||
* @JMS\Type("string") | ||
* @JMS\SerializedName("name") | ||
*/ | ||
public $name; | ||
|
||
/** | ||
* @var string | ||
* | ||
* @JMS\Type("string") | ||
* @JMS\SerializedName("url") | ||
*/ | ||
public $url; | ||
|
||
/** | ||
* @var string | ||
* | ||
* @JMS\Type("string") | ||
* @JMS\SerializedName("imageUrl") | ||
*/ | ||
public $imageUrl; | ||
|
||
/** | ||
* @var string | ||
* | ||
* @JMS\Type("string") | ||
* @JMS\SerializedName("description") | ||
*/ | ||
public $description; | ||
|
||
/** | ||
* @var bool | ||
* | ||
* @JMS\Type("bool") | ||
* @JMS\SerializedName("popular") | ||
*/ | ||
public $popular; | ||
|
||
/** | ||
* @var bool | ||
* | ||
* @JMS\Type("bool") | ||
* @JMS\SerializedName("stock") | ||
*/ | ||
public $stock; | ||
|
||
/** | ||
* @var bool | ||
* | ||
* @JMS\Type("bool") | ||
* @JMS\SerializedName("novelty") | ||
*/ | ||
public $novelty; | ||
|
||
/** | ||
* @var bool | ||
* | ||
* @JMS\Type("bool") | ||
* @JMS\SerializedName("recommended") | ||
*/ | ||
public $recommended; | ||
|
||
/** | ||
* @var array<string, mixed> | ||
* | ||
* @JMS\Type("array") | ||
* @JMS\SerializedName("properties") | ||
*/ | ||
public $properties; | ||
|
||
/** | ||
* @var \RetailCrm\Api\Model\Entity\FixExternalRow[] | ||
* | ||
* @JMS\Type("array<RetailCrm\Api\Model\Entity\FixExternalRow>") | ||
* @JMS\SerializedName("groups") | ||
*/ | ||
public $groups; | ||
|
||
/** | ||
* @var string | ||
* | ||
* @JMS\Type("string") | ||
* @JMS\SerializedName("externalId") | ||
*/ | ||
public $externalId; | ||
|
||
/** | ||
* @var string | ||
* | ||
* @JMS\Type("string") | ||
* @JMS\SerializedName("manufacturer") | ||
*/ | ||
public $manufacturer; | ||
|
||
/** | ||
* @var bool | ||
* | ||
* @JMS\Type("bool") | ||
* @JMS\SerializedName("active") | ||
*/ | ||
public $active; | ||
|
||
/** | ||
* @var float | ||
* | ||
* @JMS\Type("float") | ||
* @JMS\SerializedName("quantity") | ||
*/ | ||
public $quantity; | ||
|
||
/** | ||
* @var bool | ||
* | ||
* @JMS\Type("bool") | ||
* @JMS\SerializedName("markable") | ||
*/ | ||
public $markable; | ||
|
||
/** | ||
* @var DateTime | ||
* | ||
* @JMS\Type("DateTime<'Y-m-d H:i:s'>") | ||
* @JMS\SerializedName("updatedAt") | ||
*/ | ||
public $updatedAt; | ||
|
||
/** | ||
* @var string | ||
* | ||
* @JMS\Type("string") | ||
* @JMS\SerializedName("type") | ||
*/ | ||
public $type; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
/** | ||
* PHP version 7.3 | ||
* | ||
* @category StoreOffer | ||
* @package RetailCrm\Api\Model\Entity\Store | ||
*/ | ||
|
||
namespace RetailCrm\Api\Model\Entity\Store; | ||
|
||
use RetailCrm\Api\Component\Serializer\Annotation as JMS; | ||
|
||
/** | ||
* Class StoreOffer | ||
* | ||
* @category StoreOffer | ||
* @package RetailCrm\Api\Model\Entity\Store | ||
*/ | ||
class StoreOffer extends ProductOffer | ||
{ | ||
/** | ||
* @JMS\Exclude() | ||
*/ | ||
public $price; | ||
|
||
/** | ||
* @var \RetailCrm\Api\Model\Entity\Store\Product | ||
* | ||
* @JMS\Type("RetailCrm\Api\Model\Entity\Store\Product") | ||
* @JMS\SerializedName("product") | ||
*/ | ||
public $product; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<?php | ||
|
||
/** | ||
* PHP version 7.3 | ||
* | ||
* @category OfferFilterType | ||
* @package RetailCrm\Api\Model\Filter\Store | ||
*/ | ||
|
||
namespace RetailCrm\Api\Model\Filter\Store; | ||
|
||
use DateTime; | ||
use RetailCrm\Api\Component\FormData\Mapping as Form; | ||
|
||
/** | ||
* Class OfferFilterType | ||
* | ||
* @category OfferFilterType | ||
* @package RetailCrm\Api\Model\Filter\Store | ||
*/ | ||
class OfferFilterType | ||
{ | ||
/** | ||
* @var int[] | ||
* | ||
* @Form\Type("int[]") | ||
* @Form\SerializedName("ids") | ||
*/ | ||
public $ids; | ||
|
||
/** | ||
* @var string | ||
* | ||
* @Form\Type("string") | ||
* @Form\SerializedName("name") | ||
*/ | ||
public $name; | ||
|
||
/** | ||
* @var string | ||
* | ||
* @Form\Type("string[]") | ||
* @Form\SerializedName("externalIds") | ||
*/ | ||
public $externalIds; | ||
|
||
/** | ||
* @var string | ||
* | ||
* @Form\Type("string[]") | ||
* @Form\SerializedName("xmlIds") | ||
*/ | ||
public $xmlIds; | ||
|
||
/** | ||
* @var string[] | ||
* | ||
* @Form\Type("string[]") | ||
* @Form\SerializedName("properties") | ||
*/ | ||
public $properties; | ||
|
||
/** | ||
* @var string[] | ||
* | ||
* @Form\Type("string[]") | ||
* @Form\SerializedName("sites") | ||
*/ | ||
public $sites; | ||
|
||
/** | ||
* @var int | ||
* | ||
* @Form\Type("int") | ||
* @Form\SerializedName("active") | ||
*/ | ||
public $active; | ||
|
||
/** | ||
* @var int | ||
* | ||
* @Form\Type("int") | ||
* @Form\SerializedName("sinceId") | ||
*/ | ||
public $sinceId; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
/** | ||
* PHP version 7.3 | ||
* | ||
* @category OffersRequest | ||
* @package RetailCrm\Api\Model\Request\Store | ||
*/ | ||
|
||
namespace RetailCrm\Api\Model\Request\Store; | ||
|
||
use RetailCrm\Api\Component\FormData\Mapping as Form; | ||
use RetailCrm\Api\Interfaces\RequestInterface; | ||
use RetailCrm\Api\Model\Request\Traits\PageLimitTrait; | ||
|
||
/** | ||
* Class OffersRequest | ||
* | ||
* @category OffersRequest | ||
* @package RetailCrm\Api\Model\Request\Store | ||
*/ | ||
class OffersRequest implements RequestInterface | ||
{ | ||
use PageLimitTrait; | ||
|
||
/** | ||
* @var \RetailCrm\Api\Model\Filter\Store\OfferFilterType | ||
* | ||
* @Form\Type("RetailCrm\Api\Model\Filter\Store\OfferFilterType") | ||
* @Form\SerializedName("filter") | ||
*/ | ||
public $filter; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
/** | ||
* PHP version 7.3 | ||
* | ||
* @category OffersResponse | ||
* @package RetailCrm\Api\Model\Response\Store | ||
*/ | ||
|
||
namespace RetailCrm\Api\Model\Response\Store; | ||
|
||
use RetailCrm\Api\Component\Serializer\Annotation as JMS; | ||
use RetailCrm\Api\Model\Response\AbstractPaginatedResponse; | ||
|
||
/** | ||
* Class OffersResponse | ||
* | ||
* @category OffersResponse | ||
* @package RetailCrm\Api\Model\Response\Store | ||
*/ | ||
class OffersResponse extends AbstractPaginatedResponse | ||
{ | ||
/** | ||
* @var \RetailCrm\Api\Model\Entity\Store\StoreOffer[] | ||
* | ||
* @JMS\Type("array<RetailCrm\Api\Model\Entity\Store\StoreOffer>") | ||
* @JMS\SerializedName("offers") | ||
*/ | ||
public $offers; | ||
} |
Oops, something went wrong.