1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
*/ |
4
|
|
|
|
5
|
|
|
namespace Commercetools\Core\Model\Message; |
6
|
|
|
|
7
|
|
|
use Commercetools\Core\Model\Customer\CustomerReference; |
8
|
|
|
use Commercetools\Core\Model\CustomerGroup\CustomerGroupReference; |
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#ordercustomerset-message |
16
|
|
|
* |
17
|
|
|
* @method string getId() |
18
|
|
|
* @method OrderCustomerSetMessage setId(string $id = null) |
19
|
|
|
* @method int getVersion() |
20
|
|
|
* @method OrderCustomerSetMessage setVersion(int $version = null) |
21
|
|
|
* @method DateTimeDecorator getCreatedAt() |
22
|
|
|
* @method OrderCustomerSetMessage setCreatedAt(DateTime $createdAt = null) |
23
|
|
|
* @method DateTimeDecorator getLastModifiedAt() |
24
|
|
|
* @method OrderCustomerSetMessage setLastModifiedAt(DateTime $lastModifiedAt = null) |
25
|
|
|
* @method int getSequenceNumber() |
26
|
|
|
* @method OrderCustomerSetMessage setSequenceNumber(int $sequenceNumber = null) |
27
|
|
|
* @method Reference getResource() |
28
|
|
|
* @method OrderCustomerSetMessage setResource(Reference $resource = null) |
29
|
|
|
* @method int getResourceVersion() |
30
|
|
|
* @method OrderCustomerSetMessage setResourceVersion(int $resourceVersion = null) |
31
|
|
|
* @method string getType() |
32
|
|
|
* @method OrderCustomerSetMessage setType(string $type = null) |
33
|
|
|
* @method CustomerReference getCustomer() |
34
|
|
|
* @method OrderCustomerSetMessage setCustomer(CustomerReference $customer = null) |
35
|
|
|
* @method CustomerGroupReference getCustomerGroup() |
36
|
|
|
* @method OrderCustomerSetMessage setCustomerGroup(CustomerGroupReference $customerGroup = null) |
37
|
|
|
* @method CustomerReference getOldCustomer() |
38
|
|
|
* @method OrderCustomerSetMessage setOldCustomer(CustomerReference $oldCustomer = null) |
39
|
|
|
* @method CustomerGroupReference getOldCustomerGroup() |
40
|
|
|
* @method OrderCustomerSetMessage setOldCustomerGroup(CustomerGroupReference $oldCustomerGroup = null) |
41
|
|
|
*/ |
42
|
|
|
class OrderCustomerSetMessage extends Message |
43
|
|
|
{ |
44
|
|
|
const MESSAGE_TYPE = 'OrderCustomerSet'; |
45
|
|
|
|
46
|
2 |
|
public function fieldDefinitions() |
47
|
|
|
{ |
48
|
2 |
|
$definitions = parent::fieldDefinitions(); |
49
|
2 |
|
$definitions['customer'] = [static::TYPE => CustomerReference::class]; |
50
|
2 |
|
$definitions['customerGroup'] = [static::TYPE => CustomerGroupReference::class]; |
51
|
2 |
|
$definitions['oldCustomer'] = [static::TYPE => CustomerReference::class]; |
52
|
2 |
|
$definitions['oldCustomerGroup'] = [static::TYPE => CustomerGroupReference::class]; |
53
|
|
|
|
54
|
2 |
|
return $definitions; |
55
|
|
|
} |
56
|
|
|
} |
57
|
|
|
|