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
68
72
public
function
__construct
(
73
?
string
$change
=
null
,
74
$previousValue
=
null
,
75
$nextValue
=
null
,
76
?
string
$name
=
null
,
77
?
string
$customTypeId
=
null
,
78
?
AssetChangeValue
$asset
=
null
,
79
?
string
$type
=
null
80
) {
81
$this->change =
$change
;
82
$this->previousValue =
$previousValue
;
83
$this->nextValue =
$nextValue
;
84
$this->name =
$name
;
85
$this->customTypeId =
$customTypeId
;
86
$this->asset =
$asset
;
87
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
88
}
89
94
public
function
getType
()
95
{
96
if
(is_null($this->type)) {
98
$data = $this->
raw
(self::FIELD_TYPE);
99
if
(is_null($data)) {
100
return
null
;
101
}
102
$this->type = (string) $data;
103
}
104
105
return
$this->type
;
106
}
107
112
public
function
getChange
()
113
{
114
if
(is_null($this->change)) {
116
$data = $this->
raw
(self::FIELD_CHANGE);
117
if
(is_null($data)) {
118
return
null
;
119
}
120
$this->change = (string) $data;
121
}
122
123
return
$this->change
;
124
}
125
132
public
function
getPreviousValue
()
133
{
134
if
(is_null($this->previousValue)) {
136
$data = $this->
raw
(self::FIELD_PREVIOUS_VALUE);
137
if
(is_null($data)) {
138
return
null
;
139
}
140
$this->previousValue = $data;
141
}
142
143
return
$this->previousValue
;
144
}
145
152
public
function
getNextValue
()
153
{
154
if
(is_null($this->nextValue)) {
156
$data = $this->
raw
(self::FIELD_NEXT_VALUE);
157
if
(is_null($data)) {
158
return
null
;
159
}
160
$this->nextValue = $data;
161
}
162
163
return
$this->nextValue
;
164
}
165
172
public
function
getName
()
173
{
174
if
(is_null($this->name)) {
176
$data = $this->
raw
(self::FIELD_NAME);
177
if
(is_null($data)) {
178
return
null
;
179
}
180
$this->name = (string) $data;
181
}
182
183
return
$this->name
;
184
}
185
192
public
function
getCustomTypeId
()
193
{
194
if
(is_null($this->customTypeId)) {
196
$data = $this->
raw
(self::FIELD_CUSTOM_TYPE_ID);
197
if
(is_null($data)) {
198
return
null
;
199
}
200
$this->customTypeId = (string) $data;
201
}
202
203
return
$this->customTypeId
;
204
}
205
212
public
function
getAsset
()
213
{
214
if
(is_null($this->asset)) {
216
$data = $this->
raw
(self::FIELD_ASSET);
217
if
(is_null($data)) {
218
return
null
;
219
}
220
221
$this->asset = AssetChangeValueModel::of($data);
222
}
223
224
return
$this->asset
;
225
}
226
227
231
public
function
setChange
(?
string
$change
): void
232
{
233
$this->change =
$change
;
234
}
235
239
public
function
setPreviousValue
(
$previousValue
): void
240
{
241
$this->previousValue =
$previousValue
;
242
}
243
247
public
function
setNextValue
(
$nextValue
): void
248
{
249
$this->nextValue =
$nextValue
;
250
}
251
255
public
function
setName
(?
string
$name
): void
256
{
257
$this->name =
$name
;
258
}
259
263
public
function
setCustomTypeId
(?
string
$customTypeId
): void
264
{
265
$this->customTypeId =
$customTypeId
;
266
}
267
271
public
function
setAsset
(?
AssetChangeValue
$asset
): void
272
{
273
$this->asset =
$asset
;
274
}
275
276
277
278
}
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\__construct
__construct(?string $change=null, $previousValue=null, $nextValue=null, ?string $name=null, ?string $customTypeId=null, ?AssetChangeValue $asset=null, ?string $type=null)
Definition
SetAssetCustomFieldChangeModel.php:72
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\getCustomTypeId
getCustomTypeId()
Definition
SetAssetCustomFieldChangeModel.php:192
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\$name
$name
Definition
SetAssetCustomFieldChangeModel.php:54
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\getNextValue
getNextValue()
Definition
SetAssetCustomFieldChangeModel.php:152
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\setCustomTypeId
setCustomTypeId(?string $customTypeId)
Definition
SetAssetCustomFieldChangeModel.php:263
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\getName
getName()
Definition
SetAssetCustomFieldChangeModel.php:172
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\$asset
$asset
Definition
SetAssetCustomFieldChangeModel.php:66
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\setChange
setChange(?string $change)
Definition
SetAssetCustomFieldChangeModel.php:231
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\getPreviousValue
getPreviousValue()
Definition
SetAssetCustomFieldChangeModel.php:132
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\$nextValue
$nextValue
Definition
SetAssetCustomFieldChangeModel.php:48
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\getAsset
getAsset()
Definition
SetAssetCustomFieldChangeModel.php:212
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\setAsset
setAsset(?AssetChangeValue $asset)
Definition
SetAssetCustomFieldChangeModel.php:271
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\setNextValue
setNextValue( $nextValue)
Definition
SetAssetCustomFieldChangeModel.php:247
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
SetAssetCustomFieldChangeModel.php:25
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\getType
getType()
Definition
SetAssetCustomFieldChangeModel.php:94
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\setPreviousValue
setPreviousValue( $previousValue)
Definition
SetAssetCustomFieldChangeModel.php:239
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\$previousValue
$previousValue
Definition
SetAssetCustomFieldChangeModel.php:42
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\$customTypeId
$customTypeId
Definition
SetAssetCustomFieldChangeModel.php:60
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\setName
setName(?string $name)
Definition
SetAssetCustomFieldChangeModel.php:255
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\$type
$type
Definition
SetAssetCustomFieldChangeModel.php:30
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel\getChange
getChange()
Definition
SetAssetCustomFieldChangeModel.php:112
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