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
StandalonePriceChangeValueChangeBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\History\Models\Change
;
10
11
use
Commercetools\Base\Builder
;
12
use
Commercetools\Base\DateTimeImmutableCollection
;
13
use
Commercetools\Base\JsonObject
;
14
use
Commercetools\Base\JsonObjectModel
;
15
use
Commercetools\Base\MapperFactory
;
16
use stdClass;
17
use
Commercetools\History\Models\Common\Money
;
18
use
Commercetools\History\Models\Common\MoneyBuilder
;
19
23
final
class
StandalonePriceChangeValueChangeBuilder
implements
Builder
24
{
29
private
$change;
30
35
private
$staged;
36
41
private
$previousValue;
42
47
private
$nextValue;
48
53
public
function
getChange
()
54
{
55
return
$this->change;
56
}
57
64
public
function
getStaged
()
65
{
66
return
$this->staged;
67
}
68
75
public
function
getPreviousValue
()
76
{
77
return
$this->previousValue instanceof
MoneyBuilder
? $this->previousValue->
build
() : $this->previousValue;
78
}
79
86
public
function
getNextValue
()
87
{
88
return
$this->nextValue instanceof
MoneyBuilder
? $this->nextValue->
build
() : $this->nextValue;
89
}
90
95
public
function
withChange
(?
string
$change)
96
{
97
$this->change = $change;
98
99
return
$this;
100
}
101
106
public
function
withStaged
(?
bool
$staged)
107
{
108
$this->staged = $staged;
109
110
return
$this;
111
}
112
117
public
function
withPreviousValue
(?
Money
$previousValue)
118
{
119
$this->previousValue = $previousValue;
120
121
return
$this;
122
}
123
128
public
function
withNextValue
(?
Money
$nextValue)
129
{
130
$this->nextValue = $nextValue;
131
132
return
$this;
133
}
134
139
public
function
withPreviousValueBuilder
(?
MoneyBuilder
$previousValue)
140
{
141
$this->previousValue = $previousValue;
142
143
return
$this;
144
}
145
150
public
function
withNextValueBuilder
(?
MoneyBuilder
$nextValue)
151
{
152
$this->nextValue = $nextValue;
153
154
return
$this;
155
}
156
157
public
function
build
():
StandalonePriceChangeValueChange
158
{
159
return
new
StandalonePriceChangeValueChangeModel
(
160
$this->change,
161
$this->staged,
162
$this->previousValue instanceof
MoneyBuilder
? $this->previousValue->
build
() : $this->previousValue,
163
$this->nextValue instanceof
MoneyBuilder
? $this->nextValue->
build
() : $this->nextValue
164
);
165
}
166
167
public
static
function
of
():
StandalonePriceChangeValueChangeBuilder
168
{
169
return
new
self
();
170
}
171
}
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\StandalonePriceChangeValueChangeBuilder
Definition
StandalonePriceChangeValueChangeBuilder.php:24
Commercetools\History\Models\Change\StandalonePriceChangeValueChangeBuilder\withChange
withChange(?string $change)
Definition
StandalonePriceChangeValueChangeBuilder.php:95
Commercetools\History\Models\Change\StandalonePriceChangeValueChangeBuilder\of
static of()
Definition
StandalonePriceChangeValueChangeBuilder.php:167
Commercetools\History\Models\Change\StandalonePriceChangeValueChangeBuilder\build
build()
Definition
StandalonePriceChangeValueChangeBuilder.php:157
Commercetools\History\Models\Change\StandalonePriceChangeValueChangeBuilder\withPreviousValue
withPreviousValue(?Money $previousValue)
Definition
StandalonePriceChangeValueChangeBuilder.php:117
Commercetools\History\Models\Change\StandalonePriceChangeValueChangeBuilder\getStaged
getStaged()
Definition
StandalonePriceChangeValueChangeBuilder.php:64
Commercetools\History\Models\Change\StandalonePriceChangeValueChangeBuilder\withNextValue
withNextValue(?Money $nextValue)
Definition
StandalonePriceChangeValueChangeBuilder.php:128
Commercetools\History\Models\Change\StandalonePriceChangeValueChangeBuilder\getNextValue
getNextValue()
Definition
StandalonePriceChangeValueChangeBuilder.php:86
Commercetools\History\Models\Change\StandalonePriceChangeValueChangeBuilder\withStaged
withStaged(?bool $staged)
Definition
StandalonePriceChangeValueChangeBuilder.php:106
Commercetools\History\Models\Change\StandalonePriceChangeValueChangeBuilder\getPreviousValue
getPreviousValue()
Definition
StandalonePriceChangeValueChangeBuilder.php:75
Commercetools\History\Models\Change\StandalonePriceChangeValueChangeBuilder\withNextValueBuilder
withNextValueBuilder(?MoneyBuilder $nextValue)
Definition
StandalonePriceChangeValueChangeBuilder.php:150
Commercetools\History\Models\Change\StandalonePriceChangeValueChangeBuilder\withPreviousValueBuilder
withPreviousValueBuilder(?MoneyBuilder $previousValue)
Definition
StandalonePriceChangeValueChangeBuilder.php:139
Commercetools\History\Models\Change\StandalonePriceChangeValueChangeBuilder\getChange
getChange()
Definition
StandalonePriceChangeValueChangeBuilder.php:53
Commercetools\History\Models\Change\StandalonePriceChangeValueChangeModel
Definition
StandalonePriceChangeValueChangeModel.php:23
Commercetools\History\Models\Common\MoneyBuilder
Definition
MoneyBuilder.php:22
Commercetools\History\Models\Common\MoneyBuilder\build
build()
Definition
MoneyBuilder.php:84
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Change\StandalonePriceChangeValueChange
Definition
StandalonePriceChangeValueChange.php:16
Commercetools\History\Models\Common\Money
Definition
Money.php:15
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8