Class ReturnItemDraftBuilder
- All Implemented Interfaces:
Builder<ReturnItemDraft>
Example to create an instance using the builder pattern
ReturnItemDraft returnItemDraft = ReturnItemDraft.builder()
.quantity(0.3)
.shipmentState(ReturnShipmentState.ADVISED)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ReturnItemDraft with checking for non-null required valuesbuilds ReturnItemDraft without checking for non-null required valuesUser-defined description for the return.custom
(CustomFieldsDraft custom) Custom Fields for the Return Item.Custom Fields for the Return Item.customLineItemId
(String customLineItemId) id
of the CustomLineItem to return.User-defined description for the return.Custom Fields for the Return Item.id
of the CustomLineItem to return.getKey()
User-defined unique identifier of the Return Item.id
of the LineItem to return.Number of Line Items or Custom Line Items to return.Shipment status of the item to be returned.User-defined unique identifier of the Return Item.lineItemId
(String lineItemId) id
of the LineItem to return.static ReturnItemDraftBuilder
of()
factory method for an instance of ReturnItemDraftBuilderstatic ReturnItemDraftBuilder
of
(ReturnItemDraft template) create builder for ReturnItemDraft instanceNumber of Line Items or Custom Line Items to return.shipmentState
(ReturnShipmentState shipmentState) Shipment status of the item to be returned.Custom Fields for the Return Item.
-
Constructor Details
-
ReturnItemDraftBuilder
public ReturnItemDraftBuilder()
-
-
Method Details
-
key
User-defined unique identifier of the Return Item.
- Parameters:
key
- value to be set- Returns:
- Builder
-
quantity
Number of Line Items or Custom Line Items to return.
- Parameters:
quantity
- value to be set- Returns:
- Builder
-
lineItemId
id
of the LineItem to return.Required if Line Items are returned, to create a LineItemReturnItem.
- Parameters:
lineItemId
- value to be set- Returns:
- Builder
-
customLineItemId
id
of the CustomLineItem to return.Required if Custom Line Items are returned, to create a CustomLineItemReturnItem.
- Parameters:
customLineItemId
- value to be set- Returns:
- Builder
-
comment
User-defined description for the return.
- Parameters:
comment
- value to be set- Returns:
- Builder
-
shipmentState
Shipment status of the item to be returned. Can either be
Advised
orReturned
only.- Parameters:
shipmentState
- value to be set- Returns:
- Builder
-
custom
public ReturnItemDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields for the Return Item.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
public ReturnItemDraftBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Custom Fields for the Return Item.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields for the Return Item.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
getKey
User-defined unique identifier of the Return Item.
- Returns:
- key
-
getQuantity
Number of Line Items or Custom Line Items to return.
- Returns:
- quantity
-
getLineItemId
id
of the LineItem to return.Required if Line Items are returned, to create a LineItemReturnItem.
- Returns:
- lineItemId
-
getCustomLineItemId
id
of the CustomLineItem to return.Required if Custom Line Items are returned, to create a CustomLineItemReturnItem.
- Returns:
- customLineItemId
-
getComment
User-defined description for the return.
- Returns:
- comment
-
getShipmentState
Shipment status of the item to be returned. Can either be
Advised
orReturned
only.- Returns:
- shipmentState
-
getCustom
Custom Fields for the Return Item.
- Returns:
- custom
-
build
builds ReturnItemDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<ReturnItemDraft>
- Returns:
- ReturnItemDraft
-
buildUnchecked
builds ReturnItemDraft without checking for non-null required values- Returns:
- ReturnItemDraft
-
of
factory method for an instance of ReturnItemDraftBuilder- Returns:
- builder
-
of
create builder for ReturnItemDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-