Class StoreDraftBuilder
- All Implemented Interfaces:
Builder<StoreDraft>
Example to create an instance using the builder pattern
StoreDraft storeDraft = StoreDraft.builder()
.key("{key}")
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddCountries(Function<StoreCountryBuilder, StoreCountry> builder) Countries defined for the Store.addDistributionChannels(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifier> builder) ResourceIdentifier of a Channel withProductDistributionChannelRoleEnum.addProductSelections(Function<ProductSelectionSettingDraftBuilder, ProductSelectionSettingDraft> builder) Controls availability of Products for this Store via active/inactive Product Selections:ResourceIdentifier of a Channel withInventorySupplyChannelRoleEnum.build()builds StoreDraft with checking for non-null required valuesbuilds StoreDraft without checking for non-null required valuescountries(StoreCountry... countries) Countries defined for the Store.countries(List<StoreCountry> countries) Countries defined for the Store.custom(CustomFieldsDraft custom) Custom fields for the Store.Custom fields for the Store.distributionChannels(ChannelResourceIdentifier... distributionChannels) ResourceIdentifier of a Channel withProductDistributionChannelRoleEnum.distributionChannels(List<ChannelResourceIdentifier> distributionChannels) ResourceIdentifier of a Channel withProductDistributionChannelRoleEnum.Countries defined for the Store.Custom fields for the Store.ResourceIdentifier of a Channel withProductDistributionChannelRoleEnum.getKey()User-defined unique and immutable identifier for the Store.Languages defined in Project.getName()Name of the Store.Controls availability of Products for this Store via active/inactive Product Selections:ResourceIdentifier of a Channel withInventorySupplyChannelRoleEnum.User-defined unique and immutable identifier for the Store.Languages defined in Project.Languages defined in Project.name(LocalizedString name) Name of the Store.Name of the Store.static StoreDraftBuilderof()factory method for an instance of StoreDraftBuilderstatic StoreDraftBuilderof(StoreDraft template) create builder for StoreDraft instanceplusCountries(StoreCountry... countries) Countries defined for the Store.Countries defined for the Store.plusDistributionChannels(ChannelResourceIdentifier... distributionChannels) ResourceIdentifier of a Channel withProductDistributionChannelRoleEnum.plusDistributionChannels(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifierBuilder> builder) ResourceIdentifier of a Channel withProductDistributionChannelRoleEnum.plusLanguages(String... languages) Languages defined in Project.plusProductSelections(ProductSelectionSettingDraft... productSelections) Controls availability of Products for this Store via active/inactive Product Selections:plusProductSelections(Function<ProductSelectionSettingDraftBuilder, ProductSelectionSettingDraftBuilder> builder) Controls availability of Products for this Store via active/inactive Product Selections:plusSupplyChannels(ChannelResourceIdentifier... supplyChannels) ResourceIdentifier of a Channel withInventorySupplyChannelRoleEnum.plusSupplyChannels(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifierBuilder> builder) ResourceIdentifier of a Channel withInventorySupplyChannelRoleEnum.productSelections(ProductSelectionSettingDraft... productSelections) Controls availability of Products for this Store via active/inactive Product Selections:productSelections(List<ProductSelectionSettingDraft> productSelections) Controls availability of Products for this Store via active/inactive Product Selections:setCountries(Function<StoreCountryBuilder, StoreCountry> builder) Countries defined for the Store.setDistributionChannels(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifier> builder) ResourceIdentifier of a Channel withProductDistributionChannelRoleEnum.setProductSelections(Function<ProductSelectionSettingDraftBuilder, ProductSelectionSettingDraft> builder) Controls availability of Products for this Store via active/inactive Product Selections:ResourceIdentifier of a Channel withInventorySupplyChannelRoleEnum.supplyChannels(ChannelResourceIdentifier... supplyChannels) ResourceIdentifier of a Channel withInventorySupplyChannelRoleEnum.supplyChannels(List<ChannelResourceIdentifier> supplyChannels) ResourceIdentifier of a Channel withInventorySupplyChannelRoleEnum.Countries defined for the Store.Custom fields for the Store.withDistributionChannels(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifierBuilder> builder) ResourceIdentifier of a Channel withProductDistributionChannelRoleEnum.Name of the Store.withProductSelections(Function<ProductSelectionSettingDraftBuilder, ProductSelectionSettingDraftBuilder> builder) Controls availability of Products for this Store via active/inactive Product Selections:withSupplyChannels(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifierBuilder> builder) ResourceIdentifier of a Channel withInventorySupplyChannelRoleEnum.
-
Constructor Details
-
StoreDraftBuilder
public StoreDraftBuilder()
-
-
Method Details
-
key
User-defined unique and immutable identifier for the Store. Keys can only contain alphanumeric characters, underscores, and hyphens.
- Parameters:
key- value to be set- Returns:
- Builder
-
name
Name of the Store.
- Parameters:
builder- function to build the name value- Returns:
- Builder
-
withName
Name of the Store.
- Parameters:
builder- function to build the name value- Returns:
- Builder
-
name
Name of the Store.
- Parameters:
name- value to be set- Returns:
- Builder
-
languages
Languages defined in Project. Only languages defined in the Project can be used.
- Parameters:
languages- value to be set- Returns:
- Builder
-
languages
Languages defined in Project. Only languages defined in the Project can be used.
- Parameters:
languages- value to be set- Returns:
- Builder
-
plusLanguages
Languages defined in Project. Only languages defined in the Project can be used.
- Parameters:
languages- value to be set- Returns:
- Builder
-
countries
Countries defined for the Store.
- Parameters:
countries- value to be set- Returns:
- Builder
-
countries
Countries defined for the Store.
- Parameters:
countries- value to be set- Returns:
- Builder
-
plusCountries
Countries defined for the Store.
- Parameters:
countries- value to be set- Returns:
- Builder
-
plusCountries
Countries defined for the Store.
- Parameters:
builder- function to build the countries value- Returns:
- Builder
-
withCountries
Countries defined for the Store.
- Parameters:
builder- function to build the countries value- Returns:
- Builder
-
addCountries
Countries defined for the Store.
- Parameters:
builder- function to build the countries value- Returns:
- Builder
-
setCountries
Countries defined for the Store.
- Parameters:
builder- function to build the countries value- Returns:
- Builder
-
distributionChannels
public StoreDraftBuilder distributionChannels(@Nullable ChannelResourceIdentifier... distributionChannels) ResourceIdentifier of a Channel with
ProductDistributionChannelRoleEnum.- Parameters:
distributionChannels- value to be set- Returns:
- Builder
-
distributionChannels
public StoreDraftBuilder distributionChannels(@Nullable List<ChannelResourceIdentifier> distributionChannels) ResourceIdentifier of a Channel with
ProductDistributionChannelRoleEnum.- Parameters:
distributionChannels- value to be set- Returns:
- Builder
-
plusDistributionChannels
public StoreDraftBuilder plusDistributionChannels(@Nullable ChannelResourceIdentifier... distributionChannels) ResourceIdentifier of a Channel with
ProductDistributionChannelRoleEnum.- Parameters:
distributionChannels- value to be set- Returns:
- Builder
-
plusDistributionChannels
public StoreDraftBuilder plusDistributionChannels(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifierBuilder> builder) ResourceIdentifier of a Channel with
ProductDistributionChannelRoleEnum.- Parameters:
builder- function to build the distributionChannels value- Returns:
- Builder
-
withDistributionChannels
public StoreDraftBuilder withDistributionChannels(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifierBuilder> builder) ResourceIdentifier of a Channel with
ProductDistributionChannelRoleEnum.- Parameters:
builder- function to build the distributionChannels value- Returns:
- Builder
-
addDistributionChannels
public StoreDraftBuilder addDistributionChannels(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifier> builder) ResourceIdentifier of a Channel with
ProductDistributionChannelRoleEnum.- Parameters:
builder- function to build the distributionChannels value- Returns:
- Builder
-
setDistributionChannels
public StoreDraftBuilder setDistributionChannels(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifier> builder) ResourceIdentifier of a Channel with
ProductDistributionChannelRoleEnum.- Parameters:
builder- function to build the distributionChannels value- Returns:
- Builder
-
supplyChannels
ResourceIdentifier of a Channel with
InventorySupplyChannelRoleEnum.- Parameters:
supplyChannels- value to be set- Returns:
- Builder
-
supplyChannels
ResourceIdentifier of a Channel with
InventorySupplyChannelRoleEnum.- Parameters:
supplyChannels- value to be set- Returns:
- Builder
-
plusSupplyChannels
ResourceIdentifier of a Channel with
InventorySupplyChannelRoleEnum.- Parameters:
supplyChannels- value to be set- Returns:
- Builder
-
plusSupplyChannels
public StoreDraftBuilder plusSupplyChannels(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifierBuilder> builder) ResourceIdentifier of a Channel with
InventorySupplyChannelRoleEnum.- Parameters:
builder- function to build the supplyChannels value- Returns:
- Builder
-
withSupplyChannels
public StoreDraftBuilder withSupplyChannels(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifierBuilder> builder) ResourceIdentifier of a Channel with
InventorySupplyChannelRoleEnum.- Parameters:
builder- function to build the supplyChannels value- Returns:
- Builder
-
addSupplyChannels
public StoreDraftBuilder addSupplyChannels(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifier> builder) ResourceIdentifier of a Channel with
InventorySupplyChannelRoleEnum.- Parameters:
builder- function to build the supplyChannels value- Returns:
- Builder
-
setSupplyChannels
public StoreDraftBuilder setSupplyChannels(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifier> builder) ResourceIdentifier of a Channel with
InventorySupplyChannelRoleEnum.- Parameters:
builder- function to build the supplyChannels value- Returns:
- Builder
-
productSelections
public StoreDraftBuilder productSelections(@Nullable ProductSelectionSettingDraft... productSelections) Controls availability of Products for this Store via active/inactive Product Selections:
- Leave empty if all Products in the Project should be available in this Store.
- If only
inactiveProduct Selections withIndividualExclusionProductSelectionMode are provided, all the Products are available in this Store. - If all the Product Selections provided are
inactiveand there's at least a Product Selection of modeIndividual, no Product is available in this Store. - If at least an
activeProduct Selection is provided, onlyactiveProduct Selections are considered to compute the availability in this Store.
- Parameters:
productSelections- value to be set- Returns:
- Builder
-
productSelections
public StoreDraftBuilder productSelections(@Nullable List<ProductSelectionSettingDraft> productSelections) Controls availability of Products for this Store via active/inactive Product Selections:
- Leave empty if all Products in the Project should be available in this Store.
- If only
inactiveProduct Selections withIndividualExclusionProductSelectionMode are provided, all the Products are available in this Store. - If all the Product Selections provided are
inactiveand there's at least a Product Selection of modeIndividual, no Product is available in this Store. - If at least an
activeProduct Selection is provided, onlyactiveProduct Selections are considered to compute the availability in this Store.
- Parameters:
productSelections- value to be set- Returns:
- Builder
-
plusProductSelections
public StoreDraftBuilder plusProductSelections(@Nullable ProductSelectionSettingDraft... productSelections) Controls availability of Products for this Store via active/inactive Product Selections:
- Leave empty if all Products in the Project should be available in this Store.
- If only
inactiveProduct Selections withIndividualExclusionProductSelectionMode are provided, all the Products are available in this Store. - If all the Product Selections provided are
inactiveand there's at least a Product Selection of modeIndividual, no Product is available in this Store. - If at least an
activeProduct Selection is provided, onlyactiveProduct Selections are considered to compute the availability in this Store.
- Parameters:
productSelections- value to be set- Returns:
- Builder
-
plusProductSelections
public StoreDraftBuilder plusProductSelections(Function<ProductSelectionSettingDraftBuilder, ProductSelectionSettingDraftBuilder> builder) Controls availability of Products for this Store via active/inactive Product Selections:
- Leave empty if all Products in the Project should be available in this Store.
- If only
inactiveProduct Selections withIndividualExclusionProductSelectionMode are provided, all the Products are available in this Store. - If all the Product Selections provided are
inactiveand there's at least a Product Selection of modeIndividual, no Product is available in this Store. - If at least an
activeProduct Selection is provided, onlyactiveProduct Selections are considered to compute the availability in this Store.
- Parameters:
builder- function to build the productSelections value- Returns:
- Builder
-
withProductSelections
public StoreDraftBuilder withProductSelections(Function<ProductSelectionSettingDraftBuilder, ProductSelectionSettingDraftBuilder> builder) Controls availability of Products for this Store via active/inactive Product Selections:
- Leave empty if all Products in the Project should be available in this Store.
- If only
inactiveProduct Selections withIndividualExclusionProductSelectionMode are provided, all the Products are available in this Store. - If all the Product Selections provided are
inactiveand there's at least a Product Selection of modeIndividual, no Product is available in this Store. - If at least an
activeProduct Selection is provided, onlyactiveProduct Selections are considered to compute the availability in this Store.
- Parameters:
builder- function to build the productSelections value- Returns:
- Builder
-
addProductSelections
public StoreDraftBuilder addProductSelections(Function<ProductSelectionSettingDraftBuilder, ProductSelectionSettingDraft> builder) Controls availability of Products for this Store via active/inactive Product Selections:
- Leave empty if all Products in the Project should be available in this Store.
- If only
inactiveProduct Selections withIndividualExclusionProductSelectionMode are provided, all the Products are available in this Store. - If all the Product Selections provided are
inactiveand there's at least a Product Selection of modeIndividual, no Product is available in this Store. - If at least an
activeProduct Selection is provided, onlyactiveProduct Selections are considered to compute the availability in this Store.
- Parameters:
builder- function to build the productSelections value- Returns:
- Builder
-
setProductSelections
public StoreDraftBuilder setProductSelections(Function<ProductSelectionSettingDraftBuilder, ProductSelectionSettingDraft> builder) Controls availability of Products for this Store via active/inactive Product Selections:
- Leave empty if all Products in the Project should be available in this Store.
- If only
inactiveProduct Selections withIndividualExclusionProductSelectionMode are provided, all the Products are available in this Store. - If all the Product Selections provided are
inactiveand there's at least a Product Selection of modeIndividual, no Product is available in this Store. - If at least an
activeProduct Selection is provided, onlyactiveProduct Selections are considered to compute the availability in this Store.
- Parameters:
builder- function to build the productSelections value- Returns:
- Builder
-
custom
public StoreDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom fields for the Store.
- Parameters:
builder- function to build the custom value- Returns:
- Builder
-
withCustom
Custom fields for the Store.
- Parameters:
builder- function to build the custom value- Returns:
- Builder
-
custom
Custom fields for the Store.
- Parameters:
custom- value to be set- Returns:
- Builder
-
getKey
User-defined unique and immutable identifier for the Store. Keys can only contain alphanumeric characters, underscores, and hyphens.
- Returns:
- key
-
getName
Name of the Store.
- Returns:
- name
-
getLanguages
Languages defined in Project. Only languages defined in the Project can be used.
- Returns:
- languages
-
getCountries
Countries defined for the Store.
- Returns:
- countries
-
getDistributionChannels
ResourceIdentifier of a Channel with
ProductDistributionChannelRoleEnum.- Returns:
- distributionChannels
-
getSupplyChannels
ResourceIdentifier of a Channel with
InventorySupplyChannelRoleEnum.- Returns:
- supplyChannels
-
getProductSelections
Controls availability of Products for this Store via active/inactive Product Selections:
- Leave empty if all Products in the Project should be available in this Store.
- If only
inactiveProduct Selections withIndividualExclusionProductSelectionMode are provided, all the Products are available in this Store. - If all the Product Selections provided are
inactiveand there's at least a Product Selection of modeIndividual, no Product is available in this Store. - If at least an
activeProduct Selection is provided, onlyactiveProduct Selections are considered to compute the availability in this Store.
- Returns:
- productSelections
-
getCustom
Custom fields for the Store.
- Returns:
- custom
-
build
builds StoreDraft with checking for non-null required values- Specified by:
buildin interfaceBuilder<StoreDraft>- Returns:
- StoreDraft
-
buildUnchecked
builds StoreDraft without checking for non-null required values- Returns:
- StoreDraft
-
of
factory method for an instance of StoreDraftBuilder- Returns:
- builder
-
of
create builder for StoreDraft instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-