Interface LineItemStateTransitionMessagePayload

All Superinterfaces:
MessagePayload, MessagePayloadMixin, OrderMessagePayload

public interface LineItemStateTransitionMessagePayload extends OrderMessagePayload

Generated after a successful Transition LineItem State update action.


Example to create an instance using the builder pattern

     LineItemStateTransitionMessagePayload lineItemStateTransitionMessagePayload = LineItemStateTransitionMessagePayload.builder()
             .lineItemId("{lineItemId}")
             .transitionDate(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .quantity(0.3)
             .fromState(fromStateBuilder -> fromStateBuilder)
             .toState(toStateBuilder -> toStateBuilder)
             .build()
 
  • Field Details

    • LINE_ITEM_STATE_TRANSITION

      static final String LINE_ITEM_STATE_TRANSITION
      discriminator value for LineItemStateTransitionMessagePayload
      See Also:
  • Method Details

    • getLineItemId

      @NotNull @NotNull String getLineItemId()

      Unique identifier of the Line Item.

      Returns:
      lineItemId
    • getLineItemKey

      String getLineItemKey()

      User-defined unique identifier of the LineItem.

      Returns:
      lineItemKey
    • getTransitionDate

      @NotNull @NotNull ZonedDateTime getTransitionDate()

      Date and time (UTC) the transition of the Line Item State was performed.

      Returns:
      transitionDate
    • getQuantity

      @NotNull @NotNull Long getQuantity()

      Number of Line Items for which the State was transitioned.

      Returns:
      quantity
    • getFromState

      @NotNull @Valid @NotNull @Valid StateReference getFromState()

      State the Line Item was transitioned from.

      Returns:
      fromState
    • getToState

      @NotNull @Valid @NotNull @Valid StateReference getToState()

      State the Line Item was transitioned to.

      Returns:
      toState
    • setLineItemId

      void setLineItemId(String lineItemId)

      Unique identifier of the Line Item.

      Parameters:
      lineItemId - value to be set
    • setLineItemKey

      void setLineItemKey(String lineItemKey)

      User-defined unique identifier of the LineItem.

      Parameters:
      lineItemKey - value to be set
    • setTransitionDate

      void setTransitionDate(ZonedDateTime transitionDate)

      Date and time (UTC) the transition of the Line Item State was performed.

      Parameters:
      transitionDate - value to be set
    • setQuantity

      void setQuantity(Long quantity)

      Number of Line Items for which the State was transitioned.

      Parameters:
      quantity - value to be set
    • setFromState

      void setFromState(StateReference fromState)

      State the Line Item was transitioned from.

      Parameters:
      fromState - value to be set
    • setToState

      void setToState(StateReference toState)

      State the Line Item was transitioned to.

      Parameters:
      toState - value to be set
    • of

      factory method
      Returns:
      instance of LineItemStateTransitionMessagePayload
    • of

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

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

      builder factory method for LineItemStateTransitionMessagePayload
      Returns:
      builder
    • builder

      create builder for LineItemStateTransitionMessagePayload instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withLineItemStateTransitionMessagePayload

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