Class ReturnInfoBuilder
java.lang.Object
com.commercetools.history.models.common.ReturnInfoBuilder
- All Implemented Interfaces:
Builder<ReturnInfo>
ReturnInfoBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ReturnInfo returnInfo = ReturnInfo.builder()
.plusItems(itemsBuilder -> itemsBuilder)
.returnTrackingId("{returnTrackingId}")
.returnDate("{returnDate}")
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddItems(Function<ReturnItemBuilder, ReturnItem> builder) add the value to the items using the builder functionbuild()builds ReturnInfo with checking for non-null required valuesbuilds ReturnInfo without checking for non-null required valuesgetItems()value of items}value of returnDate}Identifies, which return tracking ID is connected to this particular return.items(ReturnItem... items) set values to the itemsitems(List<ReturnItem> items) set value to the itemsstatic ReturnInfoBuilderof()factory method for an instance of ReturnInfoBuilderstatic ReturnInfoBuilderof(ReturnInfo template) create builder for ReturnInfo instanceplusItems(ReturnItem... items) add values to the itemsplusItems(Function<ReturnItemBuilder, ReturnItemBuilder> builder) add the value to the items using the builder functionreturnDate(String returnDate) set the value to the returnDatereturnTrackingId(String returnTrackingId) Identifies, which return tracking ID is connected to this particular return.setItems(Function<ReturnItemBuilder, ReturnItem> builder) set the value to the items using the builder functionwithItems(Function<ReturnItemBuilder, ReturnItemBuilder> builder) set the value to the items using the builder function
-
Constructor Details
-
ReturnInfoBuilder
public ReturnInfoBuilder()
-
-
Method Details
-
items
set values to the items- Parameters:
items- value to be set- Returns:
- Builder
-
items
set value to the items- Parameters:
items- value to be set- Returns:
- Builder
-
plusItems
add values to the items- Parameters:
items- value to be set- Returns:
- Builder
-
plusItems
add the value to the items using the builder function- Parameters:
builder- function to build the items value- Returns:
- Builder
-
withItems
set the value to the items using the builder function- Parameters:
builder- function to build the items value- Returns:
- Builder
-
addItems
add the value to the items using the builder function- Parameters:
builder- function to build the items value- Returns:
- Builder
-
setItems
set the value to the items using the builder function- Parameters:
builder- function to build the items value- Returns:
- Builder
-
returnTrackingId
Identifies, which return tracking ID is connected to this particular return.
- Parameters:
returnTrackingId- value to be set- Returns:
- Builder
-
returnDate
set the value to the returnDate- Parameters:
returnDate- value to be set- Returns:
- Builder
-
getItems
value of items}- Returns:
- items
-
getReturnTrackingId
Identifies, which return tracking ID is connected to this particular return.
- Returns:
- returnTrackingId
-
getReturnDate
value of returnDate}- Returns:
- returnDate
-
build
builds ReturnInfo with checking for non-null required values- Specified by:
buildin interfaceBuilder<ReturnInfo>- Returns:
- ReturnInfo
-
buildUnchecked
builds ReturnInfo without checking for non-null required values- Returns:
- ReturnInfo
-
of
factory method for an instance of ReturnInfoBuilder- Returns:
- builder
-
of
create builder for ReturnInfo instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-