commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Quote
QuoteTransitionStateActionBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Quote
;
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
QuoteTransitionStateActionBuilder
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
():
QuoteTransitionStateAction
94
{
95
return
new
QuoteTransitionStateActionModel
(
96
$this->state instanceof
StateResourceIdentifierBuilder
? $this->state->
build
() : $this->state,
97
$this->force
98
);
99
}
100
101
public
static
function
of
():
QuoteTransitionStateActionBuilder
102
{
103
return
new
self
();
104
}
105
}
Commercetools\Api\Models\Quote\QuoteTransitionStateActionBuilder
Definition:
QuoteTransitionStateActionBuilder.php:24
Commercetools\Api\Models\Quote\QuoteTransitionStateActionBuilder\build
build()
Definition:
QuoteTransitionStateActionBuilder.php:93
Commercetools\Api\Models\Quote\QuoteTransitionStateActionBuilder\getState
getState()
Definition:
QuoteTransitionStateActionBuilder.php:44
Commercetools\Api\Models\Quote\QuoteTransitionStateActionBuilder\withForce
withForce(?bool $force)
Definition:
QuoteTransitionStateActionBuilder.php:75
Commercetools\Api\Models\Quote\QuoteTransitionStateActionBuilder\withStateBuilder
withStateBuilder(?StateResourceIdentifierBuilder $state)
Definition:
QuoteTransitionStateActionBuilder.php:86
Commercetools\Api\Models\Quote\QuoteTransitionStateActionBuilder\of
static of()
Definition:
QuoteTransitionStateActionBuilder.php:101
Commercetools\Api\Models\Quote\QuoteTransitionStateActionBuilder\withState
withState(?StateResourceIdentifier $state)
Definition:
QuoteTransitionStateActionBuilder.php:64
Commercetools\Api\Models\Quote\QuoteTransitionStateActionBuilder\getForce
getForce()
Definition:
QuoteTransitionStateActionBuilder.php:55
Commercetools\Api\Models\Quote\QuoteTransitionStateActionModel
Definition:
QuoteTransitionStateActionModel.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\Quote\QuoteTransitionStateAction
Definition:
QuoteTransitionStateAction.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\Quote
Definition:
Quote.php:9
Generated by
1.9.1