commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Message
QuoteStateTransitionMessagePayloadBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Message
;
10
11
use
Commercetools\Api\Models\State\StateReference
;
12
use
Commercetools\Api\Models\State\StateReferenceBuilder
;
13
use
Commercetools\Base\Builder
;
14
use
Commercetools\Base\DateTimeImmutableCollection
;
15
use
Commercetools\Base\JsonObject
;
16
use
Commercetools\Base\JsonObjectModel
;
17
use
Commercetools\Base\MapperFactory
;
18
use stdClass;
19
23
final
class
QuoteStateTransitionMessagePayloadBuilder
implements
Builder
24
{
29
private
$state;
30
35
private
$oldState;
36
41
private
$force;
42
49
public
function
getState
()
50
{
51
return
$this->state instanceof
StateReferenceBuilder
? $this->state->
build
() : $this->state;
52
}
53
60
public
function
getOldState
()
61
{
62
return
$this->oldState instanceof
StateReferenceBuilder
? $this->oldState->
build
() : $this->oldState;
63
}
64
71
public
function
getForce
()
72
{
73
return
$this->force;
74
}
75
80
public
function
withState
(?
StateReference
$state)
81
{
82
$this->state = $state;
83
84
return
$this;
85
}
86
91
public
function
withOldState
(?
StateReference
$oldState)
92
{
93
$this->oldState = $oldState;
94
95
return
$this;
96
}
97
102
public
function
withForce
(?
bool
$force)
103
{
104
$this->force = $force;
105
106
return
$this;
107
}
108
113
public
function
withStateBuilder
(?
StateReferenceBuilder
$state)
114
{
115
$this->state = $state;
116
117
return
$this;
118
}
119
124
public
function
withOldStateBuilder
(?
StateReferenceBuilder
$oldState)
125
{
126
$this->oldState = $oldState;
127
128
return
$this;
129
}
130
131
public
function
build
():
QuoteStateTransitionMessagePayload
132
{
133
return
new
QuoteStateTransitionMessagePayloadModel
(
134
$this->state instanceof
StateReferenceBuilder
? $this->state->
build
() : $this->state,
135
$this->oldState instanceof
StateReferenceBuilder
? $this->oldState->
build
() : $this->oldState,
136
$this->force
137
);
138
}
139
140
public
static
function
of
():
QuoteStateTransitionMessagePayloadBuilder
141
{
142
return
new
self
();
143
}
144
}
Commercetools\Api\Models\Message\QuoteStateTransitionMessagePayloadBuilder
Definition:
QuoteStateTransitionMessagePayloadBuilder.php:24
Commercetools\Api\Models\Message\QuoteStateTransitionMessagePayloadBuilder\build
build()
Definition:
QuoteStateTransitionMessagePayloadBuilder.php:131
Commercetools\Api\Models\Message\QuoteStateTransitionMessagePayloadBuilder\withState
withState(?StateReference $state)
Definition:
QuoteStateTransitionMessagePayloadBuilder.php:80
Commercetools\Api\Models\Message\QuoteStateTransitionMessagePayloadBuilder\withOldState
withOldState(?StateReference $oldState)
Definition:
QuoteStateTransitionMessagePayloadBuilder.php:91
Commercetools\Api\Models\Message\QuoteStateTransitionMessagePayloadBuilder\getState
getState()
Definition:
QuoteStateTransitionMessagePayloadBuilder.php:49
Commercetools\Api\Models\Message\QuoteStateTransitionMessagePayloadBuilder\withOldStateBuilder
withOldStateBuilder(?StateReferenceBuilder $oldState)
Definition:
QuoteStateTransitionMessagePayloadBuilder.php:124
Commercetools\Api\Models\Message\QuoteStateTransitionMessagePayloadBuilder\getForce
getForce()
Definition:
QuoteStateTransitionMessagePayloadBuilder.php:71
Commercetools\Api\Models\Message\QuoteStateTransitionMessagePayloadBuilder\withStateBuilder
withStateBuilder(?StateReferenceBuilder $state)
Definition:
QuoteStateTransitionMessagePayloadBuilder.php:113
Commercetools\Api\Models\Message\QuoteStateTransitionMessagePayloadBuilder\getOldState
getOldState()
Definition:
QuoteStateTransitionMessagePayloadBuilder.php:60
Commercetools\Api\Models\Message\QuoteStateTransitionMessagePayloadBuilder\withForce
withForce(?bool $force)
Definition:
QuoteStateTransitionMessagePayloadBuilder.php:102
Commercetools\Api\Models\Message\QuoteStateTransitionMessagePayloadBuilder\of
static of()
Definition:
QuoteStateTransitionMessagePayloadBuilder.php:140
Commercetools\Api\Models\Message\QuoteStateTransitionMessagePayloadModel
Definition:
QuoteStateTransitionMessagePayloadModel.php:23
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\Message\QuoteStateTransitionMessagePayload
Definition:
QuoteStateTransitionMessagePayload.php:16
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.1