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
ParcelItemsUpdatedMessagePayloadModel.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
ParcelItemsUpdatedMessagePayloadModel
extends
JsonObjectModel
implements
ParcelItemsUpdatedMessagePayload
22
{
23
public
const
DISCRIMINATOR_VALUE
=
'ParcelItemsUpdated'
;
28
protected
$type
;
29
34
protected
$parcelId
;
35
40
protected
$deliveryId
;
41
46
protected
$items
;
47
52
protected
$oldItems
;
53
58
protected
$shippingKey
;
59
60
64
public
function
__construct
(
65
?
string
$parcelId
=
null
,
66
?
string
$deliveryId
=
null
,
67
?
DeliveryItemCollection
$items
=
null
,
68
?
DeliveryItemCollection
$oldItems
=
null
,
69
?
string
$shippingKey
=
null
,
70
?
string
$type
=
null
71
) {
72
$this->parcelId =
$parcelId
;
73
$this->deliveryId =
$deliveryId
;
74
$this->items =
$items
;
75
$this->oldItems =
$oldItems
;
76
$this->shippingKey =
$shippingKey
;
77
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
78
}
79
84
public
function
getType
()
85
{
86
if
(is_null($this->type)) {
88
$data = $this->
raw
(self::FIELD_TYPE);
89
if
(is_null($data)) {
90
return
null
;
91
}
92
$this->type = (string) $data;
93
}
94
95
return
$this->type
;
96
}
97
104
public
function
getParcelId
()
105
{
106
if
(is_null($this->parcelId)) {
108
$data = $this->
raw
(self::FIELD_PARCEL_ID);
109
if
(is_null($data)) {
110
return
null
;
111
}
112
$this->parcelId = (string) $data;
113
}
114
115
return
$this->parcelId
;
116
}
117
124
public
function
getDeliveryId
()
125
{
126
if
(is_null($this->deliveryId)) {
128
$data = $this->
raw
(self::FIELD_DELIVERY_ID);
129
if
(is_null($data)) {
130
return
null
;
131
}
132
$this->deliveryId = (string) $data;
133
}
134
135
return
$this->deliveryId
;
136
}
137
144
public
function
getItems
()
145
{
146
if
(is_null($this->items)) {
148
$data = $this->
raw
(self::FIELD_ITEMS);
149
if
(is_null($data)) {
150
return
null
;
151
}
152
$this->items = DeliveryItemCollection::fromArray($data);
153
}
154
155
return
$this->items
;
156
}
157
164
public
function
getOldItems
()
165
{
166
if
(is_null($this->oldItems)) {
168
$data = $this->
raw
(self::FIELD_OLD_ITEMS);
169
if
(is_null($data)) {
170
return
null
;
171
}
172
$this->oldItems = DeliveryItemCollection::fromArray($data);
173
}
174
175
return
$this->oldItems
;
176
}
177
184
public
function
getShippingKey
()
185
{
186
if
(is_null($this->shippingKey)) {
188
$data = $this->
raw
(self::FIELD_SHIPPING_KEY);
189
if
(is_null($data)) {
190
return
null
;
191
}
192
$this->shippingKey = (string) $data;
193
}
194
195
return
$this->shippingKey
;
196
}
197
198
202
public
function
setParcelId
(?
string
$parcelId
): void
203
{
204
$this->parcelId =
$parcelId
;
205
}
206
210
public
function
setDeliveryId
(?
string
$deliveryId
): void
211
{
212
$this->deliveryId =
$deliveryId
;
213
}
214
218
public
function
setItems
(?
DeliveryItemCollection
$items
): void
219
{
220
$this->items =
$items
;
221
}
222
226
public
function
setOldItems
(?
DeliveryItemCollection
$oldItems
): void
227
{
228
$this->oldItems =
$oldItems
;
229
}
230
234
public
function
setShippingKey
(?
string
$shippingKey
): void
235
{
236
$this->shippingKey =
$shippingKey
;
237
}
238
}
Commercetools\Api\Models\Message\ParcelItemsUpdatedMessagePayloadModel
Definition
ParcelItemsUpdatedMessagePayloadModel.php:22
Commercetools\Api\Models\Message\ParcelItemsUpdatedMessagePayloadModel\setOldItems
setOldItems(?DeliveryItemCollection $oldItems)
Definition
ParcelItemsUpdatedMessagePayloadModel.php:226
Commercetools\Api\Models\Message\ParcelItemsUpdatedMessagePayloadModel\$shippingKey
$shippingKey
Definition
ParcelItemsUpdatedMessagePayloadModel.php:58
Commercetools\Api\Models\Message\ParcelItemsUpdatedMessagePayloadModel\getParcelId
getParcelId()
Definition
ParcelItemsUpdatedMessagePayloadModel.php:104
Commercetools\Api\Models\Message\ParcelItemsUpdatedMessagePayloadModel\$oldItems
$oldItems
Definition
ParcelItemsUpdatedMessagePayloadModel.php:52
Commercetools\Api\Models\Message\ParcelItemsUpdatedMessagePayloadModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
ParcelItemsUpdatedMessagePayloadModel.php:23
Commercetools\Api\Models\Message\ParcelItemsUpdatedMessagePayloadModel\$deliveryId
$deliveryId
Definition
ParcelItemsUpdatedMessagePayloadModel.php:40
Commercetools\Api\Models\Message\ParcelItemsUpdatedMessagePayloadModel\setShippingKey
setShippingKey(?string $shippingKey)
Definition
ParcelItemsUpdatedMessagePayloadModel.php:234
Commercetools\Api\Models\Message\ParcelItemsUpdatedMessagePayloadModel\$items
$items
Definition
ParcelItemsUpdatedMessagePayloadModel.php:46
Commercetools\Api\Models\Message\ParcelItemsUpdatedMessagePayloadModel\setItems
setItems(?DeliveryItemCollection $items)
Definition
ParcelItemsUpdatedMessagePayloadModel.php:218
Commercetools\Api\Models\Message\ParcelItemsUpdatedMessagePayloadModel\$type
$type
Definition
ParcelItemsUpdatedMessagePayloadModel.php:28
Commercetools\Api\Models\Message\ParcelItemsUpdatedMessagePayloadModel\setParcelId
setParcelId(?string $parcelId)
Definition
ParcelItemsUpdatedMessagePayloadModel.php:202
Commercetools\Api\Models\Message\ParcelItemsUpdatedMessagePayloadModel\setDeliveryId
setDeliveryId(?string $deliveryId)
Definition
ParcelItemsUpdatedMessagePayloadModel.php:210
Commercetools\Api\Models\Message\ParcelItemsUpdatedMessagePayloadModel\$parcelId
$parcelId
Definition
ParcelItemsUpdatedMessagePayloadModel.php:34
Commercetools\Api\Models\Message\ParcelItemsUpdatedMessagePayloadModel\getDeliveryId
getDeliveryId()
Definition
ParcelItemsUpdatedMessagePayloadModel.php:124
Commercetools\Api\Models\Message\ParcelItemsUpdatedMessagePayloadModel\getType
getType()
Definition
ParcelItemsUpdatedMessagePayloadModel.php:84
Commercetools\Api\Models\Message\ParcelItemsUpdatedMessagePayloadModel\getShippingKey
getShippingKey()
Definition
ParcelItemsUpdatedMessagePayloadModel.php:184
Commercetools\Api\Models\Message\ParcelItemsUpdatedMessagePayloadModel\getOldItems
getOldItems()
Definition
ParcelItemsUpdatedMessagePayloadModel.php:164
Commercetools\Api\Models\Message\ParcelItemsUpdatedMessagePayloadModel\getItems
getItems()
Definition
ParcelItemsUpdatedMessagePayloadModel.php:144
Commercetools\Api\Models\Message\ParcelItemsUpdatedMessagePayloadModel\__construct
__construct(?string $parcelId=null, ?string $deliveryId=null, ?DeliveryItemCollection $items=null, ?DeliveryItemCollection $oldItems=null, ?string $shippingKey=null, ?string $type=null)
Definition
ParcelItemsUpdatedMessagePayloadModel.php:64
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\ParcelItemsUpdatedMessagePayload
Definition
ParcelItemsUpdatedMessagePayload.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Message
Definition
ApprovalFlowApprovedMessage.php:9
Generated by
1.9.8