commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Me
MyBusinessUnitUpdateModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Me
;
10
11
use
Commercetools\Api\Models\BusinessUnit\BusinessUnitUpdateActionCollection
;
12
use
Commercetools\Base\DateTimeImmutableCollection
;
13
use
Commercetools\Base\JsonObject
;
14
use
Commercetools\Base\JsonObjectModel
;
15
use
Commercetools\Base\MapperFactory
;
16
use stdClass;
17
21
final
class
MyBusinessUnitUpdateModel
extends
JsonObjectModel
implements
MyBusinessUnitUpdate
22
{
27
protected
$version
;
28
33
protected
$actions
;
34
35
39
public
function
__construct
(
40
?
int
$version
=
null
,
41
?
BusinessUnitUpdateActionCollection
$actions
=
null
42
) {
43
$this->version =
$version
;
44
$this->actions =
$actions
;
45
}
46
54
public
function
getVersion
()
55
{
56
if
(is_null($this->version)) {
58
$data = $this->
raw
(self::FIELD_VERSION);
59
if
(is_null($data)) {
60
return
null
;
61
}
62
$this->version = (int) $data;
63
}
64
65
return
$this->version
;
66
}
67
74
public
function
getActions
()
75
{
76
if
(is_null($this->actions)) {
78
$data = $this->
raw
(self::FIELD_ACTIONS);
79
if
(is_null($data)) {
80
return
null
;
81
}
82
$this->actions =
BusinessUnitUpdateActionCollection::fromArray
($data);
83
}
84
85
return
$this->actions
;
86
}
87
88
92
public
function
setVersion
(?
int
$version
): void
93
{
94
$this->version =
$version
;
95
}
96
100
public
function
setActions
(?
BusinessUnitUpdateActionCollection
$actions
): void
101
{
102
$this->actions =
$actions
;
103
}
104
}
Commercetools\Api\Models\BusinessUnit\BusinessUnitUpdateActionCollection
Definition:
BusinessUnitUpdateActionCollection.php:26
Commercetools\Api\Models\Me\MyBusinessUnitUpdateModel
Definition:
MyBusinessUnitUpdateModel.php:22
Commercetools\Api\Models\Me\MyBusinessUnitUpdateModel\setActions
setActions(?BusinessUnitUpdateActionCollection $actions)
Definition:
MyBusinessUnitUpdateModel.php:100
Commercetools\Api\Models\Me\MyBusinessUnitUpdateModel\setVersion
setVersion(?int $version)
Definition:
MyBusinessUnitUpdateModel.php:92
Commercetools\Api\Models\Me\MyBusinessUnitUpdateModel\$version
$version
Definition:
MyBusinessUnitUpdateModel.php:27
Commercetools\Api\Models\Me\MyBusinessUnitUpdateModel\__construct
__construct(?int $version=null, ?BusinessUnitUpdateActionCollection $actions=null)
Definition:
MyBusinessUnitUpdateModel.php:39
Commercetools\Api\Models\Me\MyBusinessUnitUpdateModel\$actions
$actions
Definition:
MyBusinessUnitUpdateModel.php:33
Commercetools\Api\Models\Me\MyBusinessUnitUpdateModel\getVersion
getVersion()
Definition:
MyBusinessUnitUpdateModel.php:54
Commercetools\Api\Models\Me\MyBusinessUnitUpdateModel\getActions
getActions()
Definition:
MyBusinessUnitUpdateModel.php:74
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\Base\MapperSequence\fromArray
static fromArray(array $data)
Definition:
MapperSequence.php:56
Commercetools\Api\Models\Me\MyBusinessUnitUpdate
Definition:
MyBusinessUnitUpdate.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Me
Definition:
MyBusinessUnitAddAddressAction.php:9
Generated by
1.9.1