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
SetAssetCustomFieldChangeModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\History\Models\Change
;
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\ChangeValue\AssetChangeValue
;
17
use
Commercetools\History\Models\ChangeValue\AssetChangeValueModel
;
18
22
final
class
SetAssetCustomFieldChangeModel
extends
JsonObjectModel
implements
SetAssetCustomFieldChange
23
{
24
25
public
const
DISCRIMINATOR_VALUE
=
'SetAssetCustomFieldChange'
;
30
protected
$type
;
31
36
protected
$change
;
37
42
protected
$previousValue
;
43
48
protected
$nextValue
;
49
54
protected
$name
;
55
60
protected
$customTypeId
;
61
66
protected
$asset
;
67
72
protected
$catalogData
;
73
78
protected
$variant
;
79
80
84
public
function
__construct
(
85
?
string
$change
=
null
,
86
$previousValue
=
null
,
87
$nextValue
=
null
,
88
?
string
$name
=
null
,
89
?
string
$customTypeId
=
null
,
90
?
AssetChangeValue
$asset
=
null
,
91
?
string
$catalogData
=
null
,
92
?
string
$variant
=
null
,
93
?
string
$type
=
null
94
) {
95
$this->change =
$change
;
96
$this->previousValue =
$previousValue
;
97
$this->nextValue =
$nextValue
;
98
$this->name =
$name
;
99
$this->customTypeId =
$customTypeId
;
100
$this->asset =
$asset
;
101
$this->catalogData =
$catalogData
;
102
$this->variant =
$variant
;
103
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
104
}
105
110
public
function
getType
()
111
{
112
if
(is_null($this->type)) {
114
$data = $this->
raw
(self::FIELD_TYPE);
115
if
(is_null($data)) {
116
return
null
;
117
}
118
$this->type = (string) $data;
119
}
120
121
return
$this->type
;
122
}
123
128
public
function
getChange
()
129
{
130
if
(is_null($this->change)) {
132
$data = $this->
raw
(self::FIELD_CHANGE);
133
if
(is_null($data)) {
134
return
null
;
135
}
136
$this->change = (string) $data;
137
}
138
139
return
$this->change
;
140
}
141
148
public
function
getPreviousValue
()
149
{
150
if
(is_null($this->previousValue)) {
152
$data = $this->
raw
(self::FIELD_PREVIOUS_VALUE);
153
if
(is_null($data)) {
154
return
null
;
155
}
156
$this->previousValue = $data;
157
}
158
159
return
$this->previousValue
;
160
}
161
168
public
function
getNextValue
()
169
{
170
if
(is_null($this->nextValue)) {
172
$data = $this->
raw
(self::FIELD_NEXT_VALUE);
173
if
(is_null($data)) {
174
return
null
;
175
}
176
$this->nextValue = $data;
177
}
178
179
return
$this->nextValue
;
180
}
181
188
public
function
getName
()
189
{
190
if
(is_null($this->name)) {
192
$data = $this->
raw
(self::FIELD_NAME);
193
if
(is_null($data)) {
194
return
null
;
195
}
196
$this->name = (string) $data;
197
}
198
199
return
$this->name
;
200
}
201
208
public
function
getCustomTypeId
()
209
{
210
if
(is_null($this->customTypeId)) {
212
$data = $this->
raw
(self::FIELD_CUSTOM_TYPE_ID);
213
if
(is_null($data)) {
214
return
null
;
215
}
216
$this->customTypeId = (string) $data;
217
}
218
219
return
$this->customTypeId
;
220
}
221
228
public
function
getAsset
()
229
{
230
if
(is_null($this->asset)) {
232
$data = $this->
raw
(self::FIELD_ASSET);
233
if
(is_null($data)) {
234
return
null
;
235
}
236
237
$this->asset = AssetChangeValueModel::of($data);
238
}
239
240
return
$this->asset
;
241
}
242
253
public
function
getCatalogData
()
254
{
255
if
(is_null($this->catalogData)) {
257
$data = $this->
raw
(self::FIELD_CATALOG_DATA);
258
if
(is_null($data)) {
259
return
null
;
260
}
261
$this->catalogData = (string) $data;
262
}
263
264
return
$this->catalogData
;
265
}
266
274
public
function
getVariant
()
275
{
276
if
(is_null($this->variant)) {
278
$data = $this->
raw
(self::FIELD_VARIANT);
279
if
(is_null($data)) {
280
return
null
;
281
}
282
$this->variant = (string) $data;
283
}
284
285
return
$this->variant
;
286
}
287
288
292
public
function
setChange
(?
string
$change
): void
293
{
294
$this->change =
$change
;
295
}
296
300
public
function
setPreviousValue
(
$previousValue
): void
301
{
302
$this->previousValue =
$previousValue
;
303
}
304
308
public
function
setNextValue
(
$nextValue
): void
309
{
310
$this->nextValue =
$nextValue
;
311
}
312
316
public
function
setName
(?
string
$name
): void
317
{
318
$this->name =
$name
;
319
}
320
324
public
function
setCustomTypeId
(?
string
$customTypeId
): void
325
{
326
$this->customTypeId =
$customTypeId
;
327
}
328
332
public
function
setAsset
(?
AssetChangeValue
$asset
): void
333
{
334
$this->asset =
$asset
;
335
}
336
340
public
function
setCatalogData
(?
string
$catalogData
): void
341
{
342
$this->catalogData =
$catalogData
;
343
}
344
348
public
function
setVariant
(?
string
$variant
): void
349
{
350
$this->variant =
$variant
;
351
}
352
353
354
355
}
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\History\Models\Change\SetAssetCustomFieldChangeModel
Definition
SetAssetCustomFieldChangeModel.php:23
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\getCatalogData
getCatalogData()
Definition
SetAssetCustomFieldChangeModel.php:253
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\getCustomTypeId
getCustomTypeId()
Definition
SetAssetCustomFieldChangeModel.php:208
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\$variant
$variant
Definition
SetAssetCustomFieldChangeModel.php:78
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\$name
$name
Definition
SetAssetCustomFieldChangeModel.php:54
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\getNextValue
getNextValue()
Definition
SetAssetCustomFieldChangeModel.php:168
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\setCustomTypeId
setCustomTypeId(?string $customTypeId)
Definition
SetAssetCustomFieldChangeModel.php:324
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\getName
getName()
Definition
SetAssetCustomFieldChangeModel.php:188
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\$asset
$asset
Definition
SetAssetCustomFieldChangeModel.php:66
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\setChange
setChange(?string $change)
Definition
SetAssetCustomFieldChangeModel.php:292
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\getPreviousValue
getPreviousValue()
Definition
SetAssetCustomFieldChangeModel.php:148
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\$catalogData
$catalogData
Definition
SetAssetCustomFieldChangeModel.php:72
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\$nextValue
$nextValue
Definition
SetAssetCustomFieldChangeModel.php:48
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\__construct
__construct(?string $change=null, $previousValue=null, $nextValue=null, ?string $name=null, ?string $customTypeId=null, ?AssetChangeValue $asset=null, ?string $catalogData=null, ?string $variant=null, ?string $type=null)
Definition
SetAssetCustomFieldChangeModel.php:84
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\getAsset
getAsset()
Definition
SetAssetCustomFieldChangeModel.php:228
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\setAsset
setAsset(?AssetChangeValue $asset)
Definition
SetAssetCustomFieldChangeModel.php:332
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\setNextValue
setNextValue( $nextValue)
Definition
SetAssetCustomFieldChangeModel.php:308
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
SetAssetCustomFieldChangeModel.php:25
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\getType
getType()
Definition
SetAssetCustomFieldChangeModel.php:110
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\setVariant
setVariant(?string $variant)
Definition
SetAssetCustomFieldChangeModel.php:348
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\setCatalogData
setCatalogData(?string $catalogData)
Definition
SetAssetCustomFieldChangeModel.php:340
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\setPreviousValue
setPreviousValue( $previousValue)
Definition
SetAssetCustomFieldChangeModel.php:300
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\$previousValue
$previousValue
Definition
SetAssetCustomFieldChangeModel.php:42
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\getVariant
getVariant()
Definition
SetAssetCustomFieldChangeModel.php:274
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\$customTypeId
$customTypeId
Definition
SetAssetCustomFieldChangeModel.php:60
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\setName
setName(?string $name)
Definition
SetAssetCustomFieldChangeModel.php:316
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\$type
$type
Definition
SetAssetCustomFieldChangeModel.php:30
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\getChange
getChange()
Definition
SetAssetCustomFieldChangeModel.php:128
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\$change
$change
Definition
SetAssetCustomFieldChangeModel.php:36
Commercetools\History\Models\ChangeValue\AssetChangeValueModel
Definition
AssetChangeValueModel.php:23
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Change\SetAssetCustomFieldChange
Definition
SetAssetCustomFieldChange.php:16
Commercetools\History\Models\ChangeValue\AssetChangeValue
Definition
AssetChangeValue.php:16
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8