commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
OrderEditPreviewSuccessBuilder.php
1<?php
2
3declare(strict_types=1);
10
17use stdClass;
18
23{
28 private $preview;
29
34 private $messagePayloads;
35
42 public function getPreview()
43 {
44 return $this->preview instanceof StagedOrderBuilder ? $this->preview->build() : $this->preview;
45 }
46
53 public function getMessagePayloads()
54 {
55 return $this->messagePayloads;
56 }
57
62 public function withPreview(?StagedOrder $preview)
63 {
64 $this->preview = $preview;
65
66 return $this;
67 }
68
73 public function withMessagePayloads(?MessagePayloadCollection $messagePayloads)
74 {
75 $this->messagePayloads = $messagePayloads;
76
77 return $this;
78 }
79
84 public function withPreviewBuilder(?StagedOrderBuilder $preview)
85 {
86 $this->preview = $preview;
87
88 return $this;
89 }
90
91 public function build(): OrderEditPreviewSuccess
92 {
94 $this->preview instanceof StagedOrderBuilder ? $this->preview->build() : $this->preview,
95 $this->messagePayloads
96 );
97 }
98
99 public static function of(): OrderEditPreviewSuccessBuilder
100 {
101 return new self();
102 }
103}