commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
StandalonePriceChangeValueChangeBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
19
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
158 {
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
168 {
169 return new self();
170 }
171}