Class OrderSetBusinessUnitActionBuilder
java.lang.Object
com.commercetools.api.models.order.OrderSetBusinessUnitActionBuilder
- All Implemented Interfaces:
Builder<OrderSetBusinessUnitAction>
public class OrderSetBusinessUnitActionBuilder
extends Object
implements Builder<OrderSetBusinessUnitAction>
OrderSetBusinessUnitActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
OrderSetBusinessUnitAction orderSetBusinessUnitAction = OrderSetBusinessUnitAction.builder()
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds OrderSetBusinessUnitAction with checking for non-null required valuesbuilds OrderSetBusinessUnitAction without checking for non-null required valuesbusinessUnit
(BusinessUnitResourceIdentifier businessUnit) New Business Unit to assign to the Order.businessUnit
(Function<BusinessUnitResourceIdentifierBuilder, BusinessUnitResourceIdentifierBuilder> builder) New Business Unit to assign to the Order.New Business Unit to assign to the Order.of()
factory method for an instance of OrderSetBusinessUnitActionBuilderof
(OrderSetBusinessUnitAction template) create builder for OrderSetBusinessUnitAction instancewithBusinessUnit
(Function<BusinessUnitResourceIdentifierBuilder, BusinessUnitResourceIdentifier> builder) New Business Unit to assign to the Order.
-
Constructor Details
-
OrderSetBusinessUnitActionBuilder
public OrderSetBusinessUnitActionBuilder()
-
-
Method Details
-
businessUnit
public OrderSetBusinessUnitActionBuilder businessUnit(Function<BusinessUnitResourceIdentifierBuilder, BusinessUnitResourceIdentifierBuilder> builder) New Business Unit to assign to the Order. If empty, any existing value is removed.
If the referenced Business Unit does not exist, a ReferencedResourceNotFound error is returned.
- Parameters:
builder
- function to build the businessUnit value- Returns:
- Builder
-
withBusinessUnit
public OrderSetBusinessUnitActionBuilder withBusinessUnit(Function<BusinessUnitResourceIdentifierBuilder, BusinessUnitResourceIdentifier> builder) New Business Unit to assign to the Order. If empty, any existing value is removed.
If the referenced Business Unit does not exist, a ReferencedResourceNotFound error is returned.
- Parameters:
builder
- function to build the businessUnit value- Returns:
- Builder
-
businessUnit
public OrderSetBusinessUnitActionBuilder businessUnit(@Nullable BusinessUnitResourceIdentifier businessUnit) New Business Unit to assign to the Order. If empty, any existing value is removed.
If the referenced Business Unit does not exist, a ReferencedResourceNotFound error is returned.
- Parameters:
businessUnit
- value to be set- Returns:
- Builder
-
getBusinessUnit
New Business Unit to assign to the Order. If empty, any existing value is removed.
If the referenced Business Unit does not exist, a ReferencedResourceNotFound error is returned.
- Returns:
- businessUnit
-
build
builds OrderSetBusinessUnitAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<OrderSetBusinessUnitAction>
- Returns:
- OrderSetBusinessUnitAction
-
buildUnchecked
builds OrderSetBusinessUnitAction without checking for non-null required values- Returns:
- OrderSetBusinessUnitAction
-
of
factory method for an instance of OrderSetBusinessUnitActionBuilder- Returns:
- builder
-
of
create builder for OrderSetBusinessUnitAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-