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
UnknownChangeModel.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
UnknownChangeModel
extends
JsonObjectModel
implements
UnknownChange
21
{
22
23
public
const
DISCRIMINATOR_VALUE
=
'UnknownChange'
;
28
protected
$type
;
29
34
protected
$change
;
35
40
protected
$previousValue
;
41
46
protected
$nextValue
;
47
48
52
public
function
__construct
(
53
?
string
$change
=
null
,
54
$previousValue
=
null
,
55
$nextValue
=
null
,
56
?
string
$type
=
null
57
) {
58
$this->change =
$change
;
59
$this->previousValue =
$previousValue
;
60
$this->nextValue =
$nextValue
;
61
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
62
}
63
68
public
function
getType
()
69
{
70
if
(is_null($this->type)) {
72
$data = $this->
raw
(self::FIELD_TYPE);
73
if
(is_null($data)) {
74
return
null
;
75
}
76
$this->type = (string) $data;
77
}
78
79
return
$this->type
;
80
}
81
88
public
function
getChange
()
89
{
90
if
(is_null($this->change)) {
92
$data = $this->
raw
(self::FIELD_CHANGE);
93
if
(is_null($data)) {
94
return
null
;
95
}
96
$this->change = (string) $data;
97
}
98
99
return
$this->change
;
100
}
101
108
public
function
getPreviousValue
()
109
{
110
if
(is_null($this->previousValue)) {
112
$data = $this->
raw
(self::FIELD_PREVIOUS_VALUE);
113
if
(is_null($data)) {
114
return
null
;
115
}
116
$this->previousValue = $data;
117
}
118
119
return
$this->previousValue
;
120
}
121
128
public
function
getNextValue
()
129
{
130
if
(is_null($this->nextValue)) {
132
$data = $this->
raw
(self::FIELD_NEXT_VALUE);
133
if
(is_null($data)) {
134
return
null
;
135
}
136
$this->nextValue = $data;
137
}
138
139
return
$this->nextValue
;
140
}
141
142
146
public
function
setChange
(?
string
$change
): void
147
{
148
$this->change =
$change
;
149
}
150
154
public
function
setPreviousValue
(
$previousValue
): void
155
{
156
$this->previousValue =
$previousValue
;
157
}
158
162
public
function
setNextValue
(
$nextValue
): void
163
{
164
$this->nextValue =
$nextValue
;
165
}
166
167
168
169
}
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\UnknownChangeModel
Definition
UnknownChangeModel.php:21
Commercetools\History\Models\Change\UnknownChangeModel\getType
getType()
Definition
UnknownChangeModel.php:68
Commercetools\History\Models\Change\UnknownChangeModel\setChange
setChange(?string $change)
Definition
UnknownChangeModel.php:146
Commercetools\History\Models\Change\UnknownChangeModel\$previousValue
$previousValue
Definition
UnknownChangeModel.php:40
Commercetools\History\Models\Change\UnknownChangeModel\getChange
getChange()
Definition
UnknownChangeModel.php:88
Commercetools\History\Models\Change\UnknownChangeModel\getNextValue
getNextValue()
Definition
UnknownChangeModel.php:128
Commercetools\History\Models\Change\UnknownChangeModel\setNextValue
setNextValue( $nextValue)
Definition
UnknownChangeModel.php:162
Commercetools\History\Models\Change\UnknownChangeModel\$change
$change
Definition
UnknownChangeModel.php:34
Commercetools\History\Models\Change\UnknownChangeModel\getPreviousValue
getPreviousValue()
Definition
UnknownChangeModel.php:108
Commercetools\History\Models\Change\UnknownChangeModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
UnknownChangeModel.php:23
Commercetools\History\Models\Change\UnknownChangeModel\__construct
__construct(?string $change=null, $previousValue=null, $nextValue=null, ?string $type=null)
Definition
UnknownChangeModel.php:52
Commercetools\History\Models\Change\UnknownChangeModel\$type
$type
Definition
UnknownChangeModel.php:28
Commercetools\History\Models\Change\UnknownChangeModel\$nextValue
$nextValue
Definition
UnknownChangeModel.php:46
Commercetools\History\Models\Change\UnknownChangeModel\setPreviousValue
setPreviousValue( $previousValue)
Definition
UnknownChangeModel.php:154
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Change\UnknownChange
Definition
UnknownChange.php:15
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8