Interface OrderEditDraft

All Superinterfaces:
CustomizableDraft<OrderEditDraft>, Draft<OrderEditDraft>, WithKey

public interface OrderEditDraft extends CustomizableDraft<OrderEditDraft>, WithKey, Draft<OrderEditDraft>
OrderEditDraft
Example to create an instance using the builder pattern

     OrderEditDraft orderEditDraft = OrderEditDraft.builder()
             .resource(resourceBuilder -> resourceBuilder)
             .build()
 
  • Method Details

    • getKey

      String getKey()

      User-defined unique identifier for the Order Edit.

      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • getResource

      @NotNull @Valid @NotNull @Valid OrderReference getResource()

      Reference to the Order updated with this edit.

      Returns:
      resource
    • getStagedActions

      @Valid @Valid List<StagedOrderUpdateAction> getStagedActions()

      Update actions to apply to the Order referenced in resource. Cannot be updated if the edit has been applied.

      Returns:
      stagedActions
    • getCustom

      @Valid @Valid CustomFieldsDraft getCustom()

      Custom Fields for the Order Edit.

      Specified by:
      getCustom in interface CustomizableDraft<OrderEditDraft>
      Returns:
      custom
    • getComment

      String getComment()

      User-defined description regarding the Order Edit.

      Returns:
      comment
    • getDryRun

      Boolean getDryRun()

      Set to true if you want to peview the edited Order first without persisting it (dry run). A dry run allows checking for potential errors when trying to apply the stagedActions.

      Order API Extensions, if any, are also called in dry runs.

      Returns:
      dryRun
    • setKey

      void setKey(String key)

      User-defined unique identifier for the Order Edit.

      Parameters:
      key - value to be set
    • setResource

      void setResource(OrderReference resource)

      Reference to the Order updated with this edit.

      Parameters:
      resource - value to be set
    • setStagedActions

      void setStagedActions(StagedOrderUpdateAction... stagedActions)

      Update actions to apply to the Order referenced in resource. Cannot be updated if the edit has been applied.

      Parameters:
      stagedActions - values to be set
    • setStagedActions

      void setStagedActions(List<StagedOrderUpdateAction> stagedActions)

      Update actions to apply to the Order referenced in resource. Cannot be updated if the edit has been applied.

      Parameters:
      stagedActions - values to be set
    • setCustom

      void setCustom(CustomFieldsDraft custom)

      Custom Fields for the Order Edit.

      Specified by:
      setCustom in interface CustomizableDraft<OrderEditDraft>
      Parameters:
      custom - value to be set
    • setComment

      void setComment(String comment)

      User-defined description regarding the Order Edit.

      Parameters:
      comment - value to be set
    • setDryRun

      void setDryRun(Boolean dryRun)

      Set to true if you want to peview the edited Order first without persisting it (dry run). A dry run allows checking for potential errors when trying to apply the stagedActions.

      Order API Extensions, if any, are also called in dry runs.

      Parameters:
      dryRun - value to be set
    • of

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

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

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

      static OrderEditDraftBuilder builder()
      builder factory method for OrderEditDraft
      Returns:
      builder
    • builder

      static OrderEditDraftBuilder builder(OrderEditDraft template)
      create builder for OrderEditDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withOrderEditDraft

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