Class StoreBuilder
Example to create an instance using the builder pattern
Store store = Store.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.key("{key}")
.plusLanguages(languagesBuilder -> languagesBuilder)
.plusCountries(countriesBuilder -> countriesBuilder)
.plusDistributionChannels(distributionChannelsBuilder -> distributionChannelsBuilder)
.plusSupplyChannels(supplyChannelsBuilder -> supplyChannelsBuilder)
.plusProductSelections(productSelectionsBuilder -> productSelectionsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddCountries
(Function<StoreCountryBuilder, StoreCountry> builder) Countries defined for the Store.Product Distribution Channels allowed for the Store.Controls availability of Products for this Store via Product Selections:Inventory Supply Channels allowed for the Store.build()
builds Store with checking for non-null required valuesbuilds Store without checking for non-null required valuescountries
(StoreCountry... countries) Countries defined for the Store.countries
(List<StoreCountry> countries) Countries defined for the Store.createdAt
(ZonedDateTime createdAt) Date and time (UTC) the Store was initially created.IDs and references that created the Store.createdBy
(Function<CreatedByBuilder, CreatedByBuilder> builder) IDs and references that created the Store.custom
(CustomFields custom) Custom fields for the Store.custom
(Function<CustomFieldsBuilder, CustomFieldsBuilder> builder) Custom fields for the Store.distributionChannels
(ChannelReference... distributionChannels) Product Distribution Channels allowed for the Store.distributionChannels
(List<ChannelReference> distributionChannels) Product Distribution Channels allowed for the Store.Countries defined for the Store.Date and time (UTC) the Store was initially created.IDs and references that created the Store.Custom fields for the Store.Product Distribution Channels allowed for the Store.getId()
Unique ID of the Store.getKey()
User-defined unique and immutable identifier for the Store.Languages configured for the Store.Date and time (UTC) the Store was last updated.IDs and references that last modified the Store.getName()
Name of the Store.Controls availability of Products for this Store via Product Selections:Inventory Supply Channels allowed for the Store.Current version of the Store.Unique ID of the Store.User-defined unique and immutable identifier for the Store.Languages configured for the Store.Languages configured for the Store.lastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the Store was last updated.lastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the Store.IDs and references that last modified the Store.name
(LocalizedString name) Name of the Store.Name of the Store.static StoreBuilder
of()
factory method for an instance of StoreBuilderstatic StoreBuilder
create builder for Store instanceplusCountries
(StoreCountry... countries) Countries defined for the Store.Countries defined for the Store.plusDistributionChannels
(ChannelReference... distributionChannels) Product Distribution Channels allowed for the Store.Product Distribution Channels allowed for the Store.plusLanguages
(String... languages) Languages configured for the Store.plusProductSelections
(ProductSelectionSetting... productSelections) Controls availability of Products for this Store via Product Selections:plusProductSelections
(Function<ProductSelectionSettingBuilder, ProductSelectionSettingBuilder> builder) Controls availability of Products for this Store via Product Selections:plusSupplyChannels
(ChannelReference... supplyChannels) Inventory Supply Channels allowed for the Store.Inventory Supply Channels allowed for the Store.productSelections
(ProductSelectionSetting... productSelections) Controls availability of Products for this Store via Product Selections:productSelections
(List<ProductSelectionSetting> productSelections) Controls availability of Products for this Store via Product Selections:setCountries
(Function<StoreCountryBuilder, StoreCountry> builder) Countries defined for the Store.Product Distribution Channels allowed for the Store.Controls availability of Products for this Store via Product Selections:Inventory Supply Channels allowed for the Store.supplyChannels
(ChannelReference... supplyChannels) Inventory Supply Channels allowed for the Store.supplyChannels
(List<ChannelReference> supplyChannels) Inventory Supply Channels allowed for the Store.Current version of the Store.Countries defined for the Store.withCreatedBy
(Function<CreatedByBuilder, CreatedBy> builder) IDs and references that created the Store.withCustom
(Function<CustomFieldsBuilder, CustomFields> builder) Custom fields for the Store.Product Distribution Channels allowed for the Store.IDs and references that last modified the Store.Name of the Store.withProductSelections
(Function<ProductSelectionSettingBuilder, ProductSelectionSettingBuilder> builder) Controls availability of Products for this Store via Product Selections:Inventory Supply Channels allowed for the Store.
-
Constructor Details
-
StoreBuilder
public StoreBuilder()
-
-
Method Details
-
id
Unique ID of the Store.
- Parameters:
id
- value to be set- Returns:
- Builder
-
version
Current version of the Store.
- Parameters:
version
- value to be set- Returns:
- Builder
-
createdAt
Date and time (UTC) the Store was initially created.
- Parameters:
createdAt
- value to be set- Returns:
- Builder
-
lastModifiedAt
Date and time (UTC) the Store was last updated.
- Parameters:
lastModifiedAt
- value to be set- Returns:
- Builder
-
lastModifiedBy
IDs and references that last modified the Store.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
withLastModifiedBy
IDs and references that last modified the Store.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
lastModifiedBy
IDs and references that last modified the Store.
- Parameters:
lastModifiedBy
- value to be set- Returns:
- Builder
-
createdBy
IDs and references that created the Store.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
withCreatedBy
IDs and references that created the Store.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
createdBy
IDs and references that created the Store.
- Parameters:
createdBy
- value to be set- Returns:
- Builder
-
key
User-defined unique and immutable identifier for the Store.
- 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 configured for the Store.
- Parameters:
languages
- value to be set- Returns:
- Builder
-
languages
Languages configured for the Store.
- Parameters:
languages
- value to be set- Returns:
- Builder
-
plusLanguages
Languages configured for the Store.
- 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
Product Distribution Channels allowed for the Store.
- Parameters:
distributionChannels
- value to be set- Returns:
- Builder
-
distributionChannels
Product Distribution Channels allowed for the Store.
- Parameters:
distributionChannels
- value to be set- Returns:
- Builder
-
plusDistributionChannels
Product Distribution Channels allowed for the Store.
- Parameters:
distributionChannels
- value to be set- Returns:
- Builder
-
plusDistributionChannels
public StoreBuilder plusDistributionChannels(Function<ChannelReferenceBuilder, ChannelReferenceBuilder> builder) Product Distribution Channels allowed for the Store.
- Parameters:
builder
- function to build the distributionChannels value- Returns:
- Builder
-
withDistributionChannels
public StoreBuilder withDistributionChannels(Function<ChannelReferenceBuilder, ChannelReferenceBuilder> builder) Product Distribution Channels allowed for the Store.
- Parameters:
builder
- function to build the distributionChannels value- Returns:
- Builder
-
addDistributionChannels
public StoreBuilder addDistributionChannels(Function<ChannelReferenceBuilder, ChannelReference> builder) Product Distribution Channels allowed for the Store.
- Parameters:
builder
- function to build the distributionChannels value- Returns:
- Builder
-
setDistributionChannels
public StoreBuilder setDistributionChannels(Function<ChannelReferenceBuilder, ChannelReference> builder) Product Distribution Channels allowed for the Store.
- Parameters:
builder
- function to build the distributionChannels value- Returns:
- Builder
-
supplyChannels
Inventory Supply Channels allowed for the Store.
- Parameters:
supplyChannels
- value to be set- Returns:
- Builder
-
supplyChannels
Inventory Supply Channels allowed for the Store.
- Parameters:
supplyChannels
- value to be set- Returns:
- Builder
-
plusSupplyChannels
Inventory Supply Channels allowed for the Store.
- Parameters:
supplyChannels
- value to be set- Returns:
- Builder
-
plusSupplyChannels
public StoreBuilder plusSupplyChannels(Function<ChannelReferenceBuilder, ChannelReferenceBuilder> builder) Inventory Supply Channels allowed for the Store.
- Parameters:
builder
- function to build the supplyChannels value- Returns:
- Builder
-
withSupplyChannels
public StoreBuilder withSupplyChannels(Function<ChannelReferenceBuilder, ChannelReferenceBuilder> builder) Inventory Supply Channels allowed for the Store.
- Parameters:
builder
- function to build the supplyChannels value- Returns:
- Builder
-
addSupplyChannels
Inventory Supply Channels allowed for the Store.
- Parameters:
builder
- function to build the supplyChannels value- Returns:
- Builder
-
setSupplyChannels
Inventory Supply Channels allowed for the Store.
- Parameters:
builder
- function to build the supplyChannels value- Returns:
- Builder
-
productSelections
Controls availability of Products for this Store via Product Selections:
- Leave empty if all Products in the Project should be available in this Store.
- If only
inactive
Product Selections withIndividualExclusion
ProductSelectionMode are provided, all the Products are availlable in this Store. - If all the Product Selections provided are
inactive
and there's at least a Product Selection of modeIndividual
, no Product is availlable in this Store. - If at least an
active
Product Selection is provided, onlyactive
Product Selections are considered to compute the availlability in this Store.
- Parameters:
productSelections
- value to be set- Returns:
- Builder
-
productSelections
Controls availability of Products for this Store via Product Selections:
- Leave empty if all Products in the Project should be available in this Store.
- If only
inactive
Product Selections withIndividualExclusion
ProductSelectionMode are provided, all the Products are availlable in this Store. - If all the Product Selections provided are
inactive
and there's at least a Product Selection of modeIndividual
, no Product is availlable in this Store. - If at least an
active
Product Selection is provided, onlyactive
Product Selections are considered to compute the availlability in this Store.
- Parameters:
productSelections
- value to be set- Returns:
- Builder
-
plusProductSelections
Controls availability of Products for this Store via Product Selections:
- Leave empty if all Products in the Project should be available in this Store.
- If only
inactive
Product Selections withIndividualExclusion
ProductSelectionMode are provided, all the Products are availlable in this Store. - If all the Product Selections provided are
inactive
and there's at least a Product Selection of modeIndividual
, no Product is availlable in this Store. - If at least an
active
Product Selection is provided, onlyactive
Product Selections are considered to compute the availlability in this Store.
- Parameters:
productSelections
- value to be set- Returns:
- Builder
-
plusProductSelections
public StoreBuilder plusProductSelections(Function<ProductSelectionSettingBuilder, ProductSelectionSettingBuilder> builder) Controls availability of Products for this Store via Product Selections:
- Leave empty if all Products in the Project should be available in this Store.
- If only
inactive
Product Selections withIndividualExclusion
ProductSelectionMode are provided, all the Products are availlable in this Store. - If all the Product Selections provided are
inactive
and there's at least a Product Selection of modeIndividual
, no Product is availlable in this Store. - If at least an
active
Product Selection is provided, onlyactive
Product Selections are considered to compute the availlability in this Store.
- Parameters:
builder
- function to build the productSelections value- Returns:
- Builder
-
withProductSelections
public StoreBuilder withProductSelections(Function<ProductSelectionSettingBuilder, ProductSelectionSettingBuilder> builder) Controls availability of Products for this Store via Product Selections:
- Leave empty if all Products in the Project should be available in this Store.
- If only
inactive
Product Selections withIndividualExclusion
ProductSelectionMode are provided, all the Products are availlable in this Store. - If all the Product Selections provided are
inactive
and there's at least a Product Selection of modeIndividual
, no Product is availlable in this Store. - If at least an
active
Product Selection is provided, onlyactive
Product Selections are considered to compute the availlability in this Store.
- Parameters:
builder
- function to build the productSelections value- Returns:
- Builder
-
addProductSelections
public StoreBuilder addProductSelections(Function<ProductSelectionSettingBuilder, ProductSelectionSetting> builder) Controls availability of Products for this Store via Product Selections:
- Leave empty if all Products in the Project should be available in this Store.
- If only
inactive
Product Selections withIndividualExclusion
ProductSelectionMode are provided, all the Products are availlable in this Store. - If all the Product Selections provided are
inactive
and there's at least a Product Selection of modeIndividual
, no Product is availlable in this Store. - If at least an
active
Product Selection is provided, onlyactive
Product Selections are considered to compute the availlability in this Store.
- Parameters:
builder
- function to build the productSelections value- Returns:
- Builder
-
setProductSelections
public StoreBuilder setProductSelections(Function<ProductSelectionSettingBuilder, ProductSelectionSetting> builder) Controls availability of Products for this Store via Product Selections:
- Leave empty if all Products in the Project should be available in this Store.
- If only
inactive
Product Selections withIndividualExclusion
ProductSelectionMode are provided, all the Products are availlable in this Store. - If all the Product Selections provided are
inactive
and there's at least a Product Selection of modeIndividual
, no Product is availlable in this Store. - If at least an
active
Product Selection is provided, onlyactive
Product Selections are considered to compute the availlability in this Store.
- Parameters:
builder
- function to build the productSelections value- Returns:
- Builder
-
custom
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
-
getId
Unique ID of the Store.
- Returns:
- id
-
getVersion
Current version of the Store.
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the Store was initially created.
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the Store was last updated.
- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the Store.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the Store.
- Returns:
- createdBy
-
getKey
User-defined unique and immutable identifier for the Store.
- Returns:
- key
-
getName
Name of the Store.
- Returns:
- name
-
getLanguages
Languages configured for the Store.
- Returns:
- languages
-
getCountries
Countries defined for the Store.
- Returns:
- countries
-
getDistributionChannels
Product Distribution Channels allowed for the Store.
- Returns:
- distributionChannels
-
getSupplyChannels
Inventory Supply Channels allowed for the Store.
- Returns:
- supplyChannels
-
getProductSelections
Controls availability of Products for this Store via Product Selections:
- Leave empty if all Products in the Project should be available in this Store.
- If only
inactive
Product Selections withIndividualExclusion
ProductSelectionMode are provided, all the Products are availlable in this Store. - If all the Product Selections provided are
inactive
and there's at least a Product Selection of modeIndividual
, no Product is availlable in this Store. - If at least an
active
Product Selection is provided, onlyactive
Product Selections are considered to compute the availlability in this Store.
- Returns:
- productSelections
-
getCustom
Custom fields for the Store.
- Returns:
- custom
-
build
builds Store with checking for non-null required values -
buildUnchecked
builds Store without checking for non-null required values- Returns:
- Store
-
of
factory method for an instance of StoreBuilder- Returns:
- builder
-
of
create builder for Store instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-