1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Starweb\Api\Generated\Model; |
4
|
|
|
|
5
|
|
|
class ProductVariantPatchRequestModel |
6
|
|
|
{ |
7
|
|
|
/** |
8
|
|
|
* The product variants SKU (stock keeping unit) |
9
|
|
|
* |
10
|
|
|
* @var string|null |
11
|
|
|
*/ |
12
|
|
|
protected $sku; |
13
|
|
|
/** |
14
|
|
|
* The external id of this pricelist |
15
|
|
|
* |
16
|
|
|
* @var string|null |
17
|
|
|
*/ |
18
|
|
|
protected $externalId = ''; |
19
|
|
|
/** |
20
|
|
|
* The system name the externalId belongs to. |
21
|
|
|
* |
22
|
|
|
* @var string|null |
23
|
|
|
*/ |
24
|
|
|
protected $externalIdType; |
25
|
|
|
/** |
26
|
|
|
* Is this variant active? Only active variants are visible to customers |
27
|
|
|
* |
28
|
|
|
* @var bool|null |
29
|
|
|
*/ |
30
|
|
|
protected $isActive = true; |
31
|
|
|
/** |
32
|
|
|
* The sort index of this variant. |
33
|
|
|
* |
34
|
|
|
* @var int|null |
35
|
|
|
*/ |
36
|
|
|
protected $sortIndex; |
37
|
|
|
/** |
38
|
|
|
* The ID of the variants stock status. Available stock statuses can be fetched using the /product-stock-statuses endpoint |
39
|
|
|
* |
40
|
|
|
* @var int|null |
41
|
|
|
*/ |
42
|
|
|
protected $stockStatusId; |
43
|
|
|
/** |
44
|
|
|
* The current stock quantity for this variant |
45
|
|
|
* |
46
|
|
|
* @var int|null |
47
|
|
|
*/ |
48
|
|
|
protected $stockQuantity; |
49
|
|
|
/** |
50
|
|
|
* The variants weight in KG |
51
|
|
|
* |
52
|
|
|
* @var float|null |
53
|
|
|
*/ |
54
|
|
|
protected $weightInKg; |
55
|
|
|
/** |
56
|
|
|
* The cost for this variant. Used for statistic and never displayed to customers |
57
|
|
|
* |
58
|
|
|
* @var string|null |
59
|
|
|
*/ |
60
|
|
|
protected $costPrice; |
61
|
|
|
/** |
62
|
|
|
* European article no |
63
|
|
|
* |
64
|
|
|
* @var string|null |
65
|
|
|
*/ |
66
|
|
|
protected $ean; |
67
|
|
|
/** |
68
|
|
|
* Manufacturer part no |
69
|
|
|
* |
70
|
|
|
* @var string|null |
71
|
|
|
*/ |
72
|
|
|
protected $mpn; |
73
|
|
|
/** |
74
|
|
|
* The ID of this variant main image. Available media files can be fetched using the /media-files endpoint |
75
|
|
|
* |
76
|
|
|
* @var int|null |
77
|
|
|
*/ |
78
|
|
|
protected $imageFileId; |
79
|
|
|
/** |
80
|
|
|
* An array of attribute value IDs that this variant belongs to. This field is mandatory for products variants if the product´s hasSeveralVariants field is set to true. |
81
|
|
|
* |
82
|
|
|
* @var int[]|null |
83
|
|
|
*/ |
84
|
|
|
protected $attributeValueLinks; |
85
|
|
|
/** |
86
|
|
|
* An array of pricelists IDs that will use inheritance |
87
|
|
|
* |
88
|
|
|
* @var int[]|null |
89
|
|
|
*/ |
90
|
|
|
protected $volumePricingInheritancePricelistIds; |
91
|
|
|
/** |
92
|
|
|
* The product variants SKU (stock keeping unit) |
93
|
|
|
* |
94
|
|
|
* @return string|null |
95
|
|
|
*/ |
96
|
|
|
public function getSku() : ?string |
97
|
|
|
{ |
98
|
|
|
return $this->sku; |
99
|
|
|
} |
100
|
|
|
/** |
101
|
|
|
* The product variants SKU (stock keeping unit) |
102
|
|
|
* |
103
|
|
|
* @param string|null $sku |
104
|
|
|
* |
105
|
|
|
* @return self |
106
|
|
|
*/ |
107
|
|
|
public function setSku(?string $sku) : self |
108
|
|
|
{ |
109
|
|
|
$this->sku = $sku; |
110
|
|
|
return $this; |
111
|
|
|
} |
112
|
|
|
/** |
113
|
|
|
* The external id of this pricelist |
114
|
|
|
* |
115
|
|
|
* @return string|null |
116
|
|
|
*/ |
117
|
|
|
public function getExternalId() : ?string |
118
|
|
|
{ |
119
|
|
|
return $this->externalId; |
120
|
|
|
} |
121
|
|
|
/** |
122
|
|
|
* The external id of this pricelist |
123
|
|
|
* |
124
|
|
|
* @param string|null $externalId |
125
|
|
|
* |
126
|
|
|
* @return self |
127
|
|
|
*/ |
128
|
|
|
public function setExternalId(?string $externalId) : self |
129
|
|
|
{ |
130
|
|
|
$this->externalId = $externalId; |
131
|
|
|
return $this; |
132
|
|
|
} |
133
|
|
|
/** |
134
|
|
|
* The system name the externalId belongs to. |
135
|
|
|
* |
136
|
|
|
* @return string|null |
137
|
|
|
*/ |
138
|
|
|
public function getExternalIdType() : ?string |
139
|
|
|
{ |
140
|
|
|
return $this->externalIdType; |
141
|
|
|
} |
142
|
|
|
/** |
143
|
|
|
* The system name the externalId belongs to. |
144
|
|
|
* |
145
|
|
|
* @param string|null $externalIdType |
146
|
|
|
* |
147
|
|
|
* @return self |
148
|
|
|
*/ |
149
|
|
|
public function setExternalIdType(?string $externalIdType) : self |
150
|
|
|
{ |
151
|
|
|
$this->externalIdType = $externalIdType; |
152
|
|
|
return $this; |
153
|
|
|
} |
154
|
|
|
/** |
155
|
|
|
* Is this variant active? Only active variants are visible to customers |
156
|
|
|
* |
157
|
|
|
* @return bool|null |
158
|
|
|
*/ |
159
|
|
|
public function getIsActive() : ?bool |
160
|
|
|
{ |
161
|
|
|
return $this->isActive; |
162
|
|
|
} |
163
|
|
|
/** |
164
|
|
|
* Is this variant active? Only active variants are visible to customers |
165
|
|
|
* |
166
|
|
|
* @param bool|null $isActive |
167
|
|
|
* |
168
|
|
|
* @return self |
169
|
|
|
*/ |
170
|
|
|
public function setIsActive(?bool $isActive) : self |
171
|
|
|
{ |
172
|
|
|
$this->isActive = $isActive; |
173
|
|
|
return $this; |
174
|
|
|
} |
175
|
|
|
/** |
176
|
|
|
* The sort index of this variant. |
177
|
|
|
* |
178
|
|
|
* @return int|null |
179
|
|
|
*/ |
180
|
|
|
public function getSortIndex() : ?int |
181
|
|
|
{ |
182
|
|
|
return $this->sortIndex; |
183
|
|
|
} |
184
|
|
|
/** |
185
|
|
|
* The sort index of this variant. |
186
|
|
|
* |
187
|
|
|
* @param int|null $sortIndex |
188
|
|
|
* |
189
|
|
|
* @return self |
190
|
|
|
*/ |
191
|
|
|
public function setSortIndex(?int $sortIndex) : self |
192
|
|
|
{ |
193
|
|
|
$this->sortIndex = $sortIndex; |
194
|
|
|
return $this; |
195
|
|
|
} |
196
|
|
|
/** |
197
|
|
|
* The ID of the variants stock status. Available stock statuses can be fetched using the /product-stock-statuses endpoint |
198
|
|
|
* |
199
|
|
|
* @return int|null |
200
|
|
|
*/ |
201
|
|
|
public function getStockStatusId() : ?int |
202
|
|
|
{ |
203
|
|
|
return $this->stockStatusId; |
204
|
|
|
} |
205
|
|
|
/** |
206
|
|
|
* The ID of the variants stock status. Available stock statuses can be fetched using the /product-stock-statuses endpoint |
207
|
|
|
* |
208
|
|
|
* @param int|null $stockStatusId |
209
|
|
|
* |
210
|
|
|
* @return self |
211
|
|
|
*/ |
212
|
|
|
public function setStockStatusId(?int $stockStatusId) : self |
213
|
|
|
{ |
214
|
|
|
$this->stockStatusId = $stockStatusId; |
215
|
|
|
return $this; |
216
|
|
|
} |
217
|
|
|
/** |
218
|
|
|
* The current stock quantity for this variant |
219
|
|
|
* |
220
|
|
|
* @return int|null |
221
|
|
|
*/ |
222
|
|
|
public function getStockQuantity() : ?int |
223
|
|
|
{ |
224
|
|
|
return $this->stockQuantity; |
225
|
|
|
} |
226
|
|
|
/** |
227
|
|
|
* The current stock quantity for this variant |
228
|
|
|
* |
229
|
|
|
* @param int|null $stockQuantity |
230
|
|
|
* |
231
|
|
|
* @return self |
232
|
|
|
*/ |
233
|
|
|
public function setStockQuantity(?int $stockQuantity) : self |
234
|
|
|
{ |
235
|
|
|
$this->stockQuantity = $stockQuantity; |
236
|
|
|
return $this; |
237
|
|
|
} |
238
|
|
|
/** |
239
|
|
|
* The variants weight in KG |
240
|
|
|
* |
241
|
|
|
* @return float|null |
242
|
|
|
*/ |
243
|
|
|
public function getWeightInKg() : ?float |
244
|
|
|
{ |
245
|
|
|
return $this->weightInKg; |
246
|
|
|
} |
247
|
|
|
/** |
248
|
|
|
* The variants weight in KG |
249
|
|
|
* |
250
|
|
|
* @param float|null $weightInKg |
251
|
|
|
* |
252
|
|
|
* @return self |
253
|
|
|
*/ |
254
|
|
|
public function setWeightInKg(?float $weightInKg) : self |
255
|
|
|
{ |
256
|
|
|
$this->weightInKg = $weightInKg; |
257
|
|
|
return $this; |
258
|
|
|
} |
259
|
|
|
/** |
260
|
|
|
* The cost for this variant. Used for statistic and never displayed to customers |
261
|
|
|
* |
262
|
|
|
* @return string|null |
263
|
|
|
*/ |
264
|
|
|
public function getCostPrice() : ?string |
265
|
|
|
{ |
266
|
|
|
return $this->costPrice; |
267
|
|
|
} |
268
|
|
|
/** |
269
|
|
|
* The cost for this variant. Used for statistic and never displayed to customers |
270
|
|
|
* |
271
|
|
|
* @param string|null $costPrice |
272
|
|
|
* |
273
|
|
|
* @return self |
274
|
|
|
*/ |
275
|
|
|
public function setCostPrice(?string $costPrice) : self |
276
|
|
|
{ |
277
|
|
|
$this->costPrice = $costPrice; |
278
|
|
|
return $this; |
279
|
|
|
} |
280
|
|
|
/** |
281
|
|
|
* European article no |
282
|
|
|
* |
283
|
|
|
* @return string|null |
284
|
|
|
*/ |
285
|
|
|
public function getEan() : ?string |
286
|
|
|
{ |
287
|
|
|
return $this->ean; |
288
|
|
|
} |
289
|
|
|
/** |
290
|
|
|
* European article no |
291
|
|
|
* |
292
|
|
|
* @param string|null $ean |
293
|
|
|
* |
294
|
|
|
* @return self |
295
|
|
|
*/ |
296
|
|
|
public function setEan(?string $ean) : self |
297
|
|
|
{ |
298
|
|
|
$this->ean = $ean; |
299
|
|
|
return $this; |
300
|
|
|
} |
301
|
|
|
/** |
302
|
|
|
* Manufacturer part no |
303
|
|
|
* |
304
|
|
|
* @return string|null |
305
|
|
|
*/ |
306
|
|
|
public function getMpn() : ?string |
307
|
|
|
{ |
308
|
|
|
return $this->mpn; |
309
|
|
|
} |
310
|
|
|
/** |
311
|
|
|
* Manufacturer part no |
312
|
|
|
* |
313
|
|
|
* @param string|null $mpn |
314
|
|
|
* |
315
|
|
|
* @return self |
316
|
|
|
*/ |
317
|
|
|
public function setMpn(?string $mpn) : self |
318
|
|
|
{ |
319
|
|
|
$this->mpn = $mpn; |
320
|
|
|
return $this; |
321
|
|
|
} |
322
|
|
|
/** |
323
|
|
|
* The ID of this variant main image. Available media files can be fetched using the /media-files endpoint |
324
|
|
|
* |
325
|
|
|
* @return int|null |
326
|
|
|
*/ |
327
|
|
|
public function getImageFileId() : ?int |
328
|
|
|
{ |
329
|
|
|
return $this->imageFileId; |
330
|
|
|
} |
331
|
|
|
/** |
332
|
|
|
* The ID of this variant main image. Available media files can be fetched using the /media-files endpoint |
333
|
|
|
* |
334
|
|
|
* @param int|null $imageFileId |
335
|
|
|
* |
336
|
|
|
* @return self |
337
|
|
|
*/ |
338
|
|
|
public function setImageFileId(?int $imageFileId) : self |
339
|
|
|
{ |
340
|
|
|
$this->imageFileId = $imageFileId; |
341
|
|
|
return $this; |
342
|
|
|
} |
343
|
|
|
/** |
344
|
|
|
* An array of attribute value IDs that this variant belongs to. This field is mandatory for products variants if the product´s hasSeveralVariants field is set to true. |
345
|
|
|
* |
346
|
|
|
* @return int[]|null |
347
|
|
|
*/ |
348
|
|
|
public function getAttributeValueLinks() : ?array |
349
|
|
|
{ |
350
|
|
|
return $this->attributeValueLinks; |
351
|
|
|
} |
352
|
|
|
/** |
353
|
|
|
* An array of attribute value IDs that this variant belongs to. This field is mandatory for products variants if the product´s hasSeveralVariants field is set to true. |
354
|
|
|
* |
355
|
|
|
* @param int[]|null $attributeValueLinks |
356
|
|
|
* |
357
|
|
|
* @return self |
358
|
|
|
*/ |
359
|
|
|
public function setAttributeValueLinks(?array $attributeValueLinks) : self |
360
|
|
|
{ |
361
|
|
|
$this->attributeValueLinks = $attributeValueLinks; |
362
|
|
|
return $this; |
363
|
|
|
} |
364
|
|
|
/** |
365
|
|
|
* An array of pricelists IDs that will use inheritance |
366
|
|
|
* |
367
|
|
|
* @return int[]|null |
368
|
|
|
*/ |
369
|
|
|
public function getVolumePricingInheritancePricelistIds() : ?array |
370
|
|
|
{ |
371
|
|
|
return $this->volumePricingInheritancePricelistIds; |
372
|
|
|
} |
373
|
|
|
/** |
374
|
|
|
* An array of pricelists IDs that will use inheritance |
375
|
|
|
* |
376
|
|
|
* @param int[]|null $volumePricingInheritancePricelistIds |
377
|
|
|
* |
378
|
|
|
* @return self |
379
|
|
|
*/ |
380
|
|
|
public function setVolumePricingInheritancePricelistIds(?array $volumePricingInheritancePricelistIds) : self |
381
|
|
|
{ |
382
|
|
|
$this->volumePricingInheritancePricelistIds = $volumePricingInheritancePricelistIds; |
383
|
|
|
return $this; |
384
|
|
|
} |
385
|
|
|
} |