Class ProductSelectionSettingBuilder
java.lang.Object
com.commercetools.api.models.store.ProductSelectionSettingBuilder
- All Implemented Interfaces:
Builder<ProductSelectionSetting>
public class ProductSelectionSettingBuilder
extends Object
implements Builder<ProductSelectionSetting>
ProductSelectionSettingBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductSelectionSetting productSelectionSetting = ProductSelectionSetting.builder()
.productSelection(productSelectionBuilder -> productSelectionBuilder)
.active(true)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionIftrue
, all Products assigned to this Product Selection are part of the Store's assortment.build()
builds ProductSelectionSetting with checking for non-null required valuesbuilds ProductSelectionSetting without checking for non-null required valuesIftrue
, all Products assigned to this Product Selection are part of the Store's assortment.Reference to a ProductSelection.of()
factory method for an instance of ProductSelectionSettingBuilderof
(ProductSelectionSetting template) create builder for ProductSelectionSetting instanceproductSelection
(ProductSelectionReference productSelection) Reference to a ProductSelection.productSelection
(Function<ProductSelectionReferenceBuilder, ProductSelectionReferenceBuilder> builder) Reference to a ProductSelection.Reference to a ProductSelection.
-
Constructor Details
-
ProductSelectionSettingBuilder
public ProductSelectionSettingBuilder()
-
-
Method Details
-
productSelection
public ProductSelectionSettingBuilder productSelection(Function<ProductSelectionReferenceBuilder, ProductSelectionReferenceBuilder> builder) Reference to a ProductSelection.
- Parameters:
builder
- function to build the productSelection value- Returns:
- Builder
-
withProductSelection
public ProductSelectionSettingBuilder withProductSelection(Function<ProductSelectionReferenceBuilder, ProductSelectionReference> builder) Reference to a ProductSelection.
- Parameters:
builder
- function to build the productSelection value- Returns:
- Builder
-
productSelection
Reference to a ProductSelection.
- Parameters:
productSelection
- value to be set- Returns:
- Builder
-
active
If
true
, all Products assigned to this Product Selection are part of the Store's assortment.- Parameters:
active
- value to be set- Returns:
- Builder
-
getProductSelection
Reference to a ProductSelection.
- Returns:
- productSelection
-
getActive
If
true
, all Products assigned to this Product Selection are part of the Store's assortment.- Returns:
- active
-
build
builds ProductSelectionSetting with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductSelectionSetting>
- Returns:
- ProductSelectionSetting
-
buildUnchecked
builds ProductSelectionSetting without checking for non-null required values- Returns:
- ProductSelectionSetting
-
of
factory method for an instance of ProductSelectionSettingBuilder- Returns:
- builder
-
of
create builder for ProductSelectionSetting instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-