Interface ReturnItemDraft
- All Superinterfaces:
CustomizableDraft<ReturnItemDraft>
,Draft<ReturnItemDraft>
Example to create an instance using the builder pattern
ReturnItemDraft returnItemDraft = ReturnItemDraft.builder()
.quantity(0.3)
.shipmentState(ReturnShipmentState.ADVISED)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ReturnItemDraftBuilder
builder()
builder factory method for ReturnItemDraftstatic ReturnItemDraftBuilder
builder
(ReturnItemDraft template) create builder for ReturnItemDraft instancestatic ReturnItemDraft
deepCopy
(ReturnItemDraft template) factory method to create a deep copy of ReturnItemDraftUser-defined description for the return.@Valid CustomFieldsDraft
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.@NotNull Long
Number of Line Items or Custom Line Items to return.@NotNull ReturnShipmentState
Shipment status of the item to be returned.static ReturnItemDraft
of()
factory methodstatic ReturnItemDraft
of
(ReturnItemDraft template) factory method to create a shallow copy ReturnItemDraftvoid
setComment
(String comment) User-defined description for the return.void
setCustom
(CustomFieldsDraft custom) Custom Fields for the Return Item.void
setCustomLineItemId
(String customLineItemId) id
of the CustomLineItem to return.void
User-defined unique identifier of the Return Item.void
setLineItemId
(String lineItemId) id
of the LineItem to return.void
setQuantity
(Long quantity) Number of Line Items or Custom Line Items to return.void
setShipmentState
(ReturnShipmentState shipmentState) Shipment status of the item to be returned.static com.fasterxml.jackson.core.type.TypeReference<ReturnItemDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withReturnItemDraft
(Function<ReturnItemDraft, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.CustomizableDraft
unwrapCustomizableDraft
-
Method Details
-
getKey
String 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
String getLineItemId()id
of the LineItem to return.Required if Line Items are returned, to create a LineItemReturnItem.
- Returns:
- lineItemId
-
getCustomLineItemId
String getCustomLineItemId()id
of the CustomLineItem to return.Required if Custom Line Items are returned, to create a CustomLineItemReturnItem.
- Returns:
- customLineItemId
-
getComment
String 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.
- Specified by:
getCustom
in interfaceCustomizableDraft<ReturnItemDraft>
- Returns:
- custom
-
setKey
User-defined unique identifier of the Return Item.
- Parameters:
key
- value to be set
-
setQuantity
Number of Line Items or Custom Line Items to return.
- Parameters:
quantity
- value to be set
-
setLineItemId
id
of the LineItem to return.Required if Line Items are returned, to create a LineItemReturnItem.
- Parameters:
lineItemId
- value to be set
-
setCustomLineItemId
id
of the CustomLineItem to return.Required if Custom Line Items are returned, to create a CustomLineItemReturnItem.
- Parameters:
customLineItemId
- value to be set
-
setComment
User-defined description for the return.
- Parameters:
comment
- value to be set
-
setShipmentState
Shipment status of the item to be returned. Can either be
Advised
orReturned
only.- Parameters:
shipmentState
- value to be set
-
setCustom
Custom Fields for the Return Item.
- Specified by:
setCustom
in interfaceCustomizableDraft<ReturnItemDraft>
- Parameters:
custom
- value to be set
-
of
factory method- Returns:
- instance of ReturnItemDraft
-
of
factory method to create a shallow copy ReturnItemDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ReturnItemDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ReturnItemDraft- Returns:
- builder
-
builder
create builder for ReturnItemDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withReturnItemDraft
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-