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 ReturnItemDraftBuilderbuilder()builder factory method for ReturnItemDraftstatic ReturnItemDraftBuilderbuilder(ReturnItemDraft template) create builder for ReturnItemDraft instancecopyDeep()static ReturnItemDraftdeepCopy(ReturnItemDraft template) factory method to create a deep copy of ReturnItemDraftUser-defined description for the return.@Valid CustomFieldsDraftCustom Fields for the Return Item.idof the CustomLineItem to return.getKey()User-defined unique identifier of the Return Item.idof the LineItem to return.@NotNull LongNumber of Line Items or Custom Line Items to return.@NotNull ReturnShipmentStateShipment status of the item to be returned.static ReturnItemDraftof()factory methodstatic ReturnItemDraftof(ReturnItemDraft template) factory method to create a shallow copy ReturnItemDraftvoidsetComment(String comment) User-defined description for the return.voidsetCustom(CustomFieldsDraft custom) Custom Fields for the Return Item.voidsetCustomLineItemId(String customLineItemId) idof the CustomLineItem to return.voidUser-defined unique identifier of the Return Item.voidsetLineItemId(String lineItemId) idof the LineItem to return.voidsetQuantity(Long quantity) Number of Line Items or Custom Line Items to return.voidsetShipmentState(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> TwithReturnItemDraft(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()idof the LineItem to return.Required if Line Items are returned, to create a LineItemReturnItem.
- Returns:
- lineItemId
-
getCustomLineItemId
String getCustomLineItemId()idof 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
AdvisedorReturnedonly.- Returns:
- shipmentState
-
getCustom
Custom Fields for the Return Item.
- Specified by:
getCustomin 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
idof the LineItem to return.Required if Line Items are returned, to create a LineItemReturnItem.
- Parameters:
lineItemId- value to be set
-
setCustomLineItemId
idof 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
AdvisedorReturnedonly.- Parameters:
shipmentState- value to be set
-
setCustom
Custom Fields for the Return Item.
- Specified by:
setCustomin 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
-
copyDeep
ReturnItemDraft copyDeep() -
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
-