commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
SetPriceKeyChangeModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
22
23 public const DISCRIMINATOR_VALUE = 'SetPriceKeyChange';
28 protected $type;
29
34 protected $change;
35
40 protected $catalogData;
41
46 protected $variant;
47
52 protected $priceId;
53
58 protected $previousValue;
59
64 protected $nextValue;
65
66
70 public function __construct(
71 ?string $change = null,
72 ?string $catalogData = null,
73 ?string $variant = null,
74 ?string $priceId = null,
75 ?string $previousValue = null,
76 ?string $nextValue = null,
77 ?string $type = null
78 ) {
79 $this->change = $change;
80 $this->catalogData = $catalogData;
81 $this->variant = $variant;
82 $this->priceId = $priceId;
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
134 public function getCatalogData()
135 {
136 if (is_null($this->catalogData)) {
138 $data = $this->raw(self::FIELD_CATALOG_DATA);
139 if (is_null($data)) {
140 return null;
141 }
142 $this->catalogData = (string) $data;
143 }
144
145 return $this->catalogData;
146 }
147
155 public function getVariant()
156 {
157 if (is_null($this->variant)) {
159 $data = $this->raw(self::FIELD_VARIANT);
160 if (is_null($data)) {
161 return null;
162 }
163 $this->variant = (string) $data;
164 }
165
166 return $this->variant;
167 }
168
175 public function getPriceId()
176 {
177 if (is_null($this->priceId)) {
179 $data = $this->raw(self::FIELD_PRICE_ID);
180 if (is_null($data)) {
181 return null;
182 }
183 $this->priceId = (string) $data;
184 }
185
186 return $this->priceId;
187 }
188
195 public function getPreviousValue()
196 {
197 if (is_null($this->previousValue)) {
199 $data = $this->raw(self::FIELD_PREVIOUS_VALUE);
200 if (is_null($data)) {
201 return null;
202 }
203 $this->previousValue = (string) $data;
204 }
205
207 }
208
215 public function getNextValue()
216 {
217 if (is_null($this->nextValue)) {
219 $data = $this->raw(self::FIELD_NEXT_VALUE);
220 if (is_null($data)) {
221 return null;
222 }
223 $this->nextValue = (string) $data;
224 }
225
226 return $this->nextValue;
227 }
228
229
233 public function setChange(?string $change): void
234 {
235 $this->change = $change;
236 }
237
241 public function setCatalogData(?string $catalogData): void
242 {
243 $this->catalogData = $catalogData;
244 }
245
249 public function setVariant(?string $variant): void
250 {
251 $this->variant = $variant;
252 }
253
257 public function setPriceId(?string $priceId): void
258 {
259 $this->priceId = $priceId;
260 }
261
265 public function setPreviousValue(?string $previousValue): void
266 {
267 $this->previousValue = $previousValue;
268 }
269
273 public function setNextValue(?string $nextValue): void
274 {
275 $this->nextValue = $nextValue;
276 }
277
278
279
280}
__construct(?string $change=null, ?string $catalogData=null, ?string $variant=null, ?string $priceId=null, ?string $previousValue=null, ?string $nextValue=null, ?string $type=null)