Interface OrderTransitionLineItemStateAction

All Superinterfaces:
OrderUpdateAction, ResourceUpdateAction<OrderUpdateAction>

public interface OrderTransitionLineItemStateAction extends OrderUpdateAction

Produces the Line Item State Transition Message.


Example to create an instance using the builder pattern

     OrderTransitionLineItemStateAction orderTransitionLineItemStateAction = OrderTransitionLineItemStateAction.builder()
             .quantity(0.3)
             .fromState(fromStateBuilder -> fromStateBuilder)
             .toState(toStateBuilder -> toStateBuilder)
             .build()
 
  • Field Details

    • TRANSITION_LINE_ITEM_STATE

      static final String TRANSITION_LINE_ITEM_STATE
      discriminator value for OrderTransitionLineItemStateAction
      See Also:
  • Method Details

    • getLineItemId

      String getLineItemId()

      id of the LineItem to update. Either lineItemId or lineItemKey is required.

      Returns:
      lineItemId
    • getLineItemKey

      String getLineItemKey()

      key of the LineItem to update. Either lineItemId or lineItemKey is required.

      Returns:
      lineItemKey
    • getQuantity

      @NotNull @NotNull Long getQuantity()

      Number of Line Items that should transition State.

      Returns:
      quantity
    • getFromState

      @NotNull @Valid @NotNull @Valid StateResourceIdentifier getFromState()

      State the Line Item should transition from.

      Returns:
      fromState
    • getToState

      @NotNull @Valid @NotNull @Valid StateResourceIdentifier getToState()

      State the Line Item should transition to.

      Returns:
      toState
    • getActualTransitionDate

      ZonedDateTime getActualTransitionDate()

      Date and time (UTC) to perform the State transition.

      Returns:
      actualTransitionDate
    • setLineItemId

      void setLineItemId(String lineItemId)

      id of the LineItem to update. Either lineItemId or lineItemKey is required.

      Parameters:
      lineItemId - value to be set
    • setLineItemKey

      void setLineItemKey(String lineItemKey)

      key of the LineItem to update. Either lineItemId or lineItemKey is required.

      Parameters:
      lineItemKey - value to be set
    • setQuantity

      void setQuantity(Long quantity)

      Number of Line Items that should transition State.

      Parameters:
      quantity - value to be set
    • setFromState

      void setFromState(StateResourceIdentifier fromState)

      State the Line Item should transition from.

      Parameters:
      fromState - value to be set
    • setToState

      void setToState(StateResourceIdentifier toState)

      State the Line Item should transition to.

      Parameters:
      toState - value to be set
    • setActualTransitionDate

      void setActualTransitionDate(ZonedDateTime actualTransitionDate)

      Date and time (UTC) to perform the State transition.

      Parameters:
      actualTransitionDate - value to be set
    • of

      factory method
      Returns:
      instance of OrderTransitionLineItemStateAction
    • of

      factory method to create a shallow copy OrderTransitionLineItemStateAction
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

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

      builder factory method for OrderTransitionLineItemStateAction
      Returns:
      builder
    • builder

      create builder for OrderTransitionLineItemStateAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withOrderTransitionLineItemStateAction

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