Class ItemStateBuilder
java.lang.Object
com.commercetools.api.models.order.ItemStateBuilder
ItemStateBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ItemState itemState = ItemState.builder()
.quantity(0.3)
.state(stateBuilder -> stateBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ItemState with checking for non-null required valuesbuilds ItemState without checking for non-null required valuesNumber of Line Items or Custom Line Items in this State.getState()
State of the Line Items or Custom Line Items in a custom workflow.static ItemStateBuilder
of()
factory method for an instance of ItemStateBuilderstatic ItemStateBuilder
create builder for ItemState instanceNumber of Line Items or Custom Line Items in this State.state
(StateReference state) State of the Line Items or Custom Line Items in a custom workflow.State of the Line Items or Custom Line Items in a custom workflow.withState
(Function<StateReferenceBuilder, StateReference> builder) State of the Line Items or Custom Line Items in a custom workflow.
-
Constructor Details
-
ItemStateBuilder
public ItemStateBuilder()
-
-
Method Details
-
quantity
Number of Line Items or Custom Line Items in this State.
- Parameters:
quantity
- value to be set- Returns:
- Builder
-
state
State of the Line Items or Custom Line Items in a custom workflow.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
withState
State of the Line Items or Custom Line Items in a custom workflow.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
state
State of the Line Items or Custom Line Items in a custom workflow.
- Parameters:
state
- value to be set- Returns:
- Builder
-
getQuantity
Number of Line Items or Custom Line Items in this State.
- Returns:
- quantity
-
getState
State of the Line Items or Custom Line Items in a custom workflow.
- Returns:
- state
-
build
builds ItemState with checking for non-null required values -
buildUnchecked
builds ItemState without checking for non-null required values- Returns:
- ItemState
-
of
factory method for an instance of ItemStateBuilder- Returns:
- builder
-
of
create builder for ItemState instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-