Class CartDiscountSetStoresActionBuilder
- All Implemented Interfaces:
Builder<CartDiscountSetStoresAction>
Example to create an instance using the builder pattern
CartDiscountSetStoresAction cartDiscountSetStoresAction = CartDiscountSetStoresAction.builder()
.plusStores(storesBuilder -> storesBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionStores to set.build()builds CartDiscountSetStoresAction with checking for non-null required valuesbuilds CartDiscountSetStoresAction without checking for non-null required valuesStores to set.of()factory method for an instance of CartDiscountSetStoresActionBuilderof(CartDiscountSetStoresAction template) create builder for CartDiscountSetStoresAction instanceplusStores(StoreResourceIdentifier... stores) Stores to set.Stores to set.Stores to set.stores(StoreResourceIdentifier... stores) Stores to set.stores(List<StoreResourceIdentifier> stores) Stores to set.Stores to set.
-
Constructor Details
-
CartDiscountSetStoresActionBuilder
public CartDiscountSetStoresActionBuilder()
-
-
Method Details
-
stores
Stores to set. Overrides the current list of Stores. If empty, any existing values will be removed.
A failed update can return the following errors:
- If the referenced Stores exceed the limit, a MaxStoreReferencesReached error is returned.
- If the referenced Stores exceed the limit for Cart Discounts that do not require a Discount Code, a StoreCartDiscountsLimitReached error is returned.
- Parameters:
stores- value to be set- Returns:
- Builder
-
stores
Stores to set. Overrides the current list of Stores. If empty, any existing values will be removed.
A failed update can return the following errors:
- If the referenced Stores exceed the limit, a MaxStoreReferencesReached error is returned.
- If the referenced Stores exceed the limit for Cart Discounts that do not require a Discount Code, a StoreCartDiscountsLimitReached error is returned.
- Parameters:
stores- value to be set- Returns:
- Builder
-
plusStores
Stores to set. Overrides the current list of Stores. If empty, any existing values will be removed.
A failed update can return the following errors:
- If the referenced Stores exceed the limit, a MaxStoreReferencesReached error is returned.
- If the referenced Stores exceed the limit for Cart Discounts that do not require a Discount Code, a StoreCartDiscountsLimitReached error is returned.
- Parameters:
stores- value to be set- Returns:
- Builder
-
plusStores
public CartDiscountSetStoresActionBuilder plusStores(Function<StoreResourceIdentifierBuilder, StoreResourceIdentifierBuilder> builder) Stores to set. Overrides the current list of Stores. If empty, any existing values will be removed.
A failed update can return the following errors:
- If the referenced Stores exceed the limit, a MaxStoreReferencesReached error is returned.
- If the referenced Stores exceed the limit for Cart Discounts that do not require a Discount Code, a StoreCartDiscountsLimitReached error is returned.
- Parameters:
builder- function to build the stores value- Returns:
- Builder
-
withStores
public CartDiscountSetStoresActionBuilder withStores(Function<StoreResourceIdentifierBuilder, StoreResourceIdentifierBuilder> builder) Stores to set. Overrides the current list of Stores. If empty, any existing values will be removed.
A failed update can return the following errors:
- If the referenced Stores exceed the limit, a MaxStoreReferencesReached error is returned.
- If the referenced Stores exceed the limit for Cart Discounts that do not require a Discount Code, a StoreCartDiscountsLimitReached error is returned.
- Parameters:
builder- function to build the stores value- Returns:
- Builder
-
addStores
public CartDiscountSetStoresActionBuilder addStores(Function<StoreResourceIdentifierBuilder, StoreResourceIdentifier> builder) Stores to set. Overrides the current list of Stores. If empty, any existing values will be removed.
A failed update can return the following errors:
- If the referenced Stores exceed the limit, a MaxStoreReferencesReached error is returned.
- If the referenced Stores exceed the limit for Cart Discounts that do not require a Discount Code, a StoreCartDiscountsLimitReached error is returned.
- Parameters:
builder- function to build the stores value- Returns:
- Builder
-
setStores
public CartDiscountSetStoresActionBuilder setStores(Function<StoreResourceIdentifierBuilder, StoreResourceIdentifier> builder) Stores to set. Overrides the current list of Stores. If empty, any existing values will be removed.
A failed update can return the following errors:
- If the referenced Stores exceed the limit, a MaxStoreReferencesReached error is returned.
- If the referenced Stores exceed the limit for Cart Discounts that do not require a Discount Code, a StoreCartDiscountsLimitReached error is returned.
- Parameters:
builder- function to build the stores value- Returns:
- Builder
-
getStores
Stores to set. Overrides the current list of Stores. If empty, any existing values will be removed.
A failed update can return the following errors:
- If the referenced Stores exceed the limit, a MaxStoreReferencesReached error is returned.
- If the referenced Stores exceed the limit for Cart Discounts that do not require a Discount Code, a StoreCartDiscountsLimitReached error is returned.
- Returns:
- stores
-
build
builds CartDiscountSetStoresAction with checking for non-null required values- Specified by:
buildin interfaceBuilder<CartDiscountSetStoresAction>- Returns:
- CartDiscountSetStoresAction
-
buildUnchecked
builds CartDiscountSetStoresAction without checking for non-null required values- Returns:
- CartDiscountSetStoresAction
-
of
factory method for an instance of CartDiscountSetStoresActionBuilder- Returns:
- builder
-
of
create builder for CartDiscountSetStoresAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-