1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* @author @jenschude <[email protected]> |
4
|
|
|
*/ |
5
|
|
|
|
6
|
|
|
namespace Commercetools\Core\Model\Message; |
7
|
|
|
|
8
|
|
|
use Commercetools\Core\Model\Product\ProductVariant; |
9
|
|
|
use Commercetools\Core\Model\Common\DateTimeDecorator; |
10
|
|
|
use DateTime; |
11
|
|
|
use Commercetools\Core\Model\Common\Reference; |
12
|
|
|
|
13
|
|
|
/** |
14
|
|
|
* @package Commercetools\Core\Model\Message |
15
|
|
|
* @link https://docs.commercetools.com/http-api-projects-messages.html#productvariantadded-message |
16
|
|
|
* @method string getId() |
17
|
|
|
* @method ProductVariantAddedMessage setId(string $id = null) |
18
|
|
|
* @method int getVersion() |
19
|
|
|
* @method ProductVariantAddedMessage setVersion(int $version = null) |
20
|
|
|
* @method DateTimeDecorator getCreatedAt() |
21
|
|
|
* @method ProductVariantAddedMessage setCreatedAt(DateTime $createdAt = null) |
22
|
|
|
* @method DateTimeDecorator getLastModifiedAt() |
23
|
|
|
* @method ProductVariantAddedMessage setLastModifiedAt(DateTime $lastModifiedAt = null) |
24
|
|
|
* @method int getSequenceNumber() |
25
|
|
|
* @method ProductVariantAddedMessage setSequenceNumber(int $sequenceNumber = null) |
26
|
|
|
* @method Reference getResource() |
27
|
|
|
* @method ProductVariantAddedMessage setResource(Reference $resource = null) |
28
|
|
|
* @method int getResourceVersion() |
29
|
|
|
* @method ProductVariantAddedMessage setResourceVersion(int $resourceVersion = null) |
30
|
|
|
* @method string getType() |
31
|
|
|
* @method ProductVariantAddedMessage setType(string $type = null) |
32
|
|
|
* @method array getRemovedImageUrls() |
33
|
|
|
* @method ProductVariantAddedMessage setRemovedImageUrls(array $removedImageUrls = null) |
34
|
|
|
* @method ProductVariant getVariant() |
35
|
|
|
* @method ProductVariantAddedMessage setVariant(ProductVariant $variant = null) |
36
|
|
|
* @method UserProvidedIdentifiers getResourceUserProvidedIdentifiers() |
37
|
|
|
* phpcs:disable |
38
|
|
|
* @method ProductVariantAddedMessage setResourceUserProvidedIdentifiers(UserProvidedIdentifiers $resourceUserProvidedIdentifiers = null) |
39
|
|
|
* phpcs:enable |
40
|
|
|
* @method bool getStaged() |
41
|
|
|
* @method ProductVariantAddedMessage setStaged(bool $staged = null) |
42
|
|
|
*/ |
43
|
|
|
class ProductVariantAddedMessage extends Message |
44
|
|
|
{ |
45
|
|
|
const MESSAGE_TYPE = 'ProductVariantAdded'; |
46
|
|
|
|
47
|
|
|
public function fieldDefinitions() |
48
|
|
|
{ |
49
|
|
|
$definitions = parent::fieldDefinitions(); |
50
|
|
|
$definitions['variant'] = [static::TYPE => ProductVariant::class]; |
51
|
|
|
$definitions['staged'] = [static::TYPE => 'bool']; |
52
|
|
|
|
53
|
|
|
return $definitions; |
54
|
|
|
} |
55
|
|
|
} |
56
|
|
|
|