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
OrderEdit
OrderEditUpdateModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\OrderEdit
;
10
11
use
Commercetools\Base\DateTimeImmutableCollection
;
12
use
Commercetools\Base\JsonObject
;
13
use
Commercetools\Base\JsonObjectModel
;
14
use
Commercetools\Base\MapperFactory
;
15
use stdClass;
16
20
final
class
OrderEditUpdateModel
extends
JsonObjectModel
implements
OrderEditUpdate
21
{
26
protected
$version
;
27
32
protected
$actions
;
33
38
protected
$dryRun
;
39
40
44
public
function
__construct
(
45
?
int
$version
=
null
,
46
?
OrderEditUpdateActionCollection
$actions
=
null
,
47
?
bool
$dryRun
=
null
48
) {
49
$this->version =
$version
;
50
$this->actions =
$actions
;
51
$this->dryRun =
$dryRun
;
52
}
53
61
public
function
getVersion
()
62
{
63
if
(is_null($this->version)) {
65
$data = $this->
raw
(self::FIELD_VERSION);
66
if
(is_null($data)) {
67
return
null
;
68
}
69
$this->version = (int) $data;
70
}
71
72
return
$this->version
;
73
}
74
81
public
function
getActions
()
82
{
83
if
(is_null($this->actions)) {
85
$data = $this->
raw
(self::FIELD_ACTIONS);
86
if
(is_null($data)) {
87
return
null
;
88
}
89
$this->actions =
OrderEditUpdateActionCollection::fromArray
($data);
90
}
91
92
return
$this->actions
;
93
}
94
101
public
function
getDryRun
()
102
{
103
if
(is_null($this->dryRun)) {
105
$data = $this->
raw
(self::FIELD_DRY_RUN);
106
if
(is_null($data)) {
107
return
null
;
108
}
109
$this->dryRun = (bool) $data;
110
}
111
112
return
$this->dryRun
;
113
}
114
115
119
public
function
setVersion
(?
int
$version
): void
120
{
121
$this->version =
$version
;
122
}
123
127
public
function
setActions
(?
OrderEditUpdateActionCollection
$actions
): void
128
{
129
$this->actions =
$actions
;
130
}
131
135
public
function
setDryRun
(?
bool
$dryRun
): void
136
{
137
$this->dryRun =
$dryRun
;
138
}
139
}
Commercetools\Api\Models\OrderEdit\OrderEditUpdateActionCollection
Definition
OrderEditUpdateActionCollection.php:26
Commercetools\Api\Models\OrderEdit\OrderEditUpdateModel
Definition
OrderEditUpdateModel.php:21
Commercetools\Api\Models\OrderEdit\OrderEditUpdateModel\getDryRun
getDryRun()
Definition
OrderEditUpdateModel.php:101
Commercetools\Api\Models\OrderEdit\OrderEditUpdateModel\$version
$version
Definition
OrderEditUpdateModel.php:26
Commercetools\Api\Models\OrderEdit\OrderEditUpdateModel\$actions
$actions
Definition
OrderEditUpdateModel.php:32
Commercetools\Api\Models\OrderEdit\OrderEditUpdateModel\setVersion
setVersion(?int $version)
Definition
OrderEditUpdateModel.php:119
Commercetools\Api\Models\OrderEdit\OrderEditUpdateModel\getVersion
getVersion()
Definition
OrderEditUpdateModel.php:61
Commercetools\Api\Models\OrderEdit\OrderEditUpdateModel\$dryRun
$dryRun
Definition
OrderEditUpdateModel.php:38
Commercetools\Api\Models\OrderEdit\OrderEditUpdateModel\setActions
setActions(?OrderEditUpdateActionCollection $actions)
Definition
OrderEditUpdateModel.php:127
Commercetools\Api\Models\OrderEdit\OrderEditUpdateModel\getActions
getActions()
Definition
OrderEditUpdateModel.php:81
Commercetools\Api\Models\OrderEdit\OrderEditUpdateModel\__construct
__construct(?int $version=null, ?OrderEditUpdateActionCollection $actions=null, ?bool $dryRun=null)
Definition
OrderEditUpdateModel.php:44
Commercetools\Api\Models\OrderEdit\OrderEditUpdateModel\setDryRun
setDryRun(?bool $dryRun)
Definition
OrderEditUpdateModel.php:135
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition
BaseJsonObject.php:57
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\OrderEdit\OrderEditUpdate
Definition
OrderEditUpdate.php:15
Commercetools\Base\CSequence\fromArray
static fromArray(array $data)
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\OrderEdit
Definition
OrderEdit.php:9
Generated by
1.9.8