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
SetSkuChangeModel.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
20
final
class
SetSkuChangeModel
extends
JsonObjectModel
implements
SetSkuChange
21
{
22
23
public
const
DISCRIMINATOR_VALUE
=
'SetSkuChange'
;
28
protected
$type
;
29
34
protected
$change
;
35
40
protected
$previousValue
;
41
46
protected
$nextValue
;
47
52
protected
$catalogData
;
53
58
protected
$variant
;
59
60
64
public
function
__construct
(
65
?
string
$change
=
null
,
66
?
string
$previousValue
=
null
,
67
?
string
$nextValue
=
null
,
68
?
string
$catalogData
=
null
,
69
?
string
$variant
=
null
,
70
?
string
$type
=
null
71
) {
72
$this->change =
$change
;
73
$this->previousValue =
$previousValue
;
74
$this->nextValue =
$nextValue
;
75
$this->catalogData =
$catalogData
;
76
$this->variant =
$variant
;
77
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
78
}
79
84
public
function
getType
()
85
{
86
if
(is_null($this->type)) {
88
$data = $this->
raw
(self::FIELD_TYPE);
89
if
(is_null($data)) {
90
return
null
;
91
}
92
$this->type = (string) $data;
93
}
94
95
return
$this->type
;
96
}
97
102
public
function
getChange
()
103
{
104
if
(is_null($this->change)) {
106
$data = $this->
raw
(self::FIELD_CHANGE);
107
if
(is_null($data)) {
108
return
null
;
109
}
110
$this->change = (string) $data;
111
}
112
113
return
$this->change
;
114
}
115
122
public
function
getPreviousValue
()
123
{
124
if
(is_null($this->previousValue)) {
126
$data = $this->
raw
(self::FIELD_PREVIOUS_VALUE);
127
if
(is_null($data)) {
128
return
null
;
129
}
130
$this->previousValue = (string) $data;
131
}
132
133
return
$this->previousValue
;
134
}
135
142
public
function
getNextValue
()
143
{
144
if
(is_null($this->nextValue)) {
146
$data = $this->
raw
(self::FIELD_NEXT_VALUE);
147
if
(is_null($data)) {
148
return
null
;
149
}
150
$this->nextValue = (string) $data;
151
}
152
153
return
$this->nextValue
;
154
}
155
166
public
function
getCatalogData
()
167
{
168
if
(is_null($this->catalogData)) {
170
$data = $this->
raw
(self::FIELD_CATALOG_DATA);
171
if
(is_null($data)) {
172
return
null
;
173
}
174
$this->catalogData = (string) $data;
175
}
176
177
return
$this->catalogData
;
178
}
179
187
public
function
getVariant
()
188
{
189
if
(is_null($this->variant)) {
191
$data = $this->
raw
(self::FIELD_VARIANT);
192
if
(is_null($data)) {
193
return
null
;
194
}
195
$this->variant = (string) $data;
196
}
197
198
return
$this->variant
;
199
}
200
201
205
public
function
setChange
(?
string
$change
): void
206
{
207
$this->change =
$change
;
208
}
209
213
public
function
setPreviousValue
(?
string
$previousValue
): void
214
{
215
$this->previousValue =
$previousValue
;
216
}
217
221
public
function
setNextValue
(?
string
$nextValue
): void
222
{
223
$this->nextValue =
$nextValue
;
224
}
225
229
public
function
setCatalogData
(?
string
$catalogData
): void
230
{
231
$this->catalogData =
$catalogData
;
232
}
233
237
public
function
setVariant
(?
string
$variant
): void
238
{
239
$this->variant =
$variant
;
240
}
241
242
243
244
}
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\SetSkuChangeModel
Definition
SetSkuChangeModel.php:21
Commercetools\History\Models\Change\SetSkuChangeModel\getPreviousValue
getPreviousValue()
Definition
SetSkuChangeModel.php:122
Commercetools\History\Models\Change\SetSkuChangeModel\__construct
__construct(?string $change=null, ?string $previousValue=null, ?string $nextValue=null, ?string $catalogData=null, ?string $variant=null, ?string $type=null)
Definition
SetSkuChangeModel.php:64
Commercetools\History\Models\Change\SetSkuChangeModel\setNextValue
setNextValue(?string $nextValue)
Definition
SetSkuChangeModel.php:221
Commercetools\History\Models\Change\SetSkuChangeModel\$previousValue
$previousValue
Definition
SetSkuChangeModel.php:40
Commercetools\History\Models\Change\SetSkuChangeModel\getType
getType()
Definition
SetSkuChangeModel.php:84
Commercetools\History\Models\Change\SetSkuChangeModel\setChange
setChange(?string $change)
Definition
SetSkuChangeModel.php:205
Commercetools\History\Models\Change\SetSkuChangeModel\$variant
$variant
Definition
SetSkuChangeModel.php:58
Commercetools\History\Models\Change\SetSkuChangeModel\setPreviousValue
setPreviousValue(?string $previousValue)
Definition
SetSkuChangeModel.php:213
Commercetools\History\Models\Change\SetSkuChangeModel\$type
$type
Definition
SetSkuChangeModel.php:28
Commercetools\History\Models\Change\SetSkuChangeModel\$change
$change
Definition
SetSkuChangeModel.php:34
Commercetools\History\Models\Change\SetSkuChangeModel\getVariant
getVariant()
Definition
SetSkuChangeModel.php:187
Commercetools\History\Models\Change\SetSkuChangeModel\getChange
getChange()
Definition
SetSkuChangeModel.php:102
Commercetools\History\Models\Change\SetSkuChangeModel\getNextValue
getNextValue()
Definition
SetSkuChangeModel.php:142
Commercetools\History\Models\Change\SetSkuChangeModel\$nextValue
$nextValue
Definition
SetSkuChangeModel.php:46
Commercetools\History\Models\Change\SetSkuChangeModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
SetSkuChangeModel.php:23
Commercetools\History\Models\Change\SetSkuChangeModel\setCatalogData
setCatalogData(?string $catalogData)
Definition
SetSkuChangeModel.php:229
Commercetools\History\Models\Change\SetSkuChangeModel\$catalogData
$catalogData
Definition
SetSkuChangeModel.php:52
Commercetools\History\Models\Change\SetSkuChangeModel\setVariant
setVariant(?string $variant)
Definition
SetSkuChangeModel.php:237
Commercetools\History\Models\Change\SetSkuChangeModel\getCatalogData
getCatalogData()
Definition
SetSkuChangeModel.php:166
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Change\SetSkuChange
Definition
SetSkuChange.php:15
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8