commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Order
OrderTransitionStateActionBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Order
;
10
11
use
Commercetools\Api\Models\State\StateResourceIdentifier
;
12
use
Commercetools\Api\Models\State\StateResourceIdentifierBuilder
;
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
OrderTransitionStateActionBuilder
implements
Builder
24
{
29
private
$state;
30
35
private
$force;
36
44
public
function
getState
()
45
{
46
return
$this->state instanceof
StateResourceIdentifierBuilder
? $this->state->
build
() : $this->state;
47
}
48
55
public
function
getForce
()
56
{
57
return
$this->force;
58
}
59
64
public
function
withState
(?
StateResourceIdentifier
$state)
65
{
66
$this->state = $state;
67
68
return
$this;
69
}
70
75
public
function
withForce
(?
bool
$force)
76
{
77
$this->force = $force;
78
79
return
$this;
80
}
81
86
public
function
withStateBuilder
(?
StateResourceIdentifierBuilder
$state)
87
{
88
$this->state = $state;
89
90
return
$this;
91
}
92
93
public
function
build
():
OrderTransitionStateAction
94
{
95
return
new
OrderTransitionStateActionModel
(
96
$this->state instanceof
StateResourceIdentifierBuilder
? $this->state->
build
() : $this->state,
97
$this->force
98
);
99
}
100
101
public
static
function
of
():
OrderTransitionStateActionBuilder
102
{
103
return
new
self
();
104
}
105
}
Commercetools\Api\Models\Order\OrderTransitionStateActionBuilder
Definition:
OrderTransitionStateActionBuilder.php:24
Commercetools\Api\Models\Order\OrderTransitionStateActionBuilder\withState
withState(?StateResourceIdentifier $state)
Definition:
OrderTransitionStateActionBuilder.php:64
Commercetools\Api\Models\Order\OrderTransitionStateActionBuilder\withStateBuilder
withStateBuilder(?StateResourceIdentifierBuilder $state)
Definition:
OrderTransitionStateActionBuilder.php:86
Commercetools\Api\Models\Order\OrderTransitionStateActionBuilder\getForce
getForce()
Definition:
OrderTransitionStateActionBuilder.php:55
Commercetools\Api\Models\Order\OrderTransitionStateActionBuilder\of
static of()
Definition:
OrderTransitionStateActionBuilder.php:101
Commercetools\Api\Models\Order\OrderTransitionStateActionBuilder\build
build()
Definition:
OrderTransitionStateActionBuilder.php:93
Commercetools\Api\Models\Order\OrderTransitionStateActionBuilder\withForce
withForce(?bool $force)
Definition:
OrderTransitionStateActionBuilder.php:75
Commercetools\Api\Models\Order\OrderTransitionStateActionBuilder\getState
getState()
Definition:
OrderTransitionStateActionBuilder.php:44
Commercetools\Api\Models\Order\OrderTransitionStateActionModel
Definition:
OrderTransitionStateActionModel.php:23
Commercetools\Api\Models\State\StateResourceIdentifierBuilder
Definition:
StateResourceIdentifierBuilder.php:24
Commercetools\Api\Models\State\StateResourceIdentifierBuilder\build
build()
Definition:
StateResourceIdentifierBuilder.php:82
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Api\Models\Order\OrderTransitionStateAction
Definition:
OrderTransitionStateAction.php:16
Commercetools\Api\Models\State\StateResourceIdentifier
Definition:
StateResourceIdentifier.php:16
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Order
Definition:
CustomLineItemImportDraft.php:9
Generated by
1.9.1