commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ParcelMeasurementsUpdatedMessagePayloadBuilder.php
1<?php
2
3declare(strict_types=1);
10
18use stdClass;
19
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
142 {
143 $this->measurements = $measurements;
144
145 return $this;
146 }
147
149 {
151 $this->deliveryId,
152 $this->parcelId,
153 $this->measurements instanceof ParcelMeasurementsBuilder ? $this->measurements->build() : $this->measurements,
154 $this->shippingKey
155 );
156 }
157
159 {
160 return new self();
161 }
162}