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
SetAddressCustomFieldChangeModel.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\Address
;
17
use
Commercetools\History\Models\Common\AddressModel
;
18
22
final
class
SetAddressCustomFieldChangeModel
extends
JsonObjectModel
implements
SetAddressCustomFieldChange
23
{
24
25
public
const
DISCRIMINATOR_VALUE
=
'SetAddressCustomFieldChange'
;
30
protected
$type
;
31
36
protected
$change
;
37
42
protected
$address
;
43
48
protected
$name
;
49
54
protected
$customTypeId
;
55
60
protected
$previousValue
;
61
66
protected
$nextValue
;
67
68
72
public
function
__construct
(
73
?
string
$change
=
null
,
74
?
Address
$address
=
null
,
75
?
string
$name
=
null
,
76
?
string
$customTypeId
=
null
,
77
$previousValue
=
null
,
78
$nextValue
=
null
,
79
?
string
$type
=
null
80
) {
81
$this->change =
$change
;
82
$this->address =
$address
;
83
$this->name =
$name
;
84
$this->customTypeId =
$customTypeId
;
85
$this->previousValue =
$previousValue
;
86
$this->nextValue =
$nextValue
;
87
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
88
}
89
94
public
function
getType
()
95
{
96
if
(is_null($this->type)) {
98
$data = $this->
raw
(self::FIELD_TYPE);
99
if
(is_null($data)) {
100
return
null
;
101
}
102
$this->type = (string) $data;
103
}
104
105
return
$this->type
;
106
}
107
112
public
function
getChange
()
113
{
114
if
(is_null($this->change)) {
116
$data = $this->
raw
(self::FIELD_CHANGE);
117
if
(is_null($data)) {
118
return
null
;
119
}
120
$this->change = (string) $data;
121
}
122
123
return
$this->change
;
124
}
125
132
public
function
getAddress
()
133
{
134
if
(is_null($this->address)) {
136
$data = $this->
raw
(self::FIELD_ADDRESS);
137
if
(is_null($data)) {
138
return
null
;
139
}
140
141
$this->address = AddressModel::of($data);
142
}
143
144
return
$this->address
;
145
}
146
153
public
function
getName
()
154
{
155
if
(is_null($this->name)) {
157
$data = $this->
raw
(self::FIELD_NAME);
158
if
(is_null($data)) {
159
return
null
;
160
}
161
$this->name = (string) $data;
162
}
163
164
return
$this->name
;
165
}
166
173
public
function
getCustomTypeId
()
174
{
175
if
(is_null($this->customTypeId)) {
177
$data = $this->
raw
(self::FIELD_CUSTOM_TYPE_ID);
178
if
(is_null($data)) {
179
return
null
;
180
}
181
$this->customTypeId = (string) $data;
182
}
183
184
return
$this->customTypeId
;
185
}
186
193
public
function
getPreviousValue
()
194
{
195
if
(is_null($this->previousValue)) {
197
$data = $this->
raw
(self::FIELD_PREVIOUS_VALUE);
198
if
(is_null($data)) {
199
return
null
;
200
}
201
$this->previousValue = $data;
202
}
203
204
return
$this->previousValue
;
205
}
206
213
public
function
getNextValue
()
214
{
215
if
(is_null($this->nextValue)) {
217
$data = $this->
raw
(self::FIELD_NEXT_VALUE);
218
if
(is_null($data)) {
219
return
null
;
220
}
221
$this->nextValue = $data;
222
}
223
224
return
$this->nextValue
;
225
}
226
227
231
public
function
setChange
(?
string
$change
): void
232
{
233
$this->change =
$change
;
234
}
235
239
public
function
setAddress
(?
Address
$address
): void
240
{
241
$this->address =
$address
;
242
}
243
247
public
function
setName
(?
string
$name
): void
248
{
249
$this->name =
$name
;
250
}
251
255
public
function
setCustomTypeId
(?
string
$customTypeId
): void
256
{
257
$this->customTypeId =
$customTypeId
;
258
}
259
263
public
function
setPreviousValue
(
$previousValue
): void
264
{
265
$this->previousValue =
$previousValue
;
266
}
267
271
public
function
setNextValue
(
$nextValue
): void
272
{
273
$this->nextValue =
$nextValue
;
274
}
275
276
277
278
}
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\SetAddressCustomFieldChangeModel
Definition
SetAddressCustomFieldChangeModel.php:23
Commercetools\History\Models\Change\SetAddressCustomFieldChangeModel\$type
$type
Definition
SetAddressCustomFieldChangeModel.php:30
Commercetools\History\Models\Change\SetAddressCustomFieldChangeModel\getPreviousValue
getPreviousValue()
Definition
SetAddressCustomFieldChangeModel.php:193
Commercetools\History\Models\Change\SetAddressCustomFieldChangeModel\$address
$address
Definition
SetAddressCustomFieldChangeModel.php:42
Commercetools\History\Models\Change\SetAddressCustomFieldChangeModel\setCustomTypeId
setCustomTypeId(?string $customTypeId)
Definition
SetAddressCustomFieldChangeModel.php:255
Commercetools\History\Models\Change\SetAddressCustomFieldChangeModel\$name
$name
Definition
SetAddressCustomFieldChangeModel.php:48
Commercetools\History\Models\Change\SetAddressCustomFieldChangeModel\getAddress
getAddress()
Definition
SetAddressCustomFieldChangeModel.php:132
Commercetools\History\Models\Change\SetAddressCustomFieldChangeModel\setName
setName(?string $name)
Definition
SetAddressCustomFieldChangeModel.php:247
Commercetools\History\Models\Change\SetAddressCustomFieldChangeModel\$nextValue
$nextValue
Definition
SetAddressCustomFieldChangeModel.php:66
Commercetools\History\Models\Change\SetAddressCustomFieldChangeModel\getChange
getChange()
Definition
SetAddressCustomFieldChangeModel.php:112
Commercetools\History\Models\Change\SetAddressCustomFieldChangeModel\setAddress
setAddress(?Address $address)
Definition
SetAddressCustomFieldChangeModel.php:239
Commercetools\History\Models\Change\SetAddressCustomFieldChangeModel\$previousValue
$previousValue
Definition
SetAddressCustomFieldChangeModel.php:60
Commercetools\History\Models\Change\SetAddressCustomFieldChangeModel\$change
$change
Definition
SetAddressCustomFieldChangeModel.php:36
Commercetools\History\Models\Change\SetAddressCustomFieldChangeModel\setPreviousValue
setPreviousValue( $previousValue)
Definition
SetAddressCustomFieldChangeModel.php:263
Commercetools\History\Models\Change\SetAddressCustomFieldChangeModel\setNextValue
setNextValue( $nextValue)
Definition
SetAddressCustomFieldChangeModel.php:271
Commercetools\History\Models\Change\SetAddressCustomFieldChangeModel\getNextValue
getNextValue()
Definition
SetAddressCustomFieldChangeModel.php:213
Commercetools\History\Models\Change\SetAddressCustomFieldChangeModel\__construct
__construct(?string $change=null, ?Address $address=null, ?string $name=null, ?string $customTypeId=null, $previousValue=null, $nextValue=null, ?string $type=null)
Definition
SetAddressCustomFieldChangeModel.php:72
Commercetools\History\Models\Change\SetAddressCustomFieldChangeModel\$customTypeId
$customTypeId
Definition
SetAddressCustomFieldChangeModel.php:54
Commercetools\History\Models\Change\SetAddressCustomFieldChangeModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
SetAddressCustomFieldChangeModel.php:25
Commercetools\History\Models\Change\SetAddressCustomFieldChangeModel\getCustomTypeId
getCustomTypeId()
Definition
SetAddressCustomFieldChangeModel.php:173
Commercetools\History\Models\Change\SetAddressCustomFieldChangeModel\getName
getName()
Definition
SetAddressCustomFieldChangeModel.php:153
Commercetools\History\Models\Change\SetAddressCustomFieldChangeModel\getType
getType()
Definition
SetAddressCustomFieldChangeModel.php:94
Commercetools\History\Models\Change\SetAddressCustomFieldChangeModel\setChange
setChange(?string $change)
Definition
SetAddressCustomFieldChangeModel.php:231
Commercetools\History\Models\Common\AddressModel
Definition
AddressModel.php:21
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Change\SetAddressCustomFieldChange
Definition
SetAddressCustomFieldChange.php:16
Commercetools\History\Models\Common\Address
Definition
Address.php:15
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8