commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-history
src
Models
ChangeValue
CustomFieldExpandedValueBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\History\Models\ChangeValue
;
10
11
use
Commercetools\Base\Builder
;
12
use
Commercetools\Base\DateTimeImmutableCollection
;
13
use
Commercetools\Base\JsonObject
;
14
use
Commercetools\Base\JsonObjectModel
;
15
use
Commercetools\Base\MapperFactory
;
16
use stdClass;
17
use
Commercetools\History\Models\Common\LocalizedString
;
18
use
Commercetools\History\Models\Common\LocalizedStringBuilder
;
19
23
final
class
CustomFieldExpandedValueBuilder
implements
Builder
24
{
29
private
$name;
30
35
private
$value;
36
41
private
$label;
42
49
public
function
getName
()
50
{
51
return
$this->name;
52
}
53
60
public
function
getValue
()
61
{
62
return
$this->value;
63
}
64
71
public
function
getLabel
()
72
{
73
return
$this->label instanceof
LocalizedStringBuilder
? $this->label->
build
() : $this->label;
74
}
75
80
public
function
withName
(?
string
$name)
81
{
82
$this->name = $name;
83
84
return
$this;
85
}
86
91
public
function
withValue
( $value)
92
{
93
$this->value = $value;
94
95
return
$this;
96
}
97
102
public
function
withLabel
(?
LocalizedString
$label)
103
{
104
$this->label = $label;
105
106
return
$this;
107
}
108
113
public
function
withLabelBuilder
(?
LocalizedStringBuilder
$label)
114
{
115
$this->label = $label;
116
117
return
$this;
118
}
119
120
public
function
build
():
CustomFieldExpandedValue
121
{
122
return
new
CustomFieldExpandedValueModel
(
123
$this->name,
124
$this->value,
125
$this->label instanceof
LocalizedStringBuilder
? $this->label->
build
() : $this->label
126
);
127
}
128
129
public
static
function
of
():
CustomFieldExpandedValueBuilder
130
{
131
return
new
self
();
132
}
133
}
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\History\Models\ChangeValue\CustomFieldExpandedValueBuilder
Definition:
CustomFieldExpandedValueBuilder.php:24
Commercetools\History\Models\ChangeValue\CustomFieldExpandedValueBuilder\withLabelBuilder
withLabelBuilder(?LocalizedStringBuilder $label)
Definition:
CustomFieldExpandedValueBuilder.php:113
Commercetools\History\Models\ChangeValue\CustomFieldExpandedValueBuilder\of
static of()
Definition:
CustomFieldExpandedValueBuilder.php:129
Commercetools\History\Models\ChangeValue\CustomFieldExpandedValueBuilder\withName
withName(?string $name)
Definition:
CustomFieldExpandedValueBuilder.php:80
Commercetools\History\Models\ChangeValue\CustomFieldExpandedValueBuilder\withLabel
withLabel(?LocalizedString $label)
Definition:
CustomFieldExpandedValueBuilder.php:102
Commercetools\History\Models\ChangeValue\CustomFieldExpandedValueBuilder\build
build()
Definition:
CustomFieldExpandedValueBuilder.php:120
Commercetools\History\Models\ChangeValue\CustomFieldExpandedValueBuilder\getValue
getValue()
Definition:
CustomFieldExpandedValueBuilder.php:60
Commercetools\History\Models\ChangeValue\CustomFieldExpandedValueBuilder\getName
getName()
Definition:
CustomFieldExpandedValueBuilder.php:49
Commercetools\History\Models\ChangeValue\CustomFieldExpandedValueBuilder\getLabel
getLabel()
Definition:
CustomFieldExpandedValueBuilder.php:71
Commercetools\History\Models\ChangeValue\CustomFieldExpandedValueBuilder\withValue
withValue( $value)
Definition:
CustomFieldExpandedValueBuilder.php:91
Commercetools\History\Models\ChangeValue\CustomFieldExpandedValueModel
Definition:
CustomFieldExpandedValueModel.php:23
Commercetools\History\Models\Common\LocalizedStringBuilder
Definition:
LocalizedStringBuilder.php:20
Commercetools\History\Models\Common\LocalizedStringBuilder\build
build()
Definition:
LocalizedStringBuilder.php:42
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\History\Models\ChangeValue\CustomFieldExpandedValue
Definition:
CustomFieldExpandedValue.php:16
Commercetools\History\Models\Common\LocalizedString
Definition:
LocalizedString.php:14
Commercetools\History\Models\ChangeValue
Definition:
AssetChangeValue.php:9
Generated by
1.9.1