commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Customer
CustomerUpdateModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Customer
;
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
CustomerUpdateModel
extends
JsonObjectModel
implements
CustomerUpdate
21
{
26
protected
$version
;
27
32
protected
$actions
;
33
34
38
public
function
__construct
(
39
?
int
$version
=
null
,
40
?
CustomerUpdateActionCollection
$actions
=
null
41
) {
42
$this->version =
$version
;
43
$this->actions =
$actions
;
44
}
45
53
public
function
getVersion
()
54
{
55
if
(is_null($this->version)) {
57
$data = $this->
raw
(self::FIELD_VERSION);
58
if
(is_null($data)) {
59
return
null
;
60
}
61
$this->version = (int) $data;
62
}
63
64
return
$this->version
;
65
}
66
73
public
function
getActions
()
74
{
75
if
(is_null($this->actions)) {
77
$data = $this->
raw
(self::FIELD_ACTIONS);
78
if
(is_null($data)) {
79
return
null
;
80
}
81
$this->actions =
CustomerUpdateActionCollection::fromArray
($data);
82
}
83
84
return
$this->actions
;
85
}
86
87
91
public
function
setVersion
(?
int
$version
): void
92
{
93
$this->version =
$version
;
94
}
95
99
public
function
setActions
(?
CustomerUpdateActionCollection
$actions
): void
100
{
101
$this->actions =
$actions
;
102
}
103
}
Commercetools\Api\Models\Customer\CustomerUpdateActionCollection
Definition:
CustomerUpdateActionCollection.php:26
Commercetools\Api\Models\Customer\CustomerUpdateModel
Definition:
CustomerUpdateModel.php:21
Commercetools\Api\Models\Customer\CustomerUpdateModel\setVersion
setVersion(?int $version)
Definition:
CustomerUpdateModel.php:91
Commercetools\Api\Models\Customer\CustomerUpdateModel\__construct
__construct(?int $version=null, ?CustomerUpdateActionCollection $actions=null)
Definition:
CustomerUpdateModel.php:38
Commercetools\Api\Models\Customer\CustomerUpdateModel\getVersion
getVersion()
Definition:
CustomerUpdateModel.php:53
Commercetools\Api\Models\Customer\CustomerUpdateModel\$actions
$actions
Definition:
CustomerUpdateModel.php:32
Commercetools\Api\Models\Customer\CustomerUpdateModel\setActions
setActions(?CustomerUpdateActionCollection $actions)
Definition:
CustomerUpdateModel.php:99
Commercetools\Api\Models\Customer\CustomerUpdateModel\getActions
getActions()
Definition:
CustomerUpdateModel.php:73
Commercetools\Api\Models\Customer\CustomerUpdateModel\$version
$version
Definition:
CustomerUpdateModel.php:26
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\Customer\CustomerUpdate
Definition:
CustomerUpdate.php:15
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Customer
Definition:
Customer.php:9
Generated by
1.9.1