commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
OrderStateChangedMessageBuilder.php
1<?php
2
3declare(strict_types=1);
10
22use DateTimeImmutable;
23use stdClass;
24
29{
34 private $id;
35
40 private $version;
41
46 private $createdAt;
47
52 private $lastModifiedAt;
53
58 private $lastModifiedBy;
59
64 private $createdBy;
65
70 private $sequenceNumber;
71
76 private $resource;
77
82 private $resourceVersion;
83
88 private $resourceUserProvidedIdentifiers;
89
94 private $orderState;
95
100 private $oldOrderState;
101
108 public function getId()
109 {
110 return $this->id;
111 }
112
119 public function getVersion()
120 {
121 return $this->version;
122 }
123
130 public function getCreatedAt()
131 {
132 return $this->createdAt;
133 }
134
141 public function getLastModifiedAt()
142 {
143 return $this->lastModifiedAt;
144 }
145
152 public function getLastModifiedBy()
153 {
154 return $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy;
155 }
156
163 public function getCreatedBy()
164 {
165 return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy;
166 }
167
175 public function getSequenceNumber()
176 {
177 return $this->sequenceNumber;
178 }
179
186 public function getResource()
187 {
188 return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource;
189 }
190
197 public function getResourceVersion()
198 {
199 return $this->resourceVersion;
200 }
201
209 {
210 return $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers;
211 }
212
219 public function getOrderState()
220 {
221 return $this->orderState;
222 }
223
230 public function getOldOrderState()
231 {
232 return $this->oldOrderState;
233 }
234
239 public function withId(?string $id)
240 {
241 $this->id = $id;
242
243 return $this;
244 }
245
250 public function withVersion(?int $version)
251 {
252 $this->version = $version;
253
254 return $this;
255 }
256
261 public function withCreatedAt(?DateTimeImmutable $createdAt)
262 {
263 $this->createdAt = $createdAt;
264
265 return $this;
266 }
267
272 public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt)
273 {
274 $this->lastModifiedAt = $lastModifiedAt;
275
276 return $this;
277 }
278
283 public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy)
284 {
285 $this->lastModifiedBy = $lastModifiedBy;
286
287 return $this;
288 }
289
294 public function withCreatedBy(?CreatedBy $createdBy)
295 {
296 $this->createdBy = $createdBy;
297
298 return $this;
299 }
300
305 public function withSequenceNumber(?int $sequenceNumber)
306 {
307 $this->sequenceNumber = $sequenceNumber;
308
309 return $this;
310 }
311
316 public function withResource(?Reference $resource)
317 {
318 $this->resource = $resource;
319
320 return $this;
321 }
322
327 public function withResourceVersion(?int $resourceVersion)
328 {
329 $this->resourceVersion = $resourceVersion;
330
331 return $this;
332 }
333
338 public function withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers)
339 {
340 $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
341
342 return $this;
343 }
344
349 public function withOrderState(?string $orderState)
350 {
351 $this->orderState = $orderState;
352
353 return $this;
354 }
355
360 public function withOldOrderState(?string $oldOrderState)
361 {
362 $this->oldOrderState = $oldOrderState;
363
364 return $this;
365 }
366
371 public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy)
372 {
373 $this->lastModifiedBy = $lastModifiedBy;
374
375 return $this;
376 }
377
382 public function withCreatedByBuilder(?CreatedByBuilder $createdBy)
383 {
384 $this->createdBy = $createdBy;
385
386 return $this;
387 }
388
393 public function withResourceBuilder(?ReferenceBuilder $resource)
394 {
395 $this->resource = $resource;
396
397 return $this;
398 }
399
404 public function withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers)
405 {
406 $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
407
408 return $this;
409 }
410
412 {
414 $this->id,
415 $this->version,
416 $this->createdAt,
417 $this->lastModifiedAt,
418 $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy,
419 $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy,
420 $this->sequenceNumber,
421 $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource,
422 $this->resourceVersion,
423 $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers,
424 $this->orderState,
425 $this->oldOrderState
426 );
427 }
428
429 public static function of(): OrderStateChangedMessageBuilder
430 {
431 return new self();
432 }
433}
withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers)
withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers)