commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
SetDeliveryItemsChangeBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
16 use stdClass;
18 
22 final class SetDeliveryItemsChangeBuilder implements Builder
23 {
28  private $change;
29 
34  private $previousValue;
35 
40  private $nextValue;
41 
46  private $deliveryId;
47 
52  public function getChange()
53  {
54  return $this->change;
55  }
56 
63  public function getPreviousValue()
64  {
65  return $this->previousValue;
66  }
67 
74  public function getNextValue()
75  {
76  return $this->nextValue;
77  }
78 
85  public function getDeliveryId()
86  {
87  return $this->deliveryId;
88  }
89 
94  public function withChange(?string $change)
95  {
96  $this->change = $change;
97 
98  return $this;
99  }
100 
105  public function withPreviousValue(?DeliveryItemCollection $previousValue)
106  {
107  $this->previousValue = $previousValue;
108 
109  return $this;
110  }
111 
116  public function withNextValue(?DeliveryItemCollection $nextValue)
117  {
118  $this->nextValue = $nextValue;
119 
120  return $this;
121  }
122 
127  public function withDeliveryId(?string $deliveryId)
128  {
129  $this->deliveryId = $deliveryId;
130 
131  return $this;
132  }
133 
134 
135  public function build(): SetDeliveryItemsChange
136  {
137  return new SetDeliveryItemsChangeModel(
138  $this->change,
139  $this->previousValue,
140  $this->nextValue,
141  $this->deliveryId
142  );
143  }
144 
145  public static function of(): SetDeliveryItemsChangeBuilder
146  {
147  return new self();
148  }
149 }