commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ParcelItemsBuilder.php
1<?php
2
3declare(strict_types=1);
10
17use stdClass;
18
22final class ParcelItemsBuilder implements Builder
23{
28 private $parcelId;
29
34 private $items;
35
40 public function getParcelId()
41 {
42 return $this->parcelId;
43 }
44
49 public function getItems()
50 {
51 return $this->items;
52 }
53
58 public function withParcelId(?string $parcelId)
59 {
60 $this->parcelId = $parcelId;
61
62 return $this;
63 }
64
69 public function withItems(?DeliveryItemCollection $items)
70 {
71 $this->items = $items;
72
73 return $this;
74 }
75
76
77 public function build(): ParcelItems
78 {
79 return new ParcelItemsModel(
80 $this->parcelId,
81 $this->items
82 );
83 }
84
85 public static function of(): ParcelItemsBuilder
86 {
87 return new self();
88 }
89}