Class CartSetBusinessUnitActionBuilder
java.lang.Object
com.commercetools.api.models.cart.CartSetBusinessUnitActionBuilder
- All Implemented Interfaces:
Builder<CartSetBusinessUnitAction>
public class CartSetBusinessUnitActionBuilder
extends Object
implements Builder<CartSetBusinessUnitAction>
CartSetBusinessUnitActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartSetBusinessUnitAction cartSetBusinessUnitAction = CartSetBusinessUnitAction.builder()
.businessUnit(businessUnitBuilder -> businessUnitBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CartSetBusinessUnitAction with checking for non-null required valuesbuilds CartSetBusinessUnitAction without checking for non-null required valuesbusinessUnit
(BusinessUnitResourceIdentifier businessUnit) New Business Unit to assign to the Cart, which must have access to the Store that is set on the Cart.businessUnit
(Function<BusinessUnitResourceIdentifierBuilder, BusinessUnitResourceIdentifierBuilder> builder) New Business Unit to assign to the Cart, which must have access to the Store that is set on the Cart.New Business Unit to assign to the Cart, which must have access to the Store that is set on the Cart.of()
factory method for an instance of CartSetBusinessUnitActionBuilderof
(CartSetBusinessUnitAction template) create builder for CartSetBusinessUnitAction instancewithBusinessUnit
(Function<BusinessUnitResourceIdentifierBuilder, BusinessUnitResourceIdentifier> builder) New Business Unit to assign to the Cart, which must have access to the Store that is set on the Cart.
-
Constructor Details
-
CartSetBusinessUnitActionBuilder
public CartSetBusinessUnitActionBuilder()
-
-
Method Details
-
businessUnit
public CartSetBusinessUnitActionBuilder businessUnit(Function<BusinessUnitResourceIdentifierBuilder, BusinessUnitResourceIdentifierBuilder> builder) New Business Unit to assign to the Cart, which must have access to the Store that is set on the Cart.
- Parameters:
builder
- function to build the businessUnit value- Returns:
- Builder
-
withBusinessUnit
public CartSetBusinessUnitActionBuilder withBusinessUnit(Function<BusinessUnitResourceIdentifierBuilder, BusinessUnitResourceIdentifier> builder) New Business Unit to assign to the Cart, which must have access to the Store that is set on the Cart.
- Parameters:
builder
- function to build the businessUnit value- Returns:
- Builder
-
businessUnit
New Business Unit to assign to the Cart, which must have access to the Store that is set on the Cart.
- Parameters:
businessUnit
- value to be set- Returns:
- Builder
-
getBusinessUnit
New Business Unit to assign to the Cart, which must have access to the Store that is set on the Cart.
- Returns:
- businessUnit
-
build
builds CartSetBusinessUnitAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<CartSetBusinessUnitAction>
- Returns:
- CartSetBusinessUnitAction
-
buildUnchecked
builds CartSetBusinessUnitAction without checking for non-null required values- Returns:
- CartSetBusinessUnitAction
-
of
factory method for an instance of CartSetBusinessUnitActionBuilder- Returns:
- builder
-
of
create builder for CartSetBusinessUnitAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-