commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-api
src
Models
Message
DeliveryItemsUpdatedMessagePayloadModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Message
;
10
11
use
Commercetools\Api\Models\Order\DeliveryItemCollection
;
12
use
Commercetools\Base\DateTimeImmutableCollection
;
13
use
Commercetools\Base\JsonObject
;
14
use
Commercetools\Base\JsonObjectModel
;
15
use
Commercetools\Base\MapperFactory
;
16
use stdClass;
17
21
final
class
DeliveryItemsUpdatedMessagePayloadModel
extends
JsonObjectModel
implements
DeliveryItemsUpdatedMessagePayload
22
{
23
public
const
DISCRIMINATOR_VALUE
=
'DeliveryItemsUpdated'
;
28
protected
$type
;
29
34
protected
$deliveryId
;
35
40
protected
$items
;
41
46
protected
$oldItems
;
47
52
protected
$shippingKey
;
53
54
58
public
function
__construct
(
59
?
string
$deliveryId
=
null
,
60
?
DeliveryItemCollection
$items
=
null
,
61
?
DeliveryItemCollection
$oldItems
=
null
,
62
?
string
$shippingKey
=
null
,
63
?
string
$type
=
null
64
) {
65
$this->deliveryId =
$deliveryId
;
66
$this->items =
$items
;
67
$this->oldItems =
$oldItems
;
68
$this->shippingKey =
$shippingKey
;
69
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
70
}
71
76
public
function
getType
()
77
{
78
if
(is_null($this->type)) {
80
$data = $this->
raw
(self::FIELD_TYPE);
81
if
(is_null($data)) {
82
return
null
;
83
}
84
$this->type = (string) $data;
85
}
86
87
return
$this->type
;
88
}
89
96
public
function
getDeliveryId
()
97
{
98
if
(is_null($this->deliveryId)) {
100
$data = $this->
raw
(self::FIELD_DELIVERY_ID);
101
if
(is_null($data)) {
102
return
null
;
103
}
104
$this->deliveryId = (string) $data;
105
}
106
107
return
$this->deliveryId
;
108
}
109
116
public
function
getItems
()
117
{
118
if
(is_null($this->items)) {
120
$data = $this->
raw
(self::FIELD_ITEMS);
121
if
(is_null($data)) {
122
return
null
;
123
}
124
$this->items = DeliveryItemCollection::fromArray($data);
125
}
126
127
return
$this->items
;
128
}
129
136
public
function
getOldItems
()
137
{
138
if
(is_null($this->oldItems)) {
140
$data = $this->
raw
(self::FIELD_OLD_ITEMS);
141
if
(is_null($data)) {
142
return
null
;
143
}
144
$this->oldItems = DeliveryItemCollection::fromArray($data);
145
}
146
147
return
$this->oldItems
;
148
}
149
156
public
function
getShippingKey
()
157
{
158
if
(is_null($this->shippingKey)) {
160
$data = $this->
raw
(self::FIELD_SHIPPING_KEY);
161
if
(is_null($data)) {
162
return
null
;
163
}
164
$this->shippingKey = (string) $data;
165
}
166
167
return
$this->shippingKey
;
168
}
169
170
174
public
function
setDeliveryId
(?
string
$deliveryId
): void
175
{
176
$this->deliveryId =
$deliveryId
;
177
}
178
182
public
function
setItems
(?
DeliveryItemCollection
$items
): void
183
{
184
$this->items =
$items
;
185
}
186
190
public
function
setOldItems
(?
DeliveryItemCollection
$oldItems
): void
191
{
192
$this->oldItems =
$oldItems
;
193
}
194
198
public
function
setShippingKey
(?
string
$shippingKey
): void
199
{
200
$this->shippingKey =
$shippingKey
;
201
}
202
}
Commercetools\Api\Models\Message\DeliveryItemsUpdatedMessagePayloadModel
Definition
DeliveryItemsUpdatedMessagePayloadModel.php:22
Commercetools\Api\Models\Message\DeliveryItemsUpdatedMessagePayloadModel\$deliveryId
$deliveryId
Definition
DeliveryItemsUpdatedMessagePayloadModel.php:34
Commercetools\Api\Models\Message\DeliveryItemsUpdatedMessagePayloadModel\setDeliveryId
setDeliveryId(?string $deliveryId)
Definition
DeliveryItemsUpdatedMessagePayloadModel.php:174
Commercetools\Api\Models\Message\DeliveryItemsUpdatedMessagePayloadModel\getType
getType()
Definition
DeliveryItemsUpdatedMessagePayloadModel.php:76
Commercetools\Api\Models\Message\DeliveryItemsUpdatedMessagePayloadModel\setOldItems
setOldItems(?DeliveryItemCollection $oldItems)
Definition
DeliveryItemsUpdatedMessagePayloadModel.php:190
Commercetools\Api\Models\Message\DeliveryItemsUpdatedMessagePayloadModel\__construct
__construct(?string $deliveryId=null, ?DeliveryItemCollection $items=null, ?DeliveryItemCollection $oldItems=null, ?string $shippingKey=null, ?string $type=null)
Definition
DeliveryItemsUpdatedMessagePayloadModel.php:58
Commercetools\Api\Models\Message\DeliveryItemsUpdatedMessagePayloadModel\getOldItems
getOldItems()
Definition
DeliveryItemsUpdatedMessagePayloadModel.php:136
Commercetools\Api\Models\Message\DeliveryItemsUpdatedMessagePayloadModel\getItems
getItems()
Definition
DeliveryItemsUpdatedMessagePayloadModel.php:116
Commercetools\Api\Models\Message\DeliveryItemsUpdatedMessagePayloadModel\$shippingKey
$shippingKey
Definition
DeliveryItemsUpdatedMessagePayloadModel.php:52
Commercetools\Api\Models\Message\DeliveryItemsUpdatedMessagePayloadModel\getDeliveryId
getDeliveryId()
Definition
DeliveryItemsUpdatedMessagePayloadModel.php:96
Commercetools\Api\Models\Message\DeliveryItemsUpdatedMessagePayloadModel\$type
$type
Definition
DeliveryItemsUpdatedMessagePayloadModel.php:28
Commercetools\Api\Models\Message\DeliveryItemsUpdatedMessagePayloadModel\setShippingKey
setShippingKey(?string $shippingKey)
Definition
DeliveryItemsUpdatedMessagePayloadModel.php:198
Commercetools\Api\Models\Message\DeliveryItemsUpdatedMessagePayloadModel\$oldItems
$oldItems
Definition
DeliveryItemsUpdatedMessagePayloadModel.php:46
Commercetools\Api\Models\Message\DeliveryItemsUpdatedMessagePayloadModel\getShippingKey
getShippingKey()
Definition
DeliveryItemsUpdatedMessagePayloadModel.php:156
Commercetools\Api\Models\Message\DeliveryItemsUpdatedMessagePayloadModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
DeliveryItemsUpdatedMessagePayloadModel.php:23
Commercetools\Api\Models\Message\DeliveryItemsUpdatedMessagePayloadModel\setItems
setItems(?DeliveryItemCollection $items)
Definition
DeliveryItemsUpdatedMessagePayloadModel.php:182
Commercetools\Api\Models\Message\DeliveryItemsUpdatedMessagePayloadModel\$items
$items
Definition
DeliveryItemsUpdatedMessagePayloadModel.php:40
Commercetools\Api\Models\Order\DeliveryItemCollection
Definition
DeliveryItemCollection.php:22
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition
BaseJsonObject.php:57
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\Message\DeliveryItemsUpdatedMessagePayload
Definition
DeliveryItemsUpdatedMessagePayload.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Message
Definition
ApprovalFlowApprovedMessage.php:9
Generated by
1.9.8