commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ExactLockConflictErrorBuilder.php
1<?php
2
3declare(strict_types=1);
10
22use DateTimeImmutable;
23use stdClass;
24
29{
34 private $message;
35
40 private $sku;
41
46 private $currency;
47
52 private $country;
53
58 private $customerGroup;
59
64 private $channel;
65
70 private $validFrom;
71
76 private $validUntil;
77
82 private $recurrencePolicy;
83
90 public function getMessage()
91 {
92 return $this->message;
93 }
94
101 public function getSku()
102 {
103 return $this->sku;
104 }
105
112 public function getCurrency()
113 {
114 return $this->currency;
115 }
116
123 public function getCountry()
124 {
125 return $this->country;
126 }
127
134 public function getCustomerGroup()
135 {
136 return $this->customerGroup instanceof CustomerGroupResourceIdentifierBuilder ? $this->customerGroup->build() : $this->customerGroup;
137 }
138
145 public function getChannel()
146 {
147 return $this->channel instanceof ChannelResourceIdentifierBuilder ? $this->channel->build() : $this->channel;
148 }
149
156 public function getValidFrom()
157 {
158 return $this->validFrom;
159 }
160
167 public function getValidUntil()
168 {
169 return $this->validUntil;
170 }
171
178 public function getRecurrencePolicy()
179 {
180 return $this->recurrencePolicy instanceof RecurrencePolicyReferenceBuilder ? $this->recurrencePolicy->build() : $this->recurrencePolicy;
181 }
182
187 public function withMessage(?string $message)
188 {
189 $this->message = $message;
190
191 return $this;
192 }
193
198 public function withSku(?string $sku)
199 {
200 $this->sku = $sku;
201
202 return $this;
203 }
204
209 public function withCurrency(?string $currency)
210 {
211 $this->currency = $currency;
212
213 return $this;
214 }
215
220 public function withCountry(?string $country)
221 {
222 $this->country = $country;
223
224 return $this;
225 }
226
231 public function withCustomerGroup(?CustomerGroupResourceIdentifier $customerGroup)
232 {
233 $this->customerGroup = $customerGroup;
234
235 return $this;
236 }
237
242 public function withChannel(?ChannelResourceIdentifier $channel)
243 {
244 $this->channel = $channel;
245
246 return $this;
247 }
248
253 public function withValidFrom(?DateTimeImmutable $validFrom)
254 {
255 $this->validFrom = $validFrom;
256
257 return $this;
258 }
259
264 public function withValidUntil(?DateTimeImmutable $validUntil)
265 {
266 $this->validUntil = $validUntil;
267
268 return $this;
269 }
270
275 public function withRecurrencePolicy(?RecurrencePolicyReference $recurrencePolicy)
276 {
277 $this->recurrencePolicy = $recurrencePolicy;
278
279 return $this;
280 }
281
287 {
288 $this->customerGroup = $customerGroup;
289
290 return $this;
291 }
292
298 {
299 $this->channel = $channel;
300
301 return $this;
302 }
303
309 {
310 $this->recurrencePolicy = $recurrencePolicy;
311
312 return $this;
313 }
314
315 public function build(): ExactLockConflictError
316 {
318 $this->message,
319 $this->sku,
320 $this->currency,
321 $this->country,
322 $this->customerGroup instanceof CustomerGroupResourceIdentifierBuilder ? $this->customerGroup->build() : $this->customerGroup,
323 $this->channel instanceof ChannelResourceIdentifierBuilder ? $this->channel->build() : $this->channel,
324 $this->validFrom,
325 $this->validUntil,
326 $this->recurrencePolicy instanceof RecurrencePolicyReferenceBuilder ? $this->recurrencePolicy->build() : $this->recurrencePolicy
327 );
328 }
329
330 public static function of(): ExactLockConflictErrorBuilder
331 {
332 return new self();
333 }
334}
withCustomerGroupBuilder(?CustomerGroupResourceIdentifierBuilder $customerGroup)
withCustomerGroup(?CustomerGroupResourceIdentifier $customerGroup)
withRecurrencePolicyBuilder(?RecurrencePolicyReferenceBuilder $recurrencePolicy)