1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* Neta\Shopware\SDK\Entity. |
4
|
|
|
* |
5
|
|
|
* Copyright 2016 LeadCommerce |
6
|
|
|
* |
7
|
|
|
* @author Alexander Mahrt <[email protected]> |
8
|
|
|
* @copyright 2016 LeadCommerce <[email protected]> |
9
|
|
|
*/ |
10
|
|
|
|
11
|
|
|
namespace Neta\Shopware\SDK\Entity; |
12
|
|
|
|
13
|
|
|
/** |
14
|
|
|
* Class ArticleDetail. |
15
|
|
|
*/ |
16
|
|
|
class ArticleDetail extends Base |
17
|
|
|
{ |
18
|
|
|
/** |
19
|
|
|
* @var int |
20
|
|
|
*/ |
21
|
|
|
protected $id; |
22
|
|
|
/** |
23
|
|
|
* @var string |
24
|
|
|
*/ |
25
|
|
|
protected $number; |
26
|
|
|
/** |
27
|
|
|
* @var string |
28
|
|
|
*/ |
29
|
|
|
protected $supplierNumber; |
30
|
|
|
/** |
31
|
|
|
* @var string |
32
|
|
|
*/ |
33
|
|
|
protected $additionalText; |
34
|
|
|
/** |
35
|
|
|
* @var string |
36
|
|
|
*/ |
37
|
|
|
protected $weight; |
38
|
|
|
/** |
39
|
|
|
* @var string |
40
|
|
|
*/ |
41
|
|
|
protected $width; |
42
|
|
|
/** |
43
|
|
|
* @var string |
44
|
|
|
*/ |
45
|
|
|
protected $len; |
46
|
|
|
/** |
47
|
|
|
* @var string |
48
|
|
|
*/ |
49
|
|
|
protected $height; |
50
|
|
|
/** |
51
|
|
|
* @var string |
52
|
|
|
*/ |
53
|
|
|
protected $ean; |
54
|
|
|
/** |
55
|
|
|
* @var string |
56
|
|
|
*/ |
57
|
|
|
protected $purchaseUnit; |
58
|
|
|
/** |
59
|
|
|
* @var string |
60
|
|
|
*/ |
61
|
|
|
protected $descriptionLong; |
62
|
|
|
/** |
63
|
|
|
* @var string |
64
|
|
|
*/ |
65
|
|
|
protected $referenceUnit; |
66
|
|
|
/** |
67
|
|
|
* @var string |
68
|
|
|
*/ |
69
|
|
|
protected $packUnit; |
70
|
|
|
/** |
71
|
|
|
* @var string |
72
|
|
|
*/ |
73
|
|
|
protected $shippingTime; |
74
|
|
|
/** |
75
|
|
|
* @var Price[] |
76
|
|
|
*/ |
77
|
|
|
protected $prices; |
78
|
|
|
/** |
79
|
|
|
* @var ConfiguratorOption[] |
80
|
|
|
*/ |
81
|
|
|
protected $configuratorOptions; |
82
|
|
|
/** |
83
|
|
|
* @var ArticleAttribute |
84
|
|
|
*/ |
85
|
|
|
protected $attribute; |
86
|
|
|
/** |
87
|
|
|
* @var int |
88
|
|
|
*/ |
89
|
|
|
protected $articleId; |
90
|
|
|
/** |
91
|
|
|
* @var int |
92
|
|
|
*/ |
93
|
|
|
protected $unitId; |
94
|
|
|
/** |
95
|
|
|
* @var int |
96
|
|
|
*/ |
97
|
|
|
protected $kind; |
98
|
|
|
/** |
99
|
|
|
* @var int |
100
|
|
|
*/ |
101
|
|
|
protected $inStock; |
102
|
|
|
/** |
103
|
|
|
* @var int |
104
|
|
|
*/ |
105
|
|
|
protected $position; |
106
|
|
|
/** |
107
|
|
|
* @var int |
108
|
|
|
*/ |
109
|
|
|
protected $minPurchase; |
110
|
|
|
/** |
111
|
|
|
* @var int |
112
|
|
|
*/ |
113
|
|
|
protected $purchaseSteps; |
114
|
|
|
/** |
115
|
|
|
* @var int |
116
|
|
|
*/ |
117
|
|
|
protected $maxPurchase; |
118
|
|
|
/** |
119
|
|
|
* @var string |
120
|
|
|
*/ |
121
|
|
|
protected $releaseDate; |
122
|
|
|
/** |
123
|
|
|
* @var bool |
124
|
|
|
*/ |
125
|
|
|
protected $active; |
126
|
|
|
/** |
127
|
|
|
* @var bool |
128
|
|
|
*/ |
129
|
|
|
protected $shippingFree; |
130
|
|
|
|
131
|
|
|
/** |
132
|
|
|
* @return int |
133
|
|
|
*/ |
134
|
|
|
public function getId() |
135
|
|
|
{ |
136
|
|
|
return $this->id; |
137
|
|
|
} |
138
|
|
|
|
139
|
|
|
/** |
140
|
|
|
* @param int $id |
141
|
|
|
* |
142
|
|
|
* @return ArticleDetail |
143
|
|
|
*/ |
144
|
|
|
public function setId($id) |
145
|
|
|
{ |
146
|
|
|
$this->id = $id; |
147
|
|
|
|
148
|
|
|
return $this; |
149
|
|
|
} |
150
|
|
|
|
151
|
|
|
/** |
152
|
|
|
* @return string |
153
|
|
|
*/ |
154
|
|
|
public function getNumber() |
155
|
|
|
{ |
156
|
|
|
return $this->number; |
157
|
|
|
} |
158
|
|
|
|
159
|
|
|
/** |
160
|
|
|
* @param string $number |
161
|
|
|
* |
162
|
|
|
* @return ArticleDetail |
163
|
|
|
*/ |
164
|
|
|
public function setNumber($number) |
165
|
|
|
{ |
166
|
|
|
$this->number = $number; |
167
|
|
|
|
168
|
|
|
return $this; |
169
|
|
|
} |
170
|
|
|
|
171
|
|
|
/** |
172
|
|
|
* @return string |
173
|
|
|
*/ |
174
|
|
|
public function getSupplierNumber() |
175
|
|
|
{ |
176
|
|
|
return $this->supplierNumber; |
177
|
|
|
} |
178
|
|
|
|
179
|
|
|
/** |
180
|
|
|
* @param string $supplierNumber |
181
|
|
|
* |
182
|
|
|
* @return ArticleDetail |
183
|
|
|
*/ |
184
|
|
|
public function setSupplierNumber($supplierNumber) |
185
|
|
|
{ |
186
|
|
|
$this->supplierNumber = $supplierNumber; |
187
|
|
|
|
188
|
|
|
return $this; |
189
|
|
|
} |
190
|
|
|
|
191
|
|
|
/** |
192
|
|
|
* @return string |
193
|
|
|
*/ |
194
|
|
|
public function getAdditionalText() |
195
|
|
|
{ |
196
|
|
|
return $this->additionalText; |
197
|
|
|
} |
198
|
|
|
|
199
|
|
|
/** |
200
|
|
|
* @param string $additionalText |
201
|
|
|
* |
202
|
|
|
* @return ArticleDetail |
203
|
|
|
*/ |
204
|
|
|
public function setAdditionalText($additionalText) |
205
|
|
|
{ |
206
|
|
|
$this->additionalText = $additionalText; |
207
|
|
|
|
208
|
|
|
return $this; |
209
|
|
|
} |
210
|
|
|
|
211
|
|
|
/** |
212
|
|
|
* @return string |
213
|
|
|
*/ |
214
|
|
|
public function getWeight() |
215
|
|
|
{ |
216
|
|
|
return $this->weight; |
217
|
|
|
} |
218
|
|
|
|
219
|
|
|
/** |
220
|
|
|
* @param string $weight |
221
|
|
|
* |
222
|
|
|
* @return ArticleDetail |
223
|
|
|
*/ |
224
|
|
|
public function setWeight($weight) |
225
|
|
|
{ |
226
|
|
|
$this->weight = $weight; |
227
|
|
|
|
228
|
|
|
return $this; |
229
|
|
|
} |
230
|
|
|
|
231
|
|
|
/** |
232
|
|
|
* @return string |
233
|
|
|
*/ |
234
|
|
|
public function getWidth() |
235
|
|
|
{ |
236
|
|
|
return $this->width; |
237
|
|
|
} |
238
|
|
|
|
239
|
|
|
/** |
240
|
|
|
* @param string $width |
241
|
|
|
* |
242
|
|
|
* @return ArticleDetail |
243
|
|
|
*/ |
244
|
|
|
public function setWidth($width) |
245
|
|
|
{ |
246
|
|
|
$this->width = $width; |
247
|
|
|
|
248
|
|
|
return $this; |
249
|
|
|
} |
250
|
|
|
|
251
|
|
|
/** |
252
|
|
|
* @return string |
253
|
|
|
*/ |
254
|
|
|
public function getLen() |
255
|
|
|
{ |
256
|
|
|
return $this->len; |
257
|
|
|
} |
258
|
|
|
|
259
|
|
|
/** |
260
|
|
|
* @param string $len |
261
|
|
|
* |
262
|
|
|
* @return ArticleDetail |
263
|
|
|
*/ |
264
|
|
|
public function setLen($len) |
265
|
|
|
{ |
266
|
|
|
$this->len = $len; |
267
|
|
|
|
268
|
|
|
return $this; |
269
|
|
|
} |
270
|
|
|
|
271
|
|
|
/** |
272
|
|
|
* @return string |
273
|
|
|
*/ |
274
|
|
|
public function getHeight() |
275
|
|
|
{ |
276
|
|
|
return $this->height; |
277
|
|
|
} |
278
|
|
|
|
279
|
|
|
/** |
280
|
|
|
* @param string $height |
281
|
|
|
* |
282
|
|
|
* @return ArticleDetail |
283
|
|
|
*/ |
284
|
|
|
public function setHeight($height) |
285
|
|
|
{ |
286
|
|
|
$this->height = $height; |
287
|
|
|
|
288
|
|
|
return $this; |
289
|
|
|
} |
290
|
|
|
|
291
|
|
|
/** |
292
|
|
|
* @return string |
293
|
|
|
*/ |
294
|
|
|
public function getEan() |
295
|
|
|
{ |
296
|
|
|
return $this->ean; |
297
|
|
|
} |
298
|
|
|
|
299
|
|
|
/** |
300
|
|
|
* @param string $ean |
301
|
|
|
* |
302
|
|
|
* @return ArticleDetail |
303
|
|
|
*/ |
304
|
|
|
public function setEan($ean) |
305
|
|
|
{ |
306
|
|
|
$this->ean = $ean; |
307
|
|
|
|
308
|
|
|
return $this; |
309
|
|
|
} |
310
|
|
|
|
311
|
|
|
/** |
312
|
|
|
* @return string |
313
|
|
|
*/ |
314
|
|
|
public function getPurchaseUnit() |
315
|
|
|
{ |
316
|
|
|
return $this->purchaseUnit; |
317
|
|
|
} |
318
|
|
|
|
319
|
|
|
/** |
320
|
|
|
* @param string $purchaseUnit |
321
|
|
|
* |
322
|
|
|
* @return ArticleDetail |
323
|
|
|
*/ |
324
|
|
|
public function setPurchaseUnit($purchaseUnit) |
325
|
|
|
{ |
326
|
|
|
$this->purchaseUnit = $purchaseUnit; |
327
|
|
|
|
328
|
|
|
return $this; |
329
|
|
|
} |
330
|
|
|
|
331
|
|
|
/** |
332
|
|
|
* @return string |
333
|
|
|
*/ |
334
|
|
|
public function getDescriptionLong() |
335
|
|
|
{ |
336
|
|
|
return $this->descriptionLong; |
337
|
|
|
} |
338
|
|
|
|
339
|
|
|
/** |
340
|
|
|
* @param string $descriptionLong |
341
|
|
|
* |
342
|
|
|
* @return ArticleDetail |
343
|
|
|
*/ |
344
|
|
|
public function setDescriptionLong($descriptionLong) |
345
|
|
|
{ |
346
|
|
|
$this->descriptionLong = $descriptionLong; |
347
|
|
|
|
348
|
|
|
return $this; |
349
|
|
|
} |
350
|
|
|
|
351
|
|
|
/** |
352
|
|
|
* @return string |
353
|
|
|
*/ |
354
|
|
|
public function getReferenceUnit() |
355
|
|
|
{ |
356
|
|
|
return $this->referenceUnit; |
357
|
|
|
} |
358
|
|
|
|
359
|
|
|
/** |
360
|
|
|
* @param string $referenceUnit |
361
|
|
|
* |
362
|
|
|
* @return ArticleDetail |
363
|
|
|
*/ |
364
|
|
|
public function setReferenceUnit($referenceUnit) |
365
|
|
|
{ |
366
|
|
|
$this->referenceUnit = $referenceUnit; |
367
|
|
|
|
368
|
|
|
return $this; |
369
|
|
|
} |
370
|
|
|
|
371
|
|
|
/** |
372
|
|
|
* @return string |
373
|
|
|
*/ |
374
|
|
|
public function getPackUnit() |
375
|
|
|
{ |
376
|
|
|
return $this->packUnit; |
377
|
|
|
} |
378
|
|
|
|
379
|
|
|
/** |
380
|
|
|
* @param string $packUnit |
381
|
|
|
* |
382
|
|
|
* @return ArticleDetail |
383
|
|
|
*/ |
384
|
|
|
public function setPackUnit($packUnit) |
385
|
|
|
{ |
386
|
|
|
$this->packUnit = $packUnit; |
387
|
|
|
|
388
|
|
|
return $this; |
389
|
|
|
} |
390
|
|
|
|
391
|
|
|
/** |
392
|
|
|
* @return string |
393
|
|
|
*/ |
394
|
|
|
public function getShippingTime() |
395
|
|
|
{ |
396
|
|
|
return $this->shippingTime; |
397
|
|
|
} |
398
|
|
|
|
399
|
|
|
/** |
400
|
|
|
* @param string $shippingTime |
401
|
|
|
* |
402
|
|
|
* @return ArticleDetail |
403
|
|
|
*/ |
404
|
|
|
public function setShippingTime($shippingTime) |
405
|
|
|
{ |
406
|
|
|
$this->shippingTime = $shippingTime; |
407
|
|
|
|
408
|
|
|
return $this; |
409
|
|
|
} |
410
|
|
|
|
411
|
|
|
/** |
412
|
|
|
* @return Price[] |
413
|
|
|
*/ |
414
|
|
|
public function getPrices() |
415
|
|
|
{ |
416
|
|
|
return $this->prices; |
417
|
|
|
} |
418
|
|
|
|
419
|
|
|
/** |
420
|
|
|
* @param Price[] $prices |
421
|
|
|
* |
422
|
|
|
* @return ArticleDetail |
423
|
|
|
*/ |
424
|
|
|
public function setPrices($prices) |
425
|
|
|
{ |
426
|
|
|
$this->prices = $prices; |
427
|
|
|
|
428
|
|
|
return $this; |
429
|
|
|
} |
430
|
|
|
|
431
|
|
|
/** |
432
|
|
|
* @return ConfiguratorOption[] |
433
|
|
|
*/ |
434
|
|
|
public function getConfiguratorOptions() |
435
|
|
|
{ |
436
|
|
|
return $this->configuratorOptions; |
437
|
|
|
} |
438
|
|
|
|
439
|
|
|
/** |
440
|
|
|
* @param ConfiguratorOption[] $configuratorOptions |
441
|
|
|
* |
442
|
|
|
* @return ArticleDetail |
443
|
|
|
*/ |
444
|
|
|
public function setConfiguratorOptions($configuratorOptions) |
445
|
|
|
{ |
446
|
|
|
$this->configuratorOptions = $configuratorOptions; |
447
|
|
|
|
448
|
|
|
return $this; |
449
|
|
|
} |
450
|
|
|
|
451
|
|
|
/** |
452
|
|
|
* @return ArticleAttribute |
453
|
|
|
*/ |
454
|
|
|
public function getAttributes() |
455
|
|
|
{ |
456
|
|
|
return $this->attribute; |
457
|
|
|
} |
458
|
|
|
|
459
|
|
|
/** |
460
|
|
|
* @param ArticleAttribute $attribute |
461
|
|
|
* |
462
|
|
|
* @return ArticleDetail |
463
|
|
|
*/ |
464
|
|
|
public function setAttributes($attribute) |
465
|
|
|
{ |
466
|
|
|
$this->attribute = $attribute; |
467
|
|
|
|
468
|
|
|
return $this; |
469
|
|
|
} |
470
|
|
|
|
471
|
|
|
/** |
472
|
|
|
* @return int |
473
|
|
|
*/ |
474
|
|
|
public function getArticleId() |
475
|
|
|
{ |
476
|
|
|
return $this->articleId; |
477
|
|
|
} |
478
|
|
|
|
479
|
|
|
/** |
480
|
|
|
* @param int $articleId |
481
|
|
|
* |
482
|
|
|
* @return ArticleDetail |
483
|
|
|
*/ |
484
|
|
|
public function setArticleId($articleId) |
485
|
|
|
{ |
486
|
|
|
$this->articleId = $articleId; |
487
|
|
|
|
488
|
|
|
return $this; |
489
|
|
|
} |
490
|
|
|
|
491
|
|
|
/** |
492
|
|
|
* @return int |
493
|
|
|
*/ |
494
|
|
|
public function getUnitId() |
495
|
|
|
{ |
496
|
|
|
return $this->unitId; |
497
|
|
|
} |
498
|
|
|
|
499
|
|
|
/** |
500
|
|
|
* @param int $unitId |
501
|
|
|
* |
502
|
|
|
* @return ArticleDetail |
503
|
|
|
*/ |
504
|
|
|
public function setUnitId($unitId) |
505
|
|
|
{ |
506
|
|
|
$this->unitId = $unitId; |
507
|
|
|
|
508
|
|
|
return $this; |
509
|
|
|
} |
510
|
|
|
|
511
|
|
|
/** |
512
|
|
|
* @return int |
513
|
|
|
*/ |
514
|
|
|
public function getKind() |
515
|
|
|
{ |
516
|
|
|
return $this->kind; |
517
|
|
|
} |
518
|
|
|
|
519
|
|
|
/** |
520
|
|
|
* @param int $kind |
521
|
|
|
* |
522
|
|
|
* @return ArticleDetail |
523
|
|
|
*/ |
524
|
|
|
public function setKind($kind) |
525
|
|
|
{ |
526
|
|
|
$this->kind = $kind; |
527
|
|
|
|
528
|
|
|
return $this; |
529
|
|
|
} |
530
|
|
|
|
531
|
|
|
/** |
532
|
|
|
* @return int |
533
|
|
|
*/ |
534
|
|
|
public function getInStock() |
535
|
|
|
{ |
536
|
|
|
return $this->inStock; |
537
|
|
|
} |
538
|
|
|
|
539
|
|
|
/** |
540
|
|
|
* @param int $inStock |
541
|
|
|
* |
542
|
|
|
* @return ArticleDetail |
543
|
|
|
*/ |
544
|
|
|
public function setInStock($inStock) |
545
|
|
|
{ |
546
|
|
|
$this->inStock = $inStock; |
547
|
|
|
|
548
|
|
|
return $this; |
549
|
|
|
} |
550
|
|
|
|
551
|
|
|
/** |
552
|
|
|
* @return int |
553
|
|
|
*/ |
554
|
|
|
public function getPosition() |
555
|
|
|
{ |
556
|
|
|
return $this->position; |
557
|
|
|
} |
558
|
|
|
|
559
|
|
|
/** |
560
|
|
|
* @param int $position |
561
|
|
|
* |
562
|
|
|
* @return ArticleDetail |
563
|
|
|
*/ |
564
|
|
|
public function setPosition($position) |
565
|
|
|
{ |
566
|
|
|
$this->position = $position; |
567
|
|
|
|
568
|
|
|
return $this; |
569
|
|
|
} |
570
|
|
|
|
571
|
|
|
/** |
572
|
|
|
* @return int |
573
|
|
|
*/ |
574
|
|
|
public function getMinPurchase() |
575
|
|
|
{ |
576
|
|
|
return $this->minPurchase; |
577
|
|
|
} |
578
|
|
|
|
579
|
|
|
/** |
580
|
|
|
* @param int $minPurchase |
581
|
|
|
* |
582
|
|
|
* @return ArticleDetail |
583
|
|
|
*/ |
584
|
|
|
public function setMinPurchase($minPurchase) |
585
|
|
|
{ |
586
|
|
|
$this->minPurchase = $minPurchase; |
587
|
|
|
|
588
|
|
|
return $this; |
589
|
|
|
} |
590
|
|
|
|
591
|
|
|
/** |
592
|
|
|
* @return int |
593
|
|
|
*/ |
594
|
|
|
public function getPurchaseSteps() |
595
|
|
|
{ |
596
|
|
|
return $this->purchaseSteps; |
597
|
|
|
} |
598
|
|
|
|
599
|
|
|
/** |
600
|
|
|
* @param int $purchaseSteps |
601
|
|
|
* |
602
|
|
|
* @return ArticleDetail |
603
|
|
|
*/ |
604
|
|
|
public function setPurchaseSteps($purchaseSteps) |
605
|
|
|
{ |
606
|
|
|
$this->purchaseSteps = $purchaseSteps; |
607
|
|
|
|
608
|
|
|
return $this; |
609
|
|
|
} |
610
|
|
|
|
611
|
|
|
/** |
612
|
|
|
* @return int |
613
|
|
|
*/ |
614
|
|
|
public function getMaxPurchase() |
615
|
|
|
{ |
616
|
|
|
return $this->maxPurchase; |
617
|
|
|
} |
618
|
|
|
|
619
|
|
|
/** |
620
|
|
|
* @param int $maxPurchase |
621
|
|
|
* |
622
|
|
|
* @return ArticleDetail |
623
|
|
|
*/ |
624
|
|
|
public function setMaxPurchase($maxPurchase) |
625
|
|
|
{ |
626
|
|
|
$this->maxPurchase = $maxPurchase; |
627
|
|
|
|
628
|
|
|
return $this; |
629
|
|
|
} |
630
|
|
|
|
631
|
|
|
/** |
632
|
|
|
* @return string |
633
|
|
|
*/ |
634
|
|
|
public function getReleaseDate() |
635
|
|
|
{ |
636
|
|
|
return $this->releaseDate; |
637
|
|
|
} |
638
|
|
|
|
639
|
|
|
/** |
640
|
|
|
* @param string $releaseDate |
641
|
|
|
* |
642
|
|
|
* @return ArticleDetail |
643
|
|
|
*/ |
644
|
|
|
public function setReleaseDate($releaseDate) |
645
|
|
|
{ |
646
|
|
|
$this->releaseDate = $releaseDate; |
647
|
|
|
|
648
|
|
|
return $this; |
649
|
|
|
} |
650
|
|
|
|
651
|
|
|
/** |
652
|
|
|
* @return bool |
653
|
|
|
*/ |
654
|
|
|
public function isActive() |
655
|
|
|
{ |
656
|
|
|
return $this->active; |
657
|
|
|
} |
658
|
|
|
|
659
|
|
|
/** |
660
|
|
|
* @param bool $active |
661
|
|
|
* |
662
|
|
|
* @return ArticleDetail |
663
|
|
|
*/ |
664
|
|
|
public function setActive($active) |
665
|
|
|
{ |
666
|
|
|
$this->active = $active; |
667
|
|
|
|
668
|
|
|
return $this; |
669
|
|
|
} |
670
|
|
|
|
671
|
|
|
/** |
672
|
|
|
* @return bool |
673
|
|
|
*/ |
674
|
|
|
public function isShippingFree() |
675
|
|
|
{ |
676
|
|
|
return $this->shippingFree; |
677
|
|
|
} |
678
|
|
|
|
679
|
|
|
/** |
680
|
|
|
* @param bool $shippingFree |
681
|
|
|
* |
682
|
|
|
* @return ArticleDetail |
683
|
|
|
*/ |
684
|
|
|
public function setShippingFree($shippingFree) |
685
|
|
|
{ |
686
|
|
|
$this->shippingFree = $shippingFree; |
687
|
|
|
|
688
|
|
|
return $this; |
689
|
|
|
} |
690
|
|
|
} |
691
|
|
|
|