commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-import
src
Models
ProductSelections
VariantSelectionModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Import\Models\ProductSelections
;
10
11
use
Commercetools\Base\DateTimeImmutableCollection
;
12
use
Commercetools\Base\JsonObject
;
13
use
Commercetools\Base\JsonObjectModel
;
14
use
Commercetools\Base\MapperFactory
;
15
use stdClass;
16
20
final
class
VariantSelectionModel
extends
JsonObjectModel
implements
VariantSelection
21
{
26
protected
$type
;
27
32
protected
$skus
;
33
34
38
public
function
__construct
(
39
?
string
$type
=
null
,
40
?array
$skus
=
null
41
) {
42
$this->type =
$type
;
43
$this->skus =
$skus
;
44
}
45
52
public
function
getType
()
53
{
54
if
(is_null($this->type)) {
56
$data = $this->
raw
(self::FIELD_TYPE);
57
if
(is_null($data)) {
58
return
null
;
59
}
60
$this->type = (string) $data;
61
}
62
63
return
$this->type
;
64
}
65
72
public
function
getSkus
()
73
{
74
if
(is_null($this->skus)) {
76
$data = $this->
raw
(self::FIELD_SKUS);
77
if
(is_null($data)) {
78
return
null
;
79
}
80
$this->skus = $data;
81
}
82
83
return
$this->skus
;
84
}
85
86
90
public
function
setType
(?
string
$type
): void
91
{
92
$this->type =
$type
;
93
}
94
98
public
function
setSkus
(?array
$skus
): void
99
{
100
$this->skus =
$skus
;
101
}
102
}
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition
BaseJsonObject.php:57
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Import\Models\ProductSelections\VariantSelectionModel
Definition
VariantSelectionModel.php:21
Commercetools\Import\Models\ProductSelections\VariantSelectionModel\setSkus
setSkus(?array $skus)
Definition
VariantSelectionModel.php:98
Commercetools\Import\Models\ProductSelections\VariantSelectionModel\setType
setType(?string $type)
Definition
VariantSelectionModel.php:90
Commercetools\Import\Models\ProductSelections\VariantSelectionModel\$type
$type
Definition
VariantSelectionModel.php:26
Commercetools\Import\Models\ProductSelections\VariantSelectionModel\$skus
$skus
Definition
VariantSelectionModel.php:32
Commercetools\Import\Models\ProductSelections\VariantSelectionModel\__construct
__construct(?string $type=null, ?array $skus=null)
Definition
VariantSelectionModel.php:38
Commercetools\Import\Models\ProductSelections\VariantSelectionModel\getSkus
getSkus()
Definition
VariantSelectionModel.php:72
Commercetools\Import\Models\ProductSelections\VariantSelectionModel\getType
getType()
Definition
VariantSelectionModel.php:52
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Import\Models\ProductSelections\VariantSelection
Definition
VariantSelection.php:15
Commercetools\Import\Models\ProductSelections
Definition
ProductSelectionAssignment.php:9
Generated by
1.9.8