|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
*/ |
|
4
|
|
|
|
|
5
|
|
|
namespace Commercetools\Core\Model\Message; |
|
6
|
|
|
|
|
7
|
|
|
use Commercetools\Core\Model\Common\DateTimeDecorator; |
|
8
|
|
|
use Commercetools\Core\Model\Common\DiscountedPrice; |
|
9
|
|
|
use Commercetools\Core\Model\Common\Reference; |
|
10
|
|
|
use DateTime; |
|
11
|
|
|
|
|
12
|
|
|
/** |
|
13
|
|
|
* @package Commercetools\Core\Model\Message |
|
14
|
|
|
* @link https://docs.commercetools.com/http-api-message-types.html#productpriceexternaldiscountset-message |
|
15
|
|
|
* @method string getId() |
|
16
|
|
|
* @method ProductPriceExternalDiscountSetMessage setId(string $id = null) |
|
17
|
|
|
* @method int getVersion() |
|
18
|
|
|
* @method ProductPriceExternalDiscountSetMessage setVersion(int $version = null) |
|
19
|
|
|
* @method DateTimeDecorator getCreatedAt() |
|
20
|
|
|
* @method ProductPriceExternalDiscountSetMessage setCreatedAt(DateTime $createdAt = null) |
|
21
|
|
|
* @method DateTimeDecorator getLastModifiedAt() |
|
22
|
|
|
* @method ProductPriceExternalDiscountSetMessage setLastModifiedAt(DateTime $lastModifiedAt = null) |
|
23
|
|
|
* @method int getSequenceNumber() |
|
24
|
|
|
* @method ProductPriceExternalDiscountSetMessage setSequenceNumber(int $sequenceNumber = null) |
|
25
|
|
|
* @method Reference getResource() |
|
26
|
|
|
* @method ProductPriceExternalDiscountSetMessage setResource(Reference $resource = null) |
|
27
|
|
|
* @method int getResourceVersion() |
|
28
|
|
|
* @method ProductPriceExternalDiscountSetMessage setResourceVersion(int $resourceVersion = null) |
|
29
|
|
|
* @method string getType() |
|
30
|
|
|
* @method ProductPriceExternalDiscountSetMessage setType(string $type = null) |
|
31
|
|
|
* @method ProductPriceDiscountsSetUpdatedPriceCollection getUpdatedPrices() |
|
32
|
|
|
* phpcs:disable |
|
33
|
|
|
* @method ProductPriceDiscountsSetMessage setUpdatedPrices(ProductPriceDiscountsSetUpdatedPriceCollection $updatedPrices = null) |
|
34
|
|
|
* phpcs:enable |
|
35
|
|
|
* @method int getVariantId() |
|
36
|
|
|
* @method ProductPriceExternalDiscountSetMessage setVariantId(int $variantId = null) |
|
37
|
|
|
* @method string getVariantKey() |
|
38
|
|
|
* @method ProductPriceExternalDiscountSetMessage setVariantKey(string $variantKey = null) |
|
39
|
|
|
* @method string getSku() |
|
40
|
|
|
* @method ProductPriceExternalDiscountSetMessage setSku(string $sku = null) |
|
41
|
|
|
* @method string getPriceId() |
|
42
|
|
|
* @method ProductPriceExternalDiscountSetMessage setPriceId(string $priceId = null) |
|
43
|
|
|
* @method DiscountedPrice getDiscounted() |
|
44
|
|
|
* @method ProductPriceExternalDiscountSetMessage setDiscounted(DiscountedPrice $discounted = null) |
|
45
|
|
|
* @method bool getStaged() |
|
46
|
|
|
* @method ProductPriceExternalDiscountSetMessage setStaged(bool $staged = null) |
|
47
|
|
|
*/ |
|
48
|
|
|
class ProductPriceExternalDiscountSetMessage extends Message |
|
49
|
|
|
{ |
|
50
|
|
|
const MESSAGE_TYPE = 'ProductPriceExternalDiscountSet'; |
|
51
|
|
|
|
|
52
|
|
|
public function fieldDefinitions() |
|
53
|
|
|
{ |
|
54
|
2 |
|
$definitions = parent::fieldDefinitions(); |
|
55
|
2 |
|
$definitions['variantId'] = [static::TYPE => 'int']; |
|
56
|
2 |
|
$definitions['variantKey'] = [static::TYPE => 'string']; |
|
57
|
2 |
|
$definitions['sku'] = [static::TYPE => 'string']; |
|
58
|
2 |
|
$definitions['priceId'] = [static::TYPE => 'string']; |
|
59
|
2 |
|
$definitions['discounted'] = [static::TYPE => DiscountedPrice::class]; |
|
60
|
2 |
|
$definitions['staged'] = [static::TYPE => 'bool']; |
|
61
|
|
|
|
|
62
|
2 |
|
return $definitions; |
|
63
|
|
|
} |
|
64
|
|
|
} |
|
65
|
|
|
|