commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ParcelItemsUpdatedMessageBuilder.php
1<?php
2
3declare(strict_types=1);
10
23use DateTimeImmutable;
24use stdClass;
25
30{
35 private $id;
36
41 private $version;
42
47 private $createdAt;
48
53 private $lastModifiedAt;
54
59 private $lastModifiedBy;
60
65 private $createdBy;
66
71 private $sequenceNumber;
72
77 private $resource;
78
83 private $resourceVersion;
84
89 private $resourceUserProvidedIdentifiers;
90
95 private $parcelId;
96
101 private $deliveryId;
102
107 private $items;
108
113 private $oldItems;
114
119 private $shippingKey;
120
127 public function getId()
128 {
129 return $this->id;
130 }
131
138 public function getVersion()
139 {
140 return $this->version;
141 }
142
149 public function getCreatedAt()
150 {
151 return $this->createdAt;
152 }
153
160 public function getLastModifiedAt()
161 {
162 return $this->lastModifiedAt;
163 }
164
171 public function getLastModifiedBy()
172 {
173 return $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy;
174 }
175
182 public function getCreatedBy()
183 {
184 return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy;
185 }
186
194 public function getSequenceNumber()
195 {
196 return $this->sequenceNumber;
197 }
198
205 public function getResource()
206 {
207 return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource;
208 }
209
216 public function getResourceVersion()
217 {
218 return $this->resourceVersion;
219 }
220
228 {
229 return $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers;
230 }
231
238 public function getParcelId()
239 {
240 return $this->parcelId;
241 }
242
249 public function getDeliveryId()
250 {
251 return $this->deliveryId;
252 }
253
260 public function getItems()
261 {
262 return $this->items;
263 }
264
271 public function getOldItems()
272 {
273 return $this->oldItems;
274 }
275
282 public function getShippingKey()
283 {
284 return $this->shippingKey;
285 }
286
291 public function withId(?string $id)
292 {
293 $this->id = $id;
294
295 return $this;
296 }
297
302 public function withVersion(?int $version)
303 {
304 $this->version = $version;
305
306 return $this;
307 }
308
313 public function withCreatedAt(?DateTimeImmutable $createdAt)
314 {
315 $this->createdAt = $createdAt;
316
317 return $this;
318 }
319
324 public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt)
325 {
326 $this->lastModifiedAt = $lastModifiedAt;
327
328 return $this;
329 }
330
335 public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy)
336 {
337 $this->lastModifiedBy = $lastModifiedBy;
338
339 return $this;
340 }
341
346 public function withCreatedBy(?CreatedBy $createdBy)
347 {
348 $this->createdBy = $createdBy;
349
350 return $this;
351 }
352
357 public function withSequenceNumber(?int $sequenceNumber)
358 {
359 $this->sequenceNumber = $sequenceNumber;
360
361 return $this;
362 }
363
368 public function withResource(?Reference $resource)
369 {
370 $this->resource = $resource;
371
372 return $this;
373 }
374
379 public function withResourceVersion(?int $resourceVersion)
380 {
381 $this->resourceVersion = $resourceVersion;
382
383 return $this;
384 }
385
390 public function withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers)
391 {
392 $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
393
394 return $this;
395 }
396
401 public function withParcelId(?string $parcelId)
402 {
403 $this->parcelId = $parcelId;
404
405 return $this;
406 }
407
412 public function withDeliveryId(?string $deliveryId)
413 {
414 $this->deliveryId = $deliveryId;
415
416 return $this;
417 }
418
423 public function withItems(?DeliveryItemCollection $items)
424 {
425 $this->items = $items;
426
427 return $this;
428 }
429
434 public function withOldItems(?DeliveryItemCollection $oldItems)
435 {
436 $this->oldItems = $oldItems;
437
438 return $this;
439 }
440
445 public function withShippingKey(?string $shippingKey)
446 {
447 $this->shippingKey = $shippingKey;
448
449 return $this;
450 }
451
456 public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy)
457 {
458 $this->lastModifiedBy = $lastModifiedBy;
459
460 return $this;
461 }
462
467 public function withCreatedByBuilder(?CreatedByBuilder $createdBy)
468 {
469 $this->createdBy = $createdBy;
470
471 return $this;
472 }
473
478 public function withResourceBuilder(?ReferenceBuilder $resource)
479 {
480 $this->resource = $resource;
481
482 return $this;
483 }
484
489 public function withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers)
490 {
491 $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
492
493 return $this;
494 }
495
497 {
499 $this->id,
500 $this->version,
501 $this->createdAt,
502 $this->lastModifiedAt,
503 $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy,
504 $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy,
505 $this->sequenceNumber,
506 $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource,
507 $this->resourceVersion,
508 $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers,
509 $this->parcelId,
510 $this->deliveryId,
511 $this->items,
512 $this->oldItems,
513 $this->shippingKey
514 );
515 }
516
517 public static function of(): ParcelItemsUpdatedMessageBuilder
518 {
519 return new self();
520 }
521}
withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers)
withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers)