commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-history
src
Models
Change
ChangeLabelChangeBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\History\Models\Change
;
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
ChangeLabelChangeBuilder
implements
Builder
24
{
29
private
$change;
30
35
private
$previousValue;
36
41
private
$nextValue;
42
47
private
$fieldName;
48
53
private
$attributeName;
54
59
public
function
getChange
()
60
{
61
return
$this->change;
62
}
63
70
public
function
getPreviousValue
()
71
{
72
return
$this->previousValue instanceof
LocalizedStringBuilder
? $this->previousValue->
build
() : $this->previousValue;
73
}
74
81
public
function
getNextValue
()
82
{
83
return
$this->nextValue instanceof
LocalizedStringBuilder
? $this->nextValue->
build
() : $this->nextValue;
84
}
85
92
public
function
getFieldName
()
93
{
94
return
$this->fieldName;
95
}
96
103
public
function
getAttributeName
()
104
{
105
return
$this->attributeName;
106
}
107
112
public
function
withChange
(?
string
$change)
113
{
114
$this->change = $change;
115
116
return
$this;
117
}
118
123
public
function
withPreviousValue
(?
LocalizedString
$previousValue)
124
{
125
$this->previousValue = $previousValue;
126
127
return
$this;
128
}
129
134
public
function
withNextValue
(?
LocalizedString
$nextValue)
135
{
136
$this->nextValue = $nextValue;
137
138
return
$this;
139
}
140
145
public
function
withFieldName
(?
string
$fieldName)
146
{
147
$this->fieldName = $fieldName;
148
149
return
$this;
150
}
151
156
public
function
withAttributeName
(?
string
$attributeName)
157
{
158
$this->attributeName = $attributeName;
159
160
return
$this;
161
}
162
167
public
function
withPreviousValueBuilder
(?
LocalizedStringBuilder
$previousValue)
168
{
169
$this->previousValue = $previousValue;
170
171
return
$this;
172
}
173
178
public
function
withNextValueBuilder
(?
LocalizedStringBuilder
$nextValue)
179
{
180
$this->nextValue = $nextValue;
181
182
return
$this;
183
}
184
185
public
function
build
():
ChangeLabelChange
186
{
187
return
new
ChangeLabelChangeModel
(
188
$this->change,
189
$this->previousValue instanceof
LocalizedStringBuilder
? $this->previousValue->
build
() : $this->previousValue,
190
$this->nextValue instanceof
LocalizedStringBuilder
? $this->nextValue->
build
() : $this->nextValue,
191
$this->fieldName,
192
$this->attributeName
193
);
194
}
195
196
public
static
function
of
():
ChangeLabelChangeBuilder
197
{
198
return
new
self
();
199
}
200
}
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\History\Models\Change\ChangeLabelChangeBuilder
Definition
ChangeLabelChangeBuilder.php:24
Commercetools\History\Models\Change\ChangeLabelChangeBuilder\withNextValue
withNextValue(?LocalizedString $nextValue)
Definition
ChangeLabelChangeBuilder.php:134
Commercetools\History\Models\Change\ChangeLabelChangeBuilder\of
static of()
Definition
ChangeLabelChangeBuilder.php:196
Commercetools\History\Models\Change\ChangeLabelChangeBuilder\getChange
getChange()
Definition
ChangeLabelChangeBuilder.php:59
Commercetools\History\Models\Change\ChangeLabelChangeBuilder\withPreviousValueBuilder
withPreviousValueBuilder(?LocalizedStringBuilder $previousValue)
Definition
ChangeLabelChangeBuilder.php:167
Commercetools\History\Models\Change\ChangeLabelChangeBuilder\getPreviousValue
getPreviousValue()
Definition
ChangeLabelChangeBuilder.php:70
Commercetools\History\Models\Change\ChangeLabelChangeBuilder\withPreviousValue
withPreviousValue(?LocalizedString $previousValue)
Definition
ChangeLabelChangeBuilder.php:123
Commercetools\History\Models\Change\ChangeLabelChangeBuilder\getFieldName
getFieldName()
Definition
ChangeLabelChangeBuilder.php:92
Commercetools\History\Models\Change\ChangeLabelChangeBuilder\withFieldName
withFieldName(?string $fieldName)
Definition
ChangeLabelChangeBuilder.php:145
Commercetools\History\Models\Change\ChangeLabelChangeBuilder\getAttributeName
getAttributeName()
Definition
ChangeLabelChangeBuilder.php:103
Commercetools\History\Models\Change\ChangeLabelChangeBuilder\build
build()
Definition
ChangeLabelChangeBuilder.php:185
Commercetools\History\Models\Change\ChangeLabelChangeBuilder\withChange
withChange(?string $change)
Definition
ChangeLabelChangeBuilder.php:112
Commercetools\History\Models\Change\ChangeLabelChangeBuilder\getNextValue
getNextValue()
Definition
ChangeLabelChangeBuilder.php:81
Commercetools\History\Models\Change\ChangeLabelChangeBuilder\withNextValueBuilder
withNextValueBuilder(?LocalizedStringBuilder $nextValue)
Definition
ChangeLabelChangeBuilder.php:178
Commercetools\History\Models\Change\ChangeLabelChangeBuilder\withAttributeName
withAttributeName(?string $attributeName)
Definition
ChangeLabelChangeBuilder.php:156
Commercetools\History\Models\Change\ChangeLabelChangeModel
Definition
ChangeLabelChangeModel.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\Change\ChangeLabelChange
Definition
ChangeLabelChange.php:16
Commercetools\History\Models\Common\LocalizedString
Definition
LocalizedString.php:14
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8