Interface ReturnItem

All Superinterfaces:
Customizable<ReturnItem>
All Known Subinterfaces:
CustomLineItemReturnItem, LineItemReturnItem

public interface ReturnItem extends Customizable<ReturnItem>
ReturnItem
Example to create a subtype instance using the builder pattern

     ReturnItem returnItem = ReturnItem.customLineItemReturnItemBuilder()
             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"))
             customLineItemId("{customLineItemId}")
             .build()
 
  • Method Details

    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the Return Item.

      Returns:
      id
    • 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 returned.

      Returns:
      quantity
    • getType

      @NotNull @NotNull String getType()
      Returns:
      type
    • getComment

      String getComment()

      User-defined description for the return.

      Returns:
      comment
    • getShipmentState

      @NotNull @NotNull ReturnShipmentState getShipmentState()

      Shipment status of the Return Item.

      Returns:
      shipmentState
    • getPaymentState

      @NotNull @NotNull ReturnPaymentState getPaymentState()

      Payment status of the Return Item:

      • NonRefundable, for items in the Advised ReturnShipmentState
      • Initial, for items in the Returned ReturnShipmentState
      Returns:
      paymentState
    • getCustom

      @Valid @Valid CustomFields getCustom()

      Custom Fields of the Return Item.

      Specified by:
      getCustom in interface Customizable<ReturnItem>
      Returns:
      custom
    • getLastModifiedAt

      @NotNull @NotNull ZonedDateTime getLastModifiedAt()

      Date and time (UTC) the Return Item was last updated.

      Returns:
      lastModifiedAt
    • getCreatedAt

      @NotNull @NotNull ZonedDateTime getCreatedAt()

      Date and time (UTC) the Return Item was intitially created.

      Returns:
      createdAt
    • setId

      void setId(String id)

      Unique identifier of the Return Item.

      Parameters:
      id - value to be set
    • 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 returned.

      Parameters:
      quantity - 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 Return Item.

      Parameters:
      shipmentState - value to be set
    • setPaymentState

      void setPaymentState(ReturnPaymentState paymentState)

      Payment status of the Return Item:

      • NonRefundable, for items in the Advised ReturnShipmentState
      • Initial, for items in the Returned ReturnShipmentState
      Parameters:
      paymentState - value to be set
    • setCustom

      void setCustom(CustomFields custom)

      Custom Fields of the Return Item.

      Specified by:
      setCustom in interface Customizable<ReturnItem>
      Parameters:
      custom - value to be set
    • setLastModifiedAt

      void setLastModifiedAt(ZonedDateTime lastModifiedAt)

      Date and time (UTC) the Return Item was last updated.

      Parameters:
      lastModifiedAt - value to be set
    • setCreatedAt

      void setCreatedAt(ZonedDateTime createdAt)

      Date and time (UTC) the Return Item was intitially created.

      Parameters:
      createdAt - value to be set
    • deepCopy

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

      static CustomLineItemReturnItemBuilder customLineItemReturnItemBuilder()
      builder for customLineItemReturnItem subtype
      Returns:
      builder
    • lineItemReturnItemBuilder

      static LineItemReturnItemBuilder lineItemReturnItemBuilder()
      builder for lineItemReturnItem subtype
      Returns:
      builder
    • withReturnItem

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