commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
QuoteRequest
QuoteRequestTransitionStateActionModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\QuoteRequest
;
10
11
use
Commercetools\Api\Models\State\StateResourceIdentifier
;
12
use
Commercetools\Api\Models\State\StateResourceIdentifierModel
;
13
use
Commercetools\Base\DateTimeImmutableCollection
;
14
use
Commercetools\Base\JsonObject
;
15
use
Commercetools\Base\JsonObjectModel
;
16
use
Commercetools\Base\MapperFactory
;
17
use stdClass;
18
22
final
class
QuoteRequestTransitionStateActionModel
extends
JsonObjectModel
implements
QuoteRequestTransitionStateAction
23
{
24
public
const
DISCRIMINATOR_VALUE
=
'transitionState'
;
29
protected
$action
;
30
35
protected
$state
;
36
41
protected
$force
;
42
43
47
public
function
__construct
(
48
?
StateResourceIdentifier
$state
=
null
,
49
?
bool
$force
=
null
,
50
?
string
$action
=
null
51
) {
52
$this->state =
$state
;
53
$this->force =
$force
;
54
$this->action =
$action
??
self::DISCRIMINATOR_VALUE
;
55
}
56
61
public
function
getAction
()
62
{
63
if
(is_null($this->action)) {
65
$data = $this->
raw
(self::FIELD_ACTION);
66
if
(is_null($data)) {
67
return
null
;
68
}
69
$this->action = (string) $data;
70
}
71
72
return
$this->action
;
73
}
74
82
public
function
getState
()
83
{
84
if
(is_null($this->state)) {
86
$data = $this->
raw
(self::FIELD_STATE);
87
if
(is_null($data)) {
88
return
null
;
89
}
90
91
$this->state =
StateResourceIdentifierModel::of
($data);
92
}
93
94
return
$this->state
;
95
}
96
103
public
function
getForce
()
104
{
105
if
(is_null($this->force)) {
107
$data = $this->
raw
(self::FIELD_FORCE);
108
if
(is_null($data)) {
109
return
null
;
110
}
111
$this->force = (bool) $data;
112
}
113
114
return
$this->force
;
115
}
116
117
121
public
function
setState
(?
StateResourceIdentifier
$state
): void
122
{
123
$this->state =
$state
;
124
}
125
129
public
function
setForce
(?
bool
$force
): void
130
{
131
$this->force =
$force
;
132
}
133
}
Commercetools\Api\Models\QuoteRequest\QuoteRequestTransitionStateActionModel
Definition:
QuoteRequestTransitionStateActionModel.php:23
Commercetools\Api\Models\QuoteRequest\QuoteRequestTransitionStateActionModel\$state
$state
Definition:
QuoteRequestTransitionStateActionModel.php:35
Commercetools\Api\Models\QuoteRequest\QuoteRequestTransitionStateActionModel\getForce
getForce()
Definition:
QuoteRequestTransitionStateActionModel.php:103
Commercetools\Api\Models\QuoteRequest\QuoteRequestTransitionStateActionModel\$action
$action
Definition:
QuoteRequestTransitionStateActionModel.php:29
Commercetools\Api\Models\QuoteRequest\QuoteRequestTransitionStateActionModel\__construct
__construct(?StateResourceIdentifier $state=null, ?bool $force=null, ?string $action=null)
Definition:
QuoteRequestTransitionStateActionModel.php:47
Commercetools\Api\Models\QuoteRequest\QuoteRequestTransitionStateActionModel\getAction
getAction()
Definition:
QuoteRequestTransitionStateActionModel.php:61
Commercetools\Api\Models\QuoteRequest\QuoteRequestTransitionStateActionModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition:
QuoteRequestTransitionStateActionModel.php:24
Commercetools\Api\Models\QuoteRequest\QuoteRequestTransitionStateActionModel\setForce
setForce(?bool $force)
Definition:
QuoteRequestTransitionStateActionModel.php:129
Commercetools\Api\Models\QuoteRequest\QuoteRequestTransitionStateActionModel\getState
getState()
Definition:
QuoteRequestTransitionStateActionModel.php:82
Commercetools\Api\Models\QuoteRequest\QuoteRequestTransitionStateActionModel\$force
$force
Definition:
QuoteRequestTransitionStateActionModel.php:41
Commercetools\Api\Models\QuoteRequest\QuoteRequestTransitionStateActionModel\setState
setState(?StateResourceIdentifier $state)
Definition:
QuoteRequestTransitionStateActionModel.php:121
Commercetools\Api\Models\State\StateResourceIdentifierModel
Definition:
StateResourceIdentifierModel.php:23
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition:
BaseJsonObject.php:57
Commercetools\Base\BaseJsonObject\of
static of($data=null)
Definition:
BaseJsonObject.php:26
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Api\Models\QuoteRequest\QuoteRequestTransitionStateAction
Definition:
QuoteRequestTransitionStateAction.php:16
Commercetools\Api\Models\State\StateResourceIdentifier
Definition:
StateResourceIdentifier.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\QuoteRequest
Definition:
QuoteRequest.php:9
Generated by
1.9.1