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
SetShippingCustomFieldChangeModel.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
SetShippingCustomFieldChangeModel
extends
JsonObjectModel
implements
SetShippingCustomFieldChange
21
{
22
23
public
const
DISCRIMINATOR_VALUE
=
'SetShippingCustomFieldChange'
;
28
protected
$type
;
29
34
protected
$change
;
35
40
protected
$shippingKey
;
41
46
protected
$name
;
47
52
protected
$customTypeId
;
53
58
protected
$previousValue
;
59
64
protected
$nextValue
;
65
66
70
public
function
__construct
(
71
?
string
$change
=
null
,
72
?
string
$shippingKey
=
null
,
73
?
string
$name
=
null
,
74
?
string
$customTypeId
=
null
,
75
$previousValue
=
null
,
76
$nextValue
=
null
,
77
?
string
$type
=
null
78
) {
79
$this->change =
$change
;
80
$this->shippingKey =
$shippingKey
;
81
$this->name =
$name
;
82
$this->customTypeId =
$customTypeId
;
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
130
public
function
getShippingKey
()
131
{
132
if
(is_null($this->shippingKey)) {
134
$data = $this->
raw
(self::FIELD_SHIPPING_KEY);
135
if
(is_null($data)) {
136
return
null
;
137
}
138
$this->shippingKey = (string) $data;
139
}
140
141
return
$this->shippingKey
;
142
}
143
150
public
function
getName
()
151
{
152
if
(is_null($this->name)) {
154
$data = $this->
raw
(self::FIELD_NAME);
155
if
(is_null($data)) {
156
return
null
;
157
}
158
$this->name = (string) $data;
159
}
160
161
return
$this->name
;
162
}
163
170
public
function
getCustomTypeId
()
171
{
172
if
(is_null($this->customTypeId)) {
174
$data = $this->
raw
(self::FIELD_CUSTOM_TYPE_ID);
175
if
(is_null($data)) {
176
return
null
;
177
}
178
$this->customTypeId = (string) $data;
179
}
180
181
return
$this->customTypeId
;
182
}
183
190
public
function
getPreviousValue
()
191
{
192
if
(is_null($this->previousValue)) {
194
$data = $this->
raw
(self::FIELD_PREVIOUS_VALUE);
195
if
(is_null($data)) {
196
return
null
;
197
}
198
$this->previousValue = $data;
199
}
200
201
return
$this->previousValue
;
202
}
203
210
public
function
getNextValue
()
211
{
212
if
(is_null($this->nextValue)) {
214
$data = $this->
raw
(self::FIELD_NEXT_VALUE);
215
if
(is_null($data)) {
216
return
null
;
217
}
218
$this->nextValue = $data;
219
}
220
221
return
$this->nextValue
;
222
}
223
224
228
public
function
setChange
(?
string
$change
): void
229
{
230
$this->change =
$change
;
231
}
232
236
public
function
setShippingKey
(?
string
$shippingKey
): void
237
{
238
$this->shippingKey =
$shippingKey
;
239
}
240
244
public
function
setName
(?
string
$name
): void
245
{
246
$this->name =
$name
;
247
}
248
252
public
function
setCustomTypeId
(?
string
$customTypeId
): void
253
{
254
$this->customTypeId =
$customTypeId
;
255
}
256
260
public
function
setPreviousValue
(
$previousValue
): void
261
{
262
$this->previousValue =
$previousValue
;
263
}
264
268
public
function
setNextValue
(
$nextValue
): void
269
{
270
$this->nextValue =
$nextValue
;
271
}
272
273
274
275
}
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\SetShippingCustomFieldChangeModel
Definition
SetShippingCustomFieldChangeModel.php:21
Commercetools\History\Models\Change\SetShippingCustomFieldChangeModel\$shippingKey
$shippingKey
Definition
SetShippingCustomFieldChangeModel.php:40
Commercetools\History\Models\Change\SetShippingCustomFieldChangeModel\getNextValue
getNextValue()
Definition
SetShippingCustomFieldChangeModel.php:210
Commercetools\History\Models\Change\SetShippingCustomFieldChangeModel\getPreviousValue
getPreviousValue()
Definition
SetShippingCustomFieldChangeModel.php:190
Commercetools\History\Models\Change\SetShippingCustomFieldChangeModel\$change
$change
Definition
SetShippingCustomFieldChangeModel.php:34
Commercetools\History\Models\Change\SetShippingCustomFieldChangeModel\getChange
getChange()
Definition
SetShippingCustomFieldChangeModel.php:110
Commercetools\History\Models\Change\SetShippingCustomFieldChangeModel\getName
getName()
Definition
SetShippingCustomFieldChangeModel.php:150
Commercetools\History\Models\Change\SetShippingCustomFieldChangeModel\$type
$type
Definition
SetShippingCustomFieldChangeModel.php:28
Commercetools\History\Models\Change\SetShippingCustomFieldChangeModel\getShippingKey
getShippingKey()
Definition
SetShippingCustomFieldChangeModel.php:130
Commercetools\History\Models\Change\SetShippingCustomFieldChangeModel\$name
$name
Definition
SetShippingCustomFieldChangeModel.php:46
Commercetools\History\Models\Change\SetShippingCustomFieldChangeModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
SetShippingCustomFieldChangeModel.php:23
Commercetools\History\Models\Change\SetShippingCustomFieldChangeModel\$previousValue
$previousValue
Definition
SetShippingCustomFieldChangeModel.php:58
Commercetools\History\Models\Change\SetShippingCustomFieldChangeModel\setName
setName(?string $name)
Definition
SetShippingCustomFieldChangeModel.php:244
Commercetools\History\Models\Change\SetShippingCustomFieldChangeModel\$customTypeId
$customTypeId
Definition
SetShippingCustomFieldChangeModel.php:52
Commercetools\History\Models\Change\SetShippingCustomFieldChangeModel\getCustomTypeId
getCustomTypeId()
Definition
SetShippingCustomFieldChangeModel.php:170
Commercetools\History\Models\Change\SetShippingCustomFieldChangeModel\setShippingKey
setShippingKey(?string $shippingKey)
Definition
SetShippingCustomFieldChangeModel.php:236
Commercetools\History\Models\Change\SetShippingCustomFieldChangeModel\setPreviousValue
setPreviousValue( $previousValue)
Definition
SetShippingCustomFieldChangeModel.php:260
Commercetools\History\Models\Change\SetShippingCustomFieldChangeModel\__construct
__construct(?string $change=null, ?string $shippingKey=null, ?string $name=null, ?string $customTypeId=null, $previousValue=null, $nextValue=null, ?string $type=null)
Definition
SetShippingCustomFieldChangeModel.php:70
Commercetools\History\Models\Change\SetShippingCustomFieldChangeModel\setNextValue
setNextValue( $nextValue)
Definition
SetShippingCustomFieldChangeModel.php:268
Commercetools\History\Models\Change\SetShippingCustomFieldChangeModel\setChange
setChange(?string $change)
Definition
SetShippingCustomFieldChangeModel.php:228
Commercetools\History\Models\Change\SetShippingCustomFieldChangeModel\$nextValue
$nextValue
Definition
SetShippingCustomFieldChangeModel.php:64
Commercetools\History\Models\Change\SetShippingCustomFieldChangeModel\getType
getType()
Definition
SetShippingCustomFieldChangeModel.php:92
Commercetools\History\Models\Change\SetShippingCustomFieldChangeModel\setCustomTypeId
setCustomTypeId(?string $customTypeId)
Definition
SetShippingCustomFieldChangeModel.php:252
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Change\SetShippingCustomFieldChange
Definition
SetShippingCustomFieldChange.php:15
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8