commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
SetDiscountedPriceChangeBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
19
24{
29 private $change;
30
35 private $previousValue;
36
41 private $nextValue;
42
47 private $catalogData;
48
53 private $variant;
54
59 private $priceId;
60
65 public function getChange()
66 {
67 return $this->change;
68 }
69
76 public function getPreviousValue()
77 {
78 return $this->previousValue instanceof PriceBuilder ? $this->previousValue->build() : $this->previousValue;
79 }
80
87 public function getNextValue()
88 {
89 return $this->nextValue instanceof PriceBuilder ? $this->nextValue->build() : $this->nextValue;
90 }
91
101 public function getCatalogData()
102 {
103 return $this->catalogData;
104 }
105
112 public function getVariant()
113 {
114 return $this->variant;
115 }
116
123 public function getPriceId()
124 {
125 return $this->priceId;
126 }
127
132 public function withChange(?string $change)
133 {
134 $this->change = $change;
135
136 return $this;
137 }
138
143 public function withPreviousValue(?Price $previousValue)
144 {
145 $this->previousValue = $previousValue;
146
147 return $this;
148 }
149
154 public function withNextValue(?Price $nextValue)
155 {
156 $this->nextValue = $nextValue;
157
158 return $this;
159 }
160
165 public function withCatalogData(?string $catalogData)
166 {
167 $this->catalogData = $catalogData;
168
169 return $this;
170 }
171
176 public function withVariant(?string $variant)
177 {
178 $this->variant = $variant;
179
180 return $this;
181 }
182
187 public function withPriceId(?string $priceId)
188 {
189 $this->priceId = $priceId;
190
191 return $this;
192 }
193
198 public function withPreviousValueBuilder(?PriceBuilder $previousValue)
199 {
200 $this->previousValue = $previousValue;
201
202 return $this;
203 }
204
209 public function withNextValueBuilder(?PriceBuilder $nextValue)
210 {
211 $this->nextValue = $nextValue;
212
213 return $this;
214 }
215
217 {
219 $this->change,
220 $this->previousValue instanceof PriceBuilder ? $this->previousValue->build() : $this->previousValue,
221 $this->nextValue instanceof PriceBuilder ? $this->nextValue->build() : $this->nextValue,
222 $this->catalogData,
223 $this->variant,
224 $this->priceId
225 );
226 }
227
228 public static function of(): SetDiscountedPriceChangeBuilder
229 {
230 return new self();
231 }
232}