commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-api
src
Models
Message
ReviewStateTransitionMessagePayloadBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Message
;
10
11
use
Commercetools\Api\Models\Common\Reference
;
12
use
Commercetools\Api\Models\Common\ReferenceBuilder
;
13
use
Commercetools\Api\Models\State\StateReference
;
14
use
Commercetools\Api\Models\State\StateReferenceBuilder
;
15
use
Commercetools\Base\Builder
;
16
use
Commercetools\Base\DateTimeImmutableCollection
;
17
use
Commercetools\Base\JsonObject
;
18
use
Commercetools\Base\JsonObjectModel
;
19
use
Commercetools\Base\MapperFactory
;
20
use stdClass;
21
25
final
class
ReviewStateTransitionMessagePayloadBuilder
implements
Builder
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
91
public
function
getOldIncludedInStatistics
()
92
{
93
return
$this->oldIncludedInStatistics;
94
}
95
102
public
function
getNewIncludedInStatistics
()
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
228
public
function
build
():
ReviewStateTransitionMessagePayload
229
{
230
return
new
ReviewStateTransitionMessagePayloadModel
(
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
240
public
static
function
of
():
ReviewStateTransitionMessagePayloadBuilder
241
{
242
return
new
self
();
243
}
244
}
Commercetools\Api\Models\Common\ReferenceBuilder
Definition
ReferenceBuilder.php:92
Commercetools\Api\Models\Common\ReferenceBuilder\build
build()
Definition
ReferenceBuilder.php:122
Commercetools\Api\Models\Message\ReviewStateTransitionMessagePayloadBuilder
Definition
ReviewStateTransitionMessagePayloadBuilder.php:26
Commercetools\Api\Models\Message\ReviewStateTransitionMessagePayloadBuilder\getForce
getForce()
Definition
ReviewStateTransitionMessagePayloadBuilder.php:124
Commercetools\Api\Models\Message\ReviewStateTransitionMessagePayloadBuilder\withOldStateBuilder
withOldStateBuilder(?StateReferenceBuilder $oldState)
Definition
ReviewStateTransitionMessagePayloadBuilder.php:199
Commercetools\Api\Models\Message\ReviewStateTransitionMessagePayloadBuilder\withNewStateBuilder
withNewStateBuilder(?StateReferenceBuilder $newState)
Definition
ReviewStateTransitionMessagePayloadBuilder.php:210
Commercetools\Api\Models\Message\ReviewStateTransitionMessagePayloadBuilder\getOldIncludedInStatistics
getOldIncludedInStatistics()
Definition
ReviewStateTransitionMessagePayloadBuilder.php:91
Commercetools\Api\Models\Message\ReviewStateTransitionMessagePayloadBuilder\withTarget
withTarget(?Reference $target)
Definition
ReviewStateTransitionMessagePayloadBuilder.php:177
Commercetools\Api\Models\Message\ReviewStateTransitionMessagePayloadBuilder\getOldState
getOldState()
Definition
ReviewStateTransitionMessagePayloadBuilder.php:69
Commercetools\Api\Models\Message\ReviewStateTransitionMessagePayloadBuilder\withOldState
withOldState(?StateReference $oldState)
Definition
ReviewStateTransitionMessagePayloadBuilder.php:133
Commercetools\Api\Models\Message\ReviewStateTransitionMessagePayloadBuilder\withTargetBuilder
withTargetBuilder(?ReferenceBuilder $target)
Definition
ReviewStateTransitionMessagePayloadBuilder.php:221
Commercetools\Api\Models\Message\ReviewStateTransitionMessagePayloadBuilder\of
static of()
Definition
ReviewStateTransitionMessagePayloadBuilder.php:240
Commercetools\Api\Models\Message\ReviewStateTransitionMessagePayloadBuilder\build
build()
Definition
ReviewStateTransitionMessagePayloadBuilder.php:228
Commercetools\Api\Models\Message\ReviewStateTransitionMessagePayloadBuilder\withOldIncludedInStatistics
withOldIncludedInStatistics(?bool $oldIncludedInStatistics)
Definition
ReviewStateTransitionMessagePayloadBuilder.php:155
Commercetools\Api\Models\Message\ReviewStateTransitionMessagePayloadBuilder\withNewIncludedInStatistics
withNewIncludedInStatistics(?bool $newIncludedInStatistics)
Definition
ReviewStateTransitionMessagePayloadBuilder.php:166
Commercetools\Api\Models\Message\ReviewStateTransitionMessagePayloadBuilder\withNewState
withNewState(?StateReference $newState)
Definition
ReviewStateTransitionMessagePayloadBuilder.php:144
Commercetools\Api\Models\Message\ReviewStateTransitionMessagePayloadBuilder\withForce
withForce(?bool $force)
Definition
ReviewStateTransitionMessagePayloadBuilder.php:188
Commercetools\Api\Models\Message\ReviewStateTransitionMessagePayloadBuilder\getTarget
getTarget()
Definition
ReviewStateTransitionMessagePayloadBuilder.php:113
Commercetools\Api\Models\Message\ReviewStateTransitionMessagePayloadBuilder\getNewState
getNewState()
Definition
ReviewStateTransitionMessagePayloadBuilder.php:80
Commercetools\Api\Models\Message\ReviewStateTransitionMessagePayloadBuilder\getNewIncludedInStatistics
getNewIncludedInStatistics()
Definition
ReviewStateTransitionMessagePayloadBuilder.php:102
Commercetools\Api\Models\Message\ReviewStateTransitionMessagePayloadModel
Definition
ReviewStateTransitionMessagePayloadModel.php:25
Commercetools\Api\Models\State\StateReferenceBuilder
Definition
StateReferenceBuilder.php:24
Commercetools\Api\Models\State\StateReferenceBuilder\build
build()
Definition
StateReferenceBuilder.php:92
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\Common\Reference
Definition
Reference.php:50
Commercetools\Api\Models\Message\ReviewStateTransitionMessagePayload
Definition
ReviewStateTransitionMessagePayload.php:17
Commercetools\Api\Models\State\StateReference
Definition
StateReference.php:16
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Message
Definition
ApprovalFlowApprovedMessage.php:9
Generated by
1.9.8