commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ReviewStateTransitionMessagePayloadBuilder.php
1<?php
2
3declare(strict_types=1);
10
20use stdClass;
21
26{
31 private $oldState;
32
37 private $newState;
38
43 private $oldIncludedInStatistics;
44
49 private $newIncludedInStatistics;
50
55 private $target;
56
61 private $force;
62
69 public function getOldState()
70 {
71 return $this->oldState instanceof StateReferenceBuilder ? $this->oldState->build() : $this->oldState;
72 }
73
80 public function getNewState()
81 {
82 return $this->newState instanceof StateReferenceBuilder ? $this->newState->build() : $this->newState;
83 }
84
92 {
93 return $this->oldIncludedInStatistics;
94 }
95
103 {
104 return $this->newIncludedInStatistics;
105 }
106
113 public function getTarget()
114 {
115 return $this->target instanceof ReferenceBuilder ? $this->target->build() : $this->target;
116 }
117
124 public function getForce()
125 {
126 return $this->force;
127 }
128
133 public function withOldState(?StateReference $oldState)
134 {
135 $this->oldState = $oldState;
136
137 return $this;
138 }
139
144 public function withNewState(?StateReference $newState)
145 {
146 $this->newState = $newState;
147
148 return $this;
149 }
150
155 public function withOldIncludedInStatistics(?bool $oldIncludedInStatistics)
156 {
157 $this->oldIncludedInStatistics = $oldIncludedInStatistics;
158
159 return $this;
160 }
161
166 public function withNewIncludedInStatistics(?bool $newIncludedInStatistics)
167 {
168 $this->newIncludedInStatistics = $newIncludedInStatistics;
169
170 return $this;
171 }
172
177 public function withTarget(?Reference $target)
178 {
179 $this->target = $target;
180
181 return $this;
182 }
183
188 public function withForce(?bool $force)
189 {
190 $this->force = $force;
191
192 return $this;
193 }
194
199 public function withOldStateBuilder(?StateReferenceBuilder $oldState)
200 {
201 $this->oldState = $oldState;
202
203 return $this;
204 }
205
210 public function withNewStateBuilder(?StateReferenceBuilder $newState)
211 {
212 $this->newState = $newState;
213
214 return $this;
215 }
216
221 public function withTargetBuilder(?ReferenceBuilder $target)
222 {
223 $this->target = $target;
224
225 return $this;
226 }
227
229 {
231 $this->oldState instanceof StateReferenceBuilder ? $this->oldState->build() : $this->oldState,
232 $this->newState instanceof StateReferenceBuilder ? $this->newState->build() : $this->newState,
233 $this->oldIncludedInStatistics,
234 $this->newIncludedInStatistics,
235 $this->target instanceof ReferenceBuilder ? $this->target->build() : $this->target,
236 $this->force
237 );
238 }
239
241 {
242 return new self();
243 }
244}