commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
SetDeliveryCustomFieldChangeModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
22
23 public const DISCRIMINATOR_VALUE = 'SetDeliveryCustomFieldChange';
28 protected $type;
29
34 protected $change;
35
40 protected $deliveryId;
41
46 protected $name;
47
52 protected $customTypeId;
53
58 protected $previousValue;
59
64 protected $nextValue;
65
66
70 public function __construct(
71 ?string $change = null,
72 ?string $deliveryId = null,
73 ?string $name = null,
74 ?string $customTypeId = null,
75 $previousValue = null,
76 $nextValue = null,
77 ?string $type = null
78 ) {
79 $this->change = $change;
80 $this->deliveryId = $deliveryId;
81 $this->name = $name;
82 $this->customTypeId = $customTypeId;
83 $this->previousValue = $previousValue;
84 $this->nextValue = $nextValue;
85 $this->type = $type ?? self::DISCRIMINATOR_VALUE;
86 }
87
92 public function getType()
93 {
94 if (is_null($this->type)) {
96 $data = $this->raw(self::FIELD_TYPE);
97 if (is_null($data)) {
98 return null;
99 }
100 $this->type = (string) $data;
101 }
102
103 return $this->type;
104 }
105
110 public function getChange()
111 {
112 if (is_null($this->change)) {
114 $data = $this->raw(self::FIELD_CHANGE);
115 if (is_null($data)) {
116 return null;
117 }
118 $this->change = (string) $data;
119 }
120
121 return $this->change;
122 }
123
130 public function getDeliveryId()
131 {
132 if (is_null($this->deliveryId)) {
134 $data = $this->raw(self::FIELD_DELIVERY_ID);
135 if (is_null($data)) {
136 return null;
137 }
138 $this->deliveryId = (string) $data;
139 }
140
141 return $this->deliveryId;
142 }
143
150 public function getName()
151 {
152 if (is_null($this->name)) {
154 $data = $this->raw(self::FIELD_NAME);
155 if (is_null($data)) {
156 return null;
157 }
158 $this->name = (string) $data;
159 }
160
161 return $this->name;
162 }
163
170 public function getCustomTypeId()
171 {
172 if (is_null($this->customTypeId)) {
174 $data = $this->raw(self::FIELD_CUSTOM_TYPE_ID);
175 if (is_null($data)) {
176 return null;
177 }
178 $this->customTypeId = (string) $data;
179 }
180
181 return $this->customTypeId;
182 }
183
190 public function getPreviousValue()
191 {
192 if (is_null($this->previousValue)) {
194 $data = $this->raw(self::FIELD_PREVIOUS_VALUE);
195 if (is_null($data)) {
196 return null;
197 }
198 $this->previousValue = $data;
199 }
200
202 }
203
210 public function getNextValue()
211 {
212 if (is_null($this->nextValue)) {
214 $data = $this->raw(self::FIELD_NEXT_VALUE);
215 if (is_null($data)) {
216 return null;
217 }
218 $this->nextValue = $data;
219 }
220
221 return $this->nextValue;
222 }
223
224
228 public function setChange(?string $change): void
229 {
230 $this->change = $change;
231 }
232
236 public function setDeliveryId(?string $deliveryId): void
237 {
238 $this->deliveryId = $deliveryId;
239 }
240
244 public function setName(?string $name): void
245 {
246 $this->name = $name;
247 }
248
252 public function setCustomTypeId(?string $customTypeId): void
253 {
254 $this->customTypeId = $customTypeId;
255 }
256
260 public function setPreviousValue( $previousValue): void
261 {
262 $this->previousValue = $previousValue;
263 }
264
268 public function setNextValue( $nextValue): void
269 {
270 $this->nextValue = $nextValue;
271 }
272
273
274
275}
__construct(?string $change=null, ?string $deliveryId=null, ?string $name=null, ?string $customTypeId=null, $previousValue=null, $nextValue=null, ?string $type=null)