1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Starweb\Api\Generated\Model; |
4
|
|
|
|
5
|
|
|
class ProductModelPatchable |
6
|
|
|
{ |
7
|
|
|
/** |
8
|
|
|
* The external id of this pricelist |
9
|
|
|
* |
10
|
|
|
* @var string|null |
11
|
|
|
*/ |
12
|
|
|
protected $externalId = ''; |
13
|
|
|
/** |
14
|
|
|
* The system name the externalId belongs to. |
15
|
|
|
* |
16
|
|
|
* @var string|null |
17
|
|
|
*/ |
18
|
|
|
protected $externalIdType; |
19
|
|
|
/** |
20
|
|
|
* A timestamp of when the product was created. The time should be formatted using ISO-8601 |
21
|
|
|
* |
22
|
|
|
* @var string|null |
23
|
|
|
*/ |
24
|
|
|
protected $createdAt; |
25
|
|
|
/** |
26
|
|
|
* The default vat rate for this product. Will fall back to shop default if null. To fetch country specific vat rates, please use include=vatRates or use the /products/x/vat-rates endpoint. |
27
|
|
|
* |
28
|
|
|
* @var string|null |
29
|
|
|
*/ |
30
|
|
|
protected $defaultVatRate; |
31
|
|
|
/** |
32
|
|
|
* The visibility of this product. Supported values are: hidden, visible, pricelists |
33
|
|
|
* |
34
|
|
|
* @var string|null |
35
|
|
|
*/ |
36
|
|
|
protected $visibility = 'hidden'; |
37
|
|
|
/** |
38
|
|
|
* The ID´s of the pricelists that the product should be visible for. Is required for when ”visibility” is set to ”pricelists” but should never be populated otherwise |
39
|
|
|
* |
40
|
|
|
* @var int[]|null |
41
|
|
|
*/ |
42
|
|
|
protected $visibilityPricelistIds; |
43
|
|
|
/** |
44
|
|
|
* A valid URL to a web page with more information for this product |
45
|
|
|
* |
46
|
|
|
* @var string|null |
47
|
|
|
*/ |
48
|
|
|
protected $moreInfoUrl; |
49
|
|
|
/** |
50
|
|
|
* The id of the manufacturer to use for this product. Fetch and handle available manufacturers using the /product-manufacturers endpoint |
51
|
|
|
* |
52
|
|
|
* @var int|null |
53
|
|
|
*/ |
54
|
|
|
protected $manufacturerId; |
55
|
|
|
/** |
56
|
|
|
* The id of the unit to use for this product if not standard. Fetch and handle available units using the /product-units endpoint |
57
|
|
|
* |
58
|
|
|
* @var int|null |
59
|
|
|
*/ |
60
|
|
|
protected $unitId; |
61
|
|
|
/** |
62
|
|
|
* Sort index for this product in a list |
63
|
|
|
* |
64
|
|
|
* @var int|null |
65
|
|
|
*/ |
66
|
|
|
protected $sortIndex; |
67
|
|
|
/** |
68
|
|
|
* The type of product. Either ”basic” or ”bundle”. Default is ”basic” |
69
|
|
|
* |
70
|
|
|
* @var string|null |
71
|
|
|
*/ |
72
|
|
|
protected $type; |
73
|
|
|
/** |
74
|
|
|
* Should this product be watchable for customers when it is back in stock? |
75
|
|
|
* |
76
|
|
|
* @var bool|null |
77
|
|
|
*/ |
78
|
|
|
protected $isBackInStockWatchable = true; |
79
|
|
|
/** |
80
|
|
|
* Should all bundled products have a manually entered price? Only applies if type is bundle |
81
|
|
|
* |
82
|
|
|
* @var bool|null |
83
|
|
|
*/ |
84
|
|
|
protected $bundleUseManualPrice; |
85
|
|
|
/** |
86
|
|
|
* Account number for managing accounting on product level |
87
|
|
|
* |
88
|
|
|
* @var int|null |
89
|
|
|
*/ |
90
|
|
|
protected $accounting; |
91
|
|
|
/** |
92
|
|
|
* A collection of media files |
93
|
|
|
* |
94
|
|
|
* @var ProductMediaFileLinkModel[]|null |
95
|
|
|
*/ |
96
|
|
|
protected $mediaFiles; |
97
|
|
|
/** |
98
|
|
|
* A collection of product languages |
99
|
|
|
* |
100
|
|
|
* @var ProductLanguageModel[]|null |
101
|
|
|
*/ |
102
|
|
|
protected $languages; |
103
|
|
|
/** |
104
|
|
|
* A collection of country specific vat rates |
105
|
|
|
* |
106
|
|
|
* @var ProductVatRateModel[]|null |
107
|
|
|
*/ |
108
|
|
|
protected $vatRates; |
109
|
|
|
/** |
110
|
|
|
* A collection of categories |
111
|
|
|
* |
112
|
|
|
* @var ProductCategoryLinkModel[]|null |
113
|
|
|
*/ |
114
|
|
|
protected $categories; |
115
|
|
|
/** |
116
|
|
|
* A collection of meta data |
117
|
|
|
* |
118
|
|
|
* @var ProductMetaDataModelUpdatable[]|null |
119
|
|
|
*/ |
120
|
|
|
protected $metaData; |
121
|
|
|
/** |
122
|
|
|
* The external id of this pricelist |
123
|
|
|
* |
124
|
|
|
* @return string|null |
125
|
|
|
*/ |
126
|
|
|
public function getExternalId() : ?string |
127
|
|
|
{ |
128
|
|
|
return $this->externalId; |
129
|
|
|
} |
130
|
|
|
/** |
131
|
|
|
* The external id of this pricelist |
132
|
|
|
* |
133
|
|
|
* @param string|null $externalId |
134
|
|
|
* |
135
|
|
|
* @return self |
136
|
|
|
*/ |
137
|
|
|
public function setExternalId(?string $externalId) : self |
138
|
|
|
{ |
139
|
|
|
$this->externalId = $externalId; |
140
|
|
|
return $this; |
141
|
|
|
} |
142
|
|
|
/** |
143
|
|
|
* The system name the externalId belongs to. |
144
|
|
|
* |
145
|
|
|
* @return string|null |
146
|
|
|
*/ |
147
|
|
|
public function getExternalIdType() : ?string |
148
|
|
|
{ |
149
|
|
|
return $this->externalIdType; |
150
|
|
|
} |
151
|
|
|
/** |
152
|
|
|
* The system name the externalId belongs to. |
153
|
|
|
* |
154
|
|
|
* @param string|null $externalIdType |
155
|
|
|
* |
156
|
|
|
* @return self |
157
|
|
|
*/ |
158
|
|
|
public function setExternalIdType(?string $externalIdType) : self |
159
|
|
|
{ |
160
|
|
|
$this->externalIdType = $externalIdType; |
161
|
|
|
return $this; |
162
|
|
|
} |
163
|
|
|
/** |
164
|
|
|
* A timestamp of when the product was created. The time should be formatted using ISO-8601 |
165
|
|
|
* |
166
|
|
|
* @return string|null |
167
|
|
|
*/ |
168
|
|
|
public function getCreatedAt() : ?string |
169
|
|
|
{ |
170
|
|
|
return $this->createdAt; |
171
|
|
|
} |
172
|
|
|
/** |
173
|
|
|
* A timestamp of when the product was created. The time should be formatted using ISO-8601 |
174
|
|
|
* |
175
|
|
|
* @param string|null $createdAt |
176
|
|
|
* |
177
|
|
|
* @return self |
178
|
|
|
*/ |
179
|
|
|
public function setCreatedAt(?string $createdAt) : self |
180
|
|
|
{ |
181
|
|
|
$this->createdAt = $createdAt; |
182
|
|
|
return $this; |
183
|
|
|
} |
184
|
|
|
/** |
185
|
|
|
* The default vat rate for this product. Will fall back to shop default if null. To fetch country specific vat rates, please use include=vatRates or use the /products/x/vat-rates endpoint. |
186
|
|
|
* |
187
|
|
|
* @return string|null |
188
|
|
|
*/ |
189
|
|
|
public function getDefaultVatRate() : ?string |
190
|
|
|
{ |
191
|
|
|
return $this->defaultVatRate; |
192
|
|
|
} |
193
|
|
|
/** |
194
|
|
|
* The default vat rate for this product. Will fall back to shop default if null. To fetch country specific vat rates, please use include=vatRates or use the /products/x/vat-rates endpoint. |
195
|
|
|
* |
196
|
|
|
* @param string|null $defaultVatRate |
197
|
|
|
* |
198
|
|
|
* @return self |
199
|
|
|
*/ |
200
|
|
|
public function setDefaultVatRate(?string $defaultVatRate) : self |
201
|
|
|
{ |
202
|
|
|
$this->defaultVatRate = $defaultVatRate; |
203
|
|
|
return $this; |
204
|
|
|
} |
205
|
|
|
/** |
206
|
|
|
* The visibility of this product. Supported values are: hidden, visible, pricelists |
207
|
|
|
* |
208
|
|
|
* @return string|null |
209
|
|
|
*/ |
210
|
|
|
public function getVisibility() : ?string |
211
|
|
|
{ |
212
|
|
|
return $this->visibility; |
213
|
|
|
} |
214
|
|
|
/** |
215
|
|
|
* The visibility of this product. Supported values are: hidden, visible, pricelists |
216
|
|
|
* |
217
|
|
|
* @param string|null $visibility |
218
|
|
|
* |
219
|
|
|
* @return self |
220
|
|
|
*/ |
221
|
|
|
public function setVisibility(?string $visibility) : self |
222
|
|
|
{ |
223
|
|
|
$this->visibility = $visibility; |
224
|
|
|
return $this; |
225
|
|
|
} |
226
|
|
|
/** |
227
|
|
|
* The ID´s of the pricelists that the product should be visible for. Is required for when ”visibility” is set to ”pricelists” but should never be populated otherwise |
228
|
|
|
* |
229
|
|
|
* @return int[]|null |
230
|
|
|
*/ |
231
|
|
|
public function getVisibilityPricelistIds() : ?array |
232
|
|
|
{ |
233
|
|
|
return $this->visibilityPricelistIds; |
234
|
|
|
} |
235
|
|
|
/** |
236
|
|
|
* The ID´s of the pricelists that the product should be visible for. Is required for when ”visibility” is set to ”pricelists” but should never be populated otherwise |
237
|
|
|
* |
238
|
|
|
* @param int[]|null $visibilityPricelistIds |
239
|
|
|
* |
240
|
|
|
* @return self |
241
|
|
|
*/ |
242
|
|
|
public function setVisibilityPricelistIds(?array $visibilityPricelistIds) : self |
243
|
|
|
{ |
244
|
|
|
$this->visibilityPricelistIds = $visibilityPricelistIds; |
245
|
|
|
return $this; |
246
|
|
|
} |
247
|
|
|
/** |
248
|
|
|
* A valid URL to a web page with more information for this product |
249
|
|
|
* |
250
|
|
|
* @return string|null |
251
|
|
|
*/ |
252
|
|
|
public function getMoreInfoUrl() : ?string |
253
|
|
|
{ |
254
|
|
|
return $this->moreInfoUrl; |
255
|
|
|
} |
256
|
|
|
/** |
257
|
|
|
* A valid URL to a web page with more information for this product |
258
|
|
|
* |
259
|
|
|
* @param string|null $moreInfoUrl |
260
|
|
|
* |
261
|
|
|
* @return self |
262
|
|
|
*/ |
263
|
|
|
public function setMoreInfoUrl(?string $moreInfoUrl) : self |
264
|
|
|
{ |
265
|
|
|
$this->moreInfoUrl = $moreInfoUrl; |
266
|
|
|
return $this; |
267
|
|
|
} |
268
|
|
|
/** |
269
|
|
|
* The id of the manufacturer to use for this product. Fetch and handle available manufacturers using the /product-manufacturers endpoint |
270
|
|
|
* |
271
|
|
|
* @return int|null |
272
|
|
|
*/ |
273
|
|
|
public function getManufacturerId() : ?int |
274
|
|
|
{ |
275
|
|
|
return $this->manufacturerId; |
276
|
|
|
} |
277
|
|
|
/** |
278
|
|
|
* The id of the manufacturer to use for this product. Fetch and handle available manufacturers using the /product-manufacturers endpoint |
279
|
|
|
* |
280
|
|
|
* @param int|null $manufacturerId |
281
|
|
|
* |
282
|
|
|
* @return self |
283
|
|
|
*/ |
284
|
|
|
public function setManufacturerId(?int $manufacturerId) : self |
285
|
|
|
{ |
286
|
|
|
$this->manufacturerId = $manufacturerId; |
287
|
|
|
return $this; |
288
|
|
|
} |
289
|
|
|
/** |
290
|
|
|
* The id of the unit to use for this product if not standard. Fetch and handle available units using the /product-units endpoint |
291
|
|
|
* |
292
|
|
|
* @return int|null |
293
|
|
|
*/ |
294
|
|
|
public function getUnitId() : ?int |
295
|
|
|
{ |
296
|
|
|
return $this->unitId; |
297
|
|
|
} |
298
|
|
|
/** |
299
|
|
|
* The id of the unit to use for this product if not standard. Fetch and handle available units using the /product-units endpoint |
300
|
|
|
* |
301
|
|
|
* @param int|null $unitId |
302
|
|
|
* |
303
|
|
|
* @return self |
304
|
|
|
*/ |
305
|
|
|
public function setUnitId(?int $unitId) : self |
306
|
|
|
{ |
307
|
|
|
$this->unitId = $unitId; |
308
|
|
|
return $this; |
309
|
|
|
} |
310
|
|
|
/** |
311
|
|
|
* Sort index for this product in a list |
312
|
|
|
* |
313
|
|
|
* @return int|null |
314
|
|
|
*/ |
315
|
|
|
public function getSortIndex() : ?int |
316
|
|
|
{ |
317
|
|
|
return $this->sortIndex; |
318
|
|
|
} |
319
|
|
|
/** |
320
|
|
|
* Sort index for this product in a list |
321
|
|
|
* |
322
|
|
|
* @param int|null $sortIndex |
323
|
|
|
* |
324
|
|
|
* @return self |
325
|
|
|
*/ |
326
|
|
|
public function setSortIndex(?int $sortIndex) : self |
327
|
|
|
{ |
328
|
|
|
$this->sortIndex = $sortIndex; |
329
|
|
|
return $this; |
330
|
|
|
} |
331
|
|
|
/** |
332
|
|
|
* The type of product. Either ”basic” or ”bundle”. Default is ”basic” |
333
|
|
|
* |
334
|
|
|
* @return string|null |
335
|
|
|
*/ |
336
|
|
|
public function getType() : ?string |
337
|
|
|
{ |
338
|
|
|
return $this->type; |
339
|
|
|
} |
340
|
|
|
/** |
341
|
|
|
* The type of product. Either ”basic” or ”bundle”. Default is ”basic” |
342
|
|
|
* |
343
|
|
|
* @param string|null $type |
344
|
|
|
* |
345
|
|
|
* @return self |
346
|
|
|
*/ |
347
|
|
|
public function setType(?string $type) : self |
348
|
|
|
{ |
349
|
|
|
$this->type = $type; |
350
|
|
|
return $this; |
351
|
|
|
} |
352
|
|
|
/** |
353
|
|
|
* Should this product be watchable for customers when it is back in stock? |
354
|
|
|
* |
355
|
|
|
* @return bool|null |
356
|
|
|
*/ |
357
|
|
|
public function getIsBackInStockWatchable() : ?bool |
358
|
|
|
{ |
359
|
|
|
return $this->isBackInStockWatchable; |
360
|
|
|
} |
361
|
|
|
/** |
362
|
|
|
* Should this product be watchable for customers when it is back in stock? |
363
|
|
|
* |
364
|
|
|
* @param bool|null $isBackInStockWatchable |
365
|
|
|
* |
366
|
|
|
* @return self |
367
|
|
|
*/ |
368
|
|
|
public function setIsBackInStockWatchable(?bool $isBackInStockWatchable) : self |
369
|
|
|
{ |
370
|
|
|
$this->isBackInStockWatchable = $isBackInStockWatchable; |
371
|
|
|
return $this; |
372
|
|
|
} |
373
|
|
|
/** |
374
|
|
|
* Should all bundled products have a manually entered price? Only applies if type is bundle |
375
|
|
|
* |
376
|
|
|
* @return bool|null |
377
|
|
|
*/ |
378
|
|
|
public function getBundleUseManualPrice() : ?bool |
379
|
|
|
{ |
380
|
|
|
return $this->bundleUseManualPrice; |
381
|
|
|
} |
382
|
|
|
/** |
383
|
|
|
* Should all bundled products have a manually entered price? Only applies if type is bundle |
384
|
|
|
* |
385
|
|
|
* @param bool|null $bundleUseManualPrice |
386
|
|
|
* |
387
|
|
|
* @return self |
388
|
|
|
*/ |
389
|
|
|
public function setBundleUseManualPrice(?bool $bundleUseManualPrice) : self |
390
|
|
|
{ |
391
|
|
|
$this->bundleUseManualPrice = $bundleUseManualPrice; |
392
|
|
|
return $this; |
393
|
|
|
} |
394
|
|
|
/** |
395
|
|
|
* Account number for managing accounting on product level |
396
|
|
|
* |
397
|
|
|
* @return int|null |
398
|
|
|
*/ |
399
|
|
|
public function getAccounting() : ?int |
400
|
|
|
{ |
401
|
|
|
return $this->accounting; |
402
|
|
|
} |
403
|
|
|
/** |
404
|
|
|
* Account number for managing accounting on product level |
405
|
|
|
* |
406
|
|
|
* @param int|null $accounting |
407
|
|
|
* |
408
|
|
|
* @return self |
409
|
|
|
*/ |
410
|
|
|
public function setAccounting(?int $accounting) : self |
411
|
|
|
{ |
412
|
|
|
$this->accounting = $accounting; |
413
|
|
|
return $this; |
414
|
|
|
} |
415
|
|
|
/** |
416
|
|
|
* A collection of media files |
417
|
|
|
* |
418
|
|
|
* @return ProductMediaFileLinkModel[]|null |
419
|
|
|
*/ |
420
|
|
|
public function getMediaFiles() : ?array |
421
|
|
|
{ |
422
|
|
|
return $this->mediaFiles; |
423
|
|
|
} |
424
|
|
|
/** |
425
|
|
|
* A collection of media files |
426
|
|
|
* |
427
|
|
|
* @param ProductMediaFileLinkModel[]|null $mediaFiles |
428
|
|
|
* |
429
|
|
|
* @return self |
430
|
|
|
*/ |
431
|
|
|
public function setMediaFiles(?array $mediaFiles) : self |
432
|
|
|
{ |
433
|
|
|
$this->mediaFiles = $mediaFiles; |
434
|
|
|
return $this; |
435
|
|
|
} |
436
|
|
|
/** |
437
|
|
|
* A collection of product languages |
438
|
|
|
* |
439
|
|
|
* @return ProductLanguageModel[]|null |
440
|
|
|
*/ |
441
|
|
|
public function getLanguages() : ?array |
442
|
|
|
{ |
443
|
|
|
return $this->languages; |
444
|
|
|
} |
445
|
|
|
/** |
446
|
|
|
* A collection of product languages |
447
|
|
|
* |
448
|
|
|
* @param ProductLanguageModel[]|null $languages |
449
|
|
|
* |
450
|
|
|
* @return self |
451
|
|
|
*/ |
452
|
|
|
public function setLanguages(?array $languages) : self |
453
|
|
|
{ |
454
|
|
|
$this->languages = $languages; |
455
|
|
|
return $this; |
456
|
|
|
} |
457
|
|
|
/** |
458
|
|
|
* A collection of country specific vat rates |
459
|
|
|
* |
460
|
|
|
* @return ProductVatRateModel[]|null |
461
|
|
|
*/ |
462
|
|
|
public function getVatRates() : ?array |
463
|
|
|
{ |
464
|
|
|
return $this->vatRates; |
465
|
|
|
} |
466
|
|
|
/** |
467
|
|
|
* A collection of country specific vat rates |
468
|
|
|
* |
469
|
|
|
* @param ProductVatRateModel[]|null $vatRates |
470
|
|
|
* |
471
|
|
|
* @return self |
472
|
|
|
*/ |
473
|
|
|
public function setVatRates(?array $vatRates) : self |
474
|
|
|
{ |
475
|
|
|
$this->vatRates = $vatRates; |
476
|
|
|
return $this; |
477
|
|
|
} |
478
|
|
|
/** |
479
|
|
|
* A collection of categories |
480
|
|
|
* |
481
|
|
|
* @return ProductCategoryLinkModel[]|null |
482
|
|
|
*/ |
483
|
|
|
public function getCategories() : ?array |
484
|
|
|
{ |
485
|
|
|
return $this->categories; |
486
|
|
|
} |
487
|
|
|
/** |
488
|
|
|
* A collection of categories |
489
|
|
|
* |
490
|
|
|
* @param ProductCategoryLinkModel[]|null $categories |
491
|
|
|
* |
492
|
|
|
* @return self |
493
|
|
|
*/ |
494
|
|
|
public function setCategories(?array $categories) : self |
495
|
|
|
{ |
496
|
|
|
$this->categories = $categories; |
497
|
|
|
return $this; |
498
|
|
|
} |
499
|
|
|
/** |
500
|
|
|
* A collection of meta data |
501
|
|
|
* |
502
|
|
|
* @return ProductMetaDataModelUpdatable[]|null |
503
|
|
|
*/ |
504
|
|
|
public function getMetaData() : ?array |
505
|
|
|
{ |
506
|
|
|
return $this->metaData; |
507
|
|
|
} |
508
|
|
|
/** |
509
|
|
|
* A collection of meta data |
510
|
|
|
* |
511
|
|
|
* @param ProductMetaDataModelUpdatable[]|null $metaData |
512
|
|
|
* |
513
|
|
|
* @return self |
514
|
|
|
*/ |
515
|
|
|
public function setMetaData(?array $metaData) : self |
516
|
|
|
{ |
517
|
|
|
$this->metaData = $metaData; |
518
|
|
|
return $this; |
519
|
|
|
} |
520
|
|
|
} |