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
54
58
public
function
__construct
(
59
?
string
$change
=
null
,
60
?
string
$previousValue
=
null
,
61
?
string
$nextValue
=
null
,
62
?
string
$catalogData
=
null
,
63
?
string
$type
=
null
64
) {
65
$this->change =
$change
;
66
$this->previousValue =
$previousValue
;
67
$this->nextValue =
$nextValue
;
68
$this->catalogData =
$catalogData
;
69
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
70
}
71
76
public
function
getType
()
77
{
78
if
(is_null($this->type)) {
80
$data = $this->
raw
(self::FIELD_TYPE);
81
if
(is_null($data)) {
82
return
null
;
83
}
84
$this->type = (string) $data;
85
}
86
87
return
$this->type
;
88
}
89
94
public
function
getChange
()
95
{
96
if
(is_null($this->change)) {
98
$data = $this->
raw
(self::FIELD_CHANGE);
99
if
(is_null($data)) {
100
return
null
;
101
}
102
$this->change = (string) $data;
103
}
104
105
return
$this->change
;
106
}
107
114
public
function
getPreviousValue
()
115
{
116
if
(is_null($this->previousValue)) {
118
$data = $this->
raw
(self::FIELD_PREVIOUS_VALUE);
119
if
(is_null($data)) {
120
return
null
;
121
}
122
$this->previousValue = (string) $data;
123
}
124
125
return
$this->previousValue
;
126
}
127
134
public
function
getNextValue
()
135
{
136
if
(is_null($this->nextValue)) {
138
$data = $this->
raw
(self::FIELD_NEXT_VALUE);
139
if
(is_null($data)) {
140
return
null
;
141
}
142
$this->nextValue = (string) $data;
143
}
144
145
return
$this->nextValue
;
146
}
147
157
public
function
getCatalogData
()
158
{
159
if
(is_null($this->catalogData)) {
161
$data = $this->
raw
(self::FIELD_CATALOG_DATA);
162
if
(is_null($data)) {
163
return
null
;
164
}
165
$this->catalogData = (string) $data;
166
}
167
168
return
$this->catalogData
;
169
}
170
171
175
public
function
setChange
(?
string
$change
): void
176
{
177
$this->change =
$change
;
178
}
179
183
public
function
setPreviousValue
(?
string
$previousValue
): void
184
{
185
$this->previousValue =
$previousValue
;
186
}
187
191
public
function
setNextValue
(?
string
$nextValue
): void
192
{
193
$this->nextValue =
$nextValue
;
194
}
195
199
public
function
setCatalogData
(?
string
$catalogData
): void
200
{
201
$this->catalogData =
$catalogData
;
202
}
203
204
205
206
}
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:114
Commercetools\History\Models\Change\SetSkuChangeModel\__construct
__construct(?string $change=null, ?string $previousValue=null, ?string $nextValue=null, ?string $catalogData=null, ?string $type=null)
Definition
SetSkuChangeModel.php:58
Commercetools\History\Models\Change\SetSkuChangeModel\setNextValue
setNextValue(?string $nextValue)
Definition
SetSkuChangeModel.php:191
Commercetools\History\Models\Change\SetSkuChangeModel\$previousValue
$previousValue
Definition
SetSkuChangeModel.php:40
Commercetools\History\Models\Change\SetSkuChangeModel\getType
getType()
Definition
SetSkuChangeModel.php:76
Commercetools\History\Models\Change\SetSkuChangeModel\setChange
setChange(?string $change)
Definition
SetSkuChangeModel.php:175
Commercetools\History\Models\Change\SetSkuChangeModel\setPreviousValue
setPreviousValue(?string $previousValue)
Definition
SetSkuChangeModel.php:183
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\getChange
getChange()
Definition
SetSkuChangeModel.php:94
Commercetools\History\Models\Change\SetSkuChangeModel\getNextValue
getNextValue()
Definition
SetSkuChangeModel.php:134
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:199
Commercetools\History\Models\Change\SetSkuChangeModel\$catalogData
$catalogData
Definition
SetSkuChangeModel.php:52
Commercetools\History\Models\Change\SetSkuChangeModel\getCatalogData
getCatalogData()
Definition
SetSkuChangeModel.php:157
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