Interface LineItemReturnItem

All Superinterfaces:
Customizable<ReturnItem>, ReturnItem

public interface LineItemReturnItem extends ReturnItem
LineItemReturnItem
Example to create an instance using the builder pattern

     LineItemReturnItem lineItemReturnItem = LineItemReturnItem.builder()
             .id("{id}")
             .quantity(0.3)
             .shipmentState(ReturnShipmentState.ADVISED)
             .paymentState(ReturnPaymentState.NON_REFUNDABLE)
             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .lineItemId("{lineItemId}")
             .build()
 
  • Field Details

    • LINE_ITEM_RETURN_ITEM

      static final String LINE_ITEM_RETURN_ITEM
      discriminator value for LineItemReturnItem
      See Also:
  • Method Details

    • getKey

      String getKey()

      User-defined unique identifier of the LineItemReturnItem.

      Specified by:
      getKey in interface ReturnItem
      Returns:
      key
    • getLineItemId

      @NotNull @NotNull String getLineItemId()

      id of the returned LineItem.

      Returns:
      lineItemId
    • getQuantity

      @NotNull @NotNull Long getQuantity()

      Number of Line Items returned.

      Specified by:
      getQuantity in interface ReturnItem
      Returns:
      quantity
    • setKey

      void setKey(String key)

      User-defined unique identifier of the LineItemReturnItem.

      Specified by:
      setKey in interface ReturnItem
      Parameters:
      key - value to be set
    • setLineItemId

      void setLineItemId(String lineItemId)

      id of the returned LineItem.

      Parameters:
      lineItemId - value to be set
    • setQuantity

      void setQuantity(Long quantity)

      Number of Line Items returned.

      Specified by:
      setQuantity in interface ReturnItem
      Parameters:
      quantity - value to be set
    • of

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

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

      factory method to create a deep copy of LineItemReturnItem
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static LineItemReturnItemBuilder builder()
      builder factory method for LineItemReturnItem
      Returns:
      builder
    • builder

      static LineItemReturnItemBuilder builder(LineItemReturnItem template)
      create builder for LineItemReturnItem instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withLineItemReturnItem

      default <T> T withLineItemReturnItem(Function<LineItemReturnItem,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<LineItemReturnItem> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference