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
ParcelMeasurementsUpdatedMessagePayloadModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Message
;
10
11
use
Commercetools\Api\Models\Order\ParcelMeasurements
;
12
use
Commercetools\Api\Models\Order\ParcelMeasurementsModel
;
13
use
Commercetools\Base\DateTimeImmutableCollection
;
14
use
Commercetools\Base\JsonObject
;
15
use
Commercetools\Base\JsonObjectModel
;
16
use
Commercetools\Base\MapperFactory
;
17
use stdClass;
18
22
final
class
ParcelMeasurementsUpdatedMessagePayloadModel
extends
JsonObjectModel
implements
ParcelMeasurementsUpdatedMessagePayload
23
{
24
public
const
DISCRIMINATOR_VALUE
=
'ParcelMeasurementsUpdated'
;
29
protected
$type
;
30
35
protected
$deliveryId
;
36
41
protected
$parcelId
;
42
47
protected
$measurements
;
48
53
protected
$shippingKey
;
54
55
59
public
function
__construct
(
60
?
string
$deliveryId
=
null
,
61
?
string
$parcelId
=
null
,
62
?
ParcelMeasurements
$measurements
=
null
,
63
?
string
$shippingKey
=
null
,
64
?
string
$type
=
null
65
) {
66
$this->deliveryId =
$deliveryId
;
67
$this->parcelId =
$parcelId
;
68
$this->measurements =
$measurements
;
69
$this->shippingKey =
$shippingKey
;
70
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
71
}
72
77
public
function
getType
()
78
{
79
if
(is_null($this->type)) {
81
$data = $this->
raw
(self::FIELD_TYPE);
82
if
(is_null($data)) {
83
return
null
;
84
}
85
$this->type = (string) $data;
86
}
87
88
return
$this->type
;
89
}
90
97
public
function
getDeliveryId
()
98
{
99
if
(is_null($this->deliveryId)) {
101
$data = $this->
raw
(self::FIELD_DELIVERY_ID);
102
if
(is_null($data)) {
103
return
null
;
104
}
105
$this->deliveryId = (string) $data;
106
}
107
108
return
$this->deliveryId
;
109
}
110
117
public
function
getParcelId
()
118
{
119
if
(is_null($this->parcelId)) {
121
$data = $this->
raw
(self::FIELD_PARCEL_ID);
122
if
(is_null($data)) {
123
return
null
;
124
}
125
$this->parcelId = (string) $data;
126
}
127
128
return
$this->parcelId
;
129
}
130
137
public
function
getMeasurements
()
138
{
139
if
(is_null($this->measurements)) {
141
$data = $this->
raw
(self::FIELD_MEASUREMENTS);
142
if
(is_null($data)) {
143
return
null
;
144
}
145
146
$this->measurements = ParcelMeasurementsModel::of($data);
147
}
148
149
return
$this->measurements
;
150
}
151
158
public
function
getShippingKey
()
159
{
160
if
(is_null($this->shippingKey)) {
162
$data = $this->
raw
(self::FIELD_SHIPPING_KEY);
163
if
(is_null($data)) {
164
return
null
;
165
}
166
$this->shippingKey = (string) $data;
167
}
168
169
return
$this->shippingKey
;
170
}
171
172
176
public
function
setDeliveryId
(?
string
$deliveryId
): void
177
{
178
$this->deliveryId =
$deliveryId
;
179
}
180
184
public
function
setParcelId
(?
string
$parcelId
): void
185
{
186
$this->parcelId =
$parcelId
;
187
}
188
192
public
function
setMeasurements
(?
ParcelMeasurements
$measurements
): void
193
{
194
$this->measurements =
$measurements
;
195
}
196
200
public
function
setShippingKey
(?
string
$shippingKey
): void
201
{
202
$this->shippingKey =
$shippingKey
;
203
}
204
}
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadModel
Definition
ParcelMeasurementsUpdatedMessagePayloadModel.php:23
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadModel\setParcelId
setParcelId(?string $parcelId)
Definition
ParcelMeasurementsUpdatedMessagePayloadModel.php:184
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadModel\setShippingKey
setShippingKey(?string $shippingKey)
Definition
ParcelMeasurementsUpdatedMessagePayloadModel.php:200
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadModel\setDeliveryId
setDeliveryId(?string $deliveryId)
Definition
ParcelMeasurementsUpdatedMessagePayloadModel.php:176
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadModel\$deliveryId
$deliveryId
Definition
ParcelMeasurementsUpdatedMessagePayloadModel.php:35
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadModel\$measurements
$measurements
Definition
ParcelMeasurementsUpdatedMessagePayloadModel.php:47
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadModel\$parcelId
$parcelId
Definition
ParcelMeasurementsUpdatedMessagePayloadModel.php:41
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadModel\__construct
__construct(?string $deliveryId=null, ?string $parcelId=null, ?ParcelMeasurements $measurements=null, ?string $shippingKey=null, ?string $type=null)
Definition
ParcelMeasurementsUpdatedMessagePayloadModel.php:59
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadModel\setMeasurements
setMeasurements(?ParcelMeasurements $measurements)
Definition
ParcelMeasurementsUpdatedMessagePayloadModel.php:192
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadModel\getDeliveryId
getDeliveryId()
Definition
ParcelMeasurementsUpdatedMessagePayloadModel.php:97
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadModel\getType
getType()
Definition
ParcelMeasurementsUpdatedMessagePayloadModel.php:77
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadModel\getParcelId
getParcelId()
Definition
ParcelMeasurementsUpdatedMessagePayloadModel.php:117
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadModel\getShippingKey
getShippingKey()
Definition
ParcelMeasurementsUpdatedMessagePayloadModel.php:158
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadModel\$type
$type
Definition
ParcelMeasurementsUpdatedMessagePayloadModel.php:29
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadModel\$shippingKey
$shippingKey
Definition
ParcelMeasurementsUpdatedMessagePayloadModel.php:53
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
ParcelMeasurementsUpdatedMessagePayloadModel.php:24
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadModel\getMeasurements
getMeasurements()
Definition
ParcelMeasurementsUpdatedMessagePayloadModel.php:137
Commercetools\Api\Models\Order\ParcelMeasurementsModel
Definition
ParcelMeasurementsModel.php:21
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\ParcelMeasurementsUpdatedMessagePayload
Definition
ParcelMeasurementsUpdatedMessagePayload.php:16
Commercetools\Api\Models\Order\ParcelMeasurements
Definition
ParcelMeasurements.php:15
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Message
Definition
ApprovalFlowApprovedMessage.php:9
Generated by
1.9.8