commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Customer
CustomerSetCustomFieldActionModel.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
CustomerSetCustomFieldActionModel
extends
JsonObjectModel
implements
CustomerSetCustomFieldAction
21
{
22
public
const
DISCRIMINATOR_VALUE
=
'setCustomField'
;
27
protected
$action
;
28
33
protected
$name
;
34
39
protected
$value
;
40
41
45
public
function
__construct
(
46
?
string
$name
=
null
,
47
$value
=
null
,
48
?
string
$action
=
null
49
) {
50
$this->name =
$name
;
51
$this->value =
$value
;
52
$this->action =
$action
??
self::DISCRIMINATOR_VALUE
;
53
}
54
59
public
function
getAction
()
60
{
61
if
(is_null($this->action)) {
63
$data = $this->
raw
(self::FIELD_ACTION);
64
if
(is_null($data)) {
65
return
null
;
66
}
67
$this->action = (string) $data;
68
}
69
70
return
$this->action
;
71
}
72
79
public
function
getName
()
80
{
81
if
(is_null($this->name)) {
83
$data = $this->
raw
(self::FIELD_NAME);
84
if
(is_null($data)) {
85
return
null
;
86
}
87
$this->name = (string) $data;
88
}
89
90
return
$this->name
;
91
}
92
101
public
function
getValue
()
102
{
103
if
(is_null($this->value)) {
105
$data = $this->
raw
(self::FIELD_VALUE);
106
if
(is_null($data)) {
107
return
null
;
108
}
109
$this->value = $data;
110
}
111
112
return
$this->value
;
113
}
114
115
119
public
function
setName
(?
string
$name
): void
120
{
121
$this->name =
$name
;
122
}
123
127
public
function
setValue
(
$value
): void
128
{
129
$this->value =
$value
;
130
}
131
}
Commercetools\Api\Models\Customer\CustomerSetCustomFieldActionModel
Definition:
CustomerSetCustomFieldActionModel.php:21
Commercetools\Api\Models\Customer\CustomerSetCustomFieldActionModel\$name
$name
Definition:
CustomerSetCustomFieldActionModel.php:33
Commercetools\Api\Models\Customer\CustomerSetCustomFieldActionModel\setName
setName(?string $name)
Definition:
CustomerSetCustomFieldActionModel.php:119
Commercetools\Api\Models\Customer\CustomerSetCustomFieldActionModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition:
CustomerSetCustomFieldActionModel.php:22
Commercetools\Api\Models\Customer\CustomerSetCustomFieldActionModel\$action
$action
Definition:
CustomerSetCustomFieldActionModel.php:27
Commercetools\Api\Models\Customer\CustomerSetCustomFieldActionModel\getAction
getAction()
Definition:
CustomerSetCustomFieldActionModel.php:59
Commercetools\Api\Models\Customer\CustomerSetCustomFieldActionModel\$value
$value
Definition:
CustomerSetCustomFieldActionModel.php:39
Commercetools\Api\Models\Customer\CustomerSetCustomFieldActionModel\setValue
setValue($value)
Definition:
CustomerSetCustomFieldActionModel.php:127
Commercetools\Api\Models\Customer\CustomerSetCustomFieldActionModel\__construct
__construct(?string $name=null, $value=null, ?string $action=null)
Definition:
CustomerSetCustomFieldActionModel.php:45
Commercetools\Api\Models\Customer\CustomerSetCustomFieldActionModel\getValue
getValue()
Definition:
CustomerSetCustomFieldActionModel.php:101
Commercetools\Api\Models\Customer\CustomerSetCustomFieldActionModel\getName
getName()
Definition:
CustomerSetCustomFieldActionModel.php:79
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\Customer\CustomerSetCustomFieldAction
Definition:
CustomerSetCustomFieldAction.php:15
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Customer
Definition:
Customer.php:9
Generated by
1.9.1