commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-api
src
Models
ProductSelection
AssignedProductSelectionBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\ProductSelection
;
10
11
use
Commercetools\Base\Builder
;
12
use
Commercetools\Base\DateTimeImmutableCollection
;
13
use
Commercetools\Base\JsonObject
;
14
use
Commercetools\Base\JsonObjectModel
;
15
use
Commercetools\Base\MapperFactory
;
16
use DateTimeImmutable;
17
use stdClass;
18
22
final
class
AssignedProductSelectionBuilder
implements
Builder
23
{
28
private
$productSelection;
29
34
private
$variantSelection;
35
40
private
$variantExclusion;
41
46
private
$createdAt;
47
54
public
function
getProductSelection
()
55
{
56
return
$this->productSelection instanceof
ProductSelectionReferenceBuilder
? $this->productSelection->
build
() : $this->productSelection;
57
}
58
66
public
function
getVariantSelection
()
67
{
68
return
$this->variantSelection instanceof
ProductVariantSelectionBuilder
? $this->variantSelection->
build
() : $this->variantSelection;
69
}
70
78
public
function
getVariantExclusion
()
79
{
80
return
$this->variantExclusion instanceof
ProductVariantExclusionBuilder
? $this->variantExclusion->
build
() : $this->variantExclusion;
81
}
82
89
public
function
getCreatedAt
()
90
{
91
return
$this->createdAt;
92
}
93
98
public
function
withProductSelection
(?
ProductSelectionReference
$productSelection)
99
{
100
$this->productSelection = $productSelection;
101
102
return
$this;
103
}
104
109
public
function
withVariantSelection
(?
ProductVariantSelection
$variantSelection)
110
{
111
$this->variantSelection = $variantSelection;
112
113
return
$this;
114
}
115
120
public
function
withVariantExclusion
(?
ProductVariantExclusion
$variantExclusion)
121
{
122
$this->variantExclusion = $variantExclusion;
123
124
return
$this;
125
}
126
131
public
function
withCreatedAt
(?DateTimeImmutable $createdAt)
132
{
133
$this->createdAt = $createdAt;
134
135
return
$this;
136
}
137
142
public
function
withProductSelectionBuilder
(?
ProductSelectionReferenceBuilder
$productSelection)
143
{
144
$this->productSelection = $productSelection;
145
146
return
$this;
147
}
148
153
public
function
withVariantSelectionBuilder
(?
ProductVariantSelectionBuilder
$variantSelection)
154
{
155
$this->variantSelection = $variantSelection;
156
157
return
$this;
158
}
159
164
public
function
withVariantExclusionBuilder
(?
ProductVariantExclusionBuilder
$variantExclusion)
165
{
166
$this->variantExclusion = $variantExclusion;
167
168
return
$this;
169
}
170
171
public
function
build
():
AssignedProductSelection
172
{
173
return
new
AssignedProductSelectionModel
(
174
$this->productSelection instanceof
ProductSelectionReferenceBuilder
? $this->productSelection->
build
() : $this->productSelection,
175
$this->variantSelection instanceof
ProductVariantSelectionBuilder
? $this->variantSelection->
build
() : $this->variantSelection,
176
$this->variantExclusion instanceof
ProductVariantExclusionBuilder
? $this->variantExclusion->
build
() : $this->variantExclusion,
177
$this->createdAt
178
);
179
}
180
181
public
static
function
of
():
AssignedProductSelectionBuilder
182
{
183
return
new
self
();
184
}
185
}
Commercetools\Api\Models\ProductSelection\AssignedProductSelectionBuilder
Definition
AssignedProductSelectionBuilder.php:23
Commercetools\Api\Models\ProductSelection\AssignedProductSelectionBuilder\withVariantSelectionBuilder
withVariantSelectionBuilder(?ProductVariantSelectionBuilder $variantSelection)
Definition
AssignedProductSelectionBuilder.php:153
Commercetools\Api\Models\ProductSelection\AssignedProductSelectionBuilder\withCreatedAt
withCreatedAt(?DateTimeImmutable $createdAt)
Definition
AssignedProductSelectionBuilder.php:131
Commercetools\Api\Models\ProductSelection\AssignedProductSelectionBuilder\getProductSelection
getProductSelection()
Definition
AssignedProductSelectionBuilder.php:54
Commercetools\Api\Models\ProductSelection\AssignedProductSelectionBuilder\withVariantExclusionBuilder
withVariantExclusionBuilder(?ProductVariantExclusionBuilder $variantExclusion)
Definition
AssignedProductSelectionBuilder.php:164
Commercetools\Api\Models\ProductSelection\AssignedProductSelectionBuilder\getVariantSelection
getVariantSelection()
Definition
AssignedProductSelectionBuilder.php:66
Commercetools\Api\Models\ProductSelection\AssignedProductSelectionBuilder\withVariantSelection
withVariantSelection(?ProductVariantSelection $variantSelection)
Definition
AssignedProductSelectionBuilder.php:109
Commercetools\Api\Models\ProductSelection\AssignedProductSelectionBuilder\withProductSelectionBuilder
withProductSelectionBuilder(?ProductSelectionReferenceBuilder $productSelection)
Definition
AssignedProductSelectionBuilder.php:142
Commercetools\Api\Models\ProductSelection\AssignedProductSelectionBuilder\withProductSelection
withProductSelection(?ProductSelectionReference $productSelection)
Definition
AssignedProductSelectionBuilder.php:98
Commercetools\Api\Models\ProductSelection\AssignedProductSelectionBuilder\of
static of()
Definition
AssignedProductSelectionBuilder.php:181
Commercetools\Api\Models\ProductSelection\AssignedProductSelectionBuilder\build
build()
Definition
AssignedProductSelectionBuilder.php:171
Commercetools\Api\Models\ProductSelection\AssignedProductSelectionBuilder\getCreatedAt
getCreatedAt()
Definition
AssignedProductSelectionBuilder.php:89
Commercetools\Api\Models\ProductSelection\AssignedProductSelectionBuilder\getVariantExclusion
getVariantExclusion()
Definition
AssignedProductSelectionBuilder.php:78
Commercetools\Api\Models\ProductSelection\AssignedProductSelectionBuilder\withVariantExclusion
withVariantExclusion(?ProductVariantExclusion $variantExclusion)
Definition
AssignedProductSelectionBuilder.php:120
Commercetools\Api\Models\ProductSelection\AssignedProductSelectionModel
Definition
AssignedProductSelectionModel.php:22
Commercetools\Api\Models\ProductSelection\ProductSelectionReferenceBuilder
Definition
ProductSelectionReferenceBuilder.php:24
Commercetools\Api\Models\ProductSelection\ProductSelectionReferenceBuilder\build
build()
Definition
ProductSelectionReferenceBuilder.php:92
Commercetools\Api\Models\ProductSelection\ProductVariantExclusionBuilder
Definition
ProductVariantExclusionBuilder.php:22
Commercetools\Api\Models\ProductSelection\ProductVariantExclusionBuilder\build
build()
Definition
ProductVariantExclusionBuilder.php:52
Commercetools\Api\Models\ProductSelection\ProductVariantSelectionBuilder
Definition
ProductVariantSelectionBuilder.php:22
Commercetools\Api\Models\ProductSelection\ProductVariantSelectionBuilder\build
build()
Definition
ProductVariantSelectionBuilder.php:23
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\ProductSelection\AssignedProductSelection
Definition
AssignedProductSelection.php:16
Commercetools\Api\Models\ProductSelection\ProductSelectionReference
Definition
ProductSelectionReference.php:16
Commercetools\Api\Models\ProductSelection\ProductVariantExclusion
Definition
ProductVariantExclusion.php:15
Commercetools\Api\Models\ProductSelection\ProductVariantSelection
Definition
ProductVariantSelection.php:15
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\ProductSelection
Definition
AssignedProductReference.php:9
Generated by
1.9.8