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
SetOrderNumberChangeModel.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
SetOrderNumberChangeModel
extends
JsonObjectModel
implements
SetOrderNumberChange
21
{
22
23
public
const
DISCRIMINATOR_VALUE
=
'SetOrderNumberChange'
;
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
?
string
$previousValue
=
null
,
55
?
string
$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
86
public
function
getChange
()
87
{
88
if
(is_null($this->change)) {
90
$data = $this->
raw
(self::FIELD_CHANGE);
91
if
(is_null($data)) {
92
return
null
;
93
}
94
$this->change = (string) $data;
95
}
96
97
return
$this->change
;
98
}
99
106
public
function
getPreviousValue
()
107
{
108
if
(is_null($this->previousValue)) {
110
$data = $this->
raw
(self::FIELD_PREVIOUS_VALUE);
111
if
(is_null($data)) {
112
return
null
;
113
}
114
$this->previousValue = (string) $data;
115
}
116
117
return
$this->previousValue
;
118
}
119
126
public
function
getNextValue
()
127
{
128
if
(is_null($this->nextValue)) {
130
$data = $this->
raw
(self::FIELD_NEXT_VALUE);
131
if
(is_null($data)) {
132
return
null
;
133
}
134
$this->nextValue = (string) $data;
135
}
136
137
return
$this->nextValue
;
138
}
139
140
144
public
function
setChange
(?
string
$change
): void
145
{
146
$this->change =
$change
;
147
}
148
152
public
function
setPreviousValue
(?
string
$previousValue
): void
153
{
154
$this->previousValue =
$previousValue
;
155
}
156
160
public
function
setNextValue
(?
string
$nextValue
): void
161
{
162
$this->nextValue =
$nextValue
;
163
}
164
165
166
167
}
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\SetOrderNumberChangeModel
Definition
SetOrderNumberChangeModel.php:21
Commercetools\History\Models\Change\SetOrderNumberChangeModel\$change
$change
Definition
SetOrderNumberChangeModel.php:34
Commercetools\History\Models\Change\SetOrderNumberChangeModel\getNextValue
getNextValue()
Definition
SetOrderNumberChangeModel.php:126
Commercetools\History\Models\Change\SetOrderNumberChangeModel\getChange
getChange()
Definition
SetOrderNumberChangeModel.php:86
Commercetools\History\Models\Change\SetOrderNumberChangeModel\$nextValue
$nextValue
Definition
SetOrderNumberChangeModel.php:46
Commercetools\History\Models\Change\SetOrderNumberChangeModel\$type
$type
Definition
SetOrderNumberChangeModel.php:28
Commercetools\History\Models\Change\SetOrderNumberChangeModel\setChange
setChange(?string $change)
Definition
SetOrderNumberChangeModel.php:144
Commercetools\History\Models\Change\SetOrderNumberChangeModel\__construct
__construct(?string $change=null, ?string $previousValue=null, ?string $nextValue=null, ?string $type=null)
Definition
SetOrderNumberChangeModel.php:52
Commercetools\History\Models\Change\SetOrderNumberChangeModel\getPreviousValue
getPreviousValue()
Definition
SetOrderNumberChangeModel.php:106
Commercetools\History\Models\Change\SetOrderNumberChangeModel\setPreviousValue
setPreviousValue(?string $previousValue)
Definition
SetOrderNumberChangeModel.php:152
Commercetools\History\Models\Change\SetOrderNumberChangeModel\getType
getType()
Definition
SetOrderNumberChangeModel.php:68
Commercetools\History\Models\Change\SetOrderNumberChangeModel\$previousValue
$previousValue
Definition
SetOrderNumberChangeModel.php:40
Commercetools\History\Models\Change\SetOrderNumberChangeModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
SetOrderNumberChangeModel.php:23
Commercetools\History\Models\Change\SetOrderNumberChangeModel\setNextValue
setNextValue(?string $nextValue)
Definition
SetOrderNumberChangeModel.php:160
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Change\SetOrderNumberChange
Definition
SetOrderNumberChange.php:15
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8