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
Store
StoreDraftBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Store
;
10
11
use
Commercetools\Api\Models\Channel\ChannelResourceIdentifierCollection
;
12
use
Commercetools\Api\Models\Common\LocalizedString
;
13
use
Commercetools\Api\Models\Common\LocalizedStringBuilder
;
14
use
Commercetools\Api\Models\StoreCountry\StoreCountryCollection
;
15
use
Commercetools\Api\Models\Type\CustomFieldsDraft
;
16
use
Commercetools\Api\Models\Type\CustomFieldsDraftBuilder
;
17
use
Commercetools\Base\Builder
;
18
use
Commercetools\Base\DateTimeImmutableCollection
;
19
use
Commercetools\Base\JsonObject
;
20
use
Commercetools\Base\JsonObjectModel
;
21
use
Commercetools\Base\MapperFactory
;
22
use stdClass;
23
27
final
class
StoreDraftBuilder
implements
Builder
28
{
33
private
$key;
34
39
private
$name;
40
45
private
$languages;
46
51
private
$countries;
52
57
private
$distributionChannels;
58
63
private
$supplyChannels;
64
69
private
$productSelections;
70
75
private
$custom;
76
84
public
function
getKey
()
85
{
86
return
$this->key;
87
}
88
95
public
function
getName
()
96
{
97
return
$this->name instanceof
LocalizedStringBuilder
? $this->name->
build
() : $this->name;
98
}
99
106
public
function
getLanguages
()
107
{
108
return
$this->languages;
109
}
110
117
public
function
getCountries
()
118
{
119
return
$this->countries;
120
}
121
128
public
function
getDistributionChannels
()
129
{
130
return
$this->distributionChannels;
131
}
132
139
public
function
getSupplyChannels
()
140
{
141
return
$this->supplyChannels;
142
}
143
156
public
function
getProductSelections
()
157
{
158
return
$this->productSelections;
159
}
160
167
public
function
getCustom
()
168
{
169
return
$this->custom instanceof
CustomFieldsDraftBuilder
? $this->custom->
build
() : $this->custom;
170
}
171
176
public
function
withKey
(?
string
$key)
177
{
178
$this->key = $key;
179
180
return
$this;
181
}
182
187
public
function
withName
(?
LocalizedString
$name)
188
{
189
$this->name = $name;
190
191
return
$this;
192
}
193
198
public
function
withLanguages
(?array $languages)
199
{
200
$this->languages = $languages;
201
202
return
$this;
203
}
204
209
public
function
withCountries
(?
StoreCountryCollection
$countries)
210
{
211
$this->countries = $countries;
212
213
return
$this;
214
}
215
220
public
function
withDistributionChannels
(?
ChannelResourceIdentifierCollection
$distributionChannels)
221
{
222
$this->distributionChannels = $distributionChannels;
223
224
return
$this;
225
}
226
231
public
function
withSupplyChannels
(?
ChannelResourceIdentifierCollection
$supplyChannels)
232
{
233
$this->supplyChannels = $supplyChannels;
234
235
return
$this;
236
}
237
242
public
function
withProductSelections
(?
ProductSelectionSettingDraftCollection
$productSelections)
243
{
244
$this->productSelections = $productSelections;
245
246
return
$this;
247
}
248
253
public
function
withCustom
(?
CustomFieldsDraft
$custom)
254
{
255
$this->custom = $custom;
256
257
return
$this;
258
}
259
264
public
function
withNameBuilder
(?
LocalizedStringBuilder
$name)
265
{
266
$this->name = $name;
267
268
return
$this;
269
}
270
275
public
function
withCustomBuilder
(?
CustomFieldsDraftBuilder
$custom)
276
{
277
$this->custom = $custom;
278
279
return
$this;
280
}
281
282
public
function
build
():
StoreDraft
283
{
284
return
new
StoreDraftModel
(
285
$this->key,
286
$this->name instanceof
LocalizedStringBuilder
? $this->name->
build
() : $this->name,
287
$this->languages,
288
$this->countries,
289
$this->distributionChannels,
290
$this->supplyChannels,
291
$this->productSelections,
292
$this->custom instanceof
CustomFieldsDraftBuilder
? $this->custom->
build
() : $this->custom
293
);
294
}
295
296
public
static
function
of
():
StoreDraftBuilder
297
{
298
return
new
self
();
299
}
300
}
Commercetools\Api\Models\Channel\ChannelResourceIdentifierCollection
Definition
ChannelResourceIdentifierCollection.php:22
Commercetools\Api\Models\Common\LocalizedStringBuilder
Definition
LocalizedStringBuilder.php:20
Commercetools\Api\Models\Common\LocalizedStringBuilder\build
build()
Definition
LocalizedStringBuilder.php:42
Commercetools\Api\Models\Store\ProductSelectionSettingDraftCollection
Definition
ProductSelectionSettingDraftCollection.php:22
Commercetools\Api\Models\Store\StoreDraftBuilder
Definition
StoreDraftBuilder.php:28
Commercetools\Api\Models\Store\StoreDraftBuilder\withNameBuilder
withNameBuilder(?LocalizedStringBuilder $name)
Definition
StoreDraftBuilder.php:264
Commercetools\Api\Models\Store\StoreDraftBuilder\withCustomBuilder
withCustomBuilder(?CustomFieldsDraftBuilder $custom)
Definition
StoreDraftBuilder.php:275
Commercetools\Api\Models\Store\StoreDraftBuilder\of
static of()
Definition
StoreDraftBuilder.php:296
Commercetools\Api\Models\Store\StoreDraftBuilder\withLanguages
withLanguages(?array $languages)
Definition
StoreDraftBuilder.php:198
Commercetools\Api\Models\Store\StoreDraftBuilder\withSupplyChannels
withSupplyChannels(?ChannelResourceIdentifierCollection $supplyChannels)
Definition
StoreDraftBuilder.php:231
Commercetools\Api\Models\Store\StoreDraftBuilder\getDistributionChannels
getDistributionChannels()
Definition
StoreDraftBuilder.php:128
Commercetools\Api\Models\Store\StoreDraftBuilder\withProductSelections
withProductSelections(?ProductSelectionSettingDraftCollection $productSelections)
Definition
StoreDraftBuilder.php:242
Commercetools\Api\Models\Store\StoreDraftBuilder\getName
getName()
Definition
StoreDraftBuilder.php:95
Commercetools\Api\Models\Store\StoreDraftBuilder\getCountries
getCountries()
Definition
StoreDraftBuilder.php:117
Commercetools\Api\Models\Store\StoreDraftBuilder\build
build()
Definition
StoreDraftBuilder.php:282
Commercetools\Api\Models\Store\StoreDraftBuilder\withCustom
withCustom(?CustomFieldsDraft $custom)
Definition
StoreDraftBuilder.php:253
Commercetools\Api\Models\Store\StoreDraftBuilder\getProductSelections
getProductSelections()
Definition
StoreDraftBuilder.php:156
Commercetools\Api\Models\Store\StoreDraftBuilder\getSupplyChannels
getSupplyChannels()
Definition
StoreDraftBuilder.php:139
Commercetools\Api\Models\Store\StoreDraftBuilder\getCustom
getCustom()
Definition
StoreDraftBuilder.php:167
Commercetools\Api\Models\Store\StoreDraftBuilder\withDistributionChannels
withDistributionChannels(?ChannelResourceIdentifierCollection $distributionChannels)
Definition
StoreDraftBuilder.php:220
Commercetools\Api\Models\Store\StoreDraftBuilder\withCountries
withCountries(?StoreCountryCollection $countries)
Definition
StoreDraftBuilder.php:209
Commercetools\Api\Models\Store\StoreDraftBuilder\withKey
withKey(?string $key)
Definition
StoreDraftBuilder.php:176
Commercetools\Api\Models\Store\StoreDraftBuilder\getKey
getKey()
Definition
StoreDraftBuilder.php:84
Commercetools\Api\Models\Store\StoreDraftBuilder\getLanguages
getLanguages()
Definition
StoreDraftBuilder.php:106
Commercetools\Api\Models\Store\StoreDraftBuilder\withName
withName(?LocalizedString $name)
Definition
StoreDraftBuilder.php:187
Commercetools\Api\Models\Store\StoreDraftModel
Definition
StoreDraftModel.php:27
Commercetools\Api\Models\StoreCountry\StoreCountryCollection
Definition
StoreCountryCollection.php:22
Commercetools\Api\Models\Type\CustomFieldsDraftBuilder
Definition
CustomFieldsDraftBuilder.php:22
Commercetools\Api\Models\Type\CustomFieldsDraftBuilder\build
build()
Definition
CustomFieldsDraftBuilder.php:101
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\Common\LocalizedString
Definition
LocalizedString.php:14
Commercetools\Api\Models\Store\StoreDraft
Definition
StoreDraft.php:19
Commercetools\Api\Models\Type\CustomFieldsDraft
Definition
CustomFieldsDraft.php:15
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Store
Definition
ProductSelectionSetting.php:9
Generated by
1.9.8