commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
StandalonePriceValueChangedMessageBuilder.php
1<?php
2
3declare(strict_types=1);
10
24use DateTimeImmutable;
25use stdClass;
26
31{
36 private $id;
37
42 private $version;
43
48 private $createdAt;
49
54 private $lastModifiedAt;
55
60 private $lastModifiedBy;
61
66 private $createdBy;
67
72 private $sequenceNumber;
73
78 private $resource;
79
84 private $resourceVersion;
85
90 private $resourceUserProvidedIdentifiers;
91
96 private $value;
97
102 private $staged;
103
108 private $oldValue;
109
116 public function getId()
117 {
118 return $this->id;
119 }
120
127 public function getVersion()
128 {
129 return $this->version;
130 }
131
138 public function getCreatedAt()
139 {
140 return $this->createdAt;
141 }
142
149 public function getLastModifiedAt()
150 {
151 return $this->lastModifiedAt;
152 }
153
160 public function getLastModifiedBy()
161 {
162 return $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy;
163 }
164
171 public function getCreatedBy()
172 {
173 return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy;
174 }
175
183 public function getSequenceNumber()
184 {
185 return $this->sequenceNumber;
186 }
187
194 public function getResource()
195 {
196 return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource;
197 }
198
205 public function getResourceVersion()
206 {
207 return $this->resourceVersion;
208 }
209
217 {
218 return $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers;
219 }
220
227 public function getValue()
228 {
229 return $this->value instanceof TypedMoneyBuilder ? $this->value->build() : $this->value;
230 }
231
238 public function getStaged()
239 {
240 return $this->staged;
241 }
242
250 public function getOldValue()
251 {
252 return $this->oldValue instanceof TypedMoneyBuilder ? $this->oldValue->build() : $this->oldValue;
253 }
254
259 public function withId(?string $id)
260 {
261 $this->id = $id;
262
263 return $this;
264 }
265
270 public function withVersion(?int $version)
271 {
272 $this->version = $version;
273
274 return $this;
275 }
276
281 public function withCreatedAt(?DateTimeImmutable $createdAt)
282 {
283 $this->createdAt = $createdAt;
284
285 return $this;
286 }
287
292 public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt)
293 {
294 $this->lastModifiedAt = $lastModifiedAt;
295
296 return $this;
297 }
298
303 public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy)
304 {
305 $this->lastModifiedBy = $lastModifiedBy;
306
307 return $this;
308 }
309
314 public function withCreatedBy(?CreatedBy $createdBy)
315 {
316 $this->createdBy = $createdBy;
317
318 return $this;
319 }
320
325 public function withSequenceNumber(?int $sequenceNumber)
326 {
327 $this->sequenceNumber = $sequenceNumber;
328
329 return $this;
330 }
331
336 public function withResource(?Reference $resource)
337 {
338 $this->resource = $resource;
339
340 return $this;
341 }
342
347 public function withResourceVersion(?int $resourceVersion)
348 {
349 $this->resourceVersion = $resourceVersion;
350
351 return $this;
352 }
353
358 public function withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers)
359 {
360 $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
361
362 return $this;
363 }
364
369 public function withValue(?TypedMoney $value)
370 {
371 $this->value = $value;
372
373 return $this;
374 }
375
380 public function withStaged(?bool $staged)
381 {
382 $this->staged = $staged;
383
384 return $this;
385 }
386
391 public function withOldValue(?TypedMoney $oldValue)
392 {
393 $this->oldValue = $oldValue;
394
395 return $this;
396 }
397
402 public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy)
403 {
404 $this->lastModifiedBy = $lastModifiedBy;
405
406 return $this;
407 }
408
413 public function withCreatedByBuilder(?CreatedByBuilder $createdBy)
414 {
415 $this->createdBy = $createdBy;
416
417 return $this;
418 }
419
424 public function withResourceBuilder(?ReferenceBuilder $resource)
425 {
426 $this->resource = $resource;
427
428 return $this;
429 }
430
435 public function withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers)
436 {
437 $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
438
439 return $this;
440 }
441
446 public function withValueBuilder(?TypedMoneyBuilder $value)
447 {
448 $this->value = $value;
449
450 return $this;
451 }
452
457 public function withOldValueBuilder(?TypedMoneyBuilder $oldValue)
458 {
459 $this->oldValue = $oldValue;
460
461 return $this;
462 }
463
465 {
467 $this->id,
468 $this->version,
469 $this->createdAt,
470 $this->lastModifiedAt,
471 $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy,
472 $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy,
473 $this->sequenceNumber,
474 $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource,
475 $this->resourceVersion,
476 $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers,
477 $this->value instanceof TypedMoneyBuilder ? $this->value->build() : $this->value,
478 $this->staged,
479 $this->oldValue instanceof TypedMoneyBuilder ? $this->oldValue->build() : $this->oldValue
480 );
481 }
482
484 {
485 return new self();
486 }
487}
withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers)