commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
OverlappingPriceValidityErrorBuilder.php
1<?php
2
3declare(strict_types=1);
10
20use DateTimeImmutable;
21use stdClass;
22
27{
32 private $message;
33
38 private $conflictingPrice;
39
44 private $currency;
45
50 private $country;
51
56 private $customerGroup;
57
62 private $channel;
63
68 private $validFrom;
69
74 private $validUntil;
75
80 private $conflictingValidFrom;
81
86 private $conflictingValidUntil;
87
94 public function getMessage()
95 {
96 return $this->message;
97 }
98
105 public function getConflictingPrice()
106 {
107 return $this->conflictingPrice;
108 }
109
116 public function getCurrency()
117 {
118 return $this->currency;
119 }
120
127 public function getCountry()
128 {
129 return $this->country;
130 }
131
138 public function getCustomerGroup()
139 {
140 return $this->customerGroup instanceof CustomerGroupResourceIdentifierBuilder ? $this->customerGroup->build() : $this->customerGroup;
141 }
142
149 public function getChannel()
150 {
151 return $this->channel instanceof ChannelResourceIdentifierBuilder ? $this->channel->build() : $this->channel;
152 }
153
160 public function getValidFrom()
161 {
162 return $this->validFrom;
163 }
164
171 public function getValidUntil()
172 {
173 return $this->validUntil;
174 }
175
182 public function getConflictingValidFrom()
183 {
184 return $this->conflictingValidFrom;
185 }
186
193 public function getConflictingValidUntil()
194 {
195 return $this->conflictingValidUntil;
196 }
197
202 public function withMessage(?string $message)
203 {
204 $this->message = $message;
205
206 return $this;
207 }
208
213 public function withConflictingPrice(?string $conflictingPrice)
214 {
215 $this->conflictingPrice = $conflictingPrice;
216
217 return $this;
218 }
219
224 public function withCurrency(?string $currency)
225 {
226 $this->currency = $currency;
227
228 return $this;
229 }
230
235 public function withCountry(?string $country)
236 {
237 $this->country = $country;
238
239 return $this;
240 }
241
246 public function withCustomerGroup(?CustomerGroupResourceIdentifier $customerGroup)
247 {
248 $this->customerGroup = $customerGroup;
249
250 return $this;
251 }
252
257 public function withChannel(?ChannelResourceIdentifier $channel)
258 {
259 $this->channel = $channel;
260
261 return $this;
262 }
263
268 public function withValidFrom(?DateTimeImmutable $validFrom)
269 {
270 $this->validFrom = $validFrom;
271
272 return $this;
273 }
274
279 public function withValidUntil(?DateTimeImmutable $validUntil)
280 {
281 $this->validUntil = $validUntil;
282
283 return $this;
284 }
285
290 public function withConflictingValidFrom(?DateTimeImmutable $conflictingValidFrom)
291 {
292 $this->conflictingValidFrom = $conflictingValidFrom;
293
294 return $this;
295 }
296
301 public function withConflictingValidUntil(?DateTimeImmutable $conflictingValidUntil)
302 {
303 $this->conflictingValidUntil = $conflictingValidUntil;
304
305 return $this;
306 }
307
313 {
314 $this->customerGroup = $customerGroup;
315
316 return $this;
317 }
318
324 {
325 $this->channel = $channel;
326
327 return $this;
328 }
329
331 {
333 $this->message,
334 $this->conflictingPrice,
335 $this->currency,
336 $this->country,
337 $this->customerGroup instanceof CustomerGroupResourceIdentifierBuilder ? $this->customerGroup->build() : $this->customerGroup,
338 $this->channel instanceof ChannelResourceIdentifierBuilder ? $this->channel->build() : $this->channel,
339 $this->validFrom,
340 $this->validUntil,
341 $this->conflictingValidFrom,
342 $this->conflictingValidUntil
343 );
344 }
345
346 public static function of(): OverlappingPriceValidityErrorBuilder
347 {
348 return new self();
349 }
350}
withCustomerGroupBuilder(?CustomerGroupResourceIdentifierBuilder $customerGroup)