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
|
|
|
use Commercetools\Core\Model\Common\Address; |
11
|
|
|
|
12
|
|
|
/** |
13
|
|
|
* @package Commercetools\Core\Model\Message |
14
|
|
|
* @link https://dev.commercetools.com/http-api-projects-messages.html#orderbillingaddressset-message |
15
|
|
|
* |
16
|
|
|
* @method string getId() |
17
|
|
|
* @method OrderBillingAddressSetMessage setId(string $id = null) |
18
|
|
|
* @method int getVersion() |
19
|
|
|
* @method OrderBillingAddressSetMessage setVersion(int $version = null) |
20
|
|
|
* @method DateTimeDecorator getCreatedAt() |
21
|
|
|
* @method OrderBillingAddressSetMessage setCreatedAt(\DateTime $createdAt = null) |
22
|
|
|
* @method DateTimeDecorator getLastModifiedAt() |
23
|
|
|
* @method OrderBillingAddressSetMessage setLastModifiedAt(\DateTime $lastModifiedAt = null) |
24
|
|
|
* @method int getSequenceNumber() |
25
|
|
|
* @method OrderBillingAddressSetMessage setSequenceNumber(int $sequenceNumber = null) |
26
|
|
|
* @method Reference getResource() |
27
|
|
|
* @method OrderBillingAddressSetMessage setResource(Reference $resource = null) |
28
|
|
|
* @method int getResourceVersion() |
29
|
|
|
* @method OrderBillingAddressSetMessage setResourceVersion(int $resourceVersion = null) |
30
|
|
|
* @method string getType() |
31
|
|
|
* @method OrderBillingAddressSetMessage setType(string $type = null) |
32
|
|
|
* @method Address getAddress() |
33
|
|
|
* @method OrderBillingAddressSetMessage setAddress(Address $address = null) |
34
|
|
|
*/ |
35
|
|
View Code Duplication |
class OrderBillingAddressSetMessage extends Message |
|
|
|
|
36
|
|
|
{ |
37
|
|
|
const MESSAGE_TYPE = 'OrderBillingAddressSet'; |
38
|
|
|
|
39
|
|
|
public function fieldDefinitions() |
40
|
|
|
{ |
41
|
|
|
$definitions = parent::fieldDefinitions(); |
42
|
|
|
$definitions['address'] = [static::TYPE => '\Commercetools\Core\Model\Common\Address']; |
43
|
|
|
|
44
|
|
|
return $definitions; |
45
|
|
|
} |
46
|
|
|
} |
47
|
|
|
|
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.