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
SetShippingRateInputChangeModel.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\ChangeValue\SetCartClassificationShippingRateInputValue
;
17
use
Commercetools\History\Models\ChangeValue\SetCartClassificationShippingRateInputValueModel
;
18
use
Commercetools\History\Models\ChangeValue\SetCartScoreShippingRateInputValue
;
19
use
Commercetools\History\Models\ChangeValue\SetCartScoreShippingRateInputValueModel
;
20
24
final
class
SetShippingRateInputChangeModel
extends
JsonObjectModel
implements
SetShippingRateInputChange
25
{
26
27
public
const
DISCRIMINATOR_VALUE
=
'SetShippingRateInputChange'
;
32
protected
$type
;
33
38
protected
$change
;
39
44
protected
$previousValue
;
45
50
protected
$nextValue
;
51
52
56
public
function
__construct
(
57
?
string
$change
=
null
,
58
?
JsonObject
$previousValue
=
null
,
59
?
JsonObject
$nextValue
=
null
,
60
?
string
$type
=
null
61
) {
62
$this->change =
$change
;
63
$this->previousValue =
$previousValue
;
64
$this->nextValue =
$nextValue
;
65
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
66
}
67
72
public
function
getType
()
73
{
74
if
(is_null($this->type)) {
76
$data = $this->
raw
(self::FIELD_TYPE);
77
if
(is_null($data)) {
78
return
null
;
79
}
80
$this->type = (string) $data;
81
}
82
83
return
$this->type
;
84
}
85
90
public
function
getChange
()
91
{
92
if
(is_null($this->change)) {
94
$data = $this->
raw
(self::FIELD_CHANGE);
95
if
(is_null($data)) {
96
return
null
;
97
}
98
$this->change = (string) $data;
99
}
100
101
return
$this->change
;
102
}
103
110
public
function
getPreviousValue
()
111
{
112
if
(is_null($this->previousValue)) {
114
$data = $this->
raw
(self::FIELD_PREVIOUS_VALUE);
115
if
(is_null($data)) {
116
return
null
;
117
}
118
$this->previousValue = $data;
119
}
120
121
return
$this->previousValue
;
122
}
123
130
public
function
getNextValue
()
131
{
132
if
(is_null($this->nextValue)) {
134
$data = $this->
raw
(self::FIELD_NEXT_VALUE);
135
if
(is_null($data)) {
136
return
null
;
137
}
138
$this->nextValue = $data;
139
}
140
141
return
$this->nextValue
;
142
}
143
149
public
function
getPreviousValueAsSetCartClassificationShippingRateInputValue
()
150
{
152
$data = $this->
raw
(self::FIELD_PREVIOUS_VALUE);
153
if
(is_null($data)) {
154
return
null
;
155
}
156
157
return
SetCartClassificationShippingRateInputValueModel::of
($data);
158
}
159
165
public
function
getPreviousValueAsSetCartScoreShippingRateInputValue
()
166
{
168
$data = $this->
raw
(self::FIELD_PREVIOUS_VALUE);
169
if
(is_null($data)) {
170
return
null
;
171
}
172
173
return
SetCartScoreShippingRateInputValueModel::of
($data);
174
}
175
181
public
function
getNextValueAsSetCartClassificationShippingRateInputValue
()
182
{
184
$data = $this->
raw
(self::FIELD_NEXT_VALUE);
185
if
(is_null($data)) {
186
return
null
;
187
}
188
189
return
SetCartClassificationShippingRateInputValueModel::of
($data);
190
}
191
197
public
function
getNextValueAsSetCartScoreShippingRateInputValue
()
198
{
200
$data = $this->
raw
(self::FIELD_NEXT_VALUE);
201
if
(is_null($data)) {
202
return
null
;
203
}
204
205
return
SetCartScoreShippingRateInputValueModel::of
($data);
206
}
207
211
public
function
setChange
(?
string
$change
): void
212
{
213
$this->change =
$change
;
214
}
215
219
public
function
setPreviousValue
(?
JsonObject
$previousValue
): void
220
{
221
$this->previousValue =
$previousValue
;
222
}
223
227
public
function
setNextValue
(?
JsonObject
$nextValue
): void
228
{
229
$this->nextValue =
$nextValue
;
230
}
231
232
233
234
}
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition
BaseJsonObject.php:57
Commercetools\Base\BaseJsonObject\of
static of($data=null)
Definition
BaseJsonObject.php:26
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\SetShippingRateInputChangeModel
Definition
SetShippingRateInputChangeModel.php:25
Commercetools\History\Models\Change\SetShippingRateInputChangeModel\$change
$change
Definition
SetShippingRateInputChangeModel.php:38
Commercetools\History\Models\Change\SetShippingRateInputChangeModel\getNextValueAsSetCartScoreShippingRateInputValue
getNextValueAsSetCartScoreShippingRateInputValue()
Definition
SetShippingRateInputChangeModel.php:197
Commercetools\History\Models\Change\SetShippingRateInputChangeModel\getPreviousValueAsSetCartScoreShippingRateInputValue
getPreviousValueAsSetCartScoreShippingRateInputValue()
Definition
SetShippingRateInputChangeModel.php:165
Commercetools\History\Models\Change\SetShippingRateInputChangeModel\getPreviousValueAsSetCartClassificationShippingRateInputValue
getPreviousValueAsSetCartClassificationShippingRateInputValue()
Definition
SetShippingRateInputChangeModel.php:149
Commercetools\History\Models\Change\SetShippingRateInputChangeModel\getNextValueAsSetCartClassificationShippingRateInputValue
getNextValueAsSetCartClassificationShippingRateInputValue()
Definition
SetShippingRateInputChangeModel.php:181
Commercetools\History\Models\Change\SetShippingRateInputChangeModel\$nextValue
$nextValue
Definition
SetShippingRateInputChangeModel.php:50
Commercetools\History\Models\Change\SetShippingRateInputChangeModel\setPreviousValue
setPreviousValue(?JsonObject $previousValue)
Definition
SetShippingRateInputChangeModel.php:219
Commercetools\History\Models\Change\SetShippingRateInputChangeModel\setNextValue
setNextValue(?JsonObject $nextValue)
Definition
SetShippingRateInputChangeModel.php:227
Commercetools\History\Models\Change\SetShippingRateInputChangeModel\getChange
getChange()
Definition
SetShippingRateInputChangeModel.php:90
Commercetools\History\Models\Change\SetShippingRateInputChangeModel\setChange
setChange(?string $change)
Definition
SetShippingRateInputChangeModel.php:211
Commercetools\History\Models\Change\SetShippingRateInputChangeModel\getType
getType()
Definition
SetShippingRateInputChangeModel.php:72
Commercetools\History\Models\Change\SetShippingRateInputChangeModel\__construct
__construct(?string $change=null, ?JsonObject $previousValue=null, ?JsonObject $nextValue=null, ?string $type=null)
Definition
SetShippingRateInputChangeModel.php:56
Commercetools\History\Models\Change\SetShippingRateInputChangeModel\getPreviousValue
getPreviousValue()
Definition
SetShippingRateInputChangeModel.php:110
Commercetools\History\Models\Change\SetShippingRateInputChangeModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
SetShippingRateInputChangeModel.php:27
Commercetools\History\Models\Change\SetShippingRateInputChangeModel\getNextValue
getNextValue()
Definition
SetShippingRateInputChangeModel.php:130
Commercetools\History\Models\Change\SetShippingRateInputChangeModel\$previousValue
$previousValue
Definition
SetShippingRateInputChangeModel.php:44
Commercetools\History\Models\Change\SetShippingRateInputChangeModel\$type
$type
Definition
SetShippingRateInputChangeModel.php:32
Commercetools\History\Models\ChangeValue\SetCartClassificationShippingRateInputValueModel
Definition
SetCartClassificationShippingRateInputValueModel.php:23
Commercetools\History\Models\ChangeValue\SetCartScoreShippingRateInputValueModel
Definition
SetCartScoreShippingRateInputValueModel.php:21
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Change\SetShippingRateInputChange
Definition
SetShippingRateInputChange.php:17
Commercetools\History\Models\ChangeValue\SetCartClassificationShippingRateInputValue
Definition
SetCartClassificationShippingRateInputValue.php:16
Commercetools\History\Models\ChangeValue\SetCartScoreShippingRateInputValue
Definition
SetCartScoreShippingRateInputValue.php:15
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8