1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* @author @jayS-de <[email protected]> |
4
|
|
|
*/ |
5
|
|
|
|
6
|
|
|
namespace Commercetools\Core\Model\Message; |
7
|
|
|
|
8
|
|
|
use Commercetools\Core\Model\Common\DateTimeDecorator; |
9
|
|
|
use Commercetools\Core\Model\Common\Reference; |
10
|
|
|
|
11
|
|
|
/** |
12
|
|
|
* @package Commercetools\Core\Model\Message |
13
|
|
|
* @link https://dev.commercetools.com/http-api-projects-messages.html#ordercustomeremailset-message |
14
|
|
|
* |
15
|
|
|
* @method string getId() |
16
|
|
|
* @method OrderCustomerEmailSetMessage setId(string $id = null) |
17
|
|
|
* @method int getVersion() |
18
|
|
|
* @method OrderCustomerEmailSetMessage setVersion(int $version = null) |
19
|
|
|
* @method DateTimeDecorator getCreatedAt() |
20
|
|
|
* @method OrderCustomerEmailSetMessage setCreatedAt(\DateTime $createdAt = null) |
21
|
|
|
* @method DateTimeDecorator getLastModifiedAt() |
22
|
|
|
* @method OrderCustomerEmailSetMessage setLastModifiedAt(\DateTime $lastModifiedAt = null) |
23
|
|
|
* @method int getSequenceNumber() |
24
|
|
|
* @method OrderCustomerEmailSetMessage setSequenceNumber(int $sequenceNumber = null) |
25
|
|
|
* @method Reference getResource() |
26
|
|
|
* @method OrderCustomerEmailSetMessage setResource(Reference $resource = null) |
27
|
|
|
* @method int getResourceVersion() |
28
|
|
|
* @method OrderCustomerEmailSetMessage setResourceVersion(int $resourceVersion = null) |
29
|
|
|
* @method string getType() |
30
|
|
|
* @method OrderCustomerEmailSetMessage setType(string $type = null) |
31
|
|
|
* @method string getEmail() |
32
|
|
|
* @method OrderCustomerEmailSetMessage setEmail(string $email = null) |
33
|
|
|
*/ |
34
|
|
View Code Duplication |
class OrderCustomerEmailSetMessage extends Message |
|
|
|
|
35
|
|
|
{ |
36
|
|
|
const MESSAGE_TYPE = 'OrderCustomerEmailSet'; |
37
|
|
|
|
38
|
|
|
public function fieldDefinitions() |
39
|
|
|
{ |
40
|
|
|
$definitions = parent::fieldDefinitions(); |
41
|
|
|
$definitions['email'] = [static::TYPE => 'string']; |
42
|
|
|
|
43
|
|
|
return $definitions; |
44
|
|
|
} |
45
|
|
|
} |
46
|
|
|
|
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.