Interface ReturnItemDraft

All Superinterfaces:
CustomizableDraft<ReturnItemDraft>, Draft<ReturnItemDraft>

public interface ReturnItemDraft extends CustomizableDraft<ReturnItemDraft>, Draft<ReturnItemDraft>
ReturnItemDraft
Example to create an instance using the builder pattern

     ReturnItemDraft returnItemDraft = ReturnItemDraft.builder()
             .quantity(0.3)
             .shipmentState(ReturnShipmentState.ADVISED)
             .build()
 
  • Method Details

    • getKey

      String getKey()

      User-defined unique identifier of the Return Item.

      Returns:
      key
    • getQuantity

      @NotNull @NotNull Long 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

      @NotNull @NotNull ReturnShipmentState getShipmentState()

      Shipment status of the item to be returned. Can either be Advised or Returned only.

      Returns:
      shipmentState
    • getCustom

      @Valid @Valid CustomFieldsDraft getCustom()

      Custom Fields for the Return Item.

      Specified by:
      getCustom in interface CustomizableDraft<ReturnItemDraft>
      Returns:
      custom
    • setKey

      void setKey(String key)

      User-defined unique identifier of the Return Item.

      Parameters:
      key - value to be set
    • setQuantity

      void setQuantity(Long quantity)

      Number of Line Items or Custom Line Items to return.

      Parameters:
      quantity - value to be set
    • setLineItemId

      void setLineItemId(String lineItemId)

      id of the LineItem to return.

      Required if Line Items are returned, to create a LineItemReturnItem.

      Parameters:
      lineItemId - value to be set
    • setCustomLineItemId

      void setCustomLineItemId(String customLineItemId)

      id of the CustomLineItem to return.

      Required if Custom Line Items are returned, to create a CustomLineItemReturnItem.

      Parameters:
      customLineItemId - value to be set
    • setComment

      void setComment(String comment)

      User-defined description for the return.

      Parameters:
      comment - value to be set
    • setShipmentState

      void setShipmentState(ReturnShipmentState shipmentState)

      Shipment status of the item to be returned. Can either be Advised or Returned only.

      Parameters:
      shipmentState - value to be set
    • setCustom

      void setCustom(CustomFieldsDraft custom)

      Custom Fields for the Return Item.

      Specified by:
      setCustom in interface CustomizableDraft<ReturnItemDraft>
      Parameters:
      custom - value to be set
    • of

      static ReturnItemDraft of()
      factory method
      Returns:
      instance of ReturnItemDraft
    • of

      static ReturnItemDraft of(ReturnItemDraft template)
      factory method to create a shallow copy ReturnItemDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static ReturnItemDraft deepCopy(@Nullable ReturnItemDraft template)
      factory method to create a deep copy of ReturnItemDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static ReturnItemDraftBuilder builder()
      builder factory method for ReturnItemDraft
      Returns:
      builder
    • builder

      static ReturnItemDraftBuilder builder(ReturnItemDraft template)
      create builder for ReturnItemDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withReturnItemDraft

      default <T> T withReturnItemDraft(Function<ReturnItemDraft,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<ReturnItemDraft> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference