1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Starweb\Api\Generated\Model; |
4
|
|
|
|
5
|
|
|
class ProductVariantResponseModel |
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 variant id |
93
|
|
|
* |
94
|
|
|
* @var int|null |
95
|
|
|
*/ |
96
|
|
|
protected $variantId; |
97
|
|
|
/** |
98
|
|
|
* A collection of product variant prices |
99
|
|
|
* |
100
|
|
|
* @var ProductVariantPriceModel[]|null |
101
|
|
|
*/ |
102
|
|
|
protected $prices; |
103
|
|
|
/** |
104
|
|
|
* A collection of product variant attribute values |
105
|
|
|
* |
106
|
|
|
* @var ProductVariantAttributeValueModel[]|null |
107
|
|
|
*/ |
108
|
|
|
protected $attributeValues; |
109
|
|
|
/** |
110
|
|
|
* The product variants SKU (stock keeping unit) |
111
|
|
|
* |
112
|
|
|
* @return string|null |
113
|
|
|
*/ |
114
|
|
|
public function getSku() : ?string |
115
|
|
|
{ |
116
|
|
|
return $this->sku; |
117
|
|
|
} |
118
|
|
|
/** |
119
|
|
|
* The product variants SKU (stock keeping unit) |
120
|
|
|
* |
121
|
|
|
* @param string|null $sku |
122
|
|
|
* |
123
|
|
|
* @return self |
124
|
|
|
*/ |
125
|
|
|
public function setSku(?string $sku) : self |
126
|
|
|
{ |
127
|
|
|
$this->sku = $sku; |
128
|
|
|
return $this; |
129
|
|
|
} |
130
|
|
|
/** |
131
|
|
|
* The external id of this pricelist |
132
|
|
|
* |
133
|
|
|
* @return string|null |
134
|
|
|
*/ |
135
|
|
|
public function getExternalId() : ?string |
136
|
|
|
{ |
137
|
|
|
return $this->externalId; |
138
|
|
|
} |
139
|
|
|
/** |
140
|
|
|
* The external id of this pricelist |
141
|
|
|
* |
142
|
|
|
* @param string|null $externalId |
143
|
|
|
* |
144
|
|
|
* @return self |
145
|
|
|
*/ |
146
|
|
|
public function setExternalId(?string $externalId) : self |
147
|
|
|
{ |
148
|
|
|
$this->externalId = $externalId; |
149
|
|
|
return $this; |
150
|
|
|
} |
151
|
|
|
/** |
152
|
|
|
* The system name the externalId belongs to. |
153
|
|
|
* |
154
|
|
|
* @return string|null |
155
|
|
|
*/ |
156
|
|
|
public function getExternalIdType() : ?string |
157
|
|
|
{ |
158
|
|
|
return $this->externalIdType; |
159
|
|
|
} |
160
|
|
|
/** |
161
|
|
|
* The system name the externalId belongs to. |
162
|
|
|
* |
163
|
|
|
* @param string|null $externalIdType |
164
|
|
|
* |
165
|
|
|
* @return self |
166
|
|
|
*/ |
167
|
|
|
public function setExternalIdType(?string $externalIdType) : self |
168
|
|
|
{ |
169
|
|
|
$this->externalIdType = $externalIdType; |
170
|
|
|
return $this; |
171
|
|
|
} |
172
|
|
|
/** |
173
|
|
|
* Is this variant active? Only active variants are visible to customers |
174
|
|
|
* |
175
|
|
|
* @return bool|null |
176
|
|
|
*/ |
177
|
|
|
public function getIsActive() : ?bool |
178
|
|
|
{ |
179
|
|
|
return $this->isActive; |
180
|
|
|
} |
181
|
|
|
/** |
182
|
|
|
* Is this variant active? Only active variants are visible to customers |
183
|
|
|
* |
184
|
|
|
* @param bool|null $isActive |
185
|
|
|
* |
186
|
|
|
* @return self |
187
|
|
|
*/ |
188
|
|
|
public function setIsActive(?bool $isActive) : self |
189
|
|
|
{ |
190
|
|
|
$this->isActive = $isActive; |
191
|
|
|
return $this; |
192
|
|
|
} |
193
|
|
|
/** |
194
|
|
|
* The sort index of this variant. |
195
|
|
|
* |
196
|
|
|
* @return int|null |
197
|
|
|
*/ |
198
|
|
|
public function getSortIndex() : ?int |
199
|
|
|
{ |
200
|
|
|
return $this->sortIndex; |
201
|
|
|
} |
202
|
|
|
/** |
203
|
|
|
* The sort index of this variant. |
204
|
|
|
* |
205
|
|
|
* @param int|null $sortIndex |
206
|
|
|
* |
207
|
|
|
* @return self |
208
|
|
|
*/ |
209
|
|
|
public function setSortIndex(?int $sortIndex) : self |
210
|
|
|
{ |
211
|
|
|
$this->sortIndex = $sortIndex; |
212
|
|
|
return $this; |
213
|
|
|
} |
214
|
|
|
/** |
215
|
|
|
* The ID of the variants stock status. Available stock statuses can be fetched using the /product-stock-statuses endpoint |
216
|
|
|
* |
217
|
|
|
* @return int|null |
218
|
|
|
*/ |
219
|
|
|
public function getStockStatusId() : ?int |
220
|
|
|
{ |
221
|
|
|
return $this->stockStatusId; |
222
|
|
|
} |
223
|
|
|
/** |
224
|
|
|
* The ID of the variants stock status. Available stock statuses can be fetched using the /product-stock-statuses endpoint |
225
|
|
|
* |
226
|
|
|
* @param int|null $stockStatusId |
227
|
|
|
* |
228
|
|
|
* @return self |
229
|
|
|
*/ |
230
|
|
|
public function setStockStatusId(?int $stockStatusId) : self |
231
|
|
|
{ |
232
|
|
|
$this->stockStatusId = $stockStatusId; |
233
|
|
|
return $this; |
234
|
|
|
} |
235
|
|
|
/** |
236
|
|
|
* The current stock quantity for this variant |
237
|
|
|
* |
238
|
|
|
* @return int|null |
239
|
|
|
*/ |
240
|
|
|
public function getStockQuantity() : ?int |
241
|
|
|
{ |
242
|
|
|
return $this->stockQuantity; |
243
|
|
|
} |
244
|
|
|
/** |
245
|
|
|
* The current stock quantity for this variant |
246
|
|
|
* |
247
|
|
|
* @param int|null $stockQuantity |
248
|
|
|
* |
249
|
|
|
* @return self |
250
|
|
|
*/ |
251
|
|
|
public function setStockQuantity(?int $stockQuantity) : self |
252
|
|
|
{ |
253
|
|
|
$this->stockQuantity = $stockQuantity; |
254
|
|
|
return $this; |
255
|
|
|
} |
256
|
|
|
/** |
257
|
|
|
* The variants weight in KG |
258
|
|
|
* |
259
|
|
|
* @return float|null |
260
|
|
|
*/ |
261
|
|
|
public function getWeightInKg() : ?float |
262
|
|
|
{ |
263
|
|
|
return $this->weightInKg; |
264
|
|
|
} |
265
|
|
|
/** |
266
|
|
|
* The variants weight in KG |
267
|
|
|
* |
268
|
|
|
* @param float|null $weightInKg |
269
|
|
|
* |
270
|
|
|
* @return self |
271
|
|
|
*/ |
272
|
|
|
public function setWeightInKg(?float $weightInKg) : self |
273
|
|
|
{ |
274
|
|
|
$this->weightInKg = $weightInKg; |
275
|
|
|
return $this; |
276
|
|
|
} |
277
|
|
|
/** |
278
|
|
|
* The cost for this variant. Used for statistic and never displayed to customers |
279
|
|
|
* |
280
|
|
|
* @return string|null |
281
|
|
|
*/ |
282
|
|
|
public function getCostPrice() : ?string |
283
|
|
|
{ |
284
|
|
|
return $this->costPrice; |
285
|
|
|
} |
286
|
|
|
/** |
287
|
|
|
* The cost for this variant. Used for statistic and never displayed to customers |
288
|
|
|
* |
289
|
|
|
* @param string|null $costPrice |
290
|
|
|
* |
291
|
|
|
* @return self |
292
|
|
|
*/ |
293
|
|
|
public function setCostPrice(?string $costPrice) : self |
294
|
|
|
{ |
295
|
|
|
$this->costPrice = $costPrice; |
296
|
|
|
return $this; |
297
|
|
|
} |
298
|
|
|
/** |
299
|
|
|
* European article no |
300
|
|
|
* |
301
|
|
|
* @return string|null |
302
|
|
|
*/ |
303
|
|
|
public function getEan() : ?string |
304
|
|
|
{ |
305
|
|
|
return $this->ean; |
306
|
|
|
} |
307
|
|
|
/** |
308
|
|
|
* European article no |
309
|
|
|
* |
310
|
|
|
* @param string|null $ean |
311
|
|
|
* |
312
|
|
|
* @return self |
313
|
|
|
*/ |
314
|
|
|
public function setEan(?string $ean) : self |
315
|
|
|
{ |
316
|
|
|
$this->ean = $ean; |
317
|
|
|
return $this; |
318
|
|
|
} |
319
|
|
|
/** |
320
|
|
|
* Manufacturer part no |
321
|
|
|
* |
322
|
|
|
* @return string|null |
323
|
|
|
*/ |
324
|
|
|
public function getMpn() : ?string |
325
|
|
|
{ |
326
|
|
|
return $this->mpn; |
327
|
|
|
} |
328
|
|
|
/** |
329
|
|
|
* Manufacturer part no |
330
|
|
|
* |
331
|
|
|
* @param string|null $mpn |
332
|
|
|
* |
333
|
|
|
* @return self |
334
|
|
|
*/ |
335
|
|
|
public function setMpn(?string $mpn) : self |
336
|
|
|
{ |
337
|
|
|
$this->mpn = $mpn; |
338
|
|
|
return $this; |
339
|
|
|
} |
340
|
|
|
/** |
341
|
|
|
* The ID of this variant main image. Available media files can be fetched using the /media-files endpoint |
342
|
|
|
* |
343
|
|
|
* @return int|null |
344
|
|
|
*/ |
345
|
|
|
public function getImageFileId() : ?int |
346
|
|
|
{ |
347
|
|
|
return $this->imageFileId; |
348
|
|
|
} |
349
|
|
|
/** |
350
|
|
|
* The ID of this variant main image. Available media files can be fetched using the /media-files endpoint |
351
|
|
|
* |
352
|
|
|
* @param int|null $imageFileId |
353
|
|
|
* |
354
|
|
|
* @return self |
355
|
|
|
*/ |
356
|
|
|
public function setImageFileId(?int $imageFileId) : self |
357
|
|
|
{ |
358
|
|
|
$this->imageFileId = $imageFileId; |
359
|
|
|
return $this; |
360
|
|
|
} |
361
|
|
|
/** |
362
|
|
|
* 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. |
363
|
|
|
* |
364
|
|
|
* @return int[]|null |
365
|
|
|
*/ |
366
|
|
|
public function getAttributeValueLinks() : ?array |
367
|
|
|
{ |
368
|
|
|
return $this->attributeValueLinks; |
369
|
|
|
} |
370
|
|
|
/** |
371
|
|
|
* 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. |
372
|
|
|
* |
373
|
|
|
* @param int[]|null $attributeValueLinks |
374
|
|
|
* |
375
|
|
|
* @return self |
376
|
|
|
*/ |
377
|
|
|
public function setAttributeValueLinks(?array $attributeValueLinks) : self |
378
|
|
|
{ |
379
|
|
|
$this->attributeValueLinks = $attributeValueLinks; |
380
|
|
|
return $this; |
381
|
|
|
} |
382
|
|
|
/** |
383
|
|
|
* An array of pricelists IDs that will use inheritance |
384
|
|
|
* |
385
|
|
|
* @return int[]|null |
386
|
|
|
*/ |
387
|
|
|
public function getVolumePricingInheritancePricelistIds() : ?array |
388
|
|
|
{ |
389
|
|
|
return $this->volumePricingInheritancePricelistIds; |
390
|
|
|
} |
391
|
|
|
/** |
392
|
|
|
* An array of pricelists IDs that will use inheritance |
393
|
|
|
* |
394
|
|
|
* @param int[]|null $volumePricingInheritancePricelistIds |
395
|
|
|
* |
396
|
|
|
* @return self |
397
|
|
|
*/ |
398
|
|
|
public function setVolumePricingInheritancePricelistIds(?array $volumePricingInheritancePricelistIds) : self |
399
|
|
|
{ |
400
|
|
|
$this->volumePricingInheritancePricelistIds = $volumePricingInheritancePricelistIds; |
401
|
|
|
return $this; |
402
|
|
|
} |
403
|
|
|
/** |
404
|
|
|
* The variant id |
405
|
|
|
* |
406
|
|
|
* @return int|null |
407
|
|
|
*/ |
408
|
|
|
public function getVariantId() : ?int |
409
|
|
|
{ |
410
|
|
|
return $this->variantId; |
411
|
|
|
} |
412
|
|
|
/** |
413
|
|
|
* The variant id |
414
|
|
|
* |
415
|
|
|
* @param int|null $variantId |
416
|
|
|
* |
417
|
|
|
* @return self |
418
|
|
|
*/ |
419
|
|
|
public function setVariantId(?int $variantId) : self |
420
|
|
|
{ |
421
|
|
|
$this->variantId = $variantId; |
422
|
|
|
return $this; |
423
|
|
|
} |
424
|
|
|
/** |
425
|
|
|
* A collection of product variant prices |
426
|
|
|
* |
427
|
|
|
* @return ProductVariantPriceModel[]|null |
428
|
|
|
*/ |
429
|
|
|
public function getPrices() : ?array |
430
|
|
|
{ |
431
|
|
|
return $this->prices; |
432
|
|
|
} |
433
|
|
|
/** |
434
|
|
|
* A collection of product variant prices |
435
|
|
|
* |
436
|
|
|
* @param ProductVariantPriceModel[]|null $prices |
437
|
|
|
* |
438
|
|
|
* @return self |
439
|
|
|
*/ |
440
|
|
|
public function setPrices(?array $prices) : self |
441
|
|
|
{ |
442
|
|
|
$this->prices = $prices; |
443
|
|
|
return $this; |
444
|
|
|
} |
445
|
|
|
/** |
446
|
|
|
* A collection of product variant attribute values |
447
|
|
|
* |
448
|
|
|
* @return ProductVariantAttributeValueModel[]|null |
449
|
|
|
*/ |
450
|
|
|
public function getAttributeValues() : ?array |
451
|
|
|
{ |
452
|
|
|
return $this->attributeValues; |
453
|
|
|
} |
454
|
|
|
/** |
455
|
|
|
* A collection of product variant attribute values |
456
|
|
|
* |
457
|
|
|
* @param ProductVariantAttributeValueModel[]|null $attributeValues |
458
|
|
|
* |
459
|
|
|
* @return self |
460
|
|
|
*/ |
461
|
|
|
public function setAttributeValues(?array $attributeValues) : self |
462
|
|
|
{ |
463
|
|
|
$this->attributeValues = $attributeValues; |
464
|
|
|
return $this; |
465
|
|
|
} |
466
|
|
|
} |