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
ChangeAssetOrderChangeModel.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\Common\LocalizedStringCollection
;
17
21
final
class
ChangeAssetOrderChangeModel
extends
JsonObjectModel
implements
ChangeAssetOrderChange
22
{
23
24
public
const
DISCRIMINATOR_VALUE
=
'ChangeAssetOrderChange'
;
29
protected
$type
;
30
35
protected
$change
;
36
41
protected
$previousValue
;
42
47
protected
$nextValue
;
48
49
53
public
function
__construct
(
54
?
string
$change
=
null
,
55
?
LocalizedStringCollection
$previousValue
=
null
,
56
?
LocalizedStringCollection
$nextValue
=
null
,
57
?
string
$type
=
null
58
) {
59
$this->change =
$change
;
60
$this->previousValue =
$previousValue
;
61
$this->nextValue =
$nextValue
;
62
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
63
}
64
69
public
function
getType
()
70
{
71
if
(is_null($this->type)) {
73
$data = $this->
raw
(self::FIELD_TYPE);
74
if
(is_null($data)) {
75
return
null
;
76
}
77
$this->type = (string) $data;
78
}
79
80
return
$this->type
;
81
}
82
87
public
function
getChange
()
88
{
89
if
(is_null($this->change)) {
91
$data = $this->
raw
(self::FIELD_CHANGE);
92
if
(is_null($data)) {
93
return
null
;
94
}
95
$this->change = (string) $data;
96
}
97
98
return
$this->change
;
99
}
100
107
public
function
getPreviousValue
()
108
{
109
if
(is_null($this->previousValue)) {
111
$data = $this->
raw
(self::FIELD_PREVIOUS_VALUE);
112
if
(is_null($data)) {
113
return
null
;
114
}
115
$this->previousValue = LocalizedStringCollection::fromArray($data);
116
}
117
118
return
$this->previousValue
;
119
}
120
127
public
function
getNextValue
()
128
{
129
if
(is_null($this->nextValue)) {
131
$data = $this->
raw
(self::FIELD_NEXT_VALUE);
132
if
(is_null($data)) {
133
return
null
;
134
}
135
$this->nextValue = LocalizedStringCollection::fromArray($data);
136
}
137
138
return
$this->nextValue
;
139
}
140
141
145
public
function
setChange
(?
string
$change
): void
146
{
147
$this->change =
$change
;
148
}
149
153
public
function
setPreviousValue
(?
LocalizedStringCollection
$previousValue
): void
154
{
155
$this->previousValue =
$previousValue
;
156
}
157
161
public
function
setNextValue
(?
LocalizedStringCollection
$nextValue
): void
162
{
163
$this->nextValue =
$nextValue
;
164
}
165
166
167
168
}
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\ChangeAssetOrderChangeModel
Definition
ChangeAssetOrderChangeModel.php:22
Commercetools\History\Models\Change\ChangeAssetOrderChangeModel\getNextValue
getNextValue()
Definition
ChangeAssetOrderChangeModel.php:127
Commercetools\History\Models\Change\ChangeAssetOrderChangeModel\getChange
getChange()
Definition
ChangeAssetOrderChangeModel.php:87
Commercetools\History\Models\Change\ChangeAssetOrderChangeModel\__construct
__construct(?string $change=null, ?LocalizedStringCollection $previousValue=null, ?LocalizedStringCollection $nextValue=null, ?string $type=null)
Definition
ChangeAssetOrderChangeModel.php:53
Commercetools\History\Models\Change\ChangeAssetOrderChangeModel\setPreviousValue
setPreviousValue(?LocalizedStringCollection $previousValue)
Definition
ChangeAssetOrderChangeModel.php:153
Commercetools\History\Models\Change\ChangeAssetOrderChangeModel\$previousValue
$previousValue
Definition
ChangeAssetOrderChangeModel.php:41
Commercetools\History\Models\Change\ChangeAssetOrderChangeModel\$nextValue
$nextValue
Definition
ChangeAssetOrderChangeModel.php:47
Commercetools\History\Models\Change\ChangeAssetOrderChangeModel\$change
$change
Definition
ChangeAssetOrderChangeModel.php:35
Commercetools\History\Models\Change\ChangeAssetOrderChangeModel\setChange
setChange(?string $change)
Definition
ChangeAssetOrderChangeModel.php:145
Commercetools\History\Models\Change\ChangeAssetOrderChangeModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
ChangeAssetOrderChangeModel.php:24
Commercetools\History\Models\Change\ChangeAssetOrderChangeModel\getPreviousValue
getPreviousValue()
Definition
ChangeAssetOrderChangeModel.php:107
Commercetools\History\Models\Change\ChangeAssetOrderChangeModel\$type
$type
Definition
ChangeAssetOrderChangeModel.php:29
Commercetools\History\Models\Change\ChangeAssetOrderChangeModel\setNextValue
setNextValue(?LocalizedStringCollection $nextValue)
Definition
ChangeAssetOrderChangeModel.php:161
Commercetools\History\Models\Change\ChangeAssetOrderChangeModel\getType
getType()
Definition
ChangeAssetOrderChangeModel.php:69
Commercetools\History\Models\Common\LocalizedStringCollection
Definition
LocalizedStringCollection.php:22
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Change\ChangeAssetOrderChange
Definition
ChangeAssetOrderChange.php:16
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8