Skip to content
This repository was archived by the owner on Oct 24, 2023. It is now read-only.

Commit 0e14d97

Browse files
author
Jens Schulze
committed
feat(Messages): add ProductImageAdded message
Closes #314
1 parent c5e0531 commit 0e14d97

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?php
2+
/**
3+
* @author @jayS-de <jens.schulze@commercetools.de>
4+
*/
5+
6+
namespace Commercetools\Core\Model\Message;
7+
8+
use Commercetools\Core\Model\Common\DateTimeDecorator;
9+
use Commercetools\Core\Model\Common\Image;
10+
use Commercetools\Core\Model\Common\Reference;
11+
use Commercetools\Core\Model\Product\ProductProjection;
12+
use DateTime;
13+
14+
/**
15+
* @package Commercetools\Core\Model\Message
16+
* @link https://dev.commercetools.com/http-api-projects-messages.html#productimageadded-message
17+
* @method string getId()
18+
* @method ProductImageAddedMessage setId(string $id = null)
19+
* @method int getVersion()
20+
* @method ProductImageAddedMessage setVersion(int $version = null)
21+
* @method DateTimeDecorator getCreatedAt()
22+
* @method ProductImageAddedMessage setCreatedAt(DateTime $createdAt = null)
23+
* @method DateTimeDecorator getLastModifiedAt()
24+
* @method ProductImageAddedMessage setLastModifiedAt(DateTime $lastModifiedAt = null)
25+
* @method int getSequenceNumber()
26+
* @method ProductImageAddedMessage setSequenceNumber(int $sequenceNumber = null)
27+
* @method Reference getResource()
28+
* @method ProductImageAddedMessage setResource(Reference $resource = null)
29+
* @method int getResourceVersion()
30+
* @method ProductImageAddedMessage setResourceVersion(int $resourceVersion = null)
31+
* @method string getType()
32+
* @method ProductImageAddedMessage setType(string $type = null)
33+
* @method int getVariantId()
34+
* @method ProductImageAddedMessage setVariantId(int $variantId = null)
35+
* @method Image getImage()
36+
* @method ProductImageAddedMessage setImage(Image $image = null)
37+
* @method bool getStaged()
38+
* @method ProductImageAddedMessage setStaged(bool $staged = null)
39+
*/
40+
class ProductImageAddedMessage extends Message
41+
{
42+
const MESSAGE_TYPE = 'ProductImageAdded';
43+
44+
public function fieldDefinitions()
45+
{
46+
$definitions = parent::fieldDefinitions();
47+
$definitions['variantId'] = [static::TYPE => 'int'];
48+
$definitions['image'] = [static::TYPE => Image::class];
49+
$definitions['staged'] = [static::TYPE => 'bool'];
50+
51+
return $definitions;
52+
}
53+
}

0 commit comments

Comments
 (0)