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
SetPriceKeyChangeModel.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
SetPriceKeyChangeModel
extends
JsonObjectModel
implements
SetPriceKeyChange
21
{
22
23
public
const
DISCRIMINATOR_VALUE
=
'SetPriceKeyChange'
;
28
protected
$type
;
29
34
protected
$change
;
35
40
protected
$catalogData
;
41
46
protected
$variant
;
47
52
protected
$priceId
;
53
58
protected
$previousValue
;
59
64
protected
$nextValue
;
65
66
70
public
function
__construct
(
71
?
string
$change
=
null
,
72
?
string
$catalogData
=
null
,
73
?
string
$variant
=
null
,
74
?
string
$priceId
=
null
,
75
?
string
$previousValue
=
null
,
76
?
string
$nextValue
=
null
,
77
?
string
$type
=
null
78
) {
79
$this->change =
$change
;
80
$this->catalogData =
$catalogData
;
81
$this->variant =
$variant
;
82
$this->priceId =
$priceId
;
83
$this->previousValue =
$previousValue
;
84
$this->nextValue =
$nextValue
;
85
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
86
}
87
92
public
function
getType
()
93
{
94
if
(is_null($this->type)) {
96
$data = $this->
raw
(self::FIELD_TYPE);
97
if
(is_null($data)) {
98
return
null
;
99
}
100
$this->type = (string) $data;
101
}
102
103
return
$this->type
;
104
}
105
110
public
function
getChange
()
111
{
112
if
(is_null($this->change)) {
114
$data = $this->
raw
(self::FIELD_CHANGE);
115
if
(is_null($data)) {
116
return
null
;
117
}
118
$this->change = (string) $data;
119
}
120
121
return
$this->change
;
122
}
123
134
public
function
getCatalogData
()
135
{
136
if
(is_null($this->catalogData)) {
138
$data = $this->
raw
(self::FIELD_CATALOG_DATA);
139
if
(is_null($data)) {
140
return
null
;
141
}
142
$this->catalogData = (string) $data;
143
}
144
145
return
$this->catalogData
;
146
}
147
155
public
function
getVariant
()
156
{
157
if
(is_null($this->variant)) {
159
$data = $this->
raw
(self::FIELD_VARIANT);
160
if
(is_null($data)) {
161
return
null
;
162
}
163
$this->variant = (string) $data;
164
}
165
166
return
$this->variant
;
167
}
168
175
public
function
getPriceId
()
176
{
177
if
(is_null($this->priceId)) {
179
$data = $this->
raw
(self::FIELD_PRICE_ID);
180
if
(is_null($data)) {
181
return
null
;
182
}
183
$this->priceId = (string) $data;
184
}
185
186
return
$this->priceId
;
187
}
188
195
public
function
getPreviousValue
()
196
{
197
if
(is_null($this->previousValue)) {
199
$data = $this->
raw
(self::FIELD_PREVIOUS_VALUE);
200
if
(is_null($data)) {
201
return
null
;
202
}
203
$this->previousValue = (string) $data;
204
}
205
206
return
$this->previousValue
;
207
}
208
215
public
function
getNextValue
()
216
{
217
if
(is_null($this->nextValue)) {
219
$data = $this->
raw
(self::FIELD_NEXT_VALUE);
220
if
(is_null($data)) {
221
return
null
;
222
}
223
$this->nextValue = (string) $data;
224
}
225
226
return
$this->nextValue
;
227
}
228
229
233
public
function
setChange
(?
string
$change
): void
234
{
235
$this->change =
$change
;
236
}
237
241
public
function
setCatalogData
(?
string
$catalogData
): void
242
{
243
$this->catalogData =
$catalogData
;
244
}
245
249
public
function
setVariant
(?
string
$variant
): void
250
{
251
$this->variant =
$variant
;
252
}
253
257
public
function
setPriceId
(?
string
$priceId
): void
258
{
259
$this->priceId =
$priceId
;
260
}
261
265
public
function
setPreviousValue
(?
string
$previousValue
): void
266
{
267
$this->previousValue =
$previousValue
;
268
}
269
273
public
function
setNextValue
(?
string
$nextValue
): void
274
{
275
$this->nextValue =
$nextValue
;
276
}
277
278
279
280
}
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\SetPriceKeyChangeModel
Definition
SetPriceKeyChangeModel.php:21
Commercetools\History\Models\Change\SetPriceKeyChangeModel\getPreviousValue
getPreviousValue()
Definition
SetPriceKeyChangeModel.php:195
Commercetools\History\Models\Change\SetPriceKeyChangeModel\setPreviousValue
setPreviousValue(?string $previousValue)
Definition
SetPriceKeyChangeModel.php:265
Commercetools\History\Models\Change\SetPriceKeyChangeModel\getCatalogData
getCatalogData()
Definition
SetPriceKeyChangeModel.php:134
Commercetools\History\Models\Change\SetPriceKeyChangeModel\setChange
setChange(?string $change)
Definition
SetPriceKeyChangeModel.php:233
Commercetools\History\Models\Change\SetPriceKeyChangeModel\getPriceId
getPriceId()
Definition
SetPriceKeyChangeModel.php:175
Commercetools\History\Models\Change\SetPriceKeyChangeModel\__construct
__construct(?string $change=null, ?string $catalogData=null, ?string $variant=null, ?string $priceId=null, ?string $previousValue=null, ?string $nextValue=null, ?string $type=null)
Definition
SetPriceKeyChangeModel.php:70
Commercetools\History\Models\Change\SetPriceKeyChangeModel\$change
$change
Definition
SetPriceKeyChangeModel.php:34
Commercetools\History\Models\Change\SetPriceKeyChangeModel\$priceId
$priceId
Definition
SetPriceKeyChangeModel.php:52
Commercetools\History\Models\Change\SetPriceKeyChangeModel\getNextValue
getNextValue()
Definition
SetPriceKeyChangeModel.php:215
Commercetools\History\Models\Change\SetPriceKeyChangeModel\$variant
$variant
Definition
SetPriceKeyChangeModel.php:46
Commercetools\History\Models\Change\SetPriceKeyChangeModel\getVariant
getVariant()
Definition
SetPriceKeyChangeModel.php:155
Commercetools\History\Models\Change\SetPriceKeyChangeModel\$catalogData
$catalogData
Definition
SetPriceKeyChangeModel.php:40
Commercetools\History\Models\Change\SetPriceKeyChangeModel\$type
$type
Definition
SetPriceKeyChangeModel.php:28
Commercetools\History\Models\Change\SetPriceKeyChangeModel\getChange
getChange()
Definition
SetPriceKeyChangeModel.php:110
Commercetools\History\Models\Change\SetPriceKeyChangeModel\getType
getType()
Definition
SetPriceKeyChangeModel.php:92
Commercetools\History\Models\Change\SetPriceKeyChangeModel\$previousValue
$previousValue
Definition
SetPriceKeyChangeModel.php:58
Commercetools\History\Models\Change\SetPriceKeyChangeModel\setCatalogData
setCatalogData(?string $catalogData)
Definition
SetPriceKeyChangeModel.php:241
Commercetools\History\Models\Change\SetPriceKeyChangeModel\setNextValue
setNextValue(?string $nextValue)
Definition
SetPriceKeyChangeModel.php:273
Commercetools\History\Models\Change\SetPriceKeyChangeModel\setPriceId
setPriceId(?string $priceId)
Definition
SetPriceKeyChangeModel.php:257
Commercetools\History\Models\Change\SetPriceKeyChangeModel\setVariant
setVariant(?string $variant)
Definition
SetPriceKeyChangeModel.php:249
Commercetools\History\Models\Change\SetPriceKeyChangeModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
SetPriceKeyChangeModel.php:23
Commercetools\History\Models\Change\SetPriceKeyChangeModel\$nextValue
$nextValue
Definition
SetPriceKeyChangeModel.php:64
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Change\SetPriceKeyChange
Definition
SetPriceKeyChange.php:15
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8