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
ParcelMeasurementsUpdatedMessagePayloadBuilder.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\ParcelMeasurementsBuilder
;
13
use
Commercetools\Base\Builder
;
14
use
Commercetools\Base\DateTimeImmutableCollection
;
15
use
Commercetools\Base\JsonObject
;
16
use
Commercetools\Base\JsonObjectModel
;
17
use
Commercetools\Base\MapperFactory
;
18
use stdClass;
19
23
final
class
ParcelMeasurementsUpdatedMessagePayloadBuilder
implements
Builder
24
{
29
private
$deliveryId;
30
35
private
$parcelId;
36
41
private
$measurements;
42
47
private
$shippingKey;
48
55
public
function
getDeliveryId
()
56
{
57
return
$this->deliveryId;
58
}
59
66
public
function
getParcelId
()
67
{
68
return
$this->parcelId;
69
}
70
77
public
function
getMeasurements
()
78
{
79
return
$this->measurements instanceof
ParcelMeasurementsBuilder
? $this->measurements->
build
() : $this->measurements;
80
}
81
88
public
function
getShippingKey
()
89
{
90
return
$this->shippingKey;
91
}
92
97
public
function
withDeliveryId
(?
string
$deliveryId)
98
{
99
$this->deliveryId = $deliveryId;
100
101
return
$this;
102
}
103
108
public
function
withParcelId
(?
string
$parcelId)
109
{
110
$this->parcelId = $parcelId;
111
112
return
$this;
113
}
114
119
public
function
withMeasurements
(?
ParcelMeasurements
$measurements)
120
{
121
$this->measurements = $measurements;
122
123
return
$this;
124
}
125
130
public
function
withShippingKey
(?
string
$shippingKey)
131
{
132
$this->shippingKey = $shippingKey;
133
134
return
$this;
135
}
136
141
public
function
withMeasurementsBuilder
(?
ParcelMeasurementsBuilder
$measurements)
142
{
143
$this->measurements = $measurements;
144
145
return
$this;
146
}
147
148
public
function
build
():
ParcelMeasurementsUpdatedMessagePayload
149
{
150
return
new
ParcelMeasurementsUpdatedMessagePayloadModel
(
151
$this->deliveryId,
152
$this->parcelId,
153
$this->measurements instanceof
ParcelMeasurementsBuilder
? $this->measurements->
build
() : $this->measurements,
154
$this->shippingKey
155
);
156
}
157
158
public
static
function
of
():
ParcelMeasurementsUpdatedMessagePayloadBuilder
159
{
160
return
new
self
();
161
}
162
}
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadBuilder
Definition
ParcelMeasurementsUpdatedMessagePayloadBuilder.php:24
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadBuilder\getDeliveryId
getDeliveryId()
Definition
ParcelMeasurementsUpdatedMessagePayloadBuilder.php:55
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadBuilder\withDeliveryId
withDeliveryId(?string $deliveryId)
Definition
ParcelMeasurementsUpdatedMessagePayloadBuilder.php:97
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadBuilder\getMeasurements
getMeasurements()
Definition
ParcelMeasurementsUpdatedMessagePayloadBuilder.php:77
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadBuilder\build
build()
Definition
ParcelMeasurementsUpdatedMessagePayloadBuilder.php:148
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadBuilder\getParcelId
getParcelId()
Definition
ParcelMeasurementsUpdatedMessagePayloadBuilder.php:66
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadBuilder\withShippingKey
withShippingKey(?string $shippingKey)
Definition
ParcelMeasurementsUpdatedMessagePayloadBuilder.php:130
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadBuilder\getShippingKey
getShippingKey()
Definition
ParcelMeasurementsUpdatedMessagePayloadBuilder.php:88
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadBuilder\withMeasurementsBuilder
withMeasurementsBuilder(?ParcelMeasurementsBuilder $measurements)
Definition
ParcelMeasurementsUpdatedMessagePayloadBuilder.php:141
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadBuilder\withMeasurements
withMeasurements(?ParcelMeasurements $measurements)
Definition
ParcelMeasurementsUpdatedMessagePayloadBuilder.php:119
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadBuilder\of
static of()
Definition
ParcelMeasurementsUpdatedMessagePayloadBuilder.php:158
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadBuilder\withParcelId
withParcelId(?string $parcelId)
Definition
ParcelMeasurementsUpdatedMessagePayloadBuilder.php:108
Commercetools\Api\Models\Message\ParcelMeasurementsUpdatedMessagePayloadModel
Definition
ParcelMeasurementsUpdatedMessagePayloadModel.php:23
Commercetools\Api\Models\Order\ParcelMeasurementsBuilder
Definition
ParcelMeasurementsBuilder.php:22
Commercetools\Api\Models\Order\ParcelMeasurementsBuilder\build
build()
Definition
ParcelMeasurementsBuilder.php:136
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\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Message
Definition
ApprovalFlowApprovedMessage.php:9
Generated by
1.9.8