commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-history
src
Models
ChangeValue
TextLineItemValueModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\History\Models\ChangeValue
;
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
use
Commercetools\History\Models\Common\LocalizedString
;
17
use
Commercetools\History\Models\Common\LocalizedStringModel
;
18
22
final
class
TextLineItemValueModel
extends
JsonObjectModel
implements
TextLineItemValue
23
{
24
25
30
protected
$id
;
31
36
protected
$name
;
37
38
42
public
function
__construct
(
43
?
string
$id
=
null
,
44
?
LocalizedString
$name
=
null
45
) {
46
$this->
id
=
$id
;
47
$this->name =
$name
;
48
49
}
50
57
public
function
getId
()
58
{
59
if
(is_null($this->
id
)) {
61
$data = $this->
raw
(self::FIELD_ID);
62
if
(is_null($data)) {
63
return
null
;
64
}
65
$this->
id
= (string) $data;
66
}
67
68
return
$this->id
;
69
}
70
77
public
function
getName
()
78
{
79
if
(is_null($this->name)) {
81
$data = $this->
raw
(self::FIELD_NAME);
82
if
(is_null($data)) {
83
return
null
;
84
}
85
86
$this->name =
LocalizedStringModel::of
($data);
87
}
88
89
return
$this->name
;
90
}
91
92
96
public
function
setId
(?
string
$id
): void
97
{
98
$this->
id
=
$id
;
99
}
100
104
public
function
setName
(?
LocalizedString
$name
): void
105
{
106
$this->name =
$name
;
107
}
108
109
110
111
}
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\MapperMap\of
static of($data=null)
Definition:
MapperMap.php:45
Commercetools\History\Models\ChangeValue\TextLineItemValueModel
Definition:
TextLineItemValueModel.php:23
Commercetools\History\Models\ChangeValue\TextLineItemValueModel\$id
$id
Definition:
TextLineItemValueModel.php:30
Commercetools\History\Models\ChangeValue\TextLineItemValueModel\setId
setId(?string $id)
Definition:
TextLineItemValueModel.php:96
Commercetools\History\Models\ChangeValue\TextLineItemValueModel\getId
getId()
Definition:
TextLineItemValueModel.php:57
Commercetools\History\Models\ChangeValue\TextLineItemValueModel\$name
$name
Definition:
TextLineItemValueModel.php:36
Commercetools\History\Models\ChangeValue\TextLineItemValueModel\getName
getName()
Definition:
TextLineItemValueModel.php:77
Commercetools\History\Models\ChangeValue\TextLineItemValueModel\__construct
__construct(?string $id=null, ?LocalizedString $name=null)
Definition:
TextLineItemValueModel.php:42
Commercetools\History\Models\ChangeValue\TextLineItemValueModel\setName
setName(?LocalizedString $name)
Definition:
TextLineItemValueModel.php:104
Commercetools\History\Models\Common\LocalizedStringModel
Definition:
LocalizedStringModel.php:17
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\History\Models\ChangeValue\TextLineItemValue
Definition:
TextLineItemValue.php:16
Commercetools\History\Models\Common\LocalizedString
Definition:
LocalizedString.php:14
Commercetools\History\Models\ChangeValue
Definition:
AssetChangeValue.php:9
Generated by
1.9.1