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
SetAssetKeyChangeBuilder.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\ChangeValue\AssetChangeValue
;
18
use
Commercetools\History\Models\ChangeValue\AssetChangeValueBuilder
;
19
23
final
class
SetAssetKeyChangeBuilder
implements
Builder
24
{
29
private
$change;
30
35
private
$previousValue;
36
41
private
$nextValue;
42
47
private
$asset;
48
53
private
$catalogData;
54
59
private
$variant;
60
65
public
function
getChange
()
66
{
67
return
$this->change;
68
}
69
76
public
function
getPreviousValue
()
77
{
78
return
$this->previousValue;
79
}
80
87
public
function
getNextValue
()
88
{
89
return
$this->nextValue;
90
}
91
98
public
function
getAsset
()
99
{
100
return
$this->asset instanceof
AssetChangeValueBuilder
? $this->asset->
build
() : $this->asset;
101
}
102
113
public
function
getCatalogData
()
114
{
115
return
$this->catalogData;
116
}
117
125
public
function
getVariant
()
126
{
127
return
$this->variant;
128
}
129
134
public
function
withChange
(?
string
$change)
135
{
136
$this->change = $change;
137
138
return
$this;
139
}
140
145
public
function
withPreviousValue
(?
string
$previousValue)
146
{
147
$this->previousValue = $previousValue;
148
149
return
$this;
150
}
151
156
public
function
withNextValue
(?
string
$nextValue)
157
{
158
$this->nextValue = $nextValue;
159
160
return
$this;
161
}
162
167
public
function
withAsset
(?
AssetChangeValue
$asset)
168
{
169
$this->asset = $asset;
170
171
return
$this;
172
}
173
178
public
function
withCatalogData
(?
string
$catalogData)
179
{
180
$this->catalogData = $catalogData;
181
182
return
$this;
183
}
184
189
public
function
withVariant
(?
string
$variant)
190
{
191
$this->variant = $variant;
192
193
return
$this;
194
}
195
200
public
function
withAssetBuilder
(?
AssetChangeValueBuilder
$asset)
201
{
202
$this->asset = $asset;
203
204
return
$this;
205
}
206
207
public
function
build
():
SetAssetKeyChange
208
{
209
return
new
SetAssetKeyChangeModel
(
210
$this->change,
211
$this->previousValue,
212
$this->nextValue,
213
$this->asset instanceof
AssetChangeValueBuilder
? $this->asset->
build
() : $this->asset,
214
$this->catalogData,
215
$this->variant
216
);
217
}
218
219
public
static
function
of
():
SetAssetKeyChangeBuilder
220
{
221
return
new
self
();
222
}
223
}
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\SetAssetKeyChangeBuilder
Definition
SetAssetKeyChangeBuilder.php:24
Commercetools\History\Models\Change\SetAssetKeyChangeBuilder\withPreviousValue
withPreviousValue(?string $previousValue)
Definition
SetAssetKeyChangeBuilder.php:145
Commercetools\History\Models\Change\SetAssetKeyChangeBuilder\of
static of()
Definition
SetAssetKeyChangeBuilder.php:219
Commercetools\History\Models\Change\SetAssetKeyChangeBuilder\build
build()
Definition
SetAssetKeyChangeBuilder.php:207
Commercetools\History\Models\Change\SetAssetKeyChangeBuilder\getNextValue
getNextValue()
Definition
SetAssetKeyChangeBuilder.php:87
Commercetools\History\Models\Change\SetAssetKeyChangeBuilder\withChange
withChange(?string $change)
Definition
SetAssetKeyChangeBuilder.php:134
Commercetools\History\Models\Change\SetAssetKeyChangeBuilder\getAsset
getAsset()
Definition
SetAssetKeyChangeBuilder.php:98
Commercetools\History\Models\Change\SetAssetKeyChangeBuilder\withVariant
withVariant(?string $variant)
Definition
SetAssetKeyChangeBuilder.php:189
Commercetools\History\Models\Change\SetAssetKeyChangeBuilder\withCatalogData
withCatalogData(?string $catalogData)
Definition
SetAssetKeyChangeBuilder.php:178
Commercetools\History\Models\Change\SetAssetKeyChangeBuilder\withAsset
withAsset(?AssetChangeValue $asset)
Definition
SetAssetKeyChangeBuilder.php:167
Commercetools\History\Models\Change\SetAssetKeyChangeBuilder\withAssetBuilder
withAssetBuilder(?AssetChangeValueBuilder $asset)
Definition
SetAssetKeyChangeBuilder.php:200
Commercetools\History\Models\Change\SetAssetKeyChangeBuilder\getPreviousValue
getPreviousValue()
Definition
SetAssetKeyChangeBuilder.php:76
Commercetools\History\Models\Change\SetAssetKeyChangeBuilder\getCatalogData
getCatalogData()
Definition
SetAssetKeyChangeBuilder.php:113
Commercetools\History\Models\Change\SetAssetKeyChangeBuilder\getVariant
getVariant()
Definition
SetAssetKeyChangeBuilder.php:125
Commercetools\History\Models\Change\SetAssetKeyChangeBuilder\getChange
getChange()
Definition
SetAssetKeyChangeBuilder.php:65
Commercetools\History\Models\Change\SetAssetKeyChangeBuilder\withNextValue
withNextValue(?string $nextValue)
Definition
SetAssetKeyChangeBuilder.php:156
Commercetools\History\Models\Change\SetAssetKeyChangeModel
Definition
SetAssetKeyChangeModel.php:23
Commercetools\History\Models\ChangeValue\AssetChangeValueBuilder
Definition
AssetChangeValueBuilder.php:24
Commercetools\History\Models\ChangeValue\AssetChangeValueBuilder\build
build()
Definition
AssetChangeValueBuilder.php:92
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Change\SetAssetKeyChange
Definition
SetAssetKeyChange.php:16
Commercetools\History\Models\ChangeValue\AssetChangeValue
Definition
AssetChangeValue.php:16
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8