Class ReturnInfoBuilder
java.lang.Object
com.commercetools.api.models.order.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)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ReturnInfo with checking for non-null required valuesbuilds ReturnInfo without checking for non-null required valuesgetItems()
Information on the Line Items or Custom Line Items returned.Date and time (UTC) the return is initiated.User-defined identifier to track the return.items
(ReturnItem... items) Information on the Line Items or Custom Line Items returned.items
(List<ReturnItem> items) Information on the Line Items or Custom Line Items returned.static ReturnInfoBuilder
of()
factory method for an instance of ReturnInfoBuilderstatic ReturnInfoBuilder
of
(ReturnInfo template) create builder for ReturnInfo instanceplusItems
(ReturnItem... items) Information on the Line Items or Custom Line Items returned.plusItems
(Function<ReturnItemBuilder, Builder<? extends ReturnItem>> builder) Information on the Line Items or Custom Line Items returned.returnDate
(ZonedDateTime returnDate) Date and time (UTC) the return is initiated.returnTrackingId
(String returnTrackingId) User-defined identifier to track the return.withItems
(Function<ReturnItemBuilder, Builder<? extends ReturnItem>> builder) Information on the Line Items or Custom Line Items returned.
-
Constructor Details
-
ReturnInfoBuilder
public ReturnInfoBuilder()
-
-
Method Details
-
items
Information on the Line Items or Custom Line Items returned.
- Parameters:
items
- value to be set- Returns:
- Builder
-
items
Information on the Line Items or Custom Line Items returned.
- Parameters:
items
- value to be set- Returns:
- Builder
-
plusItems
Information on the Line Items or Custom Line Items returned.
- Parameters:
items
- value to be set- Returns:
- Builder
-
plusItems
public ReturnInfoBuilder plusItems(Function<ReturnItemBuilder, Builder<? extends ReturnItem>> builder) Information on the Line Items or Custom Line Items returned.
- Parameters:
builder
- function to build the items value- Returns:
- Builder
-
withItems
public ReturnInfoBuilder withItems(Function<ReturnItemBuilder, Builder<? extends ReturnItem>> builder) Information on the Line Items or Custom Line Items returned.
- Parameters:
builder
- function to build the items value- Returns:
- Builder
-
returnTrackingId
User-defined identifier to track the return.
- Parameters:
returnTrackingId
- value to be set- Returns:
- Builder
-
returnDate
Date and time (UTC) the return is initiated.
- Parameters:
returnDate
- value to be set- Returns:
- Builder
-
getItems
Information on the Line Items or Custom Line Items returned.
- Returns:
- items
-
getReturnTrackingId
User-defined identifier to track the return.
- Returns:
- returnTrackingId
-
getReturnDate
Date and time (UTC) the return is initiated.
- Returns:
- returnDate
-
build
builds ReturnInfo with checking for non-null required values- Specified by:
build
in 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
-