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
ChangeAttributeConstraintChangeModel.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
ChangeAttributeConstraintChangeModel
extends
JsonObjectModel
implements
ChangeAttributeConstraintChange
21
{
22
23
public
const
DISCRIMINATOR_VALUE
=
'ChangeAttributeConstraintChange'
;
28
protected
$type
;
29
34
protected
$change
;
35
40
protected
$previousValue
;
41
46
protected
$nextValue
;
47
52
protected
$attributeName
;
53
54
58
public
function
__construct
(
59
?
string
$change
=
null
,
60
?
string
$previousValue
=
null
,
61
?
string
$nextValue
=
null
,
62
?
string
$attributeName
=
null
,
63
?
string
$type
=
null
64
) {
65
$this->change =
$change
;
66
$this->previousValue =
$previousValue
;
67
$this->nextValue =
$nextValue
;
68
$this->attributeName =
$attributeName
;
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
154
public
function
getAttributeName
()
155
{
156
if
(is_null($this->attributeName)) {
158
$data = $this->
raw
(self::FIELD_ATTRIBUTE_NAME);
159
if
(is_null($data)) {
160
return
null
;
161
}
162
$this->attributeName = (string) $data;
163
}
164
165
return
$this->attributeName
;
166
}
167
168
172
public
function
setChange
(?
string
$change
): void
173
{
174
$this->change =
$change
;
175
}
176
180
public
function
setPreviousValue
(?
string
$previousValue
): void
181
{
182
$this->previousValue =
$previousValue
;
183
}
184
188
public
function
setNextValue
(?
string
$nextValue
): void
189
{
190
$this->nextValue =
$nextValue
;
191
}
192
196
public
function
setAttributeName
(?
string
$attributeName
): void
197
{
198
$this->attributeName =
$attributeName
;
199
}
200
201
202
203
}
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\ChangeAttributeConstraintChangeModel
Definition
ChangeAttributeConstraintChangeModel.php:21
Commercetools\History\Models\Change\ChangeAttributeConstraintChangeModel\__construct
__construct(?string $change=null, ?string $previousValue=null, ?string $nextValue=null, ?string $attributeName=null, ?string $type=null)
Definition
ChangeAttributeConstraintChangeModel.php:58
Commercetools\History\Models\Change\ChangeAttributeConstraintChangeModel\getAttributeName
getAttributeName()
Definition
ChangeAttributeConstraintChangeModel.php:154
Commercetools\History\Models\Change\ChangeAttributeConstraintChangeModel\getNextValue
getNextValue()
Definition
ChangeAttributeConstraintChangeModel.php:134
Commercetools\History\Models\Change\ChangeAttributeConstraintChangeModel\$type
$type
Definition
ChangeAttributeConstraintChangeModel.php:28
Commercetools\History\Models\Change\ChangeAttributeConstraintChangeModel\setChange
setChange(?string $change)
Definition
ChangeAttributeConstraintChangeModel.php:172
Commercetools\History\Models\Change\ChangeAttributeConstraintChangeModel\setNextValue
setNextValue(?string $nextValue)
Definition
ChangeAttributeConstraintChangeModel.php:188
Commercetools\History\Models\Change\ChangeAttributeConstraintChangeModel\getPreviousValue
getPreviousValue()
Definition
ChangeAttributeConstraintChangeModel.php:114
Commercetools\History\Models\Change\ChangeAttributeConstraintChangeModel\getChange
getChange()
Definition
ChangeAttributeConstraintChangeModel.php:94
Commercetools\History\Models\Change\ChangeAttributeConstraintChangeModel\getType
getType()
Definition
ChangeAttributeConstraintChangeModel.php:76
Commercetools\History\Models\Change\ChangeAttributeConstraintChangeModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
ChangeAttributeConstraintChangeModel.php:23
Commercetools\History\Models\Change\ChangeAttributeConstraintChangeModel\setAttributeName
setAttributeName(?string $attributeName)
Definition
ChangeAttributeConstraintChangeModel.php:196
Commercetools\History\Models\Change\ChangeAttributeConstraintChangeModel\$change
$change
Definition
ChangeAttributeConstraintChangeModel.php:34
Commercetools\History\Models\Change\ChangeAttributeConstraintChangeModel\setPreviousValue
setPreviousValue(?string $previousValue)
Definition
ChangeAttributeConstraintChangeModel.php:180
Commercetools\History\Models\Change\ChangeAttributeConstraintChangeModel\$attributeName
$attributeName
Definition
ChangeAttributeConstraintChangeModel.php:52
Commercetools\History\Models\Change\ChangeAttributeConstraintChangeModel\$previousValue
$previousValue
Definition
ChangeAttributeConstraintChangeModel.php:40
Commercetools\History\Models\Change\ChangeAttributeConstraintChangeModel\$nextValue
$nextValue
Definition
ChangeAttributeConstraintChangeModel.php:46
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Change\ChangeAttributeConstraintChange
Definition
ChangeAttributeConstraintChange.php:15
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8