Interface OrderEditPreviewSuccess

All Superinterfaces:
OrderEditResult

public interface OrderEditPreviewSuccess extends OrderEditResult

The data is not persisted but is dynamically pulled by dry-running the update actions from stagedActions on the current version of the related Order, not from the Order version at the time the OrderEdit was created. Therefore, it cannot be queried.


Example to create an instance using the builder pattern

     OrderEditPreviewSuccess orderEditPreviewSuccess = OrderEditPreviewSuccess.builder()
             .preview(previewBuilder -> previewBuilder)
             .plusMessagePayloads(messagePayloadsBuilder -> messagePayloadsBuilder)
             .build()
 
  • Field Details

    • PREVIEW_SUCCESS

      static final String PREVIEW_SUCCESS
      discriminator value for OrderEditPreviewSuccess
      See Also:
  • Method Details

    • getPreview

      @NotNull @Valid @NotNull @Valid StagedOrder getPreview()

      A preview of the edited Order as it will be after all stagedActions (incl. optional Order API Extensions) are applied.

      Returns:
      preview
    • getMessagePayloads

      @NotNull @Valid @NotNull @Valid List<MessagePayload> getMessagePayloads()

      Messages that will be generated if the edit is applied.

      Returns:
      messagePayloads
    • setPreview

      void setPreview(StagedOrder preview)

      A preview of the edited Order as it will be after all stagedActions (incl. optional Order API Extensions) are applied.

      Parameters:
      preview - value to be set
    • setMessagePayloads

      void setMessagePayloads(MessagePayload... messagePayloads)

      Messages that will be generated if the edit is applied.

      Parameters:
      messagePayloads - values to be set
    • setMessagePayloads

      void setMessagePayloads(List<MessagePayload> messagePayloads)

      Messages that will be generated if the edit is applied.

      Parameters:
      messagePayloads - values to be set
    • of

      factory method
      Returns:
      instance of OrderEditPreviewSuccess
    • of

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

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

      builder factory method for OrderEditPreviewSuccess
      Returns:
      builder
    • builder

      create builder for OrderEditPreviewSuccess instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withOrderEditPreviewSuccess

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