commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
SetPricesChangeBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
18
22final class SetPricesChangeBuilder implements Builder
23{
28 private $change;
29
34 private $previousValue;
35
40 private $nextValue;
41
46 private $catalogData;
47
52 private $variant;
53
58 private $addedItems;
59
64 private $removedItems;
65
70 public function getChange()
71 {
72 return $this->change;
73 }
74
81 public function getPreviousValue()
82 {
83 return $this->previousValue;
84 }
85
92 public function getNextValue()
93 {
94 return $this->nextValue;
95 }
96
107 public function getCatalogData()
108 {
109 return $this->catalogData;
110 }
111
119 public function getVariant()
120 {
121 return $this->variant;
122 }
123
130 public function getAddedItems()
131 {
132 return $this->addedItems;
133 }
134
141 public function getRemovedItems()
142 {
143 return $this->removedItems;
144 }
145
150 public function withChange(?string $change)
151 {
152 $this->change = $change;
153
154 return $this;
155 }
156
161 public function withPreviousValue(?PriceCollection $previousValue)
162 {
163 $this->previousValue = $previousValue;
164
165 return $this;
166 }
167
172 public function withNextValue(?PriceCollection $nextValue)
173 {
174 $this->nextValue = $nextValue;
175
176 return $this;
177 }
178
183 public function withCatalogData(?string $catalogData)
184 {
185 $this->catalogData = $catalogData;
186
187 return $this;
188 }
189
194 public function withVariant(?string $variant)
195 {
196 $this->variant = $variant;
197
198 return $this;
199 }
200
205 public function withAddedItems(?PriceCollection $addedItems)
206 {
207 $this->addedItems = $addedItems;
208
209 return $this;
210 }
211
216 public function withRemovedItems(?PriceCollection $removedItems)
217 {
218 $this->removedItems = $removedItems;
219
220 return $this;
221 }
222
223
224 public function build(): SetPricesChange
225 {
226 return new SetPricesChangeModel(
227 $this->change,
228 $this->previousValue,
229 $this->nextValue,
230 $this->catalogData,
231 $this->variant,
232 $this->addedItems,
233 $this->removedItems
234 );
235 }
236
237 public static function of(): SetPricesChangeBuilder
238 {
239 return new self();
240 }
241}