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

Commit

Permalink
feat(Messages): add ProductImageAdded message
Browse files Browse the repository at this point in the history
Closes #314
  • Loading branch information
Jens Schulze committed Jun 1, 2017
1 parent c5e0531 commit 0e14d97
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions src/Core/Model/Message/ProductImageAddedMessage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?php
/**
* @author @jayS-de <jens.schulze@commercetools.de>
*/

namespace Commercetools\Core\Model\Message;

use Commercetools\Core\Model\Common\DateTimeDecorator;
use Commercetools\Core\Model\Common\Image;
use Commercetools\Core\Model\Common\Reference;
use Commercetools\Core\Model\Product\ProductProjection;
use DateTime;

/**
* @package Commercetools\Core\Model\Message
* @link https://dev.commercetools.com/http-api-projects-messages.html#productimageadded-message
* @method string getId()
* @method ProductImageAddedMessage setId(string $id = null)
* @method int getVersion()
* @method ProductImageAddedMessage setVersion(int $version = null)
* @method DateTimeDecorator getCreatedAt()
* @method ProductImageAddedMessage setCreatedAt(DateTime $createdAt = null)
* @method DateTimeDecorator getLastModifiedAt()
* @method ProductImageAddedMessage setLastModifiedAt(DateTime $lastModifiedAt = null)
* @method int getSequenceNumber()
* @method ProductImageAddedMessage setSequenceNumber(int $sequenceNumber = null)
* @method Reference getResource()
* @method ProductImageAddedMessage setResource(Reference $resource = null)
* @method int getResourceVersion()
* @method ProductImageAddedMessage setResourceVersion(int $resourceVersion = null)
* @method string getType()
* @method ProductImageAddedMessage setType(string $type = null)
* @method int getVariantId()
* @method ProductImageAddedMessage setVariantId(int $variantId = null)
* @method Image getImage()
* @method ProductImageAddedMessage setImage(Image $image = null)
* @method bool getStaged()
* @method ProductImageAddedMessage setStaged(bool $staged = null)
*/
class ProductImageAddedMessage extends Message
{
const MESSAGE_TYPE = 'ProductImageAdded';

public function fieldDefinitions()
{
$definitions = parent::fieldDefinitions();
$definitions['variantId'] = [static::TYPE => 'int'];
$definitions['image'] = [static::TYPE => Image::class];
$definitions['staged'] = [static::TYPE => 'bool'];

return $definitions;
}
}

0 comments on commit 0e14d97

Please # to comment.