commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
SetPricesChangeBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
16 use stdClass;
18 
22 final 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  public function getChange()
59  {
60  return $this->change;
61  }
62 
69  public function getPreviousValue()
70  {
71  return $this->previousValue;
72  }
73 
80  public function getNextValue()
81  {
82  return $this->nextValue;
83  }
84 
94  public function getCatalogData()
95  {
96  return $this->catalogData;
97  }
98 
105  public function getVariant()
106  {
107  return $this->variant;
108  }
109 
114  public function withChange(?string $change)
115  {
116  $this->change = $change;
117 
118  return $this;
119  }
120 
125  public function withPreviousValue(?PriceCollection $previousValue)
126  {
127  $this->previousValue = $previousValue;
128 
129  return $this;
130  }
131 
136  public function withNextValue(?PriceCollection $nextValue)
137  {
138  $this->nextValue = $nextValue;
139 
140  return $this;
141  }
142 
147  public function withCatalogData(?string $catalogData)
148  {
149  $this->catalogData = $catalogData;
150 
151  return $this;
152  }
153 
158  public function withVariant(?string $variant)
159  {
160  $this->variant = $variant;
161 
162  return $this;
163  }
164 
165 
166  public function build(): SetPricesChange
167  {
168  return new SetPricesChangeModel(
169  $this->change,
170  $this->previousValue,
171  $this->nextValue,
172  $this->catalogData,
173  $this->variant
174  );
175  }
176 
177  public static function of(): SetPricesChangeBuilder
178  {
179  return new self();
180  }
181 }